'use strict';

var chunk2GEO7VUJ_cjs = require('./chunk-2GEO7VUJ.cjs');
var chunkJX4UGU4A_cjs = require('./chunk-JX4UGU4A.cjs');
var chunkBVZLX6R4_cjs = require('./chunk-BVZLX6R4.cjs');
var chunkURAYY3ZG_cjs = require('./chunk-URAYY3ZG.cjs');
var chunkEG3QNCBQ_cjs = require('./chunk-EG3QNCBQ.cjs');
var chunk4WXROF2X_cjs = require('./chunk-4WXROF2X.cjs');
var chunkSUNXO2H2_cjs = require('./chunk-SUNXO2H2.cjs');
var chunkOMLB6EMJ_cjs = require('./chunk-OMLB6EMJ.cjs');
var chunkPG4IJL7T_cjs = require('./chunk-PG4IJL7T.cjs');
var chunkY6MWNLAA_cjs = require('./chunk-Y6MWNLAA.cjs');
var chunkUQ2H32RT_cjs = require('./chunk-UQ2H32RT.cjs');
var chunkKEAF4TVC_cjs = require('./chunk-KEAF4TVC.cjs');
var chunkGPLCXP3B_cjs = require('./chunk-GPLCXP3B.cjs');
var chunkOG3CV6IN_cjs = require('./chunk-OG3CV6IN.cjs');
var chunkDZWFQD53_cjs = require('./chunk-DZWFQD53.cjs');
var chunkDZXHO72E_cjs = require('./chunk-DZXHO72E.cjs');
var chunk2CT57Y5S_cjs = require('./chunk-2CT57Y5S.cjs');
var chunkR3R6VJRM_cjs = require('./chunk-R3R6VJRM.cjs');
var chunkMFBVMCPB_cjs = require('./chunk-MFBVMCPB.cjs');
var chunkPYZAUXQX_cjs = require('./chunk-PYZAUXQX.cjs');
var chunkW3FAEXOQ_cjs = require('./chunk-W3FAEXOQ.cjs');
var chunk3T7LIPHA_cjs = require('./chunk-3T7LIPHA.cjs');
var chunkDBG7BFWZ_cjs = require('./chunk-DBG7BFWZ.cjs');
var chunkJTMIZMGO_cjs = require('./chunk-JTMIZMGO.cjs');
var chunkXHA6OBT3_cjs = require('./chunk-XHA6OBT3.cjs');
var chunkY65G4C35_cjs = require('./chunk-Y65G4C35.cjs');
var chunkNPMJ6FRL_cjs = require('./chunk-NPMJ6FRL.cjs');
var chunk3BL73LS3_cjs = require('./chunk-3BL73LS3.cjs');
var chunkKDZIZ3LV_cjs = require('./chunk-KDZIZ3LV.cjs');
var chunkCUMEATMZ_cjs = require('./chunk-CUMEATMZ.cjs');
var chunkYSC2EP5G_cjs = require('./chunk-YSC2EP5G.cjs');
var chunk2SYGQRXY_cjs = require('./chunk-2SYGQRXY.cjs');
var chunk3SPUSGBT_cjs = require('./chunk-3SPUSGBT.cjs');
var chunkM7VWAJP3_cjs = require('./chunk-M7VWAJP3.cjs');

