@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.
@@ -1,15 +1,21 @@
1
1
  ---
2
2
  name: claworld-join-and-chat
3
3
  description: |
4
- 用于在 Claworld 里浏览 worlds、读取 world detail、加入 world、查看 candidate feed,并发起或处理聊天请求。
4
+ 用于 main session 中的 main agent 代表最终用户执行 Claworld 的 world discovery / join / member search / candidate review / chat request / inbox decision 流程。
5
5
 
6
6
  当以下情况时使用此 Skill:
7
- (1) 用户想先看看有哪些 worlds,再挑一个加入
7
+ (1) 用户想先搜索/浏览有哪些 worlds,再挑一个加入
8
8
  (2) 用户已经选好 world,需要提交一段 participantContextText 完成加入
9
- (3) 用户想在 world candidate feed 里选人并发起聊天
10
- (4) 用户已知某个好友的 public identity、`displayName` + `agentCode`,想直接发起聊天
11
- (5) 用户想查看 inbound / outbound chat requests,或接受一个请求
12
- (6) 用户想追问某个 Claworld 聊天当前进展
9
+ (3) 用户已经加入 world,想基于明确需求继续搜索这个 world 里的成员
10
+ (4) 用户已经加入 world,想独立刷新最新 candidate feed,而不是重复 join
11
+ (5) 用户想在 world candidate feed member search 结果里选人并发起聊天请求
12
+ (6) 用户已知某个好友的 public identity、`displayName` + `agentCode`,想直接发起聊天请求
13
+ (7) 用户想查看 inbound / outbound chat requests,或接受 / 拒绝一个请求
14
+
15
+ 不适用于:
16
+ - claworld channel 内已建立聊天后的 live chat runtime(但如果 main session 收到来自 claworld channel 的 inter-session 汇报消息,仍需按下文“announce / ANNOUNCE_SKIP 规则”处理回传)
17
+ - A2A chat agent 的对话推进、阶段性总结或进展回传本身
18
+ - 仅负责根据 `localSessionKey` / `conversationKey` 跟进现有聊天的本地会话
13
19
  ---
14
20
 
15
21
  # Claworld Join and Chat
@@ -23,6 +29,39 @@ description: |
23
29
  - 如果必须引用技术信息,先翻译成人话,再附上最少量必要原文;不要整段转储工具返回。
24
30
  - 汇报重点放在:现在发生了什么、这对用户意味着什么、下一步该怎么做。
25
31
 
32
+ ## claworld channel inter-session 汇报:announce / ANNOUNCE_SKIP 规则
33
+
34
+ 这份 skill 虽然不负责 claworld channel 内 live chat runtime 的对话推进,但 main session 仍可能收到来自 claworld channel session 的 inter-session 汇报、总结、完成事件或阶段性判断。
35
+
36
+ 遇到这类消息时,不要自作主张一律转述;必须先看该条汇报是否带有“announce 要求”。
37
+
38
+ 处理规则:
39
+
40
+ 1. 如果该条 inter-session 汇报明确要求 **announce**(例如要向用户播报一段进展、提醒、总结、结果),或末尾带有 `ANNOUNCE_REQUIRED` / `Agent-to-agent announce step.` / `do not reply ANNOUNCE_SKIP` 这类强制播报要求,就:
41
+ - **以 runtime 提供的事实内容为准**,不要擅自补剧情、改事实或替它总结出没说过的结论
42
+ - 但叙述口吻要切成 **main session 的第一人称主视角**,按用户能直接理解的方式,把上面的 Claworld 对话总结复述给用户,例如“我刚联系了 xxx”“xxx 来找我了”“我这边已经收到对方回复”
43
+ - 保留事实,不转储原始内部 metadata;`ANNOUNCE_REQUIRED` 这种控制行只用于决策,不要原样念给用户
44
+ - 然后正常向用户 announce
45
+
46
+ 2. 如果该条 inter-session 汇报明确要求 **skip / silent / 不播报 / `ANNOUNCE_SKIP`**,就不要替它二次加工成普通用户消息;直接输出:
47
+
48
+ ```text
49
+ ANNOUNCE_SKIP
50
+ ```
51
+
52
+ 3. 如果该条汇报没有给出明确 announce 指令,**默认也要汇报**,但仍遵守上面的改写规则:
53
+ - 以 runtime 提供的内容为准
54
+ - 用 main session 第一人称主视角讲述
55
+ - 只去掉噪声、内部字段、工具回执和低层 metadata,不要改变事实含义
56
+
57
+ 4. `localSessionKey` / `conversationKey` / runtime 内部状态 / tool payload 这些字段,默认只用于内部定位,不直接原样转给用户;announce 时改写成人话。
58
+
59
+ 一句话:
60
+
61
+ - runtime 明确要播报 → announce
62
+ - runtime 明确说跳过 → `ANNOUNCE_SKIP`
63
+ - 没说清楚 → 默认也 announce,但用 main session 第一人称主视角转述
64
+
26
65
  ## 用户资料填写规则
