@openclaw/feishu 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/{accounts-Cfzht2Hc.js → accounts-Bs5uJ4h0.js} +4 -3
- package/dist/api.js +56 -65
- package/dist/{app-registration-DapxBG7t.js → app-registration-BwQ-aGTe.js} +23 -15
- package/dist/{channel-C1Uun9zo.js → channel-DwCydAeD.js} +77 -58
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-Cjc4wDNg.js → channel.runtime-COT2fcCf.js} +96 -149
- package/dist/contract-api.js +1 -1
- package/dist/{conversation-id-DuL575sn.js → conversation-id-CdLdoot3.js} +5 -1
- package/dist/{drive-djUl8IRC.js → drive-BupYOoHa.js} +46 -42
- package/dist/json-response-CheljwGr.js +9 -0
- package/dist/{monitor-CQo4C7q9.js → monitor-5gbbXIO-.js} +3 -6
- package/dist/{monitor.account-08br3nkU.js → monitor.account-lMwQ5v1Q.js} +149 -67
- package/dist/runtime-api.js +1 -1
- package/dist/{send-BcPh0I15.js → send-DzLGqjEt.js} +33 -40
- package/dist/send-result-BMQw-YhV.js +287 -0
- package/dist/{session-conversation-CZSMgac-.js → session-conversation-BYuoVJwl.js} +1 -1
- package/dist/session-key-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/{subagent-hooks-1pqt5tAA.js → subagent-hooks-B2iWPYJ1.js} +1 -1
- package/dist/subagent-hooks-api.js +2 -5
- package/node_modules/@larksuiteoapi/node-sdk/README.md +40 -0
- package/node_modules/@larksuiteoapi/node-sdk/README.zh.md +38 -0
- package/node_modules/@larksuiteoapi/node-sdk/es/index.js +183 -24
- package/node_modules/@larksuiteoapi/node-sdk/lib/index.js +186 -23
- package/node_modules/@larksuiteoapi/node-sdk/package.json +1 -72
- package/node_modules/@larksuiteoapi/node-sdk/types/index.d.ts +105 -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 +5 -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/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 +23 -23
- package/package.json +6 -6
- package/skills/feishu-drive/SKILL.md +17 -3
- package/dist/send-result-DSsIa4-p.js +0 -140
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- 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,11 +1,12 @@
|
|
|
1
|
-
import { a as resolveDefaultFeishuAccountId, d as isRecord$
|
|
2
|
-
import { n as looksLikeFeishuId, r as normalizeFeishuTarget, t as detectIdType } from "./targets-BUjQ1TcA.js";
|
|
3
|
-
import { n as createFeishuSendReceipt,
|
|
4
|
-
import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-
|
|
1
|
+
import { a as resolveDefaultFeishuAccountId, d as isRecord$1, i as listFeishuAccountIds, n as inspectFeishuCredentials, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-Bs5uJ4h0.js";
|
|
2
|
+
import { i as resolveReceiveIdType, n as looksLikeFeishuId, r as normalizeFeishuTarget, t as detectIdType } from "./targets-BUjQ1TcA.js";
|
|
3
|
+
import { a as readNativeFeishuCardJson, n as createFeishuSendReceipt, u as createFeishuCardInteractionEnvelope } from "./send-result-BMQw-YhV.js";
|
|
4
|
+
import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, o as resolveConfiguredFeishuGroupSessionScope, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-CdLdoot3.js";
|
|
5
5
|
import { t as messageActionTargetAliases } from "./security-audit-BIeA3W3Q.js";
|
|
6
6
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DLaBl9m4.js";
|
|
7
7
|
import { t as collectFeishuSecurityAuditFindings } from "./security-audit-shared-BIHeF-S_.js";
|
|
8
|
-
import { t as resolveFeishuSessionConversation } from "./session-conversation-
|
|
8
|
+
import { t as resolveFeishuSessionConversation } from "./session-conversation-BYuoVJwl.js";
|
|
9
|
+
import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
9
10
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
10
11
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
11
12
|
import { adaptScopedAccountAccessor, createHybridChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -15,17 +16,16 @@ import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing
|
|
|
15
16
|
import { createAllowlistProviderGroupPolicyWarningCollector, projectConfigAccountIdWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
16
17
|
import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime";
|
|
17
18
|
import { createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter, listDirectoryGroupEntriesFromMapKeysAndAllowFrom, listDirectoryUserEntriesFromAllowFromAndMapKeys } from "openclaw/plugin-sdk/directory-runtime";
|
|
18
|
-
import { normalizeMessagePresentation, renderMessagePresentationFallbackText } from "openclaw/plugin-sdk/interactive-runtime";
|
|
19
|
-
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
19
|
+
import { interactiveReplyToPresentation, normalizeInteractiveReply, normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
|
|
20
20
|
import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
21
21
|
import { buildProbeChannelStatusSummary, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
22
|
-
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
22
|
+
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
23
|
+
import { chunkTextForOutbound, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
23
24
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2, normalizeAccountId, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
|
|
24
25
|
import { createResolvedApproverActionAuthAdapter, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
25
26
|
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
26
27
|
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives";
|
|
27
28
|
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
28
|
-
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
29
29
|
import { normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/account-id";
|
|
30
30
|
import { z } from "zod";
|
|
31
31
|
import { buildSecretInputSchema, hasConfiguredSecretInput as hasConfiguredSecretInput$2 } from "openclaw/plugin-sdk/secret-input";
|
|
@@ -383,11 +383,8 @@ const SESSION_FILE_INSPECTION_MAX_BYTES = 16 * 1024 * 1024;
|
|
|
383
383
|
function timestampForPath(now = /* @__PURE__ */ new Date()) {
|
|
384
384
|
return now.toISOString().replaceAll(":", "-");
|
|
385
385
|
}
|
|
386
|
-
function isRecord$1(value) {
|
|
387
|
-
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
388
|
-
}
|
|
389
386
|
function toFeishuSessionEntry(value) {
|
|
390
|
-
if (!isRecord
|
|
387
|
+
if (!isRecord(value)) return {};
|
|
391
388
|
return {
|
|
392
389
|
sessionId: value.sessionId,
|
|
393
390
|
sessionFile: value.sessionFile
|
|
@@ -450,12 +447,12 @@ function normalizeMetadataString(value) {
|
|
|
450
447
|
function isFeishuSessionEntry(key, value) {
|
|
451
448
|
if (isFeishuAcpBindingSessionKey(key)) return false;
|
|
452
449
|
if (isFeishuSessionStoreKey(key)) return true;
|
|
453
|
-
if (!isRecord
|
|
450
|
+
if (!isRecord(value)) return false;
|
|
454
451
|
if (normalizeMetadataString(value.channel) === "feishu" || normalizeMetadataString(value.lastChannel) === "feishu") return true;
|
|
455
|
-
if (normalizeMetadataString((isRecord
|
|
456
|
-
if (normalizeMetadataString((isRecord
|
|
457
|
-
if (normalizeMetadataString((isRecord
|
|
458
|
-
const origin = isRecord
|
|
452
|
+
if (normalizeMetadataString((isRecord(value.route) ? value.route : null)?.channel) === "feishu") return true;
|
|
453
|
+
if (normalizeMetadataString((isRecord(value.deliveryContext) ? value.deliveryContext : null)?.channel) === "feishu") return true;
|
|
454
|
+
if (normalizeMetadataString((isRecord(value.pendingFinalDeliveryContext) ? value.pendingFinalDeliveryContext : null)?.channel) === "feishu") return true;
|
|
455
|
+
const origin = isRecord(value.origin) ? value.origin : null;
|
|
459
456
|
const originProvider = normalizeMetadataString(origin?.provider);
|
|
460
457
|
const originSurface = normalizeMetadataString(origin?.surface);
|
|
461
458
|
const originFrom = normalizeMetadataString(origin?.from);
|
|
@@ -547,17 +544,17 @@ function resolveSessionTranscriptCandidates(params) {
|
|
|
547
544
|
return [...candidates].toSorted();
|
|
548
545
|
}
|
|
549
546
|
function isSessionHeader(value) {
|
|
550
|
-
return isRecord
|
|
547
|
+
return isRecord(value) && value.type === "session" && typeof value.id === "string";
|
|
551
548
|
}
|
|
552
549
|
function isBlankUserMessage(value) {
|
|
553
|
-
if (!isRecord
|
|
550
|
+
if (!isRecord(value) || value.type !== "message" || !isRecord(value.message)) return false;
|
|
554
551
|
if (value.message.role !== "user") return false;
|
|
555
552
|
const content = value.message.content;
|
|
556
553
|
if (typeof content === "string") return content.trim().length === 0;
|
|
557
554
|
return Array.isArray(content) && content.length === 0;
|
|
558
555
|
}
|
|
559
556
|
function isUserMessage(value) {
|
|
560
|
-
return isRecord
|
|
557
|
+
return isRecord(value) && value.type === "message" && isRecord(value.message) && value.message.role === "user";
|
|
561
558
|
}
|
|
562
559
|
function inspectSessionTranscript(params) {
|
|
563
560
|
let stat;
|
|
@@ -1223,36 +1220,35 @@ function buildFeishuPresentationCard(params) {
|
|
|
1223
1220
|
//#endregion
|
|
1224
1221
|
//#region extensions/feishu/src/session-route.ts
|
|
1225
1222
|
function resolveFeishuOutboundSessionRoute(params) {
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
if (idLower.startsWith("ou_") || idLower.startsWith("on_")) isGroup = false;
|
|
1243
|
-
}
|
|
1223
|
+
const rawTarget = stripChannelTargetPrefix(params.target, "feishu", "lark");
|
|
1224
|
+
const target = normalizeFeishuTarget(rawTarget);
|
|
1225
|
+
if (!target) return null;
|
|
1226
|
+
const isGroup = resolveReceiveIdType(rawTarget) === "chat_id";
|
|
1227
|
+
const account = resolveFeishuAccount({
|
|
1228
|
+
cfg: params.cfg,
|
|
1229
|
+
accountId: params.accountId
|
|
1230
|
+
});
|
|
1231
|
+
const groupSessionScope = isGroup ? resolveConfiguredFeishuGroupSessionScope({
|
|
1232
|
+
groupConfig: resolveFeishuGroupConfig({
|
|
1233
|
+
cfg: account.config,
|
|
1234
|
+
groupId: target
|
|
1235
|
+
}),
|
|
1236
|
+
feishuCfg: account.config
|
|
1237
|
+
}) : void 0;
|
|
1238
|
+
const recipientSessionExact = isGroup ? target.startsWith("oc_") && groupSessionScope === "group" : target.startsWith("ou_");
|
|
1244
1239
|
return buildChannelOutboundSessionRoute({
|
|
1245
1240
|
cfg: params.cfg,
|
|
1246
1241
|
agentId: params.agentId,
|
|
1247
1242
|
channel: "feishu",
|
|
1248
1243
|
accountId: params.accountId,
|
|
1244
|
+
recipientSessionExact,
|
|
1249
1245
|
peer: {
|
|
1250
1246
|
kind: isGroup ? "group" : "direct",
|
|
1251
|
-
id:
|
|
1247
|
+
id: target
|
|
1252
1248
|
},
|
|
1253
1249
|
chatType: isGroup ? "group" : "direct",
|
|
1254
|
-
from: isGroup ? `feishu:group:${
|
|
1255
|
-
to:
|
|
1250
|
+
from: isGroup ? `feishu:group:${target}` : `feishu:${target}`,
|
|
1251
|
+
to: target
|
|
1256
1252
|
});
|
|
1257
1253
|
}
|
|
1258
1254
|
//#endregion
|
|
@@ -1431,11 +1427,7 @@ function applyNewAppSecurityPolicy(cfg, accountId, openId, groupPolicy) {
|
|
|
1431
1427
|
next = patchFeishuConfig(next, accountId, groupPatch);
|
|
1432
1428
|
return next;
|
|
1433
1429
|
}
|
|
1434
|
-
|
|
1435
|
-
const loadAppRegistrationModule = async () => {
|
|
1436
|
-
appRegistrationModulePromise ??= import("./app-registration-DapxBG7t.js");
|
|
1437
|
-
return await appRegistrationModulePromise;
|
|
1438
|
-
};
|
|
1430
|
+
const loadAppRegistrationModule = createLazyRuntimeModule(() => import("./app-registration-BwQ-aGTe.js"));
|
|
1439
1431
|
async function promptFeishuDomain(params) {
|
|
1440
1432
|
return await params.prompter.select({
|
|
1441
1433
|
message: t("wizard.feishu.domainPrompt"),
|
|
@@ -1715,13 +1707,13 @@ function readBooleanParam(params, keys) {
|
|
|
1715
1707
|
}
|
|
1716
1708
|
}
|
|
1717
1709
|
function hasLegacyFeishuCardCommandValue(actionValue) {
|
|
1718
|
-
return isRecord$
|
|
1710
|
+
return isRecord$1(actionValue) && actionValue.oc !== "ocf1" && (Boolean(typeof actionValue.command === "string" && actionValue.command.trim()) || Boolean(typeof actionValue.text === "string" && actionValue.text.trim()));
|
|
1719
1711
|
}
|
|
1720
1712
|
function containsLegacyFeishuCardCommandValue(node) {
|
|
1721
1713
|
if (Array.isArray(node)) return node.some((item) => containsLegacyFeishuCardCommandValue(item));
|
|
1722
|
-
if (!isRecord$
|
|
1714
|
+
if (!isRecord$1(node)) return false;
|
|
1723
1715
|
if (node.tag === "button" && hasLegacyFeishuCardCommandValue(node.value)) return true;
|
|
1724
|
-
if (node.tag === "button" && Array.isArray(node.behaviors) && node.behaviors.some((behavior) => isRecord$
|
|
1716
|
+
if (node.tag === "button" && Array.isArray(node.behaviors) && node.behaviors.some((behavior) => isRecord$1(behavior) && hasLegacyFeishuCardCommandValue(behavior.value))) return true;
|
|
1725
1717
|
return Object.values(node).some((value) => containsLegacyFeishuCardCommandValue(value));
|
|
1726
1718
|
}
|
|
1727
1719
|
const meta = {
|
|
@@ -1735,7 +1727,7 @@ const meta = {
|
|
|
1735
1727
|
order: 70,
|
|
1736
1728
|
preferSessionLookupForAnnounceTarget: true
|
|
1737
1729
|
};
|
|
1738
|
-
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
1730
|
+
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-COT2fcCf.js"), "feishuChannelRuntime");
|
|
1739
1731
|
function toFeishuMessageSendResult(result, kind) {
|
|
1740
1732
|
const receipt = result.receipt ?? createFeishuSendReceipt({
|
|
1741
1733
|
messageId: result.messageId,
|
|
@@ -1757,12 +1749,24 @@ const feishuMessageAdapter = defineChannelMessageAdapter({
|
|
|
1757
1749
|
text: async (ctx) => {
|
|
1758
1750
|
const sendText = (await loadFeishuChannelRuntime()).feishuOutbound.sendText;
|
|
1759
1751
|
if (!sendText) throw new Error("Feishu text sending is not available.");
|
|
1760
|
-
|
|
1752
|
+
const { onDeliveryResult, ...outboundCtx } = ctx;
|
|
1753
|
+
return toFeishuMessageSendResult(await sendText({
|
|
1754
|
+
...outboundCtx,
|
|
1755
|
+
...onDeliveryResult ? { onDeliveryResult: async (progress) => {
|
|
1756
|
+
await onDeliveryResult(toFeishuMessageSendResult(progress, "text"));
|
|
1757
|
+
} } : {}
|
|
1758
|
+
}), "text");
|
|
1761
1759
|
},
|
|
1762
1760
|
media: async (ctx) => {
|
|
1763
1761
|
const sendMedia = (await loadFeishuChannelRuntime()).feishuOutbound.sendMedia;
|
|
1764
1762
|
if (!sendMedia) throw new Error("Feishu media sending is not available.");
|
|
1765
|
-
|
|
1763
|
+
const { onDeliveryResult, ...outboundCtx } = ctx;
|
|
1764
|
+
return toFeishuMessageSendResult(await sendMedia({
|
|
1765
|
+
...outboundCtx,
|
|
1766
|
+
...onDeliveryResult ? { onDeliveryResult: async (progress) => {
|
|
1767
|
+
await onDeliveryResult(toFeishuMessageSendResult(progress, "media"));
|
|
1768
|
+
} } : {}
|
|
1769
|
+
}), "media");
|
|
1766
1770
|
}
|
|
1767
1771
|
}
|
|
1768
1772
|
});
|
|
@@ -1794,7 +1798,7 @@ function describeFeishuMessageTool({ cfg, accountId }) {
|
|
|
1794
1798
|
actions: [],
|
|
1795
1799
|
capabilities: enabled ? ["presentation"] : []
|
|
1796
1800
|
};
|
|
1797
|
-
const actions = new Set([
|
|
1801
|
+
const actions = /* @__PURE__ */ new Set([
|
|
1798
1802
|
"send",
|
|
1799
1803
|
"read",
|
|
1800
1804
|
"edit",
|
|
@@ -1973,6 +1977,15 @@ function readFirstString(params, keys, fallback) {
|
|
|
1973
1977
|
}
|
|
1974
1978
|
if (typeof fallback === "string" && fallback.trim()) return fallback.trim();
|
|
1975
1979
|
}
|
|
1980
|
+
const UNRESOLVED_RESPONSE_PREFIX_VAR_PATTERN = /\{[a-zA-Z][a-zA-Z0-9.]*\}/;
|
|
1981
|
+
function resolveFeishuMessageActionResponsePrefix(ctx) {
|
|
1982
|
+
const configured = ctx.cfg.messages?.responsePrefix;
|
|
1983
|
+
if (!configured) return;
|
|
1984
|
+
const agentId = (ctx.agentId?.trim() || "main").toLowerCase();
|
|
1985
|
+
const identityName = ctx.cfg.agents?.list?.find((agent) => agent.id.trim().toLowerCase() === agentId)?.identity?.name?.trim();
|
|
1986
|
+
const resolved = configured === "auto" ? identityName ? `[${identityName}]` : void 0 : configured.replace(/\{(?:identity\.name|identityname)\}/gi, identityName ?? "$&");
|
|
1987
|
+
return resolved && !UNRESOLVED_RESPONSE_PREFIX_VAR_PATTERN.test(resolved) ? resolved : void 0;
|
|
1988
|
+
}
|
|
1976
1989
|
function readOptionalPositiveInteger(params, keys) {
|
|
1977
1990
|
for (const key of keys) {
|
|
1978
1991
|
const parsed = parseStrictPositiveInteger(params[key]);
|
|
@@ -2134,14 +2147,19 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2134
2147
|
if (!to) throw new Error(`Feishu ${ctx.action} requires a target (to).`);
|
|
2135
2148
|
const { replyToMessageId, replyInThread } = buildFeishuSendReplyAnchor(ctx);
|
|
2136
2149
|
if (ctx.action === "thread-reply" && !replyToMessageId) throw new Error("Feishu thread-reply requires messageId.");
|
|
2137
|
-
const presentation = normalizeMessagePresentation(ctx.params.presentation);
|
|
2138
2150
|
const text = readFirstString(ctx.params, ["text", "message"]);
|
|
2151
|
+
const textCard = readNativeFeishuCardJson(text, { responsePrefix: resolveFeishuMessageActionResponsePrefix(ctx) });
|
|
2152
|
+
const interactive = normalizeInteractiveReply(ctx.params.interactive);
|
|
2153
|
+
const presentation = normalizeMessagePresentation(ctx.params.presentation) ?? (interactive ? interactiveReplyToPresentation(interactive) : void 0);
|
|
2139
2154
|
const mediaUrl = readFeishuMediaParam(ctx.params);
|
|
2140
2155
|
const audioAsVoice = readBooleanParam(ctx.params, ["asVoice", "audioAsVoice"]);
|
|
2141
2156
|
const card = presentation ? buildFeishuPresentationCard({
|
|
2142
2157
|
presentation,
|
|
2143
|
-
fallbackText:
|
|
2144
|
-
|
|
2158
|
+
fallbackText: textCard ? void 0 : resolveInteractiveTextFallback({
|
|
2159
|
+
text,
|
|
2160
|
+
interactive
|
|
2161
|
+
})
|
|
2162
|
+
}) : textCard;
|
|
2145
2163
|
if (card && mediaUrl) throw new Error(`Feishu ${ctx.action} does not support card with media.`);
|
|
2146
2164
|
if (!card && !text && !mediaUrl) throw new Error(`Feishu ${ctx.action} requires text/message, media, or card.`);
|
|
2147
2165
|
const runtime = await loadFeishuChannelRuntime();
|
|
@@ -2551,7 +2569,7 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2551
2569
|
})
|
|
2552
2570
|
}),
|
|
2553
2571
|
gateway: { startAccount: async (ctx) => {
|
|
2554
|
-
const { monitorFeishuProvider } = await import("./monitor-
|
|
2572
|
+
const { monitorFeishuProvider } = await import("./monitor-5gbbXIO-.js");
|
|
2555
2573
|
const account = resolveFeishuRuntimeAccount({
|
|
2556
2574
|
cfg: ctx.cfg,
|
|
2557
2575
|
accountId: ctx.accountId
|
|
@@ -2600,6 +2618,7 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2600
2618
|
chunker: chunkTextForOutbound,
|
|
2601
2619
|
chunkerMode: "markdown",
|
|
2602
2620
|
textChunkLimit: 4e3,
|
|
2621
|
+
sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text),
|
|
2603
2622
|
presentationCapabilities: {
|
|
2604
2623
|
supported: true,
|
|
2605
2624
|
buttons: true,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as feishuPlugin } from "./channel-
|
|
1
|
+
import { t as feishuPlugin } from "./channel-DwCydAeD.js";
|
|
2
2
|
export { feishuPlugin };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { o as resolveFeishuAccount, s as resolveFeishuRuntimeAccount, v as parseFeishuCommentTarget } from "./accounts-
|
|
2
|
-
import { h as listFeishuDirectoryPeers, m as listFeishuDirectoryGroups, o as buildFeishuPresentationCardElements } from "./channel-
|
|
1
|
+
import { o as resolveFeishuAccount, s as resolveFeishuRuntimeAccount, v as parseFeishuCommentTarget } from "./accounts-Bs5uJ4h0.js";
|
|
2
|
+
import { h as listFeishuDirectoryPeers, m as listFeishuDirectoryGroups, o as buildFeishuPresentationCardElements } from "./channel-DwCydAeD.js";
|
|
3
|
+
import { a as readNativeFeishuCardJson, o as resolveFeishuCardTemplate, s as sanitizeNativeFeishuCard } from "./send-result-BMQw-YhV.js";
|
|
3
4
|
import { r as createFeishuClient } from "./client-BwgAJuvo.js";
|
|
4
|
-
import { c as
|
|
5
|
+
import { c as getChatMembers, l as getFeishuMemberInfo, r as cleanupAmbientCommentTypingReaction, s as getChatInfo, t as deliverCommentThreadText } from "./drive-BupYOoHa.js";
|
|
5
6
|
import { chunkTextForOutbound } from "./runtime-api.js";
|
|
6
|
-
import { a as
|
|
7
|
+
import { a as sendMarkdownCardFeishu, h as shouldSuppressFeishuTextForVoiceMedia, i as sendCardFeishu, m as sendMediaFeishu, n as getMessageFeishu, o as sendMessageFeishu, s as sendStructuredCardFeishu, t as editMessageFeishu, v as resolveFeishuIdentityHeaderTitle } from "./send-DzLGqjEt.js";
|
|
7
8
|
import { t as probeFeishu } from "./probe-Cv2M2Ivr.js";
|
|
8
9
|
import { interactiveReplyToPresentation, normalizeInteractiveReply, normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
|
|
9
10
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -109,115 +110,25 @@ function markRenderedFeishuCard(card) {
|
|
|
109
110
|
});
|
|
110
111
|
return card;
|
|
111
112
|
}
|
|
112
|
-
function escapeFeishuCardMarkdownText(text) {
|
|
113
|
-
return text.replace(/[&<>]/g, (char) => {
|
|
114
|
-
switch (char) {
|
|
115
|
-
case "&": return "&";
|
|
116
|
-
case "<": return "<";
|
|
117
|
-
case ">": return ">";
|
|
118
|
-
default: return char;
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
function resolveSafeFeishuButtonUrl(url) {
|
|
123
|
-
const trimmed = typeof url === "string" ? url.trim() : "";
|
|
124
|
-
if (!trimmed) return;
|
|
125
|
-
try {
|
|
126
|
-
const parsed = new URL(trimmed);
|
|
127
|
-
return parsed.protocol === "https:" || parsed.protocol === "http:" ? trimmed : void 0;
|
|
128
|
-
} catch {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
function sanitizeNativeFeishuButtonBehavior(behavior) {
|
|
133
|
-
if (!isRecord(behavior)) return;
|
|
134
|
-
if (behavior.type === "open_url") {
|
|
135
|
-
const safeUrl = resolveSafeFeishuButtonUrl(behavior.default_url) ?? resolveSafeFeishuButtonUrl(behavior.url);
|
|
136
|
-
return safeUrl ? {
|
|
137
|
-
type: "open_url",
|
|
138
|
-
default_url: safeUrl
|
|
139
|
-
} : void 0;
|
|
140
|
-
}
|
|
141
|
-
if (behavior.type === "callback" && isRecord(behavior.value) && behavior.value.oc === "ocf1") return {
|
|
142
|
-
type: "callback",
|
|
143
|
-
value: behavior.value
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
function sanitizeNativeFeishuCardButton(button) {
|
|
147
|
-
if (!isRecord(button)) return;
|
|
148
|
-
const text = isRecord(button.text) && typeof button.text.content === "string" ? button.text.content : void 0;
|
|
149
|
-
if (!text?.trim()) return;
|
|
150
|
-
const style = button.type === "danger" ? "danger" : button.type === "primary" || button.type === "success" ? "primary" : void 0;
|
|
151
|
-
const behaviors = Array.isArray(button.behaviors) ? button.behaviors.map((behavior) => sanitizeNativeFeishuButtonBehavior(behavior)).filter((behavior) => Boolean(behavior)) : [];
|
|
152
|
-
const rootSafeUrl = resolveSafeFeishuButtonUrl(button.url);
|
|
153
|
-
if (rootSafeUrl) behaviors.push({
|
|
154
|
-
type: "open_url",
|
|
155
|
-
default_url: rootSafeUrl
|
|
156
|
-
});
|
|
157
|
-
if (isRecord(button.value) && button.value.oc === "ocf1") behaviors.push({
|
|
158
|
-
type: "callback",
|
|
159
|
-
value: button.value
|
|
160
|
-
});
|
|
161
|
-
if (behaviors.length === 0) return;
|
|
162
|
-
return {
|
|
163
|
-
tag: "button",
|
|
164
|
-
text: {
|
|
165
|
-
tag: "plain_text",
|
|
166
|
-
content: text
|
|
167
|
-
},
|
|
168
|
-
type: style === "danger" ? "danger" : style === "primary" || style === "success" ? "primary" : "default",
|
|
169
|
-
behaviors
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
function sanitizeNativeFeishuCardElements(element) {
|
|
173
|
-
if (!isRecord(element) || typeof element.tag !== "string") return [];
|
|
174
|
-
if (element.tag === "hr") return [{ tag: "hr" }];
|
|
175
|
-
if (element.tag === "markdown" && typeof element.content === "string") return [{
|
|
176
|
-
tag: "markdown",
|
|
177
|
-
content: escapeFeishuCardMarkdownText(element.content)
|
|
178
|
-
}];
|
|
179
|
-
if (element.tag === "button") {
|
|
180
|
-
const button = sanitizeNativeFeishuCardButton(element);
|
|
181
|
-
return button ? [button] : [];
|
|
182
|
-
}
|
|
183
|
-
if (element.tag === "action" && Array.isArray(element.actions)) return element.actions.map((action) => sanitizeNativeFeishuCardButton(action)).filter((action) => Boolean(action));
|
|
184
|
-
return [];
|
|
185
|
-
}
|
|
186
|
-
function sanitizeNativeFeishuCard(card) {
|
|
187
|
-
const body = isRecord(card.body) ? card.body : void 0;
|
|
188
|
-
const elements = (Array.isArray(body?.elements) ? body.elements : []).flatMap((element) => sanitizeNativeFeishuCardElements(element)).filter((element) => Boolean(element));
|
|
189
|
-
if (elements.length === 0) return;
|
|
190
|
-
const header = isRecord(card.header) ? card.header : void 0;
|
|
191
|
-
const title = isRecord(header?.title) && typeof header.title.content === "string" ? header.title.content : void 0;
|
|
192
|
-
return markRenderedFeishuCard({
|
|
193
|
-
schema: "2.0",
|
|
194
|
-
config: { width_mode: "fill" },
|
|
195
|
-
...title?.trim() ? { header: {
|
|
196
|
-
title: {
|
|
197
|
-
tag: "plain_text",
|
|
198
|
-
content: title
|
|
199
|
-
},
|
|
200
|
-
template: resolveFeishuCardTemplate(typeof header?.template === "string" ? header.template : void 0) ?? "blue"
|
|
201
|
-
} } : {},
|
|
202
|
-
body: { elements }
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
113
|
function readNativeFeishuCard(payload) {
|
|
206
114
|
const feishuData = payload.channelData?.feishu;
|
|
207
115
|
if (!isRecord(feishuData)) return;
|
|
208
116
|
const card = feishuData.card ?? feishuData.interactiveCard;
|
|
209
117
|
if (!isRecord(card)) return;
|
|
210
118
|
if (card[RENDERED_FEISHU_CARD] === true) return card;
|
|
211
|
-
|
|
119
|
+
const sanitizedCard = sanitizeNativeFeishuCard(card);
|
|
120
|
+
return sanitizedCard ? markRenderedFeishuCard(sanitizedCard) : void 0;
|
|
212
121
|
}
|
|
213
122
|
function buildFeishuPayloadCard(params) {
|
|
214
123
|
const nativeCard = readNativeFeishuCard(params.payload);
|
|
215
124
|
if (nativeCard) return nativeCard;
|
|
125
|
+
const rawText = params.text ?? params.payload.text;
|
|
126
|
+
const textCard = readNativeFeishuCardJson(rawText);
|
|
216
127
|
const interactive = normalizeInteractiveReply(params.payload.interactive);
|
|
217
128
|
const presentation = normalizeMessagePresentation(params.payload.presentation) ?? (interactive ? interactiveReplyToPresentation(interactive) : void 0);
|
|
218
|
-
if (!presentation && !interactive) return;
|
|
219
|
-
const text = resolveInteractiveTextFallback({
|
|
220
|
-
text:
|
|
129
|
+
if (!presentation && !interactive) return textCard ? markRenderedFeishuCard(textCard) : void 0;
|
|
130
|
+
const text = textCard ? void 0 : resolveInteractiveTextFallback({
|
|
131
|
+
text: rawText,
|
|
221
132
|
interactive
|
|
222
133
|
});
|
|
223
134
|
const elements = presentation ? buildFeishuPresentationCardElements({
|
|
@@ -246,6 +157,9 @@ function buildFeishuPayloadCard(params) {
|
|
|
246
157
|
body: { elements }
|
|
247
158
|
});
|
|
248
159
|
}
|
|
160
|
+
function hasVisibleFallbackCommand(blocks) {
|
|
161
|
+
return blocks?.some((block) => block.type === "buttons" && block.buttons.some((button) => !button.disabled && button.action?.type === "command" && !button.url && !button.webApp?.url && !button.web_app?.url)) ?? false;
|
|
162
|
+
}
|
|
249
163
|
function renderFeishuPresentationPayload({ payload, presentation, ctx }) {
|
|
250
164
|
const card = buildFeishuPayloadCard({
|
|
251
165
|
payload,
|
|
@@ -254,6 +168,7 @@ function renderFeishuPresentationPayload({ payload, presentation, ctx }) {
|
|
|
254
168
|
});
|
|
255
169
|
if (!card) return null;
|
|
256
170
|
const existingFeishuData = isRecord(payload.channelData?.feishu) ? payload.channelData.feishu : void 0;
|
|
171
|
+
const fallbackHasCommand = hasVisibleFallbackCommand(presentation?.blocks);
|
|
257
172
|
return {
|
|
258
173
|
...payload,
|
|
259
174
|
text: renderMessagePresentationFallbackText({
|
|
@@ -264,7 +179,8 @@ function renderFeishuPresentationPayload({ payload, presentation, ctx }) {
|
|
|
264
179
|
...payload.channelData,
|
|
265
180
|
feishu: {
|
|
266
181
|
...existingFeishuData,
|
|
267
|
-
card
|
|
182
|
+
card,
|
|
183
|
+
...fallbackHasCommand ? { fallbackHasCommand: true } : {}
|
|
268
184
|
}
|
|
269
185
|
}
|
|
270
186
|
};
|
|
@@ -385,30 +301,38 @@ const feishuOutbound = {
|
|
|
385
301
|
replyToId: ctx.replyToId,
|
|
386
302
|
threadId: ctx.threadId
|
|
387
303
|
});
|
|
388
|
-
if (parseFeishuCommentTarget(ctx.to))
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
304
|
+
if (parseFeishuCommentTarget(ctx.to)) {
|
|
305
|
+
const normalizedPresentation = normalizeMessagePresentation(ctx.payload.presentation) ?? (() => {
|
|
306
|
+
const interactive = normalizeInteractiveReply(ctx.payload.interactive);
|
|
307
|
+
return interactive ? interactiveReplyToPresentation(interactive) : void 0;
|
|
308
|
+
})();
|
|
309
|
+
const presentationFallbackText = renderMessagePresentationFallbackText({
|
|
310
|
+
text: normalizedPresentation && readNativeFeishuCardJson(ctx.payload.text) ? void 0 : ctx.payload.text,
|
|
311
|
+
presentation: normalizedPresentation
|
|
312
|
+
});
|
|
313
|
+
const text = hasVisibleFallbackCommand(normalizedPresentation?.blocks) || isRecord(ctx.payload.channelData?.feishu) && ctx.payload.channelData.feishu.fallbackHasCommand === true ? `${presentationFallbackText}\n\n> Interactive buttons are unavailable in Feishu document comments. You can type the command shown above manually.` : presentationFallbackText;
|
|
314
|
+
return await sendTextMediaPayload({
|
|
315
|
+
channel: "feishu",
|
|
316
|
+
ctx: {
|
|
317
|
+
...ctx,
|
|
318
|
+
payload: {
|
|
319
|
+
...ctx.payload,
|
|
320
|
+
text,
|
|
321
|
+
interactive: void 0,
|
|
322
|
+
presentation: void 0,
|
|
323
|
+
channelData: void 0
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
adapter: feishuOutbound
|
|
327
|
+
});
|
|
328
|
+
}
|
|
408
329
|
const mediaUrls = normalizeStringEntries(resolvePayloadMediaUrls(ctx.payload));
|
|
409
330
|
return attachChannelToResult("feishu", await sendPayloadMediaSequenceAndFinalize({
|
|
410
331
|
text: ctx.payload.text ?? "",
|
|
411
332
|
mediaUrls,
|
|
333
|
+
onResult: async (deliveryResult) => {
|
|
334
|
+
await ctx.onDeliveryResult?.(attachChannelToResult("feishu", deliveryResult));
|
|
335
|
+
},
|
|
412
336
|
send: async ({ mediaUrl }) => await sendMediaFeishu({
|
|
413
337
|
cfg: ctx.cfg,
|
|
414
338
|
to: ctx.to,
|
|
@@ -457,6 +381,15 @@ const feishuOutbound = {
|
|
|
457
381
|
replyToMessageId,
|
|
458
382
|
replyInThread
|
|
459
383
|
});
|
|
384
|
+
const card = readNativeFeishuCardJson(text);
|
|
385
|
+
if (card) return await sendCardFeishu({
|
|
386
|
+
cfg,
|
|
387
|
+
to,
|
|
388
|
+
card: markRenderedFeishuCard(card),
|
|
389
|
+
accountId: accountId ?? void 0,
|
|
390
|
+
replyToMessageId,
|
|
391
|
+
replyInThread
|
|
392
|
+
});
|
|
460
393
|
const renderMode = resolveFeishuAccount({
|
|
461
394
|
cfg,
|
|
462
395
|
accountId: accountId ?? void 0
|
|
@@ -485,7 +418,7 @@ const feishuOutbound = {
|
|
|
485
418
|
replyInThread
|
|
486
419
|
});
|
|
487
420
|
},
|
|
488
|
-
sendMedia: async ({ cfg, to, text, mediaUrl, audioAsVoice, accountId, mediaLocalRoots, replyToId, threadId }) => {
|
|
421
|
+
sendMedia: async ({ cfg, to, text, mediaUrl, audioAsVoice, accountId, mediaLocalRoots, replyToId, threadId, onDeliveryResult }) => {
|
|
489
422
|
const { replyToMessageId, replyInThread } = resolveFeishuMediaReplyMode({
|
|
490
423
|
replyToId,
|
|
491
424
|
threadId
|
|
@@ -502,26 +435,12 @@ const feishuOutbound = {
|
|
|
502
435
|
mediaUrl,
|
|
503
436
|
audioAsVoice
|
|
504
437
|
});
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
replyInThread
|
|
512
|
-
});
|
|
513
|
-
if (mediaUrl) try {
|
|
514
|
-
const result = await sendMediaFeishu({
|
|
515
|
-
cfg,
|
|
516
|
-
to,
|
|
517
|
-
mediaUrl,
|
|
518
|
-
accountId: accountId ?? void 0,
|
|
519
|
-
mediaLocalRoots,
|
|
520
|
-
replyToMessageId,
|
|
521
|
-
replyInThread,
|
|
522
|
-
...audioAsVoice === true ? { audioAsVoice: true } : {}
|
|
523
|
-
});
|
|
524
|
-
if (result.voiceIntentDegradedToFile && text?.trim()) await sendOutboundText({
|
|
438
|
+
const reportDelivery = async (result) => {
|
|
439
|
+
await onDeliveryResult?.(attachChannelToResult("feishu", result));
|
|
440
|
+
};
|
|
441
|
+
let textSent = false;
|
|
442
|
+
if (text?.trim() && !suppressTextForVoiceMedia) {
|
|
443
|
+
const textResult = await sendOutboundText({
|
|
525
444
|
cfg,
|
|
526
445
|
to,
|
|
527
446
|
text,
|
|
@@ -529,17 +448,45 @@ const feishuOutbound = {
|
|
|
529
448
|
replyToMessageId,
|
|
530
449
|
replyInThread
|
|
531
450
|
});
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
451
|
+
textSent = true;
|
|
452
|
+
await reportDelivery(textResult);
|
|
453
|
+
}
|
|
454
|
+
if (mediaUrl) {
|
|
455
|
+
let mediaResult;
|
|
456
|
+
try {
|
|
457
|
+
mediaResult = await sendMediaFeishu({
|
|
458
|
+
cfg,
|
|
459
|
+
to,
|
|
460
|
+
mediaUrl,
|
|
461
|
+
accountId: accountId ?? void 0,
|
|
462
|
+
mediaLocalRoots,
|
|
463
|
+
replyToMessageId,
|
|
464
|
+
replyInThread,
|
|
465
|
+
...audioAsVoice === true ? { audioAsVoice: true } : {}
|
|
466
|
+
});
|
|
467
|
+
} catch (err) {
|
|
468
|
+
console.error(`[feishu] sendMediaFeishu failed:`, err);
|
|
469
|
+
const fallbackResult = await sendOutboundText({
|
|
470
|
+
cfg,
|
|
471
|
+
to,
|
|
472
|
+
text: [textSent ? void 0 : text?.trim(), `📎 ${mediaUrl}`].filter(Boolean).join("\n\n"),
|
|
473
|
+
accountId: accountId ?? void 0,
|
|
474
|
+
replyToMessageId,
|
|
475
|
+
replyInThread
|
|
476
|
+
});
|
|
477
|
+
await reportDelivery(fallbackResult);
|
|
478
|
+
return fallbackResult;
|
|
479
|
+
}
|
|
480
|
+
await onDeliveryResult?.(attachChannelToResult("feishu", mediaResult));
|
|
481
|
+
if (mediaResult.voiceIntentDegradedToFile && text?.trim()) await reportDelivery(await sendOutboundText({
|
|
536
482
|
cfg,
|
|
537
483
|
to,
|
|
538
|
-
text
|
|
484
|
+
text,
|
|
539
485
|
accountId: accountId ?? void 0,
|
|
540
486
|
replyToMessageId,
|
|
541
487
|
replyInThread
|
|
542
|
-
});
|
|
488
|
+
}));
|
|
489
|
+
return mediaResult;
|
|
543
490
|
}
|
|
544
491
|
return await sendOutboundText({
|
|
545
492
|
cfg,
|
package/dist/contract-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-
|
|
1
|
+
import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-CdLdoot3.js";
|
|
2
2
|
import { t as messageActionTargetAliases } from "./security-audit-BIeA3W3Q.js";
|
|
3
3
|
import { t as collectFeishuSecurityAuditFindings } from "./security-audit-shared-BIHeF-S_.js";
|
|
4
4
|
export { buildFeishuConversationId, collectFeishuSecurityAuditFindings, messageActionTargetAliases, parseFeishuConversationId, parseFeishuDirectConversationId, parseFeishuTargetId };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
2
|
//#region extensions/feishu/src/conversation-id.ts
|
|
3
|
+
function resolveConfiguredFeishuGroupSessionScope(params) {
|
|
4
|
+
const legacyTopicSessionMode = params.groupConfig?.topicSessionMode ?? params.feishuCfg?.topicSessionMode ?? "disabled";
|
|
5
|
+
return params.groupConfig?.groupSessionScope ?? params.feishuCfg?.groupSessionScope ?? (legacyTopicSessionMode === "enabled" ? "group_topic" : "group");
|
|
6
|
+
}
|
|
3
7
|
function normalizeText(value) {
|
|
4
8
|
if (typeof value !== "string") return;
|
|
5
9
|
return value.trim() || void 0;
|
|
@@ -136,4 +140,4 @@ function buildFeishuModelOverrideParentCandidates(parentConversationId) {
|
|
|
136
140
|
return [];
|
|
137
141
|
}
|
|
138
142
|
//#endregion
|
|
139
|
-
export { parseFeishuTargetId as a, parseFeishuDirectConversationId as i, buildFeishuModelOverrideParentCandidates as n, parseFeishuConversationId as r, buildFeishuConversationId as t };
|
|
143
|
+
export { parseFeishuTargetId as a, parseFeishuDirectConversationId as i, buildFeishuModelOverrideParentCandidates as n, resolveConfiguredFeishuGroupSessionScope as o, parseFeishuConversationId as r, buildFeishuConversationId as t };
|