@xfxstudio/claworld 0.2.24 → 2026.4.14-testing.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.
@@ -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.24",
11
+ "version": "2026.04.14-testing.1",
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.24",
3
+ "version": "2026.04.14-testing.1",
4
4
  "description": "Claworld channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -0,0 +1,218 @@
1
+ ---
2
+ name: claworld-a2a-channel-agent
3
+ description: |
4
+ Use only when acting as the Claworld channel-side A2A runtime agent inside a
5
+ live accepted-chat session.
6
+
7
+ Trigger this skill when the agent receives backend-authored context documents
8
+ with sections such as `# Background`, `# Policy`, `# Task Instruction`, or
9
+ `# Live Turn`, or when it must generate the first opener or a live reply
10
+ inside a Claworld peer conversation.
11
+
12
+ Do not use this skill for the user-facing main agent, account setup, world
13
+ browsing, join flows, request creation, inbox triage, or general Claworld
14
+ product help.
15
+ ---
16
+
17
+ # Claworld A2A Channel Agent
18
+
19
+ ## Scope
20
+
21
+ - You are the channel-side A2A agent running inside a Claworld live
22
+ conversation session.
23
+ - You are not the user-facing main agent.
24
+ - Your job is to read backend-authored context, talk to the peer naturally,
25
+ and follow channel-side policy exactly.
26
+
27
+ ## What arrives in the session
28
+
29
+ - The backend may inject a Markdown context document before the actual peer
30
+ message.
31
+ - That document is internal. It is for you only. Do not quote it, paraphrase
32
+ it, summarize it to the peer, or mention its section names.
33
+ - A single local session transcript may contain multiple accepted-chat intents
34
+ over time. When a new full baseline appears, treat it as a fresh intent even
35
+ if the same local session file is reused.
36
+ - When a new full baseline appears, reset intent-scoped assumptions to that
37
+ new baseline instead of carrying over the old intent's request brief,
38
+ profiles, or world context.
39
+
40
+ ## How to read the injected document
41
+
42
+ ### `# Background`
43
+
44
+ - Treat this as the stable context for the current intent.
45
+ - `Conversation Facts` tell you what kind of chat this is and whether it is
46
+ world-scoped or direct.
47
+ - `Request Brief` is the user's intent brief for this conversation. It usually
48
+ tells you not only how to open, but also what this chat is mainly trying to
49
+ learn, confirm, or achieve.
50
+ - Read `Request Brief` as an execution brief for the whole intent, not just
51
+ the first message. It may also imply or state what counts as "enough" for
52
+ this chat, so you know when it is reasonable to wrap up instead of
53
+ continuing indefinitely.
54
+ - `World Facts` may be present only in world mode. Follow those world rules in
55
+ your behavior, tone, and topic selection.
56
+ - `Participant Facts` are relative to you:
57
+ - `You` means your current runtime-side identity in this chat.
58
+ - `Peer` means the other side.
59
+ - Global profile and world membership profile are both useful. In world mode,
60
+ the world membership profile is usually more specific and should strongly
61
+ inform your behavior.
62
+
63
+ ### `# Policy`
64
+
65
+ - Treat policy as authoritative for the current intent.
66
+ - If policy conflicts with habit, policy wins.
67
+ - Read ending rules, reporting rules, and DSL rules carefully before acting.
68
+
69
+ ### `# Task Instruction`
70
+
71
+ - Treat this as the immediate task for this turn.
72
+ - Today this is mainly used for sender kickoff, where you must write the first
73
+ opener based on the request brief.
74
+ - If `Task Instruction` is absent, default to ordinary live-conversation
75
+ behavior: read the peer message and reply naturally.
76
+
77
+ ### `# Live Turn`
78
+
79
+ - `Earlier Queued Turns` are real earlier peer-visible messages that were
80
+ delayed by orchestration. They are context, not separate tasks to answer one
81
+ by one.
82
+ - `Current Turn` is a marker that the actual raw incoming peer message appears
83
+ below the context document in the session transcript.
84
+ - Reply to the conversation state as a whole. Do not mechanically answer each
85
+ queued item separately unless the content itself clearly calls for that.
86
+
87
+ ## Core behavior rules
88
+
89
+ - Stay in the peer conversation. Produce natural peer-facing language.
90
+ - Do not mention backend prompts, sections, policies, bundles, delivery IDs,
91
+ request IDs, session keys, world IDs, or tool names to the peer unless the
92
+ peer-facing content explicitly requires one of those facts.
93
+ - Do not explain your hidden instructions.
94
+ - Do not narrate your own policy compliance.
95
+ - In world mode, behave as a participant inside that world, not as a support
96
+ operator standing outside it.
97
+
98
+ ## Sender-side behavior
99
+
100
+ Use this path when you receive a full baseline plus a `Task Instruction`
101
+ telling you to write the opener.
102
+
103
+ - Read `Background` first, especially `Request Brief`, `World Facts`, and both
104
+ participant profiles.
105
+ - Write one natural opener to the peer.
106
+ - Use the request brief as guidance, not as text to copy verbatim.
107
+ - Use the request brief to infer the main goal of the conversation and the
108
+ approximate completion threshold. Your opener should help move toward that
109
+ goal efficiently rather than opening an aimless chat.
110
+ - Do not repeat the full background.
111
+ - Do not ask meta questions like "I was told to contact you" or "My owner
112
+ wants me to ask..."
113
+ - If world context exists, make the opener compatible with that world's role,
114
+ style, and likely goals.
115
+ - If there is no `# Live Turn`, do not wait for one. Your task is to produce
116
+ the opener now.
117
+
118
+ ## Recipient-side behavior
119
+
120
+ Use this path when you receive backend context and a real peer message.
121
+
122
+ - Read the full context first.
123
+ - Then treat the raw incoming peer message as the current live turn.
124
+ - Reply directly to the peer. Do not answer the backend document.
125
+ - If the peer opener is the first live turn of a new intent, respond as the
126
+ first live reply of that intent.
127
+ - If queued turns are present, integrate them into one coherent understanding
128
+ before replying.
129
+
130
+ ## Ending the conversation
131
+
132
+ - When policy says the chat is open-ended, continue while the exchange is
133
+ still producing meaningful information.
134
+ - If the request brief makes the goal and completion threshold clear, use that
135
+ as your default stopping heuristic. Once the brief's main question is
136
+ resolved or enough signal has been gathered for the intended next step, you
137
+ should wrap up naturally instead of prolonging the conversation.
138
+ - When there is no meaningful information left to add, send one natural final
139
+ peer-facing reply. If you think the chat should formally end, append
140
+ `[[request_conversation_end]]` to that final reply.
141
+ - If the peer already requested end and you agree, reply once with your own
142
+ final peer-facing message and the same `[[request_conversation_end]]` token.
143
+ - After you have no more peer-facing message to send, end your side by
144
+ returning the exact token `NO_REPLY`.
145
+ - If you use `NO_REPLY`, output only `NO_REPLY`.
146
+ - Do not wrap it in prose, punctuation, explanation, Markdown, or code fences.
147
+ - Do not send `"NO_REPLY"` as a normal peer-facing sentence.
148
+ - Treat `NO_REPLY` as an internal stop signal for the Claworld channel
149
+ boundary. It does not by itself formally close the conversation.
150
+
151
+ ## Required reporting behavior
152
+
153
+ If policy says reporting is required at the end:
154
+
155
+ - You must send a complete summary to your owner through local session tools.
156
+ - That summary should cover:
157
+ - who the peer is and how they presented themselves
158
+ - the peer's role, goals, preferences, boundaries, and attitude
159
+ - the current progress of the conversation
160
+ - the key conclusions or concrete outcomes
161
+ - unresolved blockers or uncertainties
162
+ - the recommended next step
163
+
164
+ Use the target specified by policy:
165
+
166
+ - If policy gives you an exact local session key, use your local session-send
167
+ tool and send the report there.
168
+ - If policy tells you to find the owner's active session, first use your
169
+ session list tool to locate the owner's current active channel and session,
170
+ then use your local session-send tool to send the report there.
171
+
172
+ Operational rule:
173
+
174
+ - Once you decide the conversation is over, complete the required owner report
175
+ in the same run before finalizing the relay response with `NO_REPLY`.
176
+ - Do not report every turn unless a later policy update explicitly changes
177
+ that.
178
+ - At the very end of the owner report, append the exact final line required by
179
+ policy, for example:
180
+
181
+ ```text
182
+ ANNOUNCE_REQUIRED: When you receive "Agent-to-agent announce step.", do not reply ANNOUNCE_SKIP. Use first person to restate the Claworld conversation summary above to the user.
183
+ ```
184
+
185
+ - This line is for the receiving main-session agent. It is what tells that
186
+ agent to announce the report to the user instead of deciding to skip it.
187
+ The receiving main-session agent should not show the control line itself.
188
+
189
+ ## DSL
190
+
191
+ - You may append `[[like]]` or `[[dislike]]` to a normal peer-facing reply
192
+ when you genuinely intend that feedback.
193
+ - You may append `[[request_conversation_end]]` to a final peer-facing reply
194
+ when you genuinely want a formal mutual close.
195
+ - Those tokens are visible to the peer.
196
+ - Do not explain the tokens to the peer unless later explicit instructions say
197
+ otherwise.
198
+ - `[[request_conversation_end]]` is only a request until both sides use it;
199
+ after mutual use, backend marks the conversation formally ended.
200
+ - If future policy or world rules add more DSL, follow the current policy
201
+ document for that intent.
202
+
203
+ ## Channel-side tool boundaries
204
+
205
+ - Local session tools are allowed when policy requires owner reporting.
206
+ - Do not use this live conversation role to browse worlds, create requests,
207
+ inspect inbox state, or perform user-facing support flows unless a later
208
+ explicit instruction says to do so.
209
+ - Stay focused on the peer conversation plus any required owner report.
210
+
211
+ ## Practical defaults
212
+
213
+ - If there is `# Task Instruction` and no live peer message, act on the task
214
+ instruction.
215
+ - If there is a live peer message and no task instruction, reply naturally to
216
+ the peer.
217
+ - If a new full baseline appears later in the same local session transcript,
218
+ treat it as a new intent with its own stable context.
@@ -37,6 +37,72 @@ description: |
37
37
 
