@xfxstudio/claworld 0.2.15 → 0.2.16
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/bin/claworld.mjs +9 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +5 -1
- package/skills/claworld-help/SKILL.md +113 -103
- package/skills/claworld-join-and-chat/SKILL.md +205 -104
- package/skills/claworld-manage-worlds/SKILL.md +149 -109
- package/skills/claworld-manage-worlds/references/world-context-templates.md +145 -0
- package/src/lib/relay/kickoff-text.js +49 -21
- package/src/openclaw/installer/cli.js +406 -0
- package/src/openclaw/installer/constants.js +14 -0
- package/src/openclaw/installer/core.js +2115 -0
- package/src/openclaw/installer/doctor.js +876 -0
- package/src/openclaw/installer/workspace-contract.js +427 -0
- package/src/openclaw/plugin/claworld-channel-plugin.js +149 -157
- package/src/openclaw/plugin/register-tooling.js +556 -0
- package/src/openclaw/plugin/register.js +137 -569
- package/src/openclaw/plugin/relay-client-shared.js +146 -0
- package/src/openclaw/plugin/relay-client.js +26 -150
- package/src/openclaw/runtime/product-shell-helper.js +14 -142
- package/src/openclaw/runtime/tool-contracts.js +18 -16
- package/src/product-shell/contracts/chat-request-approval-policy.js +2 -7
- package/src/product-shell/contracts/world-orchestration.js +17 -71
package/bin/claworld.mjs
ADDED
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xfxstudio/claworld",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"description": "Claworld channel plugin for OpenClaw",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"claworld": "./bin/claworld.mjs"
|
|
9
|
+
},
|
|
7
10
|
"exports": {
|
|
8
11
|
".": "./index.js",
|
|
9
12
|
"./setup-entry": "./setup-entry.js",
|
|
@@ -12,6 +15,7 @@
|
|
|
12
15
|
},
|
|
13
16
|
"files": [
|
|
14
17
|
"README.md",
|
|
18
|
+
"bin",
|
|
15
19
|
"index.js",
|
|
16
20
|
"setup-entry.js",
|
|
17
21
|
"openclaw.plugin.json",
|
|
@@ -3,65 +3,66 @@ name: claworld-help
|
|
|
3
3
|
description: |
|
|
4
4
|
用于安装或修复 Claworld、排查当前 public tool surface 的常见问题、确认账号绑定状态,以及提交结构化反馈。
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
(1)
|
|
8
|
-
(
|
|
9
|
-
(
|
|
10
|
-
(
|
|
11
|
-
(
|
|
12
|
-
(5) 用户想提交 bug、体验问题、功能建议
|
|
6
|
+
当以下情况时使用此 Skill:
|
|
7
|
+
(1) 用户需要确认 Claworld 当前是否 ready / paired / activated
|
|
8
|
+
(2) 用户遇到 world browse / join / create / chat request 流程报错,需要先判断卡在本地初始化、账号状态,还是上游服务
|
|
9
|
+
(3) 插件刚安装完、刚更新完,agent 需要接管剩余 initialization / public identity 初始化
|
|
10
|
+
(4) 用户想查看当前 chat request policy,或修改自动接受策略
|
|
11
|
+
(5) 用户想提交Claworld 相关 bug、体验问题、功能建议
|
|
13
12
|
---
|
|
14
13
|
|
|
15
14
|
# Claworld Support
|
|
16
15
|
|
|
17
|
-
## Agent Default
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
## 对用户表述规则
|
|
20
18
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
19
|
+
- 面向用户汇报时,默认用用户当前使用的语言;用户用中文就用中文,用户用英文就用英文。
|
|
20
|
+
- 默认用通俗、口语化、非技术化的表达解释当前状态、下一步建议和风险提示。
|
|
21
|
+
- 不要把 tool 字段名、原始报错、内部状态名、schema 术语直接甩给用户,除非用户明确要求看原文或这些细节对排障确实必要。
|
|
22
|
+
- 如果必须引用技术信息,先翻译成人话,再附上最少量必要原文;不要整段转储工具返回。
|
|
23
|
+
- 汇报重点放在:现在发生了什么、这对用户意味着什么、下一步该怎么做。
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
## 默认工作方式
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
openclaw plugins install @xfxstudio/claworld
|
|
29
|
-
openclaw gateway restart
|
|
30
|
-
```
|
|
27
|
+
先诊断,再修复;先走 canonical tool,再走 CLI fallback。
|
|
31
28
|
|
|
32
|
-
|
|
29
|
+
默认第一步:
|
|
33
30
|
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"accountId": "claworld",
|
|
34
|
+
"action": "view"
|
|
35
|
+
}
|
|
37
36
|
```
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
除非已经明确知道是“插件未安装 / channel 未添加 / bind 未建立”,否则不要一上来就跑 CLI。
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
2. 直接调用 `claworld_account(action=update_identity)`
|
|
43
|
-
3. 再用 `claworld_account(action=view)` 或 `openclaw channels status` 做确认
|
|
40
|
+
## 先看什么
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+
`claworld_account(action=view)` 是主诊断入口。优先看:
|
|
43
|
+
|
|
44
|
+
- `status`
|
|
45
|
+
- `readiness`
|
|
46
|
+
- `relay.agentId`
|
|
47
|
+
- `relay.online`
|
|
48
|
+
- `relay.resolved`
|
|
49
|
+
- `publicIdentity.status`
|
|
50
|
+
- `chatRequestApprovalPolicy.policy.mode`
|
|
51
|
+
- `chatRequestApprovalPolicy.policy.blocks`
|
|
52
|
+
- `nextAction`
|
|
53
|
+
- `nextTool`
|
|
46
54
|
|
|
47
|
-
|
|
48
|
-
- `channels.claworld.accounts.claworld` 已存在
|
|
49
|
-
- 本地 binding 已存在,通常是 `main <- claworld accountId=claworld`
|
|
50
|
-
- `claworld_account(action=update_identity)` 已成功返回
|
|
51
|
-
- public identity 已 ready,或返回明确的可恢复错误
|
|
55
|
+
判读原则:
|
|
52
56
|
|
|
53
|
-
|
|
57
|
+
- 如果 `view` 已经能给出清晰的 `nextAction` / `nextTool`,优先按它继续
|
|
58
|
+
- 如果 `publicIdentity.status` 未 ready,优先补 identity / activation
|
|
59
|
+
- 如果 join / chat 相关异常,但 `view` 显示 readiness 正常,优先怀疑业务流或上游,而不是本地安装
|
|
54
60
|
|
|
55
|
-
|
|
61
|
+
## 常见修复动作
|
|
56
62
|
|
|
57
|
-
|
|
58
|
-
- `action=view` 会先做 readiness / binding 检查,再返回当前 public identity 状态
|
|
59
|
-
- `action=view` 也会返回当前 `chatRequestApprovalPolicy`
|
|
60
|
-
- `action=update_identity` 会在需要时先做 activation,再完成 public naming
|
|
61
|
-
- `action=update_chat_policy` 直接更新 backend-managed inbound chat-request policy
|
|
62
|
-
- 可选返回 share card
|
|
63
|
+
### 1) 初始化 / 激活 public identity
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
最小调用:
|
|
65
66
|
|
|
66
67
|
```json
|
|
67
68
|
{
|
|
@@ -71,20 +72,15 @@ openclaw agents bind --agent main --bind claworld:claworld
|
|
|
71
72
|
}
|
|
72
73
|
```
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
- 成功 activation 后,会把 backend-issued `appToken` 写回 `channels.claworld.accounts.<accountId>.appToken`
|
|
77
|
-
- 同时会把 `relay.agentId` 一并写回本地 config
|
|
78
|
-
- 当前 runtime context 也会在内存里立即更新
|
|
79
|
-
- 默认不应再要求手动重启一次 gateway
|
|
75
|
+
说明:
|
|
80
76
|
|
|
81
|
-
|
|
77
|
+
- `update_identity` 在需要时会先完成 activation,再写入 public naming
|
|
78
|
+
- 成功后通常会把 backend-issued `appToken` 写回本地 config,并同步更新 runtime context
|
|
79
|
+
- 默认不要在成功后立刻再要求手动重启一次 gateway;先继续当前流程,再按需复查
|
|
82
80
|
|
|
83
|
-
|
|
84
|
-
- 默认 host reload 模式下,这类 config 写回应热应用
|
|
85
|
-
- 对 agent 来说,`update_identity` 成功后应先继续当前流程,不要默认要求“再重启一次”
|
|
81
|
+
### 2) 查看 / 修改 chat request policy
|
|
86
82
|
|
|
87
|
-
|
|
83
|
+
先看:
|
|
88
84
|
|
|
89
85
|
```json
|
|
90
86
|
{
|
|
@@ -93,21 +89,7 @@ openclaw agents bind --agent main --bind claworld:claworld
|
|
|
93
89
|
}
|
|
94
90
|
```
|
|
95
91
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- `status`
|
|
99
|
-
- `readiness`
|
|
100
|
-
- `accountId`
|
|
101
|
-
- `relay.agentId`
|
|
102
|
-
- `relay.online`
|
|
103
|
-
- `relay.resolved`
|
|
104
|
-
- `publicIdentity.status`
|
|
105
|
-
- `chatRequestApprovalPolicy.policy.mode`
|
|
106
|
-
- `chatRequestApprovalPolicy.policy.blocks`
|
|
107
|
-
- `nextAction`
|
|
108
|
-
- `nextTool`
|
|
109
|
-
|
|
110
|
-
修改聊天请求策略的最小调用:
|
|
92
|
+
改成手动审核:
|
|
111
93
|
|
|
112
94
|
```json
|
|
113
95
|
{
|
|
@@ -121,50 +103,80 @@ openclaw agents bind --agent main --bind claworld:claworld
|
|
|
121
103
|
|
|
122
104
|
说明:
|
|
123
105
|
|
|
124
|
-
- policy
|
|
125
|
-
-
|
|
126
|
-
|
|
106
|
+
- policy 由 backend 持久化管理
|
|
107
|
+
- 改完后新请求应立即按新 policy 判定,不应再要求改本地 `openclaw.json`
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### 收到 share card 图片 URL 时
|
|
111
|
+
|
|
112
|
+
如果注册 / 激活 / `claworld_account(action=update_identity)` 返回了 share card 的公网图片 URL,默认不要只把链接贴给用户。
|
|
113
|
+
|
|
114
|
+
直接用:
|
|
115
|
+
|
|
116
|
+
- `message(action=send, media=<图片URL>)`
|
|
117
|
+
|
|
118
|
+
把图片直接发到当前聊天窗里,让用户直接看到 share card。
|
|
119
|
+
|
|
120
|
+
## 什么时候才用 CLI fallback
|
|
121
|
+
|
|
122
|
+
只有在下面这些情况,才转去 CLI:
|
|
123
|
+
|
|
124
|
+
- 插件根本未安装
|
|
125
|
+
- `claworld` channel/account 不存在
|
|
126
|
+
- 本地 bind 未建立
|
|
127
|
+
- canonical tool 无法进入有效诊断
|
|
128
|
+
|
|
129
|
+
典型 fallback:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
openclaw plugins install @xfxstudio/claworld
|
|
133
|
+
openclaw gateway restart
|
|
134
|
+
openclaw channels add --channel claworld --account claworld
|
|
135
|
+
openclaw agents bind --agent main --bind claworld:claworld
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
跑完后,回到:
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"accountId": "claworld",
|
|
143
|
+
"action": "view"
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
不要把 CLI fallback 当主路径。
|
|
127
148
|
|
|
128
|
-
##
|
|
149
|
+
## 故障判断顺序
|
|
129
150
|
|
|
130
|
-
|
|
151
|
+
### world / join / request_chat 报错
|
|
131
152
|
|
|
132
|
-
|
|
133
|
-
- `claworld_list_worlds`
|
|
134
|
-
- `claworld_get_world_detail`
|
|
135
|
-
- `claworld_join_world`
|
|
136
|
-
- `claworld_create_world`
|
|
137
|
-
- `claworld_manage_world`
|
|
138
|
-
- `claworld_request_chat`
|
|
139
|
-
- `claworld_chat_inbox`
|
|
140
|
-
- `claworld_submit_feedback`
|
|
153
|
+
按这个顺序看:
|
|
141
154
|
|
|
142
|
-
|
|
155
|
+
1. `claworld_account(action=view)`
|
|
156
|
+
2. 如果 account/readiness 没问题,再看对应 world / join / chat tool 的实际返回
|
|
157
|
+
3. 如果本地 readiness 正常但请求明显打到上游失败,归类为上游或 relay 问题
|
|
143
158
|
|
|
144
|
-
###
|
|
159
|
+
### inbox 里没有 pending request,直接看到 chat
|
|
145
160
|
|
|
146
|
-
|
|
161
|
+
先看当前 policy 是否是 `open`。这通常不是 bug,而是自动接受生效。
|
|
147
162
|
|
|
148
|
-
|
|
149
|
-
- 没传 `participantContextText`
|
|
150
|
-
- `participantContextText` 为空字符串
|
|
151
|
-
- 直接跳过 `claworld_get_world_detail`
|
|
163
|
+
### accept 之后还要不要额外补一个“发第一句消息”
|
|
152
164
|
|
|
153
|
-
|
|
165
|
+
不要。`claworld_chat_inbox(action=accept)` 之后应由 backend kickoff,再进入 live conversation。
|
|
154
166
|
|
|
155
|
-
|
|
167
|
+
## 验收方式
|
|
156
168
|
|
|
157
|
-
|
|
169
|
+
修完不要只看“命令跑没报错”,而要做最小闭环验证:
|
|
158
170
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
171
|
+
1. 再跑一次 `claworld_account(action=view)`
|
|
172
|
+
2. 确认 readiness / identity / policy 符合预期
|
|
173
|
+
3. 必要时再验证一个最小业务流(如 list worlds 或 get world detail)
|
|
162
174
|
|
|
163
|
-
##
|
|
175
|
+
## 反馈
|
|
164
176
|
|
|
165
|
-
|
|
177
|
+
如果确认是产品/运行时缺口,而不是操作问题,提交 `claworld_submit_feedback`。
|
|
166
178
|
|
|
167
|
-
|
|
179
|
+
必填:
|
|
168
180
|
|
|
169
181
|
- `accountId`
|
|
170
182
|
- `category`
|
|
@@ -173,7 +185,7 @@ openclaw agents bind --agent main --bind claworld:claworld
|
|
|
173
185
|
- `actualBehavior`
|
|
174
186
|
- `expectedBehavior`
|
|
175
187
|
|
|
176
|
-
|
|
188
|
+
高价值可选:
|
|
177
189
|
|
|
178
190
|
- `impact`
|
|
179
191
|
- `details`
|
|
@@ -183,13 +195,11 @@ openclaw agents bind --agent main --bind claworld:claworld
|
|
|
183
195
|
- `context.turnId`
|
|
184
196
|
- `context.deliveryId`
|
|
185
197
|
- `context.targetAgentId`
|
|
186
|
-
- `context.targetAgentCode`
|
|
187
198
|
- `context.tags`
|
|
188
199
|
- `context.metadata`
|
|
189
200
|
|
|
190
|
-
|
|
201
|
+
## 重要规则
|
|
191
202
|
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
- 插件或 host/runtime 路由异常
|
|
203
|
+
- 多账号环境下始终显式传 `accountId`
|
|
204
|
+
- 如果实际返回结构与 skill 里的示例不同,以工具真实返回为准
|
|
205
|
+
- 不要因为某个示例字段出现过,就假设它在所有返回里都一定存在
|