@openclaw/discord 2026.9.1-beta.1 → 2026.9.2
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/account-inspect-BY-ve3yH.js +45 -0
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-CfQ-vSyf.js → accounts-CwJQoLjM.js} +89 -45
- package/dist/action-runtime-api.js +1 -1
- package/dist/{activities-api-q-9PaaHH.js → activities-api-CTcGq3Hf.js} +30 -17
- package/dist/activities-api.js +1 -1
- package/dist/{allow-list-BDMimASD.js → allow-list-DBTtR2dz.js} +13 -35
- package/dist/{api-DNVbJyEy.js → api-BfmEP6wp.js} +6 -5
- package/dist/api.js +18 -18
- package/dist/{approval-handler.runtime-B7qhK3fR.js → approval-handler.runtime-DUSe5fyH.js} +19 -12
- package/dist/{audit-CBEv_ERu.js → audit-DpPfwoJM.js} +8 -7
- package/dist/{channel-Dx1tMTfx.js → channel-BHajPgwR.js} +29 -23
- package/dist/{channel-actions.runtime-CLWWu9nC.js → channel-actions.runtime-DS8pXo0S.js} +38 -38
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-DOzXS2Pk.js → channel.setup-BWmMe1tT.js} +18 -18
- package/dist/command-owners-D78sAoOz.js +10 -0
- package/dist/{components-B9V5o361.js → components-BimX47Mq.js} +111 -149
- package/dist/{config-schema-BR13IAx6.js → config-schema-B797-Spt.js} +19 -12
- package/dist/{conversation-binding-route-DJYrY2TQ.js → conversation-binding-route-DuR5NGIx.js} +1 -1
- package/dist/{directory-config-BK6eqekJ.js → directory-config-CD2v2Szs.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DSAJSrJk.js → directory-live-DaJzWJ2N.js} +4 -4
- package/dist/{doctor-Cm7Y1pJ2.js → doctor-D4HH1inA.js} +9 -6
- package/dist/{doctor-contract-DsWvKIXF.js → doctor-contract-Co5vRCZ6.js} +9 -6
- package/dist/doctor-contract-api.js +31 -28
- package/dist/{handle-action.guild-admin-BdwCRHmm.js → handle-action.guild-admin-4We6wWQU.js} +6 -3
- package/dist/index.js +1 -1
- package/dist/ingress-identity-XNmW-mZS.js +60 -0
- package/dist/{message-handler-BXpWZyni.js → message-handler-DhgBabyU.js} +61 -70
- package/dist/{message-handler.preflight-Ba5LAY_X.js → message-handler.preflight-oZ7dQCd0.js} +41 -101
- package/dist/{message-handler.process-3HEzmemS.js → message-handler.process-BzCYf1pa.js} +82 -108
- package/dist/{message-text-aiwO5R2F.js → message-text-DK4NnBg-.js} +11 -6
- package/dist/{outbound-adapter-BE4jSq2d.js → outbound-adapter-CtggmGh9.js} +52 -67
- package/dist/{outbound-components-oLpg8Qzb.js → outbound-components-Dn8SJWMS.js} +5 -4
- package/dist/{outbound-session-route-Cg15ZFJd.js → outbound-session-route-Q_HEusBQ.js} +57 -15
- package/dist/{owner-access-UlYi9t0M.js → owner-access-Cp8r6Ipf.js} +9 -7
- package/dist/{pluralkit-Tiyl70dx.js → pluralkit-BY75YcK0.js} +2 -2
- package/dist/{probe-n6ZXxK8V.js → probe-3ovFAp3b.js} +3 -3
- package/dist/{probe.runtime-CN4bdPfZ.js → probe.runtime-BckHn3cJ.js} +1 -1
- package/dist/{provider-session.runtime-B9xe-Qaf.js → provider-session.runtime-BL2lHBH7.js} +3 -3
- package/dist/{provider-B11xwilq.js → provider-uKmmrDM4.js} +299 -136
- package/dist/provider.runtime-C-IkWF2w.js +2 -0
- package/dist/{realtime-session.runtime-CU8IQUS-.js → realtime-session.runtime-CGYm1t_0.js} +798 -448
- package/dist/{resolve-allowlist-common-BLoYaxEG.js → resolve-allowlist-common-sKIKy-cF.js} +3 -3
- package/dist/{resolve-channels-C2sT_n67.js → resolve-channels-CoiMlWy0.js} +4 -4
- package/dist/{resolve-users-CzpjLwjy.js → resolve-users-DJpiokfW.js} +5 -4
- package/dist/{retry-Cv4jCU5Z.js → retry-DQt1zDgH.js} +356 -214
- package/dist/{retry-after-DdLPmPoa.js → retry-after-BrLjLUJi.js} +2 -1
- package/dist/{runtime-CY4PRMF-.js → runtime-BHsdEdr5.js} +2 -2
- package/dist/{runtime-BHrTlFkf.js → runtime-Ghtfh5ZA.js} +151 -109
- package/dist/runtime-api.js +20 -20
- package/dist/{secret-config-contract-B3i6WxV5.js → secret-config-contract-DFu9hfU8.js} +14 -6
- package/dist/secret-contract-api.js +1 -1
- package/dist/{security-audit-BfJhAXZp.js → security-audit-DKfK-iPY.js} +10 -11
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/{security-audit.runtime-BVKF9VtY.js → security-audit.runtime-sKZyKgpx.js} +1 -1
- package/dist/{send-C49MFF9j.js → send-CZeWKUiA.js} +132 -100
- package/dist/{send.components-DKKAw5VX.js → send.components-BG5IDABj.js} +21 -15
- package/dist/{send.outbound-zam0TrZx.js → send.outbound-DHuFUL6W.js} +42 -63
- package/dist/{send.shared-JjljcV4O.js → send.shared-B0n_fWzu.js} +77 -149
- package/dist/{sender-identity-BJtfyise.js → sender-identity-B8Ncfi63.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-_5EcP4jW.js → shared-C3dKun_X.js} +24 -15
- package/dist/{subagent-hooks-DQzvOptn.js → subagent-hooks-ZoQXEI1E.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{system-events-C7yxaHWP.js → system-events-DFF_awl7.js} +2 -2
- package/dist/{target-resolver-vxIh6O3-.js → target-resolver-DLtHDwMK.js} +6 -5
- package/dist/targets-BObRyaKX.js +3 -0
- package/dist/{thread-bindings-DW5F9vat.js → thread-bindings-DKvsNjQR.js} +7 -6
- package/dist/{thread-bindings.manager-ByOtwjo_.js → thread-bindings.manager-pbbRT5gb.js} +38 -29
- package/dist/{thread-bindings.session-updates-CJb-BpPL.js → thread-bindings.session-updates-t6jeFB1-.js} +3 -2
- package/dist/{thread-bindings.state-D8OMdk4O.js → thread-bindings.state-DtgOqsbX.js} +34 -1
- package/dist/{threading-agH1T_6s.js → threading-BCx49X-6.js} +8 -6
- package/dist/{timeouts-B9cy6RvQ.js → timeouts-D86uWLt_.js} +1 -1
- package/dist/{transcripts-source-BR11iHA4.js → transcripts-source-Dc6Nnli5.js} +55 -7
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-Dc_YMY2e.js → typing-CuopV-Hi.js} +2 -2
- package/dist/{voice-runtime-DIeaa8fJ.js → voice-runtime-BQnILUbG.js} +492 -105
- package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/README.md +1 -1
- package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/conforms.d.ts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/package.json +3 -3
- package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubArray.d.ts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubObject.d.ts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubString.d.ts +2 -0
- package/node_modules/@discordjs/voice/node_modules/@types/node/README.md +1 -1
- package/node_modules/@discordjs/voice/node_modules/@types/node/buffer.buffer.d.ts +5 -5
- package/node_modules/@discordjs/voice/node_modules/@types/node/crypto.d.ts +2 -2
- package/node_modules/@discordjs/voice/node_modules/@types/node/http.d.ts +16 -0
- package/node_modules/@discordjs/voice/node_modules/@types/node/http2.d.ts +10 -2
- package/node_modules/@discordjs/voice/node_modules/@types/node/package.json +2 -2
- package/node_modules/@discordjs/voice/node_modules/@types/node/process.d.ts +52 -0
- package/node_modules/@discordjs/voice/node_modules/@types/node/quic.d.ts +210 -28
- package/node_modules/@discordjs/voice/node_modules/@types/node/sqlite.d.ts +6 -2
- package/node_modules/@discordjs/voice/node_modules/@types/node/test.d.ts +36 -0
- package/node_modules/typebox/build/format/email.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +19 -1
- package/node_modules/typebox/build/format/json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/json_pointer.mjs +2 -2
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +2 -2
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
- package/node_modules/typebox/build/system/memory/assign.mjs +2 -1
- package/node_modules/typebox/build/system/memory/create.mjs +3 -4
- package/node_modules/typebox/build/system/memory/discard.mjs +2 -2
- package/node_modules/typebox/build/system/memory/freeze.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/freeze.mjs +6 -0
- package/node_modules/typebox/build/system/memory/update.mjs +3 -2
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
- package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
- package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
- package/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
- package/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +91 -21
- package/node_modules/undici/lib/handler/cache-handler.js +29 -5
- package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/undici/lib/handler/redirect-handler.js +21 -4
- package/node_modules/undici/lib/handler/retry-handler.js +148 -30
- package/node_modules/undici/lib/interceptor/cache.js +65 -12
- package/node_modules/undici/lib/interceptor/decompress.js +115 -13
- package/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
- package/node_modules/undici/lib/interceptor/dns.js +7 -0
- package/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/undici/lib/util/cache.js +45 -3
- package/node_modules/undici/lib/web/cookies/parse.js +150 -147
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
- package/node_modules/undici/lib/web/fetch/index.js +6 -0
- package/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/undici/lib/web/fetch/util.js +6 -1
- package/node_modules/undici/lib/web/webidl/index.js +3 -3
- package/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/undici/package.json +3 -3
- package/node_modules/undici/types/client.d.ts +10 -0
- package/node_modules/undici/types/interceptors.d.ts +2 -0
- package/node_modules/undici/types/mock-agent.d.ts +11 -10
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -0
- package/openclaw.plugin.json +15 -8
- package/package.json +7 -6
- package/skills/discord/SKILL.md +1 -1
- package/dist/account-inspect-BDfKyuvL.js +0 -89
- package/dist/provider.runtime-DiYaHvOz.js +0 -2
- package/dist/sdk-runtime-4geQHtXc.js +0 -338
- package/dist/targets-CtTKvntJ.js +0 -3
|
@@ -34,9 +34,9 @@ class WebSocketStream {
|
|
|
34
34
|
/** @type {ReadableStreamDefaultController} */
|
|
35
35
|
#readableStreamController
|
|
36
36
|
|
|
37
|
-
//
|
|
38
|
-
/** @type {
|
|
39
|
-
#
|
|
37
|
+
// Retain the controller so the writable stream can be errored while locked.
|
|
38
|
+
/** @type {WritableStreamDefaultController} */
|
|
39
|
+
#writableStreamController
|
|
40
40
|
|
|
41
41
|
// Each WebSocketStream object has an associated boolean handshake aborted , which is initially false.
|
|
42
42
|
#handshakeAborted = false
|
|
@@ -300,6 +300,9 @@ class WebSocketStream {
|
|
|
300
300
|
// 12. Let writable be a new WritableStream .
|
|
301
301
|
// 13. Set up writable with writeAlgorithm , closeAlgorithm , and abortAlgorithm .
|
|
302
302
|
const writable = new WritableStream({
|
|
303
|
+
start: (controller) => {
|
|
304
|
+
this.#writableStreamController = controller
|
|
305
|
+
},
|
|
303
306
|
write: (chunk) => this.#write(chunk),
|
|
304
307
|
close: () => closeWebSocketConnection(this.#handler, null, null),
|
|
305
308
|
abort: (reason) => this.#closeUsingReason(reason)
|
|
@@ -308,9 +311,6 @@ class WebSocketStream {
|
|
|
308
311
|
// Set stream ’s readable stream to readable .
|
|
309
312
|
this.#readableStream = readable
|
|
310
313
|
|
|
311
|
-
// Set stream ’s writable stream to writable .
|
|
312
|
-
this.#writableStream = writable
|
|
313
|
-
|
|
314
314
|
// Resolve stream ’s opened promise with WebSocketOpenInfo «[ " extensions " → extensions , " protocol " → protocol , " readable " → readable , " writable " → writable ]».
|
|
315
315
|
this.#openedPromise.resolve({
|
|
316
316
|
extensions,
|
|
@@ -396,9 +396,7 @@ class WebSocketStream {
|
|
|
396
396
|
readableStreamClose(this.#readableStreamController)
|
|
397
397
|
|
|
398
398
|
// 6.2. Error stream ’s writable stream with an " InvalidStateError " DOMException indicating that a closed WebSocketStream cannot be written to.
|
|
399
|
-
|
|
400
|
-
this.#writableStream.abort(new DOMException('A closed WebSocketStream cannot be written to', 'InvalidStateError'))
|
|
401
|
-
}
|
|
399
|
+
this.#writableStreamController.error(new DOMException('A closed WebSocketStream cannot be written to', 'InvalidStateError'))
|
|
402
400
|
|
|
403
401
|
// 6.3. Resolve stream ’s closed promise with WebSocketCloseInfo «[ " closeCode " → code , " reason " → reason ]».
|
|
404
402
|
this.#closedPromise.resolve({
|
|
@@ -415,7 +413,7 @@ class WebSocketStream {
|
|
|
415
413
|
this.#readableStreamController?.error(error)
|
|
416
414
|
|
|
417
415
|
// 7.3. Error stream ’s writable stream with error .
|
|
418
|
-
this.#
|
|
416
|
+
this.#writableStreamController?.error(error)
|
|
419
417
|
|
|
420
418
|
// 7.4. Reject stream ’s closed promise with error .
|
|
421
419
|
this.#closedPromise.reject(error)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "undici",
|
|
3
|
-
"version": "8.10.
|
|
3
|
+
"version": "8.10.2",
|
|
4
4
|
"description": "An HTTP/1.1 client, written from scratch for Node.js",
|
|
5
5
|
"homepage": "https://undici.nodejs.org",
|
|
6
6
|
"bugs": {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"test:websocket:autobahn": "node test/autobahn/client.js",
|
|
98
98
|
"test:websocket:autobahn:report": "node test/autobahn/report.js",
|
|
99
99
|
"test:wpt:setup": "node test/web-platform-tests/wpt-runner.mjs setup",
|
|
100
|
-
"test:wpt": "npm run test:wpt:setup && node test/web-platform-tests/wpt-runner.mjs run /fetch /mimesniff /
|
|
100
|
+
"test:wpt": "npm run test:wpt:setup && node test/web-platform-tests/wpt-runner.mjs run /fetch /mimesniff /xhr /websockets /eventsource",
|
|
101
101
|
"test:cache-tests": "node test/cache-interceptor/cache-tests.mjs --ci",
|
|
102
102
|
"coverage": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test:javascript && npm run coverage:report",
|
|
103
103
|
"coverage:ci": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test:javascript && npm run coverage:report:ci",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"prepare": "husky && node ./scripts/platform-shell.js"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
|
-
"@fastify/busboy": "3.2.
|
|
112
|
+
"@fastify/busboy": "3.2.2",
|
|
113
113
|
"@matteo.collina/tspl": "^0.2.0",
|
|
114
114
|
"@metcoder95/https-pem": "^1.0.0",
|
|
115
115
|
"@sinonjs/fake-timers": "^12.0.0",
|
|
@@ -80,6 +80,8 @@ export declare namespace Client {
|
|
|
80
80
|
maxResponseSize?: number;
|
|
81
81
|
/** WebSocket-specific options */
|
|
82
82
|
webSocket?: Client.WebSocketOptions;
|
|
83
|
+
/** EventSource-specific options */
|
|
84
|
+
eventSource?: Client.EventSourceOptions;
|
|
83
85
|
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
|
|
84
86
|
autoSelectFamily?: boolean;
|
|
85
87
|
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
|
|
@@ -169,6 +171,14 @@ export declare namespace Client {
|
|
|
169
171
|
*/
|
|
170
172
|
settings?: Omit<SessionOptions['settings'], 'enablePush' | 'maxConcurrentStreams' | 'enableConnectProtocol'>
|
|
171
173
|
}
|
|
174
|
+
export interface EventSourceOptions {
|
|
175
|
+
/**
|
|
176
|
+
* Maximum allowed event size in bytes for EventSource messages.
|
|
177
|
+
* Set to 0 to disable the limit.
|
|
178
|
+
* @default buffer.kStringMaxLength
|
|
179
|
+
*/
|
|
180
|
+
maxEventSize?: number;
|
|
181
|
+
}
|
|
172
182
|
}
|
|
173
183
|
|
|
174
184
|
export default Client
|
|
@@ -12,6 +12,8 @@ declare namespace Interceptors {
|
|
|
12
12
|
export type DecompressInterceptorOpts = {
|
|
13
13
|
skipErrorResponses?: boolean
|
|
14
14
|
skipStatusCodes?: number[]
|
|
15
|
+
/** Maximum decompressed response size in bytes. @default 67108864 */
|
|
16
|
+
maxSize?: number
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
export type ResponseErrorInterceptorOpts = { throwOnError: boolean }
|
|
@@ -6,10 +6,6 @@ import { MockCallHistory } from './mock-call-history'
|
|
|
6
6
|
|
|
7
7
|
export default MockAgent
|
|
8
8
|
|
|
9
|
-
interface PendingInterceptor extends MockDispatch {
|
|
10
|
-
origin: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
9
|
/** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */
|
|
14
10
|
declare class MockAgent<TMockAgentOptions extends MockAgent.Options = MockAgent.Options> extends Dispatcher {
|
|
15
11
|
constructor (options?: TMockAgentOptions)
|
|
@@ -40,17 +36,22 @@ declare class MockAgent<TMockAgentOptions extends MockAgent.Options = MockAgent.
|
|
|
40
36
|
enableCallHistory (): this
|
|
41
37
|
/** Disable call history. Any subsequence calls will then not be registered. */
|
|
42
38
|
disableCallHistory (): this
|
|
43
|
-
pendingInterceptors (): PendingInterceptor[]
|
|
39
|
+
pendingInterceptors (): MockAgent.PendingInterceptor[]
|
|
44
40
|
assertNoPendingInterceptors (options?: {
|
|
45
|
-
pendingInterceptorsFormatter?: PendingInterceptorsFormatter;
|
|
41
|
+
pendingInterceptorsFormatter?: MockAgent.PendingInterceptorsFormatter;
|
|
46
42
|
}): void
|
|
47
43
|
}
|
|
48
44
|
|
|
49
|
-
interface PendingInterceptorsFormatter {
|
|
50
|
-
format(pendingInterceptors: readonly PendingInterceptor[]): string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
45
|
declare namespace MockAgent {
|
|
46
|
+
/** An interceptor that was registered on a mock dispatcher and has not been consumed yet. */
|
|
47
|
+
export interface PendingInterceptor extends MockDispatch {
|
|
48
|
+
origin: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface PendingInterceptorsFormatter {
|
|
52
|
+
format(pendingInterceptors: readonly PendingInterceptor[]): string;
|
|
53
|
+
}
|
|
54
|
+
|
|
54
55
|
/** MockAgent options. */
|
|
55
56
|
export interface Options extends Agent.Options {
|
|
56
57
|
/** A custom agent to be encapsulated by the MockAgent. */
|
|
@@ -21,5 +21,7 @@ declare namespace Socks5ProxyAgent {
|
|
|
21
21
|
connect?: buildConnector.connector;
|
|
22
22
|
/** TLS options for the proxy connection (for SOCKS5 over TLS) */
|
|
23
23
|
proxyTls?: buildConnector.BuildOptions;
|
|
24
|
+
/** TLS options for the end-to-end connection to the target */
|
|
25
|
+
requestTls?: buildConnector.BuildOptions;
|
|
24
26
|
}
|
|
25
27
|
}
|
package/openclaw.plugin.json
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
},
|
|
7
7
|
"name": "Discord",
|
|
8
8
|
"description": "OpenClaw Discord channel plugin for channels, DMs, commands, and app events.",
|
|
9
|
-
"icon": "https://cdn.simpleicons.org/discord",
|
|
10
9
|
"skills": [
|
|
11
10
|
"./skills"
|
|
12
11
|
],
|
|
@@ -63,6 +62,7 @@
|
|
|
63
62
|
"type": "boolean"
|
|
64
63
|
},
|
|
65
64
|
"dmPolicy": {
|
|
65
|
+
"default": "pairing",
|
|
66
66
|
"type": "string",
|
|
67
67
|
"enum": [
|
|
68
68
|
"pairing",
|
|
@@ -359,6 +359,9 @@
|
|
|
359
359
|
}
|
|
360
360
|
]
|
|
361
361
|
},
|
|
362
|
+
"joinIntro": {
|
|
363
|
+
"type": "boolean"
|
|
364
|
+
},
|
|
362
365
|
"commands": {
|
|
363
366
|
"type": "object",
|
|
364
367
|
"properties": {
|
|
@@ -1892,7 +1895,6 @@
|
|
|
1892
1895
|
"type": "string"
|
|
1893
1896
|
},
|
|
1894
1897
|
"groupPolicy": {
|
|
1895
|
-
"default": "allowlist",
|
|
1896
1898
|
"type": "string",
|
|
1897
1899
|
"enum": [
|
|
1898
1900
|
"open",
|
|
@@ -2170,6 +2172,9 @@
|
|
|
2170
2172
|
}
|
|
2171
2173
|
]
|
|
2172
2174
|
},
|
|
2175
|
+
"joinIntro": {
|
|
2176
|
+
"type": "boolean"
|
|
2177
|
+
},
|
|
2173
2178
|
"commands": {
|
|
2174
2179
|
"type": "object",
|
|
2175
2180
|
"properties": {
|
|
@@ -3647,9 +3652,6 @@
|
|
|
3647
3652
|
"additionalProperties": false
|
|
3648
3653
|
}
|
|
3649
3654
|
},
|
|
3650
|
-
"required": [
|
|
3651
|
-
"groupPolicy"
|
|
3652
|
-
],
|
|
3653
3655
|
"additionalProperties": false
|
|
3654
3656
|
}
|
|
3655
3657
|
},
|
|
@@ -3658,6 +3660,7 @@
|
|
|
3658
3660
|
}
|
|
3659
3661
|
},
|
|
3660
3662
|
"required": [
|
|
3663
|
+
"dmPolicy",
|
|
3661
3664
|
"groupPolicy"
|
|
3662
3665
|
],
|
|
3663
3666
|
"additionalProperties": false
|
|
@@ -3759,7 +3762,7 @@
|
|
|
3759
3762
|
},
|
|
3760
3763
|
"streaming.progress.toolProgress": {
|
|
3761
3764
|
"label": "Discord Progress Tool Lines",
|
|
3762
|
-
"help": "Show
|
|
3765
|
+
"help": "Show individual tool activity in progress drafts (default: false). Quiet drafts retain plans, approval requests, failures, and authored progress text."
|
|
3763
3766
|
},
|
|
3764
3767
|
"streaming.progress.commentary": {
|
|
3765
3768
|
"label": "Discord Progress Commentary",
|
|
@@ -3769,6 +3772,10 @@
|
|
|
3769
3772
|
"label": "Discord Progress Command Text",
|
|
3770
3773
|
"help": "Command/exec detail in progress draft lines: \"status\" is the safe default; \"raw\" opts into command text."
|
|
3771
3774
|
},
|
|
3775
|
+
"joinIntro": {
|
|
3776
|
+
"label": "Discord Guild Join Introduction",
|
|
3777
|
+
"help": "Post one brief, room-specific introduction when the bot joins an allowed Discord guild (default: true). Account settings override the channel-wide setting."
|
|
3778
|
+
},
|
|
3772
3779
|
"proxy": {
|
|
3773
3780
|
"label": "Discord Proxy URL",
|
|
3774
3781
|
"help": "Proxy URL for Discord gateway + API requests (app-id lookup and allowlist resolution). Set per account via channels.discord.accounts.<id>.proxy."
|
|
@@ -3787,11 +3794,11 @@
|
|
|
3787
3794
|
},
|
|
3788
3795
|
"threadBindings.enabled": {
|
|
3789
3796
|
"label": "Discord Thread Binding Enabled",
|
|
3790
|
-
"help": "Enable Discord thread
|
|
3797
|
+
"help": "Enable Discord thread-bound session spawning, routing, and delivery. Overrides session.threadBindings.enabled when set."
|
|
3791
3798
|
},
|
|
3792
3799
|
"threadBindings.idleHours": {
|
|
3793
3800
|
"label": "Discord Thread Binding Idle Timeout (hours)",
|
|
3794
|
-
"help": "Inactivity window in hours for Discord thread-bound sessions
|
|
3801
|
+
"help": "Inactivity window in hours for Discord thread-bound sessions. Set 0 to disable idle expiry (default: 24). Overrides session.threadBindings.idleHours when set."
|
|
3795
3802
|
},
|
|
3796
3803
|
"threadBindings.maxAgeHours": {
|
|
3797
3804
|
"label": "Discord Thread Binding Max Age (hours)",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/discord",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.2",
|
|
4
4
|
"description": "OpenClaw Discord channel plugin for channels, DMs, commands, and app events.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"discord-api-types": "0.38.53",
|
|
14
14
|
"libopus-wasm": "0.2.0",
|
|
15
15
|
"mdast-util-from-markdown": "2.0.3",
|
|
16
|
-
"typebox": "1.3.
|
|
17
|
-
"undici": "8.10.
|
|
16
|
+
"typebox": "1.3.18",
|
|
17
|
+
"undici": "8.10.2",
|
|
18
18
|
"ws": "8.21.3",
|
|
19
19
|
"zod": "4.4.3"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"openclaw": ">=2026.9.
|
|
22
|
+
"openclaw": ">=2026.9.2"
|
|
23
23
|
},
|
|
24
24
|
"peerDependenciesMeta": {
|
|
25
25
|
"openclaw": {
|
|
@@ -94,10 +94,11 @@
|
|
|
94
94
|
"allowInvalidConfigRecovery": true
|
|
95
95
|
},
|
|
96
96
|
"compat": {
|
|
97
|
-
"pluginApi": ">=2026.9.
|
|
97
|
+
"pluginApi": ">=2026.9.2"
|
|
98
98
|
},
|
|
99
99
|
"build": {
|
|
100
|
-
"
|
|
100
|
+
"bundledDist": false,
|
|
101
|
+
"openclawVersion": "2026.9.2",
|
|
101
102
|
"staticAssets": [
|
|
102
103
|
{
|
|
103
104
|
"source": "./assets/embedded-app-sdk.mjs",
|
package/skills/discord/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: discord
|
|
3
3
|
description: "Discord messaging workflows through OpenClaw's message tool."
|
|
4
|
-
metadata: { "openclaw": { "emoji": "🎮", "requires": { "config": ["channels.discord
|
|
4
|
+
metadata: { "openclaw": { "emoji": "🎮", "requires": { "config": ["channels.discord"] } } }
|
|
5
5
|
allowed-tools: ["message"]
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, u as resolveDiscordAccountConfig } from "./accounts-CfQ-vSyf.js";
|
|
2
|
-
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
3
|
-
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
|
-
import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
5
|
-
//#region extensions/discord/src/account-token-inspect.ts
|
|
6
|
-
function inspectDiscordConfiguredToken(value) {
|
|
7
|
-
const normalized = normalizeSecretInputString(value);
|
|
8
|
-
if (normalized) return {
|
|
9
|
-
token: normalized.replace(/^Bot\s+/i, ""),
|
|
10
|
-
tokenSource: "config",
|
|
11
|
-
tokenStatus: "available"
|
|
12
|
-
};
|
|
13
|
-
if (hasConfiguredSecretInput(value)) return {
|
|
14
|
-
token: "",
|
|
15
|
-
tokenSource: "config",
|
|
16
|
-
tokenStatus: "configured_unavailable"
|
|
17
|
-
};
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
function inspectDiscordAccountTokenState(params) {
|
|
21
|
-
const accountToken = inspectDiscordConfiguredToken(params.accountToken);
|
|
22
|
-
if (accountToken) return {
|
|
23
|
-
...params.base,
|
|
24
|
-
...accountToken,
|
|
25
|
-
configured: true,
|
|
26
|
-
config: params.config
|
|
27
|
-
};
|
|
28
|
-
if (params.hasAccountToken) return {
|
|
29
|
-
...params.base,
|
|
30
|
-
token: "",
|
|
31
|
-
tokenSource: "none",
|
|
32
|
-
tokenStatus: "missing",
|
|
33
|
-
configured: false,
|
|
34
|
-
config: params.config
|
|
35
|
-
};
|
|
36
|
-
const channelToken = inspectDiscordConfiguredToken(params.channelToken);
|
|
37
|
-
if (channelToken) return {
|
|
38
|
-
...params.base,
|
|
39
|
-
...channelToken,
|
|
40
|
-
configured: true,
|
|
41
|
-
config: params.config
|
|
42
|
-
};
|
|
43
|
-
const fallback = params.resolveFallbackToken();
|
|
44
|
-
if (fallback.token) return {
|
|
45
|
-
...params.base,
|
|
46
|
-
token: fallback.token,
|
|
47
|
-
tokenSource: fallback.source,
|
|
48
|
-
tokenStatus: "available",
|
|
49
|
-
configured: true,
|
|
50
|
-
config: params.config
|
|
51
|
-
};
|
|
52
|
-
return {
|
|
53
|
-
...params.base,
|
|
54
|
-
token: "",
|
|
55
|
-
tokenSource: "none",
|
|
56
|
-
tokenStatus: "missing",
|
|
57
|
-
configured: false,
|
|
58
|
-
config: params.config
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region extensions/discord/src/account-inspect.ts
|
|
63
|
-
function inspectDiscordAccount(params) {
|
|
64
|
-
const accountId = normalizeAccountId(params.accountId ?? resolveDefaultDiscordAccountId(params.cfg));
|
|
65
|
-
const merged = mergeDiscordAccountConfig(params.cfg, accountId);
|
|
66
|
-
const enabled = params.cfg.channels?.discord?.enabled !== false && merged.enabled !== false;
|
|
67
|
-
const accountConfig = resolveDiscordAccountConfig(params.cfg, accountId);
|
|
68
|
-
const hasAccountToken = Boolean(accountConfig && Object.hasOwn(accountConfig, "token"));
|
|
69
|
-
return inspectDiscordAccountTokenState({
|
|
70
|
-
base: {
|
|
71
|
-
accountId,
|
|
72
|
-
enabled,
|
|
73
|
-
name: normalizeOptionalString(merged.name)
|
|
74
|
-
},
|
|
75
|
-
config: merged,
|
|
76
|
-
accountToken: accountConfig?.token,
|
|
77
|
-
hasAccountToken,
|
|
78
|
-
channelToken: params.cfg.channels?.discord?.token,
|
|
79
|
-
resolveFallbackToken: () => {
|
|
80
|
-
const envToken = accountId === DEFAULT_ACCOUNT_ID ? normalizeSecretInputString(params.envToken ?? process.env.DISCORD_BOT_TOKEN) : void 0;
|
|
81
|
-
return {
|
|
82
|
-
token: envToken?.replace(/^Bot\s+/i, "") ?? "",
|
|
83
|
-
source: envToken ? "env" : "none"
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
//#endregion
|
|
89
|
-
export { inspectDiscordAccountTokenState as n, inspectDiscordAccount as t };
|