/**
 * Session Versioning — version-based session migration.
 *
 * Each session gets a `symiVersion` field in its JSONL header.
 * On session load, if the session was created by a known-poison version
 * (2.3.0-2.3.4), it's archived and a fresh session starts.
 *
 * Sessions without `symiVersion` predate 2.3.0 and were created with Claude,
 * which does not produce corrupted tool args or looping output.  Do NOT
 * archive unversioned sessions — they are safe.  Only sessions with an
 * explicit symiVersion in the known-poison range are archived.
 *
 * @module
 */
declare function parseVersion(v: string): number[];
declare function compareVersions(a: number[], b: number[]): number;
declare function isInPoisonRange(version: string): boolean;
/**
 * Check if a session file was created by a poisoned Symi version.
 * Returns the symiVersion if poisoned, null if safe.
 */
export declare function checkSessionPoison(sessionFile: string): Promise<string | null>;
/**
 * Archive a poisoned session file by renaming it.
 * The archived file can be inspected later but won't be loaded.
 */
export declare function archivePoisonedSession(sessionFile: string): Promise<string>;
/**
 * Stamp the current Symi version into a session file's header.
 * Reads the first line, adds/updates symiVersion, rewrites the line.
 */
export declare function stampSessionVersion(sessionFile: string): Promise<void>;
/**
 * Check and handle a session file before use.
 * If poisoned: archive it and return { archived: true }.
 * Otherwise: stamp the current version and return { archived: false }.
 */
export declare function handleSessionVersion(sessionFile: string): Promise<{
    archived: boolean;
    archivePath?: string;
    poisonVersion?: string;
}>;
export declare const __testing: {
    isInPoisonRange: typeof isInPoisonRange;
    parseVersion: typeof parseVersion;
    compareVersions: typeof compareVersions;
};
export {};
