@zuplo/cli 6.70.61 → 6.70.63

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 (63) hide show
  1. package/node_modules/@fastify/reply-from/node_modules/undici/lib/handler/unwrap-handler.js +6 -0
  2. package/node_modules/@fastify/reply-from/node_modules/undici/package.json +1 -1
  3. package/node_modules/@fastify/reply-from/node_modules/undici/types/dispatcher.d.ts +2 -0
  4. package/node_modules/@zuplo/core/package.json +1 -1
  5. package/node_modules/@zuplo/graphql/package.json +1 -1
  6. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  7. package/node_modules/@zuplo/otel/package.json +1 -1
  8. package/node_modules/@zuplo/runtime/out/esm/chunk-C2TBCXWG.js +26 -0
  9. package/node_modules/@zuplo/runtime/out/esm/chunk-C2TBCXWG.js.map +1 -0
  10. package/node_modules/@zuplo/runtime/out/esm/chunk-GI3LNO4X.js +370 -0
  11. package/node_modules/@zuplo/runtime/out/esm/chunk-GI3LNO4X.js.map +1 -0
  12. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  13. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  14. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
  15. package/node_modules/@zuplo/runtime/out/types/index.d.ts +52 -1
  16. package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +4 -1
  17. package/node_modules/@zuplo/runtime/out/types/mocks/index.d.ts +4 -1
  18. package/node_modules/@zuplo/runtime/package.json +1 -1
  19. package/node_modules/axios/CHANGELOG.md +42 -0
  20. package/node_modules/axios/README.md +237 -237
  21. package/node_modules/axios/dist/axios.js +113 -21
  22. package/node_modules/axios/dist/axios.min.js +2 -2
  23. package/node_modules/axios/dist/axios.min.js.map +1 -1
  24. package/node_modules/axios/dist/browser/axios.cjs +121 -15
  25. package/node_modules/axios/dist/esm/axios.js +121 -15
  26. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  27. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  28. package/node_modules/axios/dist/node/axios.cjs +249 -107
  29. package/node_modules/axios/index.d.cts +8 -3
  30. package/node_modules/axios/index.d.ts +4 -1
  31. package/node_modules/axios/lib/adapters/fetch.js +79 -0
  32. package/node_modules/axios/lib/adapters/http.js +62 -118
  33. package/node_modules/axios/lib/core/Axios.js +1 -0
  34. package/node_modules/axios/lib/core/AxiosHeaders.js +2 -2
  35. package/node_modules/axios/lib/defaults/transitional.js +1 -0
  36. package/node_modules/axios/lib/env/data.js +1 -1
  37. package/node_modules/axios/lib/helpers/Http2Sessions.js +119 -0
  38. package/node_modules/axios/lib/helpers/buildURL.js +1 -1
  39. package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
  40. package/node_modules/axios/lib/helpers/resolveConfig.js +12 -6
  41. package/node_modules/axios/lib/helpers/toFormData.js +1 -1
  42. package/node_modules/axios/lib/utils.js +23 -2
  43. package/node_modules/axios/package.json +29 -13
  44. package/node_modules/thread-stream/.claude/settings.local.json +15 -0
  45. package/node_modules/thread-stream/CLAUDE.md +64 -0
  46. package/node_modules/thread-stream/README.md +2 -1
  47. package/node_modules/thread-stream/index.js +41 -13
  48. package/node_modules/thread-stream/lib/indexes.js +3 -1
  49. package/node_modules/thread-stream/lib/worker.js +20 -8
  50. package/node_modules/thread-stream/package.json +1 -1
  51. package/node_modules/thread-stream/test/base.test.js +61 -88
  52. package/node_modules/thread-stream/test/message-without-code.js +19 -0
  53. package/node_modules/thread-stream/test/watch-mode.test.js +28 -0
  54. package/package.json +6 -6
  55. package/node_modules/@zuplo/runtime/out/esm/chunk-4SACVMDH.js +0 -26
  56. package/node_modules/@zuplo/runtime/out/esm/chunk-4SACVMDH.js.map +0 -1
  57. package/node_modules/@zuplo/runtime/out/esm/chunk-6WKYPMAI.js +0 -322
  58. package/node_modules/@zuplo/runtime/out/esm/chunk-6WKYPMAI.js.map +0 -1
  59. package/node_modules/axios/dist/axios.js.map +0 -1
  60. package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
  61. package/node_modules/axios/dist/esm/axios.js.map +0 -1
  62. package/node_modules/axios/dist/node/axios.cjs.map +0 -1
  63. /package/node_modules/@zuplo/runtime/out/esm/{chunk-6WKYPMAI.js.LEGAL.txt → chunk-GI3LNO4X.js.LEGAL.txt} +0 -0
@@ -176,6 +176,22 @@ export declare class AIGatewayMeteringInboundPolicy extends InboundPolicy<AIGate
176
176
  increments: AIGatewayMeterIncrements
177
177
  ): void;
178
178
  static getIncrements(context: ZuploContext): AIGatewayMeterIncrements;
179
+ /**
180
+ * Record the global quota fallback models for the current request. Set by the
181
+ * metering policy when a quota is exceeded and a fallback is configured; read
182
+ * by the LLM translation handler, which routes to the capability-appropriate
183
+ * model instead of the (over-budget) primary.
184
+ *
185
+ * @param context - The ZuploContext
186
+ * @param quotaFallback - The validated quota fallback models.
187
+ */
188
+ static setQuotaFallback(
189
+ context: ZuploContext,
190
+ quotaFallback: QuotaFallbackModels
191
+ ): void;
192
+ static getQuotaFallback(
193
+ context: ZuploContext
194
+ ): QuotaFallbackModels | undefined;
179
195
  constructor(
180
196
  options: AIGatewayMeteringInboundPolicyOptions,
181
197
  policyName: string
@@ -185,6 +201,23 @@ export declare class AIGatewayMeteringInboundPolicy extends InboundPolicy<AIGate
185
201
  context: ZuploContext
186
202
  ): Promise<Response | ZuploRequest<RequestGeneric_2>>;
187
203
  private fetchCurrentMeters;
204
+ /**
205
+ * The capability a request targets, derived from its path, or `undefined` for
206
+ * paths that do not support quota fallback (e.g. `/v1/responses`, which the LLM
207
+ * handler serves without the fallback chain). Used to decide whether a quota
208
+ * fallback actually applies to *this* request.
209
+ */
210
+ private requestCapability;
211
+ /**
212
+ * Validate and return the configured quota fallback when it applies to *this*
213
+ * request's capability, or `undefined` otherwise (no config, malformed config,
214
+ * an unsupported path, or no model configured for the request's capability).
215
+ * Returning `undefined` blocks the request with a 429 — so a fallback is only
216
+ * counted and applied when the handler can actually serve the request with it.
217
+ * The config is customer-authored and reaches us through an `unknown` cast, so
218
+ * we validate it through Zod before acting on it.
219
+ */
220
+ private resolveQuotaFallback;
188
221
  private checkHierarchicalQuotaLimits;
189
222
  /**
190
223
  * Increment meters via API. Can be used by providers for streaming responses.
@@ -2969,6 +3002,7 @@ declare const EventType: {
2969
3002
  readonly AI_GATEWAY_LATENCY_HISTOGRAM: "ai_gateway_latency_histogram";
2970
3003
  readonly AI_GATEWAY_WARNING_COUNT: "ai_gateway_warning_count";
2971
3004
  readonly AI_GATEWAY_BLOCKED_COUNT: "ai_gateway_blocked_count";
3005
+ readonly AI_GATEWAY_FALLBACK_COUNT: "ai_gateway_fallback_count";
2972
3006
  readonly MCP_REQUEST_RECEIVED: "mcp_request_received";
2973
3007
  readonly MCP_REQUEST_COMPLETED: "mcp_request_completed";
2974
3008
  readonly MCP_REQUEST_REJECTED: "mcp_request_rejected";
@@ -2995,6 +3029,7 @@ declare const EventType: {
2995
3029
  readonly MCP_AUTH_UPSTREAM_CREDENTIAL_RESOLVED: "mcp_auth_upstream_credential_resolved";
2996
3030
  readonly MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_auth_upstream_credential_missing";
2997
3031
  readonly MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_auth_upstream_reconsent_required";
3032
+ readonly GRAPHQL_OPERATION: "graphql_operation";
2998
3033
  };
2999
3034
 
3000
3035
  declare type EventType = (typeof EventType)[keyof typeof EventType];
@@ -6843,6 +6878,12 @@ export declare interface MockApiInboundOptions {
6843
6878
  */
6844
6879
  export declare const MockApiInboundPolicy: InboundPolicyHandler<MockApiInboundOptions>;
6845
6880
 
6881
+ declare interface ModelConfiguration {
6882
+ environmentVariable: string;
6883
+ model: string;
6884
+ provider: string;
6885
+ }
6886
+
6846
6887
  declare type Modify<T, R> = Omit<T, keyof R> & R;
6847
6888
 
6848
6889
  declare interface MoesifContext {
@@ -8666,6 +8707,15 @@ export declare interface QuotaDetail {
8666
8707
  };
8667
8708
  }
8668
8709
 
8710
+ /**
8711
+ * Global quota fallback models, keyed by capability. Applied whenever any
8712
+ * configured quota limit (any meter/period) is exceeded.
8713
+ */
8714
+ declare interface QuotaFallbackModels {
8715
+ completions?: ModelConfiguration;
8716
+ embeddings?: ModelConfiguration;
8717
+ }
8718
+
8669
8719
  /**
8670
8720
  * The Quota policy enables you to set monthly, weekly, daily or hourly quotas on your API.
8671
8721
  *
@@ -11211,7 +11261,8 @@ declare interface ZuploAnalyticsContext {
11211
11261
  value: number,
11212
11262
  eventType: EventType,
11213
11263
  metadata: JsonObject,
11214
- unit?: string
11264
+ unit?: string,
11265
+ eventId?: string
11215
11266
  ): void;
11216
11267
  flushAnalyticsEvents(): ZuploAnalyticsEvent[];
11217
11268
  getAnalyticsEvents(): ZuploAnalyticsEvent[];
@@ -103,6 +103,7 @@ declare const EventType: {
103
103
  readonly AI_GATEWAY_LATENCY_HISTOGRAM: "ai_gateway_latency_histogram";
104
104
  readonly AI_GATEWAY_WARNING_COUNT: "ai_gateway_warning_count";
105
105
  readonly AI_GATEWAY_BLOCKED_COUNT: "ai_gateway_blocked_count";
106
+ readonly AI_GATEWAY_FALLBACK_COUNT: "ai_gateway_fallback_count";
106
107
  readonly MCP_REQUEST_RECEIVED: "mcp_request_received";
107
108
  readonly MCP_REQUEST_COMPLETED: "mcp_request_completed";
108
109
  readonly MCP_REQUEST_REJECTED: "mcp_request_rejected";
@@ -129,6 +130,7 @@ declare const EventType: {
129
130
  readonly MCP_AUTH_UPSTREAM_CREDENTIAL_RESOLVED: "mcp_auth_upstream_credential_resolved";
130
131
  readonly MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_auth_upstream_credential_missing";
131
132
  readonly MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_auth_upstream_reconsent_required";
133
+ readonly GRAPHQL_OPERATION: "graphql_operation";
132
134
  };
133
135
 
134
136
  declare type EventType = (typeof EventType)[keyof typeof EventType];
@@ -3277,7 +3279,8 @@ declare interface ZuploAnalyticsContext {
3277
3279
  value: number,
3278
3280
  eventType: EventType,
3279
3281
  metadata: JsonObject,
3280
- unit?: string
3282
+ unit?: string,
3283
+ eventId?: string
3281
3284
  ): void;
3282
3285
  flushAnalyticsEvents(): ZuploAnalyticsEvent[];
3283
3286
  getAnalyticsEvents(): ZuploAnalyticsEvent[];
@@ -84,6 +84,7 @@ declare const EventType: {
84
84
  readonly AI_GATEWAY_LATENCY_HISTOGRAM: "ai_gateway_latency_histogram";
85
85
  readonly AI_GATEWAY_WARNING_COUNT: "ai_gateway_warning_count";
86
86
  readonly AI_GATEWAY_BLOCKED_COUNT: "ai_gateway_blocked_count";
87
+ readonly AI_GATEWAY_FALLBACK_COUNT: "ai_gateway_fallback_count";
87
88
  readonly MCP_REQUEST_RECEIVED: "mcp_request_received";
88
89
  readonly MCP_REQUEST_COMPLETED: "mcp_request_completed";
89
90
  readonly MCP_REQUEST_REJECTED: "mcp_request_rejected";
@@ -110,6 +111,7 @@ declare const EventType: {
110
111
  readonly MCP_AUTH_UPSTREAM_CREDENTIAL_RESOLVED: "mcp_auth_upstream_credential_resolved";
111
112
  readonly MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_auth_upstream_credential_missing";
112
113
  readonly MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_auth_upstream_reconsent_required";
114
+ readonly GRAPHQL_OPERATION: "graphql_operation";
113
115
  };
114
116
 
115
117
  declare type EventType = (typeof EventType)[keyof typeof EventType];
@@ -1621,7 +1623,8 @@ declare interface ZuploAnalyticsContext {
1621
1623
  value: number,
1622
1624
  eventType: EventType,
1623
1625
  metadata: JsonObject,
1624
- unit?: string
1626
+ unit?: string,
1627
+ eventId?: string
1625
1628
  ): void;
1626
1629
  flushAnalyticsEvents(): ZuploAnalyticsEvent[];
1627
1630
  getAnalyticsEvents(): ZuploAnalyticsEvent[];
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.70.61",
4
+ "version": "6.70.63",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.16.1 — May 13, 2026
4
+
5
+ This release ships a defence-in-depth fix for prototype pollution in `formDataToJSON`, hardens proxy and CI workflows, restores Webpack 4 compatibility for the fetch adapter, and includes several small bug fixes and maintenance improvements.
6
+
7
+ ## 🔒 Security Fixes
8
+
9
+ * **Prototype Pollution Defence-in-Depth:** Hardened `formDataToJSON` against already-polluted `Object.prototype` by walking own properties only, so attacker-controlled keys inherited from a poisoned prototype cannot propagate through deserialization. (__#7413__)
10
+ * **Proxy Cleartext Leak:** Fixed an issue where HTTPS request data could be transmitted in cleartext to an HTTP proxy under certain configurations. (__#10858__)
11
+ * **CI Cache Removal:** Removed all GitHub Actions caches as a defence-in-depth measure against cache poisoning vectors in the build pipeline. (__#10882__)
12
+
13
+ ## 🐛 Bug Fixes
14
+
15
+ * **Data URI Parsing:** Updated the `fromDataURI` regex to match RFC 2397 more strictly, fixing edge cases in `data:` URL handling. (__#10829__)
16
+ * **Unicode Headers:** Preserved Unicode header values when running through request interceptors, so non-ASCII header content is no longer corrupted before dispatch. (__#10850__)
17
+ * **XHR Upload Progress:** Guarded against malformed `ProgressEvent` payloads emitted by some environments during XHR upload, preventing crashes when `loaded` / `total` are missing or invalid. (__#10868__)
18
+ * **Webpack 4 Fetch Adapter:** Fixed an "unexpected token" error caused by syntax in the fetch adapter that Webpack 4 could not parse, restoring compatibility for legacy bundler users. (__#10864__)
19
+ * **Type Definitions:** Made `parseReviver` `context.source` optional in the type definitions to align with the ES2023 specification. (__#10837__)
20
+ * **URL Object Support Reverted:** Reverted the change that allowed passing a `URL` object as `config.url` (originally __#10866__) due to regressions; this support will be reintroduced in a later release once the underlying issues are addressed. (__#10874__)
21
+
22
+ ## 🔧 Maintenance & Chores
23
+
24
+ * **Cycle Detection Refactor:** Replaced the array-based cycle tracker in `toJSONObject` with a `WeakSet`, improving performance and memory behaviour on large nested structures. (__#10832__)
25
+ * **composeSignals Cleanup:** Refactored `composeSignals` to use a clearer early-return structure, simplifying the cancellation/abort composition path. (__#10844__)
26
+ * **AI Readiness & Repo Docs:** Added `AGENTS.md` and related contributor-guide updates for both human and AI agents, plus post-release documentation improvements. (__#10835__, __#10841__)
27
+ * **Docs Improvements:** Clarified the GET request example, fixed the interceptor `eject` example to reference the correct instance, and corrected the Buzzoid sponsor description in the README. (__#10836__, __#10853__, __#10856__)
28
+ * **Sponsorship Tooling:** Fixed empty sponsor arrays in the sponsor processing script, added the ability to inject additional sponsors, updated the sponsorship link, and added a Twicsy advertisement entry. (__#10843__, __#10859__, __#10869__)
29
+ * **Dependencies:** Bumped `@commitlint/cli` from 20.5.0 to 20.5.2. (__#10846__)
30
+
31
+ ## 🌟 New Contributors
32
+
33
+ We are thrilled to welcome our new contributors. Thank you for helping improve axios:
34
+
35
+ * __@hpinmetaverse__ (__#10836__)
36
+ * __@tommyhgunz14__ (__#7413__)
37
+ * __@abhu85__ (__#10829__)
38
+ * __@divyanshuraj1095__ (__#10853__)
39
+ * __@sagodi97__ (__#10856__)
40
+ * __@rkdfx__ (__#10868__)
41
+ * __@Liuwei1125__ (__#10866__)
42
+
43
+ [Full Changelog](https://github.com/axios/axios/compare/v1.16.0...v1.16.1)
44
+
3
45
  ## v1.16.0 — May 2, 2026
4
46
 
5
47
  This release adds support for the QUERY HTTP method and a new `ECONNREFUSED` error constant, lands a substantial wave of HTTP, fetch, and XHR adapter bug fixes around redirects, aborts, headers, and timeouts, and welcomes 23 new contributors.