"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.escalateAndWaitSchema = exports.resolveEscalationSchema = exports.claimAndResolveSchema = exports.getAvailableWorkSchema = exports.checkResolutionSchema = exports.escalateSchema = void 0;
const zod_1 = require("zod");
// ── Schemas (extracted to break TS2589 deep-instantiation in registerTool generics) ──
exports.escalateSchema = zod_1.z.object({
    role: zod_1.z.string().describe('Target role for the escalation (e.g., "reviewer")'),
    message: zod_1.z.string().describe('Description of what needs human review'),
    data: zod_1.z.record(zod_1.z.any()).optional().describe('Contextual data for the reviewer'),
    type: zod_1.z.string().optional().default('mcp').describe('Escalation type classification'),
    subtype: zod_1.z.string().optional().default('tool_call').describe('Escalation subtype'),
    priority: zod_1.z.number().min(1).max(4).optional().default(2)
        .describe('Priority: 1 (highest) to 4 (lowest)'),
});
exports.checkResolutionSchema = zod_1.z.object({
    escalation_id: zod_1.z.string().describe('The escalation ID to check'),
});
exports.getAvailableWorkSchema = zod_1.z.object({
    role: zod_1.z.string().describe('Role to filter by'),
    limit: zod_1.z.number().optional().default(10).describe('Max results to return'),
});
exports.claimAndResolveSchema = zod_1.z.object({
    escalation_id: zod_1.z.string().describe('The escalation ID to claim and resolve'),
    resolver_id: zod_1.z.string().describe('Identifier for who/what is resolving'),
    payload: zod_1.z.record(zod_1.z.any()).describe('Resolution payload data'),
});
exports.resolveEscalationSchema = zod_1.z.object({
    escalation_id: zod_1.z.string().describe('The escalation ID to resolve'),
    payload: zod_1.z.record(zod_1.z.any()).describe('Resolution payload data'),
});
exports.escalateAndWaitSchema = zod_1.z.object({
    role: zod_1.z.string().describe('Target role for the escalation (e.g., "reviewer")'),
    message: zod_1.z.string().describe('Description of what input is needed from the human'),
    form_schema: zod_1.z.record(zod_1.z.any()).optional()
        .describe('JSON Schema for the resolver form. Use format:"password" for sensitive fields.'),
    data: zod_1.z.record(zod_1.z.any()).optional().describe('Contextual data for the reviewer'),
    assigned_to: zod_1.z.string().optional().describe('Auto-assign to a specific user'),
    type: zod_1.z.string().optional().default('mcp').describe('Escalation type classification'),
    subtype: zod_1.z.string().optional().default('wait_for_human').describe('Escalation subtype'),
    priority: zod_1.z.number().min(1).max(4).optional().default(1)
        .describe('Priority: 1 (highest) to 4 (lowest)'),
}).passthrough();
