Update zombie config or drive its status FSM
Partial update of a zombie. Body fields are optional and presence-based:
config_json— replace the zombie’s config blob whole; publisheszombie_config_changed.trigger_markdown— replace the zombie’s storedTRIGGER.md; the server reparses the frontmatter and overlays thex_usezombie.triggershalf ofconfig_json. The zombie’snameis rewritten to the reparsed name. Mutually exclusive withconfig_json(both drive the same column).source_markdown— replace the zombie’s storedSKILL.md; the server reparses the frontmatter and overlays the tools / credentials / network / budget halves ofconfig_json. The reparsednamemust equal the zombie’s current name (renames require a fresh install).status— drive the lifecycle FSM. Allowed values:active(resume from stopped or auto-paused),stopped(halt the running session, resumable),killed(terminal mark, irreversible). Thepausedstate is platform-only (set by the anomaly gate) and rejected here.
All field-bearing branches run inside a single transaction that takes a
row-level FOR UPDATE lock on core.zombies, applies field-level merge
semantics, and commits with a single UPDATE. Two writers patching
different body fields land both halves; two writers patching the same
field collapse to last-write-wins. Per-transaction lock_timeout=5s,
statement_timeout=10s, idle_in_transaction_session_timeout=5s make
pathological waits fail fast as 503 (retryable).
The SQL UPDATE is one statement; one control-stream publish fires when any
dirty surface lands. Returns the new config_revision (a strictly
monotonic ms-epoch timestamp).
FSM rules:
killedis terminal — any further PATCH on a killed zombie returns 404 (the row is a tombstone).- Stop requires status ∈ ; Resume requires status ∈ ; Kill is allowed from any non-killed state.
- Disallowed transitions return 409 (e.g. resume on an active zombie).
Status transitions (stop/resume/kill) require operator-minimum role per RULE BIL — destructive lifecycle actions. Pure config updates stay at workspace-member.
Authorizations
Obtain a token via the CLI auth flow (POST /v1/auth/sessions) or GitHub OAuth
Path Parameters
UUIDv7 of the workspace.
UUIDv7 of the zombie.
Body
The new zombie config as a JSON string. Validated server-side.
Mutually exclusive with trigger_markdown.
The full TRIGGER.md to persist; the server reparses the
frontmatter and overlays the x_usezombie.triggers half of
config_json. Must be non-empty. Mutually exclusive with
config_json.
The full SKILL.md to persist; the server reparses the
frontmatter and overlays the tools / credentials / network /
budget halves of config_json. The reparsed name must
match the zombie's current name. Must be non-empty.
Target FSM state. active resumes from stopped/paused; stopped
halts the running session (resumable); killed is terminal. Note
that paused is intentionally not in this enum — it is set only
by the platform's anomaly gate.
active, stopped, killed