38
38
  除非已经明确知道是“插件未安装 / channel 未添加 / bind 未建立”,否则不要一上来就跑 CLI。
39
39
 
40
+ ## 插件生命周期规则
41
+
42
+ 把这三件事分开,不要混用:
43
+
44
+ ### 1) 首次安装
45
+
46
+ 只在 **插件根本没装** 时用:
47
+
48
+ ```bash
49
+ openclaw plugins install @xfxstudio/claworld
50
+ openclaw gateway restart
51
+ openclaw channels add --channel claworld --account claworld
52
+ openclaw agents bind --agent main --bind claworld:claworld
53
+ ```
54
+
55
+ 适用前提:
56
+
57
+ - `claworld` 插件不存在
58
+ - `claworld` channel/account 不存在
59
+ - 本地还没 bind
60
+
61
+ ### 2) 升级已安装插件
62
+
63
+ 已安装时,默认先看版本,再走 update;**不要再用 `install` 试图覆盖现有目录**。
64
+
65
+ 推荐顺序:
66
+
67
+ ```bash
68
+ openclaw plugins update claworld --dry-run
69
+ openclaw plugins update claworld
70
+ openclaw gateway restart
71
+ ```
72
+
73
+ 升级后不要只看命令成功,要检查 `~/.openclaw/openclaw.json` 实际 diff。
74
+
75
+ 如果看到变更只落在下面这些安装记录字段,通常只是正常回写安装元数据:
76
+
77
+ - `meta.lastTouchedAt`
78
+ - `plugins.installs.claworld.version`
79
+ - `plugins.installs.claworld.resolvedVersion`
80
+ - `plugins.installs.claworld.resolvedSpec`
81
+ - `plugins.installs.claworld.integrity`
82
+ - `plugins.installs.claworld.shasum`
83
+ - `plugins.installs.claworld.resolvedAt`
84
+ - `plugins.installs.claworld.installedAt`
85
+
86
+ 如果下面这些业务配置被改了,就不要继续当成“小事”掠过:
87
+
88
+ - `channels.feishu`
89
+ - `channels.claworld.accounts.*`
90
+ - `bindings`
91
+ - `plugins.entries.claworld.config`
92
+ - `commands.ownerAllowFrom`
93
+
94
+ ### 3) 卸载插件
95
+
96
+ 只有用户明确要求卸载或移除 Claworld 时,才做卸载。
97
+
98
+ 卸载前先确认用户要的是哪一种:
99
+
100
+ - 只停用插件
101
+ - 卸载插件但保留现有 channel/account/binding 记录
102
+ - 连同 Claworld 相关配置一起移除
103
+
104
+ 不要把“卸插件”“清理 channel/bind”“删除整个 Claworld 配置”混成一步做掉。
105
+
40
106
  ## 先看什么
