import type { SessionManager } from "@caupulican/pi-agent-core/node"; import { type Component } from "@caupulican/pi-tui"; import { type Static, Type } from "typebox"; import { type ClipboardInputHost } from "../../modes/interactive/clipboard-input.ts"; import type { Theme } from "../../modes/interactive/theme/theme.ts"; import type { ArtifactStore } from "../context/context-artifacts.ts"; import { type HumanInputAnswer, type HumanInputAnswerImage, type HumanInputPresentationResult, type HumanInputQuestion, type HumanInputStopReason } from "../human-input.ts"; import type { KeybindingsManager } from "../keybindings.ts"; import type { SessionImageStore } from "../session-image-store.ts"; declare const askQuestionSchema: Type.TObject<{ questions: Type.TArray>; multiSelect: Type.TOptional; }>>; }>; export type AskQuestionToolInput = Static; export type AskQuestion = HumanInputQuestion; export type AskQuestionAnswer = HumanInputAnswer; export type AskQuestionAnswerImage = HumanInputAnswerImage; export type AskQuestionStopReason = HumanInputStopReason; export interface AskQuestionToolDetails { questions: readonly AskQuestion[]; answers: readonly AskQuestionAnswer[]; cancelled: boolean; reason?: AskQuestionStopReason; error?: string; } export interface AskQuestionToolOptions { name?: string; label?: string; /** Production session sink. When present, requests and answers are checkpointed before continuation. */ sessionManager?: Pick; artifactStore?: ArtifactStore; getImageStore?: () => Pick | undefined; } export interface AskQuestionClipboardOptions { autoResizeImages: boolean; blockImages: boolean; blockImagesReason?: string; imageStore?: Pick; } export type PasteClipboardImage = (host: ClipboardInputHost) => Promise; export interface AskQuestionAnswerEditor extends Component { focused: boolean; onSubmit?: (text: string) => void; handleInput(data: string): void; getText(): string; setText(text: string): void; insertTextAtCursor(text: string): void; } export type CreateAskQuestionAnswerEditor = () => AskQuestionAnswerEditor; type AskQuestionDialogResult = HumanInputPresentationResult; /** Native focused question interaction shared by every provider-facing ask_question call. */ export declare class AskQuestionDialog implements Component { private readonly questions; private readonly theme; private readonly keybindings; private readonly requestRender; private readonly finish; private readonly clipboard; private readonly pasteClipboardImage; private readonly createAnswerEditor; private readonly selections; private readonly cursors; private readonly clipboardQueue; private currentIndex; private input; private inputError; private inputStatus; private pasteInFlight; private submitAfterPaste; private cachedWidth; private cachedLines; private settled; constructor(options: { questions: readonly AskQuestion[]; theme: Theme; keybindings: KeybindingsManager; requestRender: () => void; finish: (result: AskQuestionDialogResult) => void; clipboard?: AskQuestionClipboardOptions; pasteClipboardImage?: PasteClipboardImage; createAnswerEditor?: CreateAskQuestionAnswerEditor; }); private refresh; private result; private complete; cancel(reason: Extract): void; private move; private advanceAfterSingleSelection; private beginCustomAnswer; private pasteIntoCustomAnswer; private selectCurrent; private submitReview; handleInput(data: string): void; private addWrapped; private renderProgress; private renderQuestion; private renderReview; private renderHelp; render(width: number): string[]; invalidate(): void; } export declare function createAskQuestionToolDefinition(options?: AskQuestionToolOptions): import("../extensions/types.ts").ToolDefinition>; multiSelect: Type.TOptional; }>>; }>, AskQuestionToolDetails, any> & import("../extensions/types.ts").ToolDefinition; export {}; //# sourceMappingURL=ask-question.d.ts.map