apps/agent (docs/AGENT-1.0-PLAN.md §3-4, §10): listens on nothing; checks every job (pinned Hub key, server, time window, replays for 90 days, type per mode, strict arguments) before running crosscode with an argument array; opens the sealed config into a root-only file only for the job; redacts log lines; keeps unsent reports in an outbox; encrypts exports before upload; check-ports on the central server (read-only); self-update with automatic revert. One bundled dist/cli.js, a systemd unit and the install script that joins a server with a one-time token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
680 B
Desktop File
24 lines
680 B
Desktop File
# The Cross Code server agent (docs/AGENT-1.0-PLAN.md §3). Root, because the crosscode script it
|
|
# runs needs root (PostgreSQL, PM2 for each app user, frpc). It listens on nothing.
|
|
[Unit]
|
|
Description=Cross Code server agent
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
ExecStart=/usr/bin/node /opt/crosscode/agent/current/apps/agent/dist/cli.js run
|
|
Restart=always
|
|
RestartSec=10
|
|
RuntimeDirectory=crosscode-agent
|
|
RuntimeDirectoryMode=0700
|
|
StateDirectory=crosscode-agent
|
|
StateDirectoryMode=0700
|
|
Environment=NODE_ENV=production
|
|
# Logs: journalctl -u crosscode-agent
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|