Member Junction
    Preparing search index...

    Function ExtractToolSchedulingHint

    • Extracts and normalizes scheduling hints (__mj_scheduling or legacy scheduling) from a tool's parsed return dictionary.

      Strips both keys from parsed in-place so neither key leaks into the model's response payload. Validates the value case-insensitively, accepting:

      • 'SILENT' -> 'silent'
      • 'WHEN_IDLE' -> 'whenIdle'
      • 'INTERRUPT' | 'INTERRUPTED' -> 'interrupt'

      Warns on unrecognized values with loggerTag and returns undefined.

      Parameters

      • parsed: Record<string, unknown>

        The tool output dictionary (mutated in-place to strip scheduling keys).

      • toolName: string

        The name of the tool being executed, for logging context.

      • loggerTag: string = 'Realtime'

        Optional logging tag prefix (defaults to 'Realtime').

      Returns RealtimeToolSchedulingHint

      The normalized scheduling hint, or undefined if absent or unrecognized.