@zuplo/cli 6.71.22 → 6.71.23

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 (89) hide show
  1. package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts +5 -0
  2. package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts.map +1 -1
  3. package/node_modules/@posthog/core/dist/posthog-core-stateless.js +50 -10
  4. package/node_modules/@posthog/core/dist/posthog-core-stateless.mjs +47 -10
  5. package/node_modules/@posthog/core/dist/posthog-core.d.ts +2 -2
  6. package/node_modules/@posthog/core/dist/posthog-core.d.ts.map +1 -1
  7. package/node_modules/@posthog/core/dist/posthog-core.js +10 -6
  8. package/node_modules/@posthog/core/dist/posthog-core.mjs +11 -7
  9. package/node_modules/@posthog/core/dist/testing/PostHogCoreTestClient.d.ts +1 -0
  10. package/node_modules/@posthog/core/dist/testing/PostHogCoreTestClient.d.ts.map +1 -1
  11. package/node_modules/@posthog/core/dist/testing/PostHogCoreTestClient.js +3 -0
  12. package/node_modules/@posthog/core/dist/testing/PostHogCoreTestClient.mjs +3 -0
  13. package/node_modules/@posthog/core/dist/utils/promise-queue.d.ts +3 -0
  14. package/node_modules/@posthog/core/dist/utils/promise-queue.d.ts.map +1 -1
  15. package/node_modules/@posthog/core/dist/utils/promise-queue.js +15 -3
  16. package/node_modules/@posthog/core/dist/utils/promise-queue.mjs +15 -3
  17. package/node_modules/@posthog/core/package.json +1 -1
  18. package/node_modules/@posthog/core/src/posthog-core-stateless.ts +80 -14
  19. package/node_modules/@posthog/core/src/posthog-core.ts +18 -7
  20. package/node_modules/@posthog/core/src/testing/PostHogCoreTestClient.ts +4 -0
  21. package/node_modules/@posthog/core/src/utils/promise-queue.ts +17 -4
  22. package/node_modules/@posthog/types/dist/posthog.d.ts +12 -0
  23. package/node_modules/@posthog/types/dist/posthog.d.ts.map +1 -1
  24. package/node_modules/@posthog/types/package.json +1 -1
  25. package/node_modules/@posthog/types/src/posthog.ts +13 -0
  26. package/node_modules/@types/node/README.md +1 -1
  27. package/node_modules/@types/node/buffer.d.ts +64 -25
  28. package/node_modules/@types/node/crypto.d.ts +18 -5
  29. package/node_modules/@types/node/diagnostics_channel.d.ts +237 -3
  30. package/node_modules/@types/node/dns.d.ts +1 -1
  31. package/node_modules/@types/node/ffi.d.ts +486 -0
  32. package/node_modules/@types/node/fs/promises.d.ts +3 -0
  33. package/node_modules/@types/node/fs.d.ts +21 -6
  34. package/node_modules/@types/node/http.d.ts +25 -0
  35. package/node_modules/@types/node/index.d.ts +1 -0
  36. package/node_modules/@types/node/package.json +2 -2
  37. package/node_modules/@types/node/process.d.ts +14 -1
  38. package/node_modules/@types/node/quic.d.ts +92 -11
  39. package/node_modules/@types/node/sqlite.d.ts +55 -0
  40. package/node_modules/@types/node/stream/iter.d.ts +150 -0
  41. package/node_modules/@types/node/stream.d.ts +32 -0
  42. package/node_modules/@types/node/test.d.ts +112 -2
  43. package/node_modules/@types/node/ts5.6/index.d.ts +1 -0
  44. package/node_modules/@types/node/ts5.7/index.d.ts +1 -0
  45. package/node_modules/@types/node/util.d.ts +19 -2
  46. package/node_modules/@types/node/v8.d.ts +84 -2
  47. package/node_modules/@types/node/worker_threads.d.ts +8 -7
  48. package/node_modules/@zuplo/core/package.json +1 -1
  49. package/node_modules/@zuplo/graphql/out/esm/index.js +11 -11
  50. package/node_modules/@zuplo/graphql/out/esm/index.js.map +1 -1
  51. package/node_modules/@zuplo/graphql/package.json +1 -1
  52. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  53. package/node_modules/@zuplo/otel/package.json +1 -1
  54. package/node_modules/@zuplo/runtime/out/esm/{chunk-54PA7VDV.js → chunk-4QJJMELB.js} +1 -1
  55. package/node_modules/@zuplo/runtime/out/esm/{chunk-54PA7VDV.js.map → chunk-4QJJMELB.js.map} +1 -1
  56. package/node_modules/@zuplo/runtime/out/esm/chunk-5CYWMN74.js +402 -0
  57. package/node_modules/@zuplo/runtime/out/esm/chunk-5CYWMN74.js.map +1 -0
  58. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  59. package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
  60. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +7 -7
  61. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
  62. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
  63. package/node_modules/@zuplo/runtime/out/types/index.d.ts +109 -19
  64. package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +33 -7
  65. package/node_modules/@zuplo/runtime/package.json +1 -1
  66. package/node_modules/iconv-lite/encodings/sbcs-data.js +2 -0
  67. package/node_modules/iconv-lite/encodings/utf32.js +10 -3
  68. package/node_modules/iconv-lite/package.json +2 -2
  69. package/node_modules/iconv-lite/types/encodings.d.ts +2 -0
  70. package/node_modules/protobufjs/dist/light/protobuf.js +2 -2
  71. package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
  72. package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
  73. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
  74. package/node_modules/protobufjs/dist/protobuf.js +5 -2
  75. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  76. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  77. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  78. package/node_modules/protobufjs/package.json +1 -1
  79. package/node_modules/protobufjs/src/parse.js +3 -0
  80. package/node_modules/toad-cache/README.md +10 -9
  81. package/node_modules/toad-cache/dist/toad-cache.cjs +139 -139
  82. package/node_modules/toad-cache/dist/toad-cache.mjs +136 -140
  83. package/node_modules/toad-cache/package.json +8 -8
  84. package/node_modules/toad-cache/toad-cache.d.cts +20 -14
  85. package/node_modules/toad-cache/toad-cache.d.ts +18 -14
  86. package/package.json +6 -6
  87. package/node_modules/@zuplo/runtime/out/esm/chunk-36XLJ4X6.js +0 -389
  88. package/node_modules/@zuplo/runtime/out/esm/chunk-36XLJ4X6.js.map +0 -1
  89. /package/node_modules/@zuplo/runtime/out/esm/{chunk-36XLJ4X6.js.LEGAL.txt → chunk-5CYWMN74.js.LEGAL.txt} +0 -0
