host: the room's tools for the handing of work #94

Merged
mikluko merged 3 commits from room-work-tools into main 2026-11-16 10:53:38 +00:00
Owner

The host's side of spec-bb1.40's tools, on roomcity-b8's #90 (merged). ROOMCITY_ROOM_TOOLS (comma list from [agents.<n>] tools; absent = attach only) names the tools a session has besides attach: the room's MCP server registers exactly those (dispatch(task), wait(task), result(task), claim(), done(result); unknown names are left out), each calling its RPC with the session's token; the server's reason for a refusal (PermissionDenied included) is the tool's error text; result says "not done yet ()" when the task is open; claim says there is no task and the session is ending when found is false. The host answers the agent's request for leave to use exactly the tools the session has (the list is per session now, not a package variable).

Tested: the server's tool list for none/foreman/worker/unknown/all names; each tool against a fake server; the refusal's words; the answering by role (a worker's dispatch request is not answered); the environment's parsing. Not run against a real agent with these tools (goose and Claude both call room tools as seen for attach); the rendering "handed to a worker: " is roomcity-ee's.

The host's side of spec-bb1.40's tools, on roomcity-b8's #90 (merged). `ROOMCITY_ROOM_TOOLS` (comma list from `[agents.<n>] tools`; absent = attach only) names the tools a session has besides `attach`: the room's MCP server registers exactly those (`dispatch(task)`, `wait(task)`, `result(task)`, `claim()`, `done(result)`; unknown names are left out), each calling its RPC with the session's token; the server's reason for a refusal (PermissionDenied included) is the tool's error text; `result` says "not done yet (<status>)" when the task is open; `claim` says there is no task and the session is ending when `found` is false. The host answers the agent's request for leave to use exactly the tools the session has (the list is per session now, not a package variable). Tested: the server's tool list for none/foreman/worker/unknown/all names; each tool against a fake server; the refusal's words; the answering by role (a worker's `dispatch` request is not answered); the environment's parsing. Not run against a real agent with these tools (goose and Claude both call `room` tools as seen for `attach`); the rendering "handed to a worker: <task>" is roomcity-ee's.
host: the room's tools for the handing of work
All checks were successful
test / changelog (pull_request) Successful in 5s
image / image (pull_request) Successful in 17s
test / go (pull_request) Successful in 46s
afaae5d82d
dispatch, wait and result for a foreman, claim and done for a worker, called on
HostService as the server's #90 has them. The host offers, besides attach, the
tools ROOMCITY_ROOM_TOOLS names, and answers the agent's request for leave to
use exactly those itself. The room's tools are served by the session's tool list
and call the server through a narrow interface of HostService.

Assisted-By: Claude <noreply@anthropic.com>
Author
Owner

Read at afaae5d. Green here under -race, internal/host ten times with GOMAXPROCS=1, and the same merged over main 6f085f5 (the one conflict is CHANGELOG.md, with #93's ### Changed).

The tools are right as tools: the list is the session's own, read by the host at its start, the server checks each call against the agent's tools whatever the host offered, and a refusal reaches the agent in the server's words. One thing has to be decided before this merges, and one is missing.

1. The host answering for dispatch takes a question away from the owner, and nothing cited decides that. The comment this change edits says a tool that reaches outside the room or spends something "is not put among them without deciding it", and the change then puts every tool of the session among them. For wait, result, claim and done that is nothing new: each touches a task the session already has. dispatch is different in the city as it stands:

foreman   Claude Code, permission_mode auto-edit    a shell command goes to the owner first
worker    goose, GOOSE_MODE=auto                    asks nobody

Today the foreman hands work over with gc sling, a shell command, so the owner approves each task. With dispatch answered by the host, anything the foreman writes into a task is run by a worker with no question to anyone: the foreman's own question about shell commands becomes one it can go round. That may be what the owner wants (he asked the foreman for the work; the room shows the handing over), but it is his to say, and I have asked specs-18 for it. Until there is a word: answer for the four, leave dispatch to the session's own permission mode. If the word is "no question", say so in that comment and in the README, with the reason.

2. The README does not have the tools. [agents.<name>] tools went in with #90 and is in no page; ROOMCITY_ROOM_TOOLS, the five tools, which role has which, and that the host answers the request for leave are nowhere but the changelog. A city's operator cannot configure this from the README. It belongs in this pull request, which makes the feature whole: the key and its values beside [agents.<name>] secrets, and what an agent with the tools can do.

Rebase over main for the changelog.

Small, as you see fit:

  • A name in ROOMCITY_ROOM_TOOLS that the host does not know is dropped in silence, and the names live in two lists (config.RoomTools, host.workTools). A tool added to one and not the other is then simply not offered. Log the names left out at the start.
  • result for a task closed with empty notes answers with empty text; say that it is closed and the worker left nothing.

Not run against an agent, as you say; the first run in the city is the proof of the names (mcp__room__dispatch, room__claim) and of goose calling a tool with no arguments.

Read at afaae5d. Green here under `-race`, `internal/host` ten times with `GOMAXPROCS=1`, and the same merged over main 6f085f5 (the one conflict is CHANGELOG.md, with #93's `### Changed`). The tools are right as tools: the list is the session's own, read by the host at its start, the server checks each call against the agent's `tools` whatever the host offered, and a refusal reaches the agent in the server's words. One thing has to be decided before this merges, and one is missing. **1. The host answering for `dispatch` takes a question away from the owner, and nothing cited decides that.** The comment this change edits says a tool that reaches outside the room or spends something "is not put among them without deciding it", and the change then puts every tool of the session among them. For `wait`, `result`, `claim` and `done` that is nothing new: each touches a task the session already has. `dispatch` is different in the city as it stands: foreman Claude Code, permission_mode auto-edit a shell command goes to the owner first worker goose, GOOSE_MODE=auto asks nobody Today the foreman hands work over with `gc sling`, a shell command, so the owner approves each task. With `dispatch` answered by the host, anything the foreman writes into a task is run by a worker with no question to anyone: the foreman's own question about shell commands becomes one it can go round. That may be what the owner wants (he asked the foreman for the work; the room shows the handing over), but it is his to say, and I have asked specs-18 for it. Until there is a word: answer for the four, leave `dispatch` to the session's own permission mode. If the word is "no question", say so in that comment and in the README, with the reason. **2. The README does not have the tools.** `[agents.<name>] tools` went in with #90 and is in no page; `ROOMCITY_ROOM_TOOLS`, the five tools, which role has which, and that the host answers the request for leave are nowhere but the changelog. A city's operator cannot configure this from the README. It belongs in this pull request, which makes the feature whole: the key and its values beside `[agents.<name>] secrets`, and what an agent with the tools can do. Rebase over main for the changelog. Small, as you see fit: - A name in `ROOMCITY_ROOM_TOOLS` that the host does not know is dropped in silence, and the names live in two lists (`config.RoomTools`, `host.workTools`). A tool added to one and not the other is then simply not offered. Log the names left out at the start. - `result` for a task closed with empty notes answers with empty text; say that it is closed and the worker left nothing. Not run against an agent, as you say; the first run in the city is the proof of the names (`mcp__room__dispatch`, `room__claim`) and of goose calling a tool with no arguments.
mikluko force-pushed room-work-tools from afaae5d82d
All checks were successful
test / changelog (pull_request) Successful in 5s
image / image (pull_request) Successful in 17s
test / go (pull_request) Successful in 46s
to fff6599054
Some checks failed
image / image (pull_request) Successful in 15s
test / changelog (pull_request) Successful in 4s
test / go (pull_request) Has been cancelled
2026-11-16 10:50:14 +00:00
Compare
host: answer for dispatch too, by the owner's decision
All checks were successful
test / changelog (pull_request) Successful in 5s
image / image (pull_request) Successful in 17s
test / go (pull_request) Successful in 1m8s
8820c95c67
Assisted-By: Claude <noreply@anthropic.com>
mikluko deleted branch room-work-tools 2026-11-16 10:53:38 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/roomcity!94
No description provided.