harness::edit_queued
functionInternal control-plane: edit a still-parked queued message in place by entry_id, preserving its queue position.
entry_idstring*required
The queued row to edit (its client-visible `entry_id`).
messageall of*required
The replacement message (string sugar or a full user/custom message).
all of (1)
variant 1
any of (2)
variant 2
any of (4)
variant 1
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
error_kindany of
… expand 2 nestedcollapse
any of (2)
variant 1
valuestringenum: auth_expired, rate_limited, context_overflow, transient, permanent
rolestring*requiredenum: assistant
stop_reasonstring*requiredenum: end, length, function_call, aborted, error
timestampinteger· int64*required
usageany of
… expand 2 nestedcollapse
any of (2)
variant 1
cache_readinteger· uint64min 0
cache_writeinteger· uint64min 0
inputinteger· uint64min 0
outputinteger· uint64min 0
reasoninginteger· uint64min 0
variant 2
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
function_call_idstring*required
function_idstring*required
rolestring*requiredenum: function_result
timestampinteger· int64*required
variant 3
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
custom_typestring*required
rolestring*requiredenum: custom
timestampinteger· int64*required
variant 4
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
rolestring*requiredenum: user
timestampinteger· int64*required
session_idstring*required
updatedboolean*required
False when no still-parked row matched — already drained or unknown.
Internal control-plane: grant a session access to an additional filesystem root.
session_idstring*required
session_idstring*required
Internal control-plane: list additional filesystem roots granted to a session.
session_idstring*required
session_idstring*required
Internal control-plane: the default working-directory root new sessions are scoped to.
boundaryall of*required
Effective per-session boundary for shell/coder calls. `workspace` when the filesystem approval hook can widen it, otherwise `configured_roots`.
all of (1)
variant 1
valuestringenum: workspace, configured_roots
default_rootstring
Working-directory root stamped onto the first turn of a session whose send carries no explicit `fs_scope.root`; `null` when defaulting is disabled (`default_filesystem_root: "off"`) or the cwd is unreadable.
Internal control-plane: revoke a session's access to an additional filesystem root.
session_idstring*required
session_idstring*required
Internal: settle a pending call's result (or release a held call) and resume the parked turn.
actionstring
`deliver` (default) supplies the result; `execute` releases a hook-held call through the remaining trigger pipeline.
contentone of[]
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
fs_scopeany of
execute only: one-shot additional roots trusted by the caller and unioned with the session's durable filesystem grants.
function_call_idstring*required
session_idstring*required
resolvedboolean*required
False when the call is unknown, already done, or (execute) not held.
turn_resumedboolean*required
True when this resolve re-enqueued the turn.
Internal: invoke one iii function (unwrapped from agent_trigger), enforce the dispatch policy, and capture the normalised result — or report it pending.
callobject*required
argumentsunknown*required
function_idstring*required
The iii function to invoke (already unwrapped from `agent_trigger`).
idstring*required
function_call id, echoed into the result.
session_idstring*required
any of (2)
variant 1
contentone of[]*required
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
duration_msinteger· uint64*requiredmin 0
function_call_idstring*required
function_idstring*required
variant 2
function_call_idstring*required
function_idstring*required
pending_timeout_msinteger· uint64min 0
Aggregate durable model usage, function outcomes, and available trace/span observability. `complete` is true only after every session in the durable tree has reached a terminal turn.
root_session_idstring*required
by_sessionobject[]*required
cache_read_tokensinteger· uint64min 0
cache_write_tokensinteger· uint64min 0
contextany of
The session's latest per-generation context snapshot (categories, budget, usage) — absent for sessions that have not generated since snapshots landed.
any of (2)
variant 1
categoriesobject*required
Where the request's tokens sit. Categories are assembly-time estimates; `hook_guidance` is the measured growth after assembly (pre-generate hook appends and orphan-repair patches), 0 when the request left assembly unchanged.
… expand 6 nestedcollapse
hook_guidanceinteger· uint64min 0
messagesobject*required
Estimated tokens of the assembled window's messages, by role.
… expand 4 nestedcollapse
assistantinteger· uint64*requiredmin 0
custominteger· uint64*requiredmin 0
function_resultinteger· uint64*requiredmin 0
userinteger· uint64*requiredmin 0
overheadinteger· uint64*requiredmin 0
Provider framing plus response_format / provider_options fields.
skillsinteger· uint64min 0
Selected skill bodies contained in the system prompt.
system_promptinteger· uint64*requiredmin 0
Final assembled system prompt excluding tokens attributed to `skills`: mode paragraph, identity, per-step aids, and any compaction summary section.
toolsinteger· uint64*requiredmin 0
Function schemas exposed to the model.
compactedboolean*required
effective_max_output_tokensinteger· uint64*requiredmin 0
Output allocation `usable` was derived against.
estimatorstring
Which estimator produced the numbers (`heuristic` until the context-manager resolves a real tokenizer). Absent when the context-manager predates the breakdown response.
freeinteger· uint64*requiredmin 0
session_cost_usdnumber· double
Running cost of the whole session in USD, accumulated across every generation step. `usage.cost_usd` is one step's bill — on providers with steep cache discounts the per-step number swings two orders of magnitude, so a chip showing it alone reads as a bouncing total.
session_idstring*required
stepinteger· uint64*requiredmin 0
summarized_head_tokensinteger· uint64min 0
timestampinteger· int64*required
totalinteger· uint64*requiredmin 0
Final request estimate: categories plus post-assembly growth.
usableinteger· uint64*requiredmin 0
The input budget the window was fit into.
usageany of
Actual provider usage for this generation, stamped after the terminal frame; absent when the provider returned none (or the generation never completed).
… expand 2 nestedcollapse
any of (2)
variant 1
cache_readinteger· uint64min 0
cache_writeinteger· uint64min 0
inputinteger· uint64min 0
outputinteger· uint64min 0
reasoninginteger· uint64min 0
depthinteger· uint32*requiredmin 0
function_call_errorsinteger· uint64*requiredmin 0
function_callsinteger· uint64*requiredmin 0
input_tokensinteger· uint64min 0
output_tokensinteger· uint64min 0
reasoning_tokensinteger· uint64min 0
session_idstring*required
turnsinteger· uint64*requiredmin 0
root_session_idstring*required
totalsobject*required
cache_read_tokensinteger· uint64min 0
cache_write_tokensinteger· uint64min 0
function_call_errorsinteger· uint64*requiredmin 0
function_callsinteger· uint64*requiredmin 0
input_tokensinteger· uint64min 0
output_tokensinteger· uint64min 0
reasoning_tokensinteger· uint64min 0
sessionsinteger· uint64*requiredmin 0
turnsinteger· uint64*requiredmin 0
tracesany of
Trace/span aggregates when the engine's in-memory observability exporter is available. Usage metrics remain available when it is not.
any of (2)
variant 1
by_sessionobject[]*required
… expand 7 nestedcollapse
depthinteger· uint32*requiredmin 0
duration_msinteger· uint64*requiredmin 0
Elapsed window from the session's first observed span to its last.
error_span_countinteger· uint64*requiredmin 0
session_idstring*required
span_countinteger· uint64*requiredmin 0
trace_countinteger· uint64*requiredmin 0
duration_msinteger· uint64*requiredmin 0
Elapsed window from the first observed span to the last observed span.
error_span_countinteger· uint64*requiredmin 0
span_countinteger· uint64*requiredmin 0
trace_countinteger· uint64*requiredmin 0
Distinct traces across the root session and all descendants.
Internal: refresh the cached function-registry snapshot when functions are registered/unregistered (driven by the engine::functions-available trigger).
eventstring
Engine event tag (advisory; the handler re-fetches the full list).
Internal: drop a deleted session's ephemeral subscriptions. Not called directly.
session_idstring*required
removedinteger· uint64*requiredmin 0
Internal: refresh the cached model-invocable skill catalog.
Entry point: ensure the session, persist the incoming message, and kick off a turn; returns fast (or merges into a running turn).
idempotency_keystring
Webhook dedupe: a repeated key returns the original `{session_id, turn_id}` and appends nothing.
messageall of*required
The incoming message; a string is sugar for a user text message. The role must be `user` or `custom`.
all of (1)
variant 1
any of (2)
variant 2
any of (4)
variant 1
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
error_kindany of
… expand 2 nestedcollapse
any of (2)
variant 1
valuestringenum: auth_expired, rate_limited, context_overflow, transient, permanent
rolestring*requiredenum: assistant
stop_reasonstring*requiredenum: end, length, function_call, aborted, error
timestampinteger· int64*required
usageany of
… expand 2 nestedcollapse
any of (2)
variant 1
cache_readinteger· uint64min 0
cache_writeinteger· uint64min 0
inputinteger· uint64min 0
outputinteger· uint64min 0
reasoninginteger· uint64min 0
variant 2
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
function_call_idstring*required
function_idstring*required
rolestring*requiredenum: function_result
timestampinteger· int64*required
variant 3
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
custom_typestring*required
rolestring*requiredenum: custom
timestampinteger· int64*required
variant 4
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
rolestring*requiredenum: user
timestampinteger· int64*required
modelstring
Required to start a NEW session unless `options.agent` supplies a model. Steering or waking an EXISTING session may omit it — the session's last turn's model (and provider, unless overridden) is inherited, the same rule the notification inject path uses. A model declared by the selected agent profile is authoritative.
optionsany of
any of (2)
variant 1
agentstring
Run the session as a directory agent profile (`directory::agents::*` id). Session-creating sends only — the profile's resolved system prompt (its `extends` chain composed by the directory) REPLACES the built-in identity (only the `mode` paragraph is prepended), its skill filter becomes the session's skill selection, its `model` is the fallback when this send names none, and its identity sticks like the system prompt (later sends inherit; naming an explicit prompt field sheds it). Refused on an existing session, combined with either prompt field, or when the profile's `extends` chain does not resolve.
functionsany of
The fail-closed dispatch policy. Omitted on a NEW session → deny every call; omitted when steering an EXISTING session → inherit the prior turn's policy (a nudge must not disarm a live run). Pass `{ allow: [] }` to strip explicitly. On a NEW `ask`-mode turn the effective policy is capped at the configured default policy; a steer folded into an already-running turn keeps that turn's frozen policy until it finalises.
… expand 2 nestedcollapse
any of (2)
variant 1
exposeall of
… expand 1 nestedcollapse
all of (1)
variant 1
valuestringenum: agent_trigger, native
max_cost_usdnumber· double
Hard USD budget for the complete root-and-subagent session tree. Every model used by the tree must advertise catalog pricing.
max_output_tokensinteger· uint64min 0
Per-generation output-token ceiling forwarded to the router.
max_total_tokensinteger· uint64min 0
Hard input-plus-output token budget for the complete root-and-subagent session tree.
max_turnsinteger· uint32min 0
max_validation_retriesinteger· uint32min 0
Per-turn override of the configured validation-retry budget (also the bound on `harness::hook::post-turn` deny re-prompts).
metadataunknown
Tracing passthrough.
modeany of
… expand 2 nestedcollapse
any of (2)
variant 1
valuestringenum: ask, agent
outputany of
The turn's deliverable; default `{ type: "text" }`.
… expand 2 nestedcollapse
any of (2)
variant 1
one of (2)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: json
provider_optionsobject
Provider-native per-call options, namespaced by provider id.
skillsstring[]
Exact skill ids advertised to the model. On a fresh session, omitted or empty means all. On an existing session, omitted inherits its filter and empty resets to all. Explicit changes require no active turn. This is index curation, not authorization.
system_prompt_strategyany of
How `system_prompt` combines with the built-in prompt: `override` replaces it; `enrich` (default) appends to it; `disabled` omits it. When BOTH prompt fields are omitted on an existing session, the prior turn's resolved prompt is inherited; naming a strategy (even bare) resolves fresh — the reset-to-default escape hatch.
… expand 2 nestedcollapse
any of (2)
variant 1
one of (3)
variant 1
valuestringenum: override
variant 2
valuestringenum: enrich
variant 3
valuestringenum: disabled
thinking_levelany of
… expand 2 nestedcollapse
any of (2)
variant 1
valuestringenum: minimal, low, medium, high, xhigh
sessionany of
Applied when this send creates/ensures the session.
session_idstring
Omit to create a new session.
deduplicatedboolean
True when `idempotency_key` matched an earlier send.
mergedboolean
True when folded into an in-flight turn (steering).
queuedboolean
True when the message was queued while a step was streaming; it lands in the transcript when the stream ends.
session_idstring*required
harness::session-tree
functionRead the durable root-and-descendant session tree for one harness run.
root_session_idstring*required
root_session_idstring*required
sessionsobject[]*required
depthinteger· uint32*requiredmin 0
session_idstring*required
Spawn a sub-agent in a child session (direct call only — never a trigger target). Fire-and-forget: returns { child_session_id, child_turn_id } immediately; the child's outcome reaches you only through whatever destination its task names. The child is a LEAF by default (no spawn/send/trigger registration); pass options.orchestrator: true to grant the orchestration surface, still capped by the caller's own policy. The task must include literal values for every required resource selector (for example `db: "primary"`). Omit child `max_turns` unless its budget covers discovery, contract lookup, work, and the deliverable.
agentstring
Run the child as a directory agent profile (`directory::agents::*` id). The profile's resolved system prompt (its `extends` chain composed by the directory) becomes the child's whole identity — no shared identity underneath, only the `mode` paragraph in front — its skill filter applies when `options.skills` is omitted, its `model` slots between an explicit `model` and the parent's, and its name/icon become the display defaults. Which agent profile to name is the prompt's decision. Refused combined with `options.system_prompt`, and when the profile's `extends` chain does not resolve.
displayany of
Optional display-only identity for the child session. This never affects session ids, policy, routing, or execution. On named-session reuse the existing session title and metadata are retained.
any of (2)
variant 1
colorany of
… expand 2 nestedcollapse
any of (2)
variant 1
valuestringenum: neutral, blue, purple, teal, green, amber, …
iconany of
… expand 2 nestedcollapse
any of (2)
variant 1
valuestringenum: agent, code, search, terminal, database, test, …
namestring*required1…48 chars
Short functional name, such as `Frontend` or `Explorer`. Leading and trailing whitespace is removed; the result must be 1-48 characters.
optionsany of
any of (2)
variant 1
filesystem_rootstring
Absolute filesystem root for the child turn (e.g. an isolated `worktree::create` checkout), written to the child's `metadata.fs_scope.root`. When set it overrides the inherited scope for this child; when absent the child inherits its direct parent's root unchanged.
functionsany of
Intersected with the parent policy — narrow, never escalate. An `ask`-mode child is further capped at the configured default policy.
… expand 2 nestedcollapse
any of (2)
variant 1
exposeall of
… expand 1 nestedcollapse
all of (1)
variant 1
valuestringenum: agent_trigger, native
max_childreninteger· uint32min 0
Fan-out guard for the child's own spawns.
max_output_tokensinteger· uint64min 0
Inherits the parent's ceiling unless explicitly narrowed/overridden.
max_turnsinteger· uint32min 0
Capped at the parent's remaining turn budget. Omit unless a strict child-specific cap is required. It must cover discovery/contract calls plus every work call; very small values (for example 2-3) commonly strand the child before it can produce its deliverable.
max_validation_retriesinteger· uint32min 0
Override the child's validation-retry budget (output contract AND `harness::hook::post-turn` deny re-prompts). Default: worker config.
modeany of
… expand 2 nestedcollapse
any of (2)
variant 1
valuestringenum: ask, agent
orchestratorboolean
Grant this child the orchestration surface. Default false: a spawned child is a LEAF — its policy gains deny globs for `harness::spawn`, `harness::send`, `engine::register_trigger`, `engine::unregister_trigger` and `engine::registered-triggers::*`, so it performs its assignment and updates shared state without spawning, messaging sessions, or touching trigger registrations. `true` skips those denies; the child still never exceeds its parent's policy.
outputany of
The child's deliverable: text / json / json+schema.
… expand 2 nestedcollapse
any of (2)
variant 1
one of (2)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: json
skillsstring[]
Exact skill ids advertised to the child. On a fresh child, omitted or empty means all. A reused child inherits when omitted and resets to all when empty. Explicit changes require no active child turn.
system_prompt_strategyall of
How `system_prompt` combines with the built-in prompt: `override` replaces it; `enrich` (default) appends to it; `disabled` omits it.
… expand 1 nestedcollapse
all of (1)
variant 1
one of (3)
variant 1
valuestringenum: override
variant 2
valuestringenum: enrich
variant 3
valuestringenum: disabled
thinking_levelany of
… expand 2 nestedcollapse
any of (2)
variant 1
valuestringenum: minimal, low, medium, high, xhigh
parent_session_idstring
Display-only parent for the console session tree, used when there is no live parent turn (e.g. a console- or workflow-issued spawn). Writes `SessionMeta.metadata.parent_session_id` so the console nests this child; it does NOT grant policy inheritance or parent-call resolution. Ignored when the dispatcher injects a real parent link (an in-turn spawn).
session_idstring
Spawn into this session, creating it if it does not exist (e.g. a fork, or a pre-chosen id to filter `turn-completed` subscriptions on); default: create fresh. An in-turn spawn may reuse an EXISTING id only inside its own tree (itself, or a child it spawned) — anything else is refused as a cross-run id collision. The response reports `reused: true` on reuse.
taskall of*required
The child's self-contained goal — its opening user message. Include every resolved required selector literally (for example `Use database db: "primary"`); the child cannot infer resources from the parent.
all of (1)
variant 1
any of (2)
variant 2
any of (4)
variant 1
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
error_kindany of
… expand 2 nestedcollapse
any of (2)
variant 1
valuestringenum: auth_expired, rate_limited, context_overflow, transient, permanent
rolestring*requiredenum: assistant
stop_reasonstring*requiredenum: end, length, function_call, aborted, error
timestampinteger· int64*required
usageany of
… expand 2 nestedcollapse
any of (2)
variant 1
cache_readinteger· uint64min 0
cache_writeinteger· uint64min 0
inputinteger· uint64min 0
outputinteger· uint64min 0
reasoninginteger· uint64min 0
variant 2
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
function_call_idstring*required
function_idstring*required
rolestring*requiredenum: function_result
timestampinteger· int64*required
variant 3
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
custom_typestring*required
rolestring*requiredenum: custom
timestampinteger· int64*required
variant 4
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
rolestring*requiredenum: user
timestampinteger· int64*required
child_session_idstring*required
child_turn_idstring*required
reusedboolean
The named session already existed and was reused — its prior transcript and parent linkage were retained (only possible with an explicit `session_id`).
Read the current turn status for a session.
session_idstring*required
any of (2)
variant 1
armed_wakesobject[]
WHAT the session is parked on, when `expects_wake`: each armed wake's watch and deadline, so "parked 12m on state operation_meta/status — never written" is readable from the outside instead of the session just looking quietly done.
created_atinteger· int64*required
subscription_idstring*required
trigger_typestring
The registered trigger's type/config, read from the canonicalised registration request. Absent on records that predate it.
childrenobject[]*required
function_call_idstring*required
session_idstring*required
depthinteger· uint32*requiredmin 0
expects_wakeboolean
The session owns an armed wake (a one-shot notify subscription): a completed turn here is NOT the run's outcome — a later turn in this session carries it. Mirrors the `terminal` flag on `harness::turn-completed` (`expects_wake == !terminal`). Pollers (e.g. workflow reconcile) must treat `completed && expects_wake` as still running.
max_transient_resumesinteger· uint32*requiredmin 0
max_turnsinteger· uint32*requiredmin 0
max_validation_retriesinteger· uint32*requiredmin 0
partial_result_availableboolean*required
pending_function_callsstring[]*required
queuedobject[]
Messages queued while a step streams, in arrival order; they land in the transcript when the stream ends.
entry_idstring*required
Deterministic transcript entry id the drain appends under, so a redelivered drain is a no-op.
messageany of*required
The canonical transcript message union. Untagged: the single-variant role tags disambiguate deserialization (assistant/function_result/custom are tried before user so their required fields gate the match).
… expand 4 nestedcollapse
any of (4)
variant 1
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
error_kindany of
… expand 2 nestedcollapse
any of (2)
variant 1
valuestringenum: auth_expired, rate_limited, context_overflow, transient, permanent
rolestring*requiredenum: assistant
stop_reasonstring*requiredenum: end, length, function_call, aborted, error
timestampinteger· int64*required
usageany of
… expand 2 nestedcollapse
any of (2)
variant 1
cache_readinteger· uint64min 0
cache_writeinteger· uint64min 0
inputinteger· uint64min 0
outputinteger· uint64min 0
reasoninginteger· uint64min 0
variant 2
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
function_call_idstring*required
function_idstring*required
rolestring*requiredenum: function_result
timestampinteger· int64*required
variant 3
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
custom_typestring*required
rolestring*requiredenum: custom
timestampinteger· int64*required
variant 4
contentone of[]*required
… expand 6 nestedcollapse
one of (6)
variant 1
typestring*requiredenum: text
variant 2
typestring*requiredenum: image
variant 3
typestring*requiredenum: thinking
variant 4
typestring*requiredenum: redacted_thinking
variant 5
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 6
contentunknown[]*required
function_call_idstring*required
typestring*requiredenum: function_result
rolestring*requiredenum: user
timestampinteger· int64*required
queued_atinteger· int64*required
session_idstring*required
session_idstring*required
statusstring*requiredenum: running, awaiting_functions, completed, cancelled, failed
The coarse, harness-internal turn lifecycle (harness.md § API Reference). Finer-grained than the session's `status`, which the loop derives from it.
stepinteger· uint64*requiredmin 0
transient_resumesinteger· uint32*requiredmin 0
turn_countinteger· uint32*requiredmin 0
validation_retriesinteger· uint32*requiredmin 0
Request cancellation of an in-flight turn (cascades to spawned children).
session_idstring*required
turn_idstring
Omit to stop the current turn.
harness::sweep-pending
functionInternal cron sweep: resolve pending function calls past their timeout so a parked turn never wedges. Not called directly.
scheduled_atinteger· int64
resolvedinteger· uint64*requiredmin 0
Number of expired pending calls resolved this sweep.
Preview the system prompt layers a session will use without making a model request.
default_onlyboolean
Return only the built-in default layer — the stored `system-prompts/default` override when one is active, else the embedded Harness default — without session, runtime, registry, or hook layers. The part's `name` states which source served it.
modeany of
any of (2)
variant 1
valuestringenum: ask, agent
selected_promptany of
any of (2)
variant 1
strategyall of
… expand 1 nestedcollapse
all of (1)
variant 1
one of (3)
variant 1
valuestringenum: override
variant 2
valuestringenum: enrich
variant 3
valuestringenum: disabled
session_idstring*required
partsobject[]*required
kindstring*requiredenum: built_in, selected, skills, runtime, injected
harness::teardown
functionInternal control-plane: remove trigger bindings owned by a root harness session tree.
root_session_idstring*required
removedinteger· uint64*requiredmin 0
Internal fire handler for a harness-registered trigger binding: evaluates the binding's conditions, projects the event into the target's payload, and dispatches it (a wake into the owner session, or a plain function call). Never called directly — register bindings with engine::register_trigger.
deliveredboolean*required
Whether the target was dispatched this fire.
gatestring
Which gate or condition stopped it. Present iff `!delivered`.
notestring
Why. Present iff `!delivered`.
harness::triggers::list
functionRead-only: the trigger bindings a session owns (durable records) — subscription id, trigger type/config, delivery target (absent = notifies the owner), label/event action, conditions, lifecycle, and fire count. In-turn agent calls may omit `session_id` (defaults to the calling session).
session_idstring
The owning session whose bindings to list. In-turn agent calls may omit it — the harness injects the calling session. External callers (console, CLI) must name the owner explicitly.
subscriptionsobject[]*required
actionstring
Human-readable event text declared as `metadata.action`.
conditionsobject[]
function_idstring*required
created_atinteger· int64*required
firesinteger· uint64*requiredmin 0
max_firesinteger· uint64min 0
subscription_idstring*required
targetstring
The function a fire calls. Absent for a wake — the fire notifies the owner session.
trigger_idstring
The engine's own trigger id (absent only in the brief window before the engine acknowledged the registration).
Tear down one trigger binding by subscription id: unregister the engine trigger AND delete the durable record (an engine-side unregister alone strands the owner's armed wake). `session_id` must name the binding's owner; in-turn agent calls may omit it (defaults to the calling session). A still-armed wake torn down this way notifies its parked owner.
session_idstring
The binding's owner session — a correctness handshake, checked against the record. In-turn agent calls may omit it (the harness injects the calling session). The console's privileged path supplies the owner it just listed.
subscription_idstring*required
`id` accepted as an alias: the sibling teardown contract (`engine::unregister_trigger`) calls this field `id`, and models carry that name over — verify-wake-fix-1 postmortem: the first unregister of the run failed on a raw serde "missing field" for exactly this.
removedboolean*required
False when no record existed (already retired) — honest, not an error.
Internal durable loop step (enqueued onto the harness-turn queue); not called directly.
depthinteger· uint32min 0
Sub-agent depth carried from the turn record (0 = top-level), so the step can stamp the `iii.tag.kind` baggage (`harness.turn` / `harness.subagent`) before any state read. Defaults to 0 so stale in-flight payloads from before this field existed still classify as top-level turns.
message_previewstring
Preview carried from the turn record so the step can stamp the `iii.tag.message` baggage before any state read.
session_idstring*required
stepinteger· uint64*requiredmin 0
next_stepinteger· uint64min 0
session_idstring*required
skippedboolean
True when a redelivered/stale step was acked and dropped.
statusstring*requiredenum: running, awaiting_functions, completed, cancelled, failed
The coarse, harness-internal turn lifecycle (harness.md § API Reference). Finer-grained than the session's `status`, which the loop derives from it.
harness::ui-content
functionServe the harness worker's injected console UI assets (content function for its console:script / console:style triggers).
pathstring*required
The asset path from the trigger config (e.g. `state/page.js`).
contentstring*required
The asset source, verbatim.
content_typestring*required
MIME type the console should serve the asset with.
Internal control-plane: remove a still-parked queued message by entry_id (the console's edit-queued path).
entry_idstring*required
The queued row's transcript entry id, as surfaced by `harness::status` → `queued[].entry_id`. Stable and client-visible (the internal row id is not), so removals target it.
session_idstring*required
removedboolean*required
False when no still-parked row matched — already drained or unknown.