@amaster.ai/pi-lark 0.1.9 → 0.1.10

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.
Files changed (71) hide show
  1. package/README.md +1 -3
  2. package/package.json +2 -2
  3. package/skills/lark-apps/SKILL.md +1 -1
  4. package/skills/lark-apps/references/lark-apps-cache.md +38 -5
  5. package/skills/lark-base/SKILL.md +23 -6
  6. package/skills/lark-base/references/lark-base-app.md +18 -0
  7. package/skills/lark-base/references/lark-base-dashboard-block-config.md +28 -1
  8. package/skills/lark-base/references/lark-base-dashboard.md +29 -11
  9. package/skills/lark-base/references/lark-base-field-schema.md +10 -1
  10. package/skills/lark-base/references/lark-base-form-questions-create.md +36 -5
  11. package/skills/lark-base/references/lark-base-record-history-list.md +19 -2
  12. package/skills/lark-base/references/lark-base-template-center.md +195 -0
  13. package/skills/lark-calendar/SKILL.md +9 -6
  14. package/skills/lark-calendar/references/lark-calendar-transfer.md +89 -0
  15. package/skills/lark-doc/references/lark-doc-fetch.md +1 -1
  16. package/skills/lark-drive/references/lark-drive-add-comment.md +2 -2
  17. package/skills/lark-im/SKILL.md +8 -2
  18. package/skills/lark-im/references/lark-im-message-read-status.md +96 -0
  19. package/skills/lark-mail/references/lark-mail-draft-create.md +12 -12
  20. package/skills/lark-mail/references/lark-mail-forward.md +17 -17
  21. package/skills/lark-mail/references/lark-mail-reply-all.md +8 -8
  22. package/skills/lark-mail/references/lark-mail-reply.md +6 -6
  23. package/skills/lark-mail/references/lark-mail-send.md +20 -20
  24. package/skills/lark-mail/references/lark-mail-template-create.md +7 -6
  25. package/skills/lark-mail/references/lark-mail-template-update.md +7 -6
  26. package/skills/lark-meeting/SKILL.md +146 -0
  27. package/skills/{lark-minutes → lark-meeting}/references/lark-minutes-apply-permission.md +2 -5
  28. package/skills/lark-meeting/references/lark-minutes-detail.md +52 -0
  29. package/skills/{lark-minutes → lark-meeting}/references/lark-minutes-download.md +4 -6
  30. package/skills/{lark-minutes → lark-meeting}/references/lark-minutes-search.md +4 -34
  31. package/skills/{lark-minutes → lark-meeting}/references/lark-minutes-speaker-replace.md +3 -4
  32. package/skills/{lark-minutes → lark-meeting}/references/lark-minutes-summary.md +2 -5
  33. package/skills/{lark-minutes → lark-meeting}/references/lark-minutes-todo.md +5 -15
  34. package/skills/{lark-minutes → lark-meeting}/references/lark-minutes-update.md +2 -3
  35. package/skills/lark-meeting/references/lark-minutes-upload.md +65 -0
  36. package/skills/lark-meeting/references/lark-note-detail.md +15 -0
  37. package/skills/lark-meeting/references/lark-note-transcript.md +19 -0
  38. package/skills/{lark-vc-agent → lark-meeting}/references/lark-vc-agent-meeting-join.md +4 -55
  39. package/skills/{lark-vc-agent → lark-meeting}/references/lark-vc-agent-meeting-leave.md +2 -41
  40. package/skills/lark-meeting/references/lark-vc-detail.md +31 -0
  41. package/skills/{lark-vc → lark-meeting}/references/lark-vc-meeting-events.md +8 -98
  42. package/skills/{lark-vc → lark-meeting}/references/lark-vc-meeting-list-active.md +4 -29
  43. package/skills/{lark-vc → lark-meeting}/references/lark-vc-meeting-message-send.md +3 -5
  44. package/skills/{lark-vc → lark-meeting}/references/lark-vc-recording.md +4 -65
  45. package/skills/{lark-vc → lark-meeting}/references/lark-vc-search.md +9 -28
  46. package/skills/lark-meeting/scenes/create-and-edit-minutes.md +125 -0
  47. package/skills/lark-meeting/scenes/live-meeting-attend.md +107 -0
  48. package/skills/lark-meeting/scenes/live-meeting-interact.md +72 -0
  49. package/skills/lark-meeting/scenes/query-meeting-and-artifacts.md +90 -0
  50. package/skills/lark-meeting/scenes/query-minutes-and-artifacts.md +70 -0
  51. package/skills/lark-meeting/scenes/query-note-and-artifacts.md +127 -0
  52. package/skills/lark-minutes/SKILL.md +5 -203
  53. package/skills/lark-note/SKILL.md +5 -88
  54. package/skills/lark-shared/SKILL.md +25 -224
  55. package/skills/lark-shared/references/lark-shared-config-init.md +12 -0
  56. package/skills/lark-shared/references/lark-shared-high-risk-approval.md +38 -0
  57. package/skills/lark-shared/references/lark-shared-identity-and-permissions.md +105 -0
  58. package/skills/lark-shared/references/lark-shared-output-contract.md +17 -0
  59. package/skills/lark-shared/references/lark-shared-update-notice.md +23 -0
  60. package/skills/lark-slides/SKILL.md +2 -0
  61. package/skills/lark-slides/references/xml/slides_xml_schema_definition.xml +101 -14
  62. package/skills/lark-task/SKILL.md +1 -1
  63. package/skills/lark-vc/SKILL.md +5 -205
  64. package/skills/lark-vc-agent/SKILL.md +5 -206
  65. package/skills/lark-workflow-meeting-summary/SKILL.md +20 -13
  66. package/skills/lark-minutes/references/lark-minutes-detail.md +0 -63
  67. package/skills/lark-minutes/references/lark-minutes-upload.md +0 -104
  68. package/skills/lark-note/references/lark-note-detail.md +0 -29
  69. package/skills/lark-note/references/lark-note-transcript.md +0 -25
  70. package/skills/lark-vc/references/lark-vc-detail.md +0 -49
  71. package/skills/lark-vc/references/vc-domain-boundaries.md +0 -203
