/** * PreCompact Handler for MAMA OS Standalone * * Ported from claude-code-plugin/scripts/precompact-hook.js. * Uses executeTool callback to interact with MAMA memory (mama_search) * without importing mama-core directly. */ import type { GatewayToolExecutionContext } from './types.js'; export interface CompactionResult { unsavedDecisions: string[]; compactionPrompt: string; warningMessage: string; } export interface PreCompactHandlerConfig { enabled: boolean; maxDecisionsToDetect?: number; } type ExecuteToolFn = (name: string, input: Record, executionContext?: GatewayToolExecutionContext | null) => Promise; export declare class PreCompactHandler { private readonly executeTool; private readonly config; constructor(executeTool: ExecuteToolFn, config: PreCompactHandlerConfig); process(conversationHistory: string[], executionContext?: GatewayToolExecutionContext | null): Promise; private extractDecisionCandidates; private getSavedTopics; private filterUnsaved; private buildWarningMessage; /** * 7-section compaction prompt: * 1. User Requests 2. Final Goal 3. Work Completed 4. Remaining Tasks * 5. Active Working Context 6. Explicit Constraints 7. Agent Verification State */ private buildCompactionPrompt; } export {}; //# sourceMappingURL=pre-compact-handler.d.ts.map