Bluestep JS Documentation
    Preparing search index...

    Interface AiIterationDecision

    Return shape for onIteration. Set stop: true to end the loop after this round-trip, with an optional reason the result reports as hookReason; return nothing (or an empty object) to continue.

    interface AiIterationDecision {
        reason?: string;
        stop?: boolean;
    }
    Index
    reason?: string

    Why the hook stopped the loop, reported back as AiCallResult.hookReason. Ignored unless stop is true.

    stop?: boolean

    When true, the loop ends after this round-trip: tool calls it requested are not executed, the call's outcome is STOPPED_BY_HOOK, and an onTurn callback is not consulted.