Expand description
Identity contract for the detached agent and MCP children the supervisor owns: the environment markers stamped at spawn time and the pure parsers that read them back off a live process image.
The supervisor stamps SUBPROCESS_MARKER_ENV and a name_key=service
pair into every child; shutdown, reconciliation, and port reclamation
confirm a registry PID still names this installation’s child before
signalling it. PIDs are recycled, and group-signalling a stale PID
(kill(-pid)) could reach an unrelated session leader — so a row is only
ever signalled once both the marker and the exact pairing are found.
The API server is not a spawned child: infra services serve re-executes
itself once with API_SERVER_ENV so a later stop api can prove a port
holder is the API server before signalling it. It deliberately does not
carry SUBPROCESS_MARKER_ENV, which selects the subprocess secrets
source.
Spawning and the platform-specific process probes live in
systemprompt_loader::subprocess; this module holds only data and pure
functions so the shared layer stays free of process I/O.
Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.
Constants§
- AGENT_
NAME_ ENV - API_
SERVER_ ENV - API_
SERVER_ SERVICE - DEPLOYMENT_
HOST_ ENV - MCP_
SERVICE_ ID_ ENV - SUBPROCESS_
MARKER_ ENV