@openclaw/feishu 2026.7.1-beta.1 → 2026.7.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accounts-Cfzht2Hc.js → accounts-Bs5uJ4h0.js} +4 -3
- package/dist/api.js +56 -65
- package/dist/{app-registration-DapxBG7t.js → app-registration-BwQ-aGTe.js} +23 -15
- package/dist/{channel-C1Uun9zo.js → channel-DwCydAeD.js} +77 -58
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-Cjc4wDNg.js → channel.runtime-COT2fcCf.js} +96 -149
- package/dist/contract-api.js +1 -1
- package/dist/{conversation-id-DuL575sn.js → conversation-id-CdLdoot3.js} +5 -1
- package/dist/{drive-djUl8IRC.js → drive-BupYOoHa.js} +46 -42
- package/dist/json-response-CheljwGr.js +9 -0
- package/dist/{monitor-CQo4C7q9.js → monitor-5gbbXIO-.js} +3 -6
- package/dist/{monitor.account-08br3nkU.js → monitor.account-lMwQ5v1Q.js} +149 -67
- package/dist/runtime-api.js +1 -1
- package/dist/{send-BcPh0I15.js → send-DzLGqjEt.js} +33 -40
- package/dist/send-result-BMQw-YhV.js +287 -0
- package/dist/{session-conversation-CZSMgac-.js → session-conversation-BYuoVJwl.js} +1 -1
- package/dist/session-key-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/{subagent-hooks-1pqt5tAA.js → subagent-hooks-B2iWPYJ1.js} +1 -1
- package/dist/subagent-hooks-api.js +2 -5
- package/node_modules/@larksuiteoapi/node-sdk/README.md +40 -0
- package/node_modules/@larksuiteoapi/node-sdk/README.zh.md +38 -0
- package/node_modules/@larksuiteoapi/node-sdk/es/index.js +183 -24
- package/node_modules/@larksuiteoapi/node-sdk/lib/index.js +186 -23
- package/node_modules/@larksuiteoapi/node-sdk/package.json +1 -72
- package/node_modules/@larksuiteoapi/node-sdk/types/index.d.ts +105 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/assert/strict.d.ts +10 -1
- package/node_modules/@types/node/assert.d.ts +144 -17
- package/node_modules/@types/node/async_hooks.d.ts +9 -9
- package/node_modules/@types/node/buffer.d.ts +64 -30
- package/node_modules/@types/node/child_process.d.ts +17 -21
- package/node_modules/@types/node/cluster.d.ts +13 -13
- package/node_modules/@types/node/console.d.ts +1 -1
- package/node_modules/@types/node/crypto.d.ts +471 -575
- package/node_modules/@types/node/diagnostics_channel.d.ts +274 -32
- package/node_modules/@types/node/dns.d.ts +15 -15
- package/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/node/ffi.d.ts +486 -0
- package/node_modules/@types/node/fs/promises.d.ts +7 -4
- package/node_modules/@types/node/fs.d.ts +24 -18
- package/node_modules/@types/node/globals.d.ts +4 -4
- package/node_modules/@types/node/http.d.ts +30 -5
- package/node_modules/@types/node/http2.d.ts +5 -1
- package/node_modules/@types/node/index.d.ts +1 -3
- package/node_modules/@types/node/inspector.d.ts +1 -1
- package/node_modules/@types/node/module.d.ts +16 -45
- package/node_modules/@types/node/net.d.ts +1 -1
- package/node_modules/@types/node/os.d.ts +2 -2
- package/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/node/perf_hooks.d.ts +1 -9
- package/node_modules/@types/node/process.d.ts +25 -12
- package/node_modules/@types/node/quic.d.ts +92 -11
- package/node_modules/@types/node/readline.d.ts +12 -11
- package/node_modules/@types/node/repl.d.ts +10 -10
- package/node_modules/@types/node/sqlite.d.ts +56 -1
- package/node_modules/@types/node/stream/iter.d.ts +150 -0
- package/node_modules/@types/node/stream/promises.d.ts +2 -2
- package/node_modules/@types/node/stream/web.d.ts +1 -1
- package/node_modules/@types/node/stream.d.ts +37 -5
- package/node_modules/@types/node/test/reporters.d.ts +1 -1
- package/node_modules/@types/node/test.d.ts +120 -10
- package/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/@types/node/ts5.6/index.d.ts +2 -4
- package/node_modules/@types/node/ts5.7/index.d.ts +1 -3
- package/node_modules/@types/node/url.d.ts +3 -3
- package/node_modules/@types/node/util/types.d.ts +1 -1
- package/node_modules/@types/node/util.d.ts +22 -22
- package/node_modules/@types/node/v8.d.ts +85 -3
- package/node_modules/@types/node/vm.d.ts +9 -9
- package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
- package/node_modules/@types/node/worker_threads.d.ts +10 -12
- package/node_modules/@types/node/zlib.d.ts +3 -3
- package/node_modules/side-channel/CHANGELOG.md +10 -0
- package/node_modules/side-channel/README.md +1 -1
- package/node_modules/side-channel/index.js +5 -2
- package/node_modules/side-channel/package.json +10 -10
- package/node_modules/side-channel/test/index.js +16 -0
- package/node_modules/typebox/build/compile/validator.d.mts +2 -7
- package/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/node_modules/typebox/build/format/_idna.mjs +36 -6
- package/node_modules/typebox/build/format/_puny.mjs +4 -1
- package/node_modules/typebox/build/format/uuid.d.mts +2 -2
- package/node_modules/typebox/build/format/uuid.mjs +3 -3
- package/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/node_modules/typebox/build/guard/guard.d.mts +4 -8
- package/node_modules/typebox/build/guard/guard.mjs +5 -13
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
- package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
- package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
- package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
- package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
- package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
- package/node_modules/typebox/build/type/action/index.d.mts +7 -4
- package/node_modules/typebox/build/type/action/index.mjs +7 -4
- package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
- package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
- package/node_modules/typebox/build/type/action/module.d.mts +8 -7
- package/node_modules/typebox/build/type/action/module.mjs +7 -6
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
- package/node_modules/typebox/build/type/action/with.d.mts +11 -0
- package/node_modules/typebox/build/type/action/with.mjs +11 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/index.mjs +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
- package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
- package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
- package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
- package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
- package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
- package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
- package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
- package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
- package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
- package/node_modules/typebox/build/type/extends/object.mjs +25 -3
- package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
- package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/record.mjs +23 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
- package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
- package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
- package/node_modules/typebox/build/type/extends/union.mjs +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
- package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
- package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
- package/node_modules/typebox/build/type/script/parser.mjs +22 -22
- package/node_modules/typebox/build/type/script/script.d.mts +3 -4
- package/node_modules/typebox/build/type/script/script.mjs +3 -2
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
- package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
- package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
- package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
- package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
- package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
- package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/node_modules/typebox/build/type/types/call.d.mts +3 -3
- package/node_modules/typebox/build/type/types/call.mjs +3 -2
- package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
- package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
- package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
- package/node_modules/typebox/build/type/types/enum.mjs +5 -0
- package/node_modules/typebox/build/type/types/index.d.mts +1 -4
- package/node_modules/typebox/build/type/types/index.mjs +1 -4
- package/node_modules/typebox/build/type/types/number.d.mts +1 -1
- package/node_modules/typebox/build/type/types/number.mjs +1 -1
- package/node_modules/typebox/build/type/types/record.d.mts +13 -7
- package/node_modules/typebox/build/type/types/record.mjs +15 -9
- package/node_modules/typebox/build/type/types/static.d.mts +2 -5
- package/node_modules/typebox/build/typebox.d.mts +4 -8
- package/node_modules/typebox/build/typebox.mjs +4 -8
- package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
- package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
- package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
- package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
- package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/index.d.mts +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
- package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
- package/node_modules/typebox/build/value/value.d.mts +0 -1
- package/node_modules/typebox/build/value/value.mjs +0 -1
- package/node_modules/typebox/package.json +25 -25
- package/node_modules/typebox/readme.md +97 -80
- package/node_modules/undici-types/agent.d.ts +0 -2
- package/node_modules/undici-types/client.d.ts +25 -19
- package/node_modules/undici-types/dispatcher.d.ts +7 -33
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici-types/fetch.d.ts +24 -4
- package/node_modules/undici-types/h2c-client.d.ts +6 -6
- package/node_modules/undici-types/handlers.d.ts +1 -2
- package/node_modules/undici-types/header.d.ts +5 -0
- package/node_modules/undici-types/index.d.ts +3 -1
- package/node_modules/undici-types/interceptors.d.ts +1 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/pool.d.ts +0 -2
- package/node_modules/undici-types/proxy-agent.d.ts +2 -2
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -2
- package/node_modules/undici-types/snapshot-agent.d.ts +4 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +2 -2
- package/node_modules/undici-types/webidl.d.ts +0 -1
- package/npm-shrinkwrap.json +23 -23
- package/package.json +6 -6
- package/skills/feishu-drive/SKILL.md +17 -3
- package/dist/send-result-DSsIa4-p.js +0 -140
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
- package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
- package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/node_modules/typebox/build/type/action/options.d.mts +0 -11
- package/node_modules/typebox/build/type/action/options.mjs +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
- package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
|
@@ -71,7 +71,7 @@ function formatFeishuApiFailure(error, errorPrefix, options = {}) {
|
|
|
71
71
|
function createFeishuApiError(error, errorPrefix, options = {}) {
|
|
72
72
|
return new Error(formatFeishuApiFailure(error, errorPrefix, options), { cause: error });
|
|
73
73
|
}
|
|
74
|
-
const FEISHU_SEND_RATE_LIMIT_CODES = new Set([230020, 11232]);
|
|
74
|
+
const FEISHU_SEND_RATE_LIMIT_CODES = /* @__PURE__ */ new Set([230020, 11232]);
|
|
75
75
|
const FEISHU_SEND_MAX_RETRIES = 2;
|
|
76
76
|
const FEISHU_SEND_RETRY_BASE_MS = 500;
|
|
77
77
|
/**
|
|
@@ -138,7 +138,8 @@ function readDocsLinkUrl(element) {
|
|
|
138
138
|
}
|
|
139
139
|
function readMentionUserId(element) {
|
|
140
140
|
const mention = isRecord$1(element.mention) ? element.mention : void 0;
|
|
141
|
-
|
|
141
|
+
const person = isRecord$1(element.person) ? element.person : void 0;
|
|
142
|
+
return normalizeString(person?.user_id) || normalizeString(mention?.user_id) || normalizeString(mention?.open_id) || normalizeString(element.mention_user) || normalizeString(element.user_id) || void 0;
|
|
142
143
|
}
|
|
143
144
|
function readMentionDisplayText(element, userId) {
|
|
144
145
|
const mention = isRecord$1(element.mention) ? element.mention : void 0;
|
|
@@ -156,7 +157,7 @@ function readElementTextPreservingWhitespace(element) {
|
|
|
156
157
|
}
|
|
157
158
|
const FEISHU_LINK_TOKEN_MIN_LENGTH = 22;
|
|
158
159
|
const FEISHU_LINK_TOKEN_MAX_LENGTH = 28;
|
|
159
|
-
const COMMENT_LINK_KIND_ALIASES = new Map([
|
|
160
|
+
const COMMENT_LINK_KIND_ALIASES = /* @__PURE__ */ new Map([
|
|
160
161
|
["doc", "doc"],
|
|
161
162
|
["docs", "doc"],
|
|
162
163
|
["docx", "docx"],
|
package/dist/api.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as listEnabledFeishuAccounts } from "./accounts-
|
|
2
|
-
import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./channel-
|
|
3
|
-
import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-
|
|
1
|
+
import { r as listEnabledFeishuAccounts } from "./accounts-Bs5uJ4h0.js";
|
|
2
|
+
import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./channel-DwCydAeD.js";
|
|
3
|
+
import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-CdLdoot3.js";
|
|
4
4
|
import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.js";
|
|
5
5
|
import { r as createFeishuClient } from "./client-BwgAJuvo.js";
|
|
6
|
-
import { a as
|
|
6
|
+
import { a as toolExecutionErrorResult, d as createFeishuToolClient, f as resolveAnyEnabledFeishuToolsConfig, m as resolveToolsConfig, n as registerFeishuDriveTools, o as unknownToolActionResult, p as resolveFeishuToolAccount, u as registerFeishuChatTools } from "./drive-BupYOoHa.js";
|
|
7
7
|
import { n as getFeishuThreadBindingManager, r as testing, t as createFeishuThreadBindingManager } from "./thread-bindings-V0bwk0A1.js";
|
|
8
|
-
import { n as handleFeishuSubagentEnded, r as handleFeishuSubagentSpawning, t as handleFeishuSubagentDeliveryTarget } from "./subagent-hooks-
|
|
8
|
+
import { n as handleFeishuSubagentEnded, r as handleFeishuSubagentSpawning, t as handleFeishuSubagentDeliveryTarget } from "./subagent-hooks-B2iWPYJ1.js";
|
|
9
9
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
|
|
11
11
|
import { existsSync } from "node:fs";
|
|
@@ -13,6 +13,7 @@ import { homedir } from "node:os";
|
|
|
13
13
|
import { basename, isAbsolute, resolve } from "node:path";
|
|
14
14
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
15
15
|
import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
|
|
16
|
+
import { jsonResult } from "openclaw/plugin-sdk/tool-results";
|
|
16
17
|
import { Type } from "typebox";
|
|
17
18
|
import { readPositiveIntegerParam } from "openclaw/plugin-sdk/param-readers";
|
|
18
19
|
import { createClackPrompter } from "openclaw/plugin-sdk/setup-runtime";
|
|
@@ -563,15 +564,6 @@ async function updateColorText(client, docToken, blockId, content) {
|
|
|
563
564
|
}
|
|
564
565
|
//#endregion
|
|
565
566
|
//#region extensions/feishu/src/docx.ts
|
|
566
|
-
function json$1(data) {
|
|
567
|
-
return {
|
|
568
|
-
content: [{
|
|
569
|
-
type: "text",
|
|
570
|
-
text: JSON.stringify(data, null, 2)
|
|
571
|
-
}],
|
|
572
|
-
details: data
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
567
|
function resolveDocToolLocalRoots(ctx) {
|
|
576
568
|
if (ctx.fsPolicy?.workspaceOnly !== true) return;
|
|
577
569
|
const workspaceDir = ctx.workspaceDir?.trim();
|
|
@@ -609,7 +601,7 @@ const BLOCK_TYPE_NAMES = {
|
|
|
609
601
|
31: "Table",
|
|
610
602
|
32: "TableCell"
|
|
611
603
|
};
|
|
612
|
-
const UNSUPPORTED_CREATE_TYPES = new Set([31, 32]);
|
|
604
|
+
const UNSUPPORTED_CREATE_TYPES = /* @__PURE__ */ new Set([31, 32]);
|
|
613
605
|
/** Clean blocks for insertion (remove unsupported types and read-only fields) */
|
|
614
606
|
function cleanBlocksForInsert(blocks) {
|
|
615
607
|
const skipped = [];
|
|
@@ -1049,7 +1041,7 @@ async function uploadFileBlock(client, docToken, maxBytes, localRoots, url, file
|
|
|
1049
1041
|
note: "File uploaded to drive. Use the file_token to reference it. Direct file block creation is not supported by the Feishu API."
|
|
1050
1042
|
};
|
|
1051
1043
|
}
|
|
1052
|
-
const STRUCTURED_BLOCK_TYPES = new Set([
|
|
1044
|
+
const STRUCTURED_BLOCK_TYPES = /* @__PURE__ */ new Set([
|
|
1053
1045
|
14,
|
|
1054
1046
|
18,
|
|
1055
1047
|
21,
|
|
@@ -1428,33 +1420,33 @@ function registerFeishuDocTools(api) {
|
|
|
1428
1420
|
try {
|
|
1429
1421
|
const client = getClient(p, defaultAccountId);
|
|
1430
1422
|
switch (p.action) {
|
|
1431
|
-
case "read": return
|
|
1432
|
-
case "write": return
|
|
1433
|
-
case "append": return
|
|
1434
|
-
case "insert": return
|
|
1435
|
-
case "create": return
|
|
1423
|
+
case "read": return jsonResult(await readDoc(client, p.doc_token));
|
|
1424
|
+
case "write": return jsonResult(await writeDoc(client, p.doc_token, p.content, getMediaMaxBytes(p, defaultAccountId), api.logger));
|
|
1425
|
+
case "append": return jsonResult(await appendDoc(client, p.doc_token, p.content, getMediaMaxBytes(p, defaultAccountId), api.logger));
|
|
1426
|
+
case "insert": return jsonResult(await insertDoc(client, p.doc_token, p.content, p.after_block_id, getMediaMaxBytes(p, defaultAccountId), api.logger));
|
|
1427
|
+
case "create": return jsonResult(await createDoc(client, p.title, p.folder_token, {
|
|
1436
1428
|
grantToRequester: p.grant_to_requester,
|
|
1437
1429
|
requesterOpenId: trustedRequesterOpenId
|
|
1438
1430
|
}));
|
|
1439
|
-
case "list_blocks": return
|
|
1440
|
-
case "get_block": return
|
|
1441
|
-
case "update_block": return
|
|
1442
|
-
case "delete_block": return
|
|
1443
|
-
case "create_table": return
|
|
1444
|
-
case "write_table_cells": return
|
|
1445
|
-
case "create_table_with_values": return
|
|
1446
|
-
case "upload_image": return
|
|
1447
|
-
case "upload_file": return
|
|
1448
|
-
case "color_text": return
|
|
1449
|
-
case "insert_table_row": return
|
|
1450
|
-
case "insert_table_column": return
|
|
1451
|
-
case "delete_table_rows": return
|
|
1452
|
-
case "delete_table_columns": return
|
|
1453
|
-
case "merge_table_cells": return
|
|
1454
|
-
default: return
|
|
1431
|
+
case "list_blocks": return jsonResult(await listBlocks(client, p.doc_token));
|
|
1432
|
+
case "get_block": return jsonResult(await getBlock(client, p.doc_token, p.block_id));
|
|
1433
|
+
case "update_block": return jsonResult(await updateBlock(client, p.doc_token, p.block_id, p.content));
|
|
1434
|
+
case "delete_block": return jsonResult(await deleteBlock(client, p.doc_token, p.block_id));
|
|
1435
|
+
case "create_table": return jsonResult(await createTable(client, p.doc_token, p.row_size, p.column_size, p.parent_block_id, p.column_width));
|
|
1436
|
+
case "write_table_cells": return jsonResult(await writeTableCells(client, p.doc_token, p.table_block_id, p.values));
|
|
1437
|
+
case "create_table_with_values": return jsonResult(await createTableWithValues(client, p.doc_token, p.row_size, p.column_size, p.values, p.parent_block_id, p.column_width));
|
|
1438
|
+
case "upload_image": return jsonResult(await uploadImageBlock(client, p.doc_token, getMediaMaxBytes(p, defaultAccountId), mediaLocalRoots, p.url, p.file_path, p.parent_block_id, p.filename, p.index, p.image));
|
|
1439
|
+
case "upload_file": return jsonResult(await uploadFileBlock(client, p.doc_token, getMediaMaxBytes(p, defaultAccountId), mediaLocalRoots, p.url, p.file_path, p.parent_block_id, p.filename));
|
|
1440
|
+
case "color_text": return jsonResult(await updateColorText(client, p.doc_token, p.block_id, p.content));
|
|
1441
|
+
case "insert_table_row": return jsonResult(await insertTableRow(client, p.doc_token, p.block_id, p.row_index));
|
|
1442
|
+
case "insert_table_column": return jsonResult(await insertTableColumn(client, p.doc_token, p.block_id, p.column_index));
|
|
1443
|
+
case "delete_table_rows": return jsonResult(await deleteTableRows(client, p.doc_token, p.block_id, p.row_start, p.row_count));
|
|
1444
|
+
case "delete_table_columns": return jsonResult(await deleteTableColumns(client, p.doc_token, p.block_id, p.column_start, p.column_count));
|
|
1445
|
+
case "merge_table_cells": return jsonResult(await mergeTableCells(client, p.doc_token, p.block_id, p.row_start, p.row_end, p.column_start, p.column_end));
|
|
1446
|
+
default: return jsonResult({ error: "Unknown action" });
|
|
1455
1447
|
}
|
|
1456
1448
|
} catch (err) {
|
|
1457
|
-
return
|
|
1449
|
+
return jsonResult({ error: formatErrorMessage(err) });
|
|
1458
1450
|
}
|
|
1459
1451
|
}
|
|
1460
1452
|
};
|
|
@@ -1469,7 +1461,7 @@ function registerFeishuDocTools(api) {
|
|
|
1469
1461
|
parameters: Type.Object({}),
|
|
1470
1462
|
async execute() {
|
|
1471
1463
|
try {
|
|
1472
|
-
return
|
|
1464
|
+
return jsonResult(await listAppScopes(createFeishuToolClient({
|
|
1473
1465
|
api,
|
|
1474
1466
|
defaultAccountId: ctx.agentAccountId,
|
|
1475
1467
|
requiredTool: {
|
|
@@ -1478,7 +1470,7 @@ function registerFeishuDocTools(api) {
|
|
|
1478
1470
|
}
|
|
1479
1471
|
})));
|
|
1480
1472
|
} catch (err) {
|
|
1481
|
-
return
|
|
1473
|
+
return jsonResult({ error: formatErrorMessage(err) });
|
|
1482
1474
|
}
|
|
1483
1475
|
}
|
|
1484
1476
|
}), { name: "feishu_app_scopes" });
|
|
@@ -1694,27 +1686,27 @@ function registerFeishuWikiTools(api) {
|
|
|
1694
1686
|
}
|
|
1695
1687
|
});
|
|
1696
1688
|
switch (p.action) {
|
|
1697
|
-
case "spaces": return
|
|
1689
|
+
case "spaces": return jsonResult(await listSpaces(createClient(), readWikiPageSize(p), p.page_token));
|
|
1698
1690
|
case "nodes": {
|
|
1699
1691
|
const spaceId = requireWikiSpaceId(p.space_id, "space_id");
|
|
1700
|
-
return
|
|
1692
|
+
return jsonResult(await listNodes(createClient(), spaceId, p.parent_node_token, readWikiPageSize(p), p.page_token));
|
|
1701
1693
|
}
|
|
1702
|
-
case "get": return
|
|
1694
|
+
case "get": return jsonResult(await getNode(createClient(), p.token));
|
|
1703
1695
|
case "search":
|
|
1704
1696
|
optionalWikiSpaceId(p.space_id, "space_id");
|
|
1705
1697
|
createClient();
|
|
1706
|
-
return
|
|
1698
|
+
return jsonResult({ error: "Search is not available. Use feishu_wiki with action: 'nodes' to browse or action: 'get' to lookup by token." });
|
|
1707
1699
|
case "create": {
|
|
1708
1700
|
const spaceId = requireWikiSpaceId(p.space_id, "space_id");
|
|
1709
|
-
return
|
|
1701
|
+
return jsonResult(await createNode(createClient(), spaceId, p.title, p.obj_type, p.parent_node_token));
|
|
1710
1702
|
}
|
|
1711
1703
|
case "move": {
|
|
1712
1704
|
const spaceId = requireWikiSpaceId(p.space_id, "space_id");
|
|
1713
|
-
return
|
|
1705
|
+
return jsonResult(await moveNode(createClient(), spaceId, p.node_token, optionalWikiSpaceId(p.target_space_id, "target_space_id"), p.target_parent_token));
|
|
1714
1706
|
}
|
|
1715
1707
|
case "rename": {
|
|
1716
1708
|
const spaceId = requireWikiSpaceId(p.space_id, "space_id");
|
|
1717
|
-
return
|
|
1709
|
+
return jsonResult(await renameNode(createClient(), spaceId, p.node_token, p.title));
|
|
1718
1710
|
}
|
|
1719
1711
|
default: return unknownToolActionResult(p.action);
|
|
1720
1712
|
}
|
|
@@ -1845,9 +1837,9 @@ function registerFeishuPermTools(api) {
|
|
|
1845
1837
|
}
|
|
1846
1838
|
});
|
|
1847
1839
|
switch (p.action) {
|
|
1848
|
-
case "list": return
|
|
1849
|
-
case "add": return
|
|
1850
|
-
case "remove": return
|
|
1840
|
+
case "list": return jsonResult(await listMembers(client, p.token, p.type));
|
|
1841
|
+
case "add": return jsonResult(await addMember(client, p.token, p.type, p.member_type, p.member_id, p.perm));
|
|
1842
|
+
case "remove": return jsonResult(await removeMember(client, p.token, p.type, p.member_type, p.member_id));
|
|
1851
1843
|
default: return unknownToolActionResult(p.action);
|
|
1852
1844
|
}
|
|
1853
1845
|
} catch (err) {
|
|
@@ -1859,15 +1851,6 @@ function registerFeishuPermTools(api) {
|
|
|
1859
1851
|
}
|
|
1860
1852
|
//#endregion
|
|
1861
1853
|
//#region extensions/feishu/src/bitable.ts
|
|
1862
|
-
function json(data) {
|
|
1863
|
-
return {
|
|
1864
|
-
content: [{
|
|
1865
|
-
type: "text",
|
|
1866
|
-
text: JSON.stringify(data, null, 2)
|
|
1867
|
-
}],
|
|
1868
|
-
details: data
|
|
1869
|
-
};
|
|
1870
|
-
}
|
|
1871
1854
|
var LarkApiError = class extends Error {
|
|
1872
1855
|
constructor(code, message, api, context) {
|
|
1873
1856
|
super(`[${api}] code=${code} message=${message}`);
|
|
@@ -2040,7 +2023,7 @@ async function createRecord(client, appToken, tableId, fields) {
|
|
|
2040
2023
|
return { record: res.data?.record };
|
|
2041
2024
|
}
|
|
2042
2025
|
/** Default field types created for new Bitable tables (to be cleaned up) */
|
|
2043
|
-
const DEFAULT_CLEANUP_FIELD_TYPES = new Set([
|
|
2026
|
+
const DEFAULT_CLEANUP_FIELD_TYPES = /* @__PURE__ */ new Set([
|
|
2044
2027
|
3,
|
|
2045
2028
|
5,
|
|
2046
2029
|
17
|
|
@@ -2237,10 +2220,18 @@ const GetRecordSchema = Type.Object({
|
|
|
2237
2220
|
table_id: Type.String({ description: "Table ID (from URL: ?table=YYY)" }),
|
|
2238
2221
|
record_id: Type.String({ description: "Record ID to retrieve" })
|
|
2239
2222
|
});
|
|
2223
|
+
const BitableFieldValueSchema = Type.Unsafe({ type: [
|
|
2224
|
+
"string",
|
|
2225
|
+
"number",
|
|
2226
|
+
"boolean",
|
|
2227
|
+
"object",
|
|
2228
|
+
"array",
|
|
2229
|
+
"null"
|
|
2230
|
+
] });
|
|
2240
2231
|
const CreateRecordSchema = Type.Object({
|
|
2241
2232
|
app_token: Type.String({ description: "Bitable app token (use feishu_bitable_get_meta to get from URL)" }),
|
|
2242
2233
|
table_id: Type.String({ description: "Table ID (from URL: ?table=YYY)" }),
|
|
2243
|
-
fields: Type.Record(Type.String(),
|
|
2234
|
+
fields: Type.Record(Type.String(), BitableFieldValueSchema, { description: "Field values keyed by field name. Format by type: Text='string', Number=123, SingleSelect='Option', MultiSelect=['A','B'], DateTime=timestamp_ms, User=[{id:'ou_xxx'}], URL={text:'Display',link:'https://...'}" })
|
|
2244
2235
|
});
|
|
2245
2236
|
const CreateAppSchema = Type.Object({
|
|
2246
2237
|
name: Type.String({ description: "Name for the new Bitable application" }),
|
|
@@ -2254,13 +2245,13 @@ const CreateFieldSchema = Type.Object({
|
|
|
2254
2245
|
description: "Field type ID: 1=Text, 2=Number, 3=SingleSelect, 4=MultiSelect, 5=DateTime, 7=Checkbox, 11=User, 13=Phone, 15=URL, 17=Attachment, 18=SingleLink, 19=Lookup, 20=Formula, 21=DuplexLink, 22=Location, 23=GroupChat, 1001=CreatedTime, 1002=ModifiedTime, 1003=CreatedUser, 1004=ModifiedUser, 1005=AutoNumber",
|
|
2255
2246
|
minimum: 1
|
|
2256
2247
|
}),
|
|
2257
|
-
property: Type.Optional(Type.Record(Type.String(),
|
|
2248
|
+
property: Type.Optional(Type.Record(Type.String(), BitableFieldValueSchema, { description: "Field-specific properties (e.g., options for SingleSelect, format for Number)" }))
|
|
2258
2249
|
});
|
|
2259
2250
|
const UpdateRecordSchema = Type.Object({
|
|
2260
2251
|
app_token: Type.String({ description: "Bitable app token (use feishu_bitable_get_meta to get from URL)" }),
|
|
2261
2252
|
table_id: Type.String({ description: "Table ID (from URL: ?table=YYY)" }),
|
|
2262
2253
|
record_id: Type.String({ description: "Record ID to update" }),
|
|
2263
|
-
fields: Type.Record(Type.String(),
|
|
2254
|
+
fields: Type.Record(Type.String(), BitableFieldValueSchema, { description: "Field values to update (same format as create_record)" })
|
|
2264
2255
|
});
|
|
2265
2256
|
function registerFeishuBitableTools(api) {
|
|
2266
2257
|
if (!api.config) return;
|
|
@@ -2284,12 +2275,12 @@ function registerFeishuBitableTools(api) {
|
|
|
2284
2275
|
parameters: params.parameters,
|
|
2285
2276
|
async execute(_toolCallId, rawParams) {
|
|
2286
2277
|
try {
|
|
2287
|
-
return
|
|
2278
|
+
return jsonResult(await params.execute({
|
|
2288
2279
|
params: rawParams,
|
|
2289
2280
|
defaultAccountId: ctx.agentAccountId
|
|
2290
2281
|
}));
|
|
2291
2282
|
} catch (err) {
|
|
2292
|
-
return
|
|
2283
|
+
return jsonResult({ error: formatErrorMessage(err) });
|
|
2293
2284
|
}
|
|
2294
2285
|
}
|
|
2295
2286
|
}), { name: params.name });
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { t as readFeishuJsonResponse } from "./json-response-CheljwGr.js";
|
|
1
2
|
import { finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number-runtime";
|
|
3
|
+
import { sleep } from "openclaw/plugin-sdk/runtime-env";
|
|
2
4
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
3
5
|
import { renderQrTerminal } from "openclaw/plugin-sdk/media-runtime";
|
|
4
6
|
//#region extensions/feishu/src/app-registration.ts
|
|
@@ -18,7 +20,7 @@ const DEFAULT_REGISTRATION_EXPIRE_SECONDS = 600;
|
|
|
18
20
|
function accountsBaseUrl(domain) {
|
|
19
21
|
return domain === "lark" ? LARK_ACCOUNTS_URL : FEISHU_ACCOUNTS_URL;
|
|
20
22
|
}
|
|
21
|
-
async function postRegistration(baseUrl, body) {
|
|
23
|
+
async function postRegistration(baseUrl, body, options) {
|
|
22
24
|
return await fetchFeishuJson({
|
|
23
25
|
url: `${baseUrl}${REGISTRATION_PATH}`,
|
|
24
26
|
init: {
|
|
@@ -27,18 +29,22 @@ async function postRegistration(baseUrl, body) {
|
|
|
27
29
|
body: new URLSearchParams(body).toString(),
|
|
28
30
|
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
|
|
29
31
|
},
|
|
30
|
-
auditContext: "feishu.app-registration.post"
|
|
32
|
+
auditContext: "feishu.app-registration.post",
|
|
33
|
+
fetchImpl: options?.fetchImpl,
|
|
34
|
+
lookupFn: options?.lookupFn
|
|
31
35
|
});
|
|
32
36
|
}
|
|
33
37
|
async function fetchFeishuJson(params) {
|
|
34
38
|
const { response, release } = await fetchWithSsrFGuard({
|
|
35
39
|
url: params.url,
|
|
36
40
|
init: params.init,
|
|
41
|
+
fetchImpl: params.fetchImpl,
|
|
42
|
+
lookupFn: params.lookupFn,
|
|
37
43
|
policy: { allowedHostnames: [new URL(params.url).hostname] },
|
|
38
44
|
auditContext: params.auditContext
|
|
39
45
|
});
|
|
40
46
|
try {
|
|
41
|
-
return await response
|
|
47
|
+
return await readFeishuJsonResponse(response);
|
|
42
48
|
} finally {
|
|
43
49
|
await release();
|
|
44
50
|
}
|
|
@@ -49,20 +55,20 @@ async function fetchFeishuJson(params) {
|
|
|
49
55
|
*
|
|
50
56
|
* @throws If the environment does not support `client_secret`.
|
|
51
57
|
*/
|
|
52
|
-
async function initAppRegistration(domain = "feishu") {
|
|
53
|
-
if (!(await postRegistration(accountsBaseUrl(domain), { action: "init" })).supported_auth_methods?.includes("client_secret")) throw new Error("Current environment does not support client_secret auth method");
|
|
58
|
+
async function initAppRegistration(domain = "feishu", options) {
|
|
59
|
+
if (!(await postRegistration(accountsBaseUrl(domain), { action: "init" }, options)).supported_auth_methods?.includes("client_secret")) throw new Error("Current environment does not support client_secret auth method");
|
|
54
60
|
}
|
|
55
61
|
/**
|
|
56
62
|
* Step 2: Begin the device-code flow. Returns a device code and a QR URL
|
|
57
63
|
* that the user should scan with Feishu/Lark mobile app.
|
|
58
64
|
*/
|
|
59
|
-
async function beginAppRegistration(domain = "feishu") {
|
|
65
|
+
async function beginAppRegistration(domain = "feishu", options) {
|
|
60
66
|
const res = await postRegistration(accountsBaseUrl(domain), {
|
|
61
67
|
action: "begin",
|
|
62
68
|
archetype: "PersonalAgent",
|
|
63
69
|
auth_method: "client_secret",
|
|
64
70
|
request_user_info: "open_id"
|
|
65
|
-
});
|
|
71
|
+
}, options);
|
|
66
72
|
const qrUrl = new URL(res.verification_uri_complete);
|
|
67
73
|
qrUrl.searchParams.set("from", "oc_onboard");
|
|
68
74
|
qrUrl.searchParams.set("tp", "ob_cli_app");
|
|
@@ -80,7 +86,7 @@ async function beginAppRegistration(domain = "feishu") {
|
|
|
80
86
|
* detected as "lark".
|
|
81
87
|
*/
|
|
82
88
|
async function pollAppRegistration(params) {
|
|
83
|
-
const { deviceCode, expireIn, initialDomain = "feishu", abortSignal, tp } = params;
|
|
89
|
+
const { deviceCode, expireIn, initialDomain = "feishu", abortSignal, tp, fetchImpl, lookupFn } = params;
|
|
84
90
|
let currentInterval = params.interval;
|
|
85
91
|
let domain = initialDomain;
|
|
86
92
|
let domainSwitched = false;
|
|
@@ -95,6 +101,9 @@ async function pollAppRegistration(params) {
|
|
|
95
101
|
action: "poll",
|
|
96
102
|
device_code: deviceCode,
|
|
97
103
|
...tp ? { tp } : {}
|
|
104
|
+
}, {
|
|
105
|
+
fetchImpl,
|
|
106
|
+
lookupFn
|
|
98
107
|
});
|
|
99
108
|
} catch {
|
|
100
109
|
await sleepRegistrationPollInterval(currentInterval);
|
|
@@ -158,7 +167,9 @@ async function getAppOwnerOpenId(params) {
|
|
|
158
167
|
}),
|
|
159
168
|
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
|
|
160
169
|
},
|
|
161
|
-
auditContext: "feishu.app-registration.owner-token"
|
|
170
|
+
auditContext: "feishu.app-registration.owner-token",
|
|
171
|
+
fetchImpl: params.fetchImpl,
|
|
172
|
+
lookupFn: params.lookupFn
|
|
162
173
|
});
|
|
163
174
|
if (!tokenData.tenant_access_token) return;
|
|
164
175
|
const appData = await fetchFeishuJson({
|
|
@@ -171,7 +182,9 @@ async function getAppOwnerOpenId(params) {
|
|
|
171
182
|
},
|
|
172
183
|
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
|
|
173
184
|
},
|
|
174
|
-
auditContext: "feishu.app-registration.owner-app"
|
|
185
|
+
auditContext: "feishu.app-registration.owner-app",
|
|
186
|
+
fetchImpl: params.fetchImpl,
|
|
187
|
+
lookupFn: params.lookupFn
|
|
175
188
|
});
|
|
176
189
|
if (appData.code !== 0) return;
|
|
177
190
|
const app = appData.data?.app;
|
|
@@ -181,11 +194,6 @@ async function getAppOwnerOpenId(params) {
|
|
|
181
194
|
return;
|
|
182
195
|
}
|
|
183
196
|
}
|
|
184
|
-
function sleep(ms) {
|
|
185
|
-
return new Promise((resolve) => {
|
|
186
|
-
setTimeout(resolve, ms);
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
197
|
function sleepRegistrationPollInterval(intervalSeconds) {
|
|
190
198
|
return sleep(finiteSecondsToTimerSafeMilliseconds(intervalSeconds) ?? finiteSecondsToTimerSafeMilliseconds(DEFAULT_REGISTRATION_POLL_INTERVAL_SECONDS) ?? REQUEST_TIMEOUT_MS);
|
|
191
199
|
}
|