@m1heng-clawd/feishu 0.1.11 → 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.
Files changed (46) hide show
  1. package/README.md +123 -4
  2. package/index.ts +6 -6
  3. package/package.json +13 -3
  4. package/skills/feishu-doc/SKILL.md +40 -2
  5. package/skills/feishu-task/SKILL.md +210 -0
  6. package/src/bitable-tools/index.ts +1 -0
  7. package/src/bot.ts +181 -70
  8. package/src/channel.ts +2 -0
  9. package/src/config-schema.ts +4 -0
  10. package/src/doc-tools/actions.ts +341 -0
  11. package/src/doc-tools/common.ts +33 -0
  12. package/src/doc-tools/index.ts +2 -0
  13. package/src/doc-tools/register.ts +90 -0
  14. package/src/{doc-schema.ts → doc-tools/schemas.ts} +31 -1
  15. package/src/drive-tools/actions.ts +182 -0
  16. package/src/drive-tools/common.ts +18 -0
  17. package/src/drive-tools/index.ts +2 -0
  18. package/src/drive-tools/register.ts +71 -0
  19. package/src/{drive-schema.ts → drive-tools/schemas.ts} +2 -1
  20. package/src/media.ts +5 -3
  21. package/src/perm-tools/actions.ts +111 -0
  22. package/src/perm-tools/common.ts +18 -0
  23. package/src/perm-tools/index.ts +2 -0
  24. package/src/perm-tools/register.ts +65 -0
  25. package/src/policy.ts +13 -0
  26. package/src/reply-dispatcher.ts +6 -4
  27. package/src/send.ts +33 -2
  28. package/src/task-tools/actions.ts +466 -13
  29. package/src/task-tools/constants.ts +13 -0
  30. package/src/task-tools/index.ts +1 -0
  31. package/src/task-tools/register.ts +175 -13
  32. package/src/task-tools/schemas.ts +433 -4
  33. package/src/text/markdown-links.ts +104 -0
  34. package/src/types.ts +1 -0
  35. package/src/wiki-tools/actions.ts +166 -0
  36. package/src/wiki-tools/common.ts +18 -0
  37. package/src/wiki-tools/index.ts +2 -0
  38. package/src/wiki-tools/register.ts +66 -0
  39. package/src/bitable.ts +0 -1
  40. package/src/docx.ts +0 -276
  41. package/src/drive.ts +0 -237
  42. package/src/perm.ts +0 -165
  43. package/src/task.ts +0 -1
  44. package/src/wiki.ts +0 -223
  45. /package/src/{perm-schema.ts → perm-tools/schemas.ts} +0 -0
  46. /package/src/{wiki-schema.ts → wiki-tools/schemas.ts} +0 -0
