Member Junction
    Preparing search index...

    Optional collaborators injectable for deterministic unit testing without a live database or LLM.

    interface WakeGateEvaluatorDependencies {
        collectWatermark?: (
            rule: {
                alias?: string;
                entityName: string;
                extraFilter?: string;
                includeRecordChanges?: boolean;
            },
            sinceDate: Date,
            contextUser: UserInfo,
        ) => Promise<EntityWatermarkSnapshot>;
        runTier2Decision?: (
            config: {
                additionalInstructions?: string;
                options?: { description: string; key: string }[];
                question: string;
                type?: "Likelihood" | "Choice";
                wakeIfAtLeast?: number;
                wakeOnChoices?: string[];
            },
            state: Record<string, object | string | number | boolean | null>,
            contextUser: UserInfo,
        ) => Promise<
            {
                probability?: number;
                promptRunId?: string;
                selectedChoice?: string;
                shouldWake: boolean;
            },
        >;
        runTier3Prompt?: (
            promptId: string,
            data: Record<string, object | string | number | boolean | null>,
            contextUser: UserInfo,
        ) => Promise<{ promptRunId?: string; reason: string; shouldWake: boolean }>;
    }
    Index

    Properties

    collectWatermark?: (
        rule: {
            alias?: string;
            entityName: string;
            extraFilter?: string;
            includeRecordChanges?: boolean;
        },
        sinceDate: Date,
        contextUser: UserInfo,
    ) => Promise<EntityWatermarkSnapshot>

    Custom watermark collector for Tier 0 tests.

    runTier2Decision?: (
        config: {
            additionalInstructions?: string;
            options?: { description: string; key: string }[];
            question: string;
            type?: "Likelihood" | "Choice";
            wakeIfAtLeast?: number;
            wakeOnChoices?: string[];
        },
        state: Record<string, object | string | number | boolean | null>,
        contextUser: UserInfo,
    ) => Promise<
        {
            probability?: number;
            promptRunId?: string;
            selectedChoice?: string;
            shouldWake: boolean;
        },
    >

    Custom Tier 2 decision executor for unit tests.

    runTier3Prompt?: (
        promptId: string,
        data: Record<string, object | string | number | boolean | null>,
        contextUser: UserInfo,
    ) => Promise<{ promptRunId?: string; reason: string; shouldWake: boolean }>

    Custom Tier 3 prompt executor for unit tests.