v32

OpenAPI 3.0.3AGPL-3.0-onlyraw.githubusercontent.com2026-08-0178220333.8 KB
lifecycle

POST /lifecycle/restart — request a controlled restart/promotion of a

transient (Oneshot) daemon (ADR-008 P5-L).

REFUSES unless this daemon is an Oneshot residency AND the single-instance lock is enabled AND the target is not itself Oneshot. The accepted path raises the L8b quiescing flag (via the coordinator) so admission gates drain in-flight work; the Oneshot supervisor then self-terminates and app.rs persists the handover record. Production-neutral: no Oneshot daemon exists until L8d, so the accept path is unreachable in production.

post/lifecycle/restart

Request body

targetMode'standalone' | 'serverHeadless' | 'oneshot' required

Daemon residency mode reported in the health/status handshake (ADR-008 P5-L L1).

Wire values (camelCase, to match the HealthResponse/StatusResponse field naming these enums travel inside): "standalone" | "serverHeadless" | "oneshot". The wire enum is defined HERE in the contract — it deliberately does NOT depend on uc-daemon's internal DaemonRunMode; the producer maps DaemonRunMode -> DaemonResidency at the daemon/webserver boundary.

Consumers (CLI L2 version-check, future R8-F2 takeover) read this to learn whether the daemon they are talking to is a persistent member node (Standalone/ServerHeadless) or a transient Oneshot that a persistent client may later take over. As of L1 the CLI/GUI do NOT act on this field.

Backward-tolerant: the field carries #[serde(default)], so an OLDER daemon body that omits residency decodes to [Self::Standalone], and a NEWER body's residency is simply ignored by an older client. New variants must be added at the END so existing clients keep deserializing known values.

Response

Controlled restart accepted; quiescing/drain started

tsinteger required

Server time when the response was built (unix epoch milliseconds).