@openclaw/feishu 2026.10.2 → 2026.10.5-beta.2
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/{app-registration-BB6TubaW.mjs → app-registration-DQOq5urV.mjs} +13 -32
- package/dist/.setup/{channel-DZakdZ3r.mjs → channel-CjGGyrdx.mjs} +87 -174
- package/dist/.setup/{channel.runtime-rXFuQXLL.mjs → channel.runtime-SaC_uTPM.mjs} +57 -74
- package/dist/.setup/{chat-mTBvMMvx.mjs → chat-fC3dvxFs.mjs} +16 -28
- package/dist/.setup/{client-CcxmEkoy.mjs → client-wwr8PGPH.mjs} +24 -30
- package/dist/.setup/{conversation-id-C1ofUfU8.mjs → conversation-id-D00i9uy5.mjs} +5 -10
- package/dist/.setup/{doctor-contract-DyOo8NvC.mjs → doctor-contract-oIpUWtNO.mjs} +8 -15
- package/dist/.setup/{monitor-CXaFHMmi.mjs → monitor-Yt__BUki.mjs} +33 -54
- package/dist/.setup/{monitor.account-cJ8gavqv.mjs → monitor.account-CVz16781.mjs} +359 -658
- package/dist/.setup/{probe-BjSykXB8.mjs → probe-DXnFxq5j.mjs} +14 -17
- package/dist/.setup/{reply-delivery-result-laBNOmBu.mjs → reply-delivery-result-iCCrdxE1.mjs} +153 -181
- package/dist/.setup/{session-conversation-C53IEUWt.mjs → session-conversation-BSBNK5Mq.mjs} +1 -1
- package/dist/.setup/{setup-api-fZcYXGxe.mjs → setup-api-B_LFQQ-Q.mjs} +1 -1
- package/dist/.setup/{subagent-hooks-C8Z_x3KJ.mjs → subagent-hooks-9Pc1-k37.mjs} +7 -17
- package/dist/.setup/{thread-bindings-jW2x5VuN.mjs → thread-bindings-DdNLxoL3.mjs} +21 -44
- package/dist/api.js +218 -326
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/session-key-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +1 -1
- package/dist/subagent-hooks-api.js +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +35 -0
- package/node_modules/@openclaw/fs-safe/README.md +1 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +4 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +5 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +22 -38
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.js +117 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.d.ts +8 -5
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.js +27 -50
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +57 -11
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +5 -5
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +52 -5
- package/node_modules/@openclaw/fs-safe/dist/guest.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +22 -26
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +2 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +6 -1
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +34 -7
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +1 -4
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +15 -1
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +6 -12
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +15 -15
- package/node_modules/@openclaw/fs-safe/dist/root-paths.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +4 -4
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +10 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +20 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +19 -7
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +25 -3
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.js +187 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +15 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-directory-diagnostics.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-directory-diagnostics.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +6 -6
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +4 -4
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +17 -16
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +20 -28
- package/node_modules/@openclaw/fs-safe/dist/walk.js +2 -13
- package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.js +3 -9
- package/node_modules/@openclaw/fs-safe/dist/watch.js +2 -3
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/archive.md +3 -0
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +11 -3
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/copy.md +48 -0
- package/node_modules/@openclaw/fs-safe/docs/guest.md +21 -4
- package/node_modules/@openclaw/fs-safe/docs/path-scope.md +4 -0
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +46 -8
- package/node_modules/@openclaw/fs-safe/docs/temp.md +12 -0
- package/node_modules/@openclaw/fs-safe/docs/watch.md +3 -2
- package/node_modules/@openclaw/fs-safe/package.json +15 -15
- 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-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-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/node_modules/follow-redirects/index.js +10 -1
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/mdast-util-to-markdown/index.d.ts +2 -0
- package/node_modules/mdast-util-to-markdown/lib/configure.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/configure.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/configure.js +19 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +12 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/break.js +16 -5
- package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/code.js +13 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts +30 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +39 -41
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.js +11 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/html.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +17 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/image.js +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts +9 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +14 -4
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +17 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts +13 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/link.js +24 -9
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +12 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/list.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/root.js +13 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts +30 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.js +39 -41
- package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/text.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts +6 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +6 -0
- package/node_modules/mdast-util-to-markdown/lib/index.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/index.js +34 -8
- package/node_modules/mdast-util-to-markdown/lib/join.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/join.js +18 -1
- package/node_modules/mdast-util-to-markdown/lib/types.d.ts +50 -30
- package/node_modules/mdast-util-to-markdown/lib/unsafe.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/unsafe.js +15 -1
- package/node_modules/mdast-util-to-markdown/lib/util/character.d.ts +23 -0
- package/node_modules/mdast-util-to-markdown/lib/util/character.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/character.js +32 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.js +3 -1
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts +2 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +9 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts +95 -4
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +636 -57
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts +2 -2
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +12 -7
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +7 -2
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +20 -15
- package/node_modules/mdast-util-to-markdown/lib/util/html-kind.d.ts +31 -0
- package/node_modules/mdast-util-to-markdown/lib/util/html-kind.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/html-kind.js +63 -0
- package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts +2 -2
- package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/safe.js +71 -7
- package/node_modules/mdast-util-to-markdown/package.json +13 -57
- package/node_modules/mdast-util-to-markdown/readme.md +139 -84
- package/node_modules/micromark/dev/lib/compile.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/compile.js +14 -4
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/create-tokenizer.js +7 -6
- package/node_modules/micromark/dev/lib/initialize/document.js +25 -21
- package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/initialize/text.js +10 -6
- package/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/preprocess.js +19 -21
- package/node_modules/micromark/lib/compile.d.ts.map +1 -1
- package/node_modules/micromark/lib/compile.js +37 -29
- package/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -1
- package/node_modules/micromark/lib/create-tokenizer.js +37 -35
- package/node_modules/micromark/lib/initialize/document.js +21 -13
- package/node_modules/micromark/lib/initialize/text.d.ts.map +1 -1
- package/node_modules/micromark/lib/initialize/text.js +7 -3
- package/node_modules/micromark/lib/preprocess.d.ts.map +1 -1
- package/node_modules/micromark/lib/preprocess.js +16 -19
- package/node_modules/micromark/package.json +2 -15
- package/node_modules/micromark-core-commonmark/dev/lib/attention.js +18 -24
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +1 -43
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +19 -43
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +2 -6
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +2 -53
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +14 -12
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +14 -5
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +14 -5
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.js +67 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +8 -5
- package/node_modules/micromark-core-commonmark/lib/attention.js +14 -24
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/code-fenced.js +1 -39
- package/node_modules/micromark-core-commonmark/lib/code-indented.js +11 -29
- package/node_modules/micromark-core-commonmark/lib/heading-atx.js +2 -6
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/html-flow.js +2 -51
- package/node_modules/micromark-core-commonmark/lib/label-end.js +11 -10
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/label-start-image.js +11 -3
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/label-start-link.js +11 -3
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js +61 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/setext-underline.js +7 -5
- package/node_modules/micromark-core-commonmark/package.json +4 -16
- package/node_modules/micromark-factory-space/dev/index.d.ts +24 -1
- package/node_modules/micromark-factory-space/dev/index.d.ts.map +1 -1
- package/node_modules/micromark-factory-space/dev/index.js +58 -3
- package/node_modules/micromark-factory-space/index.d.ts +24 -1
- package/node_modules/micromark-factory-space/index.d.ts.map +1 -1
- package/node_modules/micromark-factory-space/index.js +55 -3
- package/node_modules/micromark-factory-space/package.json +1 -10
- package/node_modules/micromark-factory-space/readme.md +25 -25
- package/node_modules/micromark-util-edit-map/dev/index.d.ts +78 -0
- package/node_modules/micromark-util-edit-map/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-edit-map/dev/index.js +237 -0
- package/node_modules/micromark-util-edit-map/index.d.ts +78 -0
- package/node_modules/micromark-util-edit-map/index.d.ts.map +1 -0
- package/node_modules/micromark-util-edit-map/index.js +225 -0
- package/node_modules/micromark-util-edit-map/license +22 -0
- package/node_modules/micromark-util-edit-map/package.json +48 -0
- package/node_modules/micromark-util-edit-map/readme.md +234 -0
- package/node_modules/micromark-util-types/index.d.ts +6 -3
- package/node_modules/micromark-util-types/package.json +2 -36
- package/node_modules/ws/lib/websocket.js +17 -3
- package/node_modules/ws/package.json +1 -1
- package/package.json +5 -5
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.d.ts +0 -17
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.js +0 -66
- package/node_modules/@openclaw/fs-safe/dist/publish-file-native.d.ts +0 -4
- package/node_modules/@openclaw/fs-safe/dist/publish-file-native.js +0 -35
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +0 -7
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.js +0 -16
- package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts +0 -7
- package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts.map +0 -1
|
@@ -13,28 +13,22 @@ const DEFAULT_REGISTRATION_EXPIRE_SECONDS = 600;
|
|
|
13
13
|
function accountsBaseUrl(domain) {
|
|
14
14
|
return domain === "lark" ? LARK_ACCOUNTS_URL : FEISHU_ACCOUNTS_URL;
|
|
15
15
|
}
|
|
16
|
-
async function postRegistration(baseUrl, body
|
|
17
|
-
return
|
|
16
|
+
async function postRegistration(baseUrl, body) {
|
|
17
|
+
return fetchFeishuJson({
|
|
18
18
|
url: `${baseUrl}${REGISTRATION_PATH}`,
|
|
19
19
|
init: {
|
|
20
20
|
method: "POST",
|
|
21
21
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
22
22
|
body: new URLSearchParams(body).toString()
|
|
23
23
|
},
|
|
24
|
-
auditContext: "feishu.app-registration.post"
|
|
25
|
-
fetchImpl: options?.fetchImpl,
|
|
26
|
-
lookupFn: options?.lookupFn,
|
|
27
|
-
timeoutMs: options?.timeoutMs
|
|
24
|
+
auditContext: "feishu.app-registration.post"
|
|
28
25
|
});
|
|
29
26
|
}
|
|
30
27
|
async function fetchFeishuJson(params) {
|
|
31
|
-
const timeoutMs = params.timeoutMs ?? APP_REGISTRATION_REQUEST_TIMEOUT_MS;
|
|
32
28
|
const { response, release } = await fetchWithSsrFGuard({
|
|
33
29
|
url: params.url,
|
|
34
30
|
init: params.init,
|
|
35
|
-
|
|
36
|
-
lookupFn: params.lookupFn,
|
|
37
|
-
timeoutMs,
|
|
31
|
+
timeoutMs: APP_REGISTRATION_REQUEST_TIMEOUT_MS,
|
|
38
32
|
policy: { allowedHostnames: [new URL(params.url).hostname] },
|
|
39
33
|
auditContext: params.auditContext
|
|
40
34
|
});
|
|
@@ -44,26 +38,20 @@ async function fetchFeishuJson(params) {
|
|
|
44
38
|
await release();
|
|
45
39
|
}
|
|
46
40
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* `client_secret` auth.
|
|
50
|
-
*
|
|
51
|
-
* @throws If the environment does not support `client_secret`.
|
|
52
|
-
*/
|
|
53
|
-
async function initAppRegistration(domain = "feishu", options) {
|
|
54
|
-
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");
|
|
41
|
+
async function initAppRegistration(domain = "feishu") {
|
|
42
|
+
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");
|
|
55
43
|
}
|
|
56
44
|
/**
|
|
57
45
|
* Step 2: Begin the device-code flow. Returns a device code and a QR URL
|
|
58
46
|
* that the user should scan with Feishu/Lark mobile app.
|
|
59
47
|
*/
|
|
60
|
-
async function beginAppRegistration(domain = "feishu"
|
|
48
|
+
async function beginAppRegistration(domain = "feishu") {
|
|
61
49
|
const res = await postRegistration(accountsBaseUrl(domain), {
|
|
62
50
|
action: "begin",
|
|
63
51
|
archetype: "PersonalAgent",
|
|
64
52
|
auth_method: "client_secret",
|
|
65
53
|
request_user_info: "open_id"
|
|
66
|
-
}
|
|
54
|
+
});
|
|
67
55
|
const qrUrl = new URL(res.verification_uri_complete);
|
|
68
56
|
qrUrl.searchParams.set("from", "oc_onboard");
|
|
69
57
|
qrUrl.searchParams.set("tp", "ob_cli_app");
|
|
@@ -81,7 +69,7 @@ async function beginAppRegistration(domain = "feishu", options) {
|
|
|
81
69
|
* detected as "lark".
|
|
82
70
|
*/
|
|
83
71
|
async function pollAppRegistration(params) {
|
|
84
|
-
const { deviceCode, expireIn, initialDomain = "feishu", abortSignal, tp
|
|
72
|
+
const { deviceCode, expireIn, initialDomain = "feishu", abortSignal, tp } = params;
|
|
85
73
|
let currentInterval = params.interval;
|
|
86
74
|
let domain = initialDomain;
|
|
87
75
|
let domainSwitched = false;
|
|
@@ -96,9 +84,6 @@ async function pollAppRegistration(params) {
|
|
|
96
84
|
action: "poll",
|
|
97
85
|
device_code: deviceCode,
|
|
98
86
|
...tp ? { tp } : {}
|
|
99
|
-
}, {
|
|
100
|
-
fetchImpl,
|
|
101
|
-
lookupFn
|
|
102
87
|
});
|
|
103
88
|
} catch {
|
|
104
89
|
await sleepRegistrationPollInterval(currentInterval, abortSignal);
|
|
@@ -118,8 +103,8 @@ async function pollAppRegistration(params) {
|
|
|
118
103
|
openId: pollRes.user_info?.open_id
|
|
119
104
|
}
|
|
120
105
|
};
|
|
121
|
-
if (pollRes.error) {
|
|
122
|
-
if (pollRes.error === "
|
|
106
|
+
if (pollRes.error && pollRes.error !== "authorization_pending") {
|
|
107
|
+
if (pollRes.error === "slow_down") currentInterval += 5;
|
|
123
108
|
else if (pollRes.error === "access_denied") return { status: "access_denied" };
|
|
124
109
|
else if (pollRes.error === "expired_token") return { status: "expired" };
|
|
125
110
|
else return {
|
|
@@ -160,9 +145,7 @@ async function getAppOwnerOpenId(params) {
|
|
|
160
145
|
app_secret: params.appSecret
|
|
161
146
|
})
|
|
162
147
|
},
|
|
163
|
-
auditContext: "feishu.app-registration.owner-token"
|
|
164
|
-
fetchImpl: params.fetchImpl,
|
|
165
|
-
lookupFn: params.lookupFn
|
|
148
|
+
auditContext: "feishu.app-registration.owner-token"
|
|
166
149
|
});
|
|
167
150
|
if (!tokenData.tenant_access_token) return;
|
|
168
151
|
const appData = await fetchFeishuJson({
|
|
@@ -174,9 +157,7 @@ async function getAppOwnerOpenId(params) {
|
|
|
174
157
|
"Content-Type": "application/json"
|
|
175
158
|
}
|
|
176
159
|
},
|
|
177
|
-
auditContext: "feishu.app-registration.owner-app"
|
|
178
|
-
fetchImpl: params.fetchImpl,
|
|
179
|
-
lookupFn: params.lookupFn
|
|
160
|
+
auditContext: "feishu.app-registration.owner-app"
|
|
180
161
|
});
|
|
181
162
|
if (appData.code !== 0) return;
|
|
182
163
|
const app = appData.data?.app;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { _ as __exportAll, a as FeishuChannelConfigSchema, c as normalizeFeishuExternalKey, d as listEnabledFeishuAccounts, f as listFeishuAccountIds, g as resolveFeishuRuntimeAccount, h as resolveFeishuAccount, m as resolveDefaultFeishuAccountId, n as legacyConfigRules, o as DEFAULT_FEISHU_WEBHOOK_PATH, p as mergeFeishuAccountConfig, r as normalizeCompatibilityConfig, s as normalizeFeishuWebhookPath, u as inspectFeishuCredentials, v as __reExport } from "./doctor-contract-
|
|
2
|
-
import { a as parseFeishuTargetId, c as looksLikeFeishuId, i as parseFeishuDirectConversationId, l as normalizeFeishuTarget, n as buildFeishuModelOverrideParentCandidates, o as resolveConfiguredFeishuGroupSessionScope, r as parseFeishuConversationId, t as buildFeishuConversationId, u as resolveReceiveIdType } from "./conversation-id-
|
|
3
|
-
import {
|
|
1
|
+
import { _ as __exportAll, a as FeishuChannelConfigSchema, c as normalizeFeishuExternalKey, d as listEnabledFeishuAccounts, f as listFeishuAccountIds, g as resolveFeishuRuntimeAccount, h as resolveFeishuAccount, m as resolveDefaultFeishuAccountId, n as legacyConfigRules, o as DEFAULT_FEISHU_WEBHOOK_PATH, p as mergeFeishuAccountConfig, r as normalizeCompatibilityConfig, s as normalizeFeishuWebhookPath, u as inspectFeishuCredentials, v as __reExport } from "./doctor-contract-oIpUWtNO.mjs";
|
|
2
|
+
import { a as parseFeishuTargetId, c as looksLikeFeishuId, i as parseFeishuDirectConversationId, l as normalizeFeishuTarget, n as buildFeishuModelOverrideParentCandidates, o as resolveConfiguredFeishuGroupSessionScope, r as parseFeishuConversationId, t as buildFeishuConversationId, u as resolveReceiveIdType } from "./conversation-id-D00i9uy5.mjs";
|
|
3
|
+
import { A as sendMessageFeishu, Ct as isFeishuGroupReadEnabled, Ft as resolveFeishuChatType, G as resolveFeishuIdentityHeaderTitle, K as deliverCommentThreadText, M as toFeishuMessageSendResult, Mt as resolveFeishuGroupToolPolicy, Pt as normalizeFeishuChatType, S as sendMediaFeishu, St as isFeishuGroupReadAllowed, T as chunkFeishuCardMarkdown, Tt as resolveFeishuChatReadPreliminaryAuthorization, U as buildFeishuMediaFallbackText, _ as renderFeishuPresentationPayload, b as withinCardTableLimit, bt as canEnumerateAllFeishuGroups, c as buildFeishuPayloadCard, d as consumeFeishuPresentationFallbackMarker, et as cleanupAmbientCommentTypingReaction, f as feishuCardWithinTableLimit, ft as chunkFeishuMarkdown, g as renderFeishuPresentationFallbackText, gt as shouldUseFeishuCard, h as readNativeFeishuCard, j as sendStructuredCardFeishu, k as sendCardFeishu, kt as resolveFeishuGroupConfig, l as buildFeishuPresentationCard, lt as parseFeishuCommentTarget, m as markRenderedFeishuCard, mt as materializeFeishuPostMarkdownSoftBreaks, n as createFeishuReplyDeliveryResult, o as FEISHU_PRESENTATION_CAPABILITIES, p as isFeishuCardWithinEnvelope, pt as chunkFeishuPostMarkdown, s as assertFeishuCardWithinEnvelope, t as createFeishuPartialReplyDeliveryError, u as buildFeishuPresentationFallback, ut as readNativeFeishuCardJson, vt as assertFeishuChatReadAllowed, w as shouldSuppressFeishuTextForVoiceMedia, wt as readFeishuChatInfoWithAuthorization, xt as canEnumerateAllFeishuPeers, y as resolveFeishuRichReply, yt as authorizeFeishuChatMemberRead } from "./reply-delivery-result-iCCrdxE1.mjs";
|
|
4
4
|
import { t as messageActionTargetAliases } from "./message-action-contract-Bhxj8Zrf.mjs";
|
|
5
|
-
import { l as withFeishuRequestContext, r as createFeishuClient, u as withFeishuSendContext } from "./client-
|
|
5
|
+
import { l as withFeishuRequestContext, r as createFeishuClient, u as withFeishuSendContext } from "./client-wwr8PGPH.mjs";
|
|
6
6
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-CI1wCr9i.mjs";
|
|
7
7
|
import { t as collectFeishuSecurityAuditFindings } from "./security-audit-b86aSgH2.mjs";
|
|
8
|
-
import { t as resolveFeishuSessionConversation } from "./session-conversation-
|
|
9
|
-
import {
|
|
8
|
+
import { t as resolveFeishuSessionConversation } from "./session-conversation-BSBNK5Mq.mjs";
|
|
9
|
+
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
10
10
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
11
11
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-resolution";
|
|
12
12
|
import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
@@ -190,22 +190,15 @@ function normalizePathSeparators(pathname) {
|
|
|
190
190
|
if (collapsed.length <= 1) return collapsed;
|
|
191
191
|
return collapsed.replace(/\/+$/, "");
|
|
192
192
|
}
|
|
193
|
-
function resolveDotSegments(pathname) {
|
|
194
|
-
try {
|
|
195
|
-
return new URL(pathname, "http://localhost").pathname;
|
|
196
|
-
} catch {
|
|
197
|
-
return pathname;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
193
|
function normalizePathForSecurity(pathname) {
|
|
201
|
-
return normalizePathSeparators(normalizeLowercaseStringOrEmpty$1(
|
|
194
|
+
return normalizePathSeparators(normalizeLowercaseStringOrEmpty$1(URL.parse(pathname, "http://localhost")?.pathname ?? pathname)) || "/";
|
|
202
195
|
}
|
|
203
|
-
function buildCanonicalPathCandidates(pathname
|
|
196
|
+
function buildCanonicalPathCandidates(pathname) {
|
|
204
197
|
const candidates = /* @__PURE__ */ new Set([normalizePathForSecurity(pathname)]);
|
|
205
198
|
let decoded = pathname;
|
|
206
199
|
let malformedEncoding = false;
|
|
207
200
|
let decodePasses = 0;
|
|
208
|
-
for (let pass = 0; pass <
|
|
201
|
+
for (let pass = 0; pass < MAX_PATH_DECODE_PASSES; pass++) {
|
|
209
202
|
let nextDecoded;
|
|
210
203
|
try {
|
|
211
204
|
nextDecoded = decodeURIComponent(decoded);
|
|
@@ -294,7 +287,7 @@ function describeFeishuWebhookPathConflict(path) {
|
|
|
294
287
|
const pathname = new URL(normalized, "http://localhost").pathname;
|
|
295
288
|
const probe = classifyGatewayProbePath(pathname);
|
|
296
289
|
let reason;
|
|
297
|
-
if (probe !== "outside" && probe !== "namespace") reason = "is reserved for Gateway
|
|
290
|
+
if (probe !== "outside" && probe !== "namespace") reason = "is reserved for Gateway checks";
|
|
298
291
|
else if (isProtectedPluginRoutePathFromContext(resolvePluginRoutePathContext(pathname))) reason = "requires Gateway authentication";
|
|
299
292
|
else return;
|
|
300
293
|
return `webhookPath ${JSON.stringify(path)} ${reason}. Set webhookPath to ${DEFAULT_FEISHU_WEBHOOK_PATH} and update the Feishu callback URL or reverse-proxy path to match.`;
|
|
@@ -451,14 +444,14 @@ function collectCorruptFeishuStateJsonFindings(feishuStateDir) {
|
|
|
451
444
|
}
|
|
452
445
|
return findings;
|
|
453
446
|
}
|
|
454
|
-
function
|
|
447
|
+
function resolveSessionTranscriptPath(params) {
|
|
455
448
|
const candidate = params.entry.sessionFile;
|
|
456
|
-
if (typeof candidate !== "string" || !candidate.trim()) return
|
|
449
|
+
if (typeof candidate !== "string" || !candidate.trim()) return;
|
|
457
450
|
const sessionsDir = path.dirname(params.storePath);
|
|
458
451
|
const agentSessionsDir = resolveFeishuAgentSessionsDir(params.agentId);
|
|
459
452
|
const trimmed = candidate.trim();
|
|
460
453
|
const resolved = path.isAbsolute(trimmed) ? path.resolve(trimmed) : path.resolve(sessionsDir, trimmed);
|
|
461
|
-
return resolved !== sessionsDir && resolved !== agentSessionsDir && (isPathStrictlyInside(sessionsDir, resolved) || isPathStrictlyInside(agentSessionsDir, resolved)) ?
|
|
454
|
+
return resolved !== sessionsDir && resolved !== agentSessionsDir && (isPathStrictlyInside(sessionsDir, resolved) || isPathStrictlyInside(agentSessionsDir, resolved)) ? resolved : void 0;
|
|
462
455
|
}
|
|
463
456
|
function isSessionHeader(value) {
|
|
464
457
|
return isRecord(value) && value.type === "session" && typeof value.id === "string";
|
|
@@ -575,23 +568,19 @@ function collectFeishuSessionFindings(params) {
|
|
|
575
568
|
});
|
|
576
569
|
return finding ? [finding] : [];
|
|
577
570
|
}
|
|
578
|
-
const
|
|
579
|
-
|
|
580
|
-
if (
|
|
571
|
+
const transcriptPath = resolveSessionTranscriptPath(params);
|
|
572
|
+
if (!transcriptPath) return [];
|
|
573
|
+
if (!existsFile(transcriptPath)) return [{
|
|
581
574
|
kind: "missing-session-transcript",
|
|
582
575
|
sessionKey: params.sessionKey,
|
|
583
576
|
storePath: params.storePath
|
|
584
577
|
}];
|
|
585
|
-
const
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
});
|
|
592
|
-
if (finding) findings.push(finding);
|
|
593
|
-
}
|
|
594
|
-
return findings;
|
|
578
|
+
const finding = inspectSessionTranscript({
|
|
579
|
+
sessionKey: params.sessionKey,
|
|
580
|
+
storePath: params.storePath,
|
|
581
|
+
transcriptPath
|
|
582
|
+
});
|
|
583
|
+
return finding ? [finding] : [];
|
|
595
584
|
}
|
|
596
585
|
function hasCorruptFeishuStateJsonFinding(inspection) {
|
|
597
586
|
return inspection.findings.some((finding) => finding.kind === "corrupt-state-json");
|
|
@@ -690,16 +679,15 @@ function copyStoreBackup(params) {
|
|
|
690
679
|
}
|
|
691
680
|
}
|
|
692
681
|
function collectSessionArtifactPaths(params) {
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
return [...artifacts].toSorted();
|
|
682
|
+
const transcriptPath = resolveSessionTranscriptPath(params);
|
|
683
|
+
if (!transcriptPath) return [];
|
|
684
|
+
if (!transcriptPath.endsWith(".jsonl")) return [transcriptPath];
|
|
685
|
+
const base = transcriptPath.slice(0, -6);
|
|
686
|
+
return [
|
|
687
|
+
transcriptPath,
|
|
688
|
+
`${base}.trajectory.jsonl`,
|
|
689
|
+
`${base}.trajectory-path.json`
|
|
690
|
+
].toSorted();
|
|
703
691
|
}
|
|
704
692
|
function archiveSessionArtifacts(params) {
|
|
705
693
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -860,7 +848,7 @@ const feishuDoctor = {
|
|
|
860
848
|
//#endregion
|
|
861
849
|
//#region extensions/feishu/src/gateway.ts
|
|
862
850
|
const feishuGatewayAdapter = { startAccount: async (ctx) => {
|
|
863
|
-
const { monitorFeishuProvider } = await import("./monitor-
|
|
851
|
+
const { monitorFeishuProvider } = await import("./monitor-Yt__BUki.mjs");
|
|
864
852
|
const account = resolveFeishuRuntimeAccount({
|
|
865
853
|
cfg: ctx.cfg,
|
|
866
854
|
accountId: ctx.accountId
|
|
@@ -1351,36 +1339,24 @@ const feishuOutbound = withFeishuOutboundSendContext({
|
|
|
1351
1339
|
replyToMode: ctx.replyToMode,
|
|
1352
1340
|
onDeliveryResult
|
|
1353
1341
|
};
|
|
1354
|
-
|
|
1355
|
-
const commentText = mediaUrl?.trim() ? await buildFeishuMediaFallbackText({
|
|
1356
|
-
text,
|
|
1357
|
-
mediaUrl,
|
|
1358
|
-
mediaLinkStyle: "plain"
|
|
1359
|
-
}) : text?.trim() ?? "";
|
|
1360
|
-
return toFeishuOutboundResult(await sendOutboundText({
|
|
1361
|
-
...sendParams,
|
|
1362
|
-
text: commentText,
|
|
1363
|
-
...nextReplyMode(),
|
|
1364
|
-
...deliveryOptions
|
|
1365
|
-
}));
|
|
1366
|
-
}
|
|
1367
|
-
if (!mediaUrl) return toFeishuOutboundResult(await sendOutboundText({
|
|
1342
|
+
const sendText = (value, replyMode = nextReplyMode()) => sendOutboundText({
|
|
1368
1343
|
...sendParams,
|
|
1369
|
-
text:
|
|
1370
|
-
...
|
|
1344
|
+
text: value,
|
|
1345
|
+
...replyMode,
|
|
1371
1346
|
...deliveryOptions
|
|
1372
|
-
})
|
|
1347
|
+
});
|
|
1348
|
+
if (parseFeishuCommentTarget(to)) return toFeishuOutboundResult(await sendText(mediaUrl?.trim() ? await buildFeishuMediaFallbackText({
|
|
1349
|
+
text,
|
|
1350
|
+
mediaUrl,
|
|
1351
|
+
mediaLinkStyle: "plain"
|
|
1352
|
+
}) : text?.trim() ?? ""));
|
|
1353
|
+
if (!mediaUrl) return toFeishuOutboundResult(await sendText(text ?? ""));
|
|
1373
1354
|
const suppressTextForVoiceMedia = shouldSuppressFeishuTextForVoiceMedia({
|
|
1374
1355
|
mediaUrl,
|
|
1375
1356
|
audioAsVoice
|
|
1376
1357
|
});
|
|
1377
1358
|
let captionResult;
|
|
1378
|
-
if (text?.trim() && !suppressTextForVoiceMedia) captionResult = await
|
|
1379
|
-
...sendParams,
|
|
1380
|
-
text,
|
|
1381
|
-
...nextReplyMode(),
|
|
1382
|
-
...deliveryOptions
|
|
1383
|
-
});
|
|
1359
|
+
if (text?.trim() && !suppressTextForVoiceMedia) captionResult = await sendText(text);
|
|
1384
1360
|
const results = captionResult ? [captionResult] : [];
|
|
1385
1361
|
let mediaResult;
|
|
1386
1362
|
const mediaReplyMode = nextReplyMode();
|
|
@@ -1406,12 +1382,7 @@ const feishuOutbound = withFeishuOutboundSendContext({
|
|
|
1406
1382
|
mediaUrl
|
|
1407
1383
|
});
|
|
1408
1384
|
try {
|
|
1409
|
-
const fallbackResult = await
|
|
1410
|
-
...sendParams,
|
|
1411
|
-
text: fallbackText,
|
|
1412
|
-
...captionResult ? nextReplyMode() : mediaReplyMode,
|
|
1413
|
-
...deliveryOptions
|
|
1414
|
-
});
|
|
1385
|
+
const fallbackResult = await sendText(fallbackText, captionResult ? nextReplyMode() : mediaReplyMode);
|
|
1415
1386
|
return toFeishuOutboundResult(aggregateFeishuSendResult(fallbackResult, [...results, fallbackResult]));
|
|
1416
1387
|
} catch (error) {
|
|
1417
1388
|
throw partialFeishuSendError(error, results);
|
|
@@ -1420,12 +1391,7 @@ const feishuOutbound = withFeishuOutboundSendContext({
|
|
|
1420
1391
|
results.push(mediaResult);
|
|
1421
1392
|
try {
|
|
1422
1393
|
await reportFeishuOutboundDelivery(mediaResult, onDeliveryResult);
|
|
1423
|
-
if (mediaResult.voiceIntentDegradedToFile && text?.trim()) results.push(await
|
|
1424
|
-
...sendParams,
|
|
1425
|
-
text,
|
|
1426
|
-
...nextReplyMode(),
|
|
1427
|
-
...deliveryOptions
|
|
1428
|
-
}));
|
|
1394
|
+
if (mediaResult.voiceIntentDegradedToFile && text?.trim()) results.push(await sendText(text));
|
|
1429
1395
|
} catch (error) {
|
|
1430
1396
|
throw partialFeishuSendError(error, results);
|
|
1431
1397
|
}
|
|
@@ -1577,9 +1543,8 @@ const feishuDmPolicy = createChannelDmPolicy({
|
|
|
1577
1543
|
applyPatch: ({ cfg, account, patch }) => patchFeishuConfig(cfg, account.accountId, patch),
|
|
1578
1544
|
promptAllowFrom: promptFeishuAllowFrom
|
|
1579
1545
|
});
|
|
1580
|
-
const loadAppRegistrationModule = createLazyRuntimeModule(() => import("./app-registration-BB6TubaW.mjs"));
|
|
1581
1546
|
async function runScanToCreate(prompter, domain, beforePersistentEffect) {
|
|
1582
|
-
const { beginAppRegistration, initAppRegistration, pollAppRegistration, printQrCode } = await
|
|
1547
|
+
const { beginAppRegistration, initAppRegistration, pollAppRegistration, printQrCode } = await import("./app-registration-DQOq5urV.mjs");
|
|
1583
1548
|
try {
|
|
1584
1549
|
await initAppRegistration(domain);
|
|
1585
1550
|
} catch {
|
|
@@ -1598,23 +1563,12 @@ async function runScanToCreate(prompter, domain, beforePersistentEffect) {
|
|
|
1598
1563
|
initialDomain: domain,
|
|
1599
1564
|
tp: SCAN_TO_CREATE_TP
|
|
1600
1565
|
});
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
message = t("wizard.feishu.scanDenied");
|
|
1608
|
-
break;
|
|
1609
|
-
case "expired":
|
|
1610
|
-
message = t("wizard.feishu.scanExpired");
|
|
1611
|
-
break;
|
|
1612
|
-
case "timeout":
|
|
1613
|
-
message = t("wizard.feishu.scanTimedOut");
|
|
1614
|
-
break;
|
|
1615
|
-
case "error": message = t("wizard.feishu.scanError", { error: outcome.message });
|
|
1616
|
-
}
|
|
1617
|
-
progress.stop(message);
|
|
1566
|
+
progress.stop(outcome.status === "error" ? t("wizard.feishu.scanError", { error: outcome.message }) : t({
|
|
1567
|
+
success: "wizard.feishu.scanCompleted",
|
|
1568
|
+
access_denied: "wizard.feishu.scanDenied",
|
|
1569
|
+
expired: "wizard.feishu.scanExpired",
|
|
1570
|
+
timeout: "wizard.feishu.scanTimedOut"
|
|
1571
|
+
}[outcome.status]));
|
|
1618
1572
|
return outcome.status === "success" ? outcome.result : null;
|
|
1619
1573
|
}
|
|
1620
1574
|
async function runNewAppFlow(params) {
|
|
@@ -1681,7 +1635,7 @@ async function runNewAppFlow(params) {
|
|
|
1681
1635
|
appSecretProbeValue = appSecretResult.resolvedValue;
|
|
1682
1636
|
}
|
|
1683
1637
|
if (appId && appSecretProbeValue) {
|
|
1684
|
-
const { getAppOwnerOpenId } = await
|
|
1638
|
+
const { getAppOwnerOpenId } = await import("./app-registration-DQOq5urV.mjs");
|
|
1685
1639
|
scanOpenId = await getAppOwnerOpenId({
|
|
1686
1640
|
appId,
|
|
1687
1641
|
appSecret: appSecretProbeValue,
|
|
@@ -1782,7 +1736,7 @@ const feishuSetupWizard = {
|
|
|
1782
1736
|
});
|
|
1783
1737
|
let probeResult = null;
|
|
1784
1738
|
if (configured && account.configured) try {
|
|
1785
|
-
const { probeFeishu } = await import("./probe-
|
|
1739
|
+
const { probeFeishu } = await import("./probe-DXnFxq5j.mjs").then((n) => n.n);
|
|
1786
1740
|
probeResult = await probeFeishu(account);
|
|
1787
1741
|
} catch {}
|
|
1788
1742
|
if (!configured) return [`Feishu: ${t("wizard.channels.statusNeedsAppCredentials")}`];
|
|
@@ -1918,11 +1872,11 @@ function hasLegacyFeishuCardCommandValue(actionValue) {
|
|
|
1918
1872
|
return isRecord(actionValue) && actionValue.oc !== "ocf1" && (Boolean(typeof actionValue.command === "string" && actionValue.command.trim()) || Boolean(typeof actionValue.text === "string" && actionValue.text.trim()));
|
|
1919
1873
|
}
|
|
1920
1874
|
function containsLegacyFeishuCardCommandValue(node) {
|
|
1921
|
-
if (Array.isArray(node)) return node.some(
|
|
1875
|
+
if (Array.isArray(node)) return node.some(containsLegacyFeishuCardCommandValue);
|
|
1922
1876
|
if (!isRecord(node)) return false;
|
|
1923
1877
|
if (node.tag === "button" && hasLegacyFeishuCardCommandValue(node.value)) return true;
|
|
1924
1878
|
if (node.tag === "button" && Array.isArray(node.behaviors) && node.behaviors.some((behavior) => isRecord(behavior) && hasLegacyFeishuCardCommandValue(behavior.value))) return true;
|
|
1925
|
-
return Object.values(node).some(
|
|
1879
|
+
return Object.values(node).some(containsLegacyFeishuCardCommandValue);
|
|
1926
1880
|
}
|
|
1927
1881
|
const meta = {
|
|
1928
1882
|
id: "feishu",
|
|
@@ -1935,25 +1889,29 @@ const meta = {
|
|
|
1935
1889
|
order: 70,
|
|
1936
1890
|
preferSessionLookupForAnnounceTarget: true
|
|
1937
1891
|
};
|
|
1938
|
-
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
1939
|
-
async function resolveFeishuMessageSender(
|
|
1892
|
+
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-SaC_uTPM.mjs"), "feishuChannelRuntime");
|
|
1893
|
+
async function resolveFeishuMessageSender(kind) {
|
|
1894
|
+
const unavailableMessage = `Feishu ${kind} sending is not available.`;
|
|
1940
1895
|
try {
|
|
1941
|
-
const sender =
|
|
1896
|
+
const sender = (await loadFeishuChannelRuntime()).feishuOutbound[kind === "text" ? "sendText" : "sendMedia"];
|
|
1942
1897
|
if (sender) return sender;
|
|
1943
|
-
throw new Error(
|
|
1898
|
+
throw new Error(unavailableMessage);
|
|
1944
1899
|
} catch (error) {
|
|
1945
1900
|
if (error instanceof PlatformMessageNotDispatchedError) throw error;
|
|
1946
|
-
throw new PlatformMessageNotDispatchedError(
|
|
1901
|
+
throw new PlatformMessageNotDispatchedError(unavailableMessage, { cause: error });
|
|
1947
1902
|
}
|
|
1948
1903
|
}
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
}
|
|
1904
|
+
async function sendFeishuAdapterMessage(kind, ctx) {
|
|
1905
|
+
const send = await resolveFeishuMessageSender(kind);
|
|
1906
|
+
const { onDeliveryResult, ...outboundCtx } = ctx;
|
|
1907
|
+
const result = await send({
|
|
1908
|
+
...outboundCtx,
|
|
1909
|
+
...onDeliveryResult ? { onDeliveryResult: async (progress) => {
|
|
1910
|
+
await onDeliveryResult(toFeishuMessageSendResult(progress, kind));
|
|
1911
|
+
} } : {}
|
|
1912
|
+
});
|
|
1913
|
+
return toFeishuMessageSendResult(result, kind);
|
|
1914
|
+
}
|
|
1957
1915
|
const feishuMessageAdapter = defineChannelMessageAdapter({
|
|
1958
1916
|
id: "feishu",
|
|
1959
1917
|
durableFinal: { capabilities: {
|
|
@@ -1962,51 +1920,16 @@ const feishuMessageAdapter = defineChannelMessageAdapter({
|
|
|
1962
1920
|
} },
|
|
1963
1921
|
send: {
|
|
1964
1922
|
lifecycle: { beforeSendAttempt: async (ctx) => {
|
|
1965
|
-
if (ctx.kind === "text") await
|
|
1966
|
-
else if (ctx.kind === "media") await resolveFeishuMediaSender();
|
|
1923
|
+
if (ctx.kind === "text" || ctx.kind === "media") await resolveFeishuMessageSender(ctx.kind);
|
|
1967
1924
|
} },
|
|
1968
|
-
text:
|
|
1969
|
-
|
|
1970
|
-
const { onDeliveryResult, ...outboundCtx } = ctx;
|
|
1971
|
-
const result = await sendText({
|
|
1972
|
-
...outboundCtx,
|
|
1973
|
-
...onDeliveryResult ? { onDeliveryResult: async (progress) => {
|
|
1974
|
-
await onDeliveryResult(toFeishuMessageSendResult(progress, "text"));
|
|
1975
|
-
} } : {}
|
|
1976
|
-
});
|
|
1977
|
-
return toFeishuMessageSendResult(result, "text");
|
|
1978
|
-
},
|
|
1979
|
-
media: async (ctx) => {
|
|
1980
|
-
const sendMedia = await resolveFeishuMediaSender();
|
|
1981
|
-
const { onDeliveryResult, ...outboundCtx } = ctx;
|
|
1982
|
-
const result = await sendMedia({
|
|
1983
|
-
...outboundCtx,
|
|
1984
|
-
...onDeliveryResult ? { onDeliveryResult: async (progress) => {
|
|
1985
|
-
await onDeliveryResult(toFeishuMessageSendResult(progress, "media"));
|
|
1986
|
-
} } : {}
|
|
1987
|
-
});
|
|
1988
|
-
return toFeishuMessageSendResult(result, "media");
|
|
1989
|
-
}
|
|
1925
|
+
text: (ctx) => sendFeishuAdapterMessage("text", ctx),
|
|
1926
|
+
media: (ctx) => sendFeishuAdapterMessage("media", ctx)
|
|
1990
1927
|
}
|
|
1991
1928
|
});
|
|
1992
1929
|
async function createFeishuActionClient(account) {
|
|
1993
|
-
const { createFeishuClient } = await import("./client-
|
|
1930
|
+
const { createFeishuClient } = await import("./client-wwr8PGPH.mjs").then((n) => n.t);
|
|
1994
1931
|
return createFeishuClient(account);
|
|
1995
1932
|
}
|
|
1996
|
-
async function resolveFeishuChatTypeById(params) {
|
|
1997
|
-
const client = await createFeishuActionClient(params.account);
|
|
1998
|
-
const chat = await params.runtime.getChatInfo(client, params.chatId);
|
|
1999
|
-
return resolveFeishuChatType(chat);
|
|
2000
|
-
}
|
|
2001
|
-
async function resolveFeishuMessageChatType(params) {
|
|
2002
|
-
const knownChatType = normalizeFeishuChatType(params.message.chatType);
|
|
2003
|
-
if (knownChatType) return knownChatType;
|
|
2004
|
-
return resolveFeishuChatTypeById({
|
|
2005
|
-
account: params.account,
|
|
2006
|
-
chatId: params.message.chatId,
|
|
2007
|
-
runtime: params.runtime
|
|
2008
|
-
});
|
|
2009
|
-
}
|
|
2010
1933
|
const collectFeishuSecurityWarnings = createAllowlistProviderGroupPolicyWarningCollector({
|
|
2011
1934
|
providerConfigPresent: (cfg) => cfg.channels?.feishu !== void 0,
|
|
2012
1935
|
resolveGroupPolicy: ({ cfg, accountId }) => resolveFeishuAccount({
|
|
@@ -2102,9 +2025,7 @@ function buildFeishuSendReplyAnchor(ctx, accountId) {
|
|
|
2102
2025
|
}
|
|
2103
2026
|
function isSupportedFeishuDirectConversationId(conversationId) {
|
|
2104
2027
|
const trimmed = conversationId.trim();
|
|
2105
|
-
|
|
2106
|
-
if (trimmed.startsWith("oc_") || trimmed.startsWith("on_")) return false;
|
|
2107
|
-
return true;
|
|
2028
|
+
return Boolean(trimmed) && !trimmed.includes(":") && !trimmed.startsWith("oc_") && !trimmed.startsWith("on_");
|
|
2108
2029
|
}
|
|
2109
2030
|
function normalizeFeishuAcpConversationId(conversationId) {
|
|
2110
2031
|
const parsed = parseFeishuConversationId({ conversationId });
|
|
@@ -2243,18 +2164,14 @@ function resolveFeishuMessageReadTarget(ctx) {
|
|
|
2243
2164
|
chatType: ctx.toolContext?.currentChatType === "direct" ? "p2p" : ctx.toolContext?.currentChatType === "group" || ctx.toolContext?.currentChatType === "channel" ? "group" : void 0
|
|
2244
2165
|
};
|
|
2245
2166
|
}
|
|
2246
|
-
function assertFeishuMessageMatchesReadTarget(params) {
|
|
2247
|
-
if ((normalizeFeishuTarget(params.messageChatId) ?? params.messageChatId.trim()) !== params.authorizedChatId) throw new ToolAuthorizationError("Feishu message target is not allowed.");
|
|
2248
|
-
}
|
|
2249
2167
|
async function authorizeFeishuMessageReadTarget(params) {
|
|
2250
|
-
|
|
2168
|
+
if (params.target.chatType) return assertFeishuChatReadAllowed({
|
|
2251
2169
|
cfg: params.ctx.cfg,
|
|
2252
2170
|
account: params.account,
|
|
2253
2171
|
chatId: params.target.chatId,
|
|
2254
|
-
chatType,
|
|
2172
|
+
chatType: params.target.chatType,
|
|
2255
2173
|
ctx: params.ctx
|
|
2256
2174
|
});
|
|
2257
|
-
if (params.target.chatType) return authorize(params.target.chatType);
|
|
2258
2175
|
const preliminary = resolveFeishuChatReadPreliminaryAuthorization({
|
|
2259
2176
|
cfg: params.ctx.cfg,
|
|
2260
2177
|
account: params.account,
|
|
@@ -2305,19 +2222,15 @@ async function getAuthorizedFeishuMessage(params) {
|
|
|
2305
2222
|
accountId: params.ctx.accountId ?? void 0
|
|
2306
2223
|
});
|
|
2307
2224
|
if (!message) return null;
|
|
2308
|
-
if (authorizedChatId)
|
|
2309
|
-
authorizedChatId
|
|
2310
|
-
|
|
2311
|
-
|
|
2225
|
+
if (authorizedChatId) {
|
|
2226
|
+
if ((normalizeFeishuTarget(message.chatId) ?? message.chatId.trim()) !== authorizedChatId) throw new ToolAuthorizationError("Feishu message target is not allowed.");
|
|
2227
|
+
}
|
|
2228
|
+
const chatType = normalizeFeishuChatType(message.chatType) ?? resolveFeishuChatType(await params.runtime.getChatInfo(await createFeishuActionClient(params.account), message.chatId));
|
|
2312
2229
|
assertFeishuChatReadAllowed({
|
|
2313
2230
|
cfg: params.ctx.cfg,
|
|
2314
2231
|
account: params.account,
|
|
2315
2232
|
chatId: message.chatId,
|
|
2316
|
-
chatType
|
|
2317
|
-
account: params.account,
|
|
2318
|
-
message,
|
|
2319
|
-
runtime: params.runtime
|
|
2320
|
-
}),
|
|
2233
|
+
chatType,
|
|
2321
2234
|
ctx: params.ctx
|
|
2322
2235
|
});
|
|
2323
2236
|
return message;
|
|
@@ -2362,7 +2275,7 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2362
2275
|
id: "feishu",
|
|
2363
2276
|
meta,
|
|
2364
2277
|
capabilities: {
|
|
2365
|
-
chatTypes: ["direct", "
|
|
2278
|
+
chatTypes: ["direct", "group"],
|
|
2366
2279
|
polls: false,
|
|
2367
2280
|
threads: true,
|
|
2368
2281
|
media: true,
|
|
@@ -2556,7 +2469,7 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2556
2469
|
...ctx.action === "send" ? { propagateMediaUploadFailure: true } : {}
|
|
2557
2470
|
});
|
|
2558
2471
|
else {
|
|
2559
|
-
const { target, ...delivery } = await (await
|
|
2472
|
+
const { target, ...delivery } = await (await resolveFeishuMessageSender("text"))(outboundContext);
|
|
2560
2473
|
result = {
|
|
2561
2474
|
...delivery,
|
|
2562
2475
|
chatId: target?.id
|