@@ -0,0 +1,195 @@
1
+ # Base 模板中心
2
+
3
+ 模板中心是一个**公开的 Base 模板库**。当用户想“用一个现成的模板快速搭一个多维表格”时,这套命令帮助 AI 找到最合适的模板,最终通过 `+base-copy` 复制成用户自己的新 Base。
4
+
5
+ 三个命令:
6
+
7
+ - `+template-categories`:列出所有模板分类,用于把用户意图对齐到某个类目。
8
+ - `+template-list`:列出某个分类下的模板(不传分类则返回“推荐”类目)。
9
+ - `+template-search`:按关键词搜索模板。
10
+
11
+ ## 何时使用模板中心
12
+
13
+ 满足以下特征时走模板中心:用户有**创建新 Base 的意图**,但**没有指向已有对象的锚点**(没有 Base URL、没有“我的/最近访问的表”、没有具体已存在的 Base 名)。
14
+
15
+ 典型触发:
16
+
17
+ - “帮我建一个 CRM 多维表格”
18
+ - “有没有适合项目管理的模板”
19
+ - “找个 OKR 跟进的 Base 模板照着做”
20
+
21
+ **不要**走模板中心的情况(即使用户嘴上说“模板”):
22
+
23
+ - 用户给了 Base/Wiki 链接或 token → 走 `+url-resolve`。
24
+ - 用户说“我之前那张表 / 我的模板 / 最近访问的” → 走 `+title-resolve` 或转 `lark-drive` 搜索。
25
+ - 用户要从零定义字段 schema,而不是套现成模板 → 走 `+base-create --table-name --fields`。
26
+
27
+ 模板中心是独立的公开数据集,**不能**用 `drive +search` 找到,`drive +search` 只搜用户自己可访问的云空间对象。
28
+
29
+ ## 推荐命令
30
+
31
+ ```bash
32
+ # 列出所有模板分类
33
+ lark-cli base +template-categories --as user
34
+
35
+ # 列出某个分类下的模板(不传 --category-key 则返回“推荐”类目)
36
+ lark-cli base +template-list --category-key template_center_tab_ai --limit 10 --as user
37
+
38
+ # 按关键词搜索模板
39
+ lark-cli base +template-search --keyword "项目管理" --limit 10 --as user
40
+
41
+ # 翻页:把上一页返回的 offset 原样传给 --offset
42
+ lark-cli base +template-search --keyword "AI" --limit 10 --offset <上一页返回的 offset> --as user
43
+
44
+ # 选定模板后,用模板 token 复制成用户自己的新 Base
45
+ lark-cli base +base-copy --base-token <模板 token> --name "<新 Base 名>" --as user
46
+ ```
47
+
48
+ ## 工作流
49
+
50
+ 模板中心有两条路径,按用户意图明确程度二选一,不要盲目全用。
51
+
52
+ ### 路径 A:分类浏览(意图偏宽泛时首选)
53
+
54
+ 用户只给了一个大方向(如“项目管理”“市场营销”),先按分类收敛,再在类目里挑模板。
55
+
56
+ 1. `+template-categories` 列出全部分类,拿到 `categories[].key` 和 `name`。
57
+ 2. AI 把用户意图匹配到最贴近的一个分类 `name`,取它的 `key`。
58
+ 3. `+template-list --category-key <key>` 列出该类目下的模板。
59
+ 4. 读每个模板的 `name` / `introduction` / `scenarios`,挑出最符合用户场景的那个,拿它的 `token`。
60
+ 5. 用 `+base-copy --base-token <token>` 基于模板复制出新 Base(见下文“基于模板创建”)。
61
+
62
+ ```bash
63
+ # 1. 看有哪些分类
64
+ lark-cli base +template-categories --as user
65
+
66
+ # 2~3. 匹配到“AI 应用”类目后,列出该类目模板
67
+ lark-cli base +template-list --category-key template_center_tab_ai --limit 10 --as user
68
+ ```
69
+
70
+ 匹配不到贴切分类,或用户意图本身就跨类目 / 很具体时,改走路径 B。
71
+
72
+ ### 路径 B:关键词搜索(意图有具体词时首选)
73
+
74
+ 用户给了明确、可检索的词(如“财务报销”“直播复盘”“AI 客服”),直接搜,不必先看分类。
75
+
76
+ 1. `+template-search --keyword "<词>"` 搜模板。
77
+ 2. 同样读 `name` / `introduction` / `scenarios` 选模板,拿 `token`。
78
+ 3. `+base-copy` 复制。
79
+
80
+ ```bash
81
+ lark-cli base +template-search --keyword "项目管理" --limit 10 --as user
82
+ ```
83
+
84
+ 关键词不能为空;空搜会被拒绝。用户只有“大方向”而没有具体检索词时,用路径 A 的分类浏览更稳。
85
+
86
+ ### 分类 vs 搜索怎么选
87
+
88
+ | 用户意图 | 走哪条 |
89
+ |---|---|
90
+ | 只有大类方向(“市场营销类的”“办公用的”) | 路径 A,先 `+template-categories` 收敛 |
91
+ | 有具体、可检索的业务词(“报销”“OKR”“直播”) | 路径 B,直接 `+template-search` |
92
+ | 大方向下没挑到合适的 | A 之后再用 B 换关键词补搜 |
93
+
94
+ ## 翻页
95
+
96
+ `+template-list` 和 `+template-search` 都是游标翻页:
97
+
98
+ - `--limit`:每页数量,默认 10,范围 1-100;`--page-size` 是等价别名。
99
+ - `--offset`:翻页游标,来自上一次响应的 `offset` 字段。**首次请求不要传**。
100
+ - 响应里 `has_more=true` 表示还有下一页,把响应的 `offset` 原样传给下一次 `--offset`。`has_more=false` 或 `offset` 为空字符串表示没有更多。
101
+
102
+ `--offset` 是服务端返回的不透明游标,不要解析它、不要自己拼造。
103
+
104
+ ```bash
105
+ lark-cli base +template-search --keyword "AI" --limit 10 --offset <上一页返回的 offset> --as user
106
+ ```
107
+
108
+ ## 数据结构
109
+
110
+ ### TemplateCategory(分类对象)
111
+
112
+ `+template-categories` 返回 `categories[]`,每个元素:
113
+
114
+ | 字段 | 类型 | 含义 |
115
+ |---|---|---|
116
+ | `key` | string | 分类唯一标识,形如 `template_center_tab_ai`(`template_center_tab_` 前缀 + 类目名)。传给 `+template-list --category-key` 用的就是它 |
117
+ | `name` | string | 分类展示名,如 `AI 应用` / `办公通用`。AI 匹配用户意图时看这个 |
118
+
119
+ ### Template(模板对象)
120
+
121
+ `+template-list` / `+template-search` 返回 `templates[]`,每个元素:
122
+
123
+ | 字段 | 类型 | 含义 |
124
+ |---|---|---|
125
+ | `token` | string | 模板的 Base token,是模板的唯一标识。基于模板创建时作为 `+base-copy --base-token` 的入参 |
126
+ | `name` | string | 模板名称,如 `工作汇报` |
127
+ | `introduction` | string | 模板介绍,说明模板用途、内容结构和适用方向。AI 判断模板是否契合用户需求主要看它 |
128
+ | `scenarios` | string[] | 适用场景列表,如 `["工作汇报","月报","项目进展"]`,用于快速判断场景匹配度 |
129
+ | `developer` | string | 模板开发者,如 `飞书` |
130
+ | `link` | string | 模板预览链接,可展示给用户,但复制模板用 `token` 而不是 `link` |
131
+ | `created_at` / `updated_at` | string | 创建 / 更新时间 |
132
+
133
+ 列表 / 搜索响应还带分页字段:
134
+
135
+ | 字段 | 类型 | 含义 |
136
+ |---|---|---|
137
+ | `has_more` | boolean | 是否还有下一页 |
138
+ | `offset` | string | 下一页游标;无更多时为空字符串 |
139
+
140
+ **约定**:模板的唯一标识就叫 `token`(模板 Base token),不要在输出或转述里改名成 `id` 或 `key`;`key` 是分类的标识(`category_key`)。
141
+
142
+ ### 模板列表/模版搜索-响应示例
143
+
144
+ ```json
145
+ {
146
+ "code": 0,
147
+ "data": {
148
+ "has_more": true,
149
+ "offset": "1",
150
+ "templates": [
151
+ {
152
+ "created_at": "2025-12-03T02:53:34Z",
153
+ "developer": "Base Team",
154
+ "introduction": "📊 品牌调研问卷 \n高效收集用户反馈,助力品牌优化决策 \n\n核心功能点 \n1 预设多维度调研问题模板 \n2 支持自定义问题类型与逻辑跳转 \n3 实时数据统计与可视化分析 \n\n适合场景 \n1 新品上市前市场需求调研 \n2 品牌形象与用户满意度评估 \n3 竞品对比与消费者偏好分析",
155
+ "link": "https://example.com/base/<template_token>",
156
+ "name": "品牌调研问卷",
157
+ "scenarios": ["运营管理", "市场营销"],
158
+ "token": "<template_token>",
159
+ "updated_at": "2026-06-22T08:18:58Z"
160
+ }
161
+ ]
162
+ },
163
+ "msg": ""
164
+ }
165
+ ```
166
+
167
+ 读取模板列表时重点看:
168
+
169
+ - `templates[].name`:模板名称;基于模板创建 Base 且用户没有指定新名称时,直接作为 `+base-copy --name`。
170
+ - `templates[].token`:模板 Base token;复制时传给 `+base-copy --base-token`。
171
+ - `templates[].link`:模板预览链接;可以展示给用户帮助确认,但复制时不要用 link 代替 token。
172
+ - `templates[].introduction` / `templates[].scenarios`:用于判断模板是否匹配用户业务场景。
173
+ - `data.offset`:下一页游标;只有 `has_more=true` 时才继续传给 `--offset`。
174
+
175
+ ## 基于模板创建 Base
176
+
177
+ 模板中心只负责“找到模板”,它本身不创建 Base。选定模板后,用模板的 `token` 复制出用户自己的新 Base:
178
+
179
+ ```bash
180
+ lark-cli base +base-copy --base-token <模板 token> --name "<新 Base 名>" --as user
181
+ ```
182
+
183
+ - `--name` 用用户想要的新 Base 名;不传则沿用模板名。
184
+ - 只有用户明确说“只要结构 / 不要内容”时,才加 `--without-content`。
185
+ - `+base-copy` 的返回和权限说明见 SKILL.md 中 `+base-copy` 的相关规则。
186
+
187
+ ## 注意事项
188
+
189
+ - 三个命令都是只读,默认 `--as user`,所需权限 `base:template:read`。
190
+ - 模板中心是公开数据集,不能用 `drive +search` 找到;用户要“我的/最近访问/已有 Base”不要走这里。
191
+ - 分类先于列表:`+template-list` 的 `--category-key` 必须来自 `+template-categories` 的返回,不要凭空猜类目 key。
192
+ - `+template-search` 不支持空关键词,会被拒绝;用户只有大方向、无具体检索词时改走分类浏览。
193
+ - 模板的唯一标识是 `token`(模板 Base token),不要改名成 `id` 或 `key`。
194
+ - `--offset` 是服务端返回的不透明游标,翻页时原样回传,不要解析或自行构造。
195
+ - 模板中心只查模板、不创建 Base;创建一律走 `+base-copy --base-token <token>`,不要用模板 token 去调 `+base-get` 之类的当前用户 Base 命令。
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: lark-calendar
3
3
  version: 1.0.0
