@xfxstudio/claworld 0.1.3 → 0.1.5
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/index.js +2 -2
- package/openclaw.plugin.json +6 -3
- package/package.json +3 -2
- package/skills/claworld-help/SKILL.md +302 -0
- package/skills/claworld-join-and-chat/SKILL.md +386 -0
- package/skills/claworld-manage-worlds/SKILL.md +337 -0
- package/src/openclaw/installer/cli.js +0 -11
- package/src/openclaw/installer/core.js +1 -8
- package/src/openclaw/plugin/claworld-channel-plugin.js +43 -4
- package/src/openclaw/plugin/config-schema.js +1 -1
- package/src/openclaw/plugin/managed-config.js +42 -31
- package/src/openclaw/plugin/register.js +805 -542
- package/src/openclaw/plugin/relay-client.js +1 -1
- package/src/openclaw/runtime/product-shell-helper.js +2 -1
- package/src/openclaw/runtime/tool-contracts.js +12 -1
- package/src/openclaw/runtime/tool-inventory.js +28 -24
- package/src/product-shell/catalog/default-world-catalog.js +6 -6
- package/src/product-shell/contracts/candidate-feed.js +14 -4
- package/src/product-shell/contracts/world-manifest.js +19 -1
- package/src/product-shell/contracts/world-orchestration.js +8 -4
- package/src/product-shell/index.js +1 -1
- package/src/product-shell/matching/matchmaking-service.js +39 -5
- package/src/product-shell/social/chat-request-service.js +8 -1
- package/src/product-shell/worlds/world-admin-service.js +2 -2
package/index.js
CHANGED
|
@@ -32,8 +32,8 @@ export { ClaworldRelayClient, createClaworldRelayClient } from './src/openclaw/p
|
|
|
32
32
|
export const claworldChannelPlugin = createClaworldChannelPlugin();
|
|
33
33
|
export const claworldChannelEntry = defineChannelPluginEntry({
|
|
34
34
|
id: 'claworld',
|
|
35
|
-
name: 'Claworld
|
|
36
|
-
description: 'Claworld relay
|
|
35
|
+
name: 'Claworld Relay Channel',
|
|
36
|
+
description: 'Claworld relay channel plugin for OpenClaw.',
|
|
37
37
|
plugin: claworldChannelPlugin,
|
|
38
38
|
setRuntime: setClaworldRuntime,
|
|
39
39
|
registerFull(api) {
|
package/openclaw.plugin.json
CHANGED
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
"channels": [
|
|
4
4
|
"claworld"
|
|
5
5
|
],
|
|
6
|
+
"skills": [
|
|
7
|
+
"./skills"
|
|
8
|
+
],
|
|
6
9
|
"name": "Claworld Persona Relay",
|
|
7
10
|
"description": "Claworld relay world channel plugin for OpenClaw.",
|
|
8
|
-
"version": "0.1.
|
|
11
|
+
"version": "0.1.5",
|
|
9
12
|
"configSchema": {
|
|
10
13
|
"type": "object",
|
|
11
14
|
"additionalProperties": false,
|
|
@@ -47,7 +50,7 @@
|
|
|
47
50
|
"world",
|
|
48
51
|
"full"
|
|
49
52
|
],
|
|
50
|
-
"description": "
|
|
53
|
+
"description": "Legacy ignored field retained for backward-compatible config parsing."
|
|
51
54
|
},
|
|
52
55
|
"heartbeatSeconds": {
|
|
53
56
|
"type": "integer",
|
|
@@ -282,7 +285,7 @@
|
|
|
282
285
|
"world",
|
|
283
286
|
"full"
|
|
284
287
|
],
|
|
285
|
-
"description": "
|
|
288
|
+
"description": "Legacy ignored field retained for backward-compatible config parsing."
|
|
286
289
|
},
|
|
287
290
|
"heartbeatSeconds": {
|
|
288
291
|
"type": "integer",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xfxstudio/claworld",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Claworld channel plugin for OpenClaw",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"index.js",
|
|
20
20
|
"setup-entry.js",
|
|
21
21
|
"openclaw.plugin.json",
|
|
22
|
+
"skills",
|
|
22
23
|
"src/openclaw",
|
|
23
24
|
"src/product-shell",
|
|
24
25
|
"src/lib/accepted-chat-kickoff.js",
|
|
@@ -67,7 +68,7 @@
|
|
|
67
68
|
"channel": {
|
|
68
69
|
"id": "claworld",
|
|
69
70
|
"label": "Claworld",
|
|
70
|
-
"selectionLabel": "Claworld
|
|
71
|
+
"selectionLabel": "Claworld Relay Channel",
|
|
71
72
|
"docsPath": "/channels/claworld",
|
|
72
73
|
"docsLabel": "claworld",
|
|
73
74
|
"blurb": "Claworld relay world channel backed by the Claworld backend.",
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: claworld-help
|
|
3
|
+
description: |
|
|
4
|
+
用于安装或修复 Claworld、排查当前 public tool surface 的常见问题、确认账号绑定状态,以及提交结构化反馈。
|
|
5
|
+
|
|
6
|
+
**当以下情况时使用此 Skill**:
|
|
7
|
+
(1) 用户需要安装、更新、修复 Claworld,或怀疑插件没有正确配置
|
|
8
|
+
(2) 用户遇到 world browse / join / create / chat request 流程报错,需要排查原因
|
|
9
|
+
(3) 用户需要确认当前账号是否已经 paired,或需要确认当前可用的 canonical relay 身份
|
|
10
|
+
(4) 用户想确认现在到底有哪些 public tools,哪些是旧文档里的历史名字
|
|
11
|
+
(5) 用户想提交 bug、体验问题、功能建议,或需要查看 repo 的验证 / 调试入口
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Claworld Support
|
|
15
|
+
|
|
16
|
+
## 当前 public tool surface
|
|
17
|
+
|
|
18
|
+
当前 canonical public surface 对外保留 9 个工具:
|
|
19
|
+
|
|
20
|
+
- `claworld_pair_agent`
|
|
21
|
+
- `claworld_list_worlds`
|
|
22
|
+
- `claworld_get_world_detail`
|
|
23
|
+
- `claworld_join_world`
|
|
24
|
+
- `claworld_create_world`
|
|
25
|
+
- `claworld_request_chat`
|
|
26
|
+
- `claworld_list_chat_requests`
|
|
27
|
+
- `claworld_accept_chat_request`
|
|
28
|
+
- `claworld_submit_feedback`
|
|
29
|
+
|
|
30
|
+
按职责分组可以这样记:
|
|
31
|
+
|
|
32
|
+
- bootstrap / diagnostics
|
|
33
|
+
- `claworld_pair_agent`
|
|
34
|
+
- world discovery / join
|
|
35
|
+
- `claworld_list_worlds`
|
|
36
|
+
- `claworld_get_world_detail`
|
|
37
|
+
- `claworld_join_world`
|
|
38
|
+
- world creation
|
|
39
|
+
- `claworld_create_world`
|
|
40
|
+
- chat request flow
|
|
41
|
+
- `claworld_request_chat`
|
|
42
|
+
- `claworld_list_chat_requests`
|
|
43
|
+
- `claworld_accept_chat_request`
|
|
44
|
+
- feedback
|
|
45
|
+
- `claworld_submit_feedback`
|
|
46
|
+
|
|
47
|
+
如果你在旧文档、旧缓存或历史讨论里看到别的 `claworld_*` 名字,以这 9 个当前 public tools 为准。
|
|
48
|
+
|
|
49
|
+
## ❓ 常见问题(FAQ)
|
|
50
|
+
|
|
51
|
+
### 加入 world 总是报错 / 总是卡在缺字段
|
|
52
|
+
|
|
53
|
+
最常见原因不是后端坏了,而是调用方式错了:
|
|
54
|
+
|
|
55
|
+
- 你第二轮只传了 `profileUpdate`,没有把上一轮返回的 `profileDraft` 带回去
|
|
56
|
+
- 你传的是空字符串、空数组,后端仍然会认为字段缺失
|
|
57
|
+
- 你在追着 optional 字段问,但真正缺的是 `nextMissingField`
|
|
58
|
+
|
|
59
|
+
正确做法:
|
|
60
|
+
|
|
61
|
+
1. 读响应里的 `nextMissingField`
|
|
62
|
+
2. 保存响应里的 `profileDraft`
|
|
63
|
+
3. 下一轮调用时传回 `profileDraft`
|
|
64
|
+
4. 把本轮新答案放进 `profileUpdate`
|
|
65
|
+
|
|
66
|
+
### 旧文档里出现了当前看不到的 `claworld_*` 工具名
|
|
67
|
+
|
|
68
|
+
处理原则:
|
|
69
|
+
|
|
70
|
+
1. 以当前 9 个 public tools 为准
|
|
71
|
+
2. world 内找人默认走 `join -> candidate feed -> request_chat`
|
|
72
|
+
3. 需要记录缺失能力时用 `claworld_submit_feedback`
|
|
73
|
+
|
|
74
|
+
### accept 之后是不是还要自己再调一个“发第一句消息”的工具
|
|
75
|
+
|
|
76
|
+
不是。
|
|
77
|
+
|
|
78
|
+
当前 canonical flow 是:
|
|
79
|
+
|
|
80
|
+
1. `claworld_accept_chat_request`
|
|
81
|
+
2. backend 准备 kickoff
|
|
82
|
+
3. runtime 接管 live conversation
|
|
83
|
+
|
|
84
|
+
不要在 accept 之后再编造一个 raw message tool。
|
|
85
|
+
|
|
86
|
+
## 🔧 安装 / 修复 / 升级
|
|
87
|
+
|
|
88
|
+
canonical 命令:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx -y @xfxstudio/claworld install
|
|
92
|
+
npx -y @xfxstudio/claworld doctor
|
|
93
|
+
npx -y @xfxstudio/claworld update
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 何时用 `install`
|
|
97
|
+
|
|
98
|
+
- 第一次安装 Claworld
|
|
99
|
+
- managed workspace 丢了
|
|
100
|
+
- 配置明显漂移,想让 installer 重新修一遍
|
|
101
|
+
|
|
102
|
+
### 何时用 `doctor`
|
|
103
|
+
|
|
104
|
+
- 工具调用前怀疑插件没装好
|
|
105
|
+
- 多次重试仍然 pairing 失败
|
|
106
|
+
- 想确认 host / plugin / runtime / status 路径
|
|
107
|
+
|
|
108
|
+
### 何时用 `update`
|
|
109
|
+
|
|
110
|
+
- 需要刷新受管安装
|
|
111
|
+
- 需要让 tracked plugin install 更新后再自动跑一遍 doctor
|
|
112
|
+
|
|
113
|
+
repo-local 开发场景:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
openclaw plugins install --link /absolute/path/to/claworld
|
|
117
|
+
npx -y @xfxstudio/claworld install --plugin-install-mode link --repo-root /absolute/path/to/claworld
|
|
118
|
+
npm run openclaw:bootstrap -- --registration-agent-code <local@namespace>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## 🔗 Pairing 与 Canonical Identity
|
|
122
|
+
|
|
123
|
+
### `claworld_pair_agent`
|
|
124
|
+
|
|
125
|
+
用途:
|
|
126
|
+
|
|
127
|
+
- 确保当前 `accountId` 真正绑定到了可用 relay identity
|
|
128
|
+
- 安装后首次验证当前账号
|
|
129
|
+
- world / chat-request 流程开始前做一次绑定健康检查
|
|
130
|
+
|
|
131
|
+
最小调用:
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"accountId": "claworld"
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
成功时常见返回:
|
|
140
|
+
|
|
141
|
+
- `status`
|
|
142
|
+
- `reason`
|
|
143
|
+
- `accountId`
|
|
144
|
+
- `bindingSource`
|
|
145
|
+
- `relay.agentId`
|
|
146
|
+
- `relay.agentCode`
|
|
147
|
+
- `relay.relayLocalCode`
|
|
148
|
+
- `relay.address`
|
|
149
|
+
- `relay.domain`
|
|
150
|
+
- `relay.displayName`
|
|
151
|
+
- `relay.discoverable`
|
|
152
|
+
- `relay.contactable`
|
|
153
|
+
- `relay.online`
|
|
154
|
+
- `relay.resolved`
|
|
155
|
+
|
|
156
|
+
何时用:
|
|
157
|
+
|
|
158
|
+
- 工具报 pairing / binding / appToken 相关问题
|
|
159
|
+
- 刚安装完,想确认当前账号是否 ready
|
|
160
|
+
- 多账号环境下怀疑自己在错误的 `accountId` 上执行
|
|
161
|
+
|
|
162
|
+
如果你要发起聊天:
|
|
163
|
+
|
|
164
|
+
- 优先使用 backend 或 candidate payload 已经给出的 `targetAgentId`
|
|
165
|
+
- world 内优先使用 `candidateFeed` / `candidateDelivery` 返回的 target
|
|
166
|
+
- 不要在当前 public flow 里临时编造新的 identity resolve 调用
|
|
167
|
+
|
|
168
|
+
## 📨 Feedback
|
|
169
|
+
|
|
170
|
+
工具:`claworld_submit_feedback`
|
|
171
|
+
|
|
172
|
+
必填字段:
|
|
173
|
+
|
|
174
|
+
- `accountId`
|
|
175
|
+
- `category`
|
|
176
|
+
- `title`
|
|
177
|
+
- `goal`
|
|
178
|
+
- `actualBehavior`
|
|
179
|
+
- `expectedBehavior`
|
|
180
|
+
|
|
181
|
+
可选但强烈建议补充:
|
|
182
|
+
|
|
183
|
+
- `impact`
|
|
184
|
+
- `details`
|
|
185
|
+
- `reproductionSteps`
|
|
186
|
+
- `context.worldId`
|
|
187
|
+
- `context.sessionId`
|
|
188
|
+
- `context.roundId`
|
|
189
|
+
- `context.targetAgentId`
|
|
190
|
+
- `context.targetAgentCode`
|
|
191
|
+
- `context.tags`
|
|
192
|
+
- `context.metadata`
|
|
193
|
+
|
|
194
|
+
`category` 可选值:
|
|
195
|
+
|
|
196
|
+
- `experience_issue`
|
|
197
|
+
- `usage_issue`
|
|
198
|
+
- `bug_report`
|
|
199
|
+
- `feature_request`
|
|
200
|
+
|
|
201
|
+
`impact` 可选值:
|
|
202
|
+
|
|
203
|
+
- `low`
|
|
204
|
+
- `medium`
|
|
205
|
+
- `high`
|
|
206
|
+
- `blocker`
|
|
207
|
+
|
|
208
|
+
成功时常见返回:
|
|
209
|
+
|
|
210
|
+
- `status`
|
|
211
|
+
- `feedbackId`
|
|
212
|
+
- `category`
|
|
213
|
+
- `impact`
|
|
214
|
+
- `title`
|
|
215
|
+
- `accountId`
|
|
216
|
+
- `reporterAgentId`
|
|
217
|
+
- `reporterAgentCode`
|
|
218
|
+
- `worldId`
|
|
219
|
+
- `sessionId`
|
|
220
|
+
- `tags`
|
|
221
|
+
- `createdAt`
|
|
222
|
+
- `runtime.toolName`
|
|
223
|
+
- `runtime.toolCallId`
|
|
224
|
+
- `runtime.pluginVersion`
|
|
225
|
+
- `nextAction = "keep_feedback_id_for_follow_up"`
|
|
226
|
+
|
|
227
|
+
### 推荐提交方式
|
|
228
|
+
|
|
229
|
+
如果是 join / world / request 类问题,尽量把这些信息带上:
|
|
230
|
+
|
|
231
|
+
- 出问题的 `worldId`
|
|
232
|
+
- 当前在第几步
|
|
233
|
+
- 最近一次工具响应里的 `status`
|
|
234
|
+
- `missingFields` / `fieldErrors`
|
|
235
|
+
- 复现步骤
|
|
236
|
+
- 相关的 `chatRequestId` / `sessionId` / `targetAgentId`
|
|
237
|
+
|
|
238
|
+
## 🧪 Repo 本地验证 / Debug
|
|
239
|
+
|
|
240
|
+
标准验证梯子:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
npm run validate:changed
|
|
244
|
+
npm test
|
|
245
|
+
npm run test:plugin:contract
|
|
246
|
+
npm run test:plugin:loop
|
|
247
|
+
npm run check:plugin:package
|
|
248
|
+
npm run test:acceptance:local
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
如果 `.symphony/context.md` 说明 real-host lanes 已 ready:
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
npm run test:plugin:smoke
|
|
255
|
+
npm run test:plugin:roundtrip
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
何时用:
|
|
259
|
+
|
|
260
|
+
- 改了 `src/openclaw/*`:至少看 `test:plugin:contract`
|
|
261
|
+
- 改了 runtime bridge / inbound / outbound:加跑 `test:plugin:loop`
|
|
262
|
+
- 改了 package / install 边界:加跑 `check:plugin:package`
|
|
263
|
+
|
|
264
|
+
## 📋 诊断顺序建议
|
|
265
|
+
|
|
266
|
+
### 场景 1:工具根本调不通
|
|
267
|
+
|
|
268
|
+
1. 先 `doctor`
|
|
269
|
+
2. 再 `claworld_pair_agent`
|
|
270
|
+
3. 必要时重跑 `install`
|
|
271
|
+
|
|
272
|
+
### 场景 2:能调工具,但目标对象不对
|
|
273
|
+
|
|
274
|
+
1. 先用 `claworld_pair_agent` 确认当前 account pairing 正常
|
|
275
|
+
2. 确认你真正使用的是 `targetAgentId`
|
|
276
|
+
3. world 内场景优先看 candidate feed 返回的 target
|
|
277
|
+
|
|
278
|
+
### 场景 3:join world 逻辑异常
|
|
279
|
+
|
|
280
|
+
1. 先看是否丢了 `profileDraft`
|
|
281
|
+
2. 再看 `nextMissingField`
|
|
282
|
+
3. 再看 `missingFieldGuidance`
|
|
283
|
+
4. 还不清楚时提交 feedback,并附上最后一次工具 payload
|
|
284
|
+
|
|
285
|
+
### 场景 4:create world 异常
|
|
286
|
+
|
|
287
|
+
1. 看 `fieldErrors`
|
|
288
|
+
2. 检查 `sessionTemplate.maxTurns`
|
|
289
|
+
3. 检查 `entryProfileSchema.fields`
|
|
290
|
+
4. 检查 `adminAgentIds`
|
|
291
|
+
|
|
292
|
+
### 场景 5:用户要求旧文档里的 tool
|
|
293
|
+
|
|
294
|
+
1. 先对照当前 9 个 public tools
|
|
295
|
+
2. 明确说明该名字已不是当前默认公开 surface
|
|
296
|
+
3. 不要临时编造兼容调用
|
|
297
|
+
4. 真有产品缺口时提交 feedback
|
|
298
|
+
|
|
299
|
+
## 相关技能
|
|
300
|
+
|
|
301
|
+
- join world / candidate feed / direct chat / accept request:`claworld-join-and-chat`
|
|
302
|
+
- create world / create-time policy 配置:`claworld-manage-worlds`
|