mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Agent sessions could commit under the human operator's ambient git identity: only buzz-dev-mcp's shim applied the nostr author/signing GIT_CONFIG_* env, and only to its own shell-tool children. The native shells of claude-code, codex, and goose never saw it, so a bare `git commit` there resolved to whatever the repo/global config carried — erasing the AI-attribution signal (e.g. block/buzz #3140). Make the identity machine-managed across every harness: - New `buzz-git-identity` crate holds the pure author/email/signing/ keyfile logic as the single source of truth, consumed by both the shim and the harness so an agent commits under a byte-identical identity regardless of which surface applied it. - A `git` enforcement wrapper (installed on PATH ahead of the real binary) scrubs GIT_AUTHOR_*/GIT_COMMITTER_* from the child env, rejects `-c user.*`, `--config-env=user.*`, `--author`, and `--reset-author`, and on push refuses any outgoing commit not authored by the agent identity, then execs real git. - The harness lifts the identity + NIP-GS signing config onto the agent-runtime child and installs the wrapper plus the nostr signer/credential helpers via buzz-acp's own multicall, so native shells of all runtimes inherit both. Composed over the desktop's per-URL credential helper; skipped when no nostr key is present. - Prompt guidance (base_prompt.md, nest_agents.md) updated: identity is machine-managed; credit the operator via Co-authored-by/ Signed-off-by trailers, never user.name/email/-c/--author. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
55 lines
2.1 KiB
TOML
55 lines
2.1 KiB
TOML
[package]
|
|
name = "buzz-dev-mcp"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
|
|
[lib]
|
|
name = "buzz_dev_mcp"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "buzz-dev-mcp"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
buzz-cli = { path = "../buzz-cli" }
|
|
buzz-git-identity = { path = "../buzz-git-identity" }
|
|
git-credential-nostr = { path = "../git-credential-nostr" }
|
|
git-sign-nostr = { path = "../git-sign-nostr" }
|
|
nostr = { workspace = true }
|
|
zeroize = { workspace = true }
|
|
tokio = { workspace = true }
|
|
tokio-util = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
rmcp = { workspace = true }
|
|
schemars = { workspace = true }
|
|
similar = "3"
|
|
tempfile = "3"
|
|
ignore = "0.4.25"
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
# wss:// tool calls use rustls via tokio-tungstenite/reqwest. The workspace
|
|
# pulls both ring and aws-lc-rs transitively, so install ring explicitly.
|
|
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
|
|
# view_image tool: HTTP fetch (workspace reqwest is already used by buzz-cli;
|
|
# adding it here is essentially free), base64 encoding, and decode/resize.
|
|
reqwest = { workspace = true }
|
|
base64 = "0.22"
|
|
image = { version = "0.25", default-features = false, features = ["jpeg", "png", "gif", "webp"] }
|
|
buzz-core = { workspace = true }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
nix = { version = "0.31", default-features = false, features = ["signal", "process"] }
|
|
|
|
# Windows Job Object APIs for the shell tool's timeout kill path: terminating a
|
|
# job kills the bash child AND every MSYS grandchild it forked, the Windows
|
|
# analogue of the Unix killpg above. windows-sys 0.61 is already workspace-
|
|
# resident (pulled transitively), so this adds no new crate. Win32_Security is
|
|
# required because CreateJobObjectW takes a SECURITY_ATTRIBUTES parameter;
|
|
# Win32_System_Threading supplies IO_COUNTERS inside the extended-limit struct.
|
|
[target.'cfg(windows)'.dependencies]
|
|
windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Security", "Win32_System_JobObjects", "Win32_System_Registry", "Win32_System_Threading"] }
|