harness::filesystem::grant
Internal control-plane: grant a session access to an additional filesystem root.
- rootstringrequired
- session_idstringrequired
- rootsstring[]required
- session_idstringrequired
Thin durable turn loop that wires session-manager, context-manager, and llm-router into an agent loop; spawns sub-agents as child sessions.
exact versions are immutable; binary and bundle artifacts are digest-pinned.
Internal control-plane: grant a session access to an additional filesystem root.
Internal control-plane: list additional filesystem roots granted to a session.
Internal control-plane: revoke a session's access to an additional filesystem root.
Internal: settle a pending call's result (or release a held call) and resume the parked turn.
`deliver` (default) supplies the result; `execute` releases a hook-held call through the remaining trigger pipeline.
execute only: one-shot additional roots trusted by the caller and unioned with the session's durable filesystem grants.
False when the call is unknown, already done, or (execute) not held.
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.
The iii function to invoke (already unwrapped from `agent_trigger`).
function_call id, echoed into the result.
Internal: the shared subscription fire handler — injects a notification into the owning session (resolved from the local subscription registry). Not called directly.
Internal: hot-reload harness from the authoritative configuration when it changes — re-binds the cron pending-sweep on a sweep_expression change and swaps the per-call tuning snapshot otherwise.
Configuration id that changed (advisory; the handler re-fetches).
Internal: refresh the cached function-registry snapshot when functions are registered/unregistered (driven by the engine::functions-available trigger).
Engine event tag (advisory; the handler re-fetches the full list).
Internal: drop a deleted session's ephemeral subscriptions. Not called directly.
Entry point: ensure the session, persist the incoming message, and kick off a turn; returns fast (or merges into a running turn).
Webhook dedupe: a repeated key returns the original `{session_id, turn_id}` and appends nothing.
The incoming message; a string is sugar for a user text message. The role must be `user` or `custom`.
The fail-closed dispatch policy; omit to deny every call.
Tracing passthrough.
The turn's deliverable; default `{ type: "text" }`.
How `system_prompt` combines with the built-in prompt: `override` replaces it; `enrich` (default) appends to it.
Applied when this send creates/ensures the session.
Omit to create a new session.
True when `idempotency_key` matched an earlier send.
True when folded into an in-flight turn (steering).
Spawn a sub-agent in a child session; the model-facing pending trigger.
Intersected with the parent policy — narrow, never escalate.
Fan-out guard for the child's own spawns.
Capped at the parent's remaining turn budget.
The child's deliverable: text / json / json+schema.
Parent-side wait guard for this child.
How `system_prompt` combines with the built-in prompt: `override` replaces it; `enrich` (default) appends to it.
Spawn into an existing session (e.g. a fork); default: create fresh.
The child's goal — its opening user message.
Read the current turn status for a session.
The coarse, harness-internal turn lifecycle (harness.md § API Reference). Finer-grained than the session's `status`, which the loop derives from it.
Request cancellation of an in-flight turn (cascades to spawned children).
Omit to stop the current turn.
Internal cron sweep: resolve pending function calls past their timeout so a parked turn never wedges. Not called directly.
Number of expired pending calls resolved this sweep.
Internal durable loop step (enqueued onto the default queue); not called directly.
True when a redelivered/stale step was acked and dropped.
The coarse, harness-internal turn lifecycle (harness.md § API Reference). Finer-grained than the session's `status`, which the loop derives from it.
Synchronous hook: after the final assistant message update. Observe only.
pre/post_trigger only: target function_id globs to consult on.
Failure policy (default fail_closed for pre_*, fail_open for post_*).
Chain order: ascending, ties broken by function_id (default 0).
Per-invocation timeout (default 5000ms).
Synchronous hook: after the target returns, before the result is appended. May rewrite content/details/is_error.
pre/post_trigger only: target function_id globs to consult on.
Failure policy (default fail_closed for pre_*, fail_open for post_*).
Chain order: ascending, ties broken by function_id (default 0).
Per-invocation timeout (default 5000ms).
Synchronous hook: after context assembly, before generation. May extend the system prompt, append messages, or veto.
pre/post_trigger only: target function_id globs to consult on.
Failure policy (default fail_closed for pre_*, fail_open for post_*).
Chain order: ascending, ties broken by function_id (default 0).
Per-invocation timeout (default 5000ms).
Synchronous hook: after the allow/deny policy passes, before the target is invoked. May deny, hold, or rewrite arguments.
pre/post_trigger only: target function_id globs to consult on.
Failure policy (default fail_closed for pre_*, fail_open for post_*).
Chain order: ascending, ties broken by function_id (default 0).
Per-invocation timeout (default 5000ms).
Synchronous hook: first step of a turn, before any model spend. May veto.
pre/post_trigger only: target function_id globs to consult on.
Failure policy (default fail_closed for pre_*, fail_open for post_*).
Chain order: ascending, ties broken by function_id (default 0).
Per-invocation timeout (default 5000ms).
A harness turn reached a terminal status (completed/cancelled/failed).
Only deliver sub-agent events whose parent is this session.
Only deliver events for this session.
A harness turn began executing (first loop step).
Only deliver sub-agent events whose parent is this session.
Only deliver events for this session.