import type { Question } from "../questions/domain/question.schema.js"; type SingleChoiceSchema = { type: "string"; enum: string[]; description: string; }; type MultiChoiceSchema = { type: "array"; items: { type: "string"; enum: string[]; }; description: string; }; type ChoiceSchema = SingleChoiceSchema | MultiChoiceSchema; /** * Translates a Question into an MCP `elicitation/create` request payload. * The schema has one property named `choice` — a string-with-enum for * single-select, an array-of-enum-strings for multi-select. * * Per-option `description` text is packed into the property `description` * joined by ` | ` (MCP `requestedSchema` has no slot for per-option * descriptions; this is the spec's accepted lossy mapping). * * @param q - The question to translate. * @returns An MCP `elicitation/create` request payload. */ export declare function buildElicitationCreate(q: Question): { message: string; requestedSchema: { type: "object"; properties: { choice: ChoiceSchema; }; required: ["choice"]; }; }; /** * Flattens an accepted elicitation `choice` value into the user-message * format Slice 4 produces. Returns `null` when the choice is missing, * empty, or contains no values that match `q.options` — MCP clients can * be buggy or non-conformant, so values are validated against the * declared enum before being persisted as a user message. * * For multi-select questions, items that are not strings or not in the * options list are dropped silently; if no items remain, returns null. * * @param q - The question the choice answers. * @param choice - The raw value from the elicitation response. * @returns A formatted string or `null` if no valid choice remains. */ export declare function flattenChoice(q: Question, choice: unknown): string | null; export {};