/** * Public SLICC transcript export contract. * * Renderer-neutral, platform-agnostic types for the v1 transcript bundle. * Consumed by every task that reads, writes, or validates a SLICC transcript. */ export declare const TRANSCRIPT_SCHEMA_VERSION: 1; export declare const SLICC_TRANSCRIPT_FORMAT: 'slicc-transcript'; export type TranscriptCompletenessReason = 'canonical-agent-history-unavailable' | 'tool-data-may-be-truncated' | 'model-metadata-unavailable' | 'scoop-history-unavailable' | 'attachment-file-missing' | 'attachment-association-unavailable' | 'complete-snapshot-unavailable'; /** Canonical runtime list of all valid completeness reasons. */ export declare const VALID_COMPLETENESS_REASONS: readonly TranscriptCompletenessReason[]; export type TranscriptExportErrorCode = 'permission-denied' | 'redaction-unavailable' | 'session-not-found' | 'transfer-aborted' | 'transfer-corrupt' | 'schema-invalid' | 'attachment-unreadable'; /** Canonical set of all valid wire error codes — use for runtime validation. */ export declare const VALID_EXPORT_ERROR_CODES: Set; export type TranscriptContentBlock = { type: 'text'; text: string; } | { type: 'tool-call'; id: string; name: string; input: unknown; } | { type: 'attachment-ref'; attachmentId: string; }; export interface TranscriptMessage { id: string; sequence: number; role: 'user' | 'assistant' | 'tool-result'; timestamp: string; content: TranscriptContentBlock[]; toolCallId?: string; isError?: boolean; source?: string; channel?: string; model?: { provider: string; id: string; api?: string; }; usage?: { input: number; output: number; cacheRead: number; cacheWrite: number; totalTokens: number; cost: { input: number; output: number; cacheRead: number; cacheWrite: number; total: number; }; }; stopReason?: string; error?: string; } export interface TranscriptConversation { id: string; kind: 'cone' | 'scoop'; name: string; folder?: string; parentConversationId?: string; createdAt?: string; updatedAt?: string; messages: TranscriptMessage[]; } export interface TranscriptDelegation { sourceConversationId: string; targetConversationId: string; toolCallId?: string; timestamp?: string; } export interface TranscriptAttachment { id: string; path: string; originalName: string; mimeType: string; byteLength: number; sha256: string; sourceConversationId: string; sourceMessageId: string; handling: 'text-redacted' | 'binary-unchanged'; present: boolean; missingReason?: 'attachment-file-missing' | 'attachment-association-unavailable'; } export interface TranscriptRedaction { id: string; category: string; detector: 'known-secret' | 'credential-pattern' | 'pre-obfuscated'; target: { kind: 'json'; pointer: string; } | { kind: 'attachment'; attachmentId: string; }; } export interface TranscriptExportProgress { phase: 'waiting-for-conversations' | 'collecting' | 'redacting' | 'packaging' | 'transferring' | 'complete'; processedBytes?: number; estimatedBytes?: number; } export interface TranscriptDocumentV1 { schemaVersion: typeof TRANSCRIPT_SCHEMA_VERSION; export: { id: string; generatedAt: string; producer: { application: 'slicc'; version: string; }; format: typeof SLICC_TRANSCRIPT_FORMAT; }; session: { id: string; title: string; state: 'active' | 'frozen'; createdAt?: string; updatedAt?: string; frozenAt?: string; snapshotAt?: string; completeness: { status: 'complete' | 'partial'; missing: TranscriptCompletenessReason[]; }; }; privacy: { reasoningExcluded: true; excludedReasoningBlocks: number; binaryAttachments: 'included-unchanged'; redactionCounts: Record; redactions: TranscriptRedaction[]; }; conversations: TranscriptConversation[]; delegations: TranscriptDelegation[]; attachments: TranscriptAttachment[]; } export declare class TranscriptExportError extends Error { readonly code: TranscriptExportErrorCode; constructor(code: TranscriptExportErrorCode); } export type TranscriptValidationResult = { ok: true; } | { ok: false; error: string; }; /** * Runtime validator for `TranscriptDocumentV1`. * * Validates all required discriminators, type-specific content block fields, * scalar constraints (sequence ≥ 1, ISO timestamps, SHA-256 hex, attachment * state invariants), and relational cross-references. Returns early with the * first structural error before performing any relational checks. * * Never throws for untrusted input. */ export declare function validateTranscriptDocumentV1(value: unknown): TranscriptValidationResult; //# sourceMappingURL=transcript-export.d.ts.map