"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.listStreamMessagesSchema = exports.getStreamStatsSchema = exports.applyThrottleSchema = exports.rollCallSchema = exports.listAppsSchema = exports.revokeBotKeySchema = exports.createBotApiKeySchema = exports.deleteBotSchema = exports.updateBotSchema = exports.createBotSchema = exports.getBotSchema = exports.listBotsSchema = exports.deleteAgentSubscriptionSchema = exports.createAgentSubscriptionSchema = exports.listAgentSubscriptionsSchema = exports.deleteAgentSchema = exports.updateAgentSchema = exports.createAgentSchema = exports.getAgentSchema = exports.listAgentsSchema = exports.pruneSchema = exports.addEscalationChainSchema = exports.createRoleSchema = exports.listRolesSchema = exports.removeUserRoleSchema = exports.addUserRoleSchema = exports.createUserSchema = exports.listUsersSchema = exports.invokeYamlWorkflowSchema = exports.deployYamlWorkflowSchema = exports.createYamlWorkflowSchema = exports.getYamlWorkflowSchema = exports.listYamlWorkflowsSchema = exports.disconnectMcpServerSchema = exports.connectMcpServerSchema = exports.updateMcpServerSchema = exports.listMcpServersSchema = exports.getWorkflowStatusSchema = exports.invokeWorkflowSchema = exports.listDiscoveredWorkflowsSchema = exports.deleteWorkflowConfigSchema = exports.upsertWorkflowConfigSchema = exports.listWorkflowConfigsSchema = exports.bulkTriageSchema = exports.releaseExpiredClaimsSchema = exports.claimEscalationSchema = exports.getEscalationStatsSchema = exports.findEscalationsSchema = exports.getProcessDetailSchema = exports.findTasksSchema = void 0;
exports.getExportStatusSchema = exports.exportWorkflowExecutionSchema = exports.exportWorkflowStateSchema = exports.listExportJobsSchema = exports.getSettingsSchema = exports.updatePrioritySchema = exports.bulkEscalateSchema = exports.bulkAssignSchema = exports.bulkClaimSchema = exports.resolveByMetadataSchema = exports.claimByMetadataSchema = exports.findByMetadataSchema = exports.deleteTopicSchema = exports.updateTopicSchema = exports.createTopicSchema = exports.getTopicSchema = exports.listTopicsSchema = exports.interruptJobSchema = exports.getJobExecutionSchema = exports.listPipelineJobsSchema = exports.listPipelineEntitiesSchema = void 0;
/**
 * Zod schemas for the admin MCP server tools.
 *
 * Each schema mirrors the exact parameter shape of the corresponding
 * REST API route handler. When a route accepts `req.query.status`,
 * the schema has `status: z.string().optional()`. When a route
 * reads `req.body.roles`, the schema has `roles: z.array(...)`.
 *
 * Schemas are extracted here (rather than inline) to avoid TS2589
 * deep-instantiation errors in the registerTool() generic.
 */
