Anchorage API reference
    Preparing search index...

    Configuration for classifierPolicy.

    interface ClassifierPolicyOptions {
        channels?: readonly OutputChannel[];
        classify: (
            text: string,
            info: { channel: OutputChannel; phase: PolicyPhase },
        ) => PolicyDecision | Promise<PolicyDecision>;
        evaluateEveryChars?: number;
        name?: string;
        phases?: readonly PolicyPhase[];
        timeoutMs?: number;
    }
    Index

    Properties

    channels?: readonly OutputChannel[]

    Default: ['answer'].

    classify: (
        text: string,
        info: { channel: OutputChannel; phase: PolicyPhase },
    ) => PolicyDecision | Promise<PolicyDecision>

    Async (or sync) classification of text; the authoritative decision for this call.

    evaluateEveryChars?: number

    Streaming cadence: classify once accumulated text grows by this many chars. Default 512.

    name?: string

    Policy name used in denials and audit records.

    phases?: readonly PolicyPhase[]

    Agent lifecycle phases to classify. Default: both input and output.

    timeoutMs?: number

    Optional; a classify call exceeding this throws (fails closed) instead of hanging.