feat(cli): add agents publish-profile subcommand - #5528
Conversation
Buzz Desktop's @-mention picker only considers pubkeys that have a kind:10100 relay-agent-profile event (queried via list_relay_agents / agentAutocompleteEligibility.ts) — an agent that's a channel member but was never registered through Desktop's own Managed Agent flow is invisible to @-mention no matter how it's added to a channel. `buzz agents publish-profile` lets any identity publish that profile event by hand (name, channel_ids, respond_to/respond_to_allowlist, channel_add_policy), making headless (non-Managed) agents discoverable and triggerable the same way a Managed Agent is. Signed-off-by: Charles.Lee <cheoljoo@gmail.com>
wolfyy970
left a comment
There was a problem hiding this comment.
This command is useful, but the current defaults do not deliver the behavior it promises.
respond-to=allowlistdefaults to an empty allowlist. The command succeeds, but Desktop treats that profile as explicitly non-invocable and hides it from mentions. Buzz ACP would reject the same runtime policy.channels set-add-policywrites sparse content to the same replaceable kind10100. Running it later erases this profile; runningpublish-profilelater overwrites that policy. These commands need one canonical whole-state writer.- Kind
10100is community-visible. This publishes channel IDs and exact allowlisted pubkeys, so the disclosure needs to be explicit. I would keep this as local instance advertisement, not access-policy or portable-definition authority.
Please validate and normalize the UUIDs and pubkeys, require a coherent trigger policy, bound the status values, and add event-level tests for mention eligibility, auth-tag signing and replaceable overwrite behavior.
wolfyy970
left a comment
There was a problem hiding this comment.
The goal is useful: a headless agent needs one supported way to advertise its live instance to Desktop. This head does not deliver that safely yet.
- The command succeeds with respond_to=allowlist and an empty allowlist. Desktop then excludes the agent from mentions, while buzz-acp rejects the same configuration at startup. Require a non-empty validated allowlist or choose a default that matches actual runtime policy.
- Kind 10100 is queried as community-wide profile state. respond_to_allowlist publishes the exact permitted pubkeys, which is target-local access policy. Keep that out of the public profile.
- buzz channels set-add-policy already replaces kind 10100 with only channel_add_policy. Running either command after the other erases fields. #5530 also constructs this event independently.
I would define one canonical profile model and builder shared by every writer, then make partial updates preserve the complete profile. Validate status, channel UUIDs and normalized 64-hex pubkeys. Tests should cover defaults, exact signed content and both writer orders.
|
Independent validation on head
This proves the command can sign and submit an accepted kind:10100 event in the intended headless deployment, and that the underlying Maximus/Fly routing remains healthy after the write. It does not resolve the requested-change findings about the empty-allowlist default, public allowlist disclosure, input validation, or competing whole-state writers. I also did not claim an automated Desktop autocomplete proof because the stock CLI has no read command for the directory view. |
Problem
Buzz Desktop's
@-mention picker only considers pubkeys present inmanagedAgentPubkeysor in the relay agent directory (kind:10100, queried vialist_relay_agents/agentAutocompleteEligibility.ts). Abuzz-acpprocess launched by hand (not through Desktop's Managed Agent flow) never publishes that event, so it's invisible to@-mention no matter how it's added to a channel.What this adds
buzz agents publish-profile— signs and submits akind:10100agent-profile event by hand (name,channel_ids,respond_to/respond_to_allowlist,channel_add_policy). This is the same event shape Managed Agents already produce, just constructable by any identity instead of only through Desktop's UI.Verified against a live relay: a headless agent given a profile this way does show up in
@-mention and is triggerable, exactly like a Managed Agent would be.Testing
cargo test -p buzz-cli --lib— 343 passed (includes updatedsubcommand_names_are_stable/subcommand_counts_are_stablegolden tests for the new subcommand)cargo clippy -p buzz-cli --all-targets --all-features -- -D warnings— cleancargo fmt --all -- --check— cleanbuzz-acpidentity, confirmed it appeared in Desktop's@-mention list and correctly triggered a response.Related
Split out of a larger relay-supervisor change (a separate PR/issue) — this piece is independently useful for anyone running a headless (non-Managed) agent today, so it stands alone.