fabro/lib/components/fabro-agent/Cargo.toml
Bryan Helmkamp e54fef760a
refactor(auth): remove EnvCredentialSource and make the run vault required
`EnvCredentialSource` resolved provider credentials from the process
environment. It had no production entry point of its own — it was only
ever reached as the `None` arm of an `Option<Vault>` in three places:
`build_llm_source`, `configured_providers_for_start`, and
`configured_providers_from_process_env`.

That optional vault is not a state the product can be in. Every run has a
server behind it, the server always spawns workers with `--storage-dir`
(`worker_runtime.rs`), and `SqlVaultCredentialSource` backs both the
server and the CLI. So the fallback only served to silently degrade
credential resolution to whatever the worker process happened to have in
its environment.

Make the vault required across the run path — `RunOptions`,
`StartServices`, `build_llm_source`, `tool_secrets_from_configured_sources`,
`vault_token_lookup`, and the CLI GitHub helpers — so the invariant is
enforced by types rather than assumed. A worker spawned without
`--storage-dir` now fails with a clear message instead of quietly
continuing without a vault.

`configured_providers_from_process_env` had no callers at all and is
deleted. `AgentApiBackend::new_from_env` was public but only ever called
from its own tests; it is deleted too.

Test-only credential sources move to a feature-gated
`fabro_auth::test_support`, wired through dev-dependencies so they never
link into production builds. The CLI worker tests now pass
`--storage-dir`, matching what the server actually does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 20:36:54 -04:00

71 lines
2 KiB
TOML

[package]
name = "fabro-agent"
edition.workspace = true
version.workspace = true
publish = false
license.workspace = true
description = "A programmable agentic loop for coding agents"
repository = "https://github.com/brynary/arc"
readme = "README.md"
keywords = ["llm", "ai", "agent", "coding"]
categories = ["api-bindings"]
[features]
default = ["docker"]
docker = ["fabro-sandbox/docker"]
quarantine = []
[lib]
doctest = false
[lints]
workspace = true
[dependencies]
clap.workspace = true
anyhow.workspace = true
fabro-auth = { path = "../../foundation/fabro-auth" }
fabro-config = { path = "../../foundation/fabro-config", features = ["clap"] }
fabro-types = { path = "../../foundation/fabro-types", features = ["clap"] }
fabro-llm = { path = "../fabro-llm" }
fabro-model = { path = "../../foundation/fabro-model" }
fabro-mcp = { path = "../fabro-mcp" }
fabro-sandbox = { path = "../fabro-sandbox" }
fabro-static.workspace = true
fabro-template = { path = "../../foundation/fabro-template" }
fabro-util = { path = "../../foundation/fabro-util" }
fabro-vault = { path = "../../foundation/fabro-vault" }
fabro-http.workspace = true
thiserror.workspace = true
serde.workspace = true
serde_json.workspace = true
strum.workspace = true
tokio.workspace = true
uuid.workspace = true
futures.workspace = true
async-trait.workspace = true
jsonschema.workspace = true
chrono.workspace = true
tokio-util.workspace = true
tracing.workspace = true
toml.workspace = true
dirs = "6"
glob = "0.3"
sha2.workspace = true
shell-escape = "0.1"
htmd = "0.5"
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[dev-dependencies]
fabro-auth = { path = "../../foundation/fabro-auth", features = ["test-support"] }
insta.workspace = true
tokio = { workspace = true, features = ["test-util", "macros"] }
tempfile = "3"
paste = "1"
shlex = "1"
fabro-sandbox = { path = "../fabro-sandbox", features = ["test-support"] }
fabro-macros = { path = "../../foundation/fabro-macros" }
fabro-test = { workspace = true }
tracing-subscriber.workspace = true