export type ResultEnvelope = { ok: boolean; command: string; data: T; warnings: string[]; nextActions: string[]; code?: string; message?: string; /** * Slice 2026-06-23-audit-4th #B3: opaque per-failure correlation * id. Always present on `fail()` envelopes. Lets a user say * "my last failure was errorId=X; show me the JSONL log lines * tagged with X" without grepping on a code/message that may be * repeated. Also written to the next writeLogEntry call (best-effort) * by the caller so the log entry can be cross-referenced. */ errorId?: string; }; export declare function ok(command: string, data: T, warnings?: string[], nextActions?: string[]): ResultEnvelope; export declare function fail(command: string, code: string, message: string, data: T, nextActions?: string[]): ResultEnvelope; export declare function getErrorMessage(error: unknown): string; export declare function redactSensitiveErrorMessage(message: string): string;