@openclaw/discord 2026.8.1-beta.3 → 2026.8.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-DNl-oCEw.js → accounts-CwJQoLjM.js} +87 -162
- package/dist/action-runtime-api.js +1 -1
- package/dist/{activities-api-KCBAmWxD.js → activities-api-CkKcHUB6.js} +14 -12
- package/dist/activities-api.js +1 -1
- package/dist/{allow-list-BDMimASD.js → allow-list-C2JuH-R0.js} +10 -6
- package/dist/{api-DNVbJyEy.js → api-BfmEP6wp.js} +6 -5
- package/dist/api.js +18 -18
- package/dist/{approval-handler.runtime-B12RCYr8.js → approval-handler.runtime-DZM6Kt1Z.js} +30 -106
- package/dist/{audit-Yc7eZDd6.js → audit-DIbQA4VT.js} +8 -7
- package/dist/{channel-cXYzGc4L.js → channel-CarzU3bg.js} +25 -25
- package/dist/{channel-actions.runtime-CODTvo7c.js → channel-actions.runtime-B2wMqeVK.js} +60 -57
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/channel-type-CVLZyGYS.js +7 -0
- package/dist/{channel.setup-CSiwnMgs.js → channel.setup-z_ewMVa9.js} +18 -18
- package/dist/{components-ezGKo_Yh.js → components-gvRA0oaI.js} +33 -29
- package/dist/{config-schema-DC5kDtQ5.js → config-schema-B797-Spt.js} +21 -14
- package/dist/{conversation-binding-route-D6rCQ5S0.js → conversation-binding-route-DPpBRpYI.js} +1 -1
- package/dist/{directory-config-XyCfoqLg.js → directory-config-AA8wQx0D.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-Df0NbFJB.js → directory-live-D_kFz_Fj.js} +4 -4
- package/dist/{doctor-DYY31GrO.js → doctor-QQTOkBfW.js} +5 -5
- package/dist/{doctor-contract-DsWvKIXF.js → doctor-contract-Co5vRCZ6.js} +9 -6
- package/dist/doctor-contract-api.js +4 -3
- package/dist/{handle-action.guild-admin-6Tvvinsa.js → handle-action.guild-admin-Cc88ZGon.js} +9 -5
- package/dist/index.js +1 -1
- package/dist/ingress-identity-BCzfPPYM.js +60 -0
- package/dist/{message-handler-B61q5MOF.js → message-handler-CAeEpqWo.js} +14 -10
- package/dist/{message-handler.preflight-Bzg_Hawz.js → message-handler.preflight-CoKoE3dY.js} +32 -91
- package/dist/{message-handler.process--4_712Ec.js → message-handler.process-cdIJ_fDT.js} +99 -123
- package/dist/{message-utils-BXLLnFl6.js → message-text-C0K4-fkg.js} +41 -34
- package/dist/{outbound-adapter-DxHTOqiN.js → outbound-adapter-Ch0At5Ra.js} +85 -78
- package/dist/{outbound-components-B2PL0ooH.js → outbound-components-Bnt_7x7r.js} +5 -4
- package/dist/outbound-session-route-CzzerX2K.js +668 -0
- package/dist/{owner-access-Bg41VzAf.js → owner-access-yc1sX7Gx.js} +7 -6
- package/dist/{pluralkit-dUl4v1X3.js → pluralkit-B3cUVI7i.js} +2 -2
- package/dist/{probe-BTdtVRwU.js → probe-3ovFAp3b.js} +3 -3
- package/dist/{probe.runtime-Dq5-PRKT.js → probe.runtime-BckHn3cJ.js} +1 -1
- package/dist/{provider-DlK_ynqt.js → provider-CjI8BSzS.js} +511 -342
- package/dist/{provider-session.runtime-CvvphHvs.js → provider-session.runtime-DdKRMcE9.js} +3 -3
- package/dist/provider.runtime-Bo1WbLLr.js +2 -0
- package/dist/{realtime-session.runtime-ysbMG8v7.js → realtime-session.runtime-37IC-p5K.js} +110 -126
- package/dist/{resolve-allowlist-common-DIVXbD1P.js → resolve-allowlist-common-BJ5UZNNT.js} +3 -3
- package/dist/{resolve-channels-CGeUoIqb.js → resolve-channels-BexR2eUn.js} +6 -5
- package/dist/{resolve-users-BtKxLUZv.js → resolve-users-BtXBCH5W.js} +5 -4
- package/dist/{retry-after-DdLPmPoa.js → retry-after-BrLjLUJi.js} +2 -1
- package/dist/{retry-DNsVTeTo.js → retry-t5RcEsPk.js} +237 -15
- package/dist/{runtime-CQovMsH3.js → runtime-BNlDfLwS.js} +2 -2
- package/dist/{runtime-D71_VFLr.js → runtime-DydyfxST.js} +182 -131
- package/dist/runtime-api.js +19 -26
- 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-rQIffSYu.js → send-mTKSBdmZ.js} +149 -58
- package/dist/{send.components-ChK1wS7w.js → send.components-nsPnc7kK.js} +29 -30
- package/dist/{send.outbound-HIkgji_7.js → send.outbound-CaOs9Zy1.js} +87 -84
- package/dist/{send.shared-B3fpaLWJ.js → send.shared-BJHt0Vyf.js} +55 -33
- package/dist/{sender-identity-BJtfyise.js → sender-identity-Dt0imZyY.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-CaAaoksy.js → shared-BNesVA4P.js} +43 -18
- package/dist/{subagent-hooks-CNT2ZJTJ.js → subagent-hooks-IeZVPLGj.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -6
- package/dist/{system-events-Nuwoq_au.js → system-events-Be5EJI3b.js} +2 -2
- package/dist/{target-resolver-DIXShHaZ.js → target-resolver-C0MnwEki.js} +6 -5
- package/dist/targets-DQSye1Rv.js +3 -0
- package/dist/{thread-bindings-VlymUnbz.js → thread-bindings-wECUSIIG.js} +6 -6
- package/dist/{thread-bindings.manager-CngsgErq.js → thread-bindings.manager-B-3UHCc1.js} +31 -32
- package/dist/{thread-bindings.session-updates-CJb-BpPL.js → thread-bindings.session-updates-CC7HoQvt.js} +2 -1
- package/dist/{threading-DU6pgeGm.js → threading-te5ADPQI.js} +51 -27
- package/dist/{timeouts-B9cy6RvQ.js → timeouts-D86uWLt_.js} +1 -1
- package/dist/{transcripts-source-DeIMNbRh.js → transcripts-source-DkUhR7YK.js} +9 -4
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-oLiS5Z13.js → typing-DAwJF5VT.js} +2 -2
- package/dist/{voice-runtime-CjNFaynA.js → voice-runtime-COyYYTDD.js} +418 -74
- 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/@discord/embedded-app-sdk/node_modules/uuid/README.md +19 -19
- package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v1.js +7 -3
- package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v7.js +5 -2
- package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v1.js +7 -3
- package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v7.js +5 -2
- package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/package.json +4 -3
- package/node_modules/@discordjs/voice/node_modules/@types/node/README.md +1 -1
- package/node_modules/@discordjs/voice/node_modules/@types/node/child_process.d.ts +0 -1
- package/node_modules/@discordjs/voice/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@discordjs/voice/node_modules/@types/node/dns/promises.d.ts +5 -5
- package/node_modules/@discordjs/voice/node_modules/@types/node/dns.d.ts +5 -5
- package/node_modules/@discordjs/voice/node_modules/@types/node/fs.d.ts +7 -0
- package/node_modules/@discordjs/voice/node_modules/@types/node/http.d.ts +30 -0
- package/node_modules/@discordjs/voice/node_modules/@types/node/http2.d.ts +4 -4
- package/node_modules/@discordjs/voice/node_modules/@types/node/os.d.ts +30 -30
- package/node_modules/@discordjs/voice/node_modules/@types/node/package.json +2 -2
- package/node_modules/@discordjs/voice/node_modules/@types/node/perf_hooks.d.ts +2 -1
- package/node_modules/@discordjs/voice/node_modules/@types/node/process.d.ts +42 -43
- package/node_modules/@discordjs/voice/node_modules/@types/node/quic.d.ts +1049 -84
- package/node_modules/@discordjs/voice/node_modules/@types/node/sqlite.d.ts +14 -1
- package/node_modules/@discordjs/voice/node_modules/@types/node/stream/iter.d.ts +3 -2
- package/node_modules/@discordjs/voice/node_modules/@types/node/test.d.ts +61 -0
- package/node_modules/@discordjs/voice/node_modules/@types/node/v8.d.ts +20 -23
- package/node_modules/discord-api-types/CHANGELOG.md +8 -0
- package/node_modules/discord-api-types/package.json +4 -4
- package/node_modules/discord-api-types/payloads/v10/channel.d.ts +2 -2
- package/node_modules/discord-api-types/payloads/v10/channel.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/gateway.d.ts +4 -0
- package/node_modules/discord-api-types/payloads/v10/gateway.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/gateway.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/message.d.ts +4 -1
- package/node_modules/discord-api-types/payloads/v10/message.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/message.js +1 -0
- package/node_modules/discord-api-types/payloads/v10/message.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/channel.d.ts +2 -2
- package/node_modules/discord-api-types/payloads/v9/channel.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/gateway.d.ts +4 -0
- package/node_modules/discord-api-types/payloads/v9/gateway.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/gateway.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/message.d.ts +4 -1
- package/node_modules/discord-api-types/payloads/v9/message.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/message.js +1 -0
- package/node_modules/discord-api-types/payloads/v9/message.js.map +1 -1
- package/node_modules/typebox/build/format/date.d.mts +1 -1
- package/node_modules/typebox/build/format/date.mjs +1 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -2
- package/node_modules/typebox/build/format/date_time.mjs +3 -3
- package/node_modules/typebox/build/format/email.d.mts +1 -1
- package/node_modules/typebox/build/format/email.mjs +2 -2
- package/node_modules/typebox/build/format/hostname.mjs +2 -10
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_email.mjs +3 -3
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
- package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
- package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
- package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +41 -0
- package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
- package/node_modules/typebox/build/format/idna/index.mjs +2 -0
- package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
- package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
- package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
- package/node_modules/typebox/build/format/ipv4.mjs +2 -32
- package/node_modules/typebox/build/format/ipv6.mjs +2 -61
- package/node_modules/typebox/build/format/iri.d.mts +2 -2
- package/node_modules/typebox/build/format/iri.mjs +26 -8
- package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
- package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
- package/node_modules/typebox/build/format/regex.d.mts +1 -2
- package/node_modules/typebox/build/format/regex.mjs +2 -6
- package/node_modules/typebox/build/format/time.d.mts +2 -2
- package/node_modules/typebox/build/format/time.mjs +19 -14
- package/node_modules/typebox/build/format/uri.d.mts +1 -1
- package/node_modules/typebox/build/format/uri.mjs +3 -130
- package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
- package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
- package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
- package/node_modules/typebox/build/format/uri_template.mjs +4 -5
- package/node_modules/typebox/build/format/url.d.mts +3 -3
- package/node_modules/typebox/build/format/url.mjs +4 -5
- package/node_modules/typebox/build/guard/emit.d.mts +3 -1
- package/node_modules/typebox/build/guard/emit.mjs +12 -5
- package/node_modules/typebox/build/guard/guard.d.mts +8 -2
- package/node_modules/typebox/build/guard/guard.mjs +25 -4
- package/node_modules/typebox/build/guard/string.d.mts +2 -2
- package/node_modules/typebox/build/guard/string.mjs +7 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
- package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
- package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
- package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
- package/node_modules/typebox/build/schema/types/index.mjs +0 -2
- package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
- package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
- package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
- package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
- package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
- package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
- package/node_modules/typebox/build/type/script/parser.mjs +27 -23
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/package.json +27 -27
- package/node_modules/typebox/readme.md +79 -82
- package/node_modules/undici/docs/docs/api/Client.md +21 -8
- package/node_modules/undici/lib/api/readable.js +33 -43
- package/node_modules/undici/lib/core/connect.js +16 -2
- package/node_modules/undici/lib/core/symbols.js +1 -0
- package/node_modules/undici/lib/dispatcher/client-h1.js +3 -3
- package/node_modules/undici/lib/dispatcher/client-h2.js +179 -10
- package/node_modules/undici/lib/dispatcher/client.js +74 -29
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +28 -6
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +15 -1
- package/node_modules/undici/lib/handler/retry-handler.js +7 -2
- package/node_modules/undici/lib/interceptor/cache.js +5 -2
- package/node_modules/undici/lib/interceptor/deduplicate.js +1 -1
- package/node_modules/undici/lib/mock/mock-utils.js +213 -24
- package/node_modules/undici/lib/util/cache.js +2 -4
- package/node_modules/undici/lib/web/websocket/websocket.js +22 -0
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/client.d.ts +40 -0
- package/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/ws/package.json +1 -1
- package/openclaw.plugin.json +14 -6
- package/package.json +8 -8
- package/skills/discord/SKILL.md +1 -1
- package/dist/account-inspect-D5xmUpnj.js +0 -89
- package/dist/approval-message-safety-XGFPbDoI.js +0 -226
- package/dist/audit-core-BCX8UeFH.js +0 -105
- package/dist/channel-actions-Dr2QI8Bf.js +0 -212
- package/dist/inbound-event-delivery-De2qxTrP.js +0 -39
- package/dist/provider.runtime-CzKGRiAF.js +0 -2
- package/dist/runtime-api.actions.js +0 -3
- package/dist/runtime-api.lookup.js +0 -7
- package/dist/runtime-api.monitor-CzeTYF32.js +0 -6
- package/dist/runtime-api.monitor.js +0 -9
- package/dist/runtime-api.send.js +0 -7
- package/dist/runtime-api.threads.js +0 -5
- package/dist/sdk-runtime-37OU6_Yh.js +0 -369
- package/dist/send.reactions-gmJ6yFPo.js +0 -78
- package/dist/send.receipt-Cnhoautb.js +0 -76
- package/dist/subagent-progress-FPLqBY1s.js +0 -110
- package/dist/targets-B2pf49zc.js +0 -3
- package/node_modules/typebox/build/format/_idna.d.mts +0 -2
- package/node_modules/typebox/build/format/_idna.mjs +0 -246
- package/node_modules/typebox/build/format/_puny.d.mts +0 -1
- package/node_modules/typebox/build/format/_puny.mjs +0 -77
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
- package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as resolveDiscordAccount, m as normalizeDiscordToken, o as mergeDiscordAccountConfig } from "./accounts-
|
|
3
|
-
import { t as parseAndResolveDiscordTarget } from "./target-resolver-
|
|
1
|
+
import { At as getChannel, J as Embed, Jt as getGuildMember, K as hasDiscordV2Components, Mt as getThreadMember, P as RequestClient, a as chunkDiscordTextWithMode, bt as getCurrentUser, d as resolveDiscordReplyMessageId, n as createDiscordRetryRunner, q as serializePayload, qt as getGuild, wt as createChannelMessage, yt as createUserDmChannel } from "./retry-t5RcEsPk.js";
|
|
2
|
+
import { c as resolveDiscordAccount, m as normalizeDiscordToken, o as mergeDiscordAccountConfig } from "./accounts-CwJQoLjM.js";
|
|
3
|
+
import { t as parseAndResolveDiscordTarget } from "./target-resolver-C0MnwEki.js";
|
|
4
|
+
import { t as isDiscordThreadChannelType } from "./channel-type-CVLZyGYS.js";
|
|
4
5
|
import { ChannelType, MessageFlags, PermissionFlagsBits } from "discord-api-types/v10";
|
|
5
6
|
import { randomBytes } from "node:crypto";
|
|
6
7
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
7
8
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
8
9
|
import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
10
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
11
|
+
import { resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload";
|
|
10
12
|
import { makeProxyFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
11
13
|
import { danger } from "openclaw/plugin-sdk/runtime-env";
|
|
12
14
|
import { PollLayoutType } from "discord-api-types/payloads/v10";
|
|
13
15
|
import { buildOutboundMediaLoadOptions, extensionForMime, normalizePollDurationHours, normalizePollInput } from "openclaw/plugin-sdk/media-runtime";
|
|
14
|
-
import { resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload";
|
|
15
16
|
import { loadWebMedia } from "openclaw/plugin-sdk/web-media";
|
|
16
17
|
//#region extensions/discord/src/recipient-resolution.ts
|
|
17
18
|
async function parseAndResolveRecipient(raw, cfg, accountId, parseOptions = {}) {
|
|
18
19
|
if (!cfg) throw new Error("Discord recipient resolution requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
|
|
19
20
|
const resolvedCfg = requireRuntimeConfig(cfg, "Discord recipient resolution");
|
|
21
|
+
const accountInfo = resolveDiscordAccount({
|
|
22
|
+
cfg: resolvedCfg,
|
|
23
|
+
accountId
|
|
24
|
+
});
|
|
20
25
|
const resolved = await parseAndResolveDiscordTarget(raw, {
|
|
21
26
|
cfg: resolvedCfg,
|
|
22
|
-
accountId:
|
|
23
|
-
cfg: resolvedCfg,
|
|
24
|
-
accountId
|
|
25
|
-
}).accountId
|
|
27
|
+
accountId: accountInfo.accountId
|
|
26
28
|
}, parseOptions);
|
|
27
29
|
return {
|
|
28
30
|
kind: resolved.kind,
|
|
@@ -30,7 +32,15 @@ async function parseAndResolveRecipient(raw, cfg, accountId, parseOptions = {})
|
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
34
|
async function parseAndResolveChannelRecipient(raw, cfg, accountId) {
|
|
33
|
-
|
|
35
|
+
const resolvedCfg = requireRuntimeConfig(cfg, "Discord recipient resolution");
|
|
36
|
+
const resolved = await parseAndResolveDiscordTarget(raw, {
|
|
37
|
+
cfg: resolvedCfg,
|
|
38
|
+
accountId
|
|
39
|
+
}, { defaultKind: "channel" });
|
|
40
|
+
return {
|
|
41
|
+
kind: resolved.kind,
|
|
42
|
+
id: resolved.id
|
|
43
|
+
};
|
|
34
44
|
}
|
|
35
45
|
//#endregion
|
|
36
46
|
//#region extensions/discord/src/monitor/gateway-registry.ts
|
|
@@ -181,7 +191,11 @@ function createDiscordRestClient(opts) {
|
|
|
181
191
|
};
|
|
182
192
|
}
|
|
183
193
|
function createDiscordClient(opts) {
|
|
184
|
-
const { token, rest, account } = createDiscordRestClient(opts);
|
|
194
|
+
const { token, rest, account: restAccount } = createDiscordRestClient(opts);
|
|
195
|
+
const account = normalizeDiscordToken(opts.token, "channels.discord.token") ? resolveDiscordAccount({
|
|
196
|
+
cfg: opts.cfg,
|
|
197
|
+
accountId: opts.accountId
|
|
198
|
+
}) : restAccount;
|
|
185
199
|
return {
|
|
186
200
|
token,
|
|
187
201
|
rest,
|
|
@@ -189,10 +203,11 @@ function createDiscordClient(opts) {
|
|
|
189
203
|
retry: opts.retry,
|
|
190
204
|
verbose: opts.verbose,
|
|
191
205
|
isGatewayDisconnected: () => {
|
|
192
|
-
const gateway = getGateway(
|
|
206
|
+
const gateway = getGateway(restAccount.accountId);
|
|
193
207
|
return gateway !== void 0 && !gateway.isConnected;
|
|
194
208
|
}
|
|
195
|
-
})
|
|
209
|
+
}),
|
|
210
|
+
account
|
|
196
211
|
};
|
|
197
212
|
}
|
|
198
213
|
function resolveDiscordRest(opts) {
|
|
@@ -273,9 +288,6 @@ function hasAdministrator(bitfield) {
|
|
|
273
288
|
function hasPermissionBit(bitfield, permission) {
|
|
274
289
|
return (bitfield & permission) === permission;
|
|
275
290
|
}
|
|
276
|
-
function isThreadChannelType(channelType) {
|
|
277
|
-
return channelType === ChannelType.GuildNewsThread || channelType === ChannelType.GuildPublicThread || channelType === ChannelType.GuildPrivateThread;
|
|
278
|
-
}
|
|
279
291
|
async function fetchBotUserId(rest) {
|
|
280
292
|
const me = await getCurrentUser(rest);
|
|
281
293
|
if (!me?.id) throw new Error("Failed to resolve bot user id");
|
|
@@ -330,7 +342,7 @@ function resolveMemberChannelPermissionBits(params) {
|
|
|
330
342
|
async function resolveChannelPermissionSubject(rest, channel) {
|
|
331
343
|
const channelType = "type" in channel ? channel.type : void 0;
|
|
332
344
|
const parentId = "parent_id" in channel ? channel.parent_id : void 0;
|
|
333
|
-
if (
|
|
345
|
+
if (isDiscordThreadChannelType(channelType) && parentId) return await getChannel(rest, parentId);
|
|
334
346
|
return channel;
|
|
335
347
|
}
|
|
336
348
|
/**
|
|
@@ -365,7 +377,7 @@ async function canViewDiscordGuildChannel(guildId, channelId, userId, opts) {
|
|
|
365
377
|
channel: permissionChannel
|
|
366
378
|
});
|
|
367
379
|
if (!hasPermissionBit(permissions, PermissionFlagsBits.ViewChannel)) return false;
|
|
368
|
-
if ("type" in channel && channel.type === ChannelType.
|
|
380
|
+
if ("type" in channel && channel.type === ChannelType.PrivateThread) {
|
|
369
381
|
if (hasPermissionBit(permissions, PermissionFlagsBits.ManageThreads)) return true;
|
|
370
382
|
await getThreadMember(rest, channel.id, userId);
|
|
371
383
|
}
|
|
@@ -502,9 +514,9 @@ var DiscordSendError = class extends Error {
|
|
|
502
514
|
return this.message;
|
|
503
515
|
}
|
|
504
516
|
};
|
|
505
|
-
const DISCORD_MAX_EMOJI_BYTES =
|
|
506
|
-
const DISCORD_MAX_STICKER_BYTES =
|
|
507
|
-
const DISCORD_MAX_EVENT_COVER_BYTES =
|
|
517
|
+
const DISCORD_MAX_EMOJI_BYTES = 262144;
|
|
518
|
+
const DISCORD_MAX_STICKER_BYTES = 524288;
|
|
519
|
+
const DISCORD_MAX_EVENT_COVER_BYTES = 8388608;
|
|
508
520
|
//#endregion
|
|
509
521
|
//#region extensions/discord/src/send.shared.ts
|
|
510
522
|
const DISCORD_TEXT_LIMIT = 2e3;
|
|
@@ -586,14 +598,14 @@ async function buildDiscordSendError(err, ctx) {
|
|
|
586
598
|
probedChannelType = permissions.channelType;
|
|
587
599
|
const current = new Set(permissions.permissions);
|
|
588
600
|
const required = ["ViewChannel", "SendMessages"];
|
|
589
|
-
if (
|
|
601
|
+
if (isDiscordThreadChannelType(probedChannelType)) required.push("SendMessagesInThreads");
|
|
590
602
|
if (ctx.hasMedia) required.push("AttachFiles");
|
|
591
603
|
missing = required.filter((permission) => !current.has(permission));
|
|
592
604
|
} catch {}
|
|
593
605
|
const status = getDiscordErrorStatus(err);
|
|
594
606
|
const apiDetails = [`code=${code}`, status != null ? `status=${status}` : void 0].filter(Boolean).join(" ");
|
|
595
607
|
const probedPermissions = ["ViewChannel", "SendMessages"];
|
|
596
|
-
if (
|
|
608
|
+
if (isDiscordThreadChannelType(probedChannelType)) probedPermissions.push("SendMessagesInThreads");
|
|
597
609
|
if (ctx.hasMedia) probedPermissions.push("AttachFiles");
|
|
598
610
|
const probeSummary = probedPermissions.join("/");
|
|
599
611
|
return new DiscordSendError(`${missing.length ? `discord missing permissions in channel ${ctx.channelId}: ${missing.join(", ")}` : `discord missing permissions in channel ${ctx.channelId}; permission probe did not identify missing ${probeSummary}`} (${apiDetails}). bot might be blocked by channel/thread overrides, archived thread state, reply target visibility, or app-role position`, {
|
|
@@ -627,14 +639,15 @@ async function resolveDiscordChannel(rest, channelId) {
|
|
|
627
639
|
}
|
|
628
640
|
function buildDiscordTextChunks(text, opts = {}) {
|
|
629
641
|
if (!text) return [];
|
|
630
|
-
|
|
642
|
+
const chunks = chunkDiscordTextWithMode(text, {
|
|
631
643
|
maxChars: opts.maxChars ?? DISCORD_TEXT_LIMIT,
|
|
632
644
|
maxLines: opts.maxLinesPerMessage,
|
|
633
645
|
chunkMode: opts.chunkMode
|
|
634
|
-
})
|
|
646
|
+
});
|
|
647
|
+
return resolveTextChunksWithFallback(text, chunks);
|
|
635
648
|
}
|
|
636
649
|
async function sendDiscordText(params) {
|
|
637
|
-
const { rest, channelId, text, request, reply, maxLinesPerMessage, components, embeds, allowedMentions, chunkMode, silent, suppressEmbeds, maxChars, onResult, onPlatformSendDispatch } = params;
|
|
650
|
+
const { rest, channelId, text, request, reply, maxLinesPerMessage, components, embeds, allowedMentions, chunkMode, silent, suppressEmbeds, maxChars, onResult, onPlatformSendDispatch, assertPlatformSendAuthorized } = params;
|
|
638
651
|
const chunks = buildDiscordTextChunks(text, {
|
|
639
652
|
maxLinesPerMessage,
|
|
640
653
|
chunkMode,
|
|
@@ -667,9 +680,12 @@ async function sendDiscordText(params) {
|
|
|
667
680
|
flags,
|
|
668
681
|
replyTo: chunkReplyTo
|
|
669
682
|
});
|
|
670
|
-
await onPlatformSendDispatch?.();
|
|
671
683
|
return {
|
|
672
|
-
result: await request(() =>
|
|
684
|
+
result: await request(async () => {
|
|
685
|
+
await onPlatformSendDispatch?.();
|
|
686
|
+
assertPlatformSendAuthorized?.();
|
|
687
|
+
return createChannelMessage(rest, channelId, { body });
|
|
688
|
+
}, "text", { safety: "nonce-protected-create" }),
|
|
673
689
|
replyToId: chunkReplyTo,
|
|
674
690
|
kind
|
|
675
691
|
};
|
|
@@ -697,7 +713,7 @@ async function sendDiscordText(params) {
|
|
|
697
713
|
};
|
|
698
714
|
}
|
|
699
715
|
async function sendDiscordMedia(params) {
|
|
700
|
-
const { rest, channelId, text, mediaUrl, filename, mediaAccess, mediaLocalRoots, mediaReadFile, maxBytes, reply, request, maxLinesPerMessage, components, embeds, allowedMentions, chunkMode, silent, suppressEmbeds, maxChars, onResult, onPlatformSendDispatch } = params;
|
|
716
|
+
const { rest, channelId, text, mediaUrl, filename, mediaAccess, mediaLocalRoots, mediaReadFile, maxBytes, reply, request, maxLinesPerMessage, components, embeds, allowedMentions, chunkMode, silent, suppressEmbeds, maxChars, onResult, onPlatformSendDispatch, assertPlatformSendAuthorized } = params;
|
|
701
717
|
const media = await loadWebMedia(mediaUrl, buildOutboundMediaLoadOptions({
|
|
702
718
|
maxBytes,
|
|
703
719
|
mediaAccess,
|
|
@@ -739,8 +755,11 @@ async function sendDiscordMedia(params) {
|
|
|
739
755
|
});
|
|
740
756
|
let res;
|
|
741
757
|
try {
|
|
742
|
-
await
|
|
743
|
-
|
|
758
|
+
res = await request(async () => {
|
|
759
|
+
await onPlatformSendDispatch?.();
|
|
760
|
+
assertPlatformSendAuthorized?.();
|
|
761
|
+
return createChannelMessage(rest, channelId, { body });
|
|
762
|
+
}, "media", { safety: "nonce-protected-create" });
|
|
744
763
|
} catch (err) {
|
|
745
764
|
if (!isDiscordUploadTooLargeError(err)) throw err;
|
|
746
765
|
return sendDiscordText({
|
|
@@ -756,7 +775,8 @@ async function sendDiscordMedia(params) {
|
|
|
756
775
|
allowedMentions,
|
|
757
776
|
maxChars,
|
|
758
777
|
onResult,
|
|
759
|
-
onPlatformSendDispatch
|
|
778
|
+
onPlatformSendDispatch,
|
|
779
|
+
assertPlatformSendAuthorized
|
|
760
780
|
});
|
|
761
781
|
}
|
|
762
782
|
await onResult?.(res, "media", reply?.messageId);
|
|
@@ -776,7 +796,9 @@ async function sendDiscordMedia(params) {
|
|
|
776
796
|
suppressEmbeds,
|
|
777
797
|
allowedMentions,
|
|
778
798
|
maxChars,
|
|
779
|
-
onResult
|
|
799
|
+
onResult,
|
|
800
|
+
onPlatformSendDispatch,
|
|
801
|
+
assertPlatformSendAuthorized
|
|
780
802
|
});
|
|
781
803
|
for (const id of followup.platformMessageIds) if (id) platformMessageIds.push(id);
|
|
782
804
|
}
|
|
@@ -793,4 +815,4 @@ function formatReactionEmoji(emoji) {
|
|
|
793
815
|
return buildReactionIdentifier(emoji);
|
|
794
816
|
}
|
|
795
817
|
//#endregion
|
|
796
|
-
export {
|
|
818
|
+
export { resolveDiscordSendComponents as A, validateDiscordProxyUrl as B, hasAllGuildPermissionsDiscord as C, buildDiscordMessageRequest as D, SUPPRESS_NOTIFICATIONS_FLAG as E, createDiscordRuntimeAccountContext as F, unregisterGateway as G, clearGateways as H, resolveDiscordClientAccountContext as I, parseAndResolveChannelRecipient as K, resolveDiscordRest as L, resolveDiscordSuppressEmbeds as M, createDiscordClient as N, createDiscordMessageNonce as O, createDiscordRestClient as P, DISCORD_REST_TIMEOUT_MS as R, fetchMemberGuildPermissionsDiscord as S, hasAnyGuildPermissionDiscord as T, getGateway as U, withValidatedDiscordProxy as V, registerGateway as W, DiscordSendError as _, normalizeDiscordPollInput as a, canViewDiscordGuildChannel as b, normalizeStickerIds as c, resolveDiscordTargetChannelId as d, sendDiscordMedia as f, DISCORD_MAX_STICKER_BYTES as g, DISCORD_MAX_EVENT_COVER_BYTES as h, formatReactionEmoji as i, resolveDiscordSendEmbeds as j, resolveDiscordMessageFlags as k, resolveChannelId as l, DISCORD_MAX_EMOJI_BYTES as m, buildDiscordTextChunks as n, normalizeEmojiName as o, sendDiscordText as p, buildReactionIdentifier as r, normalizeReactionEmoji as s, buildDiscordSendError as t, resolveDiscordChannel as u, canManageGuildMemberRoleDiscord as v, hasAnyChannelPermissionDiscord as w, fetchChannelPermissionsDiscord as x, canManageGuildRoleDiscord as y, resolveDiscordProxyFetchForAccount as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { x as formatDiscordUserTag } from "./allow-list-
|
|
1
|
+
import { x as formatDiscordUserTag } from "./allow-list-C2JuH-R0.js";
|
|
2
2
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/discord/src/monitor/sender-identity.ts
|
|
4
4
|
function resolveDiscordWebhookId(message) {
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordSetupPlugin } from "./channel.setup-
|
|
1
|
+
import { t as discordSetupPlugin } from "./channel.setup-z_ewMVa9.js";
|
|
2
2
|
export { discordSetupPlugin };
|
|
@@ -1,18 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { c as resolveDiscordAccount, d as resolveDiscordAccountDisabledReason, f as resolveDiscordAccountDmPolicy, l as resolveDiscordAccountAllowFrom, n as isDiscordAccountEnabledForRuntime, o as mergeDiscordAccountConfig, r as listDiscordAccountIds, s as resolveDefaultDiscordAccountId } from "./accounts-CwJQoLjM.js";
|
|
2
|
+
import { t as inspectDiscordAccount } from "./account-inspect-BY-ve3yH.js";
|
|
3
|
+
import { t as discordIngressIdentity } from "./ingress-identity-BCzfPPYM.js";
|
|
4
|
+
import { t as DiscordChannelConfigSchema } from "./config-schema-B797-Spt.js";
|
|
5
|
+
import { n as normalizeCompatibilityConfig } from "./doctor-contract-Co5vRCZ6.js";
|
|
6
|
+
import { r as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-DFu9hfU8.js";
|
|
6
7
|
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-DSHk7I2w.js";
|
|
7
8
|
import { t as deriveLegacySessionChatType } from "./session-contract-BO5tlIdl.js";
|
|
8
9
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
9
|
-
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
10
|
+
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
10
11
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
12
|
+
import { PAIRING_APPROVED_MESSAGE, buildTokenChannelStatusSummary, projectCredentialSnapshotFields, resolveConfiguredFromCredentialStatuses as resolveConfiguredFromCredentialStatuses$1 } from "openclaw/plugin-sdk/channel-status";
|
|
11
13
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
12
14
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
13
15
|
import { createConditionalWarningCollector, createOpenProviderConfiguredRouteWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
16
|
+
import { identityEntryAuthenticationClassifier } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
14
17
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
15
18
|
import { createEnvPatchedAccountSetupAdapter } from "openclaw/plugin-sdk/setup-runtime";
|
|
19
|
+
//#region extensions/discord/src/channel-api.ts
|
|
20
|
+
const DISCORD_CHANNEL_META = {
|
|
21
|
+
id: "discord",
|
|
22
|
+
label: "Discord",
|
|
23
|
+
selectionLabel: "Discord (Bot API)",
|
|
24
|
+
detailLabel: "Discord Bot",
|
|
25
|
+
docsPath: "/channels/discord",
|
|
26
|
+
docsLabel: "discord",
|
|
27
|
+
blurb: "very well supported right now.",
|
|
28
|
+
systemImage: "bubble.left.and.bubble.right",
|
|
29
|
+
markdownCapable: true,
|
|
30
|
+
preferSessionLookupForAnnounceTarget: true
|
|
31
|
+
};
|
|
32
|
+
function getChatChannelMeta(id) {
|
|
33
|
+
if (id !== DISCORD_CHANNEL_META.id) throw new Error(`Unsupported Discord channel meta lookup: ${id}`);
|
|
34
|
+
return DISCORD_CHANNEL_META;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
16
37
|
//#region extensions/discord/src/security.ts
|
|
17
38
|
const resolveDiscordDmPolicy = createScopedDmSecurityResolver({
|
|
18
39
|
channelKey: "discord",
|
|
@@ -29,6 +50,7 @@ const resolveDiscordDmPolicy = createScopedDmSecurityResolver({
|
|
|
29
50
|
})
|
|
30
51
|
}),
|
|
31
52
|
policyPathSuffix: "dmPolicy",
|
|
53
|
+
classifyEntryAuthentication: identityEntryAuthenticationClassifier(discordIngressIdentity),
|
|
32
54
|
normalizeEntry: (raw) => raw.trim().replace(/^(discord|user):/i, "").replace(/^<@!?(\d+)>$/, "$1")
|
|
33
55
|
});
|
|
34
56
|
const collectDiscordSecurityWarnings = createOpenProviderConfiguredRouteWarningCollector({
|
|
@@ -53,12 +75,21 @@ const collectDiscordSecurityFindings = createConditionalWarningCollector.finding
|
|
|
53
75
|
severity: "critical",
|
|
54
76
|
title: "Discord security warning"
|
|
55
77
|
});
|
|
56
|
-
const loadDiscordSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit.runtime-
|
|
78
|
+
const loadDiscordSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit.runtime-sKZyKgpx.js"));
|
|
57
79
|
const discordSecurityAdapter = {
|
|
58
80
|
resolveDmPolicy: resolveDiscordDmPolicy,
|
|
59
81
|
collectWarnings: collectDiscordSecurityFindings,
|
|
60
82
|
collectAuditFindings: async (params) => (await loadDiscordSecurityAuditModule()).collectDiscordSecurityAuditFindings(params)
|
|
61
83
|
};
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region extensions/discord/src/setup-adapter.ts
|
|
86
|
+
const discordSetupAdapter = createEnvPatchedAccountSetupAdapter({
|
|
87
|
+
channelKey: "discord",
|
|
88
|
+
defaultAccountOnlyEnvError: "DISCORD_BOT_TOKEN can only be used for the default account.",
|
|
89
|
+
missingCredentialError: "Discord requires token (or --use-env).",
|
|
90
|
+
hasCredentials: (input) => Boolean(input.token),
|
|
91
|
+
buildPatch: (input) => input.token ? { token: input.token } : {}
|
|
92
|
+
});
|
|
62
93
|
const discordSetupContract = defineChannelSetupContract({
|
|
63
94
|
fields: {
|
|
64
95
|
token: {
|
|
@@ -78,13 +109,7 @@ const discordSetupContract = defineChannelSetupContract({
|
|
|
78
109
|
envVars: ["DISCORD_BOT_TOKEN"]
|
|
79
110
|
}
|
|
80
111
|
},
|
|
81
|
-
legacyAdapter:
|
|
82
|
-
channelKey: "discord",
|
|
83
|
-
defaultAccountOnlyEnvError: "DISCORD_BOT_TOKEN can only be used for the default account.",
|
|
84
|
-
missingCredentialError: "Discord requires token (or --use-env).",
|
|
85
|
-
hasCredentials: (input) => Boolean(input.token),
|
|
86
|
-
buildPatch: (input) => input.token ? { token: input.token } : {}
|
|
87
|
-
})
|
|
112
|
+
legacyAdapter: discordSetupAdapter
|
|
88
113
|
});
|
|
89
114
|
//#endregion
|
|
90
115
|
//#region extensions/discord/src/doctor-shared.ts
|
|
@@ -92,7 +117,7 @@ const DISCORD_LEGACY_CONFIG_RULES = [];
|
|
|
92
117
|
//#endregion
|
|
93
118
|
//#region extensions/discord/src/shared.ts
|
|
94
119
|
const DISCORD_CHANNEL = "discord";
|
|
95
|
-
const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-
|
|
120
|
+
const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-QQTOkBfW.js"));
|
|
96
121
|
const discordDoctor = {
|
|
97
122
|
dmAllowFromMode: "topOnly",
|
|
98
123
|
groupModel: "route",
|
|
@@ -166,10 +191,10 @@ function createDiscordPluginBase(params) {
|
|
|
166
191
|
hasConfiguredState: ({ env }) => typeof env?.DISCORD_BOT_TOKEN === "string" && env.DISCORD_BOT_TOKEN.trim().length > 0,
|
|
167
192
|
isEnabled: (account, cfg) => isDiscordAccountEnabledForRuntime(account, cfg),
|
|
168
193
|
disabledReason: (account, cfg) => resolveDiscordAccountDisabledReason(account, cfg),
|
|
169
|
-
isConfigured: (account) => resolveConfiguredFromCredentialStatuses(account) ?? Boolean(account.token?.trim()),
|
|
194
|
+
isConfigured: (account) => resolveConfiguredFromCredentialStatuses$1(account) ?? Boolean(account.token?.trim()),
|
|
170
195
|
describeAccount: (account) => describeAccountSnapshot({
|
|
171
196
|
account,
|
|
172
|
-
configured: resolveConfiguredFromCredentialStatuses(account) ?? Boolean(account.token?.trim()),
|
|
197
|
+
configured: resolveConfiguredFromCredentialStatuses$1(account) ?? Boolean(account.token?.trim()),
|
|
173
198
|
extra: {
|
|
174
199
|
tokenSource: account.tokenSource,
|
|
175
200
|
tokenStatus: account.tokenStatus
|
|
@@ -187,4 +212,4 @@ function createDiscordPluginBase(params) {
|
|
|
187
212
|
};
|
|
188
213
|
}
|
|
189
214
|
//#endregion
|
|
190
|
-
export { discordSecurityAdapter as a, discordSetupContract as i, discordConfigAdapter as n, DISCORD_LEGACY_CONFIG_RULES as r, createDiscordPluginBase as t };
|
|
215
|
+
export { discordSecurityAdapter as a, buildTokenChannelStatusSummary as c, discordSetupContract as i, projectCredentialSnapshotFields as l, discordConfigAdapter as n, DEFAULT_ACCOUNT_ID$1 as o, DISCORD_LEGACY_CONFIG_RULES as r, PAIRING_APPROVED_MESSAGE as s, createDiscordPluginBase as t, resolveConfiguredFromCredentialStatuses$1 as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey } from "./thread-bindings-
|
|
1
|
+
import { on as __exportAll } from "./retry-t5RcEsPk.js";
|
|
2
|
+
import { o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey } from "./thread-bindings-wECUSIIG.js";
|
|
3
3
|
import { normalizeOptionalLowercaseString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
//#region extensions/discord/src/subagent-hooks.ts
|
|
5
5
|
var subagent_hooks_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
2
2
|
//#region extensions/discord/subagent-hooks-api.ts
|
|
3
|
-
const loadDiscordSubagentHooksModule = createLazyRuntimeModule(() => import("./subagent-hooks-
|
|
4
|
-
const loadDiscordSubagentProgressModule = createLazyRuntimeModule(() => import("./subagent-progress-FPLqBY1s.js"));
|
|
3
|
+
const loadDiscordSubagentHooksModule = createLazyRuntimeModule(() => import("./subagent-hooks-IeZVPLGj.js").then((n) => n.r));
|
|
5
4
|
function registerDiscordSubagentHooks(api) {
|
|
6
|
-
api.on("gateway_start", async () => {
|
|
7
|
-
const { recoverDiscordSubagentProgress } = await loadDiscordSubagentProgressModule();
|
|
8
|
-
await recoverDiscordSubagentProgress(api);
|
|
9
|
-
});
|
|
10
5
|
api.on("subagent_ended", async (event) => {
|
|
11
6
|
const { handleDiscordSubagentEnded } = await loadDiscordSubagentHooksModule();
|
|
12
7
|
handleDiscordSubagentEnded(event);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { x as formatDiscordUserTag } from "./allow-list-
|
|
1
|
+
import { y as discord_exports } from "./retry-t5RcEsPk.js";
|
|
2
|
+
import { x as formatDiscordUserTag } from "./allow-list-C2JuH-R0.js";
|
|
3
3
|
//#region extensions/discord/src/monitor/system-events.ts
|
|
4
4
|
function resolveDiscordSystemEvent(message, location) {
|
|
5
5
|
switch (message.type) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as resolveDiscordAccount,
|
|
3
|
-
import { a as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
1
|
+
import { _ as parseDiscordTarget, on as __exportAll, p as allowFromContainsDiscordUserId } from "./retry-t5RcEsPk.js";
|
|
2
|
+
import { c as resolveDiscordAccount, l as resolveDiscordAccountAllowFrom } from "./accounts-CwJQoLjM.js";
|
|
3
|
+
import { a as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-D_kFz_Fj.js";
|
|
4
4
|
import { buildMessagingTarget } from "openclaw/plugin-sdk/channel-targets";
|
|
5
5
|
//#region extensions/discord/src/send-target-parsing.ts
|
|
6
6
|
const parseDiscordSendTarget = (raw, options = {}) => parseDiscordTarget(raw, options);
|
|
@@ -62,10 +62,11 @@ function safeParseDiscordTarget(input, options) {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
function isConfiguredAllowedDiscordDmUser(input, options) {
|
|
65
|
-
|
|
65
|
+
const allowFrom = resolveDiscordAccountAllowFrom({
|
|
66
66
|
cfg: options.cfg,
|
|
67
67
|
accountId: options.accountId
|
|
68
|
-
}) ?? []
|
|
68
|
+
}) ?? [];
|
|
69
|
+
return allowFromContainsDiscordUserId(allowFrom, input);
|
|
69
70
|
}
|
|
70
71
|
function isExplicitUserLookup(input, options) {
|
|
71
72
|
if (/^<@!?(\d+)>$/.test(input)) return true;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "./targets-B2pf49zc.js";
|
|
1
|
+
import { _ as parseDiscordTarget, on as __exportAll } from "./retry-t5RcEsPk.js";
|
|
2
|
+
import "./targets-DQSye1Rv.js";
|
|
4
3
|
import { C as resolveThreadBindingMaxAgeExpiresAt, O as shouldPersistBindingMutations, S as resolveThreadBindingInactivityExpiresAt, T as saveBindingsToDisk, h as refreshUnboundThreadWebhookIdentity, m as normalizeThreadId, n as MANAGERS_BY_ACCOUNT_ID, t as BINDINGS_BY_THREAD_ID, u as getThreadBindingToken, v as removeBindingRecord, w as resolveThreadBindingMaxAgeMs$1, x as resolveThreadBindingIdleTimeoutMs$1 } from "./thread-bindings.state-D8OMdk4O.js";
|
|
5
|
-
import { n as setThreadBindingMaxAgeBySessionKey, r as resolveBindingIdsForTargetSession, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-
|
|
6
|
-
import { _ as resolveThreadBindingThreadName, g as resolveThreadBindingIntroText, h as formatThreadBindingDurationLabel, m as resolveThreadBindingPersonaFromRecord, n as createThreadBindingManager, o as resolveChannelIdForBinding, p as resolveThreadBindingPersona, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-
|
|
4
|
+
import { n as setThreadBindingMaxAgeBySessionKey, r as resolveBindingIdsForTargetSession, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-CC7HoQvt.js";
|
|
5
|
+
import { _ as resolveThreadBindingThreadName, g as resolveThreadBindingIntroText, h as formatThreadBindingDurationLabel, m as resolveThreadBindingPersonaFromRecord, n as createThreadBindingManager, o as resolveChannelIdForBinding, p as resolveThreadBindingPersona, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-B-3UHCc1.js";
|
|
7
6
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
8
7
|
import { normalizeOptionalLowercaseString, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
8
|
import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
|
|
@@ -142,7 +141,8 @@ async function reconcileAcpThreadBindingsOnStartup(params) {
|
|
|
142
141
|
}
|
|
143
142
|
const session = readAcpSessionEntry({
|
|
144
143
|
cfg: params.cfg,
|
|
145
|
-
sessionKey
|
|
144
|
+
sessionKey,
|
|
145
|
+
agentId: binding.agentId
|
|
146
146
|
});
|
|
147
147
|
if (!session) {
|
|
148
148
|
staleBindings.push(binding);
|