@dai_ming/plugin-deliverables 1.0.21 → 1.1.0

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/INSTALL.md CHANGED
@@ -1,216 +1,28 @@
1
1
  # plugin-deliverables 安装文档
2
2
 
3
- 本文档描述 `@dai_ming/plugin-deliverables@1.0.21` 的安装、升级与验证方式。
3
+ 本文档描述 `@dai_ming/plugin-deliverables@1.1.0` 的安装、升级与验证方式。
4
4
 
5
- ## 1. 目标
6
-
7
- 安装完成后,插件应同时提供三类能力:
8
-
9
- 1. MCP 工具:`deliverables__upload_deliverable`
10
- 2. Prompt/Skill 注入:自动把文档类产物收敛到交付物上传流程
11
- 3. Runtime Hook 兜底:
12
- - `before_prompt_build`
13
- - `before_tool_call`
14
- - `message_sending`
15
-
16
- 也就是说,这个版本不只是“把上传工具装进去”,还会阻止 `message + file/media` 这种旁路发送。
17
-
18
- ## 2. 推荐安装方式
19
-
20
- ### 2.1 通过 OpenClaw 原生插件安装
21
-
22
- 适用于已经支持 `openclaw plugins install` 的运行环境。
5
+ ## 安装
23
6
 
24
7
  ```bash
25
- openclaw plugins install @dai_ming/plugin-deliverables@1.0.21 --pin
8
+ openclaw plugins install @dai_ming/plugin-deliverables@1.1.0 --pin
26
9
  openclaw plugins enable plugin-deliverables
27
10
  ```
28
11
 
29
- 安装后建议检查:
30
-
31
- ```bash
32
- openclaw plugins info plugin-deliverables
33
- openclaw plugins list
34
- ```
35
-
36
- 确认点:
37
-
38
- - 插件 id 为 `plugin-deliverables`
39
- - 入口文件为 `index.js`
40
- - 插件状态为 `enabled`
41
-
42
- ### 2.2 通过 claw-gateway Helm 参数安装
43
-
44
- 适用于当前我们这套 pod 生成链路。
45
-
46
- 在 release 的插件列表中加入:
12
+ gateway 部署配置:
47
13
 
48
14
  ```yaml
49
15
  installPlugins:
50
- - "@dai_ming/plugin-deliverables@1.0.21"
16
+ - "@dai_ming/plugin-deliverables@1.1.0"
51
17
  ```
52
18
 
53
- Helm 初始化时会自动完成:
54
-
55
- 1. `npm pack` 下载插件
56
- 2. 解压到扩展目录
57
- 3. 读取 `openclaw-plugin.json` 注入 MCP / skills / AGENTS 规则
58
- 4. 由 OpenClaw 读取 `openclaw.plugin.json` + `index.js` 激活 runtime hooks
19
+ ## 验证
59
20
 
60
- ## 3. 手动安装方式
61
-
62
- 适用于需要在单个 pod 内热修验证的场景。
63
-
64
- ### 3.1 下载与解压
65
-
66
- ```bash
67
- mkdir -p /home/node/.openclaw/extensions-extra/plugin-deliverables
68
- cd /tmp
69
- npm pack @dai_ming/plugin-deliverables@1.0.21 --registry https://registry.npmjs.org
70
- tar xzf dai_ming-plugin-deliverables-1.0.21.tgz \
71
- -C /home/node/.openclaw/extensions-extra/plugin-deliverables \
72
- --strip-components=1
73
- ```
21
+ 1. `openclaw plugins info plugin-deliverables` 能看到插件已启用。
22
+ 2. Agent 工具列表里存在 `deliverables__upload_deliverable`。
23
+ 3. Pod 内不再出现 `node ...mcp-servers/deliverables.js` 进程。
24
+ 4. 生成交付物时,工具返回 `reply_markdown`、`preview_url`、`download_url`。
74
25
 
75
- ### 3.2 安装 MCP 脚本
26
+ ## 说明
76
27
 
