@openclaw/discord 2026.7.2-beta.2 → 2026.7.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-inspect-dFV0JrnR.js → account-inspect-Dztmn4J4.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-CMd4nzLB.js → accounts-D2LKPukU.js} +3 -10
- package/dist/action-runtime-api.js +1 -1
- package/dist/{activities-api-D0D_87n3.js → activities-api-8TMGXUH4.js} +63 -69
- package/dist/activities-api.js +1 -1
- package/dist/{allow-list-B7qOH5xu.js → allow-list-DzKrtfah.js} +18 -7
- package/dist/{api-B88T4rFN.js → api-C43z8vUm.js} +3 -1
- package/dist/api.js +27 -18
- package/dist/{approval-handler.runtime-B7E1-x5q.js → approval-handler.runtime-ClZpan85.js} +7 -12
- package/dist/{conversation-identity-BPcbhCAH.js → approval-message-safety-LyND6GR3.js} +49 -3
- package/dist/{audit-CjpnY1yb.js → audit-CFfounXC.js} +4 -4
- package/dist/{channel-actions-BQct-o4T.js → channel-actions-C8n1zWZ-.js} +4 -4
- package/dist/{channel-actions.runtime-CC4QwYVO.js → channel-actions.runtime-CgJy35O0.js} +8 -8
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-BDfKr14H.js → channel-yq-so4jJ.js} +24 -21
- package/dist/{channel.setup-BS4gd8sc.js → channel.setup-Tn_O2B7F.js} +78 -31
- package/dist/{chunk-CHpY_lsO.js → chunk-BrZocpfs.js} +41 -110
- package/dist/{config-schema-CoDck1GW.js → config-schema-D-YrV-5E.js} +328 -57
- package/dist/{directory-config-G1QwBIdi.js → directory-config-DF85-bUY.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-nfvekMil.js → directory-live-CrMtTrb0.js} +4 -4
- package/dist/{doctor-Bq4pJAQk.js → doctor-CORGPgoY.js} +4 -4
- package/dist/{doctor-contract-wId6pV41.js → doctor-contract-BPUD3Di9.js} +46 -65
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{handle-action.guild-admin-LYY75_Oa.js → handle-action.guild-admin-DikBWer5.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/legacy-state-migrations-api.js +1 -1
- package/dist/{manager.runtime-w6VVYQMl.js → manager.runtime-DVvlH8NR.js} +102 -149
- package/dist/message-handler-1ui-YxsF.js +564 -0
- package/dist/{message-handler.preflight-DnAH04Ss.js → message-handler.preflight-CAEQvP3t.js} +76 -47
- package/dist/{message-handler.process-ClgKz8I5.js → message-handler.process-REBztvIW.js} +617 -570
- package/dist/{message-utils-BU3gc01v.js → message-utils-ajbkdTVA.js} +60 -52
- package/dist/{outbound-adapter-ByoXsR-V.js → outbound-adapter-XZWo4_HD.js} +36 -5
- package/dist/{outbound-components-7wAolLuS.js → outbound-components-CTFDDcq5.js} +3 -3
- package/dist/{outbound-session-route-D4QqePZN.js → outbound-session-route-D_nc_Ayk.js} +36 -6
- package/dist/{pluralkit-r4wiI2yy.js → pluralkit-CCovPs9s.js} +5 -2
- package/dist/{preflight-audio-DDSZna4F.js → preflight-audio-BjnQZ5yS.js} +9 -6
- package/dist/{probe-WKeTYyJX.js → probe-Bci2pS8M.js} +2 -2
- package/dist/{probe.runtime-CRY-qUke.js → probe.runtime-C88gnnXj.js} +1 -1
- package/dist/{provider-PRlF_lZm.js → provider-CfiChtjf.js} +950 -878
- package/dist/{provider-session.runtime-BZPUZRjn.js → provider-session.runtime-D9GTBKPg.js} +3 -3
- package/dist/provider.runtime-DSzKjpKs.js +2 -0
- package/dist/{resolve-allowlist-common-QN7VMZaC.js → resolve-allowlist-common-C1hTvZa4.js} +3 -3
- package/dist/{resolve-channels-BO9NUPlS.js → resolve-channels-CmFAdMeQ.js} +4 -4
- package/dist/{resolve-users-CU3oG5-m.js → resolve-users-Cmu75lZy.js} +3 -3
- package/dist/{runtime-BsefAQ9q.js → runtime-D-6AugWA.js} +11 -10
- package/dist/{runtime-CCf5nkV3.js → runtime-TwM8IrZU.js} +2 -3
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +24 -24
- package/dist/runtime-api.lookup.js +5 -5
- package/dist/runtime-api.monitor-DPa2ZoSK.js +5 -0
- package/dist/runtime-api.monitor.js +7 -8
- package/dist/runtime-api.send.js +6 -5
- package/dist/runtime-api.threads.js +6 -6
- package/dist/{secret-config-contract-BDNrRWvd.js → secret-config-contract-B1akrlyY.js} +1 -0
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/{security-audit-aLbWmUjl.js → security-audit-njzOejQp.js} +2 -10
- package/dist/{security-audit.runtime-K0nkzjzJ.js → security-audit.runtime-DZbDdAnw.js} +1 -1
- package/dist/{send-JJzVo_sK.js → send-CfnXLUXq.js} +27 -88
- package/dist/{send.components-CCRW54gK.js → send.components-V7cyCKbH.js} +8 -6
- package/dist/{send.outbound-Cvulb-k_.js → send.outbound-BbC2qjpH.js} +303 -8
- package/dist/send.reactions-bLrJCZ4G.js +85 -0
- package/dist/send.receipt-CuwRrpFz.js +48 -0
- package/dist/{send.shared-XuOTO1dW.js → send.shared-Dfacnk-E.js} +7 -33
- package/dist/{sender-identity-C62lBe18.js → sender-identity-mG_zsdox.js} +1 -1
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-Bngr0I-v.js → shared-DMA7f3a8.js} +31 -9
- package/dist/subagent-hooks-api.js +10 -1
- package/dist/{subagent-hooks-mSxRv4AE.js → subagent-hooks-kFyJQ-MK.js} +3 -3
- package/dist/subagent-progress-mjPRFz-a.js +664 -0
- package/dist/{system-events-BANBRAe3.js → system-events-BSlhBq3u.js} +2 -2
- package/dist/{target-resolver-BaEmTxeK.js → target-resolver-Bo1oWLPO.js} +3 -3
- package/dist/targets-CB8ahjZk.js +3 -0
- package/dist/{thread-bindings-4MV-u8vU.js → thread-bindings-DAHJuT22.js} +7 -8
- package/dist/{thread-bindings.discord-api-DXfXsHGZ.js → thread-bindings.discord-api-C_tCQcv3.js} +10 -6
- package/dist/{thread-bindings.manager-DJ4cO5Eu.js → thread-bindings.manager-DlZEGvC1.js} +5 -5
- package/dist/{thread-bindings.session-updates-DnTpkroM.js → thread-bindings.session-updates-DAIlp7Px.js} +1 -1
- package/dist/{thread-bindings.state-C5afR9TD.js → thread-bindings.state-Cgi5uRn-.js} +9 -48
- package/dist/{timeouts-D5lWili0.js → timeouts-B9cy6RvQ.js} +1 -6
- package/dist/{transcripts-source-TDZcMriu.js → transcripts-source-CyJ-sc3n.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-CKd2NMWG.js → typing-Ci9nhuSi.js} +2 -2
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/LICENSE +21 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/README.md +208 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/index.cjs +33 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/index.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/index.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/index.js +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/package.json +118 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/index.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/function.test.ts +257 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/types.ts +5136 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/checks.ts +30 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/compat.ts +66 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/errors.ts +75 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/external.ts +50 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/parse.ts +33 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/api.ts +1594 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/checks.ts +1283 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/core.ts +134 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/errors.ts +424 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/index.ts +15 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/json-schema.ts +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/parse.ts +94 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/regexes.ts +135 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/registries.ts +96 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/schemas.ts +3842 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/util.ts +775 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ar.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/az.ts +121 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/be.ts +184 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ca.ts +127 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/cs.ts +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/de.ts +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/en.ts +127 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/eo.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/es.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/fa.ts +134 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/fi.ts +131 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/fr.ts +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/he.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/hu.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/id.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/index.ts +39 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/it.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ja.ts +122 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/kh.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ko.ts +131 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/mk.ts +127 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ms.ts +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/no.ts +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ota.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/pl.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ps.ts +133 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/pt.ts +123 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ru.ts +184 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/sl.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/sv.ts +127 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ta.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/th.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/tr.ts +121 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ua.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ur.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/vi.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/coerce.ts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/iso.ts +62 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/parse.ts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/external.js +6 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/index.js +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/locales/en.cjs +111 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/types.cjs +3775 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/types.d.cts +1031 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/types.d.ts +1031 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/types.js +3693 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/checks.cjs +32 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/compat.cjs +57 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/compat.d.cts +46 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/compat.d.ts +46 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/compat.js +27 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/errors.cjs +67 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/errors.js +41 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/external.cjs +70 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/external.d.cts +13 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/external.d.ts +13 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/external.js +18 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/parse.cjs +32 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/parse.d.cts +23 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/parse.d.ts +23 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/parse.js +6 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/schemas.cjs +1109 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/schemas.d.cts +630 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/schemas.d.ts +630 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/schemas.js +1006 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/api.cjs +1039 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/api.d.cts +284 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/api.d.ts +284 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/api.js +906 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/checks.cjs +591 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/checks.js +565 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/core.cjs +67 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/core.d.cts +49 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/core.d.ts +49 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/core.js +61 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/errors.cjs +226 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/errors.d.cts +208 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/errors.d.ts +208 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/errors.js +195 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/index.cjs +44 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/index.d.cts +15 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/index.d.ts +15 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/index.js +15 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/json-schema.d.cts +87 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/json-schema.d.ts +87 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/parse.cjs +87 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/parse.d.cts +25 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/parse.d.ts +25 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/parse.js +57 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/regexes.cjs +103 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/regexes.d.cts +62 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/regexes.d.ts +62 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/regexes.js +95 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/schemas.cjs +1748 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/schemas.d.cts +1041 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/schemas.d.ts +1041 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/schemas.js +1717 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/to-json-schema.js +849 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/util.cjs +539 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/util.d.cts +183 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/util.d.ts +183 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/util.js +493 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/index.js +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ar.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ar.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ar.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/az.cjs +141 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/az.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/az.js +115 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/be.cjs +190 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/be.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/be.js +164 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ca.cjs +144 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ca.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ca.js +118 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/cs.cjs +161 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/cs.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/cs.js +135 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/de.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/de.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/de.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/en.cjs +145 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/en.d.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/en.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/eo.cjs +144 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/eo.d.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/eo.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/es.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/es.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/es.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fa.cjs +148 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fa.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fa.js +122 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fi.cjs +148 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fi.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fi.js +122 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr-CA.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/he.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/he.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/he.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/hu.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/hu.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/hu.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/id.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/id.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/id.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/index.cjs +84 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/index.d.cts +39 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/index.d.ts +39 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/index.js +39 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/it.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/it.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/it.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ja.cjs +141 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ja.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ja.js +115 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/kh.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/kh.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/kh.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/kh.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ko.cjs +147 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ko.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ko.js +121 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/mk.cjs +144 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/mk.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/mk.js +118 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ms.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ms.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ms.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/nl.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/nl.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/nl.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/no.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/no.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/no.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ota.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ota.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ota.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pl.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pl.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pl.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ps.cjs +148 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ps.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ps.js +122 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pt.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pt.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pt.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ru.cjs +190 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ru.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ru.js +164 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sl.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sl.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sl.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sv.cjs +144 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sv.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sv.js +118 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ta.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ta.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ta.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/th.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/th.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/th.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/tr.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/tr.d.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/tr.js +115 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ua.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ua.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ua.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ua.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ur.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ur.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ur.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/vi.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/vi.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/vi.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-CN.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-TW.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/coerce.cjs +47 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/coerce.js +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/external.cjs +62 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/external.d.cts +11 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/external.d.ts +11 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/external.js +13 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/iso.cjs +60 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/iso.js +30 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/parse.cjs +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/schemas.cjs +839 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/schemas.d.cts +356 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/schemas.d.ts +356 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/schemas.js +732 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4-mini/index.cjs +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4-mini/index.js +1 -0
- package/node_modules/@types/debug/LICENSE +21 -0
- package/node_modules/@types/debug/README.md +69 -0
- package/node_modules/@types/debug/index.d.ts +50 -0
- package/node_modules/@types/debug/package.json +58 -0
- package/node_modules/@types/mdast/LICENSE +21 -0
- package/node_modules/@types/mdast/README.md +15 -0
- package/node_modules/@types/mdast/index.d.ts +1123 -0
- package/node_modules/@types/mdast/package.json +47 -0
- package/node_modules/@types/ms/LICENSE +21 -0
- package/node_modules/@types/ms/README.md +82 -0
- package/node_modules/@types/ms/index.d.ts +63 -0
- package/node_modules/@types/ms/package.json +26 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/fs/promises.d.ts +16 -6
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/unist/LICENSE +21 -0
- package/node_modules/@types/unist/README.md +15 -0
- package/node_modules/@types/unist/index.d.ts +119 -0
- package/node_modules/@types/unist/package.json +60 -0
- package/node_modules/character-entities/index.d.ts +6 -0
- package/node_modules/character-entities/index.js +2132 -0
- package/node_modules/character-entities/license +22 -0
- package/node_modules/character-entities/package.json +78 -0
- package/node_modules/character-entities/readme.md +152 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/decode-named-character-reference/index.d.ts +13 -0
- package/node_modules/decode-named-character-reference/index.d.ts.map +1 -0
- package/node_modules/decode-named-character-reference/index.dom.d.ts +6 -0
- package/node_modules/decode-named-character-reference/index.dom.d.ts.map +1 -0
- package/node_modules/decode-named-character-reference/index.dom.js +32 -0
- package/node_modules/decode-named-character-reference/index.js +19 -0
- package/node_modules/decode-named-character-reference/license +22 -0
- package/node_modules/decode-named-character-reference/package.json +90 -0
- package/node_modules/decode-named-character-reference/readme.md +136 -0
- package/node_modules/dequal/dist/index.js +86 -0
- package/node_modules/dequal/dist/index.min.js +1 -0
- package/node_modules/dequal/dist/index.mjs +84 -0
- package/node_modules/dequal/index.d.ts +1 -0
- package/node_modules/dequal/license +21 -0
- package/node_modules/dequal/lite/index.d.ts +1 -0
- package/node_modules/dequal/lite/index.js +31 -0
- package/node_modules/dequal/lite/index.min.js +1 -0
- package/node_modules/dequal/lite/index.mjs +29 -0
- package/node_modules/dequal/package.json +57 -0
- package/node_modules/dequal/readme.md +112 -0
- package/node_modules/devlop/lib/default.js +9 -0
- package/node_modules/devlop/lib/development.d.ts +84 -0
- package/node_modules/devlop/lib/development.js +238 -0
- package/node_modules/devlop/license +22 -0
- package/node_modules/devlop/package.json +80 -0
- package/node_modules/devlop/readme.md +360 -0
- package/node_modules/discord-api-types/CHANGELOG.md +9 -0
- package/node_modules/discord-api-types/package.json +4 -4
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts +4 -1
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/channel.d.ts +5 -1
- package/node_modules/discord-api-types/payloads/v10/channel.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/channel.js +4 -0
- package/node_modules/discord-api-types/payloads/v10/channel.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/message.d.ts +9 -2
- package/node_modules/discord-api-types/payloads/v10/message.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/message.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts +4 -1
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/channel.d.ts +5 -1
- package/node_modules/discord-api-types/payloads/v9/channel.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/channel.js +4 -0
- package/node_modules/discord-api-types/payloads/v9/channel.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/message.d.ts +9 -2
- package/node_modules/discord-api-types/payloads/v9/message.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/message.js.map +1 -1
- package/node_modules/discord-api-types/rest/v10/channel.d.ts +39 -8
- package/node_modules/discord-api-types/rest/v10/channel.d.ts.map +1 -1
- package/node_modules/discord-api-types/rest/v10/channel.js.map +1 -1
- package/node_modules/discord-api-types/rest/v10/webhook.d.ts +3 -3
- package/node_modules/discord-api-types/rest/v9/channel.d.ts +39 -8
- package/node_modules/discord-api-types/rest/v9/channel.d.ts.map +1 -1
- package/node_modules/discord-api-types/rest/v9/channel.js.map +1 -1
- package/node_modules/discord-api-types/rest/v9/webhook.d.ts +3 -3
- package/node_modules/mdast-util-from-markdown/dev/index.d.ts +23 -0
- package/node_modules/mdast-util-from-markdown/dev/index.js +2 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts +53 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts.map +1 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/index.js +1348 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/types.d.ts +295 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/types.js +2 -0
- package/node_modules/mdast-util-from-markdown/index.d.ts +23 -0
- package/node_modules/mdast-util-from-markdown/index.js +2 -0
- package/node_modules/mdast-util-from-markdown/lib/index.d.ts +53 -0
- package/node_modules/mdast-util-from-markdown/lib/index.d.ts.map +1 -0
- package/node_modules/mdast-util-from-markdown/lib/index.js +1177 -0
- package/node_modules/mdast-util-from-markdown/lib/types.d.ts +295 -0
- package/node_modules/mdast-util-from-markdown/lib/types.js +2 -0
- package/node_modules/mdast-util-from-markdown/license +22 -0
- package/node_modules/mdast-util-from-markdown/package.json +99 -0
- package/node_modules/mdast-util-from-markdown/readme.md +535 -0
- package/node_modules/mdast-util-to-string/index.d.ts +2 -0
- package/node_modules/mdast-util-to-string/index.js +5 -0
- package/node_modules/mdast-util-to-string/lib/index.d.ts +31 -0
- package/node_modules/mdast-util-to-string/lib/index.js +108 -0
- package/node_modules/mdast-util-to-string/license +22 -0
- package/node_modules/mdast-util-to-string/package.json +78 -0
- package/node_modules/mdast-util-to-string/readme.md +218 -0
- package/node_modules/micromark/dev/index.d.ts +82 -0
- package/node_modules/micromark/dev/index.d.ts.map +1 -0
- package/node_modules/micromark/dev/index.js +68 -0
- package/node_modules/micromark/dev/lib/compile.d.ts +16 -0
- package/node_modules/micromark/dev/lib/compile.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/compile.js +1152 -0
- package/node_modules/micromark/dev/lib/constructs.d.ts +73 -0
- package/node_modules/micromark/dev/lib/constructs.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/constructs.js +101 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts +46 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.js +717 -0
- package/node_modules/micromark/dev/lib/initialize/content.d.ts +4 -0
- package/node_modules/micromark/dev/lib/initialize/content.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/content.js +99 -0
- package/node_modules/micromark/dev/lib/initialize/document.d.ts +10 -0
- package/node_modules/micromark/dev/lib/initialize/document.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/document.js +445 -0
- package/node_modules/micromark/dev/lib/initialize/flow.d.ts +4 -0
- package/node_modules/micromark/dev/lib/initialize/flow.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/flow.js +86 -0
- package/node_modules/micromark/dev/lib/initialize/text.d.ts +8 -0
- package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/text.js +244 -0
- package/node_modules/micromark/dev/lib/parse.d.ts +10 -0
- package/node_modules/micromark/dev/lib/parse.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/parse.js +58 -0
- package/node_modules/micromark/dev/lib/postprocess.d.ts +9 -0
- package/node_modules/micromark/dev/lib/postprocess.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/postprocess.js +19 -0
- package/node_modules/micromark/dev/lib/preprocess.d.ts +13 -0
- package/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/preprocess.js +141 -0
- package/node_modules/micromark/dev/stream.d.ts +35 -0
- package/node_modules/micromark/dev/stream.d.ts.map +1 -0
- package/node_modules/micromark/dev/stream.js +270 -0
- package/node_modules/micromark/index.d.ts +82 -0
- package/node_modules/micromark/index.d.ts.map +1 -0
- package/node_modules/micromark/index.js +60 -0
- package/node_modules/micromark/lib/compile.d.ts +16 -0
- package/node_modules/micromark/lib/compile.d.ts.map +1 -0
- package/node_modules/micromark/lib/compile.js +1060 -0
- package/node_modules/micromark/lib/constructs.d.ts +73 -0
- package/node_modules/micromark/lib/constructs.d.ts.map +1 -0
- package/node_modules/micromark/lib/constructs.js +85 -0
- package/node_modules/micromark/lib/create-tokenizer.d.ts +46 -0
- package/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -0
- package/node_modules/micromark/lib/create-tokenizer.js +611 -0
- package/node_modules/micromark/lib/initialize/content.d.ts +4 -0
- package/node_modules/micromark/lib/initialize/content.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/content.js +79 -0
- package/node_modules/micromark/lib/initialize/document.d.ts +10 -0
- package/node_modules/micromark/lib/initialize/document.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/document.js +362 -0
- package/node_modules/micromark/lib/initialize/flow.d.ts +4 -0
- package/node_modules/micromark/lib/initialize/flow.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/flow.js +58 -0
- package/node_modules/micromark/lib/initialize/text.d.ts +8 -0
- package/node_modules/micromark/lib/initialize/text.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/text.js +212 -0
- package/node_modules/micromark/lib/parse.d.ts +10 -0
- package/node_modules/micromark/lib/parse.d.ts.map +1 -0
- package/node_modules/micromark/lib/parse.js +56 -0
- package/node_modules/micromark/lib/postprocess.d.ts +9 -0
- package/node_modules/micromark/lib/postprocess.d.ts.map +1 -0
- package/node_modules/micromark/lib/postprocess.js +18 -0
- package/node_modules/micromark/lib/preprocess.d.ts +13 -0
- package/node_modules/micromark/lib/preprocess.d.ts.map +1 -0
- package/node_modules/micromark/lib/preprocess.js +115 -0
- package/node_modules/micromark/license +22 -0
- package/node_modules/micromark/package.json +100 -0
- package/node_modules/micromark/readme.md +488 -0
- package/node_modules/micromark/stream.d.ts +35 -0
- package/node_modules/micromark/stream.d.ts.map +1 -0
- package/node_modules/micromark/stream.js +256 -0
- package/node_modules/micromark-core-commonmark/dev/index.d.ts +23 -0
- package/node_modules/micromark-core-commonmark/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/index.js +22 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.js +300 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.js +269 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.js +62 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.js +162 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.js +69 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.js +166 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +514 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +202 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.js +257 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts +7 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.js +185 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.js +295 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js +65 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +233 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +989 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.js +783 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +656 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +110 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +62 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.js +34 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.js +306 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +210 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js +120 -0
- package/node_modules/micromark-core-commonmark/index.d.ts +23 -0
- package/node_modules/micromark-core-commonmark/index.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/index.js +22 -0
- package/node_modules/micromark-core-commonmark/lib/attention.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/attention.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/attention.js +241 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.js +233 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.js +61 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.js +143 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.js +64 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.js +149 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.js +460 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.js +177 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.js +225 -0
- package/node_modules/micromark-core-commonmark/lib/content.d.ts +7 -0
- package/node_modules/micromark-core-commonmark/lib/content.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/content.js +163 -0
- package/node_modules/micromark-core-commonmark/lib/definition.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/definition.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/definition.js +254 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +60 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.js +195 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.js +876 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.js +678 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.js +560 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.js +102 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.js +55 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.js +33 -0
- package/node_modules/micromark-core-commonmark/lib/list.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/list.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/list.js +213 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.js +185 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.js +102 -0
- package/node_modules/micromark-core-commonmark/license +22 -0
- package/node_modules/micromark-core-commonmark/package.json +74 -0
- package/node_modules/micromark-core-commonmark/readme.md +171 -0
- package/node_modules/micromark-factory-destination/dev/index.d.ts +42 -0
- package/node_modules/micromark-factory-destination/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-destination/dev/index.js +255 -0
- package/node_modules/micromark-factory-destination/index.d.ts +42 -0
- package/node_modules/micromark-factory-destination/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-destination/index.js +206 -0
- package/node_modules/micromark-factory-destination/license +22 -0
- package/node_modules/micromark-factory-destination/package.json +57 -0
- package/node_modules/micromark-factory-destination/readme.md +234 -0
- package/node_modules/micromark-factory-label/dev/index.d.ts +37 -0
- package/node_modules/micromark-factory-label/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-label/dev/index.js +172 -0
- package/node_modules/micromark-factory-label/index.d.ts +37 -0
- package/node_modules/micromark-factory-label/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-label/index.js +148 -0
- package/node_modules/micromark-factory-label/license +22 -0
- package/node_modules/micromark-factory-label/package.json +60 -0
- package/node_modules/micromark-factory-label/readme.md +224 -0
- package/node_modules/micromark-factory-space/dev/index.d.ts +37 -0
- package/node_modules/micromark-factory-space/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-space/dev/index.js +67 -0
- package/node_modules/micromark-factory-space/index.d.ts +37 -0
- package/node_modules/micromark-factory-space/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-space/index.js +64 -0
- package/node_modules/micromark-factory-space/license +22 -0
- package/node_modules/micromark-factory-space/package.json +55 -0
- package/node_modules/micromark-factory-space/readme.md +225 -0
- package/node_modules/micromark-factory-title/dev/index.d.ts +36 -0
- package/node_modules/micromark-factory-title/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-title/dev/index.js +169 -0
- package/node_modules/micromark-factory-title/index.d.ts +36 -0
- package/node_modules/micromark-factory-title/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-title/index.js +158 -0
- package/node_modules/micromark-factory-title/license +22 -0
- package/node_modules/micromark-factory-title/package.json +58 -0
- package/node_modules/micromark-factory-title/readme.md +229 -0
- package/node_modules/micromark-factory-whitespace/dev/index.d.ts +22 -0
- package/node_modules/micromark-factory-whitespace/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-whitespace/dev/index.js +53 -0
- package/node_modules/micromark-factory-whitespace/index.d.ts +22 -0
- package/node_modules/micromark-factory-whitespace/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-whitespace/index.js +44 -0
- package/node_modules/micromark-factory-whitespace/license +22 -0
- package/node_modules/micromark-factory-whitespace/package.json +57 -0
- package/node_modules/micromark-factory-whitespace/readme.md +205 -0
- package/node_modules/micromark-util-character/dev/index.d.ts +195 -0
- package/node_modules/micromark-util-character/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-character/dev/index.js +252 -0
- package/node_modules/micromark-util-character/index.d.ts +195 -0
- package/node_modules/micromark-util-character/index.d.ts.map +1 -0
- package/node_modules/micromark-util-character/index.js +246 -0
- package/node_modules/micromark-util-character/license +22 -0
- package/node_modules/micromark-util-character/package.json +57 -0
- package/node_modules/micromark-util-character/readme.md +446 -0
- package/node_modules/micromark-util-chunked/dev/index.d.ts +41 -0
- package/node_modules/micromark-util-chunked/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-chunked/dev/index.js +89 -0
- package/node_modules/micromark-util-chunked/index.d.ts +41 -0
- package/node_modules/micromark-util-chunked/index.d.ts.map +1 -0
- package/node_modules/micromark-util-chunked/index.js +81 -0
- package/node_modules/micromark-util-chunked/license +22 -0
- package/node_modules/micromark-util-chunked/package.json +57 -0
- package/node_modules/micromark-util-chunked/readme.md +219 -0
- package/node_modules/micromark-util-classify-character/dev/index.d.ts +18 -0
- package/node_modules/micromark-util-classify-character/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-classify-character/dev/index.js +38 -0
- package/node_modules/micromark-util-classify-character/index.d.ts +18 -0
- package/node_modules/micromark-util-classify-character/index.d.ts.map +1 -0
- package/node_modules/micromark-util-classify-character/index.js +27 -0
- package/node_modules/micromark-util-classify-character/license +22 -0
- package/node_modules/micromark-util-classify-character/package.json +59 -0
- package/node_modules/micromark-util-classify-character/readme.md +205 -0
- package/node_modules/micromark-util-combine-extensions/index.d.ts +22 -0
- package/node_modules/micromark-util-combine-extensions/index.d.ts.map +1 -0
- package/node_modules/micromark-util-combine-extensions/index.js +143 -0
- package/node_modules/micromark-util-combine-extensions/license +22 -0
- package/node_modules/micromark-util-combine-extensions/package.json +52 -0
- package/node_modules/micromark-util-combine-extensions/readme.md +201 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts +16 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.js +42 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts +16 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.js +32 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/license +22 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/package.json +59 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/readme.md +184 -0
- package/node_modules/micromark-util-decode-string/dev/index.d.ts +14 -0
- package/node_modules/micromark-util-decode-string/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-string/dev/index.js +53 -0
- package/node_modules/micromark-util-decode-string/index.d.ts +14 -0
- package/node_modules/micromark-util-decode-string/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-string/index.js +45 -0
- package/node_modules/micromark-util-decode-string/license +22 -0
- package/node_modules/micromark-util-decode-string/package.json +63 -0
- package/node_modules/micromark-util-decode-string/readme.md +179 -0
- package/node_modules/micromark-util-encode/index.d.ts +14 -0
- package/node_modules/micromark-util-encode/index.d.ts.map +1 -0
- package/node_modules/micromark-util-encode/index.js +33 -0
- package/node_modules/micromark-util-encode/license +22 -0
- package/node_modules/micromark-util-encode/package.json +47 -0
- package/node_modules/micromark-util-encode/readme.md +176 -0
- package/node_modules/micromark-util-html-tag-name/index.d.ts +30 -0
- package/node_modules/micromark-util-html-tag-name/index.d.ts.map +1 -0
- package/node_modules/micromark-util-html-tag-name/index.js +93 -0
- package/node_modules/micromark-util-html-tag-name/license +22 -0
- package/node_modules/micromark-util-html-tag-name/package.json +47 -0
- package/node_modules/micromark-util-html-tag-name/readme.md +193 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts +21 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.js +38 -0
- package/node_modules/micromark-util-normalize-identifier/index.d.ts +21 -0
- package/node_modules/micromark-util-normalize-identifier/index.d.ts.map +1 -0
- package/node_modules/micromark-util-normalize-identifier/index.js +33 -0
- package/node_modules/micromark-util-normalize-identifier/license +22 -0
- package/node_modules/micromark-util-normalize-identifier/package.json +58 -0
- package/node_modules/micromark-util-normalize-identifier/readme.md +187 -0
- package/node_modules/micromark-util-resolve-all/index.d.ts +22 -0
- package/node_modules/micromark-util-resolve-all/index.d.ts.map +1 -0
- package/node_modules/micromark-util-resolve-all/index.js +32 -0
- package/node_modules/micromark-util-resolve-all/license +22 -0
- package/node_modules/micromark-util-resolve-all/package.json +48 -0
- package/node_modules/micromark-util-resolve-all/readme.md +238 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts +36 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.js +124 -0
- package/node_modules/micromark-util-sanitize-uri/index.d.ts +36 -0
- package/node_modules/micromark-util-sanitize-uri/index.d.ts.map +1 -0
- package/node_modules/micromark-util-sanitize-uri/index.js +107 -0
- package/node_modules/micromark-util-sanitize-uri/license +22 -0
- package/node_modules/micromark-util-sanitize-uri/package.json +59 -0
- package/node_modules/micromark-util-sanitize-uri/readme.md +214 -0
- package/node_modules/micromark-util-subtokenize/dev/index.d.ts +12 -0
- package/node_modules/micromark-util-subtokenize/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/dev/index.js +284 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts +161 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js +288 -0
- package/node_modules/micromark-util-subtokenize/index.d.ts +12 -0
- package/node_modules/micromark-util-subtokenize/index.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/index.js +228 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts +161 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +251 -0
- package/node_modules/micromark-util-subtokenize/license +22 -0
- package/node_modules/micromark-util-subtokenize/package.json +60 -0
- package/node_modules/micromark-util-subtokenize/readme.md +181 -0
- package/node_modules/micromark-util-symbol/lib/codes.d.ts +139 -0
- package/node_modules/micromark-util-symbol/lib/codes.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/codes.js +158 -0
- package/node_modules/micromark-util-symbol/lib/constants.d.ts +37 -0
- package/node_modules/micromark-util-symbol/lib/constants.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/constants.js +44 -0
- package/node_modules/micromark-util-symbol/lib/default.d.ts +5 -0
- package/node_modules/micromark-util-symbol/lib/default.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/default.js +4 -0
- package/node_modules/micromark-util-symbol/lib/types.d.ts +106 -0
- package/node_modules/micromark-util-symbol/lib/types.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/types.js +453 -0
- package/node_modules/micromark-util-symbol/lib/values.d.ts +102 -0
- package/node_modules/micromark-util-symbol/lib/values.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/values.js +109 -0
- package/node_modules/micromark-util-symbol/license +22 -0
- package/node_modules/micromark-util-symbol/package.json +43 -0
- package/node_modules/micromark-util-symbol/readme.md +168 -0
- package/node_modules/micromark-util-types/index.d.ts +1312 -0
- package/node_modules/micromark-util-types/index.js +2 -0
- package/node_modules/micromark-util-types/license +22 -0
- package/node_modules/micromark-util-types/package.json +71 -0
- package/node_modules/micromark-util-types/readme.md +151 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/typebox/build/compile/validator.d.mts +1 -4
- package/node_modules/typebox/build/guard/guard.d.mts +1 -1
- package/node_modules/typebox/build/guard/guard.mjs +5 -2
- package/node_modules/typebox/build/guard/string.mjs +16 -4
- package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
- package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
- package/node_modules/typebox/build/typebox.d.mts +1 -1
- package/node_modules/typebox/build/typebox.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +29 -32
- package/node_modules/undici/README.md +3 -2
- package/node_modules/undici/docs/docs/api/Agent.md +248 -44
- package/node_modules/undici/docs/docs/api/BalancedPool.md +246 -48
- package/node_modules/undici/docs/docs/api/CacheStorage.md +171 -13
- package/node_modules/undici/docs/docs/api/CacheStore.md +294 -98
- package/node_modules/undici/docs/docs/api/Client.md +365 -179
- package/node_modules/undici/docs/docs/api/ClientStats.md +80 -14
- package/node_modules/undici/docs/docs/api/Connector.md +118 -36
- package/node_modules/undici/docs/docs/api/ContentType.md +65 -25
- package/node_modules/undici/docs/docs/api/Cookies.md +122 -71
- package/node_modules/undici/docs/docs/api/Debug.md +34 -18
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +364 -164
- package/node_modules/undici/docs/docs/api/Dispatcher.md +479 -1102
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +101 -87
- package/node_modules/undici/docs/docs/api/Errors.md +503 -40
- package/node_modules/undici/docs/docs/api/EventSource.md +294 -32
- package/node_modules/undici/docs/docs/api/Fetch.md +680 -31
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +78 -98
- package/node_modules/undici/docs/docs/api/H2CClient.md +298 -176
- package/node_modules/undici/docs/docs/api/Interceptors.md +355 -0
- package/node_modules/undici/docs/docs/api/MockAgent.md +314 -322
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +272 -98
- package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +189 -26
- package/node_modules/undici/docs/docs/api/MockClient.md +151 -33
- package/node_modules/undici/docs/docs/api/MockErrors.md +56 -5
- package/node_modules/undici/docs/docs/api/MockPool.md +299 -263
- package/node_modules/undici/docs/docs/api/Pool.md +235 -43
- package/node_modules/undici/docs/docs/api/PoolStats.md +119 -13
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +172 -160
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +238 -63
- package/node_modules/undici/docs/docs/api/RetryAgent.md +113 -26
- package/node_modules/undici/docs/docs/api/RetryHandler.md +161 -77
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +166 -72
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +264 -542
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +162 -187
- package/node_modules/undici/docs/docs/api/Util.md +68 -11
- package/node_modules/undici/docs/docs/api/WebSocket.md +475 -80
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +100 -32
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +2 -0
- package/node_modules/undici/docs/docs/best-practices/crawling.md +3 -1
- package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +6 -4
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +8 -6
- package/node_modules/undici/docs/docs/best-practices/proxy.md +3 -1
- package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +10 -8
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +2 -0
- package/node_modules/undici/docs/docs/{GettingStarted.md → getting-started.md} +22 -19
- package/node_modules/undici/docs/docs/index.md +779 -0
- package/node_modules/undici/docs/docs/site.json +125 -0
- package/node_modules/undici/docs/docs/type-map.json +79 -0
- package/node_modules/undici/lib/api/api-request.js +7 -1
- package/node_modules/undici/lib/api/readable.js +43 -2
- package/node_modules/undici/lib/core/errors.js +20 -0
- package/node_modules/undici/lib/core/request.js +1 -1
- package/node_modules/undici/lib/core/util.js +3 -1
- package/node_modules/undici/lib/dispatcher/client-h1.js +23 -0
- package/node_modules/undici/lib/dispatcher/client-h2.js +40 -6
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +9 -1
- package/node_modules/undici/lib/handler/redirect-handler.js +1 -0
- package/node_modules/undici/lib/handler/retry-handler.js +57 -19
- package/node_modules/undici/lib/web/fetch/constants.js +1 -1
- package/node_modules/undici/lib/web/fetch/index.js +11 -2
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/client.d.ts +1 -1
- package/node_modules/undici/types/cookies.d.ts +1 -1
- package/node_modules/undici/types/errors.d.ts +10 -0
- package/node_modules/unist-util-stringify-position/index.d.ts +1 -0
- package/node_modules/unist-util-stringify-position/index.js +1 -0
- package/node_modules/unist-util-stringify-position/lib/index.d.ts +61 -0
- package/node_modules/unist-util-stringify-position/lib/index.js +84 -0
- package/node_modules/unist-util-stringify-position/license +22 -0
- package/node_modules/unist-util-stringify-position/package.json +80 -0
- package/node_modules/unist-util-stringify-position/readme.md +206 -0
- package/node_modules/uuid/README.md +99 -99
- package/node_modules/uuid/package.json +10 -6
- package/node_modules/ws/lib/receiver.js +15 -32
- package/node_modules/ws/lib/websocket-server.js +4 -4
- package/node_modules/ws/lib/websocket.js +4 -4
- package/node_modules/ws/package.json +5 -1
- package/node_modules/zod/README.md +5 -22
- package/node_modules/zod/index.cjs +2 -2
- package/node_modules/zod/index.d.cts +2 -2
- package/node_modules/zod/index.d.ts +2 -2
- package/node_modules/zod/index.js +2 -2
- package/node_modules/zod/locales/index.cjs +17 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +32 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +29 -12
- package/node_modules/zod/src/index.ts +2 -2
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +1 -1
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +3 -3
- package/node_modules/zod/src/v3/tests/complex.test.ts +17 -3
- package/node_modules/zod/src/v3/tests/function.test.ts +7 -3
- package/node_modules/zod/src/v3/tests/nan.test.ts +5 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +7 -7
- package/node_modules/zod/src/v3/tests/partials.test.ts +3 -3
- package/node_modules/zod/src/v3/tests/string.test.ts +2 -2
- package/node_modules/zod/src/v3/types.ts +3 -1
- package/node_modules/zod/src/v4/classic/checks.ts +2 -0
- package/node_modules/zod/src/v4/classic/compat.ts +4 -0
- package/node_modules/zod/src/v4/classic/errors.ts +11 -4
- package/node_modules/zod/src/v4/classic/external.ts +4 -2
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
- package/node_modules/zod/src/v4/classic/parse.ts +51 -2
- package/node_modules/zod/src/v4/classic/schemas.ts +846 -228
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +6 -6
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +43 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +79 -5
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +24 -2
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +37 -6
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +7 -1
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +76 -1
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +284 -4
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +9 -4
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +4 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +129 -37
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +113 -3
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +32 -5
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +4 -3
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +25 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +134 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +15 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +78 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +162 -8
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +214 -4
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +303 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +89 -5
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +25 -5
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +74 -21
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +1 -1
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +1 -1
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +385 -10
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +169 -68
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +40 -1
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +5 -3
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +77 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +16 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +349 -6
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +26 -13
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +938 -127
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +128 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +338 -5
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +182 -3
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/core/api.ts +365 -136
- package/node_modules/zod/src/v4/core/checks.ts +15 -5
- package/node_modules/zod/src/v4/core/core.ts +60 -41
- package/node_modules/zod/src/v4/core/doc.ts +2 -2
- package/node_modules/zod/src/v4/core/errors.ts +116 -85
- package/node_modules/zod/src/v4/core/index.ts +2 -1
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +7 -3
- package/node_modules/zod/src/v4/core/parse.ts +104 -3
- package/node_modules/zod/src/v4/core/regexes.ts +72 -17
- package/node_modules/zod/src/v4/core/registries.ts +17 -8
- package/node_modules/zod/src/v4/core/schemas.ts +1225 -337
- package/node_modules/zod/src/v4/core/standard-schema.ts +114 -19
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +1 -1
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +2 -2
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +480 -835
- package/node_modules/zod/src/v4/core/util.ts +337 -129
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/ar.ts +17 -27
- package/node_modules/zod/src/v4/locales/az.ts +17 -27
- package/node_modules/zod/src/v4/locales/be.ts +19 -27
- package/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/node_modules/zod/src/v4/locales/ca.ts +17 -28
- package/node_modules/zod/src/v4/locales/cs.ts +21 -45
- package/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/node_modules/zod/src/v4/locales/de.ts +19 -27
- package/node_modules/zod/src/v4/locales/el.ts +121 -0
- package/node_modules/zod/src/v4/locales/en.ts +23 -27
- package/node_modules/zod/src/v4/locales/eo.ts +20 -27
- package/node_modules/zod/src/v4/locales/es.ts +49 -33
- package/node_modules/zod/src/v4/locales/fa.ts +19 -27
- package/node_modules/zod/src/v4/locales/fi.ts +17 -27
- package/node_modules/zod/src/v4/locales/fr-CA.ts +17 -27
- package/node_modules/zod/src/v4/locales/fr.ts +42 -34
- package/node_modules/zod/src/v4/locales/he.ts +201 -80
- package/node_modules/zod/src/v4/locales/hr.ts +131 -0
- package/node_modules/zod/src/v4/locales/hu.ts +19 -28
- package/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/node_modules/zod/src/v4/locales/id.ts +17 -27
- package/node_modules/zod/src/v4/locales/index.ts +13 -0
- package/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/node_modules/zod/src/v4/locales/it.ts +19 -28
- package/node_modules/zod/src/v4/locales/ja.ts +19 -27
- package/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/node_modules/zod/src/v4/locales/kh.ts +3 -122
- package/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/node_modules/zod/src/v4/locales/ko.ts +17 -27
- package/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/node_modules/zod/src/v4/locales/mk.ts +19 -28
- package/node_modules/zod/src/v4/locales/ms.ts +18 -27
- package/node_modules/zod/src/v4/locales/nl.ts +32 -37
- package/node_modules/zod/src/v4/locales/no.ts +19 -27
- package/node_modules/zod/src/v4/locales/ota.ts +20 -28
- package/node_modules/zod/src/v4/locales/pl.ts +19 -27
- package/node_modules/zod/src/v4/locales/ps.ts +19 -26
- package/node_modules/zod/src/v4/locales/pt.ts +19 -26
- package/node_modules/zod/src/v4/locales/ro.ts +129 -0
- package/node_modules/zod/src/v4/locales/ru.ts +19 -27
- package/node_modules/zod/src/v4/locales/sl.ts +19 -27
- package/node_modules/zod/src/v4/locales/sv.ts +19 -27
- package/node_modules/zod/src/v4/locales/ta.ts +20 -27
- package/node_modules/zod/src/v4/locales/th.ts +20 -27
- package/node_modules/zod/src/v4/locales/tr.ts +17 -27
- package/node_modules/zod/src/v4/locales/ua.ts +3 -122
- package/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/node_modules/zod/src/v4/locales/ur.ts +20 -27
- package/node_modules/zod/src/v4/locales/uz.ts +117 -0
- package/node_modules/zod/src/v4/locales/vi.ts +19 -27
- package/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +20 -27
- package/node_modules/zod/src/v4/locales/zh-TW.ts +17 -27
- package/node_modules/zod/src/v4/mini/coerce.ts +5 -0
- package/node_modules/zod/src/v4/mini/external.ts +3 -2
- package/node_modules/zod/src/v4/mini/iso.ts +8 -4
- package/node_modules/zod/src/v4/mini/parse.ts +14 -1
- package/node_modules/zod/src/v4/mini/schemas.ts +440 -72
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -38
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +126 -4
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +51 -9
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +52 -2
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +54 -1
- package/node_modules/zod/src/v4-mini/index.ts +3 -1
- package/node_modules/zod/v3/ZodError.cjs +1 -1
- package/node_modules/zod/v3/ZodError.d.cts +6 -6
- package/node_modules/zod/v3/ZodError.d.ts +6 -6
- package/node_modules/zod/v3/ZodError.js +1 -1
- package/node_modules/zod/v3/locales/en.cjs +1 -0
- package/node_modules/zod/v3/locales/en.d.cts +1 -1
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/types.cjs +2 -0
- package/node_modules/zod/v3/types.d.cts +4 -1
- package/node_modules/zod/v3/types.d.ts +4 -1
- package/node_modules/zod/v3/types.js +2 -0
- 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.cjs +5 -1
- package/node_modules/zod/v4/classic/compat.d.cts +4 -0
- package/node_modules/zod/v4/classic/compat.d.ts +4 -0
- package/node_modules/zod/v4/classic/compat.js +4 -0
- package/node_modules/zod/v4/classic/errors.cjs +9 -2
- package/node_modules/zod/v4/classic/errors.js +11 -4
- package/node_modules/zod/v4/classic/external.cjs +6 -3
- package/node_modules/zod/v4/classic/external.d.cts +4 -1
- package/node_modules/zod/v4/classic/external.d.ts +4 -1
- package/node_modules/zod/v4/classic/external.js +3 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +10 -1
- package/node_modules/zod/v4/classic/parse.d.cts +8 -0
- package/node_modules/zod/v4/classic/parse.d.ts +8 -0
- package/node_modules/zod/v4/classic/parse.js +9 -0
- package/node_modules/zod/v4/classic/schemas.cjs +558 -156
- package/node_modules/zod/v4/classic/schemas.d.cts +179 -42
- package/node_modules/zod/v4/classic/schemas.d.ts +179 -42
- package/node_modules/zod/v4/classic/schemas.js +544 -155
- package/node_modules/zod/v4/core/api.cjs +219 -31
- package/node_modules/zod/v4/core/api.d.cts +120 -79
- package/node_modules/zod/v4/core/api.d.ts +120 -79
- package/node_modules/zod/v4/core/api.js +212 -31
- package/node_modules/zod/v4/core/checks.cjs +12 -2
- package/node_modules/zod/v4/core/checks.d.cts +3 -3
- package/node_modules/zod/v4/core/checks.d.ts +3 -3
- package/node_modules/zod/v4/core/checks.js +12 -2
- package/node_modules/zod/v4/core/core.cjs +31 -13
- package/node_modules/zod/v4/core/core.d.cts +24 -3
- package/node_modules/zod/v4/core/core.d.ts +24 -3
- package/node_modules/zod/v4/core/core.js +30 -13
- package/node_modules/zod/v4/core/doc.d.cts +1 -1
- package/node_modules/zod/v4/core/doc.d.ts +1 -1
- package/node_modules/zod/v4/core/errors.cjs +32 -42
- package/node_modules/zod/v4/core/errors.d.cts +37 -24
- package/node_modules/zod/v4/core/errors.d.ts +37 -24
- package/node_modules/zod/v4/core/errors.js +32 -42
- package/node_modules/zod/v4/core/index.cjs +5 -2
- package/node_modules/zod/v4/core/index.d.cts +2 -1
- package/node_modules/zod/v4/core/index.d.ts +2 -1
- package/node_modules/zod/v4/core/index.js +2 -1
- package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +4 -3
- package/node_modules/zod/v4/core/json-schema.d.ts +4 -3
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +48 -4
- package/node_modules/zod/v4/core/parse.d.cts +24 -0
- package/node_modules/zod/v4/core/parse.d.ts +24 -0
- package/node_modules/zod/v4/core/parse.js +39 -3
- package/node_modules/zod/v4/core/regexes.cjs +87 -18
- package/node_modules/zod/v4/core/regexes.d.cts +25 -2
- package/node_modules/zod/v4/core/regexes.d.ts +25 -2
- package/node_modules/zod/v4/core/regexes.js +60 -16
- package/node_modules/zod/v4/core/registries.cjs +7 -7
- package/node_modules/zod/v4/core/registries.d.cts +2 -2
- package/node_modules/zod/v4/core/registries.d.ts +2 -2
- package/node_modules/zod/v4/core/registries.js +7 -7
- package/node_modules/zod/v4/core/schemas.cjs +759 -237
- package/node_modules/zod/v4/core/schemas.d.cts +163 -20
- package/node_modules/zod/v4/core/schemas.d.ts +163 -20
- package/node_modules/zod/v4/core/schemas.js +758 -236
- package/node_modules/zod/v4/core/standard-schema.d.cts +90 -19
- package/node_modules/zod/v4/core/standard-schema.d.ts +90 -19
- package/node_modules/zod/v4/core/to-json-schema.cjs +408 -805
- package/node_modules/zod/v4/core/to-json-schema.d.cts +59 -33
- package/node_modules/zod/v4/core/to-json-schema.d.ts +59 -33
- package/node_modules/zod/v4/core/to-json-schema.js +402 -803
- package/node_modules/zod/v4/core/util.cjs +320 -125
- package/node_modules/zod/v4/core/util.d.cts +17 -0
- package/node_modules/zod/v4/core/util.d.ts +17 -0
- package/node_modules/zod/v4/core/util.js +308 -127
- 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/locales/ar.cjs +15 -24
- package/node_modules/zod/v4/locales/ar.d.cts +2 -1
- package/node_modules/zod/v4/locales/ar.js +14 -24
- package/node_modules/zod/v4/locales/az.cjs +15 -24
- package/node_modules/zod/v4/locales/az.d.cts +2 -1
- package/node_modules/zod/v4/locales/az.js +14 -24
- package/node_modules/zod/v4/locales/be.cjs +17 -24
- package/node_modules/zod/v4/locales/be.d.cts +2 -1
- package/node_modules/zod/v4/locales/be.js +16 -24
- package/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +120 -0
- package/node_modules/zod/v4/locales/ca.cjs +15 -25
- package/node_modules/zod/v4/locales/ca.d.cts +2 -1
- package/node_modules/zod/v4/locales/ca.js +14 -25
- package/node_modules/zod/v4/locales/cs.cjs +19 -42
- package/node_modules/zod/v4/locales/cs.d.cts +2 -1
- package/node_modules/zod/v4/locales/cs.js +18 -42
- package/node_modules/zod/v4/locales/da.cjs +142 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +115 -0
- package/node_modules/zod/v4/locales/de.cjs +17 -24
- package/node_modules/zod/v4/locales/de.d.cts +2 -1
- package/node_modules/zod/v4/locales/de.js +16 -24
- package/node_modules/zod/v4/locales/el.cjs +136 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +109 -0
- package/node_modules/zod/v4/locales/en.cjs +21 -26
- package/node_modules/zod/v4/locales/en.d.cts +2 -2
- package/node_modules/zod/v4/locales/en.d.ts +0 -1
- package/node_modules/zod/v4/locales/en.js +20 -24
- package/node_modules/zod/v4/locales/eo.cjs +18 -26
- package/node_modules/zod/v4/locales/eo.d.cts +2 -2
- package/node_modules/zod/v4/locales/eo.d.ts +0 -1
- package/node_modules/zod/v4/locales/eo.js +17 -24
- package/node_modules/zod/v4/locales/es.cjs +47 -31
- package/node_modules/zod/v4/locales/es.d.cts +2 -1
- package/node_modules/zod/v4/locales/es.js +46 -31
- package/node_modules/zod/v4/locales/fa.cjs +17 -24
- package/node_modules/zod/v4/locales/fa.d.cts +2 -1
- package/node_modules/zod/v4/locales/fa.js +16 -24
- package/node_modules/zod/v4/locales/fi.cjs +15 -24
- package/node_modules/zod/v4/locales/fi.d.cts +2 -1
- package/node_modules/zod/v4/locales/fi.js +14 -24
- package/node_modules/zod/v4/locales/fr-CA.cjs +15 -24
- package/node_modules/zod/v4/locales/fr-CA.d.cts +2 -1
- package/node_modules/zod/v4/locales/fr-CA.js +14 -24
- package/node_modules/zod/v4/locales/fr.cjs +40 -30
- package/node_modules/zod/v4/locales/fr.d.cts +2 -1
- package/node_modules/zod/v4/locales/fr.js +39 -30
- package/node_modules/zod/v4/locales/he.cjs +176 -78
- package/node_modules/zod/v4/locales/he.d.cts +2 -1
- package/node_modules/zod/v4/locales/he.js +175 -78
- package/node_modules/zod/v4/locales/hr.cjs +149 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +122 -0
- package/node_modules/zod/v4/locales/hu.cjs +17 -25
- package/node_modules/zod/v4/locales/hu.d.cts +2 -1
- package/node_modules/zod/v4/locales/hu.js +16 -25
- package/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +147 -0
- package/node_modules/zod/v4/locales/id.cjs +15 -24
- package/node_modules/zod/v4/locales/id.d.cts +2 -1
- package/node_modules/zod/v4/locales/id.js +14 -24
- package/node_modules/zod/v4/locales/index.cjs +28 -1
- package/node_modules/zod/v4/locales/index.d.cts +13 -0
- package/node_modules/zod/v4/locales/index.d.ts +13 -0
- package/node_modules/zod/v4/locales/index.js +13 -0
- package/node_modules/zod/v4/locales/is.cjs +136 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +109 -0
- package/node_modules/zod/v4/locales/it.cjs +17 -25
- package/node_modules/zod/v4/locales/it.d.cts +2 -1
- package/node_modules/zod/v4/locales/it.js +16 -25
- package/node_modules/zod/v4/locales/ja.cjs +17 -24
- package/node_modules/zod/v4/locales/ja.d.cts +2 -1
- package/node_modules/zod/v4/locales/ja.js +16 -24
- package/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +112 -0
- package/node_modules/zod/v4/locales/kh.cjs +6 -137
- package/node_modules/zod/v4/locales/kh.d.cts +2 -1
- package/node_modules/zod/v4/locales/kh.d.ts +1 -0
- package/node_modules/zod/v4/locales/kh.js +3 -115
- package/node_modules/zod/v4/locales/km.cjs +137 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +110 -0
- package/node_modules/zod/v4/locales/ko.cjs +15 -24
- package/node_modules/zod/v4/locales/ko.d.cts +2 -1
- package/node_modules/zod/v4/locales/ko.js +14 -24
- package/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +203 -0
- package/node_modules/zod/v4/locales/mk.cjs +17 -25
- package/node_modules/zod/v4/locales/mk.d.cts +2 -1
- package/node_modules/zod/v4/locales/mk.js +16 -25
- package/node_modules/zod/v4/locales/ms.cjs +16 -24
- package/node_modules/zod/v4/locales/ms.d.cts +2 -1
- package/node_modules/zod/v4/locales/ms.js +15 -24
- package/node_modules/zod/v4/locales/nl.cjs +26 -32
- package/node_modules/zod/v4/locales/nl.d.cts +2 -1
- package/node_modules/zod/v4/locales/nl.js +25 -32
- package/node_modules/zod/v4/locales/no.cjs +17 -24
- package/node_modules/zod/v4/locales/no.d.cts +2 -1
- package/node_modules/zod/v4/locales/no.js +16 -24
- package/node_modules/zod/v4/locales/ota.cjs +18 -25
- package/node_modules/zod/v4/locales/ota.d.cts +2 -1
- package/node_modules/zod/v4/locales/ota.js +17 -25
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +17 -24
- package/node_modules/zod/v4/locales/pl.d.cts +2 -1
- package/node_modules/zod/v4/locales/pl.js +16 -24
- package/node_modules/zod/v4/locales/ps.cjs +17 -24
- package/node_modules/zod/v4/locales/ps.d.cts +2 -1
- package/node_modules/zod/v4/locales/ps.js +16 -24
- package/node_modules/zod/v4/locales/pt.cjs +17 -24
- package/node_modules/zod/v4/locales/pt.d.cts +2 -1
- package/node_modules/zod/v4/locales/pt.js +16 -24
- package/node_modules/zod/v4/locales/ro.cjs +146 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +119 -0
- package/node_modules/zod/v4/locales/ru.cjs +17 -24
- package/node_modules/zod/v4/locales/ru.d.cts +2 -1
- package/node_modules/zod/v4/locales/ru.js +16 -24
- package/node_modules/zod/v4/locales/sl.cjs +17 -24
- package/node_modules/zod/v4/locales/sl.d.cts +2 -1
- package/node_modules/zod/v4/locales/sl.js +16 -24
- package/node_modules/zod/v4/locales/sv.cjs +17 -24
- package/node_modules/zod/v4/locales/sv.d.cts +2 -1
- package/node_modules/zod/v4/locales/sv.js +16 -24
- package/node_modules/zod/v4/locales/ta.cjs +18 -24
- package/node_modules/zod/v4/locales/ta.d.cts +2 -1
- package/node_modules/zod/v4/locales/ta.js +17 -24
- package/node_modules/zod/v4/locales/th.cjs +18 -24
- package/node_modules/zod/v4/locales/th.d.cts +2 -1
- package/node_modules/zod/v4/locales/th.js +17 -24
- package/node_modules/zod/v4/locales/tr.cjs +15 -26
- package/node_modules/zod/v4/locales/tr.d.cts +2 -2
- package/node_modules/zod/v4/locales/tr.d.ts +0 -1
- package/node_modules/zod/v4/locales/tr.js +14 -24
- package/node_modules/zod/v4/locales/ua.cjs +6 -137
- package/node_modules/zod/v4/locales/ua.d.cts +2 -1
- package/node_modules/zod/v4/locales/ua.d.ts +1 -0
- package/node_modules/zod/v4/locales/ua.js +3 -115
- package/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +108 -0
- package/node_modules/zod/v4/locales/ur.cjs +18 -24
- package/node_modules/zod/v4/locales/ur.d.cts +2 -1
- package/node_modules/zod/v4/locales/ur.js +17 -24
- package/node_modules/zod/v4/locales/uz.cjs +137 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +110 -0
- package/node_modules/zod/v4/locales/vi.cjs +17 -24
- package/node_modules/zod/v4/locales/vi.d.cts +2 -1
- package/node_modules/zod/v4/locales/vi.js +16 -24
- package/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +107 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +18 -24
- package/node_modules/zod/v4/locales/zh-CN.d.cts +2 -1
- package/node_modules/zod/v4/locales/zh-CN.js +17 -24
- package/node_modules/zod/v4/locales/zh-TW.cjs +15 -24
- package/node_modules/zod/v4/locales/zh-TW.d.cts +2 -1
- package/node_modules/zod/v4/locales/zh-TW.js +14 -24
- package/node_modules/zod/v4/mini/coerce.cjs +5 -0
- package/node_modules/zod/v4/mini/coerce.js +5 -0
- package/node_modules/zod/v4/mini/external.cjs +4 -3
- package/node_modules/zod/v4/mini/external.d.cts +3 -1
- package/node_modules/zod/v4/mini/external.d.ts +3 -1
- package/node_modules/zod/v4/mini/external.js +2 -1
- package/node_modules/zod/v4/mini/iso.cjs +8 -4
- package/node_modules/zod/v4/mini/iso.js +8 -4
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +9 -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 +301 -57
- package/node_modules/zod/v4/mini/schemas.d.cts +109 -20
- package/node_modules/zod/v4/mini/schemas.d.ts +109 -20
- package/node_modules/zod/v4/mini/schemas.js +260 -31
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +16 -1
- package/node_modules/zod/v4-mini/index.d.cts +3 -1
- package/node_modules/zod/v4-mini/index.d.ts +3 -1
- package/node_modules/zod/v4-mini/index.js +3 -1
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/npm-shrinkwrap.json +629 -28
- package/openclaw.plugin.json +529 -888
- package/package.json +44 -16
- package/dist/approval-message-safety-C-8BL6Kv.js +0 -47
- package/dist/config-api-B18fR8M5.js +0 -3
- package/dist/message-handler-DExaghWK.js +0 -331
- package/dist/provider.runtime-BX8GcCYx.js +0 -2
- package/dist/runtime-api.monitor-DCS_ETft.js +0 -6
- package/dist/targets-fjJt3PYG.js +0 -3
- /package/node_modules/{zod → @discord/embedded-app-sdk/node_modules/zod}/src/v4/core/function.ts +0 -0
- /package/node_modules/{zod → @discord/embedded-app-sdk/node_modules/zod}/v4/core/function.cjs +0 -0
- /package/node_modules/{zod → @discord/embedded-app-sdk/node_modules/zod}/v4/core/function.d.cts +0 -0
- /package/node_modules/{zod → @discord/embedded-app-sdk/node_modules/zod}/v4/core/function.d.ts +0 -0
- /package/node_modules/{zod → @discord/embedded-app-sdk/node_modules/zod}/v4/core/function.js +0 -0
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { c as resolveDiscordAccountAllowFrom, d as resolveDiscordAccountDmPolicy, f as resolveDiscordMaxLinesPerMessage, p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import { n as getDiscordActivitiesRuntime } from "./runtime-
|
|
4
|
-
import { C as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { _ as resolveDiscordModalEntryWithPersistence, g as resolveDiscordComponentEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-CCRW54gK.js";
|
|
1
|
+
import { C as Client, D as RateLimitError, F as Message, I as User, K as Container, M as Command, N as CommandWithSubcommands, P as Guild, Q as Row, V as Modal, W as Button, Yt as __exportAll, _ as MessageReactionRemoveListener, _t as editChannel, at as BaseMessageInteractiveComponent, bt as getChannelMessage, d as discord_exports, et as Separator, f as GuildCreateListener, g as MessageReactionAddListener, h as MessageCreateListener, m as InteractionCreateListener, mt as createThread, nt as TextDisplay, p as GuildDeleteListener, t as chunkDiscordTextWithMode, tt as StringSelectMenu, v as PresenceUpdateListener, w as Plugin, x as ThreadUpdateListener, y as ReadyListener } from "./chunk-BrZocpfs.js";
|
|
2
|
+
import { c as resolveDiscordAccountAllowFrom, d as resolveDiscordAccountDmPolicy, f as resolveDiscordMaxLinesPerMessage, p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-D2LKPukU.js";
|
|
3
|
+
import { n as getDiscordActivitiesRuntime } from "./runtime-TwM8IrZU.js";
|
|
4
|
+
import { C as parseDiscordActivityCustomIdForInteraction, D as parseDiscordModalCustomIdForInteraction, E as parseDiscordModalCustomId, O as decodeCustomIdComponent, T as parseDiscordComponentCustomIdForInteraction, k as encodeCustomIdComponent, l as parseExecApprovalData, s as parseDiscordQuestionData, w as parseDiscordComponentCustomId, y as buildDiscordActivityCustomId } from "./outbound-session-route-D_nc_Ayk.js";
|
|
5
|
+
import { D as canViewDiscordGuildChannel, F as createDiscordRestClient, H as registerGateway, K as validateDiscordProxyUrl, U as unregisterGateway, q as withValidatedDiscordProxy, z as DISCORD_REST_TIMEOUT_MS } from "./send.shared-Dfacnk-E.js";
|
|
6
|
+
import { _ as resolveDiscordModalEntryWithPersistence, g as resolveDiscordComponentEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-V7cyCKbH.js";
|
|
8
7
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
9
|
-
import { a as isDiscordRateLimitResponseBody, o as summarizeDiscordResponseBody } from "./api-
|
|
10
|
-
import { a as
|
|
8
|
+
import { a as isDiscordRateLimitResponseBody, o as summarizeDiscordResponseBody } from "./api-C43z8vUm.js";
|
|
9
|
+
import { C as resolveTimestampMs, a as normalizeDiscordSlug, b as formatDiscordReactionEmoji, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordCommandOwnerAllowFrom, f as resolveDiscordGuildEntry, g as resolveDiscordOwnerAllowFrom, h as resolveDiscordOwnerAccess, i as normalizeDiscordDisplaySlug, l as resolveDiscordChannelPolicyCommandAuthorizer, m as resolveDiscordMemberAllowed, n as isDiscordGroupAllowedByPolicy, o as resolveDiscordAllowListMatch, p as resolveDiscordMemberAccessState, r as normalizeDiscordAllowList, t as allowListMatches, v as resolveGroupDmAllow, x as formatDiscordUserTag, y as shouldEmitDiscordReactionNotification } from "./allow-list-DzKrtfah.js";
|
|
10
|
+
import { a as formatMention, t as sendMessageDiscord } from "./send.outbound-BbC2qjpH.js";
|
|
11
11
|
import { i as setPresence, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { a as
|
|
15
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
16
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
17
|
-
import {
|
|
18
|
-
import { r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
19
|
-
import { d as resolveDiscordMessageChannelId, n as resolveDiscordForwardedMessagesTextFromSnapshots, t as resolveDiscordEmbedText
|
|
20
|
-
import { t as resolveDiscordSenderIdentity } from "./sender-identity-
|
|
21
|
-
import { n as formatDiscordApprovalDisplayValue, t as DISCORD_APPROVAL_ALLOWED_MENTIONS } from "./approval-message-safety-C-8BL6Kv.js";
|
|
12
|
+
import { n as sendVoiceMessageDiscord } from "./send-CfnXLUXq.js";
|
|
13
|
+
import { c as raceWithTimeout, u as withAbortTimeout } from "./timeouts-B9cy6RvQ.js";
|
|
14
|
+
import { a as getDiscordExecApprovalApprovers, n as formatDiscordApprovalDisplayValue, r as resolveDiscordConversationIdentity, s as isDiscordExecApprovalClientEnabled, t as DISCORD_APPROVAL_ALLOWED_MENTIONS } from "./approval-message-safety-LyND6GR3.js";
|
|
15
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-CmFAdMeQ.js";
|
|
16
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-Cmu75lZy.js";
|
|
17
|
+
import { a as isThreadArchived, d as resolveDiscordChannelIdSafe, f as resolveDiscordChannelInfoSafe, g as resolveDiscordChannelTopicSafe, h as resolveDiscordChannelParentSafe, m as resolveDiscordChannelParentIdSafe, p as resolveDiscordChannelNameSafe, y as formatThreadBindingDurationLabel } from "./thread-bindings.discord-api-C_tCQcv3.js";
|
|
18
|
+
import { r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-Bci2pS8M.js";
|
|
19
|
+
import { a as formatDiscordMediaText, d as resolveDiscordChannelInfo, f as resolveDiscordMessageChannelId, n as resolveDiscordForwardedMessagesTextFromSnapshots, t as resolveDiscordEmbedText } from "./message-utils-ajbkdTVA.js";
|
|
20
|
+
import { t as resolveDiscordSenderIdentity } from "./sender-identity-mG_zsdox.js";
|
|
22
21
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
23
22
|
import { buildAgentSessionKey, deriveLastRoutePolicy, isAcpSessionKey, isSubagentSessionKey, parseAgentSessionKey, resolveAgentIdFromSessionKey, resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
24
23
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeOptionalStringifiedId, normalizeStringEntries, normalizeStringEntriesLower, summarizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -33,11 +32,11 @@ import { Check, Errors } from "typebox/value";
|
|
|
33
32
|
import { inspect } from "node:util";
|
|
34
33
|
import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
35
34
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
36
|
-
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
37
35
|
import { fetchWithSsrFGuard, formatErrorMessage as formatErrorMessage$1 } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
38
36
|
import { createHttp1EnvHttpProxyAgent, createHttp1ProxyAgent, createNodeProxyAgent, resolveEnvHttpProxyAgentOptions, wrapFetchWithAbortSignal } from "openclaw/plugin-sdk/fetch-runtime";
|
|
39
37
|
import { createNonExitingRuntime, createSubsystemLogger, danger, formatDurationSeconds, isVerbose, logVerbose, shouldLogVerbose, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
40
38
|
import { sliceUtf16Safe, truncateUtf16Safe, withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
39
|
+
import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, canonicalizeAllowlistWithResolvedIds, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
|
|
41
40
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
42
41
|
import { resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
|
|
43
42
|
import { chunkItems, sanitizeAssistantVisibleText, sanitizeAssistantVisibleTextWithProfile } from "openclaw/plugin-sdk/text-chunking";
|
|
@@ -51,18 +50,19 @@ import { resolvePinnedMainDmOwnerFromAllowlist as resolvePinnedMainDmOwnerFromAl
|
|
|
51
50
|
import { GROUP_POLICY_BLOCKED_LABEL, resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
52
51
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
53
52
|
import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
54
|
-
import {
|
|
53
|
+
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
55
54
|
import { buildPairingReply, upsertChannelPairingRequest, upsertChannelPairingRequest as upsertChannelPairingRequest$1 } from "openclaw/plugin-sdk/conversation-runtime";
|
|
56
|
-
import { clearExpiredCooldowns, ensureAuthProfileStore, formatReasoningMessage, isProfileInCooldown,
|
|
55
|
+
import { clearExpiredCooldowns, ensureAuthProfileStore, formatReasoningMessage, getPreparedModelCatalogSnapshot, isProfileInCooldown, loadPreparedModelCatalog, resolveAgentAvatar, resolveAgentDir, resolveDefaultModelForAgent, resolveHumanDelayConfig, resolveProfilesUnavailableReason } from "openclaw/plugin-sdk/agent-runtime";
|
|
56
|
+
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
57
57
|
import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
|
|
58
58
|
import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared";
|
|
59
59
|
import { requestHeartbeat } from "openclaw/plugin-sdk/heartbeat-runtime";
|
|
60
60
|
import { enqueueSystemEvent, enqueueSystemEvent as enqueueSystemEvent$1 } from "openclaw/plugin-sdk/system-event-runtime";
|
|
61
61
|
import { createChannelIngressResolver, defineStableChannelIngressIdentity, readChannelIngressStoreAllowFromForDmPolicy } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
62
|
+
import { formatInboundEnvelope, resolveEnvelopeFormatOptions, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent } from "openclaw/plugin-sdk/channel-inbound";
|
|
62
63
|
import { ModelSelectionLockedError, applyModelOverrideToSessionEntry, resolveChannelModelOverride } from "openclaw/plugin-sdk/model-session-runtime";
|
|
63
64
|
import { completeWithPreparedSimpleCompletionModel, extractAssistantText, prepareSimpleCompletionModelForAgent } from "openclaw/plugin-sdk/simple-completion-runtime";
|
|
64
|
-
import { getSessionEntry, listSessionEntries, patchSessionEntry, readSessionUpdatedAt as readSessionUpdatedAt$1, resolveStorePath, resolveStorePath as resolveStorePath$1 } from "openclaw/plugin-sdk/session-store-runtime";
|
|
65
|
-
import { formatInboundEnvelope, resolveEnvelopeFormatOptions, runChannelInboundEvent } from "openclaw/plugin-sdk/channel-inbound";
|
|
65
|
+
import { deleteSessionEntry, getSessionEntry, listSessionEntries, patchSessionEntry, readSessionUpdatedAt as readSessionUpdatedAt$1, resolveStorePath, resolveStorePath as resolveStorePath$1 } from "openclaw/plugin-sdk/session-store-runtime";
|
|
66
66
|
import { buildCommandTextFromArgs, findCommandByNativeName, formatCommandArgMenuTitle, listChatCommands, listNativeCommandSpecsForConfig, listSkillCommandsForAgents, resolveCommandAuthorizedFromAuthorizers, resolveEffectiveAgentRuntime, resolveNativeCommandSessionTargets, resolveStoredModelOverride, serializeCommandArgs } from "openclaw/plugin-sdk/command-auth-native";
|
|
67
67
|
import { buildCommandTextFromArgs as buildCommandTextFromArgs$1, findCommandByNativeName as findCommandByNativeName$1, parseCommandArgs, resolveCommandArgChoices, resolveCommandArgMenu, serializeCommandArgs as serializeCommandArgs$1 } from "openclaw/plugin-sdk/native-command-registry";
|
|
68
68
|
import { resolveDirectStatusReplyForSession } from "openclaw/plugin-sdk/command-status-runtime";
|
|
@@ -537,7 +537,10 @@ function resolveDiscordThreadStarterText(starter) {
|
|
|
537
537
|
const content = normalizeOptionalString(starter.content) ?? "";
|
|
538
538
|
const embedText = resolveDiscordEmbedText(starter.embeds?.[0]);
|
|
539
539
|
const forwardedText = resolveDiscordForwardedMessagesTextFromSnapshots(starter.message_snapshots);
|
|
540
|
-
return content || embedText || forwardedText
|
|
540
|
+
return [content || embedText || forwardedText, formatDiscordMediaText({
|
|
541
|
+
attachments: starter.attachments ?? void 0,
|
|
542
|
+
stickers: starter.sticker_items ?? void 0
|
|
543
|
+
})].filter(Boolean).join("\n");
|
|
541
544
|
}
|
|
542
545
|
function resolveDiscordThreadStarterIdentity(starter) {
|
|
543
546
|
return {
|
|
@@ -1384,13 +1387,9 @@ var DiscordPresenceBaselineCache = class {
|
|
|
1384
1387
|
//#endregion
|
|
1385
1388
|
//#region extensions/discord/src/monitor/thread-session-close.ts
|
|
1386
1389
|
/**
|
|
1387
|
-
*
|
|
1388
|
-
*
|
|
1389
|
-
*
|
|
1390
|
-
* This mirrors how the daily / idle session reset works: zeroing `updatedAt`
|
|
1391
|
-
* makes `evaluateSessionFreshness` treat the session as stale on the next
|
|
1392
|
-
* inbound message, so the bot starts a fresh conversation without deleting
|
|
1393
|
-
* any on-disk transcript history.
|
|
1390
|
+
* Closes every session entry in the store whose key contains {@link threadId}.
|
|
1391
|
+
* The explicit lifecycle deletion archives the old transcript and guarantees
|
|
1392
|
+
* that a later inbound message starts a fresh session in every reset mode.
|
|
1394
1393
|
*/
|
|
1395
1394
|
async function closeDiscordThreadSessions(params) {
|
|
1396
1395
|
const { cfg, accountId, threadId } = params;
|
|
@@ -1403,23 +1402,14 @@ async function closeDiscordThreadSessions(params) {
|
|
|
1403
1402
|
const storePath = resolveStorePath(cfg.session?.store, { agentId: accountId });
|
|
1404
1403
|
let resetCount = 0;
|
|
1405
1404
|
for (const { sessionKey, entry } of listSessionEntries({ storePath })) {
|
|
1406
|
-
if (!sessionKeyContainsThreadId(sessionKey)
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1405
|
+
if (!sessionKeyContainsThreadId(sessionKey)) continue;
|
|
1406
|
+
if (await deleteSessionEntry({
|
|
1407
|
+
archiveTranscript: true,
|
|
1408
|
+
expectedSessionId: entry.sessionId ?? null,
|
|
1409
|
+
expectedUpdatedAt: entry.updatedAt,
|
|
1410
1410
|
sessionKey,
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
if (current.updatedAt === 0) return null;
|
|
1414
|
-
if (current.updatedAt !== entry.updatedAt || current.sessionId !== entry.sessionId) return null;
|
|
1415
|
-
resetEntry = true;
|
|
1416
|
-
return {
|
|
1417
|
-
...current,
|
|
1418
|
-
updatedAt: 0
|
|
1419
|
-
};
|
|
1420
|
-
}
|
|
1421
|
-
});
|
|
1422
|
-
if (resetEntry) resetCount += 1;
|
|
1411
|
+
storePath
|
|
1412
|
+
})) resetCount += 1;
|
|
1423
1413
|
}
|
|
1424
1414
|
return resetCount;
|
|
1425
1415
|
}
|
|
@@ -1439,9 +1429,11 @@ var DiscordMessageListener = class extends MessageCreateListener {
|
|
|
1439
1429
|
}
|
|
1440
1430
|
async handle(data, client) {
|
|
1441
1431
|
this.onEvent?.();
|
|
1442
|
-
|
|
1432
|
+
try {
|
|
1433
|
+
await this.handler(data, client);
|
|
1434
|
+
} catch (err) {
|
|
1443
1435
|
(this.logger ?? discordEventQueueLog).error(danger(`discord handler failed: ${String(err)}`));
|
|
1444
|
-
}
|
|
1436
|
+
}
|
|
1445
1437
|
}
|
|
1446
1438
|
};
|
|
1447
1439
|
var DiscordInteractionListener = class extends InteractionCreateListener {
|
|
@@ -1719,6 +1711,62 @@ var DiscordThreadUpdateListener = class extends ThreadUpdateListener {
|
|
|
1719
1711
|
}
|
|
1720
1712
|
};
|
|
1721
1713
|
//#endregion
|
|
1714
|
+
//#region extensions/discord/src/internal/gateway-dispatch.ts
|
|
1715
|
+
function dispatchVoiceGatewayEvent(client, type, data) {
|
|
1716
|
+
const guildId = readGuildId(data);
|
|
1717
|
+
if (!guildId) return;
|
|
1718
|
+
const adapter = (client.getPlugin("voice")?.adapters)?.get(guildId);
|
|
1719
|
+
const voiceServerUpdate = GatewayDispatchEvents.VoiceServerUpdate;
|
|
1720
|
+
const voiceStateUpdate = GatewayDispatchEvents.VoiceStateUpdate;
|
|
1721
|
+
if (type === voiceServerUpdate) adapter?.onVoiceServerUpdate?.(data);
|
|
1722
|
+
if (type === voiceStateUpdate) adapter?.onVoiceStateUpdate?.(data);
|
|
1723
|
+
}
|
|
1724
|
+
function mapGatewayDispatchData(client, type, data) {
|
|
1725
|
+
const messageCreate = GatewayDispatchEvents.MessageCreate;
|
|
1726
|
+
const reactionAdd = GatewayDispatchEvents.MessageReactionAdd;
|
|
1727
|
+
const reactionRemove = GatewayDispatchEvents.MessageReactionRemove;
|
|
1728
|
+
if (type === messageCreate) return createMessageDispatchData(client, data);
|
|
1729
|
+
if (type === reactionAdd || type === reactionRemove) return createReactionDispatchData(client, data);
|
|
1730
|
+
return data;
|
|
1731
|
+
}
|
|
1732
|
+
function createMessageDispatchData(client, data) {
|
|
1733
|
+
const message = new Message(client, data);
|
|
1734
|
+
return {
|
|
1735
|
+
...data,
|
|
1736
|
+
id: data.id,
|
|
1737
|
+
channel_id: data.channel_id,
|
|
1738
|
+
channelId: data.channel_id,
|
|
1739
|
+
message,
|
|
1740
|
+
author: message.author ?? (data.author ? new User(client, data.author) : null),
|
|
1741
|
+
member: data.member,
|
|
1742
|
+
rawMember: data.member,
|
|
1743
|
+
guild: data.guild_id ? new Guild(client, data.guild_id) : null
|
|
1744
|
+
};
|
|
1745
|
+
}
|
|
1746
|
+
function createReactionDispatchData(client, data) {
|
|
1747
|
+
const userRaw = data.member?.user && typeof data.member.user === "object" ? {
|
|
1748
|
+
id: data.user_id,
|
|
1749
|
+
username: "",
|
|
1750
|
+
...data.member.user
|
|
1751
|
+
} : {
|
|
1752
|
+
id: data.user_id,
|
|
1753
|
+
username: ""
|
|
1754
|
+
};
|
|
1755
|
+
return {
|
|
1756
|
+
...data,
|
|
1757
|
+
user: new User(client, userRaw),
|
|
1758
|
+
rawMember: data.member,
|
|
1759
|
+
guild: data.guild_id ? new Guild(client, data.guild_id) : null,
|
|
1760
|
+
message: new Message(client, {
|
|
1761
|
+
id: data.message_id,
|
|
1762
|
+
channelId: data.channel_id
|
|
1763
|
+
})
|
|
1764
|
+
};
|
|
1765
|
+
}
|
|
1766
|
+
function readGuildId(data) {
|
|
1767
|
+
return data && typeof data === "object" && typeof data.guild_id === "string" ? data.guild_id : void 0;
|
|
1768
|
+
}
|
|
1769
|
+
//#endregion
|
|
1722
1770
|
//#region extensions/discord/src/monitor/dm-command-decision.ts
|
|
1723
1771
|
async function handleDiscordDmCommandDecision(params) {
|
|
1724
1772
|
if (params.senderAccess.decision === "allow") return true;
|
|
@@ -2212,7 +2260,7 @@ async function resolveDiscordNativeAutocompleteAuthorized(params) {
|
|
|
2212
2260
|
});
|
|
2213
2261
|
const memberRoleIds = Array.isArray(interaction.rawData.member?.roles) ? interaction.rawData.member.roles.map((roleId) => roleId) : [];
|
|
2214
2262
|
const allowNameMatching = isDangerousNameMatchingEnabled(discordConfig);
|
|
2215
|
-
const useAccessGroups =
|
|
2263
|
+
const useAccessGroups = true;
|
|
2216
2264
|
const configuredDmAllowFrom = resolveDiscordAccountAllowFrom({
|
|
2217
2265
|
cfg,
|
|
2218
2266
|
accountId
|
|
@@ -2243,7 +2291,7 @@ async function resolveDiscordNativeAutocompleteAuthorized(params) {
|
|
|
2243
2291
|
});
|
|
2244
2292
|
if (channelConfig?.enabled === false) return false;
|
|
2245
2293
|
if (interaction.guild && channelConfig?.allowed === false) return false;
|
|
2246
|
-
if (
|
|
2294
|
+
if (interaction.guild) {
|
|
2247
2295
|
const { groupPolicy } = resolveOpenProviderRuntimeGroupPolicy({
|
|
2248
2296
|
providerConfigPresent: cfg.channels?.discord !== void 0,
|
|
2249
2297
|
groupPolicy: discordConfig?.groupPolicy,
|
|
@@ -2326,16 +2374,23 @@ function shouldBypassConfiguredAcpGuildGuards(commandName) {
|
|
|
2326
2374
|
//#endregion
|
|
2327
2375
|
//#region extensions/discord/src/monitor/inbound-context.ts
|
|
2328
2376
|
function createDiscordSupplementalContextAccessChecker(params) {
|
|
2377
|
+
const userAllowList = params.channelConfig?.users ?? params.guildInfo?.users ?? [];
|
|
2378
|
+
const roleAllowList = params.channelConfig?.roles ?? params.guildInfo?.roles ?? [];
|
|
2379
|
+
const allowFrom = [...userAllowList, ...roleAllowList];
|
|
2329
2380
|
return (sender) => {
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2381
|
+
return resolveInboundSupplementalSenderAllowed({
|
|
2382
|
+
isGroup: params.isGuild,
|
|
2383
|
+
groupPolicy: allowFrom.length === 0 ? "open" : "allowlist",
|
|
2384
|
+
allowFrom,
|
|
2385
|
+
isSenderAllowed: () => resolveDiscordMemberAllowed({
|
|
2386
|
+
userAllowList,
|
|
2387
|
+
roleAllowList,
|
|
2388
|
+
memberRoleIds: sender.memberRoleIds ?? [],
|
|
2389
|
+
userId: sender.id ?? "",
|
|
2390
|
+
userName: sender.name,
|
|
2391
|
+
userTag: sender.tag,
|
|
2392
|
+
allowNameMatching: params.allowNameMatching
|
|
2393
|
+
})
|
|
2339
2394
|
});
|
|
2340
2395
|
};
|
|
2341
2396
|
}
|
|
@@ -3936,6 +3991,7 @@ async function resolveDiscordNativeChoiceContext(params) {
|
|
|
3936
3991
|
return {
|
|
3937
3992
|
provider,
|
|
3938
3993
|
model,
|
|
3994
|
+
agentId: route.agentId,
|
|
3939
3995
|
agentRuntime: resolveEffectiveAgentRuntime({
|
|
3940
3996
|
cfg: params.cfg,
|
|
3941
3997
|
provider,
|
|
@@ -4664,7 +4720,13 @@ function buildDiscordCommandOptions(params) {
|
|
|
4664
4720
|
const focusValue = normalizeLowercaseStringOrEmpty(interaction.options.getFocused()?.value);
|
|
4665
4721
|
const context = typeof arg.choices === "function" && resolveChoiceContext ? await resolveChoiceContext(interaction) : null;
|
|
4666
4722
|
const currentCfg = resolveConfig?.() ?? cfg;
|
|
4667
|
-
const choiceCatalog = command.key === "think" ?
|
|
4723
|
+
const choiceCatalog = command.key === "think" ? getPreparedModelCatalogSnapshot({
|
|
4724
|
+
config: currentCfg,
|
|
4725
|
+
...context?.agentId ? {
|
|
4726
|
+
agentId: context.agentId,
|
|
4727
|
+
agentDir: resolveAgentDir(currentCfg, context.agentId)
|
|
4728
|
+
} : {}
|
|
4729
|
+
})?.entries : void 0;
|
|
4668
4730
|
const choices = resolveCommandArgChoices({
|
|
4669
4731
|
command,
|
|
4670
4732
|
arg,
|
|
@@ -4679,7 +4741,6 @@ function buildDiscordCommandOptions(params) {
|
|
|
4679
4741
|
name: choice.label,
|
|
4680
4742
|
value: choice.value
|
|
4681
4743
|
})));
|
|
4682
|
-
if (command.key === "think" && !choiceCatalog?.length) loadModelCatalog({ config: currentCfg });
|
|
4683
4744
|
} : void 0;
|
|
4684
4745
|
const choices = resolvedChoices.length > 0 && !autocomplete ? resolvedChoices.slice(0, 25).map((choice) => ({
|
|
4685
4746
|
name: choice.label,
|
|
@@ -4789,7 +4850,7 @@ async function dispatchDiscordCommandInteraction(params) {
|
|
|
4789
4850
|
await interaction.reply(payload);
|
|
4790
4851
|
});
|
|
4791
4852
|
};
|
|
4792
|
-
const useAccessGroups =
|
|
4853
|
+
const useAccessGroups = true;
|
|
4793
4854
|
const user = interaction.user;
|
|
4794
4855
|
if (!user) return { accepted: false };
|
|
4795
4856
|
const sender = resolveDiscordSenderIdentity({
|
|
@@ -4874,7 +4935,7 @@ async function dispatchDiscordCommandInteraction(params) {
|
|
|
4874
4935
|
await respond("This channel is not allowed.");
|
|
4875
4936
|
return { accepted: false };
|
|
4876
4937
|
}
|
|
4877
|
-
if (
|
|
4938
|
+
if (interaction.guild) {
|
|
4878
4939
|
const { groupPolicy } = resolveOpenProviderRuntimeGroupPolicy({
|
|
4879
4940
|
providerConfigPresent: cfg.channels?.discord !== void 0,
|
|
4880
4941
|
groupPolicy: discordConfig?.groupPolicy,
|
|
@@ -4983,8 +5044,12 @@ async function dispatchDiscordCommandInteraction(params) {
|
|
|
4983
5044
|
accountId,
|
|
4984
5045
|
threadBindings
|
|
4985
5046
|
}) : null;
|
|
4986
|
-
const menuModelCatalog = command.key === "think" && menuNeedsModelContext ? await
|
|
5047
|
+
const menuModelCatalog = command.key === "think" && menuNeedsModelContext ? await loadPreparedModelCatalog({
|
|
4987
5048
|
config: cfg,
|
|
5049
|
+
...menuModelContext?.agentId ? {
|
|
5050
|
+
agentId: menuModelContext.agentId,
|
|
5051
|
+
agentDir: resolveAgentDir(cfg, menuModelContext.agentId)
|
|
5052
|
+
} : {},
|
|
4988
5053
|
readOnly: true
|
|
4989
5054
|
}) : void 0;
|
|
4990
5055
|
const menu = resolveCommandArgMenu({
|
|
@@ -5240,62 +5305,6 @@ function canResumeAfterGatewayClose(code) {
|
|
|
5240
5305
|
return !nonResumableGatewayCloseCodes.has(code);
|
|
5241
5306
|
}
|
|
5242
5307
|
//#endregion
|
|
5243
|
-
//#region extensions/discord/src/internal/gateway-dispatch.ts
|
|
5244
|
-
function dispatchVoiceGatewayEvent(client, type, data) {
|
|
5245
|
-
const guildId = readGuildId(data);
|
|
5246
|
-
if (!guildId) return;
|
|
5247
|
-
const adapter = (client.getPlugin("voice")?.adapters)?.get(guildId);
|
|
5248
|
-
const voiceServerUpdate = GatewayDispatchEvents.VoiceServerUpdate;
|
|
5249
|
-
const voiceStateUpdate = GatewayDispatchEvents.VoiceStateUpdate;
|
|
5250
|
-
if (type === voiceServerUpdate) adapter?.onVoiceServerUpdate?.(data);
|
|
5251
|
-
if (type === voiceStateUpdate) adapter?.onVoiceStateUpdate?.(data);
|
|
5252
|
-
}
|
|
5253
|
-
function mapGatewayDispatchData(client, type, data) {
|
|
5254
|
-
const messageCreate = GatewayDispatchEvents.MessageCreate;
|
|
5255
|
-
const reactionAdd = GatewayDispatchEvents.MessageReactionAdd;
|
|
5256
|
-
const reactionRemove = GatewayDispatchEvents.MessageReactionRemove;
|
|
5257
|
-
if (type === messageCreate) return createMessageDispatchData(client, data);
|
|
5258
|
-
if (type === reactionAdd || type === reactionRemove) return createReactionDispatchData(client, data);
|
|
5259
|
-
return data;
|
|
5260
|
-
}
|
|
5261
|
-
function createMessageDispatchData(client, data) {
|
|
5262
|
-
const message = new Message(client, data);
|
|
5263
|
-
return {
|
|
5264
|
-
...data,
|
|
5265
|
-
id: data.id,
|
|
5266
|
-
channel_id: data.channel_id,
|
|
5267
|
-
channelId: data.channel_id,
|
|
5268
|
-
message,
|
|
5269
|
-
author: message.author ?? (data.author ? new User(client, data.author) : null),
|
|
5270
|
-
member: data.member,
|
|
5271
|
-
rawMember: data.member,
|
|
5272
|
-
guild: data.guild_id ? new Guild(client, data.guild_id) : null
|
|
5273
|
-
};
|
|
5274
|
-
}
|
|
5275
|
-
function createReactionDispatchData(client, data) {
|
|
5276
|
-
const userRaw = data.member?.user && typeof data.member.user === "object" ? {
|
|
5277
|
-
id: data.user_id,
|
|
5278
|
-
username: "",
|
|
5279
|
-
...data.member.user
|
|
5280
|
-
} : {
|
|
5281
|
-
id: data.user_id,
|
|
5282
|
-
username: ""
|
|
5283
|
-
};
|
|
5284
|
-
return {
|
|
5285
|
-
...data,
|
|
5286
|
-
user: new User(client, userRaw),
|
|
5287
|
-
rawMember: data.member,
|
|
5288
|
-
guild: data.guild_id ? new Guild(client, data.guild_id) : null,
|
|
5289
|
-
message: new Message(client, {
|
|
5290
|
-
id: data.message_id,
|
|
5291
|
-
channelId: data.channel_id
|
|
5292
|
-
})
|
|
5293
|
-
};
|
|
5294
|
-
}
|
|
5295
|
-
function readGuildId(data) {
|
|
5296
|
-
return data && typeof data === "object" && typeof data.guild_id === "string" ? data.guild_id : void 0;
|
|
5297
|
-
}
|
|
5298
|
-
//#endregion
|
|
5299
5308
|
//#region extensions/discord/src/internal/gateway-identify-limiter.ts
|
|
5300
5309
|
const IDENTIFY_WINDOW_MS = 5e3;
|
|
5301
5310
|
function normalizeMaxConcurrency(value) {
|
|
@@ -5399,19 +5408,38 @@ function decodeGatewayMessage(incoming) {
|
|
|
5399
5408
|
//#region extensions/discord/src/internal/gateway-rate-limit.ts
|
|
5400
5409
|
const GATEWAY_SEND_LIMIT = 120;
|
|
5401
5410
|
const GATEWAY_SEND_WINDOW_MS = 6e4;
|
|
5411
|
+
const GATEWAY_SEND_QUEUE_LIMIT = GATEWAY_SEND_LIMIT;
|
|
5402
5412
|
var GatewaySendLimiter = class {
|
|
5403
|
-
constructor(sendNow, emitError) {
|
|
5413
|
+
constructor(sendNow, emitError, emitOverflowWarning) {
|
|
5404
5414
|
this.sendNow = sendNow;
|
|
5405
5415
|
this.emitError = emitError;
|
|
5416
|
+
this.emitOverflowWarning = emitOverflowWarning;
|
|
5406
5417
|
this.outboundSendTimestamps = [];
|
|
5407
5418
|
this.outboundQueue = [];
|
|
5419
|
+
this.droppedEvents = 0;
|
|
5420
|
+
this.overflowWarningEmitted = false;
|
|
5408
5421
|
}
|
|
5409
5422
|
send(serialized, options) {
|
|
5410
5423
|
if (options?.critical || this.canSend(Date.now())) {
|
|
5411
5424
|
this.sendSerialized(serialized);
|
|
5412
5425
|
return;
|
|
5413
5426
|
}
|
|
5427
|
+
let shouldEmitOverflowWarning = false;
|
|
5428
|
+
if (this.outboundQueue.length >= GATEWAY_SEND_QUEUE_LIMIT) {
|
|
5429
|
+
this.outboundQueue.shift();
|
|
5430
|
+
this.droppedEvents += 1;
|
|
5431
|
+
if (!this.overflowWarningEmitted) {
|
|
5432
|
+
this.overflowWarningEmitted = true;
|
|
5433
|
+
shouldEmitOverflowWarning = true;
|
|
5434
|
+
}
|
|
5435
|
+
}
|
|
5414
5436
|
this.outboundQueue.push({ payload: serialized });
|
|
5437
|
+
if (shouldEmitOverflowWarning) this.emitOverflowWarning({
|
|
5438
|
+
droppedEvents: this.droppedEvents,
|
|
5439
|
+
maxQueuedEvents: GATEWAY_SEND_QUEUE_LIMIT,
|
|
5440
|
+
policy: "drop-oldest",
|
|
5441
|
+
queuedEvents: this.outboundQueue.length
|
|
5442
|
+
});
|
|
5415
5443
|
this.scheduleFlush();
|
|
5416
5444
|
}
|
|
5417
5445
|
clear() {
|
|
@@ -5420,6 +5448,8 @@ var GatewaySendLimiter = class {
|
|
|
5420
5448
|
this.outboundFlushTimer = void 0;
|
|
5421
5449
|
}
|
|
5422
5450
|
this.outboundQueue = [];
|
|
5451
|
+
this.droppedEvents = 0;
|
|
5452
|
+
this.overflowWarningEmitted = false;
|
|
5423
5453
|
}
|
|
5424
5454
|
getStatus() {
|
|
5425
5455
|
const now = Date.now();
|
|
@@ -5429,7 +5459,8 @@ var GatewaySendLimiter = class {
|
|
|
5429
5459
|
remainingEvents: Math.max(0, GATEWAY_SEND_LIMIT - this.outboundSendTimestamps.length),
|
|
5430
5460
|
resetTime: this.outboundSendTimestamps.length > 0 ? oldest + GATEWAY_SEND_WINDOW_MS : now + GATEWAY_SEND_WINDOW_MS,
|
|
5431
5461
|
currentEventCount: this.outboundSendTimestamps.length,
|
|
5432
|
-
queuedEvents: this.outboundQueue.length
|
|
5462
|
+
queuedEvents: this.outboundQueue.length,
|
|
5463
|
+
droppedEvents: this.droppedEvents
|
|
5433
5464
|
};
|
|
5434
5465
|
}
|
|
5435
5466
|
pruneWindow(now) {
|
|
@@ -5468,6 +5499,7 @@ var GatewaySendLimiter = class {
|
|
|
5468
5499
|
return;
|
|
5469
5500
|
}
|
|
5470
5501
|
}
|
|
5502
|
+
if (this.outboundQueue.length < GATEWAY_SEND_QUEUE_LIMIT) this.overflowWarningEmitted = false;
|
|
5471
5503
|
this.scheduleFlush();
|
|
5472
5504
|
}
|
|
5473
5505
|
};
|
|
@@ -5576,7 +5608,7 @@ var GatewayPlugin = class extends Plugin {
|
|
|
5576
5608
|
this.heartbeatTimers = new GatewayHeartbeatTimers();
|
|
5577
5609
|
this.reconnectTimer = new GatewayReconnectTimer();
|
|
5578
5610
|
this.voiceStateCache = new DiscordGatewayVoiceStateCache();
|
|
5579
|
-
this.outboundLimiter = new GatewaySendLimiter((payload) => this.sendSerializedGatewayEvent(payload), (error) => this.emitter.emit("error", error));
|
|
5611
|
+
this.outboundLimiter = new GatewaySendLimiter((payload) => this.sendSerializedGatewayEvent(payload), (error) => this.emitter.emit("error", error), (warning) => this.emitter.emit("warning", `Gateway outbound queue overflow policy=${warning.policy} droppedEvents=${warning.droppedEvents} queuedEvents=${warning.queuedEvents} maxQueuedEvents=${warning.maxQueuedEvents}`));
|
|
5580
5612
|
this.options = {
|
|
5581
5613
|
...options,
|
|
5582
5614
|
reconnect: {
|
|
@@ -5825,7 +5857,7 @@ var GatewayPlugin = class extends Plugin {
|
|
|
5825
5857
|
}
|
|
5826
5858
|
this.voiceStateCache.apply(payload);
|
|
5827
5859
|
dispatchVoiceGatewayEvent(this.client, payload.t, payload.d);
|
|
5828
|
-
const data = mapGatewayDispatchData(this.client, payload.t, payload.d);
|
|
5860
|
+
const data = payload.t === GatewayDispatchEvents.MessageCreate ? payload.d : mapGatewayDispatchData(this.client, payload.t, payload.d);
|
|
5829
5861
|
await this.client.dispatchGatewayEvent(payload.t, data);
|
|
5830
5862
|
if (payload.t === GatewayDispatchEvents.InteractionCreate && this.options.autoInteractions) await this.client.handleInteraction(payload.d);
|
|
5831
5863
|
}
|
|
@@ -5950,11 +5982,6 @@ const DEFAULT_INTERVAL_MS = 3e4;
|
|
|
5950
5982
|
const DEFAULT_MIN_UPDATE_INTERVAL_MS = 15e3;
|
|
5951
5983
|
const MIN_INTERVAL_MS = 5e3;
|
|
5952
5984
|
const MIN_UPDATE_INTERVAL_MS = 1e3;
|
|
5953
|
-
function normalizeOptionalText(value) {
|
|
5954
|
-
if (typeof value !== "string") return;
|
|
5955
|
-
const trimmed = value.trim();
|
|
5956
|
-
return trimmed.length > 0 ? trimmed : void 0;
|
|
5957
|
-
}
|
|
5958
5985
|
function clampPositiveInt(value, fallback, minValue) {
|
|
5959
5986
|
if (typeof value !== "number" || !Number.isFinite(value)) return fallback;
|
|
5960
5987
|
const rounded = Math.round(value);
|
|
@@ -5967,10 +5994,7 @@ function resolveAutoPresenceConfig(config) {
|
|
|
5967
5994
|
return {
|
|
5968
5995
|
enabled: config?.enabled === true,
|
|
5969
5996
|
intervalMs,
|
|
5970
|
-
minUpdateIntervalMs
|
|
5971
|
-
healthyText: normalizeOptionalText(config?.healthyText),
|
|
5972
|
-
degradedText: normalizeOptionalText(config?.degradedText),
|
|
5973
|
-
exhaustedText: normalizeOptionalText(config?.exhaustedText)
|
|
5997
|
+
minUpdateIntervalMs
|
|
5974
5998
|
};
|
|
5975
5999
|
}
|
|
5976
6000
|
function buildCustomStatusActivity(text) {
|
|
@@ -6019,16 +6043,12 @@ function resolveAuthAvailability(params) {
|
|
|
6019
6043
|
}
|
|
6020
6044
|
function resolvePresenceActivities(params) {
|
|
6021
6045
|
const reasonLabel = formatUnavailableReason(params.unavailableReason ?? null);
|
|
6022
|
-
if (params.state === "healthy")
|
|
6023
|
-
if (params.cfg.healthyText) return [buildCustomStatusActivity(params.cfg.healthyText)];
|
|
6024
|
-
return params.basePresence?.activities ?? [];
|
|
6025
|
-
}
|
|
6046
|
+
if (params.state === "healthy") return params.basePresence?.activities ?? [];
|
|
6026
6047
|
if (params.state === "degraded") {
|
|
6027
|
-
const text = renderTemplate(
|
|
6048
|
+
const text = renderTemplate("runtime degraded", { reason: reasonLabel });
|
|
6028
6049
|
return text ? [buildCustomStatusActivity(text)] : [];
|
|
6029
6050
|
}
|
|
6030
|
-
const
|
|
6031
|
-
const text = renderTemplate(params.cfg.exhaustedText ?? defaultTemplate, { reason: reasonLabel });
|
|
6051
|
+
const text = renderTemplate(isExhaustedUnavailableReason(params.unavailableReason ?? null) ? "token exhausted" : "model unavailable ({reason})", { reason: reasonLabel });
|
|
6032
6052
|
return text ? [buildCustomStatusActivity(text)] : [];
|
|
6033
6053
|
}
|
|
6034
6054
|
function resolvePresenceStatus(state) {
|
|
@@ -6228,7 +6248,7 @@ function normalizeGatewayInfoTimeoutMs(value) {
|
|
|
6228
6248
|
return Math.min(numeric, MAX_DISCORD_GATEWAY_INFO_TIMEOUT_MS);
|
|
6229
6249
|
}
|
|
6230
6250
|
function resolveDiscordGatewayInfoTimeoutMs(params) {
|
|
6231
|
-
return normalizeGatewayInfoTimeoutMs(params?.
|
|
6251
|
+
return normalizeGatewayInfoTimeoutMs(params?.env?.[DISCORD_GATEWAY_INFO_TIMEOUT_ENV]) ?? DEFAULT_DISCORD_GATEWAY_INFO_TIMEOUT_MS;
|
|
6232
6252
|
}
|
|
6233
6253
|
function summarizeGatewayResponseBody(body) {
|
|
6234
6254
|
return summarizeDiscordResponseBody(body, { emptyText: "<empty>" }) ?? "<empty>";
|
|
@@ -6599,10 +6619,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
6599
6619
|
});
|
|
6600
6620
|
const proxy = resolveEffectiveDebugProxyUrl(params.discordConfig?.proxy);
|
|
6601
6621
|
const debugProxySettings = resolveDebugProxySettings();
|
|
6602
|
-
const gatewayInfoTimeoutMs = resolveDiscordGatewayInfoTimeoutMs({
|
|
6603
|
-
configuredTimeoutMs: params.discordConfig?.gatewayInfoTimeoutMs,
|
|
6604
|
-
env: process.env
|
|
6605
|
-
});
|
|
6622
|
+
const gatewayInfoTimeoutMs = resolveDiscordGatewayInfoTimeoutMs({ env: process.env });
|
|
6606
6623
|
let fetchImpl = createDiscordGatewayMetadataFetch(debugProxySettings.enabled);
|
|
6607
6624
|
let wsAgent = new Agent({ lookup: discordDnsLookup$1 });
|
|
6608
6625
|
if (proxy) try {
|
|
@@ -6800,7 +6817,9 @@ function attachDiscordGatewayLogging(params) {
|
|
|
6800
6817
|
if (shouldPromoteGatewayDebug(message)) runtime.log?.(`discord gateway: ${message}`);
|
|
6801
6818
|
};
|
|
6802
6819
|
const onGatewayWarning = (warning) => {
|
|
6803
|
-
|
|
6820
|
+
const message = `discord gateway warning: ${String(warning)}`;
|
|
6821
|
+
logVerbose(message);
|
|
6822
|
+
runtime.log?.(warn(message));
|
|
6804
6823
|
};
|
|
6805
6824
|
const onGatewayMetrics = (metrics) => {
|
|
6806
6825
|
logVerbose(`discord gateway metrics: ${formatGatewayMetrics(metrics)}`);
|
|
@@ -6887,10 +6906,10 @@ function normalizeGatewayReadyTimeoutMs(value) {
|
|
|
6887
6906
|
return Math.min(numeric, MAX_DISCORD_GATEWAY_READY_TIMEOUT_MS);
|
|
6888
6907
|
}
|
|
6889
6908
|
function resolveDiscordGatewayReadyTimeoutMs(params) {
|
|
6890
|
-
return normalizeGatewayReadyTimeoutMs(params?.
|
|
6909
|
+
return normalizeGatewayReadyTimeoutMs(params?.env?.[DISCORD_GATEWAY_READY_TIMEOUT_ENV]) ?? DEFAULT_DISCORD_GATEWAY_READY_TIMEOUT_MS;
|
|
6891
6910
|
}
|
|
6892
6911
|
function resolveDiscordGatewayRuntimeReadyTimeoutMs(params) {
|
|
6893
|
-
return normalizeGatewayReadyTimeoutMs(params?.
|
|
6912
|
+
return normalizeGatewayReadyTimeoutMs(params?.env?.[DISCORD_GATEWAY_RUNTIME_READY_TIMEOUT_ENV]) ?? DEFAULT_DISCORD_GATEWAY_RUNTIME_READY_TIMEOUT_MS;
|
|
6894
6913
|
}
|
|
6895
6914
|
async function restartGatewayAfterReadyTimeout(params) {
|
|
6896
6915
|
if (!params.gateway || params.abortSignal?.aborted) return;
|
|
@@ -7159,14 +7178,8 @@ async function runDiscordGatewayLifecycle(params) {
|
|
|
7159
7178
|
const pushStatus = (patch) => {
|
|
7160
7179
|
params.statusSink?.(patch);
|
|
7161
7180
|
};
|
|
7162
|
-
const gatewayReadyTimeoutMs = resolveDiscordGatewayReadyTimeoutMs({
|
|
7163
|
-
|
|
7164
|
-
env: process.env
|
|
7165
|
-
});
|
|
7166
|
-
const gatewayRuntimeReadyTimeoutMs = resolveDiscordGatewayRuntimeReadyTimeoutMs({
|
|
7167
|
-
configuredTimeoutMs: params.gatewayRuntimeReadyTimeoutMs,
|
|
7168
|
-
env: process.env
|
|
7169
|
-
});
|
|
7181
|
+
const gatewayReadyTimeoutMs = resolveDiscordGatewayReadyTimeoutMs({ env: process.env });
|
|
7182
|
+
const gatewayRuntimeReadyTimeoutMs = resolveDiscordGatewayRuntimeReadyTimeoutMs({ env: process.env });
|
|
7170
7183
|
const statusObserver = createGatewayStatusObserver({
|
|
7171
7184
|
gateway,
|
|
7172
7185
|
abortSignal: params.abortSignal,
|
|
@@ -7239,7 +7252,7 @@ async function runDiscordGatewayLifecycle(params) {
|
|
|
7239
7252
|
gatewayEmitter?.removeListener(DISCORD_GATEWAY_TRANSPORT_ACTIVITY_EVENT, onGatewayTransportActivity);
|
|
7240
7253
|
if (params.voiceManager) {
|
|
7241
7254
|
await params.voiceManager.destroy();
|
|
7242
|
-
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-
|
|
7255
|
+
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-CyJ-sc3n.js").then((n) => n.n);
|
|
7243
7256
|
setDiscordTranscriptsVoiceManager({
|
|
7244
7257
|
accountId: params.accountId,
|
|
7245
7258
|
manager: null
|
|
@@ -7254,7 +7267,7 @@ async function runDiscordGatewayLifecycle(params) {
|
|
|
7254
7267
|
let discordVoiceRuntimePromise;
|
|
7255
7268
|
let discordProviderSessionRuntimePromise;
|
|
7256
7269
|
async function loadDiscordVoiceRuntime() {
|
|
7257
|
-
const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-
|
|
7270
|
+
const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-DVvlH8NR.js");
|
|
7258
7271
|
discordVoiceRuntimePromise = promise;
|
|
7259
7272
|
try {
|
|
7260
7273
|
return await promise;
|
|
@@ -7264,7 +7277,7 @@ async function loadDiscordVoiceRuntime() {
|
|
|
7264
7277
|
}
|
|
7265
7278
|
}
|
|
7266
7279
|
async function loadDiscordProviderSessionRuntime() {
|
|
7267
|
-
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-
|
|
7280
|
+
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-D9GTBKPg.js");
|
|
7268
7281
|
discordProviderSessionRuntimePromise = promise;
|
|
7269
7282
|
try {
|
|
7270
7283
|
return await promise;
|
|
@@ -7612,8 +7625,8 @@ async function resolveDiscordAllowlistConfig(params) {
|
|
|
7612
7625
|
}
|
|
7613
7626
|
//#endregion
|
|
7614
7627
|
//#region extensions/discord/src/monitor/provider.cleanup.ts
|
|
7615
|
-
function cleanupDiscordProviderStartup(params) {
|
|
7616
|
-
params.deactivateMessageHandler?.();
|
|
7628
|
+
async function cleanupDiscordProviderStartup(params) {
|
|
7629
|
+
await params.deactivateMessageHandler?.();
|
|
7617
7630
|
params.autoPresenceController?.stop();
|
|
7618
7631
|
params.setStatus?.({ connected: false });
|
|
7619
7632
|
if (params.onEarlyGatewayDebug) params.earlyGatewayEmitter?.removeListener("debug", params.onEarlyGatewayDebug);
|
|
@@ -8019,107 +8032,6 @@ function runDiscordCommandDeployInBackground(params) {
|
|
|
8019
8032
|
});
|
|
8020
8033
|
}
|
|
8021
8034
|
//#endregion
|
|
8022
|
-
//#region extensions/discord/src/monitor/agent-components-context.ts
|
|
8023
|
-
function formatUsername(user) {
|
|
8024
|
-
if (user.discriminator && user.discriminator !== "0") return `${user.username}#${user.discriminator}`;
|
|
8025
|
-
return user.username;
|
|
8026
|
-
}
|
|
8027
|
-
function isThreadChannelType(channelType) {
|
|
8028
|
-
return channelType === ChannelType.PublicThread || channelType === ChannelType.PrivateThread || channelType === ChannelType.AnnouncementThread;
|
|
8029
|
-
}
|
|
8030
|
-
function resolveAgentComponentRoute(params) {
|
|
8031
|
-
return resolveAgentRoute({
|
|
8032
|
-
cfg: params.ctx.cfg,
|
|
8033
|
-
channel: "discord",
|
|
8034
|
-
accountId: params.ctx.accountId,
|
|
8035
|
-
guildId: params.rawGuildId,
|
|
8036
|
-
memberRoleIds: params.memberRoleIds,
|
|
8037
|
-
peer: {
|
|
8038
|
-
kind: params.isDirectMessage ? "direct" : params.isGroupDm ? "group" : "channel",
|
|
8039
|
-
id: params.isDirectMessage ? params.userId : params.channelId
|
|
8040
|
-
},
|
|
8041
|
-
parentPeer: params.parentId ? {
|
|
8042
|
-
kind: "channel",
|
|
8043
|
-
id: params.parentId
|
|
8044
|
-
} : void 0
|
|
8045
|
-
});
|
|
8046
|
-
}
|
|
8047
|
-
async function ackComponentInteraction(params) {
|
|
8048
|
-
try {
|
|
8049
|
-
await params.interaction.reply({
|
|
8050
|
-
content: "✓",
|
|
8051
|
-
...params.replyOpts
|
|
8052
|
-
});
|
|
8053
|
-
} catch (err) {
|
|
8054
|
-
logError(`${params.label}: failed to acknowledge interaction: ${String(err)}`);
|
|
8055
|
-
}
|
|
8056
|
-
}
|
|
8057
|
-
function resolveDiscordChannelContext(interaction) {
|
|
8058
|
-
const channel = interaction.channel;
|
|
8059
|
-
const channelInfo = resolveDiscordChannelInfoSafe(channel);
|
|
8060
|
-
const channelName = channelInfo.name;
|
|
8061
|
-
const channelSlug = channelName ? normalizeDiscordSlug(channelName) : "";
|
|
8062
|
-
const displayChannelSlug = channelName ? normalizeDiscordDisplaySlug(channelName) : "";
|
|
8063
|
-
const channelType = channelInfo.type;
|
|
8064
|
-
const isThread = isThreadChannelType(channelType);
|
|
8065
|
-
let parentId;
|
|
8066
|
-
let parentName;
|
|
8067
|
-
let parentSlug = "";
|
|
8068
|
-
if (isThread) {
|
|
8069
|
-
parentId = channelInfo.parentId;
|
|
8070
|
-
parentName = channelInfo.parentName;
|
|
8071
|
-
if (parentName) parentSlug = normalizeDiscordSlug(parentName);
|
|
8072
|
-
}
|
|
8073
|
-
return {
|
|
8074
|
-
channelName,
|
|
8075
|
-
channelSlug,
|
|
8076
|
-
displayChannelSlug,
|
|
8077
|
-
channelType,
|
|
8078
|
-
isThread,
|
|
8079
|
-
parentId,
|
|
8080
|
-
parentName,
|
|
8081
|
-
parentSlug
|
|
8082
|
-
};
|
|
8083
|
-
}
|
|
8084
|
-
async function resolveComponentInteractionContext(params) {
|
|
8085
|
-
const { interaction, label } = params;
|
|
8086
|
-
const channelId = interaction.rawData.channel_id;
|
|
8087
|
-
if (!channelId) {
|
|
8088
|
-
logError(`${label}: missing channel_id in interaction`);
|
|
8089
|
-
return null;
|
|
8090
|
-
}
|
|
8091
|
-
const user = interaction.user;
|
|
8092
|
-
if (!user) {
|
|
8093
|
-
logError(`${label}: missing user in interaction`);
|
|
8094
|
-
return null;
|
|
8095
|
-
}
|
|
8096
|
-
const shouldDefer = params.defer !== false && "defer" in interaction;
|
|
8097
|
-
let didDefer = false;
|
|
8098
|
-
if (shouldDefer) try {
|
|
8099
|
-
await interaction.defer({ ephemeral: true });
|
|
8100
|
-
didDefer = true;
|
|
8101
|
-
} catch (err) {
|
|
8102
|
-
logError(`${label}: failed to defer interaction: ${String(err)}`);
|
|
8103
|
-
}
|
|
8104
|
-
const replyOpts = didDefer ? {} : { ephemeral: true };
|
|
8105
|
-
const username = formatUsername(user);
|
|
8106
|
-
const userId = user.id;
|
|
8107
|
-
const rawGuildId = interaction.rawData.guild_id;
|
|
8108
|
-
const channelType = resolveDiscordChannelContext(interaction).channelType;
|
|
8109
|
-
const isGroupDm = channelType === ChannelType.GroupDM;
|
|
8110
|
-
return {
|
|
8111
|
-
channelId,
|
|
8112
|
-
user,
|
|
8113
|
-
username,
|
|
8114
|
-
userId,
|
|
8115
|
-
replyOpts,
|
|
8116
|
-
rawGuildId,
|
|
8117
|
-
isDirectMessage: channelType === ChannelType.DM || !rawGuildId && !isGroupDm && channelType == null,
|
|
8118
|
-
isGroupDm,
|
|
8119
|
-
memberRoleIds: Array.isArray(interaction.rawData.member?.roles) ? interaction.rawData.member.roles.map((roleId) => roleId) : []
|
|
8120
|
-
};
|
|
8121
|
-
}
|
|
8122
|
-
//#endregion
|
|
8123
8035
|
//#region extensions/discord/src/monitor/agent-components-reply.ts
|
|
8124
8036
|
async function replySilently(interaction, params) {
|
|
8125
8037
|
try {
|
|
@@ -8127,469 +8039,124 @@ async function replySilently(interaction, params) {
|
|
|
8127
8039
|
} catch {}
|
|
8128
8040
|
}
|
|
8129
8041
|
//#endregion
|
|
8130
|
-
//#region extensions/discord/src/
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
const access = await resolveDiscordDmCommandAccess({
|
|
8143
|
-
accountId: ctx.accountId,
|
|
8144
|
-
dmPolicy,
|
|
8145
|
-
configuredAllowFrom: ctx.allowFrom ?? [],
|
|
8146
|
-
sender: {
|
|
8147
|
-
id: user.id,
|
|
8148
|
-
name: user.username,
|
|
8149
|
-
tag: formatDiscordUserTag(user)
|
|
8150
|
-
},
|
|
8151
|
-
allowNameMatching: isDangerousNameMatchingEnabled(ctx.discordConfig),
|
|
8152
|
-
cfg: ctx.cfg,
|
|
8153
|
-
token: ctx.token,
|
|
8154
|
-
readStoreAllowFrom: async ({ accountId, dmPolicy: dmPolicyLocal }) => await readChannelIngressStoreAllowFromForDmPolicy({
|
|
8155
|
-
provider: "discord",
|
|
8156
|
-
accountId,
|
|
8157
|
-
dmPolicy: dmPolicyLocal
|
|
8158
|
-
}),
|
|
8159
|
-
eventKind: "button"
|
|
8160
|
-
});
|
|
8161
|
-
if (access.senderAccess.decision === "allow") return true;
|
|
8162
|
-
if (access.senderAccess.decision !== "pairing") {
|
|
8163
|
-
logVerbose(`agent ${componentLabel}: blocked DM user ${user.id} (not in allowFrom)`);
|
|
8164
|
-
await replySilently(interaction, {
|
|
8165
|
-
content: `You are not authorized to use this ${componentLabel}.`,
|
|
8166
|
-
...replyOpts
|
|
8167
|
-
});
|
|
8168
|
-
return false;
|
|
8042
|
+
//#region extensions/discord/src/activities/interaction.ts
|
|
8043
|
+
const REGISTRATION_WIDGET_ID = "AAAAAAAAAAAAAAAAAAAAAA";
|
|
8044
|
+
const PENDING_LAUNCH_WRITE_BUDGET_MS = 250;
|
|
8045
|
+
var DiscordActivityButton = class extends Button {
|
|
8046
|
+
constructor(ctx, deps) {
|
|
8047
|
+
super();
|
|
8048
|
+
this.ctx = ctx;
|
|
8049
|
+
this.deps = deps;
|
|
8050
|
+
this.label = "Open widget";
|
|
8051
|
+
this.customId = buildDiscordActivityCustomId(REGISTRATION_WIDGET_ID);
|
|
8052
|
+
this.customIdParser = parseDiscordActivityCustomIdForInteraction;
|
|
8053
|
+
this.pendingLaunchFailureLogged = false;
|
|
8169
8054
|
}
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
|
|
8177
|
-
|
|
8178
|
-
|
|
8055
|
+
logPendingLaunchFailure(error) {
|
|
8056
|
+
if (this.pendingLaunchFailureLogged) return;
|
|
8057
|
+
this.pendingLaunchFailureLogged = true;
|
|
8058
|
+
this.deps.logError(`discord activity: failed to record pending launch: ${String(error)}`);
|
|
8059
|
+
}
|
|
8060
|
+
async run(interaction, data) {
|
|
8061
|
+
if (typeof data.widgetId !== "string") {
|
|
8062
|
+
await this.deps.reply(interaction, {
|
|
8063
|
+
content: "This widget is no longer valid.",
|
|
8064
|
+
ephemeral: true
|
|
8179
8065
|
});
|
|
8066
|
+
return;
|
|
8180
8067
|
}
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
|
|
8191
|
-
|
|
8068
|
+
const runtime = getDiscordActivitiesRuntime();
|
|
8069
|
+
const channelId = interaction.rawData.channel_id;
|
|
8070
|
+
const discordUserId = interaction.userId;
|
|
8071
|
+
if (!runtime || !channelId || !discordUserId) this.logPendingLaunchFailure(/* @__PURE__ */ new Error("missing activity runtime or interaction identity"));
|
|
8072
|
+
else {
|
|
8073
|
+
const write = runtime.store.recordPendingLaunch({
|
|
8074
|
+
accountId: this.ctx.accountId,
|
|
8075
|
+
channelId,
|
|
8076
|
+
discordUserId,
|
|
8077
|
+
widgetId: data.widgetId,
|
|
8078
|
+
createdAt: Date.now()
|
|
8079
|
+
}).then(() => "written").catch((error) => {
|
|
8080
|
+
this.logPendingLaunchFailure(error);
|
|
8081
|
+
return "failed";
|
|
8192
8082
|
});
|
|
8083
|
+
const timeout = new Promise((resolve) => {
|
|
8084
|
+
setTimeout(() => resolve("timeout"), PENDING_LAUNCH_WRITE_BUDGET_MS).unref?.();
|
|
8085
|
+
});
|
|
8086
|
+
if (await Promise.race([write, timeout]) === "timeout") this.logPendingLaunchFailure(/* @__PURE__ */ new Error(`pending launch write exceeded ${PENDING_LAUNCH_WRITE_BUDGET_MS}ms`));
|
|
8193
8087
|
}
|
|
8194
|
-
|
|
8195
|
-
content: "Pairing already requested. Ask the bot owner to approve your code.",
|
|
8196
|
-
...replyOpts
|
|
8197
|
-
});
|
|
8198
|
-
return false;
|
|
8199
|
-
}
|
|
8200
|
-
async function ensureGroupDmComponentAuthorized(params) {
|
|
8201
|
-
const { ctx, interaction, channelId, componentLabel, replyOpts } = params;
|
|
8202
|
-
if (!(ctx.discordConfig?.dm?.groupEnabled ?? false)) {
|
|
8203
|
-
logVerbose(`agent ${componentLabel}: blocked group dm ${channelId} (group DMs disabled)`);
|
|
8204
|
-
await replySilently(interaction, {
|
|
8205
|
-
content: "Group DM interactions are disabled.",
|
|
8206
|
-
...replyOpts
|
|
8207
|
-
});
|
|
8208
|
-
return false;
|
|
8088
|
+
await interaction.launchActivity();
|
|
8209
8089
|
}
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
content: `You are not authorized to use this ${componentLabel}.`,
|
|
8220
|
-
...replyOpts
|
|
8221
|
-
});
|
|
8222
|
-
return false;
|
|
8223
|
-
}
|
|
8224
|
-
async function resolveInteractionContextWithDmAuth(params) {
|
|
8225
|
-
const interactionCtx = await resolveComponentInteractionContext({
|
|
8226
|
-
interaction: params.interaction,
|
|
8227
|
-
label: params.label,
|
|
8228
|
-
defer: params.defer
|
|
8090
|
+
};
|
|
8091
|
+
function createDiscordActivityButton(ctx, applicationId, deps = {}) {
|
|
8092
|
+
const runtime = getDiscordActivitiesRuntime();
|
|
8093
|
+
if (!runtime || !runtime.isAccountEnabled(ctx.accountId, ctx.cfg)) return null;
|
|
8094
|
+
if (applicationId) runtime.registerApplicationId(ctx.accountId, applicationId);
|
|
8095
|
+
if (!runtime.resolveAccount(ctx.accountId, ctx.cfg)) return null;
|
|
8096
|
+
return new DiscordActivityButton(ctx, {
|
|
8097
|
+
reply: deps.reply ?? replySilently,
|
|
8098
|
+
logError: deps.logError ?? logError
|
|
8229
8099
|
});
|
|
8230
|
-
if (!interactionCtx) return null;
|
|
8231
|
-
if (interactionCtx.isDirectMessage) {
|
|
8232
|
-
if (!await ensureDmComponentAuthorized({
|
|
8233
|
-
ctx: params.ctx,
|
|
8234
|
-
interaction: params.interaction,
|
|
8235
|
-
user: interactionCtx.user,
|
|
8236
|
-
componentLabel: params.componentLabel,
|
|
8237
|
-
replyOpts: interactionCtx.replyOpts
|
|
8238
|
-
})) return null;
|
|
8239
|
-
}
|
|
8240
|
-
if (interactionCtx.isGroupDm) {
|
|
8241
|
-
if (!await ensureGroupDmComponentAuthorized({
|
|
8242
|
-
ctx: params.ctx,
|
|
8243
|
-
interaction: params.interaction,
|
|
8244
|
-
channelId: interactionCtx.channelId,
|
|
8245
|
-
componentLabel: params.componentLabel,
|
|
8246
|
-
replyOpts: interactionCtx.replyOpts
|
|
8247
|
-
})) return null;
|
|
8248
|
-
}
|
|
8249
|
-
return interactionCtx;
|
|
8250
8100
|
}
|
|
8251
8101
|
//#endregion
|
|
8252
|
-
//#region extensions/discord/src/
|
|
8253
|
-
function
|
|
8254
|
-
|
|
8255
|
-
providerConfigPresent:
|
|
8256
|
-
groupPolicy:
|
|
8257
|
-
defaultGroupPolicy:
|
|
8102
|
+
//#region extensions/discord/src/voice/access.ts
|
|
8103
|
+
async function authorizeDiscordVoiceIngress(params) {
|
|
8104
|
+
const groupPolicy = params.groupPolicy ?? resolveOpenProviderRuntimeGroupPolicy({
|
|
8105
|
+
providerConfigPresent: params.cfg.channels?.discord !== void 0,
|
|
8106
|
+
groupPolicy: params.discordConfig.groupPolicy,
|
|
8107
|
+
defaultGroupPolicy: params.cfg.channels?.defaults?.groupPolicy
|
|
8258
8108
|
}).groupPolicy;
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
...replyOpts
|
|
8267
|
-
});
|
|
8268
|
-
};
|
|
8269
|
-
const channelConfig = resolveDiscordChannelConfigWithFallback({
|
|
8270
|
-
guildInfo,
|
|
8271
|
-
channelId,
|
|
8272
|
-
channelName: channelCtx.channelName,
|
|
8273
|
-
channelSlug: channelCtx.channelSlug,
|
|
8274
|
-
parentId: channelCtx.parentId,
|
|
8275
|
-
parentName: channelCtx.parentName,
|
|
8276
|
-
parentSlug: channelCtx.parentSlug,
|
|
8277
|
-
scope: channelCtx.isThread ? "thread" : "channel"
|
|
8109
|
+
const guildInfo = resolveDiscordGuildEntry({
|
|
8110
|
+
guild: params.guild ?? {
|
|
8111
|
+
id: params.guildId,
|
|
8112
|
+
...params.guildName ? { name: params.guildName } : {}
|
|
8113
|
+
},
|
|
8114
|
+
guildId: params.guildId,
|
|
8115
|
+
guildEntries: params.discordConfig.guilds
|
|
8278
8116
|
});
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8117
|
+
const channelConfig = params.channelId ? resolveDiscordChannelConfigWithFallback({
|
|
8118
|
+
guildInfo,
|
|
8119
|
+
channelId: params.channelId,
|
|
8120
|
+
channelName: params.channelName,
|
|
8121
|
+
channelSlug: params.channelSlug,
|
|
8122
|
+
parentId: params.parentId,
|
|
8123
|
+
parentName: params.parentName,
|
|
8124
|
+
parentSlug: params.parentSlug,
|
|
8125
|
+
scope: params.scope
|
|
8126
|
+
}) : null;
|
|
8127
|
+
if (channelConfig?.enabled === false) return {
|
|
8128
|
+
ok: false,
|
|
8129
|
+
message: "This channel is disabled."
|
|
8130
|
+
};
|
|
8283
8131
|
const channelAllowlistConfigured = Boolean(guildInfo?.channels) && Object.keys(guildInfo?.channels ?? {}).length > 0;
|
|
8284
|
-
|
|
8132
|
+
if (!params.channelId && groupPolicy === "allowlist" && channelAllowlistConfigured) return {
|
|
8133
|
+
ok: false,
|
|
8134
|
+
message: `${params.channelLabel ?? "This channel"} is not allowlisted for voice commands.`
|
|
8135
|
+
};
|
|
8136
|
+
const channelAllowed = channelConfig ? channelConfig.allowed : !channelAllowlistConfigured;
|
|
8285
8137
|
if (!isDiscordGroupAllowedByPolicy({
|
|
8286
|
-
groupPolicy
|
|
8138
|
+
groupPolicy,
|
|
8287
8139
|
guildAllowlisted: Boolean(guildInfo),
|
|
8288
8140
|
channelAllowlistConfigured,
|
|
8289
8141
|
channelAllowed
|
|
8290
|
-
})) {
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
}
|
|
8294
|
-
|
|
8295
|
-
await replyUnauthorized();
|
|
8296
|
-
return false;
|
|
8297
|
-
}
|
|
8298
|
-
const { memberAllowed } = resolveDiscordMemberAccessState({
|
|
8142
|
+
}) || channelConfig?.allowed === false) return {
|
|
8143
|
+
ok: false,
|
|
8144
|
+
message: `${params.channelLabel ?? "This channel"} is not allowlisted for voice commands.`
|
|
8145
|
+
};
|
|
8146
|
+
const { hasAccessRestrictions, memberAllowed } = resolveDiscordMemberAccessState({
|
|
8299
8147
|
channelConfig,
|
|
8300
8148
|
guildInfo,
|
|
8301
|
-
memberRoleIds,
|
|
8302
|
-
sender:
|
|
8303
|
-
|
|
8304
|
-
name: user.username,
|
|
8305
|
-
tag: user.discriminator ? `${user.username}#${user.discriminator}` : void 0
|
|
8306
|
-
},
|
|
8307
|
-
allowNameMatching: params.allowNameMatching
|
|
8149
|
+
memberRoleIds: params.memberRoleIds,
|
|
8150
|
+
sender: params.sender,
|
|
8151
|
+
allowNameMatching: false
|
|
8308
8152
|
});
|
|
8309
|
-
|
|
8310
|
-
logVerbose(`agent ${componentLabel}: blocked user ${user.id} (not in users/roles allowlist)`);
|
|
8311
|
-
await replyUnauthorized();
|
|
8312
|
-
return false;
|
|
8313
|
-
}
|
|
8314
|
-
async function ensureComponentUserAllowed(params) {
|
|
8315
|
-
const allowList = normalizeDiscordAllowList(params.entry.allowedUsers, [
|
|
8316
|
-
"discord:",
|
|
8317
|
-
"user:",
|
|
8318
|
-
"pk:"
|
|
8319
|
-
]);
|
|
8320
|
-
if (!allowList) return true;
|
|
8321
|
-
if (resolveDiscordAllowListMatch({
|
|
8322
|
-
allowList,
|
|
8323
|
-
candidate: {
|
|
8324
|
-
id: params.user.id,
|
|
8325
|
-
name: params.user.username,
|
|
8326
|
-
tag: formatDiscordUserTag(params.user)
|
|
8327
|
-
},
|
|
8328
|
-
allowNameMatching: params.allowNameMatching
|
|
8329
|
-
}).allowed) return true;
|
|
8330
|
-
logVerbose(`discord component ${params.componentLabel}: blocked user ${params.user.id} (not in allowedUsers)`);
|
|
8331
|
-
await replySilently(params.interaction, {
|
|
8332
|
-
content: params.unauthorizedReply,
|
|
8333
|
-
...params.replyOpts
|
|
8334
|
-
});
|
|
8335
|
-
return false;
|
|
8336
|
-
}
|
|
8337
|
-
async function ensureAgentComponentInteractionAllowed(params) {
|
|
8338
|
-
const guildInfo = resolveDiscordGuildEntry({
|
|
8339
|
-
guild: params.interaction.guild ?? void 0,
|
|
8340
|
-
guildId: params.rawGuildId,
|
|
8341
|
-
guildEntries: params.ctx.guildEntries
|
|
8342
|
-
});
|
|
8343
|
-
const channelCtx = resolveDiscordChannelContext(params.interaction);
|
|
8344
|
-
if (!await ensureGuildComponentMemberAllowed({
|
|
8345
|
-
interaction: params.interaction,
|
|
8346
|
-
guildInfo,
|
|
8347
|
-
channelId: params.channelId,
|
|
8348
|
-
rawGuildId: params.rawGuildId,
|
|
8349
|
-
channelCtx,
|
|
8350
|
-
memberRoleIds: params.memberRoleIds,
|
|
8351
|
-
user: params.user,
|
|
8352
|
-
replyOpts: params.replyOpts,
|
|
8353
|
-
componentLabel: params.componentLabel,
|
|
8354
|
-
unauthorizedReply: params.unauthorizedReply,
|
|
8355
|
-
allowNameMatching: isDangerousNameMatchingEnabled(params.ctx.discordConfig),
|
|
8356
|
-
groupPolicy: resolveComponentRuntimeGroupPolicy(params.ctx)
|
|
8357
|
-
})) return null;
|
|
8358
|
-
return { parentId: channelCtx.parentId };
|
|
8359
|
-
}
|
|
8360
|
-
async function resolveAuthorizedComponentInteraction(params) {
|
|
8361
|
-
const interactionCtx = await resolveInteractionContextWithDmAuth({
|
|
8362
|
-
ctx: params.ctx,
|
|
8363
|
-
interaction: params.interaction,
|
|
8364
|
-
label: params.label,
|
|
8365
|
-
componentLabel: params.componentLabel,
|
|
8366
|
-
defer: params.defer
|
|
8367
|
-
});
|
|
8368
|
-
if (!interactionCtx) return null;
|
|
8369
|
-
const { channelId, user, replyOpts, rawGuildId, memberRoleIds } = interactionCtx;
|
|
8370
|
-
const guildInfo = resolveDiscordGuildEntry({
|
|
8371
|
-
guild: params.interaction.guild ?? void 0,
|
|
8372
|
-
guildId: rawGuildId,
|
|
8373
|
-
guildEntries: params.ctx.guildEntries
|
|
8374
|
-
});
|
|
8375
|
-
const channelCtx = resolveDiscordChannelContext(params.interaction);
|
|
8376
|
-
const allowNameMatching = isDangerousNameMatchingEnabled(params.ctx.discordConfig);
|
|
8377
|
-
const channelConfig = resolveDiscordChannelConfigWithFallback({
|
|
8378
|
-
guildInfo,
|
|
8379
|
-
channelId,
|
|
8380
|
-
channelName: channelCtx.channelName,
|
|
8381
|
-
channelSlug: channelCtx.channelSlug,
|
|
8382
|
-
parentId: channelCtx.parentId,
|
|
8383
|
-
parentName: channelCtx.parentName,
|
|
8384
|
-
parentSlug: channelCtx.parentSlug,
|
|
8385
|
-
scope: channelCtx.isThread ? "thread" : "channel"
|
|
8386
|
-
});
|
|
8387
|
-
if (!await ensureGuildComponentMemberAllowed({
|
|
8388
|
-
interaction: params.interaction,
|
|
8389
|
-
guildInfo,
|
|
8390
|
-
channelId,
|
|
8391
|
-
rawGuildId,
|
|
8392
|
-
channelCtx,
|
|
8393
|
-
memberRoleIds,
|
|
8394
|
-
user,
|
|
8395
|
-
replyOpts,
|
|
8396
|
-
componentLabel: params.componentLabel,
|
|
8397
|
-
unauthorizedReply: params.unauthorizedReply,
|
|
8398
|
-
allowNameMatching,
|
|
8399
|
-
groupPolicy: resolveComponentRuntimeGroupPolicy(params.ctx)
|
|
8400
|
-
})) return null;
|
|
8401
|
-
return {
|
|
8402
|
-
interactionCtx,
|
|
8403
|
-
channelCtx,
|
|
8404
|
-
guildInfo,
|
|
8405
|
-
channelConfig,
|
|
8406
|
-
allowNameMatching,
|
|
8407
|
-
commandAuthorized: await resolveComponentCommandAuthorized({
|
|
8408
|
-
ctx: params.ctx,
|
|
8409
|
-
interactionCtx,
|
|
8410
|
-
channelConfig,
|
|
8411
|
-
guildInfo,
|
|
8412
|
-
allowNameMatching
|
|
8413
|
-
}),
|
|
8414
|
-
user,
|
|
8415
|
-
replyOpts
|
|
8416
|
-
};
|
|
8417
|
-
}
|
|
8418
|
-
async function resolveComponentCommandAuthorized(params) {
|
|
8419
|
-
const { ctx, interactionCtx, channelConfig, guildInfo } = params;
|
|
8420
|
-
if (interactionCtx.isDirectMessage) return true;
|
|
8421
|
-
const { ownerAllowList, ownerAllowed: ownerOk } = resolveDiscordOwnerAccess({
|
|
8422
|
-
allowFrom: ctx.allowFrom,
|
|
8423
|
-
sender: {
|
|
8424
|
-
id: interactionCtx.user.id,
|
|
8425
|
-
name: interactionCtx.user.username,
|
|
8426
|
-
tag: formatDiscordUserTag(interactionCtx.user)
|
|
8427
|
-
},
|
|
8428
|
-
allowNameMatching: params.allowNameMatching
|
|
8429
|
-
});
|
|
8430
|
-
const { hasAccessRestrictions, memberAllowed } = resolveDiscordMemberAccessState({
|
|
8431
|
-
channelConfig,
|
|
8432
|
-
guildInfo,
|
|
8433
|
-
memberRoleIds: interactionCtx.memberRoleIds,
|
|
8434
|
-
sender: {
|
|
8435
|
-
id: interactionCtx.user.id,
|
|
8436
|
-
name: interactionCtx.user.username,
|
|
8437
|
-
tag: formatDiscordUserTag(interactionCtx.user)
|
|
8438
|
-
},
|
|
8439
|
-
allowNameMatching: params.allowNameMatching
|
|
8440
|
-
});
|
|
8441
|
-
const useAccessGroups = ctx.cfg.commands?.useAccessGroups !== false;
|
|
8442
|
-
return resolveCommandAuthorizedFromAuthorizers({
|
|
8443
|
-
useAccessGroups,
|
|
8444
|
-
authorizers: useAccessGroups ? [{
|
|
8445
|
-
configured: ownerAllowList != null,
|
|
8446
|
-
allowed: ownerOk
|
|
8447
|
-
}, {
|
|
8448
|
-
configured: hasAccessRestrictions,
|
|
8449
|
-
allowed: memberAllowed
|
|
8450
|
-
}] : [{
|
|
8451
|
-
configured: hasAccessRestrictions,
|
|
8452
|
-
allowed: memberAllowed
|
|
8453
|
-
}],
|
|
8454
|
-
modeWhenAccessGroupsOff: "configured"
|
|
8455
|
-
});
|
|
8456
|
-
}
|
|
8457
|
-
//#endregion
|
|
8458
|
-
//#region extensions/discord/src/activities/interaction.ts
|
|
8459
|
-
const REGISTRATION_WIDGET_ID = "AAAAAAAAAAAAAAAAAAAAAA";
|
|
8460
|
-
const PENDING_LAUNCH_WRITE_BUDGET_MS = 250;
|
|
8461
|
-
var DiscordActivityButton = class extends Button {
|
|
8462
|
-
constructor(ctx, deps) {
|
|
8463
|
-
super();
|
|
8464
|
-
this.ctx = ctx;
|
|
8465
|
-
this.deps = deps;
|
|
8466
|
-
this.label = "Open widget";
|
|
8467
|
-
this.customId = buildDiscordActivityCustomId(REGISTRATION_WIDGET_ID);
|
|
8468
|
-
this.customIdParser = parseDiscordActivityCustomIdForInteraction;
|
|
8469
|
-
this.pendingLaunchFailureLogged = false;
|
|
8470
|
-
}
|
|
8471
|
-
logPendingLaunchFailure(error) {
|
|
8472
|
-
if (this.pendingLaunchFailureLogged) return;
|
|
8473
|
-
this.pendingLaunchFailureLogged = true;
|
|
8474
|
-
this.deps.logError(`discord activity: failed to record pending launch: ${String(error)}`);
|
|
8475
|
-
}
|
|
8476
|
-
async run(interaction, data) {
|
|
8477
|
-
if (typeof data.widgetId !== "string") {
|
|
8478
|
-
await this.deps.reply(interaction, {
|
|
8479
|
-
content: "This widget is no longer valid.",
|
|
8480
|
-
ephemeral: true
|
|
8481
|
-
});
|
|
8482
|
-
return;
|
|
8483
|
-
}
|
|
8484
|
-
const authorized = await this.deps.authorize({
|
|
8485
|
-
ctx: this.ctx,
|
|
8486
|
-
interaction,
|
|
8487
|
-
label: "discord activity",
|
|
8488
|
-
componentLabel: "widget button",
|
|
8489
|
-
unauthorizedReply: "not allowed",
|
|
8490
|
-
defer: false
|
|
8491
|
-
});
|
|
8492
|
-
if (!authorized) return;
|
|
8493
|
-
if (!authorized.commandAuthorized) {
|
|
8494
|
-
await this.deps.reply(interaction, {
|
|
8495
|
-
content: "not allowed",
|
|
8496
|
-
ephemeral: true
|
|
8497
|
-
});
|
|
8498
|
-
return;
|
|
8499
|
-
}
|
|
8500
|
-
const runtime = getDiscordActivitiesRuntime();
|
|
8501
|
-
const channelId = interaction.rawData.channel_id;
|
|
8502
|
-
const discordUserId = interaction.userId;
|
|
8503
|
-
if (!runtime || !channelId || !discordUserId) this.logPendingLaunchFailure(/* @__PURE__ */ new Error("missing activity runtime or interaction identity"));
|
|
8504
|
-
else {
|
|
8505
|
-
const write = runtime.store.recordPendingLaunch({
|
|
8506
|
-
accountId: this.ctx.accountId,
|
|
8507
|
-
channelId,
|
|
8508
|
-
discordUserId,
|
|
8509
|
-
widgetId: data.widgetId,
|
|
8510
|
-
createdAt: Date.now()
|
|
8511
|
-
}).then(() => "written").catch((error) => {
|
|
8512
|
-
this.logPendingLaunchFailure(error);
|
|
8513
|
-
return "failed";
|
|
8514
|
-
});
|
|
8515
|
-
const timeout = new Promise((resolve) => {
|
|
8516
|
-
setTimeout(() => resolve("timeout"), PENDING_LAUNCH_WRITE_BUDGET_MS).unref?.();
|
|
8517
|
-
});
|
|
8518
|
-
if (await Promise.race([write, timeout]) === "timeout") this.logPendingLaunchFailure(/* @__PURE__ */ new Error(`pending launch write exceeded ${PENDING_LAUNCH_WRITE_BUDGET_MS}ms`));
|
|
8519
|
-
}
|
|
8520
|
-
await interaction.launchActivity();
|
|
8521
|
-
}
|
|
8522
|
-
};
|
|
8523
|
-
function createDiscordActivityButton(ctx, applicationId, deps = {}) {
|
|
8524
|
-
const runtime = getDiscordActivitiesRuntime();
|
|
8525
|
-
if (!runtime || !runtime.isAccountEnabled(ctx.accountId, ctx.cfg)) return null;
|
|
8526
|
-
if (applicationId) runtime.registerApplicationId(ctx.accountId, applicationId);
|
|
8527
|
-
if (!runtime.resolveAccount(ctx.accountId, ctx.cfg)) return null;
|
|
8528
|
-
return new DiscordActivityButton(ctx, {
|
|
8529
|
-
authorize: deps.authorize ?? resolveAuthorizedComponentInteraction,
|
|
8530
|
-
reply: deps.reply ?? replySilently,
|
|
8531
|
-
logError: deps.logError ?? logError
|
|
8532
|
-
});
|
|
8533
|
-
}
|
|
8534
|
-
//#endregion
|
|
8535
|
-
//#region extensions/discord/src/voice/access.ts
|
|
8536
|
-
async function authorizeDiscordVoiceIngress(params) {
|
|
8537
|
-
const groupPolicy = params.groupPolicy ?? resolveOpenProviderRuntimeGroupPolicy({
|
|
8538
|
-
providerConfigPresent: params.cfg.channels?.discord !== void 0,
|
|
8539
|
-
groupPolicy: params.discordConfig.groupPolicy,
|
|
8540
|
-
defaultGroupPolicy: params.cfg.channels?.defaults?.groupPolicy
|
|
8541
|
-
}).groupPolicy;
|
|
8542
|
-
const guildInfo = resolveDiscordGuildEntry({
|
|
8543
|
-
guild: params.guild ?? {
|
|
8544
|
-
id: params.guildId,
|
|
8545
|
-
...params.guildName ? { name: params.guildName } : {}
|
|
8546
|
-
},
|
|
8547
|
-
guildId: params.guildId,
|
|
8548
|
-
guildEntries: params.discordConfig.guilds
|
|
8549
|
-
});
|
|
8550
|
-
const channelConfig = params.channelId ? resolveDiscordChannelConfigWithFallback({
|
|
8551
|
-
guildInfo,
|
|
8552
|
-
channelId: params.channelId,
|
|
8553
|
-
channelName: params.channelName,
|
|
8554
|
-
channelSlug: params.channelSlug,
|
|
8555
|
-
parentId: params.parentId,
|
|
8556
|
-
parentName: params.parentName,
|
|
8557
|
-
parentSlug: params.parentSlug,
|
|
8558
|
-
scope: params.scope
|
|
8559
|
-
}) : null;
|
|
8560
|
-
if (channelConfig?.enabled === false) return {
|
|
8561
|
-
ok: false,
|
|
8562
|
-
message: "This channel is disabled."
|
|
8563
|
-
};
|
|
8564
|
-
const channelAllowlistConfigured = Boolean(guildInfo?.channels) && Object.keys(guildInfo?.channels ?? {}).length > 0;
|
|
8565
|
-
if (!params.channelId && groupPolicy === "allowlist" && channelAllowlistConfigured) return {
|
|
8566
|
-
ok: false,
|
|
8567
|
-
message: `${params.channelLabel ?? "This channel"} is not allowlisted for voice commands.`
|
|
8568
|
-
};
|
|
8569
|
-
const channelAllowed = channelConfig ? channelConfig.allowed : !channelAllowlistConfigured;
|
|
8570
|
-
if (!isDiscordGroupAllowedByPolicy({
|
|
8571
|
-
groupPolicy,
|
|
8572
|
-
guildAllowlisted: Boolean(guildInfo),
|
|
8573
|
-
channelAllowlistConfigured,
|
|
8574
|
-
channelAllowed
|
|
8575
|
-
}) || channelConfig?.allowed === false) return {
|
|
8576
|
-
ok: false,
|
|
8577
|
-
message: `${params.channelLabel ?? "This channel"} is not allowlisted for voice commands.`
|
|
8578
|
-
};
|
|
8579
|
-
const { hasAccessRestrictions, memberAllowed } = resolveDiscordMemberAccessState({
|
|
8580
|
-
channelConfig,
|
|
8581
|
-
guildInfo,
|
|
8582
|
-
memberRoleIds: params.memberRoleIds,
|
|
8583
|
-
sender: params.sender,
|
|
8584
|
-
allowNameMatching: false
|
|
8585
|
-
});
|
|
8586
|
-
const admissionAllowList = normalizeDiscordAllowList(params.admissionAllowFrom ?? params.discordConfig.allowFrom ?? params.discordConfig.dm?.allowFrom, [
|
|
8153
|
+
const admissionAllowList = normalizeDiscordAllowList(params.admissionAllowFrom ?? params.discordConfig.allowFrom ?? params.discordConfig.allowFrom, [
|
|
8587
8154
|
"discord:",
|
|
8588
8155
|
"user:",
|
|
8589
8156
|
"pk:"
|
|
8590
8157
|
]);
|
|
8591
8158
|
const admissionAllowed = admissionAllowList ? allowListMatches(admissionAllowList, params.sender, { allowNameMatching: false }) : false;
|
|
8592
|
-
const useAccessGroups = params.useAccessGroups ??
|
|
8159
|
+
const useAccessGroups = params.useAccessGroups ?? true;
|
|
8593
8160
|
return resolveCommandAuthorizedFromAuthorizers({
|
|
8594
8161
|
useAccessGroups,
|
|
8595
8162
|
authorizers: useAccessGroups ? [{
|
|
@@ -8624,7 +8191,7 @@ function resolveDiscordVoiceAccess(params) {
|
|
|
8624
8191
|
admissionAllowFrom: resolveDiscordAccountAllowFrom({
|
|
8625
8192
|
cfg: params.cfg,
|
|
8626
8193
|
accountId: params.accountId
|
|
8627
|
-
}) ?? params.discordConfig.allowFrom ?? params.discordConfig.
|
|
8194
|
+
}) ?? params.discordConfig.allowFrom ?? params.discordConfig.allowFrom ?? [],
|
|
8628
8195
|
ownerAllowFrom: [],
|
|
8629
8196
|
ownerAllowAll: false
|
|
8630
8197
|
};
|
|
@@ -8708,160 +8275,585 @@ async function resolveVoiceCommandRuntimeContext(interaction, params) {
|
|
|
8708
8275
|
return null;
|
|
8709
8276
|
}
|
|
8710
8277
|
return {
|
|
8711
|
-
guildId,
|
|
8712
|
-
manager
|
|
8278
|
+
guildId,
|
|
8279
|
+
manager
|
|
8280
|
+
};
|
|
8281
|
+
}
|
|
8282
|
+
async function ensureVoiceCommandAccess(params) {
|
|
8283
|
+
const access = await authorizeVoiceCommand(params.interaction, params.context, { channelOverride: params.channelOverride });
|
|
8284
|
+
if (access.ok) return true;
|
|
8285
|
+
await params.interaction.reply({
|
|
8286
|
+
content: access.message ?? "Not authorized.",
|
|
8287
|
+
ephemeral: true
|
|
8288
|
+
});
|
|
8289
|
+
return false;
|
|
8290
|
+
}
|
|
8291
|
+
function createDiscordVoiceCommand(params) {
|
|
8292
|
+
const resolveSessionChannelId = (manager, guildId) => manager.status().find((entry) => entry.guildId === guildId)?.channelId;
|
|
8293
|
+
class JoinCommand extends Command {
|
|
8294
|
+
constructor(..._args) {
|
|
8295
|
+
super(..._args);
|
|
8296
|
+
this.name = "join";
|
|
8297
|
+
this.description = "Join a voice channel";
|
|
8298
|
+
this.defer = true;
|
|
8299
|
+
this.ephemeral = params.ephemeralDefault;
|
|
8300
|
+
this.options = [{
|
|
8301
|
+
name: "channel",
|
|
8302
|
+
description: "Voice channel to join",
|
|
8303
|
+
type: ApplicationCommandOptionType.Channel,
|
|
8304
|
+
required: true,
|
|
8305
|
+
channel_types: VOICE_CHANNEL_TYPES
|
|
8306
|
+
}];
|
|
8307
|
+
}
|
|
8308
|
+
async run(interaction) {
|
|
8309
|
+
const channel = await interaction.options.getChannel("channel", true);
|
|
8310
|
+
if (!channel || !("id" in channel)) {
|
|
8311
|
+
await interaction.reply({
|
|
8312
|
+
content: "Voice channel not found.",
|
|
8313
|
+
ephemeral: true
|
|
8314
|
+
});
|
|
8315
|
+
return;
|
|
8316
|
+
}
|
|
8317
|
+
const access = await authorizeVoiceCommand(interaction, params, { channelOverride: {
|
|
8318
|
+
id: channel.id,
|
|
8319
|
+
name: resolveDiscordChannelNameSafe(channel)
|
|
8320
|
+
} });
|
|
8321
|
+
if (!access.ok) {
|
|
8322
|
+
await interaction.reply({
|
|
8323
|
+
content: access.message ?? "Not authorized.",
|
|
8324
|
+
ephemeral: true
|
|
8325
|
+
});
|
|
8326
|
+
return;
|
|
8327
|
+
}
|
|
8328
|
+
if (!isVoiceChannelType(channel.type)) {
|
|
8329
|
+
await interaction.reply({
|
|
8330
|
+
content: "That is not a voice channel.",
|
|
8331
|
+
ephemeral: true
|
|
8332
|
+
});
|
|
8333
|
+
return;
|
|
8334
|
+
}
|
|
8335
|
+
const guildId = access.guildId ?? ("guildId" in channel ? channel.guildId : void 0);
|
|
8336
|
+
if (!guildId) {
|
|
8337
|
+
await interaction.reply({
|
|
8338
|
+
content: "Unable to resolve guild for this voice channel.",
|
|
8339
|
+
ephemeral: true
|
|
8340
|
+
});
|
|
8341
|
+
return;
|
|
8342
|
+
}
|
|
8343
|
+
const manager = params.getManager();
|
|
8344
|
+
if (!manager) {
|
|
8345
|
+
await interaction.reply({
|
|
8346
|
+
content: "Voice manager is not available yet.",
|
|
8347
|
+
ephemeral: true
|
|
8348
|
+
});
|
|
8349
|
+
return;
|
|
8350
|
+
}
|
|
8351
|
+
const result = await manager.join({
|
|
8352
|
+
guildId,
|
|
8353
|
+
channelId: channel.id
|
|
8354
|
+
});
|
|
8355
|
+
await interaction.reply({
|
|
8356
|
+
content: result.message,
|
|
8357
|
+
ephemeral: true
|
|
8358
|
+
});
|
|
8359
|
+
}
|
|
8360
|
+
}
|
|
8361
|
+
class LeaveCommand extends Command {
|
|
8362
|
+
constructor(..._args2) {
|
|
8363
|
+
super(..._args2);
|
|
8364
|
+
this.name = "leave";
|
|
8365
|
+
this.description = "Leave the current voice channel";
|
|
8366
|
+
this.defer = true;
|
|
8367
|
+
this.ephemeral = params.ephemeralDefault;
|
|
8368
|
+
}
|
|
8369
|
+
async run(interaction) {
|
|
8370
|
+
const runtimeContext = await resolveVoiceCommandRuntimeContext(interaction, params);
|
|
8371
|
+
if (!runtimeContext) return;
|
|
8372
|
+
const sessionChannelId = resolveSessionChannelId(runtimeContext.manager, runtimeContext.guildId);
|
|
8373
|
+
if (!await ensureVoiceCommandAccess({
|
|
8374
|
+
interaction,
|
|
8375
|
+
context: params,
|
|
8376
|
+
channelOverride: sessionChannelId ? { id: sessionChannelId } : void 0
|
|
8377
|
+
})) return;
|
|
8378
|
+
const result = await runtimeContext.manager.leave({ guildId: runtimeContext.guildId });
|
|
8379
|
+
await interaction.reply({
|
|
8380
|
+
content: result.message,
|
|
8381
|
+
ephemeral: true
|
|
8382
|
+
});
|
|
8383
|
+
}
|
|
8384
|
+
}
|
|
8385
|
+
class StatusCommand extends Command {
|
|
8386
|
+
constructor(..._args3) {
|
|
8387
|
+
super(..._args3);
|
|
8388
|
+
this.name = "status";
|
|
8389
|
+
this.description = "Show active voice sessions";
|
|
8390
|
+
this.defer = true;
|
|
8391
|
+
this.ephemeral = params.ephemeralDefault;
|
|
8392
|
+
}
|
|
8393
|
+
async run(interaction) {
|
|
8394
|
+
const runtimeContext = await resolveVoiceCommandRuntimeContext(interaction, params);
|
|
8395
|
+
if (!runtimeContext) return;
|
|
8396
|
+
const sessions = runtimeContext.manager.status().filter((entry) => entry.guildId === runtimeContext.guildId);
|
|
8397
|
+
const sessionChannelId = sessions[0]?.channelId;
|
|
8398
|
+
if (!await ensureVoiceCommandAccess({
|
|
8399
|
+
interaction,
|
|
8400
|
+
context: params,
|
|
8401
|
+
channelOverride: sessionChannelId ? { id: sessionChannelId } : void 0
|
|
8402
|
+
})) return;
|
|
8403
|
+
if (sessions.length === 0) {
|
|
8404
|
+
await interaction.reply({
|
|
8405
|
+
content: "No active voice sessions.",
|
|
8406
|
+
ephemeral: true
|
|
8407
|
+
});
|
|
8408
|
+
return;
|
|
8409
|
+
}
|
|
8410
|
+
const lines = sessions.map((entry) => `• ${formatMention({ channelId: entry.channelId })} (guild ${entry.guildId})`);
|
|
8411
|
+
await interaction.reply({
|
|
8412
|
+
content: lines.join("\n"),
|
|
8413
|
+
ephemeral: true
|
|
8414
|
+
});
|
|
8415
|
+
}
|
|
8416
|
+
}
|
|
8417
|
+
return new class extends CommandWithSubcommands {
|
|
8418
|
+
constructor(..._args4) {
|
|
8419
|
+
super(..._args4);
|
|
8420
|
+
this.name = "vc";
|
|
8421
|
+
this.description = "Voice channel controls";
|
|
8422
|
+
this.subcommands = [
|
|
8423
|
+
new JoinCommand(),
|
|
8424
|
+
new LeaveCommand(),
|
|
8425
|
+
new StatusCommand()
|
|
8426
|
+
];
|
|
8427
|
+
}
|
|
8428
|
+
}();
|
|
8429
|
+
}
|
|
8430
|
+
function isVoiceChannelType(type) {
|
|
8431
|
+
return type === ChannelType.GuildVoice || type === ChannelType.GuildStageVoice;
|
|
8432
|
+
}
|
|
8433
|
+
//#endregion
|
|
8434
|
+
//#region extensions/discord/src/monitor/agent-components-context.ts
|
|
8435
|
+
function formatUsername(user) {
|
|
8436
|
+
if (user.discriminator && user.discriminator !== "0") return `${user.username}#${user.discriminator}`;
|
|
8437
|
+
return user.username;
|
|
8438
|
+
}
|
|
8439
|
+
function isThreadChannelType(channelType) {
|
|
8440
|
+
return channelType === ChannelType.PublicThread || channelType === ChannelType.PrivateThread || channelType === ChannelType.AnnouncementThread;
|
|
8441
|
+
}
|
|
8442
|
+
function resolveAgentComponentRoute(params) {
|
|
8443
|
+
return resolveAgentRoute({
|
|
8444
|
+
cfg: params.ctx.cfg,
|
|
8445
|
+
channel: "discord",
|
|
8446
|
+
accountId: params.ctx.accountId,
|
|
8447
|
+
guildId: params.rawGuildId,
|
|
8448
|
+
memberRoleIds: params.memberRoleIds,
|
|
8449
|
+
peer: {
|
|
8450
|
+
kind: params.isDirectMessage ? "direct" : params.isGroupDm ? "group" : "channel",
|
|
8451
|
+
id: params.isDirectMessage ? params.userId : params.channelId
|
|
8452
|
+
},
|
|
8453
|
+
parentPeer: params.parentId ? {
|
|
8454
|
+
kind: "channel",
|
|
8455
|
+
id: params.parentId
|
|
8456
|
+
} : void 0
|
|
8457
|
+
});
|
|
8458
|
+
}
|
|
8459
|
+
async function ackComponentInteraction(params) {
|
|
8460
|
+
try {
|
|
8461
|
+
await params.interaction.reply({
|
|
8462
|
+
content: "✓",
|
|
8463
|
+
...params.replyOpts
|
|
8464
|
+
});
|
|
8465
|
+
} catch (err) {
|
|
8466
|
+
logError(`${params.label}: failed to acknowledge interaction: ${String(err)}`);
|
|
8467
|
+
}
|
|
8468
|
+
}
|
|
8469
|
+
function resolveDiscordChannelContext(interaction) {
|
|
8470
|
+
const channel = interaction.channel;
|
|
8471
|
+
const channelInfo = resolveDiscordChannelInfoSafe(channel);
|
|
8472
|
+
const channelName = channelInfo.name;
|
|
8473
|
+
const channelSlug = channelName ? normalizeDiscordSlug(channelName) : "";
|
|
8474
|
+
const displayChannelSlug = channelName ? normalizeDiscordDisplaySlug(channelName) : "";
|
|
8475
|
+
const channelType = channelInfo.type;
|
|
8476
|
+
const isThread = isThreadChannelType(channelType);
|
|
8477
|
+
let parentId;
|
|
8478
|
+
let parentName;
|
|
8479
|
+
let parentSlug = "";
|
|
8480
|
+
if (isThread) {
|
|
8481
|
+
parentId = channelInfo.parentId;
|
|
8482
|
+
parentName = channelInfo.parentName;
|
|
8483
|
+
if (parentName) parentSlug = normalizeDiscordSlug(parentName);
|
|
8484
|
+
}
|
|
8485
|
+
return {
|
|
8486
|
+
channelName,
|
|
8487
|
+
channelSlug,
|
|
8488
|
+
displayChannelSlug,
|
|
8489
|
+
channelType,
|
|
8490
|
+
isThread,
|
|
8491
|
+
parentId,
|
|
8492
|
+
parentName,
|
|
8493
|
+
parentSlug
|
|
8494
|
+
};
|
|
8495
|
+
}
|
|
8496
|
+
async function resolveComponentInteractionContext(params) {
|
|
8497
|
+
const { interaction, label } = params;
|
|
8498
|
+
const channelId = interaction.rawData.channel_id;
|
|
8499
|
+
if (!channelId) {
|
|
8500
|
+
logError(`${label}: missing channel_id in interaction`);
|
|
8501
|
+
return null;
|
|
8502
|
+
}
|
|
8503
|
+
const user = interaction.user;
|
|
8504
|
+
if (!user) {
|
|
8505
|
+
logError(`${label}: missing user in interaction`);
|
|
8506
|
+
return null;
|
|
8507
|
+
}
|
|
8508
|
+
const shouldDefer = params.defer !== false && "defer" in interaction;
|
|
8509
|
+
let didDefer = false;
|
|
8510
|
+
if (shouldDefer) try {
|
|
8511
|
+
await interaction.defer({ ephemeral: true });
|
|
8512
|
+
didDefer = true;
|
|
8513
|
+
} catch (err) {
|
|
8514
|
+
logError(`${label}: failed to defer interaction: ${String(err)}`);
|
|
8515
|
+
}
|
|
8516
|
+
const replyOpts = didDefer ? {} : { ephemeral: true };
|
|
8517
|
+
const username = formatUsername(user);
|
|
8518
|
+
const userId = user.id;
|
|
8519
|
+
const rawGuildId = interaction.rawData.guild_id;
|
|
8520
|
+
const channelType = resolveDiscordChannelContext(interaction).channelType;
|
|
8521
|
+
const isGroupDm = channelType === ChannelType.GroupDM;
|
|
8522
|
+
return {
|
|
8523
|
+
channelId,
|
|
8524
|
+
user,
|
|
8525
|
+
username,
|
|
8526
|
+
userId,
|
|
8527
|
+
replyOpts,
|
|
8528
|
+
rawGuildId,
|
|
8529
|
+
isDirectMessage: channelType === ChannelType.DM || !rawGuildId && !isGroupDm && channelType == null,
|
|
8530
|
+
isGroupDm,
|
|
8531
|
+
memberRoleIds: Array.isArray(interaction.rawData.member?.roles) ? interaction.rawData.member.roles.map((roleId) => roleId) : []
|
|
8532
|
+
};
|
|
8533
|
+
}
|
|
8534
|
+
//#endregion
|
|
8535
|
+
//#region extensions/discord/src/monitor/agent-components-dm-auth.ts
|
|
8536
|
+
async function ensureDmComponentAuthorized(params) {
|
|
8537
|
+
const { ctx, interaction, user, componentLabel, replyOpts } = params;
|
|
8538
|
+
const dmPolicy = ctx.dmPolicy ?? "pairing";
|
|
8539
|
+
if (dmPolicy === "disabled") {
|
|
8540
|
+
logVerbose(`agent ${componentLabel}: blocked (DM policy disabled)`);
|
|
8541
|
+
await replySilently(interaction, {
|
|
8542
|
+
content: "DM interactions are disabled.",
|
|
8543
|
+
...replyOpts
|
|
8544
|
+
});
|
|
8545
|
+
return false;
|
|
8546
|
+
}
|
|
8547
|
+
const access = await resolveDiscordDmCommandAccess({
|
|
8548
|
+
accountId: ctx.accountId,
|
|
8549
|
+
dmPolicy,
|
|
8550
|
+
configuredAllowFrom: ctx.allowFrom ?? [],
|
|
8551
|
+
sender: {
|
|
8552
|
+
id: user.id,
|
|
8553
|
+
name: user.username,
|
|
8554
|
+
tag: formatDiscordUserTag(user)
|
|
8555
|
+
},
|
|
8556
|
+
allowNameMatching: isDangerousNameMatchingEnabled(ctx.discordConfig),
|
|
8557
|
+
cfg: ctx.cfg,
|
|
8558
|
+
token: ctx.token,
|
|
8559
|
+
readStoreAllowFrom: async ({ accountId, dmPolicy: dmPolicyLocal }) => await readChannelIngressStoreAllowFromForDmPolicy({
|
|
8560
|
+
provider: "discord",
|
|
8561
|
+
accountId,
|
|
8562
|
+
dmPolicy: dmPolicyLocal
|
|
8563
|
+
}),
|
|
8564
|
+
eventKind: "button"
|
|
8565
|
+
});
|
|
8566
|
+
if (access.senderAccess.decision === "allow") return true;
|
|
8567
|
+
if (access.senderAccess.decision !== "pairing") {
|
|
8568
|
+
logVerbose(`agent ${componentLabel}: blocked DM user ${user.id} (not in allowFrom)`);
|
|
8569
|
+
await replySilently(interaction, {
|
|
8570
|
+
content: `You are not authorized to use this ${componentLabel}.`,
|
|
8571
|
+
...replyOpts
|
|
8572
|
+
});
|
|
8573
|
+
return false;
|
|
8574
|
+
}
|
|
8575
|
+
if (!(await createChannelPairingChallengeIssuer({
|
|
8576
|
+
channel: "discord",
|
|
8577
|
+
accountId: ctx.accountId,
|
|
8578
|
+
upsertPairingRequest: async ({ id, meta }) => {
|
|
8579
|
+
return await upsertChannelPairingRequest$1({
|
|
8580
|
+
channel: "discord",
|
|
8581
|
+
id,
|
|
8582
|
+
accountId: ctx.accountId,
|
|
8583
|
+
meta
|
|
8584
|
+
});
|
|
8585
|
+
}
|
|
8586
|
+
})({
|
|
8587
|
+
senderId: user.id,
|
|
8588
|
+
senderIdLine: `Your Discord user id: ${user.id}`,
|
|
8589
|
+
meta: {
|
|
8590
|
+
tag: formatDiscordUserTag(user),
|
|
8591
|
+
name: user.username
|
|
8592
|
+
},
|
|
8593
|
+
sendPairingReply: async (text) => {
|
|
8594
|
+
await interaction.reply({
|
|
8595
|
+
content: text,
|
|
8596
|
+
...replyOpts
|
|
8597
|
+
});
|
|
8598
|
+
}
|
|
8599
|
+
})).created) await replySilently(interaction, {
|
|
8600
|
+
content: "Pairing already requested. Ask the bot owner to approve your code.",
|
|
8601
|
+
...replyOpts
|
|
8602
|
+
});
|
|
8603
|
+
return false;
|
|
8604
|
+
}
|
|
8605
|
+
async function ensureGroupDmComponentAuthorized(params) {
|
|
8606
|
+
const { ctx, interaction, channelId, componentLabel, replyOpts } = params;
|
|
8607
|
+
if (!(ctx.discordConfig?.dm?.groupEnabled ?? false)) {
|
|
8608
|
+
logVerbose(`agent ${componentLabel}: blocked group dm ${channelId} (group DMs disabled)`);
|
|
8609
|
+
await replySilently(interaction, {
|
|
8610
|
+
content: "Group DM interactions are disabled.",
|
|
8611
|
+
...replyOpts
|
|
8612
|
+
});
|
|
8613
|
+
return false;
|
|
8614
|
+
}
|
|
8615
|
+
const channelCtx = resolveDiscordChannelContext(interaction);
|
|
8616
|
+
if (resolveGroupDmAllow({
|
|
8617
|
+
channels: ctx.discordConfig?.dm?.groupChannels,
|
|
8618
|
+
channelId,
|
|
8619
|
+
channelName: channelCtx.channelName,
|
|
8620
|
+
channelSlug: channelCtx.channelSlug
|
|
8621
|
+
})) return true;
|
|
8622
|
+
logVerbose(`agent ${componentLabel}: blocked group dm ${channelId} (not allowlisted)`);
|
|
8623
|
+
await replySilently(interaction, {
|
|
8624
|
+
content: `You are not authorized to use this ${componentLabel}.`,
|
|
8625
|
+
...replyOpts
|
|
8626
|
+
});
|
|
8627
|
+
return false;
|
|
8628
|
+
}
|
|
8629
|
+
async function resolveInteractionContextWithDmAuth(params) {
|
|
8630
|
+
const interactionCtx = await resolveComponentInteractionContext({
|
|
8631
|
+
interaction: params.interaction,
|
|
8632
|
+
label: params.label,
|
|
8633
|
+
defer: params.defer
|
|
8634
|
+
});
|
|
8635
|
+
if (!interactionCtx) return null;
|
|
8636
|
+
if (interactionCtx.isDirectMessage) {
|
|
8637
|
+
if (!await ensureDmComponentAuthorized({
|
|
8638
|
+
ctx: params.ctx,
|
|
8639
|
+
interaction: params.interaction,
|
|
8640
|
+
user: interactionCtx.user,
|
|
8641
|
+
componentLabel: params.componentLabel,
|
|
8642
|
+
replyOpts: interactionCtx.replyOpts
|
|
8643
|
+
})) return null;
|
|
8644
|
+
}
|
|
8645
|
+
if (interactionCtx.isGroupDm) {
|
|
8646
|
+
if (!await ensureGroupDmComponentAuthorized({
|
|
8647
|
+
ctx: params.ctx,
|
|
8648
|
+
interaction: params.interaction,
|
|
8649
|
+
channelId: interactionCtx.channelId,
|
|
8650
|
+
componentLabel: params.componentLabel,
|
|
8651
|
+
replyOpts: interactionCtx.replyOpts
|
|
8652
|
+
})) return null;
|
|
8653
|
+
}
|
|
8654
|
+
return interactionCtx;
|
|
8655
|
+
}
|
|
8656
|
+
//#endregion
|
|
8657
|
+
//#region extensions/discord/src/monitor/agent-components-guild-auth.ts
|
|
8658
|
+
function resolveComponentRuntimeGroupPolicy(ctx) {
|
|
8659
|
+
return resolveOpenProviderRuntimeGroupPolicy({
|
|
8660
|
+
providerConfigPresent: ctx.cfg.channels?.discord !== void 0,
|
|
8661
|
+
groupPolicy: ctx.discordConfig?.groupPolicy,
|
|
8662
|
+
defaultGroupPolicy: ctx.cfg.channels?.defaults?.groupPolicy
|
|
8663
|
+
}).groupPolicy;
|
|
8664
|
+
}
|
|
8665
|
+
async function ensureGuildComponentMemberAllowed(params) {
|
|
8666
|
+
const { interaction, guildInfo, channelId, rawGuildId, channelCtx, memberRoleIds, user, replyOpts, componentLabel, unauthorizedReply } = params;
|
|
8667
|
+
if (!rawGuildId) return true;
|
|
8668
|
+
const replyUnauthorized = async () => {
|
|
8669
|
+
await replySilently(interaction, {
|
|
8670
|
+
content: unauthorizedReply,
|
|
8671
|
+
...replyOpts
|
|
8672
|
+
});
|
|
8673
|
+
};
|
|
8674
|
+
const channelConfig = resolveDiscordChannelConfigWithFallback({
|
|
8675
|
+
guildInfo,
|
|
8676
|
+
channelId,
|
|
8677
|
+
channelName: channelCtx.channelName,
|
|
8678
|
+
channelSlug: channelCtx.channelSlug,
|
|
8679
|
+
parentId: channelCtx.parentId,
|
|
8680
|
+
parentName: channelCtx.parentName,
|
|
8681
|
+
parentSlug: channelCtx.parentSlug,
|
|
8682
|
+
scope: channelCtx.isThread ? "thread" : "channel"
|
|
8683
|
+
});
|
|
8684
|
+
if (channelConfig?.enabled === false) {
|
|
8685
|
+
await replyUnauthorized();
|
|
8686
|
+
return false;
|
|
8687
|
+
}
|
|
8688
|
+
const channelAllowlistConfigured = Boolean(guildInfo?.channels) && Object.keys(guildInfo?.channels ?? {}).length > 0;
|
|
8689
|
+
const channelAllowed = channelConfig?.allowed !== false;
|
|
8690
|
+
if (!isDiscordGroupAllowedByPolicy({
|
|
8691
|
+
groupPolicy: params.groupPolicy,
|
|
8692
|
+
guildAllowlisted: Boolean(guildInfo),
|
|
8693
|
+
channelAllowlistConfigured,
|
|
8694
|
+
channelAllowed
|
|
8695
|
+
})) {
|
|
8696
|
+
await replyUnauthorized();
|
|
8697
|
+
return false;
|
|
8698
|
+
}
|
|
8699
|
+
if (channelConfig?.allowed === false) {
|
|
8700
|
+
await replyUnauthorized();
|
|
8701
|
+
return false;
|
|
8702
|
+
}
|
|
8703
|
+
const { memberAllowed } = resolveDiscordMemberAccessState({
|
|
8704
|
+
channelConfig,
|
|
8705
|
+
guildInfo,
|
|
8706
|
+
memberRoleIds,
|
|
8707
|
+
sender: {
|
|
8708
|
+
id: user.id,
|
|
8709
|
+
name: user.username,
|
|
8710
|
+
tag: user.discriminator ? `${user.username}#${user.discriminator}` : void 0
|
|
8711
|
+
},
|
|
8712
|
+
allowNameMatching: params.allowNameMatching
|
|
8713
|
+
});
|
|
8714
|
+
if (memberAllowed) return true;
|
|
8715
|
+
logVerbose(`agent ${componentLabel}: blocked user ${user.id} (not in users/roles allowlist)`);
|
|
8716
|
+
await replyUnauthorized();
|
|
8717
|
+
return false;
|
|
8718
|
+
}
|
|
8719
|
+
async function ensureComponentUserAllowed(params) {
|
|
8720
|
+
const allowList = normalizeDiscordAllowList(params.entry.allowedUsers, [
|
|
8721
|
+
"discord:",
|
|
8722
|
+
"user:",
|
|
8723
|
+
"pk:"
|
|
8724
|
+
]);
|
|
8725
|
+
if (!allowList) return true;
|
|
8726
|
+
if (resolveDiscordAllowListMatch({
|
|
8727
|
+
allowList,
|
|
8728
|
+
candidate: {
|
|
8729
|
+
id: params.user.id,
|
|
8730
|
+
name: params.user.username,
|
|
8731
|
+
tag: formatDiscordUserTag(params.user)
|
|
8732
|
+
},
|
|
8733
|
+
allowNameMatching: params.allowNameMatching
|
|
8734
|
+
}).allowed) return true;
|
|
8735
|
+
logVerbose(`discord component ${params.componentLabel}: blocked user ${params.user.id} (not in allowedUsers)`);
|
|
8736
|
+
await replySilently(params.interaction, {
|
|
8737
|
+
content: params.unauthorizedReply,
|
|
8738
|
+
...params.replyOpts
|
|
8739
|
+
});
|
|
8740
|
+
return false;
|
|
8741
|
+
}
|
|
8742
|
+
async function ensureAgentComponentInteractionAllowed(params) {
|
|
8743
|
+
const guildInfo = resolveDiscordGuildEntry({
|
|
8744
|
+
guild: params.interaction.guild ?? void 0,
|
|
8745
|
+
guildId: params.rawGuildId,
|
|
8746
|
+
guildEntries: params.ctx.guildEntries
|
|
8747
|
+
});
|
|
8748
|
+
const channelCtx = resolveDiscordChannelContext(params.interaction);
|
|
8749
|
+
if (!await ensureGuildComponentMemberAllowed({
|
|
8750
|
+
interaction: params.interaction,
|
|
8751
|
+
guildInfo,
|
|
8752
|
+
channelId: params.channelId,
|
|
8753
|
+
rawGuildId: params.rawGuildId,
|
|
8754
|
+
channelCtx,
|
|
8755
|
+
memberRoleIds: params.memberRoleIds,
|
|
8756
|
+
user: params.user,
|
|
8757
|
+
replyOpts: params.replyOpts,
|
|
8758
|
+
componentLabel: params.componentLabel,
|
|
8759
|
+
unauthorizedReply: params.unauthorizedReply,
|
|
8760
|
+
allowNameMatching: isDangerousNameMatchingEnabled(params.ctx.discordConfig),
|
|
8761
|
+
groupPolicy: resolveComponentRuntimeGroupPolicy(params.ctx)
|
|
8762
|
+
})) return null;
|
|
8763
|
+
return { parentId: channelCtx.parentId };
|
|
8764
|
+
}
|
|
8765
|
+
async function resolveAuthorizedComponentInteraction(params) {
|
|
8766
|
+
const interactionCtx = await resolveInteractionContextWithDmAuth({
|
|
8767
|
+
ctx: params.ctx,
|
|
8768
|
+
interaction: params.interaction,
|
|
8769
|
+
label: params.label,
|
|
8770
|
+
componentLabel: params.componentLabel,
|
|
8771
|
+
defer: params.defer
|
|
8772
|
+
});
|
|
8773
|
+
if (!interactionCtx) return null;
|
|
8774
|
+
const { channelId, user, replyOpts, rawGuildId, memberRoleIds } = interactionCtx;
|
|
8775
|
+
const guildInfo = resolveDiscordGuildEntry({
|
|
8776
|
+
guild: params.interaction.guild ?? void 0,
|
|
8777
|
+
guildId: rawGuildId,
|
|
8778
|
+
guildEntries: params.ctx.guildEntries
|
|
8779
|
+
});
|
|
8780
|
+
const channelCtx = resolveDiscordChannelContext(params.interaction);
|
|
8781
|
+
const allowNameMatching = isDangerousNameMatchingEnabled(params.ctx.discordConfig);
|
|
8782
|
+
const channelConfig = resolveDiscordChannelConfigWithFallback({
|
|
8783
|
+
guildInfo,
|
|
8784
|
+
channelId,
|
|
8785
|
+
channelName: channelCtx.channelName,
|
|
8786
|
+
channelSlug: channelCtx.channelSlug,
|
|
8787
|
+
parentId: channelCtx.parentId,
|
|
8788
|
+
parentName: channelCtx.parentName,
|
|
8789
|
+
parentSlug: channelCtx.parentSlug,
|
|
8790
|
+
scope: channelCtx.isThread ? "thread" : "channel"
|
|
8791
|
+
});
|
|
8792
|
+
if (!await ensureGuildComponentMemberAllowed({
|
|
8793
|
+
interaction: params.interaction,
|
|
8794
|
+
guildInfo,
|
|
8795
|
+
channelId,
|
|
8796
|
+
rawGuildId,
|
|
8797
|
+
channelCtx,
|
|
8798
|
+
memberRoleIds,
|
|
8799
|
+
user,
|
|
8800
|
+
replyOpts,
|
|
8801
|
+
componentLabel: params.componentLabel,
|
|
8802
|
+
unauthorizedReply: params.unauthorizedReply,
|
|
8803
|
+
allowNameMatching,
|
|
8804
|
+
groupPolicy: resolveComponentRuntimeGroupPolicy(params.ctx)
|
|
8805
|
+
})) return null;
|
|
8806
|
+
return {
|
|
8807
|
+
interactionCtx,
|
|
8808
|
+
channelCtx,
|
|
8809
|
+
guildInfo,
|
|
8810
|
+
channelConfig,
|
|
8811
|
+
allowNameMatching,
|
|
8812
|
+
commandAuthorized: await resolveComponentCommandAuthorized({
|
|
8813
|
+
ctx: params.ctx,
|
|
8814
|
+
interactionCtx,
|
|
8815
|
+
channelConfig,
|
|
8816
|
+
guildInfo,
|
|
8817
|
+
allowNameMatching
|
|
8818
|
+
}),
|
|
8819
|
+
user,
|
|
8820
|
+
replyOpts
|
|
8713
8821
|
};
|
|
8714
8822
|
}
|
|
8715
|
-
async function
|
|
8716
|
-
const
|
|
8717
|
-
if (
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8823
|
+
async function resolveComponentCommandAuthorized(params) {
|
|
8824
|
+
const { ctx, interactionCtx, channelConfig, guildInfo } = params;
|
|
8825
|
+
if (interactionCtx.isDirectMessage) return true;
|
|
8826
|
+
const { ownerAllowList, ownerAllowed: ownerOk } = resolveDiscordOwnerAccess({
|
|
8827
|
+
allowFrom: ctx.allowFrom,
|
|
8828
|
+
sender: {
|
|
8829
|
+
id: interactionCtx.user.id,
|
|
8830
|
+
name: interactionCtx.user.username,
|
|
8831
|
+
tag: formatDiscordUserTag(interactionCtx.user)
|
|
8832
|
+
},
|
|
8833
|
+
allowNameMatching: params.allowNameMatching
|
|
8834
|
+
});
|
|
8835
|
+
const { hasAccessRestrictions, memberAllowed } = resolveDiscordMemberAccessState({
|
|
8836
|
+
channelConfig,
|
|
8837
|
+
guildInfo,
|
|
8838
|
+
memberRoleIds: interactionCtx.memberRoleIds,
|
|
8839
|
+
sender: {
|
|
8840
|
+
id: interactionCtx.user.id,
|
|
8841
|
+
name: interactionCtx.user.username,
|
|
8842
|
+
tag: formatDiscordUserTag(interactionCtx.user)
|
|
8843
|
+
},
|
|
8844
|
+
allowNameMatching: params.allowNameMatching
|
|
8845
|
+
});
|
|
8846
|
+
return resolveCommandAuthorizedFromAuthorizers({
|
|
8847
|
+
useAccessGroups: true,
|
|
8848
|
+
authorizers: [{
|
|
8849
|
+
configured: ownerAllowList != null,
|
|
8850
|
+
allowed: ownerOk
|
|
8851
|
+
}, {
|
|
8852
|
+
configured: hasAccessRestrictions,
|
|
8853
|
+
allowed: memberAllowed
|
|
8854
|
+
}],
|
|
8855
|
+
modeWhenAccessGroupsOff: "configured"
|
|
8721
8856
|
});
|
|
8722
|
-
return false;
|
|
8723
|
-
}
|
|
8724
|
-
function createDiscordVoiceCommand(params) {
|
|
8725
|
-
const resolveSessionChannelId = (manager, guildId) => manager.status().find((entry) => entry.guildId === guildId)?.channelId;
|
|
8726
|
-
class JoinCommand extends Command {
|
|
8727
|
-
constructor(..._args) {
|
|
8728
|
-
super(..._args);
|
|
8729
|
-
this.name = "join";
|
|
8730
|
-
this.description = "Join a voice channel";
|
|
8731
|
-
this.defer = true;
|
|
8732
|
-
this.ephemeral = params.ephemeralDefault;
|
|
8733
|
-
this.options = [{
|
|
8734
|
-
name: "channel",
|
|
8735
|
-
description: "Voice channel to join",
|
|
8736
|
-
type: ApplicationCommandOptionType.Channel,
|
|
8737
|
-
required: true,
|
|
8738
|
-
channel_types: VOICE_CHANNEL_TYPES
|
|
8739
|
-
}];
|
|
8740
|
-
}
|
|
8741
|
-
async run(interaction) {
|
|
8742
|
-
const channel = await interaction.options.getChannel("channel", true);
|
|
8743
|
-
if (!channel || !("id" in channel)) {
|
|
8744
|
-
await interaction.reply({
|
|
8745
|
-
content: "Voice channel not found.",
|
|
8746
|
-
ephemeral: true
|
|
8747
|
-
});
|
|
8748
|
-
return;
|
|
8749
|
-
}
|
|
8750
|
-
const access = await authorizeVoiceCommand(interaction, params, { channelOverride: {
|
|
8751
|
-
id: channel.id,
|
|
8752
|
-
name: resolveDiscordChannelNameSafe(channel)
|
|
8753
|
-
} });
|
|
8754
|
-
if (!access.ok) {
|
|
8755
|
-
await interaction.reply({
|
|
8756
|
-
content: access.message ?? "Not authorized.",
|
|
8757
|
-
ephemeral: true
|
|
8758
|
-
});
|
|
8759
|
-
return;
|
|
8760
|
-
}
|
|
8761
|
-
if (!isVoiceChannelType(channel.type)) {
|
|
8762
|
-
await interaction.reply({
|
|
8763
|
-
content: "That is not a voice channel.",
|
|
8764
|
-
ephemeral: true
|
|
8765
|
-
});
|
|
8766
|
-
return;
|
|
8767
|
-
}
|
|
8768
|
-
const guildId = access.guildId ?? ("guildId" in channel ? channel.guildId : void 0);
|
|
8769
|
-
if (!guildId) {
|
|
8770
|
-
await interaction.reply({
|
|
8771
|
-
content: "Unable to resolve guild for this voice channel.",
|
|
8772
|
-
ephemeral: true
|
|
8773
|
-
});
|
|
8774
|
-
return;
|
|
8775
|
-
}
|
|
8776
|
-
const manager = params.getManager();
|
|
8777
|
-
if (!manager) {
|
|
8778
|
-
await interaction.reply({
|
|
8779
|
-
content: "Voice manager is not available yet.",
|
|
8780
|
-
ephemeral: true
|
|
8781
|
-
});
|
|
8782
|
-
return;
|
|
8783
|
-
}
|
|
8784
|
-
const result = await manager.join({
|
|
8785
|
-
guildId,
|
|
8786
|
-
channelId: channel.id
|
|
8787
|
-
});
|
|
8788
|
-
await interaction.reply({
|
|
8789
|
-
content: result.message,
|
|
8790
|
-
ephemeral: true
|
|
8791
|
-
});
|
|
8792
|
-
}
|
|
8793
|
-
}
|
|
8794
|
-
class LeaveCommand extends Command {
|
|
8795
|
-
constructor(..._args2) {
|
|
8796
|
-
super(..._args2);
|
|
8797
|
-
this.name = "leave";
|
|
8798
|
-
this.description = "Leave the current voice channel";
|
|
8799
|
-
this.defer = true;
|
|
8800
|
-
this.ephemeral = params.ephemeralDefault;
|
|
8801
|
-
}
|
|
8802
|
-
async run(interaction) {
|
|
8803
|
-
const runtimeContext = await resolveVoiceCommandRuntimeContext(interaction, params);
|
|
8804
|
-
if (!runtimeContext) return;
|
|
8805
|
-
const sessionChannelId = resolveSessionChannelId(runtimeContext.manager, runtimeContext.guildId);
|
|
8806
|
-
if (!await ensureVoiceCommandAccess({
|
|
8807
|
-
interaction,
|
|
8808
|
-
context: params,
|
|
8809
|
-
channelOverride: sessionChannelId ? { id: sessionChannelId } : void 0
|
|
8810
|
-
})) return;
|
|
8811
|
-
const result = await runtimeContext.manager.leave({ guildId: runtimeContext.guildId });
|
|
8812
|
-
await interaction.reply({
|
|
8813
|
-
content: result.message,
|
|
8814
|
-
ephemeral: true
|
|
8815
|
-
});
|
|
8816
|
-
}
|
|
8817
|
-
}
|
|
8818
|
-
class StatusCommand extends Command {
|
|
8819
|
-
constructor(..._args3) {
|
|
8820
|
-
super(..._args3);
|
|
8821
|
-
this.name = "status";
|
|
8822
|
-
this.description = "Show active voice sessions";
|
|
8823
|
-
this.defer = true;
|
|
8824
|
-
this.ephemeral = params.ephemeralDefault;
|
|
8825
|
-
}
|
|
8826
|
-
async run(interaction) {
|
|
8827
|
-
const runtimeContext = await resolveVoiceCommandRuntimeContext(interaction, params);
|
|
8828
|
-
if (!runtimeContext) return;
|
|
8829
|
-
const sessions = runtimeContext.manager.status().filter((entry) => entry.guildId === runtimeContext.guildId);
|
|
8830
|
-
const sessionChannelId = sessions[0]?.channelId;
|
|
8831
|
-
if (!await ensureVoiceCommandAccess({
|
|
8832
|
-
interaction,
|
|
8833
|
-
context: params,
|
|
8834
|
-
channelOverride: sessionChannelId ? { id: sessionChannelId } : void 0
|
|
8835
|
-
})) return;
|
|
8836
|
-
if (sessions.length === 0) {
|
|
8837
|
-
await interaction.reply({
|
|
8838
|
-
content: "No active voice sessions.",
|
|
8839
|
-
ephemeral: true
|
|
8840
|
-
});
|
|
8841
|
-
return;
|
|
8842
|
-
}
|
|
8843
|
-
const lines = sessions.map((entry) => `• ${formatMention({ channelId: entry.channelId })} (guild ${entry.guildId})`);
|
|
8844
|
-
await interaction.reply({
|
|
8845
|
-
content: lines.join("\n"),
|
|
8846
|
-
ephemeral: true
|
|
8847
|
-
});
|
|
8848
|
-
}
|
|
8849
|
-
}
|
|
8850
|
-
return new class extends CommandWithSubcommands {
|
|
8851
|
-
constructor(..._args4) {
|
|
8852
|
-
super(..._args4);
|
|
8853
|
-
this.name = "vc";
|
|
8854
|
-
this.description = "Voice channel controls";
|
|
8855
|
-
this.subcommands = [
|
|
8856
|
-
new JoinCommand(),
|
|
8857
|
-
new LeaveCommand(),
|
|
8858
|
-
new StatusCommand()
|
|
8859
|
-
];
|
|
8860
|
-
}
|
|
8861
|
-
}();
|
|
8862
|
-
}
|
|
8863
|
-
function isVoiceChannelType(type) {
|
|
8864
|
-
return type === ChannelType.GuildVoice || type === ChannelType.GuildStageVoice;
|
|
8865
8857
|
}
|
|
8866
8858
|
//#endregion
|
|
8867
8859
|
//#region extensions/discord/src/monitor/agent-components-data.ts
|
|
@@ -9070,6 +9062,10 @@ function formatDiscordReplyDeliveryFailure(params) {
|
|
|
9070
9062
|
const context = [`target=${params.target}`, params.sessionKey ? `session=${params.sessionKey}` : void 0].filter(Boolean).join(" ");
|
|
9071
9063
|
return `discord ${params.kind} reply failed (${context}): ${String(params.err)}`;
|
|
9072
9064
|
}
|
|
9065
|
+
function formatDiscordReplySkip(params) {
|
|
9066
|
+
const context = [`target=${params.target}`, params.sessionKey ? `session=${params.sessionKey}` : void 0].filter(Boolean).join(" ");
|
|
9067
|
+
return `discord ${params.kind} reply skipped (${params.reason}): ${context}`;
|
|
9068
|
+
}
|
|
9073
9069
|
function resolveTargetChannelId(target) {
|
|
9074
9070
|
if (!target.startsWith("channel:")) return;
|
|
9075
9071
|
return target.slice(8).trim() || void 0;
|
|
@@ -9174,7 +9170,7 @@ async function deliverDiscordReply(params) {
|
|
|
9174
9170
|
//#endregion
|
|
9175
9171
|
//#region extensions/discord/src/monitor/agent-components.dispatch.ts
|
|
9176
9172
|
const loadConversationRuntime$1 = createLazyRuntimeModule(() => import("./agent-components.runtime-CEPrf2SY.js"));
|
|
9177
|
-
const loadTypingRuntime = createLazyRuntimeModule(() => import("./typing-
|
|
9173
|
+
const loadTypingRuntime = createLazyRuntimeModule(() => import("./typing-Ci9nhuSi.js").then((n) => n.n));
|
|
9178
9174
|
function buildDiscordComponentConversationLabel(params) {
|
|
9179
9175
|
if (params.interactionCtx.isDirectMessage) return buildDirectLabel(params.interactionCtx.user);
|
|
9180
9176
|
if (params.interactionCtx.isGroupDm) return `Group DM #${params.channelCtx.channelName ?? params.interactionCtx.channelId} channel id:${params.interactionCtx.channelId}`;
|
|
@@ -9283,7 +9279,7 @@ async function dispatchDiscordComponentEvent(params) {
|
|
|
9283
9279
|
previousTimestamp,
|
|
9284
9280
|
envelope: envelopeOptions
|
|
9285
9281
|
});
|
|
9286
|
-
const { createReplyReferencePlanner,
|
|
9282
|
+
const { createReplyReferencePlanner, finalizeInboundContext, resolveChunkMode, resolveTextChunkLimit } = await (async () => {
|
|
9287
9283
|
return { ...await loadConversationRuntime$1() };
|
|
9288
9284
|
})();
|
|
9289
9285
|
const ctxPayload = finalizeInboundContext({
|
|
@@ -9359,12 +9355,11 @@ async function dispatchDiscordComponentEvent(params) {
|
|
|
9359
9355
|
cfg: ctx.cfg,
|
|
9360
9356
|
channel: "discord",
|
|
9361
9357
|
accountId,
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9358
|
+
route: {
|
|
9359
|
+
agentId,
|
|
9360
|
+
sessionKey
|
|
9361
|
+
},
|
|
9365
9362
|
ctxPayload,
|
|
9366
|
-
recordInboundSession,
|
|
9367
|
-
dispatchReplyWithBufferedBlockDispatcher,
|
|
9368
9363
|
record: {
|
|
9369
9364
|
updateLastRoute: interactionCtx.isDirectMessage ? {
|
|
9370
9365
|
sessionKey: inboundLastRouteSessionKey,
|
|
@@ -9587,7 +9582,7 @@ async function dispatchPluginDiscordInteractiveEvent(params) {
|
|
|
9587
9582
|
}
|
|
9588
9583
|
//#endregion
|
|
9589
9584
|
//#region extensions/discord/src/monitor/agent-components.handlers.ts
|
|
9590
|
-
const loadComponentsRuntime = createLazyRuntimeModule(() => import("./outbound-session-route-
|
|
9585
|
+
const loadComponentsRuntime = createLazyRuntimeModule(() => import("./outbound-session-route-D_nc_Ayk.js").then((n) => n.n));
|
|
9591
9586
|
async function handleDiscordComponentEvent(params) {
|
|
9592
9587
|
const parsed = parseDiscordComponentData(params.data, resolveInteractionCustomId(params.interaction));
|
|
9593
9588
|
if (!parsed) {
|
|
@@ -10276,6 +10271,74 @@ function createDiscordExecApprovalButtonContext(params) {
|
|
|
10276
10271
|
};
|
|
10277
10272
|
}
|
|
10278
10273
|
//#endregion
|
|
10274
|
+
//#region extensions/discord/src/monitor/questions.ts
|
|
10275
|
+
var QuestionButton = class extends Button {
|
|
10276
|
+
constructor(ctx) {
|
|
10277
|
+
super();
|
|
10278
|
+
this.ctx = ctx;
|
|
10279
|
+
this.label = "question";
|
|
10280
|
+
this.customId = "ocq:id=seed;i=0";
|
|
10281
|
+
this.style = ButtonStyle.Primary;
|
|
10282
|
+
}
|
|
10283
|
+
async run(interaction, data) {
|
|
10284
|
+
const callback = parseDiscordQuestionData(data);
|
|
10285
|
+
if (!callback) {
|
|
10286
|
+
await interaction.reply({
|
|
10287
|
+
content: "This question is no longer valid.",
|
|
10288
|
+
ephemeral: true
|
|
10289
|
+
});
|
|
10290
|
+
return;
|
|
10291
|
+
}
|
|
10292
|
+
if (!await this.ctx.authorizeQuestion(interaction)) return;
|
|
10293
|
+
try {
|
|
10294
|
+
await interaction.acknowledge();
|
|
10295
|
+
} catch {}
|
|
10296
|
+
let result;
|
|
10297
|
+
try {
|
|
10298
|
+
result = await this.ctx.resolveQuestion({
|
|
10299
|
+
cfg: this.ctx.cfg,
|
|
10300
|
+
questionId: callback.questionId,
|
|
10301
|
+
optionIndex: callback.optionIndex,
|
|
10302
|
+
senderId: interaction.userId,
|
|
10303
|
+
clientDisplayName: `Discord question (${this.ctx.accountId})`
|
|
10304
|
+
});
|
|
10305
|
+
} catch {
|
|
10306
|
+
try {
|
|
10307
|
+
await interaction.followUp({
|
|
10308
|
+
content: "Could not submit this answer.",
|
|
10309
|
+
ephemeral: true
|
|
10310
|
+
});
|
|
10311
|
+
} catch {}
|
|
10312
|
+
return;
|
|
10313
|
+
}
|
|
10314
|
+
try {
|
|
10315
|
+
await interaction.followUp({
|
|
10316
|
+
content: result.status === "answered" ? "Answer submitted." : "This question was already answered.",
|
|
10317
|
+
ephemeral: true
|
|
10318
|
+
});
|
|
10319
|
+
} catch {}
|
|
10320
|
+
}
|
|
10321
|
+
};
|
|
10322
|
+
function createDiscordQuestionButton(params) {
|
|
10323
|
+
const authContext = params.authContext ?? {
|
|
10324
|
+
cfg: params.cfg,
|
|
10325
|
+
accountId: params.accountId
|
|
10326
|
+
};
|
|
10327
|
+
return new QuestionButton({
|
|
10328
|
+
cfg: params.cfg,
|
|
10329
|
+
accountId: params.accountId,
|
|
10330
|
+
resolveQuestion: params.resolveQuestion ?? questionGatewayRuntime.resolveOption,
|
|
10331
|
+
authorizeQuestion: params.authorizeQuestion ?? (async (interaction) => Boolean(await resolveAuthorizedComponentInteraction({
|
|
10332
|
+
ctx: authContext,
|
|
10333
|
+
interaction,
|
|
10334
|
+
label: "discord question",
|
|
10335
|
+
componentLabel: "button",
|
|
10336
|
+
unauthorizedReply: "You are not authorized to answer this question.",
|
|
10337
|
+
defer: false
|
|
10338
|
+
})))
|
|
10339
|
+
});
|
|
10340
|
+
}
|
|
10341
|
+
//#endregion
|
|
10279
10342
|
//#region extensions/discord/src/monitor/provider.interactions.ts
|
|
10280
10343
|
function createDiscordProviderInteractionSurface(params) {
|
|
10281
10344
|
const createNativeCommand = params.createNativeCommand ?? createDiscordNativeCommand;
|
|
@@ -10320,6 +10383,20 @@ function createDiscordProviderInteractionSurface(params) {
|
|
|
10320
10383
|
abortSignal: params.abortSignal
|
|
10321
10384
|
});
|
|
10322
10385
|
const components = [
|
|
10386
|
+
createDiscordQuestionButton({
|
|
10387
|
+
cfg: params.cfg,
|
|
10388
|
+
accountId: params.accountId,
|
|
10389
|
+
authContext: {
|
|
10390
|
+
cfg: params.cfg,
|
|
10391
|
+
accountId: params.accountId,
|
|
10392
|
+
discordConfig: params.discordConfig,
|
|
10393
|
+
runtime: params.runtime,
|
|
10394
|
+
token: params.token,
|
|
10395
|
+
guildEntries: params.guildEntries,
|
|
10396
|
+
allowFrom: params.allowFrom,
|
|
10397
|
+
dmPolicy: params.dmPolicy
|
|
10398
|
+
}
|
|
10399
|
+
}),
|
|
10323
10400
|
createDiscordCommandArgFallbackButton({
|
|
10324
10401
|
cfg: params.cfg,
|
|
10325
10402
|
discordConfig: params.discordConfig,
|
|
@@ -10454,8 +10531,7 @@ async function createDiscordMonitorClient(params) {
|
|
|
10454
10531
|
const constructorPlugins = voicePlugin ? clientPlugins.filter((plugin) => plugin !== voicePlugin) : clientPlugins;
|
|
10455
10532
|
const eventQueueOpts = {
|
|
10456
10533
|
listenerTimeout: 12e4,
|
|
10457
|
-
slowListenerThreshold: 3e4
|
|
10458
|
-
...params.discordConfig.eventQueue
|
|
10534
|
+
slowListenerThreshold: 3e4
|
|
10459
10535
|
};
|
|
10460
10536
|
const readyListener = createDiscordStatusReadyListener({
|
|
10461
10537
|
discordConfig: params.discordConfig,
|
|
@@ -10667,8 +10743,6 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
10667
10743
|
if (!token) throw new Error(`Discord bot token missing for account "${account.accountId}" (set discord.accounts.${account.accountId}.token or DISCORD_BOT_TOKEN for default).`);
|
|
10668
10744
|
const runtime = opts.runtime ?? createNonExitingRuntime();
|
|
10669
10745
|
const rawDiscordCfg = account.config;
|
|
10670
|
-
const discordRootThreadBindings = cfg.channels?.discord?.threadBindings;
|
|
10671
|
-
const discordAccountThreadBindings = cfg.channels?.discord?.accounts?.[account.accountId]?.threadBindings;
|
|
10672
10746
|
const discordRestFetch = resolveDiscordRestFetch(rawDiscordCfg.proxy, runtime);
|
|
10673
10747
|
const dmConfig = rawDiscordCfg.dm;
|
|
10674
10748
|
const configuredDmAllowFrom = resolveDiscordAccountAllowFrom({
|
|
@@ -10705,15 +10779,15 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
10705
10779
|
}) ?? "pairing";
|
|
10706
10780
|
const discordProviderSessionRuntime = await discordProviderRuntime.loadDiscordProviderSessionRuntime();
|
|
10707
10781
|
const threadBindingIdleTimeoutMs = discordProviderSessionRuntime.resolveThreadBindingIdleTimeoutMs({
|
|
10708
|
-
channelIdleHoursRaw:
|
|
10782
|
+
channelIdleHoursRaw: discordCfg.threadBindings?.idleHours,
|
|
10709
10783
|
sessionIdleHoursRaw: cfg.session?.threadBindings?.idleHours
|
|
10710
10784
|
});
|
|
10711
10785
|
const threadBindingMaxAgeMs = discordProviderSessionRuntime.resolveThreadBindingMaxAgeMs({
|
|
10712
|
-
channelMaxAgeHoursRaw:
|
|
10786
|
+
channelMaxAgeHoursRaw: discordCfg.threadBindings?.maxAgeHours,
|
|
10713
10787
|
sessionMaxAgeHoursRaw: cfg.session?.threadBindings?.maxAgeHours
|
|
10714
10788
|
});
|
|
10715
10789
|
const threadBindingsEnabled = discordProviderSessionRuntime.resolveThreadBindingsEnabled({
|
|
10716
|
-
channelEnabledRaw:
|
|
10790
|
+
channelEnabledRaw: discordCfg.threadBindings?.enabled,
|
|
10717
10791
|
sessionEnabledRaw: cfg.session?.threadBindings?.enabled
|
|
10718
10792
|
});
|
|
10719
10793
|
const groupDmEnabled = dmConfig?.groupEnabled ?? false;
|
|
@@ -10728,7 +10802,7 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
10728
10802
|
providerSetting: discordCfg.commands?.nativeSkills,
|
|
10729
10803
|
globalSetting: cfg.commands?.nativeSkills
|
|
10730
10804
|
});
|
|
10731
|
-
const useAccessGroups =
|
|
10805
|
+
const useAccessGroups = true;
|
|
10732
10806
|
const slashCommand = resolveDiscordSlashCommandConfig(discordCfg.slashCommand);
|
|
10733
10807
|
const sessionPrefix = "discord:slash";
|
|
10734
10808
|
const ephemeralDefault = slashCommand.ephemeral;
|
|
@@ -10821,7 +10895,6 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
10821
10895
|
let earlyGatewayEmitter = gatewaySupervisor?.emitter;
|
|
10822
10896
|
let onEarlyGatewayDebug;
|
|
10823
10897
|
try {
|
|
10824
|
-
if (nativeEnabled && commandSpecs.some((command) => command.name === "think")) loadModelCatalog({ config: cfg });
|
|
10825
10898
|
const { commands, components, modals } = createDiscordProviderInteractionSurface({
|
|
10826
10899
|
cfg,
|
|
10827
10900
|
discordConfig: discordCfg,
|
|
@@ -10915,7 +10988,7 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
10915
10988
|
runtime,
|
|
10916
10989
|
botUserId
|
|
10917
10990
|
});
|
|
10918
|
-
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-
|
|
10991
|
+
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-CyJ-sc3n.js").then((n) => n.n);
|
|
10919
10992
|
setDiscordTranscriptsVoiceManager({
|
|
10920
10993
|
accountId: account.accountId,
|
|
10921
10994
|
manager: voiceManager
|
|
@@ -10927,6 +11000,7 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
10927
11000
|
registerDiscordListener(client.listeners, new DiscordVoiceStateUpdateListener(voiceManager));
|
|
10928
11001
|
}
|
|
10929
11002
|
const messageHandler = discordProviderSessionRuntime.createDiscordMessageHandler({
|
|
11003
|
+
client,
|
|
10930
11004
|
cfg,
|
|
10931
11005
|
discordConfig: discordCfg,
|
|
10932
11006
|
accountId: account.accountId,
|
|
@@ -11001,12 +11075,10 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
11001
11075
|
voiceManager,
|
|
11002
11076
|
voiceManagerRef,
|
|
11003
11077
|
threadBindings,
|
|
11004
|
-
gatewaySupervisor
|
|
11005
|
-
gatewayReadyTimeoutMs: account.config.gatewayReadyTimeoutMs,
|
|
11006
|
-
gatewayRuntimeReadyTimeoutMs: account.config.gatewayRuntimeReadyTimeoutMs
|
|
11078
|
+
gatewaySupervisor
|
|
11007
11079
|
});
|
|
11008
11080
|
} finally {
|
|
11009
|
-
cleanupDiscordProviderStartup({
|
|
11081
|
+
await cleanupDiscordProviderStartup({
|
|
11010
11082
|
deactivateMessageHandler,
|
|
11011
11083
|
autoPresenceController,
|
|
11012
11084
|
setStatus: opts.setStatus,
|
|
@@ -11021,4 +11093,4 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
11021
11093
|
}
|
|
11022
11094
|
}
|
|
11023
11095
|
//#endregion
|
|
11024
|
-
export {
|
|
11096
|
+
export { sanitizeDiscordThreadName as A, handleDiscordDmCommandDecision as C, resolveDiscordAutoThreadReplyPlan as D, threading_exports as E, resolveDiscordTextCommandAccess as M, resolveDiscordReplyTarget as O, shouldIgnoreStaleDiscordRouteBinding as S, registerDiscordListener as T, buildDiscordInboundAccessContext as _, sanitizeDiscordFrontChannelReplyPayloads as a, resolveDiscordConversationRoute as b, resolveReplyContext as c, createDiscordGatewayPlugin as d, resolveDiscordGatewayIntents as f, buildDiscordGroupSystemPrompt as g, createDiscordNativeCommand as h, formatDiscordReplySkip as i, resolveDiscordDmCommandAccess as j, resolveDiscordThreadStarter as k, resolveDiscordVoiceAccess as l, resolveDiscordVoiceEnabled as m, deliverDiscordReply as n, buildDirectLabel as o, waitForDiscordGatewayPluginRegistration as p, formatDiscordReplyDeliveryFailure as r, buildGuildLabel as s, monitorDiscordProvider as t, authorizeDiscordVoiceIngress as u, createDiscordSupplementalContextAccessChecker as v, mapGatewayDispatchData as w, resolveDiscordEffectiveRoute as x, buildDiscordRoutePeer as y };
|