@openclaw/feishu 2026.10.5-beta.4 → 2026.10.10-beta.1
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/.setup/{channel-DykAJJhn.mjs → channel-VyjzWvqm.mjs} +40 -39
- package/dist/.setup/{channel.runtime-CC15v8AP.mjs → channel.runtime-BjGRGNPJ.mjs} +6 -6
- package/dist/.setup/{chat-fC3dvxFs.mjs → chat-qj1pEIcO.mjs} +2 -2
- package/dist/.setup/{client-wwr8PGPH.mjs → client-BTiFlqqL.mjs} +2 -2
- package/dist/.setup/{doctor-contract-oIpUWtNO.mjs → doctor-contract-BNXcJcWR.mjs} +2 -2
- package/dist/.setup/{monitor-Cy9ofY1Q.mjs → monitor-DzmCjp4q.mjs} +3 -3
- package/dist/.setup/{monitor.account-UbN1RhlP.mjs → monitor.account-CpMwDf-a.mjs} +151 -367
- package/dist/.setup/{probe-DXnFxq5j.mjs → probe-s0hiM44D.mjs} +3 -3
- package/dist/.setup/{reply-delivery-result-iCCrdxE1.mjs → reply-delivery-result-DknmIzOB.mjs} +128 -18
- package/dist/.setup/runtime-setter-api-BrQHE03y.mjs +2 -0
- package/dist/.setup/secret-contract-DEyvsehF.mjs +47 -0
- package/dist/.setup/secret-contract-api-XhxLE0dW.mjs +2 -0
- package/dist/.setup/setup-api-CH41-_5S.mjs +2 -0
- package/dist/.setup/{subagent-hooks-CGq_-NJZ.mjs → subagent-hooks-CvVuM0O4.mjs} +2 -2
- package/dist/.setup/{thread-bindings-Pii2fAST.mjs → thread-bindings-BxKmOara.mjs} +24 -4
- package/dist/api.js +15 -20
- package/dist/channel-plugin-api.js +1 -2
- package/dist/doctor-contract-api.js +1 -2
- package/dist/runtime-setter-api.js +1 -2
- package/dist/secret-contract-api.js +1 -2
- package/dist/security-contract-api.js +1 -2
- package/dist/session-binding-contract-api.js +1 -2
- package/dist/session-key-api.js +1 -2
- package/dist/setup-api.js +1 -2
- package/dist/setup-entry.js +3 -3
- package/dist/subagent-hooks-api.js +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +148 -0
- package/node_modules/@openclaw/fs-safe/README.md +20 -4
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +28 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +11 -5
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +4 -2
- package/node_modules/@openclaw/fs-safe/dist/archive.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/atomic-io.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.js +9 -2
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +2 -1
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/config.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +8 -7
- package/node_modules/@openclaw/fs-safe/dist/copy-link.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-link.js +170 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-metadata.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-metadata.js +39 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.js +11 -2
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.js +4 -2
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +3 -6
- package/node_modules/@openclaw/fs-safe/dist/copy.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/create.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/creation-boundary.js +7 -4
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +7 -4
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +20 -5
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +27 -2
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.d.ts +7 -7
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +9 -4
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/entry-publication.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/exact-identity.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/exact-identity.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +4 -2
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +11 -9
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +7 -1
- package/node_modules/@openclaw/fs-safe/dist/file-identity.js +27 -5
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +1 -2
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-write-lease.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/file-write-lease.js +42 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +22 -15
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/hardlink-fallback.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/hardlink-fallback.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/index.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +16 -3
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.js +24 -13
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +85 -18
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.js +11 -0
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.js +6 -4
- package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.js +26 -2
- package/node_modules/@openclaw/fs-safe/dist/native-guidance.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-guidance.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/native-move-fallback.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-move-fallback.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +8 -6
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +44 -4
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +85 -15
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +3 -3
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +33 -6
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +22 -3
- package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.js +4 -3
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file-metadata.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file-metadata.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +15 -5
- package/node_modules/@openclaw/fs-safe/dist/native-stat-identity.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-stat-identity.js +7 -0
- package/node_modules/@openclaw/fs-safe/dist/native-status.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/native-status.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +31 -4
- package/node_modules/@openclaw/fs-safe/dist/native.js +107 -9
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +9 -1
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +9 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +83 -47
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +8 -3
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +10 -8
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +7 -5
- package/node_modules/@openclaw/fs-safe/dist/pipe.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/pipe.js +26 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +2 -5
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +38 -10
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +92 -10
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +5 -3
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +26 -20
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.js +3 -4
- package/node_modules/@openclaw/fs-safe/dist/realpath.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +11 -15
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/root-copy.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/root-copy.js +128 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.d.ts +8 -13
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +252 -27
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list-types.d.ts +11 -8
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +35 -13
- package/node_modules/@openclaw/fs-safe/dist/root-file-open-batch-sync.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-open-batch-sync.js +108 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +15 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +154 -175
- package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.js +239 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +37 -15
- package/node_modules/@openclaw/fs-safe/dist/root-native-creation-path.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/root-native-creation-path.js +56 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-public-types.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-native.js +95 -16
- package/node_modules/@openclaw/fs-safe/dist/root-remove.js +6 -4
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +23 -19
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +8 -6
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +10 -4
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +5 -3
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +13 -2
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +71 -3
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/windows-appcontainer.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-appcontainer.js +39 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +25 -36
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +24 -5
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.exe +0 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.js +7 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-test-hooks.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-test-hooks.js +51 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +12 -10
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +2 -1
- package/node_modules/@openclaw/fs-safe/docs/archive.md +16 -0
- package/node_modules/@openclaw/fs-safe/docs/config.md +71 -1
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +45 -5
- package/node_modules/@openclaw/fs-safe/docs/copy.md +45 -5
- package/node_modules/@openclaw/fs-safe/docs/durability.md +34 -7
- package/node_modules/@openclaw/fs-safe/docs/errors.md +8 -0
- package/node_modules/@openclaw/fs-safe/docs/guest.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +47 -27
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +6 -6
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +79 -6
- package/node_modules/@openclaw/fs-safe/docs/native.md +279 -8
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +64 -15
- package/node_modules/@openclaw/fs-safe/docs/pipe.md +81 -0
- package/node_modules/@openclaw/fs-safe/docs/platform-capabilities.md +63 -0
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +10 -0
- package/node_modules/@openclaw/fs-safe/docs/queue-link-free-design.md +237 -0
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +23 -3
- package/node_modules/@openclaw/fs-safe/docs/reading.md +56 -2
- package/node_modules/@openclaw/fs-safe/docs/regular-file.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +5 -5
- package/node_modules/@openclaw/fs-safe/docs/secure-file.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +35 -0
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +31 -13
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +18 -0
- package/node_modules/@openclaw/fs-safe/docs/store.md +15 -0
- package/node_modules/@openclaw/fs-safe/docs/temp.md +39 -0
- package/node_modules/@openclaw/fs-safe/docs/testing.md +13 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +51 -81
- package/node_modules/@openclaw/fs-safe/docs/walk.md +4 -1
- package/node_modules/@openclaw/fs-safe/docs/watch.md +3 -2
- package/node_modules/@openclaw/fs-safe/docs/writing.md +121 -14
- package/node_modules/@openclaw/fs-safe/package.json +21 -12
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-freebsd-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-arm64/package.json +29 -0
- package/node_modules/@openclaw/fs-safe-freebsd-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-x64/package.json +29 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/package.json +29 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/node_modules/mdast-util-from-markdown/dev/lib/index.js +152 -45
- package/node_modules/mdast-util-from-markdown/dev/lib/types.d.ts +26 -0
- package/node_modules/mdast-util-from-markdown/lib/index.js +133 -40
- package/node_modules/mdast-util-from-markdown/lib/types.d.ts +26 -0
- package/node_modules/mdast-util-from-markdown/package.json +6 -7
- package/node_modules/mdast-util-from-markdown/readme.md +15 -1
- package/node_modules/typebox/build/value/clean/from_object.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/package.json +7 -7
- package/dist/.setup/runtime-setter-api-CG-RC4_r.mjs +0 -3
- package/dist/.setup/secret-contract-CI1wCr9i.mjs +0 -60
- package/dist/.setup/secret-contract-api-o4CeT4nP.mjs +0 -3
- package/dist/.setup/setup-api-CLonEDID.mjs +0 -3
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.cs +0 -336
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.ps1 +0 -90
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as __exportAll } from "./doctor-contract-
|
|
2
|
-
import { r as createFeishuClient } from "./client-
|
|
1
|
+
import { _ as __exportAll } from "./doctor-contract-BNXcJcWR.mjs";
|
|
2
|
+
import { r as createFeishuClient } from "./client-BTiFlqqL.mjs";
|
|
3
3
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
4
4
|
import { isFutureDateTimestampMs, resolveExpiresAtMsFromDurationMs, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
5
5
|
import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
6
|
-
import { createHash } from "node:crypto";
|
|
7
6
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
7
|
+
import { createHash } from "node:crypto";
|
|
8
8
|
import { racePromiseWithAbortSignal, raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
9
9
|
//#region extensions/feishu/src/async.ts
|
|
10
10
|
const RACE_TIMEOUT = Symbol("race-timeout");
|
package/dist/.setup/{reply-delivery-result-iCCrdxE1.mjs → reply-delivery-result-DknmIzOB.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as normalizeFeishuExternalKey, d as listEnabledFeishuAccounts, f as listFeishuAccountIds, g as resolveFeishuRuntimeAccount, h as resolveFeishuAccount, m as resolveDefaultFeishuAccountId } from "./doctor-contract-
|
|
1
|
+
import { c as normalizeFeishuExternalKey, d as listEnabledFeishuAccounts, f as listFeishuAccountIds, g as resolveFeishuRuntimeAccount, h as resolveFeishuAccount, m as resolveDefaultFeishuAccountId } from "./doctor-contract-BNXcJcWR.mjs";
|
|
2
2
|
import { l as normalizeFeishuTarget, s as detectIdType, u as resolveReceiveIdType } from "./conversation-id-D00i9uy5.mjs";
|
|
3
3
|
import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.mjs";
|
|
4
|
-
import { c as withFeishuMessageDispatch, o as captureFeishuSendAuthority, r as createFeishuClient, s as runBeforeFeishuMessageDispatch } from "./client-
|
|
4
|
+
import { c as withFeishuMessageDispatch, o as captureFeishuSendAuthority, r as createFeishuClient, s as runBeforeFeishuMessageDispatch } from "./client-BTiFlqqL.mjs";
|
|
5
5
|
import { normalizeAccountId, normalizeOptionalAccountId, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
|
|
6
6
|
import { compileAllowlist, resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
|
|
7
7
|
import { ToolAuthorizationError } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -9,7 +9,7 @@ import { normalizeChannelDmPolicy } from "openclaw/plugin-sdk/channel-config-hel
|
|
|
9
9
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
10
10
|
import { PlatformMessageNotDispatchedError, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
11
11
|
import { legacyInteractiveReplyToPresentation, normalizeLegacyInteractiveReply, normalizeMessagePresentation, renderMessagePresentationChartFallbackText, renderMessagePresentationFallbackText, renderMessagePresentationTableFallbackText, renderPresentationForDelivery, resolveLegacyInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
|
|
12
|
-
import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
12
|
+
import { parseStrictNonNegativeInteger, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
13
13
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, normalizeTrimmedStringList, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
14
|
import { convertMarkdownTables, markdownToIRWithMeta } from "openclaw/plugin-sdk/text-chunking";
|
|
15
15
|
import { jsonResult } from "openclaw/plugin-sdk/tool-results";
|
|
@@ -33,6 +33,7 @@ import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, buildOutboundMediaLoadOptions, ru
|
|
|
33
33
|
import { resolvePreferredOpenClawTmpDir, withTempWorkspace } from "openclaw/plugin-sdk/temp-path";
|
|
34
34
|
import { saveMediaStream } from "openclaw/plugin-sdk/media-store";
|
|
35
35
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
36
|
+
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
36
37
|
import { escapeHtml, escapeRegExp, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
37
38
|
//#region extensions/feishu/src/card-interaction.ts
|
|
38
39
|
const FEISHU_CARD_INTERACTION_VERSION = "ocf1";
|
|
@@ -1345,7 +1346,10 @@ function registerFeishuTool(api, tool) {
|
|
|
1345
1346
|
}
|
|
1346
1347
|
}
|
|
1347
1348
|
};
|
|
1348
|
-
}, {
|
|
1349
|
+
}, {
|
|
1350
|
+
name: tool.name,
|
|
1351
|
+
...tool.workspaceAccess !== void 0 ? { workspaceAccess: tool.workspaceAccess } : {}
|
|
1352
|
+
});
|
|
1349
1353
|
}
|
|
1350
1354
|
//#endregion
|
|
1351
1355
|
//#region extensions/feishu/src/drive.ts
|
|
@@ -1787,6 +1791,92 @@ function resolveFeishuSendTarget(params) {
|
|
|
1787
1791
|
};
|
|
1788
1792
|
}
|
|
1789
1793
|
//#endregion
|
|
1794
|
+
//#region extensions/feishu/src/bot-sender-name.ts
|
|
1795
|
+
const STALE_CONTACT_SCOPE = "contact:contact.base:readonly";
|
|
1796
|
+
const FEISHU_USER_LOOKUP_UNAUTHORIZED_CODE = 41050;
|
|
1797
|
+
const SENDER_NAME_TTL_MS = 6e5;
|
|
1798
|
+
const SENDER_NAME_NEGATIVE_TTL_MS = 18e5;
|
|
1799
|
+
const SENDER_NAME_CACHE_MAX_SIZE = 500;
|
|
1800
|
+
const senderNameCache = /* @__PURE__ */ new Map();
|
|
1801
|
+
function extractFeishuApiError(err) {
|
|
1802
|
+
if (!err || typeof err !== "object") return null;
|
|
1803
|
+
const data = err.response?.data;
|
|
1804
|
+
if (!data || typeof data !== "object") return null;
|
|
1805
|
+
const feishuErr = data;
|
|
1806
|
+
if (typeof feishuErr.code !== "number") return null;
|
|
1807
|
+
return {
|
|
1808
|
+
code: feishuErr.code,
|
|
1809
|
+
message: typeof feishuErr.msg === "string" ? feishuErr.msg : ""
|
|
1810
|
+
};
|
|
1811
|
+
}
|
|
1812
|
+
function extractPermissionError(feishuErr) {
|
|
1813
|
+
if (feishuErr?.code !== 99991672) return null;
|
|
1814
|
+
const urlMatch = feishuErr.message.match(/https:\/\/[^\s,]+\/app\/[^\s,]+/);
|
|
1815
|
+
return {
|
|
1816
|
+
code: feishuErr.code,
|
|
1817
|
+
message: feishuErr.message,
|
|
1818
|
+
grantUrl: urlMatch?.[0]?.replaceAll(encodeURIComponent(STALE_CONTACT_SCOPE), encodeURIComponent("contact:user.base:readonly")).replaceAll(STALE_CONTACT_SCOPE, "contact:user.base:readonly")
|
|
1819
|
+
};
|
|
1820
|
+
}
|
|
1821
|
+
function writeSenderNameCache(key, entry) {
|
|
1822
|
+
senderNameCache.delete(key);
|
|
1823
|
+
senderNameCache.set(key, entry);
|
|
1824
|
+
pruneMapToMaxSize(senderNameCache, SENDER_NAME_CACHE_MAX_SIZE);
|
|
1825
|
+
}
|
|
1826
|
+
function resolveSenderLookupIdType(senderId) {
|
|
1827
|
+
if (senderId.startsWith("ou_")) return "open_id";
|
|
1828
|
+
if (senderId.startsWith("on_")) return "union_id";
|
|
1829
|
+
return "user_id";
|
|
1830
|
+
}
|
|
1831
|
+
async function resolveFeishuSenderName(params) {
|
|
1832
|
+
const { account, senderId, log } = params;
|
|
1833
|
+
if (!account.configured) return {};
|
|
1834
|
+
const normalizedSenderId = senderId.trim();
|
|
1835
|
+
if (!normalizedSenderId) return {};
|
|
1836
|
+
const cacheKey = `${account.accountId}:${normalizedSenderId}`;
|
|
1837
|
+
const cached = senderNameCache.get(cacheKey);
|
|
1838
|
+
if (cached && cached.expireAt > Date.now()) return cached.kind === "resolved" ? { name: cached.name } : {};
|
|
1839
|
+
if (cached) senderNameCache.delete(cacheKey);
|
|
1840
|
+
try {
|
|
1841
|
+
const client = createFeishuClient(account);
|
|
1842
|
+
const userIdType = resolveSenderLookupIdType(normalizedSenderId);
|
|
1843
|
+
const user = (await client.contact.user.get({
|
|
1844
|
+
path: { user_id: normalizedSenderId },
|
|
1845
|
+
params: { user_id_type: userIdType }
|
|
1846
|
+
})).data?.user;
|
|
1847
|
+
const name = user?.name ?? user?.nickname ?? user?.en_name;
|
|
1848
|
+
if (name) {
|
|
1849
|
+
writeSenderNameCache(cacheKey, {
|
|
1850
|
+
kind: "resolved",
|
|
1851
|
+
name,
|
|
1852
|
+
expireAt: Date.now() + SENDER_NAME_TTL_MS
|
|
1853
|
+
});
|
|
1854
|
+
return { name };
|
|
1855
|
+
}
|
|
1856
|
+
return {};
|
|
1857
|
+
} catch (err) {
|
|
1858
|
+
const feishuErr = extractFeishuApiError(err);
|
|
1859
|
+
const permErr = extractPermissionError(feishuErr);
|
|
1860
|
+
if (permErr) {
|
|
1861
|
+
if (normalizeLowercaseStringOrEmpty(permErr.message).includes(STALE_CONTACT_SCOPE)) {
|
|
1862
|
+
log(`feishu: ignoring stale permission scope error: ${permErr.message}`);
|
|
1863
|
+
return {};
|
|
1864
|
+
}
|
|
1865
|
+
log(`feishu: permission error resolving sender name: code=${permErr.code}`);
|
|
1866
|
+
return { permissionError: permErr };
|
|
1867
|
+
}
|
|
1868
|
+
if (feishuErr?.code === FEISHU_USER_LOOKUP_UNAUTHORIZED_CODE) {
|
|
1869
|
+
writeSenderNameCache(cacheKey, {
|
|
1870
|
+
kind: "unavailable",
|
|
1871
|
+
expireAt: Date.now() + SENDER_NAME_NEGATIVE_TTL_MS
|
|
1872
|
+
});
|
|
1873
|
+
return {};
|
|
1874
|
+
}
|
|
1875
|
+
log(`feishu: failed to resolve sender name for ${normalizedSenderId}: ${String(err)}`);
|
|
1876
|
+
return {};
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
//#endregion
|
|
1790
1880
|
//#region extensions/feishu/src/post.ts
|
|
1791
1881
|
const FALLBACK_POST_TEXT = "[Rich text message]";
|
|
1792
1882
|
const MARKDOWN_SPECIAL_CHARS = /([\\`*_{}[\]()#+\-!|>~])/g;
|
|
@@ -1832,7 +1922,11 @@ function renderEmotionElement(element) {
|
|
|
1832
1922
|
function renderCodeBlockElement(element) {
|
|
1833
1923
|
const language = sanitizeFenceLanguage(toStringOrEmpty(element.language) || toStringOrEmpty(element.lang));
|
|
1834
1924
|
const code = (toStringOrEmpty(element.text) || toStringOrEmpty(element.content)).replace(/\r\n/g, "\n");
|
|
1835
|
-
|
|
1925
|
+
const trailingNewline = code.endsWith("\n") ? "" : "\n";
|
|
1926
|
+
let fenceLength = 3;
|
|
1927
|
+
for (const run of code.matchAll(/`+/g)) fenceLength = Math.max(fenceLength, run[0].length + 1);
|
|
1928
|
+
const fence = "`".repeat(fenceLength);
|
|
1929
|
+
return `${fence}${language}\n${code}${trailingNewline}${fence}`;
|
|
1836
1930
|
}
|
|
1837
1931
|
function renderElement(element, attachments, mentionedOpenIds, renderMediaPlaceholders) {
|
|
1838
1932
|
if (!isRecord(element)) return escapeMarkdownText(toStringOrEmpty(element));
|
|
@@ -2179,7 +2273,7 @@ function formatSubMessageContent(content, contentType, mentions) {
|
|
|
2179
2273
|
return content;
|
|
2180
2274
|
}
|
|
2181
2275
|
}
|
|
2182
|
-
function parseMergeForwardContent(items) {
|
|
2276
|
+
async function parseMergeForwardContent(items, resolveSenderName) {
|
|
2183
2277
|
const maxMessages = 50;
|
|
2184
2278
|
if (items.length === 0) return "[Merged and Forwarded Message - no sub-messages]";
|
|
2185
2279
|
const container = items.find((item) => item.msg_type === "merge_forward" && !item.upper_message_id);
|
|
@@ -2187,7 +2281,16 @@ function parseMergeForwardContent(items) {
|
|
|
2187
2281
|
if (subMessages.length === 0) return "[Merged and Forwarded Message - no sub-messages found]";
|
|
2188
2282
|
subMessages.sort((a, b) => (parseStrictNonNegativeInteger(a.create_time) ?? 0) - (parseStrictNonNegativeInteger(b.create_time) ?? 0));
|
|
2189
2283
|
const lines = ["[Merged and Forwarded Messages]"];
|
|
2190
|
-
|
|
2284
|
+
const senderNames = /* @__PURE__ */ new Map();
|
|
2285
|
+
for (const item of subMessages.slice(0, maxMessages)) {
|
|
2286
|
+
const body = formatSubMessageContent(item.body?.content || "", item.msg_type || "text", item.mentions);
|
|
2287
|
+
const ms = parseStrictNonNegativeInteger(item.create_time);
|
|
2288
|
+
const timestamp = ms === void 0 ? void 0 : timestampMsToIsoString(ms);
|
|
2289
|
+
const senderId = item.sender?.id;
|
|
2290
|
+
if (senderId && resolveSenderName && !senderNames.has(senderId)) senderNames.set(senderId, await resolveSenderName(senderId) ?? senderId);
|
|
2291
|
+
const sender = senderId ? senderNames.get(senderId) ?? senderId : void 0;
|
|
2292
|
+
lines.push(`- ${timestamp ? `[${timestamp}] ` : ""}${sender ? `${sender}: ` : ""}${body}`);
|
|
2293
|
+
}
|
|
2191
2294
|
if (subMessages.length > maxMessages) lines.push(`... and ${subMessages.length - maxMessages} more messages`);
|
|
2192
2295
|
const rendered = lines.join("\n");
|
|
2193
2296
|
return rendered.length <= 2e4 ? rendered : `${truncateUtf16Safe(rendered, 19961).trimEnd()}
|
|
@@ -2364,10 +2467,20 @@ async function getMessageFeishu(params) {
|
|
|
2364
2467
|
const item = rawItem && (rawItem.body !== void 0 || rawItem.message_id !== void 0) ? rawItem : null;
|
|
2365
2468
|
if (!item) return null;
|
|
2366
2469
|
const parsedItem = parseFeishuMessageItem(item, messageId);
|
|
2367
|
-
if (parsedItem.contentType === "merge_forward" && responseItems)
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2470
|
+
if (parsedItem.contentType === "merge_forward" && responseItems) {
|
|
2471
|
+
const account = resolveFeishuRuntimeAccount({
|
|
2472
|
+
cfg,
|
|
2473
|
+
accountId
|
|
2474
|
+
});
|
|
2475
|
+
return {
|
|
2476
|
+
...parsedItem,
|
|
2477
|
+
content: await parseMergeForwardContent(responseItems, account.config.resolveSenderNames ?? true ? async (senderId) => (await resolveFeishuSenderName({
|
|
2478
|
+
account,
|
|
2479
|
+
senderId,
|
|
2480
|
+
log: (...args) => logVerbose(args.map(String).join(" "))
|
|
2481
|
+
})).name : void 0)
|
|
2482
|
+
};
|
|
2483
|
+
}
|
|
2371
2484
|
return parsedItem;
|
|
2372
2485
|
} catch {
|
|
2373
2486
|
return null;
|
|
@@ -2996,17 +3109,14 @@ function buildFeishuPresentationFallback(params) {
|
|
|
2996
3109
|
commentText: fallbackHasCommand ? `${fallbackText}\n\n> Interactive buttons are unavailable in Feishu document comments. You can type the command shown above manually.` : fallbackText
|
|
2997
3110
|
};
|
|
2998
3111
|
}
|
|
2999
|
-
function countFeishuCardElements(value
|
|
3000
|
-
if (Array.isArray(value)) return value.reduce((count, entry) => count + countFeishuCardElements(entry
|
|
3112
|
+
function countFeishuCardElements(value) {
|
|
3113
|
+
if (Array.isArray(value)) return value.reduce((count, entry) => count + countFeishuCardElements(entry), 0);
|
|
3001
3114
|
if (!isRecord(value)) return 0;
|
|
3002
|
-
if (ancestors.has(value)) return 201;
|
|
3003
|
-
ancestors.add(value);
|
|
3004
3115
|
let count = typeof value.tag === "string" ? 1 : 0;
|
|
3005
3116
|
for (const entry of Object.values(value)) {
|
|
3006
|
-
count += countFeishuCardElements(entry
|
|
3117
|
+
count += countFeishuCardElements(entry);
|
|
3007
3118
|
if (count > FEISHU_CARD_MAX_ELEMENTS) break;
|
|
3008
3119
|
}
|
|
3009
|
-
ancestors.delete(value);
|
|
3010
3120
|
return count;
|
|
3011
3121
|
}
|
|
3012
3122
|
function isFeishuCardWithinEnvelope(card) {
|
|
@@ -3313,4 +3423,4 @@ function createFeishuPartialReplyDeliveryError(cause, result) {
|
|
|
3313
3423
|
});
|
|
3314
3424
|
}
|
|
3315
3425
|
//#endregion
|
|
3316
|
-
export {
|
|
3426
|
+
export { resolveFeishuToolAccount as $, sendMessageFeishu as A, resolveFeishuGroupConfig as At, parseInteractiveCardContent as B, sendStickerFeishu as C, isFeishuGroupReadAllowed as Ct, getMessageFeishu as D, hasExplicitFeishuGroupConfig as Dt, editMessageFeishu as E, resolveFeishuChatReadPreliminaryAuthorization as Et, isFeishuBroadcastMention as F, normalizeFeishuChatType as Ft, resolveFeishuIdentityEmoji as G, resolveFeishuSenderName as H, isMentionForwardRequest as I, resolveFeishuChatType as It, registerFeishuDriveTools as J, resolveFeishuIdentityHeaderTitle as K, normalizeMentions as L, FEISHU_CARD_INTERACTION_VERSION as Lt, toFeishuMessageSendResult as M, resolveFeishuGroupSenderActivationIngressAccess as Mt, formatFeishuMediaContent as N, resolveFeishuGroupToolPolicy as Nt, listFeishuThreadMessages as O, normalizeFeishuAllowEntry as Ot, extractMentionTargets as P, resolveFeishuReplyPolicy as Pt, createFeishuToolClient as Q, isFeishuGroupChatType as R, createFeishuCardInteractionEnvelope as Rt, sendMediaFeishu as S, canEnumerateAllFeishuPeers as St, chunkFeishuCardMarkdown as T, readFeishuChatInfoWithAuthorization as Tt, createConfiguredFeishuClient as U, parsePostContent as V, buildFeishuMediaFallbackText as W, feishuExternalToolResult as X, registerFeishuTool as Y, unknownToolActionResult as Z, renderFeishuPresentationPayload as _, shouldUseFeishuCard as _t, shouldSendNoVisibleReplyFallback as a, formatFeishuApiError as at, withinCardTableLimit as b, authorizeFeishuChatMemberRead as bt, buildFeishuPayloadCard as c, buildFeishuCommentTarget as ct, consumeFeishuPresentationFallbackMarker as d, readNativeFeishuCardJson as dt, assertFeishuApiSuccess as et, feishuCardWithinTableLimit as f, resolveFeishuCardTemplate as ft, renderFeishuPresentationFallbackText as g, parseFeishuMarkdown as gt, readNativeFeishuCard as h, materializeFeishuPostMarkdownSoftBreaks as ht, noVisibleFeishuReplyDelivery as i, extractReplyText as it, sendStructuredCardFeishu as j, resolveFeishuGroupConversationIngressAccess as jt, sendCardFeishu as k, resolveFeishuDmIngressAccess as kt, buildFeishuPresentationCard as l, normalizeCommentFileType as lt, markRenderedFeishuCard as m, chunkFeishuPostMarkdown as mt, createFeishuReplyDeliveryResult as n, createCommentTypingReactionLifecycle as nt, FEISHU_PRESENTATION_CAPABILITIES as o, parseCommentContentElements as ot, isFeishuCardWithinEnvelope as p, chunkFeishuMarkdown as pt, deliverCommentThreadText as q, mergeFeishuReplyDeliveryResults as r, encodeQuery as rt, assertFeishuCardWithinEnvelope as s, requestFeishuApi as st, createFeishuPartialReplyDeliveryError as t, cleanupAmbientCommentTypingReaction as tt, buildFeishuPresentationFallback as u, parseFeishuCommentTarget as ut, renderFeishuReplyPayload as v, visitFeishuMarkdown as vt, shouldSuppressFeishuTextForVoiceMedia as w, isFeishuGroupReadEnabled as wt, saveMessageResourceFeishu as x, canEnumerateAllFeishuGroups as xt, resolveFeishuRichReply as y, assertFeishuChatReadAllowed as yt, normalizeFeishuEventChatType as z, decodeFeishuCardAction as zt };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
2
|
+
import { collectConditionalChannelFieldAssignments, createChannelSecretContract, hasConfiguredSecretInputValue, hasOwnProperty, normalizeSecretStringValue } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
3
|
+
//#region extensions/feishu/src/secret-contract.ts
|
|
4
|
+
const channelSecrets = createChannelSecretContract({
|
|
5
|
+
channelKey: "feishu",
|
|
6
|
+
account: [
|
|
7
|
+
"appSecret",
|
|
8
|
+
"encryptKey",
|
|
9
|
+
"verificationToken"
|
|
10
|
+
],
|
|
11
|
+
channel: [
|
|
12
|
+
"appSecret",
|
|
13
|
+
"encryptKey",
|
|
14
|
+
"verificationToken"
|
|
15
|
+
],
|
|
16
|
+
collect(params) {
|
|
17
|
+
const { channel: feishu, surface } = params;
|
|
18
|
+
if (surface.channelEnabled && hasConfiguredSecretInputValue(feishu.appId, params.defaults) && hasConfiguredSecretInputValue(feishu.appSecret, params.defaults) && surface.hasExplicitAccounts && !surface.accounts.some(({ accountId }) => normalizeAccountId(accountId) === DEFAULT_ACCOUNT_ID)) surface.accounts.push({
|
|
19
|
+
accountId: "default",
|
|
20
|
+
account: {},
|
|
21
|
+
enabled: true
|
|
22
|
+
});
|
|
23
|
+
collectConditionalChannelFieldAssignments({
|
|
24
|
+
...params,
|
|
25
|
+
field: "appSecret",
|
|
26
|
+
topLevelActiveWithoutAccounts: surface.channelEnabled,
|
|
27
|
+
topLevelInheritedAccountActive: ({ account, enabled }) => enabled && !hasOwnProperty(account, "appSecret"),
|
|
28
|
+
accountActive: ({ enabled }) => enabled,
|
|
29
|
+
topInactiveReason: "no enabled account inherits this top-level Feishu appSecret.",
|
|
30
|
+
accountInactiveReason: "Feishu account is disabled."
|
|
31
|
+
});
|
|
32
|
+
const baseConnectionMode = normalizeSecretStringValue(feishu.connectionMode) === "webhook" ? "webhook" : "websocket";
|
|
33
|
+
const resolveAccountMode = (account) => hasOwnProperty(account, "connectionMode") ? normalizeSecretStringValue(account.connectionMode) : baseConnectionMode;
|
|
34
|
+
for (const field of ["encryptKey", "verificationToken"]) collectConditionalChannelFieldAssignments({
|
|
35
|
+
...params,
|
|
36
|
+
field,
|
|
37
|
+
topLevelActiveWithoutAccounts: baseConnectionMode === "webhook",
|
|
38
|
+
topLevelInheritedAccountActive: ({ account, enabled }) => enabled && !hasOwnProperty(account, field) && resolveAccountMode(account) === "webhook",
|
|
39
|
+
accountActive: ({ account, enabled }) => enabled && resolveAccountMode(account) === "webhook",
|
|
40
|
+
topInactiveReason: `no enabled Feishu webhook-mode surface inherits this top-level ${field}.`,
|
|
41
|
+
accountInactiveReason: "Feishu account is disabled or not running in webhook mode."
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as __exportAll } from "./doctor-contract-
|
|
1
|
+
import { _ as __exportAll } from "./doctor-contract-BNXcJcWR.mjs";
|
|
2
2
|
import { d as stripFeishuProviderPrefix, l as normalizeFeishuTarget, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-D00i9uy5.mjs";
|
|
3
|
-
import { n as getFeishuThreadBindingManager } from "./thread-bindings-
|
|
3
|
+
import { n as getFeishuThreadBindingManager } from "./thread-bindings-BxKmOara.mjs";
|
|
4
4
|
import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/feishu/src/subagent-hooks.ts
|
|
6
6
|
var subagent_hooks_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { resolveSessionAgentIdStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
2
|
-
import { registerSessionBindingAdapter, resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAgeMsForChannel, unregisterSessionBindingAdapter } from "openclaw/plugin-sdk/conversation-runtime";
|
|
3
2
|
import { isFutureDateTimestampMs } from "openclaw/plugin-sdk/number-runtime";
|
|
4
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
4
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
6
5
|
import { isPluginOwnedSessionBindingRecord } from "openclaw/plugin-sdk/conversation-binding-runtime";
|
|
6
|
+
import { resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAgeMsForChannel, unregisterSessionBindingAdapter } from "openclaw/plugin-sdk/conversation-runtime";
|
|
7
7
|
import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
|
|
8
|
-
import {
|
|
8
|
+
import { createAccountScopedBindingAdapterV2, projectThreadBindingRecord, registerSessionBindingAdapterV2 } from "openclaw/plugin-sdk/thread-bindings-session-runtime";
|
|
9
9
|
//#region extensions/feishu/src/thread-bindings.ts
|
|
10
10
|
const FEISHU_THREAD_BINDINGS_STATE_KEY = Symbol.for("openclaw.feishuThreadBindingsState");
|
|
11
11
|
let state;
|
|
@@ -153,12 +153,32 @@ function createFeishuThreadBindingManager(params) {
|
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
|
-
const
|
|
156
|
+
const assertCurrent = () => {
|
|
157
|
+
if (managersByAccountId.get(accountId) !== manager) throw new Error("Feishu conversation binding owner is no longer active");
|
|
158
|
+
};
|
|
159
|
+
const sessionBindingAdapter = createAccountScopedBindingAdapterV2({
|
|
160
|
+
assertCurrent,
|
|
161
|
+
inspectByConversations: (refs) => {
|
|
162
|
+
const records = refs.map((ref) => manager.getByConversationId(ref.conversationId));
|
|
163
|
+
return {
|
|
164
|
+
records,
|
|
165
|
+
assertCurrent: () => {
|
|
166
|
+
assertCurrent();
|
|
167
|
+
if (refs.some((ref, index) => manager.getByConversationId(ref.conversationId) !== records[index])) throw new Error("Feishu conversation binding changed during selection");
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
},
|
|
171
|
+
listBySessionKeyAsync: async (sessionKey) => manager.listBySessionKey(sessionKey),
|
|
172
|
+
getByConversationAsync: async (ref) => manager.getByConversationId(ref.conversationId),
|
|
173
|
+
inspectByConversationAsync: async (ref) => manager.getByConversationId(ref.conversationId),
|
|
174
|
+
touchConversationAsync: async (conversationId, at) => manager.touchConversation(conversationId, at),
|
|
157
175
|
channel: "feishu",
|
|
158
176
|
accountId,
|
|
159
177
|
capabilities: { placements: ["current"] },
|
|
160
178
|
bind: async (input) => {
|
|
161
179
|
if (input.conversation.channel !== "feishu" || input.placement === "child") return null;
|
|
180
|
+
assertCurrent();
|
|
181
|
+
input.assertCurrent?.();
|
|
162
182
|
const bound = manager.bindConversation({
|
|
163
183
|
conversationId: input.conversation.conversationId,
|
|
164
184
|
parentConversationId: input.conversation.parentConversationId,
|
|
@@ -175,7 +195,7 @@ function createFeishuThreadBindingManager(params) {
|
|
|
175
195
|
unbindConversation: manager.unbindConversation,
|
|
176
196
|
unbindBySessionKey: (sessionKey) => manager.unbindBySessionKey(sessionKey.trim())
|
|
177
197
|
});
|
|
178
|
-
|
|
198
|
+
registerSessionBindingAdapterV2(sessionBindingAdapter);
|
|
179
199
|
managersByAccountId.set(accountId, manager);
|
|
180
200
|
return manager;
|
|
181
201
|
}
|
package/dist/api.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./.setup/conversation-id-D00i9uy5.mjs";
|
|
2
|
-
import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./.setup/channel-
|
|
3
|
-
import { $ as
|
|
2
|
+
import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./.setup/channel-VyjzWvqm.mjs";
|
|
3
|
+
import { $ as resolveFeishuToolAccount, J as registerFeishuDriveTools, Q as createFeishuToolClient, X as feishuExternalToolResult, Y as registerFeishuTool, Z as unknownToolActionResult, et as assertFeishuApiSuccess, gt as parseFeishuMarkdown, pt as chunkFeishuMarkdown, vt as visitFeishuMarkdown } from "./.setup/reply-delivery-result-DknmIzOB.mjs";
|
|
4
4
|
import { t as getFeishuRuntime } from "./.setup/runtime-C5JxBWZp.mjs";
|
|
5
|
-
import { f as resolveConfiguredHttpTimeoutMs, r as createFeishuClient } from "./.setup/client-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { n as handleFeishuSubagentEnded, t as handleFeishuSubagentDeliveryTarget } from "./.setup/subagent-hooks-
|
|
5
|
+
import { f as resolveConfiguredHttpTimeoutMs, r as createFeishuClient } from "./.setup/client-BTiFlqqL.mjs";
|
|
6
|
+
import { n as getFeishuThreadBindingManager, t as createFeishuThreadBindingManager } from "./.setup/thread-bindings-BxKmOara.mjs";
|
|
7
|
+
import { o as registerFeishuChatTools } from "./.setup/chat-qj1pEIcO.mjs";
|
|
8
|
+
import { n as handleFeishuSubagentEnded, t as handleFeishuSubagentDeliveryTarget } from "./.setup/subagent-hooks-CvVuM0O4.mjs";
|
|
9
9
|
import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
|
|
10
10
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
11
11
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -344,7 +344,7 @@ async function insertBlocksInBatches(client, docToken, blocks, firstLevelBlockId
|
|
|
344
344
|
};
|
|
345
345
|
collect(firstLevelId);
|
|
346
346
|
if (newBlocks.length > 1e3) throw new Error(`Block "${firstLevelId}" has ${newBlocks.length} descendants, which exceeds the Feishu API limit of ${BATCH_SIZE} blocks per request. Please split the content into smaller sections.`);
|
|
347
|
-
if (currentBatch.blocks.length + newBlocks.length > 1e3
|
|
347
|
+
if (currentBatch.blocks.length + newBlocks.length > 1e3) {
|
|
348
348
|
batches.push(currentBatch);
|
|
349
349
|
currentBatch = {
|
|
350
350
|
firstLevelIds: [],
|
|
@@ -540,6 +540,12 @@ function splitDocxMarkdownBySize(markdown, maxChars) {
|
|
|
540
540
|
}
|
|
541
541
|
//#endregion
|
|
542
542
|
//#region extensions/feishu/src/docx-upload-input.ts
|
|
543
|
+
function resolveDocToolLocalRoots(ctx) {
|
|
544
|
+
if (ctx.fsPolicy?.workspaceOnly !== true) return;
|
|
545
|
+
const workspaceDir = ctx.workspaceDir?.trim();
|
|
546
|
+
if (!workspaceDir) return [];
|
|
547
|
+
return [resolve(workspaceDir)];
|
|
548
|
+
}
|
|
543
549
|
function decodeBase64Image(params) {
|
|
544
550
|
const estimatedBytes = estimateBase64DecodedBytes(params.payload);
|
|
545
551
|
if (estimatedBytes > params.maxBytes) throw new Error(`${params.oversizedLabel} exceeds limit: estimated ${estimatedBytes} bytes > ${params.maxBytes} bytes`);
|
|
@@ -622,12 +628,6 @@ async function resolveDocxUploadInput(input) {
|
|
|
622
628
|
}
|
|
623
629
|
//#endregion
|
|
624
630
|
//#region extensions/feishu/src/docx.ts
|
|
625
|
-
function resolveDocToolLocalRoots(ctx) {
|
|
626
|
-
if (ctx.fsPolicy?.workspaceOnly !== true) return;
|
|
627
|
-
const workspaceDir = ctx.workspaceDir?.trim();
|
|
628
|
-
if (!workspaceDir) return [];
|
|
629
|
-
return [resolve(workspaceDir)];
|
|
630
|
-
}
|
|
631
631
|
const BLOCK_TYPE_NAMES = {
|
|
632
632
|
1: "Page",
|
|
633
633
|
2: "Text",
|
|
@@ -882,13 +882,7 @@ async function uploadImageBlock(client, { doc_token: docToken, parent_block_id:
|
|
|
882
882
|
size: upload.buffer.length
|
|
883
883
|
};
|
|
884
884
|
}
|
|
885
|
-
async function uploadFileBlock(client, { doc_token: docToken
|
|
886
|
-
const blockId = parentBlockId ?? docToken;
|
|
887
|
-
const converted = await convertMarkdown(client, "[file](https://example.com/placeholder)");
|
|
888
|
-
const { orderedBlocks } = normalizeConvertedBlockTree(converted.blocks, converted.firstLevelBlockIds);
|
|
889
|
-
const placeholderBlock = (await insertBlocks(client, docToken, orderedBlocks, blockId))[0];
|
|
890
|
-
if (!placeholderBlock?.block_id) throw new Error("Failed to create placeholder block for file upload");
|
|
891
|
-
await deleteChildBlock(client, docToken, placeholderBlock.parent_id ?? blockId, placeholderBlock.block_id);
|
|
885
|
+
async function uploadFileBlock(client, { doc_token: docToken }, upload) {
|
|
892
886
|
return {
|
|
893
887
|
success: true,
|
|
894
888
|
file_token: await uploadDocxMedia(client, "file", docToken, upload),
|
|
@@ -1101,6 +1095,7 @@ function registerFeishuDocTools(api) {
|
|
|
1101
1095
|
registerFeishuTool(api, {
|
|
1102
1096
|
family: "doc",
|
|
1103
1097
|
name: "feishu_doc",
|
|
1098
|
+
workspaceAccess: "execute",
|
|
1104
1099
|
label: "Feishu Doc",
|
|
1105
1100
|
description: "Feishu document operations. Actions: read, write, append, insert, create, list_blocks, get_block, update_block, delete_block, create_table, write_table_cells, create_table_with_values, insert_table_row, insert_table_column, delete_table_rows, delete_table_columns, merge_table_cells, upload_image, upload_file, color_text",
|
|
1106
1101
|
parameters: FeishuDocSchema,
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { feishuPlugin };
|
|
1
|
+
export { t as feishuPlugin } from "./.setup/channel-VyjzWvqm.mjs";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { historicalWebhookListener, legacyConfigRules, normalizeCompatibilityConfig, normalizeHistoricalWebhookConfig };
|
|
1
|
+
export { t as historicalWebhookListener, n as legacyConfigRules, r as normalizeCompatibilityConfig, i as normalizeHistoricalWebhookConfig } from "./.setup/doctor-contract-BNXcJcWR.mjs";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { setFeishuRuntime };
|
|
1
|
+
export { n as setFeishuRuntime } from "./.setup/runtime-C5JxBWZp.mjs";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
|
|
1
|
+
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./.setup/secret-contract-DEyvsehF.mjs";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { collectFeishuSecurityAuditFindings };
|
|
1
|
+
export { t as collectFeishuSecurityAuditFindings } from "./.setup/security-audit-b86aSgH2.mjs";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { createFeishuThreadBindingManager };
|
|
1
|
+
export { t as createFeishuThreadBindingManager } from "./.setup/thread-bindings-BxKmOara.mjs";
|
package/dist/session-key-api.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { resolveFeishuSessionConversation as resolveSessionConversation };
|
|
1
|
+
export { t as resolveSessionConversation } from "./.setup/session-conversation-BSBNK5Mq.mjs";
|
package/dist/setup-api.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { feishuPlugin, feishuSetupAdapter, feishuSetupWizard };
|
|
1
|
+
export { t as feishuPlugin, i as feishuSetupAdapter, n as feishuSetupWizard } from "./.setup/channel-VyjzWvqm.mjs";
|
package/dist/setup-entry.js
CHANGED
|
@@ -4,15 +4,15 @@ import { fileURLToPath } from "node:url";
|
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/setup-api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/setup-api-CH41-_5S.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "feishuPlugin"
|
|
9
9
|
},
|
|
10
10
|
secrets: {
|
|
11
|
-
specifier: fileURLToPath(new URL(".setup/secret-contract-api-
|
|
11
|
+
specifier: fileURLToPath(new URL(".setup/secret-contract-api-XhxLE0dW.mjs", import.meta.url).href),
|
|
12
12
|
exportName: "channelSecrets"
|
|
13
13
|
},
|
|
14
14
|
runtime: {
|
|
15
|
-
specifier: fileURLToPath(new URL(".setup/runtime-setter-api-
|
|
15
|
+
specifier: fileURLToPath(new URL(".setup/runtime-setter-api-BrQHE03y.mjs", import.meta.url).href),
|
|
16
16
|
exportName: "setFeishuRuntime"
|
|
17
17
|
}
|
|
18
18
|
});
|
|
@@ -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("./.setup/subagent-hooks-
|
|
3
|
+
const loadFeishuSubagentHooksModule = createLazyRuntimeModule(() => import("./.setup/subagent-hooks-CvVuM0O4.mjs").then((n) => n.r));
|
|
4
4
|
function registerFeishuSubagentHooks(api) {
|
|
5
5
|
api.on("subagent_delivery_target", async (event) => {
|
|
6
6
|
const { handleFeishuSubagentDeliveryTarget } = await loadFeishuSubagentHooksModule();
|