openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
2 lines • 2 kB
JavaScript
//!src/gateway/gateway-http-route-contracts.ts
const GATEWAY_PROBE_ROUTES=/* @__PURE__ */ new Map([[`/health`,`live`],[`/healthz`,`live`],[`/ready`,`ready`],[`/readyz`,`ready`],[`/startup`,`startup`],[`/startupz`,`startup`]]);const MCP_APP_STANDALONE_PATH=`/__openclaw__/mcp-app`;const MCP_APP_STANDALONE_VIEW_PATH=`${MCP_APP_STANDALONE_PATH}/view`;const WORKER_GATEWAY_PATH=`/__openclaw__/worker`;const NODE_WORKER_BUNDLE_TRANSFER_NAMESPACE=`/__openclaw__/worker-bundle`;const NODE_WORKSPACE_TRANSFER_NAMESPACE=`/__openclaw__/worker-transfer`;const WORKER_BOOTSTRAP_ARTIFACT_TRANSFER_PATH=`/__openclaw__/worker-bootstrap`;function classifyGatewayProbePath(e){for(const[t,n]of GATEWAY_PROBE_ROUTES){if(e===t)return n;if(e.startsWith(`${t}/`))return`namespace`}return`outside`}function classifyMcpAppStandalonePath(e){if(e===`/__openclaw__/mcp-app`)return`shell`;if(e===`/__openclaw__/mcp-app/view`)return`view`;return e.startsWith(`${`/__openclaw__/mcp-app`}/`)?`namespace`:`outside`}function classifyWorkerGatewayPath(e){if(e===WORKER_GATEWAY_PATH)return`worker`;return e.startsWith(`${WORKER_GATEWAY_PATH}/`)?`namespace`:`outside`}function classifyNodeWorkerBundleTransferPath(e){return e===NODE_WORKER_BUNDLE_TRANSFER_NAMESPACE||e.startsWith(`${NODE_WORKER_BUNDLE_TRANSFER_NAMESPACE}/`)?`namespace`:`outside`}function classifyNodeWorkspaceTransferPath(e){return e===NODE_WORKSPACE_TRANSFER_NAMESPACE||e.startsWith(`${NODE_WORKSPACE_TRANSFER_NAMESPACE}/`)?`namespace`:`outside`}function classifyWorkerBootstrapArtifactTransferPath(e){return e===`/__openclaw__/worker-bootstrap`||e.startsWith(`${`/__openclaw__/worker-bootstrap`}/`)?`namespace`:`outside`}export{classifyMcpAppStandalonePath as a,classifyWorkerBootstrapArtifactTransferPath as c,classifyGatewayProbePath as i,classifyWorkerGatewayPath as l,MCP_APP_STANDALONE_VIEW_PATH as n,classifyNodeWorkerBundleTransferPath as o,WORKER_BOOTSTRAP_ARTIFACT_TRANSFER_PATH as r,classifyNodeWorkspaceTransferPath as s,MCP_APP_STANDALONE_PATH as t};