/** * Writing a canonical session into a new Claude Code session file. * * C-9 measured that a file holding one `user` entry and one `assistant` entry is listed by the * native resume list and opened by `claude --resume ` as native turns. This module writes * exactly those two entry types and nothing else: the other eight types of C-3 are eight more * ways to corrupt an internal application database. * * Nothing here touches the filesystem except to read. `serialize` returns bytes; * `src/import/landing/` creates the files (FR-49, FR-53). */ import type { CanonicalSession, ProvenanceMarker, SerializedSession, TargetProfile, ValidationDefect } from "./contract.js"; /** The version C-9 was measured against. Written so the target reads a version it knows. */ export declare const CLAUDE_CODE_FORMAT_VERSION = "2.1.220"; /** The model field of an imported turn. No model produced it, and none is claimed. */ export declare const IMPORTED_MODEL = "imported"; export declare const USER_TYPE = "external"; /** Bytes only: the file is created by `src/import/landing/`, never here (FR-49, FR-53). */ export declare function serialize(session: CanonicalSession, target: TargetProfile, marker: ProvenanceMarker, context: { cwd: string; }): SerializedSession; /** Every structural defect, not the first (FR-50). Empty means the bytes may be placed. */ export declare function validate(serialized: SerializedSession): ValidationDefect[];