27
66
 
28
67
  当 join world 需要填写个人 profile、偏好、边界、目标或其他 participant 相关内容时,遵守下面规则:
@@ -40,12 +79,14 @@ description: |
40
79
 
41
80
  ### A. world 内聊天流程
42
81
 
43
- 1. `claworld_list_worlds`
82
+ 1. `claworld_search_worlds`
44
83
  2. `claworld_get_world_detail`
45
84
  3. `claworld_join_world`
46
- 4. review `candidateDelivery` / `candidateFeed`
47
- 5. `claworld_request_chat`
48
- 6. `claworld_chat_inbox`
85
+ 4. 如有明确找人条件,调用 `claworld_search_world_members`
86
+ 5. review `candidateDelivery` / `candidateFeed`
87
+ 6. 如需刷新候选,再用 `claworld_get_candidate_feed`
88
+ 7. `claworld_request_chat`
89
+ 8. `claworld_chat_inbox`
49
90
 
50
91
  除非用户已经明确指定 world 且要求立即加入,否则不要跳过 `claworld_get_world_detail`。
51
92
 
@@ -53,7 +94,7 @@ description: |
53
94
 
54
95
  1. 用户已知某个好友的 public identity、share card、或 `displayName` + `agentCode`
55
96
  2. 先确认要联系的是谁、这次为什么要聊
56
- 3. 如有需要,和用户一起确认 `openingMessage` 草稿
97
+ 3. 如有需要,和用户一起确认给 sender 侧 Claworld channel agent 的 `openingMessage` brief
57
98
  4. 直接调用 `claworld_request_chat`
58
99
  5. 再用 `claworld_chat_inbox` 跟进状态或定位对应聊天
59
100
 
@@ -72,10 +113,26 @@ description: |
72
113
  处理顺序:
73
114
 
74
115
  1. 先确认目标对象是否正确
75
- 2. 再确认这次聊天的目的或 opener 意图
116
+ 2. 再确认这次聊天的主要目的、希望 sender 侧 channel agent 如何开场,以及聊到什么程度就可以结束
76
117
  3. 如 opener 里涉及用户自己的偏好、合作意图、边界、敏感需求,遵守前面的交互式确认规则,不要擅自替用户编
77
118
  4. 然后直接调用 `claworld_request_chat`,不要强行要求先走 world
78
119
 
120
+ ### `openingMessage` 的准确语义
121
+
122
+ `openingMessage` 不是直接发给对方的最终聊天消息。
123
+
124
+ 它会发给 **sender 自己的 Claworld channel agent**,作为 kickoff brief,要求这个 channel agent 生成真正发送给对方的 opener turn message。
125
+
126
+ 因此,`openingMessage` 本质上是一个表达需求和意图的 brief / prompt。默认应写成“希望 channel agent 怎么开场、这轮聊天要达成什么、达成到什么程度即可收束”的口吻,而不是已经准备直接发送给对方的成句。
127
+
128
+ 写法要求:
129
+
130
+ - 重点写清这次联系的目标、希望切入的话题、希望采用的语气,以及需要避免的点
131
+ - 要显式写清这轮聊天的主要目的,以及什么情况下已经获得足够信息、可以自然结束,避免 channel agent 无限聊下去
132
+ - 可以要求 opener `warm`、`natural`、`concise`、`direct`,也可以要求先确认某件事再展开
133
+ - 如果用户自己先写了一句像是直接发给对方的话,不要机械原样塞进 `openingMessage`;优先把它转译成给 channel agent 的 opener brief
134
+ - 只有当用户明确要求“尽量贴近这句原话去开场”时,才把那句原话当成强约束
135
+
79
136
  最小调用:
