/** * Crash reporter — shared across the monoes tool family. * * monomind's own uncaught-exception handler uses this directly. mono-agent * (Go), monotask, and mono-clip (Rust) shell out to `monomind report-crash` * from their own panic/recover handlers so redaction, dedup, and GitHub auth * logic live in exactly one place instead of being reimplemented per language. * * Default: ON (files real GitHub issues on crash). Opt out with * `monomind crash-reporting disable`. */ import { redact } from '../utils/redaction.js'; export interface CrashReportInput { /** e.g. "monoes/monomind", "monoes/mono-agent" */ repo: string; title: string; body: string; /** Stable key for dedup — same crash shouldn't file twice. Derived from title if omitted. */ signature?: string; } export interface CrashReportResult { status: 'created' | 'duplicate' | 'saved-locally' | 'disabled' | 'rate-limited' | 'error'; url?: string; path?: string; message: string; } export declare function isEnabled(): boolean; export declare function setEnabled(enabled: boolean): void; /** * Strip obvious secrets/PII before anything gets sent to a public GitHub repo. * Not a substitute for careful callers — this is a last-resort net. * * Implementation lives in utils/redaction.ts (shared with input-guards.ts's * sanitizeError() and neural-optimize.ts's stripPii export path — this was * the fullest of the three duplicated implementations, so the others were * consolidated onto this one rather than the reverse). */ export { redact }; export declare function computeSignature(repo: string, title: string): string; /** * Report a crash. Never throws — always resolves to a result the caller can * log and move on from, since this runs inside a crash handler. Every step * is async (no synchronous blocking child-process calls) so a caller racing * this against a timeout (e.g. monomind's own uncaughtException handler) * gets a bound that's actually enforceable. */ export declare function reportCrash(input: CrashReportInput): Promise; //# sourceMappingURL=crash-reporter.d.ts.map