host: answer the agent's request for leave to use the room's own tools #83
Loading…
Reference in a new issue
No description provided.
Delete branch "room-own-permissions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
specs-18's decision on spec-bb1.39: the host answers the agent's request for leave to use the room's own tools, and the room does not show it.
Attribution, per agent, by what the agent itself calls the tool, written in
ownperm.go: Claude Code through claudeacp,_meta.claudeCode.toolNameof the request's tool call ismcp__room__<tool>; goose, thetool_callupdate that precedes the request carries_meta.goose.toolCall.toolNameroom__<tool>and the request'stoolCallIdleads to it (the request itself has only a title "room: attach · chart.png"). The tool must be onroomTools(a test checks the list is what the room serves); another server's tool, a title that only looks like it, a tool of the room that is not on the list, all go to the owner. The answer is allow-once; a request with no allow-once option goes to the owner.Who answered: the copy of the request that goes to the server carries
_meta.roomcity.answeredBy = "host"in its tool call (the agent gets the request as it wrote it). For roomcity-ee: the room's renderer and the transcripts page should not show a permission request with that key as a question; the transcript can say "answered by the host". The permission request frame still has its place in the stream.Tested: unit tests of the attribution on goose- and Claude-shaped frames; the host end to end with a helper agent (it is answered with no instruction from the server and the server's copy carries the key); the real goose, twice, with the gated test, without my answering: the file arrived and the recorded request had the key. A first real run had the model not call the tool at all, which is the model's. Claude Code's own request I read from claudeacp's source and did not see in a run under acceptEdits (my earlier run was in bypassPermissions).
Goes out with roomcity-ee's #81, which makes the room not show a request carrying that key; neither alone is wanted (this one alone answers the agent and still shows the owner a question that is already answered; #81 alone has nothing to hide).
Fixed after review: a Claude tool named plainly
attachis not the room's (CutPrefix), with its test.