const zod_1 = require("zod");
// ── tasks (routes/tasks.ts) ─────────────────────────────────────────────────
exports.findTasksSchema = zod_1.z.object({
    status: zod_1.z.string().optional().describe('Filter: pending, completed, etc.'),
    workflow_type: zod_1.z.string().optional().describe('Filter by workflow type name'),
    workflow_id: zod_1.z.string().optional().describe('Filter by workflow execution ID'),
    origin_id: zod_1.z.string().optional().describe('Filter by origin/process ID'),
    limit: zod_1.z.number().int().min(1).max(100).optional().default(25),
    offset: zod_1.z.number().int().min(0).optional().default(0),
});
exports.getProcessDetailSchema = zod_1.z.object({
    origin_id: zod_1.z.string().describe('The origin ID (process ID) to look up'),
});
// ── escalations (routes/escalations/) ───────────────────────────────────────
exports.findEscalationsSchema = zod_1.z.object({
    status: zod_1.z.enum(['pending', 'resolved']).optional().describe('Filter by status'),
    role: zod_1.z.string().optional().describe('Filter by target role'),
    type: zod_1.z.string().optional().describe('Filter by escalation type'),
    priority: zod_1.z.number().int().min(1).max(4).optional().describe('Filter by priority (1=critical, 4=low)'),
    limit: zod_1.z.number().int().min(1).max(100).optional().default(25),
    offset: zod_1.z.number().int().min(0).optional().default(0),
});
exports.getEscalationStatsSchema = zod_1.z.object({
    period: zod_1.z.string().optional().describe('Time period: 1h, 24h, 7d, 30d'),
});
exports.claimEscalationSchema = zod_1.z.object({
    id: zod_1.z.string().describe('Escalation UUID'),
    duration_minutes: zod_1.z.number().int().optional().default(30)
        .describe('Lock duration in minutes'),
});
exports.releaseExpiredClaimsSchema = zod_1.z.object({});
exports.bulkTriageSchema = zod_1.z.object({
    ids: zod_1.z.array(zod_1.z.string()).min(1).describe('Escalation UUIDs to triage'),
    hint: zod_1.z.string().optional().describe('Remediation hint for the triage agent'),
});
// ── workflow config (routes/workflows/config.ts) ────────────────────────────
exports.listWorkflowConfigsSchema = zod_1.z.object({});
exports.upsertWorkflowConfigSchema = zod_1.z.object({
    workflow_type: zod_1.z.string().describe('Workflow function name'),
    invocable: zod_1.z.boolean().optional().default(false),
    task_queue: zod_1.z.string().nullable().optional().default(null),
    default_role: zod_1.z.string().optional().default('reviewer'),
    description: zod_1.z.string().nullable().optional().default(null),
    execute_as: zod_1.z.string().nullable().optional().default(null)
        .describe('Bot external_id to run as'),
    roles: zod_1.z.array(zod_1.z.string()).optional().default([]),
    invocation_roles: zod_1.z.array(zod_1.z.string()).optional().default([]),
    consumes: zod_1.z.array(zod_1.z.string()).optional().default([]),
    tool_tags: zod_1.z.array(zod_1.z.string()).optional().default([]),
    envelope_schema: zod_1.z.record(zod_1.z.any()).nullable().optional().default(null),
    resolver_schema: zod_1.z.record(zod_1.z.any()).nullable().optional().default(null),
    cron_schedule: zod_1.z.string().nullable().optional().default(null),
});
exports.deleteWorkflowConfigSchema = zod_1.z.object({
    workflow_type: zod_1.z.string().describe('Workflow type to de-certify'),
});
// ── workflows (routes/workflows/invocation.ts + discovery.ts) ───────────────
exports.listDiscoveredWorkflowsSchema = zod_1.z.object({
    include_system: zod_1.z.boolean().optional().default(false),
});
exports.invokeWorkflowSchema = zod_1.z.object({
    workflow_type: zod_1.z.string().describe('Registered workflow type name'),
    data: zod_1.z.record(zod_1.z.any()).describe('Business data for envelope.data'),
    metadata: zod_1.z.record(zod_1.z.any()).optional().describe('Control flow metadata'),
    execute_as: zod_1.z.string().optional().describe('Bot external_id override (admin only)'),
});
exports.getWorkflowStatusSchema = zod_1.z.object({
    workflow_id: zod_1.z.string().describe('HotMesh workflow ID'),
});
// ── mcp servers (routes/mcp.ts) ─────────────────────────────────────────────
exports.listMcpServersSchema = zod_1.z.object({
    status: zod_1.z.string().optional().describe('Filter: registered, connected, error, disconnected'),
    tags: zod_1.z.string().optional().describe('Comma-separated tag filter'),
    search: zod_1.z.string().optional().describe('Search name, description, or tool names'),
    limit: zod_1.z.number().int().min(1).max(100).optional().default(50),
    offset: zod_1.z.number().int().min(0).optional().default(0),
});
exports.updateMcpServerSchema = zod_1.z.object({
    id: zod_1.z.string().describe('Server UUID'),
    name: zod_1.z.string().optional(),
    description: zod_1.z.string().optional(),
    tags: zod_1.z.array(zod_1.z.string()).optional(),
    auto_connect: zod_1.z.boolean().optional(),
});
exports.connectMcpServerSchema = zod_1.z.object({
    id: zod_1.z.string().describe('Server UUID to connect'),
});
exports.disconnectMcpServerSchema = zod_1.z.object({
    id: zod_1.z.string().describe('Server UUID to disconnect'),
});
// ── yaml workflows (routes/yaml-workflows/) ─────────────────────────────────
exports.listYamlWorkflowsSchema = zod_1.z.object({
    status: zod_1.z.string().optional().describe('Filter: draft, deployed, active, archived'),
    app_id: zod_1.z.string().optional().describe('Filter by namespace'),
    search: zod_1.z.string().optional().describe('Search name, topic, description'),
    source_workflow_id: zod_1.z.string().optional(),
    limit: zod_1.z.number().int().min(1).max(100).optional().default(50),
    offset: zod_1.z.number().int().min(0).optional().default(0),
});
exports.getYamlWorkflowSchema = zod_1.z.object({
    id: zod_1.z.string().describe('YAML workflow UUID'),
});
exports.createYamlWorkflowSchema = zod_1.z.object({
    workflow_id: zod_1.z.string().describe('Source execution workflow ID'),
    task_queue: zod_1.z.string().describe('Task queue of the source execution'),
    workflow_name: zod_1.z.string().describe('Source workflow type name'),
    name: zod_1.z.string().describe('Name for the new compiled workflow'),
    description: zod_1.z.string().optional(),
    app_id: zod_1.z.string().optional().describe('Namespace (auto-generated if omitted)'),
    tags: zod_1.z.array(zod_1.z.string()).optional().describe('Discovery tags'),
    compilation_feedback: zod_1.z.string().optional().describe('Extra instructions for the compiler'),
});
exports.deployYamlWorkflowSchema = zod_1.z.object({
    id: zod_1.z.string().describe('YAML workflow UUID to deploy'),
});
exports.invokeYamlWorkflowSchema = zod_1.z.object({
    id: zod_1.z.string().describe('YAML workflow UUID'),
    data: zod_1.z.record(zod_1.z.any()).optional().default({}).describe('Input matching the workflow input_schema'),
    sync: zod_1.z.boolean().optional().default(false).describe('Wait for result'),
    timeout: zod_1.z.number().int().optional().describe('Timeout in ms for sync mode'),
});
// ── users (routes/users.ts) ─────────────────────────────────────────────────
exports.listUsersSchema = zod_1.z.object({
    role: zod_1.z.string().optional().describe('Filter by role name'),
    status: zod_1.z.string().optional().describe('Filter: active, inactive, suspended'),
    limit: zod_1.z.number().int().min(1).max(100).optional().default(50),
    offset: zod_1.z.number().int().min(0).optional().default(0),
});
exports.createUserSchema = zod_1.z.object({
    external_id: zod_1.z.string().describe('Stable user identifier'),
    display_name: zod_1.z.string().optional(),
    email: zod_1.z.string().optional(),
    roles: zod_1.z.array(zod_1.z.object({
        role: zod_1.z.string(),
        type: zod_1.z.enum(['superadmin', 'admin', 'member']),
    })).optional().default([]).describe('Roles to assign on creation'),
});
exports.addUserRoleSchema = zod_1.z.object({
    user_id: zod_1.z.string().describe('User UUID'),
    role: zod_1.z.string().describe('Role name'),
    type: zod_1.z.enum(['superadmin', 'admin', 'member']).describe('Permission level'),
});
exports.removeUserRoleSchema = zod_1.z.object({
    user_id: zod_1.z.string().describe('User UUID'),
    role: zod_1.z.string().describe('Role to remove'),
});
// ── roles (routes/roles.ts) ─────────────────────────────────────────────────
exports.listRolesSchema = zod_1.z.object({});
exports.createRoleSchema = zod_1.z.object({
    role: zod_1.z.string().describe('Lowercase alphanumeric role name (a-z, 0-9, hyphens, underscores)'),
});
exports.addEscalationChainSchema = zod_1.z.object({
    source_role: zod_1.z.string().describe('Originating role'),
    target_role: zod_1.z.string().describe('Destination role for escalation'),
});
// ── maintenance (routes/dba.ts) ─────────────────────────────────────────────
exports.pruneSchema = zod_1.z.object({
    expire: zod_1.z.string().optional().default('7 days').describe('Retention period (PostgreSQL interval)'),
    jobs: zod_1.z.boolean().optional().default(true).describe('Hard-delete expired jobs'),
    streams: zod_1.z.boolean().optional().default(true).describe('Hard-delete expired streams'),
    entities: zod_1.z.array(zod_1.z.string()).optional().describe('Entity allowlist'),
    prune_transient: zod_1.z.boolean().optional().default(false).describe('Delete transient jobs'),
});
// ── agents (routes/agents.ts) ───────────────────────────────────────────────
exports.listAgentsSchema = zod_1.z.object({
    status: zod_1.z.string().optional().describe('Filter by agent status'),
    knowledge_domain: zod_1.z.string().optional().describe('Filter by knowledge domain'),
    limit: zod_1.z.number().int().min(1).max(100).optional().default(25),
    offset: zod_1.z.number().int().min(0).optional().default(0),
});
exports.getAgentSchema = zod_1.z.object({
    id: zod_1.z.string().describe('Agent ID'),
});
exports.createAgentSchema = zod_1.z.object({
    id: zod_1.z.string().describe('Unique agent identifier'),
    description: zod_1.z.string().optional().describe('Agent description'),
    goals: zod_1.z.array(zod_1.z.string()).optional().describe('Agent goals'),
    rules: zod_1.z.array(zod_1.z.string()).optional().describe('Agent behavioral rules'),
    status: zod_1.z.string().optional().describe('Initial status'),
    knowledge_domain: zod_1.z.string().optional().describe('Knowledge domain'),
    schedules: zod_1.z.array(zod_1.z.any()).optional().describe('Cron schedules for the agent'),
    subscriptions: zod_1.z.array(zod_1.z.any()).optional().describe('Topic subscriptions for the agent'),
});
exports.updateAgentSchema = zod_1.z.object({
    id: zod_1.z.string().describe('Agent ID to update'),
    description: zod_1.z.string().optional().describe('Agent description'),
    goals: zod_1.z.array(zod_1.z.string()).optional().describe('Agent goals'),
    rules: zod_1.z.array(zod_1.z.string()).optional().describe('Agent behavioral rules'),
    status: zod_1.z.string().optional().describe('Agent status'),
    knowledge_domain: zod_1.z.string().optional().describe('Knowledge domain'),
});
exports.deleteAgentSchema = zod_1.z.object({
    id: zod_1.z.string().describe('Agent ID to delete'),
});
// ── agent subscriptions (routes/agents.ts) ──────────────────────────────────
exports.listAgentSubscriptionsSchema = zod_1.z.object({
    agent_id: zod_1.z.string().describe('Agent ID to list subscriptions for'),
});
exports.createAgentSubscriptionSchema = zod_1.z.object({
    agent_id: zod_1.z.string().describe('Agent ID to subscribe'),
    topic: zod_1.z.string().describe('Topic to subscribe to'),
    reaction_type: zod_1.z.string().describe('Reaction type (e.g. workflow, pipeline, prompt)'),
    workflow_type: zod_1.z.string().optional().describe('Workflow type to invoke'),
    pipeline_id: zod_1.z.string().optional().describe('Pipeline ID to invoke'),
    mcp_prompt: zod_1.z.string().optional().describe('MCP prompt to execute'),
    input_mapping: zod_1.z.record(zod_1.z.any()).optional().describe('Input mapping from event payload'),
    filter: zod_1.z.record(zod_1.z.any()).optional().describe('Event filter criteria'),
    execute_as: zod_1.z.string().optional().describe('Bot external_id to execute as'),
});
exports.deleteAgentSubscriptionSchema = zod_1.z.object({
    id: zod_1.z.string().describe('Subscription ID to delete'),
});
// ── bot accounts (routes/bot-accounts.ts) ───────────────────────────────────
exports.listBotsSchema = zod_1.z.object({
    limit: zod_1.z.number().int().min(1).max(100).optional().default(50),
    offset: zod_1.z.number().int().min(0).optional().default(0),
});
exports.getBotSchema = zod_1.z.object({
    id: zod_1.z.string().describe('Bot UUID'),
});
exports.createBotSchema = zod_1.z.object({
    name: zod_1.z.string().describe('Unique bot name (slug)'),
    description: zod_1.z.string().optional().describe('Bot description'),
    display_name: zod_1.z.string().optional().describe('Human-readable display name'),
    roles: zod_1.z.array(zod_1.z.object({
        role: zod_1.z.string(),
        type: zod_1.z.string(),
    })).optional().describe('Roles to assign on creation'),
});
exports.updateBotSchema = zod_1.z.object({
    id: zod_1.z.string().describe('Bot UUID'),
    display_name: zod_1.z.string().optional().describe('Updated display name'),
    description: zod_1.z.string().optional().describe('Updated description'),
    status: zod_1.z.string().optional().describe('Bot status'),
});
exports.deleteBotSchema = zod_1.z.object({
    id: zod_1.z.string().describe('Bot UUID to delete'),
});
exports.createBotApiKeySchema = zod_1.z.object({
    id: zod_1.z.string().describe('Bot UUID to create key for'),
    name: zod_1.z.string().describe('Key name/label'),
    scopes: zod_1.z.array(zod_1.z.string()).optional().describe('Permission scopes'),
    expires_at: zod_1.z.string().optional().describe('Expiration timestamp (ISO 8601)'),
});
exports.revokeBotKeySchema = zod_1.z.object({
    key_id: zod_1.z.string().describe('API key ID to revoke'),
});
// ── control plane (routes/controlplane.ts) ──────────────────────────────────
exports.listAppsSchema = zod_1.z.object({});
exports.rollCallSchema = zod_1.z.object({
    app_id: zod_1.z.string().optional().describe('Namespace to query'),
    delay: zod_1.z.number().int().optional().describe('Delay in ms before roll call'),
});
exports.applyThrottleSchema = zod_1.z.object({
    appId: zod_1.z.string().optional().describe('Namespace to throttle'),
    throttle: zod_1.z.number().int().describe('Throttle value (messages per second)'),
    topic: zod_1.z.string().optional().describe('Topic to throttle'),
    guid: zod_1.z.string().optional().describe('Specific GUID to throttle'),
    scope: zod_1.z.string().optional().describe('Throttle scope'),
});
exports.getStreamStatsSchema = zod_1.z.object({
    app_id: zod_1.z.string().optional().describe('Namespace to query'),
    duration: zod_1.z.string().optional().describe('Stats duration window'),
    stream: zod_1.z.string().optional().describe('Specific stream name'),
});
exports.listStreamMessagesSchema = zod_1.z.object({
    namespace: zod_1.z.string().describe('App namespace'),
    source: zod_1.z.string().describe('Message source'),
    limit: zod_1.z.number().int().min(1).max(100).optional().default(25),
    offset: zod_1.z.number().int().min(0).optional().default(0),
    sort_by: zod_1.z.string().optional().describe('Sort field'),
    order: zod_1.z.enum(['asc', 'desc']).optional().describe('Sort order'),
    status: zod_1.z.string().optional().describe('Filter by message status'),
    stream_name: zod_1.z.string().optional().describe('Filter by stream name'),
    msg_type: zod_1.z.string().optional().describe('Filter by message type'),
    topic: zod_1.z.string().optional().describe('Filter by topic'),
    workflow_name: zod_1.z.string().optional().describe('Filter by workflow name'),
    jid: zod_1.z.string().optional().describe('Filter by job ID'),
    aid: zod_1.z.string().optional().describe('Filter by activity ID'),
});
// ── pipelines (routes/pipelines.ts) ─────────────────────────────────────────
exports.listPipelineEntitiesSchema = zod_1.z.object({
    app_id: zod_1.z.string().optional().describe('Namespace to query'),
});
exports.listPipelineJobsSchema = zod_1.z.object({
    app_id: zod_1.z.string().optional().describe('Namespace to query'),
    limit: zod_1.z.number().int().min(1).max(100).optional().default(25),
    offset: zod_1.z.number().int().min(0).optional().default(0),
    entity: zod_1.z.string().optional().describe('Filter by entity type'),
    search: zod_1.z.string().optional().describe('Search term'),
    status: zod_1.z.string().optional().describe('Filter by job status'),
    sort_by: zod_1.z.string().optional().describe('Sort field'),
    order: zod_1.z.enum(['asc', 'desc']).optional().describe('Sort order'),
});
exports.getJobExecutionSchema = zod_1.z.object({
    job_id: zod_1.z.string().describe('Job ID to retrieve'),
    app_id: zod_1.z.string().optional().describe('Namespace'),
});
exports.interruptJobSchema = zod_1.z.object({
    job_id: zod_1.z.string().describe('Job ID to interrupt'),
    topic: zod_1.z.string().describe('Topic of the job'),
    app_id: zod_1.z.string().optional().describe('Namespace'),
});
// ── topics (routes/topics.ts) ───────────────────────────────────────────────
exports.listTopicsSchema = zod_1.z.object({
    category: zod_1.z.string().optional().describe('Filter by category'),
    search: zod_1.z.string().optional().describe('Search term'),
    limit: zod_1.z.number().int().min(1).max(100).optional().default(50),
    offset: zod_1.z.number().int().min(0).optional().default(0),
});
exports.getTopicSchema = zod_1.z.object({
    topic: zod_1.z.string().describe('Topic name'),
});
exports.createTopicSchema = zod_1.z.object({
    topic: zod_1.z.string().describe('Unique topic name'),
    category: zod_1.z.string().describe('Topic category'),
    description: zod_1.z.string().optional().describe('Topic description'),
    payload_schema: zod_1.z.record(zod_1.z.any()).optional().describe('JSON Schema for event payloads'),
    example_payload: zod_1.z.record(zod_1.z.any()).optional().describe('Example payload'),
    tags: zod_1.z.array(zod_1.z.string()).optional().describe('Discovery tags'),
});
exports.updateTopicSchema = zod_1.z.object({
    topic: zod_1.z.string().describe('Topic name to update'),
    description: zod_1.z.string().optional().describe('Updated description'),
    category: zod_1.z.string().optional().describe('Updated category'),
    payload_schema: zod_1.z.record(zod_1.z.any()).optional().describe('Updated payload schema'),
    example_payload: zod_1.z.record(zod_1.z.any()).optional().describe('Updated example payload'),
    tags: zod_1.z.array(zod_1.z.string()).optional().describe('Updated tags'),
});
exports.deleteTopicSchema = zod_1.z.object({
    topic: zod_1.z.string().describe('Topic name to delete'),
});
// ── escalation metadata/bulk (routes/escalations/) ──────────────────────────
exports.findByMetadataSchema = zod_1.z.object({
    key: zod_1.z.string().describe('Metadata key to search'),
    value: zod_1.z.string().describe('Metadata value to match'),
    status: zod_1.z.string().optional().describe('Filter by escalation status'),
    limit: zod_1.z.number().int().min(1).max(100).optional().default(25),
    offset: zod_1.z.number().int().min(0).optional().default(0),
});
exports.claimByMetadataSchema = zod_1.z.object({
    key: zod_1.z.string().describe('Metadata key to match'),
    value: zod_1.z.string().describe('Metadata value to match'),
    durationMinutes: zod_1.z.number().int().optional().describe('Lock duration in minutes'),
    assignee: zod_1.z.string().optional().describe('Assignee user ID'),
    metadata: zod_1.z.record(zod_1.z.any()).optional().describe('Additional metadata to attach'),
});
exports.resolveByMetadataSchema = zod_1.z.object({
    key: zod_1.z.string().describe('Metadata key to match'),
    value: zod_1.z.string().describe('Metadata value to match'),
    resolverPayload: zod_1.z.record(zod_1.z.any()).describe('Resolution payload'),
    assignee: zod_1.z.string().optional().describe('Assignee user ID'),
    metadata: zod_1.z.record(zod_1.z.any()).optional().describe('Additional metadata to attach'),
});
exports.bulkClaimSchema = zod_1.z.object({
    ids: zod_1.z.array(zod_1.z.string()).min(1).describe('Escalation UUIDs to claim'),
    durationMinutes: zod_1.z.number().int().optional().describe('Lock duration in minutes'),
});
exports.bulkAssignSchema = zod_1.z.object({
    ids: zod_1.z.array(zod_1.z.string()).min(1).describe('Escalation UUIDs to assign'),
    targetUserId: zod_1.z.string().describe('User ID to assign to'),
    durationMinutes: zod_1.z.number().int().optional().describe('Lock duration in minutes'),
});
exports.bulkEscalateSchema = zod_1.z.object({
    ids: zod_1.z.array(zod_1.z.string()).min(1).describe('Escalation UUIDs to escalate'),
    targetRole: zod_1.z.string().describe('Role to escalate to'),
});
exports.updatePrioritySchema = zod_1.z.object({
    ids: zod_1.z.array(zod_1.z.string()).min(1).describe('Escalation UUIDs to update'),
    priority: zod_1.z.number().int().min(1).max(4).describe('New priority (1=critical, 4=low)'),
});
// ── settings (routes/settings.ts) ───────────────────────────────────────────
exports.getSettingsSchema = zod_1.z.object({});
// ── exports (routes/exports.ts) ─────────────────────────────────────────────
exports.listExportJobsSchema = zod_1.z.object({
    limit: zod_1.z.number().int().min(1).max(100).optional().default(25),
    offset: zod_1.z.number().int().min(0).optional().default(0),
    entity: zod_1.z.string().optional().describe('Filter by entity type'),
    search: zod_1.z.string().optional().describe('Search term'),
    status: zod_1.z.string().optional().describe('Filter by export status'),
    sort_by: zod_1.z.string().optional().describe('Sort field'),
    order: zod_1.z.enum(['asc', 'desc']).optional().describe('Sort order'),
    registered: zod_1.z.string().optional().describe('Filter by registered status'),
});
exports.exportWorkflowStateSchema = zod_1.z.object({
    workflow_id: zod_1.z.string().describe('Workflow ID to export'),
    allow: zod_1.z.array(zod_1.z.string()).optional().describe('Allowlisted field paths'),
    block: zod_1.z.array(zod_1.z.string()).optional().describe('Blocklisted field paths'),
    values: zod_1.z.record(zod_1.z.any()).optional().describe('Override values'),
});
exports.exportWorkflowExecutionSchema = zod_1.z.object({
    workflow_id: zod_1.z.string().describe('Workflow ID to export'),
    excludeSystem: zod_1.z.boolean().optional().describe('Exclude system activities'),
    omitResults: zod_1.z.boolean().optional().describe('Omit activity results'),
    mode: zod_1.z.string().optional().describe('Export mode'),
    maxDepth: zod_1.z.number().int().optional().describe('Max traversal depth'),
});
exports.getExportStatusSchema = zod_1.z.object({
    workflow_id: zod_1.z.string().describe('Workflow ID to check export status'),
});
