// Typed rejection taxonomy for keiko-memory-capture (Epic #204 child #207).
//
// Capture is the PRIMARY secret-rejection boundary; the rejection envelope NEVER carries the
// matched substring or pattern name, only a typed reason class. Callers can render a user-facing
// "this looked like a credential" without learning which pattern fired, which keeps the rejection
// path itself from leaking the candidate's content. The reason taxonomy is a closed string union
// so a UI surface can branch deterministically on `reason`.
// A capture-level error thrown only for programmer mistakes (e.g. handing an invalid scope hint
// to an internal helper). Rejection of user input is data-flow via CaptureOutcome `kind:"rejected"`,
// NOT exceptions — exceptions reserved for "this code path is unreachable in normal operation".
export class CaptureRejection extends Error {
    reason;
    constructor(reason, message) {
        super(message);
        this.name = "CaptureRejection";
        this.reason = reason;
    }
}
