@openclaw/feishu 2026.7.1-beta.2 → 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-DuEyfVY1.js → app-registration-BwQ-aGTe.js} +22 -10
- package/dist/{channel-Bwm5rvHg.js → channel-DwCydAeD.js} +63 -37
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-C6SITclp.js → channel.runtime-COT2fcCf.js} +66 -129
- 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-Ckch4qvr.js → monitor-5gbbXIO-.js} +2 -2
- package/dist/{monitor.account-GXGIJrgw.js → monitor.account-lMwQ5v1Q.js} +146 -65
- package/dist/runtime-api.js +1 -1
- package/dist/{send-BJTjDWKi.js → send-DzLGqjEt.js} +17 -35
- 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 +1 -1
- 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,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({
|
|
@@ -396,7 +307,7 @@ const feishuOutbound = {
|
|
|
396
307
|
return interactive ? interactiveReplyToPresentation(interactive) : void 0;
|
|
397
308
|
})();
|
|
398
309
|
const presentationFallbackText = renderMessagePresentationFallbackText({
|
|
399
|
-
text: ctx.payload.text,
|
|
310
|
+
text: normalizedPresentation && readNativeFeishuCardJson(ctx.payload.text) ? void 0 : ctx.payload.text,
|
|
400
311
|
presentation: normalizedPresentation
|
|
401
312
|
});
|
|
402
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;
|
|
@@ -419,6 +330,9 @@ const feishuOutbound = {
|
|
|
419
330
|
return attachChannelToResult("feishu", await sendPayloadMediaSequenceAndFinalize({
|
|
420
331
|
text: ctx.payload.text ?? "",
|
|
421
332
|
mediaUrls,
|
|
333
|
+
onResult: async (deliveryResult) => {
|
|
334
|
+
await ctx.onDeliveryResult?.(attachChannelToResult("feishu", deliveryResult));
|
|
335
|
+
},
|
|
422
336
|
send: async ({ mediaUrl }) => await sendMediaFeishu({
|
|
423
337
|
cfg: ctx.cfg,
|
|
424
338
|
to: ctx.to,
|
|
@@ -467,6 +381,15 @@ const feishuOutbound = {
|
|
|
467
381
|
replyToMessageId,
|
|
468
382
|
replyInThread
|
|
469
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
|
+
});
|
|
470
393
|
const renderMode = resolveFeishuAccount({
|
|
471
394
|
cfg,
|
|
472
395
|
accountId: accountId ?? void 0
|
|
@@ -495,7 +418,7 @@ const feishuOutbound = {
|
|
|
495
418
|
replyInThread
|
|
496
419
|
});
|
|
497
420
|
},
|
|
498
|
-
sendMedia: async ({ cfg, to, text, mediaUrl, audioAsVoice, accountId, mediaLocalRoots, replyToId, threadId }) => {
|
|
421
|
+
sendMedia: async ({ cfg, to, text, mediaUrl, audioAsVoice, accountId, mediaLocalRoots, replyToId, threadId, onDeliveryResult }) => {
|
|
499
422
|
const { replyToMessageId, replyInThread } = resolveFeishuMediaReplyMode({
|
|
500
423
|
replyToId,
|
|
501
424
|
threadId
|
|
@@ -512,26 +435,12 @@ const feishuOutbound = {
|
|
|
512
435
|
mediaUrl,
|
|
513
436
|
audioAsVoice
|
|
514
437
|
});
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
replyInThread
|
|
522
|
-
});
|
|
523
|
-
if (mediaUrl) try {
|
|
524
|
-
const result = await sendMediaFeishu({
|
|
525
|
-
cfg,
|
|
526
|
-
to,
|
|
527
|
-
mediaUrl,
|
|
528
|
-
accountId: accountId ?? void 0,
|
|
529
|
-
mediaLocalRoots,
|
|
530
|
-
replyToMessageId,
|
|
531
|
-
replyInThread,
|
|
532
|
-
...audioAsVoice === true ? { audioAsVoice: true } : {}
|
|
533
|
-
});
|
|
534
|
-
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({
|
|
535
444
|
cfg,
|
|
536
445
|
to,
|
|
537
446
|
text,
|
|
@@ -539,17 +448,45 @@ const feishuOutbound = {
|
|
|
539
448
|
replyToMessageId,
|
|
540
449
|
replyInThread
|
|
541
450
|
});
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
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({
|
|
546
482
|
cfg,
|
|
547
483
|
to,
|
|
548
|
-
text
|
|
484
|
+
text,
|
|
549
485
|
accountId: accountId ?? void 0,
|
|
550
486
|
replyToMessageId,
|
|
551
487
|
replyInThread
|
|
552
|
-
});
|
|
488
|
+
}));
|
|
489
|
+
return mediaResult;
|
|
553
490
|
}
|
|
554
491
|
return await sendOutboundText({
|
|
555
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 };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { c as encodeQuery, d as isRecord$1, i as listFeishuAccountIds, l as extractReplyText, m as readString, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount, u as formatFeishuApiError, v as parseFeishuCommentTarget } from "./accounts-
|
|
1
|
+
import { c as encodeQuery, d as isRecord$1, i as listFeishuAccountIds, l as extractReplyText, m as readString, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount, u as formatFeishuApiError, v as parseFeishuCommentTarget } from "./accounts-Bs5uJ4h0.js";
|
|
2
2
|
import { r as createFeishuClient } from "./client-BwgAJuvo.js";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
6
|
+
import { jsonResult } from "openclaw/plugin-sdk/tool-results";
|
|
6
7
|
import { Type } from "typebox";
|
|
7
8
|
import { readPositiveIntegerParam } from "openclaw/plugin-sdk/param-readers";
|
|
8
9
|
//#region extensions/feishu/src/tools-config.ts
|
|
@@ -127,15 +128,6 @@ const FeishuChatSchema = Type.Object({
|
|
|
127
128
|
});
|
|
128
129
|
//#endregion
|
|
129
130
|
//#region extensions/feishu/src/chat.ts
|
|
130
|
-
function json(data) {
|
|
131
|
-
return {
|
|
132
|
-
content: [{
|
|
133
|
-
type: "text",
|
|
134
|
-
text: JSON.stringify(data, null, 2)
|
|
135
|
-
}],
|
|
136
|
-
details: data
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
131
|
function readChatPageSize(params) {
|
|
140
132
|
return readPositiveIntegerParam(params, "page_size", {
|
|
141
133
|
max: 100,
|
|
@@ -244,38 +236,29 @@ function registerFeishuChatTools(api) {
|
|
|
244
236
|
const client = getClient();
|
|
245
237
|
switch (p.action) {
|
|
246
238
|
case "members":
|
|
247
|
-
if (!p.chat_id) return
|
|
248
|
-
return
|
|
239
|
+
if (!p.chat_id) return jsonResult({ error: "chat_id is required for action members" });
|
|
240
|
+
return jsonResult(await getChatMembers(client, p.chat_id, readChatPageSize(rawParams), p.page_token, p.member_id_type));
|
|
249
241
|
case "info":
|
|
250
|
-
if (!p.chat_id) return
|
|
251
|
-
return
|
|
242
|
+
if (!p.chat_id) return jsonResult({ error: "chat_id is required for action info" });
|
|
243
|
+
return jsonResult(await getChatInfo(client, p.chat_id));
|
|
252
244
|
case "member_info":
|
|
253
|
-
if (!p.member_id) return
|
|
254
|
-
return
|
|
255
|
-
default: return
|
|
245
|
+
if (!p.member_id) return jsonResult({ error: "member_id is required for action member_info" });
|
|
246
|
+
return jsonResult(await getFeishuMemberInfo(client, p.member_id, p.member_id_type ?? "open_id"));
|
|
247
|
+
default: return jsonResult({ error: `Unknown action: ${String(p.action)}` });
|
|
256
248
|
}
|
|
257
249
|
} catch (err) {
|
|
258
|
-
return
|
|
250
|
+
return jsonResult({ error: formatFeishuApiError(err, { includeNestedErrorLogId: true }) });
|
|
259
251
|
}
|
|
260
252
|
}
|
|
261
253
|
}, { name: "feishu_chat" });
|
|
262
254
|
}
|
|
263
255
|
//#endregion
|
|
264
256
|
//#region extensions/feishu/src/tool-result.ts
|
|
265
|
-
function jsonToolResult(data) {
|
|
266
|
-
return {
|
|
267
|
-
content: [{
|
|
268
|
-
type: "text",
|
|
269
|
-
text: JSON.stringify(data, null, 2)
|
|
270
|
-
}],
|
|
271
|
-
details: data
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
257
|
function unknownToolActionResult(action) {
|
|
275
|
-
return
|
|
258
|
+
return jsonResult({ error: `Unknown action: ${String(action)}` });
|
|
276
259
|
}
|
|
277
260
|
function toolExecutionErrorResult(error) {
|
|
278
|
-
return
|
|
261
|
+
return jsonResult({ error: formatErrorMessage(error) });
|
|
279
262
|
}
|
|
280
263
|
//#endregion
|
|
281
264
|
//#region extensions/feishu/src/comment-reaction.ts
|
|
@@ -445,7 +428,13 @@ const CommentFileType = Type.Union([
|
|
|
445
428
|
const FeishuDriveSchema = Type.Union([
|
|
446
429
|
Type.Object({
|
|
447
430
|
action: Type.Literal("list"),
|
|
448
|
-
folder_token: Type.Optional(Type.String({ description: "Folder token (optional, omit for root directory)" }))
|
|
431
|
+
folder_token: Type.Optional(Type.String({ description: "Folder token (optional, omit for root directory)" })),
|
|
432
|
+
page_size: Type.Optional(Type.Integer({
|
|
433
|
+
minimum: 1,
|
|
434
|
+
maximum: 200,
|
|
435
|
+
description: "Items per folder page (1-200; requires folder_token)"
|
|
436
|
+
})),
|
|
437
|
+
page_token: Type.Optional(Type.String({ description: "Continuation token from a prior list result (requires the same folder_token)" }))
|
|
449
438
|
}),
|
|
450
439
|
Type.Object({
|
|
451
440
|
action: Type.Literal("info"),
|
|
@@ -639,9 +628,20 @@ async function getRootFolderToken(client) {
|
|
|
639
628
|
if (!token) throw new Error("Root folder token not found");
|
|
640
629
|
return token;
|
|
641
630
|
}
|
|
642
|
-
async function listFolder(client,
|
|
631
|
+
async function listFolder(client, params = {}) {
|
|
632
|
+
const folderToken = typeof params.folder_token === "string" ? params.folder_token.trim() : void 0;
|
|
643
633
|
const validFolderToken = folderToken && folderToken !== "0" ? folderToken : void 0;
|
|
644
|
-
const
|
|
634
|
+
const pageSize = readPositiveIntegerParam(params, "page_size", {
|
|
635
|
+
max: 200,
|
|
636
|
+
message: "page_size must be a positive integer between 1 and 200"
|
|
637
|
+
});
|
|
638
|
+
const pageToken = typeof params.page_token === "string" ? params.page_token.trim() : void 0;
|
|
639
|
+
const listParams = validFolderToken ? {
|
|
640
|
+
folder_token: validFolderToken,
|
|
641
|
+
...pageSize ? { page_size: pageSize } : {},
|
|
642
|
+
...pageToken ? { page_token: pageToken } : {}
|
|
643
|
+
} : {};
|
|
644
|
+
const res = await client.drive.file.list({ params: listParams });
|
|
645
645
|
if (res.code !== 0) throw new Error(res.msg);
|
|
646
646
|
return {
|
|
647
647
|
files: res.data?.files?.map((f) => ({
|
|
@@ -878,17 +878,21 @@ function registerFeishuDriveTools(api) {
|
|
|
878
878
|
}
|
|
879
879
|
});
|
|
880
880
|
switch (p.action) {
|
|
881
|
-
case "list": return
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
case "
|
|
887
|
-
case "
|
|
881
|
+
case "list": return jsonResult(await listFolder(client, {
|
|
882
|
+
folder_token: p.folder_token,
|
|
883
|
+
page_size: p.page_size,
|
|
884
|
+
page_token: p.page_token
|
|
885
|
+
}));
|
|
886
|
+
case "info": return jsonResult(await getFileInfo(client, p.file_token));
|
|
887
|
+
case "create_folder": return jsonResult(await createFolder(client, p.name, p.folder_token));
|
|
888
|
+
case "move": return jsonResult(await moveFile(client, p.file_token, p.type, p.folder_token));
|
|
889
|
+
case "delete": return jsonResult(await deleteFile(client, p.file_token, p.type));
|
|
890
|
+
case "list_comments": return jsonResult(await listComments(client, applyCommentFileTypeDefault(applyAmbientCommentDefaults(p, ctx), "list_comments")));
|
|
891
|
+
case "list_comment_replies": return jsonResult(await listCommentReplies(client, applyCommentFileTypeDefault(applyAmbientCommentDefaults(p, ctx), "list_comment_replies")));
|
|
888
892
|
case "add_comment": {
|
|
889
893
|
const resolved = applyAddCommentDefaults(applyAddCommentAmbientDefaults(p, ctx));
|
|
890
894
|
try {
|
|
891
|
-
return
|
|
895
|
+
return jsonResult(await addComment(client, resolved));
|
|
892
896
|
} finally {
|
|
893
897
|
cleanupAmbientCommentTypingReaction({
|
|
894
898
|
client: getDriveInternalClient(client),
|
|
@@ -899,7 +903,7 @@ function registerFeishuDriveTools(api) {
|
|
|
899
903
|
case "reply_comment": {
|
|
900
904
|
const resolved = applyCommentFileTypeDefault(applyAmbientCommentDefaults(p, ctx), "reply_comment");
|
|
901
905
|
try {
|
|
902
|
-
return
|
|
906
|
+
return jsonResult(await deliverCommentThreadText(client, resolved));
|
|
903
907
|
} finally {
|
|
904
908
|
cleanupAmbientCommentTypingReaction({
|
|
905
909
|
client: getDriveInternalClient(client),
|
|
@@ -917,4 +921,4 @@ function registerFeishuDriveTools(api) {
|
|
|
917
921
|
}, { name: "feishu_drive" });
|
|
918
922
|
}
|
|
919
923
|
//#endregion
|
|
920
|
-
export {
|
|
924
|
+
export { toolExecutionErrorResult as a, getChatMembers as c, createFeishuToolClient as d, resolveAnyEnabledFeishuToolsConfig as f, createCommentTypingReactionLifecycle as i, getFeishuMemberInfo as l, resolveToolsConfig as m, registerFeishuDriveTools as n, unknownToolActionResult as o, resolveFeishuToolAccount as p, cleanupAmbientCommentTypingReaction as r, getChatInfo as s, deliverCommentThreadText as t, registerFeishuChatTools as u };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
2
|
+
//#region extensions/feishu/src/json-response.ts
|
|
3
|
+
/** Feishu control-plane JSON responses are tiny; 16 MiB leaves ample headroom. */
|
|
4
|
+
const FEISHU_JSON_MAX_BYTES = 16 * 1024 * 1024;
|
|
5
|
+
async function readFeishuJsonResponse(response, label = "feishu.api") {
|
|
6
|
+
return readProviderJsonResponse(response, label, { maxBytes: FEISHU_JSON_MAX_BYTES });
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { readFeishuJsonResponse as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-
|
|
1
|
+
import { r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-Bs5uJ4h0.js";
|
|
2
2
|
import { f as fetchBotIdentityForMonitor } from "./monitor.state-R4ZgNpac.js";
|
|
3
3
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
4
4
|
//#region extensions/feishu/src/monitor.ts
|
|
5
|
-
const loadMonitorAccountRuntime = createLazyRuntimeModule(() => import("./monitor.account-
|
|
5
|
+
const loadMonitorAccountRuntime = createLazyRuntimeModule(() => import("./monitor.account-lMwQ5v1Q.js"));
|
|
6
6
|
async function monitorFeishuProvider(opts = {}) {
|
|
7
7
|
const cfg = opts.config;
|
|
8
8
|
if (!cfg) throw new Error("Config is required for Feishu monitor");
|