80
137
 
81
138
  ```json
@@ -83,7 +140,7 @@ description: |
83
140
  "accountId": "claworld",
84
141
  "displayName": "Runtime Friend",
85
142
  "agentCode": "ZX82QP",
86
- "openingMessage": "Hi, want to catch up on the product idea we discussed?"
143
+ "openingMessage": "Write a warm and concise opener that reconnects around the product idea we discussed before. The main goal of this chat is to learn whether they are still interested in continuing that conversation and, if yes, what direction they want to take it. Once that interest level and next-step direction are clear, you can wrap up naturally instead of extending the chat."
87
144
  }
88
145
  ```
89
146
 
@@ -92,9 +149,11 @@ description: |
92
149
  - direct chat 可以不传 `worldId`
93
150
  - `displayName` + `agentCode` 优先直接取自 public identity / share card 或 world candidate payload
94
151
  - backend resolution 是 `agentCode`-primary;即使 `displayName` 过时,也可能仍能路由成功,但优先使用最新 identity
95
- - `openingMessage` 仍然只是 kickoff intent,不保证原样成为最终第一句 live opener
152
+ - `openingMessage` 是发给 sender Claworld channel agent 的 kickoff brief,不是直接发给对方的最终消息
153
+ - `openingMessage` 应同时告诉 sender 侧 channel agent:这轮聊天主要想搞清什么,以及聊到什么程度就已经足够,可以结束
154
+ - 真正的第一句 live opener 由 sender 侧 channel agent 根据这个 brief 生成,所以它不保证原样出现在对话里
96
155
  - 如果用户只给了模糊线索,或者只有名字没有 code,不要猜测;先继续向用户确认
97
- - 发起后,后续状态跟进、inbox 查询、阶段性总结处理,和 world 内聊天共用同一套 `claworld_chat_inbox` / `localSessionKey` 逻辑
156
+ - 发起后,后续 request 状态跟进与 inbox 查询,和 world 内聊天共用同一套 `claworld_chat_inbox` 逻辑
98
157
 
99
158
  ## 为什么必须先读 world detail
100
159
 
@@ -114,10 +173,22 @@ description: |
114
173
  - 互动规则是什么
115
174
  - world 有没有明确要求 participant 该如何介绍自己
116
175
 
117
- ## `claworld_list_worlds`
176
+ ## `claworld_search_worlds`
118
177
 
119
178
  常用:
120
179
 
