# Mosaic Console: `node packages/webui/src/cli.mjs serve`, one instance. # Rendered by scripts/webui-service.sh from packages/webui/systemd/; @REPO@, # @PATH@, @NODE@ and the serve flags below are filled in at install time. # @REPO@ is the read-only copy `install --copy ID` names, and the flags # pass the canonical checkout as --checkout for the queue read (row 77). # Edit the template and reinstall; do not edit the installed unit. # # The Console reads the bus through the human transport, so whoever starts # this unit holds the human's capability. Jason starts and restarts it # (`systemctl --user enable --now mosaic-webui`), and so may Mos under lead # decision 102, which accepts that sends then enter the trail as Jason. Any # other agent starting it works around the human proof (lead decisions 62 # and 94). The unit sets no MOSAIC_*, CLAUDE*, CODEX* or PI_* variable. [Unit] Description=Mosaic Console Documentation=file://@REPO@/packages/webui/README.md StartLimitIntervalSec=600 StartLimitBurst=5 [Service] Type=simple WorkingDirectory=@REPO@ Environment=PATH=@PATH@ # The server binds 127.0.0.1 only. Usage, config and listen refusals # (a port already in use included) exit 2 and are not retried; fix the # flags or free the port, then start it again. ExecStart=@NODE@ @REPO@/packages/webui/src/cli.mjs serve @FLAGS@ Restart=on-failure RestartSec=15 RestartPreventExitStatus=2 # `systemctl --user stop` sends SIGTERM; the server stops accepting and # closes. Open connections that outlast TimeoutStopSec are killed. KillSignal=SIGTERM TimeoutStopSec=30 NoNewPrivileges=yes [Install] WantedBy=default.target