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`).
messagestring*required
The replacement user message text.
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 (7)
variant 1
typestring*requiredenum: text
variant 2
attachment_idstring
Optional link to the stored original of this inline image (`session::put-attachment`, resolvable with `session::get-attachment`). Lets readers ask `session::messages { include_image_data: false }` and fetch the bytes lazily instead of receiving them inline. Persisted verbatim on the transcript; model-bound consumers never see it (see [`ContentBlock::strip_files`]). Omitted on the wire when absent so legacy transcripts stay byte-identical.
typestring*requiredenum: image
variant 3
attachment_idstring*required
sizeinteger· uint64*requiredmin 0
typestring*requiredenum: file
variant 4
typestring*requiredenum: thinking
variant 5
typestring*requiredenum: redacted_thinking
variant 6
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 7
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 (7)
variant 1
typestring*requiredenum: text
variant 2
attachment_idstring
Optional link to the stored original of this inline image (`session::put-attachment`, resolvable with `session::get-attachment`). Lets readers ask `session::messages { include_image_data: false }` and fetch the bytes lazily instead of receiving them inline. Persisted verbatim on the transcript; model-bound consumers never see it (see [`ContentBlock::strip_files`]). Omitted on the wire when absent so legacy transcripts stay byte-identical.
typestring*requiredenum: image
variant 3
attachment_idstring*required
sizeinteger· uint64*requiredmin 0
typestring*requiredenum: file
variant 4
typestring*requiredenum: thinking
variant 5
typestring*requiredenum: redacted_thinking
variant 6
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 7
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 for the session tree `root_session_id` belongs to (`session_id` is accepted as an alias, and a sub-agent id is resolved to its root). `complete` is true only after every session in the durable tree has reached a terminal turn.
by_sessionobject[]*required
cache_read_tokensinteger· uint64*requiredmin 0
Summed over every generation that reported it. `null` means at least one generation did not report the counter (a provider that omits it, or a turn that failed before usage came back) — never a measured zero, so the key is always present and a reader can tell the two apart.
cache_write_tokensinteger· uint64*requiredmin 0
Summed over every generation that reported it. `null` means at least one generation did not report the counter (a provider that omits it, or a turn that failed before usage came back) — never a measured zero, so the key is always present and a reader can tell the two apart.
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`: 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
cost_usdnumber· double*required
Summed over every generation that reported it. `null` means at least one generation did not report the counter (a provider that omits it, or a turn that failed before usage came back) — never a measured zero, so the key is always present and a reader can tell the two apart.
depthinteger· uint32*requiredmin 0
function_call_errorsinteger· uint64*requiredmin 0
function_callsinteger· uint64*requiredmin 0
input_tokensinteger· uint64*requiredmin 0
Summed over every generation that reported it. `null` means at least one generation did not report the counter (a provider that omits it, or a turn that failed before usage came back) — never a measured zero, so the key is always present and a reader can tell the two apart.
output_tokensinteger· uint64*requiredmin 0
Summed over every generation that reported it. `null` means at least one generation did not report the counter (a provider that omits it, or a turn that failed before usage came back) — never a measured zero, so the key is always present and a reader can tell the two apart.
reasoning_tokensinteger· uint64*requiredmin 0
Summed over every generation that reported it. `null` means at least one generation did not report the counter (a provider that omits it, or a turn that failed before usage came back) — never a measured zero, so the key is always present and a reader can tell the two apart.
session_idstring*required
turnsinteger· uint64*requiredmin 0
root_session_idstring*required
totalsobject*required
cache_read_tokensinteger· uint64*requiredmin 0
Summed over every generation that reported it. `null` means at least one generation did not report the counter (a provider that omits it, or a turn that failed before usage came back) — never a measured zero, so the key is always present and a reader can tell the two apart.
cache_write_tokensinteger· uint64*requiredmin 0
Summed over every generation that reported it. `null` means at least one generation did not report the counter (a provider that omits it, or a turn that failed before usage came back) — never a measured zero, so the key is always present and a reader can tell the two apart.
cost_usdnumber· double*required
Summed over every generation that reported it. `null` means at least one generation did not report the counter (a provider that omits it, or a turn that failed before usage came back) — never a measured zero, so the key is always present and a reader can tell the two apart.
function_call_errorsinteger· uint64*requiredmin 0
function_callsinteger· uint64*requiredmin 0
input_tokensinteger· uint64*requiredmin 0
Summed over every generation that reported it. `null` means at least one generation did not report the counter (a provider that omits it, or a turn that failed before usage came back) — never a measured zero, so the key is always present and a reader can tell the two apart.
output_tokensinteger· uint64*requiredmin 0
Summed over every generation that reported it. `null` means at least one generation did not report the counter (a provider that omits it, or a turn that failed before usage came back) — never a measured zero, so the key is always present and a reader can tell the two apart.
reasoning_tokensinteger· uint64*requiredmin 0
Summed over every generation that reported it. `null` means at least one generation did not report the counter (a provider that omits it, or a turn that failed before usage came back) — never a measured zero, so the key is always present and a reader can tell the two apart.
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.
Internal control-plane: remove a project directory from the durable catalog.
harness::projects::list
functionInternal control-plane: list the operator's durable project catalog.
projectsobject[]*required
last_used_atinteger· int64*required
Internal control-plane: remember, touch, or rename a project directory.
namestring
A custom display name. Omit to keep the current name (or use the folder name for a new project); pass blank to reset to the folder name.
projectobject*required
last_used_atinteger· int64*required
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.
messagestring*required
The incoming user message text.
modelstring
Required on a new session unless `options.agent` supplies a model; an existing session inherits its last turn's model when omitted.
optionsany of
any of (2)
variant 1
agentstring
Directory agent profile id (`directory::agents::*`) replacing the built-in identity; new sessions only, refused with a prompt field.
functionsany of
Fail-closed dispatch policy; omitted means deny all on a new session and inherit on an existing one (`{ allow: [] }` strips explicitly).
… 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 validation-retry budget.
metadataunknown
Tracing passthrough.
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; omitted or empty means all on a new session (existing: omitted inherits, empty resets).
system_prompt_strategyany of
How `system_prompt` combines with the built-in prompt; omitting both prompt fields on an existing session inherits the prior prompt.
… 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 (never a trigger target) and return { child_session_id, child_turn_id } immediately; the child's outcome reaches you only through whatever destination its task names. Check `harness::status` for child health; children are leaves unless options.orchestrator is true.
agentstring
Directory agent profile id (`directory::agents::*`) supplying the child's prompt, skills, model, and display; refused with `options.system_prompt`. Omitted, an in-turn spawn continues the parent turn's profile (name `options.system_prompt` for a child that needs a different identity).
displayany of
Display-only name/icon/color for the child session; never affects ids, policy, or routing.
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`, 1-48 characters after trimming.
optionsany of
any of (2)
variant 1
filesystem_rootstring
Absolute filesystem root for the child turn; omit to inherit the parent's.
functionsany of
Dispatch policy for the child, intersected with the parent's (narrow, never escalate).
… 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
Turn cap for the child, capped at the parent's remaining budget; omit unless required (small values strand the child).
max_validation_retriesinteger· uint32min 0
Override of the child's validation-retry budget.
orchestratorboolean
Let the child spawn, send, and register triggers (still capped by the parent's policy); default false makes it a leaf.
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; omitted or empty means all (a reused child inherits when omitted).
system_prompt_strategyall of
How `system_prompt` combines with the built-in prompt.
… 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 tree when there is no live parent turn; grants no policy inheritance.
session_idstring
Session id to spawn into, created if absent; an existing id may be reused only inside the caller's own tree.
taskstring*required
The child's self-contained goal, its opening user message; name every required resource selector literally (the child cannot infer them).
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 a session's current turn. Returns a lean summary by default; pass verbose: true for the full runtime report and untruncated result.
session_idstring*required
verboseboolean
Include the full runtime report and unmodified result.
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
contextany of
The last generate step's context accounting (budget, categories, provider-exact usage once it lands) — what a UI meter should show instead of re-estimating the transcript. Verbose only; absent before the first generate.
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`: 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· uint32min 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· uint32min 0
max_turnsinteger· uint32min 0
max_validation_retriesinteger· uint32min 0
partial_result_availableboolean
pending_function_callsstring[]
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 7 nestedcollapse
one of (7)
variant 1
typestring*requiredenum: text
variant 2
attachment_idstring
Optional link to the stored original of this inline image (`session::put-attachment`, resolvable with `session::get-attachment`). Lets readers ask `session::messages { include_image_data: false }` and fetch the bytes lazily instead of receiving them inline. Persisted verbatim on the transcript; model-bound consumers never see it (see [`ContentBlock::strip_files`]). Omitted on the wire when absent so legacy transcripts stay byte-identical.
typestring*requiredenum: image
variant 3
attachment_idstring*required
sizeinteger· uint64*requiredmin 0
typestring*requiredenum: file
variant 4
typestring*requiredenum: thinking
variant 5
typestring*requiredenum: redacted_thinking
variant 6
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 7
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 7 nestedcollapse
one of (7)
variant 1
typestring*requiredenum: text
variant 2
attachment_idstring
Optional link to the stored original of this inline image (`session::put-attachment`, resolvable with `session::get-attachment`). Lets readers ask `session::messages { include_image_data: false }` and fetch the bytes lazily instead of receiving them inline. Persisted verbatim on the transcript; model-bound consumers never see it (see [`ContentBlock::strip_files`]). Omitted on the wire when absent so legacy transcripts stay byte-identical.
typestring*requiredenum: image
variant 3
attachment_idstring*required
sizeinteger· uint64*requiredmin 0
typestring*requiredenum: file
variant 4
typestring*requiredenum: thinking
variant 5
typestring*requiredenum: redacted_thinking
variant 6
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 7
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 7 nestedcollapse
one of (7)
variant 1
typestring*requiredenum: text
variant 2
attachment_idstring
Optional link to the stored original of this inline image (`session::put-attachment`, resolvable with `session::get-attachment`). Lets readers ask `session::messages { include_image_data: false }` and fetch the bytes lazily instead of receiving them inline. Persisted verbatim on the transcript; model-bound consumers never see it (see [`ContentBlock::strip_files`]). Omitted on the wire when absent so legacy transcripts stay byte-identical.
typestring*requiredenum: image
variant 3
attachment_idstring*required
sizeinteger· uint64*requiredmin 0
typestring*requiredenum: file
variant 4
typestring*requiredenum: thinking
variant 5
typestring*requiredenum: redacted_thinking
variant 6
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 7
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 7 nestedcollapse
one of (7)
variant 1
typestring*requiredenum: text
variant 2
attachment_idstring
Optional link to the stored original of this inline image (`session::put-attachment`, resolvable with `session::get-attachment`). Lets readers ask `session::messages { include_image_data: false }` and fetch the bytes lazily instead of receiving them inline. Persisted verbatim on the transcript; model-bound consumers never see it (see [`ContentBlock::strip_files`]). Omitted on the wire when absent so legacy transcripts stay byte-identical.
typestring*requiredenum: image
variant 3
attachment_idstring*required
sizeinteger· uint64*requiredmin 0
typestring*requiredenum: file
variant 4
typestring*requiredenum: thinking
variant 5
typestring*requiredenum: redacted_thinking
variant 6
argumentsunknown*required
function_idstring*required
typestring*requiredenum: function_call
variant 7
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
stop_reasonstring
Why a `completed` turn stopped when the model did not end it itself (`max_turns`). Present in the lean report too: a poller that reads `completed` with no error must still be able to tell an exhausted budget from a finished task.
transient_resumesinteger· uint32min 0
turn_countinteger· uint32*requiredmin 0
validation_retriesinteger· uint32min 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, without session, runtime, registry, or hook layers.
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
functionList the trigger bindings a session owns: subscription id, trigger type/config, target (absent = notifies the owner), label, conditions, lifecycle, and fire count. In-turn calls may omit `session_id`.
session_idstring
Owner session whose bindings to list; in-turn calls may omit it (the calling session is injected).
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 (engine trigger and durable record); a still-armed wake notifies its parked owner. `session_id` must name the owner; in-turn calls may omit it.
session_idstring
The binding's owner session; in-turn calls may omit it (the calling session is injected).
subscription_idstring*required
The subscription to remove (`id` is accepted as an alias).
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).
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.