"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.intentRequestSchema = exports.usoConfigSchema = exports.guardrailPolicySchema = void 0;
const zod_1 = require("zod");
exports.guardrailPolicySchema = zod_1.z.object({
    maxSpendSol: zod_1.z.number().positive().optional(),
    allowedClusters: zod_1.z
        .array(zod_1.z.enum(["localnet", "devnet", "testnet", "mainnet-beta"]))
        .optional(),
    allowedPrograms: zod_1.z.array(zod_1.z.string().min(1)).optional(),
    requireSimulationPass: zod_1.z.boolean().optional(),
    blockOnUnknownIntent: zod_1.z.boolean().optional(),
    blockUnsafeHealActions: zod_1.z.boolean().optional(),
    allowAutoHealDeploy: zod_1.z.boolean().optional(),
});
exports.usoConfigSchema = zod_1.z.object({
    projectRoot: zod_1.z.string().min(1),
    telemetry: zod_1.z
        .object({
        enabled: zod_1.z.boolean(),
        mode: zod_1.z.literal("local"),
        logDir: zod_1.z.string().optional(),
    })
        .optional(),
    guardrails: exports.guardrailPolicySchema.optional(),
    runtime: zod_1.z
        .object({
        preferWsl: zod_1.z.boolean().optional(),
        distro: zod_1.z.string().optional(),
        shell: zod_1.z.enum(["powershell", "bash"]).optional(),
    })
        .optional(),
    healing: zod_1.z
        .object({
        enabled: zod_1.z.boolean(),
        maxAttempts: zod_1.z.number().int().min(1).max(5),
        backoffMs: zod_1.z.number().int().min(0).max(30000),
    })
        .optional(),
});
exports.intentRequestSchema = zod_1.z.object({
    id: zod_1.z.string().optional(),
    intent: zod_1.z.string().min(1),
    context: zod_1.z.record(zod_1.z.unknown()).optional(),
    routeHint: zod_1.z.enum(["native", "wsl", "auto"]).optional(),
});
//# sourceMappingURL=schema.js.map