77
- ```bash
78
- mkdir -p /home/node/.openclaw/mcp-servers
79
- cp /home/node/.openclaw/extensions-extra/plugin-deliverables/mcp-servers/deliverables.js \
80
- /home/node/.openclaw/mcp-servers/deliverables.js
81
- ```
82
-
83
- ### 3.3 安装 Skill
84
-
85
- ```bash
86
- mkdir -p /home/node/.openclaw/workspace/skills/deliverables
87
- cp /home/node/.openclaw/extensions-extra/plugin-deliverables/skills/deliverables/SKILL.md \
88
- /home/node/.openclaw/workspace/skills/deliverables/SKILL.md
89
- ```
90
-
91
- ### 3.4 注入 AGENTS 规则
92
-
93
- ```bash
94
- AGENTS=/home/node/.openclaw/workspace/AGENTS.md
95
- RULES=/home/node/.openclaw/extensions-extra/plugin-deliverables/agents-rules/deliverables.md
96
-
97
- node - <<'NODE'
98
- const fs = require("fs");
99
- const agents = process.env.AGENTS;
100
- const rules = process.env.RULES;
101
- const block = fs.readFileSync(rules, "utf8").trim();
102
- let body = "";
103
- try {
104
- body = fs.readFileSync(agents, "utf8");
105
- } catch {
106
- body = "";
107
- }
108
- const re = /<!--\s*DELIVERABLE_LINK_RULES_START\s*-->[\s\S]*?<!--\s*DELIVERABLE_AUTO_UPLOAD_RULES_END\s*-->/g;
109
- const next = re.test(body) ? body.replace(re, block) : `${body.trim()}\n\n${block}\n`.trimStart();
110
- fs.writeFileSync(agents, `${next.replace(/\s*$/, "")}\n`);
111
- NODE
112
- ```
113
-
114
- 执行前先导出环境变量:
115
-
116
- ```bash
117
- export AGENTS=/home/node/.openclaw/workspace/AGENTS.md
118
- export RULES=/home/node/.openclaw/extensions-extra/plugin-deliverables/agents-rules/deliverables.md
119
- ```
120
-
121
- ### 3.5 启用 runtime plugin
122
-
123
- 确保 OpenClaw 配置里存在:
124
-
125
- ```json
126
- {
127
- "plugins": {
128
- "entries": {
129
- "plugin-deliverables": {}
130
- }
131
- }
132
- }
133
- ```
134
-
135
- 如果运行环境支持 `openclaw plugins install/enable`,优先使用原生命令;否则要确保插件目录在 OpenClaw 可扫描的 extensions 路径下。
136
-
137
- ## 4. 升级后的验证清单
138
-
139
- ### 4.1 文件级验证
140
-
141
- 确认插件目录内存在:
142
-
143
- ```bash
144
- ls -la /home/node/.openclaw/extensions-extra/plugin-deliverables
145
- ```
146
-
147
- 必须看到:
148
-
149
- - `index.js`
150
- - `openclaw.plugin.json`
151
- - `openclaw-plugin.json`
152
- - `mcp-servers/deliverables.js`
153
-
154
- ### 4.2 Prompt/Skill 验证
155
-
156
- 确认:
157
-
158
- ```bash
159
- rg -n "DELIVERABLE_LINK_RULES_START|DELIVERABLE_AUTO_UPLOAD_RULES_START" /home/node/.openclaw/workspace/AGENTS.md
160
- ls -la /home/node/.openclaw/workspace/skills/deliverables
161
- ```
162
-
163
- ### 4.3 行为验证
164
-
165
- 建议发两类请求:
166
-
167
- 1. 文档类
168
- - `帮我写一篇关于卡卡的介绍,生成 Markdown 并保存为交付物`
169
- 2. 多文件类
170
- - `做一个简单静态网页小游戏,并保存为交付物`
171
-
172
- 预期结果:
173
-
174
- 1. 第一条回复:模型自己的简短内容介绍
175
- 2. 第二条回复:纯一个 https 链接
176
- 3. 不再出现 `message + file_url/media` 的旁路发送
177
- 4. pod stdout 中会多出 `palz summary request/response` 与 `palz links request/response` 四条插件日志
178
-
179
- ## 5. 常见问题
180
-
181
- ### 5.1 安装后工具没出来
182
-
183
- 检查:
184
-
185
- ```bash
186
- ls /home/node/.openclaw/mcp-servers
187
- cat /home/node/.openclaw/openclaw.json
188
- ```
189
-
190
- 确认:
191
-
192
- - `deliverables.js` 已复制
193
- - `mcp.servers.deliverables` 已存在
194
- - `tools.allow` 未把 `deliverables__upload_deliverable` 拦掉
195
-
196
- ### 5.2 文档还是只保存工作区,不上传
197
-
198
- 优先检查:
199
-
200
- 1. `AGENTS.md` 是否有 deliverables 规则块
201
- 2. `skills/deliverables/SKILL.md` 是否存在
202
- 3. runtime plugin 是否被实际加载
203
-
204
- ### 5.3 第二条消息不是纯链接
205
-
206
- 这是上层 prompt 或插件旧版本未生效的典型现象。先确认实际安装版本:
207
-
208
- ```bash
209
- cat /home/node/.openclaw/extensions-extra/plugin-deliverables/package.json
210
- ```
211
-
212
- 必须是:
213
-
214
- ```json
215
- { "version": "1.0.21" }
216
- ```
28
+ 该版本为 OpenClaw Native plugin,不再安装或配置 stdio MCP server。历史 Pod 中残留的 `mcp.servers.deliverables` 会由 gateway 部署逻辑在下一次升级时清理。
package/README.md CHANGED
@@ -1,253 +1,48 @@
1
1
  # @dai_ming/plugin-deliverables
