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>
86 lines
1.9 KiB
TOML
86 lines
1.9 KiB
TOML
[package]
|
|
name = "buzz-acp"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
description = "ACP harness that bridges Buzz events to AI agents"
|
|
|
|
[lib]
|
|
name = "buzz_acp"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "buzz-acp"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
# Internal
|
|
buzz-core = { workspace = true }
|
|
buzz-sdk = { workspace = true }
|
|
buzz-persona = { path = "../buzz-persona" }
|
|
|
|
# Nostr
|
|
nostr = { workspace = true }
|
|
|
|
# Async runtime
|
|
tokio = { workspace = true }
|
|
|
|
# WebSocket
|
|
tokio-tungstenite = { workspace = true }
|
|
|
|
# Codec (bounded line reads)
|
|
tokio-util = { workspace = true }
|
|
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
|
|
futures-util = { workspace = true }
|
|
|
|
# HTTP (channel discovery REST API)
|
|
reqwest = { workspace = true }
|
|
|
|
# Serialization
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
|
|
# IDs
|
|
uuid = { workspace = true }
|
|
chrono = { workspace = true }
|
|
|
|
# URL parsing
|
|
url = { workspace = true }
|
|
|
|
# NIP-98 HTTP auth signing
|
|
sha2 = { workspace = true }
|
|
base64 = "0.22"
|
|
hex = { workspace = true }
|
|
buzz-git-identity = { path = "../buzz-git-identity" }
|
|
git-credential-nostr = { path = "../git-credential-nostr" }
|
|
git-sign-nostr = { path = "../git-sign-nostr" }
|
|
tempfile = "3"
|
|
|
|
# Logging
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
|
|
# Error handling
|
|
thiserror = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
|
|
# CLI
|
|
clap = { version = "4", features = ["derive", "env"] }
|
|
|
|
# Config file
|
|
toml = "1.0"
|
|
|
|
# Filter expressions
|
|
evalexpr = { workspace = true }
|
|
|
|
# Process-group kill (safe wrapper around killpg) — Unix-only; kill_process_group
|
|
# has a #[cfg(not(unix))] fallback in acp.rs.
|
|
[target.'cfg(unix)'.dependencies]
|
|
nix = { version = "0.31", default-features = false, features = ["signal"] }
|
|
|
|
[dev-dependencies]
|
|
tokio = { workspace = true, features = ["test-util"] }
|
|
httparse = "1"
|