# Local Studio agent-runtime sidecar (:8081).## Runs the standalone @local-studio/agent-runtime server (Phase 5b): the Next# frontend's runtime + browser routes proxy here when# LOCAL_STUDIO_AGENT_RUNTIME_URL=http://127.0.0.1:8081 is set in the frontend's# environment — the pass-through case that lets SSE flush through Next's# standalone server. The server binds 127.0.0.1 only (no auth of its own; the# Next layer keeps enforcing requireApiAccess before proxying).## Installed by scripts/deploy-remote.sh (agent-runtime block), which replaces# the @APP_DIR@ and @NODE@ placeholders with the remote project path and the# resolved node binary, then runs:# systemctl --user daemon-reload && systemctl --user enable --now local-studio-agent-runtime## This is a USER unit: install to ~/.config/systemd/user/.[Unit]Description=Local Studio agent-runtime sidecar (:8081)After=network.target[Service]Type=simpleWorkingDirectory=@APP_DIR@/services/agent-runtimeExecStart=@NODE@ dist/server.jsEnvironment=PORT=8081# Same data dir the frontend uses for api-settings.json, if customized:# Environment=LOCAL_STUDIO_DATA_DIR=%h/.local-studioRestart=on-failureRestartSec=2[Install]WantedBy=default.target
# Local Studio agent-runtime sidecar (:8081).
#
# Runs the standalone @local-studio/agent-runtime server (Phase 5b): the Next
# frontend's runtime + browser routes proxy here when
# LOCAL_STUDIO_AGENT_RUNTIME_URL=http://127.0.0.1:8081 is set in the frontend's
# environment — the pass-through case that lets SSE flush through Next's
# standalone server. The server binds 127.0.0.1 only (no auth of its own; the
# Next layer keeps enforcing requireApiAccess before proxying).
#
# Installed by scripts/deploy-remote.sh (agent-runtime block), which replaces
# the @APP_DIR@ and @NODE@ placeholders with the remote project path and the
# resolved node binary, then runs:
# systemctl --user daemon-reload && systemctl --user enable --now local-studio-agent-runtime
#
# This is a USER unit: install to ~/.config/systemd/user/.
[Unit]
Description=Local Studio agent-runtime sidecar (:8081)
After=network.target
[Service]
Type=simple
WorkingDirectory=@APP_DIR@/services/agent-runtime
ExecStart=@NODE@ dist/server.js
Environment=PORT=8081
# Same data dir the frontend uses for api-settings.json, if customized:
# Environment=LOCAL_STUDIO_DATA_DIR=%h/.local-studio
Restart=on-failure
RestartSec=2
[Install]
WantedBy=default.target