@zuplo/cli 7.15.25 → 7.15.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/source/ai-gateway/catalog.json +170 -1
- package/dist/source/ai-gateway/planner.d.ts +2 -2
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwks/remote.js +2 -2
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwt/encrypt.js +5 -8
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +1 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +2 -2
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +1 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/key.js +2 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/package.json +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwks/remote.js +2 -2
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/encrypt.js +5 -8
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +2 -2
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key.js +2 -0
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/package.json +1 -1
- package/node_modules/@posthog/core/dist/featureFlagUtils.js +1 -1
- package/node_modules/@posthog/core/dist/featureFlagUtils.mjs +1 -1
- package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts +1 -0
- package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/posthog-core-stateless.js +4 -1
- package/node_modules/@posthog/core/dist/posthog-core-stateless.mjs +4 -1
- package/node_modules/@posthog/core/dist/posthog-core.d.ts +2 -1
- package/node_modules/@posthog/core/dist/posthog-core.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/posthog-core.js +5 -1
- package/node_modules/@posthog/core/dist/posthog-core.mjs +5 -1
- package/node_modules/@posthog/core/package.json +1 -1
- package/node_modules/@posthog/core/src/featureFlagUtils.ts +1 -1
- package/node_modules/@posthog/core/src/posthog-core-stateless.ts +5 -1
- package/node_modules/@posthog/core/src/posthog-core.ts +10 -1
- package/node_modules/@zuplo/core/customer.cli.minified.js +1 -1
- package/node_modules/@zuplo/core/index.minified.js +1 -1
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-I65Y62VQ.js → chunk-3ITT2MYM.js} +10 -10
- package/node_modules/@zuplo/runtime/out/esm/chunk-3ITT2MYM.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-5XXEIH5B.js → chunk-A7HRIAHJ.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/{chunk-6KHAYHSW.js → chunk-C4ZTXG6P.js} +4 -4
- package/node_modules/@zuplo/runtime/out/esm/chunk-C4ZTXG6P.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-APWLPHXH.js → chunk-JAY7SQGG.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/{chunk-MWNVPFFM.js → chunk-YTDIY7PP.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp/messages/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +16 -0
- package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +16 -0
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/express-rate-limit/dist/index.cjs +6 -4
- package/node_modules/express-rate-limit/dist/index.mjs +6 -4
- package/node_modules/express-rate-limit/package.json +1 -1
- package/node_modules/fast-copy/README.md +15 -0
- package/node_modules/fast-copy/dist/cjs/index.cjs +33 -8
- package/node_modules/fast-copy/dist/cjs/index.cjs.map +1 -1
- package/node_modules/fast-copy/dist/es/index.mjs +33 -8
- package/node_modules/fast-copy/dist/es/index.mjs.map +1 -1
- package/node_modules/fast-copy/dist/umd/index.js +33 -8
- package/node_modules/fast-copy/dist/umd/index.js.map +1 -1
- package/node_modules/fast-copy/package.json +1 -1
- package/node_modules/object-inspect/CHANGELOG.md +31 -0
- package/node_modules/object-inspect/index.js +326 -24
- package/node_modules/object-inspect/package.json +22 -13
- package/node_modules/object-inspect/readme.markdown +4 -1
- package/node_modules/object-inspect/stringWidth.js +68 -0
- package/node_modules/object-inspect/stringWidthRanges.js +38 -0
- package/package.json +11 -11
- package/node_modules/@zuplo/runtime/out/esm/chunk-6KHAYHSW.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-I65Y62VQ.js.map +0 -1
- package/node_modules/object-inspect/.eslintrc +0 -53
- package/node_modules/object-inspect/.nycrc +0 -13
- package/node_modules/object-inspect/example/all.js +0 -23
- package/node_modules/object-inspect/example/circular.js +0 -6
- package/node_modules/object-inspect/example/fn.js +0 -5
- package/node_modules/object-inspect/example/inspect.js +0 -10
- package/node_modules/object-inspect/test/bigint.js +0 -58
- package/node_modules/object-inspect/test/browser/dom.js +0 -15
- package/node_modules/object-inspect/test/circular.js +0 -16
- package/node_modules/object-inspect/test/deep.js +0 -12
- package/node_modules/object-inspect/test/element.js +0 -53
- package/node_modules/object-inspect/test/err.js +0 -48
- package/node_modules/object-inspect/test/fakes.js +0 -29
- package/node_modules/object-inspect/test/fn.js +0 -76
- package/node_modules/object-inspect/test/global.js +0 -17
- package/node_modules/object-inspect/test/has.js +0 -15
- package/node_modules/object-inspect/test/holes.js +0 -15
- package/node_modules/object-inspect/test/indent-option.js +0 -271
- package/node_modules/object-inspect/test/inspect.js +0 -139
- package/node_modules/object-inspect/test/lowbyte.js +0 -12
- package/node_modules/object-inspect/test/number.js +0 -58
- package/node_modules/object-inspect/test/quoteStyle.js +0 -26
- package/node_modules/object-inspect/test/toStringTag.js +0 -40
- package/node_modules/object-inspect/test/undef.js +0 -12
- package/node_modules/object-inspect/test/values.js +0 -261
- package/node_modules/object-inspect/test-core-js.js +0 -26
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-I65Y62VQ.js.LEGAL.txt → chunk-3ITT2MYM.js.LEGAL.txt} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-5XXEIH5B.js.map → chunk-A7HRIAHJ.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-6KHAYHSW.js.LEGAL.txt → chunk-C4ZTXG6P.js.LEGAL.txt} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-APWLPHXH.js.map → chunk-JAY7SQGG.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-MWNVPFFM.js.map → chunk-YTDIY7PP.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"formatVersion": 1,
|
|
3
|
-
"target": "
|
|
3
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
4
4
|
"snapshots": [
|
|
5
5
|
{
|
|
6
6
|
"revision": "f9f94ab6646b82abc66a167c95669a50b3e20a7dea224cac0d3893d4ddde6620",
|
|
@@ -88,6 +88,18 @@
|
|
|
88
88
|
"tsconfig.json": "{\n \"include\": [\"modules/**/*\", \".zuplo/**/*\"],\n \"exclude\": [\"./node_modules\", \"./dist\", \"./docs\", \"./examples\"],\n \"compilerOptions\": {\n \"module\": \"ESNext\",\n \"target\": \"ES2022\",\n \"lib\": [\"ESNext\", \"WebWorker\", \"Webworker.Iterable\"],\n \"preserveConstEnums\": true,\n \"moduleResolution\": \"Bundler\",\n \"useUnknownInCatchVariables\": false,\n \"forceConsistentCasingInFileNames\": true,\n \"importHelpers\": true,\n \"removeComments\": true,\n \"esModuleInterop\": true,\n \"noEmit\": true,\n \"skipLibCheck\": true,\n \"strictNullChecks\": true,\n \"experimentalDecorators\": true\n }\n}\n",
|
|
89
89
|
"zuplo.jsonc": "{\n \"version\": 1,\n \"compatibilityDate\": \"2026-03-01\"\n}\n"
|
|
90
90
|
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"revision": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
94
|
+
"sourceCommit": "66bbcc9070ec1ce76b9ed5d1f8d479ed23ef48cb",
|
|
95
|
+
"files": {
|
|
96
|
+
"README-template.md": "## Zuplo AI Gateway\n\nThis is a Zuplo AI Gateway that was created with\n[`create-zuplo-api`](https://zuplo.com/docs). It gives your applications one\nOpenAI-compatible API in front of many AI providers, with per-app keys, model\ncontrols, budgets, caching, and guardrails.\n\n## Getting Started\n\nThe gateway loads each app's configuration (providers, models, and policies)\nfrom your Zuplo account at request time, so the project must be linked to a\nZuplo project before it can serve requests.\n\n1. Link the project. This writes your project's settings to `.env.zuplo`, which\n is gitignored:\n\n ```bash\n npx zuplo link\n ```\n\n2. In the [Zuplo Portal](https://portal.zuplo.com), add a provider and create an\n app. Each app gets its own API URL and API key. See\n [Apps](https://zuplo.com/docs/ai-gateway/apps).\n\n3. Start the development server:\n\n ```bash\n npm run dev\n # or\n yarn dev\n # or\n pnpm dev\n ```\n\n4. Send a request to the local gateway. Replace `<app_id>` with the ID from your\n app's API URL and set `ZUPLO_APP_API_KEY` to the app's API key:\n\n ```bash\n curl http://localhost:9000/<app_id>/v1/chat/completions \\\n -H \"Authorization: Bearer $ZUPLO_APP_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"openai/gpt-4o-mini\",\n \"messages\": [{ \"role\": \"user\", \"content\": \"Say hi\" }]\n }'\n ```\n\n## Endpoints\n\nEvery request is scoped to an app by the first path segment, `/{app_id}`. For\nthe supported endpoints and which providers serve each one, see the\n[AI Gateway documentation](https://zuplo.com/docs/ai-gateway/overview).\n\n## Project Structure\n\n| Path | What it does |\n| -------------------------- | ---------------------------------------------------------------------- |\n| `config/ai.oas.json` | The catch-all route that sends `/{app_id}/*` to the AI Gateway handler |\n| `config/policies.json` | The policies an app can select for its policy chain |\n| `modules/zuplo.runtime.ts` | Runtime plugins, such as tracing and logging |\n| `.env.example` | Sample environment variables. Copy it to `.env` for local development |\n\nAn app runs only the policies listed in its policy chain, and it can select only\npolicies declared in `config/policies.json`. To add your own policy, write it in\n`modules/` and declare it in `config/policies.json`.\n\n## Debugging\n\nIn VS Code, open **Run and Debug**, select **Launch & Attach Zuplo**, and click\nthe green play button.\n\nFor other editors and more details, see the\n[debugging guide](https://zuplo.com/docs/articles/local-development-debugging).\n\n## Deploying\n\nConnect the project to source control in the Zuplo Portal. Pushes to your\ndefault branch deploy the gateway to production.\n\n## Learn More\n\nTo learn more about the AI Gateway, visit the\n[AI Gateway documentation](https://zuplo.com/docs/ai-gateway/overview).\n\nTo connect with the community join [Discord](https://discord.zuplo.com).\n",
|
|
97
|
+
"config/ai.oas.json": "{\n \"openapi\": \"3.1.0\",\n \"info\": {\n \"version\": \"1.0.0\",\n \"title\": \"AI Gateway API\",\n \"description\": \"A unified API gateway for multiple AI providers. OpenAI-compatible ops are served under /{app_id}/v1/*, AWS Bedrock Runtime ops under /{app_id}/model/{modelId}/{operation}; other paths under /{app_id} are rejected.\"\n },\n \"paths\": {\n \"/u/:app_id/(.*)\": {\n \"x-zuplo-path\": {\n \"pathMode\": \"url-pattern\"\n },\n \"get,post,put,patch,delete,head\": {\n \"summary\": \"AI Gateway User App catch-all\",\n \"description\": \"Routes User App requests under /u/{app_id}/* to the AI Gateway handler. The configuration kind must be ai-user-app.\",\n \"operationId\": \"aiGatewayUserAppCatchAll\",\n \"responses\": {\n \"200\": {\n \"description\": \"Successful AI Gateway response\"\n },\n \"400\": {\n \"description\": \"Bad request\"\n },\n \"403\": {\n \"description\": \"Forbidden \\u2014 User App routes require a personal API key issued for this User App; application API keys cannot authenticate them\"\n },\n \"404\": {\n \"description\": \"Unsupported AI Gateway endpoint\"\n },\n \"500\": {\n \"description\": \"Internal server error\"\n }\n },\n \"x-zuplo-route\": {\n \"corsPolicy\": \"none\",\n \"handler\": {\n \"export\": \"aiGatewayHandlerV2\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {}\n },\n \"policies\": {\n \"inbound\": [\n \"ai-gateway-configuration-loader-inbound\",\n \"ai-gateway-configuration-executor-inbound\"\n ]\n }\n }\n }\n },\n \"/a/:app_id/(.*)\": {\n \"x-zuplo-path\": {\n \"pathMode\": \"url-pattern\"\n },\n \"get,post,put,patch,delete,head\": {\n \"summary\": \"AI Gateway AI App catch-all\",\n \"description\": \"Routes AI App requests under /a/{app_id}/* to the AI Gateway handler. The configuration kind must be ai-app.\",\n \"operationId\": \"aiGatewayAIAppCatchAll\",\n \"responses\": {\n \"200\": {\n \"description\": \"Successful AI Gateway response\"\n },\n \"400\": {\n \"description\": \"Bad request\"\n },\n \"401\": {\n \"description\": \"Unauthorized \\u2014 returned only when the application's inboundPolicyChain includes ai-gateway-auth-inbound, or authentication runs before the configuration loader\"\n },\n \"403\": {\n \"description\": \"Forbidden \\u2014 returned by per-app policies, such as an API key issued for a different app_id or a model the app does not allow\"\n },\n \"404\": {\n \"description\": \"Unsupported AI Gateway endpoint\"\n },\n \"500\": {\n \"description\": \"Internal server error\"\n }\n },\n \"x-zuplo-route\": {\n \"corsPolicy\": \"none\",\n \"handler\": {\n \"export\": \"aiGatewayHandlerV2\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {}\n },\n \"policies\": {\n \"inbound\": [\n \"ai-gateway-configuration-loader-inbound\",\n \"ai-gateway-configuration-executor-inbound\"\n ]\n }\n }\n }\n },\n \"/:app_id/(.*)\": {\n \"x-zuplo-path\": {\n \"pathMode\": \"url-pattern\"\n },\n \"get,post,put,patch,delete,head\": {\n \"summary\": \"AI Gateway catch-all\",\n \"description\": \"Routes AI requests under /{app_id}/* to the AI Gateway handler. The configuration loader loads the application configuration from the app_id path segment; the configuration executor then runs the application's inboundPolicyChain. Two path shapes succeed: a supported /v1/... operation (see resolveBasePath in packages/runtime/src/llm-translation/index.ts for the current set) and a Bedrock Runtime operation addressed AWS's way as /model/{modelId}/{operation} (see matchBedrockRuntimeRoute in packages/runtime/src/ai-gateway/bedrock-runtime-route.ts). Anything else under /{app_id} returns 404.\",\n \"operationId\": \"aiGatewayCatchAll\",\n \"responses\": {\n \"200\": {\n \"description\": \"Successful AI Gateway response\"\n },\n \"400\": {\n \"description\": \"Bad request\"\n },\n \"401\": {\n \"description\": \"Unauthorized \\u2014 returned only when the application's inboundPolicyChain includes ai-gateway-auth-inbound, or authentication runs before the configuration loader\"\n },\n \"403\": {\n \"description\": \"Forbidden \\u2014 returned by per-app policies, such as an API key issued for a different app_id or a model the app does not allow\"\n },\n \"404\": {\n \"description\": \"Unsupported AI Gateway endpoint\"\n },\n \"500\": {\n \"description\": \"Internal server error\"\n }\n },\n \"x-zuplo-route\": {\n \"corsPolicy\": \"none\",\n \"handler\": {\n \"export\": \"aiGatewayHandlerV2\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {}\n },\n \"policies\": {\n \"inbound\": [\n \"ai-gateway-configuration-loader-inbound\",\n \"ai-gateway-configuration-executor-inbound\"\n ]\n }\n }\n }\n }\n }\n}\n",
|
|
98
|
+
"config/policies.json": "{\n \"policies\": [\n {\n \"handler\": {\n \"export\": \"AIGatewayAuthInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {}\n },\n \"name\": \"ai-gateway-auth-inbound\",\n \"policyType\": \"ai-gateway-auth\"\n },\n {\n \"handler\": {\n \"export\": \"InternalOnlyInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {}\n },\n \"name\": \"internal-only-inbound\",\n \"policyType\": \"internal-only\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewayConfigurationLoaderInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {\n \"cacheTtlSeconds\": 5\n }\n },\n \"name\": \"ai-gateway-configuration-loader-inbound\",\n \"policyType\": \"ai-gateway-configuration-loader\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewayConfigurationExecutorInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {}\n },\n \"name\": \"ai-gateway-configuration-executor-inbound\",\n \"policyType\": \"ai-gateway-configuration-executor\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewayMeteringInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {}\n },\n \"name\": \"ai-gateway-metering-inbound\",\n \"policyType\": \"ai-gateway-metering\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewayModelOverrideInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {\n \"models\": {\n \"completions\": {\n \"default\": \"openai/gpt-4o-mini\"\n }\n }\n }\n },\n \"name\": \"ai-gateway-model-override-inbound\",\n \"policyType\": \"ai-gateway-model-override\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewayModelFilteringInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {\n \"models\": {\n \"completions\": {\n \"allowList\": [\"openai/gpt-4o-mini\"]\n }\n }\n }\n },\n \"name\": \"ai-gateway-model-filtering-inbound\",\n \"policyType\": \"ai-gateway-model-filtering\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewayLoadBalancingInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {\n \"strategy\": \"round-robin\",\n \"models\": {\n \"completions\": [\"openai/gpt-4o-mini\"]\n }\n }\n },\n \"name\": \"ai-gateway-load-balancing-inbound\",\n \"policyType\": \"ai-gateway-load-balancing\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewayFallbackModelInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {\n \"models\": {\n \"completions\": {\n \"fallback\": \"openai/gpt-4o-mini\"\n }\n },\n \"fallbackTimeoutSeconds\": 60\n }\n },\n \"name\": \"ai-gateway-fallback-model-inbound\",\n \"policyType\": \"ai-gateway-fallback-model\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewaySemanticCacheInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {\n \"semanticTolerance\": 0.4,\n \"expirationSecondsTtl\": 3600\n }\n },\n \"name\": \"ai-gateway-semantic-cache-inbound\",\n \"policyType\": \"ai-gateway-semantic-cache\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewayAkamaiFirewallInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {\n \"configurationId\": \"\",\n \"api-key\": \"\"\n }\n },\n \"name\": \"ai-gateway-akamai-firewall-inbound\",\n \"policyType\": \"ai-gateway-akamai-firewall\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewayPromptInjectionPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {\n \"execution\": \"parallel\"\n }\n },\n \"name\": \"ai-gateway-prompt-injection\",\n \"policyType\": \"ai-gateway-prompt-injection\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewayOpikTracingInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {\n \"apiKey\": \"\",\n \"projectName\": \"\",\n \"workspace\": \"\"\n }\n },\n \"name\": \"ai-gateway-opik-tracing-inbound\",\n \"policyType\": \"ai-gateway-opik-tracing\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewayGalileoTracingInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {\n \"apiKey\": \"\",\n \"projectId\": \"\",\n \"logStreamId\": \"\"\n }\n },\n \"name\": \"ai-gateway-galileo-tracing-inbound\",\n \"policyType\": \"ai-gateway-galileo-tracing\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewayDlpInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {\n \"rules\": {\n \"inbound\": {\n \"pii\": {\n \"action\": \"mask\"\n },\n \"contact-email\": {\n \"action\": \"off\"\n },\n \"finance-credit-card\": {\n \"action\": \"mask\"\n },\n \"finance-iban\": {\n \"action\": \"mask\"\n }\n },\n \"outbound\": {\n \"pii\": {\n \"action\": \"mask\"\n },\n \"contact-email\": {\n \"action\": \"off\"\n },\n \"finance-credit-card\": {\n \"action\": \"mask\"\n },\n \"finance-iban\": {\n \"action\": \"mask\"\n }\n }\n }\n }\n },\n \"name\": \"ai-gateway-dlp-inbound\",\n \"policyType\": \"ai-gateway-dlp\"\n },\n {\n \"handler\": {\n \"export\": \"AIGatewaySmartRouterInboundPolicy\",\n \"module\": \"$import(@zuplo/runtime)\",\n \"options\": {\n \"classifier\": {\n \"app\": {\n \"appId\": \"\",\n \"model\": \"openai/gpt-4o-mini\"\n }\n },\n \"modelsByComplexity\": {\n \"low\": \"openai/gpt-4o-mini\",\n \"medium\": \"openai/gpt-4o\",\n \"high\": \"openai/gpt-5\"\n }\n }\n },\n \"name\": \"ai-gateway-smart-router-inbound\",\n \"policyType\": \"ai-gateway-smart-router\"\n }\n ]\n}\n",
|
|
99
|
+
"modules/zuplo.runtime.ts": "import type { RuntimeExtensions } from \"@zuplo/runtime\";\n\n/**\n * `runtimeInit` runs once when your gateway boots. Use it to register plugins\n * and lifecycle hooks. Docs:\n * https://zuplo.com/docs/programmable-api/runtime-extensions\n */\nexport function runtimeInit(runtime: RuntimeExtensions) {\n // `runtime` is unused until you enable a plugin below. This reference keeps\n // linters from flagging it; delete it once you call `runtime.addPlugin`.\n void runtime;\n\n // --- OpenTelemetry tracing (optional) ------------------------------------\n // Send traces to Zuplo's built-in tracing. This can also be configured to\n // send traces to a third-party service such as Honeycomb, Grafana, and\n // others. Docs: https://zuplo.com/docs/articles/opentelemetry\n //\n // To enable, run `npm install @zuplo/otel`, then import `OpenTelemetryPlugin`\n // from \"@zuplo/otel\" and `environment` from \"@zuplo/runtime\":\n // const isWorkingCopy =\n // environment.ZUPLO_ENVIRONMENT_STAGE === \"working-copy\";\n // runtime.addPlugin(\n // new OpenTelemetryPlugin({\n // sampling: {\n // headSampler: { ratio: isWorkingCopy ? 1 : 0.1 },\n // },\n // }),\n // );\n // --- Logging (optional) --------------------------------------------------\n // Ship request logs to Datadog. Other log integrations (New Relic, Splunk,\n // Loki, Dynatrace, and others) follow the same pattern — see the logging\n // overview at https://zuplo.com/docs/articles/logging.\n // Docs: https://zuplo.com/docs/articles/log-plugin-datadog\n //\n // To enable, import the plugin and `environment` from \"@zuplo/runtime\":\n // runtime.addPlugin(\n // new DataDogLoggingPlugin({\n // apiKey: environment.DATADOG_API_KEY,\n // source: \"my-ai-gateway\",\n // }),\n // );\n}\n",
|
|
100
|
+
"tsconfig.json": "{\n \"include\": [\"modules/**/*\", \".zuplo/**/*\"],\n \"exclude\": [\"./node_modules\", \"./dist\", \"./docs\", \"./examples\"],\n \"compilerOptions\": {\n \"module\": \"ESNext\",\n \"target\": \"ES2022\",\n \"lib\": [\"ESNext\", \"WebWorker\", \"Webworker.Iterable\"],\n \"preserveConstEnums\": true,\n \"moduleResolution\": \"Bundler\",\n \"useUnknownInCatchVariables\": false,\n \"forceConsistentCasingInFileNames\": true,\n \"importHelpers\": true,\n \"removeComments\": true,\n \"esModuleInterop\": true,\n \"noEmit\": true,\n \"skipLibCheck\": true,\n \"strictNullChecks\": true,\n \"experimentalDecorators\": true\n }\n}\n",
|
|
101
|
+
"zuplo.jsonc": "{\n \"version\": 1,\n \"compatibilityDate\": \"2026-11-06\"\n}\n"
|
|
102
|
+
}
|
|
91
103
|
}
|
|
92
104
|
],
|
|
93
105
|
"aliases": {
|
|
@@ -558,6 +570,158 @@
|
|
|
558
570
|
"target": "70b476fc2524c3c2ce0cc10ad5f91837a7aefceefb088542390c02754238693d",
|
|
559
571
|
"runtime": "release",
|
|
560
572
|
"instructions": "Review the definition and application policy chains before adding it."
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:route:/u/:app_id/(.*)",
|
|
576
|
+
"kind": "route",
|
|
577
|
+
"key": "/u/:app_id/(.*)",
|
|
578
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
579
|
+
"runtime": "release",
|
|
580
|
+
"instructions": "Insert before /:app_id/(.*), with the displayed inbound policy order."
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:route:/a/:app_id/(.*)",
|
|
584
|
+
"kind": "route",
|
|
585
|
+
"key": "/a/:app_id/(.*)",
|
|
586
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
587
|
+
"runtime": "release",
|
|
588
|
+
"instructions": "Insert before /:app_id/(.*), with the displayed inbound policy order."
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:route:/:app_id/(.*)",
|
|
592
|
+
"kind": "route",
|
|
593
|
+
"key": "/:app_id/(.*)",
|
|
594
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
595
|
+
"runtime": "release",
|
|
596
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-auth-inbound",
|
|
600
|
+
"kind": "policy",
|
|
601
|
+
"key": "ai-gateway-auth-inbound",
|
|
602
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
603
|
+
"runtime": "release",
|
|
604
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-internal-only-inbound",
|
|
608
|
+
"kind": "policy",
|
|
609
|
+
"key": "internal-only-inbound",
|
|
610
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
611
|
+
"runtime": "release",
|
|
612
|
+
"instructions": "Add only if neither internal-only-inbound nor its historical AI Gateway alias is declared. Preserve existing declarations and application chain references."
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-configuration-loader-inbound",
|
|
616
|
+
"kind": "policy",
|
|
617
|
+
"key": "ai-gateway-configuration-loader-inbound",
|
|
618
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
619
|
+
"runtime": "release",
|
|
620
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-configuration-executor-inbound",
|
|
624
|
+
"kind": "policy",
|
|
625
|
+
"key": "ai-gateway-configuration-executor-inbound",
|
|
626
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
627
|
+
"runtime": "release",
|
|
628
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-metering-inbound",
|
|
632
|
+
"kind": "policy",
|
|
633
|
+
"key": "ai-gateway-metering-inbound",
|
|
634
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
635
|
+
"runtime": "release",
|
|
636
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-model-override-inbound",
|
|
640
|
+
"kind": "policy",
|
|
641
|
+
"key": "ai-gateway-model-override-inbound",
|
|
642
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
643
|
+
"runtime": "release",
|
|
644
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-model-filtering-inbound",
|
|
648
|
+
"kind": "policy",
|
|
649
|
+
"key": "ai-gateway-model-filtering-inbound",
|
|
650
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
651
|
+
"runtime": "release",
|
|
652
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-load-balancing-inbound",
|
|
656
|
+
"kind": "policy",
|
|
657
|
+
"key": "ai-gateway-load-balancing-inbound",
|
|
658
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
659
|
+
"runtime": "release",
|
|
660
|
+
"instructions": "Add only if it is not declared. No route or app uses it until an app's inboundPolicyChain names it; review the default models list before an app does."
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-fallback-model-inbound",
|
|
664
|
+
"kind": "policy",
|
|
665
|
+
"key": "ai-gateway-fallback-model-inbound",
|
|
666
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
667
|
+
"runtime": "release",
|
|
668
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-semantic-cache-inbound",
|
|
672
|
+
"kind": "policy",
|
|
673
|
+
"key": "ai-gateway-semantic-cache-inbound",
|
|
674
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
675
|
+
"runtime": "release",
|
|
676
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-akamai-firewall-inbound",
|
|
680
|
+
"kind": "policy",
|
|
681
|
+
"key": "ai-gateway-akamai-firewall-inbound",
|
|
682
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
683
|
+
"runtime": "release",
|
|
684
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-prompt-injection",
|
|
688
|
+
"kind": "policy",
|
|
689
|
+
"key": "ai-gateway-prompt-injection",
|
|
690
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
691
|
+
"runtime": "release",
|
|
692
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-opik-tracing-inbound",
|
|
696
|
+
"kind": "policy",
|
|
697
|
+
"key": "ai-gateway-opik-tracing-inbound",
|
|
698
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
699
|
+
"runtime": "release",
|
|
700
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-galileo-tracing-inbound",
|
|
704
|
+
"kind": "policy",
|
|
705
|
+
"key": "ai-gateway-galileo-tracing-inbound",
|
|
706
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
707
|
+
"runtime": "release",
|
|
708
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-dlp-inbound",
|
|
712
|
+
"kind": "policy",
|
|
713
|
+
"key": "ai-gateway-dlp-inbound",
|
|
714
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
715
|
+
"runtime": "release",
|
|
716
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"id": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493:policy:ai-gateway-smart-router-inbound",
|
|
720
|
+
"kind": "policy",
|
|
721
|
+
"key": "ai-gateway-smart-router-inbound",
|
|
722
|
+
"target": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
723
|
+
"runtime": "release",
|
|
724
|
+
"instructions": "Review the definition and application policy chains before adding it."
|
|
561
725
|
}
|
|
562
726
|
],
|
|
563
727
|
"assessments": [
|
|
@@ -575,6 +739,11 @@
|
|
|
575
739
|
"revision": "70b476fc2524c3c2ce0cc10ad5f91837a7aefceefb088542390c02754238693d",
|
|
576
740
|
"classification": "additions",
|
|
577
741
|
"instructions": "Adds the Model Load Balancing policy declaration, ai-gateway-load-balancing-inbound (AIGatewayLoadBalancingInboundPolicy, policyType ai-gateway-load-balancing). Declaring it changes no routing: an app uses it only when its inboundPolicyChain names it. Existing routes, declarations, and historical aliases are preserved. Other existing policy options and defaults still require separate review."
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"revision": "b41992353931b1ac8f010c5469a2e45a1d94797bf5e2398f94511321086b7493",
|
|
745
|
+
"classification": "documentation-only",
|
|
746
|
+
"instructions": "New AI Gateway projects now start on compatibility date 2026-11-06, the current default, instead of 2026-03-01. No route or policy declaration changed, so there is nothing to add, and the upgrade never edits zuplo.jsonc: an existing project keeps its compatibility date. To move to 2026-11-06, review the behavior changes that date turns on (https://zuplo.com/docs/programmable-api/compatibility-dates), then set compatibilityDate in zuplo.jsonc yourself, build, and test. On 2026-11-06 a blank required string option fails the policy when it is created: an application whose inboundPolicyChain selects ai-gateway-akamai-firewall-inbound, ai-gateway-opik-tracing-inbound or ai-gateway-galileo-tracing-inbound must give that entry its credentials (in the entry's options or the declaration), or its requests fail with a configuration error. Before 2026-11-06 the Akamai firewall already failed such requests, while Opik and Galileo tracing let them run untraced. Other existing policy options and defaults still require separate review."
|
|
578
747
|
}
|
|
579
748
|
]
|
|
580
749
|
}
|
|
@@ -50,8 +50,8 @@ export declare const catalogSchema: z.ZodObject<
|
|
|
50
50
|
revision: z.ZodString;
|
|
51
51
|
classification: z.ZodEnum<{
|
|
52
52
|
additions: "additions";
|
|
53
|
-
manual: "manual";
|
|
54
53
|
"documentation-only": "documentation-only";
|
|
54
|
+
manual: "manual";
|
|
55
55
|
}>;
|
|
56
56
|
instructions: z.ZodString;
|
|
57
57
|
},
|
|
@@ -81,7 +81,7 @@ export declare const catalog: {
|
|
|
81
81
|
}[];
|
|
82
82
|
assessments: {
|
|
83
83
|
revision: string;
|
|
84
|
-
classification: "additions" | "
|
|
84
|
+
classification: "additions" | "documentation-only" | "manual";
|
|
85
85
|
instructions: string;
|
|
86
86
|
}[];
|
|
87
87
|
};
|
package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwks/remote.js
CHANGED
|
@@ -5,7 +5,7 @@ function isCloudflareWorkers() {
|
|
|
5
5
|
return typeof WebSocketPair < "u" || typeof navigator < "u" && navigator.userAgent === "Cloudflare-Workers" || typeof EdgeRuntime < "u" && EdgeRuntime === "vercel";
|
|
6
6
|
}
|
|
7
7
|
let USER_AGENT;
|
|
8
|
-
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (USER_AGENT = "jose/v6.2.
|
|
8
|
+
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (USER_AGENT = "jose/v6.2.18");
|
|
9
9
|
const customFetch = /* @__PURE__ */ Symbol();
|
|
10
10
|
async function fetchJwks(url, headers, signal, fetchImpl = fetch) {
|
|
11
11
|
const response = await fetchImpl(url, {
|
|
@@ -21,7 +21,7 @@ async function fetchJwks(url, headers, signal, fetchImpl = fetch) {
|
|
|
21
21
|
try {
|
|
22
22
|
return await response.json();
|
|
23
23
|
} catch (cause) {
|
|
24
|
-
throw new JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON", { cause });
|
|
24
|
+
throw signal.aborted ? new JWKSTimeout(void 0, { cause }) : new JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON", { cause });
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
const jwksCache = /* @__PURE__ */ Symbol();
|
package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwt/encrypt.js
CHANGED
|
@@ -29,15 +29,12 @@ class EncryptJWT extends EncryptJWT_base {
|
|
|
29
29
|
return this.#replicateAudienceAsHeader = !0, this;
|
|
30
30
|
}
|
|
31
31
|
async encrypt(key, options) {
|
|
32
|
-
const plaintext = jwtClaimsSetBytes(this);
|
|
33
|
-
this.#input[1] && (this.#replicateIssuerAsHeader || this.#replicateSubjectAsHeader || this.#replicateAudienceAsHeader) && (this.#input[1] = {
|
|
34
|
-
...this.#input[1],
|
|
35
|
-
iss: this.#replicateIssuerAsHeader ? jwtClaim(this, "iss") : void 0,
|
|
36
|
-
sub: this.#replicateSubjectAsHeader ? jwtClaim(this, "sub") : void 0,
|
|
37
|
-
aud: this.#replicateAudienceAsHeader ? jwtClaim(this, "aud") : void 0
|
|
38
|
-
});
|
|
39
32
|
const input = [...this.#input];
|
|
40
|
-
|
|
33
|
+
if (input[0] = jwtClaimsSetBytes(this), input[1] && (this.#replicateIssuerAsHeader || this.#replicateSubjectAsHeader || this.#replicateAudienceAsHeader)) {
|
|
34
|
+
const header = { ...input[1] };
|
|
35
|
+
this.#replicateIssuerAsHeader && (header.iss = jwtClaim(this, "iss")), this.#replicateSubjectAsHeader && (header.sub = jwtClaim(this, "sub")), this.#replicateAudienceAsHeader && (header.aud = jwtClaim(this, "aud")), input[1] = header;
|
|
36
|
+
}
|
|
37
|
+
return compactJWE(await createJWE(input, key, options));
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
export {
|
package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwe_decrypt.js
CHANGED
|
@@ -151,7 +151,7 @@ async function decryptJWE(jwe, shared, key, token = shareJWE(jwe)) {
|
|
|
151
151
|
if (decompressionLimit === 0)
|
|
152
152
|
throw new JOSENotSupported('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');
|
|
153
153
|
plaintext = await decompress(plaintext, decompressionLimit).catch((cause) => {
|
|
154
|
-
throw cause instanceof JWEInvalid ? cause : new JWEInvalid("Failed to decompress plaintext", { cause });
|
|
154
|
+
throw cause instanceof JWEInvalid || cause instanceof JOSENotSupported ? cause : new JWEInvalid("Failed to decompress plaintext", { cause });
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
return {
|
package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwe_encrypt.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { encode as b64u } from "../util/base64url.js";
|
|
2
2
|
import { encrypt } from "./content_encryption.js";
|
|
3
3
|
import { encryptKeyManagement } from "./key_management.js";
|
|
4
|
-
import { JWEInvalid } from "../util/errors.js";
|
|
4
|
+
import { JOSENotSupported, JWEInvalid } from "../util/errors.js";
|
|
5
5
|
import { assertUint8Array, isDisjoint, isObject, serializeJoseHeader, validateCrit, validateCritDuplicates, JWE_RECOGNIZED } from "./validate.js";
|
|
6
6
|
import { encode } from "./buffer_utils.js";
|
|
7
7
|
import { prepareKey } from "./key.js";
|
|
@@ -51,7 +51,7 @@ async function encryptJWE(input, checked, key) {
|
|
|
51
51
|
const encodedProtectedHeader = protectedHeader ? b64u(JSON.stringify(protectedHeader)) : "", encodedAad = aad?.byteLength ? b64u(aad) : void 0, additionalAuthenticatedData = encode(encodedAad ? `${encodedProtectedHeader}.${encodedAad}` : encodedProtectedHeader);
|
|
52
52
|
let plaintext = inputPlaintext;
|
|
53
53
|
joseHeader.zip === "DEF" && (plaintext = await compress(plaintext).catch((cause) => {
|
|
54
|
-
throw new JWEInvalid("Failed to compress plaintext", { cause });
|
|
54
|
+
throw cause instanceof JOSENotSupported ? cause : new JWEInvalid("Failed to compress plaintext", { cause });
|
|
55
55
|
}));
|
|
56
56
|
let ciphertext, tag, iv;
|
|
57
57
|
algEntry.mode === "integrated-encryption" ? [encryptedKey, ciphertext] = await algEntry.encrypt(cek, plaintext, additionalAuthenticatedData, protectedHeader, joseHeader, keyManagementParameters) : { ciphertext, tag, iv } = await encrypt(encEntry, plaintext, cek, inputIv, additionalAuthenticatedData);
|
|
@@ -17,7 +17,7 @@ function secs(str) {
|
|
|
17
17
|
const matched = REGEX.exec(str);
|
|
18
18
|
(!matched || matched[4] && matched[1]) && invalidDuration();
|
|
19
19
|
const value = parseFloat(matched[2]), durationSeconds = Math.round(value * multipliers[matched[3][0].toLowerCase()]);
|
|
20
|
-
return Number.isFinite(durationSeconds) || invalidDuration(), matched[1] === "-" || matched[4] === "ago" ? -durationSeconds : durationSeconds;
|
|
20
|
+
return Number.isFinite(durationSeconds) || invalidDuration(), matched[1] === "-" || matched[4]?.toLowerCase() === "ago" ? -durationSeconds : durationSeconds;
|
|
21
21
|
}
|
|
22
22
|
function validateInput(label, input) {
|
|
23
23
|
if (!Number.isFinite(input))
|
|
@@ -8,6 +8,8 @@ const tag = (key) => key[Symbol.toStringTag], jwkMatchesOp = (entry, key, usage)
|
|
|
8
8
|
if (key.use !== expected)
|
|
9
9
|
throw new TypeError(`Invalid key for this operation, its "use" must be "${expected}" when present`);
|
|
10
10
|
}
|
|
11
|
+
if (key.kty === "AKP" && key.alg === void 0)
|
|
12
|
+
throw new TypeError('missing "alg" (Algorithm) Parameter value');
|
|
11
13
|
if (key.alg !== void 0 && key.alg !== alg)
|
|
12
14
|
throw new TypeError(`Invalid key for this operation, its "alg" must be "${alg}" when present`);
|
|
13
15
|
if (Array.isArray(key.key_ops)) {
|
|
@@ -5,7 +5,7 @@ function isCloudflareWorkers() {
|
|
|
5
5
|
return typeof WebSocketPair < "u" || typeof navigator < "u" && navigator.userAgent === "Cloudflare-Workers" || typeof EdgeRuntime < "u" && EdgeRuntime === "vercel";
|
|
6
6
|
}
|
|
7
7
|
let USER_AGENT;
|
|
8
|
-
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (USER_AGENT = "jose/v6.2.
|
|
8
|
+
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (USER_AGENT = "jose/v6.2.18");
|
|
9
9
|
const customFetch = /* @__PURE__ */ Symbol();
|
|
10
10
|
async function fetchJwks(url, headers, signal, fetchImpl = fetch) {
|
|
11
11
|
const response = await fetchImpl(url, {
|
|
@@ -21,7 +21,7 @@ async function fetchJwks(url, headers, signal, fetchImpl = fetch) {
|
|
|
21
21
|
try {
|
|
22
22
|
return await response.json();
|
|
23
23
|
} catch (cause) {
|
|
24
|
-
throw new JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON", { cause });
|
|
24
|
+
throw signal.aborted ? new JWKSTimeout(void 0, { cause }) : new JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON", { cause });
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
const jwksCache = /* @__PURE__ */ Symbol();
|
|
@@ -29,15 +29,12 @@ class EncryptJWT extends EncryptJWT_base {
|
|
|
29
29
|
return this.#replicateAudienceAsHeader = !0, this;
|
|
30
30
|
}
|
|
31
31
|
async encrypt(key, options) {
|
|
32
|
-
const plaintext = jwtClaimsSetBytes(this);
|
|
33
|
-
this.#input[1] && (this.#replicateIssuerAsHeader || this.#replicateSubjectAsHeader || this.#replicateAudienceAsHeader) && (this.#input[1] = {
|
|
34
|
-
...this.#input[1],
|
|
35
|
-
iss: this.#replicateIssuerAsHeader ? jwtClaim(this, "iss") : void 0,
|
|
36
|
-
sub: this.#replicateSubjectAsHeader ? jwtClaim(this, "sub") : void 0,
|
|
37
|
-
aud: this.#replicateAudienceAsHeader ? jwtClaim(this, "aud") : void 0
|
|
38
|
-
});
|
|
39
32
|
const input = [...this.#input];
|
|
40
|
-
|
|
33
|
+
if (input[0] = jwtClaimsSetBytes(this), input[1] && (this.#replicateIssuerAsHeader || this.#replicateSubjectAsHeader || this.#replicateAudienceAsHeader)) {
|
|
34
|
+
const header = { ...input[1] };
|
|
35
|
+
this.#replicateIssuerAsHeader && (header.iss = jwtClaim(this, "iss")), this.#replicateSubjectAsHeader && (header.sub = jwtClaim(this, "sub")), this.#replicateAudienceAsHeader && (header.aud = jwtClaim(this, "aud")), input[1] = header;
|
|
36
|
+
}
|
|
37
|
+
return compactJWE(await createJWE(input, key, options));
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
export {
|
package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_decrypt.js
CHANGED
|
@@ -151,7 +151,7 @@ async function decryptJWE(jwe, shared, key, token = shareJWE(jwe)) {
|
|
|
151
151
|
if (decompressionLimit === 0)
|
|
152
152
|
throw new JOSENotSupported('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');
|
|
153
153
|
plaintext = await decompress(plaintext, decompressionLimit).catch((cause) => {
|
|
154
|
-
throw cause instanceof JWEInvalid ? cause : new JWEInvalid("Failed to decompress plaintext", { cause });
|
|
154
|
+
throw cause instanceof JWEInvalid || cause instanceof JOSENotSupported ? cause : new JWEInvalid("Failed to decompress plaintext", { cause });
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
return {
|
package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_encrypt.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { encode as b64u } from "../util/base64url.js";
|
|
2
2
|
import { encrypt } from "./content_encryption.js";
|
|
3
3
|
import { encryptKeyManagement } from "./key_management.js";
|
|
4
|
-
import { JWEInvalid } from "../util/errors.js";
|
|
4
|
+
import { JOSENotSupported, JWEInvalid } from "../util/errors.js";
|
|
5
5
|
import { assertUint8Array, isDisjoint, isObject, serializeJoseHeader, validateCrit, validateCritDuplicates, JWE_RECOGNIZED } from "./validate.js";
|
|
6
6
|
import { encode } from "./buffer_utils.js";
|
|
7
7
|
import { prepareKey } from "./key.js";
|
|
@@ -51,7 +51,7 @@ async function encryptJWE(input, checked, key) {
|
|
|
51
51
|
const encodedProtectedHeader = protectedHeader ? b64u(JSON.stringify(protectedHeader)) : "", encodedAad = aad?.byteLength ? b64u(aad) : void 0, additionalAuthenticatedData = encode(encodedAad ? `${encodedProtectedHeader}.${encodedAad}` : encodedProtectedHeader);
|
|
52
52
|
let plaintext = inputPlaintext;
|
|
53
53
|
joseHeader.zip === "DEF" && (plaintext = await compress(plaintext).catch((cause) => {
|
|
54
|
-
throw new JWEInvalid("Failed to compress plaintext", { cause });
|
|
54
|
+
throw cause instanceof JOSENotSupported ? cause : new JWEInvalid("Failed to compress plaintext", { cause });
|
|
55
55
|
}));
|
|
56
56
|
let ciphertext, tag, iv;
|
|
57
57
|
algEntry.mode === "integrated-encryption" ? [encryptedKey, ciphertext] = await algEntry.encrypt(cek, plaintext, additionalAuthenticatedData, protectedHeader, joseHeader, keyManagementParameters) : { ciphertext, tag, iv } = await encrypt(encEntry, plaintext, cek, inputIv, additionalAuthenticatedData);
|
package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwt_claims_set.js
CHANGED
|
@@ -17,7 +17,7 @@ function secs(str) {
|
|
|
17
17
|
const matched = REGEX.exec(str);
|
|
18
18
|
(!matched || matched[4] && matched[1]) && invalidDuration();
|
|
19
19
|
const value = parseFloat(matched[2]), durationSeconds = Math.round(value * multipliers[matched[3][0].toLowerCase()]);
|
|
20
|
-
return Number.isFinite(durationSeconds) || invalidDuration(), matched[1] === "-" || matched[4] === "ago" ? -durationSeconds : durationSeconds;
|
|
20
|
+
return Number.isFinite(durationSeconds) || invalidDuration(), matched[1] === "-" || matched[4]?.toLowerCase() === "ago" ? -durationSeconds : durationSeconds;
|
|
21
21
|
}
|
|
22
22
|
function validateInput(label, input) {
|
|
23
23
|
if (!Number.isFinite(input))
|
|
@@ -8,6 +8,8 @@ const tag = (key) => key[Symbol.toStringTag], jwkMatchesOp = (entry, key, usage)
|
|
|
8
8
|
if (key.use !== expected)
|
|
9
9
|
throw new TypeError(`Invalid key for this operation, its "use" must be "${expected}" when present`);
|
|
10
10
|
}
|
|
11
|
+
if (key.kty === "AKP" && key.alg === void 0)
|
|
12
|
+
throw new TypeError('missing "alg" (Algorithm) Parameter value');
|
|
11
13
|
if (key.alg !== void 0 && key.alg !== alg)
|
|
12
14
|
throw new TypeError(`Invalid key for this operation, its "alg" must be "${alg}" when present`);
|
|
13
15
|
if (Array.isArray(key.key_ops)) {
|
|
@@ -64,7 +64,7 @@ function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
|
64
64
|
metadata: {
|
|
65
65
|
id: void 0,
|
|
66
66
|
version: void 0,
|
|
67
|
-
payload: payload ? JSON.stringify(payload) : void 0,
|
|
67
|
+
payload: void 0 !== payload ? JSON.stringify(payload) : void 0,
|
|
68
68
|
description: void 0
|
|
69
69
|
}
|
|
70
70
|
};
|
|
@@ -35,7 +35,7 @@ function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
|
35
35
|
metadata: {
|
|
36
36
|
id: void 0,
|
|
37
37
|
version: void 0,
|
|
38
|
-
payload: payload ? JSON.stringify(payload) : void 0,
|
|
38
|
+
payload: void 0 !== payload ? JSON.stringify(payload) : void 0,
|
|
39
39
|
description: void 0
|
|
40
40
|
}
|
|
41
41
|
};
|
|
@@ -381,6 +381,7 @@ export declare abstract class PostHogCoreStateless {
|
|
|
381
381
|
*/
|
|
382
382
|
protected sendBatch(batchMessages: (PostHogEventProperties | undefined)[], retryOptions?: Partial<RetriableOptions>, route?: string): Promise<void>;
|
|
383
383
|
private _flush;
|
|
384
|
+
protected shouldRetainBatchOnError(error: unknown): boolean;
|
|
384
385
|
private _flushRoute;
|
|
385
386
|
/**
|
|
386
387
|
* Shared implementation behind the three OTLP senders, which differ only in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posthog-core-stateless.d.ts","sourceRoot":"","sources":["../src/posthog-core-stateless.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAC5F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAGnD,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAGhB,y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AAS,CAAC,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAErD;IAED;;;;;;;;;;;OAWG;IACH,UAAgB,SAAS,CACvB,aAAa,EAAE,CAAC,sBAAsB,GAAG,SAAS,CAAC,EAAE,EACrD,YAAY,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,EACxC,KAAK,GAAE,MAA4B,GAClC,OAAO,CAAC,IAAI,CAAC,CAqCf;YAEa,MAAM;IAmCpB,SAAS,CAAC,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE1D;YAEa,WAAW;IAsFzB;;;;;;;;;OASG;YACW,cAAc;IA+FtB,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAE5E;IAEK,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAErF;IAED;;;;;;;OAOG;IACG,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAElF;IAED,OAAO,CAAC,cAAc;IAwIhB,SAAS,CAAC,iBAAiB,GAAE,MAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAwDhE;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,QAAQ,CAAC,iBAAiB,GAAE,MAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAW/D;CACF"}
|
|
@@ -838,6 +838,9 @@ class PostHogCoreStateless {
|
|
|
838
838
|
if (void 0 !== firstError) throw firstError;
|
|
839
839
|
this._events.emit('flush', sentMessages);
|
|
840
840
|
}
|
|
841
|
+
shouldRetainBatchOnError(error) {
|
|
842
|
+
return error instanceof PostHogFetchNetworkError;
|
|
843
|
+
}
|
|
841
844
|
async _flushRoute(route, sentMessages) {
|
|
842
845
|
const queueKey = this.persistedQueueKeyForRoute(route);
|
|
843
846
|
let queue = this.getPersistedProperty(queueKey) || [];
|
|
@@ -878,7 +881,7 @@ class PostHogCoreStateless {
|
|
|
878
881
|
this._logger.warn(`Received 413 when sending batch of size ${batchMessages.length}, reducing batch size to ${this.maxBatchSize}`);
|
|
879
882
|
continue;
|
|
880
883
|
}
|
|
881
|
-
if (!(err
|
|
884
|
+
if (!this.shouldRetainBatchOnError(err)) await persistQueueChange();
|
|
882
885
|
this._events.emit('error', err);
|
|
883
886
|
throw err;
|
|
884
887
|
}
|
|
@@ -800,6 +800,9 @@ class PostHogCoreStateless {
|
|
|
800
800
|
if (void 0 !== firstError) throw firstError;
|
|
801
801
|
this._events.emit('flush', sentMessages);
|
|
802
802
|
}
|
|
803
|
+
shouldRetainBatchOnError(error) {
|
|
804
|
+
return error instanceof PostHogFetchNetworkError;
|
|
805
|
+
}
|
|
803
806
|
async _flushRoute(route, sentMessages) {
|
|
804
807
|
const queueKey = this.persistedQueueKeyForRoute(route);
|
|
805
808
|
let queue = this.getPersistedProperty(queueKey) || [];
|
|
@@ -840,7 +843,7 @@ class PostHogCoreStateless {
|
|
|
840
843
|
this._logger.warn(`Received 413 when sending batch of size ${batchMessages.length}, reducing batch size to ${this.maxBatchSize}`);
|
|
841
844
|
continue;
|
|
842
845
|
}
|
|
843
|
-
if (!(err
|
|
846
|
+
if (!this.shouldRetainBatchOnError(err)) await persistQueueChange();
|
|
844
847
|
this._events.emit('error', err);
|
|
845
848
|
throw err;
|
|
846
849
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PostHogAutocaptureElement, PostHogFlagsResponse, PostHogFeatureFlagsResponse, PostHogCoreOptions, PostHogEventProperties, PostHogCaptureOptions, JsonType, PostHogRemoteConfig, FeatureFlagValue, FeatureFlagResult, FeatureFlagResultOptions, IsFeatureEnabledOptions, PostHogFeatureFlagDetails, PostHogGroupProperties } from './types';
|
|
1
|
+
import type { PostHogAutocaptureElement, PostHogFlagsResponse, PostHogFeatureFlagsResponse, PostHogCoreOptions, PostHogEventProperties, PostHogCaptureOptions, JsonType, PostHogRemoteConfig, FeatureFlagValue, FeatureFlagResult, FeatureFlagResultOptions, IsFeatureEnabledOptions, PostHogFeatureFlagDetails, GetFlagsResult, PostHogGroupProperties } from './types';
|
|
2
2
|
import { PostHogPersistedProperty } from './types';
|
|
3
3
|
import { PostHogCoreStateless } from './posthog-core-stateless';
|
|
4
4
|
import { EventHint } from './error-tracking';
|
|
@@ -129,6 +129,7 @@ export declare abstract class PostHogCore extends PostHogCoreStateless {
|
|
|
129
129
|
private maybeNotifyRemoteConfig;
|
|
130
130
|
private cacheSessionReplay;
|
|
131
131
|
private _remoteConfigAsync;
|
|
132
|
+
protected getFlagsForContext(...args: Parameters<PostHogCoreStateless['getFlags']>): Promise<GetFlagsResult | undefined>;
|
|
132
133
|
private _flagsAsync;
|
|
133
134
|
private setKnownFeatureFlagDetails;
|
|
134
135
|
private getKnownFeatureFlagDetails;
|