[workspace]
members = [".", "adapters", "artifacts", "auth", "eval", "local-llm", "macros", "mcp", "memory", "patterns", "plugins/web", "policies", "tui", "xtask"]
resolver = "2"

[workspace.dependencies]
serde = { version = "1", features = ["derive", "rc"] }
serde_json = "1"
tokio = { version = "1", features = ["full"] }
tokio-util = "0.7"
tokio-stream = "0.1"
futures = "0.3"
tracing = "0.1"
uuid = { version = "1", features = ["v4"] }
reqwest = { version = "0.13", features = ["json", "stream", "form"] }
thiserror = "2"
rand = "0.10"
schemars = "1"
dotenvy = "0.15"
pretty_assertions = "1"
criterion = { version = "0.8", features = ["html_reports"] }
tempfile = "3"
wiremock = "0.6"
serde_yaml = "0.9"
sha2 = "0.11"
hmac = "0.13"
toml = "0.9"
chrono = { version = "0.4", features = ["serde"] }
proptest = { version = "1", default-features = false, features = ["std"] }
rstest = "0.26"
insta = { version = "1", features = ["json"] }
syn = { version = "2", features = ["full", "extra-traits"] }
quote = "1"
proc-macro2 = "1"
bytes = "1"
dirs = "6"
regex = "1"
aws-smithy-eventstream = "0.60"
aws-smithy-types = "1"
aws-credential-types = "1.2.14"
aws-sigv4 = { version = "1.4.2", default-features = false, features = ["sign-http", "http1"] }
aws-smithy-runtime-api = { version = "1.11.6", features = ["client"] }

[package]
name = "swink-agent"
version = "0.7.8"
edition = "2024"
rust-version = "1.88"
description = "Core scaffolding for running LLM-powered agentic loops"
license = "MIT"
repository = "https://github.com/SuperSwinkAI/Swink-Agent"
readme = "README.md"
keywords = ["llm", "agent", "ai", "streaming", "tools"]
categories = ["development-tools", "api-bindings", "asynchronous"]

[profile.dev]
# Faster incremental builds for contributors (especially on macOS).
split-debuginfo = "unpacked"

[profile.release]
lto = "thin"
codegen-units = 1

[package.metadata.docs_rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[features]
default = ["builtin-tools", "transfer"]
builtin-tools = ["dep:sha2"]
transfer = []
testkit = []
artifact-store = ["dep:bytes"]
artifact-tools = ["artifact-store"]
hot-reload = ["dep:notify"]
tiktoken = ["dep:tiktoken-rs"]
plugins = []
otel = ["dep:tracing-opentelemetry", "dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-otlp", "dep:tracing-subscriber"]

[dependencies]
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
tokio.workspace = true
tokio-util.workspace = true
futures.workspace = true
tokio-stream.workspace = true
jsonschema = "0.28"
schemars.workspace = true
regex.workspace = true
uuid.workspace = true
rand.workspace = true
tracing.workspace = true
bytes = { workspace = true, optional = true }
sha2 = { workspace = true, optional = true }
toml.workspace = true
chrono.workspace = true
tiktoken-rs = { version = "0.6", optional = true }
notify = { version = "7", optional = true }
tracing-opentelemetry = { version = "0.32", optional = true }
opentelemetry = { version = "0.31", optional = true }
opentelemetry_sdk = { version = "0.31", features = ["rt-tokio"], optional = true }
opentelemetry-otlp = { version = "0.31", features = ["grpc-tonic"], optional = true }
tracing-subscriber = { version = "0.3", features = ["registry"], optional = true }

[[bench]]
name = "context"
harness = false

[dev-dependencies]
swink-agent-adapters = { path = "adapters", features = ["proxy"] }
dotenvy.workspace = true
pretty_assertions.workspace = true
tempfile.workspace = true
criterion.workspace = true
tokio = { workspace = true, features = ["full", "test-util"] }
wiremock.workspace = true
proptest.workspace = true
insta.workspace = true
opentelemetry = "0.31"
opentelemetry_sdk = { version = "0.31", features = ["testing", "rt-tokio"] }
tracing-opentelemetry = "0.32"
tracing-subscriber = { version = "0.3", features = ["registry"] }

[lints.rust]
unsafe_code = "forbid"


[lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }

# Pedantic overrides — too noisy or stylistic
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
redundant_pub_crate = "allow"
