@cavell/kit API
    Preparing search index...

    Type Alias ReactHumanInTheLoop<T>

    ReactHumanInTheLoop: Omit<FrontendTool<T>, "handler"> & {
        render: React$1.ComponentType<
            | {
                agentId?: string;
                args: Partial<T>;
                description: string;
                name: string;
                respond: undefined;
                result: undefined;
                status: ToolCallStatus.InProgress;
                toolCallId: string;
            }
            | {
                agentId?: string;
                args: T;
                description: string;
                name: string;
                respond: (result: unknown) => Promise<void>;
                result: undefined;
                status: ToolCallStatus.Executing;
                toolCallId: string;
            }
            | {
                agentId?: string;
                args: T;
                description: string;
                name: string;
                respond: undefined;
                result: string;
                status: ToolCallStatus.Complete;
                toolCallId: string;
            },
        >;
    }

    Type Parameters

    • T extends Record<string, unknown> = Record<string, unknown>

    Type Declaration

    • render: React$1.ComponentType<
          | {
              agentId?: string;
              args: Partial<T>;
              description: string;
              name: string;
              respond: undefined;
              result: undefined;
              status: ToolCallStatus.InProgress;
              toolCallId: string;
          }
          | {
              agentId?: string;
              args: T;
              description: string;
              name: string;
              respond: (result: unknown) => Promise<void>;
              result: undefined;
              status: ToolCallStatus.Executing;
              toolCallId: string;
          }
          | {
              agentId?: string;
              args: T;
              description: string;
              name: string;
              respond: undefined;
              result: string;
              status: ToolCallStatus.Complete;
              toolCallId: string;
          },
      >

      Render the human-in-the-loop UI for this tool call.

      Beyond the tool call's args/status/result, the render props carry attribution:

      • toolCallId — the AG-UI tool call id, unique per interrupt. It is the stable key for correlating this interrupt with runtime (sub)agent attribution — e.g. the agentId reported by onToolExecutionStart, or per-run attribution stamped on the event stream — so the UI can label the interrupt with the agent that actually raised it.
      • agentId — the agent this tool was registered to (the tool's own agentId), or undefined for an unscoped tool. This is the static registration scope; it is NOT necessarily the runtime (sub)agent that raised the interrupt. For runtime attribution, correlate toolCallId with the event-stream/onToolExecutionStart agent id.