import type { SessionEntry, SessionHeader } from "./session-entries.js"; /** Shown wherever an anonymized export is written: the redaction is rule-based, not a guarantee. */ export declare const ANONYMIZED_REVIEW_NOTE = "Turn contents and error text are redacted and paths/literals replaced; metadata such as model names is kept \u2014 review before sharing."; export declare class SessionAnonymizer { #private; /** Consistent opaque stand-in for a short string literal. */ placeholder(value: string): string; /** Size-annotated marker replacing turn content. */ redactText(value: string): string; /** Mock path preserving separators, scheme, drive, extensions, and read selectors. Accepts `;`-joined lists. */ path(value: string): string; /** Mock name for a single path segment (also used for output file names). */ segment(value: string): string; /** Anonymize one session record (header or entry). */ entry(value: unknown): unknown; /** Shell command with allowlisted programs, their flags/subcommands, and operators kept; literals replaced. */ command(value: string): string; } /** A session transcript to anonymize: its header, entries, and file (for subagent discovery). */ export interface AnonymizeSessionInput { header: SessionHeader | null; entries: readonly SessionEntry[]; sessionFile?: string; /** Malformed records the caller skipped while loading the main transcript. */ malformedRecords?: number; } /** Anonymized JSONL bodies for a session and its persisted subagents. */ export interface AnonymizedTranscripts { /** `[member path, JSONL body]`: `session.jsonl`, then `subagents/.jsonl`. */ files: Array; subagentCount: number; /** Why subagent discovery failed; the main transcript is anonymized regardless. */ subagentError?: string; /** `[member path, count]` for transcripts whose malformed JSONL records were skipped. */ malformed: Array; /** Subagent transcripts (mapped member paths) skipped because no session header could be read. */ unreadable: string[]; } /** * Anonymize a session and every subagent transcript stored next to it with one * shared token table, so names, paths, and literals correlate across files. */ export declare function anonymizeSessionTranscripts(session: AnonymizeSessionInput): Promise;