"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.agentSuggestionsModelSchema = void 0;
const zod_1 = require("zod");
const types_1 = require("../types");
const promptChipModelSchema = zod_1.z.object({
    kind: zod_1.z.literal('prompt'),
    label: zod_1.z
        .string()
        .min(5)
        .max(120)
        .describe('Concrete, executable question the agent could answer. Imperative or interrogative tense. No trailing punctuation.'),
    tool: zod_1.z
        .enum(types_1.AGENT_SUGGESTION_TOOLS)
        .describe('Best-fit tool for this chip. Used as a soft hint to bias the agent toward the right tool on the next turn.'),
    defaults: zod_1.z
        .object({
        explore: zod_1.z
            .string()
            .nullable()
            .describe('Name of the explore the chip implies. Null when the chip is not explore-specific.'),
        dimensions: zod_1.z
            .array(zod_1.z.string())
            .describe('Field IDs the chip implies. Empty array when the chip does not pin dimensions.'),
        metrics: zod_1.z
            .array(zod_1.z.string())
            .describe('Metric field IDs the chip implies. Empty array when the chip does not pin metrics.'),
        timeframe: zod_1.z
            .string()
            .nullable()
            .describe('Human-readable timeframe (e.g. "last 30 days"). Null when not time-bound.'),
    })
        .describe('Structured payload accompanying the chip label.'),
});
// Navigate chips are only valid for empty-state suggestions and only point at
// threads the user authored. The model emits an index into the
// recentUserConversations array supplied in the user message; the server
// resolves that index to a thread UUID and builds a URL post-generation.
const navigateChipModelSchema = zod_1.z.object({
    kind: zod_1.z.literal('navigate'),
    label: zod_1.z
        .string()
        .min(5)
        .max(120)
        .describe('Short navigation label, e.g. "Continue your funnel conversion analysis". No trailing punctuation.'),
    recentConversationIndex: zod_1.z
        .number()
        .int()
        .min(0)
        .max(10)
        .describe('Index into recentUserConversations identifying the thread to open. The server resolves this to a real URL — you do not need to know UUIDs.'),
});
exports.agentSuggestionsModelSchema = zod_1.z.object({
    chips: zod_1.z
        .array(zod_1.z.discriminatedUnion('kind', [
        promptChipModelSchema,
        navigateChipModelSchema,
    ]))
        .min(2)
        .max(6)
        .describe('Between 2 and 6 suggestion chips.'),
});
//# sourceMappingURL=agentSuggestions.js.map