@openclaw/discord 2026.6.33 → 2026.6.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +1 -1
- package/dist/{channel-Ddnonoy4.js → channel-DU4jnQgl.js} +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{manager.runtime-BK6cf2Zu.js → manager.runtime-NxCd-PVt.js} +1 -1
- package/dist/{message-handler-BqpJIavO.js → message-handler-cizxbaDc.js} +3 -2
- package/dist/{message-handler.preflight-C90MxCcv.js → message-handler.preflight-CbD0u7U7.js} +2 -2
- package/dist/{message-handler.process-CeQ7Bd_3.js → message-handler.process-Do4EM591.js} +2 -2
- package/dist/{provider-C7376XFH.js → provider-B-s93q9s.js} +31 -6
- package/dist/{provider-session.runtime-CCdqogGf.js → provider-session.runtime-BKMOqHpd.js} +1 -1
- package/dist/provider.runtime-CaTJrpnl.js +2 -0
- package/dist/runtime-api.js +3 -3
- package/dist/{runtime-api.monitor-4oc58TSk.js → runtime-api.monitor-CRiBIQEI.js} +2 -2
- package/dist/runtime-api.monitor.js +3 -3
- package/node_modules/undici/README.md +8 -2
- package/node_modules/undici/docs/docs/api/Agent.md +248 -44
- package/node_modules/undici/docs/docs/api/BalancedPool.md +246 -48
- package/node_modules/undici/docs/docs/api/CacheStorage.md +171 -13
- package/node_modules/undici/docs/docs/api/CacheStore.md +294 -98
- package/node_modules/undici/docs/docs/api/Client.md +369 -179
- package/node_modules/undici/docs/docs/api/ClientStats.md +80 -14
- package/node_modules/undici/docs/docs/api/Connector.md +118 -36
- package/node_modules/undici/docs/docs/api/ContentType.md +65 -25
- package/node_modules/undici/docs/docs/api/Cookies.md +122 -71
- package/node_modules/undici/docs/docs/api/Debug.md +34 -18
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +364 -164
- package/node_modules/undici/docs/docs/api/Dispatcher.md +485 -1102
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +101 -87
- package/node_modules/undici/docs/docs/api/Errors.md +503 -40
- package/node_modules/undici/docs/docs/api/EventSource.md +294 -32
- package/node_modules/undici/docs/docs/api/Fetch.md +680 -31
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +78 -98
- package/node_modules/undici/docs/docs/api/H2CClient.md +298 -176
- package/node_modules/undici/docs/docs/api/Interceptors.md +414 -0
- package/node_modules/undici/docs/docs/api/MockAgent.md +333 -314
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +272 -98
- package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +189 -26
- package/node_modules/undici/docs/docs/api/MockClient.md +151 -33
- package/node_modules/undici/docs/docs/api/MockErrors.md +56 -5
- package/node_modules/undici/docs/docs/api/MockPool.md +321 -258
- package/node_modules/undici/docs/docs/api/Pool.md +235 -43
- package/node_modules/undici/docs/docs/api/PoolStats.md +119 -13
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +179 -160
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +238 -63
- package/node_modules/undici/docs/docs/api/RetryAgent.md +113 -26
- package/node_modules/undici/docs/docs/api/RetryHandler.md +161 -77
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +166 -72
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +264 -542
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +162 -187
- package/node_modules/undici/docs/docs/api/Util.md +68 -11
- package/node_modules/undici/docs/docs/api/WebSocket.md +475 -80
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +100 -32
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +2 -0
- package/node_modules/undici/docs/docs/best-practices/crawling.md +3 -1
- package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +6 -4
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +9 -7
- package/node_modules/undici/docs/docs/best-practices/proxy.md +3 -1
- package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +10 -8
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +2 -0
- package/node_modules/undici/docs/docs/{GettingStarted.md → getting-started.md} +22 -19
- package/node_modules/undici/docs/docs/index.md +784 -0
- package/node_modules/undici/docs/docs/site.json +125 -0
- package/node_modules/undici/docs/docs/type-map.json +79 -0
- package/node_modules/undici/lib/api/api-request.js +7 -1
- package/node_modules/undici/lib/api/readable.js +47 -2
- package/node_modules/undici/lib/cache/memory-cache-store.js +54 -9
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +7 -1
- package/node_modules/undici/lib/core/errors.js +20 -0
- package/node_modules/undici/lib/core/request.js +14 -3
- package/node_modules/undici/lib/core/util.js +30 -2
- package/node_modules/undici/lib/dispatcher/agent.js +3 -3
- package/node_modules/undici/lib/dispatcher/client-h1.js +65 -8
- package/node_modules/undici/lib/dispatcher/client-h2.js +265 -142
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +40 -6
- package/node_modules/undici/lib/global.js +36 -16
- package/node_modules/undici/lib/handler/cache-handler.js +269 -61
- package/node_modules/undici/lib/handler/cache-revalidation-handler.js +13 -3
- package/node_modules/undici/lib/handler/redirect-handler.js +6 -2
- package/node_modules/undici/lib/handler/retry-handler.js +87 -23
- package/node_modules/undici/lib/interceptor/cache.js +159 -52
- package/node_modules/undici/lib/interceptor/decompress.js +9 -2
- package/node_modules/undici/lib/mock/mock-interceptor.js +25 -7
- package/node_modules/undici/lib/mock/mock-utils.js +39 -10
- package/node_modules/undici/lib/util/cache.js +372 -68
- package/node_modules/undici/lib/util/date.js +23 -6
- package/node_modules/undici/lib/web/cookies/parse.js +3 -2
- package/node_modules/undici/lib/web/cookies/util.js +79 -9
- package/node_modules/undici/lib/web/eventsource/util.js +1 -1
- package/node_modules/undici/lib/web/fetch/body.js +2 -1
- package/node_modules/undici/lib/web/fetch/constants.js +1 -1
- package/node_modules/undici/lib/web/fetch/index.js +11 -2
- package/node_modules/undici/lib/web/fetch/response.js +1 -3
- package/node_modules/undici/lib/web/fetch/util.js +4 -1
- package/node_modules/undici/package.json +2 -2
- package/node_modules/undici/types/client.d.ts +3 -3
- package/node_modules/undici/types/cookies.d.ts +1 -1
- package/node_modules/undici/types/dispatcher.d.ts +3 -3
- package/node_modules/undici/types/errors.d.ts +10 -0
- package/node_modules/undici/types/handlers.d.ts +2 -0
- package/node_modules/undici/types/mock-interceptor.d.ts +5 -1
- package/node_modules/undici/types/proxy-agent.d.ts +7 -0
- package/npm-shrinkwrap.json +7 -7
- package/package.json +5 -5
- package/dist/provider.runtime-D1m66kDS.js +0 -2
|
@@ -18,6 +18,26 @@ function parseHttpDate (date) {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
function makeDate (year, monthIdx, day, hour, minute, second, weekday) {
|
|
22
|
+
const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
|
23
|
+
|
|
24
|
+
// Date.UTC treats years 0-99 as 1900-1999. Reset the full year so component
|
|
25
|
+
// checks below validate the HTTP date as written.
|
|
26
|
+
if (year >= 0 && year <= 99) {
|
|
27
|
+
result.setUTCFullYear(year)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return result.getUTCFullYear() === year &&
|
|
31
|
+
result.getUTCMonth() === monthIdx &&
|
|
32
|
+
result.getUTCDate() === day &&
|
|
33
|
+
result.getUTCHours() === hour &&
|
|
34
|
+
result.getUTCMinutes() === minute &&
|
|
35
|
+
result.getUTCSeconds() === second &&
|
|
36
|
+
result.getUTCDay() === weekday
|
|
37
|
+
? result
|
|
38
|
+
: undefined
|
|
39
|
+
}
|
|
40
|
+
|
|
21
41
|
/**
|
|
22
42
|
* @see https://httpwg.org/specs/rfc9110.html#preferred.date.format
|
|
23
43
|
*
|
|
@@ -224,8 +244,7 @@ function parseImfDate (date) {
|
|
|
224
244
|
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
225
245
|
}
|
|
226
246
|
|
|
227
|
-
|
|
228
|
-
return result.getUTCDay() === weekday ? result : undefined
|
|
247
|
+
return makeDate(year, monthIdx, day, hour, minute, second, weekday)
|
|
229
248
|
}
|
|
230
249
|
|
|
231
250
|
/**
|
|
@@ -429,8 +448,7 @@ function parseAscTimeDate (date) {
|
|
|
429
448
|
}
|
|
430
449
|
const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48)
|
|
431
450
|
|
|
432
|
-
|
|
433
|
-
return result.getUTCDay() === weekday ? result : undefined
|
|
451
|
+
return makeDate(year, monthIdx, day, hour, minute, second, weekday)
|
|
434
452
|
}
|
|
435
453
|
|
|
436
454
|
/**
|
|
@@ -644,8 +662,7 @@ function parseRfc850Date (date) {
|
|
|
644
662
|
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
645
663
|
}
|
|
646
664
|
|
|
647
|
-
|
|
648
|
-
return result.getUTCDay() === weekday ? result : undefined
|
|
665
|
+
return makeDate(year, monthIdx, day, hour, minute, second, weekday)
|
|
649
666
|
}
|
|
650
667
|
|
|
651
668
|
module.exports = {
|
|
@@ -178,8 +178,9 @@ function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {})
|
|
|
178
178
|
|
|
179
179
|
// 2. If the attribute-value failed to parse as a cookie date, ignore
|
|
180
180
|
// the cookie-av.
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
if (!Number.isNaN(expiryTime.getTime())) {
|
|
182
|
+
cookieAttributeList.expires = expiryTime
|
|
183
|
+
}
|
|
183
184
|
} else if (attributeNameLowercase === 'max-age') {
|
|
184
185
|
// https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2
|
|
185
186
|
// If the attribute-name case-insensitively matches the string "Max-
|
|
@@ -105,7 +105,7 @@ function validateCookiePath (path) {
|
|
|
105
105
|
|
|
106
106
|
if (
|
|
107
107
|
code < 0x20 || // exclude CTLs (0-31)
|
|
108
|
-
code
|
|
108
|
+
code > 0x7E || // exclude non-ascii and DEL
|
|
109
109
|
code === 0x3B // ;
|
|
110
110
|
) {
|
|
111
111
|
throw new Error('Invalid cookie path')
|
|
@@ -114,16 +114,80 @@ function validateCookiePath (path) {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
117
|
+
* <let-dig> ::= <letter> | <digit>
|
|
118
|
+
*
|
|
119
|
+
* <letter> ::= any one of the 52 alphabetic characters A through Z in
|
|
120
|
+
* upper case and a through z in lower case
|
|
121
|
+
*
|
|
122
|
+
* <digit> ::= any one of the ten digits 0 through 9r
|
|
123
|
+
*
|
|
124
|
+
* @see https://www.rfc-editor.org/rfc/rfc1034#section-3.5
|
|
125
|
+
* @param {number} code
|
|
126
|
+
*/
|
|
127
|
+
function isLetterOrDigit (code) {
|
|
128
|
+
return (
|
|
129
|
+
(code >= 0x30 && code <= 0x39) || // 0-9
|
|
130
|
+
(code >= 0x41 && code <= 0x5A) || // A-Z
|
|
131
|
+
(code >= 0x61 && code <= 0x7A) // a-z
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Validates a cookie domain against the "preferred name syntax".
|
|
137
|
+
*
|
|
138
|
+
* <domain> ::= <subdomain> | " "
|
|
139
|
+
* <subdomain> ::= <label> | <subdomain> "." <label>
|
|
140
|
+
* <label> ::= <let-dig> [ [ <ldh-str> ] <let-dig> ]
|
|
141
|
+
* <ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
|
|
142
|
+
* <let-dig-hyp> ::= <let-dig> | "-"
|
|
143
|
+
*
|
|
144
|
+
* @see https://www.rfc-editor.org/rfc/rfc1034#section-3.5
|
|
145
|
+
* @see https://www.rfc-editor.org/rfc/rfc1123#section-2.1
|
|
146
|
+
* @see https://www.rfc-editor.org/rfc/rfc1035#section-2.3.4
|
|
119
147
|
* @param {string} domain
|
|
120
148
|
*/
|
|
121
149
|
function validateCookieDomain (domain) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
150
|
+
// <domain> ::= <subdomain> | " "
|
|
151
|
+
if (domain === ' ') {
|
|
152
|
+
return
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (domain.length > 255) {
|
|
156
|
+
throw new Error('Invalid cookie domain')
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
let labelLength = 0
|
|
160
|
+
|
|
161
|
+
for (let i = 0; i < domain.length; ++i) {
|
|
162
|
+
const code = domain.charCodeAt(i)
|
|
163
|
+
|
|
164
|
+
if (code === 0x2E) {
|
|
165
|
+
if (labelLength === 0) {
|
|
166
|
+
throw new Error('Invalid cookie domain')
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (domain.charCodeAt(i - 1) === 0x2D) { // "-"
|
|
170
|
+
throw new Error('Invalid cookie domain')
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
labelLength = 0
|
|
174
|
+
continue
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (labelLength === 0 && !isLetterOrDigit(code)) {
|
|
178
|
+
throw new Error('Invalid cookie domain')
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (!isLetterOrDigit(code) && code !== 0x2D) { // "-"
|
|
182
|
+
throw new Error('Invalid cookie domain')
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (++labelLength > 63) {
|
|
186
|
+
throw new Error('Invalid cookie domain')
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (labelLength === 0 || domain.charCodeAt(domain.length - 1) === 0x2D) { // "-"
|
|
127
191
|
throw new Error('Invalid cookie domain')
|
|
128
192
|
}
|
|
129
193
|
}
|
|
@@ -266,7 +330,13 @@ function stringify (cookie) {
|
|
|
266
330
|
|
|
267
331
|
const [key, ...value] = part.split('=')
|
|
268
332
|
|
|
269
|
-
|
|
333
|
+
const trimmedKey = key.trim()
|
|
334
|
+
const joinedValue = value.join('=')
|
|
335
|
+
|
|
336
|
+
validateCookieName(trimmedKey)
|
|
337
|
+
validateCookieValue(joinedValue)
|
|
338
|
+
|
|
339
|
+
out.push(`${trimmedKey}=${joinedValue}`)
|
|
270
340
|
}
|
|
271
341
|
|
|
272
342
|
return out.join('; ')
|
|
@@ -16,6 +16,7 @@ const { serializeAMimeType } = require('./data-url')
|
|
|
16
16
|
const { multipartFormDataParser } = require('./formdata-parser')
|
|
17
17
|
const { parseJSONFromBytes } = require('../infra')
|
|
18
18
|
const { utf8DecodeBytes } = require('../../encoding')
|
|
19
|
+
const { ReadableStreamTee } = require('node:stream/web')
|
|
19
20
|
|
|
20
21
|
const textEncoder = new TextEncoder()
|
|
21
22
|
function noop () {}
|
|
@@ -279,7 +280,7 @@ function cloneBody (body) {
|
|
|
279
280
|
// https://fetch.spec.whatwg.org/#concept-body-clone
|
|
280
281
|
|
|
281
282
|
// 1. Let « out1, out2 » be the result of teeing body’s stream.
|
|
282
|
-
const { 0: out1, 1: out2 } = body.stream.tee()
|
|
283
|
+
const { 0: out1, 1: out2 } = ReadableStreamTee?.(body.stream, true) ?? body.stream.tee()
|
|
283
284
|
|
|
284
285
|
// 2. Set body’s stream to out1.
|
|
285
286
|
body.stream = out1
|
|
@@ -46,7 +46,7 @@ const referrerPolicyTokensSet = new Set(referrerPolicyTokens)
|
|
|
46
46
|
|
|
47
47
|
const requestRedirect = /** @type {const} */ (['follow', 'manual', 'error'])
|
|
48
48
|
|
|
49
|
-
const safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE'])
|
|
49
|
+
const safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE', 'QUERY'])
|
|
50
50
|
const safeMethodsSet = new Set(safeMethods)
|
|
51
51
|
|
|
52
52
|
const requestMode = /** @type {const} */ (['navigate', 'same-origin', 'no-cors', 'cors'])
|
|
@@ -1431,7 +1431,16 @@ async function httpNetworkOrCacheFetch (
|
|
|
1431
1431
|
// Otherwise:
|
|
1432
1432
|
|
|
1433
1433
|
// 1. Set httpRequest to a clone of request.
|
|
1434
|
-
|
|
1434
|
+
// Implementations are encouraged to avoid teeing request’s body’s stream
|
|
1435
|
+
// when request’s body’s source is null as only a single body is needed in
|
|
1436
|
+
// that case. E.g., when request’s body’s source is null, redirects and
|
|
1437
|
+
// authentication will end up failing the fetch.
|
|
1438
|
+
if (request.body?.source != null) {
|
|
1439
|
+
httpRequest = cloneRequest(request)
|
|
1440
|
+
} else {
|
|
1441
|
+
httpRequest = cloneRequest({ ...request, body: null })
|
|
1442
|
+
httpRequest.body = request.body
|
|
1443
|
+
}
|
|
1435
1444
|
|
|
1436
1445
|
// 2. Set httpFetchParams to a copy of fetchParams.
|
|
1437
1446
|
httpFetchParams = { ...fetchParams }
|
|
@@ -1560,7 +1569,7 @@ async function httpNetworkOrCacheFetch (
|
|
|
1560
1569
|
// TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129
|
|
1561
1570
|
if (!httpRequest.headersList.contains('accept-encoding', true)) {
|
|
1562
1571
|
if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) {
|
|
1563
|
-
httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate', true)
|
|
1572
|
+
httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate, zstd', true)
|
|
1564
1573
|
} else {
|
|
1565
1574
|
httpRequest.headersList.append('accept-encoding', 'gzip, deflate', true)
|
|
1566
1575
|
}
|
|
@@ -45,9 +45,7 @@ class Response {
|
|
|
45
45
|
static json (data, init = undefined) {
|
|
46
46
|
webidl.argumentLengthCheck(arguments, 1, 'Response.json')
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
init = webidl.converters.ResponseInit(init)
|
|
50
|
-
}
|
|
48
|
+
init = webidl.converters.ResponseInit(init)
|
|
51
49
|
|
|
52
50
|
// 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data.
|
|
53
51
|
const bytes = textEncoder.encode(
|
|
@@ -1195,7 +1195,10 @@ function simpleRangeHeaderValue (value, allowWhitespace) {
|
|
|
1195
1195
|
// 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is
|
|
1196
1196
|
// greater than rangeEndValue, then return failure.
|
|
1197
1197
|
// Note: ... when can they not be numbers?
|
|
1198
|
-
|
|
1198
|
+
// Note: rangeStartValue or rangeEndValue may be null for open-ended ranges
|
|
1199
|
+
// such as `bytes=5-` or `bytes=-5`. A null value must not be coerced to 0
|
|
1200
|
+
// in the comparison, so this check only applies when both are numbers.
|
|
1201
|
+
if (rangeStartValue !== null && rangeEndValue !== null && rangeStartValue > rangeEndValue) {
|
|
1199
1202
|
return 'failure'
|
|
1200
1203
|
}
|
|
1201
1204
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "undici",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.9.0",
|
|
4
4
|
"description": "An HTTP/1.1 client, written from scratch for Node.js",
|
|
5
5
|
"homepage": "https://undici.nodejs.org",
|
|
6
6
|
"bugs": {
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"@types/node": "^22.0.0",
|
|
117
117
|
"abort-controller": "^3.0.0",
|
|
118
118
|
"borp": "^1.0.0",
|
|
119
|
-
"c8": "^
|
|
119
|
+
"c8": "^12.0.0",
|
|
120
120
|
"cross-env": "^10.0.0",
|
|
121
121
|
"dns-packet": "^5.4.0",
|
|
122
122
|
"esbuild": "^0.28.0",
|
|
@@ -33,7 +33,7 @@ export declare namespace Client {
|
|
|
33
33
|
export interface Options {
|
|
34
34
|
/** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
|
|
35
35
|
maxHeaderSize?: number;
|
|
36
|
-
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
|
|
36
|
+
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */
|
|
37
37
|
headersTimeout?: number;
|
|
38
38
|
/** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
|
|
39
39
|
socketTimeout?: never;
|
|
@@ -41,7 +41,7 @@ export declare namespace Client {
|
|
|
41
41
|
requestTimeout?: never;
|
|
42
42
|
/** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */
|
|
43
43
|
connectTimeout?: number;
|
|
44
|
-
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
|
|
44
|
+
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */
|
|
45
45
|
bodyTimeout?: number;
|
|
46
46
|
/** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
|
|
47
47
|
idleTimeout?: never;
|
|
@@ -57,7 +57,7 @@ export declare namespace Client {
|
|
|
57
57
|
keepAliveTimeoutThreshold?: number;
|
|
58
58
|
/** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */
|
|
59
59
|
socketPath?: string;
|
|
60
|
-
/** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
|
|
60
|
+
/** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Only enable values greater than `1` when the remote server is trusted. Default: `1`. */
|
|
61
61
|
pipelining?: number;
|
|
62
62
|
/** @deprecated use the connect option instead */
|
|
63
63
|
tls?: never;
|
|
@@ -18,7 +18,7 @@ export interface Cookie {
|
|
|
18
18
|
export function deleteCookie (
|
|
19
19
|
headers: Headers,
|
|
20
20
|
name: string,
|
|
21
|
-
attributes?: {
|
|
21
|
+
attributes?: { path?: string, domain?: string }
|
|
22
22
|
): void
|
|
23
23
|
|
|
24
24
|
export function getCookies (headers: Headers): Record<string, string>
|
|
@@ -111,13 +111,13 @@ declare namespace Dispatcher {
|
|
|
111
111
|
idempotent?: boolean;
|
|
112
112
|
/** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. Defaults to `method !== 'HEAD'`. */
|
|
113
113
|
blocking?: boolean;
|
|
114
|
-
/** The IP Type of Service (ToS) value for the request socket. Must be an integer between 0 and 255.
|
|
114
|
+
/** The IP Type of Service (ToS) value for the request socket. Must be an integer between 0 and 255. */
|
|
115
115
|
typeOfService?: number | null;
|
|
116
116
|
/** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */
|
|
117
117
|
upgrade?: boolean | string | null;
|
|
118
|
-
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. */
|
|
118
|
+
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */
|
|
119
119
|
headersTimeout?: number | null;
|
|
120
|
-
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. */
|
|
120
|
+
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */
|
|
121
121
|
bodyTimeout?: number | null;
|
|
122
122
|
/** Whether the request should stablish a keep-alive or not. Default `false` */
|
|
123
123
|
reset?: boolean;
|
|
@@ -154,6 +154,16 @@ declare namespace Errors {
|
|
|
154
154
|
code: 'UND_ERR_PRX_TLS'
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
export class ProxyConnectionError extends UndiciError {
|
|
158
|
+
constructor (
|
|
159
|
+
cause?: Error,
|
|
160
|
+
message?: string,
|
|
161
|
+
options?: Record<any, any>
|
|
162
|
+
)
|
|
163
|
+
name: 'ProxyConnectionError'
|
|
164
|
+
code: 'UND_ERR_PRX_CONN'
|
|
165
|
+
}
|
|
166
|
+
|
|
157
167
|
export class MaxOriginsReachedError extends UndiciError {
|
|
158
168
|
name: 'MaxOriginsReachedError'
|
|
159
169
|
code: 'UND_ERR_MAX_ORIGINS_REACHED'
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import Dispatcher from './dispatcher'
|
|
2
2
|
|
|
3
3
|
export declare class RedirectHandler implements Dispatcher.DispatchHandler {
|
|
4
|
+
static buildDispatch (dispatcher: Dispatcher, maxRedirections: number): Dispatcher.Dispatch
|
|
5
|
+
|
|
4
6
|
constructor (
|
|
5
7
|
dispatch: Dispatcher.Dispatch,
|
|
6
8
|
maxRedirections: number,
|
|
@@ -75,9 +75,13 @@ declare namespace MockInterceptor {
|
|
|
75
75
|
opts: MockResponseCallbackOptions
|
|
76
76
|
) => TData | Buffer | string
|
|
77
77
|
|
|
78
|
+
export type MockReplyOptions<TData extends object = object> = {
|
|
79
|
+
statusCode: number, data?: TData | Buffer | string, responseOptions?: MockResponseOptions
|
|
80
|
+
}
|
|
81
|
+
|
|
78
82
|
export type MockReplyOptionsCallback<TData extends object = object> = (
|
|
79
83
|
opts: MockResponseCallbackOptions
|
|
80
|
-
) =>
|
|
84
|
+
) => MockReplyOptions<TData> | Promise<MockReplyOptions<TData>>
|
|
81
85
|
}
|
|
82
86
|
|
|
83
87
|
interface Interceptable extends Dispatcher {
|
|
@@ -24,6 +24,13 @@ declare namespace ProxyAgent {
|
|
|
24
24
|
requestTls?: buildConnector.BuildOptions;
|
|
25
25
|
proxyTls?: buildConnector.BuildOptions;
|
|
26
26
|
clientFactory?(origin: URL, opts: object): Dispatcher;
|
|
27
|
+
/**
|
|
28
|
+
* Undici tunnels via CONNECT when the target endpoint uses HTTPS, and
|
|
29
|
+
* forwards (HTTP/1.1 absolute-form request-target, per RFC 9112 §3.2.2)
|
|
30
|
+
* otherwise, regardless of whether the proxy URL is HTTP or HTTPS. The
|
|
31
|
+
* non-tunneled forwarding path does not negotiate HTTP/2 with the proxy.
|
|
32
|
+
* Set to true to force tunneling for plain HTTP requests as well.
|
|
33
|
+
*/
|
|
27
34
|
proxyTunnel?: boolean;
|
|
28
35
|
}
|
|
29
36
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/discord",
|
|
3
|
-
"version": "2026.6.
|
|
3
|
+
"version": "2026.6.34",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/discord",
|
|
9
|
-
"version": "2026.6.
|
|
9
|
+
"version": "2026.6.34",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@discordjs/voice": "0.19.2",
|
|
12
12
|
"discord-api-types": "0.38.48",
|
|
13
13
|
"libopus-wasm": "0.2.0",
|
|
14
14
|
"typebox": "1.1.39",
|
|
15
|
-
"undici": "8.
|
|
15
|
+
"undici": "8.9.0",
|
|
16
16
|
"ws": "8.21.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"openclaw": ">=2026.6.
|
|
19
|
+
"openclaw": ">=2026.6.34"
|
|
20
20
|
},
|
|
21
21
|
"peerDependenciesMeta": {
|
|
22
22
|
"openclaw": {
|
|
@@ -399,9 +399,9 @@
|
|
|
399
399
|
"license": "MIT"
|
|
400
400
|
},
|
|
401
401
|
"node_modules/undici": {
|
|
402
|
-
"version": "8.
|
|
403
|
-
"resolved": "https://registry.npmjs.org/undici/-/undici-8.
|
|
404
|
-
"integrity": "sha512-
|
|
402
|
+
"version": "8.9.0",
|
|
403
|
+
"resolved": "https://registry.npmjs.org/undici/-/undici-8.9.0.tgz",
|
|
404
|
+
"integrity": "sha512-aWZpUj7XoGonMClx4gdDRfgBjqeA+F473aDmROQQbM9n6PRfK/u1q/a0X4wMTgcHfT8H6fpbt98PFuDUwFg2YA==",
|
|
405
405
|
"license": "MIT",
|
|
406
406
|
"engines": {
|
|
407
407
|
"node": ">=22.19.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/discord",
|
|
3
|
-
"version": "2026.6.
|
|
3
|
+
"version": "2026.6.34",
|
|
4
4
|
"description": "OpenClaw Discord channel plugin for channels, DMs, commands, and app events.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"discord-api-types": "0.38.48",
|
|
13
13
|
"libopus-wasm": "0.2.0",
|
|
14
14
|
"typebox": "1.1.39",
|
|
15
|
-
"undici": "8.
|
|
15
|
+
"undici": "8.9.0",
|
|
16
16
|
"ws": "8.21.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"openclaw": ">=2026.6.
|
|
19
|
+
"openclaw": ">=2026.6.34"
|
|
20
20
|
},
|
|
21
21
|
"peerDependenciesMeta": {
|
|
22
22
|
"openclaw": {
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"allowInvalidConfigRecovery": true
|
|
64
64
|
},
|
|
65
65
|
"compat": {
|
|
66
|
-
"pluginApi": ">=2026.6.
|
|
66
|
+
"pluginApi": ">=2026.6.34"
|
|
67
67
|
},
|
|
68
68
|
"build": {
|
|
69
|
-
"openclawVersion": "2026.6.
|
|
69
|
+
"openclawVersion": "2026.6.34"
|
|
70
70
|
},
|
|
71
71
|
"release": {
|
|
72
72
|
"publishToClawHub": true,
|