@amaster.ai/pi-lark 0.1.10 → 0.1.12
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/package.json +2 -2
- package/skills/lark-approval/SKILL.md +2 -2
- package/skills/lark-approval/references/lark-approval-instances-initiated.md +5 -0
- package/skills/lark-approval/references/lark-approval-tasks-add-sign.md +68 -20
- package/skills/lark-approval/references/lark-approval-tasks-query.md +5 -0
- package/skills/lark-base/SKILL.md +108 -5
- package/skills/lark-base/references/lark-base-data-query.md +2 -6
- package/skills/lark-base/references/lark-base-field-extension.md +170 -0
- package/skills/lark-base/references/lark-base-field-lookup.md +1 -1
- package/skills/lark-base/references/lark-base-filter-condition.md +32 -5
- package/skills/lark-base/references/lark-base-form-detail.md +1 -1
- package/skills/lark-base/references/lark-base-form-submit.md +2 -2
- package/skills/lark-base/references/lark-base-record-history-list.md +1 -1
- package/skills/lark-base/references/lark-base-record-query-and-analysis-sop.md +95 -205
- package/skills/lark-base/references/lark-base-template-center.md +5 -1
- package/skills/lark-calendar/SKILL.md +6 -0
- package/skills/lark-calendar/references/lark-calendar-join-event.md +43 -0
- package/skills/lark-drive/references/lark-drive-member-remove.md +2 -1
- package/skills/lark-im/SKILL.md +15 -1
- package/skills/lark-im/references/lark-im-messages-edit.md +89 -0
- package/skills/lark-im/references/lark-im-messages-mget.md +8 -0
- package/skills/lark-im/references/lark-im-messages-reply.md +2 -0
- package/skills/lark-im/references/lark-im-messages-send.md +6 -2
- package/skills/lark-markdown/SKILL.md +1 -1
- package/skills/lark-meeting/SKILL.md +6 -2
- package/skills/lark-meeting/references/lark-minutes-summary.md +1 -0
- package/skills/lark-meeting/references/lark-minutes-todo.md +39 -1
- package/skills/lark-meeting/references/lark-minutes-upload.md +6 -0
- package/skills/lark-meeting/references/lark-vc-agent-meeting-end.md +26 -0
- package/skills/lark-meeting/references/lark-vc-agent-meeting-invite.md +32 -0
- package/skills/lark-meeting/references/lark-vc-agent-meeting-join.md +8 -2
- package/skills/lark-meeting/references/lark-vc-meeting-countdown.md +103 -0
- package/skills/lark-meeting/references/lark-vc-meeting-events.md +1 -0
- package/skills/lark-meeting/references/lark-vc-meeting-screenshot.md +34 -0
- package/skills/lark-meeting/scenes/create-and-edit-minutes.md +25 -3
- package/skills/lark-meeting/scenes/live-meeting-attend.md +63 -6
- package/skills/lark-meeting/scenes/live-meeting-interact.md +32 -3
- package/skills/lark-sheets/SKILL.md +76 -60
- package/skills/lark-sheets/references/lark-sheets-batch-update.md +83 -14
- package/skills/lark-sheets/references/lark-sheets-chart.md +296 -159
- package/skills/lark-sheets/references/lark-sheets-conditional-format.md +46 -9
- package/skills/lark-sheets/references/lark-sheets-filter.md +1 -1
- package/skills/lark-sheets/references/lark-sheets-formula-translation.md +78 -65
- package/skills/lark-sheets/references/lark-sheets-formula-verify.md +21 -17
- package/skills/lark-sheets/references/lark-sheets-pivot-table.md +2 -1
- package/skills/lark-sheets/references/lark-sheets-range-operations.md +1 -1
- package/skills/lark-sheets/references/lark-sheets-read-data.md +8 -5
- package/skills/lark-sheets/references/lark-sheets-search-replace.md +4 -4
- package/skills/lark-sheets/references/lark-sheets-sheet-structure.md +2 -2
- package/skills/lark-sheets/references/lark-sheets-sparkline.md +1 -0
- package/skills/lark-sheets/references/lark-sheets-styles-put.md +3 -3
- package/skills/lark-sheets/references/lark-sheets-visual-standards.md +6 -4
- package/skills/lark-sheets/references/lark-sheets-workbook.md +3 -1
- package/skills/lark-sheets/references/lark-sheets-write-cells.md +50 -48
- package/skills/lark-sheets/scripts/lark_chart_layout_check.py +472 -0
- package/skills/lark-slides/references/cli/lark-slides-add-slide.md +6 -6
- package/skills/lark-slides/references/cli/lark-slides-delete-slide.md +3 -3
- package/skills/lark-slides/references/cli/lark-slides-replace-slide.md +11 -11
- package/skills/lark-slides/references/cli/lark-slides-xml-presentation-slide-get.md +1 -1
- package/skills/lark-slides/references/cli/lark-slides-xml-presentation-slide-replace.md +2 -2
- package/skills/lark-slides/references/workflow/slides-editing.md +11 -11
- package/skills/lark-slides/references/xml/slides_xml_schema_definition.xml +2 -0
- package/skills/lark-base/references/lark-base-cell-value.md +0 -165
- package/skills/lark-base/references/lark-base-data-analysis-pandas.md +0 -93
- package/skills/lark-base/references/lark-base-data-analysis-python-stdlib.md +0 -120
- package/skills/lark-base/references/lark-base-record-batch-create.md +0 -63
- package/skills/lark-base/references/lark-base-record-batch-update.md +0 -57
- package/skills/lark-base/references/lark-base-record-query-and-analysis-cloud-sop.md +0 -145
package/skills/lark-im/SKILL.md
CHANGED
|
@@ -35,6 +35,10 @@ Chat (oc_xxx)
|
|
|
35
35
|
|
|
36
36
|
## Important Notes
|
|
37
37
|
|
|
38
|
+
### AppLink and Share Links
|
|
39
|
+
|
|
40
|
+
Prefer CLI-returned links: use `chat_app_link` to open joined conversations, `message_app_link` to open messages, and `share_link` to invite others to groups. If manually building a joined-conversation AppLink, use `https://<applink_host>/client/chat/open?openChatId=<oc_xxx>`, never `chatId=<oc_xxx>` or `lark://...chat_id=<oc_xxx>`.
|
|
41
|
+
|
|
38
42
|
### Identity and Token Mapping
|
|
39
43
|
|
|
40
44
|
- `--as user` means **user identity** and uses `user_access_token`. Calls run as the authorized end user, so permissions depend on both the app scopes and that user's own access to the target chat/message/resource.
|
|
@@ -60,7 +64,7 @@ The four message-pulling shortcuts (`+messages-mget`, `+chat-messages-list`, `+m
|
|
|
60
64
|
|
|
61
65
|
### Card Messages (Interactive)
|
|
62
66
|
|
|
63
|
-
**Before sending
|
|
67
|
+
**Before sending, replying with, or updating any `interactive` card (`+messages-send` / `+messages-reply` / `messages.patch`), you MUST read [`references/card/lark-im-card-create.md`](references/card/lark-im-card-create.md) and follow its workflow.** The card JSON passed to `--msg-type interactive --content` (send/reply) or `messages.patch --data` (update) must be the output of that workflow — never hand-write or copy a card payload.
|
|
64
68
|
|
|
65
69
|
Card messages (`interactive` type) are not yet supported for compact conversion in event subscriptions. The raw event data will be returned instead, with a hint printed to stderr.
|
|
66
70
|
|
|
@@ -110,6 +114,7 @@ Shortcut 是对常用操作的高级封装(`lark-cli im +<verb> [flags]`)。
|
|
|
110
114
|
| [`+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
115
|
| [`+chat-update`](references/lark-im-chat-update.md) | Update group chat name or description; user/bot; updates a chat's name or description |
|
|
112
116
|
| [`+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 |
|
|
117
|
+
| [`+messages-edit`](references/lark-im-messages-edit.md) | Edit a message's content (text/post, including the attachment zone); bot-only (user identity is rejected by the server); PUT /open-apis/im/v1/messages/:message_id |
|
|
113
118
|
| [`+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
119
|
| [`+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 |
|
|
115
120
|
| [`+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 |
|
|
@@ -159,6 +164,11 @@ lark-cli im <resource> <method> [flags] # 调用 API
|
|
|
159
164
|
- `update` — 设置自己的群昵称。Set or update your own nickname in the chat (self-only). Identity: `user` only (`user_access_token`); `nickname` must be a non-empty string (max 300 bytes). Use DELETE to clear it.
|
|
160
165
|
- `delete` — 清空自己的群昵称。Clear your own nickname in the chat (self-only). Identity: `user` only (`user_access_token`).
|
|
161
166
|
|
|
167
|
+
### chat.join_requests
|
|
168
|
+
|
|
169
|
+
- `list` — 列出群的待审批入群申请(仅群主/管理员,user_access_token)。List pending join requests for a chat. Identity: `user` only (`user_access_token`); the caller must be the chat owner or an admin. Paginated (`page_size` 1-100); stop on `has_more == false` — `page_token` is returned even on the last page, so paging while it is present never terminates.
|
|
170
|
+
- `handle` — 批量审批入群申请(approve/reject,仅群主/管理员,user_access_token)。Approve or reject pending join requests in bulk (1-50 items, processed in order). Identity: `user` only (`user_access_token`); the caller must be the chat owner or an admin. `results[]` mirrors `items[]` in count and order — check each `result` (`success` / `failed` / `already_handled`); exit 0 does not mean every item succeeded.
|
|
171
|
+
|
|
162
172
|
### chat.managers
|
|
163
173
|
|
|
164
174
|
- `add_managers` — 指定群管理员。Identity: supports `user` and `bot`; only the group owner can add managers; max 10 managers per chat (20 for super-large chats), and at most 5 bots per request.
|
|
@@ -176,6 +186,7 @@ lark-cli im <resource> <method> [flags] # 调用 API
|
|
|
176
186
|
- `forward` — 转发消息。Identity: supports `user` and `bot`.
|
|
177
187
|
- `merge_forward` — 合并转发消息。Identity: `bot` only (`tenant_access_token`).
|
|
178
188
|
- `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)
|
|
189
|
+
- `patch` — 更新已发送的消息卡片。Update an interactive message card sent by the app. Identity: supports `user` and `bot`; the message must have been sent within the last 14 days, and `content` must be a JSON-serialized string no larger than 30 KB.[Must-read](references/card/lark-im-card-create.md)
|
|
179
190
|
- `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.
|
|
180
191
|
- `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.
|
|
181
192
|
- `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.
|
|
@@ -232,6 +243,8 @@ lark-cli im <resource> <method> [flags] # 调用 API
|
|
|
232
243
|
| `chat.managers.delete_managers` | `im:chat.managers:write_only` |
|
|
233
244
|
| `chat.moderation.get` | `im:chat.moderation:read` |
|
|
234
245
|
| `chat.moderation.update` | `im:chat:moderation:write_only` |
|
|
246
|
+
| `chat.join_requests.list` | `im:chat.membership_application:read` |
|
|
247
|
+
| `chat.join_requests.handle` | `im:chat.membership_application:write` |
|
|
235
248
|
| `+messages-read-status` | user: `im:message:readonly` (recommended), `im:message`, or `im:message:get_as_user` |
|
|
236
249
|
| `+message-read-users` | user: `im:message:readonly` (recommended), `im:message`, `im:message:basic`, or `im:message:get_as_user`; bot: `im:message:readonly` |
|
|
237
250
|
| `messages.read_status` | `im:message:readonly` (recommended), `im:message`, or `im:message:get_as_user` |
|
|
@@ -239,6 +252,7 @@ lark-cli im <resource> <method> [flags] # 调用 API
|
|
|
239
252
|
| `messages.forward` | `im:message` |
|
|
240
253
|
| `messages.merge_forward` | `im:message` |
|
|
241
254
|
| `messages.read_users` | user: `im:message:readonly` (recommended), `im:message`, `im:message:basic`, or `im:message:get_as_user`; bot: `im:message:readonly` |
|
|
255
|
+
| `messages.patch` | `im:message:update` |
|
|
242
256
|
| `messages.urgent_app` | `im:message.urgent` |
|
|
243
257
|
| `messages.urgent_phone` | `im:message.urgent:phone` |
|
|
244
258
|
| `messages.urgent_sms` | `im:message.urgent:sms` |
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# im +messages-edit
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) first to understand authentication, global parameters, and safety rules.
|
|
4
|
+
|
|
5
|
+
Edit an already-sent message's content. **Bot identity only** — the edit API does not accept user tokens. Only messages the bot sent can be edited.
|
|
6
|
+
|
|
7
|
+
This skill maps to the shortcut: `lark-cli im +messages-edit` (PUT on the message edit endpoint).
|
|
8
|
+
|
|
9
|
+
## Safety Constraints
|
|
10
|
+
|
|
11
|
+
Editing rewrites a message visible to other people. Before calling it, you **must** confirm with the user:
|
|
12
|
+
|
|
13
|
+
1. Which message to edit (its `message_id`)
|
|
14
|
+
2. The new content
|
|
15
|
+
|
|
16
|
+
The bot must be the original sender — editing another identity's message fails. Identity is always the bot: user identity is rejected server-side (`user access token not support`).
|
|
17
|
+
|
|
18
|
+
**Do not** edit a message without explicit user approval.
|
|
19
|
+
|
|
20
|
+
## Choose The Right Content Flag
|
|
21
|
+
|
|
22
|
+
| Need | Recommended flag | Why |
|
|
23
|
+
|------|------|------|
|
|
24
|
+
| Edit to headings, lists, links, summaries, or Markdown-looking content | `--markdown` | Best default for lightweight formatting; converted to Feishu `post` JSON |
|
|
25
|
+
| Edit to exact plain text | `--text` | Preserves literal text; no Markdown conversion |
|
|
26
|
+
| Precisely control the new payload | `--content` | You provide the exact JSON for `text` / `post` |
|
|
27
|
+
| Attach files/folders to the edited message's attachment zone | `--set-attachments` | Repeatable, as bare `file_key` (`file_xxx`); **replaces** the post content's `files` array (flag values are the final list, discarding any `files` in `--content`). Requires a post message (`--markdown` or `--msg-type post`). Name/metadata are filled by the server, not the client |
|
|
28
|
+
| Clear the edited message's attachment zone | `--clear-attachments` | Sets `files:[]` on the post content. Requires a post message; mutually exclusive with `--set-attachments` |
|
|
29
|
+
| Keep the existing attachment zone while rewriting the body | *(no attachment flag)* | **Default.** Editing with only `--markdown` / `--text` / `--content` leaves the current `files` array untouched — a body-only edit never drops attachments |
|
|
30
|
+
|
|
31
|
+
## Editing the Attachment Zone
|
|
32
|
+
|
|
33
|
+
`post` messages can carry an attachment zone — a top-level `files` array that renders files/folders under the rich-text body.
|
|
34
|
+
|
|
35
|
+
**Default: no attachment flag preserves the attachment zone.** Editing with only `--markdown` / `--text` / `--content` (i.e. passing neither `--set-attachments` nor `--clear-attachments`) rewrites the body and keeps the existing `files` array unchanged. This is the safe default — fixing a typo must not drop the files you attached. Only pass `--set-attachments` to replace the zone, or `--clear-attachments` to remove it.
|
|
36
|
+
|
|
37
|
+
To edit a message so it attaches (or re-attaches) files:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
lark-cli im +messages-edit --as bot --message-id om_xxx --markdown "Updated content" --set-attachments file_xxx --set-attachments file_yyy
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- `--set-attachments` accepts a bare file/folder key (`file_xxx`), and may be repeated.
|
|
44
|
+
- **`--set-attachments` is a replace, not an append:** the flag values become the final `files` array. Send/reply's `--attachment` merges; edit's `--set-attachments` replaces.
|
|
45
|
+
- **Mutually exclusive with `--content` carrying files:** when `--content` already contains a `files` array, `--set-attachments` and `--clear-attachments` are rejected — declare the attachment zone either via `--content` or via the attachment flags, not both. Use `--markdown` (which never emits a `files` array) or a `--content` without `files` together with the attachment flags.
|
|
46
|
+
- The server fills name/size/mime/is_folder from file service metadata; the client does not (and cannot) override the display name.
|
|
47
|
+
- When `--set-attachments` is present the effective `msg_type` is forced to `post`. Pair it with `--markdown` (or `--content` with post JSON plus `--msg-type post`); `--text` cannot carry an attachment zone.
|
|
48
|
+
- The edited content replaces the whole message content, so include every file you want to keep in the new attachment zone.
|
|
49
|
+
|
|
50
|
+
To **clear** the attachment zone entirely, pass `--clear-attachments` instead of `--set-attachments`:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
lark-cli im +messages-edit --as bot --message-id om_xxx --markdown "Updated content" --clear-attachments
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- `--clear-attachments` sets the post content's `files` array to `[]`, telling the server to remove all file/folder attachments.
|
|
57
|
+
- It cannot be used together with `--set-attachments`.
|
|
58
|
+
- Like `--set-attachments`, it forces the effective `msg_type` to `post`, so pair it with `--markdown` or `--msg-type post --content <post-json>`.
|
|
59
|
+
|
|
60
|
+
## Parameters
|
|
61
|
+
|
|
62
|
+
| Parameter | Required | Description |
|
|
63
|
+
|------|------|------|
|
|
64
|
+
| `--message-id <id>` | Yes | Message ID (`om_xxx`) to edit |
|
|
65
|
+
| `--text <string>` | One content option | Plain text content |
|
|
66
|
+
| `--markdown <string>` | One content option | Markdown text, converted to `post` JSON |
|
|
67
|
+
| `--content <json>` | One content option | Exact message content JSON; must match the effective `--msg-type` |
|
|
68
|
+
| `--set-attachments <key>` | One content option | Repeatable bare file/folder key (`file_xxx`); **replaces** the post attachment zone — the flag values become the final `files` array, discarding any `files` written in `--content`, and duplicate keys are sent once. Name/size/mime/is_folder are filled by the server |
|
|
69
|
+
| `--clear-attachments` | One content option | Clear the post attachment zone by setting `files:[]` |
|
|
70
|
+
| `--msg-type <type>` | No | Message type (default `text`). When `--markdown`/`--set-attachments`/`--clear-attachments` is used the effective type is inferred automatically |
|
|
71
|
+
| `--as <identity>` | No | Identity type: `bot` only (user identity is rejected by the server) |
|
|
72
|
+
| `--dry-run` | No | Print the request only, do not execute it |
|
|
73
|
+
|
|
74
|
+
## Return Value
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"message_id": "om_xxx",
|
|
79
|
+
"chat_id": "oc_xxx",
|
|
80
|
+
"update_time": "1234567890"
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Common Mistakes
|
|
85
|
+
|
|
86
|
+
- Editing a message the calling identity did not send — the API rejects it.
|
|
87
|
+
- Using `--set-attachments` with `--text`. The attachment zone only exists on `post` messages; use `--markdown` or `--msg-type post`.
|
|
88
|
+
- Supplying only the files you want to keep, then losing the text. Editing replaces the entire content; pass the full new content (text + attachments) in one call.
|
|
89
|
+
- Assuming a body-only edit clears the attachment zone. It does not — without `--set-attachments` / `--clear-attachments` the existing attachments are preserved.
|
|
@@ -51,6 +51,14 @@ Each message contains:
|
|
|
51
51
|
| `sender` | Sender information (includes `name`) |
|
|
52
52
|
| `content` | Message content |
|
|
53
53
|
|
|
54
|
+
For `post` messages, the attachment zone (top-level `files` array) is rendered as trailing lines in `content`, one per attachment:
|
|
55
|
+
|
|
56
|
+
- `<file key="file_xxx" name="report.pdf"/>` — a file with a display name (same tag style as a standalone `file` message)
|
|
57
|
+
- `<file key="file_xxx"/>` — a file with an empty display name (the server always backfills names, so this branch is rare but valid on the wire)
|
|
58
|
+
- `<folder key="file_xxx" name="assets"/>` — a folder (`is_folder: true`, same tag style as a standalone `folder` message)
|
|
59
|
+
|
|
60
|
+
Use `--format json` to see the full content without table truncation — note the content is the rendered text (including the `<file>`/`<folder>` lines above), not the raw post JSON. Attachment file keys rendered in the tags are eligible for [`+messages-resources-download`](lark-im-messages-resources-download.md) via `--download-resources`.
|
|
61
|
+
|
|
54
62
|
## Usage Scenarios
|
|
55
63
|
|
|
56
64
|
### Scenario 1: Fetch the full content of a specific message
|
|
@@ -187,6 +187,7 @@ lark-cli im +messages-reply --message-id om_xxx --msg-type interactive --content
|
|
|
187
187
|
| `--video <path\|url\|key>` | One content option | Cwd-relative local video path, URL, or `file_key` (`file_xxx`); **must be used together with `--video-cover`** |
|
|
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
|
+
| `--attachment <key>` | One content option | Repeatable bare file/folder key (`file_xxx`); merges into the post message's attachment zone. Requires a post message (`--markdown` or `--msg-type post`). Name/size/mime/is_folder are filled by the server from file service metadata, not taken from the client. Use this instead of `--file` when the file should render inside a rich-text message's attachment area |
|
|
190
191
|
| `--reply-in-thread` | No | Reply inside the thread. The reply appears in the target message's thread instead of the main chat stream |
|
|
191
192
|
| `--idempotency-key <key>` | No | Idempotency key, max 50 characters; the same key sends only one reply within 1 hour |
|
|
192
193
|
| `--as <identity>` | No | Identity type: `bot` or `user` (default `bot`) |
|
|
@@ -206,6 +207,7 @@ lark-cli im +messages-reply --message-id om_xxx --msg-type interactive --content
|
|
|
206
207
|
- Using `--content` without making the JSON match the effective `--msg-type`.
|
|
207
208
|
- Explicitly setting `--msg-type` to something that conflicts with `--text`, `--markdown`, or media flags.
|
|
208
209
|
- Mixing `--text`, `--markdown`, or `--content` with media flags in one command.
|
|
210
|
+
- Using `--attachment` with `--text` or a media flag. The attachment zone only exists on `post` messages — pair `--attachment` with `--markdown` or `--msg-type post`.
|
|
209
211
|
|
|
210
212
|
## Return Value
|
|
211
213
|
|
|
@@ -34,6 +34,7 @@ When using `--as user`, the message is sent as the authorized end user and requi
|
|
|
34
34
|
| Send plain text exactly as written | `--text` | Preserves literal text; no Markdown conversion |
|
|
35
35
|
| Precisely control the final payload | `--content` | You provide the exact JSON for `text` / `post` / `interactive` / `share_*` / media payloads |
|
|
36
36
|
| Send image / file / video / audio | `--image` / `--file` / `--video` / `--audio` | Shortcut uploads URLs, or cwd-relative local files automatically |
|
|
37
|
+
| Attach files/folders to a post message's attachment zone | `--attachment` | Repeatable, as bare `file_key` (`file_xxx`); merges into the post content's `files` array. Requires a post message (`--markdown` or `--msg-type post`). Name/metadata are filled by the server, not the client |
|
|
37
38
|
|
|
38
39
|
### `--text` vs `--markdown`
|
|
39
40
|
|
|
@@ -190,12 +191,13 @@ lark-cli im +messages-send --chat-id oc_xxx --msg-type interactive --content '<c
|
|
|
190
191
|
| `--video <path\|url\|key>` | One content option | Cwd-relative local video path, URL, or `file_key` (`file_xxx`). Local paths and URLs are uploaded automatically. **Must be paired with `--video-cover`** |
|
|
191
192
|
| `--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
193
|
| `--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`) |
|
|
194
|
+
| `--attachment <key>` | One content option | Repeatable bare file/folder key (`file_xxx`); merges into the post message's attachment zone. Requires a post message (`--markdown` or `--msg-type post`). Name/size/mime/is_folder are filled by the server from file service metadata, not taken from the client. Use this instead of `--file` when the file should render inside a rich-text message's attachment area |
|
|
193
195
|
| `--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
196
|
| `--idempotency-key <key>` | No | Idempotency key, max 50 characters; the same key sends only one message within 1 hour |
|
|
195
197
|
| `--as <identity>` | No | Identity type: `bot` or `user` (default `bot`) |
|
|
196
198
|
| `--dry-run` | No | Print the request only, do not execute it |
|
|
197
199
|
|
|
198
|
-
> **Mutual exclusivity rule:** `--text`, `--markdown`, `--content`, and `--image`/`--file`/`--video`/`--audio` cannot be used together. Media flags are also mutually exclusive with each other.
|
|
200
|
+
> **Mutual exclusivity rule:** `--text`, `--markdown`, `--content`, and `--image`/`--file`/`--video`/`--audio` cannot be used together. Media flags are also mutually exclusive with each other. `--attachment` cannot be combined with a `--content` that already contains a `files` array (the attachment zone is declared either via `--content` or via `--attachment`, not both).
|
|
199
201
|
>
|
|
200
202
|
> **Video cover rule:** `--video` **must** be accompanied by `--video-cover`. Omitting `--video-cover` when using `--video` will fail validation. `--video-cover` cannot be used without `--video`.
|
|
201
203
|
|
|
@@ -209,13 +211,15 @@ lark-cli im +messages-send --chat-id oc_xxx --msg-type interactive --content '<c
|
|
|
209
211
|
- Using `--content` without making the JSON match the effective `--msg-type`.
|
|
210
212
|
- Explicitly setting `--msg-type` to something that conflicts with `--text`, `--markdown`, or media flags.
|
|
211
213
|
- Mixing `--text`, `--markdown`, or `--content` with media flags in one command.
|
|
214
|
+
- Using `--attachment` with `--text` or a media flag. The attachment zone only exists on `post` messages — pair `--attachment` with `--markdown` or `--msg-type post`.
|
|
215
|
+
- Using `--file` when the file should sit inside a rich-text message's attachment area. `--file` sends a standalone `file`-type message; use `--attachment` (with `--markdown` or post `--content`) to attach files/folders inside a post message.
|
|
212
216
|
|
|
213
217
|
## `content` Format Reference
|
|
214
218
|
|
|
215
219
|
| `msg_type` | Example `content` |
|
|
216
220
|
|----------|-------------|
|
|
217
221
|
| `text` | `{"text":"Hello <at user_id=\"ou_xxx\">name</at>"}` |
|
|
218
|
-
| `post` | `{"zh_cn":{"title":"Title","content":[[{"tag":"text","text":"Body"}]]}}` |
|
|
222
|
+
| `post` | `{"zh_cn":{"title":"Title","content":[[{"tag":"text","text":"Body"}]]},"files":[{"key":"file_xxx"}]}` — the top-level `files` array is the attachment zone; each entry carries a file/folder `key` (name/metadata are backfilled by the server from file service metadata — a client-supplied `name` has no effect) |
|
|
219
223
|
| `image` | `{"image_key":"img_xxx"}` |
|
|
220
224
|
| `file` | `{"file_key":"file_xxx"}` |
|
|
221
225
|
| `audio` | `{"file_key":"file_xxx"}` |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lark-markdown
|
|
3
3
|
version: 1.2.2
|
|
4
|
-
description: "飞书 Markdown
|
|
4
|
+
description: "飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。"
|
|
5
5
|
metadata:
|
|
6
6
|
requires:
|
|
7
7
|
bins: ["lark-cli"]
|
|
@@ -105,8 +105,8 @@ lark-cli vc +meeting-events --as <source_identity> --meeting-id <meeting_id> --p
|
|
|
105
105
|
- [查询妙记及其产物](scenes/query-minutes-and-artifacts.md):已有妙记 URL / `minute_token`,或按标题、所有者、参与者搜索妙记;读取总结、待办、章节、关键词、逐字稿,下载原始音视频,或查询关联智能纪要。
|
|
106
106
|
- [生成和修改妙记、管理妙记权限](scenes/create-and-edit-minutes.md):将本地音视频生成妙记、逐字稿、总结、待办或章节;修改妙记标题、总结、待办、关键词或说话人;申请妙记权限,或查看、分配妙记协作者权限。
|
|
107
107
|
- [查询智能纪要及关联产物](scenes/query-note-and-artifacts.md):已有 `note_id`、智能纪要 Docx URL/token,或需要查询纪要正文、逐字稿、妙记和共享文档等关联产物。
|
|
108
|
-
- [应用机器人参会与会中互动](scenes/live-meeting-attend.md)
|
|
109
|
-
- [会中事件与会中互动](scenes/live-meeting-interact.md)
|
|
108
|
+
- [应用机器人参会与会中互动](scenes/live-meeting-attend.md):完整编排应用机器人的活跃会议发现、发起或加入、邀请、事件拉取、会议截图、文本/表情/倒计时互动、结束会议和明确授权后的离会。
|
|
109
|
+
- [会中事件与会中互动](scenes/live-meeting-interact.md):在不触发新的入会/离会操作时,使用用户身份或已在会中的应用身份查询活跃会议、查看发言/聊天/共享内容、按需读取当前会议画面,或发送文本/表情、操作倒计时。
|
|
110
110
|
|
|
111
111
|
## 命令参考
|
|
112
112
|
|
|
@@ -119,7 +119,11 @@ lark-cli vc +meeting-events --as <source_identity> --meeting-id <meeting_id> --p
|
|
|
119
119
|
| `vc +meeting-list-active` | 发现当前可见的进行中会议 | [lark-vc-meeting-list-active](references/lark-vc-meeting-list-active.md) |
|
|
120
120
|
| `vc +meeting-events` | 读取会中事件和共享内容 | [lark-vc-meeting-events](references/lark-vc-meeting-events.md) |
|
|
121
121
|
| `vc +meeting-message-send` | 发送会中文本消息或表情 | [lark-vc-meeting-message-send](references/lark-vc-meeting-message-send.md) |
|
|
122
|
+
| `vc +meeting-screenshot` | 获取视频会议截图 | [lark-vc-meeting-screenshot](references/lark-vc-meeting-screenshot.md) |
|
|
123
|
+
| `vc +meeting-countdown` | 设置、延长、提前结束或关闭会中倒计时 | [lark-vc-meeting-countdown](references/lark-vc-meeting-countdown.md) |
|
|
122
124
|
| `vc +meeting-join` | 让应用机器人加入会议 | [lark-vc-agent-meeting-join](references/lark-vc-agent-meeting-join.md) |
|
|
125
|
+
| `vc +meeting-invite` | 以应用机器人邀请指定用户或全部合格日程参会人 | [lark-vc-agent-meeting-invite](references/lark-vc-agent-meeting-invite.md) |
|
|
126
|
+
| `vc +meeting-end` | 让当前 Host 应用机器人结束会议 | [lark-vc-agent-meeting-end](references/lark-vc-agent-meeting-end.md) |
|
|
123
127
|
| `vc +meeting-leave` | 让应用机器人离开会议 | [lark-vc-agent-meeting-leave](references/lark-vc-agent-meeting-leave.md) |
|
|
124
128
|
| `minutes +search` | 搜索妙记 | [lark-minutes-search](references/lark-minutes-search.md) |
|
|
125
129
|
| `minutes minutes get` | 查询妙记基础信息 | `lark-cli minutes minutes get --help` |
|
|
@@ -112,6 +112,7 @@ lark-cli minutes +summary --minute-token obcnxxxxxxxxxxxxxxxxxxxx --summary @sum
|
|
|
112
112
|
| 总结展示为原始 Markdown 文本 | — | 总结含链接、四级标题等妙记端无法渲染的语法 | 改用标题(#~###)、加粗、列表等可展示格式;接口不会因此报错 |
|
|
113
113
|
| 参数无效 | — | `minute_token` 缺失或格式错误 | 检查 token 是否完整 |
|
|
114
114
|
| 权限不足 | — | 缺少 `minutes:minutes:update` | 运行 `auth login --scope "minutes:minutes:update"` |
|
|
115
|
+
| `error.subtype` = `quota_exceeded` | 2091008 | 该妙记生成时 ASR/AI 额度已用尽,AI 总结未完整生成,替换无法落库 | 让用户去该妙记详情页查看额度详细信息;CLI 无法补充额度,重试不会成功 |
|
|
115
116
|
|
|
116
117
|
## 相关场景
|
|
117
118
|
- [生成和修改妙记](../scenes/create-and-edit-minutes.md)
|
|
@@ -38,6 +38,9 @@ lark-cli minutes +todo --minute-token obcnxxxxxxxxxxxxxxxxxxxx --operation delet
|
|
|
38
38
|
|
|
39
39
|
# 预览
|
|
40
40
|
lark-cli minutes +todo --minute-token obcnxxxxxxxxxxxxxxxxxxxx --operation add --todo "新待办" --is-done --dry-run --as user
|
|
41
|
+
|
|
42
|
+
# 新增待办并指定负责人(负责人以内联 @ 提及写进 --todo 内容,这是妙记待办表示归属的既定写法)
|
|
43
|
+
lark-cli minutes +todo --minute-token obcnxxxxxxxxxxxxxxxxxxxx --operation add --todo "跟进预算审批 @张三" --is-done=false --as user
|
|
41
44
|
```
|
|
42
45
|
|
|
43
46
|
## 参数
|
|
@@ -94,7 +97,41 @@ lark-cli minutes +todo --minute-token obcnxxxxxxxxxxxxxxxxxxxx --operation add -
|
|
|
94
97
|
|
|
95
98
|
`content` **不是 Markdown**,请直接传入待办描述文字。
|
|
96
99
|
|
|
97
|
-
### 3.
|
|
100
|
+
### 3. 负责人 / `@` 提及(既定写法,必读)
|
|
101
|
+
|
|
102
|
+
用户说"负责人是某某"时,既定写法是把负责人以内联 `@某某` 追加进 `--todo` 内容:
|
|
103
|
+
|
|
104
|
+
- 用户已经直接给出姓名时(例如"负责人是张三"),**不做任何查找**,原文原样拼进 `--todo` 内容,写成纯文本 `@张三`(`--todo "xxx @张三"`)。
|
|
105
|
+
- 用户说"负责人是我"时,**必须**先取当前登录用户的真实姓名再拼接,禁止直接写成字面的 `@我`:
|
|
106
|
+
- 执行 `lark-cli contact +get-user --as user`,取返回中的姓名字段作为真实姓名,拼成 `--todo "xxx @<真实姓名>"`。
|
|
107
|
+
- 如果这一步失败或取不到姓名(无权限、报错等),**不要**写任何 `@` 提及占位——直接用不带负责人后缀的原始待办文本创建(`--todo "xxx"`),不要保留字面的 `@我`。
|
|
108
|
+
- **不要**因为要处理负责人而改路由到 [lark-task](../../lark-task/SKILL.md) 或做进一步的通讯录搜索——第一优先级永远是落地这条待办;姓名解析只影响追加的 `@` 文本,绝不能阻塞或取消待办创建。
|
|
109
|
+
- **不要**用"创建者是谁 / 以什么身份创建"来代替 `@` 提及——创建时用的 `--as user`/`--as bot` 身份和"负责人"是两件不相关的事,即使已知当前用户真实姓名,也必须把它拼进 `content` 文本,不能只在回复里用"以你的身份创建即归属于你"这类说法搪塞。
|
|
110
|
+
- 回复里**不要**主动提及或建议改用 `lark-task` 作为"想要明确负责人/可指派任务"的替代方案——用户说的负责人只是这条妙记待办里的一段文本,和 Task 完全无关,不要引入 Task 增加用户困惑。
|
|
111
|
+
- 内联 `@` 是妙记待办表示负责人的既定写法。回复只陈述结果(妙记、待办内容、负责人、完成状态),**不要**出现"接口只支持 content 和 is_done""没有独立的负责人字段""所以只能把负责人写进内容里"这类实现限制说明或解释性免责。
|
|
112
|
+
|
|
113
|
+
**结果示例**:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# 姓名解析成功
|
|
117
|
+
lark-cli minutes +todo --minute-token obcnxxxxxxxxxxxxxxxxxxxx --operation add --todo "跟进预算审批 @王小明" --is-done=false --as user
|
|
118
|
+
|
|
119
|
+
# "我"解析失败:不写 @ 提及,仅保留原始内容
|
|
120
|
+
lark-cli minutes +todo --minute-token obcnxxxxxxxxxxxxxxxxxxxx --operation add --todo "跟进预算审批" --is-done=false --as user
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"minute_token": "obcnxxxxxxxxxxxxxxxxxxxx",
|
|
126
|
+
"count": 1,
|
|
127
|
+
"updated": true,
|
|
128
|
+
"operation": "add"
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
妙记里新增的这条待办的 `content` 字段就是最终拼好的文本本身(`"跟进预算审批 @王小明"` 或解析失败时的 `"跟进预算审批"`);CLI 和这个接口都不会、也不需要把它转换成真正可点击的用户提及。
|
|
133
|
+
|
|
134
|
+
### 4. 所需权限
|
|
98
135
|
|
|
99
136
|
| 身份 | 所需 scope |
|
|
100
137
|
|------|-----------|
|
|
@@ -120,6 +157,7 @@ lark-cli minutes +todo --minute-token obcnxxxxxxxxxxxxxxxxxxxx --operation add -
|
|
|
120
157
|
| `--todos` 与单条 flags 冲突 | 二选一 |
|
|
121
158
|
| `todos[i]` 校验失败 | 检查该条 `operation` 与字段组合 |
|
|
122
159
|
| `error.subtype` = `permission_denied` | **妙记资源无编辑权**:向妙记所有者申请该妙记的编辑/协作权限;**不要**走 `auth login --scope` |
|
|
160
|
+
| `error.subtype` = `quota_exceeded` | **该妙记生成时 ASR/AI 额度已用尽**,AI 待办未完整生成,改待办无法落库:让用户去该妙记详情页查看额度详细信息;CLI 无法补充额度,重试不会成功 |
|
|
123
161
|
| 缺少 OAuth scope(`error.missing_scopes` 含 `minutes:minutes:update`) | `lark-cli auth login --scope "minutes:minutes:update"` |
|
|
124
162
|
|
|
125
163
|
## 相关场景
|
|
@@ -61,5 +61,11 @@ API 会立即返回 `minute_url`,但妙记可能仍在异步生成中。`minut
|
|
|
61
61
|
| `minute_url` | 生成的妙记访问链接 |
|
|
62
62
|
| `minute_token` | 从 `minute_url` 提取出的妙记 Token,可直接传给 `minutes +detail --minute-tokens` |
|
|
63
63
|
|
|
64
|
+
## 常见错误与排查
|
|
65
|
+
|
|
66
|
+
| 错误现象 | 错误码 | 根本原因 | 解决方案 |
|
|
67
|
+
|---------|--------|---------|---------|
|
|
68
|
+
| `error.subtype` = `quota_exceeded` | 2091008 | ASR/AI 额度已用尽,不足以转写这个音视频,妙记未创建 | 让用户去妙记详情页查看额度详细信息;CLI 无法补充或提升额度,重试同一个 `--file-token` 不会成功 |
|
|
69
|
+
|
|
64
70
|
## 相关场景
|
|
65
71
|
- [生成和修改妙记](../scenes/create-and-edit-minutes.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# vc +meeting-end
|
|
2
|
+
|
|
3
|
+
当前 Host 应用 Bot 结束会议。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
lark-cli vc +meeting-end --as bot --meeting-id 7628568141510692381 --yes
|
|
7
|
+
lark-cli vc +meeting-end --as bot --meeting-id 7628568141510692381 --dry-run
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
正常执行必须显式传入 `--yes`;`--dry-run` 不会结束会议。
|
|
11
|
+
|
|
12
|
+
## 参数
|
|
13
|
+
|
|
14
|
+
| 参数 | 必填 | 说明 |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| `--meeting-id` | 是 | 长数字 Meeting ID,不是 9 位会议号。 |
|
|
17
|
+
|
|
18
|
+
仅支持应用身份,调用 `POST /open-apis/vc/v1/bots/end`;仅当前 Host Bot 可结束进行中的会议。
|
|
19
|
+
|
|
20
|
+
所需应用 Scope:`vc:meeting.bot.manage:write`。
|
|
21
|
+
|
|
22
|
+
## 常见失败原因
|
|
23
|
+
|
|
24
|
+
- 当前应用 Bot 不在会议中:先使用同一应用 Bot 发起或加入该 Calendar 会议,再执行结束。
|
|
25
|
+
- 应用 Bot 在会中但不是当前 Host:将 Host 转交给该 Bot,或由当前 Host/Owner 结束会议。
|
|
26
|
+
- 会议未启用 Agent 会议能力:确认会议设置及会议 Owner 的必要灰度开关。
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# vc +meeting-invite
|
|
2
|
+
|
|
3
|
+
通过 Agent Bot API 邀请指定用户,或一键邀请符合条件的 Calendar 参会人。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
lark-cli vc +meeting-invite --as bot --meeting-id 7628568141510692381 --type SELECTED --open-ids ou_xxx,ou_yyy
|
|
7
|
+
lark-cli vc +meeting-invite --as bot --meeting-id 7628568141510692381 --type ALL_SUGGESTED
|
|
8
|
+
lark-cli vc +meeting-invite --as bot --meeting-id 7628568141510692381 --type ALL_SUGGESTED --dry-run
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 参数
|
|
12
|
+
|
|
13
|
+
| 参数 | 必填 | 说明 |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| `--meeting-id` | 是 | 长数字 Meeting ID,不是 9 位会议号。 |
|
|
16
|
+
| `--type` | 是 | `SELECTED` 或 `ALL_SUGGESTED`,大小写不敏感。 |
|
|
17
|
+
| `--open-ids` | `SELECTED` 时必填 | 用户 `open_id`(`ou_xxx`),支持逗号分隔或重复传入,最多 200 个;`ALL_SUGGESTED` 时不得传入。 |
|
|
18
|
+
|
|
19
|
+
该 shortcut 仅支持 bot 身份,调用 `POST /open-apis/vc/v1/bots/invite`。
|
|
20
|
+
|
|
21
|
+
- `SELECTED` 显式发送用户 `open_id`;本地会在请求前拒绝超过 200 个 ID 的输入。
|
|
22
|
+
- `ALL_SUGGESTED` 只发送邀请类型。服务端根据 Calendar 状态解析一键邀请候选集,并应用 200 人上限。
|
|
23
|
+
- 请求契约:`SELECTED` 发送 `invite_type=2`、`invitees=[{"id":"ou_xxx","user_type":1}]` 和查询参数 `user_id_type=open_id`;`ALL_SUGGESTED` 发送 `invite_type=1` 且省略 `invitees`。
|
|
24
|
+
- 返回契约:`SELECTED` 可返回显式受邀人的 `invite_results`;CLI 会按响应 `id` 展示每项 `invited` 或 `failed` 状态。`ALL_SUGGESTED` 仅返回聚合字段,不返回逐用户 `invite_results`。
|
|
25
|
+
- `ALL_SUGGESTED` 的 `has_more=true` 表示候选人超过服务端单次 200 人上限,不是可翻页信号。该接口没有 continuation 或 `page_token`;CLI 会显示截断提示而不输出 `has_more`。
|
|
26
|
+
|
|
27
|
+
## 权限与前置条件
|
|
28
|
+
|
|
29
|
+
- 目标必须是 Calendar VC 会议,且应用 Bot 已在会中。
|
|
30
|
+
- Agent Invite 依赖会议的 Agent 加入能力。日程未开启 AI/Agent 会议设置时,邀请请求会失败。
|
|
31
|
+
- 仅包含一名受邀人的 `SELECTED` 复用普通单点邀请策略,普通会中参会人也可能有权邀请该用户。
|
|
32
|
+
- `ALL_SUGGESTED` 和多用户 `SELECTED` 使用批量/建议列表邀请策略。实际调用时 Bot 应为当前 host 或 co-host;普通参会 Bot 可能没有批量邀请权限。
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
```bash
|
|
13
13
|
# 仅指定会议号(无密码)
|
|
14
14
|
lark-cli vc +meeting-join --as bot --meeting-number 123456789
|
|
15
|
+
|
|
16
|
+
# 发起日程会议(仅应用身份)
|
|
17
|
+
lark-cli vc +meeting-join --as bot --meeting-number 123456789 --action start
|
|
15
18
|
```
|
|
16
19
|
|
|
17
20
|
## 参数
|
|
@@ -21,6 +24,7 @@ lark-cli vc +meeting-join --as bot --meeting-number 123456789
|
|
|
21
24
|
| `--meeting-number <no>` | 是 | 会议号,必须为 **9 位纯数字** |
|
|
22
25
|
| `--password <pw>` | 否 | 会议密码,仅在该会议设置了入会密码时传入 |
|
|
23
26
|
| `--call-id <id>` | 否 | 从 `vc.bot.meeting_invited_v1` 邀请事件透传的 `call_id`,原样回传即可。Agent 主动入会或无邀请事件来源时不传 |
|
|
27
|
+
| `--action join\|start` | 否 | 默认 `join`,保持普通入会链路;`start` 是日程发起专属参数,用同一 `bots/join` API 发起会议,且必须 `--as bot` |
|
|
24
28
|
| `--dry-run` | 否 | 预览 API 调用,不实际加入会议;会议号或身份不确定时先用它确认请求 |
|
|
25
29
|
|
|
26
30
|
## 核心约束
|
|
@@ -29,6 +33,8 @@ lark-cli vc +meeting-join --as bot --meeting-number 123456789
|
|
|
29
33
|
|
|
30
34
|
这是应用机器人入会能力,使用 `--as bot`。不要用当前登录用户身份尝试让应用机器人入会。
|
|
31
35
|
|
|
36
|
+
默认 `join` 不会向请求体写入 `action` 字段,也不进入日程发起筛选。`--action start` 才写入 `action: 2`,单独进入日程发起的筛选与校验。
|
|
37
|
+
|
|
32
38
|
### 2. 会议号格式严格校验
|
|
33
39
|
|
|
34
40
|
`--meeting-number` 必须是 9 位纯数字,否则本地校验直接报错:
|
|
@@ -40,7 +46,7 @@ lark-cli vc +meeting-join --as bot --meeting-number 123456789
|
|
|
40
46
|
|
|
41
47
|
### 3. 会议必须已开始且允许入会
|
|
42
48
|
|
|
43
|
-
-
|
|
49
|
+
- `--action join` 要求会议处于**进行中**状态;`--action start` 用于启动符合条件的日程会议。
|
|
44
50
|
- 若会议设置了**等候室 / 入会审批**,应用机器人可能需要主持人放行后才真正入会。
|
|
45
51
|
- 若返回 `HTTP 403: no permission`(错误码 `121003`),不要只理解成“账号没权限”。这类报错更常见的原因是:会议参数或会控配置当前不满足入会条件,例如会议号填错、密码未传或错误、会议尚未开始、等候室 / 入会审批未放行、会议禁止外部/特定身份加入等。应先确认这些配置项,再重试。
|
|
46
52
|
|
|
@@ -75,7 +81,7 @@ lark-cli vc +meeting-join --as bot --meeting-number 123456789
|
|
|
75
81
|
|---------|---------|---------|
|
|
76
82
|
| `--meeting-number must be exactly 9 digits` | 会议号不是 9 位纯数字 | 检查是否误传了会议链接或 meeting_id |
|
|
77
83
|
| 会议密码错误 | `--password` 错误或未提供 | 向主持人确认会议密码 |
|
|
78
|
-
| 会议不存在 / 已结束 | 会议号错误或会议未进行中 |
|
|
84
|
+
| 会议不存在 / 已结束 | 会议号错误或会议未进行中 | 确认会议正在进行中;启动日程会议时改用 `--action start` |
|
|
79
85
|
| `HTTP 403: no permission` / `121003` | 入会前置条件不满足,通常不是单纯 scope 问题 | 依次确认:1)会议允许智能体加入;2)会议号正确;3)如有密码,已正确传入 `--password`;4)会议已开始;5)等候室 / 入会审批已放行;6)会议未禁止当前身份加入(如限制外部、限制应用机器人、仅特定成员可入会);确认后重试 |
|
|
80
86
|
| 应用身份权限不足 | 应用权限、租户安装或权限可访问的数据范围未配置完整 | 不要执行 `auth login`。以 CLI 返回的 metadata / error envelope 为准确认缺失权限;检查应用发布/安装,以及开放平台“权限可访问的数据范围”:选择“按条件筛选”,条件为“会议的归属者 包含 与应用的可用范围一致”;配置正确仍失败时,保留错误码和 `log_id`,按服务端权限异常排查 |
|
|
81
87
|
| 入会被拒绝 | 等候室 / 入会审批 / 限制外部入会 | 联系主持人放行或调整会议设置 |
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# vc +meeting-countdown
|
|
2
|
+
|
|
3
|
+
设置、延长、提前结束或关闭会中倒计时窗口。
|
|
4
|
+
|
|
5
|
+
本 skill 对应 shortcut:`lark-cli vc +meeting-countdown`(调用 `POST /open-apis/vc/v1/bots/countdown`)。
|
|
6
|
+
|
|
7
|
+
## 适用场景
|
|
8
|
+
|
|
9
|
+
- 用户要求在正在进行中的会议里设置倒计时,例如“设置 5 分钟倒计时”。
|
|
10
|
+
- 用户要求延长当前倒计时,例如“再延长 2 分钟”。
|
|
11
|
+
- 用户要求提前结束或关闭当前倒计时。
|
|
12
|
+
- 只用于正在进行中的会议;已结束会议不支持。
|
|
13
|
+
|
|
14
|
+
## 身份规则
|
|
15
|
+
|
|
16
|
+
`meeting_id` 从哪种身份路径拿到,操作倒计时时就沿用哪种身份:
|
|
17
|
+
|
|
18
|
+
| meeting_id 来源 | 操作时身份 |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| `+meeting-list-active --as user` | `+meeting-countdown --as user` |
|
|
21
|
+
| `+meeting-list-active --as bot --user-id <user_open_id>` | `+meeting-countdown --as bot` |
|
|
22
|
+
| `+meeting-join --as bot` 返回的 `meeting.id` | `+meeting-countdown --as bot` |
|
|
23
|
+
|
|
24
|
+
不要把用户身份发现的 `meeting_id` 改用应用身份操作,也不要把应用身份发现的 `meeting_id` 改用用户身份操作,除非用户明确要求切换。
|
|
25
|
+
|
|
26
|
+
## 参数
|
|
27
|
+
|
|
28
|
+
| 参数 | 说明 |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `--meeting-id` | 必填,长数字 `meeting_id`,不是 9 位会议号 |
|
|
31
|
+
| `--action` | 必填,`set`、`prolong`、`end_in_advance` 或 `close_window` |
|
|
32
|
+
| `--duration` | 倒计时时长,单位是分钟;`set` 和 `prolong` 必填 |
|
|
33
|
+
| `--need-play-audio-at-end` | 仅 `set` 可用,表示倒计时结束时播放提示音 |
|
|
34
|
+
| `--reminder-before-end` | 仅 `set` 可用,提醒点单位是分钟;只支持传一个值 |
|
|
35
|
+
|
|
36
|
+
`duration` 和 `reminder_before_end` 都是分钟;提醒时间必须大于 0 且小于 `duration`。
|
|
37
|
+
|
|
38
|
+
## 设置倒计时
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
lark-cli vc +meeting-countdown --as user \
|
|
42
|
+
--meeting-id <meeting_id> \
|
|
43
|
+
--action set \
|
|
44
|
+
--duration 5 \
|
|
45
|
+
--need-play-audio-at-end \
|
|
46
|
+
--reminder-before-end 1
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Dry-run 请求体示例:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"meeting_id": "<meeting_id>",
|
|
54
|
+
"action": "set",
|
|
55
|
+
"duration": 5,
|
|
56
|
+
"need_play_audio_at_end": true,
|
|
57
|
+
"reminder_before_end": 1
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 延长倒计时
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
lark-cli vc +meeting-countdown --as bot \
|
|
65
|
+
--meeting-id <meeting_id> \
|
|
66
|
+
--action prolong \
|
|
67
|
+
--duration 2
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 提前结束或关闭倒计时
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
lark-cli vc +meeting-countdown --as user --meeting-id <meeting_id> --action end_in_advance
|
|
74
|
+
lark-cli vc +meeting-countdown --as user --meeting-id <meeting_id> --action close_window
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
提前结束或关闭倒计时窗口时不要传 `--duration`、`--need-play-audio-at-end` 或 `--reminder-before-end`。
|
|
78
|
+
|
|
79
|
+
## 9 位会议号处理
|
|
80
|
+
|
|
81
|
+
如果用户给的是 9 位会议号并要求操作倒计时:
|
|
82
|
+
|
|
83
|
+
1. 先按当前身份执行 `+meeting-list-active`。
|
|
84
|
+
2. 在返回结果中按 `meeting_no` 匹配该 9 位会议号。
|
|
85
|
+
3. 匹配到唯一会议后取长数字 `meeting_id`。
|
|
86
|
+
4. 用发现该会议时的同一身份执行 `+meeting-countdown`。
|
|
87
|
+
|
|
88
|
+
匹配失败时不要自动入会。只有用户明确要求“让应用机器人入会/旁听/代参会”时,才改用 `+meeting-join`。
|
|
89
|
+
|
|
90
|
+
## 权限和前置条件
|
|
91
|
+
|
|
92
|
+
- 用户身份:当前用户必须正在该会议中。
|
|
93
|
+
- 应用身份:应用机器人必须正在该会议中。
|
|
94
|
+
- 需要 `vc:meeting.interaction:write` 权限;应用身份还需要应用已安装、数据范围已配置。
|
|
95
|
+
|
|
96
|
+
应用身份权限错误时,不要引导用户反复 `auth login`。按主 skill 的“应用身份权限配置检查”处理。
|
|
97
|
+
|
|
98
|
+
## 相关
|
|
99
|
+
|
|
100
|
+
- [lark-vc-meeting-list-active](lark-vc-meeting-list-active.md) — 发现当前进行中会议 ID
|
|
101
|
+
- [lark-vc-meeting-events](lark-vc-meeting-events.md) — 读取会中事件
|
|
102
|
+
- [lark-vc-meeting-message-send](lark-vc-meeting-message-send.md) — 发送会中文本或 reaction
|
|
103
|
+
- [lark-vc-agent-meeting-join](lark-vc-agent-meeting-join.md) — 应用机器人入会
|
|
@@ -252,6 +252,7 @@ lark-cli drive +list-replies \
|
|
|
252
252
|
| `magic_share_started` | 开始共享内容 / 文档 |
|
|
253
253
|
| `magic_share_ended` | 结束共享 |
|
|
254
254
|
| `document_context_changed` | 评论聚焦、章节定位或元素预览上下文变化 |
|
|
255
|
+
| `countdown_changed` | 会中倒计时被设置、延长、提前结束、关闭窗口,或自然结束、临近提醒 |
|
|
255
256
|
|
|
256
257
|
### Forwarding meeting chat and reactions to IM
|
|
257
258
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `vc +meeting-screenshot`
|
|
2
|
+
|
|
3
|
+
获取视频会议截图,并保存为 JPEG。
|
|
4
|
+
|
|
5
|
+
## 常用用法
|
|
6
|
+
|
|
7
|
+
使用当前用户身份截图,文件写入默认目录:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
lark-cli vc +meeting-screenshot --as user --meeting-id <long_meeting_id>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
使用机器人身份截图,并指定输出路径:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
lark-cli vc +meeting-screenshot --as bot --meeting-id <long_meeting_id> --output ./meeting-screenshots/current.jpg
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 参数
|
|
20
|
+
|
|
21
|
+
| Flag | 含义与用法 |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `--as <identity>` | 选择 `user` 或 `bot` 身份。使用发现 `meeting_id` 时的同一身份:`user` 要求当前用户在会中;`bot` 要求机器人已入会并具备会中读取权限。 |
|
|
24
|
+
| `--meeting-id <meeting_id>` | 必填。长数字会议 ID,不接受 9 位会议号;只有会议号时,先用同一身份调用 `vc +meeting-list-active` 获取。 |
|
|
25
|
+
| `--output <relative-path>` | 可选。指定 JPEG 文件名或包含子目录的相对路径;相对于执行命令时的当前工作目录。 |
|
|
26
|
+
| `--overwrite` | 可选。目标文件已存在时允许替换;不传时命令会失败并保留原文件。 |
|
|
27
|
+
|
|
28
|
+
## 文件路径与结果
|
|
29
|
+
|
|
30
|
+
- 未指定 `--output` 时,默认写入当前工作目录下的 `meeting-screenshots/<meeting_id>-<UTC timestamp>.jpg`。
|
|
31
|
+
- `--output` 可以只写文件名,也可以包含多级子目录;父目录会自动创建。
|
|
32
|
+
- 不接受绝对路径,也不接受解析后超出当前工作目录的 `..` 或符号链接路径。
|
|
33
|
+
- 成功结果包含绝对文件路径、字节数、JPEG content type、SHA-256 和服务端 `log_id`。
|
|
34
|
+
- 服务端决定截图内容并校验会议是否满足条件;调用方不能指定要截取的区域或共享内容。失败不会替换已有文件。
|