@@ -22,5 +22,5 @@
22
22
  * DEALINGS IN THE SOFTWARE.
23
23
  *--------------------------------------------------------------------------------------------*/
24
24
 
25
- import{b as l}from"../chunk-54PA7VDV.js";import{a as o,da as n}from"../chunk-DSZS6PZJ.js";function g(u={request:new Request("https://api.example.com")}){let e=[];function t(i){e.push(Promise.resolve(i))}return o(t,"waitUntil"),{context:new s({event:{waitUntil:t},route:u.route}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(g,"createMockContext");var p={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},s=class extends EventTarget{static{o(this,"MockZuploContext")}#e;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=p,parentContext:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:n.console.info,log:n.console.log,debug:n.console.debug,warn:n.console.warn,error:n.console.error,setLogProperties:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={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=r,this.#e=e,this.analyticsContext=new l(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,r){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")}addEventListener(e,t,r){let d=o(i=>{try{typeof t=="function"?t(i):t.handleEvent(i)}catch(a){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),a}},"wrapped");super.addEventListener(e,d,r)}};export{s as MockZuploContext,g as createMockContext};
25
+ import{b as l}from"../chunk-4QJJMELB.js";import{a as o,da as n}from"../chunk-DSZS6PZJ.js";function g(u={request:new Request("https://api.example.com")}){let e=[];function t(i){e.push(Promise.resolve(i))}return o(t,"waitUntil"),{context:new s({event:{waitUntil:t},route:u.route}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(g,"createMockContext");var p={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},s=class extends EventTarget{static{o(this,"MockZuploContext")}#e;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=p,parentContext:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:n.console.info,log:n.console.log,debug:n.console.debug,warn:n.console.warn,error:n.console.error,setLogProperties:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={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=r,this.#e=e,this.analyticsContext=new l(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,r){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")}addEventListener(e,t,r){let d=o(i=>{try{typeof t=="function"?t(i):t.handleEvent(i)}catch(a){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),a}},"wrapped");super.addEventListener(e,d,r)}};export{s as MockZuploContext,g as createMockContext};
26
26
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,7 @@
1
1
  import { Attributes } from "@opentelemetry/api";
2
2
  import { CallToolRequest } from "@zuplo/mcp/types";
3
3
  import { CallToolResult } from "@zuplo/mcp/types";
4
+ import { InboundPolicyHandler as InboundPolicyHandler_2 } from "../../policies.js";
4
5
  import { KeyLike } from "jose";
5
6
  import { RequestGeneric as RequestGeneric_2 } from "../../request.js";
6
7
  import type { ValidateFunction } from "ajv";
@@ -181,6 +182,7 @@ export declare function aiGatewayHandler(
181
182
  * @returns A Request or a Response
182
183
  */
183
184
  export declare class AIGatewayMeteringInboundPolicy extends InboundPolicy<AIGatewayMeteringInboundPolicyOptions> {
185
+ static readonly policyType = "ai-gateway-metering";
184
186
  /**
185
187
  * Set the meter increments for the current request.
186
188
  *
@@ -208,10 +210,6 @@ export declare class AIGatewayMeteringInboundPolicy extends InboundPolicy<AIGate
208
210
  static getQuotaFallback(
209
211
  context: ZuploContext
210
212
  ): QuotaFallbackModels | undefined;
211
- constructor(
212
- options: AIGatewayMeteringInboundPolicyOptions,
213
- policyName: string
214
- );
215
213
  handler(
216
214
  request: ZuploRequest,
217
215
  context: ZuploContext
@@ -897,6 +895,14 @@ declare interface AnthropicMessage {
897
895
  }>;
898
896
  }
899
897
 
898
+ /**
899
+ * A request to the Anthropic Messages API (`/v1/messages`).
900
+ *
901
+ * The gateway forwards this body to Anthropic verbatim on the native passthrough
902
+ * path, so the shape mirrors Anthropic's API rather than an internal contract.
903
+ * The index signature carries evolving Anthropic fields (`thinking`,
904
+ * `tool_choice`, `top_k`, structured `system` blocks, …) through unchanged.
905
+ */
900
906
  declare interface AnthropicMessagesRequest {
901
907
  model: string;
902
908
  messages: AnthropicMessage[];
@@ -908,6 +914,7 @@ declare interface AnthropicMessagesRequest {
908
914
  stream?: boolean;
909
915
  metadata?: Record<string, unknown>;
910
916
  tools?: unknown[];
917
+ [key: string]: unknown;
911
918
  }
912
919
 
913
920
  /**
@@ -1439,6 +1446,7 @@ export declare interface Auth0JwtInboundPolicyOptions {
1439
1446
  */
1440
1447
  export declare class AuthZenInboundPolicy extends InboundPolicy<AuthZenInboundPolicyOptions> {
1441
1448
  #private;
1449
+ static readonly policyType = "authzen";
1442
1450
  constructor(options: AuthZenInboundPolicyOptions, policyName: string);
1443
1451
  /**
1444
1452
  * The handler that is called each time this policy is invoked
@@ -1759,6 +1767,7 @@ export declare class AWSLoggingPlugin extends LogPlugin {
1759
1767
  */
1760
1768
  export declare class AxiomaticsAuthZInboundPolicy extends InboundPolicy<AxiomaticsAuthZInboundPolicyOptions> {
1761
1769
  #private;
1770
+ static readonly policyType = "axiomatics-authz";
1762
1771
  private pdpService;
1763
1772
  static setAuthAttributes(
1764
1773
  context: ZuploContext,
@@ -2126,6 +2135,7 @@ declare interface BatchDispatcherOptions {
2126
2135
  * @returns A Request or a Response
2127
2136
  */
2128
2137
  export declare class BrownoutInboundPolicy extends InboundPolicy<BrownoutInboundPolicyOptions> {
2138
+ static readonly policyType = "brownout";
2129
2139
  crons: Cron[];
2130
2140
  constructor(options: BrownoutInboundPolicyOptions, policyName: string);
2131
2141
  handler(
@@ -2856,6 +2866,7 @@ export declare type ComplexRateLimitFunction =
2856
2866
  * @returns A Request or a Response
2857
2867
  */
2858
2868
  export declare class ComplexRateLimitInboundPolicy extends InboundPolicy<ComplexRateLimitInboundPolicyOptions> {
2869
+ static readonly policyType = "complex-rate-limit";
2859
2870
  /**
2860
2871
  * Override the increments for a limit in the current request.
2861
2872
  *
@@ -3863,6 +3874,20 @@ export declare function extractGraphqlErrors(
3863
3874
  bodyText: string
3864
3875
  ): GraphqlResponseError[] | null;
3865
3876
 
3877
+ /**
3878
+ * Pull the incremental ASSISTANT TEXT from a parsed stream event per shape. The
3879
+ * single source of truth for "is this delta assistant text" — chat
3880
+ * `choices[].delta.content`, Responses `response.output_text.delta` only (NOT
3881
+ * tool-args / audio / refusal / code deltas), Anthropic `content_block_delta`.
3882
+ * Stream-scanning policies (e.g. the firewall accumulator) should call this
3883
+ * rather than re-deriving the per-shape extraction.
3884
+ * @public
3885
+ */
3886
+ export declare function extractStreamTextDelta(
3887
+ parsed: unknown,
3888
+ format: AiFormat
3889
+ ): string | undefined;
3890
+
3866
3891
  declare interface FetchOptions<T> {
3867
3892
  method?: HttpMethod_2;
3868
3893
  data?: T;
@@ -4305,6 +4330,21 @@ export declare interface GraphqlAnalyticsOutboundPolicyOptions {
4305
4330
  maxScanBytes?: number;
4306
4331
  }
4307
4332
 
4333
+ /**
4334
+ * GraphQL response-cache outcome, as decided by the Zuplo-provided GraphQL
4335
+ * Cache policy (`graphql-cache-inbound`) and reported on its `x-cache`
4336
+ * response header:
4337
+ * - `"hit"` — the response was served from cache.
4338
+ * - `"miss"` — a cache-eligible query that was not in cache (forwarded to
4339
+ * the origin).
4340
+ *
4341
+ * Operations that are not cache-eligible (mutations, subscriptions,
4342
+ * uncacheable/credentialed requests) — or that ran on a route without the
4343
+ * GraphQL Cache policy — carry no cache state (`null`), and are excluded
4344
+ * from the cache-hit-rate denominator.
4345
+ */
4346
+ export declare type GraphqlCacheState = "hit" | "miss";
4347
+
4308
4348
  /**
4309
4349
  * One GraphQL error extracted from a response body, reduced to the
4310
4350
  * fields the GraphQL Analytics outbound policy consumes for
@@ -6031,6 +6071,7 @@ declare interface ImageGenerationTool {
6031
6071
  export declare abstract class InboundPolicy<
6032
6072
  TOptions = any,
6033
6073
  > extends PolicyBase<TOptions> {
6074
+ readonly direction: PolicyDirection;
6034
6075
  /**
6035
6076
  * The handler that is called each time this policy is invoked
6036
6077
  *
@@ -6789,6 +6830,7 @@ declare type LokiTransportVersion = 1 | 2;
6789
6830
  */
6790
6831
  export declare class McpAuth0OAuthInboundPolicy extends InboundPolicy<ValidatedAuth0OAuthOptions> {
6791
6832
  #private;
6833
+ static readonly policyType = "mcp-auth0-oauth";
6792
6834
  constructor(rawOptions: unknown, policyName: string);
6793
6835
  handler(
6794
6836
  request: ZuploRequest,
@@ -6967,6 +7009,7 @@ declare const mcpAuth0OAuthOptionsSchema: z.ZodObject<
6967
7009
  */
6968
7010
  export declare class McpClerkOAuthInboundPolicy extends InboundPolicy<McpClerkOAuthInboundPolicyOptions> {
6969
7011
  #private;
7012
+ static readonly policyType = "mcp-clerk-oauth";
6970
7013
  constructor(rawOptions: unknown, policyName: string);
6971
7014
  handler(
6972
7015
  request: ZuploRequest,
@@ -7037,6 +7080,7 @@ export declare interface McpClerkOAuthInboundPolicyOptions {
7037
7080
  */
7038
7081
  export declare class McpCognitoOAuthInboundPolicy extends InboundPolicy<McpCognitoOAuthInboundPolicyOptions> {
7039
7082
  #private;
7083
+ static readonly policyType = "mcp-cognito-oauth";
7040
7084
  constructor(rawOptions: unknown, policyName: string);
7041
7085
  handler(
7042
7086
  request: ZuploRequest,
@@ -7118,6 +7162,7 @@ export declare interface McpCognitoOAuthInboundPolicyOptions {
7118
7162
  */
7119
7163
  export declare class McpEntraOAuthInboundPolicy extends InboundPolicy<McpEntraOAuthInboundPolicyOptions> {
7120
7164
  #private;
7165
+ static readonly policyType = "mcp-entra-oauth";
7121
7166
  constructor(rawOptions: unknown, policyName: string);
7122
7167
  handler(
7123
7168
  request: ZuploRequest,
@@ -7194,6 +7239,7 @@ export declare interface McpEntraOAuthInboundPolicyOptions {
7194
7239
  */
7195
7240
  export declare class McpGoogleOAuthInboundPolicy extends InboundPolicy<McpGoogleOAuthInboundPolicyOptions> {
7196
7241
  #private;
7242
+ static readonly policyType = "mcp-google-oauth";
7197
7243
  constructor(rawOptions: unknown, policyName: string);
7198
7244
  handler(
7199
7245
  request: ZuploRequest,
@@ -7264,6 +7310,7 @@ export declare interface McpGoogleOAuthInboundPolicyOptions {
7264
7310
  */
7265
7311
  export declare class McpKeycloakOAuthInboundPolicy extends InboundPolicy<McpKeycloakOAuthInboundPolicyOptions> {
7266
7312
  #private;
7313
+ static readonly policyType = "mcp-keycloak-oauth";
7267
7314
  constructor(rawOptions: unknown, policyName: string);
7268
7315
  handler(
7269
7316
  request: ZuploRequest,
@@ -7341,6 +7388,7 @@ export declare interface McpKeycloakOAuthInboundPolicyOptions {
7341
7388
  */
7342
7389
  export declare class McpLogtoOAuthInboundPolicy extends InboundPolicy<McpLogtoOAuthInboundPolicyOptions> {
7343
7390
  #private;
7391
+ static readonly policyType = "mcp-logto-oauth";
7344
7392
  constructor(rawOptions: unknown, policyName: string);
7345
7393
  handler(
7346
7394
  request: ZuploRequest,
@@ -7419,6 +7467,7 @@ export declare interface McpLogtoOAuthInboundPolicyOptions {
7419
7467
  * @product mcp-gateway
7420
7468
  */
7421
7469
  export declare class McpOAuthInboundPolicy extends InboundPolicy<McpOAuthRuntimeConfig> {
7470
+ static readonly policyType = "mcp-oauth";
7422
7471
  constructor(rawOptions: unknown, policyName: string);
7423
7472
  handler(
7424
7473
  request: ZuploRequest,
@@ -7695,6 +7744,7 @@ declare const mcpOAuthRuntimeConfigSchema: z.ZodObject<
7695
7744
  */
7696
7745
  export declare class McpOktaOAuthInboundPolicy extends InboundPolicy<McpOktaOAuthInboundPolicyOptions> {
7697
7746
  #private;
7747
+ static readonly policyType = "mcp-okta-oauth";
7698
7748
  constructor(rawOptions: unknown, policyName: string);
7699
7749
  handler(
7700
7750
  request: ZuploRequest,
@@ -7772,6 +7822,7 @@ export declare interface McpOktaOAuthInboundPolicyOptions {
7772
7822
  */
7773
7823
  export declare class McpOneLoginOAuthInboundPolicy extends InboundPolicy<McpOneLoginOAuthInboundPolicyOptions> {
7774
7824
  #private;
7825
+ static readonly policyType = "mcp-onelogin-oauth";
7775
7826
  constructor(rawOptions: unknown, policyName: string);
7776
7827
  handler(
7777
7828
  request: ZuploRequest,
@@ -7842,6 +7893,7 @@ export declare interface McpOneLoginOAuthInboundPolicyOptions {
7842
7893
  */
7843
7894
  export declare class McpPingOAuthInboundPolicy extends InboundPolicy<McpPingOAuthInboundPolicyOptions> {
7844
7895
  #private;
7896
+ static readonly policyType = "mcp-ping-oauth";
7845
7897
  constructor(rawOptions: unknown, policyName: string);
7846
7898
  handler(
7847
7899
  request: ZuploRequest,
@@ -7967,6 +8019,7 @@ declare interface McpTool {
7967
8019
  */
7968
8020
  export declare class McpWorkosOAuthInboundPolicy extends InboundPolicy<McpWorkosOAuthInboundPolicyOptions> {
7969
8021
  #private;
8022
+ static readonly policyType = "mcp-workos-oauth";
7970
8023
  constructor(rawOptions: unknown, policyName: string);
7971
8024
  handler(
7972
8025
  request: ZuploRequest,
@@ -8310,6 +8363,7 @@ export declare interface MoesifInboundPolicyOptions {
8310
8363
  */
8311
8364
  export declare class MonetizationInboundPolicy extends InboundPolicy<MonetizationInboundPolicyOptions> {
8312
8365
  #private;
8366
+ static readonly policyType = "monetization";
8313
8367
  /**
8314
8368
  * Set the monetization subscription data for the current request.
8315
8369
  *
@@ -8632,6 +8686,7 @@ export declare interface OAuthProtectedResourcePluginOptions {
8632
8686
  * @returns A Request or a Response
8633
8687
  */
8634
8688
  export declare class OktaFGAAuthZInboundPolicy extends BaseOpenFGAAuthZInboundPolicy {
8689
+ static readonly policyType = "oktafga-authz";
8635
8690
  constructor(options: OktaFGAAuthZInboundPolicyOptions, policyName: string);
8636
8691
  }
8637
8692
 
@@ -9371,7 +9426,7 @@ declare namespace OpenAPIV3_1 {
9371
9426
  * @returns A Request or a Response
9372
9427
  */
9373
9428
  export declare class OpenFGAAuthZInboundPolicy extends BaseOpenFGAAuthZInboundPolicy {
9374
- constructor(options: OpenFGAAuthZInboundPolicyOptions, policyName: string);
9429
+ static readonly policyType = "openfga-authz";
9375
9430
  }
9376
9431
 
9377
9432
  /**
@@ -9507,6 +9562,7 @@ export declare interface OpenIdJwtInboundPolicyOptions {
9507
9562
  */
9508
9563
  export declare class OpenMeterInboundPolicy extends InboundPolicy<OpenMeterInboundPolicyOptions> {
9509
9564
  #private;
9565
+ static readonly policyType = "openmeter-metering";
9510
9566
  constructor(options: OpenMeterInboundPolicyOptions, policyName: string);
9511
9567
  handler(
9512
9568
  request: ZuploRequest<RequestGeneric>,
@@ -9692,6 +9748,7 @@ export declare class OTelMetricsPlugin extends MetricsPlugin {
9692
9748
  export declare abstract class OutboundPolicy<
9693
9749
  TOptions = any,
9694
9750
  > extends PolicyBase<TOptions> {
9751
+ readonly direction: PolicyDirection;
9695
9752
  /**
9696
9753
  * The handler that is called each time this policy is invoked
9697
9754
  *
@@ -9818,16 +9875,11 @@ declare interface ParsedRouteData extends Omit<RouteData, "corsPolicies"> {
9818
9875
  /* Excluded from this release type: getInboundPolicyInstance */
9819
9876
  }
9820
9877
 
9821
- /**
9822
- * The base class for inbound and outbound policies.
9823
- * Provides common functionality for all policy types.
9824
- *
9825
- * @public
9826
- */
9827
9878
  declare abstract class PolicyBase<TOptions = any> {
9828
9879
  options: TOptions;
9829
9880
  policyName: string;
9830
- policyType: string;
9881
+ /* Excluded from this release type: policyType */
9882
+ /* Excluded from this release type: direction */
9831
9883
  /* Excluded from this release type: __constructor */
9832
9884
  }
9833
9885
 
@@ -9841,6 +9893,22 @@ export declare interface PolicyConfiguration {
9841
9893
  options?: unknown;
9842
9894
  }
9843
9895
 
9896
+ /**
9897
+ * The base class for inbound and outbound policies.
9898
+ * Provides common functionality for all policy types.
9899
+ *
9900
+ * @public
9901
+ */
9902
+ /**
9903
+ * The pipeline phase a policy runs in. Inbound policies run on the request
9904
+ * before the handler; outbound policies run on the response after it. This is
9905
+ * determined structurally by whether a policy extends {@link InboundPolicy} or
9906
+ * {@link OutboundPolicy}, so it can never drift from the policy's real phase.
9907
+ *
9908
+ * @public
9909
+ */
9910
+ declare type PolicyDirection = "inbound" | "outbound";
9911
+
9844
9912
  /**
9845
9913
  * @public
9846
9914
  */
@@ -10118,7 +10186,7 @@ declare interface QuotaFallbackModels {
10118
10186
  */
10119
10187
  export declare class QuotaInboundPolicy extends InboundPolicy<QuotaInboundPolicyOptions> {
10120
10188
  #private;
10121
- constructor(options: QuotaInboundPolicyOptions, policyName: string);
10189
+ static readonly policyType = "quota";
10122
10190
  handler(
10123
10191
  request: ZuploRequest<RequestGeneric>,
10124
10192
  context: ZuploContext
@@ -10416,6 +10484,28 @@ export declare function ReadmeMetricsInboundPolicy(
10416
10484
  policyName: string
10417
10485
  ): Promise<ZuploRequest<RequestGeneric_2>>;
10418
10486
 
10487
+ /**
10488
+ * Record the GraphQL response-cache outcome for the in-flight operation so
10489
+ * the analytics middleware can emit it as the `cacheState` dimension on the
10490
+ * `graphql_operation` event.
10491
+ *
10492
+ * Called by the Zuplo-provided GraphQL Cache policy (`graphql-cache-inbound`,
10493
+ * in the `@zuplo/graphql` package) the moment it resolves a cache hit or
10494
+ * miss — synchronously during inbound processing, before the analytics
10495
+ * middleware finalizes the event. Mirrors how the GraphQL Analytics outbound
10496
+ * policy feeds errors through {@link getOperationContext}.
10497
+ *
10498
+ * No-op when the request isn't running the GraphQL analytics middleware (the
10499
+ * route lacks the `x-graphql: true` marker, so there's no operation context to
10500
+ * write to), so it's always safe to call.
10501
+ *
10502
+ * @public
10503
+ */
10504
+ export declare function recordGraphqlCacheState(
10505
+ context: ZuploContext,
10506
+ cacheState: GraphqlCacheState
10507
+ ): void;
10508
+
10419
10509
  /**
10420
10510
  * Handler that returns HTTP redirects.
10421
10511
  * Useful for URL shortening, legacy URL handling, or routing to external services.
@@ -11367,7 +11457,7 @@ export declare type SemanticCacheInboundPolicyOptions = {
11367
11457
  };
11368
11458
 
11369
11459
  /**
11370
- * Similarity threshold (0-1) for a cache hit. Higher values require closer semantic matches. Defaults to 0.8.
11460
+ * The semantic similarity threshold for semantic cache matches. Values closer to 0 require closer similarity, while larger values allow more flexible matching. Default is 0.2.
11371
11461
  * @public
11372
11462
  */
11373
11463
  declare type SemanticTolerance = number;
@@ -11422,7 +11512,7 @@ export declare interface SetBodyInboundPolicyOptions {
11422
11512
  * @param policyName - The name of the policy as set in policies.json
11423
11513
  * @returns A Request or a Response
11424
11514
  */
11425
- export declare const SetHeadersInboundPolicy: InboundPolicyHandler<SetHeadersInboundPolicyOptions>;
11515
+ export declare const SetHeadersInboundPolicy: InboundPolicyHandler_2<SetHeadersInboundPolicyOptions>;
11426
11516
 
11427
11517
  /**
11428
11518
  * The options for this policy.
@@ -11810,10 +11900,7 @@ export declare class StreamingZoneCache {
11810
11900
  * @returns A Request or a Response
11811
11901
  */
11812
11902
  export declare class StripeWebhookVerificationInboundPolicy extends InboundPolicy<StripeWebhookVerificationInboundPolicyOptions> {
11813
- constructor(
11814
- options: StripeWebhookVerificationInboundPolicyOptions,
11815
- policyName: string
11816
- );
11903
+ static readonly policyType = "stripe-webhook-verification";
11817
11904
  handler(
11818
11905
  request: ZuploRequest,
11819
11906
  context: ZuploContext
@@ -12177,6 +12264,7 @@ export declare interface UpstreamFirebaseUserAuthInboundPolicyOptions {
12177
12264
  * @returns A Request or a Response
12178
12265
  */
12179
12266
  export declare class UpstreamGcpFederatedAuthInboundPolicy extends InboundPolicy<UpstreamGcpFederatedAuthInboundPolicyOptions> {
12267
+ static readonly policyType = "upstream-gcp-federated-auth";
12180
12268
  private cacheName;
12181
12269
  private normalizedWorkloadIdentityProvider;
12182
12270
  constructor(
@@ -12332,6 +12420,7 @@ export declare interface UpstreamGcpServiceAuthInboundPolicyOptions {
12332
12420
  * @returns A ZuploRequest
12333
12421
  */
12334
12422
  export declare class UpstreamZuploJwtAuthInboundPolicy extends InboundPolicy<UpstreamZuploJwtAuthInboundPolicyOptions> {
12423
+ static readonly policyType = "upstream-zuplo-jwt";
12335
12424
  constructor(
12336
12425
  options: UpstreamZuploJwtAuthInboundPolicyOptions,
12337
12426
  policyName: string
@@ -12833,6 +12922,7 @@ declare interface XacmlRequest {
12833
12922
  * @returns A Request or a Response
12834
12923
  */
12835
12924
  export declare class XmlToJsonOutboundPolicy extends OutboundPolicy<XmlToJsonPolicyOptions> {
12925
+ static readonly policyType = "xml-to-json";
12836
12926
  private parser;
12837
12927
  private parseOnStatusCodes;
12838
12928
  constructor(options: XmlToJsonPolicyOptions, policyName: string);
@@ -546,6 +546,7 @@ declare type HttpStatusCodeRangeDefinition =
546
546
  declare abstract class InboundPolicy<
547
547
  TOptions = any,
548
548
  > extends PolicyBase<TOptions> {
549
+ readonly direction: PolicyDirection;
549
550
  /**
550
551
  * The handler that is called each time this policy is invoked
551
552
  *
@@ -964,6 +965,7 @@ declare interface Logger extends BaseLogger {
964
965
  */
965
966
  export declare class McpAuth0OAuthInboundPolicy extends InboundPolicy<ValidatedAuth0OAuthOptions> {
966
967
  #private;
968
+ static readonly policyType = "mcp-auth0-oauth";
967
969
  constructor(rawOptions: unknown, policyName: string);
968
970
  handler(
969
971
  request: ZuploRequest,
@@ -1142,6 +1144,7 @@ declare const mcpAuth0OAuthOptionsSchema: z.ZodObject<
1142
1144
  */
1143
1145
  export declare class McpCapabilityFilterInboundPolicy extends InboundPolicy<ValidatedOptions> {
1144
1146
  #private;
1147
+ static readonly policyType = "mcp-capability-filter";
1145
1148
  constructor(rawOptions: unknown, policyName: string);
1146
1149
  handler(
1147
1150
  request: ZuploRequest,
@@ -1267,6 +1270,7 @@ declare const mcpCapabilityFilterOptionsSchema: z.ZodObject<
1267
1270
  */
1268
1271
  export declare class McpClerkOAuthInboundPolicy extends InboundPolicy<McpClerkOAuthInboundPolicyOptions> {
1269
1272
  #private;
1273
+ static readonly policyType = "mcp-clerk-oauth";
1270
1274
  constructor(rawOptions: unknown, policyName: string);
1271
1275
  handler(
1272
1276
  request: ZuploRequest,
@@ -1337,6 +1341,7 @@ export declare interface McpClerkOAuthInboundPolicyOptions {
1337
1341
  */
1338
1342
  export declare class McpCognitoOAuthInboundPolicy extends InboundPolicy<McpCognitoOAuthInboundPolicyOptions> {
1339
1343
  #private;
1344
+ static readonly policyType = "mcp-cognito-oauth";
1340
1345
  constructor(rawOptions: unknown, policyName: string);
1341
1346
  handler(
1342
1347
  request: ZuploRequest,
@@ -1418,6 +1423,7 @@ export declare interface McpCognitoOAuthInboundPolicyOptions {
1418
1423
  */
1419
1424
  export declare class McpEntraOAuthInboundPolicy extends InboundPolicy<McpEntraOAuthInboundPolicyOptions> {
1420
1425
  #private;
1426
+ static readonly policyType = "mcp-entra-oauth";
1421
1427
  constructor(rawOptions: unknown, policyName: string);
1422
1428
  handler(
1423
1429
  request: ZuploRequest,
@@ -1549,6 +1555,7 @@ export declare interface McpGatewayPluginOptions {
1549
1555
  */
1550
1556
  export declare class McpGoogleOAuthInboundPolicy extends InboundPolicy<McpGoogleOAuthInboundPolicyOptions> {
1551
1557
  #private;
1558
+ static readonly policyType = "mcp-google-oauth";
1552
1559
  constructor(rawOptions: unknown, policyName: string);
1553
1560
  handler(
1554
1561
  request: ZuploRequest,
@@ -1619,6 +1626,7 @@ export declare interface McpGoogleOAuthInboundPolicyOptions {
1619
1626
  */
1620
1627
  export declare class McpKeycloakOAuthInboundPolicy extends InboundPolicy<McpKeycloakOAuthInboundPolicyOptions> {
1621
1628
  #private;
1629
+ static readonly policyType = "mcp-keycloak-oauth";
1622
1630
  constructor(rawOptions: unknown, policyName: string);
1623
1631
  handler(
1624
1632
  request: ZuploRequest,
@@ -1696,6 +1704,7 @@ export declare interface McpKeycloakOAuthInboundPolicyOptions {
1696
1704
  */
1697
1705
  export declare class McpLogtoOAuthInboundPolicy extends InboundPolicy<McpLogtoOAuthInboundPolicyOptions> {
1698
1706
  #private;
1707
+ static readonly policyType = "mcp-logto-oauth";
1699
1708
  constructor(rawOptions: unknown, policyName: string);
1700
1709
  handler(
1701
1710
  request: ZuploRequest,
@@ -1774,6 +1783,7 @@ export declare interface McpLogtoOAuthInboundPolicyOptions {
1774
1783
  * @product mcp-gateway
1775
1784
  */
1776
1785
  export declare class McpOAuthInboundPolicy extends InboundPolicy<McpOAuthRuntimeConfig> {
1786
+ static readonly policyType = "mcp-oauth";
1777
1787
  constructor(rawOptions: unknown, policyName: string);
1778
1788
  handler(
1779
1789
  request: ZuploRequest,
@@ -2050,6 +2060,7 @@ declare const mcpOAuthRuntimeConfigSchema: z.ZodObject<
2050
2060
  */
2051
2061
  export declare class McpOktaOAuthInboundPolicy extends InboundPolicy<McpOktaOAuthInboundPolicyOptions> {
2052
2062
  #private;
2063
+ static readonly policyType = "mcp-okta-oauth";
2053
2064
  constructor(rawOptions: unknown, policyName: string);
2054
2065
  handler(
2055
2066
  request: ZuploRequest,
@@ -2127,6 +2138,7 @@ export declare interface McpOktaOAuthInboundPolicyOptions {
2127
2138
  */
2128
2139
  export declare class McpOneLoginOAuthInboundPolicy extends InboundPolicy<McpOneLoginOAuthInboundPolicyOptions> {
2129
2140
  #private;
2141
+ static readonly policyType = "mcp-onelogin-oauth";
2130
2142
  constructor(rawOptions: unknown, policyName: string);
2131
2143
  handler(
2132
2144
  request: ZuploRequest,
@@ -2197,6 +2209,7 @@ export declare interface McpOneLoginOAuthInboundPolicyOptions {
2197
2209
  */
2198
2210
  export declare class McpPingOAuthInboundPolicy extends InboundPolicy<McpPingOAuthInboundPolicyOptions> {
2199
2211
  #private;
2212
+ static readonly policyType = "mcp-ping-oauth";
2200
2213
  constructor(rawOptions: unknown, policyName: string);
2201
2214
  handler(
2202
2215
  request: ZuploRequest,
@@ -2289,6 +2302,7 @@ export declare function McpProxyHandler(
2289
2302
  * @product mcp-gateway
2290
2303
  */
2291
2304
  export declare class McpTokenExchangeInboundPolicy extends InboundPolicy<UpstreamTokenExchangePolicyOptions> {
2305
+ static readonly policyType = "mcp-token-exchange";
2292
2306
  constructor(rawOptions: unknown, policyName: string);
2293
2307
  handler(
2294
2308
  request: ZuploRequest,
@@ -2365,6 +2379,7 @@ export declare interface McpTokenExchangeInboundPolicyOptions {
2365
2379
  */
2366
2380
  export declare class McpWorkosOAuthInboundPolicy extends InboundPolicy<McpWorkosOAuthInboundPolicyOptions> {
2367
2381
  #private;
2382
+ static readonly policyType = "mcp-workos-oauth";
2368
2383
  constructor(rawOptions: unknown, policyName: string);
2369
2384
  handler(
2370
2385
  request: ZuploRequest,
@@ -3048,16 +3063,11 @@ declare interface ParsedRouteData extends Omit<RouteData, "corsPolicies"> {
3048
3063
  /* Excluded from this release type: getInboundPolicyInstance */
3049
3064
  }
3050
3065
 
3051
- /**
3052
- * The base class for inbound and outbound policies.
3053
- * Provides common functionality for all policy types.
3054
- *
3055
- * @public
3056
- */
3057
3066
  declare abstract class PolicyBase<TOptions = any> {
3058
3067
  options: TOptions;
3059
3068
  policyName: string;
3060
- policyType: string;
3069
+ /* Excluded from this release type: policyType */
3070
+ /* Excluded from this release type: direction */
3061
3071
  /* Excluded from this release type: __constructor */
3062
3072
  }
3063
3073
 
@@ -3071,6 +3081,22 @@ declare interface PolicyConfiguration {
3071
3081
  options?: unknown;
3072
3082
  }
3073
3083
 
3084
+ /**
3085
+ * The base class for inbound and outbound policies.
3086
+ * Provides common functionality for all policy types.
3087
+ *
3088
+ * @public
3089
+ */
3090
+ /**
3091
+ * The pipeline phase a policy runs in. Inbound policies run on the request
3092
+ * before the handler; outbound policies run on the response after it. This is
3093
+ * determined structurally by whether a policy extends {@link InboundPolicy} or
3094
+ * {@link OutboundPolicy}, so it can never drift from the policy's real phase.
3095
+ *
3096
+ * @public
3097
+ */
3098
+ declare type PolicyDirection = "inbound" | "outbound";
3099
+
3074
3100
  /**
3075
3101
  * @public
3076
3102
  */
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.71.22",
4
+ "version": "6.71.23",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
@@ -109,6 +109,8 @@ module.exports = {
109
109
 
110
110
  hebrew: "iso88598",
111
111
  hebrew8: "iso88598",
112
+ iso88598i: "iso88598",
113
+ iso88598e: "iso88598",
112
114
 
113
115
  turkish: "iso88599",
114
116
  turkish8: "iso88599",
@@ -31,7 +31,9 @@ function Utf32Encoder (options, codec) {
31
31
 
32
32
  Utf32Encoder.prototype.write = function (str) {
33
33
  var src = Buffer.from(str, "ucs2")
34
- var dst = Buffer.alloc(src.length * 2)
34
+ // src.length * 2 covers this chunk's code units (4 bytes each); the extra 4 bytes leave room for a
35
+ // high surrogate held over from a previous chunk, which is flushed ahead of this chunk's units.
36
+ var dst = Buffer.alloc(src.length * 2 + 4)
35
37
  var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE
36
38
  var offset = 0
37
39
 
@@ -113,9 +115,9 @@ Utf32Decoder.prototype.write = function (src) {
113
115
  // NOTE: codepoint is a signed int32 and can be negative.
114
116
  // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer).
115
117
  if (isLE) {
116
- codepoint = overflow[i] | (overflow[i + 1] << 8) | (overflow[i + 2] << 16) | (overflow[i + 3] << 24)
118
+ codepoint = overflow[0] | (overflow[1] << 8) | (overflow[2] << 16) | (overflow[3] << 24)
117
119
  } else {
118
- codepoint = overflow[i + 3] | (overflow[i + 2] << 8) | (overflow[i + 1] << 16) | (overflow[i] << 24)
120
+ codepoint = overflow[3] | (overflow[2] << 8) | (overflow[1] << 16) | (overflow[0] << 24)
119
121
  }
120
122
  overflow.length = 0
121
123
 
@@ -169,7 +171,12 @@ function _writeCodepoint (dst, offset, codepoint, badChar) {
169
171
  };
170
172
 
171
173
  Utf32Decoder.prototype.end = function () {
174
+ if (this.overflow.length === 0) { return }
175
+
176
+ // A leftover, incomplete 4-byte code unit at the end of the input is ill-formed. Substitute a
177
+ // single U+FFFD (Unicode Standard conformance clause C10) instead of silently dropping the bytes.
172
178
  this.overflow.length = 0
179
+ return String.fromCharCode(this.badChar)
173
180
  }
174
181
 
175
182
  // == UTF-32 Auto codec =============================================================
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "iconv-lite",
3
3
  "description": "Convert character encodings in pure javascript.",
4
- "version": "0.7.2",
4
+ "version": "0.7.3",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "iconv",
@@ -46,7 +46,7 @@
46
46
  "stream": false
47
47
  },
48
48
  "devDependencies": {
49
- "@arethetypeswrong/cli": "^0.17.4",
49
+ "@arethetypeswrong/cli": "^0.18.4",
50
50
  "@stylistic/eslint-plugin": "^5.1.0",
51
51
  "@stylistic/eslint-plugin-js": "^4.1.0",
52
52
  "@types/node": "^24.0.12",
@@ -276,6 +276,8 @@ export type Encoding =
276
276
  | "iso88596"
277
277
  | "iso88597"
278
278
  | "iso88598"
279
+ | "iso88598e"
280
+ | "iso88598i"
279
281
  | "iso88599"
280
282
  | "isoceltic"
281
283
  | "isoir100"
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * protobuf.js v7.6.4 (c) 2016, daniel wirtz
3
- * compiled fri, 12 jun 2026 12:10:46 utc
2
+ * protobuf.js v7.6.5 (c) 2016, daniel wirtz
3
+ * compiled sat, 04 jul 2026 01:13:07 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * protobuf.js v7.6.4 (c) 2016, daniel wirtz
3
- * compiled fri, 12 jun 2026 12:10:47 utc
2
+ * protobuf.js v7.6.5 (c) 2016, daniel wirtz
3
+ * compiled sat, 04 jul 2026 01:13:07 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * protobuf.js v7.6.4 (c) 2016, daniel wirtz
3
- * compiled fri, 12 jun 2026 12:10:46 utc
2
+ * protobuf.js v7.6.5 (c) 2016, daniel wirtz
3
+ * compiled sat, 04 jul 2026 01:13:07 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */