@openclaw/slack 2026.7.2-beta.3 → 2026.7.2-beta.4

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 (152) hide show
  1. package/dist/account-inspect-api.js +1 -1
  2. package/dist/{account-inspect-Bvbtu3iH.js → account-inspect-jn1xLaVi.js} +2 -2
  3. package/dist/account-reply-mode-DrUXogvO.js +14 -0
  4. package/dist/{accounts-DQEbYKh9.js → accounts-BSr252c_.js} +6 -27
  5. package/dist/{accounts.runtime-BIKmJdtJ.js → accounts.runtime-CjULMLTa.js} +1 -1
  6. package/dist/{action-runtime-DqkRwO3Z.js → action-runtime-CFU52n4W.js} +7 -7
  7. package/dist/action-runtime.runtime-9-17zvKH.js +2 -0
  8. package/dist/{actions-CF0tUY5q.js → actions-D51foiwR.js} +5 -5
  9. package/dist/{actions.runtime-hCbx4RXg.js → actions.runtime-BMJwtf5C.js} +1 -1
  10. package/dist/api.js +15 -14
  11. package/dist/{approval-handler.runtime-Em8I1-8-.js → approval-handler.runtime-3b4-wxMl.js} +2 -2
  12. package/dist/{channel-4-TRi1D6.js → channel-Ds8NKvfr.js} +26 -24
  13. package/dist/channel-config-api.js +1 -1
  14. package/dist/channel-plugin-api.js +1 -1
  15. package/dist/{channel-type-Cu1yjNg2.js → channel-type-DXkUajFP.js} +3 -3
  16. package/dist/{channel.setup-CgkADtZg.js → channel.setup-DOSTEDfA.js} +6 -5
  17. package/dist/{config-schema-XjJGfwQC.js → config-schema-B4j4tCOI.js} +231 -26
  18. package/dist/{directory-config-Bv0lcUlH.js → directory-config-B08pm5ZT.js} +1 -1
  19. package/dist/directory-contract-api.js +1 -1
  20. package/dist/{directory-live-CzUIB7th.js → directory-live-DpPKzPrn.js} +2 -2
  21. package/dist/{doctor-contract-DKpe5VBr.js → doctor-contract-U6oVntbM.js} +60 -89
  22. package/dist/doctor-contract-api.js +1 -1
  23. package/dist/{group-policy-Bw-65m3V.js → group-policy-CdnQzQBI.js} +32 -5
  24. package/dist/{interactive-replies-Dm_t2R9S.js → interactive-replies-C3ffk6oN.js} +1 -1
  25. package/dist/interactive-replies-api.js +1 -1
  26. package/dist/{message-tool-api-C2pcf5du.js → message-tool-api-ByVyIVOh.js} +2 -2
  27. package/dist/message-tool-api.js +1 -1
  28. package/dist/{monitor-CNFeF30h.js → monitor-CnB_WKvF.js} +3 -3
  29. package/dist/{outbound-adapter-CVi2uok0.js → outbound-adapter-DuPz2HHt.js} +3 -3
  30. package/dist/{pipeline.runtime-CTvokbty.js → pipeline.runtime-5rRYZuX5.js} +110 -77
  31. package/dist/{policy-b_dOPDCq.js → policy-C31RYSuT.js} +1 -1
  32. package/dist/{probe-Borhn9PQ.js → probe-CVRuArHA.js} +1 -1
  33. package/dist/{provider-B-HVL5ZE.js → provider-htuIJGFD.js} +365 -200
  34. package/dist/{relay-source-Ea_P9VcO.js → relay-source-Df9EaiTF.js} +1 -1
  35. package/dist/{replies-B4bOdrYb.js → replies-Cgr2Gli4.js} +3 -3
  36. package/dist/{resolve-channels-KTc568SU.js → resolve-channels-DodP2TFx.js} +1 -1
  37. package/dist/{resolve-users-DeGJf1yp.js → resolve-users-M9eF8891.js} +1 -1
  38. package/dist/{runtime-api-BFfNpzDe.js → runtime-api-D5XYMMsf.js} +3 -2
  39. package/dist/runtime-api.js +11 -11
  40. package/dist/{scopes-lx08L56K.js → scopes-CJRpHkDC.js} +1 -1
  41. package/dist/{security-audit-CikQhBUY.js → security-audit-Cz6erklv.js} +0 -10
  42. package/dist/security-contract-api.js +1 -1
  43. package/dist/{send-KuTDky7i.js → send-BZ1tPv7-.js} +4 -4
  44. package/dist/{send.runtime-CXyxws1D.js → send.runtime-a2pilFor.js} +1 -1
  45. package/dist/{setup-core-CeiAVwQ3.js → setup-core-tPxMuFez.js} +138 -40
  46. package/dist/setup-plugin-api.js +1 -1
  47. package/dist/{setup-surface-DLA0vHXp.js → setup-surface-wV-S1dE_.js} +43 -27
  48. package/dist/{shared-C4yVB0Q-.js → shared-BfMskaMx.js} +9 -8
  49. package/dist/{slash-dispatch.runtime-BT-mMm-f.js → slash-dispatch.runtime-lfeIsXTX.js} +1 -1
  50. package/node_modules/@types/node/README.md +1 -1
  51. package/node_modules/@types/node/fs/promises.d.ts +16 -6
  52. package/node_modules/@types/node/package.json +2 -2
  53. package/node_modules/agent-base/README.md +145 -0
  54. package/node_modules/agent-base/dist/src/index.d.ts +78 -0
  55. package/node_modules/agent-base/dist/src/index.js +203 -0
  56. package/node_modules/agent-base/dist/src/index.js.map +1 -0
  57. package/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
  58. package/node_modules/agent-base/dist/src/promisify.js +18 -0
  59. package/node_modules/agent-base/dist/src/promisify.js.map +1 -0
  60. package/node_modules/agent-base/package.json +64 -0
  61. package/node_modules/agent-base/src/index.ts +345 -0
  62. package/node_modules/agent-base/src/promisify.ts +33 -0
  63. package/node_modules/axios/CHANGELOG.md +197 -1
  64. package/node_modules/axios/README.md +424 -256
  65. package/node_modules/axios/dist/axios.js +589 -204
  66. package/node_modules/axios/dist/axios.min.js +3 -3
  67. package/node_modules/axios/dist/axios.min.js.map +1 -1
  68. package/node_modules/axios/dist/browser/axios.cjs +630 -185
  69. package/node_modules/axios/dist/esm/axios.js +630 -185
  70. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  71. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  72. package/node_modules/axios/dist/node/axios.cjs +949 -301
  73. package/node_modules/axios/index.d.cts +28 -5
  74. package/node_modules/axios/index.d.ts +24 -3
  75. package/node_modules/axios/lib/adapters/adapters.js +1 -1
  76. package/node_modules/axios/lib/adapters/fetch.js +223 -49
  77. package/node_modules/axios/lib/adapters/http.js +408 -193
  78. package/node_modules/axios/lib/adapters/xhr.js +3 -1
  79. package/node_modules/axios/lib/core/Axios.js +4 -2
  80. package/node_modules/axios/lib/core/AxiosError.js +13 -1
  81. package/node_modules/axios/lib/core/AxiosHeaders.js +13 -42
  82. package/node_modules/axios/lib/core/buildFullPath.js +29 -1
  83. package/node_modules/axios/lib/core/mergeConfig.js +35 -0
  84. package/node_modules/axios/lib/defaults/transitional.js +2 -0
  85. package/node_modules/axios/lib/env/data.js +1 -1
  86. package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +1 -3
  87. package/node_modules/axios/lib/helpers/Http2Sessions.js +119 -0
  88. package/node_modules/axios/lib/helpers/buildURL.js +7 -4
  89. package/node_modules/axios/lib/helpers/composeSignals.js +48 -47
  90. package/node_modules/axios/lib/helpers/cookies.js +5 -1
  91. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +16 -11
  92. package/node_modules/axios/lib/helpers/formDataToJSON.js +26 -4
  93. package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
  94. package/node_modules/axios/lib/helpers/fromDataURI.js +20 -5
  95. package/node_modules/axios/lib/helpers/progressEventReducer.js +3 -0
  96. package/node_modules/axios/lib/helpers/resolveConfig.js +26 -13
  97. package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  98. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +33 -1
  99. package/node_modules/axios/lib/helpers/toFormData.js +48 -12
  100. package/node_modules/axios/lib/helpers/validator.js +1 -1
  101. package/node_modules/axios/lib/utils.js +105 -19
  102. package/node_modules/axios/package.json +31 -13
  103. package/node_modules/https-proxy-agent/README.md +137 -0
  104. package/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
  105. package/node_modules/https-proxy-agent/dist/agent.js +177 -0
  106. package/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
  107. package/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
  108. package/node_modules/https-proxy-agent/dist/index.js +14 -0
  109. package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  110. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
  111. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
  112. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
  113. package/node_modules/https-proxy-agent/package.json +56 -0
  114. package/node_modules/iconv-lite/encodings/sbcs-data.js +2 -0
  115. package/node_modules/iconv-lite/encodings/utf32.js +10 -3
  116. package/node_modules/iconv-lite/package.json +2 -2
  117. package/node_modules/iconv-lite/types/encodings.d.ts +2 -0
  118. package/node_modules/path-to-regexp/Readme.md +3 -3
  119. package/node_modules/path-to-regexp/dist/index.js +135 -158
  120. package/node_modules/path-to-regexp/dist/index.js.map +1 -1
  121. package/node_modules/path-to-regexp/package.json +2 -2
  122. package/node_modules/qs/CHANGELOG.md +11 -0
  123. package/node_modules/qs/dist/qs.js +17 -17
  124. package/node_modules/qs/lib/parse.js +19 -8
  125. package/node_modules/qs/lib/utils.js +47 -8
  126. package/node_modules/qs/package.json +6 -5
  127. package/node_modules/qs/test/parse.js +230 -0
  128. package/node_modules/qs/test/utils.js +194 -0
  129. package/node_modules/typebox/build/compile/validator.d.mts +1 -4
  130. package/node_modules/typebox/build/guard/guard.d.mts +1 -1
  131. package/node_modules/typebox/build/guard/guard.mjs +5 -2
  132. package/node_modules/typebox/build/guard/string.mjs +16 -4
  133. package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  134. package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
  135. package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
  136. package/node_modules/typebox/build/typebox.d.mts +1 -1
  137. package/node_modules/typebox/build/typebox.mjs +1 -1
  138. package/node_modules/typebox/package.json +1 -1
  139. package/node_modules/typebox/readme.md +29 -32
  140. package/node_modules/ws/lib/receiver.js +15 -32
  141. package/node_modules/ws/lib/websocket-server.js +4 -4
  142. package/node_modules/ws/lib/websocket.js +4 -4
  143. package/node_modules/ws/package.json +5 -1
  144. package/npm-shrinkwrap.json +54 -27
  145. package/openclaw.plugin.json +1759 -1908
  146. package/package.json +92 -14
  147. package/dist/action-runtime.runtime-DEWOcFM4.js +0 -2
  148. package/dist/config-api-Df9a1B8C.js +0 -3
  149. package/node_modules/axios/dist/axios.js.map +0 -1
  150. package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
  151. package/node_modules/axios/dist/esm/axios.js.map +0 -1
  152. package/node_modules/axios/dist/node/axios.cjs.map +0 -1