2
2
 
3
- OpenClaw 交付物插件 AI Agent 将生成的文件(文章、HTML 页面、多文件游戏/网站、图片等)自动上传到 OSS,并在会话消息中回显可点击的预览/下载链接。
3
+ OpenClaw Native 插件:注册 `deliverables__upload_deliverable` 原生 agent tool,把 AI 生成的文件上传到 claw-gateway 交付物系统,并返回可分享的预览/下载链接。
4
4
 
5
- ---
5
+ ## 包含内容
6
6
 
7
- ## 插件包含什么
7
+ | 路径 | 说明 |
8
+ | --- | --- |
9
+ | `index.js` | OpenClaw native extension:注册上传工具、注入运行时规则、拦截直接附件旁路 |
10
+ | `openclaw.plugin.json` | OpenClaw 原生插件清单 |
11
+ | `openclaw-plugin.json` | gateway 兼容清单:声明 skill、AGENTS 规则和插件 entry |
12
+ | `skills/deliverables/SKILL.md` | Agent 使用交付物工具的技能说明 |
13
+ | `agents-rules/deliverables.md` | 注入到 workspace `AGENTS.md` 的硬规则 |
8
14
 
9
- | 文件 | 作用 |
10
- |------|------|
11
- | `index.js` | Native OpenClaw runtime 入口:注册 `before_prompt_build`、`before_tool_call`、`message_sending` 三个 hook,阻止旁路文件发送 |
12
- | `openclaw.plugin.json` | Native OpenClaw 插件清单:让 OpenClaw 以 runtime plugin 方式发现并加载本插件 |
13
- | `mcp-servers/deliverables.js` | MCP Server 脚本:实现 `upload_deliverable` 工具,通过 HTTP 调用 claw-gateway API 上传文件 |
14
- | `skills/deliverables/SKILL.md` | OpenClaw Skill:强制文档产出走 `upload_deliverable`,规范写入路径和参数 |
15
- | `agents-rules/deliverables.md` | AGENTS.md 规则块:URL 回显规则 + 自动上传规则(硬约束,注入到每个 workspace 的 AGENTS.md) |
16
- | `openclaw-plugin.json` | claw-gateway 兼容清单:声明 MCP server、skill、AGENTS 规则、openclaw.json 配置段 |
17
-
18
- ---
19
-
20
- ## 安装方式
21
-
22
- ### 方式零:作为原生 OpenClaw runtime 插件安装
23
-
24
- 现在这个包同时支持 OpenClaw 原生插件加载。也就是说,除了网关侧用 `openclaw-plugin.json` 注入 MCP/skill/AGENTS 规则外,OpenClaw 还会读取 `openclaw.plugin.json` + `index.js`,把运行时 hook 也一并启用。
15
+ ## 安装
25
16
 
26
17
  ```bash
27
- openclaw plugins install @dai_ming/plugin-deliverables@1.0.21 --pin
18
+ openclaw plugins install @dai_ming/plugin-deliverables@1.1.0 --pin
28
19
  openclaw plugins enable plugin-deliverables
29
20
  ```
30
21
 
31
- 这一步启用后,插件会额外提供三层兜底:
32
-
33
- 1. `before_prompt_build`:把“交付物必须 upload-first”的硬规则注入到主 agent 和子 agent 的系统上下文
34
- 2. `before_tool_call`:记录 `write` 生成的工作区文件,并阻止通过 `message` 附件字段直接发文件
35
- 3. Palz 出站补丁:最终消息发送前扫描内部工作区路径/近期写入文件,自动上传为交付物并改写成 gateway 链接
36
- 4. `message_sending`:如果仍然有媒体/文件旁路发送,最终发送前直接取消
37
-
38
- > 注意:非 Palz 渠道仍以 `before_prompt_build` + `before_tool_call` + `message_sending` 兜底为主;Palz 渠道具备自动上传和文本改写能力。
39
-
40
- ### 方式一:通过 claw-gateway Helm 部署(推荐)
41
-
42
- 只需在 Helm values 里把插件加入 `installPlugins` 列表,gateway 和 Helm initContainer 会自动完成所有配置:
22
+ 通过 gateway 部署时加入 `installPlugins`:
43
23
 