4
- description: "飞书日历:管理日历日程和会议室。查看/搜索日程、创建/更新日程、管理参会人、查询忙闲和推荐时段、预定会议室。当用户需要查看日程安排、创建/修改会议、查询/预定会议室时使用。不负责:查询过去的视频会议记录(走 lark-vc)、待办任务(走 lark-task)。"
4
+ description: "飞书日历:管理日历日程和会议室。查看/搜索日程、创建/更新日程、管理参会人、查询忙闲和推荐时段、预定会议室。当用户需要查看日程安排、创建/修改会议、查询/预定会议室时使用。不负责:查询过去的视频会议记录(走 lark-meeting)、待办任务(走 lark-task)。"
5
5
  metadata:
6
6
  requires:
7
7
  bins: ["lark-cli"]
@@ -42,6 +42,7 @@ lark-cli calendar +agenda --as bot
42
42
  | [`+room-find`](references/lark-calendar-room-find.md) | 针对一个或多个**明确的**时间块查找可用会议室(无明确时间时禁止直接调用,需先走 +suggestion) |
43
43
  | [`+rsvp`](references/lark-calendar-rsvp.md) | 回复日程(接受/拒绝/待定) |
44
44
  | [`+suggestion`](references/lark-calendar-suggestion.md) | 根据非明确时间或一段时间范围,推荐多个可用时间块方案 |
45
+ | [`+transfer`](references/lark-calendar-transfer.md) | 把日程组织者转让给另一个用户或机器人;不可逆,需 `--yes` |
45
46
 
46
47
  ### `+get` — 单日程详情
47
48
 
@@ -127,14 +128,16 @@ lark-cli calendar +freebusy --start 2026-03-11 --end 2026-03-12 --user-id ou_xxx
127
128
 
