import type { ErrorEvent, EventHint } from "@sentry/node"; /** * Reporting-policy drop set: errno codes that mark a failure as a pure * local-environment condition on the USER's own machine — a full disk * (`ENOSPC`), a permission or ownership wall (`EACCES`, `EPERM`), or a * read-only filesystem (`EROFS`) — rather than a create-hq product defect. An * event is dropped from Sentry only when EVERY retained cause code is one of * these; the user has already been given the correct remedy (choose a writable * location and rerun), so the report is pure noise. * * This is a NEW, reporting-only constant. It is deliberately SEPARATE from the * error-attribution tables `LOCAL_FILESYSTEM_ERROR_CODES` (fetch-template) and * `DIRECTORY_ACCESS_ERROR_CODES` (dir-arg), which classify errors for the * user-facing message and are intentionally broader — they include `EINVAL` * and `ENOTDIR`, which can indicate a genuine product bug and must keep * reporting. Do not couple this set to those tables. */ export declare const REPORTING_DROP_CODES: ReadonlySet; /** * True only for a create-hq target-directory failure whose EVERY retained cause * code is a pure local-environment errno in {ENOSPC, EACCES, EPERM, EROFS}. * * Fail-open by construction — returns false (keep reporting) for: * - any error that is not one of the two dedicated classes (or a same-named * Error carrying the structured field); * - a dedicated-class error with no `causeCodes` array, or an empty one; * - ANY cause code that is not a string in the drop set: a missing/`undefined` * code, a mixed pair such as `[ENOSPC, undefined]` or `[ENOSPC, "EIO"]`, or * a possible-product-bug code such as `EINVAL`. * A non-empty array of all-in-set strings therefore guarantees at least one * real environment code before anything is dropped. */ export declare function isDroppableLocalEnvironmentFailure(err: unknown): boolean; /** * Sentry `beforeSend`: drop (return `null`) a captured event whose originating * exception is a pure local-environment target-directory failure; otherwise * retain the event and add bounded tags for a scaffold-fetch failure. Pure * function — it reads `hint.originalException` and never performs I/O or * mutates `event`. */ export declare function beforeSend(event: ErrorEvent, hint: EventHint): ErrorEvent | null; //# sourceMappingURL=sentry-before-send.d.ts.map