"use strict";
// ── Escalation tool manifests ────────────────────────────────────────────────
Object.defineProperty(exports, "__esModule", { value: true });
exports.HUMAN_QUEUE_TOOLS = void 0;
exports.HUMAN_QUEUE_TOOLS = [
    {
        name: 'escalate_to_human',
        description: 'Create a new escalation for human review. Returns the escalation ID.',
        inputSchema: {
            type: 'object',
            properties: {
                role: { type: 'string', description: 'Target role for the escalation (e.g., "reviewer")' },
                message: { type: 'string', description: 'Description of what needs human review' },
                data: { type: 'object', description: 'Contextual data for the reviewer' },
                type: { type: 'string', description: 'Escalation type classification', default: 'mcp' },
                subtype: { type: 'string', description: 'Escalation subtype', default: 'tool_call' },
                priority: { type: 'number', description: 'Priority: 1 (highest) to 4 (lowest)', default: 2 },
            },
            required: ['role', 'message'],
        },
    },
    {
        name: 'check_resolution',
        description: 'Check the status of an escalation. Returns status and resolver payload if resolved.',
        inputSchema: {
            type: 'object',
            properties: {
                escalation_id: { type: 'string', description: 'The escalation ID to check' },
            },
            required: ['escalation_id'],
        },
    },
    {
        name: 'get_available_work',
        description: 'List available escalations for a role. Returns pending, unassigned escalations.',
        inputSchema: {
            type: 'object',
            properties: {
                role: { type: 'string', description: 'Role to filter by' },
                limit: { type: 'number', description: 'Max results to return', default: 10 },
            },
            required: ['role'],
        },
    },
    {
        name: 'claim_and_resolve',
        description: 'Claim an escalation and immediately resolve it with a payload. Atomic operation.',
        inputSchema: {
            type: 'object',
            properties: {
                escalation_id: { type: 'string', description: 'The escalation ID to claim and resolve' },
                resolver_id: { type: 'string', description: 'Identifier for who/what is resolving' },
                payload: { type: 'object', description: 'Resolution payload data' },
            },
            required: ['escalation_id', 'resolver_id', 'payload'],
        },
    },
    {
        name: 'escalate_and_wait',
        description: 'Create an escalation and pause the workflow until a human responds. Returns a signal ID that the workflow uses to wait durably. Preferred over escalate_to_human + check_resolution polling.',
        inputSchema: {
            type: 'object',
            properties: {
                role: { type: 'string', description: 'Target role for the escalation (e.g., "reviewer")' },
                message: { type: 'string', description: 'Description of what input is needed from the human' },
                form_schema: { type: 'object', description: 'JSON Schema for the resolver form. Use format:"password" for sensitive fields.' },
                data: { type: 'object', description: 'Contextual data for the reviewer' },
                assigned_to: { type: 'string', description: 'Auto-assign to a specific user' },
                type: { type: 'string', description: 'Escalation type classification', default: 'mcp' },
                subtype: { type: 'string', description: 'Escalation subtype', default: 'wait_for_human' },
                priority: { type: 'number', description: 'Priority: 1 (highest) to 4 (lowest)', default: 1 },
            },
            required: ['role', 'message'],
        },
    },
];
