/** * Crash-reporting consent — tri-state ('enabled' | 'disabled' | 'unanswered') * and the interactive prompt that resolves it. * * Split out of crash-reporter.ts (i-055-cli revision round 1): this piece * has no dependency on the filing pipeline (dedup, lock, gh/token filing) * and keeps crash-reporter.ts under the repo's 500-line guideline. */ export declare const STATE_DIR: string; export declare const PROMPT_TIMEOUT_MS: number; export declare function ensureStateDir(): void; export declare function readJsonSafe(path: string, fallback: T): T; export declare function writeJsonSafe(path: string, data: unknown): void; export type ConsentState = 'enabled' | 'disabled' | 'unanswered'; /** * Tri-state consent, replacing the old boolean default. An absent or * malformed config file is 'unanswered' — NOT 'enabled'. Treating "never * chosen" as "silently on" was the bug: it let every crash file a public * GitHub issue with no consent step of any kind. */ export declare function getConsentState(): ConsentState; export declare function setEnabled(enabled: boolean): void; export declare function isInteractiveTty(): boolean; /** * Shows the local report path, then asks once whether to file it publicly — * bounded at PROMPT_TIMEOUT_MS so a readline that never gets an answer can't * hang the crash handler forever (bin/cli.js's own uncaughtException/ * unhandledRejection handlers force-exit right after this regardless, but * `monomind report-crash` — the hidden command mono-agent/monotask/mono-clip * shell out to — does not, so this bound is load-bearing there). EOF * (Ctrl-D) resolves immediately via prompt.ts's own close handling, not * through this timeout at all. */ export declare function promptForConsent(repo: string, reportPath: string): Promise; //# sourceMappingURL=crash-consent.d.ts.map