import { z } from 'zod'; import { Constants } from '@/common'; export declare const AskUserToolName = Constants.ASK_USER; export declare const AskUserDescription: string; export declare const AskUserStepSchema: z.ZodObject<{ question: z.ZodString; options: z.ZodArray; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "single" | "multi"; options: { value: string; label: string; description?: string | undefined; }[]; question: string; }, { options: { value: string; label: string; description?: string | undefined; }[]; question: string; type?: "single" | "multi" | undefined; }>; export type AskUserStep = z.infer; /** * Represents a single step selection from the multi-step wizard UI. * Exported for use by both the host web client and browser extension. */ export type StepSelection = { values: string[]; customInput?: string; }; /** Field names injected into modifiedArgs by the approval flow */ export declare const HITL_FIELDS: { readonly SELECTIONS: "_selections"; readonly SELECTED_OPTION: "_selectedOption"; readonly CUSTOM_INPUT: "_customInput"; }; /** * Creates an ask_user tool that lets the LLM ask clarification questions mid-conversation. * * How it works: * 1. LLM calls ask_user(question, options) OR ask_user(steps) * 2. ToolNode.requiresApproval() → always true (per-tool rule in askUserRules.js) * 3. ToolNode.requestApproval() promotes options/question/steps to top-level fields on the event * 4. Frontend HumanInputPopover renders option cards + freeform text input * 5. User selects option(s) OR types custom input → * backend resolves with modifiedArgs containing _selections, _selectedOption, or _customInput * 6. Tool executes, reads the user's choice, returns result to LLM */ export declare function createAskUserTool(): import("@langchain/core/tools").DynamicStructuredTool; options: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">>; context: z.ZodOptional; steps: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "single" | "multi"; options: { value: string; label: string; description?: string | undefined; }[]; question: string; }, { options: { value: string; label: string; description?: string | undefined; }[]; question: string; type?: "single" | "multi" | undefined; }>, "many">>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ question: z.ZodOptional; options: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">>; context: z.ZodOptional; steps: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "single" | "multi"; options: { value: string; label: string; description?: string | undefined; }[]; question: string; }, { options: { value: string; label: string; description?: string | undefined; }[]; question: string; type?: "single" | "multi" | undefined; }>, "many">>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ question: z.ZodOptional; options: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">>; context: z.ZodOptional; steps: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "single" | "multi"; options: { value: string; label: string; description?: string | undefined; }[]; question: string; }, { options: { value: string; label: string; description?: string | undefined; }[]; question: string; type?: "single" | "multi" | undefined; }>, "many">>; }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{ question: z.ZodOptional; options: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">>; context: z.ZodOptional; steps: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "single" | "multi"; options: { value: string; label: string; description?: string | undefined; }[]; question: string; }, { options: { value: string; label: string; description?: string | undefined; }[]; question: string; type?: "single" | "multi" | undefined; }>, "many">>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ question: z.ZodOptional; options: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">>; context: z.ZodOptional; steps: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "single" | "multi"; options: { value: string; label: string; description?: string | undefined; }[]; question: string; }, { options: { value: string; label: string; description?: string | undefined; }[]; question: string; type?: "single" | "multi" | undefined; }>, "many">>; }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{ question: z.ZodOptional; options: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">>; context: z.ZodOptional; steps: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "single" | "multi"; options: { value: string; label: string; description?: string | undefined; }[]; question: string; }, { options: { value: string; label: string; description?: string | undefined; }[]; question: string; type?: "single" | "multi" | undefined; }>, "many">>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ question: z.ZodOptional; options: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">>; context: z.ZodOptional; steps: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; }, { value: string; label: string; description?: string | undefined; }>, "many">; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "single" | "multi"; options: { value: string; label: string; description?: string | undefined; }[]; question: string; }, { options: { value: string; label: string; description?: string | undefined; }[]; question: string; type?: "single" | "multi" | undefined; }>, "many">>; }, z.ZodTypeAny, "passthrough">, string>;