feat(cli): full-screen terminal app (#1544, row 55)
Bare `mosaic` on a terminal opens the app. It has Inbox, Tasks, Agents
and Trail screens, help, and a decide overlay, and it uses the alternate
screen, raw mode, resize and SIGTERM, and restores the terminal on exit.
draw(state) in screens.mjs is pure. cli.mjs exports resolveDecision,
which `mosaic decide` and the app share, so both write the same lines
and ask the same question. A decision resolves on `y` only while
decideShown() says the whole decide box is on screen. The app reads that
at the key. A box that doesn't fit is replaced by "Too small to show this
decision", and any key answers No. scripts/mosaic sends no arguments to
packages/cli (a decided scope addition), so the queue dispatch test
follows. The cli README and docs/TOOLS.md describe the app.
Darkwing built it (agents/darkwing/work/queue-55), in three rounds.
Round 3 was approved by Dewey (27308) and Filbert (27309) on manifest
59f1b9b4, 9 paths. Their non-blocking notes go to row 69 (#1562): a
narrow-terminal test for the decideShown MIN_COLS guard, a way out from
the hidden box, a U+18D08 width test, a cut box keeping Esc back, and
the README row count stated as an example.
Sage's gate on 3634d06e, sequential and teed: node suites cli 110 and
queue 150, 0 failed; test-auth 15, test-conductor 17, test-config 24,
test-discord 66, test-extension-package 18, test-foundation 44,
test-queue 27, test-release 14, test-task 98, all 0 failed (Docker on).
122b1223..3634d06e touches none of the 9 paths.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -193,6 +193,7 @@ config problem · `4` usage or a required file missing. Details:
|
||||
## Inbox, decisions and the bus host (`scripts/mosaic`)
|
||||
|
||||
```bash
|
||||
scripts/mosaic # no argument: the full-screen app
|
||||
scripts/mosaic inbox | tasks | agents [--business <id>] [--json]
|
||||
scripts/mosaic decide <decision> <option> [--note <text>] [--yes]
|
||||
scripts/mosaic trail <task|decision> [--json]
|
||||
@@ -226,6 +227,10 @@ sends). `stop` sends SIGTERM to a run's runner after checking it in
|
||||
the business; running sessions keep running. `launches list` reads
|
||||
`sessions.json` and needs no broker. `talk`, `stop` and `launches off|on`
|
||||
refuse inside an agent run.
|
||||
With no argument on a terminal, `scripts/mosaic` opens the full-screen app:
|
||||
Inbox, Tasks, Agents, Trail and Help, deciding through the same flow and
|
||||
strings as `decide`. In an agent run it exits 3; without a terminal on
|
||||
stdin and stdout it exits 4 with the usage.
|
||||
Exit codes: `0` ok · `1` failed or outcome unknown · `2` invalid input ·
|
||||
`3` refused or config problem · `4` usage. Details: `packages/cli/README.md`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user