Skip to content

refactor(box): agents are reached through a driver, so structured ones can plug in - #74

Merged
sean-brydon merged 1 commit into
mainfrom
agent-drivers
Oct 13, 2026
Merged

sean-brydon merged 1 commit into
mainfrom
agent-drivers

Conversation

@sean-brydon

Copy link
Copy Markdown
Collaborator

Phase 1 of design/structured-agents/plan.md: moving Shipyard from "agent TUI in tmux + tailing transcript files + screen scraping" to structured drivers (Claude Code stream-json, Codex app-server, ACP). Like t3code, Vibe Kanban, Paseo and Superset, it keeps its own conversation log and the terminal stays one click away.

This PR changes no behaviour. It adds the seam:

  • internal/box/driver.go: a Driver interface (Send, Interrupt, Controls, SetMode, Answer, Conversation). Today's tmux path moves into terminalDriver unchanged: paste + Enter, Esc + screen check, Shift+Tab until the footer shows the mode, keystroke form-filling, transcript tailing.
  • Handlers keep what is the same for every agent (gates, turns, inbox, events) and call b.driverFor(sess): /send, the inbox, the phone's send, /interrupt, /controls, /mode, /answer and /transcript.
  • transcriptFile takes a context instead of a request (and requestFor goes).
  • Agent sessions carry driver: "terminal", and boxes list the driver capability. This is documented in the app API reference and the plugin SDK types.
  • Box.Drivers lets a kind be replaced. The new test drives every handler through a recording driver.

Readers of the agent's own record files (tool details, older pages, helpers, fork/rewind, touched files) stay as they are. Claude Code and Codex write those files under any driver.

The plan's phase 0 spike says go on claude 2.1.296, codex-cli 0.161.0, opencode and cursor-agent. Its recordings join as test fixtures with the Claude driver, once reviewed.

Checks run: go vet ./..., go test -race ./..., pnpm typecheck:plugins, docs-site build.

🤖 Generated with Claude Code

…s can plug in

Sending, interrupting, reading and switching the permission mode,
answering questions and reading the conversation now go through the
session's driver. Today's tmux path is the "terminal" driver, with the
same behaviour as before. Agent sessions say their driver ("driver" in
the session list, and the "driver" capability), and
design/structured-agents/plan.md lays out the structured drivers that
come next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
berth Ready Ready Preview Oct 13, 2026 11:34am UTC
berth-docs Ready Ready Preview Oct 13, 2026 11:34am UTC

Request Review

@sean-brydon
sean-brydon merged commit 89fe67e into main Oct 13, 2026
7 of 8 checks passed
@linear-code

linear-code Bot commented Oct 13, 2026

Copy link
Copy Markdown

ENG-5998

This branch was successfully deployed

2 active deployments
Preview – berth-docs — b1caabeb Deployed Oct 13, 2026 by vercel[bot]
Preview – berth — b1caabeb Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant