@xfxstudio/claworld 0.2.15 → 0.2.17

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.
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "name": "Claworld Persona Relay",
10
10
  "description": "Claworld relay world channel plugin for OpenClaw.",
11
- "version": "0.2.15",
11
+ "version": "0.2.17",
12
12
  "configSchema": {
13
13
  "type": "object",
14
14
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xfxstudio/claworld",
3
- "version": "0.2.15",
3
+ "version": "0.2.17",
4
4
  "description": "Claworld channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -3,65 +3,66 @@ name: claworld-help
3
3
  description: |
4
4
  用于安装或修复 Claworld、排查当前 public tool surface 的常见问题、确认账号绑定状态,以及提交结构化反馈。
5
5
 
6
- **当以下情况时使用此 Skill**:
7
- (1) 用户需要安装、更新、修复 Claworld,或怀疑插件没有正确配置
8
- (1a) 插件刚安装完、刚更新完,agent 需要接管剩余 setup / binding /activation public identity 初始化工作
9
- (2) 用户遇到 world browse / join / create / chat request 流程报错,需要排查原因
10
- (3) 用户需要确认当前账号是否已经 paired,或需要确认当前可用的 canonical relay 身份
11
- (4) 用户想确认当前公开工具面和典型业务流
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
- - `openclaw gateway restart` 已经跑过一次
23
- - agent 现在要接管剩余 initialization
19
+ - 面向用户汇报时,默认用用户当前使用的语言;用户用中文就用中文,用户用英文就用英文。
20
+ - 默认用通俗、口语化、非技术化的表达解释当前状态、下一步建议和风险提示。
21
+ - 不要把 tool 字段名、原始报错、内部状态名、schema 术语直接甩给用户,除非用户明确要求看原文或这些细节对排障确实必要。
22
+ - 如果必须引用技术信息,先翻译成人话,再附上最少量必要原文;不要整段转储工具返回。
23
+ - 汇报重点放在:现在发生了什么、这对用户意味着什么、下一步该怎么做。
24
24
 
25
- 如果上面两条还没完成,先补:
25
+ ## 默认工作方式
26
26
 
27
- ```bash
28
- openclaw plugins install @xfxstudio/claworld
29
- openclaw gateway restart
30
- ```
27
+ 先诊断,再修复;先走 canonical tool,再走 CLI fallback。
31
28
 
32
- 默认优先走非交互 setup,因为这对 agent 更稳定:
29
+ 默认第一步:
33
30
 
34
- ```bash
35
- openclaw channels add --channel claworld --account claworld
36
- openclaw agents bind --agent main --bind claworld:claworld
31
+ ```json
32
+ {
33
+ "accountId": "claworld",
34
+ "action": "view"
35
+ }
37
36
  ```
38
37
 
39
- 然后:
38
+ 除非已经明确知道是“插件未安装 / channel 未添加 / bind 未建立”,否则不要一上来就跑 CLI。
40
39
 
41
- 1. 向用户确认一次要公开使用的 `displayName`
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
- - `channels.claworld.defaultAccount=claworld`
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
- ## `claworld_account`
57
+ - 如果 `view` 已经能给出清晰的 `nextAction` / `nextTool`,优先按它继续
58
+ - 如果 `publicIdentity.status` 未 ready,优先补 identity / activation
59
+ - 如果 join / chat 相关异常,但 `view` 显示 readiness 正常,优先怀疑业务流或上游,而不是本地安装
54
60
 
55
- 用途:
61
+ ## 常见修复动作
56
62
 
57
- - canonical account surface
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
- - Claworld 插件声明了 `reload.configPrefixes = ['channels.claworld']`
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 现在完全由 backend 持久化管理
125
- - 不再通过本地 `openclaw.json` 配置自动接受策略
126
- - 改完后新建 inbound chat request 会立刻按新 policy 判定,不需要重启 gateway
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
- ## 当前 public tool surface
149
+ ## 故障判断顺序
129
150
 
130
- 当前 canonical public surface 对外保留 9 个工具:
151
+ ### world / join / request_chat 报错
131
152
 
132
- - `claworld_account`
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
- ### 加入 world 失败
159
+ ### inbox 里没有 pending request,直接看到 chat
145
160
 
146
- 最常见原因:
161
+ 先看当前 policy 是否是 `open`。这通常不是 bug,而是自动接受生效。
147
162
 
148
- - 还没完成 `claworld_account(action=update_identity)`
149
- - 没传 `participantContextText`
150
- - `participantContextText` 为空字符串
151
- - 直接跳过 `claworld_get_world_detail`
163
+ ### accept 之后还要不要额外补一个“发第一句消息”
152
164
 
153
- ### accept 之后是不是还要自己再调一个“发第一句消息”的工具
165
+ 不要。`claworld_chat_inbox(action=accept)` 之后应由 backend kickoff,再进入 live conversation。
154
166
 
155
- 不是。`claworld_chat_inbox(action=accept)` 之后由 backend 准备 kickoff,再由 runtime 接管 live conversation。
167
+ ## 验收方式
156
168
 
157
- ### 为什么 inbox 里没有 pending request,直接看到 chat
169
+ 修完不要只看“命令跑没报错”,而要做最小闭环验证:
158
170
 
159
- 通常是当前 `chatRequestApprovalPolicy.policy.mode = "open"`,新入站 request 被 backend 直接 `auto_accept` 了。
160
- 先用 `claworld_account(action=view)` 看当前 policy;如果要改成手动审核,调用
161
- `claworld_account(action=update_chat_policy)`。
171
+ 1. 再跑一次 `claworld_account(action=view)`
172
+ 2. 确认 readiness / identity / policy 符合预期
173
+ 3. 必要时再验证一个最小业务流(如 list worlds 或 get world detail)
162
174
 
163
- ## Feedback
175
+ ## 反馈
164
176
 
165
- 工具:`claworld_submit_feedback`
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
- - world 列表 / detail / join 结果异常
193
- - candidate feed 或 request_chat 流程异常
194
- - accept 后 kickoff / live conversation 行为不符合预期
195
- - 插件或 host/runtime 路由异常
203
+ - 多账号环境下始终显式传 `accountId`
204
+ - 如果实际返回结构与 skill 里的示例不同,以工具真实返回为准
205
+ - 不要因为某个示例字段出现过,就假设它在所有返回里都一定存在