44
24
  ```yaml
45
- # values.yaml(或 claw-gateway 管理界面的 Helm 参数)
46
25
  installPlugins:
47
- - "@dai_ming/plugin-deliverables@1.0.21"
48
- ```
49
-
50
- initContainer 执行顺序:
51
- 1. **Phase 3**:`npm pack @dai_ming/plugin-deliverables@1.0.21` 下载 tarball → 解压到 `/data/extensions-extra/plugin-deliverables/`
52
- 2. **Phase 3b**:在插件目录执行 `npm install --omit=dev`(本插件无运行时依赖,此步骤跳过)
53
- 3. **Phase 3e**:读取 `openclaw-plugin.json` 清单,自动:
54
- - 复制 `mcp-servers/deliverables.js` → `/data/mcp-servers/deliverables.js`
55
- - 安装 `skills/deliverables/SKILL.md` → 所有 workspace 的 `skills/deliverables/SKILL.md`
56
- - 注入 `agents-rules/deliverables.md` 内容到所有 workspace 的 `AGENTS.md`(幂等,按 marker 替换)
57
- 4. **OpenClaw runtime 加载**:OpenClaw 发现 `openclaw.plugin.json` + `index.js` 后,会自动启用 runtime hooks
58
-
59
- > **env 变量**:MCP Server 需要以下变量(claw-gateway 在生成 `mcp.servers` 配置时会自动注入):
60
- >
61
- > | 变量 | 说明 | 默认值 |
62
- > |------|------|--------|
63
- > | `CLAW_GATEWAY_URL` | gateway 内部地址 | `http://claw-gateway:8080` |
64
- > | `CLAW_GATEWAY_PUBLIC_URL` | gateway 公网地址(用于生成预览链接) | 同上 |
65
- > | `CLAW_GATEWAY_API_KEY` | API Key | `api-key-1` |
66
-
67
- ### 方式二:手动安装(不使用 claw-gateway 自动部署)
68
-
69
- 适用于自行管理 OpenClaw 容器的场景。
70
-
71
- **Step 1 — 下载并解压插件**
72
-
73
- ```bash
74
- npm config set registry https://registry.npmmirror.com
75
- mkdir -p ~/.openclaw/extensions-extra/plugin-deliverables
76
- cd /tmp && npm pack @dai_ming/plugin-deliverables
77
- tar xzf openclaw-plugin-deliverables-*.tgz -C ~/.openclaw/extensions-extra/plugin-deliverables --strip-components=1
26
+ - "@dai_ming/plugin-deliverables@1.1.0"
78
27
  ```
79
28
 
80
- **Step 2 — 复制 MCP Server 脚本**
29
+ ## 运行方式
81
30
 
82
- ```bash
83
- mkdir -p ~/.openclaw/mcp-servers
84
- cp ~/.openclaw/extensions-extra/plugin-deliverables/mcp-servers/deliverables.js \
85
- ~/.openclaw/mcp-servers/deliverables.js
86
- ```
87
-
88
- **Step 3 — 安装 Skill**
89
-
90
- ```bash
91
- WORKSPACE=~/.openclaw/workspace # 替换为实际 workspace 路径
92
- mkdir -p "$WORKSPACE/skills/deliverables"
93
- cp ~/.openclaw/extensions-extra/plugin-deliverables/skills/deliverables/SKILL.md \
94
- "$WORKSPACE/skills/deliverables/SKILL.md"
95
- ```
96
-
97
- **Step 4 — 注入 AGENTS.md 规则**
98
-
99
- ```bash
100
- AGENTS="$WORKSPACE/AGENTS.md"
101
- RULES=~/.openclaw/extensions-extra/plugin-deliverables/agents-rules/deliverables.md
102
-
103
- if grep -q "DELIVERABLE_LINK_RULES_START" "$AGENTS" 2>/dev/null; then
104
- # 已有旧规则,用 Node.js 按 marker 替换
105
- node -e "
106
- var fs=require('fs');
107
- var a=fs.readFileSync('$AGENTS','utf8');
108
- var r=fs.readFileSync('$RULES','utf8').trim();
109
- var re=/<!--\s*DELIVERABLE_LINK_RULES_START\s*-->[\s\S]*?<!--\s*DELIVERABLE_AUTO_UPLOAD_RULES_END\s*-->/g;
110
- fs.writeFileSync('$AGENTS', re.test(a) ? a.replace(re,r) : a+'\n\n'+r+'\n');
111
- "
112
- else
113
- # 首次注入
114
- printf '\n\n' >> "$AGENTS"
115
- cat "$RULES" >> "$AGENTS"
116
- fi
117
- ```
118
-
119
- **Step 5 — 配置 openclaw.json**
31
+ 这个版本不再通过 `mcp.servers` 注入 stdio MCP 进程。OpenClaw 会读取 `package.json` 里的 `openclaw.extensions`,加载 `index.js` 并注册 native tool:
120
32
 
