feat(hub): host 'open in' app launchers on the box detail page#172
Merged
Conversation
The box detail 'Access' section now has an 'Apps' row that opens the box
in a host app (Codex, VS Code/Cursor, cmux, Herdr, iTerm2), mirroring the
tray's Open In menu. Each app shows only when installed on the host AND
eligible for the box's provider (e.g. Codex is Hetzner-only).
Host-GUI launches only make sense on the user's own machine, so this is
gated to a localhost hub on macOS; a remote (hetzner/vercel) or non-macOS
hub reports supported:false and the row hides.
Reuse without extraction: the hub server already receives AGENTBOX_CLI_ENTRY
(same as the relay's cp/checkpoint host actions), so the backend re-shells
'agentbox open <id> --in <app>' / 'open --targets --json' — reusing all the
CLI's SSH-alias / deep-link / terminal-spawn / IDE-launch logic verbatim.
- GET /api/v1/open-targets -> which apps are launchable (cached probe)
- POST /api/v1/boxes/:id/open -> launch { app }
- Box view-model gains 'provider' so the client can gate per-box.
- OpenAPI spec + hub docs updated.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Match the Web/Git rows — a muted one-line description under the label.
Owner
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 079afbb. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the tray's Open In host-app launchers to the web hub. The box detail Access section now has an Apps row that opens the box in a host app — Codex, VS Code/Cursor, cmux, Herdr, iTerm2 — right-aligned next to the existing Open web / Open VNC.

Each app appears only when it's installed on the host AND eligible for the box's provider (e.g. Codex is Hetzner-only, so it's hidden on docker boxes).
How
AGENTBOX_CLI_ENTRY(the same env the relay uses to re-shell cp/checkpoint host actions), so the backend re-shellsagentbox open <id> --in <app>andagentbox open --targets --json. This reuses all the CLI's SSH-alias /codex://deep-link / terminal-spawn / IDE-launch logic verbatim — no CLI-internal code moved into a shared package.hubProfile() === 'localhost' && process.platform === 'darwin'. A remote (hetzner/vercel) or non-macOS hub reportssupported: falseand the Apps row hides./api/v1with client fetch):GET /api/v1/open-targets— which apps are launchable (cached ~60s host probe).POST /api/v1/boxes/:id/open— launch{ app }.Boxview-model gains aproviderfield so the client can gate per-box.execFile's "Command failed".Verify
GET /api/v1/open-targetson this Mac →supported: truewith the five apps + provider eligibility.POST …/open {app:"iterm2"}on a docker box →{ok:true}and a realagentbox attach … --inlineprocess spawned in a new iTerm2 window (verified viaps, not just the 200).POST …/open {app:"codex"}on a docker box → 409 with the clean "only Hetzner cloud boxes qualify" message; invalid app → 400.pnpm --filter @agentbox/hub typecheck+ eslint clean.Docs
/api/v1/openapi.json) gains both endpoints.apps/web/content/docs/hub.mdxBox-detail bullet documents the Access Apps launchers + the localhost/macOS gate.No CLI surface changed (reuses
agentbox open --in), so no CLI-reference or tray changes.Note
Low Risk
UI and localhost-only host app spawning via existing CLI; no auth or data-model changes beyond an informational
providerfield on boxes.Overview
Brings the tray/CLI Open In flow to the web hub: the box detail Access card gains an Apps row (alongside web/VNC) with buttons for Codex, VS Code/Cursor, cmux, Herdr, and iTerm2 when the host reports them installed and eligible for the box’s provider (new
providerfield on theBoxview model).New
GET /api/v1/open-targets(cached ~60s host probe) andPOST /api/v1/boxes/:id/openwith{ app }validation; OpenAPI and hub docs updated. The Node backend implementsopenTargets/openInby re-shellingagentbox open --targets --jsonandagentbox open <id> --in <app>viaAGENTBOX_CLI_ENTRY, only whenhubProfile() === 'localhost'anddarwin; remote/Postgres hubs returnsupported: falseand mutating open 503s like other host-only routes. Syntheticjob:boxes get 409 on open; CLI clack stdout is cleaned for readable API errors.Reviewed by Cursor Bugbot for commit 079afbb. Configure here.