Expose box tools to the chat agent #98

Closed AtlantisPleb opened this 20h ago 1 comment

With the Box client and per-conversation pool in place (#97), expose boxes to the chat agent through the shared tool registry so a conversation can spin up and drive its own fleet.

Add four tools, registered in the module registry with browser_conversation scope:

  • box_new: create a box for this conversation, wait for readiness, and run the OpenCode bootstrap (#99). Refuses past the 10-active-box quota.
  • box_list: list this conversation's boxes with id, state, and creation time.
  • box_exec: run one shell command on one of this conversation's boxes through POST /boxes/{id}/commands. Bounded timeout (default 60 s, maximum 600 s), bounded output preview, and the standard {exit_code, stdout, stderr, timed_out} result shape.
  • box_stop: stop and archive one of this conversation's boxes.

Requirements:

  • A conversation can only see and drive boxes it created; the box ledger is scoped by conversation id.
  • Add a box.control authority to the shared conversation authority set and require it on all four tools.
  • Redact secret-shaped output and never return desktop or viewer URLs.
  • Focused tests with Req.Test stubs for create, quota refusal, exec output bounding, cross-conversation isolation, and authority enforcement.
  1. AtlantisPleb opened this issue 20h ago
  2. A AtlantisPleb Author 20h ago

    Done in commit 40415a0 on main: box_new, box_list, box_exec, and box_stop are registered in the tool registry, run through the shared Runner with the browser_conversation scope and the box.control authority, return bounded redacted output, and never expose provider URLs or credentials.

  3. closed this as completed 20h ago
Sign in with GitHub to comment on this issue.