@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
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { d as isRecord$1 } from "./accounts-Bs5uJ4h0.js";
|
|
2
|
+
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
3
|
+
import { isRecord, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
|
+
//#region extensions/feishu/src/card-interaction.ts
|
|
5
|
+
const FEISHU_CARD_INTERACTION_VERSION = "ocf1";
|
|
6
|
+
function isInteractionKind(value) {
|
|
7
|
+
return value === "button" || value === "quick" || value === "meta";
|
|
8
|
+
}
|
|
9
|
+
function isMetadataValue(value) {
|
|
10
|
+
return value === null || value === void 0 || typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
11
|
+
}
|
|
12
|
+
function createFeishuCardInteractionEnvelope(envelope) {
|
|
13
|
+
return {
|
|
14
|
+
oc: FEISHU_CARD_INTERACTION_VERSION,
|
|
15
|
+
...envelope
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function buildFeishuCardActionTextFallback(event) {
|
|
19
|
+
const actionValue = event.action.value;
|
|
20
|
+
if (isRecord$1(actionValue)) {
|
|
21
|
+
if (typeof actionValue.text === "string") return actionValue.text;
|
|
22
|
+
if (typeof actionValue.command === "string") return actionValue.command;
|
|
23
|
+
return JSON.stringify(actionValue);
|
|
24
|
+
}
|
|
25
|
+
return String(actionValue);
|
|
26
|
+
}
|
|
27
|
+
function decodeFeishuCardAction(params) {
|
|
28
|
+
const { event, now = Date.now() } = params;
|
|
29
|
+
const actionValue = event.action.value;
|
|
30
|
+
if (!isRecord$1(actionValue) || actionValue.oc !== "ocf1") return {
|
|
31
|
+
kind: "legacy",
|
|
32
|
+
text: buildFeishuCardActionTextFallback(event)
|
|
33
|
+
};
|
|
34
|
+
if (!isInteractionKind(actionValue.k) || typeof actionValue.a !== "string" || !actionValue.a) return {
|
|
35
|
+
kind: "invalid",
|
|
36
|
+
reason: "malformed"
|
|
37
|
+
};
|
|
38
|
+
if (actionValue.q !== void 0 && typeof actionValue.q !== "string") return {
|
|
39
|
+
kind: "invalid",
|
|
40
|
+
reason: "malformed"
|
|
41
|
+
};
|
|
42
|
+
if (actionValue.m !== void 0) {
|
|
43
|
+
if (!isRecord$1(actionValue.m)) return {
|
|
44
|
+
kind: "invalid",
|
|
45
|
+
reason: "malformed"
|
|
46
|
+
};
|
|
47
|
+
for (const value of Object.values(actionValue.m)) if (!isMetadataValue(value)) return {
|
|
48
|
+
kind: "invalid",
|
|
49
|
+
reason: "malformed"
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (actionValue.c !== void 0) {
|
|
53
|
+
if (!isRecord$1(actionValue.c)) return {
|
|
54
|
+
kind: "invalid",
|
|
55
|
+
reason: "malformed"
|
|
56
|
+
};
|
|
57
|
+
if (actionValue.c.u !== void 0 && typeof actionValue.c.u !== "string") return {
|
|
58
|
+
kind: "invalid",
|
|
59
|
+
reason: "malformed"
|
|
60
|
+
};
|
|
61
|
+
if (actionValue.c.h !== void 0 && typeof actionValue.c.h !== "string") return {
|
|
62
|
+
kind: "invalid",
|
|
63
|
+
reason: "malformed"
|
|
64
|
+
};
|
|
65
|
+
if (actionValue.c.s !== void 0 && typeof actionValue.c.s !== "string") return {
|
|
66
|
+
kind: "invalid",
|
|
67
|
+
reason: "malformed"
|
|
68
|
+
};
|
|
69
|
+
if (actionValue.c.e !== void 0 && !Number.isFinite(actionValue.c.e)) return {
|
|
70
|
+
kind: "invalid",
|
|
71
|
+
reason: "malformed"
|
|
72
|
+
};
|
|
73
|
+
if (actionValue.c.t !== void 0 && actionValue.c.t !== "p2p" && actionValue.c.t !== "group") return {
|
|
74
|
+
kind: "invalid",
|
|
75
|
+
reason: "malformed"
|
|
76
|
+
};
|
|
77
|
+
if (typeof actionValue.c.e === "number" && actionValue.c.e < now) return {
|
|
78
|
+
kind: "invalid",
|
|
79
|
+
reason: "stale"
|
|
80
|
+
};
|
|
81
|
+
const expectedUser = actionValue.c.u?.trim();
|
|
82
|
+
if (expectedUser && expectedUser !== (event.operator.open_id ?? "").trim()) return {
|
|
83
|
+
kind: "invalid",
|
|
84
|
+
reason: "wrong_user"
|
|
85
|
+
};
|
|
86
|
+
const expectedChat = actionValue.c.h?.trim();
|
|
87
|
+
if (expectedChat && expectedChat !== (event.context.chat_id ?? "").trim()) return {
|
|
88
|
+
kind: "invalid",
|
|
89
|
+
reason: "wrong_conversation"
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
kind: "structured",
|
|
94
|
+
envelope: actionValue
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region extensions/feishu/src/native-card.ts
|
|
99
|
+
const FEISHU_CARD_TEMPLATES = /* @__PURE__ */ new Set([
|
|
100
|
+
"blue",
|
|
101
|
+
"green",
|
|
102
|
+
"red",
|
|
103
|
+
"orange",
|
|
104
|
+
"purple",
|
|
105
|
+
"indigo",
|
|
106
|
+
"wathet",
|
|
107
|
+
"turquoise",
|
|
108
|
+
"yellow",
|
|
109
|
+
"grey",
|
|
110
|
+
"carmine",
|
|
111
|
+
"violet",
|
|
112
|
+
"lime"
|
|
113
|
+
]);
|
|
114
|
+
function resolveFeishuCardTemplate(template) {
|
|
115
|
+
const normalized = normalizeOptionalLowercaseString(template);
|
|
116
|
+
if (!normalized || !FEISHU_CARD_TEMPLATES.has(normalized)) return;
|
|
117
|
+
return normalized;
|
|
118
|
+
}
|
|
119
|
+
function escapeFeishuCardMarkdownText(text) {
|
|
120
|
+
return text.replace(/[&<>]/g, (char) => {
|
|
121
|
+
switch (char) {
|
|
122
|
+
case "&": return "&";
|
|
123
|
+
case "<": return "<";
|
|
124
|
+
case ">": return ">";
|
|
125
|
+
default: return char;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function escapeFeishuCardPlainText(text) {
|
|
130
|
+
return escapeFeishuCardMarkdownText(text).replace(/([\\`*_{}[\]()#+\-!|>~])/g, "\\$1");
|
|
131
|
+
}
|
|
132
|
+
function resolveSafeFeishuButtonUrl(url) {
|
|
133
|
+
const trimmed = typeof url === "string" ? url.trim() : "";
|
|
134
|
+
if (!trimmed) return;
|
|
135
|
+
try {
|
|
136
|
+
const parsed = new URL(trimmed);
|
|
137
|
+
return parsed.protocol === "https:" || parsed.protocol === "http:" ? trimmed : void 0;
|
|
138
|
+
} catch {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function sanitizeNativeFeishuButtonBehavior(behavior) {
|
|
143
|
+
if (!isRecord(behavior)) return;
|
|
144
|
+
if (behavior.type === "open_url") {
|
|
145
|
+
const safeUrl = resolveSafeFeishuButtonUrl(behavior.default_url) ?? resolveSafeFeishuButtonUrl(behavior.url);
|
|
146
|
+
return safeUrl ? {
|
|
147
|
+
type: "open_url",
|
|
148
|
+
default_url: safeUrl
|
|
149
|
+
} : void 0;
|
|
150
|
+
}
|
|
151
|
+
if (behavior.type === "callback" && isRecord(behavior.value) && behavior.value.oc === "ocf1") return {
|
|
152
|
+
type: "callback",
|
|
153
|
+
value: behavior.value
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function sanitizeNativeFeishuCardButton(button) {
|
|
157
|
+
if (!isRecord(button)) return;
|
|
158
|
+
const text = isRecord(button.text) && typeof button.text.content === "string" ? button.text.content : void 0;
|
|
159
|
+
if (!text?.trim()) return;
|
|
160
|
+
const style = button.type === "danger" ? "danger" : button.type === "primary" || button.type === "success" ? "primary" : void 0;
|
|
161
|
+
const behaviors = Array.isArray(button.behaviors) ? button.behaviors.map((behavior) => sanitizeNativeFeishuButtonBehavior(behavior)).filter((behavior) => Boolean(behavior)) : [];
|
|
162
|
+
const rootSafeUrl = resolveSafeFeishuButtonUrl(button.url);
|
|
163
|
+
if (rootSafeUrl) behaviors.push({
|
|
164
|
+
type: "open_url",
|
|
165
|
+
default_url: rootSafeUrl
|
|
166
|
+
});
|
|
167
|
+
if (isRecord(button.value) && button.value.oc === "ocf1") behaviors.push({
|
|
168
|
+
type: "callback",
|
|
169
|
+
value: button.value
|
|
170
|
+
});
|
|
171
|
+
if (behaviors.length === 0) return;
|
|
172
|
+
return {
|
|
173
|
+
tag: "button",
|
|
174
|
+
text: {
|
|
175
|
+
tag: "plain_text",
|
|
176
|
+
content: text
|
|
177
|
+
},
|
|
178
|
+
type: style === "danger" ? "danger" : style === "primary" ? "primary" : "default",
|
|
179
|
+
behaviors
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function sanitizeNativeFeishuCardElements(element) {
|
|
183
|
+
if (!isRecord(element) || typeof element.tag !== "string") return [];
|
|
184
|
+
if (element.tag === "hr") return [{ tag: "hr" }];
|
|
185
|
+
if (element.tag === "markdown" && typeof element.content === "string") return [{
|
|
186
|
+
tag: "markdown",
|
|
187
|
+
content: escapeFeishuCardMarkdownText(element.content)
|
|
188
|
+
}];
|
|
189
|
+
if (element.tag === "div" && isRecord(element.text)) {
|
|
190
|
+
const text = element.text;
|
|
191
|
+
if (text.tag === "lark_md" && typeof text.content === "string") return [{
|
|
192
|
+
tag: "markdown",
|
|
193
|
+
content: escapeFeishuCardMarkdownText(text.content)
|
|
194
|
+
}];
|
|
195
|
+
if (text.tag === "plain_text" && typeof text.content === "string") return [{
|
|
196
|
+
tag: "markdown",
|
|
197
|
+
content: escapeFeishuCardPlainText(text.content)
|
|
198
|
+
}];
|
|
199
|
+
return [];
|
|
200
|
+
}
|
|
201
|
+
if (element.tag === "button") {
|
|
202
|
+
const button = sanitizeNativeFeishuCardButton(element);
|
|
203
|
+
return button ? [button] : [];
|
|
204
|
+
}
|
|
205
|
+
if (element.tag === "action" && Array.isArray(element.actions)) return element.actions.map((action) => sanitizeNativeFeishuCardButton(action)).filter((action) => Boolean(action));
|
|
206
|
+
return [];
|
|
207
|
+
}
|
|
208
|
+
function sanitizeNativeFeishuCard(card) {
|
|
209
|
+
const normalizedCard = card.type === "interactive" && isRecord(card.card) ? card.card : card;
|
|
210
|
+
const body = isRecord(normalizedCard.body) ? normalizedCard.body : void 0;
|
|
211
|
+
const elements = (Array.isArray(body?.elements) ? body.elements : Array.isArray(normalizedCard.elements) ? normalizedCard.elements : []).flatMap((element) => sanitizeNativeFeishuCardElements(element)).filter((element) => Boolean(element));
|
|
212
|
+
if (elements.length === 0) return;
|
|
213
|
+
const header = isRecord(normalizedCard.header) ? normalizedCard.header : void 0;
|
|
214
|
+
const title = isRecord(header?.title) && typeof header.title.content === "string" ? header.title.content : void 0;
|
|
215
|
+
return {
|
|
216
|
+
schema: "2.0",
|
|
217
|
+
config: { width_mode: "fill" },
|
|
218
|
+
...title?.trim() ? { header: {
|
|
219
|
+
title: {
|
|
220
|
+
tag: "plain_text",
|
|
221
|
+
content: title
|
|
222
|
+
},
|
|
223
|
+
template: resolveFeishuCardTemplate(typeof header?.template === "string" ? header.template : void 0) ?? "blue"
|
|
224
|
+
} } : {},
|
|
225
|
+
body: { elements }
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function readNativeFeishuCardJson(text, options) {
|
|
229
|
+
let trimmed = text?.trim();
|
|
230
|
+
const responsePrefix = options?.responsePrefix;
|
|
231
|
+
if (trimmed && responsePrefix && trimmed.startsWith(responsePrefix)) {
|
|
232
|
+
const suffix = trimmed.slice(responsePrefix.length);
|
|
233
|
+
if (/^\s+\{/.test(suffix)) trimmed = suffix.trimStart();
|
|
234
|
+
}
|
|
235
|
+
if (!trimmed?.startsWith("{") || !trimmed.endsWith("}")) return;
|
|
236
|
+
try {
|
|
237
|
+
const parsed = JSON.parse(trimmed);
|
|
238
|
+
return isRecord(parsed) ? sanitizeNativeFeishuCard(parsed) : void 0;
|
|
239
|
+
} catch {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region extensions/feishu/src/send-result.ts
|
|
245
|
+
function resolveFeishuReceiptKind(msgType) {
|
|
246
|
+
switch (msgType) {
|
|
247
|
+
case "audio": return "voice";
|
|
248
|
+
case "image":
|
|
249
|
+
case "media":
|
|
250
|
+
case "file": return "media";
|
|
251
|
+
case "interactive": return "card";
|
|
252
|
+
case "post":
|
|
253
|
+
case "text": return "text";
|
|
254
|
+
default: return "unknown";
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function createFeishuSendReceipt(params) {
|
|
258
|
+
const messageId = params.messageId?.trim();
|
|
259
|
+
const chatId = params.chatId.trim();
|
|
260
|
+
return createMessageReceiptFromOutboundResults({
|
|
261
|
+
results: messageId ? [{
|
|
262
|
+
channel: "feishu",
|
|
263
|
+
messageId,
|
|
264
|
+
chatId,
|
|
265
|
+
conversationId: chatId
|
|
266
|
+
}] : [],
|
|
267
|
+
...chatId ? { threadId: chatId } : {},
|
|
268
|
+
kind: params.kind ?? "unknown"
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
function assertFeishuMessageApiSuccess(response, errorPrefix) {
|
|
272
|
+
if (response.code !== 0) throw new Error(`${errorPrefix}: ${response.msg || `code ${response.code}`}`);
|
|
273
|
+
}
|
|
274
|
+
function toFeishuSendResult(response, chatId, kind) {
|
|
275
|
+
const messageId = response.data?.message_id ?? "unknown";
|
|
276
|
+
return {
|
|
277
|
+
messageId,
|
|
278
|
+
chatId,
|
|
279
|
+
receipt: createFeishuSendReceipt({
|
|
280
|
+
messageId,
|
|
281
|
+
chatId,
|
|
282
|
+
kind
|
|
283
|
+
})
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
//#endregion
|
|
287
|
+
export { readNativeFeishuCardJson as a, FEISHU_CARD_INTERACTION_VERSION as c, decodeFeishuCardAction as d, toFeishuSendResult as i, buildFeishuCardActionTextFallback as l, createFeishuSendReceipt as n, resolveFeishuCardTemplate as o, resolveFeishuReceiptKind as r, sanitizeNativeFeishuCard as s, assertFeishuMessageApiSuccess as t, createFeishuCardInteractionEnvelope as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-
|
|
1
|
+
import { r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-CdLdoot3.js";
|
|
2
2
|
//#region extensions/feishu/src/session-conversation.ts
|
|
3
3
|
function resolveFeishuParentConversationCandidates(rawId) {
|
|
4
4
|
const parsed = parseFeishuConversationId({ conversationId: rawId });
|
package/dist/session-key-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as resolveFeishuSessionConversation } from "./session-conversation-
|
|
1
|
+
import { t as resolveFeishuSessionConversation } from "./session-conversation-BYuoVJwl.js";
|
|
2
2
|
export { resolveFeishuSessionConversation as resolveSessionConversation };
|
package/dist/setup-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-
|
|
1
|
+
import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-DwCydAeD.js";
|
|
2
2
|
export { feishuPlugin, feishuSetupAdapter, feishuSetupWizard };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { r as normalizeFeishuTarget } from "./targets-BUjQ1TcA.js";
|
|
3
|
-
import { r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-
|
|
3
|
+
import { r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-CdLdoot3.js";
|
|
4
4
|
import { n as getFeishuThreadBindingManager } from "./thread-bindings-V0bwk0A1.js";
|
|
5
5
|
import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
//#region extensions/feishu/src/subagent-hooks.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
2
2
|
//#region extensions/feishu/subagent-hooks-api.ts
|
|
3
|
-
const loadFeishuSubagentHooksModule = createLazyRuntimeModule(() => import("./subagent-hooks-
|
|
3
|
+
const loadFeishuSubagentHooksModule = createLazyRuntimeModule(() => import("./subagent-hooks-B2iWPYJ1.js").then((n) => n.i));
|
|
4
4
|
function registerFeishuSubagentHooks(api) {
|
|
5
5
|
api.on("subagent_delivery_target", async (event) => {
|
|
6
6
|
const { handleFeishuSubagentDeliveryTarget } = await loadFeishuSubagentHooksModule();
|
|
@@ -681,6 +681,38 @@ try {
|
|
|
681
681
|
}
|
|
682
682
|
```
|
|
683
683
|
|
|
684
|
+
#### Custom scopes/events/callbacks (addons) and updating an existing app
|
|
685
|
+
|
|
686
|
+
When creating an app, use `addons` to **incrementally** request scopes, event subscriptions and callbacks on top of the platform base template. They are pre-filled into the confirm page shown after the user scans the QR code, and take effect once the user confirms:
|
|
687
|
+
|
|
688
|
+
```typescript
|
|
689
|
+
// Create: incrementally request scopes/events/callbacks, and only allow
|
|
690
|
+
// creating a new app (selecting an existing app is disabled)
|
|
691
|
+
const result = await lark.registerApp({
|
|
692
|
+
addons: {
|
|
693
|
+
scopes: { tenant: ['im:message:send_as_bot'], user: ['calendar:calendar:read'] },
|
|
694
|
+
events: { items: { tenant: ['im.message.receive_v1'] } },
|
|
695
|
+
callbacks: { items: ['card.action.trigger'] },
|
|
696
|
+
},
|
|
697
|
+
createOnly: true,
|
|
698
|
+
onQRCodeReady(info) { /* ... */ },
|
|
699
|
+
});
|
|
700
|
+
|
|
701
|
+
// Update: pass the appId of an existing app to let the user re-scan and
|
|
702
|
+
// confirm, incrementally granting scopes to that app
|
|
703
|
+
await lark.registerApp({
|
|
704
|
+
appId: 'cli_xxx',
|
|
705
|
+
addons: { scopes: { tenant: ['drive:drive.metadata:readonly'] } },
|
|
706
|
+
onQRCodeReady(info) { /* ... */ },
|
|
707
|
+
});
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
Notes:
|
|
711
|
+
|
|
712
|
+
- `addons` is **additive only**: items are merged on top of the base template; base permissions can never be removed.
|
|
713
|
+
- Only the 5 public config types (tenant/user scopes, tenant/user events, callbacks) are supported. Sensitive config (event subscription type and request URLs, `security.*`, encrypt keys, etc.) cannot travel via `addons` — use the [update application config OpenAPI](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v7/application-v7/application-config/patch) instead.
|
|
714
|
+
- The SDK only validates the shape, not the item names; names unknown to the platform catalog are silently ignored by the confirm page.
|
|
715
|
+
|
|
684
716
|
#### `registerApp` parameters
|
|
685
717
|
|
|
686
718
|
| Parameter | Description | Type | Required | Default |
|
|
@@ -695,6 +727,14 @@ try {
|
|
|
695
727
|
| appPreset.avatar | App avatar URL(s). 1-6 URLs supported; the first one is selected by default. Allowed formats: png / jpg / jpeg / webp / gif (gif is sampled to a single frame, not animated) | string \| string[] | No | - |
|
|
696
728
|
| appPreset.name | App name. Supports the `{user}` placeholder (replaced with the scanning user's name) | string | No | - |
|
|
697
729
|
| appPreset.desc | App description. Supports the `{user}` placeholder | string | No | - |
|
|
730
|
+
| addons | Incremental scopes/events/callbacks pre-filled into the confirm page, effective after user confirmation. See "Custom scopes/events/callbacks" above | AppAddons | No | - |
|
|
731
|
+
| addons.scopes.tenant | App-identity (tenant) scopes, e.g. `im:message:send_as_bot` | string[] | No | - |
|
|
732
|
+
| addons.scopes.user | User-identity scopes, e.g. `calendar:calendar:read` | string[] | No | - |
|
|
733
|
+
| addons.events.items.tenant | App-identity events, e.g. `im.message.receive_v1` | string[] | No | - |
|
|
734
|
+
| addons.events.items.user | User-identity events, e.g. `calendar.calendar.event.changed_v4` | string[] | No | - |
|
|
735
|
+
| addons.callbacks.items | Callbacks, e.g. `card.action.trigger` | string[] | No | - |
|
|
736
|
+
| createOnly | When `true`, the landing page only allows creating a new app — the "select existing app" entry is hidden, preventing accidental overwrite of an existing app's config. Takes precedence over `appId` when both are set | boolean | No | - |
|
|
737
|
+
| appId | App ID (`cli_` prefix) of an existing app. When set, the flow updates that app's config: the confirm page shows the diff brought by `addons` and the user explicitly re-authorizes. Ignored when `createOnly` is `true` — the page still runs the create-new-app flow | string | No | - |
|
|
698
738
|
|
|
699
739
|
#### Return value
|
|
700
740
|
|
|
@@ -743,6 +743,36 @@ try {
|
|
|
743
743
|
}
|
|
744
744
|
```
|
|
745
745
|
|
|
746
|
+
#### 自定义权限/事件/回调(addons)与更新已有应用
|
|
747
|
+
|
|
748
|
+
创建应用时,可通过 `addons` 在平台基础模板上**增量**申请权限、事件订阅和回调,这些配置会预填到用户扫码后的确认页中,用户确认后生效:
|
|
749
|
+
|
|
750
|
+
```typescript
|
|
751
|
+
// 创建:增量申请权限/事件/回调,且只允许创建新应用(不可选择已有应用)
|
|
752
|
+
const result = await lark.registerApp({
|
|
753
|
+
addons: {
|
|
754
|
+
scopes: { tenant: ['im:message:send_as_bot'], user: ['calendar:calendar:read'] },
|
|
755
|
+
events: { items: { tenant: ['im.message.receive_v1'] } },
|
|
756
|
+
callbacks: { items: ['card.action.trigger'] },
|
|
757
|
+
},
|
|
758
|
+
createOnly: true,
|
|
759
|
+
onQRCodeReady(info) { /* ... */ },
|
|
760
|
+
});
|
|
761
|
+
|
|
762
|
+
// 更新:传入已有应用的 appId,让用户重新扫码确认,为该应用增量开通权限
|
|
763
|
+
await lark.registerApp({
|
|
764
|
+
appId: 'cli_xxx',
|
|
765
|
+
addons: { scopes: { tenant: ['drive:drive.metadata:readonly'] } },
|
|
766
|
+
onQRCodeReady(info) { /* ... */ },
|
|
767
|
+
});
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
注意:
|
|
771
|
+
|
|
772
|
+
- `addons` 仅支持在基础模板上**增量叠加**,不支持删减基础权限。
|
|
773
|
+
- 仅支持 5 类公开配置(应用/用户身份权限、应用/用户身份事件、回调)。敏感配置(事件订阅方式与回调地址、`security.*`、加密 key 等)不能通过 `addons` 传入,需调用[更新应用开发配置 OpenAPI](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v7/application-v7/application-config/patch)。
|
|
774
|
+
- SDK 只校验数据形状,不校验权限点/事件/回调名称是否存在;平台目录中不存在的名称会被确认页忽略。
|
|
775
|
+
|
|
746
776
|
#### `registerApp`参数
|
|
747
777
|
|
|
748
778
|
| 参数 | 描述 | 类型 | 必须 | 默认 |
|
|
@@ -757,6 +787,14 @@ try {
|
|
|
757
787
|
| appPreset.avatar | 应用头像 URL,支持 1-6 个;传多个时默认选中第一个。支持 png / jpg / jpeg / webp / gif(gif 自动取一帧,不保留动图) | string \| string[] | 否 | - |
|
|
758
788
|
| appPreset.name | 应用名称,支持 `{user}` 占位符(替换为扫码用户名称) | string | 否 | - |
|
|
759
789
|
| appPreset.desc | 应用描述,支持 `{user}` 占位符 | string | 否 | - |
|
|
790
|
+
| addons | 增量权限/事件/回调配置,预填到扫码后的确认页,用户确认后生效。详见上方「自定义权限/事件/回调」 | AppAddons | 否 | - |
|
|
791
|
+
| addons.scopes.tenant | 应用身份权限列表,如 `im:message:send_as_bot` | string[] | 否 | - |
|
|
792
|
+
| addons.scopes.user | 用户身份权限列表,如 `calendar:calendar:read` | string[] | 否 | - |
|
|
793
|
+
| addons.events.items.tenant | 应用身份事件列表,如 `im.message.receive_v1` | string[] | 否 | - |
|
|
794
|
+
| addons.events.items.user | 用户身份事件列表,如 `calendar.calendar.event.changed_v4` | string[] | 否 | - |
|
|
795
|
+
| addons.callbacks.items | 回调列表,如 `card.action.trigger` | string[] | 否 | - |
|
|
796
|
+
| createOnly | 为 `true` 时落地页仅允许创建新应用,隐藏「选择已有应用」入口,避免误选已有应用导致其配置被覆盖。与 `appId` 同时传入时优先级更高 | boolean | 否 | - |
|
|
797
|
+
| appId | 已有应用的 App ID(`cli_` 开头)。传入后流程变为更新该应用的配置:确认页展示 `addons` 带来的权限 diff,用户确认后生效。`createOnly` 为 `true` 时被忽略,仍走创建新应用流程 | string | 否 | - |
|
|
760
798
|
|
|
761
799
|
#### 返回值
|
|
762
800
|
|