@salesforce/agents
    Preparing search index...

    Type Alias ContextVariable

    ContextVariable:
        | { name: string; type: "Boolean"; value?: boolean
        | null }
        | { name: string; type: "Number"; value?: number | null }
        | {
            name: string;
            type: "Text" | "Date" | "DateTime" | "Money" | "Ref";
            value?: string | null;
        }
        | { name: string; type: "Object"; value?: ContextVariable[]
        | null }
        | { name: string; type: "List"; value?: Record<string, unknown>[] | null }
        | { name: string; type: "Json"; value?: Record<string, unknown> | null }

    A context/custom variable sent when starting a preview session or a message.

    This mirrors the preview API's polymorphic Variable schema: the JSON type of value is determined by type. Boolean values are booleans, Number values are numbers, Object/List values are arrays, and Json is any JSON object. Sending a boolean as the string "True" (the old behavior) leaves a boolean-gated route closed, because the runtime compares "True" (Text) against True (Boolean).

    value is optional and nullable to match the API, where only name and type are required.