@openclaw/discord 2026.9.4 → 2026.9.5
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-DBwRt5ES.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-Du3n5ypX.mjs} +8 -7
- package/dist/.setup/approval-message-updates-BN7JtScm.mjs +17 -0
- package/dist/{audit-BgAgIzwo.js → .setup/audit-C8uaKoa9.mjs} +5 -5
- package/dist/{channel-C_OFFR5Y.js → .setup/channel-ChKdlBgH.mjs} +27 -25
- package/dist/{channel-actions.runtime-tShzmemq.js → .setup/channel-actions.runtime-CJmiFfps.mjs} +18 -11
- package/dist/{allow-list-DWEio925.js → .setup/channel-type-DKnjV1XW.mjs} +161 -1
- package/dist/{channel.setup-CpAwAiS0.js → .setup/channel.setup-BlC3-Kzz.mjs} +4 -4
- package/dist/{components-DBFTIN6P.js → .setup/components-MqMWUWnE.mjs} +3 -3
- 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-_rz33QHO.mjs} +1 -1
- 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-DxcdkXzz.mjs} +6 -6
- package/dist/{handle-action.guild-admin-CpEwox_X.js → .setup/handle-action.guild-admin-DAFyh_yV.mjs} +9 -4
- 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-DnUrDpaU.mjs} +23 -13
- package/dist/{message-handler.preflight-DFpwDW2W.js → .setup/message-handler.preflight-CtqaF_fb.mjs} +33 -20
- package/dist/{message-handler.process-ZKrmmA9D.js → .setup/message-handler.process-Dz1xvuQU.mjs} +68 -78
- package/dist/{outbound-adapter-C8PTt7_p.js → .setup/outbound-adapter-C8v79z9Z.mjs} +13 -9
- package/dist/{outbound-session-route-B0N6os97.js → .setup/outbound-session-route-CqWbuMOm.mjs} +137 -11
- package/dist/{pluralkit-BiUW53Yn.js → .setup/pluralkit-CdAt1G0P.mjs} +2 -2
- 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-72zIvN-i.mjs} +475 -286
- package/dist/{provider-session.runtime-U1M8_EYY.js → .setup/provider-session.runtime-BW7QrF5C.mjs} +4 -4
- package/dist/.setup/provider.runtime-DuhmKdDU.mjs +2 -0
- package/dist/{realtime-session.runtime-Bjsk9Q5t.js → .setup/realtime-session.runtime-DTccTgTM.mjs} +758 -336
- 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-DBfcEgmO.mjs} +28 -6
- package/dist/{runtime-CbknwoBH.js → .setup/runtime-BVoa7hhx.mjs} +2 -2
- package/dist/{runtime-Dxl-ZOvg.js → .setup/runtime-SchNfUsQ.mjs} +92 -139
- 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-CKDczUNL.mjs} +60 -31
- package/dist/{send.components-BWnkX4QN.js → .setup/send.components-DWQjXhPV.mjs} +87 -65
- package/dist/{send.outbound-BVTWrl_4.js → .setup/send.outbound-D0hQ7s50.mjs} +17 -7
- package/dist/{send.shared-BHPM3CSl.js → .setup/send.shared-Zwx6BxQ5.mjs} +15 -12
- package/dist/{sender-identity-f3l5OYgV.js → .setup/sender-identity-0Ymgvmaj.mjs} +1 -1
- package/dist/.setup/setup-plugin-api-CINIEBLa.mjs +3 -0
- package/dist/{shared-CPPR0Xo4.js → .setup/shared-CaA3Vv4n.mjs} +11 -11
- package/dist/{subagent-hooks-DfsiwCec.js → .setup/subagent-hooks-Bired9q6.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-B6MrxbYv.mjs} +4 -4
- package/dist/.setup/targets-D1mAB5yO.mjs +3 -0
- package/dist/{thread-bindings-uudC_0TY.js → .setup/thread-bindings-CK5272V3.mjs} +6 -6
- package/dist/{thread-bindings.manager-BeUxc8nr.js → .setup/thread-bindings.manager-eexkKyrG.mjs} +14 -9
- 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-CuWYgayu.mjs} +62 -25
- package/dist/{typing-DuBg1U8Q.js → .setup/typing-BKZL5fGj.mjs} +2 -2
- package/dist/{voice-runtime-DMYDMkJx.js → .setup/voice-runtime-DHVQ2mFz.mjs} +529 -181
- 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/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/@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/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 +27 -0
- package/node_modules/zod/compile.cjs +77 -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 +2 -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/package.json +13 -2
- 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/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 +12 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +140 -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 +452 -262
- 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 +135 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +30 -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 +2 -2
- 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 +720 -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 +155 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +11 -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 +274 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +425 -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/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 +281 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +47 -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 +183 -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 +46 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +245 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +234 -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/preprocess-types.test.ts +20 -2
- 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 +33 -2
- 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/string.test.ts +127 -5
- 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 +11 -2
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1585 -173
- 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 +76 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +48 -12
- package/node_modules/zod/src/v4/core/checks.ts +57 -44
- package/node_modules/zod/src/v4/core/compile.ts +2188 -0
- package/node_modules/zod/src/v4/core/core.ts +98 -19
- package/node_modules/zod/src/v4/core/doc.ts +11 -7
- package/node_modules/zod/src/v4/core/errors.ts +115 -24
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +6 -1
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +257 -93
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +284 -0
- package/node_modules/zod/src/v4/core/parse.ts +131 -38
- package/node_modules/zod/src/v4/core/regexes.ts +30 -13
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +759 -461
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +969 -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 +1639 -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/tk.test.ts +69 -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 +31 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +275 -42
- package/node_modules/zod/src/v4/core/util.ts +268 -42
- 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 +3 -0
- package/node_modules/zod/src/v4/locales/az.ts +3 -0
- package/node_modules/zod/src/v4/locales/be.ts +10 -0
- package/node_modules/zod/src/v4/locales/bg.ts +3 -0
- package/node_modules/zod/src/v4/locales/bn.ts +121 -0
- package/node_modules/zod/src/v4/locales/ca.ts +3 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +138 -0
- package/node_modules/zod/src/v4/locales/cs.ts +3 -0
- package/node_modules/zod/src/v4/locales/da.ts +5 -2
- package/node_modules/zod/src/v4/locales/de.ts +3 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +15 -4
- package/node_modules/zod/src/v4/locales/eo.ts +3 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +3 -0
- package/node_modules/zod/src/v4/locales/fi.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr.ts +19 -14
- package/node_modules/zod/src/v4/locales/gu.ts +121 -0
- package/node_modules/zod/src/v4/locales/he.ts +6 -1
- package/node_modules/zod/src/v4/locales/hi.ts +124 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +3 -0
- package/node_modules/zod/src/v4/locales/hy.ts +9 -0
- package/node_modules/zod/src/v4/locales/id.ts +3 -0
- package/node_modules/zod/src/v4/locales/index.ts +10 -0
- package/node_modules/zod/src/v4/locales/is.ts +3 -0
- package/node_modules/zod/src/v4/locales/it.ts +3 -0
- package/node_modules/zod/src/v4/locales/ja.ts +3 -0
- package/node_modules/zod/src/v4/locales/ka.ts +3 -0
- package/node_modules/zod/src/v4/locales/km.ts +3 -0
- package/node_modules/zod/src/v4/locales/kn.ts +124 -0
- package/node_modules/zod/src/v4/locales/ko.ts +3 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ms.ts +3 -0
- package/node_modules/zod/src/v4/locales/ne.ts +126 -0
- package/node_modules/zod/src/v4/locales/nl.ts +3 -0
- package/node_modules/zod/src/v4/locales/nn.ts +119 -0
- package/node_modules/zod/src/v4/locales/no.ts +5 -2
- package/node_modules/zod/src/v4/locales/ota.ts +3 -0
- package/node_modules/zod/src/v4/locales/pl.ts +3 -0
- package/node_modules/zod/src/v4/locales/ps.ts +3 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +159 -0
- package/node_modules/zod/src/v4/locales/pt.ts +99 -58
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +10 -0
- package/node_modules/zod/src/v4/locales/sk.ts +121 -0
- package/node_modules/zod/src/v4/locales/sl.ts +3 -0
- package/node_modules/zod/src/v4/locales/sv.ts +5 -2
- package/node_modules/zod/src/v4/locales/ta.ts +3 -0
- package/node_modules/zod/src/v4/locales/th.ts +3 -0
- package/node_modules/zod/src/v4/locales/tk.ts +111 -0
- package/node_modules/zod/src/v4/locales/tr.ts +3 -0
- package/node_modules/zod/src/v4/locales/uk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ur.ts +3 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +3 -0
- package/node_modules/zod/src/v4/locales/yo.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +3 -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 +10 -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 +135 -56
- 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/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 +72 -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/string.test.ts +21 -0
- package/node_modules/zod/v3/ZodError.cjs +22 -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/types.cjs +7 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +2 -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/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 +39 -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 +43 -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 +30 -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 +136 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
- package/node_modules/zod/v4/classic/in-out.cjs +63 -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 +2 -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 +11 -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 +4 -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 +498 -398
- package/node_modules/zod/v4/classic/schemas.d.cts +53 -18
- package/node_modules/zod/v4/classic/schemas.d.ts +53 -18
- package/node_modules/zod/v4/classic/schemas.js +492 -396
- package/node_modules/zod/v4/core/api.cjs +23 -4
- package/node_modules/zod/v4/core/api.d.cts +13 -9
- package/node_modules/zod/v4/core/api.d.ts +13 -9
- package/node_modules/zod/v4/core/api.js +21 -4
- package/node_modules/zod/v4/core/checks.cjs +37 -31
- package/node_modules/zod/v4/core/checks.d.cts +13 -13
- package/node_modules/zod/v4/core/checks.d.ts +13 -13
- package/node_modules/zod/v4/core/checks.js +37 -31
- package/node_modules/zod/v4/core/compile.cjs +1813 -0
- package/node_modules/zod/v4/core/compile.d.cts +51 -0
- package/node_modules/zod/v4/core/compile.d.ts +51 -0
- package/node_modules/zod/v4/core/compile.js +1783 -0
- package/node_modules/zod/v4/core/core.cjs +81 -18
- 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 +82 -19
- package/node_modules/zod/v4/core/doc.cjs +5 -7
- 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 +5 -7
- package/node_modules/zod/v4/core/errors.cjs +110 -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 +110 -25
- package/node_modules/zod/v4/core/index.cjs +5 -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 +4 -0
- 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 +4 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
- package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
- 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 +272 -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 +265 -0
- package/node_modules/zod/v4/core/parse.cjs +96 -34
- 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 +94 -33
- package/node_modules/zod/v4/core/regexes.cjs +27 -15
- package/node_modules/zod/v4/core/regexes.d.cts +2 -0
- package/node_modules/zod/v4/core/regexes.d.ts +2 -0
- package/node_modules/zod/v4/core/regexes.js +24 -13
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +537 -326
- package/node_modules/zod/v4/core/schemas.d.cts +100 -31
- package/node_modules/zod/v4/core/schemas.d.ts +100 -31
- package/node_modules/zod/v4/core/schemas.js +526 -325
- package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
- package/node_modules/zod/v4/core/to-json-schema.d.cts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.js +241 -39
- package/node_modules/zod/v4/core/util.cjs +212 -31
- package/node_modules/zod/v4/core/util.d.cts +58 -1
- package/node_modules/zod/v4/core/util.d.ts +58 -1
- package/node_modules/zod/v4/core/util.js +202 -30
- package/node_modules/zod/v4/core/versions.cjs +2 -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 +195 -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 +15 -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 +3 -0
- package/node_modules/zod/v4/locales/ar.js +3 -0
- package/node_modules/zod/v4/locales/az.cjs +3 -0
- package/node_modules/zod/v4/locales/az.js +3 -0
- package/node_modules/zod/v4/locales/be.cjs +10 -0
- package/node_modules/zod/v4/locales/be.js +10 -0
- package/node_modules/zod/v4/locales/bg.cjs +3 -0
- package/node_modules/zod/v4/locales/bg.js +3 -0
- package/node_modules/zod/v4/locales/bn.cjs +138 -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 +111 -0
- package/node_modules/zod/v4/locales/ca.cjs +3 -0
- package/node_modules/zod/v4/locales/ca.js +3 -0
- package/node_modules/zod/v4/locales/ckb.cjs +158 -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 +131 -0
- package/node_modules/zod/v4/locales/cs.cjs +3 -0
- package/node_modules/zod/v4/locales/cs.js +3 -0
- package/node_modules/zod/v4/locales/da.cjs +5 -2
- package/node_modules/zod/v4/locales/da.js +5 -2
- package/node_modules/zod/v4/locales/de.cjs +3 -0
- package/node_modules/zod/v4/locales/de.js +3 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +14 -4
- package/node_modules/zod/v4/locales/en.js +14 -4
- package/node_modules/zod/v4/locales/eo.cjs +3 -0
- package/node_modules/zod/v4/locales/eo.js +3 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +3 -0
- package/node_modules/zod/v4/locales/fa.js +3 -0
- package/node_modules/zod/v4/locales/fi.cjs +3 -0
- package/node_modules/zod/v4/locales/fi.js +3 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
- package/node_modules/zod/v4/locales/fr-CA.js +3 -0
- package/node_modules/zod/v4/locales/fr.cjs +16 -14
- package/node_modules/zod/v4/locales/fr.js +16 -14
- package/node_modules/zod/v4/locales/gu.cjs +138 -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 +111 -0
- package/node_modules/zod/v4/locales/he.cjs +5 -0
- package/node_modules/zod/v4/locales/he.js +5 -0
- package/node_modules/zod/v4/locales/hi.cjs +136 -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 +109 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +3 -0
- package/node_modules/zod/v4/locales/hu.js +3 -0
- package/node_modules/zod/v4/locales/hy.cjs +9 -0
- package/node_modules/zod/v4/locales/hy.js +9 -0
- package/node_modules/zod/v4/locales/id.cjs +3 -0
- package/node_modules/zod/v4/locales/id.js +3 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -2
- package/node_modules/zod/v4/locales/index.d.cts +10 -0
- package/node_modules/zod/v4/locales/index.d.ts +10 -0
- package/node_modules/zod/v4/locales/index.js +10 -0
- package/node_modules/zod/v4/locales/is.cjs +3 -0
- package/node_modules/zod/v4/locales/is.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +3 -0
- package/node_modules/zod/v4/locales/it.js +3 -0
- package/node_modules/zod/v4/locales/ja.cjs +3 -0
- package/node_modules/zod/v4/locales/ja.js +3 -0
- package/node_modules/zod/v4/locales/ka.cjs +3 -0
- package/node_modules/zod/v4/locales/ka.js +3 -0
- package/node_modules/zod/v4/locales/km.cjs +3 -0
- package/node_modules/zod/v4/locales/km.js +3 -0
- package/node_modules/zod/v4/locales/kn.cjs +141 -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 +114 -0
- package/node_modules/zod/v4/locales/ko.cjs +3 -0
- package/node_modules/zod/v4/locales/ko.js +3 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +3 -0
- package/node_modules/zod/v4/locales/mk.js +3 -0
- package/node_modules/zod/v4/locales/ms.cjs +3 -0
- package/node_modules/zod/v4/locales/ms.js +3 -0
- package/node_modules/zod/v4/locales/ne.cjs +136 -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 +109 -0
- package/node_modules/zod/v4/locales/nl.cjs +3 -0
- package/node_modules/zod/v4/locales/nl.js +3 -0
- package/node_modules/zod/v4/locales/nn.cjs +138 -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 +111 -0
- package/node_modules/zod/v4/locales/no.cjs +5 -2
- package/node_modules/zod/v4/locales/no.js +5 -2
- package/node_modules/zod/v4/locales/ota.cjs +3 -0
- package/node_modules/zod/v4/locales/ota.js +3 -0
- package/node_modules/zod/v4/locales/pl.cjs +3 -0
- package/node_modules/zod/v4/locales/pl.js +3 -0
- package/node_modules/zod/v4/locales/ps.cjs +3 -0
- package/node_modules/zod/v4/locales/ps.js +3 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +168 -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 +141 -0
- package/node_modules/zod/v4/locales/pt.cjs +87 -55
- package/node_modules/zod/v4/locales/pt.js +87 -55
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +10 -0
- package/node_modules/zod/v4/locales/ru.js +10 -0
- package/node_modules/zod/v4/locales/sk.cjs +141 -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 +114 -0
- package/node_modules/zod/v4/locales/sl.cjs +3 -0
- package/node_modules/zod/v4/locales/sl.js +3 -0
- package/node_modules/zod/v4/locales/sv.cjs +5 -2
- package/node_modules/zod/v4/locales/sv.js +5 -2
- package/node_modules/zod/v4/locales/ta.cjs +3 -0
- package/node_modules/zod/v4/locales/ta.js +3 -0
- package/node_modules/zod/v4/locales/th.cjs +3 -0
- package/node_modules/zod/v4/locales/th.js +3 -0
- package/node_modules/zod/v4/locales/tk.cjs +132 -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 +105 -0
- package/node_modules/zod/v4/locales/tr.cjs +3 -0
- package/node_modules/zod/v4/locales/tr.js +3 -0
- package/node_modules/zod/v4/locales/uk.cjs +3 -0
- package/node_modules/zod/v4/locales/uk.js +3 -0
- package/node_modules/zod/v4/locales/ur.cjs +3 -0
- package/node_modules/zod/v4/locales/ur.js +3 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +3 -0
- package/node_modules/zod/v4/locales/vi.js +3 -0
- package/node_modules/zod/v4/locales/yo.cjs +3 -0
- package/node_modules/zod/v4/locales/yo.js +3 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-CN.js +3 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-TW.js +3 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -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/deep-partial.cjs +39 -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 +12 -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 +63 -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/parse.cjs +3 -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 +75 -47
- package/node_modules/zod/v4/mini/schemas.d.cts +43 -13
- package/node_modules/zod/v4/mini/schemas.d.ts +43 -13
- package/node_modules/zod/v4/mini/schemas.js +71 -45
- package/openclaw.plugin.json +3 -4
- package/package.json +10 -8
- package/dist/channel-type-CVLZyGYS.js +0 -7
- 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/{message-handler.history-CJOsN9w5.js → .setup/message-handler.history-CJOsN9w5.mjs} +0 -0
- /package/dist/{model-picker-preference-primitives-BHT1LkR_.js → .setup/model-picker-preference-primitives-BHT1LkR_.mjs} +0 -0
- /package/dist/{preflight-audio-DrnqFA8U.js → .setup/preflight-audio-DrnqFA8U.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,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { E as getDiscordEndpointRuntime, O as resolveDiscordEndpointMediaGuard } from "./channel-type-DKnjV1XW.mjs";
|
|
2
|
+
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.mjs";
|
|
3
|
+
import { a as resolveDiscordChannelParentSafe, n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-C12aDZ0p.mjs";
|
|
4
|
+
import { E as hasDiscordMessageStickers, T as resolveDiscordCdnPolicy, b as resolveDiscordMessageText, j as resolveDiscordMessageChannelId, k as resolveDiscordReferencedReplyMessageId } from "./transcripts-source-CuWYgayu.mjs";
|
|
5
|
+
import { v as createDiscordLivePolicyReader, y as mapGatewayDispatchData } from "./provider-72zIvN-i.mjs";
|
|
5
6
|
import { logDebug } from "openclaw/plugin-sdk/logging-core";
|
|
6
7
|
import { GatewayDispatchEvents } from "discord-api-types/v10";
|
|
7
8
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -193,7 +194,7 @@ function createDiscordAvatarResolver() {
|
|
|
193
194
|
const pending = /* @__PURE__ */ new Set();
|
|
194
195
|
const guildIcons = /* @__PURE__ */ new Map();
|
|
195
196
|
const pendingGuilds = /* @__PURE__ */ new Set();
|
|
196
|
-
const resolveSavedAvatar = (key, url) => {
|
|
197
|
+
const resolveSavedAvatar = (key, url, endpointRuntime) => {
|
|
197
198
|
const cached = saved.get(key);
|
|
198
199
|
if (cached) {
|
|
199
200
|
saved.delete(key);
|
|
@@ -201,12 +202,20 @@ function createDiscordAvatarResolver() {
|
|
|
201
202
|
return cached;
|
|
202
203
|
}
|
|
203
204
|
if (pending.has(key) || pending.size >= DISCORD_AVATAR_CACHE_MAX_ENTRIES) return;
|
|
205
|
+
let endpointGuard;
|
|
206
|
+
try {
|
|
207
|
+
endpointGuard = resolveDiscordEndpointMediaGuard(url, endpointRuntime);
|
|
208
|
+
} catch (error) {
|
|
209
|
+
logDebug(`discord conversation avatar download blocked: ${formatErrorMessage(error)}`);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
204
212
|
pending.add(key);
|
|
205
213
|
saveRemoteMedia({
|
|
206
214
|
url,
|
|
207
215
|
filePathHint: "conversation-avatar.png",
|
|
208
216
|
maxBytes: DISCORD_AVATAR_MAX_BYTES,
|
|
209
|
-
ssrfPolicy: resolveDiscordCdnPolicy()
|
|
217
|
+
ssrfPolicy: endpointGuard?.ssrfPolicy ?? resolveDiscordCdnPolicy(),
|
|
218
|
+
...endpointGuard ? { maxRedirects: endpointGuard.maxRedirects } : {}
|
|
210
219
|
}).then((media) => {
|
|
211
220
|
setBoundedEntry(saved, key, media.path);
|
|
212
221
|
}).catch((error) => {
|
|
@@ -215,7 +224,7 @@ function createDiscordAvatarResolver() {
|
|
|
215
224
|
pending.delete(key);
|
|
216
225
|
});
|
|
217
226
|
};
|
|
218
|
-
const refreshGuildIcon = (client, guildId, conversationId) => {
|
|
227
|
+
const refreshGuildIcon = (client, guildId, conversationId, endpointRuntime) => {
|
|
219
228
|
if (pendingGuilds.has(guildId) || pendingGuilds.size >= DISCORD_AVATAR_CACHE_MAX_ENTRIES) return;
|
|
220
229
|
pendingGuilds.add(guildId);
|
|
221
230
|
client.fetchGuild(guildId).then((guild) => {
|
|
@@ -224,7 +233,7 @@ function createDiscordAvatarResolver() {
|
|
|
224
233
|
expiresAt: Date.now() + DISCORD_GUILD_ICON_TTL_MS,
|
|
225
234
|
hash
|
|
226
235
|
});
|
|
227
|
-
if (hash) resolveSavedAvatar(`${conversationId}\0${hash}`, discordAvatarUrl("icons", guildId, hash));
|
|
236
|
+
if (hash) resolveSavedAvatar(`${conversationId}\0${hash}`, discordAvatarUrl("icons", guildId, hash), endpointRuntime);
|
|
228
237
|
}).catch((error) => {
|
|
229
238
|
logDebug(`discord guild icon lookup failed: ${formatErrorMessage(error)}`);
|
|
230
239
|
}).finally(() => {
|
|
@@ -232,13 +241,14 @@ function createDiscordAvatarResolver() {
|
|
|
232
241
|
});
|
|
233
242
|
};
|
|
234
243
|
return { resolve(params) {
|
|
244
|
+
const endpointRuntime = getDiscordEndpointRuntime() ?? null;
|
|
235
245
|
if (!params.guildId) {
|
|
236
246
|
const hash = params.author.avatar;
|
|
237
|
-
return hash ? resolveSavedAvatar(`${params.conversationId}\0${hash}`, discordAvatarUrl("avatars", params.author.id, hash)) : void 0;
|
|
247
|
+
return hash ? resolveSavedAvatar(`${params.conversationId}\0${hash}`, discordAvatarUrl("avatars", params.author.id, hash), endpointRuntime) : void 0;
|
|
238
248
|
}
|
|
239
249
|
const guildIcon = guildIcons.get(params.guildId);
|
|
240
|
-
if (!guildIcon || guildIcon.expiresAt <= Date.now()) refreshGuildIcon(params.client, params.guildId, params.conversationId);
|
|
241
|
-
return guildIcon?.hash ? resolveSavedAvatar(`${params.conversationId}\0${guildIcon.hash}`, discordAvatarUrl("icons", params.guildId, guildIcon.hash)) : void 0;
|
|
250
|
+
if (!guildIcon || guildIcon.expiresAt <= Date.now()) refreshGuildIcon(params.client, params.guildId, params.conversationId, endpointRuntime);
|
|
251
|
+
return guildIcon?.hash ? resolveSavedAvatar(`${params.conversationId}\0${guildIcon.hash}`, discordAvatarUrl("icons", params.guildId, guildIcon.hash), endpointRuntime) : void 0;
|
|
242
252
|
} };
|
|
243
253
|
}
|
|
244
254
|
//#endregion
|
|
@@ -250,7 +260,7 @@ function applyImplicitReplyBatchGate(ctx, replyToMode, isBatched) {
|
|
|
250
260
|
}
|
|
251
261
|
//#endregion
|
|
252
262
|
//#region extensions/discord/src/monitor/message-run-queue.ts
|
|
253
|
-
const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-
|
|
263
|
+
const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-Dz1xvuQU.mjs"));
|
|
254
264
|
async function processDiscordQueuedMessage(params) {
|
|
255
265
|
const abortSignal = params.job.runtime.abortSignal && params.lifecycleSignal ? AbortSignal.any([params.job.runtime.abortSignal, params.lifecycleSignal]) : params.job.runtime.abortSignal ?? params.lifecycleSignal;
|
|
256
266
|
try {
|
|
@@ -337,7 +347,7 @@ function createDiscordMessageRunQueue(params) {
|
|
|
337
347
|
}
|
|
338
348
|
//#endregion
|
|
339
349
|
//#region extensions/discord/src/monitor/message-dispatcher.ts
|
|
340
|
-
const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-
|
|
350
|
+
const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-CtqaF_fb.mjs"));
|
|
341
351
|
function isNonEmptyString(value) {
|
|
342
352
|
return typeof value === "string" && value.length > 0;
|
|
343
353
|
}
|
package/dist/{message-handler.preflight-DFpwDW2W.js → .setup/message-handler.preflight-CtqaF_fb.mjs}
RENAMED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { s as resolveDefaultDiscordAccountId } from "./accounts-CwJQoLjM.
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { t as createDiscordHistorySenderProvenance } from "./message-handler.history-CJOsN9w5.js";
|
|
1
|
+
import { D as Message, mt as getChannelMessage, t as discord_exports } from "./discord-BXpHW-cu.mjs";
|
|
2
|
+
import { C as resolveTimestampMs, S as resolveDiscordSystemLocation, _ as resolveDiscordShouldRequireMention, a as normalizeDiscordDisplaySlug, f as resolveDiscordGuildEntry, l as resolveDiscordChannelConfigWithFallback, o as normalizeDiscordSlug, p as resolveDiscordMemberAccessState, t as isDiscordThreadChannelType, x as formatDiscordUserTag } from "./channel-type-DKnjV1XW.mjs";
|
|
3
|
+
import { s as resolveDefaultDiscordAccountId } from "./accounts-CwJQoLjM.mjs";
|
|
4
|
+
import { n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe } from "./channel-access-C12aDZ0p.mjs";
|
|
5
|
+
import { A as resolveDiscordChannelInfo, C as resolveMediaList, D as resolveDiscordMessageStickers, O as resolveDiscordReferencedReplyMessage, S as resolveForwardedMediaList, _ as resolveDiscordMessageBatch, b as resolveDiscordMessageText, j as resolveDiscordMessageChannelId, v as resolveDiscordMessageHistoryText, y as resolveDiscordMessageMentionDocuments } from "./transcripts-source-CuWYgayu.mjs";
|
|
6
|
+
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-D86uWLt_.mjs";
|
|
7
|
+
import { _ as resolveDiscordRuntimeBindingConversationId, f as resolveDiscordConversationRoute, h as resolveDiscordConversationIdentity, p as resolveDiscordEffectiveRoute, u as buildDiscordRoutePeer } from "./outbound-session-route-CqWbuMOm.mjs";
|
|
8
|
+
import { t as resolveDiscordConversationBindingRoute } from "./conversation-binding-route-_rz33QHO.mjs";
|
|
9
|
+
import { S as resolveDiscordTextCommandAccess, _ as handleDiscordDmCommandDecision, n as resolveDiscordPreflightChannelAccess, x as resolveDiscordDmCommandAccess } from "./provider-72zIvN-i.mjs";
|
|
10
|
+
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-0Ymgvmaj.mjs";
|
|
11
|
+
import { t as createDiscordHistorySenderProvenance } from "./message-handler.history-CJOsN9w5.mjs";
|
|
13
12
|
import { logDebug } from "openclaw/plugin-sdk/logging-core";
|
|
14
13
|
import { MessageReferenceType, MessageType } from "discord-api-types/v10";
|
|
15
14
|
import { normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -20,7 +19,7 @@ import { formatAllowlistMatchMeta } from "openclaw/plugin-sdk/allow-from";
|
|
|
20
19
|
import { findCodeRegions, isInsideCode } from "openclaw/plugin-sdk/text-chunking";
|
|
21
20
|
import { isRecentOutboundMessageIdentity } from "openclaw/plugin-sdk/channel-outbound";
|
|
22
21
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
23
|
-
import { buildMentionRegexes, classifyChannelInboundEvent, implicitMentionKindWhen, logInboundDrop, matchesMentionWithExplicit, normalizeMentionText, recordChannelBotPairLoopAndCheckSuppression, resolveInboundMentionDecision, resolveUnmentionedGroupInboundPolicy, toHistoryMediaEntries, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
|
|
22
|
+
import { buildMentionRegexes, classifyChannelInboundEvent, implicitMentionKindWhen, logInboundDrop, matchesMentionWithExplicit, normalizeMentionText, recordChannelBotPairLoopAndCheckSuppression, resolveGroupThreadMentionFacts, resolveInboundMentionDecision, resolveUnmentionedGroupInboundPolicy, toHistoryMediaEntries, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
|
|
24
23
|
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
25
24
|
import { enqueueRoutedSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
|
|
26
25
|
import { hasControlCommand } from "openclaw/plugin-sdk/command-detection";
|
|
@@ -29,7 +28,7 @@ import { shouldHandleTextCommands } from "openclaw/plugin-sdk/command-surface";
|
|
|
29
28
|
import { createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
30
29
|
//#region extensions/discord/src/monitor/message-handler.dm-preflight.ts
|
|
31
30
|
const loadConversationRuntime$1 = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/conversation-binding-runtime"));
|
|
32
|
-
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
31
|
+
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-CKDczUNL.mjs").then((n) => n.t));
|
|
33
32
|
function resolveDiscordDmPairingSenderId(sender) {
|
|
34
33
|
return sender.isPluralKit ? `pk:${sender.id}` : sender.id;
|
|
35
34
|
}
|
|
@@ -437,10 +436,10 @@ function logDiscordPreflightInboundSummary(params) {
|
|
|
437
436
|
}
|
|
438
437
|
//#endregion
|
|
439
438
|
//#region extensions/discord/src/monitor/message-handler.preflight-runtime.ts
|
|
440
|
-
const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-
|
|
441
|
-
const loadPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio-DrnqFA8U.
|
|
442
|
-
const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-
|
|
443
|
-
const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./transcripts-source-
|
|
439
|
+
const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-CdAt1G0P.mjs").then((n) => n.n));
|
|
440
|
+
const loadPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio-DrnqFA8U.mjs"));
|
|
441
|
+
const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-B2YEEMbS.mjs"));
|
|
442
|
+
const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./transcripts-source-CuWYgayu.mjs").then((n) => n.f));
|
|
444
443
|
//#endregion
|
|
445
444
|
//#region extensions/discord/src/monitor/message-handler.preflight-pluralkit.ts
|
|
446
445
|
async function resolveDiscordPreflightPluralKitInfo(params) {
|
|
@@ -907,7 +906,20 @@ async function preflightDiscordMessage(params) {
|
|
|
907
906
|
transcript: preflightTranscript
|
|
908
907
|
});
|
|
909
908
|
const hasActiveBotMention = requiresActiveBotMention && !isDirectMessage && (mentionSources.some((source) => source.activeNativeMention || source.documents.some((text) => matchesActiveDiscordMentionPatterns(text, mentionRegexes))) || matchesActiveDiscordMentionPatterns(preflightTranscript ?? "", mentionRegexes));
|
|
910
|
-
const
|
|
909
|
+
const groupThread = resolveGroupThreadMentionFacts({
|
|
910
|
+
cfg: params.cfg,
|
|
911
|
+
channel: "discord",
|
|
912
|
+
peerId: isDirectMessage ? buildDiscordRoutePeer({
|
|
913
|
+
isDirectMessage,
|
|
914
|
+
isGroupDm,
|
|
915
|
+
directUserId: author.id,
|
|
916
|
+
conversationId: messageChannelId
|
|
917
|
+
}).id : params.cfg.broadcast?.[`discord:${messageChannelId}`] !== void 0 ? messageChannelId : threadParentId ?? messageChannelId,
|
|
918
|
+
text: mentionText || preflightTranscript || "",
|
|
919
|
+
sessionKey: boundSessionKey || effectiveRoute.sessionKey,
|
|
920
|
+
acpBinding: Boolean(configuredBinding)
|
|
921
|
+
});
|
|
922
|
+
const wasMentioned = wasNormallyMentioned || hasActiveBotMention || Boolean(groupThread?.mentionedAgentIds.length);
|
|
911
923
|
logDiscordPreflightInboundSummary({
|
|
912
924
|
messageId: message.id,
|
|
913
925
|
guildId: params.data.guild_id ?? void 0,
|
|
@@ -960,7 +972,7 @@ async function preflightDiscordMessage(params) {
|
|
|
960
972
|
return null;
|
|
961
973
|
}
|
|
962
974
|
}
|
|
963
|
-
const canDetectMention = Boolean(botId) || mentionRegexes.length > 0;
|
|
975
|
+
const canDetectMention = Boolean(groupThread) || Boolean(botId) || mentionRegexes.length > 0;
|
|
964
976
|
const mentionDecision = resolveInboundMentionDecision({
|
|
965
977
|
facts: {
|
|
966
978
|
canDetectMention,
|
|
@@ -1098,6 +1110,7 @@ async function preflightDiscordMessage(params) {
|
|
|
1098
1110
|
logDebug(`[discord-preflight] success: route=${effectiveRoute.agentId} sessionKey=${effectiveRoute.sessionKey}`);
|
|
1099
1111
|
return buildDiscordMessagePreflightContext({
|
|
1100
1112
|
preflightParams: params,
|
|
1113
|
+
groupThread,
|
|
1101
1114
|
data,
|
|
1102
1115
|
client: params.client,
|
|
1103
1116
|
message,
|
package/dist/{message-handler.process-ZKrmmA9D.js → .setup/message-handler.process-Dz1xvuQU.mjs}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { p as resolveDiscordMaxLinesPerMessage } from "./accounts-CwJQoLjM.
|
|
4
|
-
import {
|
|
5
|
-
import { F as createDiscordRuntimeAccountContext, P as createDiscordRestClient, d as resolveDiscordTargetChannelId, k as resolveDiscordMessageFlags } from "./send.shared-
|
|
6
|
-
import { a as discordTextHasBroadcastMention } from "./send.outbound-
|
|
7
|
-
import {
|
|
8
|
-
import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-
|
|
9
|
-
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-D86uWLt_.
|
|
10
|
-
import "./targets-
|
|
11
|
-
import {
|
|
12
|
-
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-
|
|
13
|
-
import { a as formatDiscordReplySkip, c as buildGuildLabel, g as createDiscordSupplementalContextAccessChecker, h as buildDiscordInboundAccessContext, i as formatDiscordReplyDeliveryFailure, l as resolveReplyContext, o as sanitizeDiscordFrontChannelReplyPayloads, r as deliverDiscordReply, s as buildDirectLabel } from "./provider-
|
|
14
|
-
import { n as resolveDiscordWebhookId } from "./sender-identity-
|
|
15
|
-
import { t as beginDiscordActiveTurnThreadRoute } from "./active-turn-thread-route-fmHl1HNd.
|
|
16
|
-
import { n as filterDiscordHistoryEntriesForContext, t as createDiscordHistorySenderProvenance } from "./message-handler.history-CJOsN9w5.
|
|
17
|
-
import { t as sendTyping } from "./typing-
|
|
1
|
+
import { ft as editChannelMessage, st as createChannelMessage, t as discord_exports, ut as deleteChannelMessage } from "./discord-BXpHW-cu.mjs";
|
|
2
|
+
import { C as resolveTimestampMs, i as normalizeDiscordAllowList, o as normalizeDiscordSlug } from "./channel-type-DKnjV1XW.mjs";
|
|
3
|
+
import { p as resolveDiscordMaxLinesPerMessage } from "./accounts-CwJQoLjM.mjs";
|
|
4
|
+
import { b as resolveDiscordChannelId, o as chunkDiscordTextWithMode } from "./retry-DBfcEgmO.mjs";
|
|
5
|
+
import { F as createDiscordRuntimeAccountContext, P as createDiscordRestClient, d as resolveDiscordTargetChannelId, k as resolveDiscordMessageFlags } from "./send.shared-Zwx6BxQ5.mjs";
|
|
6
|
+
import { a as discordTextHasBroadcastMention } from "./send.outbound-D0hQ7s50.mjs";
|
|
7
|
+
import { D as resolveDiscordMessageStickers, b as resolveDiscordMessageText, h as resolveDiscordThreadStarter, p as resolveDiscordAutoThreadReplyPlan, w as resolveReferencedReplyMediaList, x as formatDiscordMediaText } from "./transcripts-source-CuWYgayu.mjs";
|
|
8
|
+
import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-CKDczUNL.mjs";
|
|
9
|
+
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-D86uWLt_.mjs";
|
|
10
|
+
import "./targets-D1mAB5yO.mjs";
|
|
11
|
+
import { b as discordInboundEventDelivery, h as resolveDiscordConversationIdentity, u as buildDiscordRoutePeer } from "./outbound-session-route-CqWbuMOm.mjs";
|
|
12
|
+
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-C8v79z9Z.mjs";
|
|
13
|
+
import { a as formatDiscordReplySkip, c as buildGuildLabel, g as createDiscordSupplementalContextAccessChecker, h as buildDiscordInboundAccessContext, i as formatDiscordReplyDeliveryFailure, l as resolveReplyContext, o as sanitizeDiscordFrontChannelReplyPayloads, r as deliverDiscordReply, s as buildDirectLabel } from "./provider-72zIvN-i.mjs";
|
|
14
|
+
import { n as resolveDiscordWebhookId } from "./sender-identity-0Ymgvmaj.mjs";
|
|
15
|
+
import { t as beginDiscordActiveTurnThreadRoute } from "./active-turn-thread-route-fmHl1HNd.mjs";
|
|
16
|
+
import { n as filterDiscordHistoryEntriesForContext, t as createDiscordHistorySenderProvenance } from "./message-handler.history-CJOsN9w5.mjs";
|
|
17
|
+
import { t as sendTyping } from "./typing-BKZL5fGj.mjs";
|
|
18
18
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
19
19
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
20
20
|
import { buildAgentSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
@@ -26,7 +26,7 @@ import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-run
|
|
|
26
26
|
import { convertMarkdownTables, stripInlineDirectiveTagsForDelivery, stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
|
|
27
27
|
import { bindIngressLifecycleToReplyOptions, createChannelMessageReplyPipeline, createChannelProgressDraftCompositor, createFinalizableDraftStreamControlsForState, createTypingCallbacks, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, resolveChannelDraftStreamingChunking, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelPreviewStreamMode, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewCommandText, resolveChannelStreamingProgressNarration, resolveTranscriptBackedChannelFinalText } from "openclaw/plugin-sdk/channel-outbound";
|
|
28
28
|
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
|
|
29
|
-
import { buildChannelInboundEventContext, createCommandTurnContext, dispatchChannelInboundTurn, formatInboundEnvelope, formatInboundMediaUnavailableText, hasFinalInboundReplyDispatch, readAgentRunTerminalOutcome, resolveEnvelopeFormatOptions, toHistoryMediaEntries, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
|
|
29
|
+
import { buildChannelInboundEventContext, createCommandTurnContext, dispatchChannelInboundTurn, formatInboundEnvelope, formatInboundMediaUnavailableText, getGroupThreadDeliverySession, hasFinalInboundReplyDispatch, readAgentRunTerminalOutcome, resolveEnvelopeFormatOptions, toHistoryMediaEntries, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
|
|
30
30
|
import { evaluateSupplementalContextVisibility } from "openclaw/plugin-sdk/security-runtime";
|
|
31
31
|
import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/conversation-runtime";
|
|
32
32
|
import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
@@ -388,6 +388,7 @@ async function buildDiscordMessageProcessContext(params) {
|
|
|
388
388
|
groupSystemPrompt: isGuildMessage ? groupSystemPrompt : void 0
|
|
389
389
|
},
|
|
390
390
|
extra: {
|
|
391
|
+
GroupThread: ctx.groupThread,
|
|
391
392
|
...preflightAudioTranscript !== void 0 ? { Transcript: preflightAudioTranscript } : {},
|
|
392
393
|
GroupSubject: isDirectMessage ? void 0 : groupChannel,
|
|
393
394
|
GroupChannel: groupChannel,
|
|
@@ -530,7 +531,10 @@ function createDiscordMessageProgressRuntime(params) {
|
|
|
530
531
|
return await draftPreview.pushItemEvent(payload);
|
|
531
532
|
},
|
|
532
533
|
onPlanUpdate: async (payload) => {
|
|
533
|
-
if (payload.phase === "update") return await draftPreview.pushPlanProgress(payload.steps, {
|
|
534
|
+
if (payload.phase === "update") return await draftPreview.pushPlanProgress(payload.steps, {
|
|
535
|
+
explanation: payload.explanation,
|
|
536
|
+
explanationFormat: payload.explanationFormat
|
|
537
|
+
});
|
|
534
538
|
return false;
|
|
535
539
|
},
|
|
536
540
|
onApprovalEvent: async (payload) => {
|
|
@@ -956,7 +960,7 @@ function resolveDiscordPreviewStreamMode(params = {}) {
|
|
|
956
960
|
function createDiscordDraftPreviewController(params) {
|
|
957
961
|
const discordStreamMode = resolveDiscordPreviewStreamMode(params.discordConfig);
|
|
958
962
|
const hookRunner = getGlobalHookRunner();
|
|
959
|
-
const allowProviderPreview = !((hookRunner?.hasHooks("reply_payload_sending") ?? false) || (hookRunner?.hasHooks("message_sending") ?? false));
|
|
963
|
+
const allowProviderPreview = !params.groupThread && !((hookRunner?.hasHooks("reply_payload_sending") ?? false) || (hookRunner?.hasHooks("message_sending") ?? false));
|
|
960
964
|
const draftMaxChars = Math.min(params.textLimit, 2e3);
|
|
961
965
|
const canStreamProgressDraftForToolOnlySource = params.sourceRepliesAreToolOnly && discordStreamMode === "progress";
|
|
962
966
|
const previewAvailable = allowProviderPreview && (!params.sourceRepliesAreToolOnly || canStreamProgressDraftForToolOnlySource) && discordStreamMode !== "off";
|
|
@@ -1234,6 +1238,9 @@ function createDiscordReplyTypingFeedback(params) {
|
|
|
1234
1238
|
}
|
|
1235
1239
|
//#endregion
|
|
1236
1240
|
//#region extensions/discord/src/monitor/message-handler.process-reply-runtime.ts
|
|
1241
|
+
function formatDiscordGroupThreadReply(text, participant) {
|
|
1242
|
+
return `**${participant.name.replace(/[\\`*_{}[\]()<>#!|]/g, "\\$&").replace(/\s+/g, " ")}**\n${text}`;
|
|
1243
|
+
}
|
|
1237
1244
|
function formatDiscordReasoningQuote(quoteText) {
|
|
1238
1245
|
const lines = quoteText.split("\n").map((line) => line.trim()).filter(Boolean);
|
|
1239
1246
|
if (!lines.length) return;
|
|
@@ -1343,6 +1350,7 @@ function createDiscordMessageReplyRuntime(params) {
|
|
|
1343
1350
|
resolveCurrentTurnTranscriptFinalText,
|
|
1344
1351
|
deliverChannelId,
|
|
1345
1352
|
draftPreview: createDiscordDraftPreviewController({
|
|
1353
|
+
groupThread: Boolean(ctxPayload.GroupThread),
|
|
1346
1354
|
cfg,
|
|
1347
1355
|
discordConfig,
|
|
1348
1356
|
accountId,
|
|
@@ -1403,9 +1411,6 @@ function isFallbackOnlyToolWarningFinal(payload) {
|
|
|
1403
1411
|
return !resolveSendableOutboundReplyParts(payload).hasMedia;
|
|
1404
1412
|
}
|
|
1405
1413
|
async function processDiscordMessage(ctx, observer) {
|
|
1406
|
-
await processDiscordMessageInner(ctx, observer);
|
|
1407
|
-
}
|
|
1408
|
-
async function processDiscordMessageInner(ctx, observer) {
|
|
1409
1414
|
const dispatchStartedAt = Date.now();
|
|
1410
1415
|
const { cfg, accountId, token, runtime, textLimit, replyToMode, message, messageChannelId, isGuildMessage, isDirectMessage, isGroupDm, messageText, threadBindings, route, abortSignal, turnAdoptionLifecycle, preparedMedia: mediaList } = ctx;
|
|
1411
1416
|
if (abortSignal?.aborted) return;
|
|
@@ -1523,7 +1528,7 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1523
1528
|
draftPreview,
|
|
1524
1529
|
isFallbackOnlyToolWarningFinal
|
|
1525
1530
|
});
|
|
1526
|
-
const deliverDiscordPayload = async (
|
|
1531
|
+
const deliverDiscordPayload = async (incomingPayload, info, options) => {
|
|
1527
1532
|
if (abortSignal?.aborted) {
|
|
1528
1533
|
logVerbose(formatDiscordReplySkip({
|
|
1529
1534
|
kind: info.kind,
|
|
@@ -1533,6 +1538,30 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1533
1538
|
}));
|
|
1534
1539
|
return { visibleReplySent: false };
|
|
1535
1540
|
}
|
|
1541
|
+
const deliverySession = options?.deliverySession ?? getGroupThreadDeliverySession();
|
|
1542
|
+
const deliveryOptions = {
|
|
1543
|
+
cfg,
|
|
1544
|
+
token,
|
|
1545
|
+
accountId,
|
|
1546
|
+
rest: reactions.deliveryRest,
|
|
1547
|
+
runtime,
|
|
1548
|
+
replyToMode,
|
|
1549
|
+
textLimit,
|
|
1550
|
+
maxLinesPerMessage,
|
|
1551
|
+
tableMode,
|
|
1552
|
+
chunkMode,
|
|
1553
|
+
sessionKey: deliverySession?.sessionKey ?? ctxPayload.SessionKey,
|
|
1554
|
+
threadBindings,
|
|
1555
|
+
mediaLocalRoots: deliverySession ? getAgentScopedMediaLocalRoots(cfg, deliverySession.agentId) : mediaLocalRoots,
|
|
1556
|
+
bindPendingFinalDelivery: info.bindPendingFinalDelivery,
|
|
1557
|
+
onPlatformSendDispatch: info.onPlatformSendDispatch,
|
|
1558
|
+
assertPlatformSendAuthorized: info.assertPlatformSendAuthorized
|
|
1559
|
+
};
|
|
1560
|
+
let payload = incomingPayload;
|
|
1561
|
+
if (info.participant && (payload.text || payload.mediaUrl || payload.mediaUrls?.length)) payload = {
|
|
1562
|
+
...payload,
|
|
1563
|
+
text: formatDiscordGroupThreadReply(payload.text ?? "", info.participant)
|
|
1564
|
+
};
|
|
1536
1565
|
const isFinal = info.kind === "final";
|
|
1537
1566
|
if (payload.isReasoning) {
|
|
1538
1567
|
const raw = (payload.text ?? "").trim();
|
|
@@ -1550,26 +1579,11 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1550
1579
|
}));
|
|
1551
1580
|
if (!replies.length) return { visibleReplySent: false };
|
|
1552
1581
|
const result = await deliverDiscordReply({
|
|
1553
|
-
|
|
1582
|
+
...deliveryOptions,
|
|
1554
1583
|
replies,
|
|
1555
1584
|
target: deliverTarget,
|
|
1556
|
-
token,
|
|
1557
|
-
accountId,
|
|
1558
|
-
rest: reactions.deliveryRest,
|
|
1559
|
-
runtime,
|
|
1560
1585
|
replyToId: replyReference.use(),
|
|
1561
|
-
|
|
1562
|
-
textLimit,
|
|
1563
|
-
maxLinesPerMessage,
|
|
1564
|
-
tableMode,
|
|
1565
|
-
chunkMode,
|
|
1566
|
-
sessionKey: ctxPayload.SessionKey,
|
|
1567
|
-
threadBindings,
|
|
1568
|
-
mediaLocalRoots,
|
|
1569
|
-
kind: "block",
|
|
1570
|
-
bindPendingFinalDelivery: info.bindPendingFinalDelivery,
|
|
1571
|
-
onPlatformSendDispatch: info.onPlatformSendDispatch,
|
|
1572
|
-
assertPlatformSendAuthorized: info.assertPlatformSendAuthorized
|
|
1586
|
+
kind: "block"
|
|
1573
1587
|
});
|
|
1574
1588
|
if (result.visibleReplySent) replyReference.markSent();
|
|
1575
1589
|
return result;
|
|
@@ -1577,12 +1591,14 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1577
1591
|
if (isFinal && !options?.allowFallbackOnlyToolWarning && isFallbackOnlyToolWarningFinal(payload)) {
|
|
1578
1592
|
if (!userFacingFinalDelivered && (!finalReplyStartNotified || userFacingFinalDeliveryFailed)) pendingToolWarningFinal = {
|
|
1579
1593
|
payload,
|
|
1580
|
-
info
|
|
1594
|
+
info,
|
|
1595
|
+
deliverySession
|
|
1581
1596
|
};
|
|
1582
1597
|
return { visibleReplySent: false };
|
|
1583
1598
|
}
|
|
1584
1599
|
if (isFinal) draftPreview.markFinalReplyStarted();
|
|
1585
|
-
const finalText = isFinal && typeof payload.text === "string" ? await resolveTranscriptBackedChannelFinalText({
|
|
1600
|
+
const finalText = isFinal && !ctxPayload.GroupThread && typeof payload.text === "string" ? await resolveTranscriptBackedChannelFinalText({
|
|
1601
|
+
payload,
|
|
1586
1602
|
finalText: payload.text,
|
|
1587
1603
|
resolveCandidateText: resolveCurrentTurnTranscriptFinalText
|
|
1588
1604
|
}) : payload.text;
|
|
@@ -1651,27 +1667,12 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1651
1667
|
const replyToId = replyReference.use();
|
|
1652
1668
|
notifyFinalReplyStart();
|
|
1653
1669
|
return (await deliverDiscordReply({
|
|
1654
|
-
|
|
1670
|
+
...deliveryOptions,
|
|
1655
1671
|
replies: [fallbackPayload],
|
|
1656
1672
|
target: deliverTarget,
|
|
1657
|
-
token,
|
|
1658
|
-
accountId,
|
|
1659
|
-
rest: reactions.deliveryRest,
|
|
1660
|
-
runtime,
|
|
1661
1673
|
replyToId,
|
|
1662
|
-
replyToMode,
|
|
1663
|
-
textLimit,
|
|
1664
|
-
maxLinesPerMessage,
|
|
1665
|
-
tableMode,
|
|
1666
|
-
chunkMode,
|
|
1667
|
-
sessionKey: ctxPayload.SessionKey,
|
|
1668
|
-
threadBindings,
|
|
1669
|
-
mediaLocalRoots,
|
|
1670
1674
|
allowedMentions,
|
|
1671
|
-
kind: info.kind
|
|
1672
|
-
bindPendingFinalDelivery: info.bindPendingFinalDelivery,
|
|
1673
|
-
onPlatformSendDispatch: info.onPlatformSendDispatch,
|
|
1674
|
-
assertPlatformSendAuthorized: info.assertPlatformSendAuthorized
|
|
1675
|
+
kind: info.kind
|
|
1675
1676
|
})).visibleReplySent;
|
|
1676
1677
|
},
|
|
1677
1678
|
onNormalDelivered: () => {
|
|
@@ -1692,26 +1693,11 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1692
1693
|
const replyToId = replyReference.use();
|
|
1693
1694
|
if (isFinal) notifyFinalReplyStart();
|
|
1694
1695
|
const result = await deliverDiscordReply({
|
|
1695
|
-
|
|
1696
|
+
...deliveryOptions,
|
|
1696
1697
|
replies: [deliverablePayload],
|
|
1697
1698
|
target: deliverTarget,
|
|
1698
|
-
token,
|
|
1699
|
-
accountId,
|
|
1700
|
-
rest: reactions.deliveryRest,
|
|
1701
|
-
runtime,
|
|
1702
1699
|
replyToId,
|
|
1703
|
-
|
|
1704
|
-
textLimit,
|
|
1705
|
-
maxLinesPerMessage,
|
|
1706
|
-
tableMode,
|
|
1707
|
-
chunkMode,
|
|
1708
|
-
sessionKey: ctxPayload.SessionKey,
|
|
1709
|
-
threadBindings,
|
|
1710
|
-
mediaLocalRoots,
|
|
1711
|
-
kind: info.kind,
|
|
1712
|
-
bindPendingFinalDelivery: info.bindPendingFinalDelivery,
|
|
1713
|
-
onPlatformSendDispatch: info.onPlatformSendDispatch,
|
|
1714
|
-
assertPlatformSendAuthorized: info.assertPlatformSendAuthorized
|
|
1700
|
+
kind: info.kind
|
|
1715
1701
|
});
|
|
1716
1702
|
if (!result.visibleReplySent) return result;
|
|
1717
1703
|
replyReference.markSent();
|
|
@@ -1743,7 +1729,10 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1743
1729
|
const pending = pendingToolWarningFinal;
|
|
1744
1730
|
pendingToolWarningFinal = void 0;
|
|
1745
1731
|
try {
|
|
1746
|
-
return await deliverDiscordPayload(pending.payload, pending.info, {
|
|
1732
|
+
return await deliverDiscordPayload(pending.payload, pending.info, {
|
|
1733
|
+
allowFallbackOnlyToolWarning: true,
|
|
1734
|
+
deliverySession: pending.deliverySession
|
|
1735
|
+
});
|
|
1747
1736
|
} catch (err) {
|
|
1748
1737
|
dispatchError = true;
|
|
1749
1738
|
onDiscordDeliveryError(err, pending.info);
|
|
@@ -1794,6 +1783,7 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1794
1783
|
limit: ctx.historyLimit
|
|
1795
1784
|
},
|
|
1796
1785
|
replyOptions: {
|
|
1786
|
+
groupThreadReplyFormatter: formatDiscordGroupThreadReply,
|
|
1797
1787
|
...turnAdoptionLifecycle ? bindIngressLifecycleToReplyOptions(turnAdoptionLifecycle) : {},
|
|
1798
1788
|
abortSignal,
|
|
1799
1789
|
skillFilter: ctx.channelConfig?.skills,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { t as createDiscordActionGate } from "./accounts-CwJQoLjM.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as sendDiscordComponentMessageLazy, i as resolveDiscordComponentSpec, n as buildDiscordPresentationPayload, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-DrlHcWfM.js";
|
|
1
|
+
import { t as createDiscordActionGate } from "./accounts-CwJQoLjM.mjs";
|
|
2
|
+
import { c as createDiscordSendReceiptFromResults, i as hasDiscordMessageCreateAmbiguity, o as chunkDiscordTextWithMode, p as resolveDiscordReplyReference, s as createDiscordSendReceipt, t as canFallbackDiscordWebhookSend, u as toDiscordOutboundDeliveryResult, v as normalizeDiscordOutboundTarget } from "./retry-DBfcEgmO.mjs";
|
|
3
|
+
import { a as resolveDiscordComponentSpec, b as discordInboundEventDelivery, c as formatDiscordApprovalDisplayValue, n as DISCORD_PRESENTATION_CAPABILITIES, o as sendDiscordComponentMessageLazy, r as buildDiscordPresentationPayload, x as notifyDiscordInboundEventOutboundPayloadSuccess } from "./outbound-session-route-CqWbuMOm.mjs";
|
|
5
4
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
6
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
6
|
import { getReplyPayloadTtsSupplement, resolvePayloadMediaUrls, sendPayloadMediaSequenceOrFallback, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
@@ -60,7 +59,7 @@ function normalizeDiscordApprovalPayload(payload) {
|
|
|
60
59
|
}
|
|
61
60
|
//#endregion
|
|
62
61
|
//#region extensions/discord/src/outbound-send-context.ts
|
|
63
|
-
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
62
|
+
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-CKDczUNL.mjs").then((n) => n.t));
|
|
64
63
|
function resolveDiscordOutboundTarget(params) {
|
|
65
64
|
if (params.threadId == null) return params.to;
|
|
66
65
|
const threadId = normalizeOptionalStringifiedId(params.threadId) ?? "";
|
|
@@ -279,9 +278,10 @@ async function sendDiscordOutboundPayload(params) {
|
|
|
279
278
|
//#endregion
|
|
280
279
|
//#region extensions/discord/src/outbound-adapter.ts
|
|
281
280
|
const DISCORD_TEXT_CHUNK_LIMIT = 2e3;
|
|
281
|
+
const DISCORD_PRECHUNK_MAX_LINES = Number.MAX_SAFE_INTEGER;
|
|
282
282
|
const log = createSubsystemLogger("discord/outbound");
|
|
283
|
-
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-
|
|
284
|
-
const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-
|
|
283
|
+
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-CK5272V3.mjs").then((n) => n.t));
|
|
284
|
+
const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-DWQjXhPV.mjs").then((n) => n.i));
|
|
285
285
|
function resolveDiscordDeliveryOptions(params) {
|
|
286
286
|
return {
|
|
287
287
|
onPlatformSendDispatch: params.onPlatformSendDispatch,
|
|
@@ -303,10 +303,14 @@ async function maybeSendDiscordWebhookText(params) {
|
|
|
303
303
|
accountId: binding.accountId,
|
|
304
304
|
threadId: binding.threadId,
|
|
305
305
|
cfg: params.cfg,
|
|
306
|
-
replyTo: params
|
|
306
|
+
replyTo: resolveDiscordReplyReference(params),
|
|
307
307
|
username: truncateUtf16Safe(username, 80) || void 0,
|
|
308
308
|
avatarUrl: normalizeOptionalString(params.identity?.avatarUrl),
|
|
309
309
|
tableMode: params.formatting?.tableMode,
|
|
310
|
+
chunking: {
|
|
311
|
+
maxChars: params.formatting?.textLimit,
|
|
312
|
+
maxLines: params.formatting?.maxLinesPerMessage
|
|
313
|
+
},
|
|
310
314
|
...resolveDiscordDeliveryOptions(params)
|
|
311
315
|
});
|
|
312
316
|
}
|
|
@@ -338,7 +342,7 @@ const discordOutbound = {
|
|
|
338
342
|
deliveryMode: "direct",
|
|
339
343
|
chunker: (text, limit, ctx) => chunkDiscordTextWithMode(text, {
|
|
340
344
|
maxChars: limit,
|
|
341
|
-
maxLines: ctx?.formatting?.maxLinesPerMessage
|
|
345
|
+
maxLines: ctx?.formatting?.maxLinesPerMessage ?? DISCORD_PRECHUNK_MAX_LINES
|
|
342
346
|
}),
|
|
343
347
|
textChunkLimit: DISCORD_TEXT_CHUNK_LIMIT,
|
|
344
348
|
pollMaxOptions: 10,
|