import { type ToolDefinition } from "@earendil-works/pi-coding-agent"; /** Maximum UTF-8 size of the durable display diff plus unified patch. */ export declare const MAX_DURABLE_DIFF_BYTES: number; /** Avoid retaining arbitrarily large previous files in the live-only store. */ export declare const MAX_COMPARABLE_WRITE_BYTES = 512000; export declare const MAX_WRITE_METADATA_ENTRIES = 100; export interface DurableWriteDetails { diff?: string; patch?: string; firstChangedLine?: number; diffUnavailableReason?: string; } /** Ephemeral execution metadata used by the live renderer. Never persisted as a before/after pair. */ export interface WriteExecutionMeta extends DurableWriteDetails { fileExistedBeforeWrite: boolean; previousContent?: string; } export declare class WriteExecutionMetadataStore { readonly entries: Map; set(toolCallId: string, metadata: WriteExecutionMeta): void; get(toolCallId: unknown): WriteExecutionMeta | undefined; delete(toolCallId: string): void; clear(): void; } type WriteParams = { path: string; content: string; }; export declare function executeWriteWithMetadata(store: WriteExecutionMetadataStore, toolCallId: string, params: WriteParams, signal: AbortSignal | undefined, cwd: string): Promise<{ content: Array<{ type: "text"; text: string; }>; details?: DurableWriteDetails; }>; /** * A session-local write definition. It retains Pi's public schema/description * and replaces only execution so the parent registry is never mutated. */ export declare function createTrackedWriteTool(cwd: string, store?: WriteExecutionMetadataStore): ToolDefinition; export {}; //# sourceMappingURL=write-execution.d.ts.map