import type { ElicitationQuestion, ElicitationRequest } from '../elicitation.js'; import type { OpenCodeForm, OpenCodeFormField, OpenCodeFormValue } from './client.js'; /** An OpenCode form field as a stream-protocol question (`elicitation`, *Asking the user*). */ export declare function toQuestion(field: OpenCodeFormField): ElicitationQuestion; /** The fields of a form, skipping anything that is not one. */ export declare function formFields(form: Pick): OpenCodeFormField[]; /** The elicitation an OpenCode form streams as, under `id` (the tool-call id it is answered through). */ export declare function toElicitation(id: string, form: OpenCodeForm): ElicitationRequest; /** An answer a form field cannot take. */ export declare class FormAnswerError extends Error { constructor(message: string); } /** * The protocol's answers (question id → canonical strings) as OpenCode's form reply: numbers as * numbers, booleans as booleans, multiple choice as a list. Questions left out take their defaults; * a value a question can't take throws {@link FormAnswerError}. */ export declare function toFormAnswer(form: OpenCodeForm, answers?: Record): Record; //# sourceMappingURL=forms.d.ts.map