@openclaw/feishu 2026.7.1 → 2026.7.2-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/{accounts-Bs5uJ4h0.js → accounts-BDoGHJDk.js} +29 -54
- package/dist/api.js +35 -25
- package/dist/{channel-DRQRQQQ3.js → channel-DdPQ2HGh.js} +578 -369
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-pvr-Y5ji.js → channel.runtime-DJ_B-bpG.js} +272 -107
- package/dist/{client-B7EAV_Ss.js → client-BUC-R2Wi.js} +4 -13
- package/dist/contract-api.js +1 -1
- package/dist/{conversation-id-CdLdoot3.js → conversation-id-BeJL-wq7.js} +3 -0
- package/dist/doctor-contract-DXH5hux1.js +97 -0
- package/dist/doctor-contract-api.js +2 -0
- package/dist/{drive-D0lIhxqZ.js → drive-Bpe8ONK_.js} +181 -33
- package/dist/{monitor-CsbheK9J.js → monitor-M3iYtoh4.js} +3 -3
- package/dist/{monitor.account-Dr7do33p.js → monitor.account-F99J862T.js} +474 -493
- package/dist/monitor.startup-DpZzunQn.js +43 -0
- package/dist/{probe-Dxyo9zlw.js → probe-CAloGqgG.js} +3 -6
- package/dist/{secret-contract-DLaBl9m4.js → secret-contract-DnlMcrn5.js} +14 -69
- package/dist/secret-contract-api.js +1 -1
- package/dist/{send-Be2GMA6Z.js → send-CpnLYueT.js} +12 -35
- package/dist/send-result-CPS7AozW.js +766 -0
- package/dist/{session-conversation-BYuoVJwl.js → session-conversation-BksWrfzm.js} +1 -1
- package/dist/session-key-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +0 -5
- package/dist/{subagent-hooks-B2iWPYJ1.js → subagent-hooks-BKTOxB-T.js} +9 -5
- package/dist/subagent-hooks-api.js +1 -1
- package/node_modules/@types/debug/LICENSE +21 -0
- package/node_modules/@types/debug/README.md +69 -0
- package/node_modules/@types/debug/index.d.ts +50 -0
- package/node_modules/@types/debug/package.json +58 -0
- package/node_modules/@types/mdast/LICENSE +21 -0
- package/node_modules/@types/mdast/README.md +15 -0
- package/node_modules/@types/mdast/index.d.ts +1123 -0
- package/node_modules/@types/mdast/package.json +47 -0
- package/node_modules/@types/ms/LICENSE +21 -0
- package/node_modules/@types/ms/README.md +82 -0
- package/node_modules/@types/ms/index.d.ts +63 -0
- package/node_modules/@types/ms/package.json +26 -0
- package/node_modules/@types/unist/LICENSE +21 -0
- package/node_modules/@types/unist/README.md +15 -0
- package/node_modules/@types/unist/index.d.ts +119 -0
- package/node_modules/@types/unist/package.json +60 -0
- package/node_modules/character-entities/index.d.ts +6 -0
- package/node_modules/character-entities/index.js +2132 -0
- package/node_modules/character-entities/license +22 -0
- package/node_modules/character-entities/package.json +78 -0
- package/node_modules/character-entities/readme.md +152 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/decode-named-character-reference/index.d.ts +13 -0
- package/node_modules/decode-named-character-reference/index.d.ts.map +1 -0
- package/node_modules/decode-named-character-reference/index.dom.d.ts +6 -0
- package/node_modules/decode-named-character-reference/index.dom.d.ts.map +1 -0
- package/node_modules/decode-named-character-reference/index.dom.js +32 -0
- package/node_modules/decode-named-character-reference/index.js +19 -0
- package/node_modules/decode-named-character-reference/license +22 -0
- package/node_modules/decode-named-character-reference/package.json +90 -0
- package/node_modules/decode-named-character-reference/readme.md +136 -0
- package/node_modules/dequal/dist/index.js +86 -0
- package/node_modules/dequal/dist/index.min.js +1 -0
- package/node_modules/dequal/dist/index.mjs +84 -0
- package/node_modules/dequal/index.d.ts +1 -0
- package/node_modules/dequal/license +21 -0
- package/node_modules/dequal/lite/index.d.ts +1 -0
- package/node_modules/dequal/lite/index.js +31 -0
- package/node_modules/dequal/lite/index.min.js +1 -0
- package/node_modules/dequal/lite/index.mjs +29 -0
- package/node_modules/dequal/package.json +57 -0
- package/node_modules/dequal/readme.md +112 -0
- package/node_modules/devlop/lib/default.js +9 -0
- package/node_modules/devlop/lib/development.d.ts +84 -0
- package/node_modules/devlop/lib/development.js +238 -0
- package/node_modules/devlop/license +22 -0
- package/node_modules/devlop/package.json +80 -0
- package/node_modules/devlop/readme.md +360 -0
- package/node_modules/longest-streak/index.d.ts +11 -0
- package/node_modules/longest-streak/index.js +36 -0
- package/node_modules/longest-streak/license +22 -0
- package/node_modules/longest-streak/package.json +73 -0
- package/node_modules/longest-streak/readme.md +150 -0
- package/node_modules/markdown-table/index.d.ts +171 -0
- package/node_modules/markdown-table/index.d.ts.map +1 -0
- package/node_modules/markdown-table/index.js +393 -0
- package/node_modules/markdown-table/license +22 -0
- package/node_modules/markdown-table/package.json +77 -0
- package/node_modules/markdown-table/readme.md +344 -0
- package/node_modules/mdast-util-from-markdown/dev/index.d.ts +23 -0
- package/node_modules/mdast-util-from-markdown/dev/index.js +2 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts +53 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts.map +1 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/index.js +1348 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/types.d.ts +295 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/types.js +2 -0
- package/node_modules/mdast-util-from-markdown/index.d.ts +23 -0
- package/node_modules/mdast-util-from-markdown/index.js +2 -0
- package/node_modules/mdast-util-from-markdown/lib/index.d.ts +53 -0
- package/node_modules/mdast-util-from-markdown/lib/index.d.ts.map +1 -0
- package/node_modules/mdast-util-from-markdown/lib/index.js +1177 -0
- package/node_modules/mdast-util-from-markdown/lib/types.d.ts +295 -0
- package/node_modules/mdast-util-from-markdown/lib/types.js +2 -0
- package/node_modules/mdast-util-from-markdown/license +22 -0
- package/node_modules/mdast-util-from-markdown/package.json +99 -0
- package/node_modules/mdast-util-from-markdown/readme.md +535 -0
- package/node_modules/mdast-util-gfm-table/index.d.ts +54 -0
- package/node_modules/mdast-util-gfm-table/index.js +2 -0
- package/node_modules/mdast-util-gfm-table/lib/index.d.ts +51 -0
- package/node_modules/mdast-util-gfm-table/lib/index.js +300 -0
- package/node_modules/mdast-util-gfm-table/license +22 -0
- package/node_modules/mdast-util-gfm-table/package.json +101 -0
- package/node_modules/mdast-util-gfm-table/readme.md +605 -0
- package/node_modules/mdast-util-phrasing/index.d.ts +1 -0
- package/node_modules/mdast-util-phrasing/index.js +1 -0
- package/node_modules/mdast-util-phrasing/lib/index.d.ts +3 -0
- package/node_modules/mdast-util-phrasing/lib/index.js +45 -0
- package/node_modules/mdast-util-phrasing/license +23 -0
- package/node_modules/mdast-util-phrasing/package.json +78 -0
- package/node_modules/mdast-util-phrasing/readme.md +200 -0
- package/node_modules/mdast-util-to-markdown/index.d.ts +16 -0
- package/node_modules/mdast-util-to-markdown/index.js +3 -0
- package/node_modules/mdast-util-to-markdown/lib/configure.d.ts +9 -0
- package/node_modules/mdast-util-to-markdown/lib/configure.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/configure.js +79 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts +17 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +29 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts +13 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/break.js +30 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts +13 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/code.js +75 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts +13 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.js +76 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts +24 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +69 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts +13 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.js +75 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts +15 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/html.js +20 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts +21 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +63 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts +21 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image.js +82 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/index.d.ts +42 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/index.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/index.js +45 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts +19 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +76 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts +21 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +63 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts +24 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link.js +114 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts +13 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +62 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts +13 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list.js +100 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts +17 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +20 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts +13 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/root.js +23 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts +24 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.js +69 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts +17 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/text.js +15 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts +11 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +21 -0
- package/node_modules/mdast-util-to-markdown/lib/index.d.ts +14 -0
- package/node_modules/mdast-util-to-markdown/lib/index.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/index.js +187 -0
- package/node_modules/mdast-util-to-markdown/lib/join.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/join.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/join.js +39 -0
- package/node_modules/mdast-util-to-markdown/lib/types.d.ts +965 -0
- package/node_modules/mdast-util-to-markdown/lib/types.js +2 -0
- package/node_modules/mdast-util-to-markdown/lib/unsafe.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/unsafe.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/unsafe.js +146 -0
- package/node_modules/mdast-util-to-markdown/lib/util/association.d.ts +2 -0
- package/node_modules/mdast-util-to-markdown/lib/util/association.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/association.js +33 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +21 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts +8 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +38 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +21 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +21 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +21 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +21 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +21 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +21 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +21 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +21 -0
- package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.d.ts +2 -0
- package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.js +24 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts +19 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +84 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts +19 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +125 -0
- package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts +33 -0
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +82 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts +13 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +22 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts +9 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +34 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts +9 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +34 -0
- package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.d.ts +2 -0
- package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +35 -0
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts +12 -0
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +41 -0
- package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts +29 -0
- package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/safe.js +174 -0
- package/node_modules/mdast-util-to-markdown/lib/util/track.d.ts +2 -0
- package/node_modules/mdast-util-to-markdown/lib/util/track.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/track.js +55 -0
- package/node_modules/mdast-util-to-markdown/license +22 -0
- package/node_modules/mdast-util-to-markdown/package.json +132 -0
- package/node_modules/mdast-util-to-markdown/readme.md +750 -0
- package/node_modules/mdast-util-to-string/index.d.ts +2 -0
- package/node_modules/mdast-util-to-string/index.js +5 -0
- package/node_modules/mdast-util-to-string/lib/index.d.ts +31 -0
- package/node_modules/mdast-util-to-string/lib/index.js +108 -0
- package/node_modules/mdast-util-to-string/license +22 -0
- package/node_modules/mdast-util-to-string/package.json +78 -0
- package/node_modules/mdast-util-to-string/readme.md +218 -0
- package/node_modules/micromark/dev/index.d.ts +82 -0
- package/node_modules/micromark/dev/index.d.ts.map +1 -0
- package/node_modules/micromark/dev/index.js +68 -0
- package/node_modules/micromark/dev/lib/compile.d.ts +16 -0
- package/node_modules/micromark/dev/lib/compile.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/compile.js +1152 -0
- package/node_modules/micromark/dev/lib/constructs.d.ts +73 -0
- package/node_modules/micromark/dev/lib/constructs.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/constructs.js +101 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts +46 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.js +717 -0
- package/node_modules/micromark/dev/lib/initialize/content.d.ts +4 -0
- package/node_modules/micromark/dev/lib/initialize/content.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/content.js +99 -0
- package/node_modules/micromark/dev/lib/initialize/document.d.ts +10 -0
- package/node_modules/micromark/dev/lib/initialize/document.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/document.js +445 -0
- package/node_modules/micromark/dev/lib/initialize/flow.d.ts +4 -0
- package/node_modules/micromark/dev/lib/initialize/flow.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/flow.js +86 -0
- package/node_modules/micromark/dev/lib/initialize/text.d.ts +8 -0
- package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/text.js +244 -0
- package/node_modules/micromark/dev/lib/parse.d.ts +10 -0
- package/node_modules/micromark/dev/lib/parse.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/parse.js +58 -0
- package/node_modules/micromark/dev/lib/postprocess.d.ts +9 -0
- package/node_modules/micromark/dev/lib/postprocess.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/postprocess.js +19 -0
- package/node_modules/micromark/dev/lib/preprocess.d.ts +13 -0
- package/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/preprocess.js +141 -0
- package/node_modules/micromark/dev/stream.d.ts +35 -0
- package/node_modules/micromark/dev/stream.d.ts.map +1 -0
- package/node_modules/micromark/dev/stream.js +270 -0
- package/node_modules/micromark/index.d.ts +82 -0
- package/node_modules/micromark/index.d.ts.map +1 -0
- package/node_modules/micromark/index.js +60 -0
- package/node_modules/micromark/lib/compile.d.ts +16 -0
- package/node_modules/micromark/lib/compile.d.ts.map +1 -0
- package/node_modules/micromark/lib/compile.js +1060 -0
- package/node_modules/micromark/lib/constructs.d.ts +73 -0
- package/node_modules/micromark/lib/constructs.d.ts.map +1 -0
- package/node_modules/micromark/lib/constructs.js +85 -0
- package/node_modules/micromark/lib/create-tokenizer.d.ts +46 -0
- package/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -0
- package/node_modules/micromark/lib/create-tokenizer.js +611 -0
- package/node_modules/micromark/lib/initialize/content.d.ts +4 -0
- package/node_modules/micromark/lib/initialize/content.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/content.js +79 -0
- package/node_modules/micromark/lib/initialize/document.d.ts +10 -0
- package/node_modules/micromark/lib/initialize/document.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/document.js +362 -0
- package/node_modules/micromark/lib/initialize/flow.d.ts +4 -0
- package/node_modules/micromark/lib/initialize/flow.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/flow.js +58 -0
- package/node_modules/micromark/lib/initialize/text.d.ts +8 -0
- package/node_modules/micromark/lib/initialize/text.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/text.js +212 -0
- package/node_modules/micromark/lib/parse.d.ts +10 -0
- package/node_modules/micromark/lib/parse.d.ts.map +1 -0
- package/node_modules/micromark/lib/parse.js +56 -0
- package/node_modules/micromark/lib/postprocess.d.ts +9 -0
- package/node_modules/micromark/lib/postprocess.d.ts.map +1 -0
- package/node_modules/micromark/lib/postprocess.js +18 -0
- package/node_modules/micromark/lib/preprocess.d.ts +13 -0
- package/node_modules/micromark/lib/preprocess.d.ts.map +1 -0
- package/node_modules/micromark/lib/preprocess.js +115 -0
- package/node_modules/micromark/license +22 -0
- package/node_modules/micromark/package.json +100 -0
- package/node_modules/micromark/readme.md +488 -0
- package/node_modules/micromark/stream.d.ts +35 -0
- package/node_modules/micromark/stream.d.ts.map +1 -0
- package/node_modules/micromark/stream.js +256 -0
- package/node_modules/micromark-core-commonmark/dev/index.d.ts +23 -0
- package/node_modules/micromark-core-commonmark/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/index.js +22 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.js +300 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.js +269 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.js +62 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.js +162 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.js +69 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.js +166 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +514 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +202 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.js +257 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts +7 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.js +185 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.js +295 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js +65 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +233 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +989 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.js +783 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +656 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +110 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +62 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.js +34 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.js +306 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +210 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js +120 -0
- package/node_modules/micromark-core-commonmark/index.d.ts +23 -0
- package/node_modules/micromark-core-commonmark/index.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/index.js +22 -0
- package/node_modules/micromark-core-commonmark/lib/attention.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/attention.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/attention.js +241 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.js +233 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.js +61 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.js +143 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.js +64 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.js +149 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.js +460 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.js +177 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.js +225 -0
- package/node_modules/micromark-core-commonmark/lib/content.d.ts +7 -0
- package/node_modules/micromark-core-commonmark/lib/content.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/content.js +163 -0
- package/node_modules/micromark-core-commonmark/lib/definition.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/definition.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/definition.js +254 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +60 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.js +195 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.js +876 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.js +678 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.js +560 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.js +102 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.js +55 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.js +33 -0
- package/node_modules/micromark-core-commonmark/lib/list.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/list.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/list.js +213 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.js +185 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.js +102 -0
- package/node_modules/micromark-core-commonmark/license +22 -0
- package/node_modules/micromark-core-commonmark/package.json +74 -0
- package/node_modules/micromark-core-commonmark/readme.md +171 -0
- package/node_modules/micromark-extension-gfm-table/dev/index.d.ts +55 -0
- package/node_modules/micromark-extension-gfm-table/dev/index.js +2 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts +38 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts.map +1 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.js +212 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/html.d.ts +11 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/html.d.ts.map +1 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/html.js +148 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/infer.d.ts +14 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/infer.d.ts.map +1 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/infer.js +64 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.d.ts +18 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.d.ts.map +1 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.js +941 -0
- package/node_modules/micromark-extension-gfm-table/index.d.ts +55 -0
- package/node_modules/micromark-extension-gfm-table/index.js +2 -0
- package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts +38 -0
- package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts.map +1 -0
- package/node_modules/micromark-extension-gfm-table/lib/edit-map.js +202 -0
- package/node_modules/micromark-extension-gfm-table/lib/html.d.ts +11 -0
- package/node_modules/micromark-extension-gfm-table/lib/html.d.ts.map +1 -0
- package/node_modules/micromark-extension-gfm-table/lib/html.js +130 -0
- package/node_modules/micromark-extension-gfm-table/lib/infer.d.ts +14 -0
- package/node_modules/micromark-extension-gfm-table/lib/infer.d.ts.map +1 -0
- package/node_modules/micromark-extension-gfm-table/lib/infer.js +52 -0
- package/node_modules/micromark-extension-gfm-table/lib/syntax.d.ts +18 -0
- package/node_modules/micromark-extension-gfm-table/lib/syntax.d.ts.map +1 -0
- package/node_modules/micromark-extension-gfm-table/lib/syntax.js +819 -0
- package/node_modules/micromark-extension-gfm-table/license +22 -0
- package/node_modules/micromark-extension-gfm-table/package.json +128 -0
- package/node_modules/micromark-extension-gfm-table/readme.md +515 -0
- package/node_modules/micromark-factory-destination/dev/index.d.ts +42 -0
- package/node_modules/micromark-factory-destination/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-destination/dev/index.js +255 -0
- package/node_modules/micromark-factory-destination/index.d.ts +42 -0
- package/node_modules/micromark-factory-destination/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-destination/index.js +206 -0
- package/node_modules/micromark-factory-destination/license +22 -0
- package/node_modules/micromark-factory-destination/package.json +57 -0
- package/node_modules/micromark-factory-destination/readme.md +234 -0
- package/node_modules/micromark-factory-label/dev/index.d.ts +37 -0
- package/node_modules/micromark-factory-label/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-label/dev/index.js +172 -0
- package/node_modules/micromark-factory-label/index.d.ts +37 -0
- package/node_modules/micromark-factory-label/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-label/index.js +148 -0
- package/node_modules/micromark-factory-label/license +22 -0
- package/node_modules/micromark-factory-label/package.json +60 -0
- package/node_modules/micromark-factory-label/readme.md +224 -0
- package/node_modules/micromark-factory-space/dev/index.d.ts +37 -0
- package/node_modules/micromark-factory-space/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-space/dev/index.js +67 -0
- package/node_modules/micromark-factory-space/index.d.ts +37 -0
- package/node_modules/micromark-factory-space/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-space/index.js +64 -0
- package/node_modules/micromark-factory-space/license +22 -0
- package/node_modules/micromark-factory-space/package.json +55 -0
- package/node_modules/micromark-factory-space/readme.md +225 -0
- package/node_modules/micromark-factory-title/dev/index.d.ts +36 -0
- package/node_modules/micromark-factory-title/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-title/dev/index.js +169 -0
- package/node_modules/micromark-factory-title/index.d.ts +36 -0
- package/node_modules/micromark-factory-title/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-title/index.js +158 -0
- package/node_modules/micromark-factory-title/license +22 -0
- package/node_modules/micromark-factory-title/package.json +58 -0
- package/node_modules/micromark-factory-title/readme.md +229 -0
- package/node_modules/micromark-factory-whitespace/dev/index.d.ts +22 -0
- package/node_modules/micromark-factory-whitespace/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-whitespace/dev/index.js +53 -0
- package/node_modules/micromark-factory-whitespace/index.d.ts +22 -0
- package/node_modules/micromark-factory-whitespace/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-whitespace/index.js +44 -0
- package/node_modules/micromark-factory-whitespace/license +22 -0
- package/node_modules/micromark-factory-whitespace/package.json +57 -0
- package/node_modules/micromark-factory-whitespace/readme.md +205 -0
- package/node_modules/micromark-util-character/dev/index.d.ts +195 -0
- package/node_modules/micromark-util-character/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-character/dev/index.js +252 -0
- package/node_modules/micromark-util-character/index.d.ts +195 -0
- package/node_modules/micromark-util-character/index.d.ts.map +1 -0
- package/node_modules/micromark-util-character/index.js +246 -0
- package/node_modules/micromark-util-character/license +22 -0
- package/node_modules/micromark-util-character/package.json +57 -0
- package/node_modules/micromark-util-character/readme.md +446 -0
- package/node_modules/micromark-util-chunked/dev/index.d.ts +41 -0
- package/node_modules/micromark-util-chunked/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-chunked/dev/index.js +89 -0
- package/node_modules/micromark-util-chunked/index.d.ts +41 -0
- package/node_modules/micromark-util-chunked/index.d.ts.map +1 -0
- package/node_modules/micromark-util-chunked/index.js +81 -0
- package/node_modules/micromark-util-chunked/license +22 -0
- package/node_modules/micromark-util-chunked/package.json +57 -0
- package/node_modules/micromark-util-chunked/readme.md +219 -0
- package/node_modules/micromark-util-classify-character/dev/index.d.ts +18 -0
- package/node_modules/micromark-util-classify-character/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-classify-character/dev/index.js +38 -0
- package/node_modules/micromark-util-classify-character/index.d.ts +18 -0
- package/node_modules/micromark-util-classify-character/index.d.ts.map +1 -0
- package/node_modules/micromark-util-classify-character/index.js +27 -0
- package/node_modules/micromark-util-classify-character/license +22 -0
- package/node_modules/micromark-util-classify-character/package.json +59 -0
- package/node_modules/micromark-util-classify-character/readme.md +205 -0
- package/node_modules/micromark-util-combine-extensions/index.d.ts +22 -0
- package/node_modules/micromark-util-combine-extensions/index.d.ts.map +1 -0
- package/node_modules/micromark-util-combine-extensions/index.js +143 -0
- package/node_modules/micromark-util-combine-extensions/license +22 -0
- package/node_modules/micromark-util-combine-extensions/package.json +52 -0
- package/node_modules/micromark-util-combine-extensions/readme.md +201 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts +16 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.js +42 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts +16 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.js +32 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/license +22 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/package.json +59 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/readme.md +184 -0
- package/node_modules/micromark-util-decode-string/dev/index.d.ts +14 -0
- package/node_modules/micromark-util-decode-string/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-string/dev/index.js +53 -0
- package/node_modules/micromark-util-decode-string/index.d.ts +14 -0
- package/node_modules/micromark-util-decode-string/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-string/index.js +45 -0
- package/node_modules/micromark-util-decode-string/license +22 -0
- package/node_modules/micromark-util-decode-string/package.json +63 -0
- package/node_modules/micromark-util-decode-string/readme.md +179 -0
- package/node_modules/micromark-util-encode/index.d.ts +14 -0
- package/node_modules/micromark-util-encode/index.d.ts.map +1 -0
- package/node_modules/micromark-util-encode/index.js +33 -0
- package/node_modules/micromark-util-encode/license +22 -0
- package/node_modules/micromark-util-encode/package.json +47 -0
- package/node_modules/micromark-util-encode/readme.md +176 -0
- package/node_modules/micromark-util-html-tag-name/index.d.ts +30 -0
- package/node_modules/micromark-util-html-tag-name/index.d.ts.map +1 -0
- package/node_modules/micromark-util-html-tag-name/index.js +93 -0
- package/node_modules/micromark-util-html-tag-name/license +22 -0
- package/node_modules/micromark-util-html-tag-name/package.json +47 -0
- package/node_modules/micromark-util-html-tag-name/readme.md +193 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts +21 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.js +38 -0
- package/node_modules/micromark-util-normalize-identifier/index.d.ts +21 -0
- package/node_modules/micromark-util-normalize-identifier/index.d.ts.map +1 -0
- package/node_modules/micromark-util-normalize-identifier/index.js +33 -0
- package/node_modules/micromark-util-normalize-identifier/license +22 -0
- package/node_modules/micromark-util-normalize-identifier/package.json +58 -0
- package/node_modules/micromark-util-normalize-identifier/readme.md +187 -0
- package/node_modules/micromark-util-resolve-all/index.d.ts +22 -0
- package/node_modules/micromark-util-resolve-all/index.d.ts.map +1 -0
- package/node_modules/micromark-util-resolve-all/index.js +32 -0
- package/node_modules/micromark-util-resolve-all/license +22 -0
- package/node_modules/micromark-util-resolve-all/package.json +48 -0
- package/node_modules/micromark-util-resolve-all/readme.md +238 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts +36 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.js +124 -0
- package/node_modules/micromark-util-sanitize-uri/index.d.ts +36 -0
- package/node_modules/micromark-util-sanitize-uri/index.d.ts.map +1 -0
- package/node_modules/micromark-util-sanitize-uri/index.js +107 -0
- package/node_modules/micromark-util-sanitize-uri/license +22 -0
- package/node_modules/micromark-util-sanitize-uri/package.json +59 -0
- package/node_modules/micromark-util-sanitize-uri/readme.md +214 -0
- package/node_modules/micromark-util-subtokenize/dev/index.d.ts +12 -0
- package/node_modules/micromark-util-subtokenize/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/dev/index.js +284 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts +161 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js +288 -0
- package/node_modules/micromark-util-subtokenize/index.d.ts +12 -0
- package/node_modules/micromark-util-subtokenize/index.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/index.js +228 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts +161 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +251 -0
- package/node_modules/micromark-util-subtokenize/license +22 -0
- package/node_modules/micromark-util-subtokenize/package.json +60 -0
- package/node_modules/micromark-util-subtokenize/readme.md +181 -0
- package/node_modules/micromark-util-symbol/lib/codes.d.ts +139 -0
- package/node_modules/micromark-util-symbol/lib/codes.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/codes.js +158 -0
- package/node_modules/micromark-util-symbol/lib/constants.d.ts +37 -0
- package/node_modules/micromark-util-symbol/lib/constants.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/constants.js +44 -0
- package/node_modules/micromark-util-symbol/lib/default.d.ts +5 -0
- package/node_modules/micromark-util-symbol/lib/default.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/default.js +4 -0
- package/node_modules/micromark-util-symbol/lib/types.d.ts +106 -0
- package/node_modules/micromark-util-symbol/lib/types.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/types.js +453 -0
- package/node_modules/micromark-util-symbol/lib/values.d.ts +102 -0
- package/node_modules/micromark-util-symbol/lib/values.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/values.js +109 -0
- package/node_modules/micromark-util-symbol/license +22 -0
- package/node_modules/micromark-util-symbol/package.json +43 -0
- package/node_modules/micromark-util-symbol/readme.md +168 -0
- package/node_modules/micromark-util-types/index.d.ts +1312 -0
- package/node_modules/micromark-util-types/index.js +2 -0
- package/node_modules/micromark-util-types/license +22 -0
- package/node_modules/micromark-util-types/package.json +71 -0
- package/node_modules/micromark-util-types/readme.md +151 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/unist-util-is/index.d.ts +5 -0
- package/node_modules/unist-util-is/index.d.ts.map +1 -0
- package/node_modules/unist-util-is/index.js +7 -0
- package/node_modules/unist-util-is/lib/index.d.ts +111 -0
- package/node_modules/unist-util-is/lib/index.d.ts.map +1 -0
- package/node_modules/unist-util-is/lib/index.js +296 -0
- package/node_modules/unist-util-is/license +22 -0
- package/node_modules/unist-util-is/package.json +103 -0
- package/node_modules/unist-util-is/readme.md +351 -0
- package/node_modules/unist-util-stringify-position/index.d.ts +1 -0
- package/node_modules/unist-util-stringify-position/index.js +1 -0
- package/node_modules/unist-util-stringify-position/lib/index.d.ts +61 -0
- package/node_modules/unist-util-stringify-position/lib/index.js +84 -0
- package/node_modules/unist-util-stringify-position/license +22 -0
- package/node_modules/unist-util-stringify-position/package.json +80 -0
- package/node_modules/unist-util-stringify-position/readme.md +206 -0
- package/node_modules/unist-util-visit/index.d.ts +9 -0
- package/node_modules/unist-util-visit/index.js +2 -0
- package/node_modules/unist-util-visit/lib/index.d.ts +195 -0
- package/node_modules/unist-util-visit/lib/index.d.ts.map +1 -0
- package/node_modules/unist-util-visit/lib/index.js +312 -0
- package/node_modules/unist-util-visit/license +22 -0
- package/node_modules/unist-util-visit/package.json +108 -0
- package/node_modules/unist-util-visit/readme.md +313 -0
- package/node_modules/unist-util-visit-parents/index.d.ts +14 -0
- package/node_modules/unist-util-visit-parents/index.js +2 -0
- package/node_modules/unist-util-visit-parents/lib/color.d.ts +6 -0
- package/node_modules/unist-util-visit-parents/lib/color.d.ts.map +1 -0
- package/node_modules/unist-util-visit-parents/lib/color.js +7 -0
- package/node_modules/unist-util-visit-parents/lib/color.node.d.ts +6 -0
- package/node_modules/unist-util-visit-parents/lib/color.node.d.ts.map +1 -0
- package/node_modules/unist-util-visit-parents/lib/color.node.js +7 -0
- package/node_modules/unist-util-visit-parents/lib/index.d.ts +219 -0
- package/node_modules/unist-util-visit-parents/lib/index.d.ts.map +1 -0
- package/node_modules/unist-util-visit-parents/lib/index.js +399 -0
- package/node_modules/unist-util-visit-parents/license +22 -0
- package/node_modules/unist-util-visit-parents/package.json +106 -0
- package/node_modules/unist-util-visit-parents/readme.md +388 -0
- package/node_modules/zwitch/index.d.ts +67 -0
- package/node_modules/zwitch/index.js +118 -0
- package/node_modules/zwitch/license +22 -0
- package/node_modules/zwitch/package.json +72 -0
- package/node_modules/zwitch/readme.md +226 -0
- package/npm-shrinkwrap.json +737 -3
- package/openclaw.plugin.json +154 -81
- package/package.json +10 -7
- package/skills/feishu-drive/SKILL.md +5 -2
- package/dist/legacy-state-migrations-api.js +0 -73
- package/dist/monitor.state-DAHbcR2N.js +0 -173
- package/dist/send-result-BMQw-YhV.js +0 -287
|
@@ -1,61 +1,57 @@
|
|
|
1
|
-
import { a as resolveDefaultFeishuAccountId, d as isRecord$1, i as listFeishuAccountIds, n as inspectFeishuCredentials, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-
|
|
2
|
-
import { i as resolveReceiveIdType, n as looksLikeFeishuId, r as normalizeFeishuTarget
|
|
3
|
-
import { a as readNativeFeishuCardJson, n as createFeishuSendReceipt, u as
|
|
4
|
-
import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, o as resolveConfiguredFeishuGroupSessionScope, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-
|
|
1
|
+
import { a as resolveDefaultFeishuAccountId, d as isRecord$1, i as listFeishuAccountIds, n as inspectFeishuCredentials, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-BDoGHJDk.js";
|
|
2
|
+
import { i as resolveReceiveIdType, n as looksLikeFeishuId, r as normalizeFeishuTarget } from "./targets-BUjQ1TcA.js";
|
|
3
|
+
import { C as resolveFeishuGroupConfig, E as resolveFeishuGroupToolPolicy, M as createFeishuCardInteractionEnvelope, O as normalizeFeishuChatType, _ as isFeishuGroupReadAllowed, a as readNativeFeishuCardJson, g as canEnumerateAllFeishuPeers, h as canEnumerateAllFeishuGroups, k as resolveFeishuChatType, m as authorizeFeishuChatMemberRead, n as createFeishuSendReceipt, p as assertFeishuChatReadAllowed, u as chunkFeishuMarkdown, v as isFeishuGroupReadEnabled, y as resolveFeishuChatReadPreliminaryAuthorization } from "./send-result-CPS7AozW.js";
|
|
4
|
+
import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, o as resolveConfiguredFeishuGroupSessionScope, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-BeJL-wq7.js";
|
|
5
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DXH5hux1.js";
|
|
5
6
|
import { t as messageActionTargetAliases } from "./security-audit-BIeA3W3Q.js";
|
|
6
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
7
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DnlMcrn5.js";
|
|
7
8
|
import { t as collectFeishuSecurityAuditFindings } from "./security-audit-shared-BIHeF-S_.js";
|
|
8
|
-
import { t as resolveFeishuSessionConversation } from "./session-conversation-
|
|
9
|
+
import { t as resolveFeishuSessionConversation } from "./session-conversation-BksWrfzm.js";
|
|
9
10
|
import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
10
11
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
11
12
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
13
|
+
import { ToolAuthorizationError, createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
12
14
|
import { adaptScopedAccountAccessor, createHybridChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
13
15
|
import { buildChannelOutboundSessionRoute, createChatChannelPlugin, stripChannelTargetPrefix } from "openclaw/plugin-sdk/channel-core";
|
|
14
16
|
import { createAccountStatusSink, createRuntimeOutboundDelegates, defineChannelMessageAdapter } from "openclaw/plugin-sdk/channel-outbound";
|
|
15
17
|
import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
|
|
16
18
|
import { createAllowlistProviderGroupPolicyWarningCollector, projectConfigAccountIdWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
17
19
|
import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime";
|
|
18
|
-
import { createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter, listDirectoryGroupEntriesFromMapKeysAndAllowFrom, listDirectoryUserEntriesFromAllowFromAndMapKeys } from "openclaw/plugin-sdk/directory-runtime";
|
|
19
|
-
import { interactiveReplyToPresentation, normalizeInteractiveReply, normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
|
|
20
|
+
import { applyDirectoryQueryAndLimit, createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter, listDirectoryGroupEntriesFromMapKeysAndAllowFrom, listDirectoryUserEntriesFromAllowFrom, listDirectoryUserEntriesFromAllowFromAndMapKeys } from "openclaw/plugin-sdk/directory-runtime";
|
|
21
|
+
import { interactiveReplyToPresentation, normalizeInteractiveReply, normalizeMessagePresentation, renderMessagePresentationChartFallbackText, renderMessagePresentationFallbackText, renderMessagePresentationTableFallbackText, resolveInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
|
|
20
22
|
import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
21
23
|
import { buildProbeChannelStatusSummary, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
22
24
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
23
|
-
import {
|
|
24
|
-
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2
|
|
25
|
-
import {
|
|
26
|
-
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
27
|
-
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives";
|
|
25
|
+
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
26
|
+
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2 } from "openclaw/plugin-sdk/account-resolution";
|
|
27
|
+
import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
28
28
|
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
29
29
|
import { normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/account-id";
|
|
30
|
+
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
30
31
|
import { z } from "zod";
|
|
31
32
|
import { buildSecretInputSchema, hasConfiguredSecretInput as hasConfiguredSecretInput$2 } from "openclaw/plugin-sdk/secret-input";
|
|
32
33
|
import fs from "node:fs";
|
|
33
34
|
import os from "node:os";
|
|
34
35
|
import path from "node:path";
|
|
35
36
|
import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
|
|
36
|
-
import {
|
|
37
|
+
import { deleteSessionEntry, isValidAgentHarnessSessionStoreEntry, listSessionEntries, loadTranscriptEventsSync, parseSqliteSessionFileMarker, resolveSessionStoreBackupPaths, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
37
38
|
import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
|
|
38
|
-
import { createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
39
39
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, createSetupTranslator, formatDocsLink, hasConfiguredSecretInput as hasConfiguredSecretInput$1, mergeAllowFromEntries, patchTopLevelChannelConfigSection, promptSingleChannelSecretInput, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
40
40
|
//#region extensions/feishu/src/approval-auth.ts
|
|
41
41
|
function normalizeFeishuApproverId(value) {
|
|
42
42
|
const trimmed = normalizeOptionalLowercaseString(normalizeFeishuTarget(String(value)));
|
|
43
43
|
return trimmed?.startsWith("ou_") ? trimmed : void 0;
|
|
44
44
|
}
|
|
45
|
-
const feishuApprovalAuth =
|
|
45
|
+
const feishuApprovalAuth = createChannelApprovalAuth({
|
|
46
46
|
channelLabel: "Feishu",
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
resolveInputs: ({ cfg, accountId }) => {
|
|
48
|
+
return { allowFrom: resolveFeishuAccount({
|
|
49
49
|
cfg,
|
|
50
50
|
accountId
|
|
51
|
-
}).config;
|
|
52
|
-
return resolveApprovalApprovers({
|
|
53
|
-
allowFrom: account.allowFrom,
|
|
54
|
-
normalizeApprover: normalizeFeishuApproverId
|
|
55
|
-
});
|
|
51
|
+
}).config.allowFrom };
|
|
56
52
|
},
|
|
57
|
-
|
|
58
|
-
});
|
|
53
|
+
normalizeApprover: normalizeFeishuApproverId
|
|
54
|
+
}).approvalAuth;
|
|
59
55
|
//#endregion
|
|
60
56
|
//#region extensions/feishu/src/config-schema.ts
|
|
61
57
|
const ChannelActionsSchema = z.object({ reactions: z.boolean().optional() }).strict().optional();
|
|
@@ -115,12 +111,18 @@ const RenderModeSchema = z.enum([
|
|
|
115
111
|
"raw",
|
|
116
112
|
"card"
|
|
117
113
|
]).optional();
|
|
118
|
-
const StreamingModeSchema = z.boolean().optional();
|
|
119
|
-
const BlockStreamingSchema = z.boolean().optional();
|
|
120
114
|
const BlockStreamingCoalesceSchema = z.object({
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
115
|
+
minChars: z.number().int().positive().optional(),
|
|
116
|
+
maxChars: z.number().int().positive().optional(),
|
|
117
|
+
idleMs: z.number().int().nonnegative().optional()
|
|
118
|
+
}).strict().optional();
|
|
119
|
+
const FeishuStreamingSchema = z.object({
|
|
120
|
+
mode: z.enum(["off", "partial"]).optional(),
|
|
121
|
+
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
122
|
+
block: z.object({
|
|
123
|
+
enabled: z.boolean().optional(),
|
|
124
|
+
coalesce: BlockStreamingCoalesceSchema
|
|
125
|
+
}).strict().optional()
|
|
124
126
|
}).strict().optional();
|
|
125
127
|
const ChannelHeartbeatVisibilitySchema = z.object({
|
|
126
128
|
visibility: z.enum(["visible", "hidden"]).optional(),
|
|
@@ -222,14 +224,11 @@ const FeishuSharedConfigShape = {
|
|
|
222
224
|
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
223
225
|
dms: z.record(z.string(), DmConfigSchema).optional(),
|
|
224
226
|
textChunkLimit: z.number().int().positive().optional(),
|
|
225
|
-
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
226
|
-
blockStreaming: BlockStreamingSchema,
|
|
227
|
-
blockStreamingCoalesce: BlockStreamingCoalesceSchema,
|
|
228
227
|
mediaMaxMb: z.number().positive().optional(),
|
|
229
228
|
httpTimeoutMs: z.number().int().positive().max(3e5).optional(),
|
|
230
229
|
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
231
230
|
renderMode: RenderModeSchema,
|
|
232
|
-
streaming:
|
|
231
|
+
streaming: FeishuStreamingSchema,
|
|
233
232
|
tools: FeishuToolsConfigSchema,
|
|
234
233
|
actions: ChannelActionsSchema,
|
|
235
234
|
replyInThread: ReplyInThreadSchema,
|
|
@@ -256,7 +255,7 @@ const FeishuAccountConfigSchema = z.object({
|
|
|
256
255
|
groupSessionScope: GroupSessionScopeSchema,
|
|
257
256
|
topicSessionMode: TopicSessionModeSchema
|
|
258
257
|
}).strict();
|
|
259
|
-
const
|
|
258
|
+
const FeishuChannelConfigSchema = buildChannelConfigSchema(z.object({
|
|
260
259
|
enabled: z.boolean().optional(),
|
|
261
260
|
defaultAccount: z.string().optional(),
|
|
262
261
|
appId: z.string().optional(),
|
|
@@ -333,7 +332,7 @@ const FeishuConfigSchema = z.object({
|
|
|
333
332
|
message: "channels.feishu.dmPolicy=\"open\" requires channels.feishu.allowFrom to include \"*\""
|
|
334
333
|
});
|
|
335
334
|
}
|
|
336
|
-
});
|
|
335
|
+
}), { jsonSchemaMode: "input" });
|
|
337
336
|
//#endregion
|
|
338
337
|
//#region extensions/feishu/src/directory.static.ts
|
|
339
338
|
function toFeishuDirectoryPeers(ids) {
|
|
@@ -374,6 +373,27 @@ async function listFeishuDirectoryGroups(params) {
|
|
|
374
373
|
limit: params.limit
|
|
375
374
|
}).map((entry) => entry.id));
|
|
376
375
|
}
|
|
376
|
+
async function listAuthorizedFeishuDirectoryPeers(params) {
|
|
377
|
+
return toFeishuDirectoryPeers(listDirectoryUserEntriesFromAllowFrom({
|
|
378
|
+
allowFrom: resolveFeishuAccount({
|
|
379
|
+
cfg: params.cfg,
|
|
380
|
+
accountId: params.accountId
|
|
381
|
+
}).config.allowFrom,
|
|
382
|
+
query: params.query,
|
|
383
|
+
limit: params.limit,
|
|
384
|
+
normalizeId: (entry) => normalizeFeishuTarget(entry) ?? entry
|
|
385
|
+
}).map((entry) => entry.id));
|
|
386
|
+
}
|
|
387
|
+
async function listAuthorizedFeishuDirectoryGroups(params) {
|
|
388
|
+
const account = resolveFeishuAccount({
|
|
389
|
+
cfg: params.cfg,
|
|
390
|
+
accountId: params.accountId
|
|
391
|
+
});
|
|
392
|
+
return toFeishuDirectoryGroups(applyDirectoryQueryAndLimit(listDirectoryGroupEntriesFromMapKeysAndAllowFrom({
|
|
393
|
+
groups: Object.fromEntries(Object.entries(account.config.groups ?? {}).filter(([, group]) => group?.enabled !== false)),
|
|
394
|
+
allowFrom: account.config.groupAllowFrom
|
|
395
|
+
}).filter((entry) => isFeishuGroupReadAllowed(params.cfg, account, entry.id, false)).map((entry) => entry.id), params));
|
|
396
|
+
}
|
|
377
397
|
//#endregion
|
|
378
398
|
//#region extensions/feishu/src/doctor.ts
|
|
379
399
|
const FEISHU_STATE_DIR = "feishu";
|
|
@@ -407,6 +427,12 @@ function existsFile(filePath) {
|
|
|
407
427
|
return false;
|
|
408
428
|
}
|
|
409
429
|
}
|
|
430
|
+
function resolveFeishuAgentSessionsDir(agentId) {
|
|
431
|
+
return path.join(resolveStateDir(), "agents", normalizeAgentId(agentId), "sessions");
|
|
432
|
+
}
|
|
433
|
+
function isSqliteTranscriptMarker(value) {
|
|
434
|
+
return parseSqliteSessionFileMarker(value) !== void 0;
|
|
435
|
+
}
|
|
410
436
|
function safeReadDir(dir) {
|
|
411
437
|
try {
|
|
412
438
|
return fs.readdirSync(dir, { withFileTypes: true });
|
|
@@ -472,9 +498,11 @@ function resolveConfiguredDefaultAgentId(cfg) {
|
|
|
472
498
|
function collectFeishuSessionTargets(params) {
|
|
473
499
|
const byStorePath = /* @__PURE__ */ new Map();
|
|
474
500
|
const addTarget = (target) => {
|
|
475
|
-
|
|
501
|
+
const resolvedStorePath = path.resolve(target.storePath);
|
|
502
|
+
byStorePath.set(`${normalizeAgentId(target.agentId)}\0${resolvedStorePath}`, {
|
|
476
503
|
...target,
|
|
477
|
-
|
|
504
|
+
agentId: normalizeAgentId(target.agentId),
|
|
505
|
+
storePath: resolvedStorePath
|
|
478
506
|
});
|
|
479
507
|
};
|
|
480
508
|
for (const agentId of collectConfiguredAgentIds(params.cfg)) addTarget({
|
|
@@ -528,16 +556,23 @@ function collectCorruptFeishuStateJsonFindings(feishuStateDir) {
|
|
|
528
556
|
function resolveSessionTranscriptCandidates(params) {
|
|
529
557
|
const candidates = /* @__PURE__ */ new Set();
|
|
530
558
|
const sessionsDir = path.dirname(params.storePath);
|
|
559
|
+
const agentSessionsDir = resolveFeishuAgentSessionsDir(params.agentId);
|
|
531
560
|
const addSafeCandidate = (candidate) => {
|
|
532
561
|
const resolved = path.isAbsolute(candidate) ? path.resolve(candidate) : path.resolve(sessionsDir, candidate);
|
|
533
|
-
|
|
562
|
+
const isStoreCandidate = isPathWithinRoot(resolved, sessionsDir);
|
|
563
|
+
const isAgentSessionCandidate = isPathWithinRoot(resolved, agentSessionsDir);
|
|
564
|
+
if (resolved === sessionsDir || resolved === agentSessionsDir || !isStoreCandidate && !isAgentSessionCandidate) return false;
|
|
534
565
|
candidates.add(resolved);
|
|
566
|
+
return true;
|
|
535
567
|
};
|
|
536
568
|
if (typeof params.entry.sessionId === "string" && /^[a-z0-9][a-z0-9._-]{0,127}$/i.test(params.entry.sessionId)) {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
569
|
+
let addedExplicitCandidate = false;
|
|
570
|
+
if (typeof params.entry.sessionFile === "string" && params.entry.sessionFile.trim()) {
|
|
571
|
+
const explicitSessionFile = params.entry.sessionFile.trim();
|
|
572
|
+
if (isSqliteTranscriptMarker(explicitSessionFile)) return [];
|
|
573
|
+
addedExplicitCandidate = addSafeCandidate(explicitSessionFile);
|
|
574
|
+
}
|
|
575
|
+
if (!addedExplicitCandidate) candidates.add(path.join(sessionsDir, `${params.entry.sessionId}.jsonl`));
|
|
541
576
|
return [...candidates].toSorted();
|
|
542
577
|
}
|
|
543
578
|
if (typeof params.entry.sessionFile === "string" && params.entry.sessionFile.trim()) addSafeCandidate(params.entry.sessionFile.trim());
|
|
@@ -556,6 +591,47 @@ function isBlankUserMessage(value) {
|
|
|
556
591
|
function isUserMessage(value) {
|
|
557
592
|
return isRecord(value) && value.type === "message" && isRecord(value.message) && value.message.role === "user";
|
|
558
593
|
}
|
|
594
|
+
function inspectTranscriptEntries(params) {
|
|
595
|
+
let blankUserMessageRun = 0;
|
|
596
|
+
let maxBlankUserMessageRun = 0;
|
|
597
|
+
for (const entry of params.entries) if (isBlankUserMessage(entry)) {
|
|
598
|
+
blankUserMessageRun += 1;
|
|
599
|
+
maxBlankUserMessageRun = Math.max(maxBlankUserMessageRun, blankUserMessageRun);
|
|
600
|
+
} else if (isUserMessage(entry)) blankUserMessageRun = 0;
|
|
601
|
+
if (params.entries.length === 0) {
|
|
602
|
+
if (params.allowMissingSessionHeader) return null;
|
|
603
|
+
return {
|
|
604
|
+
kind: "invalid-session-transcript",
|
|
605
|
+
sessionKey: params.sessionKey,
|
|
606
|
+
storePath: params.storePath,
|
|
607
|
+
path: params.transcriptPath,
|
|
608
|
+
reason: "empty transcript"
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
const firstEntry = params.entries[0];
|
|
612
|
+
if (!isSessionHeader(firstEntry) && (!params.allowMissingSessionHeader || !isUserMessage(firstEntry) && !isBlankUserMessage(firstEntry))) return {
|
|
613
|
+
kind: "invalid-session-transcript",
|
|
614
|
+
sessionKey: params.sessionKey,
|
|
615
|
+
storePath: params.storePath,
|
|
616
|
+
path: params.transcriptPath,
|
|
617
|
+
reason: "invalid session header"
|
|
618
|
+
};
|
|
619
|
+
if ((params.malformedLines ?? 0) > 0) return {
|
|
620
|
+
kind: "invalid-session-transcript",
|
|
621
|
+
sessionKey: params.sessionKey,
|
|
622
|
+
storePath: params.storePath,
|
|
623
|
+
path: params.transcriptPath,
|
|
624
|
+
reason: `${params.malformedLines} malformed JSONL line(s)`
|
|
625
|
+
};
|
|
626
|
+
if (maxBlankUserMessageRun >= BLANK_USER_MESSAGE_REPAIR_THRESHOLD) return {
|
|
627
|
+
kind: "blank-user-message-run",
|
|
628
|
+
sessionKey: params.sessionKey,
|
|
629
|
+
storePath: params.storePath,
|
|
630
|
+
path: params.transcriptPath,
|
|
631
|
+
count: maxBlankUserMessageRun
|
|
632
|
+
};
|
|
633
|
+
return null;
|
|
634
|
+
}
|
|
559
635
|
function inspectSessionTranscript(params) {
|
|
560
636
|
let stat;
|
|
561
637
|
try {
|
|
@@ -585,52 +661,54 @@ function inspectSessionTranscript(params) {
|
|
|
585
661
|
}
|
|
586
662
|
const entries = [];
|
|
587
663
|
let malformedLines = 0;
|
|
588
|
-
let blankUserMessageRun = 0;
|
|
589
|
-
let maxBlankUserMessageRun = 0;
|
|
590
664
|
for (const line of raw.split(/\r?\n/)) {
|
|
591
665
|
if (!line.trim()) continue;
|
|
592
666
|
try {
|
|
593
667
|
const entry = JSON.parse(line);
|
|
594
668
|
entries.push(entry);
|
|
595
|
-
if (isBlankUserMessage(entry)) {
|
|
596
|
-
blankUserMessageRun += 1;
|
|
597
|
-
maxBlankUserMessageRun = Math.max(maxBlankUserMessageRun, blankUserMessageRun);
|
|
598
|
-
} else if (isUserMessage(entry)) blankUserMessageRun = 0;
|
|
599
669
|
} catch {
|
|
600
670
|
malformedLines += 1;
|
|
601
671
|
}
|
|
602
672
|
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
if (
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
673
|
+
return inspectTranscriptEntries({
|
|
674
|
+
...params,
|
|
675
|
+
entries,
|
|
676
|
+
malformedLines
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
function inspectSqliteSessionTranscript(params) {
|
|
680
|
+
if (typeof params.entry.sessionFile !== "string") return null;
|
|
681
|
+
const marker = parseSqliteSessionFileMarker(params.entry.sessionFile);
|
|
682
|
+
if (!marker) return null;
|
|
683
|
+
const sessionId = typeof params.entry.sessionId === "string" && params.entry.sessionId.trim() ? params.entry.sessionId.trim() : marker.sessionId;
|
|
684
|
+
let entries;
|
|
685
|
+
try {
|
|
686
|
+
entries = loadTranscriptEventsSync({
|
|
687
|
+
agentId: marker.agentId,
|
|
688
|
+
sessionId,
|
|
689
|
+
sessionKey: params.sessionKey,
|
|
690
|
+
storePath: marker.storePath
|
|
691
|
+
});
|
|
692
|
+
} catch {
|
|
693
|
+
return {
|
|
694
|
+
kind: "invalid-session-transcript",
|
|
695
|
+
sessionKey: params.sessionKey,
|
|
696
|
+
storePath: params.storePath,
|
|
697
|
+
path: params.entry.sessionFile,
|
|
698
|
+
reason: "unreadable"
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
return inspectTranscriptEntries({
|
|
626
702
|
sessionKey: params.sessionKey,
|
|
627
703
|
storePath: params.storePath,
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
704
|
+
transcriptPath: params.entry.sessionFile,
|
|
705
|
+
allowMissingSessionHeader: true,
|
|
706
|
+
entries
|
|
707
|
+
});
|
|
632
708
|
}
|
|
633
709
|
function collectFeishuSessionFindings(params) {
|
|
710
|
+
const sqliteFinding = inspectSqliteSessionTranscript(params);
|
|
711
|
+
if (sqliteFinding) return [sqliteFinding];
|
|
634
712
|
const transcriptCandidates = resolveSessionTranscriptCandidates(params);
|
|
635
713
|
const existing = transcriptCandidates.filter(existsFile);
|
|
636
714
|
if (transcriptCandidates.length > 0 && existing.length === 0) return [{
|
|
@@ -682,24 +760,23 @@ function inspectFeishuDoctorState(params) {
|
|
|
682
760
|
cfg: params.cfg,
|
|
683
761
|
env,
|
|
684
762
|
stateDir
|
|
685
|
-
})) {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}
|
|
763
|
+
})) for (const { sessionKey: key, entry } of listSessionEntries({
|
|
764
|
+
agentId: target.agentId,
|
|
765
|
+
storePath: target.storePath
|
|
766
|
+
}).filter(({ sessionKey, entry: sessionEntry }) => !isValidAgentHarnessSessionStoreEntry(sessionKey, sessionEntry) && isFeishuSessionEntry(sessionKey, sessionEntry)).toSorted((left, right) => left.sessionKey.localeCompare(right.sessionKey))) {
|
|
767
|
+
const sessionEntry = toFeishuSessionEntry(entry);
|
|
768
|
+
sessionEntries.push({
|
|
769
|
+
key,
|
|
770
|
+
storePath: target.storePath,
|
|
771
|
+
agentId: target.agentId,
|
|
772
|
+
entry: sessionEntry
|
|
773
|
+
});
|
|
774
|
+
findings.push(...collectFeishuSessionFindings({
|
|
775
|
+
sessionKey: key,
|
|
776
|
+
storePath: target.storePath,
|
|
777
|
+
agentId: target.agentId,
|
|
778
|
+
entry: sessionEntry
|
|
779
|
+
}));
|
|
703
780
|
}
|
|
704
781
|
return {
|
|
705
782
|
stateDir,
|
|
@@ -735,13 +812,19 @@ function movePathToBackup(params) {
|
|
|
735
812
|
return true;
|
|
736
813
|
}
|
|
737
814
|
function copyStoreBackup(params) {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
815
|
+
const targetDir = path.join(params.backupDir, "session-stores", params.agentId);
|
|
816
|
+
for (const sourcePath of resolveSessionStoreBackupPaths({
|
|
817
|
+
agentId: params.agentId,
|
|
818
|
+
storePath: params.storePath
|
|
819
|
+
})) {
|
|
820
|
+
if (!existsFile(sourcePath)) continue;
|
|
821
|
+
const targetPath = path.join(targetDir, path.basename(sourcePath));
|
|
822
|
+
fs.mkdirSync(path.dirname(targetPath), {
|
|
823
|
+
recursive: true,
|
|
824
|
+
mode: 448
|
|
825
|
+
});
|
|
826
|
+
fs.copyFileSync(sourcePath, resolveUniquePath(targetPath));
|
|
827
|
+
}
|
|
745
828
|
}
|
|
746
829
|
function collectSessionArtifactPaths(params) {
|
|
747
830
|
const artifacts = /* @__PURE__ */ new Set();
|
|
@@ -821,15 +904,22 @@ async function repairFeishuDoctorState(params) {
|
|
|
821
904
|
agentId: group.agentId
|
|
822
905
|
});
|
|
823
906
|
const keys = new Set(group.entries.map((entry) => entry.key));
|
|
824
|
-
const removedEntries =
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
907
|
+
const removedEntries = [];
|
|
908
|
+
for (const key of keys) {
|
|
909
|
+
const currentEntry = listSessionEntries({
|
|
910
|
+
agentId: group.agentId,
|
|
911
|
+
storePath
|
|
912
|
+
}).find((candidate) => candidate.sessionKey === key)?.entry;
|
|
913
|
+
if (!currentEntry || isValidAgentHarnessSessionStoreEntry(key, currentEntry)) continue;
|
|
914
|
+
if (!await deleteSessionEntry({
|
|
915
|
+
agentId: group.agentId,
|
|
916
|
+
archiveTranscript: true,
|
|
917
|
+
sessionKey: key,
|
|
918
|
+
storePath
|
|
919
|
+
})) continue;
|
|
920
|
+
const entry = group.entries.find((candidate) => candidate.key === key);
|
|
921
|
+
if (entry) removedEntries.push(entry);
|
|
922
|
+
}
|
|
833
923
|
const removed = removedEntries.length;
|
|
834
924
|
removedSessionEntries += removed;
|
|
835
925
|
if (removed > 0) {
|
|
@@ -913,189 +1003,43 @@ async function runFeishuDoctorSequence(params) {
|
|
|
913
1003
|
warningNotes: report.warnings
|
|
914
1004
|
};
|
|
915
1005
|
}
|
|
916
|
-
const feishuDoctor = {
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
shouldRepair
|
|
920
|
-
|
|
1006
|
+
const feishuDoctor = {
|
|
1007
|
+
legacyConfigRules,
|
|
1008
|
+
normalizeCompatibilityConfig,
|
|
1009
|
+
runConfigSequence: async ({ cfg, env, shouldRepair }) => await runFeishuDoctorSequence({
|
|
1010
|
+
cfg,
|
|
1011
|
+
env,
|
|
1012
|
+
shouldRepair
|
|
1013
|
+
})
|
|
1014
|
+
};
|
|
921
1015
|
//#endregion
|
|
922
|
-
//#region extensions/feishu/src/
|
|
923
|
-
const
|
|
924
|
-
const
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
normalizeSubject: normalizeFeishuAllowEntry,
|
|
936
|
-
sensitivity: "pii"
|
|
937
|
-
}],
|
|
938
|
-
isWildcardEntry: (entry) => normalizeFeishuAllowEntry(entry) === "*",
|
|
939
|
-
resolveEntryId: ({ entryIndex }) => `feishu-entry-${entryIndex + 1}`
|
|
940
|
-
});
|
|
941
|
-
function normalizeFeishuAllowEntry(raw) {
|
|
942
|
-
const trimmed = raw.trim();
|
|
943
|
-
if (!trimmed) return "";
|
|
944
|
-
if (trimmed === "*") return "*";
|
|
945
|
-
let withoutProviderPrefix = trimmed;
|
|
946
|
-
while (FEISHU_PROVIDER_PREFIX_RE.test(withoutProviderPrefix)) withoutProviderPrefix = withoutProviderPrefix.replace(FEISHU_PROVIDER_PREFIX_RE, "").trim();
|
|
947
|
-
if (withoutProviderPrefix === "*") return "*";
|
|
948
|
-
const lowered = normalizeOptionalLowercaseString(withoutProviderPrefix) ?? "";
|
|
949
|
-
if (!lowered) return "";
|
|
950
|
-
const prefixed = lowered.match(FEISHU_TYPED_PREFIX_RE);
|
|
951
|
-
if (prefixed?.[1]) {
|
|
952
|
-
const kind = [
|
|
953
|
-
"chat",
|
|
954
|
-
"group",
|
|
955
|
-
"channel"
|
|
956
|
-
].includes(prefixed[1]) ? "chat" : "user";
|
|
957
|
-
const value = withoutProviderPrefix.slice(prefixed[0].length).trim();
|
|
958
|
-
return value === "*" ? "*" : value ? `${kind}:${value}` : "";
|
|
1016
|
+
//#region extensions/feishu/src/presentation-card.ts
|
|
1017
|
+
const FEISHU_CARD_MAX_BYTES = 30 * 1024;
|
|
1018
|
+
const FEISHU_CARD_MAX_ELEMENTS = 200;
|
|
1019
|
+
function countFeishuCardElements(value, ancestors = /* @__PURE__ */ new Set()) {
|
|
1020
|
+
if (Array.isArray(value)) return value.reduce((count, entry) => count + countFeishuCardElements(entry, ancestors), 0);
|
|
1021
|
+
if (!value || typeof value !== "object") return 0;
|
|
1022
|
+
if (ancestors.has(value)) return 201;
|
|
1023
|
+
ancestors.add(value);
|
|
1024
|
+
const record = value;
|
|
1025
|
+
let count = typeof record.tag === "string" ? 1 : 0;
|
|
1026
|
+
for (const entry of Object.values(record)) {
|
|
1027
|
+
count += countFeishuCardElements(entry, ancestors);
|
|
1028
|
+
if (count > FEISHU_CARD_MAX_ELEMENTS) break;
|
|
959
1029
|
}
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
if (detectedType === "open_id" || detectedType === "user_id") return `user:${withoutProviderPrefix}`;
|
|
963
|
-
return "";
|
|
964
|
-
}
|
|
965
|
-
function normalizeFeishuDmPolicy(policy) {
|
|
966
|
-
return policy === "open" || policy === "pairing" || policy === "allowlist" || policy === "disabled" ? policy : "pairing";
|
|
967
|
-
}
|
|
968
|
-
function normalizeFeishuGroupPolicy(policy) {
|
|
969
|
-
return policy === "allowall" ? "open" : policy;
|
|
970
|
-
}
|
|
971
|
-
function createFeishuIngressSubject(params) {
|
|
972
|
-
const ids = [params.primaryId, ...params.alternateIds ?? []].map((value) => value?.trim()).filter((value) => Boolean(value));
|
|
973
|
-
return {
|
|
974
|
-
stableId: ids[0],
|
|
975
|
-
aliases: { "feishu-alt-id": ids[1] }
|
|
976
|
-
};
|
|
977
|
-
}
|
|
978
|
-
function createFeishuIngressResolver(params) {
|
|
979
|
-
return createChannelIngressResolver({
|
|
980
|
-
channelId: "feishu",
|
|
981
|
-
accountId: normalizeAccountId(params.accountId) ?? "default",
|
|
982
|
-
identity: feishuIngressIdentity,
|
|
983
|
-
cfg: params.cfg,
|
|
984
|
-
...params.readAllowFromStore ? { readStoreAllowFrom: params.readAllowFromStore } : {}
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
async function resolveFeishuDmIngressAccess(params) {
|
|
988
|
-
return await createFeishuIngressResolver({
|
|
989
|
-
cfg: params.cfg,
|
|
990
|
-
accountId: params.accountId,
|
|
991
|
-
readAllowFromStore: params.readAllowFromStore
|
|
992
|
-
}).message({
|
|
993
|
-
subject: createFeishuIngressSubject({
|
|
994
|
-
primaryId: params.senderOpenId,
|
|
995
|
-
alternateIds: [params.senderUserId]
|
|
996
|
-
}),
|
|
997
|
-
conversation: {
|
|
998
|
-
kind: "direct",
|
|
999
|
-
id: params.conversationId
|
|
1000
|
-
},
|
|
1001
|
-
event: { mayPair: params.mayPair },
|
|
1002
|
-
dmPolicy: normalizeFeishuDmPolicy(params.dmPolicy),
|
|
1003
|
-
groupPolicy: "disabled",
|
|
1004
|
-
allowFrom: params.allowFrom ?? [],
|
|
1005
|
-
...params.command ? { command: params.command } : {}
|
|
1006
|
-
});
|
|
1007
|
-
}
|
|
1008
|
-
async function resolveFeishuGroupConversationIngressAccess(params) {
|
|
1009
|
-
const groupPolicy = normalizeFeishuGroupPolicy(params.groupPolicy);
|
|
1010
|
-
const groupAllowFrom = groupPolicy === "allowlist" && params.groupExplicitlyConfigured ? [...params.groupAllowFrom ?? [], params.chatId] : params.groupAllowFrom ?? [];
|
|
1011
|
-
return await createFeishuIngressResolver({
|
|
1012
|
-
cfg: params.cfg,
|
|
1013
|
-
accountId: params.accountId
|
|
1014
|
-
}).message({
|
|
1015
|
-
subject: createFeishuIngressSubject({ primaryId: params.chatId }),
|
|
1016
|
-
conversation: {
|
|
1017
|
-
kind: "group",
|
|
1018
|
-
id: params.chatId
|
|
1019
|
-
},
|
|
1020
|
-
dmPolicy: "disabled",
|
|
1021
|
-
groupPolicy,
|
|
1022
|
-
groupAllowFrom
|
|
1023
|
-
});
|
|
1024
|
-
}
|
|
1025
|
-
async function resolveFeishuGroupSenderActivationIngressAccess(params) {
|
|
1026
|
-
const groupAllowFrom = params.allowFrom ?? [];
|
|
1027
|
-
return await createFeishuIngressResolver({
|
|
1028
|
-
cfg: params.cfg,
|
|
1029
|
-
accountId: params.accountId
|
|
1030
|
-
}).message({
|
|
1031
|
-
subject: createFeishuIngressSubject({
|
|
1032
|
-
primaryId: params.senderOpenId,
|
|
1033
|
-
alternateIds: [params.senderUserId]
|
|
1034
|
-
}),
|
|
1035
|
-
conversation: {
|
|
1036
|
-
kind: "group",
|
|
1037
|
-
id: params.chatId
|
|
1038
|
-
},
|
|
1039
|
-
dmPolicy: "disabled",
|
|
1040
|
-
groupPolicy: groupAllowFrom.length > 0 ? "allowlist" : "open",
|
|
1041
|
-
groupAllowFrom,
|
|
1042
|
-
mentionFacts: {
|
|
1043
|
-
canDetectMention: true,
|
|
1044
|
-
wasMentioned: params.mentionedBot
|
|
1045
|
-
},
|
|
1046
|
-
policy: { activation: {
|
|
1047
|
-
requireMention: params.requireMention,
|
|
1048
|
-
allowTextCommands: false
|
|
1049
|
-
} },
|
|
1050
|
-
...params.command ? { command: params.command } : {}
|
|
1051
|
-
});
|
|
1030
|
+
ancestors.delete(value);
|
|
1031
|
+
return count;
|
|
1052
1032
|
}
|
|
1053
|
-
function
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
if (direct) return direct;
|
|
1060
|
-
const lowered = normalizeOptionalLowercaseString(groupId) ?? "";
|
|
1061
|
-
const matchKey = Object.keys(groups).find((key) => normalizeOptionalLowercaseString(key) === lowered);
|
|
1062
|
-
if (matchKey) return groups[matchKey];
|
|
1063
|
-
return wildcard;
|
|
1064
|
-
}
|
|
1065
|
-
function hasExplicitFeishuGroupConfig(params) {
|
|
1066
|
-
const groups = params.cfg?.groups ?? {};
|
|
1067
|
-
const groupId = params.groupId?.trim();
|
|
1068
|
-
if (!groupId) return false;
|
|
1069
|
-
if (Object.hasOwn(groups, groupId) && groupId !== "*") return true;
|
|
1070
|
-
const lowered = normalizeOptionalLowercaseString(groupId) ?? "";
|
|
1071
|
-
return Object.keys(groups).some((key) => key !== "*" && normalizeOptionalLowercaseString(key) === lowered);
|
|
1072
|
-
}
|
|
1073
|
-
function resolveFeishuGroupToolPolicy(params) {
|
|
1074
|
-
const cfg = params.cfg.channels?.feishu;
|
|
1075
|
-
if (!cfg) return;
|
|
1076
|
-
return resolveFeishuGroupConfig({
|
|
1077
|
-
cfg,
|
|
1078
|
-
groupId: params.groupId
|
|
1079
|
-
})?.tools;
|
|
1033
|
+
function isFeishuCardWithinEnvelope(card) {
|
|
1034
|
+
try {
|
|
1035
|
+
return Buffer.byteLength(JSON.stringify(card), "utf8") <= FEISHU_CARD_MAX_BYTES && countFeishuCardElements(card) <= FEISHU_CARD_MAX_ELEMENTS;
|
|
1036
|
+
} catch {
|
|
1037
|
+
return false;
|
|
1038
|
+
}
|
|
1080
1039
|
}
|
|
1081
|
-
function
|
|
1082
|
-
if (
|
|
1083
|
-
const feishuCfg = params.cfg.channels?.feishu;
|
|
1084
|
-
const resolvedCfg = resolveMergedAccountConfig({
|
|
1085
|
-
channelConfig: feishuCfg,
|
|
1086
|
-
accounts: feishuCfg?.accounts,
|
|
1087
|
-
accountId: normalizeAccountId(params.accountId),
|
|
1088
|
-
normalizeAccountId,
|
|
1089
|
-
omitKeys: ["defaultAccount"]
|
|
1090
|
-
});
|
|
1091
|
-
const groupRequireMention = resolveFeishuGroupConfig({
|
|
1092
|
-
cfg: resolvedCfg,
|
|
1093
|
-
groupId: params.groupId
|
|
1094
|
-
})?.requireMention;
|
|
1095
|
-
return { requireMention: typeof groupRequireMention === "boolean" ? groupRequireMention : typeof resolvedCfg.requireMention === "boolean" ? resolvedCfg.requireMention : params.groupPolicy !== "open" };
|
|
1040
|
+
function assertFeishuCardWithinEnvelope(card, label = "Feishu card") {
|
|
1041
|
+
if (!isFeishuCardWithinEnvelope(card)) throw new Error(`${label} exceeds the 30 KB or 200-element API limit.`);
|
|
1096
1042
|
}
|
|
1097
|
-
//#endregion
|
|
1098
|
-
//#region extensions/feishu/src/presentation-card.ts
|
|
1099
1043
|
function escapeFeishuCardMarkdownText(text) {
|
|
1100
1044
|
return text.replace(/[&<>]/g, (char) => {
|
|
1101
1045
|
switch (char) {
|
|
@@ -1117,11 +1061,13 @@ function resolveSafeFeishuButtonUrl(url) {
|
|
|
1117
1061
|
}
|
|
1118
1062
|
}
|
|
1119
1063
|
function resolveFeishuButtonUrl(button) {
|
|
1064
|
+
if (button.action?.type === "url" || button.action?.type === "web-app") return button.action.url;
|
|
1065
|
+
if (button.action) return;
|
|
1120
1066
|
return button.url ?? button.webApp?.url ?? button.web_app?.url;
|
|
1121
1067
|
}
|
|
1122
1068
|
function resolveFeishuCommandButtonValue(button) {
|
|
1123
|
-
if (button.action?.type === "callback") return;
|
|
1124
1069
|
if (button.action?.type === "command") return button.action.command;
|
|
1070
|
+
if (button.action) return;
|
|
1125
1071
|
return button.value;
|
|
1126
1072
|
}
|
|
1127
1073
|
function mapFeishuButtonType(style) {
|
|
@@ -1171,6 +1117,14 @@ function buildFeishuCardElementsForBlock(block) {
|
|
|
1171
1117
|
}];
|
|
1172
1118
|
if (block.type === "divider") return [{ tag: "hr" }];
|
|
1173
1119
|
if (block.type === "buttons") return block.buttons.map((button) => buildFeishuPayloadButton(button)).filter((button) => Boolean(button));
|
|
1120
|
+
if (block.type === "chart") return [{
|
|
1121
|
+
tag: "markdown",
|
|
1122
|
+
content: escapeFeishuCardMarkdownText(renderMessagePresentationChartFallbackText(block))
|
|
1123
|
+
}];
|
|
1124
|
+
if (block.type === "table") return [{
|
|
1125
|
+
tag: "markdown",
|
|
1126
|
+
content: escapeFeishuCardMarkdownText(renderMessagePresentationTableFallbackText(block))
|
|
1127
|
+
}];
|
|
1174
1128
|
const labels = block.options.map((option) => `- ${option.label}`).join("\n");
|
|
1175
1129
|
return [{
|
|
1176
1130
|
tag: "markdown",
|
|
@@ -1454,7 +1408,7 @@ async function promptFeishuSetupMethod(prompter) {
|
|
|
1454
1408
|
initialValue: "manual"
|
|
1455
1409
|
});
|
|
1456
1410
|
}
|
|
1457
|
-
async function runScanToCreate(prompter, domain) {
|
|
1411
|
+
async function runScanToCreate(prompter, domain, beforePersistentEffect) {
|
|
1458
1412
|
const { beginAppRegistration, initAppRegistration, pollAppRegistration, printQrCode } = await loadAppRegistrationModule();
|
|
1459
1413
|
try {
|
|
1460
1414
|
await initAppRegistration(domain);
|
|
@@ -1462,6 +1416,7 @@ async function runScanToCreate(prompter, domain) {
|
|
|
1462
1416
|
await prompter.note(t("wizard.feishu.scanUnavailable"), t("wizard.feishu.setupTitle"));
|
|
1463
1417
|
return null;
|
|
1464
1418
|
}
|
|
1419
|
+
await beforePersistentEffect?.();
|
|
1465
1420
|
const begin = await beginAppRegistration(domain);
|
|
1466
1421
|
await prompter.note(t("wizard.feishu.scanQr"), t("wizard.feishu.scanTitle"));
|
|
1467
1422
|
await printQrCode(begin.qrUrl);
|
|
@@ -1508,7 +1463,7 @@ async function runNewAppFlow(params) {
|
|
|
1508
1463
|
initialValue: currentDomain
|
|
1509
1464
|
});
|
|
1510
1465
|
scanDomain = selectedDomain;
|
|
1511
|
-
const scanResult = setupMethod === "scan" ? await runScanToCreate(prompter, selectedDomain) : null;
|
|
1466
|
+
const scanResult = setupMethod === "scan" ? await runScanToCreate(prompter, selectedDomain, options?.beforePersistentEffect) : null;
|
|
1512
1467
|
if (scanResult) {
|
|
1513
1468
|
appId = scanResult.appId;
|
|
1514
1469
|
appSecret = scanResult.appSecret;
|
|
@@ -1651,7 +1606,7 @@ const feishuSetupWizard = {
|
|
|
1651
1606
|
});
|
|
1652
1607
|
let probeResult = null;
|
|
1653
1608
|
if (configured && account.configured) try {
|
|
1654
|
-
const { probeFeishu } = await import("./probe-
|
|
1609
|
+
const { probeFeishu } = await import("./probe-CAloGqgG.js").then((n) => n.n);
|
|
1655
1610
|
probeResult = await probeFeishu(account);
|
|
1656
1611
|
} catch {}
|
|
1657
1612
|
if (!configured) return [formatFeishuStatusLine("needs-credentials")];
|
|
@@ -1727,7 +1682,7 @@ const meta = {
|
|
|
1727
1682
|
order: 70,
|
|
1728
1683
|
preferSessionLookupForAnnounceTarget: true
|
|
1729
1684
|
};
|
|
1730
|
-
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
1685
|
+
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-DJ_B-bpG.js"), "feishuChannelRuntime");
|
|
1731
1686
|
function toFeishuMessageSendResult(result, kind) {
|
|
1732
1687
|
const receipt = result.receipt ?? createFeishuSendReceipt({
|
|
1733
1688
|
messageId: result.messageId,
|
|
@@ -1771,9 +1726,22 @@ const feishuMessageAdapter = defineChannelMessageAdapter({
|
|
|
1771
1726
|
}
|
|
1772
1727
|
});
|
|
1773
1728
|
async function createFeishuActionClient(account) {
|
|
1774
|
-
const { createFeishuClient } = await import("./client-
|
|
1729
|
+
const { createFeishuClient } = await import("./client-BUC-R2Wi.js").then((n) => n.t);
|
|
1775
1730
|
return createFeishuClient(account);
|
|
1776
1731
|
}
|
|
1732
|
+
async function resolveFeishuChatTypeById(params) {
|
|
1733
|
+
const client = await createFeishuActionClient(params.account);
|
|
1734
|
+
return resolveFeishuChatType(await params.runtime.getChatInfo(client, params.chatId));
|
|
1735
|
+
}
|
|
1736
|
+
async function resolveFeishuMessageChatType(params) {
|
|
1737
|
+
const knownChatType = normalizeFeishuChatType(params.message.chatType);
|
|
1738
|
+
if (knownChatType) return knownChatType;
|
|
1739
|
+
return resolveFeishuChatTypeById({
|
|
1740
|
+
account: params.account,
|
|
1741
|
+
chatId: params.message.chatId,
|
|
1742
|
+
runtime: params.runtime
|
|
1743
|
+
});
|
|
1744
|
+
}
|
|
1777
1745
|
const collectFeishuSecurityWarnings = createAllowlistProviderGroupPolicyWarningCollector({
|
|
1778
1746
|
providerConfigPresent: (cfg) => cfg.channels?.feishu !== void 0,
|
|
1779
1747
|
resolveGroupPolicy: ({ cfg, accountId }) => resolveFeishuAccount({
|
|
@@ -2017,6 +1985,119 @@ function resolveFeishuMessageId(params) {
|
|
|
2017
1985
|
"reply_to"
|
|
2018
1986
|
]);
|
|
2019
1987
|
}
|
|
1988
|
+
function resolveFeishuMessageReadTarget(ctx) {
|
|
1989
|
+
const explicitChatId = resolveFeishuChatId({ params: ctx.params });
|
|
1990
|
+
const currentChatId = resolveFeishuChatId({
|
|
1991
|
+
params: {},
|
|
1992
|
+
toolContext: ctx.toolContext
|
|
1993
|
+
});
|
|
1994
|
+
const chatId = explicitChatId ?? currentChatId;
|
|
1995
|
+
if (!chatId) return;
|
|
1996
|
+
const normalizedChatId = normalizeFeishuTarget(chatId) ?? chatId.trim();
|
|
1997
|
+
if (normalizedChatId !== (currentChatId ? normalizeFeishuTarget(currentChatId) ?? currentChatId.trim() : void 0)) return { chatId: normalizedChatId };
|
|
1998
|
+
return {
|
|
1999
|
+
chatId: normalizedChatId,
|
|
2000
|
+
chatType: ctx.toolContext?.currentChatType === "direct" ? "p2p" : ctx.toolContext?.currentChatType === "group" || ctx.toolContext?.currentChatType === "channel" ? "group" : void 0
|
|
2001
|
+
};
|
|
2002
|
+
}
|
|
2003
|
+
function assertFeishuMessageMatchesReadTarget(params) {
|
|
2004
|
+
if ((normalizeFeishuTarget(params.messageChatId) ?? params.messageChatId.trim()) !== params.authorizedChatId) throw new ToolAuthorizationError("Feishu message target is not allowed.");
|
|
2005
|
+
}
|
|
2006
|
+
async function authorizeFeishuMessageReadTarget(params) {
|
|
2007
|
+
const authorize = (chatType) => assertFeishuChatReadAllowed({
|
|
2008
|
+
cfg: params.ctx.cfg,
|
|
2009
|
+
account: params.account,
|
|
2010
|
+
chatId: params.target.chatId,
|
|
2011
|
+
chatType,
|
|
2012
|
+
ctx: params.ctx
|
|
2013
|
+
});
|
|
2014
|
+
if (params.target.chatType) return authorize(params.target.chatType);
|
|
2015
|
+
const preliminary = resolveFeishuChatReadPreliminaryAuthorization({
|
|
2016
|
+
cfg: params.ctx.cfg,
|
|
2017
|
+
account: params.account,
|
|
2018
|
+
chatId: params.target.chatId,
|
|
2019
|
+
ctx: params.ctx
|
|
2020
|
+
});
|
|
2021
|
+
if (preliminary.decision === "allow") return preliminary.chatId;
|
|
2022
|
+
if (preliminary.decision === "deny") throw new ToolAuthorizationError("Feishu read target is not allowed.");
|
|
2023
|
+
await getAuthorizedFeishuChatInfo({
|
|
2024
|
+
ctx: params.ctx,
|
|
2025
|
+
account: params.account,
|
|
2026
|
+
runtime: params.runtime,
|
|
2027
|
+
chatId: params.target.chatId
|
|
2028
|
+
});
|
|
2029
|
+
return preliminary.chatId;
|
|
2030
|
+
}
|
|
2031
|
+
async function getAuthorizedFeishuChatInfo(params) {
|
|
2032
|
+
const preliminary = resolveFeishuChatReadPreliminaryAuthorization({
|
|
2033
|
+
cfg: params.ctx.cfg,
|
|
2034
|
+
account: params.account,
|
|
2035
|
+
chatId: params.chatId,
|
|
2036
|
+
ctx: params.ctx
|
|
2037
|
+
});
|
|
2038
|
+
if (preliminary.decision === "deny") throw new ToolAuthorizationError("Feishu read target is not allowed.");
|
|
2039
|
+
const client = await createFeishuActionClient(params.account);
|
|
2040
|
+
let chat;
|
|
2041
|
+
try {
|
|
2042
|
+
chat = await params.runtime.getChatInfo(client, preliminary.chatId);
|
|
2043
|
+
} catch (error) {
|
|
2044
|
+
if (preliminary.decision === "needs-metadata") assertFeishuChatReadAllowed({
|
|
2045
|
+
cfg: params.ctx.cfg,
|
|
2046
|
+
account: params.account,
|
|
2047
|
+
chatId: preliminary.chatId,
|
|
2048
|
+
ctx: params.ctx
|
|
2049
|
+
});
|
|
2050
|
+
throw error;
|
|
2051
|
+
}
|
|
2052
|
+
assertFeishuChatReadAllowed({
|
|
2053
|
+
cfg: params.ctx.cfg,
|
|
2054
|
+
account: params.account,
|
|
2055
|
+
chatId: preliminary.chatId,
|
|
2056
|
+
chatType: resolveFeishuChatType(chat),
|
|
2057
|
+
ctx: params.ctx
|
|
2058
|
+
});
|
|
2059
|
+
return {
|
|
2060
|
+
chat,
|
|
2061
|
+
client
|
|
2062
|
+
};
|
|
2063
|
+
}
|
|
2064
|
+
async function getAuthorizedFeishuMessage(params) {
|
|
2065
|
+
const target = resolveFeishuMessageReadTarget(params.ctx);
|
|
2066
|
+
if (!target && params.ctx.conversationReadOrigin !== "direct-operator") throw new ToolAuthorizationError("Feishu message reads require a chat target or current conversation.");
|
|
2067
|
+
const authorizedChatId = target ? await authorizeFeishuMessageReadTarget({
|
|
2068
|
+
ctx: params.ctx,
|
|
2069
|
+
account: params.account,
|
|
2070
|
+
runtime: params.runtime,
|
|
2071
|
+
target
|
|
2072
|
+
}) : void 0;
|
|
2073
|
+
const message = await params.runtime.getMessageFeishu({
|
|
2074
|
+
cfg: params.ctx.cfg,
|
|
2075
|
+
messageId: params.messageId,
|
|
2076
|
+
accountId: params.ctx.accountId ?? void 0
|
|
2077
|
+
});
|
|
2078
|
+
if (!message) return null;
|
|
2079
|
+
if (authorizedChatId) assertFeishuMessageMatchesReadTarget({
|
|
2080
|
+
authorizedChatId,
|
|
2081
|
+
messageChatId: message.chatId
|
|
2082
|
+
});
|
|
2083
|
+
assertFeishuChatReadAllowed({
|
|
2084
|
+
cfg: params.ctx.cfg,
|
|
2085
|
+
account: params.account,
|
|
2086
|
+
chatId: message.chatId,
|
|
2087
|
+
chatType: await resolveFeishuMessageChatType({
|
|
2088
|
+
account: params.account,
|
|
2089
|
+
message,
|
|
2090
|
+
runtime: params.runtime
|
|
2091
|
+
}),
|
|
2092
|
+
ctx: params.ctx
|
|
2093
|
+
});
|
|
2094
|
+
return message;
|
|
2095
|
+
}
|
|
2096
|
+
async function requireAuthorizedFeishuMessage(params) {
|
|
2097
|
+
const message = await getAuthorizedFeishuMessage(params);
|
|
2098
|
+
if (!message) throw new Error(`Feishu message not found: ${params.messageId}`);
|
|
2099
|
+
return message;
|
|
2100
|
+
}
|
|
2020
2101
|
function resolveFeishuMemberId(params) {
|
|
2021
2102
|
return readFirstString(params, [
|
|
2022
2103
|
"memberId",
|
|
@@ -2030,6 +2111,9 @@ function resolveFeishuMemberId(params) {
|
|
|
2030
2111
|
]);
|
|
2031
2112
|
}
|
|
2032
2113
|
function resolveFeishuMemberIdType(params) {
|
|
2114
|
+
return resolveRequestedFeishuMemberIdType(params) ?? "open_id";
|
|
2115
|
+
}
|
|
2116
|
+
function resolveRequestedFeishuMemberIdType(params) {
|
|
2033
2117
|
const raw = readFirstString(params, [
|
|
2034
2118
|
"memberIdType",
|
|
2035
2119
|
"member_id_type",
|
|
@@ -2044,7 +2128,7 @@ function resolveFeishuMemberIdType(params) {
|
|
|
2044
2128
|
"union_id"
|
|
2045
2129
|
])) return "user_id";
|
|
2046
2130
|
if (readFirstString(params, ["unionId", "union_id"]) && !readFirstString(params, ["openId", "open_id"])) return "union_id";
|
|
2047
|
-
return "open_id";
|
|
2131
|
+
if (readFirstString(params, ["openId", "open_id"])) return "open_id";
|
|
2048
2132
|
}
|
|
2049
2133
|
const feishuPlugin = createChatChannelPlugin({
|
|
2050
2134
|
base: {
|
|
@@ -2076,7 +2160,7 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2076
2160
|
mentions: { stripPatterns: () => ["<at user_id=\"[^\"]*\">[^<]*</at>"] },
|
|
2077
2161
|
reload: { configPrefixes: ["channels.feishu"] },
|
|
2078
2162
|
doctor: feishuDoctor,
|
|
2079
|
-
configSchema:
|
|
2163
|
+
configSchema: FeishuChannelConfigSchema,
|
|
2080
2164
|
config: {
|
|
2081
2165
|
...feishuConfigAdapter,
|
|
2082
2166
|
setAccountEnabled: ({ cfg, accountId, enabled }) => {
|
|
@@ -2153,21 +2237,44 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2153
2237
|
const presentation = normalizeMessagePresentation(ctx.params.presentation) ?? (interactive ? interactiveReplyToPresentation(interactive) : void 0);
|
|
2154
2238
|
const mediaUrl = readFeishuMediaParam(ctx.params);
|
|
2155
2239
|
const audioAsVoice = readBooleanParam(ctx.params, ["asVoice", "audioAsVoice"]);
|
|
2156
|
-
|
|
2240
|
+
if (textCard && !presentation) assertFeishuCardWithinEnvelope(textCard, "Feishu native card");
|
|
2241
|
+
const generatedCard = presentation ? buildFeishuPresentationCard({
|
|
2157
2242
|
presentation,
|
|
2158
2243
|
fallbackText: textCard ? void 0 : resolveInteractiveTextFallback({
|
|
2159
2244
|
text,
|
|
2160
2245
|
interactive
|
|
2161
2246
|
})
|
|
2162
|
-
}) :
|
|
2247
|
+
}) : void 0;
|
|
2248
|
+
const presentationCard = generatedCard && isFeishuCardWithinEnvelope(generatedCard) ? generatedCard : void 0;
|
|
2249
|
+
const presentationFellBack = Boolean(generatedCard && !presentationCard);
|
|
2250
|
+
const card = presentation ? presentationCard : textCard;
|
|
2163
2251
|
if (card && mediaUrl) throw new Error(`Feishu ${ctx.action} does not support card with media.`);
|
|
2164
|
-
if (!card && !text && !mediaUrl) throw new Error(`Feishu ${ctx.action} requires text/message, media, or card.`);
|
|
2252
|
+
if (!card && !text && !mediaUrl && !presentationFellBack) throw new Error(`Feishu ${ctx.action} requires text/message, media, or card.`);
|
|
2165
2253
|
const runtime = await loadFeishuChannelRuntime();
|
|
2166
2254
|
const maybeSendMedia = runtime.feishuOutbound.sendMedia;
|
|
2167
2255
|
if (mediaUrl && !maybeSendMedia) throw new Error("Feishu media sending is not available.");
|
|
2168
2256
|
const sendMedia = maybeSendMedia;
|
|
2169
2257
|
let result;
|
|
2170
|
-
if (
|
|
2258
|
+
if (presentationFellBack && presentation) {
|
|
2259
|
+
const sendPayload = runtime.feishuOutbound.sendPayload;
|
|
2260
|
+
if (!sendPayload) throw new Error("Feishu presentation fallback delivery is not available.");
|
|
2261
|
+
const fallbackText = textCard ? void 0 : text;
|
|
2262
|
+
result = await sendPayload({
|
|
2263
|
+
cfg: ctx.cfg,
|
|
2264
|
+
to,
|
|
2265
|
+
text: fallbackText ?? "",
|
|
2266
|
+
payload: {
|
|
2267
|
+
text: fallbackText,
|
|
2268
|
+
presentation,
|
|
2269
|
+
...mediaUrl ? { mediaUrl } : {},
|
|
2270
|
+
...audioAsVoice === void 0 ? {} : { audioAsVoice }
|
|
2271
|
+
},
|
|
2272
|
+
accountId: ctx.accountId ?? void 0,
|
|
2273
|
+
mediaLocalRoots: ctx.mediaLocalRoots,
|
|
2274
|
+
...replyInThread ? { threadId: replyToMessageId } : { replyToId: replyToMessageId },
|
|
2275
|
+
...audioAsVoice === void 0 ? {} : { audioAsVoice }
|
|
2276
|
+
});
|
|
2277
|
+
} else if (card) {
|
|
2171
2278
|
if (containsLegacyFeishuCardCommandValue(card)) throw new Error("Feishu card buttons that trigger text or commands must use structured interaction envelopes.");
|
|
2172
2279
|
result = await runtime.sendCardFeishu({
|
|
2173
2280
|
cfg: ctx.cfg,
|
|
@@ -2205,11 +2312,11 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2205
2312
|
if (ctx.action === "read") {
|
|
2206
2313
|
const messageId = resolveFeishuMessageId(ctx.params);
|
|
2207
2314
|
if (!messageId) throw new Error("Feishu read requires messageId.");
|
|
2208
|
-
const
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2315
|
+
const message = await getAuthorizedFeishuMessage({
|
|
2316
|
+
ctx,
|
|
2317
|
+
account,
|
|
2318
|
+
runtime: await loadFeishuChannelRuntime(),
|
|
2319
|
+
messageId
|
|
2213
2320
|
});
|
|
2214
2321
|
if (!message) return {
|
|
2215
2322
|
isError: true,
|
|
@@ -2231,12 +2338,18 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2231
2338
|
if (!messageId) throw new Error("Feishu edit requires messageId.");
|
|
2232
2339
|
const text = readFirstString(ctx.params, ["text", "message"]);
|
|
2233
2340
|
const card = ctx.params.card && typeof ctx.params.card === "object" ? ctx.params.card : void 0;
|
|
2234
|
-
const
|
|
2341
|
+
const runtime = await loadFeishuChannelRuntime();
|
|
2342
|
+
await requireAuthorizedFeishuMessage({
|
|
2343
|
+
ctx,
|
|
2344
|
+
account,
|
|
2345
|
+
runtime,
|
|
2346
|
+
messageId
|
|
2347
|
+
});
|
|
2235
2348
|
return jsonActionResult({
|
|
2236
2349
|
ok: true,
|
|
2237
2350
|
channel: "feishu",
|
|
2238
2351
|
action: "edit",
|
|
2239
|
-
...await editMessageFeishu({
|
|
2352
|
+
...await runtime.editMessageFeishu({
|
|
2240
2353
|
cfg: ctx.cfg,
|
|
2241
2354
|
messageId,
|
|
2242
2355
|
text,
|
|
@@ -2248,12 +2361,18 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2248
2361
|
if (ctx.action === "pin") {
|
|
2249
2362
|
const messageId = resolveFeishuMessageId(ctx.params);
|
|
2250
2363
|
if (!messageId) throw new Error("Feishu pin requires messageId.");
|
|
2251
|
-
const
|
|
2364
|
+
const runtime = await loadFeishuChannelRuntime();
|
|
2365
|
+
await requireAuthorizedFeishuMessage({
|
|
2366
|
+
ctx,
|
|
2367
|
+
account,
|
|
2368
|
+
runtime,
|
|
2369
|
+
messageId
|
|
2370
|
+
});
|
|
2252
2371
|
return jsonActionResult({
|
|
2253
2372
|
ok: true,
|
|
2254
2373
|
channel: "feishu",
|
|
2255
2374
|
action: "pin",
|
|
2256
|
-
pin: await createPinFeishu({
|
|
2375
|
+
pin: await runtime.createPinFeishu({
|
|
2257
2376
|
cfg: ctx.cfg,
|
|
2258
2377
|
messageId,
|
|
2259
2378
|
accountId: ctx.accountId ?? void 0
|
|
@@ -2263,8 +2382,14 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2263
2382
|
if (ctx.action === "unpin") {
|
|
2264
2383
|
const messageId = resolveFeishuMessageId(ctx.params);
|
|
2265
2384
|
if (!messageId) throw new Error("Feishu unpin requires messageId.");
|
|
2266
|
-
const
|
|
2267
|
-
await
|
|
2385
|
+
const runtime = await loadFeishuChannelRuntime();
|
|
2386
|
+
await requireAuthorizedFeishuMessage({
|
|
2387
|
+
ctx,
|
|
2388
|
+
account,
|
|
2389
|
+
runtime,
|
|
2390
|
+
messageId
|
|
2391
|
+
});
|
|
2392
|
+
await runtime.removePinFeishu({
|
|
2268
2393
|
cfg: ctx.cfg,
|
|
2269
2394
|
messageId,
|
|
2270
2395
|
accountId: ctx.accountId ?? void 0
|
|
@@ -2279,7 +2404,14 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2279
2404
|
if (ctx.action === "list-pins") {
|
|
2280
2405
|
const chatId = resolveFeishuChatId(ctx);
|
|
2281
2406
|
if (!chatId) throw new Error("Feishu list-pins requires chatId or channelId.");
|
|
2282
|
-
const
|
|
2407
|
+
const runtime = await loadFeishuChannelRuntime();
|
|
2408
|
+
await getAuthorizedFeishuChatInfo({
|
|
2409
|
+
ctx,
|
|
2410
|
+
account,
|
|
2411
|
+
runtime,
|
|
2412
|
+
chatId
|
|
2413
|
+
});
|
|
2414
|
+
const { listPinsFeishu } = runtime;
|
|
2283
2415
|
return jsonActionResult({
|
|
2284
2416
|
ok: true,
|
|
2285
2417
|
channel: "feishu",
|
|
@@ -2299,39 +2431,97 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2299
2431
|
const chatId = resolveFeishuChatId(ctx);
|
|
2300
2432
|
if (!chatId) throw new Error("Feishu channel-info requires chatId or channelId.");
|
|
2301
2433
|
const runtime = await loadFeishuChannelRuntime();
|
|
2302
|
-
const client = await
|
|
2303
|
-
|
|
2434
|
+
const { chat: channel, client } = await getAuthorizedFeishuChatInfo({
|
|
2435
|
+
ctx,
|
|
2436
|
+
account,
|
|
2437
|
+
runtime,
|
|
2438
|
+
chatId
|
|
2439
|
+
});
|
|
2440
|
+
const chatType = resolveFeishuChatType(channel);
|
|
2304
2441
|
if (!(ctx.params.includeMembers === true || ctx.params.members === true)) return jsonActionResult({
|
|
2305
2442
|
ok: true,
|
|
2306
2443
|
provider: "feishu",
|
|
2307
2444
|
action: "channel-info",
|
|
2308
2445
|
channel
|
|
2309
2446
|
});
|
|
2447
|
+
const requestedMemberIdType = resolveRequestedFeishuMemberIdType(ctx.params);
|
|
2448
|
+
const authorization = authorizeFeishuChatMemberRead({
|
|
2449
|
+
cfg: ctx.cfg,
|
|
2450
|
+
account,
|
|
2451
|
+
chatId,
|
|
2452
|
+
chatType,
|
|
2453
|
+
ctx,
|
|
2454
|
+
memberIdType: requestedMemberIdType
|
|
2455
|
+
});
|
|
2310
2456
|
return jsonActionResult({
|
|
2311
2457
|
ok: true,
|
|
2312
2458
|
provider: "feishu",
|
|
2313
2459
|
action: "channel-info",
|
|
2314
2460
|
channel,
|
|
2315
|
-
members: await runtime.getChatMembers(client, chatId, readOptionalPositiveInteger(ctx.params, ["pageSize", "page_size"]), readFirstString(ctx.params, ["pageToken", "page_token"]), resolveFeishuMemberIdType(ctx.params))
|
|
2461
|
+
members: authorization.kind === "direct" ? runtime.buildFeishuDirectChatMembers(authorization) : await runtime.getChatMembers(client, chatId, readOptionalPositiveInteger(ctx.params, ["pageSize", "page_size"]), readFirstString(ctx.params, ["pageToken", "page_token"]), resolveFeishuMemberIdType(ctx.params))
|
|
2316
2462
|
});
|
|
2317
2463
|
}
|
|
2318
2464
|
if (ctx.action === "member-info") {
|
|
2319
2465
|
const runtime = await loadFeishuChannelRuntime();
|
|
2320
|
-
const client = await createFeishuActionClient(account);
|
|
2321
2466
|
const memberId = resolveFeishuMemberId(ctx.params);
|
|
2322
|
-
if (memberId)
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2467
|
+
if (memberId) {
|
|
2468
|
+
const chatId = resolveFeishuChatId(ctx);
|
|
2469
|
+
if (!chatId) throw new Error("Feishu member-info requires chatId or channelId when memberId is provided.");
|
|
2470
|
+
const { chat, client } = await getAuthorizedFeishuChatInfo({
|
|
2471
|
+
ctx,
|
|
2472
|
+
account,
|
|
2473
|
+
runtime,
|
|
2474
|
+
chatId
|
|
2475
|
+
});
|
|
2476
|
+
const requestedMemberIdType = resolveRequestedFeishuMemberIdType(ctx.params);
|
|
2477
|
+
const memberIdType = resolveFeishuMemberIdType(ctx.params);
|
|
2478
|
+
const authorization = authorizeFeishuChatMemberRead({
|
|
2479
|
+
cfg: ctx.cfg,
|
|
2480
|
+
account,
|
|
2481
|
+
chatId,
|
|
2482
|
+
chatType: resolveFeishuChatType(chat),
|
|
2483
|
+
ctx,
|
|
2484
|
+
memberId,
|
|
2485
|
+
memberIdType: requestedMemberIdType
|
|
2486
|
+
});
|
|
2487
|
+
if (authorization.kind === "group") {
|
|
2488
|
+
await runtime.assertFeishuChatMember(client, chatId, memberId, memberIdType);
|
|
2489
|
+
return jsonActionResult({
|
|
2490
|
+
ok: true,
|
|
2491
|
+
channel: "feishu",
|
|
2492
|
+
action: "member-info",
|
|
2493
|
+
member: await runtime.getFeishuMemberInfo(client, memberId, memberIdType)
|
|
2494
|
+
});
|
|
2495
|
+
}
|
|
2496
|
+
return jsonActionResult({
|
|
2497
|
+
ok: true,
|
|
2498
|
+
channel: "feishu",
|
|
2499
|
+
action: "member-info",
|
|
2500
|
+
member: await runtime.getFeishuMemberInfo(client, authorization.memberId, authorization.memberIdType)
|
|
2501
|
+
});
|
|
2502
|
+
}
|
|
2328
2503
|
const chatId = resolveFeishuChatId(ctx);
|
|
2329
2504
|
if (!chatId) throw new Error("Feishu member-info requires memberId or chatId/channelId.");
|
|
2505
|
+
const { chat, client } = await getAuthorizedFeishuChatInfo({
|
|
2506
|
+
ctx,
|
|
2507
|
+
account,
|
|
2508
|
+
runtime,
|
|
2509
|
+
chatId
|
|
2510
|
+
});
|
|
2511
|
+
const requestedMemberIdType = resolveRequestedFeishuMemberIdType(ctx.params);
|
|
2512
|
+
const authorization = authorizeFeishuChatMemberRead({
|
|
2513
|
+
cfg: ctx.cfg,
|
|
2514
|
+
account,
|
|
2515
|
+
chatId,
|
|
2516
|
+
chatType: resolveFeishuChatType(chat),
|
|
2517
|
+
ctx,
|
|
2518
|
+
memberIdType: requestedMemberIdType
|
|
2519
|
+
});
|
|
2330
2520
|
return jsonActionResult({
|
|
2331
2521
|
ok: true,
|
|
2332
2522
|
channel: "feishu",
|
|
2333
2523
|
action: "member-info",
|
|
2334
|
-
...await runtime.getChatMembers(client, chatId, readOptionalPositiveInteger(ctx.params, ["pageSize", "page_size"]), readFirstString(ctx.params, ["pageToken", "page_token"]), resolveFeishuMemberIdType(ctx.params))
|
|
2524
|
+
...authorization.kind === "direct" ? runtime.buildFeishuDirectChatMembers(authorization) : await runtime.getChatMembers(client, chatId, readOptionalPositiveInteger(ctx.params, ["pageSize", "page_size"]), readFirstString(ctx.params, ["pageToken", "page_token"]), resolveFeishuMemberIdType(ctx.params))
|
|
2335
2525
|
});
|
|
2336
2526
|
}
|
|
2337
2527
|
if (ctx.action === "channel-list") {
|
|
@@ -2339,43 +2529,33 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2339
2529
|
const query = readFirstString(ctx.params, ["query"]);
|
|
2340
2530
|
const limit = readOptionalPositiveInteger(ctx.params, ["limit"]);
|
|
2341
2531
|
const scope = readFirstString(ctx.params, ["scope", "kind"]) ?? "all";
|
|
2532
|
+
const directOperator = ctx.conversationReadOrigin === "direct-operator";
|
|
2533
|
+
const listGroups = directOperator || canEnumerateAllFeishuGroups(ctx.cfg, account) ? runtime.listFeishuDirectoryGroupsLive : listAuthorizedFeishuDirectoryGroups;
|
|
2534
|
+
const listPeers = directOperator || canEnumerateAllFeishuPeers(account) ? runtime.listFeishuDirectoryPeersLive : listAuthorizedFeishuDirectoryPeers;
|
|
2535
|
+
const directoryParams = {
|
|
2536
|
+
cfg: ctx.cfg,
|
|
2537
|
+
query,
|
|
2538
|
+
limit,
|
|
2539
|
+
accountId: ctx.accountId ?? void 0,
|
|
2540
|
+
fallbackToStatic: false
|
|
2541
|
+
};
|
|
2542
|
+
const groupDirectoryParams = {
|
|
2543
|
+
...directoryParams,
|
|
2544
|
+
filter: directOperator ? (group) => isFeishuGroupReadEnabled(ctx.cfg, account, group.id) : canEnumerateAllFeishuGroups(ctx.cfg, account) ? (group) => isFeishuGroupReadAllowed(ctx.cfg, account, group.id, false) : void 0
|
|
2545
|
+
};
|
|
2342
2546
|
if (scope === "groups" || scope === "group" || scope === "channels" || scope === "channel") return jsonActionResult({
|
|
2343
2547
|
ok: true,
|
|
2344
2548
|
channel: "feishu",
|
|
2345
2549
|
action: "channel-list",
|
|
2346
|
-
groups: await
|
|
2347
|
-
cfg: ctx.cfg,
|
|
2348
|
-
query,
|
|
2349
|
-
limit,
|
|
2350
|
-
fallbackToStatic: false,
|
|
2351
|
-
accountId: ctx.accountId ?? void 0
|
|
2352
|
-
})
|
|
2550
|
+
groups: await listGroups(groupDirectoryParams)
|
|
2353
2551
|
});
|
|
2354
2552
|
if (scope === "peers" || scope === "peer" || scope === "members" || scope === "member" || scope === "users" || scope === "user") return jsonActionResult({
|
|
2355
2553
|
ok: true,
|
|
2356
2554
|
channel: "feishu",
|
|
2357
2555
|
action: "channel-list",
|
|
2358
|
-
peers: await
|
|
2359
|
-
cfg: ctx.cfg,
|
|
2360
|
-
query,
|
|
2361
|
-
limit,
|
|
2362
|
-
fallbackToStatic: false,
|
|
2363
|
-
accountId: ctx.accountId ?? void 0
|
|
2364
|
-
})
|
|
2556
|
+
peers: await listPeers(directoryParams)
|
|
2365
2557
|
});
|
|
2366
|
-
const [groups, peers] = await Promise.all([
|
|
2367
|
-
cfg: ctx.cfg,
|
|
2368
|
-
query,
|
|
2369
|
-
limit,
|
|
2370
|
-
fallbackToStatic: false,
|
|
2371
|
-
accountId: ctx.accountId ?? void 0
|
|
2372
|
-
}), runtime.listFeishuDirectoryPeersLive({
|
|
2373
|
-
cfg: ctx.cfg,
|
|
2374
|
-
query,
|
|
2375
|
-
limit,
|
|
2376
|
-
fallbackToStatic: false,
|
|
2377
|
-
accountId: ctx.accountId ?? void 0
|
|
2378
|
-
})]);
|
|
2558
|
+
const [groups, peers] = await Promise.all([listGroups(groupDirectoryParams), listPeers(directoryParams)]);
|
|
2379
2559
|
return jsonActionResult({
|
|
2380
2560
|
ok: true,
|
|
2381
2561
|
channel: "feishu",
|
|
@@ -2392,18 +2572,24 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2392
2572
|
const clearAll = ctx.params.clearAll === true;
|
|
2393
2573
|
if (remove) {
|
|
2394
2574
|
if (!emoji) throw new Error("Emoji is required to remove a Feishu reaction.");
|
|
2395
|
-
const
|
|
2396
|
-
|
|
2575
|
+
const runtime = await loadFeishuChannelRuntime();
|
|
2576
|
+
await requireAuthorizedFeishuMessage({
|
|
2577
|
+
ctx,
|
|
2578
|
+
account,
|
|
2579
|
+
runtime,
|
|
2580
|
+
messageId
|
|
2581
|
+
});
|
|
2582
|
+
const ownReaction = (await runtime.listReactionsFeishu({
|
|
2397
2583
|
cfg: ctx.cfg,
|
|
2398
2584
|
messageId,
|
|
2399
2585
|
emojiType: emoji,
|
|
2400
2586
|
accountId: ctx.accountId ?? void 0
|
|
2401
|
-
})).find((entry) => entry.operatorType === "app");
|
|
2587
|
+
})).find((entry) => entry.operatorType === "app" && Boolean(account.appId) && entry.operatorId === account.appId);
|
|
2402
2588
|
if (!ownReaction) return jsonActionResult({
|
|
2403
2589
|
ok: true,
|
|
2404
2590
|
removed: null
|
|
2405
2591
|
});
|
|
2406
|
-
await removeReactionFeishu({
|
|
2592
|
+
await runtime.removeReactionFeishu({
|
|
2407
2593
|
cfg: ctx.cfg,
|
|
2408
2594
|
messageId,
|
|
2409
2595
|
reactionId: ownReaction.reactionId,
|
|
@@ -2416,15 +2602,22 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2416
2602
|
}
|
|
2417
2603
|
if (!emoji) {
|
|
2418
2604
|
if (!clearAll) throw new Error("Emoji is required to add a Feishu reaction. Set clearAll=true to remove all bot reactions.");
|
|
2419
|
-
const
|
|
2420
|
-
|
|
2605
|
+
const runtime = await loadFeishuChannelRuntime();
|
|
2606
|
+
await requireAuthorizedFeishuMessage({
|
|
2607
|
+
ctx,
|
|
2608
|
+
account,
|
|
2609
|
+
runtime,
|
|
2610
|
+
messageId
|
|
2611
|
+
});
|
|
2612
|
+
const reactions = await runtime.listReactionsFeishu({
|
|
2421
2613
|
cfg: ctx.cfg,
|
|
2422
2614
|
messageId,
|
|
2423
2615
|
accountId: ctx.accountId ?? void 0
|
|
2424
2616
|
});
|
|
2425
2617
|
let removed = 0;
|
|
2426
|
-
|
|
2427
|
-
|
|
2618
|
+
const ownReactions = reactions.filter((entry) => entry.operatorType === "app" && Boolean(account.appId) && entry.operatorId === account.appId);
|
|
2619
|
+
for (const reaction of ownReactions) {
|
|
2620
|
+
await runtime.removeReactionFeishu({
|
|
2428
2621
|
cfg: ctx.cfg,
|
|
2429
2622
|
messageId,
|
|
2430
2623
|
reactionId: reaction.reactionId,
|
|
@@ -2437,8 +2630,14 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2437
2630
|
removed
|
|
2438
2631
|
});
|
|
2439
2632
|
}
|
|
2440
|
-
const
|
|
2441
|
-
await
|
|
2633
|
+
const runtime = await loadFeishuChannelRuntime();
|
|
2634
|
+
await requireAuthorizedFeishuMessage({
|
|
2635
|
+
ctx,
|
|
2636
|
+
account,
|
|
2637
|
+
runtime,
|
|
2638
|
+
messageId
|
|
2639
|
+
});
|
|
2640
|
+
await runtime.addReactionFeishu({
|
|
2442
2641
|
cfg: ctx.cfg,
|
|
2443
2642
|
messageId,
|
|
2444
2643
|
emojiType: emoji,
|
|
@@ -2452,10 +2651,16 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2452
2651
|
if (ctx.action === "reactions") {
|
|
2453
2652
|
const messageId = resolveFeishuMessageId(ctx.params);
|
|
2454
2653
|
if (!messageId) throw new Error("Feishu reactions lookup requires messageId.");
|
|
2455
|
-
const
|
|
2654
|
+
const runtime = await loadFeishuChannelRuntime();
|
|
2655
|
+
await requireAuthorizedFeishuMessage({
|
|
2656
|
+
ctx,
|
|
2657
|
+
account,
|
|
2658
|
+
runtime,
|
|
2659
|
+
messageId
|
|
2660
|
+
});
|
|
2456
2661
|
return jsonActionResult({
|
|
2457
2662
|
ok: true,
|
|
2458
|
-
reactions: await listReactionsFeishu({
|
|
2663
|
+
reactions: await runtime.listReactionsFeishu({
|
|
2459
2664
|
cfg: ctx.cfg,
|
|
2460
2665
|
messageId,
|
|
2461
2666
|
accountId: ctx.accountId ?? void 0
|
|
@@ -2513,10 +2718,7 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2513
2718
|
};
|
|
2514
2719
|
return { to: `chat:${parsed?.chatId ?? conversationId.trim()}` };
|
|
2515
2720
|
},
|
|
2516
|
-
resolveSessionConversation:
|
|
2517
|
-
kind,
|
|
2518
|
-
rawId
|
|
2519
|
-
}),
|
|
2721
|
+
resolveSessionConversation: resolveFeishuSessionConversation,
|
|
2520
2722
|
resolveOutboundSessionRoute: (params) => resolveFeishuOutboundSessionRoute(params),
|
|
2521
2723
|
targetResolver: {
|
|
2522
2724
|
looksLikeId: looksLikeFeishuId,
|
|
@@ -2569,7 +2771,7 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2569
2771
|
})
|
|
2570
2772
|
}),
|
|
2571
2773
|
gateway: { startAccount: async (ctx) => {
|
|
2572
|
-
const { monitorFeishuProvider } = await import("./monitor-
|
|
2774
|
+
const { monitorFeishuProvider } = await import("./monitor-M3iYtoh4.js");
|
|
2573
2775
|
const account = resolveFeishuRuntimeAccount({
|
|
2574
2776
|
cfg: ctx.cfg,
|
|
2575
2777
|
accountId: ctx.accountId
|
|
@@ -2613,9 +2815,16 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2613
2815
|
});
|
|
2614
2816
|
}
|
|
2615
2817
|
} },
|
|
2818
|
+
threading: { buildToolContext: ({ context, hasRepliedRef }) => ({
|
|
2819
|
+
currentChannelId: normalizeOptionalString(context.NativeChannelId) ?? normalizeOptionalString(context.To),
|
|
2820
|
+
currentChatType: context.ChatType === "direct" || context.ChatType === "group" || context.ChatType === "channel" ? context.ChatType : void 0,
|
|
2821
|
+
currentMessagingTarget: normalizeOptionalString(context.To),
|
|
2822
|
+
currentThreadTs: context.MessageThreadId != null ? String(context.MessageThreadId) : void 0,
|
|
2823
|
+
hasRepliedRef
|
|
2824
|
+
}) },
|
|
2616
2825
|
outbound: {
|
|
2617
2826
|
deliveryMode: "direct",
|
|
2618
|
-
chunker:
|
|
2827
|
+
chunker: chunkFeishuMarkdown,
|
|
2619
2828
|
chunkerMode: "markdown",
|
|
2620
2829
|
textChunkLimit: 4e3,
|
|
2621
2830
|
sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text),
|
|
@@ -2656,4 +2865,4 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2656
2865
|
}
|
|
2657
2866
|
});
|
|
2658
2867
|
//#endregion
|
|
2659
|
-
export { setFeishuNamedAccountEnabled$1 as a,
|
|
2868
|
+
export { setFeishuNamedAccountEnabled$1 as a, isFeishuCardWithinEnvelope as c, feishuSetupAdapter as i, listFeishuDirectoryGroups as l, feishuSetupWizard as n, assertFeishuCardWithinEnvelope as o, runFeishuLogin as r, buildFeishuPresentationCardElements as s, feishuPlugin as t, listFeishuDirectoryPeers as u };
|