Files
stack/packages/cli/systemd/mosaic-bus.service.in
T
jason.woltjeandClaude Opus 5.5 305a012b13 cli, webui: bus, Console and mosaic CLI on one pinned copy (#1579)
Row 85 round 2. Built by Rocko, packet agents/rocko/work/queue-85/r2/,
candidate manifest
bd7ea899c7cacef43b415b8e9ecb164e1f36718ffbe64347881a2c5653170c98.
Filbert approved on #1579, comment 28256; Darkwing approved, comment
28258.

stack-copy.sh builds shared read-only copies under
XDG_DATA_HOME/mosaic-stack/copies; the bus and Console services render
and install against a copy with --copy and --pm. No live step is run
by this commit; those need Mos's go.

Sage's gate rerun on 3a1e11b83 with rows 85, 102 and 103 applied,
Docker up: node suites bus 128, business 67, cli 165, control-board
124, conversation 182, discord 178, harness 73, ledger 78, mosaic 69,
queue 155, runs 43, seat 113, tasks 92, webui 108; scripts auth 15,
conductor 17, config 24, discord 66, extension-package 18,
foundation 44, queue 28, release 14, task 98. All pass, 0 fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 16:34:47 -05:00

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@PM_FLAGS@
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