@openclaw/slack 2026.7.1-beta.1 → 2026.7.1-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-DOtQbKkB.js → account-inspect-Di7ditqZ.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-BPCiCe8y.js → accounts-BOJJiHSr.js} +14 -1
- package/dist/accounts.runtime-DWvaCb-X.js +2 -0
- package/dist/{action-runtime-BLu039dd.js → action-runtime-DoQGk_8D.js} +37 -40
- package/dist/action-runtime.runtime-BABj3aM-.js +2 -0
- package/dist/{actions-CqRHPciJ.js → actions-DMpDmKEA.js} +211 -57
- package/dist/actions.runtime-C103_BPW.js +2 -0
- package/dist/api.js +13 -13
- package/dist/{approval-handler.runtime-BqNO_HC_.js → approval-handler.runtime-CIUbOt5T.js} +2 -2
- package/dist/{channel-DjNY4ik7.js → channel-CG29WLVd.js} +198 -111
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-CDOZ8V3p.js → channel.setup-Dq6syTNU.js} +3 -3
- package/dist/{client-DG9cyk55.js → client-DGxwSL7f.js} +0 -1
- package/dist/{directory-config-DDVHDmrN.js → directory-config-BZuS8141.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DC-YA5SQ.js → directory-live-BNsxCgqP.js} +2 -2
- package/dist/format-YCNoNkM2.js +107 -0
- package/dist/http-routes-api.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{interactive-replies-D-22gTp3.js → interactive-replies-CXpT-vA_.js} +13 -2
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api--zYyTqrR.js → message-tool-api-BgWKyu2r.js} +11 -4
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Cf50drfK.js → monitor-D6Km2CFH.js} +3 -3
- package/dist/outbound-adapter-DVoBfBW5.js +272 -0
- package/dist/{pipeline.runtime-BKICBY52.js → pipeline.runtime-0wEFX2CS.js} +185 -268
- package/dist/{plugin-routes-B9PvcDQJ.js → plugin-routes-CLp4obpN.js} +1 -1
- package/dist/{policy-DAE6BTN3.js → policy-Dj-puVPb.js} +10 -4
- package/dist/{probe-DFKt9Ute.js → probe-CuwRDE5j.js} +10 -4
- package/dist/{provider-DOZHzRWi.js → provider-Cot8h818.js} +199 -154
- package/dist/{relay-source-BpBIUaF8.js → relay-source-CU1LhyBj.js} +2 -2
- package/dist/{replies-CMZq3Lcb.js → replies-Bbx6pG_B.js} +4 -3
- package/dist/{reply-blocks-CfJqf7eq.js → reply-blocks-BGQ6zSqM.js} +184 -36
- package/dist/{resolve-channels-eniB45fy.js → resolve-channels-CstkChBE.js} +1 -1
- package/dist/{resolve-users-DDKzl37a.js → resolve-users-C3NP2c-Q.js} +1 -1
- package/dist/{runtime-api-DHJ8ntLr.js → runtime-api-CEmqYxR-.js} +1 -1
- package/dist/runtime-api.js +12 -12
- package/dist/{scopes-BdVdJxFf.js → scopes-DCWVD5-8.js} +2 -2
- package/dist/{send-Dg6U9K7_.js → send-DKDXoeoV.js} +392 -225
- package/dist/send.runtime-GPRa63l1.js +2 -0
- package/dist/{setup-core-BCGzyZhx.js → setup-core-fGd6Gquy.js} +4 -3
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-D7xdZLxB.js → setup-surface-Dv2fIJNB.js} +5 -5
- package/dist/{shared-iMaNxOIL.js → shared-CosfcFri.js} +5 -5
- package/dist/{slash-dispatch.runtime-C-1pDqWi.js → slash-dispatch.runtime-Ccm3quU1.js} +1 -1
- package/node_modules/@slack/web-api/dist/chat-stream.d.ts +6 -0
- package/node_modules/@slack/web-api/dist/chat-stream.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/chat-stream.js +8 -0
- package/node_modules/@slack/web-api/dist/chat-stream.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/assistant.d.ts +1 -1
- package/node_modules/@slack/web-api/dist/types/request/assistant.d.ts.map +1 -1
- package/node_modules/@slack/web-api/package.json +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/assert/strict.d.ts +10 -1
- package/node_modules/@types/node/assert.d.ts +144 -17
- package/node_modules/@types/node/async_hooks.d.ts +9 -9
- package/node_modules/@types/node/buffer.d.ts +64 -30
- package/node_modules/@types/node/child_process.d.ts +17 -21
- package/node_modules/@types/node/cluster.d.ts +13 -13
- package/node_modules/@types/node/console.d.ts +1 -1
- package/node_modules/@types/node/crypto.d.ts +471 -575
- package/node_modules/@types/node/diagnostics_channel.d.ts +274 -32
- package/node_modules/@types/node/dns.d.ts +15 -15
- package/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/node/ffi.d.ts +486 -0
- package/node_modules/@types/node/fs/promises.d.ts +7 -4
- package/node_modules/@types/node/fs.d.ts +24 -18
- package/node_modules/@types/node/globals.d.ts +4 -4
- package/node_modules/@types/node/http.d.ts +30 -5
- package/node_modules/@types/node/http2.d.ts +2 -1
- package/node_modules/@types/node/index.d.ts +1 -3
- package/node_modules/@types/node/inspector.d.ts +1 -1
- package/node_modules/@types/node/module.d.ts +16 -45
- package/node_modules/@types/node/net.d.ts +1 -1
- package/node_modules/@types/node/os.d.ts +2 -2
- package/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/node/perf_hooks.d.ts +1 -9
- package/node_modules/@types/node/process.d.ts +25 -12
- package/node_modules/@types/node/quic.d.ts +92 -11
- package/node_modules/@types/node/readline.d.ts +12 -11
- package/node_modules/@types/node/repl.d.ts +10 -10
- package/node_modules/@types/node/sqlite.d.ts +56 -1
- package/node_modules/@types/node/stream/iter.d.ts +150 -0
- package/node_modules/@types/node/stream/promises.d.ts +2 -2
- package/node_modules/@types/node/stream/web.d.ts +1 -1
- package/node_modules/@types/node/stream.d.ts +37 -5
- package/node_modules/@types/node/test/reporters.d.ts +1 -1
- package/node_modules/@types/node/test.d.ts +120 -10
- package/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/@types/node/ts5.6/index.d.ts +2 -4
- package/node_modules/@types/node/ts5.7/index.d.ts +1 -3
- package/node_modules/@types/node/url.d.ts +3 -3
- package/node_modules/@types/node/util/types.d.ts +1 -1
- package/node_modules/@types/node/util.d.ts +22 -22
- package/node_modules/@types/node/v8.d.ts +85 -3
- package/node_modules/@types/node/vm.d.ts +9 -9
- package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
- package/node_modules/@types/node/worker_threads.d.ts +10 -12
- package/node_modules/@types/node/zlib.d.ts +3 -3
- package/node_modules/body-parser/README.md +16 -1
- package/node_modules/body-parser/index.js +4 -20
- package/node_modules/body-parser/lib/read.js +17 -17
- package/node_modules/body-parser/lib/types/json.js +60 -32
- package/node_modules/body-parser/lib/types/raw.js +3 -3
- package/node_modules/body-parser/lib/types/text.js +3 -3
- package/node_modules/body-parser/lib/types/urlencoded.js +16 -20
- package/node_modules/body-parser/lib/utils.js +18 -16
- package/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
- package/node_modules/body-parser/node_modules/content-type/README.md +69 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +26 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.js +170 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/body-parser/node_modules/content-type/package.json +52 -0
- package/node_modules/body-parser/package.json +23 -10
- package/node_modules/range-parser/README.md +13 -12
- package/node_modules/range-parser/index.js +27 -8
- package/node_modules/range-parser/package.json +12 -8
- package/node_modules/semver/classes/range.js +6 -2
- package/node_modules/semver/package.json +1 -1
- package/node_modules/side-channel/CHANGELOG.md +10 -0
- package/node_modules/side-channel/README.md +1 -1
- package/node_modules/side-channel/index.js +5 -2
- package/node_modules/side-channel/package.json +10 -10
- package/node_modules/side-channel/test/index.js +16 -0
- package/node_modules/typebox/build/compile/validator.d.mts +2 -7
- package/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/node_modules/typebox/build/format/_idna.mjs +36 -6
- package/node_modules/typebox/build/format/_puny.mjs +4 -1
- package/node_modules/typebox/build/format/uuid.d.mts +2 -2
- package/node_modules/typebox/build/format/uuid.mjs +3 -3
- package/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/node_modules/typebox/build/guard/guard.d.mts +4 -8
- package/node_modules/typebox/build/guard/guard.mjs +5 -13
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
- package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
- package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
- package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
- package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
- package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
- package/node_modules/typebox/build/type/action/index.d.mts +7 -4
- package/node_modules/typebox/build/type/action/index.mjs +7 -4
- package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
- package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
- package/node_modules/typebox/build/type/action/module.d.mts +8 -7
- package/node_modules/typebox/build/type/action/module.mjs +7 -6
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
- package/node_modules/typebox/build/type/action/with.d.mts +11 -0
- package/node_modules/typebox/build/type/action/with.mjs +11 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/index.mjs +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
- package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
- package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
- package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
- package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
- package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
- package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
- package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
- package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
- package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
- package/node_modules/typebox/build/type/extends/object.mjs +25 -3
- package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
- package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/record.mjs +23 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
- package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
- package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
- package/node_modules/typebox/build/type/extends/union.mjs +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
- package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
- package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
- package/node_modules/typebox/build/type/script/parser.mjs +22 -22
- package/node_modules/typebox/build/type/script/script.d.mts +3 -4
- package/node_modules/typebox/build/type/script/script.mjs +3 -2
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
- package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
- package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
- package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
- package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
- package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
- package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/node_modules/typebox/build/type/types/call.d.mts +3 -3
- package/node_modules/typebox/build/type/types/call.mjs +3 -2
- package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
- package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
- package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
- package/node_modules/typebox/build/type/types/enum.mjs +5 -0
- package/node_modules/typebox/build/type/types/index.d.mts +1 -4
- package/node_modules/typebox/build/type/types/index.mjs +1 -4
- package/node_modules/typebox/build/type/types/number.d.mts +1 -1
- package/node_modules/typebox/build/type/types/number.mjs +1 -1
- package/node_modules/typebox/build/type/types/record.d.mts +13 -7
- package/node_modules/typebox/build/type/types/record.mjs +15 -9
- package/node_modules/typebox/build/type/types/static.d.mts +2 -5
- package/node_modules/typebox/build/typebox.d.mts +4 -8
- package/node_modules/typebox/build/typebox.mjs +4 -8
- package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
- package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
- package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
- package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
- package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/index.d.mts +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
- package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
- package/node_modules/typebox/build/value/value.d.mts +0 -1
- package/node_modules/typebox/build/value/value.mjs +0 -1
- package/node_modules/typebox/package.json +25 -25
- package/node_modules/typebox/readme.md +97 -80
- package/node_modules/undici-types/agent.d.ts +0 -2
- package/node_modules/undici-types/client.d.ts +25 -19
- package/node_modules/undici-types/dispatcher.d.ts +7 -33
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici-types/fetch.d.ts +24 -4
- package/node_modules/undici-types/h2c-client.d.ts +6 -6
- package/node_modules/undici-types/handlers.d.ts +1 -2
- package/node_modules/undici-types/header.d.ts +5 -0
- package/node_modules/undici-types/index.d.ts +3 -1
- package/node_modules/undici-types/interceptors.d.ts +1 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/pool.d.ts +0 -2
- package/node_modules/undici-types/proxy-agent.d.ts +2 -2
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -2
- package/node_modules/undici-types/snapshot-agent.d.ts +4 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +2 -2
- package/node_modules/undici-types/webidl.d.ts +0 -1
- package/npm-shrinkwrap.json +55 -47
- package/openclaw.plugin.json +46 -0
- package/package.json +6 -6
- package/dist/accounts.runtime-CgWgzjLX.js +0 -2
- package/dist/action-runtime.runtime-Pwl_ixsr.js +0 -2
- package/dist/actions.runtime-Dl6AfO_g.js +0 -2
- package/dist/errors-CZtmv-h0.js +0 -107
- package/dist/outbound-adapter-WHn1M1t4.js +0 -191
- package/dist/send.runtime-a-O4PP2B.js +0 -2
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/ws/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/ws/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/ws/node_modules/@types/node/assert/strict.d.ts +0 -59
- package/node_modules/@types/ws/node_modules/@types/node/assert.d.ts +0 -950
- package/node_modules/@types/ws/node_modules/@types/node/async_hooks.d.ts +0 -711
- package/node_modules/@types/ws/node_modules/@types/node/buffer.buffer.d.ts +0 -466
- package/node_modules/@types/ws/node_modules/@types/node/buffer.d.ts +0 -1765
- package/node_modules/@types/ws/node_modules/@types/node/child_process.d.ts +0 -1366
- package/node_modules/@types/ws/node_modules/@types/node/cluster.d.ts +0 -432
- package/node_modules/@types/ws/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/ws/node_modules/@types/node/console.d.ts +0 -93
- package/node_modules/@types/ws/node_modules/@types/node/constants.d.ts +0 -14
- package/node_modules/@types/ws/node_modules/@types/node/crypto.d.ts +0 -4058
- package/node_modules/@types/ws/node_modules/@types/node/dgram.d.ts +0 -537
- package/node_modules/@types/ws/node_modules/@types/node/diagnostics_channel.d.ts +0 -552
- package/node_modules/@types/ws/node_modules/@types/node/dns/promises.d.ts +0 -497
- package/node_modules/@types/ws/node_modules/@types/node/dns.d.ts +0 -876
- package/node_modules/@types/ws/node_modules/@types/node/domain.d.ts +0 -150
- package/node_modules/@types/ws/node_modules/@types/node/events.d.ts +0 -1008
- package/node_modules/@types/ws/node_modules/@types/node/fs/promises.d.ts +0 -1468
- package/node_modules/@types/ws/node_modules/@types/node/fs.d.ts +0 -4780
- package/node_modules/@types/ws/node_modules/@types/node/globals.d.ts +0 -150
- package/node_modules/@types/ws/node_modules/@types/node/globals.typedarray.d.ts +0 -101
- package/node_modules/@types/ws/node_modules/@types/node/http.d.ts +0 -2147
- package/node_modules/@types/ws/node_modules/@types/node/http2.d.ts +0 -2485
- package/node_modules/@types/ws/node_modules/@types/node/https.d.ts +0 -400
- package/node_modules/@types/ws/node_modules/@types/node/index.d.ts +0 -117
- package/node_modules/@types/ws/node_modules/@types/node/inspector/promises.d.ts +0 -35
- package/node_modules/@types/ws/node_modules/@types/node/inspector.d.ts +0 -264
- package/node_modules/@types/ws/node_modules/@types/node/inspector.generated.d.ts +0 -4406
- package/node_modules/@types/ws/node_modules/@types/node/module.d.ts +0 -755
- package/node_modules/@types/ws/node_modules/@types/node/net.d.ts +0 -970
- package/node_modules/@types/ws/node_modules/@types/node/os.d.ts +0 -498
- package/node_modules/@types/ws/node_modules/@types/node/package.json +0 -155
- package/node_modules/@types/ws/node_modules/@types/node/path/posix.d.ts +0 -8
- package/node_modules/@types/ws/node_modules/@types/node/path/win32.d.ts +0 -8
- package/node_modules/@types/ws/node_modules/@types/node/path.d.ts +0 -178
- package/node_modules/@types/ws/node_modules/@types/node/perf_hooks.d.ts +0 -612
- package/node_modules/@types/ws/node_modules/@types/node/process.d.ts +0 -2204
- package/node_modules/@types/ws/node_modules/@types/node/punycode.d.ts +0 -89
- package/node_modules/@types/ws/node_modules/@types/node/querystring.d.ts +0 -139
- package/node_modules/@types/ws/node_modules/@types/node/quic.d.ts +0 -897
- package/node_modules/@types/ws/node_modules/@types/node/readline/promises.d.ts +0 -158
- package/node_modules/@types/ws/node_modules/@types/node/readline.d.ts +0 -507
- package/node_modules/@types/ws/node_modules/@types/node/repl.d.ts +0 -420
- package/node_modules/@types/ws/node_modules/@types/node/sea.d.ts +0 -47
- package/node_modules/@types/ws/node_modules/@types/node/sqlite.d.ts +0 -1068
- package/node_modules/@types/ws/node_modules/@types/node/stream/consumers.d.ts +0 -114
- package/node_modules/@types/ws/node_modules/@types/node/stream/iter.d.ts +0 -301
- package/node_modules/@types/ws/node_modules/@types/node/stream/promises.d.ts +0 -211
- package/node_modules/@types/ws/node_modules/@types/node/stream/web.d.ts +0 -300
- package/node_modules/@types/ws/node_modules/@types/node/stream.d.ts +0 -1774
- package/node_modules/@types/ws/node_modules/@types/node/string_decoder.d.ts +0 -27
- package/node_modules/@types/ws/node_modules/@types/node/test/reporters.d.ts +0 -59
- package/node_modules/@types/ws/node_modules/@types/node/test.d.ts +0 -2279
- package/node_modules/@types/ws/node_modules/@types/node/timers/promises.d.ts +0 -93
- package/node_modules/@types/ws/node_modules/@types/node/timers.d.ts +0 -149
- package/node_modules/@types/ws/node_modules/@types/node/tls.d.ts +0 -1193
- package/node_modules/@types/ws/node_modules/@types/node/trace_events.d.ts +0 -103
- package/node_modules/@types/ws/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -462
- package/node_modules/@types/ws/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/node_modules/@types/ws/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -36
- package/node_modules/@types/ws/node_modules/@types/node/ts5.6/index.d.ts +0 -119
- package/node_modules/@types/ws/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/node_modules/@types/ws/node_modules/@types/node/ts5.7/index.d.ts +0 -119
- package/node_modules/@types/ws/node_modules/@types/node/tty.d.ts +0 -225
- package/node_modules/@types/ws/node_modules/@types/node/url.d.ts +0 -556
- package/node_modules/@types/ws/node_modules/@types/node/util/types.d.ts +0 -558
- package/node_modules/@types/ws/node_modules/@types/node/util.d.ts +0 -1677
- package/node_modules/@types/ws/node_modules/@types/node/v8.d.ts +0 -980
- package/node_modules/@types/ws/node_modules/@types/node/vm.d.ts +0 -1136
- package/node_modules/@types/ws/node_modules/@types/node/wasi.d.ts +0 -131
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -59
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/events.d.ts +0 -106
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/fetch.d.ts +0 -69
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/navigator.d.ts +0 -25
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/storage.d.ts +0 -24
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/streams.d.ts +0 -115
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/node_modules/@types/ws/node_modules/@types/node/worker_threads.d.ts +0 -671
- package/node_modules/@types/ws/node_modules/@types/node/zlib/iter.d.ts +0 -131
- package/node_modules/@types/ws/node_modules/@types/node/zlib.d.ts +0 -589
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
- package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
- package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/node_modules/typebox/build/type/action/options.d.mts +0 -11
- package/node_modules/typebox/build/type/action/options.mjs +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
- package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { u as resolveSlackReplyToMode } from "./accounts-BOJJiHSr.js";
|
|
2
2
|
import { r as parseSlackTarget } from "./target-parsing-3jYH8LfB.js";
|
|
3
3
|
import "./targets-Dll4NJgs.js";
|
|
4
|
-
import { a as SLACK_TEXT_LIMIT,
|
|
5
|
-
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-
|
|
4
|
+
import { a as SLACK_TEXT_LIMIT, b as truncateSlackText, c as formatSlackError, d as normalizeAllowListLower, f as normalizeSlackAllowOwnerEntry, m as resolveSlackAllowListMatch } from "./reply-blocks-BGQ6zSqM.js";
|
|
5
|
+
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-CXpT-vA_.js";
|
|
6
6
|
import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode, t as mapStreamingModeToSlackLegacyDraftStreamMode } from "./streaming-compat-DjlgH-Be.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { C as stripSlackMentionsForCommandDetection, _ as readSessionUpdatedAt, b as resolveStorePath, c as recordInboundSession, d as resolveSlackCommandIngress, f as resolveSlackEffectiveAllowFrom, g as resolveSlackChatType, h as normalizeSlackChannelType, i as authorizeSlackDirectMessage, l as resolveConversationLabel$1, m as parseSlackAssistantThreadMetadata, p as buildSlackAssistantThreadMetadata, r as resolveSlackRoomContextHints, s as escapeSlackMrkdwn, u as authorizeSlackBotRoomMessage, v as resolveChannelContextVisibilityMode, x as updateLastRoute, y as resolveChannelResetConfig } from "./provider-
|
|
11
|
-
import { n as resolveSlackChannelConfig } from "./policy-
|
|
12
|
-
import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, s as emitSlackMessageSentHooks, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
13
|
-
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString
|
|
7
|
+
import { c as recordSlackThreadParticipation, r as sendMessageSlack, s as hasSlackThreadParticipationWithPersistence } from "./send-DKDXoeoV.js";
|
|
8
|
+
import { C as buildSlackEditTextPayload, S as formatSlackFileReference, _ as resolveSlackThreadHistory, b as resolveSlackBlocksText, f as removeSlackReaction, l as reactSlackMessage, r as editSlackMessage, t as deleteSlackMessage, v as resolveSlackThreadStarter, y as chooseSlackPrimaryText } from "./actions-DMpDmKEA.js";
|
|
9
|
+
import { n as normalizeSlackOutboundText } from "./format-YCNoNkM2.js";
|
|
10
|
+
import { C as stripSlackMentionsForCommandDetection, _ as readSessionUpdatedAt, b as resolveStorePath, c as recordInboundSession, d as resolveSlackCommandIngress, f as resolveSlackEffectiveAllowFrom, g as resolveSlackChatType, h as normalizeSlackChannelType, i as authorizeSlackDirectMessage, l as resolveConversationLabel$1, m as parseSlackAssistantThreadMetadata, p as buildSlackAssistantThreadMetadata, r as resolveSlackRoomContextHints, s as escapeSlackMrkdwn, u as authorizeSlackBotRoomMessage, v as resolveChannelContextVisibilityMode, x as updateLastRoute, y as resolveChannelResetConfig } from "./provider-Cot8h818.js";
|
|
11
|
+
import { n as resolveSlackChannelConfig } from "./policy-Dj-puVPb.js";
|
|
12
|
+
import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, s as emitSlackMessageSentHooks, t as createSlackReplyDeliveryPlan } from "./replies-Bbx6pG_B.js";
|
|
13
|
+
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
14
|
import { resolveAgentRoute, resolveInboundLastRouteSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
15
15
|
import { buildChannelProgressDraftLine, buildChannelProgressDraftLineForEntry, createChannelMessageReplyPipeline, createChannelProgressDraftGate, createDraftStreamLoop, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, mergeChannelProgressDraftLine, resolveAgentOutboundIdentity, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelProgressDraftConfig, resolveChannelProgressDraftMaxLineChars, resolveChannelProgressDraftMaxLines, resolveChannelProgressDraftRender, resolveChannelStreamingBlockEnabled, resolveChannelStreamingNativeTransport, resolveChannelStreamingPreviewToolProgress, resolveChannelStreamingSuppressDefaultToolProgressMessages } from "openclaw/plugin-sdk/channel-outbound";
|
|
16
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
17
|
+
import { danger, logVerbose, shouldLogVerbose, sleep } from "openclaw/plugin-sdk/runtime-env";
|
|
16
18
|
import { stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
|
|
19
|
+
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
17
20
|
import { createHash } from "node:crypto";
|
|
18
|
-
import { danger, logVerbose, shouldLogVerbose, sleep } from "openclaw/plugin-sdk/runtime-env";
|
|
19
21
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
20
22
|
import { asDateTimestampMs, asFiniteNumberInRange, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
21
23
|
import { buildTtsSupplementMediaPayload, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
@@ -335,14 +337,22 @@ var SlackStreamNotDeliveredError = class extends Error {
|
|
|
335
337
|
* The first chunk of text can optionally be included via `text`.
|
|
336
338
|
*/
|
|
337
339
|
async function startSlackStream(params) {
|
|
338
|
-
const { client, channel, threadTs, text, chunks, taskDisplayMode, teamId, userId } = params;
|
|
340
|
+
const { client, channel, threadTs, text, chunks, taskDisplayMode, teamId, userId, identity } = params;
|
|
341
|
+
const identityPayload = identity?.iconUrl ? {
|
|
342
|
+
...identity.username ? { username: identity.username } : {},
|
|
343
|
+
icon_url: identity.iconUrl
|
|
344
|
+
} : identity?.iconEmoji ? {
|
|
345
|
+
...identity.username ? { username: identity.username } : {},
|
|
346
|
+
icon_emoji: identity.iconEmoji
|
|
347
|
+
} : identity?.username ? { username: identity.username } : {};
|
|
339
348
|
logVerbose(`slack-stream: starting stream in ${channel} thread=${threadTs}${teamId ? ` team=${teamId}` : ""}${userId ? ` user=${userId}` : ""}`);
|
|
340
349
|
const streamer = client.chatStream({
|
|
341
350
|
channel,
|
|
342
351
|
thread_ts: threadTs,
|
|
343
352
|
...taskDisplayMode ? { task_display_mode: taskDisplayMode } : {},
|
|
344
353
|
...teamId ? { recipient_team_id: teamId } : {},
|
|
345
|
-
...userId ? { recipient_user_id: userId } : {}
|
|
354
|
+
...userId ? { recipient_user_id: userId } : {},
|
|
355
|
+
...identityPayload
|
|
346
356
|
});
|
|
347
357
|
const session = {
|
|
348
358
|
streamer,
|
|
@@ -440,9 +450,10 @@ async function stopSlackStream(params) {
|
|
|
440
450
|
const messageId = stopResponse?.ts ?? stopResponse?.message?.ts;
|
|
441
451
|
return messageId ? { messageId } : {};
|
|
442
452
|
} catch (err) {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
453
|
+
const code = extractSlackErrorCode(err) ?? "unknown";
|
|
454
|
+
const benignFinalizeError = isBenignSlackFinalizeError(err);
|
|
455
|
+
if (session.pendingText && (benignFinalizeError || code === "missing_scope")) throw new SlackStreamNotDeliveredError(session.pendingText, code);
|
|
456
|
+
if (benignFinalizeError) {
|
|
446
457
|
if (session.delivered) {
|
|
447
458
|
logVerbose(`slack-stream: finalize rejected by Slack (${code}); prior appends delivered, treating stream as stopped`);
|
|
448
459
|
return {};
|
|
@@ -459,7 +470,7 @@ async function stopSlackStream(params) {
|
|
|
459
470
|
* {@link SlackStreamNotDeliveredError}) or, if prior appends already
|
|
460
471
|
* delivered text, the error is logged verbosely and swallowed.
|
|
461
472
|
*/
|
|
462
|
-
const BENIGN_SLACK_FINALIZE_ERROR_CODES = new Set([
|
|
473
|
+
const BENIGN_SLACK_FINALIZE_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
463
474
|
"user_not_found",
|
|
464
475
|
"team_not_found",
|
|
465
476
|
"missing_recipient_user_id",
|
|
@@ -603,33 +614,15 @@ function resolveSlackTimestampMs(ts) {
|
|
|
603
614
|
}
|
|
604
615
|
//#endregion
|
|
605
616
|
//#region extensions/slack/src/monitor/message-handler/dispatch.ts
|
|
606
|
-
const UNICODE_TO_SLACK = {
|
|
607
|
-
"👀": "eyes",
|
|
608
|
-
"🤔": "thinking_face",
|
|
609
|
-
"🔥": "fire",
|
|
610
|
-
"👨💻": "male-technologist",
|
|
611
|
-
"👨💻": "male-technologist",
|
|
612
|
-
"👩💻": "female-technologist",
|
|
613
|
-
"⚡": "zap",
|
|
614
|
-
"🌐": "globe_with_meridians",
|
|
615
|
-
"✅": "white_check_mark",
|
|
616
|
-
"👍": "thumbsup",
|
|
617
|
-
"❌": "x",
|
|
618
|
-
"😱": "scream",
|
|
619
|
-
"🥱": "yawning_face",
|
|
620
|
-
"😨": "fearful",
|
|
621
|
-
"⏳": "hourglass_flowing_sand",
|
|
622
|
-
"⚠️": "warning",
|
|
623
|
-
"✍": "writing_hand",
|
|
624
|
-
"🗜️": "compression",
|
|
625
|
-
"🗜": "compression",
|
|
626
|
-
"🧠": "brain",
|
|
627
|
-
"🛠️": "hammer_and_wrench",
|
|
628
|
-
"💻": "computer"
|
|
629
|
-
};
|
|
630
617
|
const SLACK_REASONING_TAG_RE = /<\s*(\/?)\s*(?:(?:antml:|mm:)?(?:think(?:ing)?|thought)|antthinking)\b[^<>]*>/gi;
|
|
631
618
|
const SLACK_REASONING_LABEL_PREFIX_RE = /^\s*(?:>\s*)?Reasoning:\s*/iu;
|
|
632
619
|
const SLACK_THINKING_LABEL_PREFIX_RE = /^\s*(?:>\s*)?Thinking\.{0,3}(?=\s*(?:\n|_))/iu;
|
|
620
|
+
const SLACK_THREAD_LOADING_MESSAGES = [
|
|
621
|
+
"Reading the thread...",
|
|
622
|
+
"Checking context...",
|
|
623
|
+
"Working through the request...",
|
|
624
|
+
"Putting it all together..."
|
|
625
|
+
];
|
|
633
626
|
function resolveSlackMessageTimestampMs(message) {
|
|
634
627
|
return resolveSlackTimestampMs(message.event_ts ?? message.ts);
|
|
635
628
|
}
|
|
@@ -649,12 +642,6 @@ function resolveSlackBotLoopProtection(prepared) {
|
|
|
649
642
|
nowMs: resolveSlackMessageTimestampMs(prepared.message)
|
|
650
643
|
};
|
|
651
644
|
}
|
|
652
|
-
function toSlackEmojiName(emoji) {
|
|
653
|
-
let trimmed = emoji.trim();
|
|
654
|
-
while (trimmed.startsWith(":")) trimmed = trimmed.slice(1);
|
|
655
|
-
while (trimmed.endsWith(":")) trimmed = trimmed.slice(0, -1);
|
|
656
|
-
return UNICODE_TO_SLACK[trimmed] ?? trimmed;
|
|
657
|
-
}
|
|
658
645
|
function isSlackStreamingEnabled(params) {
|
|
659
646
|
if (params.mode === "partial") return params.nativeStreaming;
|
|
660
647
|
if (params.mode === "progress") return params.nativeStreaming && params.nativeProgressTaskCards === true;
|
|
@@ -868,10 +855,10 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
868
855
|
const messageTs = message.ts ?? message.event_ts;
|
|
869
856
|
const incomingThreadTs = message.thread_ts;
|
|
870
857
|
let didSetStatus = false;
|
|
871
|
-
const statusReactionsEnabled = Boolean(prepared.ackReactionPromise) && Boolean(reactionMessageTs) && cfg.messages?.statusReactions?.enabled
|
|
858
|
+
const statusReactionsEnabled = prepared.ctxPayload.InboundEventKind !== "room_event" && Boolean(prepared.ackReactionPromise) && Boolean(reactionMessageTs) && cfg.messages?.statusReactions?.enabled === true;
|
|
872
859
|
const slackStatusAdapter = {
|
|
873
860
|
setReaction: async (emoji) => {
|
|
874
|
-
await reactSlackMessage(message.channel, reactionMessageTs ?? "",
|
|
861
|
+
await reactSlackMessage(message.channel, reactionMessageTs ?? "", emoji, {
|
|
875
862
|
token: ctx.botToken,
|
|
876
863
|
client: ctx.app.client
|
|
877
864
|
}).catch((err) => {
|
|
@@ -880,7 +867,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
880
867
|
});
|
|
881
868
|
},
|
|
882
869
|
removeReaction: async (emoji) => {
|
|
883
|
-
await removeSlackReaction(message.channel, reactionMessageTs ?? "",
|
|
870
|
+
await removeSlackReaction(message.channel, reactionMessageTs ?? "", emoji, {
|
|
884
871
|
token: ctx.botToken,
|
|
885
872
|
client: ctx.app.client
|
|
886
873
|
}).catch((err) => {
|
|
@@ -937,7 +924,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
937
924
|
await ctx.setSlackThreadStatus({
|
|
938
925
|
channelId: message.channel,
|
|
939
926
|
threadTs: statusThreadTs,
|
|
940
|
-
status: "is typing..."
|
|
927
|
+
status: "is typing...",
|
|
928
|
+
loadingMessages: SLACK_THREAD_LOADING_MESSAGES
|
|
941
929
|
});
|
|
942
930
|
if (typingReaction && message.ts) await reactSlackMessage(message.channel, message.ts, typingReaction, {
|
|
943
931
|
token: ctx.botToken,
|
|
@@ -988,15 +976,16 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
988
976
|
isThreadReply
|
|
989
977
|
});
|
|
990
978
|
const previewStreamingEnabled = !sourceRepliesAreToolOnly && shouldEnableSlackPreviewStreaming({ mode: slackStreaming.mode });
|
|
979
|
+
const hasSlackCustomIdentity = Boolean(slackIdentity?.username || slackIdentity?.iconUrl || slackIdentity?.iconEmoji);
|
|
991
980
|
const useStreaming = shouldUseStreaming({
|
|
992
|
-
streamingEnabled: !
|
|
981
|
+
streamingEnabled: !sourceRepliesAreToolOnly && isSlackStreamingEnabled({
|
|
993
982
|
mode: slackStreaming.mode,
|
|
994
983
|
nativeStreaming: slackStreaming.nativeStreaming,
|
|
995
984
|
nativeProgressTaskCards: resolveSlackNativeProgressTaskCards(account.config)
|
|
996
985
|
}),
|
|
997
986
|
threadTs: streamThreadHint
|
|
998
987
|
});
|
|
999
|
-
const shouldUseDraftStream = shouldInitializeSlackDraftStream({
|
|
988
|
+
const shouldUseDraftStream = !hasSlackCustomIdentity && shouldInitializeSlackDraftStream({
|
|
1000
989
|
previewStreamingEnabled,
|
|
1001
990
|
useStreaming
|
|
1002
991
|
});
|
|
@@ -1265,6 +1254,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
1265
1254
|
channel: message.channel,
|
|
1266
1255
|
threadTs: streamThreadTs,
|
|
1267
1256
|
text,
|
|
1257
|
+
...slackIdentity ? { identity: slackIdentity } : {},
|
|
1268
1258
|
teamId: await resolveSlackStreamRecipientTeamId({
|
|
1269
1259
|
client: ctx.app.client,
|
|
1270
1260
|
token: ctx.botToken,
|
|
@@ -1645,6 +1635,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
1645
1635
|
threadTs: streamThreadTs,
|
|
1646
1636
|
chunks,
|
|
1647
1637
|
taskDisplayMode: "plan",
|
|
1638
|
+
...slackIdentity ? { identity: slackIdentity } : {},
|
|
1648
1639
|
teamId: await resolveSlackStreamRecipientTeamId({
|
|
1649
1640
|
client: ctx.app.client,
|
|
1650
1641
|
token: ctx.botToken,
|
|
@@ -2030,11 +2021,7 @@ function toLintErrorObject(value, fallbackMessage) {
|
|
|
2030
2021
|
const SLACK_MENTION_RESOLUTION_CONCURRENCY = 4;
|
|
2031
2022
|
const SLACK_MENTION_RESOLUTION_MAX_LOOKUPS_PER_MESSAGE = 20;
|
|
2032
2023
|
const SLACK_USER_MENTION_RE$1 = /<@([A-Z0-9]+)(?:\|[^>]+)?>/gi;
|
|
2033
|
-
|
|
2034
|
-
function loadSlackMediaModule$1() {
|
|
2035
|
-
slackMediaModulePromise$1 ??= import("./actions-CqRHPciJ.js").then((n) => n.h);
|
|
2036
|
-
return slackMediaModulePromise$1;
|
|
2037
|
-
}
|
|
2024
|
+
const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-DMpDmKEA.js").then((n) => n.g));
|
|
2038
2025
|
function collectUniqueSlackMentionIds$1(texts) {
|
|
2039
2026
|
const seen = /* @__PURE__ */ new Set();
|
|
2040
2027
|
const mentionIds = [];
|
|
@@ -2057,121 +2044,6 @@ function renderSlackUserMentions(text, renderedMentions) {
|
|
|
2057
2044
|
return renderedMentions.get(userId) ?? full;
|
|
2058
2045
|
});
|
|
2059
2046
|
}
|
|
2060
|
-
function readTextObject(value) {
|
|
2061
|
-
if (!value || typeof value !== "object") return;
|
|
2062
|
-
return normalizeOptionalString(readStringValue(value.text));
|
|
2063
|
-
}
|
|
2064
|
-
function renderSlackRichTextLeaf(element) {
|
|
2065
|
-
switch (element.type) {
|
|
2066
|
-
case "text": return readStringValue(element.text) ?? "";
|
|
2067
|
-
case "link": return readStringValue(element.text) ?? readStringValue(element.url) ?? "";
|
|
2068
|
-
case "user": {
|
|
2069
|
-
const userId = readStringValue(element.user_id);
|
|
2070
|
-
return userId ? `<@${userId}>` : "";
|
|
2071
|
-
}
|
|
2072
|
-
case "channel": {
|
|
2073
|
-
const channelId = readStringValue(element.channel_id);
|
|
2074
|
-
return channelId ? `<#${channelId}>` : "";
|
|
2075
|
-
}
|
|
2076
|
-
case "usergroup": {
|
|
2077
|
-
const usergroupId = readStringValue(element.usergroup_id);
|
|
2078
|
-
return usergroupId ? `<!subteam^${usergroupId}>` : "";
|
|
2079
|
-
}
|
|
2080
|
-
case "broadcast": {
|
|
2081
|
-
const range = readStringValue(element.range);
|
|
2082
|
-
return range ? `<!${range}>` : "";
|
|
2083
|
-
}
|
|
2084
|
-
case "emoji": {
|
|
2085
|
-
const name = readStringValue(element.name);
|
|
2086
|
-
return name ? `:${name}:` : "";
|
|
2087
|
-
}
|
|
2088
|
-
default: return "";
|
|
2089
|
-
}
|
|
2090
|
-
}
|
|
2091
|
-
function renderSlackRichTextElements(elements) {
|
|
2092
|
-
if (!Array.isArray(elements)) return "";
|
|
2093
|
-
const parts = [];
|
|
2094
|
-
for (const rawElement of elements) {
|
|
2095
|
-
if (!rawElement || typeof rawElement !== "object") continue;
|
|
2096
|
-
const element = rawElement;
|
|
2097
|
-
switch (element.type) {
|
|
2098
|
-
case "rich_text_section":
|
|
2099
|
-
case "rich_text_preformatted":
|
|
2100
|
-
case "rich_text_quote":
|
|
2101
|
-
parts.push(renderSlackRichTextElements(element.elements));
|
|
2102
|
-
break;
|
|
2103
|
-
case "rich_text_list": {
|
|
2104
|
-
const listParts = [];
|
|
2105
|
-
if (Array.isArray(element.elements)) for (const child of element.elements) {
|
|
2106
|
-
if (!child || typeof child !== "object") continue;
|
|
2107
|
-
const rendered = renderSlackRichTextElements(child.elements);
|
|
2108
|
-
if (rendered) listParts.push(rendered);
|
|
2109
|
-
}
|
|
2110
|
-
const listText = listParts.join("\n");
|
|
2111
|
-
parts.push(listText);
|
|
2112
|
-
break;
|
|
2113
|
-
}
|
|
2114
|
-
default:
|
|
2115
|
-
parts.push(renderSlackRichTextLeaf(element));
|
|
2116
|
-
break;
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
return parts.join("");
|
|
2120
|
-
}
|
|
2121
|
-
function readSlackBlockText(block) {
|
|
2122
|
-
if (!block || typeof block !== "object") return;
|
|
2123
|
-
const blockLike = block;
|
|
2124
|
-
switch (blockLike.type) {
|
|
2125
|
-
case "rich_text": return normalizeOptionalString(renderSlackRichTextElements(blockLike.elements));
|
|
2126
|
-
case "section": {
|
|
2127
|
-
const text = readTextObject(blockLike.text);
|
|
2128
|
-
if (text) return text;
|
|
2129
|
-
if (Array.isArray(blockLike.fields)) {
|
|
2130
|
-
const fields = [];
|
|
2131
|
-
for (const field of blockLike.fields) {
|
|
2132
|
-
const fieldText = readTextObject(field);
|
|
2133
|
-
if (fieldText) fields.push(fieldText);
|
|
2134
|
-
}
|
|
2135
|
-
return fields.length > 0 ? fields.join("\n") : void 0;
|
|
2136
|
-
}
|
|
2137
|
-
return;
|
|
2138
|
-
}
|
|
2139
|
-
case "header": return readTextObject(blockLike.text);
|
|
2140
|
-
case "context": {
|
|
2141
|
-
if (!Array.isArray(blockLike.elements)) return;
|
|
2142
|
-
const parts = [];
|
|
2143
|
-
for (const element of blockLike.elements) {
|
|
2144
|
-
const text = readTextObject(element);
|
|
2145
|
-
if (text) parts.push(text);
|
|
2146
|
-
}
|
|
2147
|
-
return parts.length > 0 ? parts.join(" ") : void 0;
|
|
2148
|
-
}
|
|
2149
|
-
case "image": return normalizeOptionalString(readStringValue(blockLike.alt_text)) ?? readTextObject(blockLike.title);
|
|
2150
|
-
case "video": return readTextObject(blockLike.title) ?? normalizeOptionalString(readStringValue(blockLike.alt_text));
|
|
2151
|
-
default: return;
|
|
2152
|
-
}
|
|
2153
|
-
}
|
|
2154
|
-
function resolveSlackBlocksText(blocks) {
|
|
2155
|
-
if (!blocks?.length) return;
|
|
2156
|
-
const parts = [];
|
|
2157
|
-
let hasRichText = false;
|
|
2158
|
-
for (const block of blocks) {
|
|
2159
|
-
if (block && typeof block === "object" && block.type === "rich_text") hasRichText = true;
|
|
2160
|
-
const text = readSlackBlockText(block);
|
|
2161
|
-
if (text) parts.push(text);
|
|
2162
|
-
}
|
|
2163
|
-
return parts.length > 0 ? {
|
|
2164
|
-
text: parts.join("\n"),
|
|
2165
|
-
hasRichText
|
|
2166
|
-
} : void 0;
|
|
2167
|
-
}
|
|
2168
|
-
function chooseSlackPrimaryText(params) {
|
|
2169
|
-
const { messageText, blocksText } = params;
|
|
2170
|
-
if (!blocksText) return messageText;
|
|
2171
|
-
if (!messageText) return blocksText.text;
|
|
2172
|
-
if (blocksText.hasRichText && blocksText.text.length > messageText.length) return blocksText.text;
|
|
2173
|
-
return blocksText.text.length > messageText.length && blocksText.text.startsWith(messageText) ? blocksText.text : messageText;
|
|
2174
|
-
}
|
|
2175
2047
|
function filterInheritedParentFiles(params) {
|
|
2176
2048
|
const { files, isThreadReply, threadStarter } = params;
|
|
2177
2049
|
if (!isThreadReply || !files?.length) return files;
|
|
@@ -2410,7 +2282,7 @@ function resolveSlackInitialAgentRoute(params) {
|
|
|
2410
2282
|
});
|
|
2411
2283
|
}
|
|
2412
2284
|
function resolveSlackRoutingContext(params) {
|
|
2413
|
-
const { ctx, account, message, isDirectMessage, isGroupDm, isRoom, isRoomish, seedTopLevelRoomThread, assistantThreadTs } = params;
|
|
2285
|
+
const { ctx, account, message, isDirectMessage, isGroupDm, isRoom, isRoomish, channelConfig, seedTopLevelRoomThread, assistantThreadTs } = params;
|
|
2414
2286
|
let route = resolveSlackInitialAgentRoute({
|
|
2415
2287
|
ctx,
|
|
2416
2288
|
account,
|
|
@@ -2419,7 +2291,7 @@ function resolveSlackRoutingContext(params) {
|
|
|
2419
2291
|
isRoom
|
|
2420
2292
|
});
|
|
2421
2293
|
const chatType = isDirectMessage ? "direct" : isGroupDm ? "group" : "channel";
|
|
2422
|
-
const replyToMode = resolveSlackReplyToMode(account, chatType);
|
|
2294
|
+
const replyToMode = channelConfig?.replyToMode ?? resolveSlackReplyToMode(account, chatType);
|
|
2423
2295
|
const threadContext = resolveSlackThreadContext({
|
|
2424
2296
|
message,
|
|
2425
2297
|
replyToMode,
|
|
@@ -2538,17 +2410,16 @@ function ensureSlackThreadHistoryHasBotRoot(params) {
|
|
|
2538
2410
|
function formatSlackBotStarterThreadLabel(params) {
|
|
2539
2411
|
const base = `Slack thread ${params.roomLabel}`;
|
|
2540
2412
|
if (!params.starterText) return base;
|
|
2541
|
-
const snippet = params.starterText
|
|
2413
|
+
const snippet = formatSlackThreadLabelSnippet(params.starterText).trim();
|
|
2542
2414
|
if (!snippet) return base;
|
|
2543
2415
|
return `${base} (assistant root): ${snippet}`;
|
|
2544
2416
|
}
|
|
2417
|
+
function formatSlackThreadLabelSnippet(text) {
|
|
2418
|
+
return truncateUtf16Safe(text.replace(/\s+/g, " "), 80);
|
|
2419
|
+
}
|
|
2545
2420
|
//#endregion
|
|
2546
2421
|
//#region extensions/slack/src/monitor/message-handler/prepare-thread-context.ts
|
|
2547
|
-
|
|
2548
|
-
function loadSlackMediaModule() {
|
|
2549
|
-
slackMediaModulePromise ??= import("./actions-CqRHPciJ.js").then((n) => n.h);
|
|
2550
|
-
return slackMediaModulePromise;
|
|
2551
|
-
}
|
|
2422
|
+
const loadSlackMediaModule = createLazyRuntimeModule(() => import("./actions-DMpDmKEA.js").then((n) => n.g));
|
|
2552
2423
|
const SLACK_THREAD_CONTEXT_USER_LOOKUP_CONCURRENCY = 4;
|
|
2553
2424
|
function resolveSlackThreadSessionFreshness(params) {
|
|
2554
2425
|
return params.ctx.channelRuntime?.session?.resolveEntryResetFreshness?.({
|
|
@@ -2646,9 +2517,9 @@ async function resolveSlackThreadContextData(params) {
|
|
|
2646
2517
|
});
|
|
2647
2518
|
if (starter?.text && includeStarterContext) {
|
|
2648
2519
|
threadStarterBody = starter.text;
|
|
2649
|
-
const snippet = starter.text
|
|
2520
|
+
const snippet = formatSlackThreadLabelSnippet(starter.text);
|
|
2650
2521
|
threadLabel = `Slack thread ${params.roomLabel}${snippet ? `: ${snippet}` : ""}`;
|
|
2651
|
-
if (!params.effectiveDirectMedia && starter.files && starter.files.length > 0) {
|
|
2522
|
+
if (shouldSeedInitialThreadContext && !params.effectiveDirectMedia && starter.files && starter.files.length > 0) {
|
|
2652
2523
|
const { resolveSlackMedia } = await loadSlackMediaModule();
|
|
2653
2524
|
threadStarterMedia = await resolveSlackMedia({
|
|
2654
2525
|
files: starter.files,
|
|
@@ -3148,8 +3019,29 @@ async function prepareSlackMessage(params) {
|
|
|
3148
3019
|
if (!authorization) return null;
|
|
3149
3020
|
const { senderId, allowFromLower } = authorization;
|
|
3150
3021
|
const messageText = message.text ?? "";
|
|
3022
|
+
let resolvedSenderName = normalizeOptionalString(message.username);
|
|
3023
|
+
const resolveSenderName = async () => {
|
|
3024
|
+
if (resolvedSenderName) return resolvedSenderName;
|
|
3025
|
+
if (message.user) {
|
|
3026
|
+
const normalized = normalizeOptionalString((await ctx.resolveUserName(message.user))?.name);
|
|
3027
|
+
if (normalized) {
|
|
3028
|
+
resolvedSenderName = normalized;
|
|
3029
|
+
return resolvedSenderName;
|
|
3030
|
+
}
|
|
3031
|
+
}
|
|
3032
|
+
resolvedSenderName = message.user ?? message.bot_id ?? "unknown";
|
|
3033
|
+
return resolvedSenderName;
|
|
3034
|
+
};
|
|
3151
3035
|
const mentionMetadata = collectSlackMentionMetadata(messageText);
|
|
3152
3036
|
const { mentionedUserIds, mentionedSubteamIds, hasAnyMention } = mentionMetadata;
|
|
3037
|
+
const messageAssistantThreadContext = resolveSlackMessageAssistantThreadContext(message);
|
|
3038
|
+
const assistantContextLookupChannelId = messageAssistantThreadContext?.assistantChannelId ?? message.channel;
|
|
3039
|
+
const assistantContextLookupThreadTs = messageAssistantThreadContext?.threadTs ?? message.thread_ts ?? message.ts;
|
|
3040
|
+
const cachedAssistantThreadContext = isDirectMessage ? ctx.getSlackAssistantThreadContext(assistantContextLookupChannelId, assistantContextLookupThreadTs) : void 0;
|
|
3041
|
+
const restoredAssistantThreadContextPromise = isDirectMessage && !cachedAssistantThreadContext && !hasSlackAssistantThreadMetadata(messageAssistantThreadContext) ? restoreSlackAssistantThreadContextFromMetadata({
|
|
3042
|
+
ctx,
|
|
3043
|
+
message
|
|
3044
|
+
}) : Promise.resolve(void 0);
|
|
3153
3045
|
const { explicitlyMentionedBotUser, explicitlyMentionedBotSubteam, explicitlyMentioned } = await resolveSlackExplicitMentionState({
|
|
3154
3046
|
ctx,
|
|
3155
3047
|
messageText,
|
|
@@ -3159,18 +3051,12 @@ async function prepareSlackMessage(params) {
|
|
|
3159
3051
|
});
|
|
3160
3052
|
const channelRequireMention = channelConfig?.requireMention ?? ctx.defaultRequireMention ?? true;
|
|
3161
3053
|
const channelChatType = isDirectMessage ? "direct" : isGroupDm ? "group" : "channel";
|
|
3162
|
-
const
|
|
3163
|
-
const assistantContextLookupChannelId = messageAssistantThreadContext?.assistantChannelId ?? message.channel;
|
|
3164
|
-
const assistantContextLookupThreadTs = messageAssistantThreadContext?.threadTs ?? message.thread_ts ?? message.ts;
|
|
3165
|
-
const cachedAssistantThreadContext = isDirectMessage ? ctx.getSlackAssistantThreadContext(assistantContextLookupChannelId, assistantContextLookupThreadTs) : void 0;
|
|
3166
|
-
const restoredAssistantThreadContext = isDirectMessage && !cachedAssistantThreadContext && !hasSlackAssistantThreadMetadata(messageAssistantThreadContext) ? await restoreSlackAssistantThreadContextFromMetadata({
|
|
3167
|
-
ctx,
|
|
3168
|
-
message
|
|
3169
|
-
}) : void 0;
|
|
3054
|
+
const restoredAssistantThreadContext = await restoredAssistantThreadContextPromise;
|
|
3170
3055
|
const assistantThreadContext = mergeSlackAssistantThreadContext(messageAssistantThreadContext, cachedAssistantThreadContext ?? restoredAssistantThreadContext);
|
|
3171
3056
|
const assistantThreadContextToCache = messageAssistantThreadContext || restoredAssistantThreadContext ? assistantThreadContext : void 0;
|
|
3172
3057
|
if (assistantThreadContextToCache) ctx.saveSlackAssistantThreadContext(assistantThreadContextToCache);
|
|
3173
|
-
const
|
|
3058
|
+
const channelReplyToMode = channelConfig?.replyToMode ?? resolveSlackReplyToMode(account, channelChatType);
|
|
3059
|
+
const willImplicitlyThreadReply = isRoom && !channelRequireMention && channelReplyToMode !== "off";
|
|
3174
3060
|
const seedTopLevelRoomThreadBySource = opts.source === "app_mention" || opts.wasMentioned === true || explicitlyMentioned || willImplicitlyThreadReply;
|
|
3175
3061
|
let routing = resolveSlackRoutingContext({
|
|
3176
3062
|
ctx,
|
|
@@ -3180,6 +3066,7 @@ async function prepareSlackMessage(params) {
|
|
|
3180
3066
|
isGroupDm,
|
|
3181
3067
|
isRoom,
|
|
3182
3068
|
isRoomish,
|
|
3069
|
+
channelConfig,
|
|
3183
3070
|
seedTopLevelRoomThread: seedTopLevelRoomThreadBySource,
|
|
3184
3071
|
assistantThreadTs: assistantThreadContext?.threadTs
|
|
3185
3072
|
});
|
|
@@ -3209,6 +3096,7 @@ async function prepareSlackMessage(params) {
|
|
|
3209
3096
|
isGroupDm,
|
|
3210
3097
|
isRoom,
|
|
3211
3098
|
isRoomish,
|
|
3099
|
+
channelConfig,
|
|
3212
3100
|
seedTopLevelRoomThread: true,
|
|
3213
3101
|
assistantThreadTs: assistantThreadContext?.threadTs
|
|
3214
3102
|
});
|
|
@@ -3237,6 +3125,16 @@ async function prepareSlackMessage(params) {
|
|
|
3237
3125
|
return null;
|
|
3238
3126
|
}
|
|
3239
3127
|
}
|
|
3128
|
+
const senderNameForAuthPromise = ctx.allowNameMatching ? resolveSenderName().then((name) => ({
|
|
3129
|
+
ok: true,
|
|
3130
|
+
name
|
|
3131
|
+
}), (error) => ({
|
|
3132
|
+
ok: false,
|
|
3133
|
+
error
|
|
3134
|
+
})) : Promise.resolve({
|
|
3135
|
+
ok: true,
|
|
3136
|
+
name: void 0
|
|
3137
|
+
});
|
|
3240
3138
|
const directThreadRoutedToDmSession = !assistantThreadContext && isDirectMessage && isThreadReply && threadTs && runtimeBinding?.conversation.conversationId !== threadTs;
|
|
3241
3139
|
let implicitMentionKinds = [];
|
|
3242
3140
|
if (!isDirectMessage && ctx.botUserId && message.thread_ts && !ctx.threadRequireExplicitMention && !wasMentioned) {
|
|
@@ -3247,20 +3145,59 @@ async function prepareSlackMessage(params) {
|
|
|
3247
3145
|
threadTs: message.thread_ts
|
|
3248
3146
|
}));
|
|
3249
3147
|
}
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3148
|
+
const recordDroppedHistory = async (reason) => {
|
|
3149
|
+
const pendingText = (message.text ?? "").trim();
|
|
3150
|
+
const historyMediaCandidate = buildSlackHistoryMediaCandidateMessage(message);
|
|
3151
|
+
const fallbackFile = message.files?.length ? `[Slack file: ${formatSlackFileReference(message.files[0])}]` : "";
|
|
3152
|
+
const pendingBody = pendingText || fallbackFile || (!fallbackFile && historyMediaCandidate ? "[Slack media attachment]" : "");
|
|
3153
|
+
const skippedThreadStarter = historyMediaCandidate && isThreadReply && threadTs ? await resolveSlackThreadStarter({
|
|
3154
|
+
channelId: message.channel,
|
|
3155
|
+
threadTs,
|
|
3156
|
+
client: ctx.app.client
|
|
3157
|
+
}) : null;
|
|
3158
|
+
const senderName = pendingBody ? await resolveSenderName() : void 0;
|
|
3159
|
+
await recordDroppedChannelInboundHistory({
|
|
3160
|
+
input: {
|
|
3161
|
+
id: message.ts ?? `${message.channel}:${Date.now()}`,
|
|
3162
|
+
timestamp: resolveSlackTimestampMs(message.ts),
|
|
3163
|
+
rawText: pendingBody,
|
|
3164
|
+
textForAgent: pendingBody,
|
|
3165
|
+
raw: message
|
|
3166
|
+
},
|
|
3167
|
+
admission: {
|
|
3168
|
+
kind: "drop",
|
|
3169
|
+
reason,
|
|
3170
|
+
recordHistory: true
|
|
3171
|
+
},
|
|
3172
|
+
preflight: {
|
|
3173
|
+
message: pendingBody ? {
|
|
3174
|
+
rawBody: pendingBody,
|
|
3175
|
+
body: pendingBody,
|
|
3176
|
+
bodyForAgent: pendingBody,
|
|
3177
|
+
senderLabel: senderName,
|
|
3178
|
+
envelopeFrom: senderName
|
|
3179
|
+
} : void 0,
|
|
3180
|
+
history: {
|
|
3181
|
+
key: historyKey,
|
|
3182
|
+
historyMap: ctx.channelHistories,
|
|
3183
|
+
limit: ctx.historyLimit,
|
|
3184
|
+
recordOnDrop: true,
|
|
3185
|
+
mediaLimit: SLACK_HISTORY_MEDIA_MAX_ATTACHMENTS,
|
|
3186
|
+
shouldRecord: opts.shouldRecordDroppedHistory
|
|
3187
|
+
},
|
|
3188
|
+
media: () => resolveSlackHistoryMediaForPendingRecord({
|
|
3189
|
+
ctx,
|
|
3190
|
+
message,
|
|
3191
|
+
isThreadReply,
|
|
3192
|
+
threadStarter: skippedThreadStarter,
|
|
3193
|
+
isBotMessage
|
|
3194
|
+
})
|
|
3258
3195
|
}
|
|
3259
|
-
}
|
|
3260
|
-
resolvedSenderName = message.user ?? message.bot_id ?? "unknown";
|
|
3261
|
-
return resolvedSenderName;
|
|
3196
|
+
});
|
|
3262
3197
|
};
|
|
3263
|
-
const
|
|
3198
|
+
const senderNameForAuthResult = await senderNameForAuthPromise;
|
|
3199
|
+
if (!senderNameForAuthResult.ok) throw senderNameForAuthResult.error;
|
|
3200
|
+
const senderNameForAuth = senderNameForAuthResult.name;
|
|
3264
3201
|
const allowTextCommands = shouldHandleTextCommands({
|
|
3265
3202
|
cfg,
|
|
3266
3203
|
surface: "slack"
|
|
@@ -3346,66 +3283,50 @@ async function prepareSlackMessage(params) {
|
|
|
3346
3283
|
});
|
|
3347
3284
|
return null;
|
|
3348
3285
|
}
|
|
3286
|
+
if (isRoom && shouldRequireMention && !canDetectMention && !effectiveWasMentioned) {
|
|
3287
|
+
ctx.logger.info({
|
|
3288
|
+
channel: message.channel,
|
|
3289
|
+
reason: "mention-detection-unavailable"
|
|
3290
|
+
}, "skipping channel message");
|
|
3291
|
+
await recordDroppedHistory("slack-mention-detection-unavailable");
|
|
3292
|
+
return null;
|
|
3293
|
+
}
|
|
3294
|
+
const ignoreOtherMentions = channelConfig?.ignoreOtherMentions ?? false;
|
|
3295
|
+
if (isRoom && ignoreOtherMentions && Boolean(ctx.botUserId) && hasAnyMention && !wasMentioned) {
|
|
3296
|
+
logInboundDrop({
|
|
3297
|
+
log: logVerbose,
|
|
3298
|
+
channel: "slack",
|
|
3299
|
+
reason: "other-mention",
|
|
3300
|
+
target: senderId
|
|
3301
|
+
});
|
|
3302
|
+
await recordDroppedHistory("slack-other-mention");
|
|
3303
|
+
return null;
|
|
3304
|
+
}
|
|
3349
3305
|
if (isRoom && shouldRequireMention && messageIngress.activationAccess.shouldSkip) {
|
|
3350
3306
|
ctx.logger.info({
|
|
3351
3307
|
channel: message.channel,
|
|
3352
3308
|
reason: "no-mention"
|
|
3353
3309
|
}, "skipping channel message");
|
|
3354
|
-
|
|
3355
|
-
const historyMediaCandidate = buildSlackHistoryMediaCandidateMessage(message);
|
|
3356
|
-
const fallbackFile = message.files?.length ? `[Slack file: ${formatSlackFileReference(message.files[0])}]` : "";
|
|
3357
|
-
const pendingBody = pendingText || fallbackFile || (!fallbackFile && historyMediaCandidate ? "[Slack media attachment]" : "");
|
|
3358
|
-
const skippedThreadStarter = historyMediaCandidate && isThreadReply && threadTs ? await resolveSlackThreadStarter({
|
|
3359
|
-
channelId: message.channel,
|
|
3360
|
-
threadTs,
|
|
3361
|
-
client: ctx.app.client
|
|
3362
|
-
}) : null;
|
|
3363
|
-
const timestamp = resolveSlackTimestampMs(message.ts);
|
|
3364
|
-
const senderName = pendingBody ? await resolveSenderName() : void 0;
|
|
3365
|
-
await recordDroppedChannelInboundHistory({
|
|
3366
|
-
input: {
|
|
3367
|
-
id: message.ts ?? `${message.channel}:${Date.now()}`,
|
|
3368
|
-
timestamp,
|
|
3369
|
-
rawText: pendingBody,
|
|
3370
|
-
textForAgent: pendingBody,
|
|
3371
|
-
raw: message
|
|
3372
|
-
},
|
|
3373
|
-
admission: {
|
|
3374
|
-
kind: "drop",
|
|
3375
|
-
reason: "slack-no-mention",
|
|
3376
|
-
recordHistory: true
|
|
3377
|
-
},
|
|
3378
|
-
preflight: {
|
|
3379
|
-
message: pendingBody ? {
|
|
3380
|
-
rawBody: pendingBody,
|
|
3381
|
-
body: pendingBody,
|
|
3382
|
-
bodyForAgent: pendingBody,
|
|
3383
|
-
senderLabel: senderName,
|
|
3384
|
-
envelopeFrom: senderName
|
|
3385
|
-
} : void 0,
|
|
3386
|
-
history: {
|
|
3387
|
-
key: historyKey,
|
|
3388
|
-
historyMap: ctx.channelHistories,
|
|
3389
|
-
limit: ctx.historyLimit,
|
|
3390
|
-
recordOnDrop: true,
|
|
3391
|
-
mediaLimit: SLACK_HISTORY_MEDIA_MAX_ATTACHMENTS
|
|
3392
|
-
},
|
|
3393
|
-
media: () => resolveSlackHistoryMediaForPendingRecord({
|
|
3394
|
-
ctx,
|
|
3395
|
-
message,
|
|
3396
|
-
isThreadReply,
|
|
3397
|
-
threadStarter: skippedThreadStarter,
|
|
3398
|
-
isBotMessage
|
|
3399
|
-
})
|
|
3400
|
-
}
|
|
3401
|
-
});
|
|
3310
|
+
await recordDroppedHistory("slack-no-mention");
|
|
3402
3311
|
return null;
|
|
3403
3312
|
}
|
|
3404
|
-
const
|
|
3313
|
+
const threadStarterPromise = isThreadReply && threadTs ? resolveSlackThreadStarter({
|
|
3405
3314
|
channelId: message.channel,
|
|
3406
3315
|
threadTs,
|
|
3407
3316
|
client: ctx.app.client
|
|
3408
|
-
}) : null;
|
|
3317
|
+
}) : Promise.resolve(null);
|
|
3318
|
+
const chatType = resolveSlackChatType(conversation.resolvedChannelType);
|
|
3319
|
+
const inboundEventKind = classifyChannelInboundEvent({
|
|
3320
|
+
conversation: { kind: chatType },
|
|
3321
|
+
unmentionedGroupPolicy: resolveUnmentionedGroupInboundPolicy({
|
|
3322
|
+
cfg,
|
|
3323
|
+
agentId: route.agentId
|
|
3324
|
+
}),
|
|
3325
|
+
wasMentioned: effectiveWasMentioned,
|
|
3326
|
+
hasControlCommand: hasControlCommandInMessage,
|
|
3327
|
+
hasAbortRequest
|
|
3328
|
+
});
|
|
3329
|
+
const threadStarter = await threadStarterPromise;
|
|
3409
3330
|
const resolvedMessageContent = await resolveSlackMessageContent({
|
|
3410
3331
|
message,
|
|
3411
3332
|
isThreadReply,
|
|
@@ -3418,17 +3339,6 @@ async function prepareSlackMessage(params) {
|
|
|
3418
3339
|
});
|
|
3419
3340
|
if (!resolvedMessageContent) return null;
|
|
3420
3341
|
const { rawBody, effectiveDirectMedia } = resolvedMessageContent;
|
|
3421
|
-
const chatType = resolveSlackChatType(conversation.resolvedChannelType);
|
|
3422
|
-
const inboundEventKind = classifyChannelInboundEvent({
|
|
3423
|
-
conversation: { kind: chatType },
|
|
3424
|
-
unmentionedGroupPolicy: resolveUnmentionedGroupInboundPolicy({
|
|
3425
|
-
cfg,
|
|
3426
|
-
agentId: route.agentId
|
|
3427
|
-
}),
|
|
3428
|
-
wasMentioned: effectiveWasMentioned,
|
|
3429
|
-
hasControlCommand: hasControlCommandInMessage,
|
|
3430
|
-
hasAbortRequest
|
|
3431
|
-
});
|
|
3432
3342
|
const ackReaction = resolveAckReaction(cfg, route.agentId, {
|
|
3433
3343
|
channel: "slack",
|
|
3434
3344
|
accountId: account.accountId
|
|
@@ -3442,8 +3352,10 @@ async function prepareSlackMessage(params) {
|
|
|
3442
3352
|
}
|
|
3443
3353
|
}) === "message_tool_only";
|
|
3444
3354
|
const statusReactionsExplicitlyEnabled = cfg.messages?.statusReactions?.enabled === true;
|
|
3355
|
+
const isRoomEvent = inboundEventKind === "room_event";
|
|
3445
3356
|
const shouldAckReaction$1 = () => Boolean(ackReaction && shouldAckReaction({
|
|
3446
3357
|
scope: ctx.ackReactionScope,
|
|
3358
|
+
inboundEventKind,
|
|
3447
3359
|
isDirect: isDirectMessage,
|
|
3448
3360
|
isGroup: isRoomish,
|
|
3449
3361
|
isMentionableGroup: isRoom,
|
|
@@ -3454,8 +3366,8 @@ async function prepareSlackMessage(params) {
|
|
|
3454
3366
|
}));
|
|
3455
3367
|
const ackReactionMessageTs = message.ts;
|
|
3456
3368
|
const allowToolOnlyStatusReaction = statusReactionsExplicitlyEnabled && (effectiveWasMentioned || shouldBypassMention);
|
|
3457
|
-
const shouldSendAckReaction = shouldAckReaction$1() && (!sourceRepliesAreToolOnly || allowToolOnlyStatusReaction);
|
|
3458
|
-
const statusReactionsWillHandle = Boolean(ackReactionMessageTs) &&
|
|
3369
|
+
const shouldSendAckReaction = shouldAckReaction$1() && (!sourceRepliesAreToolOnly || allowToolOnlyStatusReaction || isRoomEvent);
|
|
3370
|
+
const statusReactionsWillHandle = Boolean(ackReactionMessageTs) && !isRoomEvent && statusReactionsExplicitlyEnabled && shouldSendAckReaction;
|
|
3459
3371
|
const ackReactionPromise = !statusReactionsWillHandle && shouldSendAckReaction && ackReactionMessageTs && ackReactionValue ? reactSlackMessage(message.channel, ackReactionMessageTs, ackReactionValue, {
|
|
3460
3372
|
token: ctx.botToken,
|
|
3461
3373
|
client: ctx.app.client
|
|
@@ -3486,6 +3398,10 @@ async function prepareSlackMessage(params) {
|
|
|
3486
3398
|
storePath,
|
|
3487
3399
|
sessionKey
|
|
3488
3400
|
});
|
|
3401
|
+
if (opts.source === "app_mention" && !ctx.botUserId && message.ts) {
|
|
3402
|
+
const pendingHistory = ctx.channelHistories.get(historyKey);
|
|
3403
|
+
if (pendingHistory) ctx.channelHistories.set(historyKey, pendingHistory.filter((entry) => entry.messageId !== message.ts));
|
|
3404
|
+
}
|
|
3489
3405
|
const channelHistory = createChannelHistoryWindow({ historyMap: ctx.channelHistories });
|
|
3490
3406
|
const dmHistoryLimit = isDirectMessage ? resolveSlackDmHistoryLimit({
|
|
3491
3407
|
account,
|
|
@@ -3641,6 +3557,7 @@ async function prepareSlackMessage(params) {
|
|
|
3641
3557
|
})
|
|
3642
3558
|
}
|
|
3643
3559
|
});
|
|
3560
|
+
ctxPayload.ReplyToMode = replyToMode;
|
|
3644
3561
|
if (isRoomish && !shouldRequireMention) channelHistory.record({
|
|
3645
3562
|
historyKey,
|
|
3646
3563
|
limit: ctx.historyLimit,
|
|
@@ -3658,7 +3575,7 @@ async function prepareSlackMessage(params) {
|
|
|
3658
3575
|
}) : null;
|
|
3659
3576
|
const replyTarget = isDirectMessage ? `channel:${message.channel}` : ctxPayload.To ?? void 0;
|
|
3660
3577
|
if (!replyTarget) return null;
|
|
3661
|
-
if (shouldLogVerbose()) logVerbose(`slack inbound: channel=${message.channel} from=${slackFrom}
|
|
3578
|
+
if (shouldLogVerbose()) logVerbose(`slack inbound: account=${route.accountId} agent=${route.agentId} channel=${message.channel} message_ts=${message.ts ?? "unknown"} thread_ts=${effectiveMessageThreadId ?? "none"} from=${slackFrom} chat=${chatType} chars=${rawBody.length}`);
|
|
3662
3579
|
const updateLastRouteSessionKey = resolveInboundLastRouteSessionKey({
|
|
3663
3580
|
route,
|
|
3664
3581
|
sessionKey
|