import type { ExtensionAPI, ToolDefinition } from "@earendil-works/pi-coding-agent"; import { Type } from "typebox"; export declare const AskUserParams: Type.TObject<{ question: Type.TString; type: Type.TUnion<[Type.TLiteral<"confirm">, Type.TLiteral<"choice">, Type.TLiteral<"text">]>; options: Type.TOptional>; default: Type.TOptional; required: Type.TOptional; }>; /** * Where the returned answer actually came from. Only `source: "user"` (with * `answered: true`) represents a genuine human decision; every other source is * a fallback that no human confirmed. Carried in the tool result's `details` * so a caller can refuse to treat a default-echo as consent. */ export type AskUserSource = "user" | "non-interactive" | "default" | "unsupported"; export interface AskUserProvenance { source: AskUserSource; /** True iff a human genuinely answered (source === "user" and not cancelled). */ answered: boolean; /** The resolved value (the answer, or the fallback that was substituted). */ value: string; } /** * Register the forge_ask_user tool with the pi ExtensionAPI. * * The tool is named `forge_ask_user` (snake_case per pi convention); the * human/LLM-facing name `forge:ask_user` appears in description and promptSnippet. * * @param pi The pi ExtensionAPI instance. */ export declare const askUserToolDefinition: ToolDefinition; /** * Register the forge_ask_user tool on the pi ExtensionAPI (host session). */ export declare function registerAskUserTool(pi: ExtensionAPI): void;