// src/server/server-adapter/routes/permissions.ts
var METHOD_TO_ACTION = {
  GET: "read",
  POST: "write",
  // Default for POST, may be overridden to 'execute'
  PUT: "write",
  PATCH: "write",
  DELETE: "delete"
};
var EXECUTE_PATTERNS = [
  "/generate",
  "/stream",
  "/execute",
  "/start",
  "/resume",
  "/restart",
  "/cancel",
  "/approve",
  "/decline",
  "/speak",
  "/listen",
  "/query",
  "/search",
  "/observe",
  "/time-travel",
  "/enhance",
  "/clone"
];
function extractResource(path) {
  const segments = path.replace(/^\//, "").split("/");
  if (segments.length === 0) {
    return null;
  }
  const firstSegment = segments[0];
  if (firstSegment === "stored" && segments[1] === "agents") {
    return "stored-agents";
  }
  if (firstSegment === ".well-known") {
    return "a2a";
  }
  return firstSegment || null;
}
function deriveAction(method, path) {
  const upperMethod = method.toUpperCase();
  if (upperMethod === "POST") {
    const isExecuteOperation = EXECUTE_PATTERNS.some((pattern) => path.includes(pattern));
    return isExecuteOperation ? "execute" : "write";
  }
  return METHOD_TO_ACTION[upperMethod] || "read";
}
function derivePermission(route) {
  if (route.method === "ALL") {
    return null;
  }
  const resource = extractResource(route.path);
  if (!resource) {
    return null;
  }
  const action = deriveAction(route.method, route.path);
  return `${resource}:${action}`;
}
function getEffectivePermission(route) {
  if (route.requiresAuth === false) {
    return null;
  }
  if (route.requiresPermission) {
    return route.requiresPermission;
  }
  return derivePermission(route);
}

// src/server/server-adapter/routes/a2a.ts
var A2A_ROUTES = [chunkCUMEATMZ_cjs.GET_AGENT_CARD_ROUTE, chunkCUMEATMZ_cjs.AGENT_EXECUTION_ROUTE];

// src/server/server-adapter/routes/agents.ts
var AGENTS_ROUTES = [
  // ============================================================================
  // Agent Core Routes
  // ============================================================================
  chunk2SYGQRXY_cjs.LIST_AGENTS_ROUTE,
  chunk2SYGQRXY_cjs.GET_PROVIDERS_ROUTE,
  chunk2SYGQRXY_cjs.GET_AGENT_BY_ID_ROUTE,
  chunk2SYGQRXY_cjs.CLONE_AGENT_ROUTE,
  // ============================================================================
  // Voice Routes
  // ============================================================================
  chunkW3FAEXOQ_cjs.GET_SPEAKERS_ROUTE,
  chunkW3FAEXOQ_cjs.GET_SPEAKERS_DEPRECATED_ROUTE,
  // ============================================================================
  // Agent Execution Routes
  // ============================================================================
  chunk2SYGQRXY_cjs.GENERATE_AGENT_ROUTE,
  chunk2SYGQRXY_cjs.GENERATE_AGENT_VNEXT_ROUTE,
  chunk2SYGQRXY_cjs.STREAM_GENERATE_ROUTE,
  chunk2SYGQRXY_cjs.STREAM_UNTIL_IDLE_GENERATE_ROUTE,
  chunk2SYGQRXY_cjs.STREAM_GENERATE_VNEXT_DEPRECATED_ROUTE,
  // ============================================================================
  // Resumable Stream Routes
  // ============================================================================
  chunk2SYGQRXY_cjs.OBSERVE_AGENT_STREAM_ROUTE,
  chunk2SYGQRXY_cjs.SEND_AGENT_SIGNAL_ROUTE,
  chunk2SYGQRXY_cjs.SUBSCRIBE_AGENT_THREAD_ROUTE,
  // ============================================================================
  // Tool Routes
  // ============================================================================
  chunkMFBVMCPB_cjs.EXECUTE_AGENT_TOOL_ROUTE,
  chunk2SYGQRXY_cjs.APPROVE_TOOL_CALL_ROUTE,
  chunk2SYGQRXY_cjs.DECLINE_TOOL_CALL_ROUTE,
  chunk2SYGQRXY_cjs.RESUME_STREAM_ROUTE,
  chunk2SYGQRXY_cjs.APPROVE_TOOL_CALL_GENERATE_ROUTE,
  chunk2SYGQRXY_cjs.DECLINE_TOOL_CALL_GENERATE_ROUTE,
  chunk2SYGQRXY_cjs.APPROVE_NETWORK_TOOL_CALL_ROUTE,
  chunk2SYGQRXY_cjs.DECLINE_NETWORK_TOOL_CALL_ROUTE,
  chunk2SYGQRXY_cjs.RESUME_STREAM_UNTIL_IDLE_ROUTE,
  // ============================================================================
  // Network Routes
  // ============================================================================
  chunk2SYGQRXY_cjs.STREAM_NETWORK_ROUTE,
  // ============================================================================
  // Model Management Routes
  // ============================================================================
  chunk2SYGQRXY_cjs.UPDATE_AGENT_MODEL_ROUTE,
  chunk2SYGQRXY_cjs.RESET_AGENT_MODEL_ROUTE,
  chunk2SYGQRXY_cjs.REORDER_AGENT_MODEL_LIST_ROUTE,
  chunk2SYGQRXY_cjs.UPDATE_AGENT_MODEL_IN_MODEL_LIST_ROUTE,
  // ============================================================================
  // Instruction Enhancement Routes
  // ============================================================================
  chunk2SYGQRXY_cjs.ENHANCE_INSTRUCTIONS_ROUTE,
  // ============================================================================
  // Agent Tool Routes
  // ============================================================================
  chunkMFBVMCPB_cjs.GET_AGENT_TOOL_ROUTE,
  // ============================================================================
  // Agent Skill Routes
  // ============================================================================
  chunk2SYGQRXY_cjs.GET_AGENT_SKILL_ROUTE,
  // ============================================================================
  // Voice/Speech Routes
  // ============================================================================
  chunkW3FAEXOQ_cjs.GENERATE_SPEECH_ROUTE,
  chunkW3FAEXOQ_cjs.GENERATE_SPEECH_DEPRECATED_ROUTE,
  chunkW3FAEXOQ_cjs.TRANSCRIBE_SPEECH_ROUTE,
  chunkW3FAEXOQ_cjs.TRANSCRIBE_SPEECH_DEPRECATED_ROUTE,
  chunkW3FAEXOQ_cjs.GET_LISTENER_ROUTE,
  // ============================================================================
  // Deprecated Routes
  // ============================================================================
  chunk2SYGQRXY_cjs.STREAM_VNEXT_DEPRECATED_ROUTE,
  chunk2SYGQRXY_cjs.STREAM_UI_MESSAGE_VNEXT_DEPRECATED_ROUTE,
  chunk2SYGQRXY_cjs.STREAM_UI_MESSAGE_DEPRECATED_ROUTE
];

// src/server/server-adapter/routes/background-tasks.ts
var BACKGROUND_TASK_ROUTES = [
  chunkDZWFQD53_cjs.BACKGROUND_TASK_STREAM_ROUTE,
  chunkDZWFQD53_cjs.LIST_BACKGROUND_TASKS_ROUTE,
  chunkDZWFQD53_cjs.GET_BACKGROUND_TASK_ROUTE
];

// src/server/server-adapter/routes/channels.ts
var CHANNELS_ROUTES = [
  chunkDZXHO72E_cjs.LIST_CHANNEL_PLATFORMS_ROUTE,
  chunkDZXHO72E_cjs.LIST_CHANNEL_INSTALLATIONS_ROUTE,
  chunkDZXHO72E_cjs.CONNECT_CHANNEL_ROUTE,
  chunkDZXHO72E_cjs.DISCONNECT_CHANNEL_ROUTE
];

// src/server/server-adapter/routes/conversations.ts
var CONVERSATIONS_ROUTES = [
  chunkKDZIZ3LV_cjs.CREATE_CONVERSATION_ROUTE,
  chunkKDZIZ3LV_cjs.GET_CONVERSATION_ROUTE,
  chunkKDZIZ3LV_cjs.GET_CONVERSATION_ITEMS_ROUTE,
  chunkKDZIZ3LV_cjs.DELETE_CONVERSATION_ROUTE
];

// src/server/server-adapter/routes/datasets.ts
var DATASETS_ROUTES = [
  // Dataset CRUD
  chunk2CT57Y5S_cjs.LIST_DATASETS_ROUTE,
  chunk2CT57Y5S_cjs.CREATE_DATASET_ROUTE,
  chunk2CT57Y5S_cjs.GET_DATASET_ROUTE,
  chunk2CT57Y5S_cjs.UPDATE_DATASET_ROUTE,
  chunk2CT57Y5S_cjs.DELETE_DATASET_ROUTE,
  // Item list and add
  chunk2CT57Y5S_cjs.LIST_ITEMS_ROUTE,
  chunk2CT57Y5S_cjs.ADD_ITEM_ROUTE,
  // Batch operations - MUST come before item-specific routes to avoid /items/batch matching /items/:itemId
  chunk2CT57Y5S_cjs.BATCH_INSERT_ITEMS_ROUTE,
  chunk2CT57Y5S_cjs.BATCH_DELETE_ITEMS_ROUTE,
  // Item-specific CRUD (uses :itemId param)
  chunk2CT57Y5S_cjs.GET_ITEM_ROUTE,
  chunk2CT57Y5S_cjs.UPDATE_ITEM_ROUTE,
  chunk2CT57Y5S_cjs.DELETE_ITEM_ROUTE,
  // Version operations
  chunk2CT57Y5S_cjs.LIST_DATASET_VERSIONS_ROUTE,
  chunk2CT57Y5S_cjs.LIST_ITEM_VERSIONS_ROUTE,
  chunk2CT57Y5S_cjs.GET_ITEM_VERSION_ROUTE,
  // All experiments (cross-dataset) - MUST come before dataset-scoped experiments
  chunk2CT57Y5S_cjs.LIST_ALL_EXPERIMENTS_ROUTE,
  // Experiment review summary (cross-dataset) - MUST come before dataset-scoped experiments
  chunk2CT57Y5S_cjs.EXPERIMENT_REVIEW_SUMMARY_ROUTE,
  // Experiment operations (dataset-scoped)
  chunk2CT57Y5S_cjs.LIST_EXPERIMENTS_ROUTE,
  chunk2CT57Y5S_cjs.TRIGGER_EXPERIMENT_ROUTE,
  chunk2CT57Y5S_cjs.GET_EXPERIMENT_ROUTE,
  chunk2CT57Y5S_cjs.LIST_EXPERIMENT_RESULTS_ROUTE,
  chunk2CT57Y5S_cjs.UPDATE_EXPERIMENT_RESULT_ROUTE,
  // Analytics
  chunk2CT57Y5S_cjs.COMPARE_EXPERIMENTS_ROUTE,
  // AI generation
  chunk2CT57Y5S_cjs.GENERATE_ITEMS_ROUTE,
  // Failure analysis
  chunk2CT57Y5S_cjs.CLUSTER_FAILURES_ROUTE
];

// src/server/server-adapter/routes/legacy.ts
var LEGACY_ROUTES = [
  // ============================================================================
  // Legacy Agent Routes
  // ============================================================================
  chunk2SYGQRXY_cjs.GENERATE_LEGACY_ROUTE,
  chunk2SYGQRXY_cjs.STREAM_GENERATE_LEGACY_ROUTE,
  // ============================================================================
  // Legacy Workflow Routes
  // ============================================================================
  chunk3SPUSGBT_cjs.STREAM_LEGACY_WORKFLOW_ROUTE,
  chunk3SPUSGBT_cjs.OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE
];

// src/server/server-adapter/routes/logs.ts
var LOGS_ROUTES = [chunkJTMIZMGO_cjs.LIST_LOG_TRANSPORTS_ROUTE, chunkJTMIZMGO_cjs.LIST_LOGS_ROUTE, chunkJTMIZMGO_cjs.LIST_LOGS_BY_RUN_ID_ROUTE];

// src/server/server-adapter/routes/mcp.ts
var MCP_ROUTES = [
  // ============================================================================
  // MCP Server Registry Routes
  // ============================================================================
  chunkXHA6OBT3_cjs.LIST_MCP_SERVERS_ROUTE,
  chunkXHA6OBT3_cjs.GET_MCP_SERVER_DETAIL_ROUTE,
  // ============================================================================
  // MCP Server Tool Routes
  // ============================================================================
  chunkXHA6OBT3_cjs.LIST_MCP_SERVER_TOOLS_ROUTE,
  chunkXHA6OBT3_cjs.GET_MCP_SERVER_TOOL_DETAIL_ROUTE,
  chunkXHA6OBT3_cjs.EXECUTE_MCP_SERVER_TOOL_ROUTE,
  // ============================================================================
  // MCP Server Resource Routes
  // ============================================================================
  chunkXHA6OBT3_cjs.LIST_MCP_SERVER_RESOURCES_ROUTE,
  chunkXHA6OBT3_cjs.READ_MCP_SERVER_RESOURCE_ROUTE,
  // ============================================================================
  // MCP Transport Routes (handled by adapters)
  // ============================================================================
  chunkXHA6OBT3_cjs.MCP_HTTP_TRANSPORT_ROUTE,
  chunkXHA6OBT3_cjs.MCP_SSE_TRANSPORT_ROUTE,
  chunkXHA6OBT3_cjs.MCP_SSE_MESSAGES_ROUTE
];

// src/server/server-adapter/routes/memory.ts
var MEMORY_ROUTES = [
  chunkY65G4C35_cjs.GET_MEMORY_STATUS_ROUTE,
  chunkY65G4C35_cjs.GET_MEMORY_CONFIG_ROUTE,
  chunkY65G4C35_cjs.GET_OBSERVATIONAL_MEMORY_ROUTE,
  chunkY65G4C35_cjs.AWAIT_BUFFER_STATUS_ROUTE,
  chunkY65G4C35_cjs.LIST_THREADS_ROUTE,
  chunkY65G4C35_cjs.GET_THREAD_BY_ID_ROUTE,
  chunkY65G4C35_cjs.LIST_MESSAGES_ROUTE,
  chunkY65G4C35_cjs.GET_WORKING_MEMORY_ROUTE,
  chunkY65G4C35_cjs.SAVE_MESSAGES_ROUTE,
  chunkY65G4C35_cjs.CREATE_THREAD_ROUTE,
  chunkY65G4C35_cjs.UPDATE_THREAD_ROUTE,
  chunkY65G4C35_cjs.DELETE_THREAD_ROUTE,
  chunkY65G4C35_cjs.CLONE_THREAD_ROUTE,
  chunkY65G4C35_cjs.UPDATE_WORKING_MEMORY_ROUTE,
  chunkY65G4C35_cjs.DELETE_MESSAGES_ROUTE,
  chunkY65G4C35_cjs.SEARCH_MEMORY_ROUTE,
  chunkY65G4C35_cjs.GET_MEMORY_STATUS_NETWORK_ROUTE,
  chunkY65G4C35_cjs.LIST_THREADS_NETWORK_ROUTE,
  chunkY65G4C35_cjs.GET_THREAD_BY_ID_NETWORK_ROUTE,
  chunkY65G4C35_cjs.LIST_MESSAGES_NETWORK_ROUTE,
  chunkY65G4C35_cjs.SAVE_MESSAGES_NETWORK_ROUTE,
  chunkY65G4C35_cjs.CREATE_THREAD_NETWORK_ROUTE,
  chunkY65G4C35_cjs.UPDATE_THREAD_NETWORK_ROUTE,
  chunkY65G4C35_cjs.DELETE_THREAD_NETWORK_ROUTE,
  chunkY65G4C35_cjs.DELETE_MESSAGES_NETWORK_ROUTE
];

// src/server/server-adapter/routes/observability.ts
var OBSERVABILITY_ROUTES = [
  // Legacy
  chunkNPMJ6FRL_cjs.LIST_TRACES_ROUTE,
  chunkNPMJ6FRL_cjs.LIST_TRACES_LIGHT_ROUTE,
  chunkNPMJ6FRL_cjs.LIST_BRANCHES_ROUTE,
  chunkNPMJ6FRL_cjs.GET_BRANCH_ROUTE,
  chunkNPMJ6FRL_cjs.GET_TRACE_ROUTE,
  chunkNPMJ6FRL_cjs.GET_TRACE_LIGHT_ROUTE,
  chunkNPMJ6FRL_cjs.GET_SPAN_ROUTE,
  chunkNPMJ6FRL_cjs.GET_TRACE_TRAJECTORY_ROUTE,
  chunkNPMJ6FRL_cjs.SCORE_TRACES_ROUTE,
  chunkNPMJ6FRL_cjs.LIST_SCORES_BY_SPAN_ROUTE,
  // New (17 routes)
  chunk3BL73LS3_cjs.LIST_LOGS,
  chunk3BL73LS3_cjs.LIST_SCORES,
  chunk3BL73LS3_cjs.CREATE_SCORE,
  chunk3BL73LS3_cjs.GET_SCORE,
  chunk3BL73LS3_cjs.GET_SCORE_AGGREGATE,
  chunk3BL73LS3_cjs.GET_SCORE_BREAKDOWN,
  chunk3BL73LS3_cjs.GET_SCORE_TIME_SERIES,
  chunk3BL73LS3_cjs.GET_SCORE_PERCENTILES,
  chunk3BL73LS3_cjs.LIST_FEEDBACK,
  chunk3BL73LS3_cjs.CREATE_FEEDBACK,
  chunk3BL73LS3_cjs.GET_FEEDBACK_AGGREGATE,
  chunk3BL73LS3_cjs.GET_FEEDBACK_BREAKDOWN,
  chunk3BL73LS3_cjs.GET_FEEDBACK_TIME_SERIES,
  chunk3BL73LS3_cjs.GET_FEEDBACK_PERCENTILES,
  chunk3BL73LS3_cjs.GET_METRIC_AGGREGATE,
  chunk3BL73LS3_cjs.GET_METRIC_BREAKDOWN,
  chunk3BL73LS3_cjs.GET_METRIC_TIME_SERIES,
  chunk3BL73LS3_cjs.GET_METRIC_PERCENTILES,
  chunk3BL73LS3_cjs.GET_METRIC_NAMES,
  chunk3BL73LS3_cjs.GET_METRIC_LABEL_KEYS,
  chunk3BL73LS3_cjs.GET_METRIC_LABEL_VALUES,
  chunk3BL73LS3_cjs.GET_ENTITY_TYPES,
  chunk3BL73LS3_cjs.GET_ENTITY_NAMES,
  chunk3BL73LS3_cjs.GET_SERVICE_NAMES,
  chunk3BL73LS3_cjs.GET_ENVIRONMENTS,
  chunk3BL73LS3_cjs.GET_TAGS
];

// src/server/server-adapter/routes/processor-providers.ts
var PROCESSOR_PROVIDER_ROUTES = [chunkY6MWNLAA_cjs.LIST_PROCESSOR_PROVIDERS_ROUTE, chunkY6MWNLAA_cjs.GET_PROCESSOR_PROVIDER_ROUTE];

// src/server/server-adapter/routes/processors.ts
var PROCESSORS_ROUTES = [chunkUQ2H32RT_cjs.LIST_PROCESSORS_ROUTE, chunkUQ2H32RT_cjs.GET_PROCESSOR_BY_ID_ROUTE, chunkUQ2H32RT_cjs.EXECUTE_PROCESSOR_ROUTE];

// src/server/server-adapter/routes/responses.ts
var RESPONSES_ROUTES = [chunkDBG7BFWZ_cjs.CREATE_RESPONSE_ROUTE, chunkDBG7BFWZ_cjs.GET_RESPONSE_ROUTE, chunkDBG7BFWZ_cjs.DELETE_RESPONSE_ROUTE];

// src/server/server-adapter/routes/schedules.ts
var SCHEDULES_ROUTES = [
  chunkGPLCXP3B_cjs.LIST_SCHEDULES_ROUTE,
  chunkGPLCXP3B_cjs.GET_SCHEDULE_ROUTE,
  chunkGPLCXP3B_cjs.LIST_SCHEDULE_TRIGGERS_ROUTE,
  chunkGPLCXP3B_cjs.PAUSE_SCHEDULE_ROUTE,
  chunkGPLCXP3B_cjs.RESUME_SCHEDULE_ROUTE
];

// src/server/server-adapter/routes/scorers.ts
var SCORES_ROUTES = [
  chunk3T7LIPHA_cjs.LIST_SCORERS_ROUTE,
  chunk3T7LIPHA_cjs.GET_SCORER_ROUTE,
  chunk3T7LIPHA_cjs.LIST_SCORES_BY_RUN_ID_ROUTE,
  chunk3T7LIPHA_cjs.LIST_SCORES_BY_SCORER_ID_ROUTE,
  chunk3T7LIPHA_cjs.LIST_SCORES_BY_ENTITY_ID_ROUTE,
  chunk3T7LIPHA_cjs.SAVE_SCORE_ROUTE
];

// src/server/server-adapter/routes/stored-agents.ts
var STORED_AGENTS_ROUTES = [
  // ============================================================================
  // Stored Agents CRUD Routes
  // IMPORTANT: Routes with literal paths (e.g., /preview-instructions) must come
  // BEFORE routes with path parameters (e.g., /:storedAgentId) to ensure correct matching.
  // ============================================================================
  chunkURAYY3ZG_cjs.LIST_STORED_AGENTS_ROUTE,
  chunkURAYY3ZG_cjs.PREVIEW_INSTRUCTIONS_ROUTE,
  // Must be before GET_STORED_AGENT_ROUTE
  chunkURAYY3ZG_cjs.GET_STORED_AGENT_ROUTE,
  chunkURAYY3ZG_cjs.CREATE_STORED_AGENT_ROUTE,
  chunkURAYY3ZG_cjs.UPDATE_STORED_AGENT_ROUTE,
  chunkURAYY3ZG_cjs.DELETE_STORED_AGENT_ROUTE,
  // ============================================================================
  // Agent Versions Routes
  // IMPORTANT: Routes with literal paths (e.g., /compare) must come BEFORE
  // routes with path parameters (e.g., /:versionId) to ensure correct matching.
  // ============================================================================
  chunkM7VWAJP3_cjs.LIST_AGENT_VERSIONS_ROUTE,
  chunkM7VWAJP3_cjs.CREATE_AGENT_VERSION_ROUTE,
  chunkM7VWAJP3_cjs.COMPARE_AGENT_VERSIONS_ROUTE,
  // Must be before GET_AGENT_VERSION_ROUTE
  chunkM7VWAJP3_cjs.GET_AGENT_VERSION_ROUTE,
  chunkM7VWAJP3_cjs.ACTIVATE_AGENT_VERSION_ROUTE,
  chunkM7VWAJP3_cjs.RESTORE_AGENT_VERSION_ROUTE,
  chunkM7VWAJP3_cjs.DELETE_AGENT_VERSION_ROUTE
];

// src/server/server-adapter/routes/stored-mcp-clients.ts
var STORED_MCP_CLIENTS_ROUTES = [
  // Stored MCP Clients CRUD Routes
  chunkEG3QNCBQ_cjs.LIST_STORED_MCP_CLIENTS_ROUTE,
  chunkEG3QNCBQ_cjs.GET_STORED_MCP_CLIENT_ROUTE,
  chunkEG3QNCBQ_cjs.CREATE_STORED_MCP_CLIENT_ROUTE,
  chunkEG3QNCBQ_cjs.UPDATE_STORED_MCP_CLIENT_ROUTE,
  chunkEG3QNCBQ_cjs.DELETE_STORED_MCP_CLIENT_ROUTE,
  // MCP Client Versions Routes
  // IMPORTANT: Routes with literal paths (e.g., /compare) must come BEFORE
  // routes with path parameters (e.g., /:versionId) to ensure correct matching.
  chunkOG3CV6IN_cjs.LIST_MCP_CLIENT_VERSIONS_ROUTE,
  chunkOG3CV6IN_cjs.CREATE_MCP_CLIENT_VERSION_ROUTE,
  chunkOG3CV6IN_cjs.COMPARE_MCP_CLIENT_VERSIONS_ROUTE,
  chunkOG3CV6IN_cjs.GET_MCP_CLIENT_VERSION_ROUTE,
  chunkOG3CV6IN_cjs.ACTIVATE_MCP_CLIENT_VERSION_ROUTE,
  chunkOG3CV6IN_cjs.RESTORE_MCP_CLIENT_VERSION_ROUTE,
  chunkOG3CV6IN_cjs.DELETE_MCP_CLIENT_VERSION_ROUTE
];

// src/server/server-adapter/routes/stored-prompt-blocks.ts
var STORED_PROMPT_BLOCKS_ROUTES = [
  // Stored Prompt Blocks CRUD Routes
  chunk4WXROF2X_cjs.LIST_STORED_PROMPT_BLOCKS_ROUTE,
  chunk4WXROF2X_cjs.GET_STORED_PROMPT_BLOCK_ROUTE,
  chunk4WXROF2X_cjs.CREATE_STORED_PROMPT_BLOCK_ROUTE,
  chunk4WXROF2X_cjs.UPDATE_STORED_PROMPT_BLOCK_ROUTE,
  chunk4WXROF2X_cjs.DELETE_STORED_PROMPT_BLOCK_ROUTE,
  // Prompt Block Versions Routes
  // IMPORTANT: Routes with literal paths (e.g., /compare) must come BEFORE
  // routes with path parameters (e.g., /:versionId) to ensure correct matching.
  chunkKEAF4TVC_cjs.LIST_PROMPT_BLOCK_VERSIONS_ROUTE,
  chunkKEAF4TVC_cjs.CREATE_PROMPT_BLOCK_VERSION_ROUTE,
  chunkKEAF4TVC_cjs.COMPARE_PROMPT_BLOCK_VERSIONS_ROUTE,
  chunkKEAF4TVC_cjs.GET_PROMPT_BLOCK_VERSION_ROUTE,
  chunkKEAF4TVC_cjs.ACTIVATE_PROMPT_BLOCK_VERSION_ROUTE,
  chunkKEAF4TVC_cjs.RESTORE_PROMPT_BLOCK_VERSION_ROUTE,
  chunkKEAF4TVC_cjs.DELETE_PROMPT_BLOCK_VERSION_ROUTE
];

// src/server/server-adapter/routes/stored-scorers.ts
var STORED_SCORERS_ROUTES = [
  // Stored Scorers CRUD Routes
  chunkSUNXO2H2_cjs.LIST_STORED_SCORERS_ROUTE,
  chunkSUNXO2H2_cjs.GET_STORED_SCORER_ROUTE,
  chunkSUNXO2H2_cjs.CREATE_STORED_SCORER_ROUTE,
  chunkSUNXO2H2_cjs.UPDATE_STORED_SCORER_ROUTE,
  chunkSUNXO2H2_cjs.DELETE_STORED_SCORER_ROUTE,
  // Scorer Versions Routes
  // IMPORTANT: Routes with literal paths (e.g., /compare) must come BEFORE
  // routes with path parameters (e.g., /:versionId) to ensure correct matching.
  chunkBVZLX6R4_cjs.LIST_SCORER_VERSIONS_ROUTE,
  chunkBVZLX6R4_cjs.CREATE_SCORER_VERSION_ROUTE,
  chunkBVZLX6R4_cjs.COMPARE_SCORER_VERSIONS_ROUTE,
  chunkBVZLX6R4_cjs.GET_SCORER_VERSION_ROUTE,
  chunkBVZLX6R4_cjs.ACTIVATE_SCORER_VERSION_ROUTE,
  chunkBVZLX6R4_cjs.RESTORE_SCORER_VERSION_ROUTE,
  chunkBVZLX6R4_cjs.DELETE_SCORER_VERSION_ROUTE
];

// src/server/server-adapter/routes/stored-skills.ts
var STORED_SKILLS_ROUTES = [
  // Stored Skills CRUD Routes
  chunkOMLB6EMJ_cjs.LIST_STORED_SKILLS_ROUTE,
  chunkOMLB6EMJ_cjs.GET_STORED_SKILL_ROUTE,
  chunkOMLB6EMJ_cjs.CREATE_STORED_SKILL_ROUTE,
  chunkOMLB6EMJ_cjs.UPDATE_STORED_SKILL_ROUTE,
  chunkOMLB6EMJ_cjs.DELETE_STORED_SKILL_ROUTE,
  // Publish
  chunkOMLB6EMJ_cjs.PUBLISH_STORED_SKILL_ROUTE
];

// src/server/server-adapter/routes/stored-workspaces.ts
var STORED_WORKSPACES_ROUTES = [
  // Stored Workspaces CRUD Routes
  chunkPG4IJL7T_cjs.LIST_STORED_WORKSPACES_ROUTE,
  chunkPG4IJL7T_cjs.GET_STORED_WORKSPACE_ROUTE,
  chunkPG4IJL7T_cjs.CREATE_STORED_WORKSPACE_ROUTE,
  chunkPG4IJL7T_cjs.UPDATE_STORED_WORKSPACE_ROUTE,
  chunkPG4IJL7T_cjs.DELETE_STORED_WORKSPACE_ROUTE
];

// src/server/server-adapter/routes/system.ts
var SYSTEM_ROUTES = [chunk2GEO7VUJ_cjs.GET_SYSTEM_PACKAGES_ROUTE, chunk2GEO7VUJ_cjs.GET_API_SCHEMA_ROUTE];

// src/server/server-adapter/routes/tool-providers.ts
var TOOL_PROVIDER_ROUTES = [
  chunkJX4UGU4A_cjs.LIST_TOOL_PROVIDERS_ROUTE,
  chunkJX4UGU4A_cjs.LIST_TOOL_PROVIDER_TOOLKITS_ROUTE,
  chunkJX4UGU4A_cjs.LIST_TOOL_PROVIDER_TOOLS_ROUTE,
  chunkJX4UGU4A_cjs.GET_TOOL_PROVIDER_TOOL_SCHEMA_ROUTE
];

// src/server/server-adapter/routes/tools.ts
var TOOLS_ROUTES = [chunkMFBVMCPB_cjs.LIST_TOOLS_ROUTE, chunkMFBVMCPB_cjs.GET_TOOL_BY_ID_ROUTE, chunkMFBVMCPB_cjs.EXECUTE_TOOL_ROUTE];

// src/server/server-adapter/routes/vectors.ts
var VECTORS_ROUTES = [
  chunkPYZAUXQX_cjs.UPSERT_VECTORS_ROUTE,
  chunkPYZAUXQX_cjs.CREATE_INDEX_ROUTE,
  chunkPYZAUXQX_cjs.QUERY_VECTORS_ROUTE,
  chunkPYZAUXQX_cjs.LIST_INDEXES_ROUTE,
  chunkPYZAUXQX_cjs.DESCRIBE_INDEX_ROUTE,
  chunkPYZAUXQX_cjs.DELETE_INDEX_ROUTE,
  chunkPYZAUXQX_cjs.LIST_VECTORS_ROUTE,
  chunkPYZAUXQX_cjs.LIST_EMBEDDERS_ROUTE
];

// src/server/server-adapter/routes/workflows.ts
var WORKFLOWS_ROUTES = [
  chunk3SPUSGBT_cjs.LIST_WORKFLOWS_ROUTE,
  chunk3SPUSGBT_cjs.GET_WORKFLOW_BY_ID_ROUTE,
  chunk3SPUSGBT_cjs.LIST_WORKFLOW_RUNS_ROUTE,
  chunk3SPUSGBT_cjs.GET_WORKFLOW_RUN_BY_ID_ROUTE,
  chunk3SPUSGBT_cjs.DELETE_WORKFLOW_RUN_BY_ID_ROUTE,
  chunk3SPUSGBT_cjs.CREATE_WORKFLOW_RUN_ROUTE,
  chunk3SPUSGBT_cjs.STREAM_WORKFLOW_ROUTE,
  chunk3SPUSGBT_cjs.RESUME_STREAM_WORKFLOW_ROUTE,
  chunk3SPUSGBT_cjs.START_ASYNC_WORKFLOW_ROUTE,
  chunk3SPUSGBT_cjs.START_WORKFLOW_RUN_ROUTE,
  chunk3SPUSGBT_cjs.OBSERVE_STREAM_WORKFLOW_ROUTE,
  chunk3SPUSGBT_cjs.RESUME_ASYNC_WORKFLOW_ROUTE,
  chunk3SPUSGBT_cjs.RESUME_WORKFLOW_ROUTE,
  chunk3SPUSGBT_cjs.CANCEL_WORKFLOW_RUN_ROUTE,
  chunk3SPUSGBT_cjs.TIME_TRAVEL_WORKFLOW_ROUTE,
  chunk3SPUSGBT_cjs.TIME_TRAVEL_ASYNC_WORKFLOW_ROUTE,
  chunk3SPUSGBT_cjs.TIME_TRAVEL_STREAM_WORKFLOW_ROUTE,
  chunk3SPUSGBT_cjs.RESTART_WORKFLOW_ROUTE,
  chunk3SPUSGBT_cjs.RESTART_ASYNC_WORKFLOW_ROUTE,
  chunk3SPUSGBT_cjs.RESTART_ALL_ACTIVE_WORKFLOW_RUNS_ROUTE,
  chunk3SPUSGBT_cjs.RESTART_ALL_ACTIVE_WORKFLOW_RUNS_ASYNC_ROUTE,
  chunk3SPUSGBT_cjs.EXECUTE_WORKFLOW_STEP_ROUTE,
  chunk3SPUSGBT_cjs.RECEIVE_WORKFLOW_EVENT_ROUTE
];

// src/server/server-adapter/routes/workspace.ts
var WORKSPACE_ROUTES = [
  // List all workspaces route (at /api/workspaces)
  chunkR3R6VJRM_cjs.LIST_WORKSPACES_ROUTE,
  // Get workspace route (at /api/workspaces/:workspaceId)
  chunkR3R6VJRM_cjs.GET_WORKSPACE_ROUTE,
  // Filesystem routes (at /api/workspaces/:workspaceId/fs/*)
  ...chunkR3R6VJRM_cjs.WORKSPACE_FS_ROUTES,
  // Search routes (at /api/workspaces/:workspaceId/search, /api/workspaces/:workspaceId/index)
  ...chunkR3R6VJRM_cjs.WORKSPACE_SEARCH_ROUTES,
  // Skills routes (search must come before parameterized routes)
  ...chunkR3R6VJRM_cjs.WORKSPACE_SKILLS_ROUTES,
  // skills.sh proxy routes (at /api/workspaces/:workspaceId/skills-sh/*)
  ...chunkR3R6VJRM_cjs.WORKSPACE_SKILLS_SH_ROUTES
];

// src/server/server-adapter/routes/index.ts
var SERVER_ROUTES = [
  ...AGENTS_ROUTES,
  ...chunkYSC2EP5G_cjs.AUTH_ROUTES,
  ...WORKFLOWS_ROUTES,
  ...TOOLS_ROUTES,
  ...PROCESSORS_ROUTES,
  ...RESPONSES_ROUTES,
  ...CONVERSATIONS_ROUTES,
  ...MEMORY_ROUTES,
  ...SCORES_ROUTES,
  ...OBSERVABILITY_ROUTES,
  ...LOGS_ROUTES,
  ...VECTORS_ROUTES,
  ...A2A_ROUTES,
  ...WORKSPACE_ROUTES,
  ...LEGACY_ROUTES,
  ...MCP_ROUTES,
  ...STORED_AGENTS_ROUTES,
  ...STORED_MCP_CLIENTS_ROUTES,
  ...STORED_PROMPT_BLOCKS_ROUTES,
  ...STORED_SCORERS_ROUTES,
  ...STORED_WORKSPACES_ROUTES,
  ...STORED_SKILLS_ROUTES,
  ...TOOL_PROVIDER_ROUTES,
  ...PROCESSOR_PROVIDER_ROUTES,
  ...SYSTEM_ROUTES,
  ...DATASETS_ROUTES,
  ...BACKGROUND_TASK_ROUTES,
  ...SCHEDULES_ROUTES,
  ...CHANNELS_ROUTES
];

exports.SERVER_ROUTES = SERVER_ROUTES;
exports.deriveAction = deriveAction;
exports.derivePermission = derivePermission;
exports.extractResource = extractResource;
exports.getEffectivePermission = getEffectivePermission;
//# sourceMappingURL=chunk-7BDWHV3B.cjs.map
//# sourceMappingURL=chunk-7BDWHV3B.cjs.map