128
129
  | 用户意图 | 路由到 |
129
130
  |----------|--------|
130
- | 查询过去的会议("昨天的会议""上周的会") | [`../lark-vc/SKILL.md`](../lark-vc/SKILL.md)(会议数据含即时会议,仅查日程会遗漏) |
131
+ | 查询过去的会议("昨天的会议""上周的会") | [`../lark-meeting/SKILL.md`](../lark-meeting/SKILL.md)(会议数据含即时会议,仅查日程会遗漏) |
132
+ | 今天有哪些会议| 需要合并两部分内容:[`../lark-meeting/SKILL.md`](../lark-meeting/SKILL.md) 中的 `vc +search` 查询今天已结束的会议, `calendar +agenda` 查询进行中或未开始的日程。|
131
133
  | 查询日历/日程或未来时间的会议 | 本 skill |
132
134
  | 按关键词搜索日程 | 本 skill(`+search-event`) |
133
135
  | 从日程获取关联的视频会议 ID 或用户绑定的会议纪要文档 | 本 skill(`+meeting`) |
134
- | 从日程进一步拿 AI 智能纪要 / 逐字稿 / 妙记产物 | 先 `+meeting` 取 `meeting_id`,再 [`vc +detail`](../lark-vc/references/lark-vc-detail.md) → [`note +detail`](../lark-note/references/lark-note-detail.md) / [`minutes +detail`](../lark-minutes/references/lark-minutes-detail.md) |
136
+ | 从日程进一步拿 AI 智能纪要 / 逐字稿 / 妙记产物 | 先 `+meeting` 取 `meeting_id`,再进入 [`lark-meeting`](../lark-meeting/SKILL.md):[`vc +detail`](../lark-meeting/references/lark-vc-detail.md) → [`note +detail`](../lark-meeting/references/lark-note-detail.md) / [`minutes +detail`](../lark-meeting/references/lark-minutes-detail.md) |
135
137
  | 预约/改约日程、调整时间、添加/更换会议室、查会议室 | 先判断新建 vs 编辑,再进入 [schedule-meeting 工作流](references/lark-calendar-schedule-meeting.md) |
136
138
  | 仅编辑日程字段(标题/描述)或增删参会人(不涉及时间和会议室) | 先定位 `event_id`,再读 [+update](references/lark-calendar-update.md) 执行变更 |
137
139
  | 编辑/删除重复性日程(「改这个重复日程」「删掉后面的」「全部取消」等) | 先读 [重复性日程操作规范](references/lark-calendar-recurring.md),确认操作范围后执行 |
140
+ | 转让日程组织者(「把这个日程交给 XX」「组织者改成 XX」「这个会转给我」「bot 建完还给我」) | 读 [+transfer](references/lark-calendar-transfer.md);`--as` 用**当前组织者**身份,`--to-user-id` 传接收人,用户和机器人任意互转 |
138
141
 
139
142
  ## 任务类型分流
140
143
 
@@ -165,8 +168,8 @@ lark-cli calendar <resource> <method> [flags]
165
168
  # 查询用户主日历
166
169
  lark-cli calendar calendars primary
167
170
 
168
- # 获取日程分享链接
169
- lark-cli calendar events share_info --calendar-id <calendar_id> --event-id <event_id>
171
+ # 获取日程详情及 app_link
172
+ lark-cli calendar events get --calendar-id <calendar_id> --event-id <event_id>
170
173
 
171
174
  # 删除日程
172
175
  lark-cli calendar events delete --calendar-id <calendar_id> --event-id <event_id>
@@ -196,7 +199,7 @@ lark-cli im +chat-search --query <query> --as user
196
199
 
197
200
  ## 不在本 skill 范围
198
201
 
199
- - 查询过去的视频会议记录 → [lark-vc](../lark-vc/SKILL.md)
202
+ - 查询过去的视频会议记录 → [lark-meeting](../lark-meeting/SKILL.md)
200
203
  - 待办任务管理 → [lark-task](../lark-task/SKILL.md)
201
204
  - 通讯录 → [lark-contact](../lark-contact/SKILL.md)
202
205
  - 即时通讯 → [lark-im](../lark-im/SKILL.md)