121
- 在 `~/.openclaw/openclaw.json` 的 `mcp.servers` 下添加:
122
-
123
- ```json
124
- {
125
- "mcp": {
126
- "servers": {
127
- "deliverables": {
128
- "command": "node",
129
- "args": ["/home/node/.openclaw/mcp-servers/deliverables.js"],
130
- "env": {
131
- "CLAW_GATEWAY_URL": "http://<your-gateway-host>:8080",
132
- "CLAW_GATEWAY_PUBLIC_URL": "https://<public-domain>",
133
- "CLAW_GATEWAY_API_KEY": "<your-api-key>"
134
- }
135
- }
136
- }
137
- },
138
- "plugins": {
139
- "entries": {
140
- "plugin-deliverables": { "enabled": true }
141
- }
142
- }
143
- }
33
+ ```text
34
+ deliverables__upload_deliverable
144
35
  ```
145
36
 
146
- ---
147
-
148
- ## AGENTS.md 规则说明
149
-
150
- 插件向每个 workspace 的 `AGENTS.md` 注入两段硬约束规则:
151
-
152
- | 规则段 | Marker | 作用 |
153
- |--------|--------|------|
154
- | URL 回显规则 | `DELIVERABLE_LINK_RULES_START` … `DELIVERABLE_LINK_RULES_END` | 强制 Agent 上传后在消息中输出可点击的 Markdown 链接 |
155
- | 自动上传规则 | `DELIVERABLE_AUTO_UPLOAD_RULES_START` … `DELIVERABLE_AUTO_UPLOAD_RULES_END` | 当用户要求生成文件时默认自动上传,写入 `output/` 目录 |
37
+ 上传工具通过以下环境变量调用 claw-gateway:
156
38
 
157
- 规则使用 HTML 注释 Marker 包裹,initContainer 和 Guardian 进程每次同步时都会幂等替换,不会产生重复块。
39
+ - `CLAW_GATEWAY_URL`
40
+ - `CLAW_GATEWAY_PUBLIC_URL`
41
+ - `CLAW_GATEWAY_API_KEY` 或 `OPENCLAW_GATEWAY_API_KEY`
158
42
 
159
- ---
160
-
161
- ## Skill 说明
162
-
163
- `skills/deliverables/SKILL.md` 是 OpenClaw Skill,被注入到 workspace 后由 Agent 在工具调用前读取。它规定:
164
-
165
- - 始终使用会话中实际暴露的工具名(`deliverables__upload_deliverable`)
166
- - 生成文件统一写入 `output/` 子目录
167
- - 多文件(游戏/网站)优先用 `type=game` + `files[]`,不要提前打 zip
168
- - 上传成功后回复必须附带 Markdown 格式的预览/下载链接
169
-
170
- ---
171
-
172
- ## MCP Server 说明
173
-
174
- `mcp-servers/deliverables.js` 是一个符合 [MCP 协议(2024-11-05)](https://modelcontextprotocol.io/) 的 Node.js stdio server,暴露单个工具:
175
-
176
- ### `upload_deliverable`
177
-
178
- | 参数 | 类型 | 必填 | 说明 |
179
- |------|------|------|------|
180
- | `resource_id` | string | ✅ | 当前会话唯一 ID |
181
- | `type` | enum | ✅ | `article` / `game` / `zip` / `image` / `video` / `ppt` / `link` |
182
- | `file_name` | string | ✅ | 用户可见文件名(含扩展名)或目录名 |
183
- | `group_id` | string | — | 群聊 ID |
184
- | `user_id` | string | — | 用户 ID |
185
- | `content_text` | string | — | 文本内容(单文件场景) |
186
- | `content_base64` | string | — | Base64 编码的二进制内容(单文件场景);工具会清理空白并校验格式 |
187
- | `file_path` | string | — | 本地文件路径,推荐用于 PDF/PPT/图片/zip 等二进制文件,工具会读取并自动编码 |
188
- | `files` | array | — | 多文件列表(游戏/站点场景,优先使用),每项可传 `content_text`、`content_base64` 或 `file_path` |
189
-
190
- 返回值包含 `preview_url`、`download_url`、`reply_markdown`(可直接附在回复消息中)。
191
-
192
- ---
193
-
194
- ## Runtime Hook 说明
195
-
196
- `index.js` 会在 OpenClaw runtime 中注册三个 hook:
197
-
198
- | Hook | 作用 |
199
- |------|------|
200
- | `before_prompt_build` | 把“生成文件必须走交付物上传”的硬规则注入系统上下文,覆盖主 agent 和子 agent |
201
- | `before_tool_call` | 记录 `write` 生成的工作区文件;阻止通过 `message` 工具的 `media/path/filePath/buffer` 等字段直接发送文件 |
202
- | Palz 出站补丁 | 扫描最终消息中的 `/data/workspace-*`、`output/*.ext`、反引号文件名等工作区文件引用,自动上传后替换为交付物链接 |
203
- | `message_sending` | 如果上游仍然产生了媒体/文件旁路发送,在最终出站前直接取消 |
204
-
205
- 这些兜底一起工作的目标是:即使 prompt 漂移,也尽量把“工作区路径 / message + file/media”这类旁路堵住,统一收敛到 gateway 交付物链接。
206
-
207
- 另外,Palz 渠道下如果交付物回复包含可信 gateway 交付物链接,会被拆成“内容简介 + 最终链接”两条消息;任意外部 URL 或非 gateway OSS URL 不会被包装成 `file_url` 文件消息。runtime plugin 还会分别打印这两次真实 HTTP 发送的 request/response 日志,便于直接从 pod stdout 排查。
208
-
209
- ---
210
-
211
- ## 版本与发布
212
-
213
- ### 在 claw-gateway 仓库内发布
214
-
215
- 插件源码位于 `packages/plugin-deliverables/` 目录,与 claw-gateway 主仓库同步维护。更新流程:
43
+ ## 发布
216
44
 
217
45
  ```bash
218
- # 1. 修改 packages/plugin-deliverables/package.json 中的 version
219
- # 2. 同步更新 packages/plugin-deliverables/mcp-servers/deliverables.js(如有变更)
220
- # 3. 打包并发布到 npmmirror 兼容的私有或公开 registry
221
46
  cd packages/plugin-deliverables
222
47
  npm publish --registry https://registry.npmjs.org --access public
223
48
  ```
224
-
225
- ### 版本对齐建议
226
-
227
- | claw-gateway 版本 | plugin 版本 |
228
- |-------------------|-------------|
229
- | 当前 | 1.0.21 |
230
-
231
- ---
232
-
233
- ## 常见问题
234
-
235
- **Q: 插件安装后 Agent 没有 `upload_deliverable` 工具怎么办?**
236
-
237
- 检查以下几点:
238
- 1. `openclaw.json` 的 `mcp.servers.deliverables` 是否存在
239
- 2. MCP Server 是否在运行:`kubectl exec <pod> -- ls /home/node/.openclaw/mcp-servers/`
240
- 3. Agent 的 `tools.allow` 是否包含 `deliverables__upload_deliverable`
241
-
242
- **Q: 上传后没有返回链接怎么办?**
243
-
244
- 确认 `CLAW_GATEWAY_URL` 和 `CLAW_GATEWAY_API_KEY` 注入正确,可在容器内测试:
245
-
246
- ```bash
247
- curl -H "X-API-Key: $CLAW_GATEWAY_API_KEY" $CLAW_GATEWAY_URL/healthz
248
- ```
249
-
250
- **Q: claw-gateway 已经内置了 deliverables,会和插件冲突吗?**
251
-
252
- 不会冲突。claw-gateway 通过 ConfigMap 注入的 MCP 脚本、skill、AGENTS 规则与插件内容完全一致。
253
- Phase 3e(插件注入)在前,ConfigMap 阶段(Phase 4/4c/4d)在后;ConfigMap 的内容会覆盖插件安装的内容,两者互为备份。