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]>
30 lines
1.2 KiB
Bash
Executable File
30 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# `mosaic launch <seat>` and `mosaic seat task <seat> <text>`: seat launch
|
|
# with registration for the control board. See packages/seat/README.md.
|
|
# `mosaic queue <verb>`: the work queue. See packages/queue/README.md.
|
|
# `mosaic business <verb>`: business files and role instances. See
|
|
# packages/business/README.md.
|
|
# `mosaic inbox|decide|tasks|agents|trail|talk|stop|launches` and
|
|
# `mosaic bus start|stop|status`: the human commands, managed sessions and
|
|
# the bus host. See packages/cli/README.md.
|
|
# Not the npm-global `mosaic` CLI from the estate tooling; this one is
|
|
# repository-local and only reachable as scripts/mosaic.
|
|
set -euo pipefail
|
|
REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
# No argument: the full-screen app on a terminal (packages/cli/README.md).
|
|
if [ $# -eq 0 ]; then
|
|
exec node "$REPO/packages/cli/src/cli.mjs"
|
|
fi
|
|
if [ "${1:-}" = queue ]; then
|
|
shift
|
|
exec node "$REPO/packages/queue/src/cli.mjs" "$@"
|
|
fi
|
|
if [ "${1:-}" = business ]; then
|
|
shift
|
|
exec node "$REPO/packages/business/src/cli.mjs" "$@"
|
|
fi
|
|
case "${1:-}" in
|
|
inbox|decide|tasks|agents|trail|talk|stop|launches|bus) exec node "$REPO/packages/cli/src/cli.mjs" "$@" ;;
|
|
esac
|
|
exec node "$REPO/packages/seat/src/cli.mjs" "$@"
|