@@ -0,0 +1,345 @@
1
+ import net from 'net';
2
+ import http from 'http';
3
+ import https from 'https';
4
+ import { Duplex } from 'stream';
5
+ import { EventEmitter } from 'events';
6
+ import createDebug from 'debug';
7
+ import promisify from './promisify';
8
+
9
+ const debug = createDebug('agent-base');
10
+
11
+ function isAgent(v: any): v is createAgent.AgentLike {
12
+ return Boolean(v) && typeof v.addRequest === 'function';
13
+ }
14
+
15
+ function isSecureEndpoint(): boolean {
16
+ const { stack } = new Error();
17
+ if (typeof stack !== 'string') return false;
18
+ return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1);
19
+ }
20
+
21
+ function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent;
22
+ function createAgent(
23
+ callback: createAgent.AgentCallback,
24
+ opts?: createAgent.AgentOptions
25
+ ): createAgent.Agent;
26
+ function createAgent(
27
+ callback?: createAgent.AgentCallback | createAgent.AgentOptions,
28
+ opts?: createAgent.AgentOptions
29
+ ) {
30
+ return new createAgent.Agent(callback, opts);
31
+ }
32
+
33
+ namespace createAgent {
34
+ export interface ClientRequest extends http.ClientRequest {
35
+ _last?: boolean;
36
+ _hadError?: boolean;
37
+ method: string;
38
+ }
39
+
40
+ export interface AgentRequestOptions {
41
+ host?: string;
42
+ path?: string;
43
+ // `port` on `http.RequestOptions` can be a string or undefined,
44
+ // but `net.TcpNetConnectOpts` expects only a number
45
+ port: number;
46
+ }
47
+
48
+ export interface HttpRequestOptions
49
+ extends AgentRequestOptions,
50
+ Omit<http.RequestOptions, keyof AgentRequestOptions> {
51
+ secureEndpoint: false;
52
+ }
53
+
54
+ export interface HttpsRequestOptions
55
+ extends AgentRequestOptions,
56
+ Omit<https.RequestOptions, keyof AgentRequestOptions> {
57
+ secureEndpoint: true;
58
+ }
59
+
60
+ export type RequestOptions = HttpRequestOptions | HttpsRequestOptions;
61
+
62
+ export type AgentLike = Pick<createAgent.Agent, 'addRequest'> | http.Agent;
63
+
64
+ export type AgentCallbackReturn = Duplex | AgentLike;
65
+
66
+ export type AgentCallbackCallback = (
67
+ err?: Error | null,
68
+ socket?: createAgent.AgentCallbackReturn
69
+ ) => void;
70
+
71
+ export type AgentCallbackPromise = (
72
+ req: createAgent.ClientRequest,
73
+ opts: createAgent.RequestOptions
74
+ ) =>
75
+ | createAgent.AgentCallbackReturn
76
+ | Promise<createAgent.AgentCallbackReturn>;
77
+
78
+ export type AgentCallback = typeof Agent.prototype.callback;
79
+
80
+ export type AgentOptions = {
81
+ timeout?: number;
82
+ };
83
+
84
+ /**
85
+ * Base `http.Agent` implementation.
86
+ * No pooling/keep-alive is implemented by default.
87
+ *
88
+ * @param {Function} callback
89
+ * @api public
90
+ */
91
+ export class Agent extends EventEmitter {
92
+ public timeout: number | null;
93
+ public maxFreeSockets: number;
94
+ public maxTotalSockets: number;
95
+ public maxSockets: number;
96
+ public sockets: {
97
+ [key: string]: net.Socket[];
98
+ };
99
+ public freeSockets: {
100
+ [key: string]: net.Socket[];
101
+ };
102
+ public requests: {
103
+ [key: string]: http.IncomingMessage[];
104
+ };
105
+ public options: https.AgentOptions;
106
+ private promisifiedCallback?: createAgent.AgentCallbackPromise;
107
+ private explicitDefaultPort?: number;
108
+ private explicitProtocol?: string;
109
+
110
+ constructor(
111
+ callback?: createAgent.AgentCallback | createAgent.AgentOptions,
112
+ _opts?: createAgent.AgentOptions
113
+ ) {
114
+ super();
115
+
116
+ let opts = _opts;
117
+ if (typeof callback === 'function') {
118
+ this.callback = callback;
119
+ } else if (callback) {
120
+ opts = callback;
121
+ }
122
+
123
+ // Timeout for the socket to be returned from the callback
124
+ this.timeout = null;
125
+ if (opts && typeof opts.timeout === 'number') {
126
+ this.timeout = opts.timeout;
127
+ }
128
+
129
+ // These aren't actually used by `agent-base`, but are required
130
+ // for the TypeScript definition files in `@types/node` :/
131
+ this.maxFreeSockets = 1;
132
+ this.maxSockets = 1;
133
+ this.maxTotalSockets = Infinity;
134
+ this.sockets = {};
135
+ this.freeSockets = {};
136
+ this.requests = {};
137
+ this.options = {};
138
+ }
139
+
140
+ get defaultPort(): number {
141
+ if (typeof this.explicitDefaultPort === 'number') {
142
+ return this.explicitDefaultPort;
143
+ }
144
+ return isSecureEndpoint() ? 443 : 80;
145
+ }
146
+
147
+ set defaultPort(v: number) {
148
+ this.explicitDefaultPort = v;
149
+ }
150
+
151
+ get protocol(): string {
152
+ if (typeof this.explicitProtocol === 'string') {
153
+ return this.explicitProtocol;
154
+ }
155
+ return isSecureEndpoint() ? 'https:' : 'http:';
156
+ }
157
+
158
+ set protocol(v: string) {
159
+ this.explicitProtocol = v;
160
+ }
161
+
162
+ callback(
163
+ req: createAgent.ClientRequest,
164
+ opts: createAgent.RequestOptions,
165
+ fn: createAgent.AgentCallbackCallback
166
+ ): void;
167
+ callback(
168
+ req: createAgent.ClientRequest,
169
+ opts: createAgent.RequestOptions
170
+ ):
171
+ | createAgent.AgentCallbackReturn
172
+ | Promise<createAgent.AgentCallbackReturn>;
173
+ callback(
174
+ req: createAgent.ClientRequest,
175
+ opts: createAgent.AgentOptions,
176
+ fn?: createAgent.AgentCallbackCallback
177
+ ):
178
+ | createAgent.AgentCallbackReturn
179
+ | Promise<createAgent.AgentCallbackReturn>
180
+ | void {
181
+ throw new Error(
182
+ '"agent-base" has no default implementation, you must subclass and override `callback()`'
183
+ );
184
+ }
185
+
186
+ /**
187
+ * Called by node-core's "_http_client.js" module when creating
188
+ * a new HTTP request with this Agent instance.
189
+ *
190
+ * @api public
191
+ */
192
+ addRequest(req: ClientRequest, _opts: RequestOptions): void {
193
+ const opts: RequestOptions = { ..._opts };
194
+
195
+ if (typeof opts.secureEndpoint !== 'boolean') {
196
+ opts.secureEndpoint = isSecureEndpoint();
197
+ }
198
+
199
+ if (opts.host == null) {
200
+ opts.host = 'localhost';
201
+ }
202
+
203
+ if (opts.port == null) {
204
+ opts.port = opts.secureEndpoint ? 443 : 80;
205
+ }
206
+
207
+ if (opts.protocol == null) {
208
+ opts.protocol = opts.secureEndpoint ? 'https:' : 'http:';
209
+ }
210
+
211
+ if (opts.host && opts.path) {
212
+ // If both a `host` and `path` are specified then it's most
213
+ // likely the result of a `url.parse()` call... we need to
214
+ // remove the `path` portion so that `net.connect()` doesn't
215
+ // attempt to open that as a unix socket file.
216
+ delete opts.path;
217
+ }
218
+
219
+ delete opts.agent;
220
+ delete opts.hostname;
221
+ delete opts._defaultAgent;
222
+ delete opts.defaultPort;
223
+ delete opts.createConnection;
224
+
225
+ // Hint to use "Connection: close"
226
+ // XXX: non-documented `http` module API :(
227
+ req._last = true;
228
+ req.shouldKeepAlive = false;
229
+
230
+ let timedOut = false;
231
+ let timeoutId: ReturnType<typeof setTimeout> | null = null;
232
+ const timeoutMs = opts.timeout || this.timeout;
233
+
234
+ const onerror = (err: NodeJS.ErrnoException) => {
235
+ if (req._hadError) return;
236
+ req.emit('error', err);
237
+ // For Safety. Some additional errors might fire later on
238
+ // and we need to make sure we don't double-fire the error event.
239
+ req._hadError = true;
240
+ };
241
+
242
+ const ontimeout = () => {
243
+ timeoutId = null;
244
+ timedOut = true;
245
+ const err: NodeJS.ErrnoException = new Error(
246
+ `A "socket" was not created for HTTP request before ${timeoutMs}ms`
247
+ );
248
+ err.code = 'ETIMEOUT';
249
+ onerror(err);
250
+ };
251
+
252
+ const callbackError = (err: NodeJS.ErrnoException) => {
253
+ if (timedOut) return;
254
+ if (timeoutId !== null) {
255
+ clearTimeout(timeoutId);
256
+ timeoutId = null;
257
+ }
258
+ onerror(err);
259
+ };
260
+
261
+ const onsocket = (socket: AgentCallbackReturn) => {
262
+ if (timedOut) return;
263
+ if (timeoutId != null) {
264
+ clearTimeout(timeoutId);
265
+ timeoutId = null;
266
+ }
267
+
268
+ if (isAgent(socket)) {
269
+ // `socket` is actually an `http.Agent` instance, so
270
+ // relinquish responsibility for this `req` to the Agent
271
+ // from here on
272
+ debug(
273
+ 'Callback returned another Agent instance %o',
274
+ socket.constructor.name
275
+ );
276
+ (socket as createAgent.Agent).addRequest(req, opts);
277
+ return;
278
+ }
279
+
280
+ if (socket) {
281
+ socket.once('free', () => {
282
+ this.freeSocket(socket as net.Socket, opts);
283
+ });
284
+ req.onSocket(socket as net.Socket);
285
+ return;
286
+ }
287
+
288
+ const err = new Error(
289
+ `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``
290
+ );
291
+ onerror(err);
292
+ };
293
+
294
+ if (typeof this.callback !== 'function') {
295
+ onerror(new Error('`callback` is not defined'));
296
+ return;
297
+ }
298
+
299
+ if (!this.promisifiedCallback) {
300
+ if (this.callback.length >= 3) {
301
+ debug('Converting legacy callback function to promise');
302
+ this.promisifiedCallback = promisify(this.callback);
303
+ } else {
304
+ this.promisifiedCallback = this.callback;
305
+ }
306
+ }
307
+
308
+ if (typeof timeoutMs === 'number' && timeoutMs > 0) {
309
+ timeoutId = setTimeout(ontimeout, timeoutMs);
310
+ }
311
+
312
+ if ('port' in opts && typeof opts.port !== 'number') {
313
+ opts.port = Number(opts.port);
314
+ }
315
+
316
+ try {
317
+ debug(
318
+ 'Resolving socket for %o request: %o',
319
+ opts.protocol,
320
+ `${req.method} ${req.path}`
321
+ );
322
+ Promise.resolve(this.promisifiedCallback(req, opts)).then(
323
+ onsocket,
324
+ callbackError
325
+ );
326
+ } catch (err) {
327
+ Promise.reject(err).catch(callbackError);
328
+ }
329
+ }
330
+
331
+ freeSocket(socket: net.Socket, opts: AgentOptions) {
332
+ debug('Freeing socket %o %o', socket.constructor.name, opts);
333
+ socket.destroy();
334
+ }
335
+
336
+ destroy() {
337
+ debug('Destroying agent %o', this.constructor.name);
338
+ }
339
+ }
340
+
341
+ // So that `instanceof` works correctly
342
+ createAgent.prototype = createAgent.Agent.prototype;
343
+ }
344
+
345
+ export = createAgent;
@@ -0,0 +1,33 @@
1
+ import {
2
+ Agent,
3
+ ClientRequest,
4
+ RequestOptions,
5
+ AgentCallbackCallback,
6
+ AgentCallbackPromise,
7
+ AgentCallbackReturn
8
+ } from './index';
9
+
10
+ type LegacyCallback = (
11
+ req: ClientRequest,
12
+ opts: RequestOptions,
13
+ fn: AgentCallbackCallback
14
+ ) => void;
15
+
16
+ export default function promisify(fn: LegacyCallback): AgentCallbackPromise {
17
+ return function(this: Agent, req: ClientRequest, opts: RequestOptions) {
18
+ return new Promise((resolve, reject) => {
19
+ fn.call(
20
+ this,
21
+ req,
22
+ opts,
23
+ (err: Error | null | undefined, rtn?: AgentCallbackReturn) => {
24
+ if (err) {
25
+ reject(err);
26
+ } else {
27
+ resolve(rtn);
28
+ }
29
+ }
30
+ );
31
+ });
32
+ };
33
+ }
@@ -1,5 +1,201 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.18.0 — June 13, 2026
4
+
5
+ This release hardens redirect and URL handling, improves the validateStatus configuration semantics, and includes updates to documentation, dependencies, and release metadata.
6
+
7
+ ## 🔒 Security Fixes
8
+
9
+ * **Redirect Header Safety:** Added Node HTTP adapter support for stripping caller-specified sensitive headers on cross-origin redirects, helping prevent custom auth headers such as API keys from leaking to another origin. (__#10892__)
10
+
11
+ * **URL And Request Hardening:** Rejects malformed `http:` and `https:` URLs that omit `//` with `ERR_INVALID_URL`, while tightening prototype-pollution-safe config reads, stream size limits, FormData depth handling, data URL sizing, and local `NO_PROXY` matching. (__#11000__)
12
+
13
+ ## 🐛 Bug Fixes
14
+
15
+ * **Status Validation:** Added `transitional.validateStatusUndefinedResolves` so applications can opt in to treating `validateStatus: undefined` like the option was omitted, while `validateStatus: null` remains the explicit way to accept every status. (__#10899__)
16
+
17
+ ## 🔧 Maintenance & Chores
18
+
19
+ * **Documentation:** Published the v1.17.0 release notes, fixed a changelog typo, clarified the package update PR policy, and marked the `proxy` request config as Node.js-only in the advanced docs. (__#10984__, __#10988__, __#10992__, __#10995__)
20
+
21
+ * **Dependencies:** Bumped `@babel/core`, `@babel/preset-env`, `@commitlint/cli`, `@commitlint/config-conventional`, `@rollup/plugin-babel`, `@rollup/plugin-commonjs`, `@vitest/browser`, `@vitest/browser-playwright`, `eslint`, `lint-staged`, `rollup`, `vitest`, and `actions/checkout`. (__#10989__, __#10996__, __#10997__)
22
+
23
+ * **Release Metadata:** Prepared the 1.18.0 release by updating package metadata and the runtime `VERSION` value. (__#11003__)
24
+
25
+ ## 🌟 New Contributors
26
+
27
+ We are thrilled to welcome our new contributors. Thank you for helping improve axios:
28
+
29
+ * __@drori12__ (__#10984__)
30
+ * __@eyupcanakman__ (__#10899__)
31
+ * __@Adi-Beker__ (__#10995__)
32
+
33
+ [Full Changelog](https://github.com/axios/axios/compare/v1.17.0...v1.18.0)
34
+
35
+ ## v1.17.0 — June 1, 2026
36
+
37
+ This release adds Node HTTP zstd decompression, hardens config and release workflows, and fixes authentication, header, proxy, and type-handling regressions.
38
+
39
+ ## 🔒 Security Fixes
40
+
41
+ * **Config Hardening:** Guarded `socketPath`, `params`, and `paramsSerializer` reads with own-property checks to prevent inherited prototype values from affecting request behavior, including SSRF-sensitive paths. (__#10901__, __#10922__)
42
+ * **Release Publishing:** Switched the publish workflow to npm staged publishing for safer, auditable package releases with provenance. (__#10926__)
43
+
44
+ ## 🚀 New Features
45
+
46
+ * **HTTP Compression:** Added Node HTTP adapter support for zstd response decompression, with `transitional.advertiseZstdAcceptEncoding` controlling whether `zstd` is advertised in `Accept-Encoding`. (__#6792__, __#10920__)
47
+
48
+ ## 🐛 Bug Fixes
49
+
50
+ * **Authentication Handling:** Restored Basic auth on same-origin Node redirects while continuing to strip credentials cross-origin, and aligned the fetch adapter with HTTP adapter behavior for URL-embedded Basic auth. (__#10929__, __#10896__)
51
+ * **Proxy TLS:** Preserved user `httpsAgent` TLS options when tunneling HTTPS requests through HTTP CONNECT proxies. (__#10957__)
52
+ * **React Native FormData:** Cleared default `Content-Type` for React Native `FormData` so multipart boundaries can be generated correctly. (__#10898__)
53
+ * **Headers:** Silently skipped empty or whitespace-only header names instead of throwing, matching parsed-header behavior and avoiding React Native response crashes. (__#10875__)
54
+ * **Request Data Merging:** Preserved enumerable symbol keys when cloning plain request data through axios merge logic. (__#10812__)
55
+ * **Bundler Compatibility:** Converted `resolveConfig` from an arrow default export to a named function export to avoid webpack and Babel transform interop failures. (__#10891__)
56
+ * **Types:** Corrected `AxiosHeaders.toJSON()` return types and updated CommonJS `isCancel` typings to narrow to `CanceledError<T>`. (__#10956__, __#10952__)
57
+ * **Build Tooling:** Avoided emitting a null `Authorization` header from the GitHub build helper when `GITHUB_TOKEN` is unset. (__#10931__)
58
+
59
+ ## 🔧 Maintenance & Chores
60
+
61
+ * **HTTP/2 Internals:** Extracted `Http2Sessions` into its own helper module and added direct unit coverage for session pooling, timeout, and cleanup behavior. (__#10861__)
62
+ * **Package Publishing:** Reduced published package size by switching to a `files` allowlist and dropping unneeded unminified bundle source maps. (__#10939__)
63
+ * **CI and Release Automation:** Added bundle-size reporting, moved reports to the job summary, fixed bundle-size comparison coverage, added Node 26 to the matrix, pinned npm for staged publishing, and prepared the 1.17.0 release. (__#10907__, __#10911__, __#10916__, __#10927__, __#10935__, __#10983__)
64
+ * **Developer Workflow:** Added a dev container and iterated on OpenSpec workflow files before removing them from the release branch. (__#10925__, __#10914__, __#10958__)
65
+ * **Documentation and Policy:** Updated disclosure, contributor, collaboration, threat-model, advanced docs, README badges, release notes, moderator configuration, and project metadata. (__#10890__, __#10889__, __#10921__, __#10945__, __#10905__, __#10933__, __#10915__, __#10887__, __#10955__)
66
+ * **Dependencies:** Bumped Babel tooling, Commitlint, ESLint, Rollup, Globals, Vitest, Playwright, `fs-extra`, `qs`, docs dependencies, and GitHub Actions dependencies including `actions/dependency-review-action` and `zizmorcore/zizmor-action`. (__#10871__, __#10879__, __#10918__, __#10919__, __#10934__, __#10947__, __#10954__, __#10960__)
67
+
68
+ ## 🌟 New Contributors
69
+
70
+ We are thrilled to welcome our new contributors. Thank you for helping improve axios:
71
+
72
+ * __@BasixKOR__ (__#6792__)
73
+ * __@carladams1299-lab__ (__#10861__)
74
+ * __@LaplaceYoung__ (__#10812__)
75
+ * __@JamieMagee__ (__#10939__)
76
+ * __@RonGamzu__ (__#10905__)
77
+ * __@sapirbaruch__ (__#10891__)
78
+ * __@nezukoagent__ (__#10901__)
79
+ * __@devareddy05__ (__#10929__)
80
+ * __@Mohammad-Faiz-Cloud-Engineer__ (__#10922__)
81
+ * __@azandabot__ (__#10931__)
82
+ * __@niksy__ (__#10896__)
83
+
84
+ [Full Changelog](https://github.com/axios/axios/compare/v1.16.1...v1.17.0)
85
+
86
+ ## v1.16.1 — May 13, 2026
87
+
88
+ 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.
89
+
90
+ ## 🔒 Security Fixes
91
+
92
+ * **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__)
93
+ * **Proxy Cleartext Leak:** Fixed an issue where HTTPS request data could be transmitted in cleartext to an HTTP proxy under certain configurations. (__#10858__)
94
+ * **CI Cache Removal:** Removed all GitHub Actions caches as a defence-in-depth measure against cache poisoning vectors in the build pipeline. (__#10882__)
95
+
96
+ ## 🐛 Bug Fixes
97
+
98
+ * **Data URI Parsing:** Updated the `fromDataURI` regex to match RFC 2397 more strictly, fixing edge cases in `data:` URL handling. (__#10829__)
99
+ * **Unicode Headers:** Preserved Unicode header values when running through request interceptors, so non-ASCII header content is no longer corrupted before dispatch. (__#10850__)
100
+ * **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__)
101
+ * **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__)
102
+ * **Type Definitions:** Made `parseReviver` `context.source` optional in the type definitions to align with the ES2023 specification. (__#10837__)
103
+ * **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__)
104
+
105
+ ## 🔧 Maintenance & Chores
106
+
107
+ * **Cycle Detection Refactor:** Replaced the array-based cycle tracker in `toJSONObject` with a `WeakSet`, improving performance and memory behaviour on large nested structures. (__#10832__)
108
+ * **composeSignals Cleanup:** Refactored `composeSignals` to use a clearer early-return structure, simplifying the cancellation/abort composition path. (__#10844__)
109
+ * **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__)
110
+ * **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__)
111
+ * **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__)
112
+ * **Dependencies:** Bumped `@commitlint/cli` from 20.5.0 to 20.5.2. (__#10846__)
113
+
114
+ ## 🌟 New Contributors
115
+
116
+ We are thrilled to welcome our new contributors. Thank you for helping improve axios:
117
+
118
+ * __@hpinmetaverse__ (__#10836__)
119
+ * __@tommyhgunz14__ (__#7413__)
120
+ * __@abhu85__ (__#10829__)
121
+ * __@divyanshuraj1095__ (__#10853__)
122
+ * __@sagodi97__ (__#10856__)
123
+ * __@rkdfx__ (__#10868__)
124
+ * __@Liuwei1125__ (__#10866__)
125
+
126
+ [Full Changelog](https://github.com/axios/axios/compare/v1.16.0...v1.16.1)
127
+
128
+ ## v1.16.0 — May 2, 2026
129
+
130
+ 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.
131
+
132
+ ## ⚠️ Notable Changes
133
+
134
+ A handful of fixes in this release are either security-adjacent or change observable behaviour. Please review before upgrading:
135
+
136
+ - **Fetch adapter now enforces `maxBodyLength` and `maxContentLength`.** These limits were silently ignored on the fetch adapter prior to 1.16.0 — anyone relying on them as a safety net (DoS protection, accidental large uploads) had no protection. (**#10795**)
137
+ - **Proxy requests now preserve user-supplied `Host` headers.** Previously, the proxy path could overwrite a custom `Host`. Virtual-host-style routing through a proxy will now behave correctly. (**#10822**)
138
+ - **Basic auth credentials embedded in URLs are now URL-decoded.** If you have percent-encoded credentials in a URL (e.g. `https://user:p%40ss@host`), the decoded value is what now goes on the wire. (**#10825**)
139
+ - **`parseProtocol` now strictly requires a colon in the protocol separator.** Strings that loosely parsed as protocols before may no longer match. (**#10729**)
140
+ - **Deprecated `unescape()` replaced with modern UTF-8 encoding.** Non-ASCII URL handling is now spec-correct; consumers depending on legacy `unescape()` quirks may see different output bytes. (**#7378**)
141
+ - **`transformRequest` input typing change was reverted.** The typing change introduced in #10745 was reverted in #10810 after follow-up review — net behavior is unchanged from 1.15.2. (**#10745**, **#10810**)
142
+
143
+ ## 🚀 New Features
144
+
145
+ - **QUERY HTTP Method:** Added support for the QUERY HTTP method across adapters and type definitions. (**#10802**)
146
+ - **ECONNREFUSED Error Constant:** Exposed `ECONNREFUSED` as a constant on `AxiosError` so callers can match connection-refused failures without comparing string literals (closes #6485). (**#10680**)
147
+ - **Encode Helper Export:** Exported the internal `encode` helper from `buildURL` so userland param serializers can reuse the same encoding logic that axios uses internally. (**#6897**)
148
+
149
+ ## 🐛 Bug Fixes
150
+
151
+ - **HTTP Adapter — Redirects & Headers:** Cleared stale headers when a redirect targets a no-proxy host, fixed the redirect listener chain so listeners no longer stack across hops, restored the missing `requestDetails` argument on `beforeRedirect`, preserved user-supplied `Host` headers when forwarding through a proxy, and properly URL-decoded basic auth credentials. (**#10794**, **#10800**, **#6241**, **#10822**, **#10825**)
152
+ - **HTTP Adapter — Streams & Timeouts:** Preserved the partial response object on `AxiosError` when a stream is aborted after headers arrive, honoured the `timeout` option during the connect phase when redirects are disabled, and resolved an unsettled-promise hang when an aborted request was combined with compression and `maxRedirects: 0`. (**#10708**, **#10819**, **#7149**)
153
+ - **Fetch Adapter:** Enforced `maxBodyLength` / `maxContentLength` in the fetch adapter, set the `User-Agent` header to match the HTTP adapter, preserved the original abort reason instead of replacing it with a generic error, and deferred global access so importing the module no longer throws a `TypeError` in restricted environments. (**#10795**, **#10772**, **#10806**, **#7260**)
154
+ - **XHR Adapter:** Unsubscribed the `cancelToken` and `AbortSignal` listeners on the error, timeout, and abort code paths to prevent leaked subscriptions. (**#10787**)
155
+ - **Error Handling:** Attached the parsed response to `AxiosError` when `JSON.parse` fails inside `dispatchRequest`, prevented `settle` from emitting `undefined` error codes, and tightened the `parseProtocol` regex to require a colon in the protocol separator. (**#10724**, **#7276**, **#10729**)
156
+ - **Types & Exports:** Aligned the CommonJS `CancelToken` typings with the ESM build, fixed a compiler error caused by `RawAxiosHeaders`, and re-exported `create` from the package index. (**#7414**, **#6389**, **#6460**)
157
+ - **UTF-8 Encoding:** Replaced the deprecated `unescape()` call with a modern UTF-8 encoding implementation. (**#7378**)
158
+ - **Misc Cleanup:** Resolved a batch of small inconsistencies and gadget-level issues across the codebase. (**#10833**)
159
+
160
+ ## 🔧 Maintenance & Chores
161
+
162
+ - **Refactor — ES6 Modernisation:** Modernised the `utils` module and XHR adapter to use ES6 features, and tidied the multipart boundary error message. (**#10588**, **#7419**)
163
+ - **Tests:** Hardened the HTTP test server lifecycle to fix flaky `FormData` EPIPE failures, fixed Win32 platform support for the pipe tests, and corrected an incorrect test assumption. (**#10820**, **#10791**, **#10796**)
164
+ - **Docs:** Documented `paramsSerializer.encode` for strict RFC 3986 query encoding, updated the `parseReviver` TypeScript definitions and configuration docs for ES2023, added timeout guidance to the README's first async example, and expanded notes around the recent type changes. (**#10821**, **#10782**, **#10759**, **#10804**)
165
+ - **Reverted:** Reverted the `transformRequest` input typing change from #10745 after follow-up review. (**#10745**, **#10810**)
166
+ - **Dependencies:** Bumped `actions/setup-node`, the `github-actions` group, and `postcss` (in `/docs`) to their latest versions. (**#10785**, **#10813**, **#10814**)
167
+ - **Release:** Updated changelog and packages, and prepared the 1.16.0 release. (**#10790**, **#10834**)
168
+
169
+ ## 🌟 New Contributors
170
+
171
+ We are thrilled to welcome our new contributors. Thank you for helping improve axios:
172
+
173
+ - **@singhankit001** (**#10588**)
174
+ - **@cuiweixie** (**#7419**)
175
+ - **@iruizsalinas** (**#10787**)
176
+ - **@MarcosNocetti** (**#10680**)
177
+ - **@deepview-autofix** (**#10729**)
178
+ - **@atharvasingh7007** (**#10745**)
179
+ - **@OfekDanny** (**#10772**)
180
+ - **@mnahkies** (**#7414**)
181
+ - **@tboyila** (**#10759**)
182
+ - **@Kingo64** (**#6897**)
183
+ - **@ramram1048** (**#6389**)
184
+ - **@FLNacif** (**#6460**)
185
+ - **@zozo123** (**#10806**)
186
+ - **@pierluigilenoci** (**#10802**)
187
+ - **@afurm** (**#10708**)
188
+ - **@karan-lrn** (**#7378**)
189
+ - **@ebeigarts** (**#7149**)
190
+ - **@Raymondo97** (**#10782**)
191
+ - **@mixelburg** (**#10821**)
192
+ - **@ashishkr96** (**#10822**)
193
+ - **@cyphercodes** (**#10819**)
194
+ - **@Jye10032** (**#7260**)
195
+ - **@VeerShah41** (**#7276**)
196
+
197
+ [Full Changelog](https://github.com/axios/axios/compare/v1.15.2...v1.16.0)
198
+
3
199
  ## v1.15.2 - April 21, 2026
4
200
 
5
201
  This release delivers prototype-pollution hardening for the Node HTTP adapter, adds an opt-in `allowedSocketPaths` allowlist to mitigate SSRF via Unix domain sockets, fixes a keep-alive socket memory leak, and ships supply-chain hardening across CI and security docs.
@@ -1319,7 +1515,7 @@ This functionality is considered as a fix.
1319
1515
 
1320
1516
  - fix: improve AxiosHeaders class [#5224](https://github.com/axios/axios/pull/5224)
1321
1517
  - fix: TypeScript type definitions for commonjs [#5196](https://github.com/axios/axios/pull/5196)
1322
- - fix: type definition of use method on AxiosInterceptorManager to match the the README [#5071](https://github.com/axios/axios/pull/5071)
1518
+ - fix: type definition of use method on AxiosInterceptorManager to match the README [#5071](https://github.com/axios/axios/pull/5071)
1323
1519
  - fix: \_\_dirname is not defined in the sandbox [#5269](https://github.com/axios/axios/pull/5269)
1324
1520
  - fix: AxiosError.toJSON method to avoid circular references [#5247](https://github.com/axios/axios/pull/5247)
1325
1521
  - fix: Z_BUF_ERROR when content-encoding is set but the response body is empty [#5250](https://github.com/axios/axios/pull/5250)