import { type Static, Type } from "typebox";
export declare const MAX_QUESTIONS = 4;
export declare const MIN_OPTIONS = 2;
export declare const MAX_OPTIONS = 4;
export declare const MAX_HEADER_LENGTH = 16;
export declare const MAX_LABEL_LENGTH = 60;
/**
 * User-facing labels for the three runtime sentinel rows, keyed by their
 * `WrappingSelectItem.kind` discriminator. Sourced from
 * `ROW_INTENT_META` via `LABELS_BY_KIND` (`row-intent.ts`) — single source of
 * truth. Adding a new sentinel requires extending the `WrappingSelectItem`
 * union AND adding an entry to `ROW_INTENT_META`; this map then auto-extends.
 */
export declare const SENTINEL_LABELS: {
    readonly chat: string;
    readonly next: string;
    readonly other: string;
};
export type SentinelKind = keyof typeof SENTINEL_LABELS;
export type SentinelLabel = (typeof SENTINEL_LABELS)[SentinelKind];
/**
 * Labels reserved for Pi-internal sentinels — authoring an option with any
 * of these labels triggers the `reserved_label` runtime guard. Three of the
 * four come from `ROW_INTENT_META` (the runtime kinds); `"Other"` is
 * reserved for CC parity only (the model is conditioned to reach for
 * "Other" in CC; we reject it so the runtime sentinel is the single source
 * of truth) and has no runtime kind.
 *
 * Reserved unconditionally — multiSelect questions also reject these labels
 * even though the runtime sentinel is suppressed there.
 *
 * Order is pinned by `types.test.ts:292` — keep the explicit
 * `["Other", other, chat, next]` literal so consumers using
 * `RESERVED_LABELS[i]` indexing or `Set` membership see no behavior change.
 */
export declare const RESERVED_LABELS: readonly ["Other", string, string, string];
export type ReservedLabel = (typeof RESERVED_LABELS)[number];
export declare const OptionSchema: Type.TObject<{
    label: Type.TString;
    description: Type.TString;
    preview: Type.TOptional<Type.TString>;
}>;
export declare const QuestionSchema: Type.TObject<{
    question: Type.TString;
    header: Type.TString;
    options: Type.TArray<Type.TObject<{
        label: Type.TString;
        description: Type.TString;
        preview: Type.TOptional<Type.TString>;
    }>>;
    multiSelect: Type.TOptional<Type.TBoolean>;
}>;
export declare const QuestionsSchema: Type.TArray<Type.TObject<{
    question: Type.TString;
    header: Type.TString;
    options: Type.TArray<Type.TObject<{
        label: Type.TString;
        description: Type.TString;
        preview: Type.TOptional<Type.TString>;
    }>>;
    multiSelect: Type.TOptional<Type.TBoolean>;
}>>;
export declare const QuestionParamsSchema: Type.TObject<{
    questions: Type.TArray<Type.TObject<{
        question: Type.TString;
        header: Type.TString;
        options: Type.TArray<Type.TObject<{
            label: Type.TString;
            description: Type.TString;
            preview: Type.TOptional<Type.TString>;
        }>>;
        multiSelect: Type.TOptional<Type.TBoolean>;
    }>>;
}>;
export type OptionData = Static<typeof OptionSchema>;
export type QuestionData = Static<typeof QuestionSchema>;
export type QuestionParams = Static<typeof QuestionParamsSchema>;
/**
 * Answer-intent discriminated union. `kind` is the single discriminator —
 * pre-1.0.3 boolean flags have been removed (see `banned-flags.test.ts`).
 * Mirrors the row-side `WrappingSelectItem.kind` vocabulary where possible;
 * `multi` is the multi-select variant (no row-side analog).
 *
 * Variant semantics:
 * - `option`: user picked one of the author-defined options. `answer` is the option's label.
 * - `custom`: user typed free-text via the "Type something." row. `answer` is the typed text or null.
 * - `chat`: user picked the chat sentinel. `answer` is the literal "Chat about this".
 * - `multi`: user committed multi-select choices. `selected` carries chosen labels; `answer` is null.
 */
export interface QuestionAnswer {
    questionIndex: number;
    question: string;
    kind: "option" | "custom" | "chat" | "multi";
    answer: string | null;
    selected?: string[];
    notes?: string;
    /**
     * Markdown text from the matched option's `preview` field, populated only
     * when the user lands on a single-select option carrying a `preview`.
     * Used by `buildQuestionnaireResponse` to echo `selected preview: <preview>`
     * into the LLM-facing envelope. Undefined for multi-select, custom-text
     * (`kind: "custom"`), and chat (`kind: "chat"`) answers.
     */
    preview?: string;
}
export type QuestionnaireError = "no_ui" | "no_questions" | "empty_options" | "too_many_questions" | "duplicate_question" | "duplicate_option_label" | "reserved_label";
export interface QuestionnaireResult {
    answers: QuestionAnswer[];
    cancelled: boolean;
    error?: QuestionnaireError;
}
export declare function isQuestionnaireResult(value: unknown): value is QuestionnaireResult;
//# sourceMappingURL=types.d.ts.map