import type { HumanInputQuestion, HumanInputSecretSaveTo, SkillRecord, SessionHumanInputRequest, SubmitHumanInputResponseRequest } from "@opengeni/sdk"; import { type ReactNode } from "react"; import { answersFromDrafts, defaultHumanInputFormMessages, type HumanInputAnswerDraft, type HumanInputFormMessages } from "../human-input-model.js"; export { answersFromDrafts, defaultHumanInputFormMessages, type HumanInputAnswerDraft, type HumanInputFormMessages, }; export type HumanInputFormProps = { /** Scoped immutable revision reader. Saving a Skill fails closed without its full preview. */ loadSkillReview?: ((reference: NonNullable) => Promise) | undefined; /** * With `workspaceId` and `sessionId` (as on a full pending request), unsent * non-secret answers are kept per browser tab and restored when the card * mounts again, e.g. after visiting Settings and coming back. */ request: Pick & Partial>; /** * Resolve only once the response was accepted: the form then forgets the * unsent draft and clears secret fields. Reject when sending failed so the * card keeps what was typed for a retry. */ onSubmit: (response: SubmitHumanInputResponseRequest) => void | Promise; submitting?: boolean | undefined; error?: string | null | undefined; title?: ReactNode; description?: ReactNode; /** e.g. "1 of 2" when a host is stepping through parallel requests. */ progressLabel?: ReactNode; submitLabel?: string | undefined; skipLabel?: string | undefined; messages?: Partial | undefined; autoFocus?: boolean | undefined; /** Start collapsed to a compact bar (drafts still retained). */ defaultCollapsed?: boolean | undefined; /** * Answer a yes/no decision (one required choice between an accept and a * decline option, without Other) with two buttons instead of a radio list. * Off by default; embedded conversations turn it on. */ decisionButtons?: boolean | undefined; /** * Where this person may save an answer to a secret question. A request for * a target outside this list falls back to the most private allowed one, * with a note. Defaults to Only me, This task and This workspace. */ allowedSaveTo?: readonly HumanInputSecretSaveTo[] | undefined; className?: string | undefined; }; /** * Styled but host-neutral renderer for one structured request. Matches the * waiting-tone decision language of ApprovalSurface: question-first, compact * options, sticky ask/submit chrome. Hosts can replace title/description or * use `useHumanInputRequests` headlessly. */ export declare function HumanInputForm(props: HumanInputFormProps): import("react").JSX.Element; /** * A yes/no decision (an approval asked as a question): one required * single-choice question with exactly an accept and a decline option. It is * answered with two buttons; an "Other" free-text answer has no meaning for it, * and the composer still accepts a different instruction. */ export declare function binaryDecision(questions: readonly HumanInputQuestion[]): { question: HumanInputQuestion; accept: HumanInputQuestion["options"][number]; decline: HumanInputQuestion["options"][number]; } | null;