fix(acp): publish remote agent routing profiles - #5856
Conversation
728e54a to
415bec8
Compare
Co-Authored-By: SageOx <ox@sageox.ai> Signed-off-by: Ryan Snodgrass <ryan@sageox.ai>
415bec8 to
0b2003b
Compare
|
Live integration result for
I found no #5856-specific code defect in this run. The only integration gap was #5838's prompt routing to the managed MCP shell, documented with a helper commit in that PR. For this profile publication path, the signed event came through loud and clear. |
wolfyy970
left a comment
There was a problem hiding this comment.
A runtime-owned routing profile is the right seam for discoverability; it should stay separate from portable definition authority. I found two blockers in the current wire behavior.
-
Kind 10100 is globally queried by Desktop, so this publishes the exact
respond_to_allowlistpubkeys community-wide. NIP-AP explicitly treats that list as sensitive and protects it behind the 30175 sharing gate. There is also already a second whole-state writer for this replaceable event:buzz channels set-add-policypublishes onlychannel_add_policy. Either command can therefore erase the other profile fields on its next write. Please use one canonical read/merge/write profile contract or a separate event boundary, and keep private allowlist membership out of the public routing advertisement. -
Membership refreshes are detached tasks carrying cloned channel sets. A quick add/remove can complete out of order, and events created in the same second are resolved by the NIP replaceable-event id tiebreak rather than notification order. The retained profile can therefore advertise a channel the harness already left, or omit one it joined. Please serialize profile publication through one worker with a monotonic generation/timestamp and test delayed, reversed add/remove completions against the retained head.
The signed harness-owned identity and channel-derived routing direction are good; these fixes keep the advertisement truthful without turning it into hidden policy disclosure.
|
@wolfyy970 great suggestions. Addressed the requested changes in 61bd116.
Validated: ACP profile tests (2), relay scope/side-effect tests, CLI policy test, desktop typecheck, and the 30 focused mention-eligibility tests. Desktop lint completes with three pre-existing diagnostics outside this change. |
Summary
Remote AI coworkers can now appear in the mention picker and receive tagged messages after joining a channel or newly created DM. Previously, ACP harnesses announced presence but not the signed routing profile Desktop uses to authorize remote recipients.
Approach: Publish a replaceable kind-10100 profile from
buzz-acpat startup and refresh it after membership changes, advertising the harness’s response policy and subscribed channel IDs.What changed
crates/buzz-acp/src/lib.rsTest Plan
cargo test -p buzz-acp agent_profile_advertises_the_current_routing_policy— 1 targeted regression test passed.cargo check -p buzz-acp— passed.cargo fmt --allandgit diff --check— passed.Depth: delivery behavior
The profile’s
channel_ids,respond_to, and allowlist mirror the harness’s live subscription state. Membership-triggered refreshes run in the background so retrying a durable profile write cannot stall relay event processing.Co-Authored-By: SageOx ox@sageox.ai