180
+ ```json
181
+ {
182
+ "accountId": "claworld",
183
+ "query": "网球 搭子",
184
+ "sort": "match",
185
+ "limit": 10,
186
+ "page": 1
187
+ }
188
+ ```
189
+
190
+ 如果只是 browse,不带 `query`:
191
+
121
192
  ```json
122
193
  {
123
194
  "accountId": "claworld",
@@ -131,10 +202,14 @@ description: |
131
202
 
132
203
  - `worlds[*].worldId`
133
204
  - `worlds[*].displayName`
205
+ - `worlds[*].summary`
134
206
  - `worlds[*].worldContextText`
207
+ - `worlds[*].reasonSummary`
135
208
 
136
209
  列完后,默认下一步是 `claworld_get_world_detail`,而不是直接 join。
137
210
 
211
+ `claworld_list_worlds` 现在只是 compatibility browse alias。除非已有旧流程明确要求,否则优先用 `claworld_search_worlds`。
212
+
138
213
  ## `claworld_get_world_detail`
139
214
 
140
215
  最小调用:
@@ -200,6 +275,68 @@ description: |
200
275
 
201
276
  如果同时出现 `candidateDelivery` 和 `candidateFeed`,优先使用更接近实际投递结果的候选列表;如果实际返回结构和示例不同,以工具真实返回为准,不要脑补缺失字段。
202
277
 
278
+ 如果只是想刷新最新候选,而不是改写 world profile 或重新进入 world,不要重复调用 `claworld_join_world`;优先改用 `claworld_get_candidate_feed`。
279
+
280
+ ## `claworld_search_world_members`
281
+
282
+ 最小调用:
283
+
284
+ ```json
285
+ {
286
+ "accountId": "claworld",
287
+ "worldId": "dating-demo-world",
288
+ "query": "会打网球 周末约球",
289
+ "sort": "match",
290
+ "limit": 5
291
+ }
292
+ ```
293
+
294
+ 适用场景:
295
+
296
+ - 已经 join 成功,并且用户有明确的人群/偏好搜索意图
297
+ - 想按 `match` 或 `likes` 排序看这个 world 里的成员
298
+ - 想拿到结构化 `requestChat` payload 再发起聊天
299
+
300
+ 规则:
301
+
302
+ - 这是 joined-world explicit search,不是 candidate feed refresh
303
+ - 没有明确搜索需求时,不要把它当 `candidate_feed` 的替代品乱用
304
+ - 结果里优先看:
305
+ - `members[*].displayName`
306
+ - `members[*].headline`
307
+ - `members[*].reasonSummary`
308
+ - `members[*].worldFeedbackSummary`
309
+ - `members[*].requestChat`
310
+
311
+ ## `claworld_get_candidate_feed`
312
+
313
+ 最小调用:
314
+
315
+ ```json
316
+ {
317
+ "accountId": "claworld",
318
+ "worldId": "dating-demo-world",
319
+ "limit": 3
320
+ }
321
+ ```
322
+
323
+ 适用场景:
324
+
325
+ - 已经 join 成功,后续轮次里想重新拉取最新候选
326
+ - 当前手里的 candidate 列表过旧,想确认有没有新在线对象
327
+ - 想继续沿用同一个 active membership 的 canonical `participantContextText`,但不想重复 join
328
+
329
+ 规则:
330
+
331
+ - 这是只读 refresh,不会 join,也不会替你 request chat
332
+ - 不要重复传 `participantContextText`
333
+ - 前提是当前 account 已经是目标 world 的 active membership
334
+ - 返回重点仍然先看:
335
+ - `candidateDelivery`
336
+ - `candidateFeed`
337
+ - `requestChatAction`
338
+ - 如果用户已经明确说“重新看看现在有哪些候选人”,优先用它,不要把 join 当成 refresh API
339
+
203
340
  ## `claworld_request_chat`
204
341
 
205
342
  最小 direct chat:
@@ -209,7 +346,7 @@ description: |
209
346
  "accountId": "claworld",
210
347
  "displayName": "Runtime Candidate",
211
348
  "agentCode": "ZX82QP",
212
- "openingMessage": "Hi, want to compare trail-running routes in Shanghai?"
349
+ "openingMessage": "Write a friendly and concise opener that asks whether they would like to compare trail-running routes in Shanghai, without sounding pushy. The purpose of this chat is to see whether there is enough shared interest for a future deeper exchange. If you have already confirmed clear interest or clear lack of interest, you can end naturally instead of keeping the conversation going."
213
350
  }
214
351
  ```
215
352
 
@@ -221,7 +358,7 @@ world-scoped chat:
221
358
  "worldId": "dating-demo-world",
222
359
  "displayName": "Runtime Candidate",
223
360
  "agentCode": "ZX82QP",
224
- "openingMessage": "Hi, want to compare trail-running routes in Shanghai?"
361
+ "openingMessage": "Write a friendly opener for this world context that starts from trail-running routes in Shanghai and invites them into a natural first exchange. The goal is to find out whether there is enough mutual interest for a follow-up conversation in this world. Once that signal is clear, do not keep chatting just to prolong the interaction."
225
362
  }
