Row 92, round 2. Darkwing built it. A role session runs in a bwrap sandbox that sees only its own workspace, a private /proc, /dev and IPC namespace, and the variables ENV_ALLOW passes. The launcher checks the session credential before a Claude launch, records a runner killed from the host as killed rather than failed, and the bus unit template carries the credential file (decision 119). The harness gate and the cli, seat and harness READMEs say what the sandbox does and does not hide. Candidate manifest 8bf4141cbe69fc7bed188555bcc88dcab0b1ea2149912cb6f970ba8c2629dd97 (13 paths), baseac37cd17, packet agents/darkwing/work/queue-92/r2/. Approvals: Dewey 27978, Filbert 27984 (round 1: Dewey 27942, Filbert asked for changes in 27951). Sage's gate rerun 22:27:37Z-22:30:35Z on1b7f3781plus the patch, manifest 13/13: seat 33, cli 120, harness 65, bus 108, webui 86, control-board 124, and every scripts/test-*.sh exited 0 (test-release 4, Docker cases skipped at a dead socket). Live at the next bus restart and the next role session launch (decision 109). Installing the new unit and restarting is Mos's call. Co-Authored-By: Claude Opus 5.5 <[email protected]>
43 lines
1.8 KiB
Plaintext
43 lines
1.8 KiB
Plaintext
# Mosaic bus host, one instance per business: mosaic-bus@<business>.
|
|
# Rendered by scripts/bus-service.sh from packages/cli/systemd/; @REPO@,
|
|
# @PATH@ and the claude line below are filled in at install time. Edit the template and reinstall; do
|
|
# not edit the installed copy. The bus store allows one broker per data
|
|
# root, so run one instance per data root (packages/cli/README.md).
|
|
[Unit]
|
|
Description=Mosaic bus host (%i)
|
|
Documentation=file://@REPO@/packages/cli/README.md
|
|
StartLimitIntervalSec=600
|
|
StartLimitBurst=5
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=@REPO@
|
|
Environment=PATH=@PATH@
|
|
# The Claude Code binary that managed sessions and the manifest's
|
|
# claudeVersion run, pinned at install (`--claude PATH`, default
|
|
# `command -v claude`). Without it they run `claude` from PATH above.
|
|
@CLAUDE_ENV@
|
|
# Claude Code sessions log in with what this 0600 file sets, which the
|
|
# operator writes: CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY, or a proxy's
|
|
# ANTHROPIC_AUTH_TOKEN with ANTHROPIC_BASE_URL. The `-` lets the unit start
|
|
# without it, and a Claude Code launch then refuses.
|
|
EnvironmentFile=-%h/.config/mosaic-dev/secrets/claude-session.env
|
|
# The host reads the system config and the business file, boots the broker
|
|
# (packages/bus/src/process.mjs) and starts the notifier. Config problems and
|
|
# refusals exit 3, usage 4, invalid input 2: none of those is retried. A
|
|
# child that dies takes the host down with exit 1, and the unit restarts
|
|
# the pair.
|
|
ExecStart=@REPO@/scripts/mosaic bus start %i
|
|
Restart=on-failure
|
|
RestartSec=15
|
|
RestartPreventExitStatus=2 3 4
|
|
# `systemctl --user stop` sends SIGTERM to the host, which stops the
|
|
# notifier after its poll in flight, then closes the broker.
|
|
KillSignal=SIGTERM
|
|
KillMode=mixed
|
|
TimeoutStopSec=60
|
|
NoNewPrivileges=yes
|
|
|
|
[Install]
|
|
WantedBy=default.target
|