@zuplo/cli 7.15.14 → 7.15.17

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.
Files changed (101) hide show
  1. package/node_modules/@posthog/core/dist/featureFlagUtils.d.ts.map +1 -1
  2. package/node_modules/@posthog/core/dist/featureFlagUtils.js +10 -3
  3. package/node_modules/@posthog/core/dist/featureFlagUtils.mjs +10 -3
  4. package/node_modules/@posthog/core/dist/posthog-core.d.ts.map +1 -1
  5. package/node_modules/@posthog/core/dist/posthog-core.js +7 -4
  6. package/node_modules/@posthog/core/dist/posthog-core.mjs +7 -4
  7. package/node_modules/@posthog/core/dist/types.d.ts +2 -0
  8. package/node_modules/@posthog/core/dist/types.d.ts.map +1 -1
  9. package/node_modules/@posthog/core/dist/types.js +1 -0
  10. package/node_modules/@posthog/core/dist/types.mjs +1 -0
  11. package/node_modules/@posthog/core/package.json +2 -2
  12. package/node_modules/@posthog/core/src/featureFlagUtils.ts +17 -12
  13. package/node_modules/@posthog/core/src/posthog-core.ts +19 -4
  14. package/node_modules/@posthog/core/src/types.ts +2 -0
  15. package/node_modules/@zuplo/core/customer.cli.minified.js +305 -305
  16. package/node_modules/@zuplo/core/index.minified.js +312 -312
  17. package/node_modules/@zuplo/core/package.json +1 -1
  18. package/node_modules/@zuplo/graphql/package.json +1 -1
  19. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  20. package/node_modules/@zuplo/otel/out/esm/{chunk-6YAK7LGJ.js → chunk-BJ3PRHGL.js} +2 -2
  21. package/node_modules/@zuplo/otel/out/esm/chunk-BJ3PRHGL.js.map +1 -0
  22. package/node_modules/@zuplo/otel/out/esm/index.js +1 -1
  23. package/node_modules/@zuplo/otel/out/types/index.d.ts +10 -0
  24. package/node_modules/@zuplo/otel/package.json +1 -1
  25. package/node_modules/@zuplo/runtime/out/esm/{chunk-AJ3MMWJS.js → chunk-5XXEIH5B.js} +2 -2
  26. package/node_modules/@zuplo/runtime/out/esm/chunk-6KHAYHSW.js +274 -0
  27. package/node_modules/@zuplo/runtime/out/esm/chunk-6KHAYHSW.js.map +1 -0
  28. package/node_modules/@zuplo/runtime/out/esm/{chunk-T2WKOG7J.js → chunk-APWLPHXH.js} +2 -2
  29. package/node_modules/@zuplo/runtime/out/esm/chunk-I65Y62VQ.js +24 -0
  30. package/node_modules/@zuplo/runtime/out/esm/{chunk-G42UYZ6V.js.map → chunk-I65Y62VQ.js.map} +1 -1
  31. package/node_modules/@zuplo/runtime/out/esm/chunk-KZBZ5KM5.js +188 -0
  32. package/node_modules/@zuplo/runtime/out/esm/chunk-KZBZ5KM5.js.map +1 -0
  33. package/node_modules/@zuplo/runtime/out/esm/{chunk-TOJD4RET.js → chunk-MWNVPFFM.js} +2 -2
  34. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  35. package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
  36. package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
  37. package/node_modules/@zuplo/runtime/out/esm/mcp/messages/index.js +1 -1
  38. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  39. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
  40. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
  41. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
  42. package/node_modules/@zuplo/runtime/out/types/index.d.ts +32 -0
  43. package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +220 -0
  44. package/node_modules/@zuplo/runtime/package.json +1 -1
  45. package/node_modules/hono/dist/adapter/bun/websocket.js +19 -4
  46. package/node_modules/hono/dist/adapter/lambda-edge/handler.js +4 -0
  47. package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +19 -4
  48. package/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +4 -0
  49. package/node_modules/hono/dist/cjs/helper/accepts/accepts.js +5 -0
  50. package/node_modules/hono/dist/cjs/helper/proxy/index.js +2 -0
  51. package/node_modules/hono/dist/cjs/jsx/dom/components.js +1 -1
  52. package/node_modules/hono/dist/cjs/jsx/dom/hooks/index.js +5 -2
  53. package/node_modules/hono/dist/cjs/jsx/dom/intrinsic-element/components.js +8 -5
  54. package/node_modules/hono/dist/cjs/jsx/dom/render.js +9 -3
  55. package/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +1 -0
  56. package/node_modules/hono/dist/cjs/middleware/combine/index.js +4 -0
  57. package/node_modules/hono/dist/cjs/middleware/language/language.js +1 -1
  58. package/node_modules/hono/dist/cjs/middleware/method-override/index.js +35 -12
  59. package/node_modules/hono/dist/cjs/middleware/request-id/request-id.js +3 -3
  60. package/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +6 -3
  61. package/node_modules/hono/dist/cjs/utils/body.js +1 -0
  62. package/node_modules/hono/dist/cjs/utils/html.js +5 -0
  63. package/node_modules/hono/dist/cjs/utils/jwt/jwt.js +7 -5
  64. package/node_modules/hono/dist/helper/accepts/accepts.js +5 -0
  65. package/node_modules/hono/dist/helper/proxy/index.js +2 -0
  66. package/node_modules/hono/dist/jsx/dom/components.js +2 -2
  67. package/node_modules/hono/dist/jsx/dom/hooks/index.js +5 -2
  68. package/node_modules/hono/dist/jsx/dom/intrinsic-element/components.js +8 -5
  69. package/node_modules/hono/dist/jsx/dom/render.js +9 -3
  70. package/node_modules/hono/dist/middleware/basic-auth/index.js +1 -0
  71. package/node_modules/hono/dist/middleware/combine/index.js +4 -0
  72. package/node_modules/hono/dist/middleware/language/language.js +1 -1
  73. package/node_modules/hono/dist/middleware/method-override/index.js +35 -12
  74. package/node_modules/hono/dist/middleware/request-id/request-id.js +3 -3
  75. package/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +6 -3
  76. package/node_modules/hono/dist/types/helper/accepts/accepts.d.ts +5 -0
  77. package/node_modules/hono/dist/types/jsx/base.d.ts +2 -1
  78. package/node_modules/hono/dist/types/middleware/basic-auth/index.d.ts +1 -0
  79. package/node_modules/hono/dist/types/middleware/request-id/request-id.d.ts +3 -3
  80. package/node_modules/hono/dist/types/middleware/secure-headers/secure-headers.d.ts +2 -0
  81. package/node_modules/hono/dist/types/utils/jwt/jwt.d.ts +4 -2
  82. package/node_modules/hono/dist/types/utils/types.d.ts +12 -2
  83. package/node_modules/hono/dist/utils/body.js +1 -0
  84. package/node_modules/hono/dist/utils/html.js +5 -0
  85. package/node_modules/hono/dist/utils/jwt/jwt.js +7 -5
  86. package/node_modules/hono/package.json +1 -1
  87. package/node_modules/strip-json-comments/index.d.ts +3 -1
  88. package/node_modules/strip-json-comments/index.js +9 -22
  89. package/node_modules/strip-json-comments/package.json +23 -19
  90. package/package.json +11 -11
  91. package/node_modules/@zuplo/otel/out/esm/chunk-6YAK7LGJ.js.map +0 -1
  92. package/node_modules/@zuplo/runtime/out/esm/chunk-24DRL32G.js +0 -431
  93. package/node_modules/@zuplo/runtime/out/esm/chunk-24DRL32G.js.map +0 -1
  94. package/node_modules/@zuplo/runtime/out/esm/chunk-BH4DKEES.js +0 -13
  95. package/node_modules/@zuplo/runtime/out/esm/chunk-BH4DKEES.js.map +0 -1
  96. package/node_modules/@zuplo/runtime/out/esm/chunk-G42UYZ6V.js +0 -24
  97. /package/node_modules/@zuplo/runtime/out/esm/{chunk-AJ3MMWJS.js.map → chunk-5XXEIH5B.js.map} +0 -0
  98. /package/node_modules/@zuplo/runtime/out/esm/{chunk-24DRL32G.js.LEGAL.txt → chunk-6KHAYHSW.js.LEGAL.txt} +0 -0
  99. /package/node_modules/@zuplo/runtime/out/esm/{chunk-T2WKOG7J.js.map → chunk-APWLPHXH.js.map} +0 -0
  100. /package/node_modules/@zuplo/runtime/out/esm/{chunk-G42UYZ6V.js.LEGAL.txt → chunk-I65Y62VQ.js.LEGAL.txt} +0 -0
  101. /package/node_modules/@zuplo/runtime/out/esm/{chunk-TOJD4RET.js.map → chunk-MWNVPFFM.js.map} +0 -0