@@ -0,0 +1,89 @@
1
+ # calendar +transfer
2
+
3
+ 把一个日程的**组织者(organizer)**转让给另一个用户或机器人。用户和机器人之间可以任意互转。
4
+
5
+ ## 命令
6
+
7
+ ```bash
8
+ # 转让给某人(原组织者保留为参与人)
9
+ lark-cli calendar +transfer --event-id <event_id> --to-user-id ou_xxx --yes
10
+
11
+ # 转让并把原组织者从参与人中移除
12
+ lark-cli calendar +transfer --event-id <event_id> --to-user-id ou_xxx --remove-original-organizer --yes
13
+
14
+ # 指定日历
15
+ lark-cli calendar +transfer --calendar-id <calendar_id> --event-id <event_id> --to-user-id ou_xxx --yes
16
+
17
+ # 重复性日程:必须显式确认整个序列一起转让
18
+ lark-cli calendar +transfer --event-id <event_id> --to-user-id ou_xxx --transfer-series --yes
19
+
20
+ # 预览请求,不实际执行
21
+ lark-cli calendar +transfer --event-id <event_id> --to-user-id ou_xxx --dry-run
22
+ ```
23
+
24
+ ## 参数
25
+
26
+ | 参数 | 必填 | 说明 |
27
+ |------|------|------|
28
+ | `--event-id <id>` | **是** | 日程 ID(`uid_originalTime` 形式) |
29
+ | `--to-user-id <ou_...>` | **是** | 接收人 open_id,成为新组织者;用户和机器人都可以 |
30
+ | `--calendar-id <id>` | 否 | 日程所在日历 ID(省略则使用主日历) |
31
+ | `--remove-original-organizer` | 否 | 转让后把原组织者移出参与人;默认保留。日程在共享日历上时服务端一定会移除 |
32
+ | `--transfer-series` | 否 | 确认整个重复性序列一起转让;重复性日程必填 |
33
+ | `--yes` | **是**(非 dry-run) | 高敏写操作确认 |
34
+ | `--dry-run` | 否 | 预览 API 调用,不执行 |
35
+
36
+ ## 转让方向
37
+
38
+ 转出方和接收方是两个**互相独立**的参数,四种组合都支持:
39
+
40
+ - **转出方**由 `--as` 决定,必须是日程**当前组织者**的身份。bot 组织的日程用 `--as bot`,用户自己的日程用 `--as user`。用非组织者身份调用会返回 403。
41
+ - **接收方**由 `--to-user-id` 决定,传谁的 open_id 就转给谁,是人还是机器人不影响命令写法。
42
+
43
+ | 方向 | 命令 |
44
+ |------|------|
45
+ | user → user | `--as user --to-user-id <对方用户 open_id>` |
46
+ | user → bot | `--as user --to-user-id <bot 的 open_id>` |
47
+ | bot → user | `--as bot --to-user-id <用户 open_id>` |
48
+ | bot → bot | `--as bot --to-user-id <另一个 bot 的 open_id>` |
49
+
50
+ **取接收人 open_id**:
51
+
52
+ ```bash
53
+ # 用户
54
+ lark-cli contact +search-user --query <姓名> --as user
55
+ # 机器人:从它所在群的成员列表里取 bots[] 中的 open_id
56
+ lark-cli im +chat-members-list --chat-id <chat_id> --member-types bot
57
+ ```
58
+
59
+ 机器人的 open_id 同样是 `ou_` 开头;不要传 `cli_` 开头的 app_id,那是应用 ID,不是日程参与人身份。
60
+
61
+ 无论哪个方向,转让都要求转出方和接收方**同租户**,且接收方能通过高管模式的协作校验。
62
+
63
+ ## 重复性日程
64
+
65
+ 后端按 `uid` 定位日程,忽略 `original_time`,**无法只转让某一次实例**。因此传入任何一个实例或例外的 `event_id`,都会把整个序列(含所有例外)一起转让。
66
+
67
+ 是重复性日程且未加 `--transfer-series` 时命令直接失败(`failed_precondition`),不会发出转让请求。收到这个错误时**先向用户确认"整个重复日程都转让"**,得到确认后再带 `--transfer-series` 重跑;不要自动重试。已确认时加 `--transfer-series` 会跳过这次预读。
68
+
69
+ ## 返回中的 `original_organizer_removed`
70
+
71
+ **共享日历不属于任何组织者,转让时服务端会强制把原组织者移出日程;主日历则会把原组织者保留为参与人。** 转让接口成功时不返回这个结果,所以命令只在能确定时才输出该字段:
72
+
73
+ | 情况 | 返回 |
74
+ |------|------|
75
+ | 带 `--remove-original-organizer` | `original_organizer_removed: true` |
76
+ | 省略 `--calendar-id`(主日历) | `original_organizer_removed: false` |
77
+ | 传了 `--calendar-id` 且未传 `--remove-original-organizer` | **不返回该字段**,stderr 给一条 note 说明共享日历会强制移除 |
78
+
79
+ 字段缺失时**不要**告诉用户"原组织者已保留为参与人",也不要断言已被移除。需要确认就转让后读一次日程看参与人,或一开始就显式传 `--remove-original-organizer`。
80
+
81
+ ## 提示
82
+
83
+ - 转让不可逆,且会连同日程上的会议纪要、笔记和附件一起移交给新组织者。
84
+ - 需要 `calendar:calendar.event:transfer` 权限;转让前的重复性预读需要 `calendar:calendar.event:read`(带 `--transfer-series` 时不读)。
85
+
86
+ ## 参考
87
+
88
+ - [lark-calendar](../SKILL.md) -- skill 入口与路由
89
+ - [重复性日程操作规范](lark-calendar-recurring.md)
@@ -127,7 +127,7 @@ lark-cli docs +fetch --doc Z1Fj...tnAc --scope section --start-block-id blkTitle
127
127
  |`<whiteboard>`|提取 `token`,使用 `docs +media-download`|
128
128
  |`<sheet>`、`<cite file-type="sheets">`|提取 `token` 和 `sheet-id`,转到 [`lark-sheets`](../../lark-sheets/SKILL.md)|
129
129
  |`<bitable>`、`<cite file-type="bitable">`|提取 `token` 和 `table-id`,转到 [`lark-base`](../../lark-base/SKILL.md)|
130
- |`<vc-transcribe-tab>`|提取 `vc-node-id`,使用 [`lark-note`](../../lark-note/SKILL.md) 的 `note +detail`|
130
+ |`<vc-transcribe-tab>`|提取 `vc-node-id`,使用 [`lark-meeting`](../../lark-meeting/SKILL.md) 的 `note +detail`|
131
131
  |`<synced_reference>`|提取 `src-token` 和 `src-block-id`,读取源文档并定位 block|
132
132
 
133
133
  ## 参考
@@ -165,10 +165,10 @@ lark-cli drive +add-comment \
165
165
  - 未传 `--block-id` 时,shortcut 默认创建**全文评论**;也可以显式传 `--full-comment`。全文评论支持 `docx`、旧版 `doc` URL、白名单扩展名的 Drive file,以及最终可解析为 `doc`/`docx`/`file` 的 wiki URL。
166
166
  - **Drive file 评论**:仅支持白名单扩展名的普通文件。当前支持:`.md`、`.txt`、`.json`、`.csv`、`.go`、`.js`、`.py`、`.pptx`、`.png`、`.jpg`、`.jpeg`、`.zip`、`.mp3`、`.mp4`。
167
167
  - **Drive file 暂不支持**:`.pdf`、`.docx`、`.xlsx` 等未在白名单内的普通文件会被 CLI 拒绝,并提示“当前还不支持这种类型的评论”。这些类型虽然可能接受 OpenAPI 请求,但在页面评论展示上存在问题。
168
- - **Drive file 只支持全文评论**:file 目标不支持局部评论,不允许传 `--block-id` 或 `--selection-with-ellipsis`。
168
+ - **Drive file 只支持全文评论**:file 目标不支持局部评论,不允许传 `--block-id`。
169
169
  - 传 `--block-id` 时,shortcut 创建**局部评论(划词评论)**;该模式支持 `docx`、`sheet`、`slides`、Base / bitable,以及最终可解析为这些类型的 wiki URL。
170
170
  - **Sheet 评论**:当 `--doc` 为 sheet URL 或 wiki 解析为 sheet 时,使用 `--block-id "<sheetId>!<cell>"` 指定单元格(如 `a281f9!D6`);sheet 没有全文评论,`--full-comment` 不可用。
