import { SessionManager } from '../core/session-manager.js'; /** * context_delta MCP tool — addresses issue #122. * * Given (sessionId, filePath, currentContent) this tool: * 1. Looks up the session from the SessionManager. * 2. Diffs the current content against the session's last snapshot of * that file. * 3. Updates the session's file state. * 4. Returns a unified-diff delta — the caller can send ONLY the delta * to the model instead of the whole file, which is the token win. * * On first invocation for a given filePath the full content is treated * as "the delta" (there is no baseline to diff against). */ export type ContextDeltaOperation = 'compute-delta' | 'seed' | 'clear'; export interface ContextDeltaOptions { operation: ContextDeltaOperation; sessionId: string; filePath: string; currentContent?: string; } export interface ContextDeltaResponse { success: boolean; error?: string; delta?: string; isBaseline?: boolean; originalSize?: number; deltaSize?: number; bytesSaved?: number; } export declare class ContextDeltaTool { private readonly sessionManager; readonly name = "context_delta"; readonly description = "Compute a unified-diff delta between a file\u2019s previous session snapshot and its current content, so the model only receives what changed."; constructor(sessionManager: SessionManager); run(options: ContextDeltaOptions): ContextDeltaResponse; private computeDelta; private seed; private clear; } export declare const CONTEXT_DELTA_TOOL_DEFINITION: { name: string; description: string; inputSchema: { type: string; properties: { operation: { type: string; enum: string[]; description: string; }; sessionId: { type: string; minLength: number; description: string; }; filePath: { type: string; minLength: number; description: string; }; currentContent: { type: string; description: string; }; }; required: string[]; additionalProperties: boolean; }; }; //# sourceMappingURL=context-delta-tool.d.ts.map