Skip to content

dsh: show box_view's live screen in the chat - #72

Merged
dora-dotcom merged 8 commits into
mainfrom
dsh-live-view
Nov 23, 2026
Merged

dora-dotcom merged 8 commits into
mainfrom
dsh-live-view

Conversation

@dora-dotcom

Copy link
Copy Markdown
Collaborator

When the agent in DeepSeek Harness calls box_view, the box's live screen now shows in the chat, the same view-only page ChatGPT and Claude render inline, with Take control opening it in the browser.

How

  • dsh has no MCP Apps host, so client.js hosts box's ui://box/live page itself: a tool.call.toolview card for mcp__box__box_view loads it into a sandboxed iframe (no allow-same-origin) and answers its MCP Apps requests over postMessage.
  • dsh folds a finished turn's tool calls, so a turn definition plus a conversation.chat.turnTail entry keep the screen beneath the answer (the pattern dsh's own created-task card uses).
  • The page's tool calls go to a new Host route, POST /api/simular-box/live in index.js, registered on ctx.connection.fetch so it works on Web and Desktop. It adds the key, so the key never reaches the browser, and passes only the six tools the page uses (box_view, box_view_token, box_status, box_approvals, box_approval_token, box_approval_answer); anything else gets 403. Exact routes only admit owner Peers.

Tested on dsh 0.2.2-rc.1 web with a real key, in an isolated DSH_HOME:

  • relay against prod: page read, box_status, box_approvals ok; shell refused (403)
  • asleep box: the card shows Waking up, then the live screen
  • "open news.ycombinator.com in my box and let me watch": live screen while it works, still shown under the answer after the turn folds, and after reloading the session
  • a later turn that doesn't use box shows no screen; no console errors

Not yet tried on dsh Desktop.

Version 0.3.0; after merge, tag dsh-v0.3.0.

🤖 Generated with Claude Code

dora-dotcom and others added 7 commits November 21, 2026 00:53
dsh has no MCP Apps host, so the box plugin renders box's live view
(ui://box/live, the page ChatGPT and Claude show inline) itself: a
tool.call.toolview card for mcp__box__box_view loads the page into a
sandboxed iframe and answers its MCP Apps requests. The page's tool
calls go to a new Host route (/api/simular-box/live) that adds the key,
so the key never reaches the browser; only the six tools the page uses
pass, anything else is 403.

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

A finished turn's tool calls collapse, the live view card with them. A
turn definition collects the turn's settled box_view results and a
conversation.chat.turnTail entry shows the last one beneath the answer,
the way dsh's own created-task card stays visible. README says what
the live view is and how it works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The icon was the old green-on-black square. Now it is box-portal's
public/favicon.svg, the same mark as the other clients' icons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dsh lists plugins by locale meta title, which said only "box". The
title is now the product's full name, and the description no longer
repeats "by Simular".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dsh folds a turn's tool calls into Called tools as soon as the next
call starts, so the tool card hid the screen for the whole task and
the turn tail only showed it at the end. The view is now a chat node
of its own, published by a turn-keyed conversation definition at the
box_view call with groupTree 'turn', which dsh keeps outside the folded
process while the turn runs and after. The tool card and turn tail
are gone, so the screen never shows twice.

Tested in dsh Desktop 0.2.2-rc.5: the frame stays visible while the
tools fold and after the answer, and reconnects when scrolled back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Until now the screen appeared only when the agent called box_view, so
most tasks ran unseen. The turn's first box tool that works on the
screen (anything but account, box management, shell and file tools;
new tools count as screen work) now opens the view too, once per turn.
With no box_view result to hand the page, the view asks box_status for
the box id and view_url. A later box_view in the turn takes over.

Tested in dsh Desktop: "open Wikipedia and tell me today's featured
article" shows the live screen with no mention of it in the prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dora-dotcom
dora-dotcom marked this pull request as ready for review November 20, 2026 19:06

@chenchenSimular chenchenSimular left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good: the name change is only the display title (plugin ID, MCP server name and tool prefix unchanged), the icon matches the portal's, and the live-screen route keeps the box key server-side with a 6-tool allowlist. Auto-showing the screen on screen-working tools in dsh is fine.

Two small README fixes, non-blocking:

  • dsh/README.md:9 and :12 still link to dsh-v0.2.1 while package.json is 0.3.0
  • dsh/README.md:13 still says "Open box on the Plugins page"; the title is now "box by Simular"

Not tested on dsh Desktop (only web), worth a quick check of the relay path there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dora-dotcom
dora-dotcom merged commit d36cce4 into main Nov 23, 2026
22 checks passed
@dora-dotcom
dora-dotcom deleted the dsh-live-view branch November 23, 2026 11:02
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.

2 participants