@@ -9,5 +9,5 @@
9
9
  * See https://zuplo.com/legal/eula for more information.
10
10
  */
11
11
 
12
- import{P as p,V as c,Z as u}from"../chunk-24DRL32G.js";import"../chunk-BH4DKEES.js";import{a as d}from"../chunk-T2WKOG7J.js";import"../chunk-R6UNMRUU.js";import"../chunk-AJ3MMWJS.js";import"../chunk-5JGLAPFA.js";import{Y as i}from"../chunk-G42UYZ6V.js";import{a as o}from"../chunk-VXPFMOL5.js";function w(l={request:new Request("https://api.example.com")}){let e=[];function t(s){e.push(Promise.resolve(s))}return o(t,"waitUntil"),{context:new a({event:{waitUntil:t},route:l.route,originalRequest:l.request}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(w,"createMockContext");var g={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},a=class extends EventTarget{static{o(this,"MockZuploContext")}#e;#t;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=g,parentContext:n,originalRequest:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:i.console.info,log:i.console.log,debug:i.console.debug,warn:i.console.warn,error:i.console.error,setLogProperties:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={ip:"203.0.113.7",asn:1234,asOrganization:"ORGANIZATION",city:"Seattle",region:"Washington",regionCode:"WA",colo:"SEA",continent:"NA",country:"US",postalCode:"98004",metroCode:"SEA",latitude:void 0,longitude:void 0,timezone:void 0,httpProtocol:void 0,clientCert:void 0,clientMtlsVerificationStatus:void 0,clientMtlsVerificationReason:void 0,clientCertFingerprintSha256:void 0,clientCertNotBefore:void 0,clientCertNotAfter:void 0,clientCertIssuerDn:void 0,clientCertSubjectDn:void 0},this.parentContext=n,this.#e=e,this.#t=r,this.analyticsContext=new c(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,n){throw new Error("Not implemented")}invokeRoute(e,t){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addPreRequestHandler(e,t){let n;try{n=u.getContextExtensions(this)}catch{n=u.initialize(this,new d(this.#t??new Request("https://api.example.com")))}n.preRequestPhase??="active",p(this,n,e,t)}get preRequestHandlers(){let e;try{e=u.getContextExtensions(this)}catch{return[]}return(e.preRequestState?.entries??[]).map(t=>({policyName:t.policyName,name:t.name}))}addEventListener(e,t,n){let r=o(s=>{try{typeof t=="function"?t(s):t.handleEvent(s)}catch(m){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),m}},"wrapped");super.addEventListener(e,r,n)}};export{a as MockZuploContext,w as createMockContext};
12
+ import{P as p,V as c,Z as u}from"../chunk-6KHAYHSW.js";import"../chunk-KZBZ5KM5.js";import{a as d}from"../chunk-APWLPHXH.js";import"../chunk-R6UNMRUU.js";import"../chunk-5XXEIH5B.js";import"../chunk-5JGLAPFA.js";import{Y as i}from"../chunk-I65Y62VQ.js";import{a as o}from"../chunk-VXPFMOL5.js";function w(l={request:new Request("https://api.example.com")}){let e=[];function t(s){e.push(Promise.resolve(s))}return o(t,"waitUntil"),{context:new a({event:{waitUntil:t},route:l.route,originalRequest:l.request}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(w,"createMockContext");var g={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},a=class extends EventTarget{static{o(this,"MockZuploContext")}#e;#t;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=g,parentContext:n,originalRequest:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:i.console.info,log:i.console.log,debug:i.console.debug,warn:i.console.warn,error:i.console.error,setLogProperties:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={ip:"203.0.113.7",asn:1234,asOrganization:"ORGANIZATION",city:"Seattle",region:"Washington",regionCode:"WA",colo:"SEA",continent:"NA",country:"US",postalCode:"98004",metroCode:"SEA",latitude:void 0,longitude:void 0,timezone:void 0,httpProtocol:void 0,clientCert:void 0,clientMtlsVerificationStatus:void 0,clientMtlsVerificationReason:void 0,clientCertFingerprintSha256:void 0,clientCertNotBefore:void 0,clientCertNotAfter:void 0,clientCertIssuerDn:void 0,clientCertSubjectDn:void 0},this.parentContext=n,this.#e=e,this.#t=r,this.analyticsContext=new c(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,n){throw new Error("Not implemented")}invokeRoute(e,t){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addPreRequestHandler(e,t){let n;try{n=u.getContextExtensions(this)}catch{n=u.initialize(this,new d(this.#t??new Request("https://api.example.com")))}n.preRequestPhase??="active",p(this,n,e,t)}get preRequestHandlers(){let e;try{e=u.getContextExtensions(this)}catch{return[]}return(e.preRequestState?.entries??[]).map(t=>({policyName:t.policyName,name:t.name}))}addEventListener(e,t,n){let r=o(s=>{try{typeof t=="function"?t(s):t.handleEvent(s)}catch(m){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),m}},"wrapped");super.addEventListener(e,r,n)}};export{a as MockZuploContext,w as createMockContext};
13
13
  //# sourceMappingURL=index.js.map
@@ -9,5 +9,5 @@
9
9
  * See https://zuplo.com/legal/eula for more information.
10
10
  */
11
11
 
12
- import{H as a,I as l,J as c,K as o,N as p,O as y,P as m}from"../../chunk-AJ3MMWJS.js";import"../../chunk-5JGLAPFA.js";import"../../chunk-G42UYZ6V.js";import{a as i}from"../../chunk-VXPFMOL5.js";async function g(r,e){let t=typeof e.credentials=="function"?await e.credentials():e.credentials,n=r.method,d=n!=="GET"&&n!=="HEAD"&&r.body!=null?await r.arrayBuffer():null,s=await new o({method:n,url:r.url,headers:r.headers,body:d,accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken,service:e.service,region:e.region,signQuery:e.signQuery}).sign();return new Request(s.url.toString(),{method:s.method,headers:s.headers,body:s.body})}i(g,"signRequest");export{c as AwsClient,o as AwsV4Signer,p as fromTemporaryCredentials,y as fromWebToken,m as fromZuploIdentity,l as getAwsCredentialProvider,a as setAwsCredentialProvider,g as signRequest};
12
+ import{H as a,I as l,J as c,K as o,N as p,O as y,P as m}from"../../chunk-5XXEIH5B.js";import"../../chunk-5JGLAPFA.js";import"../../chunk-I65Y62VQ.js";import{a as i}from"../../chunk-VXPFMOL5.js";async function g(r,e){let t=typeof e.credentials=="function"?await e.credentials():e.credentials,n=r.method,d=n!=="GET"&&n!=="HEAD"&&r.body!=null?await r.arrayBuffer():null,s=await new o({method:n,url:r.url,headers:r.headers,body:d,accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken,service:e.service,region:e.region,signQuery:e.signQuery}).sign();return new Request(s.url.toString(),{method:s.method,headers:s.headers,body:s.body})}i(g,"signRequest");export{c as AwsClient,o as AwsV4Signer,p as fromTemporaryCredentials,y as fromWebToken,m as fromZuploIdentity,l as getAwsCredentialProvider,a as setAwsCredentialProvider,g as signRequest};
13
13
  //# sourceMappingURL=index.js.map
@@ -4670,6 +4670,38 @@ declare interface CompatibilityFlags {
4670
4670
  * @compatibilityDate 2026-11-06
4671
4671
  */
4672
4672
  mcpServerSpecCompliance: boolean;
4673
+ /**
4674
+ * Whether a `type: "graphql"` route in `x-zuplo-route.mcp` registers a
4675
+ * schema tool, a read-only query tool and a mutation tool instead of the
4676
+ * introspection and execute tools.
4677
+ *
4678
+ * Before this flag:
4679
+ *
4680
+ * - A GraphQL route registers `{operationId}_introspect` and
4681
+ * `{operationId}_execute_query`, which runs any operation type, configured
4682
+ * with `introspectionTool` and `executeTool`.
4683
+ * - `enabled: false` on a GraphQL route in `x-zuplo-route.mcp` is ignored:
4684
+ * both tools are registered.
4685
+ * - `schemaTool`, `queryTool`, `mutationTool` or `documentationUrl` on a
4686
+ * GraphQL route fails the build.
4687
+ *
4688
+ * After this flag:
4689
+ *
4690
+ * - A GraphQL route registers `{operationId}_schema` (SDL),
4691
+ * `{operationId}_query` (queries only) and `{operationId}_mutation`
4692
+ * (mutations only), configured with `schemaTool`, `queryTool`,
4693
+ * `mutationTool` and `documentationUrl`.
4694
+ * - `enabled: false` on a GraphQL route registers no tools.
4695
+ * - `introspectionTool` or `executeTool` on a GraphQL route fails the
4696
+ * build, unless it is blank.
4697
+ * - The deprecated `x-zuplo-mcp-graphql` extension still registers the
4698
+ * introspection and execute tools.
4699
+ *
4700
+ * See `packages/runtime/specs/compat-mcp-graphql-tools-v2.md`.
4701
+ *
4702
+ * @compatibilityDate 2026-11-06
4703
+ */
4704
+ mcpGraphQLToolsV2: boolean;
4673
4705
  }
4674
4706
 
4675
4707
  declare interface CompletionsFallbacks {
@@ -1,3 +1,5 @@
1
+ import type { ToolAnnotations } from "@modelcontextprotocol/server";
2
+
1
3
  /* Excluded from this release type: AIGatewayConfiguration */
2
4
 
3
5
  export declare interface ApiRuntimeConfig {
@@ -541,6 +543,38 @@ declare interface CompatibilityFlags {
541
543
  * @compatibilityDate 2026-11-06
542
544
  */
543
545
  mcpServerSpecCompliance: boolean;
546
+ /**
547
+ * Whether a `type: "graphql"` route in `x-zuplo-route.mcp` registers a
548
+ * schema tool, a read-only query tool and a mutation tool instead of the
549
+ * introspection and execute tools.
550
+ *
551
+ * Before this flag:
552
+ *
553
+ * - A GraphQL route registers `{operationId}_introspect` and
554
+ * `{operationId}_execute_query`, which runs any operation type, configured
555
+ * with `introspectionTool` and `executeTool`.
556
+ * - `enabled: false` on a GraphQL route in `x-zuplo-route.mcp` is ignored:
557
+ * both tools are registered.
558
+ * - `schemaTool`, `queryTool`, `mutationTool` or `documentationUrl` on a
559
+ * GraphQL route fails the build.
560
+ *
561
+ * After this flag:
562
+ *
563
+ * - A GraphQL route registers `{operationId}_schema` (SDL),
564
+ * `{operationId}_query` (queries only) and `{operationId}_mutation`
565
+ * (mutations only), configured with `schemaTool`, `queryTool`,
566
+ * `mutationTool` and `documentationUrl`.
567
+ * - `enabled: false` on a GraphQL route registers no tools.
568
+ * - `introspectionTool` or `executeTool` on a GraphQL route fails the
569
+ * build, unless it is blank.
570
+ * - The deprecated `x-zuplo-mcp-graphql` extension still registers the
571
+ * introspection and execute tools.
572
+ *
573
+ * See `packages/runtime/specs/compat-mcp-graphql-tools-v2.md`.
574
+ *
575
+ * @compatibilityDate 2026-11-06
576
+ */
577
+ mcpGraphQLToolsV2: boolean;
544
578
  }
545
579
 
546
580
  /**
@@ -628,6 +662,131 @@ declare const EventType: {
628
662
 
629
663
  declare type EventType = (typeof EventType)[keyof typeof EventType];
630
664
 
665
+ /**
666
+ * MCP GraphQL configuration in x-zuplo-route.mcp
667
+ *
668
+ * The project's compatibility date picks the tools the route registers:
669
+ *
670
+ * | Compatibility date | Tools |
671
+ * | ----------------------------------------------- | ------------------------------------------------------------------------------------------- |
672
+ * | before `2026-11-06` | `{operationId}_introspect` and `{operationId}_execute_query`, which runs any operation type |
673
+ * | `2026-11-06` or later (`mcpGraphQLToolsV2`) | `{operationId}_schema` (SDL), `{operationId}_query` and `{operationId}_mutation` |
674
+ *
675
+ * `introspectionTool` and `executeTool` configure the introspection and
676
+ * execute tools; `schemaTool`, `queryTool`, `mutationTool` and
677
+ * `documentationUrl` the schema, query and mutation tools. Setting a key the
678
+ * route's tools don't use is a build error.
679
+ *
680
+ * @example From compatibility date 2026-11-06
681
+ * ```json
682
+ * {
683
+ * "x-zuplo-route": {
684
+ * "handler": { "export": "urlForwardHandler", "module": "$import(@zuplo/runtime)", "options": { "baseUrl": "https://api.example.com" } },
685
+ * "mcp": {
686
+ * "type": "graphql",
687
+ * "documentationUrl": "https://docs.example.com/graphql",
688
+ * "schemaTool": { "name": "graphql_schema" },
689
+ * "queryTool": { "name": "graphql_query" },
690
+ * "mutationTool": { "name": "graphql_mutation", "annotations": { "destructiveHint": false } }
691
+ * }
692
+ * }
693
+ * }
694
+ * ```
695
+ */
696
+ export declare interface ExtensionZuploRouteMcpGraphQL {
697
+ type: "graphql";
698
+ enabled?: boolean;
699
+ /**
700
+ * From compatibility date 2026-11-06. A link to the API's documentation,
701
+ * appended to the default query and mutation tool descriptions as "API
702
+ * reference: {documentationUrl}". A configured `description` is used as
703
+ * written.
704
+ */
705
+ documentationUrl?: string;
706
+ /** Before compatibility date 2026-11-06. The introspection tool. */
707
+ introspectionTool?: {
708
+ name?: string;
709
+ description?: string;
710
+ /** Sent as is; this tool has no default annotations. */
711
+ annotations?: ToolAnnotations;
712
+ };
713
+ /** Before compatibility date 2026-11-06. The execute tool. */
714
+ executeTool?: {
715
+ name?: string;
716
+ description?: string;
717
+ /** Sent as is; this tool has no default annotations. */
718
+ annotations?: ToolAnnotations;
719
+ };
720
+ /**
721
+ * From compatibility date 2026-11-06. The schema tool: returns the schema
722
+ * as SDL, or only the types named in its `typeNames` argument.
723
+ */
724
+ schemaTool?: ExtensionZuploRouteMcpGraphQLSchemaTool;
725
+ /**
726
+ * From compatibility date 2026-11-06. The query tool: runs `query`
727
+ * operations only.
728
+ */
729
+ queryTool?: ExtensionZuploRouteMcpGraphQLTool;
730
+ /**
731
+ * From compatibility date 2026-11-06. The mutation tool: runs `mutation`
732
+ * operations only.
733
+ */
734
+ mutationTool?: ExtensionZuploRouteMcpGraphQLTool;
735
+ }
736
+
737
+ /**
738
+ * The schema tool of a GraphQL route, from compatibility date 2026-11-06.
739
+ */
740
+ declare interface ExtensionZuploRouteMcpGraphQLSchemaTool extends ExtensionZuploRouteMcpGraphQLTool {
741
+ /**
742
+ * How many levels of referenced types the tool adds when it is called
743
+ * without `depth`: 0, 1 or 2.
744
+ * @default 0
745
+ */
746
+ defaultDepth?: number;
747
+ /**
748
+ * The types the tool returns when it is called without `typeNames`, with
749
+ * the names of the other types. Unset, it returns the root query type and,
750
+ * when the mutation tool is on, the root mutation type. The root
751
+ * subscription type is never returned by default: no tool runs
752
+ * subscriptions.
753
+ */
754
+ defaultTypeNames?: string[];
755
+ }
756
+
757
+ /**
758
+ * The schema, query or mutation tool of a GraphQL route, from compatibility
759
+ * date 2026-11-06 (`mcpGraphQLToolsV2`).
760
+ */
761
+ declare interface ExtensionZuploRouteMcpGraphQLTool {
762
+ /**
763
+ * Whether the tool is registered. With the mutation tool off, the query tool
764
+ * still rejects mutations.
765
+ * @default true
766
+ */
767
+ enabled?: boolean;
768
+ /**
769
+ * The tool name. A blank name means unset.
770
+ * @default "{operationId}_schema", "{operationId}_query" or "{operationId}_mutation"
771
+ */
772
+ name?: string;
773
+ /**
774
+ * The tool's display title, sent as `title` and `annotations.title`.
775
+ * @default "{summary} schema", "{summary} query" or "{summary} mutation"
776
+ */
777
+ title?: string;
778
+ /**
779
+ * The tool description, used as written. A blank description means unset.
780
+ */
781
+ description?: string;
782
+ /**
783
+ * Merged over the tool's default hints: `readOnlyHint` and
784
+ * `idempotentHint` on the schema and query tools, `destructiveHint` on the
785
+ * mutation tool, and `openWorldHint: false` on all three.
786
+ */
787
+ annotations?: ToolAnnotations;
788
+ }
789
+
631
790
  /** How one component's value is recovered from flat arguments. */
632
791
  export declare interface FlatComponentPlan {
633
792
  /** The component this plan assembles. */
@@ -705,6 +864,36 @@ export declare function getSchemaAssembler(
705
864
  mode: SchemaRefs
706
865
  ): SchemaAssembler;
707
866
 
867
+ /**
868
+ * The two operation tools of a GraphQL route with the `mcpGraphQLToolsV2`
869
+ * compatibility flag. Each runs one operation type.
870
+ */
871
+ declare type GraphQLOperationToolKind = "query" | "mutation";
872
+
873
+ /** One of the schema, query and mutation tools (`mcpGraphQLToolsV2`). */
874
+ declare type GraphQLSplitToolKind = "schema" | GraphQLOperationToolKind;
875
+
876
+ /** A schema, query or mutation tool's name and the setting that sets it. */
877
+ declare interface GraphQLSplitToolName {
878
+ kind: GraphQLSplitToolKind;
879
+ name: string;
880
+ /** For messages, e.g. `x-zuplo-route.mcp.queryTool.name`. */
881
+ setting: string;
882
+ }
883
+
884
+ /**
885
+ * The names of the enabled schema, query and mutation tools, in registration
886
+ * order: the configured name trimmed, or
887
+ * `{operationId}_schema`, `{operationId}_query` and `{operationId}_mutation`.
888
+ * Empty when the whole extension is turned off (`enabled: false`).
889
+ * @param operationId - the GraphQL operation
890
+ * @param config - the route's `x-zuplo-route.mcp`
891
+ */
892
+ export declare function graphQLSplitToolNames(
893
+ operationId: string,
894
+ config: ExtensionZuploRouteMcpGraphQL
895
+ ): GraphQLSplitToolName[];
896
+
708
897
  /**
709
898
  * @public
710
899
  */
@@ -1617,6 +1806,37 @@ export declare interface McpResourceIdentityConfig {
1617
1806
  */
1618
1807
  export declare type McpResourceRegistration = "operations" | "resources";
1619
1808
 
1809
+ /**
1810
+ * The messages for a key the route's tools don't use
1811
+ * ({@link misplacedGraphQLToolKeys}), shared by the build and the runtime.
1812
+ * @param operationId - the GraphQL operation
1813
+ * @param key - the key
1814
+ * @param toolsV2 - whether `mcpGraphQLToolsV2` is on
1815
+ * @returns `summary`, one line for the build's issue list, and `detail`, what
1816
+ * to do about it
1817
+ */
1818
+ export declare function misplacedGraphQLToolKeyMessage(
1819
+ operationId: string,
1820
+ key: string,
1821
+ toolsV2: boolean
1822
+ ): {
1823
+ summary: string;
1824
+ detail: string;
1825
+ };
1826
+
1827
+ /**
1828
+ * The keys a GraphQL route sets that its tools don't use
1829
+ * (compat-mcp-graphql-tools-v2 MCPGQL-2): with `mcpGraphQLToolsV2` off,
1830
+ * `schemaTool`, `queryTool`, `mutationTool` and `documentationUrl`; with it
1831
+ * on, `introspectionTool` and `executeTool`.
1832
+ * @param config - the route's `x-zuplo-route.mcp`
1833
+ * @param toolsV2 - whether `mcpGraphQLToolsV2` is on
1834
+ */
1835
+ export declare function misplacedGraphQLToolKeys(
1836
+ config: ExtensionZuploRouteMcpGraphQL,
1837
+ toolsV2: boolean
1838
+ ): string[];
1839
+
1620
1840
  declare type Modify<T, R> = Omit<T, keyof R> & R;
1621
1841
 
1622
1842
  /**
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "7.15.14",
4
+ "version": "7.15.17",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
@@ -31,26 +31,41 @@ const upgradeWebSocket = defineWebSocketHelper((c, events) => {
31
31
  protocol: c.req.header("sec-websocket-protocol")?.split(",")[0]?.trim() ?? ""
32
32
  } })) return new Response(null);
33
33
  });
34
+ const runHandler = (ws, handler) => {
35
+ const handleError = (error) => {
36
+ const onError = ws.data.events.onError;
37
+ if (!onError) throw error;
38
+ const event = new Event("error");
39
+ event.error = error;
40
+ onError(event, createWSContext(ws));
41
+ };
42
+ try {
43
+ const result = handler();
44
+ if (result instanceof Promise) result.catch(handleError);
45
+ } catch (error) {
46
+ handleError(error);
47
+ }
48
+ };
34
49
  /**
35
50
  * @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead.
36
51
  */
37
52
  const websocket = {
38
53
  open(ws) {
39
54
  const websocketListeners = ws.data.events;
40
- if (websocketListeners.onOpen) websocketListeners.onOpen(new Event("open"), createWSContext(ws));
55
+ if (websocketListeners.onOpen) runHandler(ws, () => websocketListeners.onOpen(new Event("open"), createWSContext(ws)));
41
56
  },
42
57
  close(ws, code, reason) {
43
58
  const websocketListeners = ws.data.events;
44
- if (websocketListeners.onClose) websocketListeners.onClose(new CloseEvent("close", {
59
+ if (websocketListeners.onClose) runHandler(ws, () => websocketListeners.onClose(new CloseEvent("close", {
45
60
  code,
46
61
  reason
47
- }), createWSContext(ws));
62
+ }), createWSContext(ws)));
48
63
  },
49
64
  message(ws, message) {
50
65
  const websocketListeners = ws.data.events;
51
66
  if (websocketListeners.onMessage) {
52
67
  const normalizedReceiveData = typeof message === "string" ? message : message.buffer;
53
- websocketListeners.onMessage(createWSMessageEvent(normalizedReceiveData), createWSContext(ws));
68
+ runHandler(ws, () => websocketListeners.onMessage(createWSMessageEvent(normalizedReceiveData), createWSContext(ws)));
54
69
  }
55
70
  }
56
71
  };
@@ -44,6 +44,10 @@ const handle = (app) => {
44
44
  };
45
45
  };
46
46
  const createResult = async (res) => {
47
+ if (res.status === 204) return {
48
+ status: "204",
49
+ headers: convertHeaders(res.headers)
50
+ };
47
51
  const contentEncoding = res.headers.get("content-encoding");
48
52
  const isBase64Encoded = isContentTypeBinary(res.headers.get("content-type") || "") || !!contentEncoding && !/^identity$/i.test(contentEncoding);
49
53
  const body = isBase64Encoded ? encodeBase64(await res.arrayBuffer()) : await res.text();
@@ -32,26 +32,41 @@ const upgradeWebSocket = require_helper_websocket_index.defineWebSocketHelper((c
32
32
  protocol: c.req.header("sec-websocket-protocol")?.split(",")[0]?.trim() ?? ""
33
33
  } })) return new Response(null);
34
34
  });
35
+ const runHandler = (ws, handler) => {
36
+ const handleError = (error) => {
37
+ const onError = ws.data.events.onError;
38
+ if (!onError) throw error;
39
+ const event = new Event("error");
40
+ event.error = error;
41
+ onError(event, createWSContext(ws));
42
+ };
43
+ try {
44
+ const result = handler();
45
+ if (result instanceof Promise) result.catch(handleError);
46
+ } catch (error) {
47
+ handleError(error);
48
+ }
49
+ };
35
50
  /**
36
51
  * @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead.
37
52
  */
38
53
  const websocket = {
39
54
  open(ws) {
40
55
  const websocketListeners = ws.data.events;
41
- if (websocketListeners.onOpen) websocketListeners.onOpen(new Event("open"), createWSContext(ws));
56
+ if (websocketListeners.onOpen) runHandler(ws, () => websocketListeners.onOpen(new Event("open"), createWSContext(ws)));
42
57
  },
43
58
  close(ws, code, reason) {
44
59
  const websocketListeners = ws.data.events;
45
- if (websocketListeners.onClose) websocketListeners.onClose(new CloseEvent("close", {
60
+ if (websocketListeners.onClose) runHandler(ws, () => websocketListeners.onClose(new CloseEvent("close", {
46
61
  code,
47
62
  reason
48
- }), createWSContext(ws));
63
+ }), createWSContext(ws)));
49
64
  },
50
65
  message(ws, message) {
51
66
  const websocketListeners = ws.data.events;
52
67
  if (websocketListeners.onMessage) {
53
68
  const normalizedReceiveData = typeof message === "string" ? message : message.buffer;
54
- websocketListeners.onMessage(require_helper_websocket_index.createWSMessageEvent(normalizedReceiveData), createWSContext(ws));
69
+ runHandler(ws, () => websocketListeners.onMessage(require_helper_websocket_index.createWSMessageEvent(normalizedReceiveData), createWSContext(ws)));
55
70
  }
56
71
  }
57
72
  };
@@ -47,6 +47,10 @@ const handle = (app) => {
47
47
  };
48
48
  };
49
49
  const createResult = async (res) => {
50
+ if (res.status === 204) return {
51
+ status: "204",
52
+ headers: convertHeaders(res.headers)
53
+ };
50
54
  const contentEncoding = res.headers.get("content-encoding");
51
55
  const isBase64Encoded = isContentTypeBinary(res.headers.get("content-type") || "") || !!contentEncoding && !/^identity$/i.test(contentEncoding);
52
56
  const body = isBase64Encoded ? require_utils_encode.encodeBase64(await res.arrayBuffer()) : await res.text();
@@ -33,6 +33,11 @@ const defaultMatch = (accepts, config) => {
33
33
  };
34
34
  /**
35
35
  * Match the accept header with the given options.
36
+ *
37
+ * @param {Context} c - The context of the request.
38
+ * @param {acceptsOptions} options - The options for matching the accept header.
39
+ * @returns {string} The matched supported value or the default value.
40
+ *
36
41
  * @example
37
42
  * ```ts
38
43
  * app.get('/users', (c) => {
@@ -100,6 +100,8 @@ const proxy = async (input, proxyInit) => {
100
100
  ...buildRequestInitFromRequest(raw, strictConnectionProcessing),
101
101
  ...preprocessRequestInit(requestInit)
102
102
  });
103
+ req.headers.delete("transfer-encoding");
104
+ req.headers.delete("keep-alive");
103
105
  req.headers.delete("accept-encoding");
104
106
  const res = await (customFetch || fetch)(req);
105
107
  const resHeaders = new Headers(res.headers);
@@ -17,7 +17,7 @@ const Suspense = (({ children, fallback }) => {
17
17
  res[require_jsx_constants.DOM_ERROR_HANDLER] = (err, retry) => {
18
18
  if (!(err instanceof Promise)) throw err;
19
19
  err.finally(retry);
20
- return fallback;
20
+ return fallback || require_jsx_dom_jsx_dev_runtime.jsxDEV(require_jsx_dom_jsx_dev_runtime.Fragment, { children: fallback });
21
21
  };
22
22
  return res;
23
23
  });
@@ -16,7 +16,10 @@ const FormContext = require_jsx_dom_context.createContext({
16
16
  const actions = /* @__PURE__ */ new Set();
17
17
  const registerAction = (action) => {
18
18
  actions.add(action);
19
- action.finally(() => actions.delete(action));
19
+ const remove = () => {
20
+ actions.delete(action);
21
+ };
22
+ action.then(remove, remove);
20
23
  };
21
24
  /**
22
25
  * This hook returns the current form status
@@ -34,7 +37,7 @@ const useFormStatus = () => {
34
37
  */
35
38
  const useOptimistic = (state, updateState) => {
36
39
  const [optimisticState, setOptimisticState] = require_jsx_hooks_index.useState(state);
37
- if (actions.size > 0) Promise.all(actions).finally(() => {
40
+ if (actions.size > 0) Promise.allSettled(actions).then(() => {
38
41
  setOptimisticState(state);
39
42
  });
40
43
  else setOptimisticState(state);
@@ -218,12 +218,15 @@ const form = (props) => {
218
218
  ev.preventDefault();
219
219
  const formData = new FormData(ev.target);
220
220
  setState([formData, true]);
221
- const actionRes = currentAction(formData);
222
- if (actionRes instanceof Promise) {
223
- require_jsx_dom_hooks_index.registerAction(actionRes);
224
- await actionRes;
221
+ try {
222
+ const actionRes = currentAction(formData);
223
+ if (actionRes instanceof Promise) {
224
+ require_jsx_dom_hooks_index.registerAction(actionRes);
225
+ await actionRes;
226
+ }
227
+ } finally {
228
+ setState([null, true]);
225
229
  }
226
- setState([null, true]);
227
230
  }, []);
228
231
  const ref = composeRef(props.ref, (el) => {
229
232
  el.addEventListener("submit", onSubmit);
@@ -156,7 +156,11 @@ const findInsertBefore = (node) => {
156
156
  };
157
157
  const removeNode = (node) => {
158
158
  if (!isNodeString(node)) {
159
- node[require_jsx_constants.DOM_STASH]?.[1][1]?.forEach((data) => data[2]?.());
159
+ const stash = node[require_jsx_constants.DOM_STASH];
160
+ if (stash?.[1][1]) {
161
+ stash[1][1].forEach((data) => data[2]?.());
162
+ delete stash[1][1];
163
+ }
160
164
  refCleanupMap.get(node.e)?.();
161
165
  if (node.p === 2) node.vC?.forEach((n) => n.p = 2);
162
166
  node.vC?.forEach(removeNode);
@@ -213,8 +217,9 @@ const applyNodeObject = (node, container, isNew) => {
213
217
  child.d = false;
214
218
  el = child.e ||= document.createTextNode(child.t);
215
219
  } else {
220
+ const isCreated = !child.e;
216
221
  el = child.e ||= child.n ? document.createElementNS(child.n, child.tag) : document.createElement(child.tag);
217
- applyProps(el, child.props, child.pP);
222
+ applyProps(el, child.props, isCreated ? void 0 : child.pP);
218
223
  applyNodeObject(child, el, isNewLocal);
219
224
  if (child.tag === "select") applySelectValue(el, child.props);
220
225
  }
@@ -344,6 +349,7 @@ const build = (context, node, children) => {
344
349
  prevNode = child;
345
350
  }
346
351
  }
352
+ if (prevNode && !prevNode.s) for (let p = prevNode; p && !isNodeString(p); p = p.vC?.at(-1)) p.nN = node.nN;
347
353
  oldVChildren = oldChildrenByKey ? [...oldChildrenByKey.values()] : oldVChildren;
348
354
  node.vR = buildWithPreviousChildren ? [...node.vC, ...oldVChildren || []] : oldVChildren || [];
349
355
  node.vC = vChildren;
@@ -378,7 +384,7 @@ const build = (context, node, children) => {
378
384
  if (context[0] === 1) context[1] = true;
379
385
  else {
380
386
  build(context, errorHandlerNode, [fallback]);
381
- if ((errorHandler.length === 1 || context !== errorHandlerContext) && errorHandlerNode.c) {
387
+ if ((errorHandler.length === 1 || context !== errorHandlerContext) && errorHandlerNode.c && !context[5].some(([, , n]) => n === errorHandlerNode)) {
382
388
  apply(errorHandlerNode, errorHandlerNode.c, false);
383
389
  return;
384
390
  }
@@ -16,6 +16,7 @@ const require_utils_basic_auth = require("../../utils/basic-auth.js");
16
16
  * @param {Function} [options.verifyUser] - The function to verify user credentials.
17
17
  * @param {string | object | MessageFunction} [options.invalidUserMessage="Unauthorized"] - The invalid user message.
18
18
  * @param {Function} [options.onAuthSuccess] - Callback function called on successful authentication.
19
+ * @param {...{ username: string; password: string }} [users] - Additional user credentials.
19
20
  * @returns {MiddlewareHandler} The middleware handler function.
20
21
  * @throws {HTTPException} If neither "username and password" nor "verifyUser" options are provided.
21
22
  *
@@ -93,6 +93,10 @@ const every = (...middleware) => {
93
93
  c.req.routeIndex = currentRouteIndex;
94
94
  const res = await m(c, next);
95
95
  if (res === false) throw new Error("Unmet condition");
96
+ if (res === true) {
97
+ if (!c.finalized) await next();
98
+ return;
99
+ }
96
100
  return res;
97
101
  }]]))(c, next);
98
102
  };
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_utils_accept = require("../../utils/accept.js");
3
2
  const require_helper_cookie_index = require("../../helper/cookie/index.js");
3
+ const require_utils_accept = require("../../utils/accept.js");
4
4
  //#region src/middleware/language/language.ts
5
5
  const DEFAULT_OPTIONS = {
6
6
  order: [