@openclaw/discord 2026.9.4 → 2026.9.6
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/assets/activity.svg +40 -0
- package/assets/icon.png +0 -0
- package/dist/{account-inspect-BY-ve3yH.js → .setup/account-inspect-BwQj24ht.mjs} +1 -1
- package/dist/{activities-api-w8j7Elou.js → .setup/activities-api-COU4-0nR.mjs} +93 -31
- package/dist/{api-LIV--eMq.js → .setup/api-CBK9zcq5.mjs} +7 -4
- package/dist/{approval-handler.runtime-BnPUU5NK.js → .setup/approval-handler.runtime-CbBktBb4.mjs} +8 -7
- package/dist/.setup/approval-message-updates-jf9zMaIC.mjs +17 -0
- package/dist/{audit-BgAgIzwo.js → .setup/audit-vKbh-LFR.mjs} +5 -5
- package/dist/{channel-C_OFFR5Y.js → .setup/channel-Dv4e3Jpc.mjs} +34 -29
- package/dist/{channel-actions.runtime-tShzmemq.js → .setup/channel-actions.runtime-leZuw01r.mjs} +25 -12
- package/dist/{allow-list-DWEio925.js → .setup/channel-type-DKnjV1XW.mjs} +161 -1
- package/dist/{channel.setup-CpAwAiS0.js → .setup/channel.setup-0NX6FFwi.mjs} +4 -4
- package/dist/{components-DBFTIN6P.js → .setup/components-yBEb75bB.mjs} +4 -5
- package/dist/{config-schema-r38UkM_J.js → .setup/config-schema-CiZz-mtA.mjs} +1 -1
- package/dist/{conversation-binding-route-CB9PRqgi.js → .setup/conversation-binding-route-B7qImK_b.mjs} +6 -3
- package/dist/{directory-config-D1uDGbWh.js → .setup/directory-config-BytTftz-.mjs} +2 -2
- package/dist/{directory-live-C5o1uKlw.js → .setup/directory-live--EGTH0DC.mjs} +4 -4
- package/dist/{discord-CmL3ati-.js → .setup/discord-BXpHW-cu.mjs} +89 -39
- package/dist/{doctor-DgKMH6N7.js → .setup/doctor-D1R-uFIu.mjs} +6 -6
- package/dist/{handle-action.guild-admin-CpEwox_X.js → .setup/handle-action.guild-admin-DcFa8NwA.mjs} +10 -5
- package/dist/{live-policy-config-BblutQAq.js → .setup/live-policy-config-eKQ-PLdy.mjs} +1 -1
- package/dist/{message-handler-C7FZGKa8.js → .setup/message-handler-X6ejmbtY.mjs} +25 -14
- package/dist/{message-handler.preflight-DFpwDW2W.js → .setup/message-handler.preflight-DE_POxFc.mjs} +35 -125
- package/dist/.setup/message-handler.preflight-pluralkit-8Xji34AF.mjs +143 -0
- package/dist/{message-handler.process-ZKrmmA9D.js → .setup/message-handler.process-CCmIVnxy.mjs} +438 -378
- package/dist/{outbound-adapter-C8PTt7_p.js → .setup/outbound-adapter-ClIgmu4F.mjs} +13 -9
- package/dist/{outbound-session-route-B0N6os97.js → .setup/outbound-session-route-VulUE0yV.mjs} +138 -11
- package/dist/{pluralkit-BiUW53Yn.js → .setup/pluralkit-CdAt1G0P.mjs} +2 -2
- package/dist/{preflight-audio-DrnqFA8U.js → .setup/preflight-audio-DHGIHEpv.mjs} +2 -1
- package/dist/{probe-BcoN44eK.js → .setup/probe-CupW4we4.mjs} +14 -10
- package/dist/{probe.runtime-BnuED0fI.js → .setup/probe.runtime-DBQ_AGPe.mjs} +1 -1
- package/dist/{provider-DmRHCZ_K.js → .setup/provider-iOf73HW-.mjs} +885 -557
- package/dist/{provider-session.runtime-U1M8_EYY.js → .setup/provider-session.runtime-DrGAYnZv.mjs} +4 -4
- package/dist/.setup/provider.runtime-BmjW_pIw.mjs +2 -0
- package/dist/{realtime-session.runtime-Bjsk9Q5t.js → .setup/realtime-session.runtime-Dz8uVutq.mjs} +977 -514
- package/dist/.setup/receive-recovery-DHst8WRx.mjs +517 -0
- package/dist/{resolve-allowlist-common-ChPf0Qy7.js → .setup/resolve-allowlist-common-CwMBzbx9.mjs} +3 -3
- package/dist/{resolve-channels-VbpLmUS8.js → .setup/resolve-channels-BbvsLQOZ.mjs} +4 -5
- package/dist/{resolve-users-D-wRFsd5.js → .setup/resolve-users-ByFlR7LQ.mjs} +3 -3
- package/dist/{retry-DKeoT7UO.js → .setup/retry-BEYkDy0P.mjs} +106 -19
- package/dist/{runtime-Dxl-ZOvg.js → .setup/runtime-B8lJfyrA.mjs} +113 -141
- package/dist/{runtime-CbknwoBH.js → .setup/runtime-DisDbixd.mjs} +2 -2
- package/dist/{security-audit-DKfK-iPY.js → .setup/security-audit-s5w50-Ly.mjs} +1 -1
- package/dist/{security-audit.runtime-sKZyKgpx.js → .setup/security-audit.runtime-DHtYenx9.mjs} +1 -1
- package/dist/{send-CLpzfzJe.js → .setup/send-CIBzvXjS.mjs} +80 -37
- package/dist/{send.components-BWnkX4QN.js → .setup/send.components-ChY21qr-.mjs} +87 -65
- package/dist/{send.outbound-BVTWrl_4.js → .setup/send.outbound-QTyuFupn.mjs} +30 -21
- package/dist/{send.shared-BHPM3CSl.js → .setup/send.shared-VNvWfX2T.mjs} +15 -12
- package/dist/{sender-identity-f3l5OYgV.js → .setup/sender-identity-0Ymgvmaj.mjs} +1 -1
- package/dist/.setup/setup-plugin-api-Dvr41dyx.mjs +3 -0
- package/dist/{shared-CPPR0Xo4.js → .setup/shared-DHPDaMSx.mjs} +11 -11
- package/dist/{subagent-hooks-DfsiwCec.js → .setup/subagent-hooks-CjW7r8Pe.mjs} +16 -4
- package/dist/{system-events-B6HkUhF_.js → .setup/system-events-B2YEEMbS.mjs} +2 -2
- package/dist/{target-resolver-CoFQ7iSX.js → .setup/target-resolver-BXpy6VT8.mjs} +4 -4
- package/dist/.setup/targets-CvemhN3i.mjs +3 -0
- package/dist/{thread-bindings-uudC_0TY.js → .setup/thread-bindings-CEh2dhqP.mjs} +6 -6
- package/dist/{thread-bindings.manager-BeUxc8nr.js → .setup/thread-bindings.manager-ve-i6oqt.mjs} +100 -46
- package/dist/{thread-bindings.session-updates-BwkXpcy0.js → .setup/thread-bindings.session-updates-DCQq1WZ5.mjs} +1 -1
- package/dist/{thread-bindings.state-dDn-dwBw.js → .setup/thread-bindings.state-BThFQEga.mjs} +46 -14
- package/dist/{transcripts-source-VkgenQv-.js → .setup/transcripts-source-DVegW0WI.mjs} +121 -30
- package/dist/{typing-DuBg1U8Q.js → .setup/typing-BKZL5fGj.mjs} +2 -2
- package/dist/{voice-runtime-DMYDMkJx.js → .setup/voice-runtime-elTtjEIG.mjs} +773 -773
- package/dist/account-inspect-api.js +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/activities-api.js +1 -1
- package/dist/api.js +19 -19
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +4 -4
- package/dist/index.js +1 -1
- package/dist/runtime-api.js +22 -22
- package/dist/runtime-setter-api.js +1 -1
- 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/session-key-api.js +1 -1
- package/dist/setup-entry.js +2 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/src/voice/audio-worker.runtime.js +1065 -0
- package/dist/subagent-hooks-api.js +5 -4
- package/dist/thread-binding-api.js +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/node_modules/@napi-rs/wasm-runtime/dist/emnapi-plugins.cjs +8 -4
- package/node_modules/@napi-rs/wasm-runtime/dist/emnapi-plugins.js +8 -4
- package/node_modules/@napi-rs/wasm-runtime/dist/fs-proxy.cjs +1 -1
- package/node_modules/@napi-rs/wasm-runtime/dist/fs.js +770 -695
- package/node_modules/@napi-rs/wasm-runtime/fs-proxy.js +3 -2
- package/node_modules/@napi-rs/wasm-runtime/package.json +1 -1
- package/node_modules/@tybys/wasm-util/LICENSE +21 -0
- package/node_modules/@tybys/wasm-util/package.json +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/buffer.d.ts +1 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
- package/node_modules/@types/node/ffi.d.ts +1 -1
- package/node_modules/@types/node/http.d.ts +1 -1
- package/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/node/perf_hooks.d.ts +31 -19
- package/node_modules/@types/node/quic.d.ts +6 -4
- package/node_modules/@types/node/stream/web.d.ts +20 -0
- package/node_modules/@types/node/tls.d.ts +26 -15
- package/node_modules/@types/node/vfs.d.ts +7 -6
- package/node_modules/@types/node/web-globals/streams.d.ts +4 -0
- package/node_modules/@types/node/zlib.d.ts +17 -0
- package/node_modules/discord-api-types/README.md +3 -2
- package/node_modules/discord-api-types/package.json +46 -46
- package/node_modules/discord-api-types/rest/v10/interactions.d.ts +1 -0
- package/node_modules/discord-api-types/rest/v10/interactions.d.ts.map +1 -1
- package/node_modules/discord-api-types/rest/v9/interactions.d.ts +1 -0
- package/node_modules/discord-api-types/rest/v9/interactions.d.ts.map +1 -1
- package/node_modules/libopus-wasm/CHANGELOG.md +15 -0
- package/node_modules/libopus-wasm/README.md +1 -1
- package/node_modules/libopus-wasm/dist/discordjs.d.ts.map +1 -1
- package/node_modules/libopus-wasm/dist/generated/libopus.generated.mjs +0 -0
- package/node_modules/libopus-wasm/dist/index.d.ts.map +1 -1
- package/node_modules/libopus-wasm/dist/index.js +37 -18
- package/node_modules/libopus-wasm/package.json +13 -13
- package/node_modules/typebox/build/compile/validator.d.mts +1 -1
- package/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
- package/node_modules/typebox/build/format/iri.mjs +5 -1
- package/node_modules/typebox/build/guard/emit.mjs +2 -4
- package/node_modules/typebox/build/guard/guard.mjs +6 -18
- package/node_modules/typebox/build/guard/string.mjs +16 -24
- package/node_modules/typebox/build/schema/build.mjs +2 -2
- package/node_modules/typebox/build/schema/check.mjs +1 -1
- package/node_modules/typebox/build/schema/compile.d.mts +3 -2
- package/node_modules/typebox/build/schema/compile.mjs +8 -8
- package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
- package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
- package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
- package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
- package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
- package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
- package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
- package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
- package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
- package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
- package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
- package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
- package/node_modules/typebox/build/schema/errors.d.mts +2 -2
- package/node_modules/typebox/build/schema/errors.mjs +8 -14
- package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
- package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
- package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
- package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
- package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
- package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
- package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
- package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
- package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
- package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
- package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
- package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
- package/node_modules/typebox/build/schema/parse.d.mts +1 -0
- package/node_modules/typebox/build/schema/parse.mjs +10 -5
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
- package/node_modules/typebox/build/schema/schema.d.mts +2 -0
- package/node_modules/typebox/build/schema/schema.mjs +2 -0
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
- package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +59 -89
- package/node_modules/undici-types/client.d.ts +8 -3
- package/node_modules/undici-types/connector.d.ts +1 -0
- package/node_modules/undici-types/cookies.d.ts +1 -1
- package/node_modules/undici-types/dispatcher.d.ts +3 -3
- package/node_modules/undici-types/errors.d.ts +10 -0
- package/node_modules/undici-types/fetch.d.ts +5 -1
- package/node_modules/undici-types/handlers.d.ts +2 -0
- package/node_modules/undici-types/interceptors.d.ts +1 -1
- package/node_modules/undici-types/mock-interceptor.d.ts +5 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/proxy-agent.d.ts +7 -0
- package/node_modules/zod/README.md +29 -2
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +21 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +20 -8
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +59 -44
- package/node_modules/zod/src/v4/classic/external.ts +14 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +10 -4
- package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +87 -35
- package/node_modules/zod/src/v4/core/checks.ts +119 -146
- package/node_modules/zod/src/v4/core/compile.ts +2313 -0
- package/node_modules/zod/src/v4/core/core.ts +99 -22
- package/node_modules/zod/src/v4/core/doc.ts +17 -9
- package/node_modules/zod/src/v4/core/errors.ts +113 -25
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +164 -50
- package/node_modules/zod/src/v4/core/regexes.ts +42 -15
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +1000 -538
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
- package/node_modules/zod/src/v4/core/util.ts +454 -157
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +5 -0
- package/node_modules/zod/src/v4/locales/az.ts +5 -0
- package/node_modules/zod/src/v4/locales/be.ts +12 -0
- package/node_modules/zod/src/v4/locales/bg.ts +5 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +5 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +5 -0
- package/node_modules/zod/src/v4/locales/da.ts +7 -2
- package/node_modules/zod/src/v4/locales/de.ts +5 -0
- package/node_modules/zod/src/v4/locales/el.ts +3 -0
- package/node_modules/zod/src/v4/locales/en.ts +17 -4
- package/node_modules/zod/src/v4/locales/eo.ts +5 -0
- package/node_modules/zod/src/v4/locales/es.ts +4 -0
- package/node_modules/zod/src/v4/locales/fa.ts +5 -0
- package/node_modules/zod/src/v4/locales/fi.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr.ts +21 -14
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +8 -1
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +4 -0
- package/node_modules/zod/src/v4/locales/hu.ts +5 -0
- package/node_modules/zod/src/v4/locales/hy.ts +11 -0
- package/node_modules/zod/src/v4/locales/id.ts +5 -0
- package/node_modules/zod/src/v4/locales/index.ts +11 -0
- package/node_modules/zod/src/v4/locales/is.ts +5 -0
- package/node_modules/zod/src/v4/locales/it.ts +5 -0
- package/node_modules/zod/src/v4/locales/ja.ts +5 -0
- package/node_modules/zod/src/v4/locales/ka.ts +5 -0
- package/node_modules/zod/src/v4/locales/km.ts +5 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +5 -0
- package/node_modules/zod/src/v4/locales/lt.ts +4 -0
- package/node_modules/zod/src/v4/locales/mk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ms.ts +5 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +5 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +7 -2
- package/node_modules/zod/src/v4/locales/ota.ts +5 -0
- package/node_modules/zod/src/v4/locales/pl.ts +5 -0
- package/node_modules/zod/src/v4/locales/ps.ts +5 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +101 -58
- package/node_modules/zod/src/v4/locales/ro.ts +3 -0
- package/node_modules/zod/src/v4/locales/ru.ts +12 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +5 -0
- package/node_modules/zod/src/v4/locales/sv.ts +7 -2
- package/node_modules/zod/src/v4/locales/ta.ts +5 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +5 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +5 -0
- package/node_modules/zod/src/v4/locales/uk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ur.ts +5 -0
- package/node_modules/zod/src/v4/locales/uz.ts +3 -0
- package/node_modules/zod/src/v4/locales/vi.ts +5 -0
- package/node_modules/zod/src/v4/locales/yo.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +12 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
- package/node_modules/zod/v3/ZodError.cjs +41 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +26 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +21 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +62 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +51 -27
- package/node_modules/zod/v4/classic/external.d.cts +5 -2
- package/node_modules/zod/v4/classic/external.d.ts +5 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +21 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +30 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +23 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +591 -426
- package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
- package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
- package/node_modules/zod/v4/classic/schemas.js +564 -424
- package/node_modules/zod/v4/core/api.cjs +66 -24
- package/node_modules/zod/v4/core/api.d.cts +22 -12
- package/node_modules/zod/v4/core/api.d.ts +22 -12
- package/node_modules/zod/v4/core/api.js +44 -24
- package/node_modules/zod/v4/core/checks.cjs +88 -128
- package/node_modules/zod/v4/core/checks.d.cts +29 -13
- package/node_modules/zod/v4/core/checks.d.ts +29 -13
- package/node_modules/zod/v4/core/checks.js +68 -127
- package/node_modules/zod/v4/core/compile.cjs +1908 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1858 -0
- package/node_modules/zod/v4/core/core.cjs +101 -19
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +83 -20
- package/node_modules/zod/v4/core/doc.cjs +31 -9
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +12 -9
- package/node_modules/zod/v4/core/errors.cjs +126 -25
- package/node_modules/zod/v4/core/errors.d.cts +4 -0
- package/node_modules/zod/v4/core/errors.d.ts +4 -0
- package/node_modules/zod/v4/core/errors.js +107 -25
- package/node_modules/zod/v4/core/index.cjs +24 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/parse.cjs +148 -46
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +127 -45
- package/node_modules/zod/v4/core/regexes.cjs +54 -17
- package/node_modules/zod/v4/core/regexes.d.cts +5 -0
- package/node_modules/zod/v4/core/regexes.d.ts +5 -0
- package/node_modules/zod/v4/core/regexes.js +32 -15
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +785 -386
- package/node_modules/zod/v4/core/schemas.d.cts +123 -34
- package/node_modules/zod/v4/core/schemas.d.ts +123 -34
- package/node_modules/zod/v4/core/schemas.js +753 -386
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
- package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.js +247 -44
- package/node_modules/zod/v4/core/util.cjs +372 -157
- package/node_modules/zod/v4/core/util.d.cts +79 -1
- package/node_modules/zod/v4/core/util.d.ts +79 -1
- package/node_modules/zod/v4/core/util.js +341 -156
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +34 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +5 -0
- package/node_modules/zod/v4/locales/ar.js +5 -0
- package/node_modules/zod/v4/locales/az.cjs +5 -0
- package/node_modules/zod/v4/locales/az.js +5 -0
- package/node_modules/zod/v4/locales/be.cjs +12 -0
- package/node_modules/zod/v4/locales/be.js +12 -0
- package/node_modules/zod/v4/locales/bg.cjs +5 -0
- package/node_modules/zod/v4/locales/bg.js +5 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +5 -0
- package/node_modules/zod/v4/locales/ca.js +5 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +5 -0
- package/node_modules/zod/v4/locales/cs.js +5 -0
- package/node_modules/zod/v4/locales/da.cjs +7 -2
- package/node_modules/zod/v4/locales/da.js +7 -2
- package/node_modules/zod/v4/locales/de.cjs +5 -0
- package/node_modules/zod/v4/locales/de.js +5 -0
- package/node_modules/zod/v4/locales/el.cjs +3 -0
- package/node_modules/zod/v4/locales/el.js +3 -0
- package/node_modules/zod/v4/locales/en.cjs +16 -4
- package/node_modules/zod/v4/locales/en.js +16 -4
- package/node_modules/zod/v4/locales/eo.cjs +5 -0
- package/node_modules/zod/v4/locales/eo.js +5 -0
- package/node_modules/zod/v4/locales/es.cjs +4 -0
- package/node_modules/zod/v4/locales/es.js +4 -0
- package/node_modules/zod/v4/locales/fa.cjs +5 -0
- package/node_modules/zod/v4/locales/fa.js +5 -0
- package/node_modules/zod/v4/locales/fi.cjs +5 -0
- package/node_modules/zod/v4/locales/fi.js +5 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
- package/node_modules/zod/v4/locales/fr-CA.js +5 -0
- package/node_modules/zod/v4/locales/fr.cjs +18 -14
- package/node_modules/zod/v4/locales/fr.js +18 -14
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +7 -0
- package/node_modules/zod/v4/locales/he.js +7 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +4 -0
- package/node_modules/zod/v4/locales/hr.js +4 -0
- package/node_modules/zod/v4/locales/hu.cjs +5 -0
- package/node_modules/zod/v4/locales/hu.js +5 -0
- package/node_modules/zod/v4/locales/hy.cjs +11 -0
- package/node_modules/zod/v4/locales/hy.js +11 -0
- package/node_modules/zod/v4/locales/id.cjs +5 -0
- package/node_modules/zod/v4/locales/id.js +5 -0
- package/node_modules/zod/v4/locales/index.cjs +43 -2
- package/node_modules/zod/v4/locales/index.d.cts +11 -0
- package/node_modules/zod/v4/locales/index.d.ts +11 -0
- package/node_modules/zod/v4/locales/index.js +11 -0
- package/node_modules/zod/v4/locales/is.cjs +5 -0
- package/node_modules/zod/v4/locales/is.js +5 -0
- package/node_modules/zod/v4/locales/it.cjs +5 -0
- package/node_modules/zod/v4/locales/it.js +5 -0
- package/node_modules/zod/v4/locales/ja.cjs +5 -0
- package/node_modules/zod/v4/locales/ja.js +5 -0
- package/node_modules/zod/v4/locales/ka.cjs +5 -0
- package/node_modules/zod/v4/locales/ka.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +5 -0
- package/node_modules/zod/v4/locales/km.js +5 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +5 -0
- package/node_modules/zod/v4/locales/ko.js +5 -0
- package/node_modules/zod/v4/locales/lt.cjs +4 -0
- package/node_modules/zod/v4/locales/lt.js +4 -0
- package/node_modules/zod/v4/locales/mk.cjs +5 -0
- package/node_modules/zod/v4/locales/mk.js +5 -0
- package/node_modules/zod/v4/locales/ms.cjs +5 -0
- package/node_modules/zod/v4/locales/ms.js +5 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +5 -0
- package/node_modules/zod/v4/locales/nl.js +5 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +7 -2
- package/node_modules/zod/v4/locales/no.js +7 -2
- package/node_modules/zod/v4/locales/ota.cjs +5 -0
- package/node_modules/zod/v4/locales/ota.js +5 -0
- package/node_modules/zod/v4/locales/pl.cjs +5 -0
- package/node_modules/zod/v4/locales/pl.js +5 -0
- package/node_modules/zod/v4/locales/ps.cjs +5 -0
- package/node_modules/zod/v4/locales/ps.js +5 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +89 -55
- package/node_modules/zod/v4/locales/pt.js +89 -55
- package/node_modules/zod/v4/locales/ro.cjs +3 -0
- package/node_modules/zod/v4/locales/ro.js +3 -0
- package/node_modules/zod/v4/locales/ru.cjs +12 -0
- package/node_modules/zod/v4/locales/ru.js +12 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +5 -0
- package/node_modules/zod/v4/locales/sl.js +5 -0
- package/node_modules/zod/v4/locales/sv.cjs +7 -2
- package/node_modules/zod/v4/locales/sv.js +7 -2
- package/node_modules/zod/v4/locales/ta.cjs +5 -0
- package/node_modules/zod/v4/locales/ta.js +5 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +5 -0
- package/node_modules/zod/v4/locales/th.js +5 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +5 -0
- package/node_modules/zod/v4/locales/tr.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +5 -0
- package/node_modules/zod/v4/locales/uk.js +5 -0
- package/node_modules/zod/v4/locales/ur.cjs +5 -0
- package/node_modules/zod/v4/locales/ur.js +5 -0
- package/node_modules/zod/v4/locales/uz.cjs +3 -0
- package/node_modules/zod/v4/locales/uz.js +3 -0
- package/node_modules/zod/v4/locales/vi.cjs +5 -0
- package/node_modules/zod/v4/locales/vi.js +5 -0
- package/node_modules/zod/v4/locales/yo.cjs +5 -0
- package/node_modules/zod/v4/locales/yo.js +5 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-CN.js +5 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-TW.js +5 -0
- package/node_modules/zod/v4/mini/checks.cjs +21 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +33 -1
- package/node_modules/zod/v4/mini/external.d.cts +5 -2
- package/node_modules/zod/v4/mini/external.d.ts +5 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +22 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +117 -53
- package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
- package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
- package/node_modules/zod/v4/mini/schemas.js +92 -51
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/openclaw.plugin.json +3 -4
- package/package.json +13 -8
- package/dist/channel-type-CVLZyGYS.js +0 -7
- package/dist/message-handler.history-CJOsN9w5.js +0 -28
- package/dist/outbound-components-DrlHcWfM.js +0 -100
- package/dist/provider.runtime-CqfE-RvC.js +0 -2
- package/dist/targets-Cm6aV9nJ.js +0 -3
- package/node_modules/discord-api-types/CHANGELOG.md +0 -2514
- package/node_modules/discord-api-types/scripts/versions.mjs +0 -46
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- /package/dist/{accounts-CwJQoLjM.js → .setup/accounts-CwJQoLjM.mjs} +0 -0
- /package/dist/{active-turn-thread-route-fmHl1HNd.js → .setup/active-turn-thread-route-fmHl1HNd.mjs} +0 -0
- /package/dist/{agent-components.runtime-CEPrf2SY.js → .setup/agent-components.runtime-CEPrf2SY.mjs} +0 -0
- /package/dist/{channel-access-C12aDZ0p.js → .setup/channel-access-C12aDZ0p.mjs} +0 -0
- /package/dist/{command-deploy-store-DFkBTViB.js → .setup/command-deploy-store-DFkBTViB.mjs} +0 -0
- /package/dist/{command-owners-D78sAoOz.js → .setup/command-owners-D78sAoOz.mjs} +0 -0
- /package/dist/{doctor-contract-Co5vRCZ6.js → .setup/doctor-contract-Co5vRCZ6.mjs} +0 -0
- /package/dist/{model-picker-preference-primitives-BHT1LkR_.js → .setup/model-picker-preference-primitives-BHT1LkR_.mjs} +0 -0
- /package/dist/{presence-cache-dYSHPWMx.js → .setup/presence-cache-dYSHPWMx.mjs} +0 -0
- /package/dist/{runtime-DgnVQ7zW.js → .setup/runtime-DgnVQ7zW.mjs} +0 -0
- /package/dist/{secret-config-contract-DFu9hfU8.js → .setup/secret-config-contract-DFu9hfU8.mjs} +0 -0
- /package/dist/{security-contract-DSHk7I2w.js → .setup/security-contract-DSHk7I2w.mjs} +0 -0
- /package/dist/{security-doctor-nGgPm65L.js → .setup/security-doctor-nGgPm65L.mjs} +0 -0
- /package/dist/{session-contract-BO5tlIdl.js → .setup/session-contract-BO5tlIdl.mjs} +0 -0
- /package/dist/{session-key-normalization-wJgsKPNF.js → .setup/session-key-normalization-wJgsKPNF.mjs} +0 -0
- /package/dist/{thread-binding-api-BDZJD4na.js → .setup/thread-binding-api-BDZJD4na.mjs} +0 -0
- /package/dist/{timeouts-D86uWLt_.js → .setup/timeouts-D86uWLt_.mjs} +0 -0
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
2
|
+
import { logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
3
|
+
import { Duplex } from "node:stream";
|
|
4
|
+
import { spawn } from "node:child_process";
|
|
5
|
+
import { StringDecoder } from "node:string_decoder";
|
|
6
|
+
import { Application, OpusError, createDecoder, createEncoder } from "libopus-wasm";
|
|
7
|
+
import { resolveFfmpegBin } from "openclaw/plugin-sdk/media-runtime";
|
|
8
|
+
import { createStreamingPcmResampler } from "openclaw/plugin-sdk/realtime-voice-provider";
|
|
9
|
+
import { resolvePreferredOpenClawTmpDir, tempWorkspace } from "openclaw/plugin-sdk/temp-path";
|
|
10
|
+
//#region extensions/discord/src/voice/audio-worker-protocol.ts
|
|
11
|
+
const DISCORD_AUDIO_OUTPUT_STATUS = 1;
|
|
12
|
+
const DiscordAudioOutputStatus = {
|
|
13
|
+
Buffering: 0n,
|
|
14
|
+
Playing: 1n,
|
|
15
|
+
Retiring: 2n,
|
|
16
|
+
Closed: 3n
|
|
17
|
+
};
|
|
18
|
+
const OUTPUT_STATUS_MASK = 3n;
|
|
19
|
+
const OUTPUT_INPUT_RESERVATION = 4n;
|
|
20
|
+
function getDiscordAudioOutputStatus(clock) {
|
|
21
|
+
return Atomics.load(clock, DISCORD_AUDIO_OUTPUT_STATUS) & OUTPUT_STATUS_MASK;
|
|
22
|
+
}
|
|
23
|
+
function setDiscordAudioOutputStatus(clock, status) {
|
|
24
|
+
for (;;) {
|
|
25
|
+
const current = Atomics.load(clock, DISCORD_AUDIO_OUTPUT_STATUS);
|
|
26
|
+
if ((current & OUTPUT_STATUS_MASK) >= status) return;
|
|
27
|
+
const next = current & -4n | status;
|
|
28
|
+
if (Atomics.compareExchange(clock, DISCORD_AUDIO_OUTPUT_STATUS, current, next) === current) return;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function admitDiscordAudioInput(clock) {
|
|
32
|
+
for (;;) {
|
|
33
|
+
const current = Atomics.load(clock, DISCORD_AUDIO_OUTPUT_STATUS);
|
|
34
|
+
if ((current & OUTPUT_STATUS_MASK) >= DiscordAudioOutputStatus.Retiring) return false;
|
|
35
|
+
if (Atomics.compareExchange(clock, DISCORD_AUDIO_OUTPUT_STATUS, current, current + OUTPUT_INPUT_RESERVATION) === current) return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function releaseDiscordAudioInput(clock) {
|
|
39
|
+
Atomics.sub(clock, DISCORD_AUDIO_OUTPUT_STATUS, OUTPUT_INPUT_RESERVATION);
|
|
40
|
+
}
|
|
41
|
+
function retireDiscordAudioOutput(clock) {
|
|
42
|
+
for (;;) {
|
|
43
|
+
const current = Atomics.load(clock, DISCORD_AUDIO_OUTPUT_STATUS);
|
|
44
|
+
if ((current & OUTPUT_STATUS_MASK) >= DiscordAudioOutputStatus.Retiring) return true;
|
|
45
|
+
if (current >= OUTPUT_INPUT_RESERVATION) return false;
|
|
46
|
+
if (Atomics.compareExchange(clock, DISCORD_AUDIO_OUTPUT_STATUS, current, DiscordAudioOutputStatus.Retiring) === current) return true;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function serializeDiscordAudioError(error) {
|
|
50
|
+
if (!(error instanceof Error)) return {
|
|
51
|
+
name: "Error",
|
|
52
|
+
message: String(error)
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
name: error.name,
|
|
56
|
+
message: error.message,
|
|
57
|
+
..."code" in error && typeof error.code === "number" ? { code: error.code } : {},
|
|
58
|
+
..."codeName" in error && typeof error.codeName === "string" ? { codeName: error.codeName } : {},
|
|
59
|
+
..."operation" in error && typeof error.operation === "string" ? { operation: error.operation } : {}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function restoreDiscordAudioError(error) {
|
|
63
|
+
return Object.assign(new Error(error.message), error);
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region extensions/discord/src/voice/audio.ts
|
|
67
|
+
const SAMPLE_RATE = 48e3;
|
|
68
|
+
const CHANNELS = 2;
|
|
69
|
+
const BIT_DEPTH = 16;
|
|
70
|
+
const FFMPEG_ERROR_OUTPUT_BYTES = 8192;
|
|
71
|
+
const DISCORD_OPUS_FRAME_SIZE = 960;
|
|
72
|
+
const DISCORD_OPUS_MAX_DECODE_FRAME_SIZE = SAMPLE_RATE * 120 / 1e3;
|
|
73
|
+
const DISCORD_OPUS_ENCODE_BATCH_FRAMES = 8;
|
|
74
|
+
const DISCORD_OPUS_FRAME_BYTES = DISCORD_OPUS_FRAME_SIZE * CHANNELS * (BIT_DEPTH / 8);
|
|
75
|
+
const FFMPEG_PCM_ARGUMENTS = [
|
|
76
|
+
"-analyzeduration",
|
|
77
|
+
"0",
|
|
78
|
+
"-loglevel",
|
|
79
|
+
"error",
|
|
80
|
+
"-vn",
|
|
81
|
+
"-sn",
|
|
82
|
+
"-dn",
|
|
83
|
+
"-f",
|
|
84
|
+
"s16le",
|
|
85
|
+
"-ar",
|
|
86
|
+
String(SAMPLE_RATE),
|
|
87
|
+
"-ac",
|
|
88
|
+
String(CHANNELS)
|
|
89
|
+
];
|
|
90
|
+
let warnedOpusMissing = false;
|
|
91
|
+
function buildWavBuffer(chunks) {
|
|
92
|
+
const pcmBytes = chunks.reduce((total, chunk) => total + chunk.length, 0);
|
|
93
|
+
const blockAlign = 4;
|
|
94
|
+
const byteRate = SAMPLE_RATE * blockAlign;
|
|
95
|
+
const wav = Buffer.allocUnsafe(44 + pcmBytes);
|
|
96
|
+
const header = wav.subarray(0, 44);
|
|
97
|
+
header.write("RIFF", 0);
|
|
98
|
+
header.writeUInt32LE(36 + pcmBytes, 4);
|
|
99
|
+
header.write("WAVE", 8);
|
|
100
|
+
header.write("fmt ", 12);
|
|
101
|
+
header.writeUInt32LE(16, 16);
|
|
102
|
+
header.writeUInt16LE(1, 20);
|
|
103
|
+
header.writeUInt16LE(CHANNELS, 22);
|
|
104
|
+
header.writeUInt32LE(SAMPLE_RATE, 24);
|
|
105
|
+
header.writeUInt32LE(byteRate, 28);
|
|
106
|
+
header.writeUInt16LE(blockAlign, 32);
|
|
107
|
+
header.writeUInt16LE(BIT_DEPTH, 34);
|
|
108
|
+
header.write("data", 36);
|
|
109
|
+
header.writeUInt32LE(pcmBytes, 40);
|
|
110
|
+
let offset = 44;
|
|
111
|
+
for (const chunk of chunks) offset += chunk.copy(wav, offset);
|
|
112
|
+
return wav;
|
|
113
|
+
}
|
|
114
|
+
function createDiscordOpusEncodeStream() {
|
|
115
|
+
return new DiscordOpusEncodeStream();
|
|
116
|
+
}
|
|
117
|
+
function createDiscordOpusPlaybackStream(input) {
|
|
118
|
+
const inputSource = typeof input === "string" ? input : "pipe:0";
|
|
119
|
+
const ffmpeg = spawn(resolveFfmpegBin(), [
|
|
120
|
+
"-i",
|
|
121
|
+
inputSource,
|
|
122
|
+
...FFMPEG_PCM_ARGUMENTS,
|
|
123
|
+
"pipe:1"
|
|
124
|
+
], {
|
|
125
|
+
stdio: [
|
|
126
|
+
"pipe",
|
|
127
|
+
"pipe",
|
|
128
|
+
"pipe"
|
|
129
|
+
],
|
|
130
|
+
windowsHide: true
|
|
131
|
+
});
|
|
132
|
+
const opusStream = createDiscordOpusEncodeStream();
|
|
133
|
+
const stderr = Buffer.alloc(FFMPEG_ERROR_OUTPUT_BYTES);
|
|
134
|
+
let stderrBytes = 0;
|
|
135
|
+
let ffmpegClosed = false;
|
|
136
|
+
const killFfmpeg = (signal = "SIGTERM") => {
|
|
137
|
+
if (!ffmpegClosed && !ffmpeg.killed) ffmpeg.kill(signal);
|
|
138
|
+
};
|
|
139
|
+
ffmpeg.stderr.on("data", (chunk) => {
|
|
140
|
+
if (stderrBytes < FFMPEG_ERROR_OUTPUT_BYTES) stderrBytes += chunk.copy(stderr, stderrBytes, 0, FFMPEG_ERROR_OUTPUT_BYTES - stderrBytes);
|
|
141
|
+
});
|
|
142
|
+
ffmpeg.once("error", (err) => {
|
|
143
|
+
opusStream.destroy(err);
|
|
144
|
+
});
|
|
145
|
+
ffmpeg.once("close", (code, signal) => {
|
|
146
|
+
ffmpegClosed = true;
|
|
147
|
+
if (code && code !== 0) {
|
|
148
|
+
const stderrText = new StringDecoder("utf8").write(stderr.subarray(0, stderrBytes)).trim();
|
|
149
|
+
const suffix = stderrText ? `: ${stderrText}` : "";
|
|
150
|
+
opusStream.destroy(/* @__PURE__ */ new Error(`ffmpeg exited with code ${code}${suffix}`));
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (signal) opusStream.destroy(/* @__PURE__ */ new Error(`ffmpeg exited with signal ${signal}`));
|
|
154
|
+
});
|
|
155
|
+
for (const readable of [ffmpeg.stdout, ffmpeg.stderr]) readable.on("error", (err) => {
|
|
156
|
+
killFfmpeg("SIGKILL");
|
|
157
|
+
opusStream.destroy(err);
|
|
158
|
+
});
|
|
159
|
+
ffmpeg.stdin.on("error", (err) => {
|
|
160
|
+
if (err.code !== "EPIPE") opusStream.destroy(err);
|
|
161
|
+
});
|
|
162
|
+
ffmpeg.stdout.pipe(opusStream);
|
|
163
|
+
opusStream.once("close", () => {
|
|
164
|
+
if (!opusStream.readableEnded) killFfmpeg();
|
|
165
|
+
});
|
|
166
|
+
if (typeof input !== "string") {
|
|
167
|
+
input.on("error", (err) => {
|
|
168
|
+
ffmpeg.stdin.destroy(err);
|
|
169
|
+
opusStream.destroy(err);
|
|
170
|
+
});
|
|
171
|
+
input.pipe(ffmpeg.stdin);
|
|
172
|
+
} else ffmpeg.stdin.end();
|
|
173
|
+
return opusStream;
|
|
174
|
+
}
|
|
175
|
+
var DiscordOpusEncodeStream = class extends Duplex {
|
|
176
|
+
#partialFrame = Buffer.alloc(DISCORD_OPUS_FRAME_BYTES);
|
|
177
|
+
#partialBytes = 0;
|
|
178
|
+
#pending;
|
|
179
|
+
#scheduled;
|
|
180
|
+
#readBlocked = false;
|
|
181
|
+
#partialFlushRequested = false;
|
|
182
|
+
#encoder;
|
|
183
|
+
#packetPcmBytes = /* @__PURE__ */ new WeakMap();
|
|
184
|
+
constructor() {
|
|
185
|
+
super({ readableObjectMode: true });
|
|
186
|
+
}
|
|
187
|
+
_construct(done) {
|
|
188
|
+
createEncoder({
|
|
189
|
+
application: Application.Audio,
|
|
190
|
+
channels: CHANNELS,
|
|
191
|
+
sampleRate: SAMPLE_RATE
|
|
192
|
+
}).then((encoder) => {
|
|
193
|
+
this.#encoder = encoder;
|
|
194
|
+
done();
|
|
195
|
+
}, (err) => done(err instanceof Error ? err : new Error(formatErrorMessage(err))));
|
|
196
|
+
}
|
|
197
|
+
_write(chunk, _encoding, done) {
|
|
198
|
+
this.#pending = {
|
|
199
|
+
chunk,
|
|
200
|
+
offset: 0,
|
|
201
|
+
done
|
|
202
|
+
};
|
|
203
|
+
this.#schedule();
|
|
204
|
+
}
|
|
205
|
+
_read() {
|
|
206
|
+
this.#readBlocked = false;
|
|
207
|
+
this.#schedule();
|
|
208
|
+
}
|
|
209
|
+
#schedule() {
|
|
210
|
+
if (this.destroyed || this.#scheduled || this.#readBlocked || !this.#pending) return;
|
|
211
|
+
this.#scheduled = setImmediate(() => {
|
|
212
|
+
this.#scheduled = void 0;
|
|
213
|
+
this.#encodeBatch();
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
#encodeBatch() {
|
|
217
|
+
const pending = this.#pending;
|
|
218
|
+
if (!pending || this.destroyed) return;
|
|
219
|
+
try {
|
|
220
|
+
for (let count = 0; count < DISCORD_OPUS_ENCODE_BATCH_FRAMES; count += 1) {
|
|
221
|
+
const remainingBytes = pending.chunk.length - pending.offset;
|
|
222
|
+
if (this.#partialBytes > 0 || remainingBytes < DISCORD_OPUS_FRAME_BYTES) {
|
|
223
|
+
const copied = pending.chunk.copy(this.#partialFrame, this.#partialBytes, pending.offset, pending.offset + DISCORD_OPUS_FRAME_BYTES - this.#partialBytes);
|
|
224
|
+
pending.offset += copied;
|
|
225
|
+
this.#partialBytes += copied;
|
|
226
|
+
if (this.#partialBytes < DISCORD_OPUS_FRAME_BYTES) {
|
|
227
|
+
this.#pending = void 0;
|
|
228
|
+
pending.done();
|
|
229
|
+
this.#flushRequestedPartialFrame();
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
this.#partialBytes = 0;
|
|
233
|
+
this.#readBlocked = !this.#encodeFrame(this.#partialFrame);
|
|
234
|
+
} else {
|
|
235
|
+
const frame = pending.chunk.subarray(pending.offset, pending.offset + DISCORD_OPUS_FRAME_BYTES);
|
|
236
|
+
pending.offset += DISCORD_OPUS_FRAME_BYTES;
|
|
237
|
+
this.#readBlocked = !this.#encodeFrame(frame);
|
|
238
|
+
}
|
|
239
|
+
if (this.destroyed || this.#readBlocked) return;
|
|
240
|
+
}
|
|
241
|
+
this.#schedule();
|
|
242
|
+
} catch (err) {
|
|
243
|
+
this.#pending = void 0;
|
|
244
|
+
pending.done(err instanceof Error ? err : new Error(formatErrorMessage(err)));
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
_final(done) {
|
|
248
|
+
try {
|
|
249
|
+
this.flushPartialFrame();
|
|
250
|
+
this.push(null);
|
|
251
|
+
done();
|
|
252
|
+
} catch (err) {
|
|
253
|
+
done(err instanceof Error ? err : new Error(formatErrorMessage(err)));
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
flushPartialFrameWhenReady() {
|
|
257
|
+
this.#partialFlushRequested = true;
|
|
258
|
+
if (this.#partialBytes > 0) this.#flushRequestedPartialFrame();
|
|
259
|
+
}
|
|
260
|
+
#flushRequestedPartialFrame() {
|
|
261
|
+
if (!this.#partialFlushRequested || this.#pending || this.writableLength > 0) return;
|
|
262
|
+
this.#partialFlushRequested = false;
|
|
263
|
+
try {
|
|
264
|
+
this.flushPartialFrame();
|
|
265
|
+
} catch (error) {
|
|
266
|
+
this.destroy(error instanceof Error ? error : new Error(formatErrorMessage(error)));
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
flushPartialFrame() {
|
|
270
|
+
if (this.destroyed || this.#pending || this.#partialBytes === 0) return false;
|
|
271
|
+
const pcmBytes = this.#partialBytes;
|
|
272
|
+
this.#partialFrame.fill(0, pcmBytes);
|
|
273
|
+
this.#partialBytes = 0;
|
|
274
|
+
this.#readBlocked = !this.#encodeFrame(this.#partialFrame, pcmBytes);
|
|
275
|
+
return true;
|
|
276
|
+
}
|
|
277
|
+
takePcmBytes(packet) {
|
|
278
|
+
const bytes = this.#packetPcmBytes.get(packet) ?? 0;
|
|
279
|
+
this.#packetPcmBytes.delete(packet);
|
|
280
|
+
return bytes;
|
|
281
|
+
}
|
|
282
|
+
_destroy(err, done) {
|
|
283
|
+
this.#encoder?.free();
|
|
284
|
+
clearImmediate(this.#scheduled);
|
|
285
|
+
this.#scheduled = void 0;
|
|
286
|
+
this.#partialFlushRequested = false;
|
|
287
|
+
const pending = this.#pending;
|
|
288
|
+
this.#pending = void 0;
|
|
289
|
+
pending?.done(err ?? /* @__PURE__ */ new Error("Discord Opus encoder was destroyed"));
|
|
290
|
+
this.#partialBytes = 0;
|
|
291
|
+
this.#partialFrame = Buffer.alloc(0);
|
|
292
|
+
done(err);
|
|
293
|
+
}
|
|
294
|
+
#encodeFrame(frame, pcmBytes = frame.length) {
|
|
295
|
+
const packet = Buffer.from(this.#encoder.encode(frame, { frameSize: DISCORD_OPUS_FRAME_SIZE }));
|
|
296
|
+
this.#packetPcmBytes.set(packet, pcmBytes);
|
|
297
|
+
return this.push(packet);
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
function pcmInt16ToBuffer(pcm) {
|
|
301
|
+
return Buffer.from(pcm.buffer, pcm.byteOffset, pcm.byteLength);
|
|
302
|
+
}
|
|
303
|
+
async function decodeOpusStreamChunks(stream, params) {
|
|
304
|
+
try {
|
|
305
|
+
for await (const { pcm, packet } of decodeOpusFrames(stream, params)) await params.onChunk(pcm, packet);
|
|
306
|
+
} catch (err) {
|
|
307
|
+
params.onError?.(err);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
async function* decodeOpusFrames(stream, params) {
|
|
311
|
+
let decoder;
|
|
312
|
+
try {
|
|
313
|
+
decoder = await createDecoder({
|
|
314
|
+
channels: CHANNELS,
|
|
315
|
+
sampleRate: SAMPLE_RATE
|
|
316
|
+
});
|
|
317
|
+
} catch (err) {
|
|
318
|
+
params.onError?.(err);
|
|
319
|
+
if (!warnedOpusMissing) {
|
|
320
|
+
warnedOpusMissing = true;
|
|
321
|
+
params.onWarn(`discord voice: no usable opus decoder available (libopus-wasm: ${formatErrorMessage(err)}); cannot decode voice audio`);
|
|
322
|
+
}
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
params.onVerbose("opus decoder: libopus-wasm");
|
|
326
|
+
try {
|
|
327
|
+
for await (const chunk of stream) {
|
|
328
|
+
if (!chunk || !(chunk instanceof Buffer) || chunk.length === 0) continue;
|
|
329
|
+
const decoded = decoder.decode(chunk, { maxFrameSize: DISCORD_OPUS_MAX_DECODE_FRAME_SIZE });
|
|
330
|
+
if (decoded.length > 0) yield {
|
|
331
|
+
pcm: pcmInt16ToBuffer(decoded),
|
|
332
|
+
packet: chunk
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
} catch (err) {
|
|
336
|
+
params.onError?.(err);
|
|
337
|
+
if (shouldLogVerbose()) logVerbose(`discord voice: opus decode failed: ${formatErrorMessage(err)}`);
|
|
338
|
+
} finally {
|
|
339
|
+
decoder.free();
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
function createDiscordPcmToRealtimeConverter() {
|
|
343
|
+
const resampler = createStreamingPcmResampler(SAMPLE_RATE, 24e3);
|
|
344
|
+
let trailingFrame = Buffer.alloc(0);
|
|
345
|
+
return {
|
|
346
|
+
process(pcm) {
|
|
347
|
+
const input = trailingFrame.length > 0 ? Buffer.concat([trailingFrame, pcm]) : pcm;
|
|
348
|
+
const completeBytes = input.length - input.length % 4;
|
|
349
|
+
trailingFrame = Buffer.from(input.subarray(completeBytes));
|
|
350
|
+
const mono = Buffer.alloc(completeBytes / 2);
|
|
351
|
+
for (let offset = 0; offset < completeBytes; offset += 4) mono.writeInt16LE(Math.round((input.readInt16LE(offset) + input.readInt16LE(offset + 2)) / 2), offset / 2);
|
|
352
|
+
return resampler.process(mono);
|
|
353
|
+
},
|
|
354
|
+
flush() {
|
|
355
|
+
trailingFrame = Buffer.alloc(0);
|
|
356
|
+
return resampler.flush();
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
function duplicateMonoChannels(mono) {
|
|
361
|
+
const stereo = Buffer.alloc(mono.length * 2);
|
|
362
|
+
for (let offset = 0; offset < mono.length; offset += 2) {
|
|
363
|
+
const sample = mono.readInt16LE(offset);
|
|
364
|
+
stereo.writeInt16LE(sample, offset * 2);
|
|
365
|
+
stereo.writeInt16LE(sample, offset * 2 + 2);
|
|
366
|
+
}
|
|
367
|
+
return stereo;
|
|
368
|
+
}
|
|
369
|
+
function createRealtimePcmToDiscordConverter() {
|
|
370
|
+
let resampler = createStreamingPcmResampler(24e3, SAMPLE_RATE);
|
|
371
|
+
let history = Buffer.alloc(0);
|
|
372
|
+
let trailingByte = Buffer.alloc(0);
|
|
373
|
+
let replayBytes = 0;
|
|
374
|
+
let flushed = false;
|
|
375
|
+
const takeOutput = (pcm) => {
|
|
376
|
+
const skippedBytes = Math.min(replayBytes, pcm.length);
|
|
377
|
+
replayBytes -= skippedBytes;
|
|
378
|
+
return duplicateMonoChannels(pcm.subarray(skippedBytes));
|
|
379
|
+
};
|
|
380
|
+
return {
|
|
381
|
+
process(pcm) {
|
|
382
|
+
const input = trailingByte.length > 0 ? Buffer.concat([trailingByte, pcm]) : pcm;
|
|
383
|
+
const completeBytes = input.length - input.length % 2;
|
|
384
|
+
const completePcm = input.subarray(0, completeBytes);
|
|
385
|
+
trailingByte = Buffer.from(input.subarray(completeBytes));
|
|
386
|
+
history = Buffer.concat([history, completePcm.subarray(-64)]).subarray(-64);
|
|
387
|
+
return takeOutput(resampler.process(completePcm));
|
|
388
|
+
},
|
|
389
|
+
drain() {
|
|
390
|
+
if (flushed) return Buffer.alloc(0);
|
|
391
|
+
const output = takeOutput(resampler.flush());
|
|
392
|
+
resampler = createStreamingPcmResampler(24e3, SAMPLE_RATE);
|
|
393
|
+
replayBytes = history.length * 2 - resampler.process(history).length;
|
|
394
|
+
return output;
|
|
395
|
+
},
|
|
396
|
+
flush() {
|
|
397
|
+
flushed = true;
|
|
398
|
+
trailingByte = Buffer.alloc(0);
|
|
399
|
+
history = Buffer.alloc(0);
|
|
400
|
+
return takeOutput(resampler.flush());
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
async function writeVoiceWavFile(chunks) {
|
|
405
|
+
const wav = buildWavBuffer(chunks);
|
|
406
|
+
const workspace = await tempWorkspace({
|
|
407
|
+
rootDir: resolvePreferredOpenClawTmpDir(),
|
|
408
|
+
prefix: "discord-voice-"
|
|
409
|
+
});
|
|
410
|
+
try {
|
|
411
|
+
return {
|
|
412
|
+
path: await workspace.write("segment.wav", wav),
|
|
413
|
+
durationSeconds: (wav.length - 44) / (BIT_DEPTH / 8 * CHANNELS * SAMPLE_RATE),
|
|
414
|
+
cleanup: () => workspace[Symbol.asyncDispose]()
|
|
415
|
+
};
|
|
416
|
+
} catch (error) {
|
|
417
|
+
await workspace.cleanup();
|
|
418
|
+
throw error;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
//#endregion
|
|
422
|
+
//#region extensions/discord/src/voice/receive-recovery.ts
|
|
423
|
+
const DECRYPT_FAILURE_WINDOW_MS = 3e4;
|
|
424
|
+
const DECRYPT_FAILURE_RECONNECT_THRESHOLD = 3;
|
|
425
|
+
const DECRYPT_FAILURE_MARKER = "DecryptionFailed(";
|
|
426
|
+
const DAVE_PASSTHROUGH_DISABLED_MARKER = "UnencryptedWhenPassthroughDisabled";
|
|
427
|
+
const WASM_MEMORY_ACCESS_MARKER = "memory access out of bounds";
|
|
428
|
+
const OPUS_INVALID_PACKET_CODE = -4;
|
|
429
|
+
function createVoiceReceiveRecoveryState() {
|
|
430
|
+
return {
|
|
431
|
+
decryptFailureCount: 0,
|
|
432
|
+
lastDecryptFailureAt: 0,
|
|
433
|
+
decryptRecoveryInFlight: false
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
function isAbortLikeReceiveError(err) {
|
|
437
|
+
if (!err || typeof err !== "object") return false;
|
|
438
|
+
const name = "name" in err && typeof err.name === "string" ? err.name : "";
|
|
439
|
+
const message = "message" in err && typeof err.message === "string" ? err.message : "";
|
|
440
|
+
return name === "AbortError" || message === "Premature close" || message.includes("The operation was aborted") || message.includes("aborted");
|
|
441
|
+
}
|
|
442
|
+
function isOpusDecodeInvalidPacketError(err) {
|
|
443
|
+
if (!err || typeof err !== "object") return false;
|
|
444
|
+
const maybeOpusError = err;
|
|
445
|
+
const isDecodeOperation = maybeOpusError.operation === "decode" || maybeOpusError.operation === "decodeFloat";
|
|
446
|
+
const isInvalidPacket = maybeOpusError.code === OPUS_INVALID_PACKET_CODE || maybeOpusError.codeName === "InvalidPacket";
|
|
447
|
+
return isDecodeOperation && isInvalidPacket && (err instanceof OpusError || maybeOpusError.name === "OpusError");
|
|
448
|
+
}
|
|
449
|
+
function analyzeVoiceReceiveError(err) {
|
|
450
|
+
const message = formatErrorMessage(err);
|
|
451
|
+
const normalizedMessage = message.toLowerCase();
|
|
452
|
+
const shouldAttemptPassthrough = message.includes(DAVE_PASSTHROUGH_DISABLED_MARKER);
|
|
453
|
+
const isWasmMemoryAccessFailure = normalizedMessage.includes(WASM_MEMORY_ACCESS_MARKER);
|
|
454
|
+
return {
|
|
455
|
+
message,
|
|
456
|
+
isAbortLike: isAbortLikeReceiveError(err),
|
|
457
|
+
isDecodeCorruption: isOpusDecodeInvalidPacketError(err),
|
|
458
|
+
shouldAttemptPassthrough,
|
|
459
|
+
countsAsDecryptFailure: message.includes(DECRYPT_FAILURE_MARKER) || shouldAttemptPassthrough || isWasmMemoryAccessFailure
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
function noteVoiceDecryptFailure(state, now = Date.now()) {
|
|
463
|
+
if (now - state.lastDecryptFailureAt > 3e4) state.decryptFailureCount = 0;
|
|
464
|
+
state.lastDecryptFailureAt = now;
|
|
465
|
+
state.decryptFailureCount += 1;
|
|
466
|
+
const firstFailure = state.decryptFailureCount === 1;
|
|
467
|
+
if (state.decryptFailureCount < DECRYPT_FAILURE_RECONNECT_THRESHOLD || state.decryptRecoveryInFlight) return {
|
|
468
|
+
firstFailure,
|
|
469
|
+
shouldRecover: false
|
|
470
|
+
};
|
|
471
|
+
state.decryptRecoveryInFlight = true;
|
|
472
|
+
resetVoiceReceiveRecoveryState(state);
|
|
473
|
+
return {
|
|
474
|
+
firstFailure,
|
|
475
|
+
shouldRecover: true
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
function resetVoiceReceiveRecoveryState(state) {
|
|
479
|
+
state.decryptFailureCount = 0;
|
|
480
|
+
state.lastDecryptFailureAt = 0;
|
|
481
|
+
}
|
|
482
|
+
function finishVoiceDecryptRecovery(state) {
|
|
483
|
+
state.decryptRecoveryInFlight = false;
|
|
484
|
+
}
|
|
485
|
+
function isDaveReinitializing(session) {
|
|
486
|
+
return session.reinitializing === true;
|
|
487
|
+
}
|
|
488
|
+
function recoverDaveZeroTransition(params) {
|
|
489
|
+
const { target, sdk, onWarn } = params;
|
|
490
|
+
const networkingState = target.connection.state.networking?.state;
|
|
491
|
+
const daveSession = networkingState?.dave;
|
|
492
|
+
if (target.connection.state.status !== sdk.VoiceConnectionStatus.Ready || networkingState?.code !== sdk.NetworkingStatusCode.Ready || daveSession?.lastTransitionId !== 0 || daveSession.reinitializing !== false || typeof daveSession.recoverFromInvalidTransition !== "function") return "not-attempted";
|
|
493
|
+
try {
|
|
494
|
+
daveSession.recoverFromInvalidTransition(0);
|
|
495
|
+
return "recovered";
|
|
496
|
+
} catch (err) {
|
|
497
|
+
onWarn(`discord voice: failed to recover DAVE transition 0 guild=${target.guildId} channel=${target.channelId}: ${formatErrorMessage(err)}`);
|
|
498
|
+
return isDaveReinitializing(daveSession) ? "failed" : "not-attempted";
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
function enableDaveReceivePassthrough(params) {
|
|
502
|
+
const { target, sdk, reason, expirySeconds, onVerbose, onWarn } = params;
|
|
503
|
+
const networkingState = target.connection.state.networking?.state;
|
|
504
|
+
if (target.connection.state.status !== sdk.VoiceConnectionStatus.Ready || !networkingState || networkingState.code !== sdk.NetworkingStatusCode.Ready && networkingState.code !== sdk.NetworkingStatusCode.Resuming) return false;
|
|
505
|
+
const daveSession = networkingState.dave?.session;
|
|
506
|
+
if (!daveSession) return false;
|
|
507
|
+
try {
|
|
508
|
+
daveSession.setPassthroughMode(true, expirySeconds);
|
|
509
|
+
onVerbose(`enabled DAVE receive passthrough: guild ${target.guildId} channel ${target.channelId} expiry=${expirySeconds}s reason=${reason}`);
|
|
510
|
+
return true;
|
|
511
|
+
} catch (err) {
|
|
512
|
+
onWarn(`discord voice: failed to enable DAVE passthrough guild=${target.guildId} channel=${target.channelId} reason=${reason}: ${formatErrorMessage(err)}`);
|
|
513
|
+
return false;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
//#endregion
|
|
517
|
+
export { setDiscordAudioOutputStatus as S, getDiscordAudioOutputStatus as _, finishVoiceDecryptRecovery as a, retireDiscordAudioOutput as b, resetVoiceReceiveRecoveryState as c, createDiscordPcmToRealtimeConverter as d, createRealtimePcmToDiscordConverter as f, admitDiscordAudioInput as g, DiscordAudioOutputStatus as h, enableDaveReceivePassthrough as i, createDiscordOpusEncodeStream as l, writeVoiceWavFile as m, analyzeVoiceReceiveError as n, noteVoiceDecryptFailure as o, decodeOpusStreamChunks as p, createVoiceReceiveRecoveryState as r, recoverDaveZeroTransition as s, DECRYPT_FAILURE_WINDOW_MS as t, createDiscordOpusPlaybackStream as u, releaseDiscordAudioInput as v, serializeDiscordAudioError as x, restoreDiscordAudioError as y };
|
package/dist/{resolve-allowlist-common-ChPf0Qy7.js → .setup/resolve-allowlist-common-CwMBzbx9.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as normalizeDiscordToken } from "./accounts-CwJQoLjM.
|
|
3
|
-
import { r as fetchDiscord } from "./api-
|
|
1
|
+
import { o as normalizeDiscordSlug } from "./channel-type-DKnjV1XW.mjs";
|
|
2
|
+
import { m as normalizeDiscordToken } from "./accounts-CwJQoLjM.mjs";
|
|
3
|
+
import { r as fetchDiscord } from "./api-CBK9zcq5.mjs";
|
|
4
4
|
//#region extensions/discord/src/guilds.ts
|
|
5
5
|
async function listGuilds(token, fetcher, options) {
|
|
6
6
|
return (await fetchDiscord("/users/@me/guilds", token, fetcher, options)).filter((guild) => typeof guild.id === "string" && typeof guild.name === "string").map((guild) => ({
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-
|
|
4
|
-
import { t as
|
|
5
|
-
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-ChPf0Qy7.js";
|
|
1
|
+
import { Ut as __exportAll } from "./discord-BXpHW-cu.mjs";
|
|
2
|
+
import { o as normalizeDiscordSlug, t as isDiscordThreadChannelType } from "./channel-type-DKnjV1XW.mjs";
|
|
3
|
+
import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-CBK9zcq5.mjs";
|
|
4
|
+
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-CwMBzbx9.mjs";
|
|
6
5
|
//#region extensions/discord/src/resolve-channels.ts
|
|
7
6
|
var resolve_channels_exports = /* @__PURE__ */ __exportAll({ resolveDiscordChannelAllowlist: () => resolveDiscordChannelAllowlist });
|
|
8
7
|
function parseDiscordChannelInput(raw) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-
|
|
3
|
-
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-
|
|
1
|
+
import { Ut as __exportAll } from "./discord-BXpHW-cu.mjs";
|
|
2
|
+
import { r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-CBK9zcq5.mjs";
|
|
3
|
+
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-CwMBzbx9.mjs";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/discord/src/resolve-users.ts
|
|
6
6
|
var resolve_users_exports = /* @__PURE__ */ __exportAll({ resolveDiscordUserAllowlist: () => resolveDiscordUserAllowlist });
|