Files
buzz/crates/buzz-agent/Cargo.toml
Kalvin C c293b3cd40 fix(agent): resolve oauth cache home cross-platform (#5151)
## Summary

- resolve the OAuth cache home directory with the repository's
platform-aware `dirs` convention
- preserve the existing `.config/buzz-agent/oauth` cache layout on macOS
and Linux
- make the cache-path regression assertion portable across path
separators

## Problem

`buzz-agent` read only `$HOME` when constructing the OAuth token cache
path. Packaged Windows processes do not guarantee that Unix variable, so
OAuth source construction failed with `oauth cache: $HOME not set` even
though Windows had a valid user profile.

## Validation

Independent reviewers validated exact commit
`836d820483b141b7291170cb33535ac7cb49b2eb` on Windows/MSVC with `HOME`
unset and `USERPROFILE` present:

- `cargo +1.94.1 clippy -p buzz-agent --all-targets --locked -- -D
warnings`
- `cargo +1.94.1 fmt --all -- --check`
- `git diff --check f53bbd1..836d820`
- `auth::` tests: 11/11 passed with `HOME` unset
- full package lib target: 396 passed / 2 failed; identical-base
controls classified both as pre-existing Windows failures

The changed regression fails on the base with `$HOME not set` and passes
on this branch. `dirs 6.0.0` was already locked by other workspace
crates; the lockfile change adds only the `buzz-agent` dependency edge.

Signed-off-by: Kalvin C <kalvinnchau@users.noreply.github.com>
2026-08-07 08:42:01 -07:00

59 lines
1.9 KiB
TOML

[package]
name = "buzz-agent"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
description = "Minimal, unbreakable ACP-compliant agent. Non-streaming. Tool-calls-as-output."
readme = "README.md"
keywords = ["acp", "agent", "llm", "mcp", "minimal"]
categories = ["command-line-utilities", "web-programming"]
[lib]
name = "buzz_agent"
path = "src/lib.rs"
[[bin]]
name = "buzz-agent"
path = "src/main.rs"
# Test-only fake MCP server. Built unconditionally because cargo can't gate
# bins on `cfg(test)`, but it's tiny and only used by integration tests.
[[bin]]
name = "fake-mcp"
path = "tests/bin/fake_mcp.rs"
[dependencies]
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "io-std", "io-util", "sync", "process", "time", "net"] }
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = { workspace = true }
reqwest = { workspace = true, features = ["json", "rustls", "form"] }
rmcp = { version = "1", default-features = false, features = ["client", "transport-child-process"] }
arc-swap = "1"
getrandom = "0.4"
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
# OAuth 2.0 PKCE for Databricks (and future browser-auth providers).
async-trait = "0.1"
axum = { workspace = true }
base64 = "0.22"
hex = { workspace = true }
sha2 = { workspace = true }
urlencoding = "2"
webbrowser = "1"
dirs = "6"
[target.'cfg(unix)'.dependencies]
nix = { version = "0.31", default-features = false, features = ["signal", "process"] }
[dev-dependencies]
tokio = { workspace = true, features = ["test-util", "rt-multi-thread", "macros", "io-std", "io-util", "sync", "process", "time", "net"] }
nix = { version = "0.31", default-features = false, features = ["signal", "process"] }
axum = { workspace = true }
hex = { workspace = true }
serde = { workspace = true }
sha2 = { workspace = true }
tempfile = "3"