import { Type, type Static } from "typebox"; export declare const RUN_STATE_VERSION = 4; export declare const MAX_TASKS = 8; export declare const MAX_EXECUTE_REQUEST_BYTES: number; export declare const MAX_PERSISTED_RUNTIME_TEXT_BYTES: number; export declare const MAX_POSSIBLE_RESOURCES = 32; export type ModelClass = Static; declare const ModelClassSchema: Type.TUnion<[Type.TLiteral<"fast">, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; export declare const CheckCommandSchema: Type.TObject<{ command: Type.TString; args: Type.TArray; }>; export declare const JudgmentSchema: Type.TObject<{ role: Type.TString; modelClass: Type.TUnion<[Type.TLiteral<"fast">, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; criterion: Type.TString; }>; declare const TextTaskRequestSchema: Type.TObject<{ role: Type.TString; modelClass: Type.TUnion<[Type.TLiteral<"fast">, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; requirements: Type.TString; deliverable: Type.TString; dependsOn: Type.TArray; contextFrom: Type.TArray; id: Type.TString; kind: Type.TLiteral<"text">; }>; declare const ChangesetTaskRequestSchema: Type.TObject<{ role: Type.TString; modelClass: Type.TUnion<[Type.TLiteral<"fast">, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; requirements: Type.TString; deliverable: Type.TString; dependsOn: Type.TArray; contextFrom: Type.TArray; id: Type.TString; kind: Type.TLiteral<"changeset">; checks: Type.TArray; }>>; judgment: Type.TOptional, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; criterion: Type.TString; }>>; }>; export declare const TaskRequestSchema: Type.TUnion<[Type.TObject<{ role: Type.TString; modelClass: Type.TUnion<[Type.TLiteral<"fast">, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; requirements: Type.TString; deliverable: Type.TString; dependsOn: Type.TArray; contextFrom: Type.TArray; id: Type.TString; kind: Type.TLiteral<"text">; }>, Type.TObject<{ role: Type.TString; modelClass: Type.TUnion<[Type.TLiteral<"fast">, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; requirements: Type.TString; deliverable: Type.TString; dependsOn: Type.TArray; contextFrom: Type.TArray; id: Type.TString; kind: Type.TLiteral<"changeset">; checks: Type.TArray; }>>; judgment: Type.TOptional, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; criterion: Type.TString; }>>; }>]>; export declare const ExecuteRequestSchema: Type.TObject<{ id: Type.TString; goal: Type.TString; budgetMs: Type.TInteger; tasks: Type.TArray, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; requirements: Type.TString; deliverable: Type.TString; dependsOn: Type.TArray; contextFrom: Type.TArray; id: Type.TString; kind: Type.TLiteral<"text">; }>, Type.TObject<{ role: Type.TString; modelClass: Type.TUnion<[Type.TLiteral<"fast">, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; requirements: Type.TString; deliverable: Type.TString; dependsOn: Type.TArray; contextFrom: Type.TArray; id: Type.TString; kind: Type.TLiteral<"changeset">; checks: Type.TArray; }>>; judgment: Type.TOptional, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; criterion: Type.TString; }>>; }>]>>; finalChecks: Type.TArray; }>>; finalJudgment: Type.TOptional, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; criterion: Type.TString; }>>; }>; export declare const IdOnlySchema: Type.TObject<{ id: Type.TString; }>; export declare const ResumeRequestSchema: Type.TUnion<[Type.TObject<{ id: Type.TString; action: Type.TLiteral<"retry">; taskId: Type.TString; }>, Type.TObject<{ id: Type.TString; action: Type.TLiteral<"verify">; taskId: Type.TString; }>, Type.TObject<{ id: Type.TString; action: Type.TLiteral<"finalize">; }>]>; export type IdOnly = Static; export type CheckCommand = Static; export type Judgment = Static; export type TextTaskRequest = Static; export type ChangesetTaskRequest = Static; export type TaskRequest = Static; export type ExecuteRequest = Static; export type ResumeRequest = Static; export type WorkspaceIdentity = Static; declare const WorktreeRecordSchema: Type.TObject<{ path: Type.TString; cwd: Type.TString; branch: Type.TString; repoRoot: Type.TString; baseCommit: Type.TString; }>; declare const WorktreeAllocationIntentSchema: Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"worktree">; worktree: Type.TOptional>; }>; declare const WorkspaceAllocationIntentSchema: Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"workspace">; label: Type.TString; worktreeCwd: Type.TString; mainRoot: Type.TString; repoKey: Type.TString; herdrRepoRoot: Type.TString; workspaceId: Type.TOptional; rootTabId: Type.TOptional; rootPaneId: Type.TOptional; }>; declare const WorkerTabAllocationIntentSchema: Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"worker_tab">; label: Type.TString; workspaceId: Type.TString; workspaceRootTabId: Type.TString; workspaceRootPaneId: Type.TString; worktreeCwd: Type.TString; leasePath: Type.TString; tabId: Type.TOptional; paneId: Type.TOptional; }>; declare const AgentAllocationIntentSchema: Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"agent">; agentName: Type.TString; workspaceId: Type.TString; tabId: Type.TString; paneId: Type.TString; worktreeCwd: Type.TString; leasePath: Type.TString; }>; export declare const AllocationIntentSchema: Type.TUnion<[Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"worktree">; worktree: Type.TOptional>; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"workspace">; label: Type.TString; worktreeCwd: Type.TString; mainRoot: Type.TString; repoKey: Type.TString; herdrRepoRoot: Type.TString; workspaceId: Type.TOptional; rootTabId: Type.TOptional; rootPaneId: Type.TOptional; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"worker_tab">; label: Type.TString; workspaceId: Type.TString; workspaceRootTabId: Type.TString; workspaceRootPaneId: Type.TString; worktreeCwd: Type.TString; leasePath: Type.TString; tabId: Type.TOptional; paneId: Type.TOptional; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"agent">; agentName: Type.TString; workspaceId: Type.TString; tabId: Type.TString; paneId: Type.TString; worktreeCwd: Type.TString; leasePath: Type.TString; }>]>; export type WorktreeRecord = Static; export type WorktreeAllocationIntent = Static; export type WorkspaceAllocationIntent = Static; export type WorkerTabAllocationIntent = Static; export type AgentAllocationIntent = Static; export type AllocationIntent = Static; export type AllocationKind = AllocationIntent["kind"]; export type WorktreeAllocationPlan = WorktreeRecord; export type WorkspaceAllocationPlan = Pick; export type WorkerTabAllocationPlan = Pick; export type AgentAllocationPlan = Pick; export type HostAllocationIntent = WorkspaceAllocationIntent | WorkerTabAllocationIntent | AgentAllocationIntent; export type HostAllocationPlan = WorkspaceAllocationPlan | WorkerTabAllocationPlan | AgentAllocationPlan; export type PromptRecord = Static; export type CommandEvidence = Static; export type CheckBatchEvidence = Static; export type ReviewEvidence = Static; export type RebaseTransition = Static; export type WorkerTermination = Static; export declare const CLEANUP_KINDS: readonly ["worker_tab", "workspace", "worktree", "branch"]; export type CleanupStep = Static; export type CleanupKind = CleanupStep["kind"]; export type ChangesetTaskAttempt = Static; export type TaskAttempt = ChangesetTaskAttempt; export type TextTaskAttempt = Static; export type ChangesetTaskState = Static; export type TextTaskState = Static; export type TaskState = Static; export type WaveState = Static; export type RunState = Static; declare const WorkspaceSchema: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; declare const PromptRecordSchema: Type.TObject<{ kind: Type.TUnion<[Type.TLiteral<"initial">, Type.TLiteral<"correction">, Type.TLiteral<"followup">]>; status: Type.TUnion<[Type.TLiteral<"submitting">, Type.TLiteral<"not_sent">, Type.TLiteral<"settled">, Type.TLiteral<"ambiguous">]>; preCandidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; candidate: Type.TOptional>; instruction: Type.TOptional; failure: Type.TOptional; at: Type.TInteger; }>; declare const CommandEvidenceSchema: Type.TObject<{ command: Type.TString; args: Type.TArray; code: Type.TInteger; killed: Type.TBoolean; stdout: Type.TString; stderr: Type.TString; }>; declare const CheckBatchEvidenceSchema: Type.TObject<{ phase: Type.TUnion<[Type.TLiteral<"preliminary">, Type.TLiteral<"authoritative">, Type.TLiteral<"final">]>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; results: Type.TArray; code: Type.TInteger; killed: Type.TBoolean; stdout: Type.TString; stderr: Type.TString; }>>; passed: Type.TBoolean; at: Type.TInteger; }>; declare const ReviewEvidenceSchema: Type.TObject<{ phase: Type.TUnion<[Type.TLiteral<"authoritative">, Type.TLiteral<"final">]>; criterion: Type.TString; base: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; tip: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; verdict: Type.TString; passed: Type.TBoolean; at: Type.TInteger; }>; declare const WorkerTerminationSchema: Type.TObject<{ status: Type.TUnion<[Type.TLiteral<"terminating">, Type.TLiteral<"terminated">, Type.TLiteral<"unknown">]>; workerId: Type.TString; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; at: Type.TOptional; failure: Type.TOptional; }>; declare const RebaseTransitionSchema: Type.TObject<{ kind: Type.TLiteral<"rebase">; status: Type.TUnion<[Type.TLiteral<"rebasing">, Type.TLiteral<"rebased">, Type.TLiteral<"unknown">]>; sourceBase: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; from: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; onto: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; to: Type.TOptional>; at: Type.TInteger; failure: Type.TOptional; }>; declare const CleanupStepSchema: Type.TObject<{ kind: Type.TUnion<[Type.TLiteral<"worker_tab">, Type.TLiteral<"workspace">, Type.TLiteral<"worktree">, Type.TLiteral<"branch">]>; status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"running">, Type.TLiteral<"completed">]>; failure: Type.TOptional; }>; declare const TaskAttemptSchema: Type.TObject<{ number: Type.TInteger; waveNumber: Type.TInteger; waveBase: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; correlationToken: Type.TString; allocationGeneration: Type.TInteger; allocations: Type.TArray, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"worktree">; worktree: Type.TOptional>; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"workspace">; label: Type.TString; worktreeCwd: Type.TString; mainRoot: Type.TString; repoKey: Type.TString; herdrRepoRoot: Type.TString; workspaceId: Type.TOptional; rootTabId: Type.TOptional; rootPaneId: Type.TOptional; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"worker_tab">; label: Type.TString; workspaceId: Type.TString; workspaceRootTabId: Type.TString; workspaceRootPaneId: Type.TString; worktreeCwd: Type.TString; leasePath: Type.TString; tabId: Type.TOptional; paneId: Type.TOptional; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"agent">; agentName: Type.TString; workspaceId: Type.TString; tabId: Type.TString; paneId: Type.TString; worktreeCwd: Type.TString; leasePath: Type.TString; }>]>>; prompts: Type.TArray, Type.TLiteral<"correction">, Type.TLiteral<"followup">]>; status: Type.TUnion<[Type.TLiteral<"submitting">, Type.TLiteral<"not_sent">, Type.TLiteral<"settled">, Type.TLiteral<"ambiguous">]>; preCandidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; candidate: Type.TOptional>; instruction: Type.TOptional; failure: Type.TOptional; at: Type.TInteger; }>>; candidate: Type.TOptional>; candidateBase: Type.TOptional>; preliminaryChecks: Type.TOptional, Type.TLiteral<"authoritative">, Type.TLiteral<"final">]>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; results: Type.TArray; code: Type.TInteger; killed: Type.TBoolean; stdout: Type.TString; stderr: Type.TString; }>>; passed: Type.TBoolean; at: Type.TInteger; }>>; readiness: Type.TOptional; base: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; at: Type.TInteger; }>>; transitions: Type.TArray; status: Type.TUnion<[Type.TLiteral<"rebasing">, Type.TLiteral<"rebased">, Type.TLiteral<"unknown">]>; sourceBase: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; from: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; onto: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; to: Type.TOptional>; at: Type.TInteger; failure: Type.TOptional; }>>; termination: Type.TOptional, Type.TLiteral<"terminated">, Type.TLiteral<"unknown">]>; workerId: Type.TString; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; at: Type.TOptional; failure: Type.TOptional; }>>; integrationBase: Type.TOptional>; integrationCandidate: Type.TOptional>; authoritativeChecks: Type.TOptional, Type.TLiteral<"authoritative">, Type.TLiteral<"final">]>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; results: Type.TArray; code: Type.TInteger; killed: Type.TBoolean; stdout: Type.TString; stderr: Type.TString; }>>; passed: Type.TBoolean; at: Type.TInteger; }>>; authoritativeReview: Type.TOptional, Type.TLiteral<"final">]>; criterion: Type.TString; base: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; tip: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; verdict: Type.TString; passed: Type.TBoolean; at: Type.TInteger; }>>; integration: Type.TOptional, Type.TLiteral<"integrated">, Type.TLiteral<"failed">, Type.TLiteral<"unknown">]>; expectedMain: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; mainAfter: Type.TOptional>; failure: Type.TOptional; }>>; cleanup: Type.TArray, Type.TLiteral<"workspace">, Type.TLiteral<"worktree">, Type.TLiteral<"branch">]>; status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"running">, Type.TLiteral<"completed">]>; failure: Type.TOptional; }>>; }>; declare const ChangesetTaskStateSchema: Type.TObject<{ taskId: Type.TString; kind: Type.TLiteral<"changeset">; status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"allocating">, Type.TLiteral<"working">, Type.TLiteral<"ready_to_integrate">, Type.TLiteral<"integrating">, Type.TLiteral<"cleanup">, Type.TLiteral<"completed">, Type.TLiteral<"needs_attention">]>; attempts: Type.TArray; correlationToken: Type.TString; allocationGeneration: Type.TInteger; allocations: Type.TArray, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"worktree">; worktree: Type.TOptional>; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"workspace">; label: Type.TString; worktreeCwd: Type.TString; mainRoot: Type.TString; repoKey: Type.TString; herdrRepoRoot: Type.TString; workspaceId: Type.TOptional; rootTabId: Type.TOptional; rootPaneId: Type.TOptional; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"worker_tab">; label: Type.TString; workspaceId: Type.TString; workspaceRootTabId: Type.TString; workspaceRootPaneId: Type.TString; worktreeCwd: Type.TString; leasePath: Type.TString; tabId: Type.TOptional; paneId: Type.TOptional; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"agent">; agentName: Type.TString; workspaceId: Type.TString; tabId: Type.TString; paneId: Type.TString; worktreeCwd: Type.TString; leasePath: Type.TString; }>]>>; prompts: Type.TArray, Type.TLiteral<"correction">, Type.TLiteral<"followup">]>; status: Type.TUnion<[Type.TLiteral<"submitting">, Type.TLiteral<"not_sent">, Type.TLiteral<"settled">, Type.TLiteral<"ambiguous">]>; preCandidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; candidate: Type.TOptional>; instruction: Type.TOptional; failure: Type.TOptional; at: Type.TInteger; }>>; candidate: Type.TOptional>; candidateBase: Type.TOptional>; preliminaryChecks: Type.TOptional, Type.TLiteral<"authoritative">, Type.TLiteral<"final">]>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; results: Type.TArray; code: Type.TInteger; killed: Type.TBoolean; stdout: Type.TString; stderr: Type.TString; }>>; passed: Type.TBoolean; at: Type.TInteger; }>>; readiness: Type.TOptional; base: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; at: Type.TInteger; }>>; transitions: Type.TArray; status: Type.TUnion<[Type.TLiteral<"rebasing">, Type.TLiteral<"rebased">, Type.TLiteral<"unknown">]>; sourceBase: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; from: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; onto: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; to: Type.TOptional>; at: Type.TInteger; failure: Type.TOptional; }>>; termination: Type.TOptional, Type.TLiteral<"terminated">, Type.TLiteral<"unknown">]>; workerId: Type.TString; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; at: Type.TOptional; failure: Type.TOptional; }>>; integrationBase: Type.TOptional>; integrationCandidate: Type.TOptional>; authoritativeChecks: Type.TOptional, Type.TLiteral<"authoritative">, Type.TLiteral<"final">]>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; results: Type.TArray; code: Type.TInteger; killed: Type.TBoolean; stdout: Type.TString; stderr: Type.TString; }>>; passed: Type.TBoolean; at: Type.TInteger; }>>; authoritativeReview: Type.TOptional, Type.TLiteral<"final">]>; criterion: Type.TString; base: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; tip: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; verdict: Type.TString; passed: Type.TBoolean; at: Type.TInteger; }>>; integration: Type.TOptional, Type.TLiteral<"integrated">, Type.TLiteral<"failed">, Type.TLiteral<"unknown">]>; expectedMain: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; mainAfter: Type.TOptional>; failure: Type.TOptional; }>>; cleanup: Type.TArray, Type.TLiteral<"workspace">, Type.TLiteral<"worktree">, Type.TLiteral<"branch">]>; status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"running">, Type.TLiteral<"completed">]>; failure: Type.TOptional; }>>; }>>; failure: Type.TOptional; }>; declare const TextTaskAttemptSchema: Type.TObject<{ number: Type.TInteger; status: Type.TUnion<[Type.TLiteral<"running">, Type.TLiteral<"completed">, Type.TLiteral<"failed">]>; failure: Type.TOptional; output: Type.TOptional>; }>; declare const TextTaskStateSchema: Type.TObject<{ taskId: Type.TString; kind: Type.TLiteral<"text">; status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"running">, Type.TLiteral<"completed">, Type.TLiteral<"needs_attention">]>; attempts: Type.TArray, Type.TLiteral<"completed">, Type.TLiteral<"failed">]>; failure: Type.TOptional; output: Type.TOptional>; }>>; failure: Type.TOptional; }>; declare const TaskStateSchema: Type.TUnion<[Type.TObject<{ taskId: Type.TString; kind: Type.TLiteral<"text">; status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"running">, Type.TLiteral<"completed">, Type.TLiteral<"needs_attention">]>; attempts: Type.TArray, Type.TLiteral<"completed">, Type.TLiteral<"failed">]>; failure: Type.TOptional; output: Type.TOptional>; }>>; failure: Type.TOptional; }>, Type.TObject<{ taskId: Type.TString; kind: Type.TLiteral<"changeset">; status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"allocating">, Type.TLiteral<"working">, Type.TLiteral<"ready_to_integrate">, Type.TLiteral<"integrating">, Type.TLiteral<"cleanup">, Type.TLiteral<"completed">, Type.TLiteral<"needs_attention">]>; attempts: Type.TArray; correlationToken: Type.TString; allocationGeneration: Type.TInteger; allocations: Type.TArray, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"worktree">; worktree: Type.TOptional>; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"workspace">; label: Type.TString; worktreeCwd: Type.TString; mainRoot: Type.TString; repoKey: Type.TString; herdrRepoRoot: Type.TString; workspaceId: Type.TOptional; rootTabId: Type.TOptional; rootPaneId: Type.TOptional; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"worker_tab">; label: Type.TString; workspaceId: Type.TString; workspaceRootTabId: Type.TString; workspaceRootPaneId: Type.TString; worktreeCwd: Type.TString; leasePath: Type.TString; tabId: Type.TOptional; paneId: Type.TOptional; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"agent">; agentName: Type.TString; workspaceId: Type.TString; tabId: Type.TString; paneId: Type.TString; worktreeCwd: Type.TString; leasePath: Type.TString; }>]>>; prompts: Type.TArray, Type.TLiteral<"correction">, Type.TLiteral<"followup">]>; status: Type.TUnion<[Type.TLiteral<"submitting">, Type.TLiteral<"not_sent">, Type.TLiteral<"settled">, Type.TLiteral<"ambiguous">]>; preCandidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; candidate: Type.TOptional>; instruction: Type.TOptional; failure: Type.TOptional; at: Type.TInteger; }>>; candidate: Type.TOptional>; candidateBase: Type.TOptional>; preliminaryChecks: Type.TOptional, Type.TLiteral<"authoritative">, Type.TLiteral<"final">]>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; results: Type.TArray; code: Type.TInteger; killed: Type.TBoolean; stdout: Type.TString; stderr: Type.TString; }>>; passed: Type.TBoolean; at: Type.TInteger; }>>; readiness: Type.TOptional; base: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; at: Type.TInteger; }>>; transitions: Type.TArray; status: Type.TUnion<[Type.TLiteral<"rebasing">, Type.TLiteral<"rebased">, Type.TLiteral<"unknown">]>; sourceBase: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; from: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; onto: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; to: Type.TOptional>; at: Type.TInteger; failure: Type.TOptional; }>>; termination: Type.TOptional, Type.TLiteral<"terminated">, Type.TLiteral<"unknown">]>; workerId: Type.TString; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; at: Type.TOptional; failure: Type.TOptional; }>>; integrationBase: Type.TOptional>; integrationCandidate: Type.TOptional>; authoritativeChecks: Type.TOptional, Type.TLiteral<"authoritative">, Type.TLiteral<"final">]>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; results: Type.TArray; code: Type.TInteger; killed: Type.TBoolean; stdout: Type.TString; stderr: Type.TString; }>>; passed: Type.TBoolean; at: Type.TInteger; }>>; authoritativeReview: Type.TOptional, Type.TLiteral<"final">]>; criterion: Type.TString; base: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; tip: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; verdict: Type.TString; passed: Type.TBoolean; at: Type.TInteger; }>>; integration: Type.TOptional, Type.TLiteral<"integrated">, Type.TLiteral<"failed">, Type.TLiteral<"unknown">]>; expectedMain: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; mainAfter: Type.TOptional>; failure: Type.TOptional; }>>; cleanup: Type.TArray, Type.TLiteral<"workspace">, Type.TLiteral<"worktree">, Type.TLiteral<"branch">]>; status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"running">, Type.TLiteral<"completed">]>; failure: Type.TOptional; }>>; }>>; failure: Type.TOptional; }>]>; declare const WaveStateSchema: Type.TObject<{ number: Type.TInteger; base: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; taskIds: Type.TArray; status: Type.TUnion<[Type.TLiteral<"dispatching">, Type.TLiteral<"integrating">, Type.TLiteral<"completed">, Type.TLiteral<"needs_attention">]>; }>; declare const RunStateSchema: Type.TObject<{ version: Type.TLiteral<4>; request: Type.TObject<{ id: Type.TString; goal: Type.TString; budgetMs: Type.TInteger; tasks: Type.TArray, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; requirements: Type.TString; deliverable: Type.TString; dependsOn: Type.TArray; contextFrom: Type.TArray; id: Type.TString; kind: Type.TLiteral<"text">; }>, Type.TObject<{ role: Type.TString; modelClass: Type.TUnion<[Type.TLiteral<"fast">, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; requirements: Type.TString; deliverable: Type.TString; dependsOn: Type.TArray; contextFrom: Type.TArray; id: Type.TString; kind: Type.TLiteral<"changeset">; checks: Type.TArray; }>>; judgment: Type.TOptional, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; criterion: Type.TString; }>>; }>]>>; finalChecks: Type.TArray; }>>; finalJudgment: Type.TOptional, Type.TLiteral<"balanced">, Type.TLiteral<"frontier">, Type.TLiteral<"fav">]>; criterion: Type.TString; }>>; }>; root: Type.TString; requestStartMain: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; main: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; deadlineStartedAt: Type.TInteger; deadline: Type.TInteger; status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"running">, Type.TLiteral<"needs_attention">, Type.TLiteral<"completed">, Type.TLiteral<"final_failed">, Type.TLiteral<"superseded">, Type.TLiteral<"aborted">]>; tasks: Type.TArray; status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"running">, Type.TLiteral<"completed">, Type.TLiteral<"needs_attention">]>; attempts: Type.TArray, Type.TLiteral<"completed">, Type.TLiteral<"failed">]>; failure: Type.TOptional; output: Type.TOptional>; }>>; failure: Type.TOptional; }>, Type.TObject<{ taskId: Type.TString; kind: Type.TLiteral<"changeset">; status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"allocating">, Type.TLiteral<"working">, Type.TLiteral<"ready_to_integrate">, Type.TLiteral<"integrating">, Type.TLiteral<"cleanup">, Type.TLiteral<"completed">, Type.TLiteral<"needs_attention">]>; attempts: Type.TArray; correlationToken: Type.TString; allocationGeneration: Type.TInteger; allocations: Type.TArray, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"worktree">; worktree: Type.TOptional>; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"workspace">; label: Type.TString; worktreeCwd: Type.TString; mainRoot: Type.TString; repoKey: Type.TString; herdrRepoRoot: Type.TString; workspaceId: Type.TOptional; rootTabId: Type.TOptional; rootPaneId: Type.TOptional; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"worker_tab">; label: Type.TString; workspaceId: Type.TString; workspaceRootTabId: Type.TString; workspaceRootPaneId: Type.TString; worktreeCwd: Type.TString; leasePath: Type.TString; tabId: Type.TOptional; paneId: Type.TOptional; }>, Type.TObject<{ generation: Type.TInteger; token: Type.TString; status: Type.TUnion<[Type.TLiteral<"allocating">, Type.TLiteral<"owned">, Type.TLiteral<"absent">, Type.TLiteral<"unknown">]>; possibleResources: Type.TOptional>; failure: Type.TOptional; kind: Type.TLiteral<"agent">; agentName: Type.TString; workspaceId: Type.TString; tabId: Type.TString; paneId: Type.TString; worktreeCwd: Type.TString; leasePath: Type.TString; }>]>>; prompts: Type.TArray, Type.TLiteral<"correction">, Type.TLiteral<"followup">]>; status: Type.TUnion<[Type.TLiteral<"submitting">, Type.TLiteral<"not_sent">, Type.TLiteral<"settled">, Type.TLiteral<"ambiguous">]>; preCandidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; candidate: Type.TOptional>; instruction: Type.TOptional; failure: Type.TOptional; at: Type.TInteger; }>>; candidate: Type.TOptional>; candidateBase: Type.TOptional>; preliminaryChecks: Type.TOptional, Type.TLiteral<"authoritative">, Type.TLiteral<"final">]>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; results: Type.TArray; code: Type.TInteger; killed: Type.TBoolean; stdout: Type.TString; stderr: Type.TString; }>>; passed: Type.TBoolean; at: Type.TInteger; }>>; readiness: Type.TOptional; base: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; at: Type.TInteger; }>>; transitions: Type.TArray; status: Type.TUnion<[Type.TLiteral<"rebasing">, Type.TLiteral<"rebased">, Type.TLiteral<"unknown">]>; sourceBase: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; from: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; onto: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; to: Type.TOptional>; at: Type.TInteger; failure: Type.TOptional; }>>; termination: Type.TOptional, Type.TLiteral<"terminated">, Type.TLiteral<"unknown">]>; workerId: Type.TString; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; at: Type.TOptional; failure: Type.TOptional; }>>; integrationBase: Type.TOptional>; integrationCandidate: Type.TOptional>; authoritativeChecks: Type.TOptional, Type.TLiteral<"authoritative">, Type.TLiteral<"final">]>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; results: Type.TArray; code: Type.TInteger; killed: Type.TBoolean; stdout: Type.TString; stderr: Type.TString; }>>; passed: Type.TBoolean; at: Type.TInteger; }>>; authoritativeReview: Type.TOptional, Type.TLiteral<"final">]>; criterion: Type.TString; base: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; tip: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; verdict: Type.TString; passed: Type.TBoolean; at: Type.TInteger; }>>; integration: Type.TOptional, Type.TLiteral<"integrated">, Type.TLiteral<"failed">, Type.TLiteral<"unknown">]>; expectedMain: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; mainAfter: Type.TOptional>; failure: Type.TOptional; }>>; cleanup: Type.TArray, Type.TLiteral<"workspace">, Type.TLiteral<"worktree">, Type.TLiteral<"branch">]>; status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"running">, Type.TLiteral<"completed">]>; failure: Type.TOptional; }>>; }>>; failure: Type.TOptional; }>]>>; waves: Type.TArray; taskIds: Type.TArray; status: Type.TUnion<[Type.TLiteral<"dispatching">, Type.TLiteral<"integrating">, Type.TLiteral<"completed">, Type.TLiteral<"needs_attention">]>; }>>; final: Type.TObject<{ status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"running">, Type.TLiteral<"interrupted">, Type.TLiteral<"passed">, Type.TLiteral<"final_failed">, Type.TLiteral<"superseded">]>; identity: Type.TOptional>; checks: Type.TOptional, Type.TLiteral<"authoritative">, Type.TLiteral<"final">]>; candidate: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; results: Type.TArray; code: Type.TInteger; killed: Type.TBoolean; stdout: Type.TString; stderr: Type.TString; }>>; passed: Type.TBoolean; at: Type.TInteger; }>>; review: Type.TOptional, Type.TLiteral<"final">]>; criterion: Type.TString; base: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; tip: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; identityAfter: Type.TObject<{ branch: Type.TString; head: Type.TString; index: Type.TString; tree: Type.TString; }>; verdict: Type.TString; passed: Type.TBoolean; at: Type.TInteger; }>>; failure: Type.TOptional; }>; recovery: Type.TOptional; action: Type.TUnion<[Type.TLiteral<"retry">, Type.TLiteral<"verify">, Type.TLiteral<"finalize">]>; taskId: Type.TOptional; deadline: Type.TInteger; }>>; accepted: Type.TBoolean; acceptedAt: Type.TOptional; createdAt: Type.TInteger; updatedAt: Type.TInteger; }>; export declare function taskDependencies(task: TaskRequest): string[]; export declare function validateGraph(tasks: readonly TaskRequest[]): void; export declare function parseExecuteRequest(value: unknown): ExecuteRequest; export declare function parseIdOnly(value: unknown): IdOnly; export declare function parseResumeRequest(value: unknown): ResumeRequest; export declare function sameIdentity(left: WorkspaceIdentity, right: WorkspaceIdentity): boolean; export declare function isCleanCommitted(identity: WorkspaceIdentity): boolean; export declare function checkBatchPasses(evidence: CheckBatchEvidence | undefined, checks: readonly CheckCommand[], candidate: WorkspaceIdentity): boolean; export declare function reviewEvidencePasses(evidence: ReviewEvidence | undefined, phase: ReviewEvidence["phase"], criterion: string, base: WorkspaceIdentity, tip: WorkspaceIdentity): boolean; export declare function parseRunState(value: unknown): RunState; export {};