/**
 * Migration from V1 context format to V2.
 *
 * V1 format has:
 * - charsPerToken, l1Turns, l2Turns, l3Turns, attachments (no version field)
 * - TokenizedMessage format with tokenCount at top level
 * - toolSummariesById at top level
 *
 * V2 format has:
 * - version: 2, messages, toolSummariesById
 * - StoredMessage format with _superblocks metadata
 * - toolSummaries stored on individual messages
 */
import type { Migration } from "./types.js";
import type { ContextRecordV1 } from "../types-v1.js";
import type { ContextRecordV2 } from "../types.js";
/**
 * Migrate a V1 context record to V2 format.
 *
 * Flattens all turns from oldest to newest (l3 → l2 → l1) into a single
 * messages array. Does not extract system prompt - the new system prompt
 * will be set when the context is used.
 *
 * Tool summaries from V1 are migrated to message-level storage:
 * - L2/L3 turns are already compacted, so they don't need summaries
 * - L1 turns are un-compacted, so summaries are attached to messages
 */
export declare function migrateV1ToV2(record: ContextRecordV1): ContextRecordV2;
export declare const v1ToV2Migration: Migration<ContextRecordV1, ContextRecordV2>;
//# sourceMappingURL=v1-to-v2.d.ts.map