import type { AgentGoal, GoalBudget, GoalCheckpoint, GoalBudgetUpdate, GoalContinuation, GoalContinuationClaim, GoalContinuationKind, GoalEvaluator, GoalEventSink, GoalProgress, GoalRetryPolicy, GoalStatus, GoalStorage, GoalTerminalCandidate, GoalTerminalCandidateRecord, GoalWakeScheduler } from "./domain.js"; /** * Evaluator calls hit a remote model; rate limits and auth refreshes need seconds, not * milliseconds. Waits of 2s, 4s, 8s, 16s, 30s give about a minute of resilience. */ export declare const DEFAULT_EVALUATOR_RETRY_POLICY: GoalRetryPolicy; export declare const EVALUATION_UNAVAILABLE_PREFIX = "Goal evaluation unavailable"; export interface GoalRuntimeOptions { defaultBudget?: GoalBudget; retryPolicy?: GoalRetryPolicy; evaluatorRetryPolicy?: GoalRetryPolicy; eventSink?: GoalEventSink; claimTtlMs?: number; delay?: (milliseconds: number) => Promise; /** @deprecated Every settled run is evaluated. Retained for configuration compatibility. */ evaluationInterval?: number; wakeScheduler?: GoalWakeScheduler; } export declare class GoalRuntime { private readonly storage; private readonly evaluator; private readonly continuation; private readonly now; private readonly evaluatingScopes; private readonly recoveringScopes; private readonly budget; private readonly retryPolicy; private readonly evaluatorRetryPolicy; private readonly eventSink?; private readonly claimTtlMs; private readonly delay; private readonly wakeScheduler; private closed; constructor(storage: GoalStorage, evaluator: GoalEvaluator, continuation: GoalContinuation, now?: () => Date, options?: GoalRuntimeOptions); close(closeStorage?: boolean): void; get(scopeId: string): Promise; listUnfinished(): Promise; getContinuationClaim(scopeId: string): Promise; getTerminalCandidate(scopeId: string): Promise; listCheckpoints(scopeId: string): Promise; create(scopeId: string, objective: string, budget?: GoalBudget, name?: string): Promise; updateBudget(scopeId: string, update: GoalBudgetUpdate): Promise; updateDetails(scopeId: string, update: { name?: string; objective?: string; }): Promise; addCheckpoint(scopeId: string, input: { summary: string; evidence?: string; nextStep?: string; blocker?: string; }): Promise; snooze(scopeId: string, durationMs: number): Promise; closeGoal(scopeId: string): Promise; setStatus(scopeId: string, status: Extract): Promise; clear(scopeId: string): Promise; requestTerminalCandidate(scopeId: string, candidate: GoalTerminalCandidate): Promise; start(scopeId: string, reason?: string, kind?: GoalContinuationKind): Promise; acknowledgeContinuation(scopeId: string): Promise; recover(scopeId: string): Promise; settle(scopeId: string, progress: GoalProgress, options?: { accountUsage?: boolean; }): Promise; private processPendingEvaluation; private continueWithClaim; private runContinuationClaim; private blockAfterRetryExhaustion; private budgetExhausted; private markBudgetLimited; private scheduleRecovery; private retryDelay; private record; private requireGoal; }