Runtime API#

这些 API 面向运行时集成和维护。普通任务作者通常不需要直接调用。

run_workspace_task_attempt(task, input_data, ...)

Run one workspace task attempt.

run_workspace_free_task_attempt(task, input_data)

Run one workspace-free task attempt.

invoke_workspace_task_body(task, input_data, ...)

Invoke a workspace task body against a prepared local workspace.

invoke_workspace_free_task(task, input_data)

Invoke a workspace-free task and validate its output wrapper.

build_workspace_task_output(task, ...)

Validate and wrap a completed workspace task output.

build_workspace_free_task_output(task, ...)

Validate and wrap a workspace-free task result.

StagedWorkspace(branch, commit)

Workspace staging reference returned before publication.

WorkerRuntime(worker_id, log_file, ...)

Prepared identity and logging state for one worker process.

prepare_worker_runtime(*, config, ...)

Prepare local runtime state for one worker process.

WorkerChildSpec(slot, env)

Supervisor launch specification for one worker child slot.

worker_child_specs(*, base_env, ...)

Build stable worker child specifications for a supervisor run.

restart_backoff_seconds(restart_count)

Return the supervisor restart delay for a child process.

assert_current_attempt_snapshot(task, fresh)

Assert that a fresh Conductor task still represents the same attempt.