import { type GoalState } from "./goal-state.ts"; import { type GoalActionFailure, type GoalActionResult } from "./goal-tool-core.ts"; export interface GoalStateRevision { goalId: string; revision: number; } export declare function getGoalStateRevision(state: GoalState): GoalStateRevision; /** True only when a bounded runaway/provider-turn guard caused the block, not owner/model/terminal intent. */ export declare function isSystemBlockedGoal(state: GoalState | undefined): boolean; /** Minimal durable seam shared by CLI, tools, and in-process session restoration. */ export interface PersistedGoalStateHost { getGoalStateSnapshot(): GoalState | undefined; saveGoalStateSnapshot(state: GoalState, expected?: GoalStateRevision): string; clearGoalStateSnapshot?(state: GoalState, now: string): string; } export declare function pauseGoal(current: GoalState | undefined, now: string): GoalActionResult; export declare function resumeGoal(current: GoalState | undefined, now: string): GoalActionResult; export declare function editGoal(current: GoalState | undefined, args: { userGoal: string; tokenBudget?: number; }, now: string): GoalActionResult; export declare function cancelGoal(current: GoalState | undefined, now: string): GoalActionResult; /** Explicit owner replacement. The old and new states cross one persistence boundary. */ export declare function replaceGoal(args: { goalId: string; userGoal: string; tokenBudget?: number; }, now: string): GoalActionResult; export declare function stopGoalFromSystem(current: GoalState | undefined, args: { status: "blocked" | "usage_limited" | "budget_limited"; reason: string; }, now: string): GoalActionResult; export declare function pausePersistedGoal(host: PersistedGoalStateHost, now?: string): GoalActionResult; export declare function resumePersistedGoal(host: PersistedGoalStateHost, now?: string): GoalActionResult; export declare function editPersistedGoal(host: PersistedGoalStateHost, args: { userGoal: string; tokenBudget?: number; }, now?: string): GoalActionResult; export declare function cancelPersistedGoal(host: PersistedGoalStateHost, now?: string): GoalActionResult; export type ClearPersistedGoalResult = { ok: true; cleared: boolean; } | GoalActionFailure; export declare function clearPersistedGoal(host: PersistedGoalStateHost, now?: string): ClearPersistedGoalResult; //# sourceMappingURL=goal-lifecycle.d.ts.map