171
- - **Slide 评论**:当 `--doc` 为 slides URL、`--type slides`,或 wiki 解析为 slides 时,必须传 `--block-id "<SLIDE_BLOCK_TYPE>!<XML_ELEMENT_ID>"`。此时 `--full-comment` 和 `--selection-with-ellipsis` 不可用。
171
+ - **Slide 评论**:当 `--doc` 为 slides URL、`--type slides`,或 wiki 解析为 slides 时,必须传 `--block-id "<SLIDE_BLOCK_TYPE>!<XML_ELEMENT_ID>"`。此时 `--full-comment` 不可用。
172
172
  - **Base 记录局部评论**:Base 不支持全局评论,所有评论都挂在记录上;裸 token 可传 `--type bitable` 或 `--type base`,推荐 `bitable`。定位信息必须是 file token(base token)+ `--block-id "<table-id>!<record-id>!<view-id>"`,其中 table/record/view ID 通常分别以 `tbl`/`rec`/`vew` 开头;view_id 只决定被提及时点击通知打开哪个视图,不影响评论挂载点,但必须传。ID 获取参考 [`lark-base`](../../lark-base/SKILL.md)。
173
173
  - **Slide 参数映射示例**:`--block-id` 由 PPT XML 元素类型和元素 `id` 组成。例如:
174
174
  - `<slide id="pkk">` 对应 `--block-id slide!pkk`,表示给整页评论。
@@ -109,7 +109,9 @@ Shortcut 是对常用操作的高级封装(`lark-cli im +<verb> [flags]`)。
109
109
  | [`+chat-messages-list`](references/lark-im-chat-messages-list.md) | List messages in a chat or P2P conversation; user/bot; accepts --chat-id or --user-id, resolves P2P chat_id, supports time range, --order asc/desc sorting, auto-pagination |
110
110
  | [`+chat-search`](references/lark-im-chat-search.md) | Search visible group chats by --query keyword and/or --member-ids; user/bot; e.g. look up chat_id by group name; supports type filters, sorting, auto-pagination, and --exclude-muted (user identity only) |
111
111
  | [`+chat-update`](references/lark-im-chat-update.md) | Update group chat name or description; user/bot; updates a chat's name or description |
112
+ | [`+message-read-users`](references/lark-im-message-read-status.md) | List users who read one message; user/bot; identity-specific scopes; supports bounded auto-pagination |
112
113
  | [`+messages-mget`](references/lark-im-messages-mget.md) | Batch get messages by IDs; user/bot; fetches up to 50 om_ message IDs, formats sender names, expands thread replies |
114
+ | [`+messages-read-status`](references/lark-im-message-read-status.md) | Batch query whether the current user read 1–50 messages; user-only; returns readable items and invalid message IDs |
113
115
  | [`+messages-reply`](references/lark-im-messages-reply.md) | Reply to a message (supports thread replies); user/bot; supports text/markdown/post/media replies, reply-in-thread, idempotency key |
114
116
  | [`+messages-resources-download`](references/lark-im-messages-resources-download.md) | Download an image or file attached to a message; user/bot |
115
117
  | [`+messages-search`](references/lark-im-messages-search.md) | Search messages across chats (supports keyword, sender, time range filters) with user or bot identity; filters by chat/sender/attachment/time, supports auto-pagination via `--page-all` / `--page-limit`, enriches results via batched mget and chats batch_query |
@@ -169,10 +171,11 @@ lark-cli im <resource> <method> [flags] # 调用 API
169
171
 
170
172
  ### messages
171
173
 
174
+ - `read_status` — 批量查询当前用户对消息的已读状态。Identity: `user` only (`user_access_token`); accepts up to 50 message IDs and returns readable items plus invalid message IDs.[Must-read](references/lark-im-message-read-status.md)
172
175
  - `delete` — 撤回消息。Identity: supports `user` and `bot`; for `bot` calls, the bot must be in the chat to revoke group messages; to revoke another user's group message, the bot must be the owner, an admin, or the creator; for user P2P recalls, the target user must be within the bot's availability.
173
176
  - `forward` — 转发消息。Identity: supports `user` and `bot`.
174
177
  - `merge_forward` — 合并转发消息。Identity: `bot` only (`tenant_access_token`).
175
- - `read_users` — 查询消息已读信息。Identity: `bot` only (`tenant_access_token`); the bot must be in the chat, and can only query read status for messages it sent within the last 7 days.
178
+ - `read_users` — 查询消息已读信息。Identity: supports `user` and `bot`; the caller must still be in the chat. A user can query messages they sent within the last 7 days, while a bot can query only messages sent by that bot within the last 7 days.[Must-read](references/lark-im-message-read-status.md)
176
179
  - `urgent_app` — 发送应用内加急。Identity: `bot` only (`tenant_access_token`); the bot must be the message sender and must be in the conversation that contains the message.
177
180
  - `urgent_phone` — 发送电话加急。Identity: `bot` only (`tenant_access_token`); the bot must be the message sender and must be in the conversation that contains the message.
178
181
  - `urgent_sms` — 发送短信加急。Identity: `bot` only (`tenant_access_token`); the bot must be the message sender and must be in the conversation that contains the message.
@@ -229,10 +232,13 @@ lark-cli im <resource> <method> [flags] # 调用 API
229
232
  | `chat.managers.delete_managers` | `im:chat.managers:write_only` |
230
233
  | `chat.moderation.get` | `im:chat.moderation:read` |
231
234
  | `chat.moderation.update` | `im:chat:moderation:write_only` |
235
+ | `+messages-read-status` | user: `im:message:readonly` (recommended), `im:message`, or `im:message:get_as_user` |
236
+ | `+message-read-users` | user: `im:message:readonly` (recommended), `im:message`, `im:message:basic`, or `im:message:get_as_user`; bot: `im:message:readonly` |
237
+ | `messages.read_status` | `im:message:readonly` (recommended), `im:message`, or `im:message:get_as_user` |
232
238
  | `messages.delete` | `im:message:recall` |
233
239
  | `messages.forward` | `im:message` |
234
240
  | `messages.merge_forward` | `im:message` |
235
- | `messages.read_users` | `im:message:readonly` |
241
+ | `messages.read_users` | user: `im:message:readonly` (recommended), `im:message`, `im:message:basic`, or `im:message:get_as_user`; bot: `im:message:readonly` |
236
242
  | `messages.urgent_app` | `im:message.urgent` |
237
243
  | `messages.urgent_phone` | `im:message.urgent:phone` |
238
244
  | `messages.urgent_sms` | `im:message.urgent:sms` |
