Result models¶
Async Python SDK for submitting and observing Zeroshot runs.
ActiveExecution(*, execution: str, node: str)
dataclass
¶
One graph-visible active execution.
Parameters:
-
execution(str) –Opaque selector accepted by log filtering.
-
node(str) –Executable graph node name.
LogEvent(*, run_id: str, cursor: str, timestamp: int, execution: str | None, level: Literal['debug', 'info', 'error'], target: str, message: str)
dataclass
¶
One safe durable native log record.
Parameters:
-
run_id(str) –Public durable run identity.
-
cursor(str) –Opaque durable log cursor.
-
timestamp(int) –Producer-captured Unix epoch milliseconds, preserved by replay.
-
execution(str | None) –Opaque execution selector, or None for run-wide records.
-
level(Literal['debug', 'info', 'error']) –Native debug, info, or error level.
-
target(str) –Bounded native log target.
-
message(str) –Bounded secret-safe message.
MergePlanRunStatus(*, name: str, run_id: str, state: Literal['blocked', 'materializing', 'queued', 'provisioning', 'running', 'cancelling', 'succeeded', 'failed', 'cancelled', 'expired'], needs: tuple[str, ...], source_revision: str | None, ready_at: str | None, queue_expires_at: str | None, terminal_at: str | None, waiting_reason: str | None, error_code: str | None)
dataclass
¶
Current lifecycle projection for one hosted merge-plan node.
Parameters:
-
name(str) –Stable symbolic node name from the manifest.
-
run_id(str) –Server-assigned public run identity.
-
state(Literal['blocked', 'materializing', 'queued', 'provisioning', 'running', 'cancelling', 'succeeded', 'failed', 'cancelled', 'expired']) –Current materialization or run state.
-
needs(tuple[str, ...]) –Stable symbolic dependency names.
-
source_revision(str | None) –Exact source revision once the node materializes.
-
ready_at(str | None) –RFC 3339 time when source materialization completed and the node became ready.
-
queue_expires_at(str | None) –RFC 3339 per-node queue deadline, set to the earlier of the plan deadline and seven days after readiness.
-
terminal_at(str | None) –RFC 3339 terminal time.
-
waiting_reason(str | None) –Stable explanation while queued or blocked, when supplied.
-
error_code(str | None) –Stable terminal error category, including dependency_failed.
terminal: bool
property
¶
Whether this node can no longer change state.
MergePlanStatus(*, plan_id: str, title: str, state: Literal['queued', 'running', 'succeeded', 'failed', 'cancelled', 'expired'], repository: str, branch: str, submitted_at: str, expires_at: str, runs: tuple[MergePlanRunStatus, ...])
dataclass
¶
Current aggregate projection for an immutable hosted merge plan.
Parameters:
-
plan_id(str) –Server-assigned immutable plan identity.
-
title(str) –Human-readable immutable plan title.
-
state(Literal['queued', 'running', 'succeeded', 'failed', 'cancelled', 'expired']) –Aggregate plan state.
-
repository(str) –Source repository from the submitted manifest, shared by every node.
-
branch(str) –Source branch shared by every node.
-
submitted_at(str) –RFC 3339 admission time.
-
expires_at(str) –RFC 3339 whole-plan deadline.
-
runs(tuple[MergePlanRunStatus, ...]) –Stable server-assigned node receipts and their current states.
ResolvedSource(*, repository: str, branch: str, revision: str)
dataclass
¶
Immutable source snapshot selected for a named run.
Parameters:
-
repository(str) –Native repository identity.
-
branch(str) –Attached source branch.
-
revision(str) –Exact forty-character Git revision.
RunResult(*, run_id: str, succeeded: bool, output: JsonValue = None, failure: str | None = None)
dataclass
¶
Terminal outcome from Client.run(), Run.wait(), or Run.force_stop().
Parameters:
-
run_id(str) –Public durable run identity.
-
succeeded(bool) –Whether the graph completed successfully.
-
output(JsonValue, default:None) –Successful graph output, which may be JSON null.
-
failure(str | None, default:None) –Stable nonempty failure reason when succeeded is false.
raise_for_failure() -> None
¶
Raise RunFailedError for a failed graph result; otherwise return None.
RunStatus(*, run_id: str, title: str, source: ResolvedSource, size: Literal['small', 'medium', 'large'], cursor: str, phase: Literal['admitted', 'running', 'stopping', 'finished'], active_executions: tuple[ActiveExecution, ...] = (), result: RunResult | None = None)
dataclass
¶
Current durable projection for one run.
Parameters:
-
run_id(str) –Public durable run identity.
-
title(str) –Immutable persisted title.
-
source(ResolvedSource) –Immutable resolved source snapshot.
-
size(Literal['small', 'medium', 'large']) –Native run size.
-
cursor(str) –Opaque durable status cursor.
-
phase(Literal['admitted', 'running', 'stopping', 'finished']) –admitted, running, stopping, or finished.
-
active_executions(tuple[ActiveExecution, ...], default:()) –Every currently active graph execution.
-
result(RunResult | None, default:None) –Terminal result only when phase is finished.
RunSummary(*, run_id: str, title: str, source: ResolvedSource, size: Literal['small', 'medium', 'large'], cursor: str, phase: Literal['admitted', 'running', 'stopping', 'finished'], force_stop_requested: bool)
dataclass
¶
Inventory projection returned by Client.list_runs().
Parameters:
-
run_id(str) –Public durable run identity.
-
title(str) –Immutable persisted title.
-
source(ResolvedSource) –Immutable resolved source snapshot.
-
size(Literal['small', 'medium', 'large']) –Native run size.
-
cursor(str) –Opaque durable status cursor.
-
phase(Literal['admitted', 'running', 'stopping', 'finished']) –admitted, running, stopping, or finished.
-
force_stop_requested(bool) –Whether the current projection reflects a force-stop request.