@openclaw/discord 2026.10.2 → 2026.10.5-beta.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/.setup/account-inspect-8cCu6uPG.mjs +31 -0
- package/dist/.setup/{accounts-HE9-mj1L.mjs → accounts-ljrzXBJi.mjs} +47 -45
- package/dist/.setup/{allow-list-vxkG9_JD.mjs → allow-list-B_ToXtew.mjs} +34 -101
- package/dist/.setup/{api-DlNUkDqj.mjs → api-CtmE1OUN.mjs} +25 -31
- package/dist/.setup/{approval-handler.runtime-DmnEa54W.mjs → approval-handler.runtime-D7FoZSn0.mjs} +30 -53
- package/dist/.setup/{approval-message-updates-B0jdSqOj.mjs → approval-message-updates-CIGByUcE.mjs} +2 -2
- package/dist/.setup/{audit-BpikUwN_.mjs → audit-zSawfbsN.mjs} +5 -8
- package/dist/.setup/{channel-Dr-AUnGt.mjs → channel-DI7DMzu0.mjs} +136 -215
- package/dist/.setup/{channel-access-BRp3Y-rF.mjs → channel-access-DasWY_OV.mjs} +6 -7
- package/dist/.setup/{channel.setup-BmNvkidb.mjs → channel.setup-DdFVN1mr.mjs} +35 -64
- package/dist/.setup/{components-DLJR0xU-.mjs → components-HN9052L1.mjs} +123 -146
- package/dist/.setup/{config-schema-BQWfnSCx.mjs → config-schema-_uBILpQf.mjs} +7 -3
- package/dist/.setup/{conversation-binding-route-DicJC1Lj.mjs → conversation-binding-route-DTjCBx-O.mjs} +1 -1
- package/dist/.setup/{directory-config-gqsdcplU.mjs → directory-config-3iVub-3m.mjs} +1 -1
- package/dist/.setup/{directory-live-Bipr0eUJ.mjs → directory-live-DLygQVtW.mjs} +18 -22
- package/dist/.setup/{discord-9gysrhzp.mjs → discord-BGqgx-yd.mjs} +686 -854
- package/dist/.setup/{doctor-B2bskDcF.mjs → doctor-DSrNJ7m2.mjs} +36 -47
- package/dist/.setup/{doctor-contract-Bg3NPAMw.mjs → doctor-contract-Bwv8EuQ_.mjs} +7 -16
- package/dist/.setup/{handle-action-UmkjXBfo.mjs → handle-action-CXH1h1tq.mjs} +25 -38
- package/dist/.setup/{handle-action.guild-admin-CB4sc9VV.mjs → handle-action.guild-admin-CHKW6PIs.mjs} +25 -31
- package/dist/.setup/{live-policy-config-VxexfRKo.mjs → live-policy-config-BPoB3eQi.mjs} +1 -1
- package/dist/.setup/{message-handler-BK69A-NB.mjs → message-handler-Ii_etru1.mjs} +9 -14
- package/dist/.setup/{message-handler.preflight-DFpsh90H.mjs → message-handler.preflight-C7YuSRl_.mjs} +79 -128
- package/dist/.setup/{message-handler.preflight-pluralkit-BXGGVmpe.mjs → message-handler.preflight-pluralkit-C3iAG--b.mjs} +6 -6
- package/dist/.setup/{message-handler.process-TKoqcqIP.mjs → message-handler.process-ClgWYH6o.mjs} +234 -206
- package/dist/.setup/{outbound-adapter-D4wRAb5S.mjs → outbound-adapter-D8OOIuKn.mjs} +73 -112
- package/dist/.setup/{outbound-session-route-BvBH4LC6.mjs → outbound-session-route-B0Hpwn3Q.mjs} +57 -115
- package/dist/.setup/output-activity-uBpMSX75.mjs +11 -0
- package/dist/.setup/{pluralkit-a6_NLfH9.mjs → pluralkit-B64dfq_j.mjs} +3 -1
- package/dist/.setup/{preflight-audio-DHGIHEpv.mjs → preflight-audio-wWgsZG5F.mjs} +1 -5
- package/dist/.setup/{presence-cache-Dg3_dADn.mjs → presence-cache-DCeTsL73.mjs} +3 -6
- package/dist/.setup/{probe-BwSKpnZf.mjs → probe-D3P1x4aN.mjs} +10 -18
- package/dist/.setup/{provider-YP8gN9_o.mjs → provider-D9EzOfG8.mjs} +2990 -3903
- package/dist/.setup/{provider-session.runtime-D1gkPxHT.mjs → provider-session.runtime-CsnRvddI.mjs} +5 -5
- package/dist/.setup/provider.runtime-BQVcM7Pg.mjs +2 -0
- package/dist/.setup/{realtime-session.runtime-BKUQBy1u.mjs → realtime-session.runtime-CxGBk8H-.mjs} +69 -98
- package/dist/.setup/{receive-recovery-DgkX7Qvi.mjs → receive-recovery-eVmK2_hl.mjs} +2 -12
- package/dist/.setup/resolve-allowlist-common-DNSsUQRF.mjs +66 -0
- package/dist/.setup/resolve-channels-UdT38DzU.mjs +173 -0
- package/dist/.setup/{resolve-users-DNrwvunm.mjs → resolve-users-DnCsrXZ_.mjs} +12 -41
- package/dist/.setup/{runtime-CESTexGn.mjs → runtime-CRTkKU1G.mjs} +202 -313
- package/dist/.setup/{runtime-DPcmPST9.mjs → runtime-DPm3gZXk.mjs} +2 -2
- package/dist/.setup/{secret-config-contract-uOE2J7yM.mjs → secret-config-contract-CIsH7R3B.mjs} +9 -18
- package/dist/.setup/{security-audit-D42cp5N7.mjs → security-audit-BFT84Uny.mjs} +1 -2
- package/dist/.setup/security-contract-DNyyjTZZ.mjs +19 -0
- package/dist/.setup/{send-CJk3VP5q.mjs → send-DbILKgcm.mjs} +184 -241
- package/dist/.setup/{send.components-dPljuV24.mjs → send.components-FxOS3CeP.mjs} +47 -63
- package/dist/.setup/{send.outbound-rOboMO_6.mjs → send.outbound-_jx4Xpd3.mjs} +178 -202
- package/dist/.setup/{send.receipt-DVOg2Oaw.mjs → send.receipt-BAlzXd8e.mjs} +33 -109
- package/dist/.setup/{send.shared-C4CN24D9.mjs → send.shared-CjQ4jbMA.mjs} +97 -153
- package/dist/.setup/{sender-identity-AHpUNr72.mjs → sender-identity-BNBvGt1l.mjs} +1 -1
- package/dist/.setup/setup-plugin-api-xfOFmxHP.mjs +3 -0
- package/dist/.setup/{shared-BoBnM5kM.mjs → shared-CestGDpq.mjs} +30 -20
- package/dist/.setup/{subagent-hooks-HH8Uy9cx.mjs → subagent-hooks-CME7dSGf.mjs} +5 -10
- package/dist/.setup/{system-events-Cwxaww8i.mjs → system-events-BwwSDCw4.mjs} +2 -2
- package/dist/.setup/target-parsing-C-HyNxcE.mjs +48 -0
- package/dist/.setup/{target-resolver-CSFoPQ12.mjs → target-resolver-Bse8fuTi.mjs} +11 -27
- package/dist/.setup/targets-DZJjkzwv.mjs +3 -0
- package/dist/.setup/{thread-bindings-DjQCkmsd.mjs → thread-bindings-0hPTSK14.mjs} +61 -52
- package/dist/.setup/{thread-bindings.manager-D2-GYZ5s.mjs → thread-bindings.manager-CdNa6UIs.mjs} +138 -211
- package/dist/.setup/{thread-bindings.session-updates-Bu_CGr_O.mjs → thread-bindings.session-updates-DGSljVf6.mjs} +60 -99
- package/dist/.setup/threading-BKe3E3tp.mjs +246 -0
- package/dist/.setup/{timeouts-pun7VJ02.mjs → timeouts-CuNARfyw.mjs} +10 -18
- package/dist/.setup/{transcripts-source-CaZQnGRH.mjs → transcripts-source-0qQYVu2H.mjs} +50 -368
- package/dist/.setup/{voice-runtime-DDymtIw8.mjs → voice-runtime-QlZJ4sHv.mjs} +166 -322
- package/dist/account-inspect-api.js +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/activities-api.js +77 -120
- package/dist/api.js +19 -18
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/runtime-api.js +21 -20
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/src/voice/audio-worker.runtime.js +38 -57
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/crypto.d.ts +2 -2
- package/node_modules/@types/node/dgram.d.ts +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/zlib.d.ts +6 -0
- package/node_modules/@types/ws/README.md +1 -1
- package/node_modules/@types/ws/index.d.mts +4 -0
- package/node_modules/@types/ws/index.d.ts +4 -0
- package/node_modules/@types/ws/package.json +3 -3
- package/node_modules/discord-api-types/_generated_/rest/v10/interfaces.d.ts +21 -0
- package/node_modules/discord-api-types/_generated_/rest/v10/interfaces.d.ts.map +1 -1
- package/node_modules/discord-api-types/_generated_/rest/v9/interfaces.d.ts +21 -0
- package/node_modules/discord-api-types/_generated_/rest/v9/interfaces.d.ts.map +1 -1
- package/node_modules/discord-api-types/globals.d.ts +6 -0
- package/node_modules/discord-api-types/globals.d.ts.map +1 -1
- package/node_modules/discord-api-types/globals.js +6 -0
- package/node_modules/discord-api-types/globals.js.map +1 -1
- package/node_modules/discord-api-types/package.json +3 -3
- package/node_modules/discord-api-types/payloads/index.mjs +1 -0
- package/node_modules/discord-api-types/payloads/v10/applicationIdentityProfile.d.ts +207 -0
- package/node_modules/discord-api-types/payloads/v10/applicationIdentityProfile.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/applicationIdentityProfile.js +25 -0
- package/node_modules/discord-api-types/payloads/v10/applicationIdentityProfile.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/autoModeration.d.ts +1 -1
- package/node_modules/discord-api-types/payloads/v10/autoModeration.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/guild.d.ts +27 -23
- package/node_modules/discord-api-types/payloads/v10/guild.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/guild.js +26 -22
- package/node_modules/discord-api-types/payloads/v10/guild.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/index.d.ts +1 -0
- package/node_modules/discord-api-types/payloads/v10/index.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/index.js +1 -0
- package/node_modules/discord-api-types/payloads/v10/index.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/index.mjs +1 -0
- package/node_modules/discord-api-types/payloads/v9/applicationIdentityProfile.d.ts +207 -0
- package/node_modules/discord-api-types/payloads/v9/applicationIdentityProfile.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/applicationIdentityProfile.js +25 -0
- package/node_modules/discord-api-types/payloads/v9/applicationIdentityProfile.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/autoModeration.d.ts +1 -1
- package/node_modules/discord-api-types/payloads/v9/autoModeration.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/guild.d.ts +27 -23
- package/node_modules/discord-api-types/payloads/v9/guild.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/guild.js +26 -22
- package/node_modules/discord-api-types/payloads/v9/guild.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/index.d.ts +1 -0
- package/node_modules/discord-api-types/payloads/v9/index.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/index.js +1 -0
- package/node_modules/discord-api-types/payloads/v9/index.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/index.mjs +1 -0
- package/node_modules/discord-api-types/rest/common.d.ts +2 -0
- package/node_modules/discord-api-types/rest/common.d.ts.map +1 -1
- package/node_modules/discord-api-types/rest/common.js +2 -0
- package/node_modules/discord-api-types/rest/common.js.map +1 -1
- package/node_modules/discord-api-types/rest/v10/applicationIdentityProfile.d.ts +70 -0
- package/node_modules/discord-api-types/rest/v10/applicationIdentityProfile.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/applicationIdentityProfile.js +3 -0
- package/node_modules/discord-api-types/rest/v10/applicationIdentityProfile.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/index.d.ts +1 -0
- package/node_modules/discord-api-types/rest/v10/index.d.ts.map +1 -1
- package/node_modules/discord-api-types/rest/v10/index.js +29 -0
- package/node_modules/discord-api-types/rest/v10/index.js.map +1 -1
- package/node_modules/discord-api-types/rest/v10/interactions.d.ts +4 -2
- package/node_modules/discord-api-types/rest/v10/interactions.d.ts.map +1 -1
- package/node_modules/discord-api-types/rest/v10/user.d.ts +2 -2
- package/node_modules/discord-api-types/rest/v10/user.d.ts.map +1 -1
- package/node_modules/discord-api-types/rest/v9/applicationIdentityProfile.d.ts +70 -0
- package/node_modules/discord-api-types/rest/v9/applicationIdentityProfile.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/applicationIdentityProfile.js +3 -0
- package/node_modules/discord-api-types/rest/v9/applicationIdentityProfile.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/index.d.ts +1 -0
- package/node_modules/discord-api-types/rest/v9/index.d.ts.map +1 -1
- package/node_modules/discord-api-types/rest/v9/index.js +29 -0
- package/node_modules/discord-api-types/rest/v9/index.js.map +1 -1
- package/node_modules/discord-api-types/rest/v9/interactions.d.ts +4 -2
- package/node_modules/discord-api-types/rest/v9/interactions.d.ts.map +1 -1
- package/node_modules/discord-api-types/rest/v9/user.d.ts +2 -2
- package/node_modules/discord-api-types/rest/v9/user.d.ts.map +1 -1
- package/node_modules/discord-api-types/v10.mjs +1 -0
- package/node_modules/discord-api-types/v9.mjs +1 -0
- package/node_modules/micromark/dev/lib/compile.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/compile.js +14 -4
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/create-tokenizer.js +7 -6
- package/node_modules/micromark/dev/lib/initialize/document.js +25 -21
- package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/initialize/text.js +10 -6
- package/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/preprocess.js +19 -21
- package/node_modules/micromark/lib/compile.d.ts.map +1 -1
- package/node_modules/micromark/lib/compile.js +37 -29
- package/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -1
- package/node_modules/micromark/lib/create-tokenizer.js +37 -35
- package/node_modules/micromark/lib/initialize/document.js +21 -13
- package/node_modules/micromark/lib/initialize/text.d.ts.map +1 -1
- package/node_modules/micromark/lib/initialize/text.js +7 -3
- package/node_modules/micromark/lib/preprocess.d.ts.map +1 -1
- package/node_modules/micromark/lib/preprocess.js +16 -19
- package/node_modules/micromark/package.json +2 -15
- package/node_modules/micromark-core-commonmark/dev/lib/attention.js +18 -24
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +1 -43
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +19 -43
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +2 -6
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +2 -53
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +14 -12
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +14 -5
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +14 -5
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.js +67 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +8 -5
- package/node_modules/micromark-core-commonmark/lib/attention.js +14 -24
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/code-fenced.js +1 -39
- package/node_modules/micromark-core-commonmark/lib/code-indented.js +11 -29
- package/node_modules/micromark-core-commonmark/lib/heading-atx.js +2 -6
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/html-flow.js +2 -51
- package/node_modules/micromark-core-commonmark/lib/label-end.js +11 -10
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/label-start-image.js +11 -3
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/label-start-link.js +11 -3
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js +61 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/setext-underline.js +7 -5
- package/node_modules/micromark-core-commonmark/package.json +4 -16
- package/node_modules/micromark-factory-space/dev/index.d.ts +24 -1
- package/node_modules/micromark-factory-space/dev/index.d.ts.map +1 -1
- package/node_modules/micromark-factory-space/dev/index.js +58 -3
- package/node_modules/micromark-factory-space/index.d.ts +24 -1
- package/node_modules/micromark-factory-space/index.d.ts.map +1 -1
- package/node_modules/micromark-factory-space/index.js +55 -3
- package/node_modules/micromark-factory-space/package.json +1 -10
- package/node_modules/micromark-factory-space/readme.md +25 -25
- package/node_modules/micromark-util-edit-map/dev/index.d.ts +78 -0
- package/node_modules/micromark-util-edit-map/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-edit-map/dev/index.js +237 -0
- package/node_modules/micromark-util-edit-map/index.d.ts +78 -0
- package/node_modules/micromark-util-edit-map/index.d.ts.map +1 -0
- package/node_modules/micromark-util-edit-map/index.js +225 -0
- package/node_modules/micromark-util-edit-map/license +22 -0
- package/node_modules/micromark-util-edit-map/package.json +48 -0
- package/node_modules/micromark-util-edit-map/readme.md +234 -0
- package/node_modules/micromark-util-types/index.d.ts +6 -3
- package/node_modules/micromark-util-types/package.json +2 -36
- package/node_modules/ws/lib/websocket.js +17 -3
- package/node_modules/ws/package.json +1 -1
- package/openclaw.plugin.json +3 -6
- package/package.json +7 -12
- package/dist/.setup/account-inspect-DsER5ILV.mjs +0 -45
- package/dist/.setup/provider.runtime-CZ51OIgD.mjs +0 -2
- package/dist/.setup/resolve-allowlist-common-BUyU3C-T.mjs +0 -27
- package/dist/.setup/resolve-channels-DA6QlhZN.mjs +0 -246
- package/dist/.setup/security-contract-DSHk7I2w.mjs +0 -26
- package/dist/.setup/setup-plugin-api-BVlCz3fm.mjs +0 -3
- package/dist/.setup/targets-bqXQENmX.mjs +0 -3
- package/dist/control-ui/2afbdab1d3aa65a789d8a3eba666f4b1ec5df07073538fe30d6cf32093a1fb2d/index.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as inspectDiscordAccount } from "./.setup/account-inspect-
|
|
1
|
+
import { t as inspectDiscordAccount } from "./.setup/account-inspect-8cCu6uPG.mjs";
|
|
2
2
|
//#region extensions/discord/account-inspect-api.ts
|
|
3
3
|
function inspectDiscordReadOnlyAccount(cfg, accountId) {
|
|
4
4
|
return inspectDiscordAccount({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleDiscordAction } from "./.setup/runtime-
|
|
1
|
+
import { t as handleDiscordAction } from "./.setup/runtime-CRTkKU1G.mjs";
|
|
2
2
|
export { handleDiscordAction };
|
package/dist/activities-api.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as getDiscordEndpointRuntime } from "./.setup/allow-list-
|
|
3
|
-
import {
|
|
4
|
-
import { S as parseDiscordActivityCustomId, i as buildDiscordPresentationComponents } from "./.setup/components-
|
|
5
|
-
import { r as sendDiscordComponentMessage } from "./.setup/send.components-
|
|
6
|
-
import { r as setDiscordActivitiesRuntime, t as DiscordActivitiesRuntime } from "./.setup/runtime-
|
|
7
|
-
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
1
|
+
import { l as resolveDiscordAccount } from "./.setup/accounts-ljrzXBJi.mjs";
|
|
2
|
+
import { D as getDiscordEndpointRuntime } from "./.setup/allow-list-B_ToXtew.mjs";
|
|
3
|
+
import { n as resolveDiscordChannelId$1 } from "./.setup/target-parsing-C-HyNxcE.mjs";
|
|
4
|
+
import { S as parseDiscordActivityCustomId, i as buildDiscordPresentationComponents } from "./.setup/components-HN9052L1.mjs";
|
|
5
|
+
import { r as sendDiscordComponentMessage } from "./.setup/send.components-FxOS3CeP.mjs";
|
|
6
|
+
import { r as setDiscordActivitiesRuntime, t as DiscordActivitiesRuntime } from "./.setup/runtime-DPm3gZXk.mjs";
|
|
7
|
+
import { asOptionalRecord, normalizeBoundedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { randomBytes } from "node:crypto";
|
|
9
9
|
import { fetchWithSsrFGuard as fetchWithSsrFGuard$1 } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
10
10
|
import { logError } from "openclaw/plugin-sdk/logging-core";
|
|
@@ -13,6 +13,7 @@ import fs from "node:fs/promises";
|
|
|
13
13
|
import { resolveRequestClientIp } from "openclaw/plugin-sdk/webhook-ingress";
|
|
14
14
|
import { WEBHOOK_BODY_READ_DEFAULTS, readJsonBodyWithLimit, sendHttpRequestRejection } from "openclaw/plugin-sdk/webhook-request-guards";
|
|
15
15
|
import { WIDGET_CDN_ORIGINS } from "openclaw/plugin-sdk/widget-html";
|
|
16
|
+
import { containsAsciiControlCharacter } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
16
17
|
//#region extensions/discord/src/activities/discord-api.ts
|
|
17
18
|
const DISCORD_TOKEN_URL = "https://discord.com/api/oauth2/token";
|
|
18
19
|
const DISCORD_USER_URL = "https://discord.com/api/v10/users/@me";
|
|
@@ -21,13 +22,8 @@ const DISCORD_ACTIVITY_REQUEST_TIMEOUT_MS = 15e3;
|
|
|
21
22
|
const JSON_MAX_BYTES = 65536;
|
|
22
23
|
const INSTANCE_ID_MAX_LENGTH = 256;
|
|
23
24
|
function normalizeInstanceId(value) {
|
|
24
|
-
const instanceId = value
|
|
25
|
-
|
|
26
|
-
for (let index = 0; index < instanceId.length; index += 1) {
|
|
27
|
-
const codePoint = instanceId.charCodeAt(index);
|
|
28
|
-
if (codePoint < 32 || codePoint === 127) return;
|
|
29
|
-
}
|
|
30
|
-
return instanceId;
|
|
25
|
+
const instanceId = normalizeBoundedOptionalString(value, INSTANCE_ID_MAX_LENGTH);
|
|
26
|
+
return instanceId && !containsAsciiControlCharacter(instanceId) ? instanceId : void 0;
|
|
31
27
|
}
|
|
32
28
|
async function fetchDiscordJson(params) {
|
|
33
29
|
const endpoint = Object.hasOwn(params, "endpointRuntime") ? params.endpointRuntime : getDiscordEndpointRuntime();
|
|
@@ -99,19 +95,17 @@ var TokenRateLimiter = class {
|
|
|
99
95
|
allowKey(key) {
|
|
100
96
|
const now = this.now();
|
|
101
97
|
const active = (this.attempts.get(key) ?? []).filter((timestamp) => timestamp > now - TOKEN_RATE_WINDOW_MS);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this.attempts.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
if (typeof oldestKey === "string") this.attempts.delete(oldestKey);
|
|
98
|
+
const allowed = active.length < TOKEN_RATE_LIMIT;
|
|
99
|
+
if (allowed) {
|
|
100
|
+
if (!this.attempts.has(key) && this.attempts.size >= TOKEN_RATE_MAX_KEYS) {
|
|
101
|
+
const oldestKey = this.attempts.keys().next().value;
|
|
102
|
+
if (typeof oldestKey === "string") this.attempts.delete(oldestKey);
|
|
103
|
+
}
|
|
104
|
+
active.push(now);
|
|
110
105
|
}
|
|
111
|
-
active.push(now);
|
|
112
106
|
this.attempts.delete(key);
|
|
113
107
|
this.attempts.set(key, active);
|
|
114
|
-
return
|
|
108
|
+
return allowed;
|
|
115
109
|
}
|
|
116
110
|
reserveGlobal() {
|
|
117
111
|
const now = this.now();
|
|
@@ -260,14 +254,11 @@ const JSON_CONTENT_TYPE = "application/json; charset=utf-8";
|
|
|
260
254
|
const WIDGET_ID_PATTERN = /^[A-Za-z0-9_-]{22}$/;
|
|
261
255
|
const DOC_TOKEN_PATTERN = /^[A-Za-z0-9_-]{43}$/;
|
|
262
256
|
const DISCORD_ACTIVITY_WIDGET_CSP = `sandbox allow-scripts; default-src 'none'; script-src 'unsafe-inline' ${WIDGET_CDN_ORIGINS.join(" ")}; style-src 'unsafe-inline' ${WIDGET_CDN_ORIGINS.join(" ")}; img-src data: blob:; font-src data: ${WIDGET_CDN_ORIGINS.join(" ")}; connect-src 'none'; frame-ancestors *`;
|
|
263
|
-
function
|
|
257
|
+
function respond(res, statusCode, body, contentType, headers) {
|
|
258
|
+
res.statusCode = statusCode;
|
|
264
259
|
res.setHeader("Cache-Control", "no-store");
|
|
265
260
|
res.setHeader("Referrer-Policy", "no-referrer");
|
|
266
261
|
res.setHeader("X-Content-Type-Options", "nosniff");
|
|
267
|
-
}
|
|
268
|
-
function respond(res, statusCode, body, contentType, headers) {
|
|
269
|
-
res.statusCode = statusCode;
|
|
270
|
-
setCommonHeaders(res);
|
|
271
262
|
res.setHeader("Content-Type", contentType);
|
|
272
263
|
for (const [key, value] of Object.entries(headers ?? {})) res.setHeader(key, value);
|
|
273
264
|
res.end(body);
|
|
@@ -298,10 +289,6 @@ function extractApplicationId(req) {
|
|
|
298
289
|
function bearerToken(req) {
|
|
299
290
|
return ((readHeader(req, "authorization")?.trim())?.match(/^Bearer\s+([A-Za-z0-9_-]{43})$/i))?.[1];
|
|
300
291
|
}
|
|
301
|
-
function widgetIdFromCustomId(customId) {
|
|
302
|
-
if (WIDGET_ID_PATTERN.test(customId)) return customId;
|
|
303
|
-
return parseDiscordActivityCustomId(customId)?.widgetId;
|
|
304
|
-
}
|
|
305
292
|
function createDiscordActivityHttpHandler(deps) {
|
|
306
293
|
const fetchGuard = deps.fetchGuard ?? fetchWithSsrFGuard$1;
|
|
307
294
|
const limiter = new TokenRateLimiter(deps.now ?? Date.now);
|
|
@@ -323,6 +310,12 @@ function createDiscordActivityHttpHandler(deps) {
|
|
|
323
310
|
const account = deps.runtime.resolveHttpAccount(applicationId);
|
|
324
311
|
if (!account) return respondJson(res, 503, { error: "Discord Activities is not fully configured" });
|
|
325
312
|
const endpointRuntime = getDiscordEndpointRuntime() ?? null;
|
|
313
|
+
const fetchAccountJson = (params) => fetchDiscordJson({
|
|
314
|
+
...params,
|
|
315
|
+
fetchGuard,
|
|
316
|
+
fetchImpl: account.proxyFetch,
|
|
317
|
+
endpointRuntime
|
|
318
|
+
}).catch(() => void 0);
|
|
326
319
|
const bodyResult = await readJsonBodyWithLimit(req, {
|
|
327
320
|
maxBytes: BODY_MAX_BYTES,
|
|
328
321
|
timeoutMs: bodyTimeoutMs,
|
|
@@ -341,43 +334,29 @@ function createDiscordActivityHttpHandler(deps) {
|
|
|
341
334
|
if (reservation === null) return respondJson(res, 429, { error: "too many token requests" });
|
|
342
335
|
let completed = false;
|
|
343
336
|
try {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
},
|
|
360
|
-
auditContext: "discord.activities.oauth.token",
|
|
361
|
-
endpointRuntime
|
|
362
|
-
});
|
|
363
|
-
} catch {
|
|
364
|
-
return respondJson(res, 503, { error: "Discord token exchange unavailable" });
|
|
365
|
-
}
|
|
337
|
+
const tokenResponse = await fetchAccountJson({
|
|
338
|
+
url: DISCORD_TOKEN_URL,
|
|
339
|
+
init: {
|
|
340
|
+
method: "POST",
|
|
341
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
342
|
+
body: new URLSearchParams({
|
|
343
|
+
grant_type: "authorization_code",
|
|
344
|
+
client_id: account.applicationId,
|
|
345
|
+
client_secret: account.clientSecret,
|
|
346
|
+
code
|
|
347
|
+
})
|
|
348
|
+
},
|
|
349
|
+
auditContext: "discord.activities.oauth.token"
|
|
350
|
+
});
|
|
351
|
+
if (!tokenResponse) return respondJson(res, 503, { error: "Discord token exchange unavailable" });
|
|
366
352
|
const granted = typeof tokenResponse.body?.access_token === "string" ? tokenResponse.body.access_token.trim() : "";
|
|
367
353
|
if (!tokenResponse.ok || !granted) return respondJson(res, 401, { error: "invalid authorization code" });
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
init: { headers: { Authorization: `Bearer ${granted}` } },
|
|
375
|
-
auditContext: "discord.activities.oauth.user",
|
|
376
|
-
endpointRuntime
|
|
377
|
-
});
|
|
378
|
-
} catch {
|
|
379
|
-
return respondJson(res, 503, { error: "Discord user lookup unavailable" });
|
|
380
|
-
}
|
|
354
|
+
const userResponse = await fetchAccountJson({
|
|
355
|
+
url: DISCORD_USER_URL,
|
|
356
|
+
init: { headers: { Authorization: `Bearer ${granted}` } },
|
|
357
|
+
auditContext: "discord.activities.oauth.user"
|
|
358
|
+
});
|
|
359
|
+
if (!userResponse) return respondJson(res, 503, { error: "Discord user lookup unavailable" });
|
|
381
360
|
const discordUserId = typeof userResponse.body?.id === "string" ? userResponse.body.id : void 0;
|
|
382
361
|
if (!userResponse.ok || !discordUserId) return respondJson(res, 401, { error: "Discord user lookup failed" });
|
|
383
362
|
const minted = await deps.runtime.store.createSession({
|
|
@@ -410,7 +389,7 @@ function createDiscordActivityHttpHandler(deps) {
|
|
|
410
389
|
}) : void 0;
|
|
411
390
|
if (!channelId) return respondJson(res, 404, { error: "widget not found" });
|
|
412
391
|
let resolved = null;
|
|
413
|
-
const requestedWidgetId =
|
|
392
|
+
const requestedWidgetId = WIDGET_ID_PATTERN.test(customId) ? customId : parseDiscordActivityCustomId(customId)?.widgetId;
|
|
414
393
|
if (requestedWidgetId) {
|
|
415
394
|
const widget = await deps.runtime.store.lookupWidget(requestedWidgetId);
|
|
416
395
|
if (widget?.accountId !== session.accountId || widget.channelId !== channelId) return respondJson(res, 404, { error: "widget not found" });
|
|
@@ -457,7 +436,7 @@ function createDiscordActivityHttpHandler(deps) {
|
|
|
457
436
|
if (!widget || widget.accountId !== capability.accountId) return notFound(res, true);
|
|
458
437
|
return respond(res, 200, widget.html, "text/html; charset=utf-8", { "Content-Security-Policy": DISCORD_ACTIVITY_WIDGET_CSP });
|
|
459
438
|
}
|
|
460
|
-
return { async
|
|
439
|
+
return { handleHttpRequest: async (req, res) => {
|
|
461
440
|
const url = new URL(req.url ?? "/", "http://localhost");
|
|
462
441
|
if (url.pathname !== "/discord/activity" && !url.pathname.startsWith(`/discord/activity/`)) return false;
|
|
463
442
|
if (!deps.runtime.hasEnabledAccounts()) return false;
|
|
@@ -491,6 +470,13 @@ function createDiscordActivityHttpHandler(deps) {
|
|
|
491
470
|
//#endregion
|
|
492
471
|
//#region extensions/discord/src/activities/presenter.ts
|
|
493
472
|
const DISCORD_WIDGET_HTML_MAX_BYTES = 49152;
|
|
473
|
+
const unavailable = () => ({
|
|
474
|
+
ok: false,
|
|
475
|
+
error: {
|
|
476
|
+
code: "unavailable",
|
|
477
|
+
message: "Discord Activities are unavailable for the current channel and account."
|
|
478
|
+
}
|
|
479
|
+
});
|
|
494
480
|
function resolveDiscordChannelId(context) {
|
|
495
481
|
const raw = context.nativeChannelId?.trim() || context.currentMessagingTarget?.trim() || context.currentChannelId?.trim() || context.deliveryContext?.to?.trim();
|
|
496
482
|
if (!raw) return;
|
|
@@ -530,23 +516,11 @@ function createDiscordWidgetPresenter(runtime) {
|
|
|
530
516
|
return resolveDiscordPresentationRoute(context, runtime) ? {
|
|
531
517
|
ok: true,
|
|
532
518
|
value: { available: true }
|
|
533
|
-
} :
|
|
534
|
-
ok: false,
|
|
535
|
-
error: {
|
|
536
|
-
code: "unavailable",
|
|
537
|
-
message: "Discord Activities are unavailable for the current channel and account."
|
|
538
|
-
}
|
|
539
|
-
};
|
|
519
|
+
} : unavailable();
|
|
540
520
|
},
|
|
541
521
|
async present({ context, document, title }) {
|
|
542
522
|
const route = resolveDiscordPresentationRoute(context, runtime);
|
|
543
|
-
if (!route) return
|
|
544
|
-
ok: false,
|
|
545
|
-
error: {
|
|
546
|
-
code: "unavailable",
|
|
547
|
-
message: "Discord Activities are unavailable for the current channel and account."
|
|
548
|
-
}
|
|
549
|
-
};
|
|
523
|
+
if (!route) return unavailable();
|
|
550
524
|
if (Array.from(title).length > 80) return {
|
|
551
525
|
ok: false,
|
|
552
526
|
error: {
|
|
@@ -628,31 +602,17 @@ function requireAtomicComparison(store) {
|
|
|
628
602
|
return store;
|
|
629
603
|
}
|
|
630
604
|
function openDiscordActivityStores(openKeyedStore) {
|
|
605
|
+
const openStore = (namespace, maxEntries, defaultTtlMs) => openKeyedStore({
|
|
606
|
+
namespace,
|
|
607
|
+
maxEntries,
|
|
608
|
+
overflowPolicy: "evict-oldest",
|
|
609
|
+
defaultTtlMs
|
|
610
|
+
});
|
|
631
611
|
return {
|
|
632
|
-
widgets: requireAtomicComparison(
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
defaultTtlMs: WIDGET_TTL_MS
|
|
637
|
-
})),
|
|
638
|
-
sessions: openKeyedStore({
|
|
639
|
-
namespace: "activities-sessions",
|
|
640
|
-
maxEntries: 256,
|
|
641
|
-
overflowPolicy: "evict-oldest",
|
|
642
|
-
defaultTtlMs: SESSION_TTL_MS
|
|
643
|
-
}),
|
|
644
|
-
docTokens: openKeyedStore({
|
|
645
|
-
namespace: "activities-doc-tokens",
|
|
646
|
-
maxEntries: 256,
|
|
647
|
-
overflowPolicy: "evict-oldest",
|
|
648
|
-
defaultTtlMs: DOC_TOKEN_TTL_MS
|
|
649
|
-
}),
|
|
650
|
-
launches: requireAtomicComparison(openKeyedStore({
|
|
651
|
-
namespace: "activities-launches",
|
|
652
|
-
maxEntries: 256,
|
|
653
|
-
overflowPolicy: "evict-oldest",
|
|
654
|
-
defaultTtlMs: PENDING_LAUNCH_TTL_MS
|
|
655
|
-
}))
|
|
612
|
+
widgets: requireAtomicComparison(openStore("activities-widgets", 64, WIDGET_TTL_MS)),
|
|
613
|
+
sessions: openStore("activities-sessions", 256, SESSION_TTL_MS),
|
|
614
|
+
docTokens: openStore("activities-doc-tokens", 256, DOC_TOKEN_TTL_MS),
|
|
615
|
+
launches: requireAtomicComparison(openStore("activities-launches", 256, PENDING_LAUNCH_TTL_MS))
|
|
656
616
|
};
|
|
657
617
|
}
|
|
658
618
|
function pendingLaunchKey(accountId, channelId, discordUserId) {
|
|
@@ -666,16 +626,6 @@ async function applyActivityStoreIntent(store, key, intent) {
|
|
|
666
626
|
observed = result.current;
|
|
667
627
|
}
|
|
668
628
|
}
|
|
669
|
-
function pendingLaunchForWidget(existing, widgetId, createdAt) {
|
|
670
|
-
return existing && (existing.state === "ambiguous" || existing.widgetId !== widgetId) ? {
|
|
671
|
-
state: "ambiguous",
|
|
672
|
-
createdAt
|
|
673
|
-
} : {
|
|
674
|
-
state: "single",
|
|
675
|
-
widgetId,
|
|
676
|
-
createdAt
|
|
677
|
-
};
|
|
678
|
-
}
|
|
679
629
|
var DiscordActivityStore = class {
|
|
680
630
|
constructor(stores) {
|
|
681
631
|
this.stores = stores;
|
|
@@ -751,7 +701,14 @@ var DiscordActivityStore = class {
|
|
|
751
701
|
await applyActivityStoreIntent(this.stores.launches, key, (existing) => ({
|
|
752
702
|
operation: "update",
|
|
753
703
|
action: "set",
|
|
754
|
-
value:
|
|
704
|
+
value: existing && (existing.state === "ambiguous" || existing.widgetId !== widgetId) ? {
|
|
705
|
+
state: "ambiguous",
|
|
706
|
+
createdAt
|
|
707
|
+
} : {
|
|
708
|
+
state: "single",
|
|
709
|
+
widgetId,
|
|
710
|
+
createdAt
|
|
711
|
+
}
|
|
755
712
|
}));
|
|
756
713
|
}
|
|
757
714
|
async retirePendingLaunch(accountId, channelId, discordUserId, widgetId) {
|
|
@@ -781,7 +738,7 @@ function registerDiscordActivities(api) {
|
|
|
781
738
|
path: DISCORD_ACTIVITY_ROUTE_PREFIX,
|
|
782
739
|
auth: "plugin",
|
|
783
740
|
match: "prefix",
|
|
784
|
-
handler:
|
|
741
|
+
handler: http.handleHttpRequest
|
|
785
742
|
});
|
|
786
743
|
api.registerWidgetPresenter(createDiscordWidgetPresenter(runtime));
|
|
787
744
|
}
|
package/dist/api.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as inspectDiscordAccount } from "./.setup/account-inspect-
|
|
3
|
-
import { d as normalizeDiscordMessagingTarget, f as normalizeDiscordOutboundTarget, l as looksLikeDiscordTargetId
|
|
4
|
-
import { i as requestDiscord, n as DiscordApiError, r as fetchDiscord } from "./.setup/api-
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import "./.setup/
|
|
8
|
-
import
|
|
9
|
-
import { D as
|
|
10
|
-
import {
|
|
1
|
+
import { c as resolveDefaultDiscordAccountId, d as resolveDiscordAccountConfig, i as listDiscordAccountIds, l as resolveDiscordAccount, m as resolveDiscordMaxLinesPerMessage, o as listEnabledDiscordAccounts, s as mergeDiscordAccountConfig, t as createDiscordActionGate } from "./.setup/accounts-ljrzXBJi.mjs";
|
|
2
|
+
import { t as inspectDiscordAccount } from "./.setup/account-inspect-8cCu6uPG.mjs";
|
|
3
|
+
import { d as normalizeDiscordMessagingTarget, f as normalizeDiscordOutboundTarget, l as looksLikeDiscordTargetId } from "./.setup/send.receipt-BAlzXd8e.mjs";
|
|
4
|
+
import { i as requestDiscord, n as DiscordApiError, r as fetchDiscord } from "./.setup/api-CtmE1OUN.mjs";
|
|
5
|
+
import { n as resolveDiscordChannelId, t as parseDiscordTarget } from "./.setup/target-parsing-C-HyNxcE.mjs";
|
|
6
|
+
import { n as resolveDiscordTarget } from "./.setup/target-resolver-Bse8fuTi.mjs";
|
|
7
|
+
import { i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./.setup/timeouts-CuNARfyw.mjs";
|
|
8
|
+
import "./.setup/targets-DZJjkzwv.mjs";
|
|
9
|
+
import { D as parseDiscordModalCustomIdForInteraction, E as parseDiscordModalCustomId, T as parseDiscordComponentCustomIdForInteraction, _ as DISCORD_COMPONENT_CUSTOM_ID_KEY, b as buildDiscordComponentCustomId, d as buildDiscordComponentMessage, f as buildDiscordComponentMessageFlags, g as resolveDiscordComponentAttachmentName, h as readDiscordComponentSpec, l as DiscordFormModal, n as formatDiscordComponentEventText, p as DISCORD_COMPONENT_ATTACHMENT_PREFIX, r as buildDiscordInteractiveComponents, u as createDiscordFormModal, v as DISCORD_MODAL_CUSTOM_ID_KEY, w as parseDiscordComponentCustomId, x as buildDiscordModalCustomId } from "./.setup/components-HN9052L1.mjs";
|
|
10
|
+
import { D as isDiscordExecApprovalClientEnabled, E as isDiscordExecApprovalApprover, O as shouldSuppressLocalDiscordExecApprovalPrompt, T as getDiscordExecApprovalApprovers } from "./.setup/outbound-session-route-B0Hpwn3Q.mjs";
|
|
11
|
+
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./.setup/channel-DI7DMzu0.mjs";
|
|
11
12
|
import { t as normalizeExplicitDiscordSessionKey } from "./.setup/session-key-normalization-CCHGNSQw.mjs";
|
|
12
|
-
import { t as discordSetupPlugin } from "./.setup/channel.setup-
|
|
13
|
-
import { n as handleDiscordSubagentEnded, t as handleDiscordSubagentDeliveryTarget } from "./.setup/subagent-hooks-
|
|
14
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./.setup/handle-action.guild-admin-
|
|
15
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./.setup/directory-config-
|
|
16
|
-
import { t as fetchPluralKitMessageInfo } from "./.setup/pluralkit-
|
|
17
|
-
import { i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, s as resolveDiscordPrivilegedIntentsFromFlags, t as fetchDiscordApplicationId } from "./.setup/probe-
|
|
18
|
-
import { t as collectDiscordSecurityAuditFindings } from "./.setup/security-audit-
|
|
13
|
+
import { t as discordSetupPlugin } from "./.setup/channel.setup-DdFVN1mr.mjs";
|
|
14
|
+
import { n as handleDiscordSubagentEnded, t as handleDiscordSubagentDeliveryTarget } from "./.setup/subagent-hooks-CME7dSGf.mjs";
|
|
15
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./.setup/handle-action.guild-admin-CHKW6PIs.mjs";
|
|
16
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./.setup/directory-config-3iVub-3m.mjs";
|
|
17
|
+
import { t as fetchPluralKitMessageInfo } from "./.setup/pluralkit-B64dfq_j.mjs";
|
|
18
|
+
import { i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, s as resolveDiscordPrivilegedIntentsFromFlags, t as fetchDiscordApplicationId } from "./.setup/probe-D3P1x4aN.mjs";
|
|
19
|
+
import { t as collectDiscordSecurityAuditFindings } from "./.setup/security-audit-BFT84Uny.mjs";
|
|
19
20
|
import { resolveOpenProviderRuntimeGroupPolicy as resolveDiscordRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
20
21
|
//#region extensions/discord/api.ts
|
|
21
|
-
const handleDiscordMessageAction = async (...args) => (await import("./.setup/handle-action-
|
|
22
|
+
const handleDiscordMessageAction = async (...args) => (await import("./.setup/handle-action-CXH1h1tq.mjs")).handleDiscordMessageAction(...args);
|
|
22
23
|
/**
|
|
23
24
|
* @deprecated Shipped `@openclaw/discord/api` compatibility only. Use native
|
|
24
25
|
* `AbortSignal.any` after filtering optional signals. Removal with the next
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DiscordChannelConfigSchema } from "./.setup/config-schema-
|
|
1
|
+
import { t as DiscordChannelConfigSchema } from "./.setup/config-schema-_uBILpQf.mjs";
|
|
2
2
|
export { DiscordChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordPlugin } from "./.setup/channel-
|
|
1
|
+
import { t as discordPlugin } from "./.setup/channel-DI7DMzu0.mjs";
|
|
2
2
|
export { discordPlugin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./.setup/directory-config-
|
|
1
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./.setup/directory-config-3iVub-3m.mjs";
|
|
2
2
|
//#region extensions/discord/directory-contract-api.ts
|
|
3
3
|
const discordDirectoryContractPlugin = {
|
|
4
4
|
id: "discord",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as DISCORD_COMMAND_DEPLOY_HASH_NAMESPACE, t as DISCORD_COMMAND_DEPLOY_HASH_MAX_ENTRIES } from "./.setup/command-deploy-store-DFkBTViB.mjs";
|
|
2
2
|
import { t as runtime_doctor_migrations_exports } from "./.setup/runtime-doctor-migrations-BPV-R4G9.mjs";
|
|
3
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./.setup/doctor-contract-
|
|
3
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./.setup/doctor-contract-Bwv8EuQ_.mjs";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
//#region extensions/discord/src/monitor/command-deploy-migration.ts
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { b as shouldEmitDiscordReactionNotification, c as resolveDiscordChannelConfig, d as resolveDiscordCommandAuthorized, f as resolveDiscordGuildEntry, i as normalizeDiscordAllowList, l as resolveDiscordChannelConfigWithFallback, o as normalizeDiscordSlug, r as isDiscordGroupAllowedByPolicy, t as allowListMatches, v as resolveDiscordShouldRequireMention, y as resolveGroupDmAllow } from "./.setup/allow-list-
|
|
2
|
-
import { G as unregisterGateway, H as clearGateways, S as hasAllGuildPermissionsDiscord, U as getGateway, W as registerGateway, b as fetchChannelPermissionsDiscord, g as DiscordSendError, w as hasAnyGuildPermissionDiscord, x as fetchMemberGuildPermissionsDiscord } from "./.setup/send.shared-
|
|
3
|
-
import { i as setPresence, n as getPresence, r as presenceCacheSize, t as clearPresences } from "./.setup/presence-cache-
|
|
4
|
-
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./.setup/directory-live-
|
|
5
|
-
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./.setup/send-
|
|
6
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./.setup/send.outbound-
|
|
7
|
-
import { a as isAbortError, c as runDiscordTaskWithTimeout, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as normalizeDiscordInboundWorkerTimeoutMs, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, s as normalizeDiscordListenerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./.setup/timeouts-
|
|
8
|
-
import { c as readDiscordChannelMoveParams, i as requiredGuildPermissionForModerationAction, l as readDiscordParentIdParam, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./.setup/runtime-
|
|
9
|
-
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./.setup/send.components-
|
|
1
|
+
import { b as shouldEmitDiscordReactionNotification, c as resolveDiscordChannelConfig, d as resolveDiscordCommandAuthorized, f as resolveDiscordGuildEntry, i as normalizeDiscordAllowList, l as resolveDiscordChannelConfigWithFallback, o as normalizeDiscordSlug, r as isDiscordGroupAllowedByPolicy, t as allowListMatches, v as resolveDiscordShouldRequireMention, y as resolveGroupDmAllow } from "./.setup/allow-list-B_ToXtew.mjs";
|
|
2
|
+
import { G as unregisterGateway, H as clearGateways, S as hasAllGuildPermissionsDiscord, U as getGateway, W as registerGateway, b as fetchChannelPermissionsDiscord, g as DiscordSendError, w as hasAnyGuildPermissionDiscord, x as fetchMemberGuildPermissionsDiscord } from "./.setup/send.shared-CjQ4jbMA.mjs";
|
|
3
|
+
import { i as setPresence, n as getPresence, r as presenceCacheSize, t as clearPresences } from "./.setup/presence-cache-DCeTsL73.mjs";
|
|
4
|
+
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./.setup/directory-live-DLygQVtW.mjs";
|
|
5
|
+
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./.setup/send-DbILKgcm.mjs";
|
|
6
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./.setup/send.outbound-_jx4Xpd3.mjs";
|
|
7
|
+
import { a as isAbortError, c as runDiscordTaskWithTimeout, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as normalizeDiscordInboundWorkerTimeoutMs, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, s as normalizeDiscordListenerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./.setup/timeouts-CuNARfyw.mjs";
|
|
8
|
+
import { c as readDiscordChannelMoveParams, i as requiredGuildPermissionForModerationAction, l as readDiscordParentIdParam, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./.setup/runtime-CRTkKU1G.mjs";
|
|
9
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./.setup/send.components-FxOS3CeP.mjs";
|
|
10
10
|
import { r as setDiscordRuntime } from "./.setup/runtime-DgnVQ7zW.mjs";
|
|
11
|
-
import { t as resolveDiscordOutboundSessionRoute, v as discordMessageActions } from "./.setup/outbound-session-route-
|
|
12
|
-
import { F as resolveThreadBindingMaxAgeMs, M as resolveThreadBindingIdleTimeoutMs, N as resolveThreadBindingInactivityExpiresAt, P as resolveThreadBindingMaxAgeExpiresAt, r as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./.setup/thread-bindings.session-updates-
|
|
13
|
-
import { t as resolveDiscordChannelAllowlist } from "./.setup/resolve-channels-
|
|
14
|
-
import { t as resolveDiscordUserAllowlist } from "./.setup/resolve-users-
|
|
15
|
-
import { c as resolveThreadBindingPersonaFromRecord, i as createNoopThreadBindingManager, n as getThreadBindingManager, s as resolveThreadBindingPersona, t as createThreadBindingManager } from "./.setup/thread-bindings.manager-
|
|
16
|
-
import { a as autoBindSpawnedDiscordSubagent, c as reconcileAcpThreadBindingsOnStartup, d as resolveDiscordThreadBindingIdleTimeoutMs, f as resolveDiscordThreadBindingMaxAgeMs, l as unbindThreadBindingsBySessionKey, n as resolveThreadBindingIntroText, o as listThreadBindingsBySessionKey, p as resolveThreadBindingsEnabled, r as resolveThreadBindingThreadName, s as listThreadBindingsForAccount, t as formatThreadBindingDurationLabel } from "./.setup/thread-bindings-
|
|
17
|
-
import { i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, s as resolveDiscordPrivilegedIntentsFromFlags, t as fetchDiscordApplicationId } from "./.setup/probe-
|
|
18
|
-
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./.setup/audit-
|
|
19
|
-
import { S as createDiscordNativeCommand,
|
|
20
|
-
import {
|
|
21
|
-
import { t as createDiscordMessageHandler } from "./.setup/message-handler-
|
|
11
|
+
import { t as resolveDiscordOutboundSessionRoute, v as discordMessageActions } from "./.setup/outbound-session-route-B0Hpwn3Q.mjs";
|
|
12
|
+
import { F as resolveThreadBindingMaxAgeMs, M as resolveThreadBindingIdleTimeoutMs, N as resolveThreadBindingInactivityExpiresAt, P as resolveThreadBindingMaxAgeExpiresAt, r as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./.setup/thread-bindings.session-updates-DGSljVf6.mjs";
|
|
13
|
+
import { t as resolveDiscordChannelAllowlist } from "./.setup/resolve-channels-UdT38DzU.mjs";
|
|
14
|
+
import { t as resolveDiscordUserAllowlist } from "./.setup/resolve-users-DnCsrXZ_.mjs";
|
|
15
|
+
import { c as resolveThreadBindingPersonaFromRecord, i as createNoopThreadBindingManager, n as getThreadBindingManager, s as resolveThreadBindingPersona, t as createThreadBindingManager } from "./.setup/thread-bindings.manager-CdNa6UIs.mjs";
|
|
16
|
+
import { a as autoBindSpawnedDiscordSubagent, c as reconcileAcpThreadBindingsOnStartup, d as resolveDiscordThreadBindingIdleTimeoutMs, f as resolveDiscordThreadBindingMaxAgeMs, l as unbindThreadBindingsBySessionKey, n as resolveThreadBindingIntroText, o as listThreadBindingsBySessionKey, p as resolveThreadBindingsEnabled, r as resolveThreadBindingThreadName, s as listThreadBindingsForAccount, t as formatThreadBindingDurationLabel } from "./.setup/thread-bindings-0hPTSK14.mjs";
|
|
17
|
+
import { i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, s as resolveDiscordPrivilegedIntentsFromFlags, t as fetchDiscordApplicationId } from "./.setup/probe-D3P1x4aN.mjs";
|
|
18
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./.setup/audit-zSawfbsN.mjs";
|
|
19
|
+
import { S as createDiscordNativeCommand, a as waitForDiscordGatewayPluginRegistration, i as resolveDiscordGatewayIntents, k as registerDiscordListener, r as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./.setup/provider-D9EzOfG8.mjs";
|
|
20
|
+
import { f as resolveDiscordReplyTarget, g as sanitizeDiscordThreadName } from "./.setup/transcripts-source-0qQYVu2H.mjs";
|
|
21
|
+
import { t as createDiscordMessageHandler } from "./.setup/message-handler-Ii_etru1.mjs";
|
|
22
|
+
import "./.setup/threading-BKe3E3tp.mjs";
|
|
22
23
|
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, DiscordSendError, addRoleDiscord, allowListMatches, auditDiscordChannelPermissions, autoBindSpawnedDiscordSubagent, banMemberDiscord, clearGateways, clearPresences, collectDiscordAuditChannelIds, createChannelDiscord, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, createNoopThreadBindingManager, createScheduledEventDiscord, createThreadBindingManager, createThreadDiscord, deleteChannelDiscord, deleteMessageDiscord, discordMessageActions, editChannelDiscord, editDiscordComponentMessage, editMessageDiscord, fetchChannelInfoDiscord, fetchChannelPermissionsDiscord, fetchDiscordApplicationId, fetchDiscordApplicationSummary, fetchMemberGuildPermissionsDiscord, fetchMemberInfoDiscord, fetchMessageDiscord, fetchReactionsDiscord, fetchRoleInfoDiscord, fetchVoiceStatusDiscord, formatThreadBindingDurationLabel, getGateway, getPresence, getThreadBindingManager, handleDiscordAction, hasAllGuildPermissionsDiscord, hasAnyGuildPermissionDiscord, isAbortError, isDiscordGroupAllowedByPolicy, isDiscordModerationAction, kickMemberDiscord, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadBindingsBySessionKey, listThreadBindingsForAccount, listThreadsDiscord, monitorDiscordProvider, moveChannelDiscord, normalizeDiscordAllowList, normalizeDiscordInboundWorkerTimeoutMs, normalizeDiscordListenerTimeoutMs, normalizeDiscordSlug, parseApplicationIdFromToken, pinMessageDiscord, presenceCacheSize, probeDiscord, reactMessageDiscord, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, readMessagesDiscord, reconcileAcpThreadBindingsOnStartup, registerBuiltDiscordComponentMessage, registerDiscordListener, registerGateway, removeChannelPermissionDiscord, removeOwnReactionsDiscord, removeReactionDiscord, removeRoleDiscord, requiredGuildPermissionForModerationAction, resolveDiscordChannelAllowlist, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordOutboundSessionRoute, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveDiscordUserAllowlist, resolveEventCoverImage, resolveGroupDmAllow, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, runDiscordTaskWithTimeout, sanitizeDiscordThreadName, searchMessagesDiscord, sendDiscordComponentMessage, sendMessageDiscord, sendPollDiscord, sendStickerDiscord, sendTypingDiscord, sendVoiceMessageDiscord, sendWebhookMessageDiscord, setChannelPermissionDiscord, setDiscordRuntime, setPresence, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, shouldEmitDiscordReactionNotification, timeoutMemberDiscord, unbindThreadBindingsBySessionKey, unpinMessageDiscord, unregisterGateway, uploadEmojiDiscord, uploadStickerDiscord, waitForDiscordGatewayPluginRegistration };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./.setup/secret-config-contract-
|
|
1
|
+
import { r as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./.setup/secret-config-contract-CIsH7R3B.mjs";
|
|
2
2
|
export { collectRuntimeConfigAssignments, secretTargetRegistryEntries };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as collectDiscordSecurityAuditFindings } from "./.setup/security-audit-
|
|
1
|
+
import { t as collectDiscordSecurityAuditFindings } from "./.setup/security-audit-BFT84Uny.mjs";
|
|
2
2
|
export { collectDiscordSecurityAuditFindings };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./.setup/security-contract-
|
|
1
|
+
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./.setup/security-contract-DNyyjTZZ.mjs";
|
|
2
2
|
export { collectUnsupportedSecretRefConfigCandidates, unsupportedSecretRefSurfacePatterns };
|
package/dist/setup-entry.js
CHANGED
|
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
|
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-xfOFmxHP.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "discordSetupPlugin"
|
|
9
9
|
}
|
|
10
10
|
});
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordSetupPlugin } from "./.setup/channel.setup-
|
|
1
|
+
import { t as discordSetupPlugin } from "./.setup/channel.setup-DdFVN1mr.mjs";
|
|
2
2
|
export { discordSetupPlugin };
|