You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e34d19e
Browse filesBrowse the repository at this point in the historyBrowse files
Revert "feat(acp): report control command outcomes as system rows"
The harness cannot publish a kind:40099. Every client submission — WebSocket
and `POST /events` alike — goes through `ingest_event_inner`, which calls
`required_scope_for_kind` (`ingest.rs:1544`); 40099 has no arm there and falls
through to `_ => Err("restricted: unknown event kind")`. The existing system
rows never hit that path: `emit_system_message` writes straight to
`state.db.insert_event` (`side_effects.rs:775`).
So the system-row version was rejected at ingest and the channel stayed silent
— the exact failure this PR exists to fix. Caught by @chessing234 in review.
My earlier check was necessary but not sufficient: I confirmed 40099 was absent
from `is_relay_only_kind` and had no `handle_side_effects` arm, and concluded it
was publishable, having missed the gate that actually decides.
Reverts the switch and restores the kind:9 notice, which is accepted today
(`KIND_STREAM_MESSAGE` → `Scope::MessagesWrite`). The thread-placement
regression test from 3c05927 is unaffected and still guards the behaviour.
Note for anyone tempted by the one-line fix: adding 40099 to
`required_scope_for_kind` would be a security regression, not a fix. Every
system row today is relay-authored and authoritative — membership changes,
`channel_archived`, and the `message_deleted` moderation tombstone carrying
"Removed by community moderators". Making the kind client-writable would let
any member forge those. A legitimate system row needs its own agent-writable
kind, which is a protocol decision, not a scope-table edit.
Refs #3711
Co-Authored-By: Claude Opus 5 <[email protected]>
Signed-off-by: Bérenger Ouadi <[email protected]>
Copy file name to clipboardExpand all lines: crates/buzz-acp/README.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,9 +159,7 @@ Use `!cancel` to stop only the current turn; it is a no-op when the channel is i
159
159
160
160
Owner control commands must be kind:9 stream messages from the owner, must mention this agent with a `p` tag, and are consumed by the harness instead of being forwarded to the agent.
161
161
162
-
Because the command never reaches the agent, the harness publishes the outcome back into the channel as a kind:40099 system message — the grey row clients render beside "X joined the channel", since a cancelled turn or a rotated session is a lifecycle event rather than the agent speaking. It lands in the thread the command was typed in, and it is published for the no-op outcomes too (`!cancel` with no turn in flight, `!rotate` with no cached session), so a command that changed nothing stays distinguishable from one that was never received.
163
-
164
-
The payload is `{"type": …, "actor": <owner>, "target": <agent>}`. Clients switch on `type` and silently drop an unknown one, so a client older than this contract shows no row at all.
162
+
Because the command never reaches the agent, the harness posts the outcome back into the channel as a kind:9 notice — including when the command was a no-op (`!cancel` with no turn in flight, `!rotate` with no cached session), so a command that changed nothing is distinguishable from one that was never received.
165
163
166
164
> **Note:** The default mode is `owner-only`. Agents without a registered `agent_owner_pubkey` will not respond to any events until the owner is resolved. Set `--respond-to anyone` to disable the gate entirely.
0 commit comments