Anchorage API reference
    Preparing search index...
    • Deny when any pattern matches the gated text. Strings match as case-insensitive substrings; RegExps match as-is. Gates ALL output channels by default (answer, reasoning, object) — leak prevention is its purpose, and a secret is no less leaked through a reasoning trace; narrow with options.channels when a channel must stay ungated. The 'object' channel is enforced in-stream only (see OutputChannel's coverage caveat).

      Substring matching is plain toLowerCase — no Unicode folding or normalization — so alternate spellings evade it (e.g. 'strasse' does not match 'straße'). Do not rely on it alone against adversarial input.

      Parameters

      • patterns: readonly (string | RegExp)[]
      • options: {
            channels?: readonly OutputChannel[];
            holdBackChars?: number;
            name?: string;
            phases?: readonly PolicyPhase[];
        } = {}
        • Optionalchannels?: readonly OutputChannel[]
        • OptionalholdBackChars?: number

          Override the computed hold-back hint — e.g. a caller-known match bound for a RegExp, which otherwise forces Infinity (buffer-all).

        • Optionalname?: string
        • Optionalphases?: readonly PolicyPhase[]

      Returns PolicyEvaluator