/** * Bounded, metadata-only diagnostics. * * Every field is an explicit scalar. Raw session ids, commands, cwd, environment * values, input, output, native error text, confirmation previews, and artifact * content are structurally excluded — they are never accepted as arguments. */ import { auditLog } from "../store/logs.js"; import type { SessionOperation, SessionState, SessionTransportKind, StableErrorCode, TerminationReason } from "./types.js"; export declare function redactSessionId(sessionId: string | undefined): string | undefined; export interface TelemetryEvent { readonly operation: SessionOperation; readonly sessionId?: string | undefined; readonly durationMs: number; readonly result: "ok" | StableErrorCode; readonly state?: SessionState | undefined; readonly transport?: SessionTransportKind | undefined; readonly inputBytes?: number | undefined; readonly outputBytes?: number | undefined; readonly queueDepth?: number | undefined; readonly retryCount?: number | undefined; readonly terminationReason?: TerminationReason | undefined; /** Recorded when Start failed after allocating a process or terminal. */ readonly cleanupVerified?: boolean | undefined; } export declare class SessionTelemetry { private readonly sink; constructor(sink?: typeof auditLog); record(event: TelemetryEvent): void; }