{"version":3,"file":"shimsWorkerd.cjs","names":["preloadSchemas"],"sources":["../src/shimsWorkerd.ts"],"sourcesContent":["/**\n * Cloudflare Workers runtime shims for server package\n *\n * This file is selected via package.json export conditions when running in workerd.\n */\nimport { preloadSchemas } from '@modelcontextprotocol/core-internal';\n\nexport { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator } from '@modelcontextprotocol/core-internal/validators/cfWorker';\n\n// Platform asymmetry: isolate platforms like workerd evaluate module scope\n// during deployment/isolate warm-up, outside any request's billed CPU, while\n// lazy construction would land inside the first request each fresh isolate\n// serves. The Node and browser shims stay lazy — there, module evaluation is\n// process/page startup and boot latency is the cost that matters.\npreloadSchemas();\n\n/**\n * Stub process object for non-Node.js environments.\n * StdioServerTransport is not supported in Cloudflare Workers/browser environments.\n */\nfunction notSupported(): never {\n    throw new Error('StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead.');\n}\n\nexport const process = {\n    get stdin(): never {\n        return notSupported();\n    },\n    get stdout(): never {\n        return notSupported();\n    }\n};\n"],"mappings":";;;;;;;;;AAcAA,4BAAgB;;;;;AAMhB,SAAS,eAAsB;AAC3B,OAAM,IAAI,MAAM,wGAAwG;;AAG5H,MAAa,UAAU;CACnB,IAAI,QAAe;AACf,SAAO,cAAc;;CAEzB,IAAI,SAAgB;AAChB,SAAO,cAAc;;CAE5B"}