@wecom/wecom-openclaw-plugin 2026.4.21-beta.0 → 2026.4.22-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/wecom-doc-manager/SKILL.md +19 -15
- package/skills/wecom-doc-manager/references/api-create-doc.md +1 -1
- package/skills/wecom-doc-manager/references/api-smartpage-create.md +4 -4
- package/skills/wecom-doc-manager/references/api-smartpage-export-task.md +4 -4
- package/skills/wecom-doc-manager/references/api-smartpage-get-export-result.md +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wecom-doc-manager
|
|
3
|
-
description:
|
|
3
|
+
description: 企业微信文档管理技能。支持企业微信文档、智能表格和智能文档(原名智能主页)的管理。具体能力:(1) 获取文档或智能表格的完整内容,以 Markdown 格式导出 (2) 新建文档或智能表格 (3) 用 Markdown 覆写文档内容 (4) 创建智能文档,将本地 Markdown 文件发布为智能文档 (5) 导出智能文档内容为 Markdown 文件。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# 企业微信文档管理
|
|
@@ -9,7 +9,9 @@ description: 企业微信文档管理技能。提供文档和智能主页的创
|
|
|
9
9
|
|
|
10
10
|
> ⚠️ **前置条件**:首次调用 `wecom_mcp` 前,必须按 `wecom-preflight` 技能执行前置条件检查,确保工具已加入白名单。
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
管理企业微信文档和智能文档(原名智能主页)的创建、读取和编辑。文档接口支持通过 `docid` 或 `url` 二选一定位文档。
|
|
13
|
+
|
|
14
|
+
> ⚠️ **重要触发规则**:只有当用户明确提到「**智能文档**」或「**智能主页**」时,才使用智能文档相关接口(`smartpage_*` 系列)。其他所有涉及「文档」的场景(如"创建文档"、"写个文档"、"帮我建个文档"等),一律使用企微文档接口(`create_doc` / `get_doc_content` / `edit_doc_content`)。
|
|
13
15
|
|
|
14
16
|
## URL 品类识别与接口路由
|
|
15
17
|
|
|
@@ -19,12 +21,12 @@ description: 企业微信文档管理技能。提供文档和智能主页的创
|
|
|
19
21
|
|---|---|---|
|
|
20
22
|
| `https://doc.weixin.qq.com/doc/*` | **文档**(doc_type=3) | `get_doc_content` |
|
|
21
23
|
| `https://doc.weixin.qq.com/smartsheet/*` | **智能表格**(doc_type=10) | `get_doc_content` |
|
|
22
|
-
| `https://doc.weixin.qq.com/smartpage/*` |
|
|
24
|
+
| `https://doc.weixin.qq.com/smartpage/*` | **智能文档**(原名智能主页) | `smartpage_export_task` → `smartpage_get_export_result` |
|
|
23
25
|
|
|
24
26
|
**判断规则**:
|
|
25
27
|
- URL 路径以 `/doc/*` 开头 → 文档 → 用 `get_doc_content`
|
|
26
28
|
- URL 路径以 `/smartsheet/*` 开头 → 智能表格 → 用 `get_doc_content`
|
|
27
|
-
- URL 路径以 `/smartpage/*` 开头 →
|
|
29
|
+
- URL 路径以 `/smartpage/*` 开头 → 智能文档(原名智能主页) → 用 `smartpage_export_task`
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
## 调用方式
|
|
@@ -48,7 +50,7 @@ description: 企业微信文档管理技能。提供文档和智能主页的创
|
|
|
48
50
|
|
|
49
51
|
| errcode | errmsg | 含义 | 处理方式 |
|
|
50
52
|
|---------|--------|------|----------|
|
|
51
|
-
| `851002` | `incompatible doc type` | 文档品类与所调用的接口不匹配 |
|
|
53
|
+
| `851002` | `incompatible doc type` | 文档品类与所调用的接口不匹配 | 根据文档 URL 重新确认品类(参见上方「URL 品类识别与接口路由」表),然后使用该品类对应的正确接口重试 |
|
|
52
54
|
|
|
53
55
|
## 文档
|
|
54
56
|
|
|
@@ -89,18 +91,20 @@ description: 企业微信文档管理技能。提供文档和智能主页的创
|
|
|
89
91
|
|
|
90
92
|
参见 [API 详情](references/api-edit-doc-content.md)。
|
|
91
93
|
|
|
92
|
-
##
|
|
94
|
+
## 智能文档(原名智能主页)
|
|
93
95
|
|
|
94
|
-
|
|
96
|
+
适用品类:智能文档(用户说「智能文档」或「智能主页」时触发)
|
|
95
97
|
适用 URL:`/smartpage/*`
|
|
96
98
|
|
|
99
|
+
> ⚠️ 只有当用户明确指定「智能文档」或「智能主页」时,才使用以下接口。其他「文档」场景请使用上方的企微文档接口。
|
|
100
|
+
|
|
97
101
|
适用场景:
|
|
98
|
-
1. 将本地 Markdown
|
|
99
|
-
2.
|
|
102
|
+
1. 将本地 Markdown 文件创建为智能文档
|
|
103
|
+
2. 异步导出智能文档内容为 Markdown 文件
|
|
100
104
|
|
|
101
105
|
### smartpage_create
|
|
102
106
|
|
|
103
|
-
|
|
107
|
+
创建智能文档(原名智能主页),支持传入标题和多个子页面。每个子页面可指定标题、内容类型和本地文件路径。响应透传 mcp 回包,返回 docid 和 url。
|
|
104
108
|
|
|
105
109
|
- 使用 `wecom_mcp` tool 调用 `wecom_mcp call doc smartpage_create '{"title": "项目概览", "pages": [{"page_title": "需求文档", "content_type": 1, "page_filepath": "/path/to/requirements.md"}]}'`
|
|
106
110
|
|
|
@@ -113,7 +117,7 @@ description: 企业微信文档管理技能。提供文档和智能主页的创
|
|
|
113
117
|
|
|
114
118
|
### smartpage_export_task
|
|
115
119
|
|
|
116
|
-
|
|
120
|
+
发起智能文档内容导出任务(异步)。传入 docid 和 content_type,返回 task_id。这是异步导出的第一步,需配合 `smartpage_get_export_result` 轮询获取导出结果。
|
|
117
121
|
|
|
118
122
|
- 使用 `wecom_mcp` tool 调用 `wecom_mcp call doc smartpage_export_task '{"docid": "DOCID", "content_type": 1}'`
|
|
119
123
|
|
|
@@ -121,7 +125,7 @@ description: 企业微信文档管理技能。提供文档和智能主页的创
|
|
|
121
125
|
|
|
122
126
|
### smartpage_get_export_result
|
|
123
127
|
|
|
124
|
-
|
|
128
|
+
查询智能文档导出任务进度。传入 task_id 进行轮询,当 `task_done` 为 `true` 时返回 `content_filepath`(导出内容的本地文件路径)。
|
|
125
129
|
|
|
126
130
|
- 使用 `wecom_mcp` tool 调用 `wecom_mcp call doc smartpage_get_export_result '{"task_id": "TASK_ID"}'`
|
|
127
131
|
|
|
@@ -131,13 +135,13 @@ description: 企业微信文档管理技能。提供文档和智能主页的创
|
|
|
131
135
|
|
|
132
136
|
## 典型工作流
|
|
133
137
|
|
|
134
|
-
> **关键提示**:读取内容前先看 URL 判断品类。`/doc/` 或 `/smartsheet/` → `get_doc_content`;`/smartpage/` → `smartpage_export_task
|
|
138
|
+
> **关键提示**:读取内容前先看 URL 判断品类。`/doc/` 或 `/smartsheet/` → `get_doc_content`;`/smartpage/` → `smartpage_export_task`。只有用户明确提到「智能文档」或「智能主页」时才走 smartpage 流程,其他文档场景一律使用企微文档接口。
|
|
135
139
|
|
|
136
140
|
1. **读取文档/智能表格内容**(URL 含 `/doc/` 或 `/smartsheet/`) → 使用 `wecom_mcp` tool 调用 `wecom_mcp call doc get_doc_content '{"docid": "DOCID", "type": 2}'`,若 `task_done` 为 false 则携带 `task_id` 继续轮询
|
|
137
141
|
2. **创建新文档** → 使用 `wecom_mcp` tool 调用 `wecom_mcp call doc create_doc '{"doc_type": 3, "doc_name": "文档名"}'`,保存返回的 docid
|
|
138
142
|
3. **编辑文档** → 先 get_doc_content 了解当前内容,再 edit_doc_content 覆写
|
|
139
|
-
4.
|
|
140
|
-
5.
|
|
143
|
+
4. **创建智能文档**(仅当用户明确要求「智能文档」或「智能主页」时) → 使用 `wecom_mcp` tool 调用 `wecom_mcp call doc smartpage_create '{"title": "标题", "pages": [{"page_title": "子页面", "content_type": 1, "page_filepath": "/path/to/file.md"}]}'`,保存返回的 docid
|
|
144
|
+
5. **获取智能文档内容**(URL 含 `/smartpage/`,异步两步):
|
|
141
145
|
- **第一步**:使用 `wecom_mcp` tool 调用 `wecom_mcp call doc smartpage_export_task '{"docid": "DOCID", "content_type": 1}'`,获取 `task_id`
|
|
142
146
|
- **第二步**:使用 `wecom_mcp` tool 调用 `wecom_mcp call doc smartpage_get_export_result '{"task_id": "TASK_ID"}'`,若 `task_done` 为 `false` 则继续轮询,直到 `task_done` 为 `true`
|
|
143
147
|
- **第三步**:使用 Read 工具读取 `content_filepath` 指向的本地文件,获取 Markdown 内容
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# smartpage_create API
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
创建智能文档(原智能主页)。支持传入多个子页面,每个子页面可指定标题、内容类型和文件路径。创建成功后返回文档访问链接和 docid。
|
|
4
4
|
|
|
5
5
|
## 技能定义
|
|
6
6
|
|
|
7
7
|
```json
|
|
8
8
|
{
|
|
9
9
|
"name": "smartpage_create",
|
|
10
|
-
"description": "
|
|
10
|
+
"description": "创建智能文档(原智能主页)。支持传入标题和多个子页面配置,每个子页面可指定标题、内容类型(Text/Markdown)和本地文件路径。创建成功后返回 docid 和 url(docid 仅在创建时返回,需妥善保存)。",
|
|
11
11
|
"inputSchema": {
|
|
12
12
|
"properties": {
|
|
13
13
|
"title": {
|
|
14
|
-
"description": "
|
|
14
|
+
"description": "智能文档标题",
|
|
15
15
|
"title": "Title",
|
|
16
16
|
"type": "string"
|
|
17
17
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
| 参数 | 类型 | 必填 | 说明 |
|
|
56
56
|
|---|---|---|---|
|
|
57
|
-
| title | string | 否 |
|
|
57
|
+
| title | string | 否 | 智能文档标题 |
|
|
58
58
|
| pages | array | 是 | 子页面列表 |
|
|
59
59
|
| pages[].page_title | string | 否 | 子页面标题 |
|
|
60
60
|
| pages[].content_type | integer | 否 | 内容类型:1-Markdown,0-Text(纯文本)。**默认应传 1**,仅纯文本内容才传 0 |
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# smartpage_export_task API
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
发起智能文档(原智能主页)内容导出任务。该接口为异步操作的第一步,调用后返回 `task_id`,需配合 `smartpage_get_export_result` 轮询获取导出结果。
|
|
4
4
|
|
|
5
5
|
## 技能定义
|
|
6
6
|
|
|
7
7
|
```json
|
|
8
8
|
{
|
|
9
9
|
"name": "smartpage_export_task",
|
|
10
|
-
"description": "
|
|
10
|
+
"description": "发起智能文档(原智能主页)内容导出任务(异步)。传入 docid 和 content_type,返回 task_id。需配合 smartpage_get_export_result 轮询查询导出进度,直到任务完成后获取导出文件路径。",
|
|
11
11
|
"inputSchema": {
|
|
12
12
|
"properties": {
|
|
13
13
|
"docid": {
|
|
14
|
-
"description": "
|
|
14
|
+
"description": "智能文档的 docid,由 smartpage_create 返回",
|
|
15
15
|
"title": "Doc ID",
|
|
16
16
|
"type": "string"
|
|
17
17
|
},
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
| 参数 | 类型 | 必填 | 说明 |
|
|
35
35
|
|---|---|---|---|
|
|
36
|
-
| docid | string | 是 |
|
|
36
|
+
| docid | string | 是 | 智能文档的 docid |
|
|
37
37
|
| content_type | integer | 是 | 导出内容格式:0-Text,1-Markdown |
|
|
38
38
|
|
|
39
39
|
## 请求示例
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# smartpage_get_export_result API
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
查询智能文档(原智能主页)导出任务的执行进度。配合 `smartpage_export_task` 使用,通过轮询 `task_id` 获取导出结果。当 `task_done` 为 `true` 时,返回导出内容的本地文件路径。
|
|
4
4
|
|
|
5
5
|
## 技能定义
|
|
6
6
|
|
|
7
7
|
```json
|
|
8
8
|
{
|
|
9
9
|
"name": "smartpage_get_export_result",
|
|
10
|
-
"description": "
|
|
10
|
+
"description": "查询智能文档(原智能主页)导出任务进度。传入 task_id 轮询,当 task_done 为 true 时返回导出内容的本地文件路径 content_filepath,可通过读取该文件获取 Markdown 内容。",
|
|
11
11
|
"inputSchema": {
|
|
12
12
|
"properties": {
|
|
13
13
|
"task_id": {
|