package/README.md CHANGED
@@ -5,6 +5,12 @@ Feishu/Lark (飞书) channel plugin for [OpenClaw](https://github.com/openclaw/o
5
5
  > **中文社区资料** - 配置教程、常见问题、使用技巧:[Wiki](https://github.com/m1heng/clawdbot-feishu/wiki)
6
6
  >
7
7
  > **Contributing / 贡献指南**: [CONTRIBUTING.md](./CONTRIBUTING.md)
8
+ >
9
+ > **Issue Reporting / 问题反馈**: Please check [Discussions](https://github.com/m1heng/clawdbot-feishu/discussions) first for common solutions, then open a structured Issue Form if needed.
10
+ > 问题反馈前请先查看 [Discussions](https://github.com/m1heng/clawdbot-feishu/discussions) 是否已有常见解答;如仍未解决,再提交结构化 Issue 模板。
11
+ >
12
+ > **Questions / 使用咨询**: Use `Question` issue for troubleshooting; use [Discussions](https://github.com/m1heng/clawdbot-feishu/discussions) for open-ended Q&A.
13
+ > 排查型咨询请提交 `Question` Issue;开放式交流请使用 [Discussions](https://github.com/m1heng/clawdbot-feishu/discussions)。
8
14
 
9
15
  [English](#english) | [中文](#中文)
10
16
 
@@ -77,6 +83,9 @@ openclaw plugins update feishu
77
83
  | `wiki:wiki:readonly` | `feishu_wiki` | List spaces, list nodes, get node info, search |
78
84
  | `bitable:app:readonly` | `feishu_bitable` | Read bitable records and fields |
79
85
  | `task:task:read` | `feishu_task_get` | Get task details |
86
+ | `task:tasklist:read` | `feishu_tasklist_get`, `feishu_tasklist_list` | Get/list tasklists |
87
+ | `task:comment:read` | `feishu_task_comment_list`, `feishu_task_comment_get` | List/get task comments |
88
+ | `task:attachment:read` | `feishu_task_attachment_list`, `feishu_task_attachment_get` | List/get task attachments |
80
89
 
81
90
  **Read-write** (optional, for create/edit/delete operations):
82
91
 
@@ -87,9 +96,44 @@ openclaw plugins update feishu
87
96
  | `drive:drive` | `feishu_doc`, `feishu_drive` | Upload images to documents, create folders, move/delete files |
88
97
  | `wiki:wiki` | `feishu_wiki` | Create/move/rename wiki nodes |
89
98
  | `bitable:app` | `feishu_bitable` | Create/update/delete bitable records and manage fields |
90
- | `task:task:write` | `feishu_task_create`, `feishu_task_update`, `feishu_task_delete` | Create/update/delete tasks |
99
+ | `task:task:write` | `feishu_task_create`, `feishu_task_subtask_create`, `feishu_task_update`, `feishu_task_delete` | Create/update/delete tasks |
100
+ | `task:tasklist:write` | `feishu_tasklist_create`, `feishu_tasklist_update`, `feishu_tasklist_delete`, `feishu_tasklist_add_members`, `feishu_tasklist_remove_members`, `feishu_task_add_tasklist`, `feishu_task_remove_tasklist` | Create/update/delete tasklists and manage membership |
101
+ | `task:comment:write` | `feishu_task_comment_create`, `feishu_task_comment_update`, `feishu_task_comment_delete` | Create/update/delete task comments |
102
+ | `task:attachment:write` | `feishu_task_attachment_upload`, `feishu_task_attachment_delete` | Upload/delete task attachments |
103
+
104
+ > Task scope names may vary slightly in Feishu console UI. If needed, search for Task / Tasklist / Comment / Attachment-related permissions and grant read/write accordingly.
105
+
106
+ #### Task Comment Scopes ⚠️
107
+
108
+ Task comments require dedicated scopes:
109
+ 1. Read comments: grant `task:comment:read`.
110
+ 2. Create/update/delete comments: grant `task:comment:write`.
111
+
112
+ If these scopes are missing, comment APIs will return permission-denied errors.
113
+
114
+ #### Task Attachment Upload ⚠️
115
+
116
+ Task attachments support upload/get/list/delete. Upload sources:
117
+ 1. Local files on the OpenClaw/Node host (`file_path`)
118
+ 2. Remote links (`file_url`, public or presigned)
119
+
120
+ For `file_url`, OpenClaw runtime media loader is used with safety checks and size limit (`mediaMaxMb`), then the downloaded file is uploaded via a temporary local file.
121
+
122
+ #### Tasklist Ownership ⚠️
91
123
 
92
- > Task scope names may vary slightly in Feishu console UI. If needed, search for Task-related permissions and grant read/write accordingly.
124
+ > **Important:** Keep tasklist owner as the bot. Add users as members instead.
125
+
126
+ Tasklist access is granted based on owner + member roles. If you change the owner to a user and the bot is not a member, the bot may lose permission to read/edit/manage that tasklist (and subsequent operations will fail).
127
+
128
+ #### Task Visibility & Subtasks ⚠️
129
+
130
+ > **Important:** A user can only view a task when they are included as an assignee.
131
+ >
132
+ > **Limitation:** The bot can currently only create subtasks for tasks created by itself.
133
+
134
+ To avoid “task created but not visible” issues:
135
+ 1. When creating a task, set the requesting user as an assignee.
136
+ 2. If you need more flexible subtask organization/visibility, consider using tasklists.
93
137
 
94
138
  #### Drive Access ⚠️
95
139
 
@@ -174,6 +218,10 @@ channels:
174
218
  groupPolicy: "allowlist"
175
219
  # Require @mention in groups
176
220
  requireMention: true
221
+ # Group command mention bypass: "never" | "single_bot" | "always"
222
+ # Default "single_bot": allow authorized command-only messages without @
223
+ # only when the group has a single bot.
224
+ groupCommandMentionBypass: "single_bot"
177
225
  # Max media size in MB (default: 30)
178
226
  mediaMaxMb: 30
179
227
  # Render mode for bot replies: "auto" | "raw" | "card"
@@ -255,6 +303,21 @@ Top-level `channels.feishu.dmPolicy` / `channels.feishu.allowFrom` are fallback
255
303
  > `dmPolicy` only controls who can trigger the bot.
256
304
  > To actually read/write docs or files, you still need: (1) correct Feishu app scopes, and (2) sharing the target resources (Drive/Wiki/Bitable) with the bot.
257
305
 
306
+ #### Group Command Mention Bypass
307
+
308
+ When `requireMention: true`, Feishu can still allow authorized control commands (such as `/new`) without `@bot`.
309
+
310
+ | `groupCommandMentionBypass` | Behavior |
311
+ |----------------------------|----------|
312
+ | `never` | Never bypass `@` requirement for group commands. |
313
+ | `single_bot` | Bypass only when the group contains at most one bot (default). |
314
+ | `always` | Always allow authorized control commands to bypass mention gating. |
315
+
316
+ Notes:
317
+ - Bypass only applies to authorized control commands in group chats.
318
+ - If any user is explicitly `@`-mentioned in the same message, bypass is disabled.
319
+ - In DMs, this setting does not apply.
320
+
258
321
  #### Connection Mode
259
322
 
260
323
  Two connection modes are available for receiving events from Feishu:
@@ -471,6 +534,9 @@ openclaw plugins update feishu
471
534
  | `wiki:wiki:readonly` | `feishu_wiki` | 列出空间、列出节点、获取节点详情、搜索 |
472
535
  | `bitable:app:readonly` | `feishu_bitable` | 读取多维表格记录和字段 |
473
536
  | `task:task:read` | `feishu_task_get` | 获取任务详情 |
537
+ | `task:tasklist:read` | `feishu_tasklist_get`, `feishu_tasklist_list` | 获取/列出任务清单(tasklists) |
538
+ | `task:comment:read` | `feishu_task_comment_list`, `feishu_task_comment_get` | 列出/获取任务评论 |
539
+ | `task:attachment:read` | `feishu_task_attachment_list`, `feishu_task_attachment_get` | 列出/获取任务附件 |
474
540
 
475
541
  **读写权限**(可选,用于创建/编辑/删除操作):
476
542
 
@@ -481,9 +547,44 @@ openclaw plugins update feishu
481
547
  | `drive:drive` | `feishu_doc`, `feishu_drive` | 上传图片到文档、创建文件夹、移动/删除文件 |
482
548
  | `wiki:wiki` | `feishu_wiki` | 创建/移动/重命名知识库节点 |
483
549
  | `bitable:app` | `feishu_bitable` | 创建/更新/删除多维表格记录并管理字段 |
484
- | `task:task:write` | `feishu_task_create`, `feishu_task_update`, `feishu_task_delete` | 创建/更新/删除任务 |
550
+ | `task:task:write` | `feishu_task_create`, `feishu_task_subtask_create`, `feishu_task_update`, `feishu_task_delete` | 创建/更新/删除任务 |
551
+ | `task:tasklist:write` | `feishu_tasklist_create`, `feishu_tasklist_update`, `feishu_tasklist_delete`, `feishu_tasklist_add_members`, `feishu_tasklist_remove_members`, `feishu_task_add_tasklist`, `feishu_task_remove_tasklist` | 创建/更新/删除任务清单并管理成员/关联任务 |
552
+ | `task:comment:write` | `feishu_task_comment_create`, `feishu_task_comment_update`, `feishu_task_comment_delete` | 创建/更新/删除任务评论 |
553
+ | `task:attachment:write` | `feishu_task_attachment_upload`, `feishu_task_attachment_delete` | 上传/删除任务附件 |
554
+
555
+ > 飞书控制台中任务权限的显示名称可能略有差异,必要时可按关键字 `task` / `tasklist` / `comment` / `attachment` 搜索并授予对应读写权限。
556
+
557
+ #### 任务评论权限 ⚠️
558
+
559
+ 任务评论需要单独授权:
560
+ 1. 读取评论:授予 `task:comment:read`。
561
+ 2. 创建/更新/删除评论:授予 `task:comment:write`。
562
+
563
+ 缺少上述权限时,评论相关接口会返回权限不足错误。
564
+
565
+ #### 任务附件上传 ⚠️
566
+
567
+ 任务附件支持上传/获取/列表/删除。上传来源:
568
+ 1. OpenClaw/Node 所在机器的本地文件路径(`file_path`)
569
+ 2. 可直接下载的远程链接(`file_url`,公开/预签名 URL)
570
+
571
+ `file_url` 上传路径会使用 OpenClaw 运行时的媒体下载安全校验与大小限制(`mediaMaxMb`),随后经临时本地文件上传到任务附件。
572
+
573
+ #### 任务清单所有者限制 ⚠️
574
+
575
+ > **重要:** 创建/修改任务清单时,请保持清单所有者为机器人本身,只把用户作为协作人添加。
485
576
 
486
- > 飞书控制台中任务权限的显示名称可能略有差异,必要时可按关键字 `task` 搜索并授予对应读写权限。
577
+ 任务清单权限基于“所有者 + 协作成员角色”授予。如果把清单所有者改成用户、且机器人不在协作成员中,机器人可能会失去对该清单的读取/编辑/管理权限,导致后续对清单的操作失败。
578
+
579
+ #### 任务限制 ⚠️
580
+
581
+ > **重要:** 只有当任务责任人包含用户时,用户才能查看到该任务。
582
+ >
583
+ > **限制:** 机器人目前只能给自己创建出来的任务创建子任务。
584
+
585
+ 为避免“任务创建了但用户看不到”的问题:
586
+ 1. 创建任务时,请把发起用户设为任务负责人(`assignee`)。
587
+ 2. 如需更灵活的子任务创建/组织/可见性管理,建议使用任务清单(tasklists)。
487
588
 
488
589
  #### 云空间访问权限 ⚠️
489
590
 
@@ -568,6 +669,9 @@ channels:
568
669
  groupPolicy: "allowlist"
569
670
  # 群聊是否需要 @机器人
570
671
  requireMention: true
672
+ # 群聊命令绕过 @ 策略: "never" | "single_bot" | "always"
673
+ # 默认 "single_bot":仅当群内机器人数量 <= 1 时,允许已授权命令免 @
674
+ groupCommandMentionBypass: "single_bot"
571
675
  # 媒体文件最大大小 (MB, 默认 30)
572
676
  mediaMaxMb: 30
573
677
  # 回复渲染模式: "auto" | "raw" | "card"
@@ -649,6 +753,21 @@ channels:
649
753
  > `dmPolicy` 只控制“是否允许触发机器人”。
650
754
  > 真正执行文档/云盘/知识库/多维表格操作,还需要两层权限:1)应用 API 权限(scopes);2)把目标资源分享给机器人。
651
755
 
756
+ #### 群聊命令免 @ 策略
757
+
758
+ 当 `requireMention: true` 时,Feishu 仍可让“已授权控制命令(如 `/new`)”在不 `@bot` 的情况下通过。
759
+
760
+ | `groupCommandMentionBypass` | 行为 |
761
+ |----------------------------|------|
762
+ | `never` | 群聊命令永不绕过 `@` 校验。 |
763
+ | `single_bot` | 仅当群内机器人数量不超过 1 个时才允许绕过(默认)。 |
764
+ | `always` | 已授权控制命令始终可绕过 `@` 校验。 |
765
+
766
+ 说明:
767
+ - 仅对群聊中的“已授权控制命令”生效。
768
+ - 同一条消息里如果显式 `@` 了任意用户,则不会触发命令免 `@`。
769
+ - 私聊场景不受该配置影响。
770
+
652
771
  #### 连接模式
653
772
 
654
773
  支持两种从飞书接收事件的连接模式:
package/index.ts CHANGED
@@ -2,12 +2,12 @@ import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
2
2
  import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
3
3
  import { feishuPlugin } from "./src/channel.js";
4
4
  import { setFeishuRuntime } from "./src/runtime.js";
5
- import { registerFeishuDocTools } from "./src/docx.js";
6
- import { registerFeishuWikiTools } from "./src/wiki.js";
7
- import { registerFeishuDriveTools } from "./src/drive.js";
8
- import { registerFeishuPermTools } from "./src/perm.js";
9
- import { registerFeishuBitableTools } from "./src/bitable.js";
10
- import { registerFeishuTaskTools } from "./src/task.js";
5
+ import { registerFeishuDocTools } from "./src/doc-tools/index.js";
6
+ import { registerFeishuWikiTools } from "./src/wiki-tools/index.js";
7
+ import { registerFeishuDriveTools } from "./src/drive-tools/index.js";
8
+ import { registerFeishuPermTools } from "./src/perm-tools/index.js";
9
+ import { registerFeishuBitableTools } from "./src/bitable-tools/index.js";
10
+ import { registerFeishuTaskTools } from "./src/task-tools/index.js";
11
11
 
12
12
  export { monitorFeishuProvider } from "./src/monitor.js";
13
13
  export {
package/package.json CHANGED
@@ -1,12 +1,20 @@
1
1
  {
2
2
  "name": "@m1heng-clawd/feishu",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "description": "OpenClaw Feishu/Lark channel plugin",
6
+ "scripts": {
7
+ "test:unit": "vitest run",
8
+ "test:unit:watch": "vitest",
9
+ "test:coverage": "vitest run --coverage",
10
+ "ci:check": "npx tsc --noEmit && npm run test:coverage"
11
+ },
6
12
  "license": "MIT",
7
13
  "files": [
8
14
  "index.ts",
9
- "src",
15
+ "src/**/*.ts",
16
+ "!src/**/__tests__/**",
17
+ "!src/**/*.test.ts",
10
18
  "skills",
11
19
  "openclaw.plugin.json"
12
20
  ],
@@ -51,10 +59,12 @@
51
59
  "zod": "^4.3.6"
52
60
  },
53
61
  "devDependencies": {
62
+ "@vitest/coverage-v8": "^2.1.8",
54
63
  "@types/node": "^25.0.10",
55
64
  "openclaw": "2026.2.13",
56
65
  "tsx": "^4.21.0",
57
- "typescript": "^5.7.0"
66
+ "typescript": "^5.7.0",
67
+ "vitest": "^2.1.8"
58
68
  },
59
69
  "peerDependencies": {
60
70
  "openclaw": ">=2026.2.13"
@@ -1,16 +1,17 @@
1
1
  ---
2
2
  name: feishu-doc
3
3
  description: |
4
- Feishu document read/write operations. Activate when user mentions Feishu docs, cloud docs, or docx links.
4
+ Feishu document read/write operations + comment management. Activate when user mentions Feishu docs, cloud docs, docx links, or document comments.
5
5
  ---
6
6
 
7
7
  # Feishu Document Tool
8
8
 
9
- Single tool `feishu_doc` with action parameter for all document operations.
9
+ Single tool `feishu_doc` with action parameter for all document operations including comment management.
10
10
 
11
11
  ## Token Extraction
12
12
 
13
13
  From URL `https://xxx.feishu.cn/docx/ABC123def` → `doc_token` = `ABC123def`
14
+ From URL `https://xxx.feishu.cn/docs/doccn123c` → `doc_token` = `doccn123c`
14
15
 
15
16
  ## Actions
16
17
 
@@ -101,6 +102,39 @@ Returns full block data including tables, images. Use this to read structured co
101
102
  { "action": "delete_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }
102
103
  ```
103
104
 
105
+ ### List Comments
106
+
107
+ ```json
108
+ { "action": "list_comments", "doc_token": "ABC123def", "page_size": 50 }
109
+ ```
110
+
111
+ Returns all comments for the document. Use `page_token` for pagination. Comments include `is_whole` field to distinguish between whole-document comments (true) and block-level comments (false).
112
+
113
+ ### Get Single Comment
114
+
115
+ ```json
116
+ { "action": "get_comment", "doc_token": "ABC123def", "comment_id": "comment_xxx" }
117
+ ```
118
+
119
+ ### Create Comment
120
+
121
+ ```json
122
+ { "action": "create_comment", "doc_token": "ABC123def", "content": "Comment text" }
123
+ ```
124
+
125
+ ### List Comment Replies
126
+
127
+ ```json
128
+ { "action": "list_comment_replies", "doc_token": "ABC123def", "comment_id": "comment_xxx", "page_size": 50 }
129
+ ```
130
+
131
+ `page_size` should be a positive integer. If omitted, tool defaults to `50`.
132
+
133
+ ### Comment Write Scope
134
+
135
+ Current tool provides documented comment write action `create_comment` (global comment creation).
136
+ For replies, use `list_comment_replies` for retrieval; the reply creation endpoint is not exposed in current SDK surface.
137
+
104
138
  ## Reading Workflow
105
139
 
106
140
  1. Start with `action: "read"` - get plain text + statistics
@@ -121,3 +155,7 @@ channels:
121
155
  ## Permissions
122
156
 
123
157
  Required: `docx:document`, `docx:document:readonly`, `docx:document.block:convert`, `drive:drive`
158
+
159
+ For comment operations:
160
+ - Read comments: `docx:document.comment:read`
161
+ - Write comments: `docx:document.comment` (optional, for create_comment)
@@ -0,0 +1,210 @@
1
+ ---
2
+ name: feishu-task
3
+ description: |
4
+ Feishu Task, tasklist, subtask, comment, and attachment management. Activate when user mentions tasks, tasklists, subtasks, task comments, task attachments, or task links.
5
+ ---
6
+
7
+ # Feishu Task Tools
8
+
9
+ Tools:
10
+ - `feishu_task_create`
11
+ - `feishu_task_subtask_create`
12
+ - `feishu_task_get`
13
+ - `feishu_task_update`
14
+ - `feishu_task_delete`
15
+ - `feishu_task_comment_create`
16
+ - `feishu_task_comment_list`
17
+ - `feishu_task_comment_get`
18
+ - `feishu_task_comment_update`
19
+ - `feishu_task_comment_delete`
20
+ - `feishu_task_attachment_upload`
21
+ - `feishu_task_attachment_list`
22
+ - `feishu_task_attachment_get`
23
+ - `feishu_task_attachment_delete`
24
+ - `feishu_task_add_tasklist`
25
+ - `feishu_task_remove_tasklist`
26
+ - `feishu_tasklist_create`
27
+ - `feishu_tasklist_get`
28
+ - `feishu_tasklist_list`
29
+ - `feishu_tasklist_update`
30
+ - `feishu_tasklist_delete`
31
+ - `feishu_tasklist_add_members`
32
+ - `feishu_tasklist_remove_members`
33
+
34
+ ## Notes
35
+
36
+ - `task_guid` can be taken from a task URL (guid query param) or from `feishu_task_get` output.
37
+ - `comment_id` can be obtained from `feishu_task_comment_list` output.
38
+ - `attachment_guid` can be obtained from `feishu_task_attachment_list` output.
39
+ - `user_id_type` controls returned/accepted user identity type (`open_id`, `user_id`, `union_id`).
40
+ - If no assignee is specified, set the assignee to the requesting user. Avoid creating unassigned tasks because the user may not be able to view them.
41
+ - Task visibility: users can only view tasks when they are included as assignee.
42
+ - Current limitation: the bot can only create subtasks for tasks created by itself.
43
+ - Attachment upload supports local `file_path` and remote `file_url`. Remote URLs are fetched with runtime media safety checks and size limit (`mediaMaxMb`).
44
+ - Keep tasklist owner as the bot. Add users as members to avoid losing bot access.
45
+ - Use tasklist tools for tasklist membership changes; do not use `feishu_task_update` to move tasks between tasklists.
46
+
47
+ ## Create Task
48
+
49
+ ```json
50
+ {
51
+ "summary": "Quarterly review",
52
+ "description": "Prepare review notes",
53
+ "due": { "timestamp": "1735689600000", "is_all_day": true },
54
+ "members": [
55
+ { "id": "ou_xxx", "role": "assignee", "type": "user" }
56
+ ],
57
+ "user_id_type": "open_id"
58
+ }
59
+ ```
60
+
61
+ ## Create Subtask
62
+
63
+ ```json
64
+ {
65
+ "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
66
+ "summary": "Draft report outline",
67
+ "description": "Collect key metrics",
68
+ "due": { "timestamp": "1735689600000", "is_all_day": true },
69
+ "members": [
70
+ { "id": "ou_xxx", "role": "assignee", "type": "user" }
71
+ ],
72
+ "user_id_type": "open_id"
73
+ }
74
+ ```
75
+
76
+ ## Create Comment
77
+
78
+ ```json
79
+ {
80
+ "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
81
+ "content": "Looks good to me",
82
+ "user_id_type": "open_id"
83
+ }
84
+ ```
85
+
86
+ ## Upload Attachment (file_path)
87
+
88
+ ```json
89
+ {
90
+ "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
91
+ "file_path": "/path/to/report.pdf",
92
+ "user_id_type": "open_id"
93
+ }
94
+ ```
95
+
96
+ ## Upload Attachment (file_url)
97
+
98
+ ```json
99
+ {
100
+ "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
101
+ "file_url": "https://oss-example.com/bucket/report.pdf",
102
+ "filename": "report.pdf",
103
+ "user_id_type": "open_id"
104
+ }
105
+ ```
106
+
107
+ ## Tasklist Membership For Tasks
108
+
109
+ ### Add Task to Tasklist
110
+
111
+ ```json
112
+ {
113
+ "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
114
+ "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
115
+ "section_guid": "6d0f9f48-2e06-4e3d-8a0f-acde196e8c61",
116
+ "user_id_type": "open_id"
117
+ }
118
+ ```
119
+
120
+ ### Remove Task from Tasklist
121
+
122
+ ```json
123
+ {
124
+ "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
125
+ "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
126
+ "user_id_type": "open_id"
127
+ }
128
+ ```
129
+
130
+ ## Tasklists
131
+
132
+ Tasklists support three roles: owner (read/edit/manage), editor (read/edit), viewer (read).
133
+
134
+ ### Create Tasklist
135
+
136
+ ```json
137
+ {
138
+ "name": "Project Alpha Tasklist",
139
+ "members": [
140
+ { "id": "ou_xxx", "type": "user", "role": "editor" }
141
+ ],
142
+ "user_id_type": "open_id"
143
+ }
144
+ ```
145
+
146
+ ### Get Tasklist
147
+
148
+ ```json
149
+ {
150
+ "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
151
+ "user_id_type": "open_id"
152
+ }
153
+ ```
154
+
155
+ ### List Tasklists
156
+
157
+ ```json
158
+ {
159
+ "page_size": 50,
160
+ "page_token": "aWQ9NzEwMjMzMjMxMDE=",
161
+ "user_id_type": "open_id"
162
+ }
163
+ ```
164
+
165
+ ### Update Tasklist
166
+
167
+ ```json
168
+ {
169
+ "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
170
+ "tasklist": {
171
+ "name": "Renamed Tasklist",
172
+ "owner": { "id": "ou_xxx", "type": "user", "role": "owner" }
173
+ },
174
+ "update_fields": ["name", "owner"],
175
+ "origin_owner_to_role": "editor",
176
+ "user_id_type": "open_id"
177
+ }
178
+ ```
179
+
180
+ ### Delete Tasklist
181
+
182
+ ```json
183
+ {
184
+ "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004"
185
+ }
186
+ ```
187
+
188
+ ### Add Tasklist Members
189
+
190
+ ```json
191
+ {
192
+ "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
193
+ "members": [
194
+ { "id": "ou_xxx", "type": "user", "role": "editor" }
195
+ ],
196
+ "user_id_type": "open_id"
197
+ }
198
+ ```
199
+
200
+ ### Remove Tasklist Members
201
+
202
+ ```json
203
+ {
204
+ "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
205
+ "members": [
206
+ { "id": "ou_xxx", "type": "user", "role": "viewer" }
207
+ ],
208
+ "user_id_type": "open_id"
209
+ }
210
+ ```
@@ -0,0 +1 @@
1
+ export { registerFeishuBitableTools } from "./register.js";