feat(cli): add agents attest and agents register for agents run outside Desktop - #7652
Open
pardhaponugoti wants to merge 1 commit into
Open
pardhaponugoti wants to merge 1 commit into
pardhaponugoti wants to merge 1 commit into
Conversation
…utside Desktop An agent run by hand with buzz-acp (VPS, container, CI) against a hosted community connects and answers DMs but never appears in any client's @-mention picker. The picker is fed by the relay agent directory, which requires three signed records: the agent's kind:0 with a NIP-OA owner attestation, relay-signed channel membership, and an owner-signed kind:30177 policy record. Buzz Desktop publishes the attestation and the policy record for the agents it manages; nothing does for a headless one, and nothing in the CLI could mint either. - `buzz agents attest <agent>`: as the owner, print the NIP-OA `auth` tag (owner pubkey + Schnorr signature over the agent pubkey; no secret) that the agent sets as BUZZ_AUTH_TAG. Local only. - `buzz agents register <agent> --name --respond-to [--parallelism]`: as the owner, publish the kind:30177 record with the same content projection Desktop writes (`name`, `parallelism`, `respond_to`), `d` = agent pubkey. Preflight fetches the agent's kind:0 and refuses unless its sole `auth` tag names the signer, reusing the archive path's classifier; `--force` skips it. Signs with `sign_event_unchecked` so an ambient BUZZ_AUTH_TAG is never injected into an owner-authored record. - Docs: a "Running Outside Buzz Desktop (hosted community)" walkthrough in the buzz-acp README covering all four records, plus CLI README rows. Verified end to end against a hosted community: after publishing the 30177 record for three server-run agents they appear in the picker on a Desktop client that does not manage them, and mention-mode buzz-acp receives the resulting p-tagged events. Refs block#2508, block#3277, block#4489. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WjULFPqiAuV4SV67mZgMAi Signed-off-by: Pardha Ponugoti <pardha.ponugoti@gmail.com> Signed-off-by: Pardha Ponugoti <pardhapon@gmail.com>
🔐 Codex Security Review
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Agents run outside Buzz Desktop (buzz-acp on a VPS/container/CI, against a hosted community) connect fine and answer DMs, but never appear in any client's
@-mention picker — so nobody can tag them in a channel. Refs #2508, #3277, #4489.The picker is fed by the relay agent directory, which needs three signed records:
authtag naming the owner,d= agent pubkey;name,parallelism,respond_to).Desktop publishes (1) and (3) for the agents it manages. For a headless agent nothing does, and the CLI had no way to produce either. This PR adds both, plus the missing docs.
Changes
buzz agents attest <AGENT_PUBKEY> [--conditions]— run as the owner; prints the NIP-OAauthtag (owner pubkey + Schnorr sig over the agent pubkey, no secret). The agent sets it asBUZZ_AUTH_TAG, which buzz-acp already uses for relay admission and owner resolution, and whichbuzz users set-profilealready attaches to the kind:0. Local only, no network.buzz agents register <AGENT_PUBKEY> --name … --respond-to … [--parallelism] [--force]— run as the owner; publishes the kind:30177 record with the same content projection Desktop'sManagedAgentEventContentwrites. Preflight fetches the agent's kind:0 and refuses unless its soleauthtag names the signer (reuses the archive path'sextract_authclassifier, so diagnostics matchagents archive);--forceskips it. Signs viasign_event_uncheckedso an ambientBUZZ_AUTH_TAGis never injected into an owner-authored record.crates/buzz-acp/README.mdwalking through all four steps, plus rows in the CLI README.d-tag/no-auth-tag, content projection, and preflight accept/reject cases.Verified
End to end against a hosted community (
*.communities.buzz.xyz): three agents run with buzz-acp on a Hetzner box. Before: channel members with green presence,@picker never lists them, plain@Nametext sends noptag, agents only reachable via DM orsubscribe=all. After publishing the 30177 record per agent: all three appear in the picker on a Desktop that does not manage them, mentions arrive p-tagged, andBUZZ_ACP_SUBSCRIBE=mentionsworks.cargo fmt,cargo clippy -p buzz-cli --all-targets -D warnings,cargo test -p buzz-cliclean.Not in this PR
agents unregister(kind:5 deletion of the 30177 coordinate, as Desktop does on delete) — happy to add if wanted.buzz channels joinitself (regular channels only).🤖 Generated with Claude Code
https://claude.ai/code/session_01WjULFPqiAuV4SV67mZgMAi