@amaster.ai/pi-lark 0.1.5 → 0.1.7
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/README.md +5 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/skills/lark-approval/references/lark-approval-initiate.md +2 -5
- package/skills/lark-approval/references/lark-approval-instances-initiated.md +6 -0
- package/skills/lark-approval/references/lark-approval-tasks-query.md +9 -0
- package/skills/lark-approval/references/lark-approval-tasks-rollback.md +8 -2
- package/skills/lark-apps/SKILL.md +46 -16
- package/skills/lark-apps/creative-design/agents/assets/vision-probe.png +0 -0
- package/skills/lark-apps/creative-design/agents/fork-verifier-agent.md +71 -0
- package/skills/lark-apps/creative-design/agents/vision-probe-agent.md +41 -0
- package/skills/lark-apps/creative-design/assets/index.html +27 -0
- package/skills/lark-apps/creative-design/creative-design.md +239 -0
- package/skills/lark-apps/creative-design/references/aily.md +39 -0
- package/skills/lark-apps/creative-design/references/animated-video.md +34 -0
- package/skills/lark-apps/creative-design/references/charts.md +165 -0
- package/skills/lark-apps/creative-design/references/claude.md +36 -0
- package/skills/lark-apps/creative-design/references/codex.md +32 -0
- package/skills/lark-apps/creative-design/references/data-report.md +108 -0
- package/skills/lark-apps/creative-design/references/frontend-design.md +71 -0
- package/skills/lark-apps/creative-design/references/hi-fi-design.md +32 -0
- package/skills/lark-apps/creative-design/references/interactive-prototype.md +24 -0
- package/skills/lark-apps/creative-design/references/make-a-deck.md +133 -0
- package/skills/lark-apps/creative-design/references/visual-exposure.md +82 -0
- package/skills/lark-apps/creative-design/references/wireframe.md +14 -0
- package/skills/lark-apps/creative-design/starter-components/android-frame.jsx +188 -0
- package/skills/lark-apps/creative-design/starter-components/animations.jsx +773 -0
- package/skills/lark-apps/creative-design/starter-components/browser-window.jsx +122 -0
- package/skills/lark-apps/creative-design/starter-components/deck-stage.js +2483 -0
- package/skills/lark-apps/creative-design/starter-components/design-canvas.jsx +1432 -0
- package/skills/lark-apps/creative-design/starter-components/ios-frame.jsx +270 -0
- package/skills/lark-apps/creative-design/starter-components/macos-window.jsx +197 -0
- package/skills/lark-apps/creative-design/starter-components/tweaks-panel.jsx +752 -0
- package/skills/lark-apps/references/lark-apps-access-scope-set.md +1 -1
- package/skills/lark-apps/references/lark-apps-automation.md +242 -0
- package/skills/lark-apps/references/lark-apps-cache.md +61 -0
- package/skills/lark-apps/references/lark-apps-cloud-dev.md +0 -1
- package/skills/lark-apps/references/lark-apps-create.md +1 -2
- package/skills/lark-apps/references/lark-apps-db-execute.md +186 -2
- package/skills/lark-apps/references/lark-apps-db.md +4 -4
- package/skills/lark-apps/references/lark-apps-env-pull.md +1 -1
- package/skills/lark-apps/references/lark-apps-file.md +2 -2
- package/skills/lark-apps/references/lark-apps-get.md +43 -0
- package/skills/lark-apps/references/lark-apps-git-credential.md +1 -1
- package/skills/lark-apps/references/lark-apps-html-publish.md +5 -4
- package/skills/lark-apps/references/lark-apps-init.md +2 -3
- package/skills/lark-apps/references/lark-apps-list.md +1 -1
- package/skills/lark-apps/references/lark-apps-local-dev.md +54 -11
- package/skills/lark-apps/references/lark-apps-openapi-key.md +1 -1
- package/skills/lark-apps/references/lark-apps-release-create.md +5 -3
- package/skills/lark-apps/references/lark-apps-release-get.md +3 -3
- package/skills/lark-apps/references/lark-apps-role.md +133 -0
- package/skills/lark-base/SKILL.md +26 -15
- package/skills/lark-base/references/dashboard-block-data-config.md +28 -2
- package/skills/lark-base/references/lark-base-cell-value.md +12 -7
- package/skills/lark-base/references/lark-base-dashboard-block-get-data.md +7 -7
- package/skills/lark-base/references/lark-base-dashboard.md +11 -2
- package/skills/lark-base/references/lark-base-data-query.md +20 -11
- package/skills/lark-base/references/lark-base-field-create.md +8 -2
- package/skills/lark-base/references/lark-base-field-json.md +56 -19
- package/skills/lark-base/references/lark-base-field-update.md +21 -3
- package/skills/lark-base/references/lark-base-filter-condition.md +179 -0
- package/skills/lark-base/references/lark-base-form-questions-create.md +40 -7
- package/skills/lark-base/references/lark-base-form-questions-update.md +73 -20
- package/skills/lark-base/references/lark-base-form-submit.md +16 -7
- package/skills/lark-base/references/lark-base-record-batch-create.md +12 -10
- package/skills/lark-base/references/lark-base-record-batch-update.md +11 -9
- package/skills/lark-base/references/lark-base-record-upsert.md +1 -1
- package/skills/lark-base/references/lark-base-role-guide.md +11 -0
- package/skills/lark-base/references/lark-base-view-set-filter.md +14 -138
- package/skills/lark-base/references/role-config.md +31 -5
- package/skills/lark-calendar/SKILL.md +101 -37
- package/skills/lark-calendar/references/lark-calendar-create.md +13 -43
- package/skills/lark-calendar/references/lark-calendar-recurring.md +1 -0
- package/skills/lark-calendar/references/lark-calendar-room-find.md +7 -10
- package/skills/lark-calendar/references/lark-calendar-rsvp.md +1 -5
- package/skills/lark-calendar/references/lark-calendar-schedule-clear-time.md +60 -0
- package/skills/lark-calendar/references/lark-calendar-schedule-fuzzy-time.md +88 -0
- package/skills/lark-calendar/references/lark-calendar-schedule-meeting.md +67 -210
- package/skills/lark-calendar/references/lark-calendar-suggestion.md +2 -6
- package/skills/lark-calendar/references/lark-calendar-update.md +12 -11
- package/skills/lark-contact/SKILL.md +19 -3
- package/skills/lark-contact/references/lark-contact-search-bot.md +60 -0
- package/skills/lark-doc/SKILL.md +1 -1
- package/skills/lark-doc/references/lark-doc-fetch.md +14 -4
- package/skills/lark-doc/references/lark-doc-mindnote.md +17 -2
- package/skills/lark-doc/references/lark-doc-whiteboard.md +13 -8
- package/skills/lark-doc/references/lark-doc-xml-extended-blocks.md +76 -0
- package/skills/lark-doc/references/lark-doc-xml.md +6 -4
- package/skills/lark-drive/SKILL.md +35 -43
- package/skills/lark-drive/references/lark-drive-add-comment.md +2 -4
- package/skills/lark-drive/references/lark-drive-add-reply.md +47 -0
- package/skills/lark-drive/references/lark-drive-apply-permission.md +2 -2
- package/skills/lark-drive/references/lark-drive-batch-query-comments.md +46 -0
- package/skills/lark-drive/references/lark-drive-comment-content.md +50 -0
- package/skills/lark-drive/references/lark-drive-comment-location.md +18 -12
- package/skills/lark-drive/references/lark-drive-delete-reply.md +48 -0
- package/skills/lark-drive/references/lark-drive-delete.md +35 -11
- package/skills/lark-drive/references/lark-drive-download.md +5 -1
- package/skills/lark-drive/references/lark-drive-export.md +39 -10
- package/skills/lark-drive/references/lark-drive-files-list.md +27 -2
- package/skills/lark-drive/references/lark-drive-inspect.md +2 -0
- package/skills/lark-drive/references/lark-drive-list-comments.md +82 -0
- package/skills/lark-drive/references/lark-drive-list-replies.md +54 -0
- package/skills/lark-drive/references/lark-drive-member-add.md +3 -3
- package/skills/lark-drive/references/lark-drive-member-list.md +65 -0
- package/skills/lark-drive/references/lark-drive-move.md +5 -3
- package/skills/lark-drive/references/lark-drive-permission-get-setting.md +48 -0
- package/skills/lark-drive/references/lark-drive-permission-guide.md +12 -0
- package/skills/lark-drive/references/lark-drive-preview.md +11 -1
- package/skills/lark-drive/references/lark-drive-pull.md +3 -3
- package/skills/lark-drive/references/lark-drive-push.md +33 -6
- package/skills/lark-drive/references/lark-drive-react-reply.md +51 -0
- package/skills/lark-drive/references/lark-drive-reactions.md +27 -25
- package/skills/lark-drive/references/lark-drive-resolve-comment.md +45 -0
- package/skills/lark-drive/references/lark-drive-restore-comment.md +46 -0
- package/skills/lark-drive/references/lark-drive-search.md +7 -1
- package/skills/lark-drive/references/lark-drive-secure-label.md +1 -1
- package/skills/lark-drive/references/lark-drive-status.md +12 -14
- package/skills/lark-drive/references/lark-drive-task-result.md +58 -5
- package/skills/lark-drive/references/lark-drive-update-reply.md +46 -0
- package/skills/lark-drive/references/lark-drive-upload.md +1 -0
- package/skills/lark-drive/references/lark-drive-workflow-knowledge-organize.md +26 -20
- package/skills/lark-drive/references/lark-drive-workflow-permission-governance-commands.md +38 -8
- package/skills/lark-drive/references/lark-drive-workflow-permission-governance-outputs.md +10 -10
- package/skills/lark-drive/references/lark-drive-workflow-permission-governance.md +22 -20
- package/skills/lark-drive/references/lark-drive-workflow-topic-move-collector-execute.md +273 -0
- package/skills/lark-drive/references/lark-drive-workflow-topic-move-collector-recall.md +202 -0
- package/skills/lark-drive/references/lark-drive-workflow-topic-move-collector-resolve-verify.md +231 -0
- package/skills/lark-drive/references/lark-drive-workflow-topic-move-collector-review-plan.md +248 -0
- package/skills/lark-drive/references/lark-drive-workflow-topic-move-collector-setup.md +174 -0
- package/skills/lark-drive/references/lark-drive-workflow-topic-move-collector.md +202 -0
- package/skills/lark-drive/references/lark-drive-workflow.md +5 -3
- package/skills/lark-event/SKILL.md +3 -1
- package/skills/lark-event/references/lark-event-application.md +38 -0
- package/skills/lark-event/references/lark-event-approval.md +170 -0
- package/skills/lark-im/SKILL.md +6 -5
- package/skills/lark-im/references/card/card-2.0-schema.md +1 -1
- package/skills/lark-im/references/card/lark-im-card-style.md +4 -4
- package/skills/lark-im/references/card/resource/icons.md +14 -0
- package/skills/lark-im/references/lark-im-flag-list.md +8 -7
- package/skills/lark-im/references/lark-im-messages-reply.md +1 -1
- package/skills/lark-im/references/lark-im-messages-send.md +1 -1
- package/skills/lark-mail/SKILL.md +12 -9
- package/skills/lark-mail/references/lark-mail-forward.md +1 -1
- package/skills/lark-mail/references/lark-mail-message-modify.md +48 -0
- package/skills/lark-mail/references/lark-mail-message-trash.md +41 -0
- package/skills/lark-mail/references/lark-mail-reply-all.md +1 -1
- package/skills/lark-mail/references/lark-mail-reply.md +1 -1
- package/skills/lark-mail/references/lark-mail-watch.md +1 -1
- package/skills/lark-markdown/SKILL.md +3 -2
- package/skills/lark-markdown/references/lark-markdown-create.md +22 -2
- package/skills/lark-minutes/SKILL.md +19 -4
- package/skills/lark-minutes/references/lark-minutes-download.md +0 -2
- package/skills/lark-minutes/references/lark-minutes-search.md +0 -2
- package/skills/lark-minutes/references/lark-minutes-speaker-replace.md +0 -2
- package/skills/lark-minutes/references/lark-minutes-summary.md +0 -2
- package/skills/lark-minutes/references/lark-minutes-todo.md +2 -4
- package/skills/lark-minutes/references/lark-minutes-update.md +0 -2
- package/skills/lark-minutes/references/lark-minutes-upload.md +10 -10
- package/skills/lark-okr/SKILL.md +71 -26
- package/skills/lark-okr/references/lark-okr-batch-create.md +19 -18
- package/skills/lark-okr/references/lark-okr-create.md +173 -0
- package/skills/lark-okr/references/lark-okr-cycle-list.md +17 -7
- package/skills/lark-okr/references/lark-okr-entities.md +1 -0
- package/skills/lark-okr/references/lark-okr-indicator-update.md +3 -1
- package/skills/lark-okr/references/lark-okr-indicators.md +61 -12
- package/skills/lark-okr/references/lark-okr-progress-list.md +21 -9
- package/skills/lark-shared/SKILL.md +26 -8
- package/skills/lark-sheets/SKILL.md +98 -29
- package/skills/lark-sheets/references/lark-sheets-batch-update.md +18 -9
- package/skills/lark-sheets/references/lark-sheets-changeset.md +105 -0
- package/skills/lark-sheets/references/lark-sheets-chart.md +4 -2
- package/skills/lark-sheets/references/lark-sheets-conditional-format.md +2 -0
- package/skills/lark-sheets/references/lark-sheets-filter-view.md +1 -1
- package/skills/lark-sheets/references/lark-sheets-float-image.md +6 -6
- package/skills/lark-sheets/references/lark-sheets-formula-translation.md +12 -3
- package/skills/lark-sheets/references/lark-sheets-formula-verify.md +77 -0
- package/skills/lark-sheets/references/lark-sheets-history.md +93 -0
- package/skills/lark-sheets/references/lark-sheets-pivot-table.md +7 -2
- package/skills/lark-sheets/references/lark-sheets-range-operations.md +44 -14
- package/skills/lark-sheets/references/lark-sheets-read-data.md +3 -3
- package/skills/lark-sheets/references/lark-sheets-sheet-structure.md +4 -4
- package/skills/lark-sheets/references/lark-sheets-visual-standards.md +4 -4
- package/skills/lark-sheets/references/lark-sheets-workbook.md +29 -4
- package/skills/lark-sheets/references/lark-sheets-write-cells.md +21 -11
- package/skills/lark-slides/SKILL.md +121 -63
- package/skills/lark-slides/references/asset-planning.md +18 -5
- package/skills/lark-slides/references/iconpark.md +3 -3
- package/skills/lark-slides/references/lark-slides-create.md +30 -3
- package/skills/lark-slides/references/lark-slides-history.md +132 -0
- package/skills/lark-slides/references/lark-slides-media-upload.md +1 -3
- package/skills/lark-slides/references/lark-slides-pptx-template-workflows.md +85 -0
- package/skills/lark-slides/references/lark-slides-replace-pages.md +1 -1
- package/skills/lark-slides/references/lark-slides-replace-slide.md +1 -4
- package/skills/lark-slides/references/lark-slides-screenshot.md +11 -8
- package/skills/lark-slides/references/lark-slides-xml-presentation-slide-create.md +5 -6
- package/skills/lark-slides/references/lark-slides-xml-presentation-slide-delete.md +5 -2
- package/skills/lark-slides/references/lark-slides-xml-presentation-slide-get.md +5 -5
- package/skills/lark-slides/references/lark-slides-xml-presentation-slide-replace.md +14 -13
- package/skills/lark-slides/references/lark-slides-xml-presentations-get.md +67 -31
- package/skills/lark-slides/references/planning-layer.md +41 -10
- package/skills/lark-slides/references/slides_chart_demo.xml +1416 -0
- package/skills/lark-slides/references/slides_xml_schema_definition.xml +499 -78
- package/skills/lark-slides/references/troubleshooting.md +5 -5
- package/skills/lark-slides/references/validation-checklist.md +65 -19
- package/skills/lark-slides/references/visual-planning.md +26 -22
- package/skills/lark-slides/references/xml-schema-quick-ref.md +285 -45
- package/skills/lark-slides/scripts/sxsd_validator.py +908 -0
- package/skills/lark-slides/scripts/xml_text_overlap_lint.py +2429 -91
- package/skills/lark-slides/scripts/xml_text_overlap_lint_test.py +3567 -70
- package/skills/lark-task/SKILL.md +8 -0
- package/skills/lark-task/references/lark-task-complete.md +6 -2
- package/skills/lark-task/references/lark-task-create.md +23 -1
- package/skills/lark-task/references/lark-task-update.md +6 -2
- package/skills/lark-vc/SKILL.md +6 -3
- package/skills/lark-vc/references/lark-vc-recording.md +0 -2
- package/skills/lark-vc/references/vc-domain-boundaries.md +9 -1
- package/skills/lark-vc-agent/SKILL.md +25 -15
- package/skills/lark-vc-agent/references/lark-vc-agent-meeting-events.md +65 -37
- package/skills/lark-vc-agent/references/lark-vc-agent-meeting-leave.md +1 -1
- package/skills/lark-vc-agent/references/lark-vc-agent-meeting-list-active.md +8 -8
- package/skills/lark-whiteboard/SKILL.md +13 -12
- package/skills/lark-whiteboard/elements/layout.md +1 -1
- package/skills/lark-whiteboard/elements/schema.md +2 -2
- package/skills/lark-whiteboard/references/{lark-whiteboard-query.md → lark-whiteboard-export.md} +15 -15
- package/skills/lark-whiteboard/references/lark-whiteboard-update.md +3 -3
- package/skills/lark-whiteboard/references/lark-whiteboard-workflow.md +12 -19
- package/skills/lark-whiteboard/routes/dsl.md +3 -3
- package/skills/lark-whiteboard/routes/mermaid.md +2 -2
- package/skills/lark-whiteboard/routes/svg-edit.md +4 -4
- package/skills/lark-whiteboard/routes/svg.md +11 -6
- package/skills/lark-whiteboard/scenes/bar-chart.md +1 -1
- package/skills/lark-whiteboard/scenes/fishbone.md +1 -1
- package/skills/lark-whiteboard/scenes/flywheel.md +1 -1
- package/skills/lark-whiteboard/scenes/line-chart.md +1 -1
- package/skills/lark-whiteboard/scenes/treemap.md +1 -1
- package/skills/lark-wiki/SKILL.md +8 -3
- package/skills/lark-wiki/references/lark-wiki-move-to-drive.md +122 -0
- package/skills/lark-wiki/references/lark-wiki-move.md +5 -3
- package/skills/lark-wiki/references/lark-wiki-node-get.md +1 -1
- package/skills/lark-wiki/references/lark-wiki-node-list.md +9 -2
- package/skills/lark-calendar/references/lark-calendar-agenda.md +0 -78
- package/skills/lark-calendar/references/lark-calendar-freebusy.md +0 -124
- package/skills/lark-calendar/references/lark-calendar-search-event.md +0 -29
- package/skills/lark-drive/references/lark-drive-comments-guide.md +0 -72
- package/skills/lark-sheets/references/lark-sheets-core-operations.md +0 -103
- package/skills/lark-slides/references/examples.md +0 -261
- package/skills/lark-slides/references/lark-slides-whiteboard.md +0 -330
- package/skills/lark-slides/references/slide-templates.md +0 -201
- package/skills/lark-slides/references/slides_demo.xml +0 -226
- package/skills/lark-slides/references/xml-format-guide.md +0 -369
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# 主题资料收集工作流
|
|
2
|
+
|
|
3
|
+
Workflow id: `topic_move_collector`
|
|
4
|
+
|
|
5
|
+
Risk / Structure: `R2-R3` / `S3`
|
|
6
|
+
|
|
7
|
+
本文档实现已注册的主题资料收集 workflow。执行前必须先阅读 [`lark-drive-workflow.md`](lark-drive-workflow.md) 和 [`../../lark-shared/SKILL.md`](../../lark-shared/SKILL.md),并遵循共享执行协议、Artifact Contract、Workflow Loading、认证和写入确认规则。
|
|
8
|
+
|
|
9
|
+
本文档负责定义本 workflow 的全局约束、状态机和渐进加载关系。具体阶段规则放在配套文档中,只有进入对应状态时才加载。
|
|
10
|
+
|
|
11
|
+
配套文档只是本 workflow 的引用文件,不是独立 skill。不要把用户请求直接路由到某个配套文档。
|
|
12
|
+
|
|
13
|
+
## 必读上下文
|
|
14
|
+
|
|
15
|
+
执行本 workflow 前,必须先阅读 [`../../lark-shared/SKILL.md`](../../lark-shared/SKILL.md),用于处理身份、认证、权限和写操作确认规则。
|
|
16
|
+
|
|
17
|
+
按阶段渐进加载其他 skill / 引用文档:
|
|
18
|
+
|
|
19
|
+
- 目标是 Wiki 或个人文档库:[`../../lark-wiki/SKILL.md`](../../lark-wiki/SKILL.md)
|
|
20
|
+
- 需要读取文档内容:[`../../lark-doc/SKILL.md`](../../lark-doc/SKILL.md) 和 [`../../lark-doc/references/lark-doc-fetch.md`](../../lark-doc/references/lark-doc-fetch.md)
|
|
21
|
+
- 需要验证 Sheet 内容:[`../../lark-sheets/SKILL.md`](../../lark-sheets/SKILL.md)
|
|
22
|
+
- 需要 Drive 搜索:[`lark-drive-search.md`](lark-drive-search.md)
|
|
23
|
+
- 需要资源解析:[`lark-drive-inspect.md`](lark-drive-inspect.md)
|
|
24
|
+
|
|
25
|
+
## 适用范围
|
|
26
|
+
|
|
27
|
+
本 workflow 用于根据用户给出的主题、关键词或内容线索,在云空间 / 云盘 / Wiki / 电子表格等 Workspace 资源中查找相关资料,并在用户确认后统一移动到指定 Drive 文件夹或 Wiki 节点下。
|
|
28
|
+
|
|
29
|
+
适用触发语包括:
|
|
30
|
+
|
|
31
|
+
- "帮我找到和某主题相关的文档并放到这个文件夹"
|
|
32
|
+
- "把所有关于某项目的资料收集到知识库节点下"
|
|
33
|
+
- "找出包含某内容的资料,确认后移动到新建目录"
|
|
34
|
+
- "按这个关键词搜索我负责的资料,把相关资料归档"
|
|
35
|
+
|
|
36
|
+
默认搜索范围是当前用户 owner / 负责的 Workspace 资源,即 `owner_scope=mine`。只有用户明确要求“不限 owner”“包括共享给我的”“所有我能看到的文档”或“全量搜索”时,才使用 `owner_scope=all_visible` 进入扩展召回模式。
|
|
37
|
+
|
|
38
|
+
不要求用户先限定文件夹或知识库范围。只有用户明确指定范围时,才使用 `--folder-tokens`、`--space-ids` 或其他显式限制。
|
|
39
|
+
|
|
40
|
+
## 非目标
|
|
41
|
+
|
|
42
|
+
默认不生成:
|
|
43
|
+
|
|
44
|
+
- 长篇研究报告
|
|
45
|
+
- 内容总结文档
|
|
46
|
+
- Sheet 清单或统计看板
|
|
47
|
+
- 自动权限治理报告
|
|
48
|
+
|
|
49
|
+
默认禁止执行:
|
|
50
|
+
|
|
51
|
+
- 未确认前创建文件夹或 Wiki 节点
|
|
52
|
+
- 未确认前移动资源
|
|
53
|
+
- 删除资源、重命名资源或修改公开权限
|
|
54
|
+
- 自动批量申请权限
|
|
55
|
+
- 把无权限或无法验证的资源加入移动计划
|
|
56
|
+
- 把移动权限未知或不具备移动资格的资源加入移动计划
|
|
57
|
+
|
|
58
|
+
如果用户明确要求把结果写入 Sheet / Doc,切到对应专项能力;本 workflow 的默认产物是移动后的资源归档结果。
|
|
59
|
+
|
|
60
|
+
## Agent 执行约束
|
|
61
|
+
|
|
62
|
+
触发本 workflow 后,agent 必须:
|
|
63
|
+
|
|
64
|
+
1. 按“执行状态机”的顺序执行。
|
|
65
|
+
2. 维护“运行时状态”中的字段。
|
|
66
|
+
3. 执行某个状态前,先读取本文档 `## 渐进加载关系` 表格中该状态对应的文档。
|
|
67
|
+
4. 用户可见说明、字段说明和 UI 文案使用中文。
|
|
68
|
+
5. 状态名、字段名、枚举值、命令名保留英文稳定标识。
|
|
69
|
+
6. 将 `CONFIRM_CONTEXT` 和 `CONFIRM_EXECUTION` 作为强用户确认门:前者确认主题、目标位置、身份、搜索范围、可选限制和目标解析结果后才能搜索;后者确认创建目标和移动资源后才能写入。
|
|
70
|
+
7. 进入 `EXECUTE` 前,不得创建目标文件夹 / 节点,也不得移动资源。
|
|
71
|
+
8. 必须展示每个相关性分组中的资源名称;低置信分组可以折叠,但必须可查看。
|
|
72
|
+
9. 默认只移动 `high` 相关资源;`medium` 资源必须由用户显式选择。
|
|
73
|
+
10. 即使用户可见列表分页展示,也必须维护完整内部状态。
|
|
74
|
+
11. `RESOURCE_RESOLVE` 和 `CONTENT_VERIFY` 是两个独立的强制阶段,不得合并;不得用搜索结果、标题或摘要直接替代 `CONTENT_VERIFY`,也不得从 `RESOURCE_RESOLVE` 直接进入 `RELEVANCE_CLASSIFY`。
|
|
75
|
+
12. 触发后锁定 `workflow_id=topic_move_collector`;执行期间不得自动切换到其他 workflow。
|
|
76
|
+
13. 如果认为需要切换 workflow,必须停止并向用户说明原因,等待用户确认。
|
|
77
|
+
14. `RESOURCE_RESOLVE` 是移动资格门禁;只有确认 `move_permission_state=movable` 且 `target_write_state=confirmed` 的资源才能进入默认移动链路。
|
|
78
|
+
|
|
79
|
+
## 用户展示 UI 规则
|
|
80
|
+
|
|
81
|
+
所有用户可见 UI 都必须包含:
|
|
82
|
+
|
|
83
|
+
1. 已经完成的关键结果。
|
|
84
|
+
2. 下一步会做什么,以及是否会产生写操作。
|
|
85
|
+
3. 如果 `wait_for_user=true`,明确告诉用户可以选择的动作。
|
|
86
|
+
4. 如果无需用户操作,明确说明将继续执行,避免用户误以为流程停住。
|
|
87
|
+
|
|
88
|
+
典型动作包括:确认继续、修改主题 / 目标 / 限制、展开更多结果、调整相关性分组、选择中相关资源、确认执行、取消执行。
|
|
89
|
+
|
|
90
|
+
## 职责边界
|
|
91
|
+
|
|
92
|
+
| 文件 | 负责 | 不负责 |
|
|
93
|
+
|------|------|--------------|
|
|
94
|
+
| `lark-drive-workflow-topic-move-collector.md` | 触发规则、全局约束、状态机、渐进加载关系、命令族白名单 | 具体阶段规则、UI 模板、执行细节 |
|
|
95
|
+
| `lark-drive-workflow-topic-move-collector-setup.md` | `PARSE_INPUT`、`RESOLVE_TARGET`、`CONFIRM_CONTEXT`、`TargetLocation` | 搜索执行、相关性分类、写操作 |
|
|
96
|
+
| `lark-drive-workflow-topic-move-collector-recall.md` | `SEARCH_RECALL`、`RECALL_ENHANCE`、搜索 query 策略、去重、`CandidateItem` | 资源 token 解析、内容验证、写操作 |
|
|
97
|
+
| `lark-drive-workflow-topic-move-collector-resolve-verify.md` | `RESOURCE_RESOLVE`、`CONTENT_VERIFY`、权限矩阵、`ResourceItem` | 相关性分类、移动计划、写操作 |
|
|
98
|
+
| `lark-drive-workflow-topic-move-collector-review-plan.md` | `RELEVANCE_CLASSIFY`、`PLAN_MOVE`、`MovePlanItem`、展示分组 | 资源解析、内容验证、写操作执行、恢复 |
|
|
99
|
+
| `lark-drive-workflow-topic-move-collector-execute.md` | `CONFIRM_EXECUTION`、`EXECUTE`、`VERIFY`、`RESTORE`、`RollbackSnapshotItem`、执行日志 | 搜索、分类和计划 schema |
|
|
100
|
+
|
|
101
|
+
## 运行时状态
|
|
102
|
+
|
|
103
|
+
本 workflow 扩展共享 Artifact Contract。agent 在一次 workflow 运行中必须维护以下专项内部字段:
|
|
104
|
+
|
|
105
|
+
| 字段 | 说明 |
|
|
106
|
+
|-------|------|
|
|
107
|
+
| `current_state` | 当前状态机节点。 |
|
|
108
|
+
| `topic` | 用户确认后的主题、关键词、同义词和排除词。 |
|
|
109
|
+
| `target_location` | 目标位置解析结果,见 setup 文件的 `TargetLocation`。 |
|
|
110
|
+
| `identity` | 执行身份;默认优先 `--as user`。 |
|
|
111
|
+
| `owner_scope` | 搜索 owner 范围;默认 `mine`,仅搜索当前用户 owner / 负责的资源;用户明确要求扩展时才为 `all_visible`。 |
|
|
112
|
+
| `constraints` | 用户显式确认的类型、时间、创建人、范围等限制。 |
|
|
113
|
+
| `allow_cross_container_move` | 是否允许跨 Drive / Wiki 容器移动;默认允许,但必须展示给用户确认。 |
|
|
114
|
+
| `recall_query_states` | 每个基础 / 增强 query 的分页状态、累计页数、`next_page_token`、`has_more`、完成或阻塞状态。 |
|
|
115
|
+
| `candidate_items` | 搜索召回结果,包含 query 证据和去重信息。 |
|
|
116
|
+
| `resource_items` | 解析后的标准资源列表。 |
|
|
117
|
+
| `content_verify_completed` | 内容验证阶段完成标记;`resource_items` 新建或变化时重置为 `false`,只有全部资源都有验证状态或跳过原因后才设为 `true`。 |
|
|
118
|
+
| `relevance_groups` | 高相关、中相关、低相关、无权限、无移动权限、移动权限未知、无法验证、不可移动分组。 |
|
|
119
|
+
| `move_plan_items` | 经用户选择后生成的完整移动计划,包含稳定资源关联、不可变命令参数、权限快照和恢复输入。 |
|
|
120
|
+
| `execution_journal` | 写操作日志,用于验证和恢复。 |
|
|
121
|
+
| `rollback_snapshot` | 写操作前位置快照,仅用于失败恢复或用户要求恢复。 |
|
|
122
|
+
| `display_page_state` | 用户可见列表的分页、筛选和展开状态。 |
|
|
123
|
+
|
|
124
|
+
## 执行状态机
|
|
125
|
+
|
|
126
|
+
| 状态 | Protocol Step | 进入条件 | agent 必须执行 | 用户可见输出 | `wait_for_user` | 下一状态 |
|
|
127
|
+
|-------|---------------|-----------------|---------------|--------------------|---------------|------------|
|
|
128
|
+
| `PARSE_INPUT` | `route` / `scope` | workflow 被触发 | 加载 setup 文档;解析主题、目标、身份和限制 | 澄清问题或解析摘要 | 必填字段缺失时为 `true` | `RESOLVE_TARGET` |
|
|
129
|
+
| `RESOLVE_TARGET` | `scope` | 主题和目标已获得 | 解析已有目标,或解析待创建目标;按解析状态分流 | 目标解析结果或 blocker | 非 `resolved` 时为 `true` | `resolved` 时进入 `CONFIRM_CONTEXT`;否则保持本状态 |
|
|
130
|
+
| `CONFIRM_CONTEXT` | `scope` | `target_resolve_status=resolved` | 展示主题、目标、身份、限制和跨容器设置 | 搜索前确认 UI | `true` | `SEARCH_RECALL` |
|
|
131
|
+
| `SEARCH_RECALL` | `read` | 用户确认上下文 | 用原始关键词、默认 owner 范围和显式限制执行基础召回;按每批最多 5 页自动续批 | 搜索进度 / 基础统计 | 阻塞时为 `true` | 所有基础 query 完成后进入 `RECALL_ENHANCE` |
|
|
132
|
+
| `RECALL_ENHANCE` | `read` | 所有基础 query 已完成 | 执行覆盖增强 query,按每批最多 5 页自动续批并合并结果 | 增强召回摘要 | 阻塞时为 `true` | 所有增强 query 完成后进入 `RESOURCE_RESOLVE` |
|
|
133
|
+
| `RESOURCE_RESOLVE` | `read` | 候选列表已准备 | 解析 token、类型、父级位置、owner 和移动资格 | 解析进度 / 阻塞摘要 | 阻塞时为 `true` | `CONTENT_VERIFY` |
|
|
134
|
+
| `CONTENT_VERIFY` | `read` | 资源列表已准备 | 对支持的资源做有界内容读取,并为其余资源写入跳过原因 | 验证进度 / 验证摘要 | 阻塞时为 `true` | `RELEVANCE_CLASSIFY` |
|
|
135
|
+
| `RELEVANCE_CLASSIFY` | `assess` | 证据已准备 | 按相关性和可执行性分组 | 分组结果列表 | `false` | `PLAN_MOVE` |
|
|
136
|
+
| `PLAN_MOVE` | `assess` / `plan` | 分组完成 | 基于默认规则和用户可选项生成移动计划 | 草案计划和选择项 | `true` | `CONFIRM_EXECUTION` |
|
|
137
|
+
| `CONFIRM_EXECUTION` | `confirm` | 用户要求执行 | 展示创建、移动、跳过项和风险 | 写操作确认 UI | `true` | `EXECUTE` 或 `PLAN_MOVE` 或 `DONE` |
|
|
138
|
+
| `EXECUTE` | `execute` | 用户明确确认写操作 | 需要时先创建目标,再移动确认资源 | 执行进度 | 阻塞时为 `true` | `VERIFY` 或 `RESTORE` |
|
|
139
|
+
| `VERIFY` | `verify` | 执行完成 | 验证目标位置下的移动结果 | 验证结果 | 提供恢复选项时为 `true` | `DONE` 或 `RESTORE` |
|
|
140
|
+
| `RESTORE` | `recovery confirm` / `recovery execute` | 用户要求恢复 | 仅基于快照和日志恢复 | 恢复确认 / 结果 | 写操作前为 `true` | `VERIFY` 或 `DONE` |
|
|
141
|
+
| `DONE` | `done` | 无后续操作 | 停止 | 最终回复 | `false` | 结束 |
|
|
142
|
+
|
|
143
|
+
### 状态跳转硬约束
|
|
144
|
+
|
|
145
|
+
1. `RESOLVE_TARGET` 只有在 `target_resolve_status=resolved` 时才能进入 `CONFIRM_CONTEXT`;`ambiguous`、`unsupported` 或 `permission_denied` 必须保持在 `RESOLVE_TARGET` 并等待用户选择、更换目标或结束。
|
|
146
|
+
2. `SEARCH_RECALL` 只有在全部基础 query 的 `has_more=false` 时才能进入 `RECALL_ENHANCE`;单批达到 5 页但仍有更多结果时必须自动续批,不得提前跳转。
|
|
147
|
+
3. `RECALL_ENHANCE` 只有在全部增强 query 的 `has_more=false` 时才能进入 `RESOURCE_RESOLVE`;不得直接进入 `RELEVANCE_CLASSIFY` 或 `PLAN_MOVE`。
|
|
148
|
+
4. `RESOURCE_RESOLVE` 必须为每个 `CandidateItem` 生成对应的 `ResourceItem`,或生成明确的解析失败 / 权限受限状态。
|
|
149
|
+
5. `RESOURCE_RESOLVE` 必须为每个 `ResourceItem` 写入 `move_permission_state` 和 `move_permission_basis`;完成后将 `content_verify_completed=false`,下一状态只能是 `CONTENT_VERIFY`。
|
|
150
|
+
6. 禁止从 `RESOURCE_RESOLVE` 直接进入 `RELEVANCE_CLASSIFY`。即使没有任何资源可以读取正文,也必须进入 `CONTENT_VERIFY`,为每项写入验证状态或跳过原因并输出验证摘要。
|
|
151
|
+
7. `CONTENT_VERIFY` 必须为每个 `ResourceItem` 写入内容证据、搜索证据复用说明,或不可验证原因;移动权限未知或无移动权限的资源可以只写入跳过验证原因。
|
|
152
|
+
8. 只有当 `resource_items` 已准备、每项都有验证状态或跳过原因,且 `content_verify_completed=true` 时,才能进入 `RELEVANCE_CLASSIFY`。
|
|
153
|
+
9. 用户调整相关性分组后,必须回到 `RELEVANCE_CLASSIFY` 输出调整后的分组结果,再进入 `PLAN_MOVE` 重新生成计划。
|
|
154
|
+
|
|
155
|
+
### Workflow 切换门禁
|
|
156
|
+
|
|
157
|
+
只有以下情况允许考虑切换 workflow:
|
|
158
|
+
|
|
159
|
+
1. 用户明确说不再做主题资料收集,改为整理整个目录结构或生成盘点方案。
|
|
160
|
+
2. 当前 workflow 明确无法覆盖用户的新目标。
|
|
161
|
+
3. 用户要求的是目录结构治理,而不是查找主题相关资料并移动。
|
|
162
|
+
|
|
163
|
+
即使满足以上条件,也不得自动切换;必须先向用户说明原因并等待确认。
|
|
164
|
+
|
|
165
|
+
## 渐进加载关系
|
|
166
|
+
|
|
167
|
+
| 状态 | 必读文档 |
|
|
168
|
+
|-------|---------------|
|
|
169
|
+
| `PARSE_INPUT` / `RESOLVE_TARGET` / `CONFIRM_CONTEXT` | [`lark-drive-workflow-topic-move-collector-setup.md`](lark-drive-workflow-topic-move-collector-setup.md) |
|
|
170
|
+
| `SEARCH_RECALL` / `RECALL_ENHANCE` | [`lark-drive-workflow-topic-move-collector-recall.md`](lark-drive-workflow-topic-move-collector-recall.md) |
|
|
171
|
+
| `RESOURCE_RESOLVE` / `CONTENT_VERIFY` | [`lark-drive-workflow-topic-move-collector-resolve-verify.md`](lark-drive-workflow-topic-move-collector-resolve-verify.md) |
|
|
172
|
+
| `RELEVANCE_CLASSIFY` / `PLAN_MOVE` | [`lark-drive-workflow-topic-move-collector-review-plan.md`](lark-drive-workflow-topic-move-collector-review-plan.md) |
|
|
173
|
+
| `CONFIRM_EXECUTION` / `EXECUTE` / `VERIFY` / `RESTORE` | [`lark-drive-workflow-topic-move-collector-execute.md`](lark-drive-workflow-topic-move-collector-execute.md) |
|
|
174
|
+
|
|
175
|
+
## 命令映射
|
|
176
|
+
|
|
177
|
+
| 状态 | 允许的命令族 | 用途 |
|
|
178
|
+
|-------|--------------------------|---------|
|
|
179
|
+
| `RESOLVE_TARGET` | `drive +inspect`、`wiki +node-get`、`wiki +space-list`、仅用于查找文件夹候选的 `drive +search` | 解析目标位置 |
|
|
180
|
+
| `SEARCH_RECALL` / `RECALL_ENHANCE` | `drive +search` | 搜索召回和覆盖增强 |
|
|
181
|
+
| `RESOURCE_RESOLVE` | `drive +inspect`、`wiki +node-get`、`drive metas batch_query`、必要时 `drive permission.members auth` | 解析标准 token、owner、权限信号和移动资格 |
|
|
182
|
+
| `CONTENT_VERIFY` | `docs +fetch`、`sheets +read`、`sheets +find`、必要时 `drive +preview` | 验证内容证据 |
|
|
183
|
+
| `EXECUTE` | `drive +create-folder`、`wiki +node-create`、`drive +move`、`wiki +move`、`wiki +move-to-drive`、`drive +task_result` | 执行已确认写操作 |
|
|
184
|
+
| `VERIFY` | `drive files list`、`wiki +node-list`、`wiki +node-get`、`drive +inspect`、`drive +task_result` | 验证执行结果 |
|
|
185
|
+
| `RESTORE` | `drive +move`、`wiki +move`、`drive +delete`、`wiki +node-delete`、`drive +task_result` | 恢复已确认资源并清理本次新建目标 |
|
|
186
|
+
|
|
187
|
+
## 引用文档
|
|
188
|
+
|
|
189
|
+
- [输入与目标确认](lark-drive-workflow-topic-move-collector-setup.md)
|
|
190
|
+
- [召回](lark-drive-workflow-topic-move-collector-recall.md)
|
|
191
|
+
- [资源解析与内容验证](lark-drive-workflow-topic-move-collector-resolve-verify.md)
|
|
192
|
+
- [审核与计划](lark-drive-workflow-topic-move-collector-review-plan.md)
|
|
193
|
+
- [执行](lark-drive-workflow-topic-move-collector-execute.md)
|
|
194
|
+
- [lark-drive-search](lark-drive-search.md)
|
|
195
|
+
- [lark-drive-inspect](lark-drive-inspect.md)
|
|
196
|
+
- [lark-drive-move](lark-drive-move.md)
|
|
197
|
+
- [lark-drive-create-folder](lark-drive-create-folder.md)
|
|
198
|
+
- [lark-drive-delete](lark-drive-delete.md)
|
|
199
|
+
- [lark-wiki-move](../../lark-wiki/references/lark-wiki-move.md)
|
|
200
|
+
- [lark-wiki-move-to-drive](../../lark-wiki/references/lark-wiki-move-to-drive.md)
|
|
201
|
+
- [lark-wiki-node-create](../../lark-wiki/references/lark-wiki-node-create.md)
|
|
202
|
+
- [lark-wiki-node-delete](../../lark-wiki/references/lark-wiki-node-delete.md)
|
|
@@ -97,7 +97,7 @@ Structure Level:
|
|
|
97
97
|
2. Entry file 超过约 300 行时,优先拆 `commands`、`outputs` 或 `artifacts` reference。
|
|
98
98
|
3. 只有执行、验证、恢复或 rollback 状态链复杂到影响可读性时,才升级到 `S3` phase files。
|
|
99
99
|
4. 垂直业务包优先作为已有 workflow 的 recipe / policy / template,不默认新增独立 workflow。
|
|
100
|
-
5. 已有样板:`permission_governance` 是 `R2/S2
|
|
100
|
+
5. 已有样板:`permission_governance` 是 `R2/S2`;`knowledge_organize` 和 `topic_move_collector` 是 `R2-R3/S3`。
|
|
101
101
|
|
|
102
102
|
## 加载与拆分边界
|
|
103
103
|
|
|
@@ -108,9 +108,11 @@ Structure Level:
|
|
|
108
108
|
|
|
109
109
|
## Workflow Registry
|
|
110
110
|
|
|
111
|
-
| Workflow | Status | Risk | Structure | Entry File | Trigger
|
|
112
|
-
|
|
111
|
+
| Workflow | Status | Risk | Structure | Entry File | Trigger |
|
|
112
|
+
|----------|--------|------|-----------|------------|-----------------------------------------------------------------|
|
|
113
113
|
| `permission_governance` | Registered | `R2` | `S2` | [`lark-drive-workflow-permission-governance.md`](lark-drive-workflow-permission-governance.md) | 权限审计、公开链接/外部访问、复制/下载/评论/分享设置、权限申请、owner 转移 / 批量 owner 转移、密级标签调整 |
|
|
114
|
+
| `knowledge_organize` | Registered | `R2-R3` | `S3` | [`lark-drive-workflow-knowledge-organize.md`](lark-drive-workflow-knowledge-organize.md) | 整理云盘 / 文件夹 / 文档库 / 知识库、盘点目录结构、归类资源、生成整理方案,并在用户确认后创建目录或移动资源 |
|
|
115
|
+
| `topic_move_collector` | Registered | `R2-R3` | `S3` | [`lark-drive-workflow-topic-move-collector.md`](lark-drive-workflow-topic-move-collector.md) | 按主题、关键词或内容线索跨容器搜索资料,验证相关性和移动资格,并在用户确认后归档到 Drive 文件夹或 Wiki 节点 |
|
|
114
116
|
|
|
115
117
|
## Workflow Loading
|
|
116
118
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lark-event
|
|
3
3
|
version: 1.0.0
|
|
4
|
-
description: "Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via `lark-cli event consume <EventKey>` (covers IM messages/reactions/chat changes, Task updates, VC meeting started/joined/ended, Minutes generated, Whiteboard updated, etc.). Use for Lark bots, real-time message processing, long-running subscribers, streaming webhook/push handlers. Supports `--max-events` / `--timeout` bounded runs and a stderr ready-marker contract — designed for AI agents running as subprocesses."
|
|
4
|
+
description: "Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via `lark-cli event consume <EventKey>` (covers IM messages/reactions/chat changes, Approval status changes, Task updates, VC meeting started/joined/ended, Minutes generated, Whiteboard updated, etc.). Use for Lark bots, real-time message processing, long-running subscribers, streaming webhook/push handlers. Supports `--max-events` / `--timeout` bounded runs and a stderr ready-marker contract — designed for AI agents running as subprocesses."
|
|
5
5
|
metadata:
|
|
6
6
|
requires:
|
|
7
7
|
bins: ["lark-cli"]
|
|
@@ -147,6 +147,8 @@ Lark-defined semantic tags (**not** JSON Schema's standard `format`). Common val
|
|
|
147
147
|
|
|
148
148
|
| Topic | Reference | Coverage |
|
|
149
149
|
|------------|------------------------------------------------------------------------------|---|
|
|
150
|
+
| Application | [`references/lark-event-application.md`](references/lark-event-application.md) | Catalog of Application EventKeys, including `application.bot.menu_v6` for custom bot menu push events + flattened `event_key` / operator fields + jq recipe |
|
|
151
|
+
| Approval | [`references/lark-event-approval.md`](references/lark-event-approval.md) | Catalog of 2 Approval EventKeys (`approval.instance.status_changed_v4`, `approval.task.status_changed_v4`) + optional/multi `subscription_type` pre-registration + user-auth subscription lifecycle + flat output field reference |
|
|
150
152
|
| IM | [`references/lark-event-im.md`](references/lark-event-im.md) | Catalog of 12 IM EventKeys + shape notes (flat vs V2 envelope) + `im.message.receive_v1` field gotchas (`sender_id` is open_id only; `.content` is plain text except for `interactive` cards) + common jq recipes (filter by chat_type / message_type / sender); for `card.action.trigger` see also [`../lark-im/references/lark-im-card-action-reply.md`](../lark-im/references/lark-im-card-action-reply.md) |
|
|
151
153
|
| Task | [`references/lark-event-task.md`](references/lark-event-task.md) | Catalog of 1 Task EventKey (`task.task.update_user_access_v2`) + Native V2 envelope shape + task commit types + user/bot subscription notes |
|
|
152
154
|
| VC | [`references/lark-event-vc.md`](references/lark-event-vc.md) | Catalog of 4 VC EventKeys (`vc.meeting.participant_meeting_started_v1`, `vc.meeting.participant_meeting_joined_v1`, `vc.meeting.participant_meeting_ended_v1`, `vc.note.generated_v1`) + field reference + source type semantics (meeting only) |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Lark Application Events
|
|
2
|
+
|
|
3
|
+
This page covers Application-domain EventKeys supported by `lark-cli event`.
|
|
4
|
+
|
|
5
|
+
## `application.bot.menu_v6`
|
|
6
|
+
|
|
7
|
+
Triggered when a user clicks a custom bot menu item whose response action is configured as a push event.
|
|
8
|
+
|
|
9
|
+
Listen as the bot identity:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
lark-cli event consume application.bot.menu_v6 --as bot
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Filter a specific menu event key:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
lark-cli event consume application.bot.menu_v6 --as bot --jq 'select(.event_key == "start_eval")'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Output is flattened at the top level:
|
|
22
|
+
|
|
23
|
+
| Field | Meaning |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `type` | Event type, always `application.bot.menu_v6` |
|
|
26
|
+
| `event_id` | Globally unique event ID from the event header |
|
|
27
|
+
| `timestamp` | Event delivery time, preferring `header.create_time` |
|
|
28
|
+
| `app_id` | App ID from the event header |
|
|
29
|
+
| `tenant_key` | Tenant key from the event header |
|
|
30
|
+
| `event_key` | Developer-defined menu event key, for example `start_eval` |
|
|
31
|
+
| `menu_timestamp` | Menu click timestamp from the event body |
|
|
32
|
+
| `operator_id` | Operator open_id alias |
|
|
33
|
+
| `operator_open_id` | Operator open_id |
|
|
34
|
+
| `operator_union_id` | Operator union_id |
|
|
35
|
+
| `operator_user_id` | Operator user_id |
|
|
36
|
+
| `operator_name` | Operator display name |
|
|
37
|
+
|
|
38
|
+
This EventKey has no `--param`; use `--jq` to filter by `event_key` or operator fields.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Approval Events
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../SKILL.md`](../SKILL.md) first for the `event consume` essentials (commands, subprocess contract, jq usage).
|
|
4
|
+
|
|
5
|
+
## Key catalog (2)
|
|
6
|
+
|
|
7
|
+
| EventKey | Purpose |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `approval.instance.status_changed_v4` | An approval instance status changed |
|
|
10
|
+
| `approval.task.status_changed_v4` | An approval task status changed |
|
|
11
|
+
|
|
12
|
+
Both keys use a **Custom schema**. The raw Lark schema 2.0 envelope is flattened: event metadata is exposed as `type`, `event_id`, and `timestamp`, while approval business fields are exposed at the top level.
|
|
13
|
+
|
|
14
|
+
Both keys carry a **PreConsume hook** that subscribes the current authorized user through the Approval subscription APIs before listening. The consumer intentionally does **not** unsubscribe on exit; the server-side Approval subscription relation remains until it is canceled outside `event consume`. These keys require `--as user`.
|
|
15
|
+
|
|
16
|
+
## Listener and subscription selection
|
|
17
|
+
|
|
18
|
+
At the raw CLI level, each `event consume` process accepts exactly one EventKey. `approval.instance.status_changed_v4` and `approval.task.status_changed_v4` have different output shapes, so listening to both still means two processes.
|
|
19
|
+
|
|
20
|
+
For Approval only, `subscription_type` is an optional setup param used by PreConsume to register server-side Approval subscription relations before the local listener starts. It is **not** an output field, a local event filter, or a local subscription identity. The pushed event does not say which subscription relation caused delivery, and one business event can match both relations; deduplicate with `event_id` when needed.
|
|
21
|
+
|
|
22
|
+
`subscription_type` may be omitted, a single value, a comma-separated list, or a JSON string array:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Omitted: register both INVOLVED_APPROVAL and MANAGED_APPROVAL for this EventKey
|
|
26
|
+
lark-cli event consume approval.instance.status_changed_v4 --as user
|
|
27
|
+
|
|
28
|
+
# Single relation
|
|
29
|
+
lark-cli event consume approval.instance.status_changed_v4 \
|
|
30
|
+
-p subscription_type=INVOLVED_APPROVAL \
|
|
31
|
+
--as user
|
|
32
|
+
|
|
33
|
+
# Explicit multi-relation registration for one local consumer
|
|
34
|
+
lark-cli event consume approval.task.status_changed_v4 \
|
|
35
|
+
-p subscription_type=INVOLVED_APPROVAL,MANAGED_APPROVAL \
|
|
36
|
+
--as user
|
|
37
|
+
|
|
38
|
+
# JSON array form; quote it for the shell
|
|
39
|
+
lark-cli event consume approval.task.status_changed_v4 \
|
|
40
|
+
-p 'subscription_type=["INVOLVED_APPROVAL","MANAGED_APPROVAL"]' \
|
|
41
|
+
--as user
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
| Value | Meaning |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `INVOLVED_APPROVAL` | Receive events where the current user is the approval requester or approver |
|
|
47
|
+
| `MANAGED_APPROVAL` | Receive events under approval definitions managed by the current user |
|
|
48
|
+
|
|
49
|
+
User-intent inference:
|
|
50
|
+
|
|
51
|
+
| User intent | EventKey(s) | `subscription_type` |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| Mentions approval instances, approval forms, approval order/status, or "instance status" | `approval.instance.status_changed_v4` | infer from relation words below |
|
|
54
|
+
| Mentions approval tasks, approval todo items, approver operations, or "task status" | `approval.task.status_changed_v4` | infer from relation words below |
|
|
55
|
+
| Says "approval status changes/events" without saying task vs instance | both EventKeys | infer from relation words below |
|
|
56
|
+
| Says "my approvals", "approvals involving me", "I requested/approved", "待我审批", "我发起/我参与" | requested EventKey(s) | `INVOLVED_APPROVAL` |
|
|
57
|
+
| Says "approvals I manage", "managed definitions", "definitions managed by me", "我管理的审批定义" | requested EventKey(s) | `MANAGED_APPROVAL` |
|
|
58
|
+
| Explicitly asks for both involved and managed, or says "all approval subscriptions" | requested EventKey(s), or both if EventKey is also ambiguous | omit `subscription_type`, or pass both values in one `-p` |
|
|
59
|
+
| Relation is ambiguous and the user wants broad coverage | requested EventKey(s), or both if EventKey is also ambiguous | omit `subscription_type` so PreConsume registers both |
|
|
60
|
+
|
|
61
|
+
If the user's wording omits the relation and broad listening is acceptable, omit `subscription_type`. Ask only when registering both relations would be materially harmful.
|
|
62
|
+
|
|
63
|
+
## Scopes & auth
|
|
64
|
+
|
|
65
|
+
| EventKey | Scope | Auth |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| `approval.instance.status_changed_v4` | `approval:instance:read` | user |
|
|
68
|
+
| `approval.task.status_changed_v4` | `approval:task:read` | user |
|
|
69
|
+
|
|
70
|
+
## Subscription behavior
|
|
71
|
+
|
|
72
|
+
Startup calls the endpoint for the selected EventKey:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
POST /open-apis/approval/v4/instances/subscription
|
|
76
|
+
POST /open-apis/approval/v4/tasks/subscription
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
For each resolved `subscription_type`, PreConsume sends one request body:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{"subscription_type":"INVOLVED_APPROVAL"}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
If `subscription_type` is omitted, PreConsume sends two registration requests for that EventKey: one with `INVOLVED_APPROVAL`, then one with `MANAGED_APPROVAL`. If listening to both instance and task events, run two consumers; each consumer may omit `subscription_type` to register both relations for its own EventKey.
|
|
86
|
+
|
|
87
|
+
Do not start two consumers for the same Approval EventKey merely to split `INVOLVED_APPROVAL` and `MANAGED_APPROVAL`. The server push and flattened output are keyed by EventKey and cannot be distinguished by subscription relation.
|
|
88
|
+
|
|
89
|
+
Shutdown behavior:
|
|
90
|
+
|
|
91
|
+
`event consume` does not call the Approval unsubscribe APIs when it exits. This applies to graceful exit, Ctrl+C / SIGTERM, stdin EOF, `--timeout`, and `--max-events`.
|
|
92
|
+
|
|
93
|
+
To stop future delivery for a user, cancel the Approval subscription relation outside this consumer. The unsubscribe APIs are separate operations and are not called by `event consume`.
|
|
94
|
+
|
|
95
|
+
## Output fields
|
|
96
|
+
|
|
97
|
+
Common fields:
|
|
98
|
+
|
|
99
|
+
| Field | Type | Description |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| `type` | string | Event type |
|
|
102
|
+
| `event_id` | string | Globally unique event ID; use for deduplication |
|
|
103
|
+
| `timestamp` | string (timestamp_ms) | Event delivery time in milliseconds, taken from `header.create_time` |
|
|
104
|
+
|
|
105
|
+
Instance event fields:
|
|
106
|
+
|
|
107
|
+
| Field | Type | Description |
|
|
108
|
+
|---|---|---|
|
|
109
|
+
| `approval_code` | string | Approval definition code; not a subscription dimension |
|
|
110
|
+
| `instance_code` | string | Approval instance code |
|
|
111
|
+
| `external_id` | string | Third-party approval instance id, when present |
|
|
112
|
+
| `status` | string enum | `PENDING`, `APPROVED`, `REJECTED`, `CANCELED`, `DELETED`, `REVERTED`, `OVERTIME_CLOSE`, `OVERTIME_RECOVER` |
|
|
113
|
+
| `operate_time` | string (timestamp_ms) | Status change time |
|
|
114
|
+
| `start_user` | object | Instance starter user IDs, omitted when unavailable |
|
|
115
|
+
| `start_user.open_id` | string (open_id) | Instance starter open_id, when present |
|
|
116
|
+
| `start_user.union_id` | string (union_id) | Instance starter union_id, when present |
|
|
117
|
+
| `start_user.user_id` | string (user_id) | Instance starter tenant user_id, when present |
|
|
118
|
+
|
|
119
|
+
Task event fields:
|
|
120
|
+
|
|
121
|
+
| Field | Type | Description |
|
|
122
|
+
|---|---|---|
|
|
123
|
+
| `approval_code` | string | Approval definition code; not a subscription dimension |
|
|
124
|
+
| `instance_code` | string | Approval instance code |
|
|
125
|
+
| `task_id` | string | Approval task id |
|
|
126
|
+
| `external_id` | string | Third-party approval external id, when present |
|
|
127
|
+
| `task_external_id` | string | Third-party task external id, when emitted |
|
|
128
|
+
| `assigned_user` | object | Task assignee or operator user IDs, omitted for automatic flows without an operator |
|
|
129
|
+
| `assigned_user.open_id` | string (open_id) | Task assignee or operator open_id, when present |
|
|
130
|
+
| `assigned_user.union_id` | string (union_id) | Task assignee or operator union_id, when present |
|
|
131
|
+
| `assigned_user.user_id` | string (user_id) | Task assignee or operator tenant user_id, when present |
|
|
132
|
+
| `status` | string enum | `REVERTED`, `PENDING`, `APPROVED`, `REJECTED`, `TRANSFERRED`, `ROLLBACK`, `DONE`, `OVERTIME_CLOSE`, `OVERTIME_RECOVER` |
|
|
133
|
+
| `operate_time` | string (timestamp_ms) | Status change time |
|
|
134
|
+
|
|
135
|
+
## Examples
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Stream approval instance updates broadly; registers both involved and managed relations
|
|
139
|
+
lark-cli event consume approval.instance.status_changed_v4 \
|
|
140
|
+
--as user
|
|
141
|
+
|
|
142
|
+
# Stream approval instance updates only for approvals involving the current user
|
|
143
|
+
lark-cli event consume approval.instance.status_changed_v4 \
|
|
144
|
+
-p subscription_type=INVOLVED_APPROVAL \
|
|
145
|
+
--as user
|
|
146
|
+
|
|
147
|
+
# Stream approval task updates for definitions managed by the current user
|
|
148
|
+
lark-cli event consume approval.task.status_changed_v4 \
|
|
149
|
+
-p subscription_type=MANAGED_APPROVAL \
|
|
150
|
+
--as user
|
|
151
|
+
|
|
152
|
+
# Broad approval status listening:
|
|
153
|
+
# run both EventKeys as separate processes; omit subscription_type so each registers both relations.
|
|
154
|
+
lark-cli event consume approval.instance.status_changed_v4 \
|
|
155
|
+
--as user > approval-instance.ndjson &
|
|
156
|
+
lark-cli event consume approval.task.status_changed_v4 \
|
|
157
|
+
--as user > approval-task.ndjson &
|
|
158
|
+
wait
|
|
159
|
+
|
|
160
|
+
# Listen to both involved and managed task subscriptions with one local consumer.
|
|
161
|
+
lark-cli event consume approval.task.status_changed_v4 \
|
|
162
|
+
-p subscription_type=INVOLVED_APPROVAL,MANAGED_APPROVAL \
|
|
163
|
+
--as user > approval-task.ndjson
|
|
164
|
+
|
|
165
|
+
# Project a compact approval-task record
|
|
166
|
+
lark-cli event consume approval.task.status_changed_v4 \
|
|
167
|
+
-p subscription_type=INVOLVED_APPROVAL \
|
|
168
|
+
--as user \
|
|
169
|
+
--jq '{event_id, task_id, status, at: .operate_time}'
|
|
170
|
+
```
|
package/skills/lark-im/SKILL.md
CHANGED
|
@@ -41,13 +41,14 @@ Chat (oc_xxx)
|
|
|
41
41
|
- `--as bot` means **bot identity** and uses `tenant_access_token`. Calls run as the app bot, so behavior depends on the bot's membership, app visibility, availability range, and bot-specific scopes.
|
|
42
42
|
- If an IM API says it supports both `user` and `bot`, the token type changes who the operator is. The same API can succeed with one identity and fail with the other because owner/admin status, chat membership, tenant boundary, or app availability are checked against the current caller.
|
|
43
43
|
|
|
44
|
-
### Sender Name Resolution
|
|
44
|
+
### Sender Name Resolution
|
|
45
45
|
|
|
46
|
-
When
|
|
46
|
+
When fetching messages (`+chat-messages-list`, `+threads-messages-list`, `+messages-mget`, `+messages-search`), the CLI shows a display name for both user and bot senders:
|
|
47
47
|
|
|
48
|
-
**
|
|
48
|
+
- **Server-provided name**: the read APIs return `sender_name` (plus the full-i18n `sender_i18n_names` map) on each message `sender`; the CLI surfaces it as the sender's `name` for users and bots alike. No name lookup and no extra permission are needed — **no contact scope** and no `application:bot.basic_info:read`.
|
|
49
|
+
- **Fallback to id**: when the server does not provide a name, the sender is shown by its id and the command still exits 0. There is no contact-directory fallback.
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
The raw `sender_name` is not duplicated in output (its value is in `name`); the full `sender_i18n_names` map (all locales) is preserved for consumers that need a specific language, alongside an optional `open_bot_id` (`ou_`) for bot senders aligned with the message-receive event channel. System messages (`msg_type: system`) have no sender name — that is normal, not an error.
|
|
51
52
|
|
|
52
53
|
### Default message enrichment (reactions / update_time)
|
|
53
54
|
|
|
@@ -116,7 +117,7 @@ Shortcut 是对常用操作的高级封装(`lark-cli im +<verb> [flags]`)。
|
|
|
116
117
|
| [`+threads-messages-list`](references/lark-im-threads-messages-list.md) | List messages in a thread; user/bot; accepts om_/omt_ input, resolves message IDs to thread_id, supports sort/pagination |
|
|
117
118
|
| [`+flag-create`](references/lark-im-flag-create.md) | Create a bookmark on a message; user-only; defaults to message-layer flag; use --flag-type feed for feed-layer flag (item_type auto-detected from chat mode) |
|
|
118
119
|
| [`+flag-cancel`](references/lark-im-flag-cancel.md) | Cancel (remove) a bookmark. When no --flag-type is given, best-effort double-cancel: removes message layer and (when chat_type is determinable) feed layer |
|
|
119
|
-
| [`+flag-list`](references/lark-im-flag-list.md) | List bookmarks; user-only; auto-enriches feed-type thread entries with message content;
|
|
120
|
+
| [`+flag-list`](references/lark-im-flag-list.md) | List bookmarks; user-only; auto-enriches feed-type thread entries with message content; `--page-all` is capped by `--page-limit` (default 20, max 1000), and `has_more=true` means the result is incomplete |
|
|
120
121
|
| [`+feed-shortcut-create`](references/lark-im-feed-shortcut-create.md) | Add chats to the user's feed shortcuts; user-only; oc_xxx chat IDs only; batch up to 10 per call; `--head`/`--tail` controls insertion order; partial failures return an `ok:false` ledger |
|
|
121
122
|
| [`+feed-shortcut-remove`](references/lark-im-feed-shortcut-remove.md) | Remove chats from the user's feed shortcuts; user-only; batch up to 10 per call; removing an absent shortcut is idempotent success; real per-item failures return an `ok:false` ledger |
|
|
122
123
|
| [`+feed-shortcut-list`](references/lark-im-feed-shortcut-list.md) | List one page of the user's feed shortcuts; user-only; omit `--page-token` for the first page; default output enriches CHAT entries under `detail`; pass `--no-detail` to skip the extra lookup and `im:chat:read` scope |
|
|
@@ -29,7 +29,7 @@ Card 2.0 组件按**容器 / 展示 / 交互**三类,均通过 `tag` 字段声
|
|
|
29
29
|
"title": { "tag": "plain_text", "content": "卡片标题" },
|
|
30
30
|
"subtitle": { "tag": "plain_text", "content": "副标题:一句上下文(时间/来源/状态)" },
|
|
31
31
|
"template": "blue",
|
|
32
|
-
"icon": { "tag": "standard_icon", "token": "
|
|
32
|
+
"icon": { "tag": "standard_icon", "token": "lark-logo_colorful" },
|
|
33
33
|
"text_tag_list": [
|
|
34
34
|
{ "tag": "text_tag", "text": { "tag": "plain_text", "content": "状态标签" }, "color": "blue" }
|
|
35
35
|
]
|
|
@@ -105,12 +105,12 @@
|
|
|
105
105
|
"header": {
|
|
106
106
|
"title": { "tag": "plain_text", "content": "卡片标题" },
|
|
107
107
|
"template": "blue",
|
|
108
|
-
"icon": { "tag": "standard_icon", "token": "
|
|
108
|
+
"icon": { "tag": "standard_icon", "token": "calendar_colorful" }
|
|
109
109
|
}
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
- `token`
|
|
113
|
-
-
|
|
112
|
+
- `token` 必须从 `resource/icons.md` 的精确枚举中选择;禁止根据名称规律自行拼接 token。没有合适的 token 时省略 icon。
|
|
113
|
+
- 场景速查:日历 `calendar_colorful`、待办 `todo_colorful`、投票 `vote_colorful`、妙记 `file-lark-minutes_colorful`、多维表格 `wiki-bitable_colorful`、表单 `file-form_colorful`、社区 `larkcommunity_colorful`、招聘 `hirelogo_colorful`、飞书品牌 `lark-logo_colorful`、Meego `meego_colorful`、AI `myai_colorful`、aPaaS `apaas_colorful`、审批 `approval_colorful`、通用 AI `ai-common_colorful`。
|
|
114
114
|
|
|
115
115
|
### 1. 配色纪律(服务 P6 语义一致)
|
|
116
116
|
|
|
@@ -212,7 +212,7 @@ header 有三层能力,**尽量用满**(至少用 `title` + `icon`;`subtit
|
|
|
212
212
|
"title": { "tag": "plain_text", "content": "发版审批" },
|
|
213
213
|
"subtitle": { "tag": "plain_text", "content": "2026-06-25 · 后端服务" },
|
|
214
214
|
"template": "blue",
|
|
215
|
-
"icon": { "tag": "standard_icon", "token": "
|
|
215
|
+
"icon": { "tag": "standard_icon", "token": "approval_colorful" },
|
|
216
216
|
"text_tag_list": [
|
|
217
217
|
{ "tag": "text_tag", "text": { "tag": "plain_text", "content": "待审批" }, "color": "yellow" }
|
|
218
218
|
]
|
|
@@ -34,5 +34,19 @@
|
|
|
34
34
|
| 通知/铃铛 | `bell_outlined` | 定位 | `pin_outlined` |
|
|
35
35
|
| 附件 | `attachment_outlined` | 审批 | `approval_outlined` |
|
|
36
36
|
|
|
37
|
+
## 彩色图标(精确 token)
|
|
38
|
+
|
|
39
|
+
彩色图标必须从下表按**完整字符串**选择,禁止根据名称规律自行拼接。彩色 token 自带颜色,不要再推导其他后缀或变体。
|
|
40
|
+
|
|
41
|
+
| 含义 | token | 含义 | token |
|
|
42
|
+
|---|---|---|---|
|
|
43
|
+
| 日历 | `calendar_colorful` | 待办 | `todo_colorful` |
|
|
44
|
+
| 投票 | `vote_colorful` | 飞书妙记 | `file-lark-minutes_colorful` |
|
|
45
|
+
| 多维表格 | `wiki-bitable_colorful` | 表单 | `file-form_colorful` |
|
|
46
|
+
| 飞书社区 | `larkcommunity_colorful` | 招聘 | `hirelogo_colorful` |
|
|
47
|
+
| 飞书品牌 | `lark-logo_colorful` | Meego | `meego_colorful` |
|
|
48
|
+
| AI | `myai_colorful` | aPaaS | `apaas_colorful` |
|
|
49
|
+
| 审批 | `approval_colorful` | 通用 AI | `ai-common_colorful` |
|
|
50
|
+
|
|
37
51
|
> token 必须与官方完全一致,否则图标不渲染。上表为常用项,全量(数百个,分系统/商务/沟通/用户/媒体/文档等类目)以官方图标库为准:
|
|
38
52
|
> https://open.larkoffice.com/document/feishu-cards/enumerations-for-icons
|
|
@@ -6,9 +6,9 @@ This skill maps to shortcut: `lark-cli im +flag-list`. Underlying API: `GET /ope
|
|
|
6
6
|
|
|
7
7
|
## Sorting Rules (Important)
|
|
8
8
|
|
|
9
|
-
The API returns data sorted by `update_time` in **ascending order**, meaning **oldest first, newest last**. When `has_more=true`,
|
|
9
|
+
The API returns data sorted by `update_time` in **ascending order**, meaning **oldest first, newest last**. When `has_more=true`, continue pagination until `has_more=false`; only then is the last item in the merged result authoritative as the newest flag. If pagination stops while `has_more=true`, the last item is only the newest observed flag.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
`--page-all` enables automatic pagination but is still capped by `--page-limit`. The default cap is 20 pages; **20 is not the hard maximum**. Set `--page-limit` between 1 and 1000 when a larger scan is required. A response with `has_more=true` is incomplete, even when `flag_items` is empty; increase the limit or resume from the returned `page_token` before reporting an authoritative latest item or count.
|
|
12
12
|
|
|
13
13
|
## Commands
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ lark-cli im +flag-list --as user
|
|
|
19
19
|
# Manual pagination with custom page size
|
|
20
20
|
lark-cli im +flag-list --as user --page-size 30 --page-token <page_token>
|
|
21
21
|
|
|
22
|
-
# Auto-paginate
|
|
22
|
+
# Auto-paginate, capped at the default 20 pages
|
|
23
23
|
lark-cli im +flag-list --as user --page-all
|
|
24
24
|
|
|
25
25
|
# Auto-paginate + get the latest flag
|
|
@@ -31,8 +31,8 @@ lark-cli im +flag-list --as user --page-all -q '.data.flag_items[].item_id'
|
|
|
31
31
|
# Disable auto-enrichment of message content (enabled by default)
|
|
32
32
|
lark-cli im +flag-list --as user --page-all --enrich-feed-thread=false
|
|
33
33
|
|
|
34
|
-
#
|
|
35
|
-
lark-cli im +flag-list --as user --page-all --page-limit
|
|
34
|
+
# Use the largest supported page limit for a broader scan
|
|
35
|
+
lark-cli im +flag-list --as user --page-all --page-limit 1000
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## Parameters
|
|
@@ -41,8 +41,8 @@ lark-cli im +flag-list --as user --page-all --page-limit 10
|
|
|
41
41
|
|------|------|------|
|
|
42
42
|
| `--page-size <n>` | 50 | Range 1-50 (server max is 50) |
|
|
43
43
|
| `--page-token <token>` | empty | Pagination token from previous page; empty string must still be provided |
|
|
44
|
-
| `--page-all` | false | Auto-paginate
|
|
45
|
-
| `--page-limit <n>` | 20 | Max pages in `--page-all` mode (
|
|
44
|
+
| `--page-all` | false | Auto-paginate and merge results, capped by `--page-limit` |
|
|
45
|
+
| `--page-limit <n>` | 20 | Max pages in `--page-all` mode; configurable range 1-1000 (20 is only the default) |
|
|
46
46
|
| `--enrich-feed-thread` | true | Auto-enrich feed-layer thread entries with message content (calls `im.messages.mget`) |
|
|
47
47
|
| `--as user` | Required | Currently only supports user identity |
|
|
48
48
|
|
|
@@ -62,6 +62,7 @@ Note: `(thread, feed)` / `(msg_thread, feed)` entries are automatically enriched
|
|
|
62
62
|
|
|
63
63
|
## Limitations
|
|
64
64
|
|
|
65
|
+
- **Auto-pagination is bounded**: `--page-all` fetches at most 20 pages by default. If the response still has `has_more=true`, the result is incomplete; increase `--page-limit` up to 1000 or resume with `page_token`. Never interpret `flag_items: []` as an authoritative zero while more pages remain. Historical `delete_flag_items` may occupy early pages and push active flags to later pages.
|
|
65
66
|
- **delete_flag_items are not enriched**: Message content is only fetched for active flags (`flag_items`), not canceled flags (`delete_flag_items`). If you need message content for a canceled flag, query the message separately using `+messages-mget --message-ids <item_id>`.
|
|
66
67
|
|
|
67
68
|
## Response Example (Sanitized)
|
|
@@ -188,7 +188,7 @@ lark-cli im +messages-reply --message-id om_xxx --msg-type interactive --content
|
|
|
188
188
|
| `--video-cover <path\|url\|key>` | **Required with `--video`** | Cwd-relative local cover image path, URL, or `image_key` (`img_xxx`) |
|
|
189
189
|
| `--audio <path\|url\|key>` | One content option | Voice-message audio key, URL, or cwd-relative local path. Local paths and URLs must be Opus (`.opus` or Ogg Opus `.ogg`) |
|
|
190
190
|
| `--reply-in-thread` | No | Reply inside the thread. The reply appears in the target message's thread instead of the main chat stream |
|
|
191
|
-
| `--idempotency-key <key>` | No | Idempotency key; the same key sends only one reply within 1 hour
|
|
191
|
+
| `--idempotency-key <key>` | No | Idempotency key, max 50 characters; the same key sends only one reply within 1 hour |
|
|
192
192
|
| `--as <identity>` | No | Identity type: `bot` or `user` (default `bot`) |
|
|
193
193
|
| `--dry-run` | No | Print the request only, do not execute it |
|
|
194
194
|
|
|
@@ -191,7 +191,7 @@ lark-cli im +messages-send --chat-id oc_xxx --msg-type interactive --content '<c
|
|
|
191
191
|
| `--video-cover <path\|url\|key>` | **Required with `--video`** | Cwd-relative local cover image path, URL, or `image_key` (`img_xxx`). Local paths and URLs are uploaded automatically |
|
|
192
192
|
| `--audio <path\|url\|key>` | One content option | Voice-message audio key, URL, or cwd-relative local path. Local paths and URLs must be Opus (`.opus` or Ogg Opus `.ogg`) |
|
|
193
193
|
| `--msg-type <type>` | No | Message type (default `text`). If you use `--text` / `--markdown` / media flags, the effective type is inferred automatically. Explicitly setting a conflicting `--msg-type` fails validation |
|
|
194
|
-
| `--idempotency-key <key>` | No | Idempotency key; the same key sends only one message within 1 hour
|
|
194
|
+
| `--idempotency-key <key>` | No | Idempotency key, max 50 characters; the same key sends only one message within 1 hour |
|
|
195
195
|
| `--as <identity>` | No | Identity type: `bot` or `user` (default `bot`) |
|
|
196
196
|
| `--dry-run` | No | Print the request only, do not execute it |
|
|
197
197
|
|