import { type CheckCommand, type ReviewEvidence, type TaskAttempt, type TaskRequest, type WorktreeAllocationIntent, type WorktreeAllocationPlan, type WorkspaceIdentity } from "./schema.ts"; import { type AllocationReconciliation, type CheckRunResult, type GitCleanupKind, type GitRuntime, type InFlightTaskCandidateInspection, type InFlightTaskCandidateInspector, type IntegrationResult, type TaskCandidateInspector, type OperationContext, type RebaseResult, type ReviewResult, type TransientLaunchHandle, type WorktreeAllocationResult, type VerifiedLaunch } from "./runner.ts"; type ProcessResult = { code: number; killed: boolean; stdout: string; stderr: string; }; export interface DirectProcessOptions { cwd: string; signal: AbortSignal; timeoutMs: number; stdin?: string; } export type DirectProcessRunner = (command: string, args: string[], options: DirectProcessOptions) => Promise; export interface ExactReviewPacket { base: string; tip: string; patchPath: string; } export interface ExactReviewExecutorInput { scope: "task" | "final"; taskId?: string; criterion: string; launch: VerifiedLaunch; cwd: string; packet: ExactReviewPacket; } export type ExactReviewExecutor = (input: ExactReviewExecutorInput, context: OperationContext) => Promise<{ verdict: string; }>; export interface CheckedGitRuntimeOptions { runProcess?: DirectProcessRunner; executeReview?: ExactReviewExecutor; } export declare class CheckedGitRuntime implements GitRuntime, TaskCandidateInspector, InFlightTaskCandidateInspector { private readonly execute; private readonly executeReview?; private readonly mainOperationTails; constructor(options?: CheckedGitRuntimeOptions); inspectMain(input: { root: string; }, context: OperationContext): Promise; allocateWorktree(input: { root: string; intent: WorktreeAllocationIntent; task: TaskRequest; attempt: TaskAttempt; onPrepared(worktree: WorktreeAllocationPlan): Promise; }, context: OperationContext): Promise; private allocateWorktreeExclusive; private serializeMainOperation; reconcileWorktreeAllocation(input: { root: string; intent: WorktreeAllocationIntent; task: TaskRequest; attempt: TaskAttempt; }, context: OperationContext): Promise>; runChecks(input: { root: string; scope: "task" | "final"; taskId?: string; attempt?: TaskAttempt; checks: CheckCommand[]; candidate: WorkspaceIdentity; }, context: OperationContext): Promise; review(input: { root: string; scope: "task" | "final"; phase: ReviewEvidence["phase"]; taskId?: string; attempt?: TaskAttempt; criterion: string; base: WorkspaceIdentity; tip: WorkspaceIdentity; acquireLaunch(): Promise>; }, context: OperationContext): Promise; inspectTaskCandidate(input: { root: string; task: TaskRequest; attempt: TaskAttempt; }, context: OperationContext): Promise; inspectInFlightTaskCandidate(input: { root: string; task: TaskRequest; attempt: TaskAttempt; }, context: OperationContext): Promise; inspectRetainedTask(input: { root: string; task: TaskRequest; attempt: TaskAttempt; }, context: OperationContext): Promise; rebase(input: { root: string; task: TaskRequest; attempt: TaskAttempt; candidate: WorkspaceIdentity; sourceBase: WorkspaceIdentity; onto: WorkspaceIdentity; }, context: OperationContext): Promise; reconcileRebase(input: Parameters[0], context: OperationContext): Promise; integrate(input: { root: string; task: TaskRequest; attempt: TaskAttempt; expectedMain: WorkspaceIdentity; candidate: WorkspaceIdentity; checks: import("./schema.ts").CheckBatchEvidence; review?: ReviewEvidence; }, context: OperationContext): Promise; cleanupGit(input: { root: string; kind: GitCleanupKind; task: TaskRequest; attempt: TaskAttempt; }, context: OperationContext): Promise<{ outcome: "completed" | "absent"; } | { outcome: "blocked"; failure: string; }>; private requireScopeIdentity; private requireScopeCurrent; private inspectTask; private requireTaskWorktree; private inspectInFlightWorkspace; private inspectWorkspace; private hasGitlinks; private assertNoGitlinks; private branchExists; private branchTip; private stablePatchIds; private isAncestor; private registeredWorktreePaths; private gitRunner; private git; private requireGit; } export {};