@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
|
@@ -1,82 +1,22 @@
|
|
|
1
|
-
import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-
|
|
2
|
-
import {
|
|
3
|
-
import { o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-CwJQoLjM.
|
|
4
|
-
import { r as sendDiscordComponentMessage } from "./send.components-
|
|
5
|
-
import { d as createReusableDiscordReplyReference, p as resolveDiscordReplyReference, y as
|
|
6
|
-
import { F as createDiscordRuntimeAccountContext, T as hasAnyGuildPermissionDiscord, U as getGateway, d as resolveDiscordTargetChannelId, v as canManageGuildMemberRoleDiscord, w as hasAnyChannelPermissionDiscord, x as fetchChannelPermissionsDiscord, y as canManageGuildRoleDiscord } from "./send.shared-
|
|
7
|
-
import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
8
|
-
import {
|
|
9
|
-
import { n as
|
|
10
|
-
import
|
|
11
|
-
import "./targets-Cm6aV9nJ.js";
|
|
1
|
+
import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-yBEb75bB.mjs";
|
|
2
|
+
import { l as resolveDiscordChannelConfigWithFallback, o as normalizeDiscordSlug, r as isDiscordGroupAllowedByPolicy, t as isDiscordThreadChannelType, v as resolveGroupDmAllow } from "./channel-type-DKnjV1XW.mjs";
|
|
3
|
+
import { o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-CwJQoLjM.mjs";
|
|
4
|
+
import { r as sendDiscordComponentMessage } from "./send.components-ChY21qr-.mjs";
|
|
5
|
+
import { b as resolveDiscordChannelId, d as createReusableDiscordReplyReference, p as resolveDiscordReplyReference, y as parseDiscordTarget } from "./retry-BEYkDy0P.mjs";
|
|
6
|
+
import { F as createDiscordRuntimeAccountContext, T as hasAnyGuildPermissionDiscord, U as getGateway, b as canViewDiscordGuildChannel, d as resolveDiscordTargetChannelId, n as buildDiscordTextChunks, v as canManageGuildMemberRoleDiscord, w as hasAnyChannelPermissionDiscord, x as fetchChannelPermissionsDiscord, y as canManageGuildRoleDiscord } from "./send.shared-VNvWfX2T.mjs";
|
|
7
|
+
import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-QTyuFupn.mjs";
|
|
8
|
+
import { n as getPresence } from "./presence-cache-dYSHPWMx.mjs";
|
|
9
|
+
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, l as DiscordThreadInitialMessageError, m as listPinsDiscord, n as fetchReactionsDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchGuildInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-CIBzvXjS.mjs";
|
|
10
|
+
import "./targets-CvemhN3i.mjs";
|
|
12
11
|
import { ChannelType, PermissionFlagsBits } from "discord-api-types/v10";
|
|
13
12
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
14
13
|
import { asBoolean, isRecord, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
|
+
import { createChannelProgressDraftCompositor } from "openclaw/plugin-sdk/channel-outbound";
|
|
15
15
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
16
16
|
import { assertMediaNotDataUrl, jsonResult, parseAvailableTags, readNonNegativeIntegerParam, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
|
17
17
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
18
18
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
19
|
-
//#region extensions/discord/src/actions/runtime-deps.ts
|
|
20
|
-
const discordGuildActionRuntime = {
|
|
21
|
-
addRoleDiscord,
|
|
22
|
-
canManageGuildRoleDiscord,
|
|
23
|
-
canManageGuildMemberRoleDiscord,
|
|
24
|
-
createChannelDiscord,
|
|
25
|
-
createScheduledEventDiscord,
|
|
26
|
-
resolveEventCoverImage,
|
|
27
|
-
deleteChannelDiscord,
|
|
28
|
-
editChannelDiscord,
|
|
29
|
-
fetchChannelInfoDiscord,
|
|
30
|
-
fetchMemberInfoDiscord,
|
|
31
|
-
hasAnyChannelPermissionDiscord,
|
|
32
|
-
hasAnyGuildPermissionDiscord,
|
|
33
|
-
fetchRoleInfoDiscord,
|
|
34
|
-
fetchVoiceStatusDiscord,
|
|
35
|
-
listGuildChannelsDiscord,
|
|
36
|
-
listGuildEmojisDiscord,
|
|
37
|
-
listScheduledEventsDiscord,
|
|
38
|
-
moveChannelDiscord,
|
|
39
|
-
removeChannelPermissionDiscord,
|
|
40
|
-
removeRoleDiscord,
|
|
41
|
-
setChannelPermissionDiscord,
|
|
42
|
-
uploadEmojiDiscord,
|
|
43
|
-
uploadStickerDiscord
|
|
44
|
-
};
|
|
45
|
-
const discordModerationActionRuntime = {
|
|
46
|
-
banMemberDiscord,
|
|
47
|
-
hasAnyGuildPermissionDiscord,
|
|
48
|
-
kickMemberDiscord,
|
|
49
|
-
timeoutMemberDiscord
|
|
50
|
-
};
|
|
51
|
-
//#endregion
|
|
52
19
|
//#region extensions/discord/src/actions/runtime.messaging.runtime.ts
|
|
53
|
-
const discordMessagingActionRuntime = {
|
|
54
|
-
createThreadDiscord,
|
|
55
|
-
deleteMessageDiscord,
|
|
56
|
-
editChannelDiscord,
|
|
57
|
-
editMessageDiscord,
|
|
58
|
-
fetchChannelInfoDiscord,
|
|
59
|
-
fetchGuildInfoDiscord,
|
|
60
|
-
fetchChannelPermissionsDiscord,
|
|
61
|
-
fetchMessageDiscord,
|
|
62
|
-
fetchReactionsDiscord,
|
|
63
|
-
listPinsDiscord,
|
|
64
|
-
listThreadsDiscord,
|
|
65
|
-
pinMessageDiscord,
|
|
66
|
-
reactMessageDiscord,
|
|
67
|
-
readDiscordComponentSpec,
|
|
68
|
-
readMessagesDiscord,
|
|
69
|
-
removeOwnReactionsDiscord,
|
|
70
|
-
removeReactionDiscord,
|
|
71
|
-
resolveDiscordReactionTargetChannelId,
|
|
72
|
-
resolveDiscordChannelId,
|
|
73
|
-
searchMessagesDiscord,
|
|
74
|
-
sendDiscordComponentMessage,
|
|
75
|
-
sendMessageDiscord,
|
|
76
|
-
sendStickerDiscord,
|
|
77
|
-
sendVoiceMessageDiscord,
|
|
78
|
-
unpinMessageDiscord
|
|
79
|
-
};
|
|
80
20
|
async function resolveDiscordReactionTargetChannelId(params) {
|
|
81
21
|
try {
|
|
82
22
|
return resolveDiscordChannelId(params.target);
|
|
@@ -320,7 +260,7 @@ function createDiscordMessagingActionContext(params) {
|
|
|
320
260
|
const currentChannelId = currentReadContext?.currentChannelId?.trim();
|
|
321
261
|
if (currentReadContext?.currentChannelProvider?.trim().toLowerCase() !== "discord" || !requesterAccountId || !currentChannelId || normalizeAccountId(requesterAccountId) !== normalizeAccountId(resolvedReactionAccountId)) return false;
|
|
322
262
|
try {
|
|
323
|
-
return
|
|
263
|
+
return resolveDiscordChannelId(currentChannelId) === channelId;
|
|
324
264
|
} catch {
|
|
325
265
|
return false;
|
|
326
266
|
}
|
|
@@ -333,7 +273,7 @@ function createDiscordMessagingActionContext(params) {
|
|
|
333
273
|
const resolveGuildName = async (guildId) => {
|
|
334
274
|
if (guildNameById.has(guildId)) return guildNameById.get(guildId) ?? null;
|
|
335
275
|
try {
|
|
336
|
-
const guildName = readDiscordChannelStringField(await
|
|
276
|
+
const guildName = readDiscordChannelStringField(await fetchGuildInfoDiscord(guildId, withOpts()), "name") ?? null;
|
|
337
277
|
guildNameById.set(guildId, guildName);
|
|
338
278
|
return guildName;
|
|
339
279
|
} catch {
|
|
@@ -371,7 +311,7 @@ function createDiscordMessagingActionContext(params) {
|
|
|
371
311
|
};
|
|
372
312
|
let channelInfo;
|
|
373
313
|
try {
|
|
374
|
-
channelInfo = await
|
|
314
|
+
channelInfo = await fetchChannelInfoDiscord(channelId, withOpts());
|
|
375
315
|
} catch {
|
|
376
316
|
return fallback;
|
|
377
317
|
}
|
|
@@ -394,7 +334,7 @@ function createDiscordMessagingActionContext(params) {
|
|
|
394
334
|
parentId: readDiscordChannelStringField(channelInfo, "parent_id", "parentId"),
|
|
395
335
|
loadChannel: async (parentId) => {
|
|
396
336
|
try {
|
|
397
|
-
return await
|
|
337
|
+
return await fetchChannelInfoDiscord(parentId, withOpts());
|
|
398
338
|
} catch {
|
|
399
339
|
return;
|
|
400
340
|
}
|
|
@@ -444,11 +384,12 @@ function createDiscordMessagingActionContext(params) {
|
|
|
444
384
|
params: params.input,
|
|
445
385
|
isActionEnabled: params.isActionEnabled,
|
|
446
386
|
cfg: params.cfg,
|
|
387
|
+
accountConfig,
|
|
447
388
|
options: params.options,
|
|
448
389
|
accountId,
|
|
449
|
-
resolveChannelId: () =>
|
|
390
|
+
resolveChannelId: () => resolveDiscordChannelId(readStringParam(params.input, "channelId", { required: true })),
|
|
450
391
|
assertReadTargetAllowed: async ({ guildId, channelId }) => {
|
|
451
|
-
const targetChannelId =
|
|
392
|
+
const targetChannelId = resolveDiscordChannelId(channelId);
|
|
452
393
|
const target = await resolveReadTargetContext(targetChannelId);
|
|
453
394
|
const currentConversation = isCurrentReadTarget(targetChannelId);
|
|
454
395
|
if (guildId) {
|
|
@@ -548,7 +489,18 @@ function createDiscordMessagingActionContext(params) {
|
|
|
548
489
|
},
|
|
549
490
|
resolveReactionChannelId: async () => {
|
|
550
491
|
const target = readStringParam(params.input, "channelId") ?? readStringParam(params.input, "to", { required: true });
|
|
551
|
-
|
|
492
|
+
if (params.action === "reactions" && !directOperator) {
|
|
493
|
+
const reactionTarget = parseDiscordTarget(target, { defaultKind: "channel" });
|
|
494
|
+
if (reactionTarget?.kind === "user" && currentReadContext?.currentChatType === "direct") {
|
|
495
|
+
const currentTarget = parseDiscordTarget(currentReadContext.currentMessagingTarget ?? "", { defaultKind: "channel" });
|
|
496
|
+
if (currentTarget?.kind === "user" && currentTarget.id === reactionTarget.id) {
|
|
497
|
+
const currentChannelId = resolveDiscordChannelId(currentReadContext.currentChannelId ?? "");
|
|
498
|
+
if (isCurrentReadTarget(currentChannelId)) return currentChannelId;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
return resolveDiscordChannelId(target);
|
|
502
|
+
}
|
|
503
|
+
return await resolveDiscordReactionTargetChannelId({
|
|
552
504
|
target,
|
|
553
505
|
cfg: params.cfg,
|
|
554
506
|
accountId: resolvedReactionAccountId
|
|
@@ -637,7 +589,7 @@ async function resolveGuildIdForGuildAdminAction(params) {
|
|
|
637
589
|
if (guildId) return guildId;
|
|
638
590
|
const channelLikeId = readStringParam(params.values, "channelId") ?? readStringParam(params.values, "categoryId");
|
|
639
591
|
if (!channelLikeId) return;
|
|
640
|
-
const channel = await
|
|
592
|
+
const channel = await fetchChannelInfoDiscord(channelLikeId, createDiscordActionOptions({
|
|
641
593
|
cfg: params.cfg,
|
|
642
594
|
accountId: params.accountId
|
|
643
595
|
}));
|
|
@@ -652,13 +604,14 @@ async function resolveGuildAdminActionPermissions(params) {
|
|
|
652
604
|
if (params.action !== "channelEdit") return params.guard.permissions;
|
|
653
605
|
const channelId = readStringParam(params.values, "channelId");
|
|
654
606
|
if (!channelId) return params.guard.permissions;
|
|
655
|
-
const channel = await
|
|
607
|
+
const channel = await fetchChannelInfoDiscord(channelId, createDiscordActionOptions({
|
|
656
608
|
cfg: params.cfg,
|
|
657
609
|
accountId: params.accountId
|
|
658
610
|
}));
|
|
659
611
|
const channelType = "type" in channel ? channel.type : void 0;
|
|
660
612
|
if (!isDiscordThreadChannelType(channelType)) return params.guard.permissions;
|
|
661
|
-
|
|
613
|
+
const edit = readDiscordChannelEditParams(params.values);
|
|
614
|
+
return edit.archived === false && Object.entries(edit).every(([field, value]) => value === void 0 || field === "channelId" || field === "archived") && !isLockedThreadChannel(channel) ? [PermissionFlagsBits.ManageThreads, PermissionFlagsBits.SendMessages] : [PermissionFlagsBits.ManageThreads];
|
|
662
615
|
}
|
|
663
616
|
async function verifySenderGuildAdminPermission(params) {
|
|
664
617
|
const guard = guildAdminActionGuards[params.action];
|
|
@@ -675,17 +628,19 @@ async function verifySenderGuildAdminPermission(params) {
|
|
|
675
628
|
accountId: params.accountId
|
|
676
629
|
});
|
|
677
630
|
const targetChannelId = guard?.permissionScope === "channel" || params.action === "eventCreate" ? readChannelScopedPermissionTargetId(params.action, params.values) : void 0;
|
|
678
|
-
|
|
631
|
+
const hasPermission = targetChannelId ? await hasAnyChannelPermissionDiscord(guildId, targetChannelId, senderUserId, requiredPermissions, actionOptions) : await hasAnyGuildPermissionDiscord(guildId, senderUserId, requiredPermissions, actionOptions);
|
|
632
|
+
const requiresCurrentThreadAccess = params.action === "channelEdit" && requiredPermissions.includes(PermissionFlagsBits.SendMessages);
|
|
633
|
+
if (!hasPermission || requiresCurrentThreadAccess && (!targetChannelId || !await canViewDiscordGuildChannel(guildId, targetChannelId, senderUserId, actionOptions))) throw new Error("Sender does not have required permissions for this guild action.");
|
|
679
634
|
if (params.action === "roleAdd" || params.action === "roleRemove") {
|
|
680
635
|
const targetUserId = readStringParam(params.values, "userId", { required: true });
|
|
681
636
|
const roleId = readStringParam(params.values, "roleId", { required: true });
|
|
682
|
-
if (!await
|
|
637
|
+
if (!await canManageGuildMemberRoleDiscord(guildId, senderUserId, targetUserId, roleId, actionOptions, { assignablePermissionCeiling: params.action === "roleAdd" })) throw new Error("Sender cannot manage the requested role or member.");
|
|
683
638
|
}
|
|
684
639
|
if (params.action === "channelPermissionSet" || params.action === "channelPermissionRemove") {
|
|
685
640
|
const targetType = readStringParam(params.values, "targetType");
|
|
686
641
|
if (targetType === "member") return;
|
|
687
642
|
const targetId = readStringParam(params.values, "targetId", { required: true });
|
|
688
|
-
const canManageRole = await
|
|
643
|
+
const canManageRole = await canManageGuildRoleDiscord(guildId, senderUserId, targetId, actionOptions);
|
|
689
644
|
if (canManageRole === false || targetType === "role" && canManageRole === null) throw new Error("Sender cannot manage the requested role overwrite.");
|
|
690
645
|
}
|
|
691
646
|
}
|
|
@@ -749,7 +704,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
749
704
|
await assertGuildMetadataReadAllowed(guildId);
|
|
750
705
|
const userId = readStringParam(params, "userId", { required: true });
|
|
751
706
|
const effectiveAccountId = accountId ?? resolveDefaultDiscordAccountId(cfg);
|
|
752
|
-
const member = await
|
|
707
|
+
const member = await fetchMemberInfoDiscord(guildId, userId, createDiscordActionOptions({
|
|
753
708
|
cfg,
|
|
754
709
|
accountId: effectiveAccountId
|
|
755
710
|
}));
|
|
@@ -769,7 +724,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
769
724
|
if (!isActionEnabled("roleInfo")) throw new Error("Discord role info is disabled.");
|
|
770
725
|
const guildId = readStringParam(params, "guildId", { required: true });
|
|
771
726
|
await assertGuildMetadataReadAllowed(guildId);
|
|
772
|
-
const roles = await
|
|
727
|
+
const roles = await fetchRoleInfoDiscord(guildId, withOpts());
|
|
773
728
|
return jsonResult({
|
|
774
729
|
ok: true,
|
|
775
730
|
roles
|
|
@@ -785,7 +740,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
785
740
|
if (!guildId) throw new Error("Discord emoji listing requires guildId or a server channel.");
|
|
786
741
|
await assertGuildMetadataReadAllowed(guildId);
|
|
787
742
|
const limit = Math.min(readPositiveIntegerParam(params, "limit") ?? 100, 100);
|
|
788
|
-
const fetchEmojis = async () => (await
|
|
743
|
+
const fetchEmojis = async () => (await listGuildEmojisDiscord(guildId, withOpts())).flatMap(({ name, id, animated }) => name && id ? [{
|
|
789
744
|
name,
|
|
790
745
|
identifier: `${name}:${id}`,
|
|
791
746
|
...animated ? { animated } : {}
|
|
@@ -803,7 +758,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
803
758
|
const name = readStringParam(params, "name", { required: true });
|
|
804
759
|
const mediaUrl = readStringParam(params, "mediaUrl", { required: true });
|
|
805
760
|
const roleIds = readStringArrayParam(params, "roleIds");
|
|
806
|
-
const emoji = await
|
|
761
|
+
const emoji = await uploadEmojiDiscord({
|
|
807
762
|
guildId,
|
|
808
763
|
name,
|
|
809
764
|
mediaUrl,
|
|
@@ -825,7 +780,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
825
780
|
const description = readStringParam(params, "description", { required: true });
|
|
826
781
|
const tags = readStringParam(params, "tags", { required: true });
|
|
827
782
|
const mediaUrl = readStringParam(params, "mediaUrl", { required: true });
|
|
828
|
-
const sticker = await
|
|
783
|
+
const sticker = await uploadStickerDiscord({
|
|
829
784
|
guildId,
|
|
830
785
|
name,
|
|
831
786
|
description,
|
|
@@ -847,7 +802,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
847
802
|
cfg,
|
|
848
803
|
accountId,
|
|
849
804
|
values: params,
|
|
850
|
-
mutate:
|
|
805
|
+
mutate: addRoleDiscord
|
|
851
806
|
});
|
|
852
807
|
return jsonResult({ ok: true });
|
|
853
808
|
case "roleRemove":
|
|
@@ -856,14 +811,14 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
856
811
|
cfg,
|
|
857
812
|
accountId,
|
|
858
813
|
values: params,
|
|
859
|
-
mutate:
|
|
814
|
+
mutate: removeRoleDiscord
|
|
860
815
|
});
|
|
861
816
|
return jsonResult({ ok: true });
|
|
862
817
|
case "channelInfo": {
|
|
863
818
|
if (!isActionEnabled("channelInfo")) throw new Error("Discord channel info is disabled.");
|
|
864
819
|
const channelId = readStringParam(params, "channelId", { required: true });
|
|
865
820
|
await readTargetGate.assertReadTargetAllowed({ channelId });
|
|
866
|
-
const channel = await
|
|
821
|
+
const channel = await fetchChannelInfoDiscord(channelId, withOpts());
|
|
867
822
|
return jsonResult({
|
|
868
823
|
ok: true,
|
|
869
824
|
channel
|
|
@@ -873,7 +828,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
873
828
|
if (!isActionEnabled("channelInfo")) throw new Error("Discord channel info is disabled.");
|
|
874
829
|
const guildId = readStringParam(params, "guildId", { required: true });
|
|
875
830
|
await assertGuildMetadataReadAllowed(guildId, { filteredResults: true });
|
|
876
|
-
const channels = await
|
|
831
|
+
const channels = await listGuildChannelsDiscord(guildId, withOpts());
|
|
877
832
|
const visibleChannels = await readTargetGate.filterGuildChannelList({
|
|
878
833
|
guildId,
|
|
879
834
|
channels
|
|
@@ -888,7 +843,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
888
843
|
const guildId = readStringParam(params, "guildId", { required: true });
|
|
889
844
|
await assertGuildMetadataReadAllowed(guildId);
|
|
890
845
|
const userId = readStringParam(params, "userId", { required: true });
|
|
891
|
-
const voice = await
|
|
846
|
+
const voice = await fetchVoiceStatusDiscord(guildId, userId, withOpts());
|
|
892
847
|
return jsonResult({
|
|
893
848
|
ok: true,
|
|
894
849
|
voice
|
|
@@ -898,7 +853,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
898
853
|
if (!isActionEnabled("events")) throw new Error("Discord events are disabled.");
|
|
899
854
|
const guildId = readStringParam(params, "guildId", { required: true });
|
|
900
855
|
await assertGuildMetadataReadAllowed(guildId);
|
|
901
|
-
const events = await
|
|
856
|
+
const events = await listScheduledEventsDiscord(guildId, withOpts());
|
|
902
857
|
return jsonResult({
|
|
903
858
|
ok: true,
|
|
904
859
|
events
|
|
@@ -916,8 +871,8 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
916
871
|
const imageUrl = readStringParam(params, "image", { trim: false });
|
|
917
872
|
const entityTypeRaw = readStringParam(params, "entityType");
|
|
918
873
|
const entityType = entityTypeRaw === "stage" ? 1 : entityTypeRaw === "external" ? 3 : 2;
|
|
919
|
-
const image = imageUrl ? await
|
|
920
|
-
const
|
|
874
|
+
const image = imageUrl ? await resolveEventCoverImage(imageUrl, mediaPolicyOptions) : void 0;
|
|
875
|
+
const event = await createScheduledEventDiscord(guildId, {
|
|
921
876
|
name,
|
|
922
877
|
description,
|
|
923
878
|
scheduled_start_time: startTime,
|
|
@@ -927,8 +882,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
927
882
|
entity_metadata: entityType === 3 && location ? { location } : void 0,
|
|
928
883
|
image,
|
|
929
884
|
privacy_level: 2
|
|
930
|
-
};
|
|
931
|
-
const event = await discordGuildActionRuntime.createScheduledEventDiscord(guildId, payload, withOpts());
|
|
885
|
+
}, withOpts());
|
|
932
886
|
return jsonResult({
|
|
933
887
|
ok: true,
|
|
934
888
|
event
|
|
@@ -936,7 +890,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
936
890
|
}
|
|
937
891
|
case "channelCreate": {
|
|
938
892
|
if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
|
|
939
|
-
const channel = await
|
|
893
|
+
const channel = await createChannelDiscord(readDiscordChannelCreateParams(params), withOpts());
|
|
940
894
|
return jsonResult({
|
|
941
895
|
ok: true,
|
|
942
896
|
channel
|
|
@@ -944,7 +898,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
944
898
|
}
|
|
945
899
|
case "channelEdit": {
|
|
946
900
|
if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
|
|
947
|
-
const channel = await
|
|
901
|
+
const channel = await editChannelDiscord(readDiscordChannelEditParams(params), withOpts());
|
|
948
902
|
return jsonResult({
|
|
949
903
|
ok: true,
|
|
950
904
|
channel
|
|
@@ -953,19 +907,19 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
953
907
|
case "channelDelete": {
|
|
954
908
|
if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
|
|
955
909
|
const channelId = readStringParam(params, "channelId", { required: true });
|
|
956
|
-
const result = await
|
|
910
|
+
const result = await deleteChannelDiscord(channelId, withOpts());
|
|
957
911
|
return jsonResult(result);
|
|
958
912
|
}
|
|
959
913
|
case "channelMove":
|
|
960
914
|
if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
|
|
961
|
-
await
|
|
915
|
+
await moveChannelDiscord(readDiscordChannelMoveParams(params), withOpts());
|
|
962
916
|
return jsonResult({ ok: true });
|
|
963
917
|
case "categoryCreate": {
|
|
964
918
|
if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
|
|
965
919
|
const guildId = readStringParam(params, "guildId", { required: true });
|
|
966
920
|
const name = readStringParam(params, "name", { required: true });
|
|
967
921
|
const position = readNonNegativeIntegerParam(params, "position");
|
|
968
|
-
const channel = await
|
|
922
|
+
const channel = await createChannelDiscord({
|
|
969
923
|
guildId,
|
|
970
924
|
name,
|
|
971
925
|
type: 4,
|
|
@@ -981,7 +935,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
981
935
|
const categoryId = readStringParam(params, "categoryId", { required: true });
|
|
982
936
|
const name = readStringParam(params, "name");
|
|
983
937
|
const position = readNonNegativeIntegerParam(params, "position");
|
|
984
|
-
const channel = await
|
|
938
|
+
const channel = await editChannelDiscord({
|
|
985
939
|
channelId: categoryId,
|
|
986
940
|
name: name ?? void 0,
|
|
987
941
|
position: position ?? void 0
|
|
@@ -994,7 +948,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
994
948
|
case "categoryDelete": {
|
|
995
949
|
if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
|
|
996
950
|
const categoryId = readStringParam(params, "categoryId", { required: true });
|
|
997
|
-
const result = await
|
|
951
|
+
const result = await deleteChannelDiscord(categoryId, withOpts());
|
|
998
952
|
return jsonResult(result);
|
|
999
953
|
}
|
|
1000
954
|
case "channelPermissionSet": {
|
|
@@ -1003,7 +957,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
1003
957
|
const targetType = readStringParam(params, "targetType", { required: true }) === "member" ? 1 : 0;
|
|
1004
958
|
const allow = readStringParam(params, "allow");
|
|
1005
959
|
const deny = readStringParam(params, "deny");
|
|
1006
|
-
await
|
|
960
|
+
await setChannelPermissionDiscord({
|
|
1007
961
|
channelId,
|
|
1008
962
|
targetId,
|
|
1009
963
|
targetType,
|
|
@@ -1015,7 +969,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
|
|
|
1015
969
|
case "channelPermissionRemove": {
|
|
1016
970
|
if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
|
|
1017
971
|
const { channelId, targetId } = readChannelPermissionTarget(params);
|
|
1018
|
-
await
|
|
972
|
+
await removeChannelPermissionDiscord(channelId, targetId, withOpts());
|
|
1019
973
|
return jsonResult({ ok: true });
|
|
1020
974
|
}
|
|
1021
975
|
default: throw new Error(`Unknown action: ${action}`);
|
|
@@ -1051,7 +1005,7 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1051
1005
|
if (!ctx.isActionEnabled("permissions")) throw new Error("Discord permissions are disabled.");
|
|
1052
1006
|
const channelId = ctx.resolveChannelId();
|
|
1053
1007
|
await ctx.assertReadTargetAllowed({ channelId });
|
|
1054
|
-
const permissions = await
|
|
1008
|
+
const permissions = await fetchChannelPermissionsDiscord(channelId, ctx.withOpts());
|
|
1055
1009
|
return jsonResult({
|
|
1056
1010
|
ok: true,
|
|
1057
1011
|
permissions
|
|
@@ -1074,7 +1028,7 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1074
1028
|
guildId,
|
|
1075
1029
|
channelId
|
|
1076
1030
|
});
|
|
1077
|
-
const message = await
|
|
1031
|
+
const message = await fetchMessageDiscord(channelId, messageId, ctx.withOpts());
|
|
1078
1032
|
return jsonResult({
|
|
1079
1033
|
ok: true,
|
|
1080
1034
|
message: ctx.normalizeMessage(message),
|
|
@@ -1087,13 +1041,14 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1087
1041
|
if (!ctx.isActionEnabled("messages")) throw new Error("Discord message reads are disabled.");
|
|
1088
1042
|
const channelId = ctx.resolveChannelId();
|
|
1089
1043
|
await ctx.assertReadTargetAllowed({ channelId });
|
|
1044
|
+
const messageId = readStringParam(ctx.params, "messageId");
|
|
1090
1045
|
const query = {
|
|
1091
1046
|
limit: readPositiveIntegerParam(ctx.params, "limit"),
|
|
1092
1047
|
before: readStringParam(ctx.params, "before"),
|
|
1093
1048
|
after: readStringParam(ctx.params, "after"),
|
|
1094
1049
|
around: readStringParam(ctx.params, "around")
|
|
1095
1050
|
};
|
|
1096
|
-
const messages = assertDiscordMessageListResult(await
|
|
1051
|
+
const messages = messageId ? [await fetchMessageDiscord(channelId, messageId, ctx.withOpts())] : assertDiscordMessageListResult(await readMessagesDiscord(channelId, query, ctx.withOpts()));
|
|
1097
1052
|
return jsonResult({
|
|
1098
1053
|
ok: true,
|
|
1099
1054
|
channelId,
|
|
@@ -1104,13 +1059,26 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1104
1059
|
if (!ctx.isActionEnabled("messages")) throw new Error("Discord message edits are disabled.");
|
|
1105
1060
|
const channelId = ctx.resolveChannelId();
|
|
1106
1061
|
const messageId = readStringParam(ctx.params, "messageId", { required: true });
|
|
1107
|
-
const
|
|
1062
|
+
const snapshot = ctx.options?.progressSnapshot;
|
|
1063
|
+
const content = snapshot ? buildDiscordTextChunks(createChannelProgressDraftCompositor({
|
|
1064
|
+
entry: ctx.accountConfig,
|
|
1065
|
+
mode: "progress",
|
|
1066
|
+
active: true,
|
|
1067
|
+
seed: `${ctx.accountId}:${channelId}`,
|
|
1068
|
+
initialSnapshot: snapshot
|
|
1069
|
+
}).getText(), {
|
|
1070
|
+
maxChars: Math.min(ctx.accountConfig.textChunkLimit ?? 2e3, 2e3),
|
|
1071
|
+
maxLinesPerMessage: Number.MAX_SAFE_INTEGER
|
|
1072
|
+
})[0] ?? "" : readStringParam(ctx.params, "content", {
|
|
1108
1073
|
required: true,
|
|
1109
1074
|
allowEmpty: true,
|
|
1110
1075
|
trim: false
|
|
1111
1076
|
});
|
|
1112
1077
|
await ctx.assertReadTargetAllowed({ channelId });
|
|
1113
|
-
const message = await
|
|
1078
|
+
const message = await editMessageDiscord(channelId, messageId, {
|
|
1079
|
+
content,
|
|
1080
|
+
...snapshot ? { allowedMentions: { parse: [] } } : {}
|
|
1081
|
+
}, ctx.withOpts());
|
|
1114
1082
|
return jsonResult({
|
|
1115
1083
|
ok: true,
|
|
1116
1084
|
message
|
|
@@ -1121,7 +1089,7 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1121
1089
|
const channelId = ctx.resolveChannelId();
|
|
1122
1090
|
const messageId = readStringParam(ctx.params, "messageId", { required: true });
|
|
1123
1091
|
await ctx.assertReadTargetAllowed({ channelId });
|
|
1124
|
-
await
|
|
1092
|
+
await deleteMessageDiscord(channelId, messageId, ctx.withOpts());
|
|
1125
1093
|
return jsonResult({ ok: true });
|
|
1126
1094
|
}
|
|
1127
1095
|
case "pinMessage": {
|
|
@@ -1129,7 +1097,7 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1129
1097
|
const channelId = ctx.resolveChannelId();
|
|
1130
1098
|
const messageId = readStringParam(ctx.params, "messageId", { required: true });
|
|
1131
1099
|
await ctx.assertReadTargetAllowed({ channelId });
|
|
1132
|
-
await
|
|
1100
|
+
await pinMessageDiscord(channelId, messageId, ctx.withOpts());
|
|
1133
1101
|
return jsonResult({ ok: true });
|
|
1134
1102
|
}
|
|
1135
1103
|
case "unpinMessage": {
|
|
@@ -1137,14 +1105,14 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1137
1105
|
const channelId = ctx.resolveChannelId();
|
|
1138
1106
|
const messageId = readStringParam(ctx.params, "messageId", { required: true });
|
|
1139
1107
|
await ctx.assertReadTargetAllowed({ channelId });
|
|
1140
|
-
await
|
|
1108
|
+
await unpinMessageDiscord(channelId, messageId, ctx.withOpts());
|
|
1141
1109
|
return jsonResult({ ok: true });
|
|
1142
1110
|
}
|
|
1143
1111
|
case "listPins": {
|
|
1144
1112
|
if (!ctx.isActionEnabled("pins")) throw new Error("Discord pins are disabled.");
|
|
1145
1113
|
const channelId = ctx.resolveChannelId();
|
|
1146
1114
|
await ctx.assertReadTargetAllowed({ channelId });
|
|
1147
|
-
const pins = await
|
|
1115
|
+
const pins = await listPinsDiscord(channelId, ctx.withOpts());
|
|
1148
1116
|
return jsonResult({
|
|
1149
1117
|
ok: true,
|
|
1150
1118
|
pins: pins.map((pin) => ctx.normalizeMessage(pin))
|
|
@@ -1160,8 +1128,8 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1160
1128
|
if (!guildId) {
|
|
1161
1129
|
const rawInferChannelId = channelId ?? channelIds?.[0];
|
|
1162
1130
|
if (rawInferChannelId) try {
|
|
1163
|
-
const inferChannelId =
|
|
1164
|
-
const channelInfo = await
|
|
1131
|
+
const inferChannelId = resolveDiscordChannelId(rawInferChannelId);
|
|
1132
|
+
const channelInfo = await fetchChannelInfoDiscord(inferChannelId, ctx.withOpts());
|
|
1165
1133
|
if (isRecord(channelInfo)) {
|
|
1166
1134
|
const resolved = channelInfo.guild_id ?? channelInfo.guildId;
|
|
1167
1135
|
if (typeof resolved === "string" && resolved.trim()) guildId = resolved.trim();
|
|
@@ -1172,14 +1140,14 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
1172
1140
|
const authorId = readStringParam(ctx.params, "authorId");
|
|
1173
1141
|
const authorIds = readStringArrayParam(ctx.params, "authorIds");
|
|
1174
1142
|
const limit = readPositiveIntegerParam(ctx.params, "limit");
|
|
1175
|
-
const channelIdList = [...(channelIds ?? []).map((id) =>
|
|
1143
|
+
const channelIdList = [...(channelIds ?? []).map((id) => resolveDiscordChannelId(id)), ...channelId ? [resolveDiscordChannelId(channelId)] : []];
|
|
1176
1144
|
if (channelIdList.length > 0) for (const targetChannelId of channelIdList) await ctx.assertReadTargetAllowed({
|
|
1177
1145
|
guildId,
|
|
1178
1146
|
channelId: targetChannelId
|
|
1179
1147
|
});
|
|
1180
1148
|
else await ctx.assertGuildReadTargetAllowed({ guildId });
|
|
1181
1149
|
const authorIdList = [...authorIds ?? [], ...authorId ? [authorId] : []];
|
|
1182
|
-
const results = await
|
|
1150
|
+
const results = await searchMessagesDiscord({
|
|
1183
1151
|
guildId,
|
|
1184
1152
|
content,
|
|
1185
1153
|
channelIds: channelIdList.length ? channelIdList : void 0,
|
|
@@ -1214,7 +1182,7 @@ async function handleDiscordReactionMessagingAction(ctx) {
|
|
|
1214
1182
|
const { emoji, remove, isEmpty } = readReactionParams(ctx.params, { removeErrorMessage: "Emoji is required to remove a Discord reaction." });
|
|
1215
1183
|
if (remove) {
|
|
1216
1184
|
await ctx.assertReadTargetAllowed({ channelId });
|
|
1217
|
-
await
|
|
1185
|
+
await removeReactionDiscord(channelId, messageId, emoji, ctx.withReactionRuntimeOptions());
|
|
1218
1186
|
return jsonResult({
|
|
1219
1187
|
ok: true,
|
|
1220
1188
|
removed: emoji
|
|
@@ -1222,14 +1190,14 @@ async function handleDiscordReactionMessagingAction(ctx) {
|
|
|
1222
1190
|
}
|
|
1223
1191
|
if (isEmpty) {
|
|
1224
1192
|
await ctx.assertReadTargetAllowed({ channelId });
|
|
1225
|
-
const removed = await
|
|
1193
|
+
const removed = await removeOwnReactionsDiscord(channelId, messageId, ctx.withReactionRuntimeOptions());
|
|
1226
1194
|
return jsonResult({
|
|
1227
1195
|
ok: true,
|
|
1228
1196
|
removed: removed.removed
|
|
1229
1197
|
});
|
|
1230
1198
|
}
|
|
1231
1199
|
await ctx.assertReadTargetAllowed({ channelId });
|
|
1232
|
-
await
|
|
1200
|
+
await reactMessageDiscord(channelId, messageId, emoji, ctx.withReactionRuntimeOptions());
|
|
1233
1201
|
return jsonResult({
|
|
1234
1202
|
ok: true,
|
|
1235
1203
|
added: emoji
|
|
@@ -1241,7 +1209,7 @@ async function handleDiscordReactionMessagingAction(ctx) {
|
|
|
1241
1209
|
const messageId = readStringParam(ctx.params, "messageId", { required: true });
|
|
1242
1210
|
const limit = readPositiveIntegerParam(ctx.params, "limit");
|
|
1243
1211
|
await ctx.assertReadTargetAllowed({ channelId });
|
|
1244
|
-
const reactions = await
|
|
1212
|
+
const reactions = await fetchReactionsDiscord(channelId, messageId, ctx.withReactionRuntimeOptions({ limit }));
|
|
1245
1213
|
return jsonResult({
|
|
1246
1214
|
ok: true,
|
|
1247
1215
|
reactions
|
|
@@ -1302,7 +1270,7 @@ async function appendDiscordThreadRenameResult(ctx, params) {
|
|
|
1302
1270
|
};
|
|
1303
1271
|
let channelId;
|
|
1304
1272
|
try {
|
|
1305
|
-
channelId =
|
|
1273
|
+
channelId = resolveDiscordChannelId(params.target);
|
|
1306
1274
|
} catch {
|
|
1307
1275
|
return {
|
|
1308
1276
|
...params.payload,
|
|
@@ -1310,12 +1278,12 @@ async function appendDiscordThreadRenameResult(ctx, params) {
|
|
|
1310
1278
|
};
|
|
1311
1279
|
}
|
|
1312
1280
|
try {
|
|
1313
|
-
const channel = await
|
|
1281
|
+
const channel = await fetchChannelInfoDiscord(channelId, ctx.withOpts());
|
|
1314
1282
|
if (!isDiscordThreadChannelType(channel.type)) return {
|
|
1315
1283
|
...params.payload,
|
|
1316
1284
|
warning: "Discord threadName was ignored because the send target is not a thread."
|
|
1317
1285
|
};
|
|
1318
|
-
const renamed = await
|
|
1286
|
+
const renamed = await editChannelDiscord({
|
|
1319
1287
|
channelId,
|
|
1320
1288
|
name: threadName
|
|
1321
1289
|
}, ctx.withOpts());
|
|
@@ -1344,7 +1312,7 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1344
1312
|
required: true,
|
|
1345
1313
|
label: "stickerIds"
|
|
1346
1314
|
});
|
|
1347
|
-
const result = await
|
|
1315
|
+
const result = await sendStickerDiscord(to, stickerIds, ctx.withOpts({
|
|
1348
1316
|
content,
|
|
1349
1317
|
...ctx.params.silent === true ? { silent: true } : {}
|
|
1350
1318
|
}));
|
|
@@ -1360,7 +1328,7 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1360
1328
|
const silent = ctx.params.silent === true;
|
|
1361
1329
|
const suppressEmbeds = ctx.params.suppressEmbeds === void 0 ? void 0 : ctx.params.suppressEmbeds === true;
|
|
1362
1330
|
const rawComponents = coerceDiscordComponentParam(ctx.params.components);
|
|
1363
|
-
const componentSpec = hasDiscordComponentObjectKeys(rawComponents) ?
|
|
1331
|
+
const componentSpec = hasDiscordComponentObjectKeys(rawComponents) ? readDiscordComponentSpec(rawComponents) : null;
|
|
1364
1332
|
const components = Array.isArray(rawComponents) || typeof rawComponents === "function" ? rawComponents : void 0;
|
|
1365
1333
|
const mediaUrl = readStringParam(ctx.params, "mediaUrl", { trim: false }) ?? readStringParam(ctx.params, "path", { trim: false }) ?? readStringParam(ctx.params, "filePath", { trim: false });
|
|
1366
1334
|
const rawEmbeds = ctx.params.embeds;
|
|
@@ -1383,7 +1351,7 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1383
1351
|
...componentSpec,
|
|
1384
1352
|
text: normalizedContent
|
|
1385
1353
|
};
|
|
1386
|
-
const result = await
|
|
1354
|
+
const result = await sendDiscordComponentMessage(to, payload, {
|
|
1387
1355
|
...ctx.withOpts(),
|
|
1388
1356
|
silent,
|
|
1389
1357
|
reply: resolveActionReplyReference(ctx, replyTo),
|
|
@@ -1410,7 +1378,7 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1410
1378
|
if (!mediaUrl) throw new Error("Voice messages require a media file reference (mediaUrl, path, or filePath).");
|
|
1411
1379
|
if (content && content.trim()) throw new Error("Voice messages cannot include text content (Discord limitation). Remove the content parameter.");
|
|
1412
1380
|
assertMediaNotDataUrl(mediaUrl);
|
|
1413
|
-
const result = await
|
|
1381
|
+
const result = await sendVoiceMessageDiscord(to, mediaUrl, {
|
|
1414
1382
|
...ctx.withOpts(),
|
|
1415
1383
|
reply: resolveActionReplyReference(ctx, replyTo),
|
|
1416
1384
|
silent,
|
|
@@ -1428,7 +1396,7 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1428
1396
|
threadName
|
|
1429
1397
|
}));
|
|
1430
1398
|
}
|
|
1431
|
-
const result = await
|
|
1399
|
+
const result = await sendMessageDiscord(to, content ?? "", {
|
|
1432
1400
|
...ctx.withOpts(),
|
|
1433
1401
|
mediaAccess: ctx.options?.mediaAccess,
|
|
1434
1402
|
mediaUrl,
|
|
@@ -1464,10 +1432,14 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1464
1432
|
appliedTags: readStringArrayParam(ctx.params, "appliedTags") ?? void 0
|
|
1465
1433
|
};
|
|
1466
1434
|
try {
|
|
1467
|
-
const thread = await
|
|
1435
|
+
const { initialMessageDelivery, ...thread } = await createThreadDiscord(channelId, payload, ctx.withOpts());
|
|
1468
1436
|
return jsonResult({
|
|
1469
1437
|
ok: true,
|
|
1470
|
-
thread
|
|
1438
|
+
thread,
|
|
1439
|
+
...initialMessageDelivery ? {
|
|
1440
|
+
threadSnapshot: "creation",
|
|
1441
|
+
initialMessageDelivery
|
|
1442
|
+
} : {}
|
|
1471
1443
|
});
|
|
1472
1444
|
} catch (error) {
|
|
1473
1445
|
if (error instanceof DiscordThreadInitialMessageError) {
|
|
@@ -1499,7 +1471,7 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1499
1471
|
guildId,
|
|
1500
1472
|
channelTargetRequiredMessage: "Discord active thread lists require a wildcard channel allowlist so each read target can be authorized."
|
|
1501
1473
|
});
|
|
1502
|
-
const threads = await
|
|
1474
|
+
const threads = await listThreadsDiscord({
|
|
1503
1475
|
guildId,
|
|
1504
1476
|
channelId,
|
|
1505
1477
|
includeArchived,
|
|
@@ -1524,7 +1496,7 @@ async function handleDiscordMessageSendAction(ctx) {
|
|
|
1524
1496
|
});
|
|
1525
1497
|
const mediaUrl = readStringParam(ctx.params, "mediaUrl");
|
|
1526
1498
|
const replyTo = readStringParam(ctx.params, "replyTo");
|
|
1527
|
-
const result = await
|
|
1499
|
+
const result = await sendMessageDiscord(`channel:${channelId}`, content, {
|
|
1528
1500
|
...ctx.withOpts(),
|
|
1529
1501
|
mediaUrl,
|
|
1530
1502
|
mediaAccess: ctx.options?.mediaAccess,
|
|
@@ -1588,7 +1560,7 @@ function readDiscordModerationCommand(action, params) {
|
|
|
1588
1560
|
//#region extensions/discord/src/actions/runtime.moderation.ts
|
|
1589
1561
|
async function verifySenderModerationPermission(params) {
|
|
1590
1562
|
if (!params.senderUserId) return;
|
|
1591
|
-
if (!await
|
|
1563
|
+
if (!await hasAnyGuildPermissionDiscord(params.guildId, params.senderUserId, [params.requiredPermission], createDiscordActionOptions({
|
|
1592
1564
|
cfg: params.cfg,
|
|
1593
1565
|
accountId: params.accountId
|
|
1594
1566
|
}))) throw new Error("Sender does not have required permissions for this moderation action.");
|
|
@@ -1613,7 +1585,7 @@ async function handleDiscordModerationAction(action, params, isActionEnabled, cf
|
|
|
1613
1585
|
});
|
|
1614
1586
|
switch (command.action) {
|
|
1615
1587
|
case "timeout": {
|
|
1616
|
-
const member = await
|
|
1588
|
+
const member = await timeoutMemberDiscord({
|
|
1617
1589
|
guildId: command.guildId,
|
|
1618
1590
|
userId: command.userId,
|
|
1619
1591
|
durationMinutes: command.durationMinutes,
|
|
@@ -1626,14 +1598,14 @@ async function handleDiscordModerationAction(action, params, isActionEnabled, cf
|
|
|
1626
1598
|
});
|
|
1627
1599
|
}
|
|
1628
1600
|
case "kick":
|
|
1629
|
-
await
|
|
1601
|
+
await kickMemberDiscord({
|
|
1630
1602
|
guildId: command.guildId,
|
|
1631
1603
|
userId: command.userId,
|
|
1632
1604
|
reason: command.reason
|
|
1633
1605
|
}, withOpts());
|
|
1634
1606
|
return jsonResult({ ok: true });
|
|
1635
1607
|
case "ban":
|
|
1636
|
-
await
|
|
1608
|
+
await banMemberDiscord({
|
|
1637
1609
|
guildId: command.guildId,
|
|
1638
1610
|
userId: command.userId,
|
|
1639
1611
|
reason: command.reason,
|