import { type ExtensionAPI } from '@earendil-works/pi-coding-agent'; import { type PiGoalConfig, type ResolvedGoalConfig } from './config.js'; import { GoalState } from './goal-state.js'; import type { GoalModelRegistry } from './llm.js'; export type PiGoalExtensionConfig = PiGoalConfig; /** * Dependencies for the goal engine — extracted so the engine is unit-testable * without a live ExtensionAPI. */ export interface GoalEngineDeps { state: GoalState; config: ResolvedGoalConfig; registry: GoalModelRegistry; sendUserMessage: (content: string) => void; notify: (message: string, level: 'info' | 'warning' | 'error') => void; setStatus: (text: string) => void; signal?: AbortSignal; /** Rough token accounting; defaults to a char-based estimate of the transcript. */ estimateTokens?: (transcript: string) => number; } /** * Evaluate the active goal against the transcript and either stop (achieved / * impossible / limited) or inject a continuation message. Idempotent guard: the * caller must ensure only one invocation runs at a time (see extension wiring). */ export declare function runGoalEngine(deps: GoalEngineDeps, messages: unknown[]): Promise<'achieved' | 'impossible' | 'continued' | 'budget_limited' | 'iteration_limited' | 'skipped'>; export default function goalExtension(pi: ExtensionAPI, injectedConfig?: PiGoalExtensionConfig): void; //# sourceMappingURL=extension.d.ts.map