Anchorage API reference
    Preparing search index...

    Policy evaluated by PolicyEngine at selected phases and channels.

    interface PolicyEvaluator {
        channels?: readonly OutputChannel[];
        holdBackChars?: number;
        name: string;
        phases?: readonly PolicyPhase[];
        evaluate(context: PolicyContext): PolicyDecision | Promise<PolicyDecision>;
    }
    Index

    Properties

    channels?: readonly OutputChannel[]

    Output channels this policy gates. Default: ['answer'] — evaluators written before channels existed keep seeing only client-visible text.

    holdBackChars?: number

    Hold-back hint (chars): the trailing window of streamed text that must stay unemitted for this policy to catch a violation straddling the emission frontier. Consulted only when the engine's holdBack option is on. Policies without the hint contribute 0 — hint your evaluator to get hold-back coverage. Infinity buffers everything until stream finish.

    name: string

    Stable policy name used in audit events and denial messages.

    phases?: readonly PolicyPhase[]

    Phases this policy gates. Default: both.

    Methods