import type { FileEntry, SessionEntry, SessionHeader } from "./session-manager.js"; export declare const OBSERVABILITY_SCHEMA_VERSION = 1; export declare const DEFAULT_PAGE_SIZE = 50; export declare const MAX_PAGE_SIZE = 500; export type CorruptionClass = "recoverable_tail_corruption" | "recoverable_index_corruption" | "snapshot_rebuild_required" | "evidence_missing" | "manual_recovery_required" | "integrity_failure"; export interface JensenEventEnvelope { eventId: string; eventType: string; schemaVersion: number; runId: string; sessionId?: string; parentEventId?: string; causationId?: string; correlationId?: string; sequence: number; recordedAt: string; monotonicOffsetMs?: number; source: { component: string; instanceId?: string; }; payload: TPayload; payloadSha256: string; } export interface EventReadIssue { line: number; class: CorruptionClass; reasonCode: string; detail: string; } export interface EventReadResult { header?: SessionHeader; events: JensenEventEnvelope[]; issues: EventReadIssue[]; complete: boolean; } export interface EventQuery { pageSize?: number; pageToken?: string; eventType?: string; component?: string; failureOnly?: boolean; from?: string; to?: string; } export interface EventPage { events: JensenEventEnvelope[]; nextPageToken?: string; issues: EventReadIssue[]; } export interface RunProjection { runId: string; sessionId: string; cwd: string; objective?: string; entryCount: number; messageCount: number; toolCallCount: number; toolResultCount: number; models: Array<{ provider: string; modelId: string; }>; toolNames: string[]; mutations: number; evidenceIds: string[]; warnings: string[]; unknownEventTypes: string[]; firstRecordedAt?: string; lastRecordedAt?: string; } export interface RenderReplay { lines: string[]; eventCount: number; missingArtifacts: string[]; externalEffects: { modelCalls: 0; toolCalls: 0; networkCalls: 0; mutations: 0; }; } export interface ProjectionReplay { projection: RunProjection; issues: EventReadIssue[]; snapshotMatches?: boolean; } export interface RunDiffField { path: string; category: "improved" | "regressed" | "changed" | "unchanged" | "incomparable"; before: unknown; after: unknown; } export interface RunDiff { leftRunId: string; rightRunId: string; comparable: boolean; fields: RunDiffField[]; } export declare function sha256(value: unknown): string; export declare function envelopeForEntry(entry: FileEntry, runId: string, sequence: number): JensenEventEnvelope; /** Read a session JSONL file without loading more than the configured event count. */ export declare function readSessionEvents(filePath: string, maxEvents?: number): EventReadResult; export declare function queryEvents(result: EventReadResult, query?: EventQuery): EventPage; export declare function projectRun(result: EventReadResult): RunProjection; export declare function renderReplay(result: EventReadResult): RenderReplay; export declare function projectionReplay(result: EventReadResult, snapshot?: RunProjection): ProjectionReplay; export declare function diffRuns(left: RunProjection, right: RunProjection): RunDiff; export interface EvidenceRecord { evidenceId: string; type: string; origin: string; createdAt: string; contentSha256?: string; locator?: string; claimIds: string[]; redacted: boolean; integrity: "verified" | "unverified" | "missing"; } export declare function listEvidence(result: EventReadResult): EvidenceRecord[]; export interface DiagnosticCheckResult { checkId: string; component: string; status: "pass" | "warn" | "fail" | "unavailable" | "skipped"; reasonCode: string; summary: string; evidenceIds?: string[]; remediation?: { safeAutomatic?: boolean; command?: string; description: string; }; } export interface DiagnosticReport { checks: DiagnosticCheckResult[]; generatedAt: string; readOnly: true; exitCode: 0 | 1 | 2 | 3; } export declare function collectDiagnostics(options?: { cwd?: string; sessionFile?: string; checkMcp?: boolean; }): DiagnosticReport; export declare function sanitize(value: unknown): unknown; export interface SupportBundleManifest { bundleVersion: 1; createdAt: string; files: Array<{ path: string; bytes: number; sha256: string; }>; redactions: string[]; maxBytes: number; } export declare function supportBundlePreview(report: DiagnosticReport, projection?: RunProjection): { manifest: SupportBundleManifest; files: Record; }; export declare function createSupportBundle(destination: string, report: DiagnosticReport, projection?: RunProjection): SupportBundleManifest; export declare function sessionFileFromId(id: string, sessionDir?: string): string | undefined; export declare function loadProjectionFromSession(filePath: string): { events: EventReadResult; projection: RunProjection; }; export type { FileEntry, SessionEntry, SessionHeader }; //# sourceMappingURL=operability.d.ts.map