@@ -0,0 +1,96 @@
1
+ # IM message read status
2
+
3
+ > **Prerequisite:** Read [`../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) first for authentication and global parameters.
4
+
5
+ Use two focused shortcuts for message read-status queries:
6
+
7
+ - `im +messages-read-status` queries whether the current user has read 1–50 messages.
8
+ - `im +message-read-users` lists users who have read one message and supports automatic pagination.
9
+
10
+ Both underlying OpenAPIs support user identity through a user access token (UAT). `+message-read-users` additionally supports bot identity through a tenant access token (TAT).
11
+
12
+ ## Identity and scopes
13
+
14
+ | Shortcut | Identity | Scope |
15
+ |---|---|---|
16
+ | `+messages-read-status` | user only | `im:message:readonly` (recommended), `im:message`, or `im:message:get_as_user` |
17
+ | `+message-read-users` | user | `im:message:readonly` (recommended), `im:message`, `im:message:basic`, or `im:message:get_as_user` |
18
+ | `+message-read-users` | bot | `im:message:readonly` |
19
+
20
+ For `+message-read-users`, the caller must still be in the chat. A user can query only messages they sent within the last seven days, while a bot can query only messages sent by that bot within the last seven days.
21
+ The user scopes in the table are alternatives; the CLI preflight uses `im:message:readonly` because it is the least-privileged regular OAuth scope supported by this endpoint.
22
+
23
+ ## Batch query the current user's read status
24
+
25
+ ```bash
26
+ # Preview one request
27
+ lark-cli im +messages-read-status \
28
+ --message-ids om_xxx,om_yyy \
29
+ --as user \
30
+ --dry-run
31
+
32
+ # Execute with a user access token
33
+ lark-cli im +messages-read-status \
34
+ --message-ids om_xxx,om_yyy \
35
+ --as user \
36
+ --json
37
+ ```
38
+
39
+ The command accepts 1–50 comma-separated `om_` message IDs. The three scopes above are alternatives; any one is sufficient, and the CLI recommends the least-privileged OAuth scope `im:message:readonly`. The response keeps the OpenAPI response unchanged:
40
+
41
+ - `items[].message_id` and `items[].is_read` contain statuses the server could determine.
42
+ - `invalid_message_ids` contains messages that do not exist, are not visible to the current user, or do not support this query. The API deliberately does not expose a more specific reason.
43
+
44
+ ## List users who read one message
45
+
46
+ ```bash
47
+ # Fetch one page as the current user
48
+ lark-cli im +message-read-users \
49
+ --message-id om_xxx \
50
+ --as user \
51
+ --json
52
+
53
+ # Fetch every page as a bot, bounded to ten pages by default
54
+ lark-cli im +message-read-users \
55
+ --message-id om_xxx \
56
+ --user-id-type open_id \
57
+ --page-all \
58
+ --as bot \
59
+ --json
60
+ ```
61
+
62
+ Pagination flags:
63
+
64
+ - `--page-size`: 1–100, default 100.
65
+ - `--page-token`: start from a known cursor.
66
+ - `--page-all`: continue until the endpoint is exhausted.
67
+ - `--page-limit`: maximum pages with `--page-all`; default 10, range 1–1000.
68
+ - `--page-delay`: delay in milliseconds between pages; default 200, and 0 disables the delay.
69
+
70
+ The command preserves each server item, including `user_id_type`, `user_id`, `timestamp`, and `tenant_key`. Pagination metadata reports whether the endpoint was exhausted and retains the next token when a bounded run can be resumed.
71
+
72
+ ## Raw API commands
73
+
74
+ When Registry MR !128 is published, the corresponding raw commands remain available:
75
+
76
+ ```bash
77
+ lark-cli im messages read_status --data '{"message_ids":["om_xxx"]}' --as user
78
+ lark-cli im messages read_users --params '{"message_id":"om_xxx","user_id_type":"open_id"}' --as user
79
+ ```
80
+
81
+ Prefer the shortcuts for flag validation, identity-specific scope hints, and read-users auto-pagination.
82
+
83
+ ## Troubleshooting
84
+
85
+ | Symptom | Meaning | Action |
86
+ |---|---|---|
87
+ | `--as bot is not supported` for read status | The batch endpoint requires user identity | Switch to `--as user` |
88
+ | Missing `im:message:readonly` or `im:message` | A regular OAuth scope has not been granted | Follow the CLI authorization hint to grant one supported scope |
89
+ | Missing a user read scope | No supported regular OAuth scope has been granted | Grant `im:message:readonly` and retry |
90
+ | Bot permission denied | The application lacks a bot scope | Open the `console_url` from the typed error and enable the requested scope |
91
+ | Empty read-user list | No user has read the message, or sender/time constraints are not met | Verify chat membership, the message sender, and the seven-day window |
92
+
93
+ ## References
94
+
95
+ - [lark-im](../SKILL.md)
96
+ - [lark-shared](../../lark-shared/SKILL.md)
@@ -24,37 +24,37 @@
24
24
 
25
25
  ```bash
26
26
  # 创建 HTML 草稿(推荐)
27
- lark-cli mail +draft-create --to alice@example.com --subject '周报' \
27
+ lark-cli mail +draft-create --to 'alice@example.com' --subject '周报' \
28
28
  --body '<p>本周进展:</p><ul><li>完成 A 模块</li></ul>'
29
29
 
30
30
  # 不带收件人的 HTML 草稿(用户之后可自行添加)
31
31
  lark-cli mail +draft-create --subject '周报' --body '<p>草稿内容</p>'
32
32
 
33
33
  # 带附件和内嵌图片的 HTML 草稿(推荐:直接用相对路径,自动解析)
34
- lark-cli mail +draft-create --to alice@example.com --subject '预览图' --body '<p>见附件和图:<img src="./logo.png" /></p>' --attach ./report.pdf
34
+ lark-cli mail +draft-create --to 'alice@example.com' --subject '预览图' --body '<p>见附件和图:<img src="./logo.png" /></p>' --attach './report.pdf'
35
35
 
36
36
  # 纯文本草稿(仅在内容极简时使用)
37
- lark-cli mail +draft-create --to alice@example.com --subject '简短通知' --body '收到,谢谢'
37
+ lark-cli mail +draft-create --to 'alice@example.com' --subject '简短通知' --body '收到,谢谢'
38
38
 
39
39
  # Dry Run(仅打印请求,不执行)
40
- lark-cli mail +draft-create --to alice@example.com --subject '测试' --body 'test' --dry-run
40
+ lark-cli mail +draft-create --to 'alice@example.com' --subject '测试' --body 'test' --dry-run
41
41
  ```
42
42
 
43
43
  ## 参数
44
44
 
45
45
  | 参数 | 必填 | 说明 |
46
46
  |------|------|------|
47
- | `--to <emails>` | 否 | 完整收件人列表,多个用逗号分隔。支持 `Alice <alice@example.com>` 格式。省略时草稿不带收件人(之后可通过 `+draft-edit` 添加) |
47
+ | `--to '<email>'` | 否 | 完整收件人列表。多个收件人请重复传 `--to`,每次只放一个地址,参数值用单引号包住。支持 `Alice <alice@example.com>` 格式。省略时草稿不带收件人(之后可通过 `+draft-edit` 添加) |
48
48
  | `--subject <text>` | 是 | 草稿主题 |
49
49
  | `--body <text>` | 二选一 | 邮件正文。推荐使用 HTML 获得富文本排版;也支持纯文本(自动检测)。使用 `--plain-text` 可强制纯文本模式。支持 `<img src="./local.png" />` 相对路径自动解析为内嵌图片(仅支持相对路径,不支持绝对路径)。与 `--body-file` 互斥 |
50
50
  | `--body-file <path>` | 二选一 | 从文件读取邮件正文 HTML(相对路径,仅限 cwd 子树)。与 `--body` 互斥。文件大小上限 32 MB |
51
51
  | `--from <email>` | 否 | 发件人邮箱地址(EML From 头)。使用别名(send_as)发信时,设为别名地址并配合 `--mailbox` 指定所属邮箱。省略时使用邮箱主地址 |
52
52
  | `--mailbox <email>` | 否 | 邮箱地址,指定草稿所属的邮箱(默认回退到 `--from`,再回退到 `me`)。当发件人(`--from`)与邮箱不同时使用,如通过别名或 send_as 地址发信。可通过 `accessible_mailboxes` 查询可用邮箱 |
53
- | `--cc <emails>` | 否 | 完整抄送列表,多个用逗号分隔 |
54
- | `--bcc <emails>` | 否 | 完整密送列表,多个用逗号分隔。与 `--event-*` 不兼容(见 `+send` 日程邀请约束) |
53
+ | `--cc '<email>'` | 否 | 完整抄送列表。多个抄送请重复传 `--cc`,每次只放一个地址,参数值用单引号包住 |
54
+ | `--bcc '<email>'` | 否 | 完整密送列表。多个密送请重复传 `--bcc`,每次只放一个地址,参数值用单引号包住。与 `--event-*` 不兼容(见 `+send` 日程邀请约束) |
55
55
  | `--plain-text` | 否 | 强制纯文本模式,忽略 HTML 自动检测。不可与 `--inline` 同时使用。纯文本模式下也会自动追加纯文本签名(HTML 签名经 `PlainTextFromHTML` 转换,内联图片丢弃) |
56
- | `--attach <paths>` | 否 | 附件文件路径,多个用逗号分隔。相对路径。当附件导致 EML 总大小超过 25 MB 时,超出部分自动上传为超大附件(HTML 邮件插入下载卡片,纯文本邮件追加下载链接),单个文件上限 3 GB |
57
- | `--inline <json>` | 否 | 高级用法:手动指定内嵌图片 CID 映射。推荐直接在 `--body` 中使用 `<img src="./path" />`(自动解析)。仅在需要精确控制 CID 命名时使用此参数。格式:`'[{"cid":"mycid","file_path":"./logo.png"}]'`,在 body 中用 `<img src="cid:mycid">` 引用。不可与 `--plain-text` 同时使用 |
56
+ | `--attach '<path>'` | 否 | 附件文件路径。多个附件请重复传 `--attach`,每次只放一个相对路径,参数值用单引号包住;按传入顺序追加。当附件导致 EML 总大小超过 25 MB 时,超出部分自动上传为超大附件(HTML 邮件插入下载卡片,纯文本邮件追加下载链接),单个文件上限 3 GB |
57
+ | `--inline '<json>'` | 否 | 高级用法:手动指定内嵌图片 CID 映射。多个 inline 图片请重复传 `--inline`,每次只放一个 JSON object,并用单引号包住:`'{"cid":"mycid","file_path":"./logo.png"}'`。`file_path` 必须是相对路径;CID 应唯一,例如随机十六进制字符串;在 body 中用 `<img src="cid:mycid">` 引用。推荐直接在 `--body` 中使用 `<img src="./path" />`(自动解析)。不可与 `--plain-text` 同时使用 |
58
58
  | `--signature-id <id>` | 否 | 签名 ID。附加邮箱签名到正文末尾。运行 `mail +signature` 查看可用签名。与 `--no-signature` 互斥 |
59
59
  | `--no-signature` | 否 | 跳过默认签名自动追加。与 `--signature-id` 互斥,同时使用时返回参数校验错误(退出码 2) |
60
60
  | `--priority <level>` | 否 | 邮件优先级:`high`、`normal`、`low`。省略或 `normal` 时不设置优先级 |
@@ -94,7 +94,7 @@ lark-cli mail +draft-create --to alice@example.com --subject '测试' --body 'te
94
94
 
95
95
  ```bash
96
96
  # 1. 创建草稿
97
- lark-cli mail +draft-create --to alice@example.com --subject 'Q1 报告' --body '请查收附件中的报告。' --attach ./q1-report.pdf --format json
97
+ lark-cli mail +draft-create --to 'alice@example.com' --subject 'Q1 报告' --body '请查收附件中的报告。' --attach './q1-report.pdf' --format json
98
98
 
99
99
  # 2. 发送草稿
100
100
  lark-cli mail user_mailbox.drafts send --params '{"user_mailbox_id":"me","draft_id":"<draft_id>"}'
@@ -107,13 +107,13 @@ lark-cli mail user_mailbox.drafts send --params '{"user_mailbox_id":"me","draft_
107
107
  ```bash
108
108
  # 推荐:直接使用相对路径,自动解析为内嵌图片
109
109
  lark-cli mail +draft-create \
110
- --to alice@example.com \
110
+ --to 'alice@example.com' \
111
111
  --subject '通讯稿' \
112
112
  --body '<h1>你好</h1><img src="./banner.png" />'
113
113
 
114
114
  # 高级用法:手动指定 CID(CID 为唯一标识符,可用随机十六进制字符串)
115
115
  lark-cli mail +draft-create \
116
- --to alice@example.com \
116
+ --to 'alice@example.com' \
117
117
  --subject '通讯稿' \
118
118
  --body '<h1>你好</h1><img src="cid:c7d8e9f0a1b2c3d4e5f6">' \
119
119
  --inline '[{"cid":"c7d8e9f0a1b2c3d4e5f6","file_path":"./banner.png"}]'