Skip to content

detent-agent

detent-agent --managed PRIVATE_CONFIG [--daemonize] [--generation-dir PATH]
[--initialize-managed]
detent-agent --status
detent-agent --help | -h

The host-local agent. It receives authenticated deliveries from the durable authority (or a relay) and publishes immutable generations on disk. Without --managed (or managed_path in agent.json) it exits with status 1 and no source configured.


OptionMeaning
--managed PRIVATE_CONFIGThe private credential file, managed.json
--generation-dir PATHDurable generation directory
--initialize-managedProvision an empty generation directory (first start only)

See Managed Delivery for managed.json.

OptionMeaning
--config PATHUse this agent.json
--runtime-dir PATHDirectory for agent.pid and agent.log
--systemUse system configuration and runtime locations
--daemonizeRun in the background (user operation only)
--statusReport the running agent and its durable generation, then exit

--system --daemonize and --status --daemonize are rejected.


Terminal window
detent-agent --status --managed managed.json
# running (pid 65214)
# durable revision=3 knob_count=2

With a generation directory (--generation-dir PATH, or implied by --managed), --status also reports the durable revision and count independently of whether the process is running. The exit status is 0 when the agent is running and 1 otherwise.


VariableMeaning
DETENT_MANAGED_CONFIGPrivate managed configuration
DETENT_GENERATION_DIRDurable generation directory
DETENT_RUNTIME_DIRRuntime directory

FileLocationPurpose
agent.jsonConfig directoryOptional configuration
agent.pidRuntime directoryLock and PID
agent.logRuntime directoryBackground (--daemonize) logs

The runtime directory defaults to $XDG_RUNTIME_DIR/detent, else a private detent-<uid> directory under $TMPDIR (mode 0700); system agents use /run/detent on Linux and /var/run/detent on BSD and macOS.