/** * Fast-apply: merge an edit snippet into existing code with agent-booster. * * agent-booster is a Morph/Cursor-style *applier*: `apply({ code, edit })` * expects `edit` to be the target code (e.g. the rewritten function), and it * locates and splices it into `code` in a few milliseconds with no LLM call. * It cannot turn a natural-language instruction into an edit — given one it * returns `success: false, strategy: "failed"` (see ADR-143). So this is the * path for callers that already hold a snippet (an agent's proposed rewrite), * not a Tier-1 intent engine; deterministic intents stay in hooks_codemod. */ export interface FastApplyRequest { code: string; edit: string; language?: string; /** Results below this confidence are reported as not applied. Default 0.5. */ minConfidence?: number; } export interface FastApplyResult { success: boolean; output: string; confidence: number; strategy: string; latencyMs: number; backend: 'agent-booster' | 'unavailable'; reason?: string; } interface BoosterLike { apply(req: { code: string; edit: string; language?: string; }): Promise<{ output: string; success: boolean; confidence: number; strategy: string; }>; } /** Lazily construct one AgentBooster. Resolves null when it is not installed. */ export declare function loadAgentBooster(): Promise; /** Test hook: forget the memoised AgentBooster. */ export declare function resetAgentBoosterLoader(): void; export declare function fastApply(req: FastApplyRequest): Promise; export {}; //# sourceMappingURL=fast-apply.d.ts.map