Repository navigation
Conversation
Deploying mouseterm with
|
| Latest commit: |
8eac6cb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b4343f32.mouseterm.pages.dev |
| Branch Preview URL: | https://dor-v2-06-completion.mouseterm.pages.dev |
dormouse-bot
left a comment
There was a problem hiding this comment.
The "Text output" examples in dor ensure --help and dor tool --help no longer match what the renderers print. When completion differs from status, the renderers now add a [completion] tag, so existing and restarted print existing surface:3 [started] "npm run dev" (see the updated ensure-text.snap and ensure-restart.snap), and a takeover prints takeover surface:1 [requested] "pnpm storybook". The help still shows the old untagged lines (ensure.ts: existing surface:3 "npm run dev" / restarted surface:3 "npm run dev"; tool.ts: existing surface:3 "pnpm storybook" / takeover surface:1 "pnpm storybook"). Help is where agents learn the format, so a script that copies its line shape will misparse the real output. split is unaffected because its completion is always created.
launchCompletionHelp is also added to the dor split and dor ensure help. split only ever returns created, and ensure never returns pending or a takeover, so in their help the takeover sentence and the values those commands can't return describe behavior that doesn't apply to them.
a8a3ddc to
b7477e2
Compare
846ad75 to
821c120
Compare
|
Re: dormouse-bot review — stale "Text output" examples; Fixed both, and the field is renamed while I was there. Text output: Per-command help: the shared constant is replaced by
The types enforce the same lists. |
dormouse-bot
left a comment
There was a problem hiding this comment.
A Tool re-run that has already finished is reported as command_state: queued instead of ended; details inline.
821c120 to
5ca75a5
Compare
b7477e2 to
362a1b7
Compare
split, ensure, tool, and open now report command_state beside status: what the reply proves about the launched command (unconfirmed, running, awaiting_approval, queued, ended), apart from how the Surface was found or made. ensure, tool, and open print it as a [tag] in text output; each command's help lists only the states it can report. A browser-provider command that succeeded but whose Surface could not be opened now exits 4 instead of 0, keeping the provider's output and saying on stderr that the command already ran and must not be repeated blindly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
362a1b7 to
c6231b2
Compare
5ca75a5 to
c588eb5
Compare
dormouse-bot
left a comment
There was a problem hiding this comment.
The new "Command state" paragraph in docs/specs/dor-cli.md restates rules that dor-tool.md → "Take-over" and the "dor app" section already own; suggestion inline.
dor split,dor ensure,dor tool, anddor opennow reportcommand_statebesidestatus.statussays how the Surface was found or made.command_statesays what the reply can prove about the launched command:unconfirmed: a new Surface whose command has not been seen startingrunning: the shell reported the command runningawaiting_approval: an unapproved project Tool waiting on the user; nothing ranqueued: not started yet. A takeover is one: it answers before its command is typed, sodorcan exit and free the shell. So is a reused or retargeted Tool whose run has not started.ended: the command already ended, perhaps with a nonzero exit, or a newer preview superseded this oneNeither field promises a successful exit or a ready service. The host computes the state from evidence present when it replies (
toolCommandStateandobservedCommandStateinlib/src/components/wall/use-dor-control.ts). Shell integration alone proves no startup, and an earlier completed run never proves a retarget or restart. A new Surface whose first command already finished reportsended.JSON output carries
command_state. In text output,ensure,tool, andopenshow it as a tag after the handle:existing surface:3 [running] "npm run dev".splitcan only beunconfirmed, so its text output is unchanged.CommandStateindor/src/commands/types.tsowns the values. Each response type narrows them to what its command can return, and each command's--helplists only those, with what each means there.A browser-provider command that succeeds but whose Surface cannot then be opened or reused now exits 4, not 0. The provider's output is kept, and stderr says the command already ran and must not be repeated blindly. dor emits no JSON error object on the browser path, since provider output belongs to the provider, so there is no error code for it. The fixed-DPR Playwright
open, which binds before navigating, still fails with exit 1 and leaves the page unopened.Root
dor --help, theagent-browserandplaywrighthelp, the skill, anddocs/specs/dor-cli.md(new "Command state" section; the browser bind rule and the exit-status list) describe the contract.Stack: 6/8, based on #1742. Breaking change for Dormouse 2.0.
Validation:
tsc -b; the Wall,wall/(use-dor-control, preview-slot, workspace-control, and the rest), and WorkspaceWindow suites, 71 files and 1504 testspnpm test(tsc --noEmitplus the full vitest suite, 486 tests, including the 16 playground CLI tests)lint:specs(dor-cli budget ratcheted to 6150) and its 58 self-checks,lint:md,lint:public-docs,git diff --checkMutation checks:
--preview, and ensure text tests and snapshots. Renaming the JSON field back tocompletionfails the tool JSON snapshot and the command_state test.pendingcase fails the unit test and the Wall pending-reuse test. Dropping the takeover case, or reporting a new Surface's ended command asunconfirmed, fails thetoolCommandStateunit test.