/** * 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. * * Consent is asked once, on the first interactive crash (a local report path * is shown before asking; default answer is No). Until you've answered, a * non-interactive crash (CI, agents — most real runs) never asks and only * saves locally, never filing. Once you've explicitly chosen — via the * prompt or `monomind crash-reporting enable`/`disable` — that answer is * used every time, interactive or not; `monomind crash-reporting status` * shows the current state. * * Consent state and the interactive prompt live in ./crash-consent.ts; the * advisory lock around the ledger lives in ./crash-lock.ts. */ import { redact } from '../utils/redaction.js'; export type { ConsentState } from './crash-consent.js'; export { getConsentState, setEnabled } from './crash-consent.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; } /** * 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