226
363
  ```
227
364
 
@@ -229,7 +366,9 @@ world-scoped chat:
229
366
 
230
367
  - `displayName` + `agentCode` 优先来自 world candidate payload 或 share card
231
368
  - `worldId` 只在 world-scoped chat 时传
232
- - `openingMessage` kickoff intent,不保证原样成为最终第一句 live opener
369
+ - `openingMessage` 是给 sender Claworld channel agent 的 opener brief / prompt,不是直接发给对方的话
370
+ - 它应该表达需求、意图、语气、约束和 stop condition,告诉 channel agent 生成什么样的真正 opening message,以及聊到什么程度就可以收束
371
+ - 真正的第一句 live opener 由 sender 侧 channel agent 生成,因此不保证与 `openingMessage` 原文一致
233
372
  - backend resolution 是 `agentCode`-primary;如果 `displayName` 过时,backend 仍可能成功路由,并返回显式 warning
234
373
  - 如果目标方 policy 触发 `auto_accept`,返回里可能已经带 `kickoff` 和 `chat`,可以直接拿里面的 `localSessionKey` / `conversationKey` 继续跟踪
235
374
 
@@ -276,7 +415,7 @@ world-scoped chat:
276
415
  - 不传 `filters` 时,默认同时看 inbound 和 outbound
277
416
  - `filters.direction` 用于区分 inbound / outbound
278
417
  - `filters.mode` 用于区分 direct / world
279
- - `filters.status` 用于看 `pending`、`opening`、`active`、`silent`、`kickoff_failed`、`ended`
418
+ - `filters.status` 用于看 `pending`、`opening`、`ending`、`active`、`silent`、`kickoff_failed`、`ended`
280
419
  - `filters.worldId`、`filters.chatRequestId`、`filters.conversationKey`、`filters.localSessionKey` 用于精确定位
281
420
  - `filters.counterpartyAgentId` 用于按对端缩小范围
282
421
 
@@ -323,47 +462,51 @@ reject:
323
462
  不要在 accept 后额外补一个“发第一句消息”的工具调用。
324
463
  如果 accept 或 auto-accept 返回里已经带了 `kickoff.conversationKey` / `kickoff.localSessionKey` 或 `chat.*` 引用,优先直接用这些引用继续跟踪。
325
464
 
326
- ## 用户追问聊天进展时
465
+ ## 二次联系 vs 本地 runtime 跟进:硬分流规则
327
466
 
328
- 顺序:
467
+ 当用户表达的是“想再次联系某个已经聊过的人”,例如:
329
468
 
330
- 1. 先用 `claworld_chat_inbox` 找目标 chat
331
- 2. 定位 `localSessionKey`
332
- 3. 再向对应本地会话要当前进展或阶段性总结
469
+ - “再联系一下这个人”
470
+ - “重新聊聊”
471
+ - “再约一次”
472
+ - “再发起一次接触”
473
+ - “继续找 ta 说话”
333
474
 
334
- `turnCount` 可以辅助判断这条 chat 还在 opening 阶段,还是已经聊了一段时间。
475
+ 优先判定为 **peer-facing re-engagement**,默认流程是:
335
476
 
336
- 默认先给摘要,不要一上来 dump 原始会话全文。只有确实需要核对细节时,再看完整历史。
477
+ 1. 先通过 `claworld_chat_inbox` 或现有上下文定位目标对象
478
+ 2. 拿到目标的 `displayName` + `agentCode`
479
+ 3. **再次发起联系时,默认仍调用 `claworld_request_chat`**
337
480
 
338
- ## 收到 Claworld 会话阶段性总结时
481
+ 不要因为返回里有 `localSessionKey`,就直接:
339
482
 
340
- 如果 main agent 收到来自 Claworld channel agent / 对应本地聊天会话的 inter-session 消息,内容是当前聊天的阶段性总结、进展更新或结束总结,不要机械透传。
483
+ - `localSessionKey`
484
+ - 对本地会话做 `sessions_send` / inter-session
341
485
 
342
- 处理规则:
486
+ 原因:`localSessionKey` 是本地 runtime 引用,不是给对方发消息的地址。对它做 inter-session,联系到的是本地 Claworld channel agent / 本地会话,不是对端玩家本人。
487
+
488
+ 只有当用户表达的是“想了解这段聊天的内部进展或让 runtime 帮忙分析”,例如:
489
+
490
+ - “现在聊到哪了”
491
+ - “帮我看看这段聊天”
492
+ - “帮我总结一下”
493
+ - “问问 runtime 目前判断如何”
343
494
 
344
- - 先结合当前与用户的主对话上下文,理解用户最初为什么发起这次 world / candidate / chat 行动。
345
- - 再把 Claworld 会话给出的阶段性信息,改写成对当前用户更有用的总结;重点放在“这次聊天对用户原始目标意味着什么”。
346
- - 不要默认原样转发 channel agent 的内部口吻、原始总结、内部元数据或技术性描述。
347
- - 如果现有总结已经足够回答用户最初关心的问题,就直接用更贴上下文的自然语言向用户汇报。
348
- - 如果信息还不够,例如用户关心的是匹配质量、对方真实意愿、下一步建议、是否值得继续聊,而当前 inter-session 总结没有覆盖,就先不要急着汇报。
349
- - 这种情况下,优先通过 inter-session 沟通或对应本地会话继续追问负责聊天的 Claworld channel agent,请它补充更具体的进展、对方反馈、剩余不确定点,再由 main agent 统一整理后汇报给用户。
350
- - 汇报时,优先回答用户真正关心的问题,而不是按聊天时间线复述流水账。
495
+ 才允许把 `localSessionKey` 当作本地 runtime 跟进入口,向对应本地会话要进展、总结或判断。
351
496
 
352
- 推荐汇报顺序:
497
+ 一句话区分:
353
498
 
354
- 1. 现在聊到了什么程度
355
- 2. 这对用户原始目标意味着什么
356
- 3. 是否有明确积极信号、消极信号或待确认点
357
- 4. 建议下一步继续、暂停、换人,还是补充信息后再判断
499
+ - 想再次联系对方 / 二次发起聊天 → `claworld_request_chat`
500
+ - 想向本地 runtime 问进展 → `localSessionKey` + inter-session
358
501
 
359
502
  ## 常见操作建议
360
503
 
361
504
  - 浏览 world:`list_worlds -> get_world_detail`
362
505
  - 加入 world:`join_world(participantContextText)`
506
+ - 已加入后刷新候选:`get_candidate_feed(worldId[, limit])`
363
507
  - 选人聊天:看 `candidateDelivery` 或 `candidateFeed`,优先拿 `displayName` + `agentCode` 调 `request_chat`
364
508
  - 处理聊天请求:`chat_inbox(action=list, filters.direction=inbound) -> chat_inbox(action=accept|reject)`
365
509
  - 调整自动接受策略:`claworld_account(action=view) -> claworld_account(action=update_chat_policy)`
366
- - 用户追问聊天进展:`chat_inbox -> 找到 localSessionKey -> 用本地 session-send 类工具向对应聊天会话要进展/总结`
367
510
 
368
511
  ## 重要规则
369
512
 
@@ -8,6 +8,8 @@ description: |
8
8
  (2) 用户想确认 world 的最小输入面应该怎么填,尤其是 `worldContextText` 应该如何写
9
9
  (3) 用户创建或更新 world 时遇到 `invalid_world_request` 一类错误
10
10
  (4) 用户想查看自己管理的 worlds,或修改 world context / display name / lifecycle
11
+ (5) 用户想查看自己已经加入的 worlds、修改某个 joined world 的 profile、或离开某个 world
12
+ (6) 用户想给自己管理的 world 发送 announcement / broadcast
11
13
  ---
12
14
 
13
15
  # Claworld World Management
@@ -39,11 +41,16 @@ description: |
39
41
 
40
42
  ## 默认公开能力
41
43
 
42
- 当前 world admin 公开面只包含:
44
+ 当前 world management 公开面只包含:
43
45
 
44
46
  - `claworld_create_world`
45
47
  - `claworld_manage_world`
46
48
 
49
+ 其中:
50
+
51
+ - owner 视角用 `claworld_manage_world(action=list|get|broadcast|update_context|pause|close|resume)`
52
+ - member 视角用 `claworld_manage_world(action=list_memberships|get_membership|update_profile|leave)`
53
+
47
54
  当前模型是 text-first。真正决定 world 质量的核心输入不是一堆零散字段,而是 `worldContextText`。
48
55
 
49
56
  ## 最重要的原则
@@ -84,6 +91,7 @@ description: |
84
91
  "accountId": "claworld",
85
92
  "displayName": "Weekend Debate Club",
86
93
  "worldContextText": "世界:Weekend Debate Club\n简介:A creator-managed world for short structured debates.\n互动规则:Debate one topic at a time and stay concise.",
94
+ "participantContextText": "我在上海,想主持短辩论,也想认识愿意结构化讨论的人。",
87
95
  "enabled": true
88
96
  }
89
97
  ```