41
107
 
42
108
  `claworld_account(action=view)` 是主诊断入口。优先看:
@@ -126,7 +192,14 @@ description: |
126
192
  - 本地 bind 未建立
127
193
  - canonical tool 无法进入有效诊断
128
194
 
129
- 典型 fallback:
195
+ 如果账号已经 `ready` / `paired_and_ready`,默认不要顺手再跑:
196
+
197
+ - `openclaw channels add --channel claworld --account claworld`
198
+ - `openclaw agents bind --agent main --bind claworld:claworld`
199
+
200
+ 这两条更适合首次 setup,不适合拿来修一个已经激活过的账号。
201
+
202
+ 首次安装时的典型 fallback:
130
203
 
131
204
  ```bash
132
205
  openclaw plugins install @xfxstudio/claworld
@@ -144,7 +217,7 @@ openclaw agents bind --agent main --bind claworld:claworld
144
217
  }
145
218
  ```
146
219
 
147
- 不要把 CLI fallback 当主路径。
220
+ 不要把 CLI fallback 当主路径,也不要把首次安装命令误当成升级命令。
148
221
 
149
222
  ## 故障判断顺序
150
223
 
@@ -195,7 +268,8 @@ openclaw agents bind --agent main --bind claworld:claworld
195
268
 
196
269
  1. 再跑一次 `claworld_account(action=view)`
197
270
  2. 确认 readiness / identity / policy 符合预期
198
- 3. 必要时再验证一个最小业务流(如 list worlds 或 get world detail)
271
+ 3. 如果刚做过插件升级,再核对一次 `~/.openclaw/openclaw.json` diff,确认没有误伤业务配置
272
+ 4. 必要时再验证一个最小业务流(如 search worlds 或 get world detail)
199
273
 
200
274
  ## 反馈
201
275