import { type AgentBindingContract, type ApprovalRequestContract, type ApprovalResolutionContract, type AttemptCheckpoint, type AttemptLease, type ExecutionGrant, type ObjectiveContract, type ObjectiveStatus, type OrchestrationEvent, type WorkerResultContract } from "./contracts.ts"; import { type ApprovalRuntimeState, type AttemptDispatchReadiness, type AttemptRuntimeState, type TaskRuntimeProjection, type TaskRuntimeState } from "./task-runtime-state.ts"; export type ObjectiveCompletionPolicy = "task_evidence" | "owner_evidence" | "owner_override"; export declare function assertObjectiveStatusTransition(state: TaskRuntimeProjection, objectiveId: string, target: ObjectiveStatus, completionPolicy?: ObjectiveCompletionPolicy): void; /** One authoritative guard shared by command admission and durable event replay. */ export declare function assertAgentRetirementEligible(state: TaskRuntimeProjection, agentId: string): AgentBindingContract; export declare function assertAgentNotRetired(agent: AgentBindingContract, transition: string): void; export declare function attemptDispatchReadiness(state: TaskRuntimeProjection, attempt: AttemptRuntimeState): AttemptDispatchReadiness; export declare function activeTaskAttempt(state: TaskRuntimeProjection, task: TaskRuntimeState): AttemptRuntimeState | undefined; export declare function assertTaskAttemptBudgetForState(task: TaskRuntimeState, objective: ObjectiveContract): void; export declare function requireActiveObjectiveForAttemptInProjection(state: TaskRuntimeProjection, attempt: AttemptRuntimeState): ObjectiveContract; export declare function assertRetryBackoffElapsedAt(attempt: AttemptRuntimeState, atMs: number): void; export declare function assertAttemptFinishTransition(state: TaskRuntimeProjection, aggregateId: string, result: WorkerResultContract, occurredAt: string): { attempt: AttemptRuntimeState; task: TaskRuntimeState; }; export declare function assertAttemptGrantTransition(state: TaskRuntimeProjection, aggregateId: string, attemptId: string, grant: ExecutionGrant): AttemptRuntimeState; export declare function assertAttemptLeaseTransition(state: TaskRuntimeProjection, aggregateId: string, lease: AttemptLease, agentId: string | undefined, occurredAt: string): AttemptRuntimeState; export declare function assertAttemptStartTransition(state: TaskRuntimeProjection, aggregateId: string, attemptId: string, leaseId: string, fencingToken: number, occurredAt: string): AttemptRuntimeState; export declare function assertAttemptLeaseRenewalTransition(state: TaskRuntimeProjection, aggregateId: string, attemptId: string, leaseId: string, fencingToken: number, expiresAt: string, occurredAt: string): AttemptRuntimeState; export declare function assertAttemptCheckpointTransition(state: TaskRuntimeProjection, aggregateId: string, checkpoint: AttemptCheckpoint, leaseId: string, occurredAt: string): AttemptRuntimeState; export declare function assertApprovalRequestTransition(state: TaskRuntimeProjection, aggregateId: string, approval: ApprovalRequestContract): void; export declare function assertApprovalResolutionTransition(state: TaskRuntimeProjection, aggregateId: string, resolution: ApprovalResolutionContract): ApprovalRuntimeState; export declare function assertNotificationTarget(state: TaskRuntimeProjection, objectiveId: string, attemptId: string | undefined): void; export interface VerificationTransitionInput { taskId: string; verifierTaskId: string; verifierAttemptId: string; verdict: "accepted" | "rejected" | "inconclusive"; reasonCode: string; } export declare function assertTaskFailureTransition(state: TaskRuntimeProjection, aggregateId: string, taskId: string, reasonCode: string): TaskRuntimeState; export declare function assertVerificationTransition(state: TaskRuntimeProjection, aggregateId: string, args: VerificationTransitionInput): { subject: TaskRuntimeState; verifierAttempt: AttemptRuntimeState; }; export declare function reduceOrchestrationEvent(projection: TaskRuntimeProjection, event: OrchestrationEvent): TaskRuntimeProjection; export declare function projectOrchestrationEvents(events: readonly OrchestrationEvent[]): TaskRuntimeProjection; //# sourceMappingURL=task-runtime-reducer.d.ts.map