feat(plugins): the inbox is in the plugin listing, one list of what every agent needs from you

Draft
ST
3d ago
+3694-4

Adds Inbox to the plugin listing (Settings โ†’ Plugins โ†’ Browse). Inbox shows one list of what every agent needs from you, grouped by what it needs (a decision, an action, a review, or blocked/crashed). You answer a question form or a permission prompt on its card, and the answer goes straight back to the session that asked. It also has a walk-through, snooze, and a peek at the session beside the card. It reads only what Shipyard already exposes through @berth/plugin, and it installs off, like any listed plugin.

What's in it

  • plugins/inbox/: the plugin's source (0.1.2), with "marketplace": true. Like hello-ports, it builds against packages/plugin-sdk (file:../../packages/plugin-sdk). typecheck:plugins now covers its sources. Its node-based unit tests run with its own pnpm test.
  • site/plugins/inbox/0.1.2/ and index.json: pnpm -C app build:marketplace's output. check:marketplace passes, and TestTheCommittedListingInstalls installs it with the other listed plugins.
  • plugins/README.md, docs/guides/plugins.mdx and the changelog mention it.
  • verify-berthd:
    • features/inbox.md, a row in features/README.md, and two scenarios that load plugins/inbox/dist:
      • inbox-mock runs on the mock fixtures. It checks the list and count, j/k, the walk-through, snooze, a form answered by number keys (the exact payload), the peek, drafts, typing safely in the note, an interrupted session, and Close with undo.
      • inbox-live runs real Claude Code on dev-box.sh, once per driver. It checks a pick with a note containing ", permission Allow and Deny, and Close on a clean session, on unsaved work and on a permission prompt. It reads each effect back from the agent's transcript and from the acme-shop repo's files.
    • drive.mjs now adds the address to a "Failed to load resource" console error. A scenario's allowErrors can then allow one request instead of every 404.

Merge Danger

Door: two-way. It adds a folder to plugins/ and to site/plugins/, plus docs and verify files. No app, box or agent code changes. Removing the listing entry (delete the folders, rebuild index.json) takes it back out; installed copies stay as people's own plugins.

Blast Radius: the public listing at berthd.app/plugins/index.json gains one entry once the site deploys. Nothing installs or turns on by itself. Someone who installs Inbox gets code that can answer agents' prompts and stop sessions on their boxes. The consent dialog says so and shows the hash.

Known gaps

These were found while verifying. They are being fixed in the plugin first, and this branch gets a new version before it leaves draft:

  • An item is keyed per turn, not per wait. A second question or permission in the same turn can hide behind the first for the minute after answering, and its card can show the earlier prompt's details.
  • On the terminal driver, Close on a permission prompt sends Deny, but the "commit and close yourself" message after it stays queued. After the interrupt the box still has the session waiting. The chat driver is fine. inbox-live checks only the deny there, and features/inbox.md says so.
  • The mock's floating loop card covers Undo at the right end of the Inbox's bottom bar. inbox-mock presses Undo with Enter, as dashboard-stop-archive does for the bulk bar.
  • A box without GET /v1/secrets/requests answers it 404 on each refresh. The plugin reads that as no secret requests, and inbox-live allows exactly that request.

Evidence

Checks run locally (fork CI waits for a maintainer):

  • go vet ./...; go test -race ./internal/agent/ (the package that installs the committed listing): ok.
  • pnpm typecheck:plugins, check:titles, check:type, check:grid, check:csp, check:themes, check:marketplace; pnpm test (628 pass); pnpm build; npx tsc -p e2e; (cd docs-site && pnpm build): all pass.
  • plugins/inbox: pnpm test (28 pass), pnpm typecheck, pnpm build. The built bundle is byte-identical to the plugin's 0.1.2 release build.
  • Not run: cargo check (no Rust changes; this machine lacks GTK) and the full go test -race ./... (no Go changes).

inbox-mock, on this branch's pnpm build served by vite preview: OK, no console errors.

ListFormPeekClose, with undo

inbox-live on a dev-box.sh box of this checkout, real Claude Code: OK on both drivers. The box's journal shows every session on the driver under test. On the terminal, the two sessions that must ask start with --permission-mode default. The only console errors are the allowed secrets/requests 404s.

Real formPermission promptUnsaved work: closed itselfPermission: denied
terminal
chat

๐Ÿค– Generated with Claude Code


Autofix with [code]smith
Open in [code]smith ยท Need help on this PR? Tag @codesmith-bot with what you need.