#!/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.
# 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)"
if [ "${1:-}" = queue ]; then
  shift
  exec node "$REPO/packages/queue/src/cli.mjs" "$@"
fi
exec node "$REPO/packages/seat/src/cli.mjs" "$@"
