Skip to main content

Module session_task

Module session_task 

Source

Structs§

CreateSessionTask
Input for creating a task.
NewTaskMessage
Input for recording a task message.
RegistryTaskSink
TaskSink backed by a SessionTaskRegistry. Output deltas are dropped here; kinds with live output keep their existing streaming path.
SessionTask
A unit of background work owned by a session.
SessionTaskFilter
Optional filter for listing tasks.
SessionTaskUpdate
Partial update applied through apply_task_update. None = unchanged.
TaskArtifact
Typed link to something the task produced.
TaskError
Terminal error detail. Timeout/rejection/orphaned are kinds, not states.
TaskExecutorPlugin
Inventory plugin so capabilities register executors without core knowing about them (same pattern as SessionSandboxProviderPlugin).
TaskInputRequest
Structured ask posted by a task that needs input to continue.
TaskLinks
Cross-references owned by a task.
TaskMessage
A message exchanged between a session and one of its tasks.

Enums§

SessionTaskState
Lifecycle state of a session task.
TaskMessageDirection
Direction of a task message. Inbound = session → task.
TaskMessagePart
One content part of a task message.
TaskWakePolicy
When outbound task activity wakes the owning session’s agent.

Constants§

TASK_KIND_BACKGROUND_TOOL
TASK_KIND_EXTERNAL_AGENT
TASK_KIND_MONITOR
Long-lived monitor task linked to a session schedule. Stays running until the linked schedule is exhausted (one-shot) or cancel_task is called.
TASK_KIND_SUBAGENT
Well-known task kinds. Kind stays a free-form string; these constants cover the built-in executors.

Traits§

SessionTaskRegistry
Session task registry. Implementations emit task.created / task.updated (full snapshots) and task.message.* events on the owning session’s event stream.
TaskExecutor
Control plane for a task kind. The registry/tools call into the executor; the running work pushes into a TaskSink.
TaskSink
Report plane handed to running work. state/progress/request_input mutate the task record (snapshot events fire); post appends to the message channel; output is high-frequency and ephemeral.

Functions§

apply_task_update
Apply a partial update to a task, enforcing lifecycle invariants.
find_task_executor
Find the registered executor for a task kind.
generate_task_id
Generate a new task ID (task_ prefix per specs/id-schema.md).
generate_task_message_id
Generate a new task message ID.
new_session_task
Build a new task from creation input.
task_message_text
Plain-text rendering of message content (for steering/wake messages).
task_result_path
VFS path for a task’s machine result.
task_vfs_dir
VFS directory for a task’s result and logs.

Type Aliases§

TaskProgress
Progress shape shared with background tool execution.