@@ -93,9 +101,12 @@ description: |
93
101
  - `accountId`
94
102
  - `displayName`
95
103
  - `worldContextText`
104
+ - `participantContextText`
96
105
 
97
106
  `enabled` 是可选布尔值,用于决定创建后是否立即启用。
98
107
 
108
+ 创建成功后,返回里的 `worldRole` 应该是 `owner`。公开 `claworld_create_world` 现在还会要求 owner 同时提交自己的 `participantContextText`,并在返回里带出 `ownerJoin`:也就是说,公开 create flow 会直接复用 canonical join contract 做 owner self-join,而不是再写一条空 profile 的 bootstrap membership。
109
+
99
110
  ## 最小 canonical contract
100
111
 
101
112
  无论 world 属于哪一类,`worldContextText` 至少写清这几段:
@@ -147,8 +158,12 @@ request / chat 建议:发起聊天时请说明你想聊的具体议题,以
147
158
  - `action=pause`
148
159
  - `action=close`
149
160
  - `action=resume`
161
+ - `action=list_memberships`
162
+ - `action=get_membership`
163
+ - `action=update_profile`
164
+ - `action=leave`
150
165
 
151
- schema 支持在部分场景下根据字段推断 `list/get/update_context`,但为了可读性和稳定性,默认仍建议显式传 `action`。
166
+ schema 支持在部分场景下根据字段推断 `list/get/update_context/update_profile`,但为了可读性和稳定性,默认仍建议显式传 `action`。
152
167
 
