export type CrashKind = 'uncaught-exception' | 'unhandled-rejection'; /** * Synchronously record a crash to fd 2 and to * `~/.cache/obsidian-brain/last-startup-error.log`. * * Both writes are blocking syscalls so the bytes land before the caller * issues `process.exit(1)`. Both swallow their own errors via try/catch * because the calling context is already a fatal-error path — we don't * want a teardown-time write failure to mask the original crash. * * Exported so tests can verify the file/banner shape without having to * trigger a real `process.on('uncaughtException')` event (which would * otherwise need a forked-process harness). */ export declare function recordCrash(kind: CrashKind, err: unknown): void; /** * Named handler for `uncaughtException`. Exported for tests; the * registration call below installs this same function on `process`. */ export declare function onUncaughtException(err: Error): void; /** * Named handler for `unhandledRejection`. Exported for tests; the * registration call below installs this same function on `process`. */ export declare function onUnhandledRejection(reason: unknown): void;