@openclaw/discord 2026.8.1-beta.2 → 2026.8.1
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-CqzrH14k.js → account-inspect-BDfKyuvL.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-DJTf1LtA.js → accounts-CfQ-vSyf.js} +34 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/{activities-api-DS7vpdtp.js → activities-api-Dl-TOyOX.js} +134 -175
- package/dist/activities-api.js +1 -1
- package/dist/api.js +17 -17
- package/dist/{approval-handler.runtime-B6yEV79q.js → approval-handler.runtime-q4Zqo44V.js} +29 -106
- package/dist/{audit-Db-rlntl.js → audit-DgrvFPGt.js} +5 -5
- package/dist/{channel-CnnbJSt5.js → channel-BsQUalPw.js} +72 -50
- package/dist/{channel-actions.runtime-CLKrx6tr.js → channel-actions.runtime-UMGGIfSy.js} +31 -45
- 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-BFAO-V1P.js → channel.setup-rPs4dsk_.js} +5 -5
- package/dist/{outbound-session-route-DxLkrgKQ.js → components-Dk35LTf_.js} +34 -76
- package/dist/{config-schema-BgEskFAs.js → config-schema-CxPqtVI1.js} +46 -14
- package/dist/conversation-binding-route-BjvX4e35.js +43 -0
- package/dist/{directory-config-BVX7Cflc.js → directory-config-B7DY_pNG.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DGIGxpIo.js → directory-live-DuAXKkan.js} +3 -3
- package/dist/doctor-contract-api.js +2 -2
- package/dist/{doctor-BzC-TLnB.js → doctor-zQTtn6hm.js} +33 -12
- package/dist/{handle-action.guild-admin-BNVTUISF.js → handle-action.guild-admin-DZewwLr1.js} +9 -5
- package/dist/index.js +3 -4
- package/dist/ingress-identity-CzZKcPK8.js +60 -0
- package/dist/{message-handler-Unk_f10F.js → message-handler-C5By3yl5.js} +82 -6
- package/dist/{message-handler.preflight-C9zecxR9.js → message-handler.preflight-DrszWuHw.js} +44 -118
- package/dist/{message-handler.process-DWQ6UHHu.js → message-handler.process-DyFPDLCt.js} +205 -235
- package/dist/{message-utils-BSCPVgy0.js → message-text-Ca8M6TU8.js} +43 -42
- package/dist/{outbound-adapter-D9nRivT1.js → outbound-adapter-Dif8p481.js} +118 -91
- package/dist/{outbound-components-cTzwBJ60.js → outbound-components-wjv7yyAj.js} +5 -4
- package/dist/outbound-session-route-Bn4uXaoE.js +665 -0
- package/dist/owner-access-UlYi9t0M.js +107 -0
- package/dist/{pluralkit-DdiJ9KMK.js → pluralkit-9EuEN4UD.js} +1 -1
- package/dist/{probe-Bl-k5_Ku.js → probe-n6ZXxK8V.js} +1 -1
- package/dist/{probe.runtime-M9fREKvp.js → probe.runtime-CN4bdPfZ.js} +1 -1
- package/dist/{provider-DvSNb-2v.js → provider-LXiOcJrH.js} +887 -1350
- package/dist/{provider-session.runtime-BUEqD0rA.js → provider-session.runtime-DSNe7r2W.js} +3 -3
- package/dist/provider.runtime-DiInaDXO.js +2 -0
- package/dist/{realtime-session.runtime-C7wen-aF.js → realtime-session.runtime-DOViOIjY.js} +129 -134
- package/dist/{resolve-allowlist-common-D04lpEzb.js → resolve-allowlist-common-BLoYaxEG.js} +2 -2
- package/dist/{resolve-channels-Dm7jEeg6.js → resolve-channels-D2yl_2CN.js} +5 -4
- package/dist/{resolve-users-bktrCUUU.js → resolve-users-BLxfqajZ.js} +2 -2
- package/dist/{retry-CLpJcXXf.js → retry-DqHCW6PV.js} +187 -19
- package/dist/{runtime-DGsSyDTS.js → runtime-BYamRVPN.js} +89 -86
- package/dist/{runtime-DoHjckYm.js → runtime-DrxVBTtp.js} +9 -10
- package/dist/runtime-api.js +19 -25
- package/dist/{sdk-runtime-QpY8PvCh.js → sdk-runtime-6tfgYDjY.js} +57 -89
- package/dist/{secret-config-contract-B1akrlyY.js → secret-config-contract-B3i6WxV5.js} +53 -25
- package/dist/secret-contract-api.js +1 -1
- package/dist/{security-audit-jGnJF__m.js → security-audit-DKfK-iPY.js} +11 -12
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/{security-audit.runtime-CPN0xFYz.js → security-audit.runtime-sKZyKgpx.js} +1 -1
- package/dist/{send-B7Q6Oc1I.js → send-UJHiAm4C.js} +82 -19
- package/dist/{send.components-iJyFXw9L.js → send.components-CrBJpGT_.js} +22 -39
- package/dist/{send.outbound-DS5tHwfR.js → send.outbound-D7JYmfm9.js} +77 -78
- package/dist/{send.shared-BmwFjW6T.js → send.shared-DZJ1akvQ.js} +136 -121
- package/dist/{sender-identity-QtalnCYv.js → sender-identity-BJtfyise.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-BIXIX6uJ.js → shared-Dii2HTn7.js} +41 -14
- package/dist/subagent-hooks-JyGrtQIl.js +49 -0
- package/dist/subagent-hooks-api.js +1 -6
- package/dist/{system-events-CTqDf6_s.js → system-events-BEmcj4xJ.js} +2 -2
- package/dist/{target-resolver-maOKSqO0.js → target-resolver-V-IYae6s.js} +3 -3
- package/dist/targets-CQp53cGj.js +3 -0
- package/dist/{thread-bindings-3L8p82GV.js → thread-bindings-DvYP79fy.js} +28 -26
- package/dist/{thread-bindings.manager-DCIH6WDC.js → thread-bindings.manager-Clm77DBM.js} +11 -14
- package/dist/{thread-bindings.session-updates-bJ2KQFY6.js → thread-bindings.session-updates-CJb-BpPL.js} +1 -1
- package/dist/{thread-bindings.state-aeV8HNgV.js → thread-bindings.state-D8OMdk4O.js} +1 -1
- package/dist/threading-CXuu_7o9.js +478 -0
- package/dist/transcripts-source-BLEMH_yi.js +270 -0
- package/dist/transcripts-source-api.js +7 -2
- package/dist/{typing-CS-nNVoe.js → typing-B9snnwMe.js} +1 -1
- package/dist/{voice-runtime-BEdqNcST.js → voice-runtime-DY6_o73o.js} +250 -150
- 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 +23 -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 +24 -10
- package/package.json +8 -10
- package/skills/discord/SKILL.md +1 -1
- package/dist/approval-message-safety-AcIxvrf3.js +0 -140
- package/dist/audit-core-xwjIczO0.js +0 -105
- package/dist/channel-actions-5s_hjYKd.js +0 -208
- package/dist/channel-api-CAJ0wMoV.js +0 -21
- package/dist/inbound-event-delivery-De2qxTrP.js +0 -39
- package/dist/provider.runtime-C9PnJZbZ.js +0 -2
- package/dist/runtime-api.actions.js +0 -3
- package/dist/runtime-api.lookup.js +0 -7
- package/dist/runtime-api.monitor-CHxrFPnW.js +0 -5
- package/dist/runtime-api.monitor.js +0 -8
- package/dist/runtime-api.send.js +0 -7
- package/dist/runtime-api.threads.js +0 -5
- package/dist/send.reactions-BAn0iiVQ.js +0 -78
- package/dist/send.receipt-IPI1p-SP.js +0 -66
- package/dist/subagent-hooks-CTt5KCJr.js +0 -120
- package/dist/subagent-progress-DhaE_h8a.js +0 -109
- package/dist/targets-yUFTHoAx.js +0 -3
- package/dist/transcripts-source-CfFMexGt.js +0 -123
- package/node_modules/p-map/index.d.ts +0 -155
- package/node_modules/p-map/index.js +0 -285
- package/node_modules/p-map/license +0 -9
- package/node_modules/p-map/package.json +0 -57
- package/node_modules/p-map/readme.md +0 -190
- 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
- package/dist/{allow-list-DnxIlPP2.js → allow-list-BDMimASD.js} +1 -1
- package/dist/{doctor-contract-DLa-BTiU.js → doctor-contract-DsWvKIXF.js} +1 -1
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { on as __exportAll } from "./retry-DqHCW6PV.js";
|
|
2
|
+
import { a as listEnabledDiscordAccounts, c as resolveDiscordAccount } from "./accounts-CfQ-vSyf.js";
|
|
3
|
+
import { n as resolveDiscordVoiceEnabled, r as authorizeDiscordVoiceIngress, t as resolveDiscordVoiceAccess } from "./owner-access-UlYi9t0M.js";
|
|
4
|
+
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
5
|
+
import { summarizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
+
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
7
|
+
//#region extensions/discord/src/voice/transcripts-source.ts
|
|
8
|
+
var transcripts_source_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
+
discordVoiceTranscriptsSourceProvider: () => discordVoiceTranscriptsSourceProvider,
|
|
10
|
+
setDiscordTranscriptsVoiceManager: () => setDiscordTranscriptsVoiceManager
|
|
11
|
+
});
|
|
12
|
+
const managersByAccountId = /* @__PURE__ */ new Map();
|
|
13
|
+
const managerWaiters = /* @__PURE__ */ new Set();
|
|
14
|
+
const ACCOUNT_ID_ERROR_MAX_CHARS = 64;
|
|
15
|
+
const ACCOUNT_ID_ERROR_MAX_ENTRIES = 4;
|
|
16
|
+
function formatAccountIdForError(accountId) {
|
|
17
|
+
return JSON.stringify(truncateUtf16Safe(accountId, ACCOUNT_ID_ERROR_MAX_CHARS));
|
|
18
|
+
}
|
|
19
|
+
function summarizeAccountIdsForError(accountIds) {
|
|
20
|
+
return summarizeStringEntries({
|
|
21
|
+
entries: accountIds.map(formatAccountIdForError),
|
|
22
|
+
limit: ACCOUNT_ID_ERROR_MAX_ENTRIES
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function setDiscordTranscriptsVoiceManager(params) {
|
|
26
|
+
if (params.manager) {
|
|
27
|
+
managersByAccountId.set(params.accountId, params.manager);
|
|
28
|
+
for (const waiter of managerWaiters) if (!waiter.accountId || waiter.accountId === params.accountId) waiter.resolve();
|
|
29
|
+
} else managersByAccountId.delete(params.accountId);
|
|
30
|
+
}
|
|
31
|
+
const resolveDiscordTranscriptsAccountId = ({ cfg, source }) => {
|
|
32
|
+
const requestedAccountId = source.accountId?.trim();
|
|
33
|
+
const configuredVoiceAccounts = cfg ? listEnabledDiscordAccounts(cfg).filter((account) => resolveDiscordVoiceEnabled(account.config.voice)) : [];
|
|
34
|
+
const capableAccountIds = (cfg ? configuredVoiceAccounts.filter((account) => account.tokenStatus === "available").map((account) => account.accountId) : [...managersByAccountId.keys()]).toSorted();
|
|
35
|
+
if (requestedAccountId) {
|
|
36
|
+
if (!cfg || capableAccountIds.includes(requestedAccountId)) return {
|
|
37
|
+
ok: true,
|
|
38
|
+
value: requestedAccountId
|
|
39
|
+
};
|
|
40
|
+
if (resolveDiscordAccount({
|
|
41
|
+
cfg,
|
|
42
|
+
accountId: requestedAccountId
|
|
43
|
+
}).tokenStatus === "configured_unavailable") return {
|
|
44
|
+
ok: false,
|
|
45
|
+
error: `Discord account ${formatAccountIdForError(requestedAccountId)} has configured credentials that are unavailable in this runtime; resolve its SecretRef before using this account.`
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
ok: false,
|
|
49
|
+
error: `Discord account ${formatAccountIdForError(requestedAccountId)} is not enabled for voice.`
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (capableAccountIds.length === 1) return {
|
|
53
|
+
ok: true,
|
|
54
|
+
value: capableAccountIds[0]
|
|
55
|
+
};
|
|
56
|
+
if (capableAccountIds.length === 0) return {
|
|
57
|
+
ok: false,
|
|
58
|
+
error: "No Discord account has available credentials and voice enabled; configure credentials and enable voice for an account."
|
|
59
|
+
};
|
|
60
|
+
const configuredDefaultAccountId = cfg?.channels?.discord?.defaultAccount?.trim();
|
|
61
|
+
if (configuredDefaultAccountId) {
|
|
62
|
+
const normalizedDefaultAccountId = normalizeAccountId(configuredDefaultAccountId);
|
|
63
|
+
if (capableAccountIds.includes(normalizedDefaultAccountId)) return {
|
|
64
|
+
ok: true,
|
|
65
|
+
value: normalizedDefaultAccountId
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (capableAccountIds.includes(DEFAULT_ACCOUNT_ID)) return {
|
|
69
|
+
ok: true,
|
|
70
|
+
value: DEFAULT_ACCOUNT_ID
|
|
71
|
+
};
|
|
72
|
+
return {
|
|
73
|
+
ok: false,
|
|
74
|
+
error: `Multiple Discord accounts are enabled for voice (${summarizeAccountIdsForError(capableAccountIds)}); specify accountId.`
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
async function waitForManager(request) {
|
|
78
|
+
const accountResolution = resolveDiscordTranscriptsAccountId({
|
|
79
|
+
cfg: request.cfg,
|
|
80
|
+
source: request.session.source
|
|
81
|
+
});
|
|
82
|
+
if (!accountResolution.ok) return accountResolution;
|
|
83
|
+
const accountId = accountResolution.value;
|
|
84
|
+
const existing = accountId ? managersByAccountId.get(accountId) : void 0;
|
|
85
|
+
if (existing) return {
|
|
86
|
+
ok: true,
|
|
87
|
+
value: existing
|
|
88
|
+
};
|
|
89
|
+
if (request.abortSignal?.aborted) return {
|
|
90
|
+
ok: true,
|
|
91
|
+
value: void 0
|
|
92
|
+
};
|
|
93
|
+
const startupWaitMs = request.startupWaitMs ?? 0;
|
|
94
|
+
if (startupWaitMs <= 0) return {
|
|
95
|
+
ok: true,
|
|
96
|
+
value: void 0
|
|
97
|
+
};
|
|
98
|
+
await new Promise((resolve) => {
|
|
99
|
+
const waiter = {
|
|
100
|
+
accountId,
|
|
101
|
+
resolve: () => {
|
|
102
|
+
clearTimeout(timer);
|
|
103
|
+
request.abortSignal?.removeEventListener("abort", waiter.resolve);
|
|
104
|
+
managerWaiters.delete(waiter);
|
|
105
|
+
resolve();
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const timer = setTimeout(waiter.resolve, startupWaitMs);
|
|
109
|
+
timer.unref?.();
|
|
110
|
+
request.abortSignal?.addEventListener("abort", waiter.resolve, { once: true });
|
|
111
|
+
managerWaiters.add(waiter);
|
|
112
|
+
});
|
|
113
|
+
if (request.abortSignal?.aborted) return {
|
|
114
|
+
ok: true,
|
|
115
|
+
value: void 0
|
|
116
|
+
};
|
|
117
|
+
return {
|
|
118
|
+
ok: true,
|
|
119
|
+
value: accountId ? managersByAccountId.get(accountId) : void 0
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const discordVoiceTranscriptsSourceProvider = {
|
|
123
|
+
id: "discord-voice",
|
|
124
|
+
aliases: ["discord"],
|
|
125
|
+
accessControl: {
|
|
126
|
+
channelId: "discord",
|
|
127
|
+
resolveAccountId: resolveDiscordTranscriptsAccountId,
|
|
128
|
+
async authorize({ caller, cfg, source }) {
|
|
129
|
+
if (caller.kind === "operator") return {
|
|
130
|
+
ok: true,
|
|
131
|
+
value: void 0
|
|
132
|
+
};
|
|
133
|
+
const guildId = source.guildId?.trim();
|
|
134
|
+
const channelId = source.channelId?.trim();
|
|
135
|
+
const callerAccountId = caller.accountId?.trim();
|
|
136
|
+
const sourceAccountId = source.accountId?.trim();
|
|
137
|
+
if (caller.channel !== "discord" || !cfg || !callerAccountId || sourceAccountId !== callerAccountId || !guildId || !channelId || caller.groupSpace !== guildId) return {
|
|
138
|
+
ok: false,
|
|
139
|
+
error: "You are not authorized to use this command."
|
|
140
|
+
};
|
|
141
|
+
const target = await managersByAccountId.get(callerAccountId)?.resolveAccessTarget({
|
|
142
|
+
guildId,
|
|
143
|
+
channelId
|
|
144
|
+
});
|
|
145
|
+
if (!target) return {
|
|
146
|
+
ok: false,
|
|
147
|
+
error: "Discord voice access target is unavailable."
|
|
148
|
+
};
|
|
149
|
+
const account = resolveDiscordAccount({
|
|
150
|
+
cfg,
|
|
151
|
+
accountId: callerAccountId
|
|
152
|
+
});
|
|
153
|
+
const access = await authorizeDiscordVoiceIngress({
|
|
154
|
+
cfg,
|
|
155
|
+
discordConfig: account.config,
|
|
156
|
+
accountId: account.accountId,
|
|
157
|
+
guild: target.guild,
|
|
158
|
+
guildId,
|
|
159
|
+
channelId,
|
|
160
|
+
...target.channelName ? { channelName: target.channelName } : {},
|
|
161
|
+
channelSlug: target.channelSlug,
|
|
162
|
+
...target.parentId ? { parentId: target.parentId } : {},
|
|
163
|
+
...target.parentName ? { parentName: target.parentName } : {},
|
|
164
|
+
...target.parentSlug ? { parentSlug: target.parentSlug } : {},
|
|
165
|
+
scope: target.scope,
|
|
166
|
+
memberRoleIds: [...caller.roleIds],
|
|
167
|
+
admissionAllowFrom: resolveDiscordVoiceAccess({
|
|
168
|
+
cfg,
|
|
169
|
+
discordConfig: account.config,
|
|
170
|
+
accountId: account.accountId
|
|
171
|
+
}).admissionAllowFrom,
|
|
172
|
+
sender: { id: caller.senderId }
|
|
173
|
+
});
|
|
174
|
+
return access.ok ? {
|
|
175
|
+
ok: true,
|
|
176
|
+
value: void 0
|
|
177
|
+
} : {
|
|
178
|
+
ok: false,
|
|
179
|
+
error: access.message
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
name: "Discord Voice",
|
|
184
|
+
sourceKinds: ["live-audio"],
|
|
185
|
+
async start(request) {
|
|
186
|
+
const managerResolution = await waitForManager(request);
|
|
187
|
+
if (!managerResolution.ok) return managerResolution;
|
|
188
|
+
const manager = managerResolution.value;
|
|
189
|
+
if (!manager) return {
|
|
190
|
+
ok: false,
|
|
191
|
+
error: "Discord voice manager is not available."
|
|
192
|
+
};
|
|
193
|
+
if (request.abortSignal?.aborted) return {
|
|
194
|
+
ok: false,
|
|
195
|
+
error: "Discord transcripts start aborted."
|
|
196
|
+
};
|
|
197
|
+
const guildId = request.session.source.guildId?.trim();
|
|
198
|
+
const channelId = request.session.source.channelId?.trim();
|
|
199
|
+
if (!guildId || !channelId) return {
|
|
200
|
+
ok: false,
|
|
201
|
+
error: "Discord transcripts require guildId and channelId."
|
|
202
|
+
};
|
|
203
|
+
const joined = await manager.join({
|
|
204
|
+
guildId,
|
|
205
|
+
channelId
|
|
206
|
+
}, { transcripts: {
|
|
207
|
+
sessionId: request.session.sessionId,
|
|
208
|
+
onUtterance: request.onUtterance,
|
|
209
|
+
onStop: () => request.onStatus?.({
|
|
210
|
+
sessionId: request.session.sessionId,
|
|
211
|
+
active: false,
|
|
212
|
+
source: request.session.source
|
|
213
|
+
})
|
|
214
|
+
} });
|
|
215
|
+
if (!joined.ok) return {
|
|
216
|
+
ok: false,
|
|
217
|
+
error: joined.message
|
|
218
|
+
};
|
|
219
|
+
return {
|
|
220
|
+
ok: true,
|
|
221
|
+
session: request.session
|
|
222
|
+
};
|
|
223
|
+
},
|
|
224
|
+
async stop(request) {
|
|
225
|
+
const accountId = request.source.accountId?.trim();
|
|
226
|
+
if (!accountId) return {
|
|
227
|
+
ok: false,
|
|
228
|
+
error: "Discord transcripts require accountId to stop a voice session."
|
|
229
|
+
};
|
|
230
|
+
const manager = managersByAccountId.get(accountId);
|
|
231
|
+
if (!manager) return {
|
|
232
|
+
ok: false,
|
|
233
|
+
error: "Discord voice manager is not available."
|
|
234
|
+
};
|
|
235
|
+
const guildId = request.source.guildId?.trim();
|
|
236
|
+
if (!guildId) return {
|
|
237
|
+
ok: false,
|
|
238
|
+
error: "Discord transcripts require guildId."
|
|
239
|
+
};
|
|
240
|
+
const result = await manager.leave({
|
|
241
|
+
guildId,
|
|
242
|
+
channelId: request.source.channelId
|
|
243
|
+
}, { transcriptsSessionId: request.sessionId });
|
|
244
|
+
if (!result.ok) return {
|
|
245
|
+
ok: false,
|
|
246
|
+
error: result.message
|
|
247
|
+
};
|
|
248
|
+
return {
|
|
249
|
+
ok: true,
|
|
250
|
+
sessionId: request.sessionId,
|
|
251
|
+
stoppedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
252
|
+
};
|
|
253
|
+
},
|
|
254
|
+
async status(source) {
|
|
255
|
+
const accountId = source.accountId?.trim();
|
|
256
|
+
if (!accountId) return [];
|
|
257
|
+
return managersByAccountId.get(accountId)?.status().map((entry) => ({
|
|
258
|
+
active: entry.ok,
|
|
259
|
+
message: entry.message,
|
|
260
|
+
source: {
|
|
261
|
+
providerId: "discord-voice",
|
|
262
|
+
accountId,
|
|
263
|
+
guildId: entry.guildId,
|
|
264
|
+
channelId: entry.channelId
|
|
265
|
+
}
|
|
266
|
+
})) ?? [];
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
//#endregion
|
|
270
|
+
export { transcripts_source_exports as n, discordVoiceTranscriptsSourceProvider as t };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-
|
|
2
|
-
|
|
1
|
+
import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-BLEMH_yi.js";
|
|
2
|
+
//#region extensions/discord/transcripts-source-api.ts
|
|
3
|
+
function registerDiscordTranscriptSourceProvider(api) {
|
|
4
|
+
api.registerTranscriptSourceProvider(discordVoiceTranscriptsSourceProvider);
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { registerDiscordTranscriptSourceProvider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Rt as sendChannelTyping, on as __exportAll } from "./retry-DqHCW6PV.js";
|
|
2
2
|
import { c as raceWithTimeout } from "./timeouts-B9cy6RvQ.js";
|
|
3
3
|
//#region extensions/discord/src/monitor/typing.ts
|
|
4
4
|
var typing_exports = /* @__PURE__ */ __exportAll({ sendTyping: () => sendTyping });
|