import type { UpstreamInterceptor } from './types.js'; /** * Normalize SessionStart markers in text content. * * - Replace "resume hook success" with "startup hook success" * - Strip tags * - Strip "Last active:" lines * * Returns [normalizedText, mutationCount]. */ export declare function normalizeSessionStartText(text: string): [string, number]; /** * Normalize tool_use.input blocks in assistant messages: * - Strip keys not in the tool's input_schema * - Canonicalize key order to match the schema * * Mutates the body in place and returns count of modified tool_use blocks. * The caller is expected to have already made a shallow copy if immutability is needed. */ export declare function normalizeToolUseInputsInBody(body: any): number; declare const DEFERRED_TOOLS_AVAILABLE_MARKER = "The following deferred tools are now available via ToolSearch"; declare const DEFERRED_TOOLS_UNAVAILABLE_MARKER = "The following deferred tools are no longer available"; declare const DEFERRED_TOOLS_SNAPSHOT_DIR: string; export { DEFERRED_TOOLS_AVAILABLE_MARKER, DEFERRED_TOOLS_UNAVAILABLE_MARKER, DEFERRED_TOOLS_SNAPSHOT_DIR }; /** * Compute the snapshot file path for a given key. */ export declare function deferredToolsSnapshotPath(key: string): string; /** * Find a deferred-tools block in the request body. * Returns { msgIdx, blockIdx, text } or null. */ export declare function findDeferredToolsBlockInBody(body: any): { msgIdx: number; blockIdx: number; text: string; } | null; declare const CACHE_CONTROL_STICKY_MAX_POSITIONS = 2; declare const CACHE_CONTROL_STICKY_DIR: string; export { CACHE_CONTROL_STICKY_MAX_POSITIONS, CACHE_CONTROL_STICKY_DIR }; /** * Compute a stable hash for a message to use as a sticky position key. */ export declare function computeStickyMessageHash(msg: any): string | null; /** * Read persisted cache_control sticky state from disk. */ export declare function readCacheControlStickyState(key: string): { version: number; positions: any[]; }; /** * Write cache_control sticky state to disk. */ export declare function writeCacheControlStickyState(key: string, state: any): void; /** * Update sticky state based on current body and prior state. * Returns new state and list of mutations to apply. */ export declare function updateCacheControlStickyState(body: any, priorState: any): { newState: any; mutations: Array<{ msgIdx: number; blockIdx: number; marker: any; }>; }; /** * Apply cache_control sticky: read prior state, update, write, and mutate body. * Returns count of mutations applied. */ export declare function applyCacheControlSticky(body: any, key: string): number; export declare const claudeCodeNormalize: UpstreamInterceptor; //# sourceMappingURL=claude-code-normalize.d.ts.map