import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { GoalPersistence } from "./goal-persistence.js"; import type { StatusContext } from "./goal-runtime-status.js"; import { type GoalTransitionEffectHandlers, type GoalTransitionRequest } from "./goal-transition.js"; import { type GoalRecoveryMachineState } from "./recovery-machine.js"; import { type GoalEntrySource, type GoalResult, type ThreadGoal } from "./types.js"; interface GoalStateControllerDeps { pi: Pick; persistence: GoalPersistence; getRecoveryState: () => GoalRecoveryMachineState; transitionEffectHandlers: GoalTransitionEffectHandlers; refreshUi: (ctx: StatusContext) => void; } export interface GoalStateController { applyGoalTransition: (request: GoalTransitionRequest, ctx: StatusContext | null) => boolean; beginOverflowRecovery: (ctx: StatusContext) => void; completeGoal: (source: GoalEntrySource, ctx: ExtensionContext) => GoalResult; flushGoalPersistence: GoalPersistence["flushGoalPersistence"]; getGoal: () => ThreadGoal | null; isCurrentActiveGoalId: (goalId: string) => boolean; maybeFlushRuntimePersistence: GoalPersistence["maybeFlushRuntimePersistence"]; pauseForAbort: (ctx: ExtensionContext) => void; pauseForRecovery: (ctx: ExtensionContext, recoveryReason: string) => void; persistHostOverflowUserReset: (needsReset: boolean) => void; reloadFromSession: (ctx: ExtensionContext) => void; resumePausedGoal: (ctx: StatusContext) => void; } export declare function createGoalStateController(deps: GoalStateControllerDeps): GoalStateController; export {}; //# sourceMappingURL=goal-state-controller.d.ts.map