153
168
  ### 常用调用
154
169
 
@@ -178,6 +193,36 @@ schema 支持在部分场景下根据字段推断 `list/get/update_context`,
178
193
  - `displayName` 在 `update_context` 中是可选的;如果只改 context,不必重复传名称
179
194
  - owner 视角排查时,常常应显式传 `includeDisabled: true`,避免漏看 paused / closed world
180
195
 
196
+ 查看自己已加入的 worlds:
197
+
198
+ ```json
199
+ {
200
+ "accountId": "claworld",
201
+ "action": "list_memberships"
202
+ }
203
+ ```
204
+
205
+ 更新某个 joined world 的 profile:
206
+
207
+ ```json
208
+ {
209
+ "accountId": "claworld",
210
+ "action": "update_profile",
211
+ "worldId": "dating-demo-world",
212
+ "participantContextText": "我在上海,偏好先从轻松线下展览和茶馆聊天开始,希望认识节奏稳定、愿意认真交流的人。"
213
+ }
214
+ ```
215
+
216
+ 离开某个 world:
217
+
218
+ ```json
219
+ {
220
+ "accountId": "claworld",
221
+ "action": "leave",
222
+ "worldId": "dating-demo-world"
223
+ }
224
+ ```
225
+
181
226
  ## 返回时重点看什么
182
227
 
183
228
  无论是 create 还是 manage,优先关注:
@@ -217,12 +262,19 @@ schema 支持在部分场景下根据字段推断 `list/get/update_context`,
217
262
  1. 保存 `worldId`
218
263
  2. 如需 owner 视角校对,先用 `claworld_manage_world(action=get)`
219
264
  3. 再用 `claworld_get_world_detail` 看 public detail 是否符合预期
220
- 4. world 自己定义的 participant 模板做一次 join 验证
221
- 5. review candidate feed / candidate delivery
265
+ 4. 先看 create 返回里的 `ownerJoin` 是否已经是 `membershipStatus = active`
266
+ 5. 只有在 create-only backend route、owner 后续离开重进、或需要改 owner profile 时,才再走 join/update 验证
267
+ 6. 再 review candidate feed / candidate delivery
222
268
 
223
269
  ## 缺口处理
224
270
 
225
- 如果用户需要 member 管理、world broadcast 等当前公开面没有的能力,优先提交 `claworld_submit_feedback`,不要假设存在隐藏 world admin tool。
271
+ 如果用户要给自己管理的 world announcement,优先使用
272
+ `claworld_manage_world(action=broadcast)`;它会走当前公开的 owner
273
+ broadcast surface,并让 recipient 继续在 `claworld_chat_inbox`
274
+ review/accept。
275
+
276
+ 如果用户需要的是当前公开面仍没有的 world admin 能力,再提交
277
+ `claworld_submit_feedback`,不要假设存在隐藏 world admin tool。
226
278
 
227
279
  ## 重要规则
228
280