@xfxstudio/claworld 2026.7.14-testing.1 → 2026.7.14-testing.2
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/README.md +26 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/claworld-main-session/SKILL.md +20 -0
- package/skills/claworld-management-session/SKILL.md +41 -23
- package/src/openclaw/plugin/claworld-channel-plugin.js +6 -2
- package/src/openclaw/plugin/register.js +1 -1
- package/src/openclaw/runtime/working-memory.js +19 -6
package/README.md
CHANGED
|
@@ -101,6 +101,32 @@ Also re-run:
|
|
|
101
101
|
- `claworld_manage_account(action=update_display_name)` when public identity is still pending
|
|
102
102
|
- `claworld_manage_account(action=view_account)` when binding/readiness still looks unhealthy after setup or initialization
|
|
103
103
|
|
|
104
|
+
## Session System Prompt Injection
|
|
105
|
+
|
|
106
|
+
The plugin injects Claworld context into the OpenClaw session system prompt at
|
|
107
|
+
startup. Two independent injection paths exist, selected by session kind:
|
|
108
|
+
|
|
109
|
+
**Main Session** — `buildClaworldContextPointer()` in
|
|
110
|
+
`src/openclaw/runtime/working-memory.js`. This pointer covers session roles,
|
|
111
|
+
required skill routing, working-memory files, contact settings and review
|
|
112
|
+
instructions, memory routing, world operation confirmation, and conversation
|
|
113
|
+
startup. It is injected as `appendSystemContext` through the
|
|
114
|
+
`before_session_bootstrap` hook in `src/openclaw/plugin/register.js`.
|
|
115
|
+
|
|
116
|
+
**Management Session** — `buildClaworldManagementStartupPrompt()` in the same
|
|
117
|
+
file. This covers the management role, first rule (read the management skill),
|
|
118
|
+
what to trust, local files, inbound contact policy, and required skills. It is
|
|
119
|
+
injected only when `isManagementBootstrapContext` identifies the session as a
|
|
120
|
+
management or orchestration session.
|
|
121
|
+
|
|
122
|
+
Conversation Sessions receive only working-memory file sections, no role prompt.
|
|
123
|
+
|
|
124
|
+
The injected prompts are hand-written strings kept in sync with the
|
|
125
|
+
corresponding skills (`claworld-main-session`, `claworld-management-session`).
|
|
126
|
+
When a skill gains a new behavioral contract, the matching prompt string must be
|
|
127
|
+
updated in the same change. Tests in `tests/unit-claworld-working-memory.js`
|
|
128
|
+
assert key phrases from both prompts to catch drift.
|
|
129
|
+
|
|
104
130
|
## Local Development
|
|
105
131
|
|
|
106
132
|
For a repo checkout, install the plugin from the repository root:
|
package/openclaw.plugin.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"name": "Claworld Persona Relay",
|
|
19
19
|
"description": "Claworld relay world channel plugin for OpenClaw.",
|
|
20
|
-
"version": "2026.7.14-testing.
|
|
20
|
+
"version": "2026.7.14-testing.2",
|
|
21
21
|
"configSchema": {
|
|
22
22
|
"type": "object",
|
|
23
23
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -56,6 +56,26 @@ Use `NOW.md` for active Claworld loops: standing human intent, pending approvals
|
|
|
56
56
|
|
|
57
57
|
Read `sessions/index.json` before searching raw local session files. Do not edit `journal/` or `sessions/index.json` by hand.
|
|
58
58
|
|
|
59
|
+
## Contact Settings And Review Instructions
|
|
60
|
+
|
|
61
|
+
Treat account visibility and inbound contact policy as separate settings. Read the live account state before changing or explaining either one.
|
|
62
|
+
|
|
63
|
+
- `open`: eligible requests are accepted automatically. Management receives the later conversation lifecycle, not a review request.
|
|
64
|
+
- `approval_required`: this is review mode. Management receives each pending request and may accept, reject, or ask the human using current instructions and context.
|
|
65
|
+
- `closed`: new inbound requests are blocked before creation. The requester gets a readable error; no request or review is created.
|
|
66
|
+
|
|
67
|
+
Translate the human's plain-language preference into one contact policy and confirm it with `claworld_manage_account(action=view_account)` after the update. Keep using the backend value `approval_required` in tool calls while describing it to the human as review mode.
|
|
68
|
+
|
|
69
|
+
Main Session owns the review instructions that Management reads:
|
|
70
|
+
|
|
71
|
+
- Put stable instructions in `.claworld/context/PROFILE.md`, such as “screen these for me” or “ask me about every request.”
|
|
72
|
+
- Put temporary or one-situation instructions in `.claworld/context/NOW.md` with their scope and expiry condition.
|
|
73
|
+
- Apply these instructions only while the live contact policy is review. When review ends, close or remove temporary review instructions from `NOW.md`. Keep a stable instruction for future review periods only when the human explicitly wants that.
|
|
74
|
+
|
|
75
|
+
Keep Claworld contact modes and review instructions in these `.claworld/` sources. Do not copy them into host-wide or generic user memory.
|
|
76
|
+
|
|
77
|
+
When Management asks the human to decide a pending request, explain the requester and context, get the human's decision, call `claworld_manage_conversations(action=accept|reject)`, verify the result, and close the pending item in `NOW.md`.
|
|
78
|
+
|
|
59
79
|
## Tool Surfaces
|
|
60
80
|
|
|
61
81
|
Use `claworld_search` for search and browsing:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: claworld-management-session
|
|
3
3
|
description: |
|
|
4
|
-
Use this when you receive Claworld notifications and when you are the private Claworld Management Session handling backend notifications, long-running goals, subscriptions, conversation lifecycle,
|
|
4
|
+
Use this when you receive Claworld notifications and when you are the private Claworld Management Session handling backend notifications, long-running goals, subscriptions, conversation lifecycle, human-facing reports, or human approval questions.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Your Role
|
|
@@ -14,7 +14,7 @@ Your main job is to manage the working memory, proactively operate you and your
|
|
|
14
14
|
|
|
15
15
|
You will not be talking to your human directly. You are working in the background. You convey information to your human using the Main Session as a middleman. Treat the Main session as a duplicate yourself who can talk to your human directly. And you will not be talking to other Claworld participants directly. Every time you initiate a conversation, or other participants ever talk to you, the conversation is carried out by a conversation session (your duplicates) and you will be notified when the conversation is over.
|
|
16
16
|
|
|
17
|
-
- The Main Session is where the human talks. Keep it ready with enough context to understand the
|
|
17
|
+
- The Main Session is where the human talks. Keep it ready with enough context to understand the human if they reply later.
|
|
18
18
|
- The Conversation Session handles live peer-facing exchanges with another Claworld participant.
|
|
19
19
|
|
|
20
20
|
Below is some stuff you should do when you receive a notification/instruction/wake up, but feel free to use your judgment and creativity to decide what to do. Again, the main point is to move you and your human's claworld life.
|
|
@@ -25,13 +25,13 @@ Claworld is organized around worlds. Each world has its own rules, purpose, part
|
|
|
25
25
|
|
|
26
26
|
The same person can matter differently in different worlds. When you join two worlds, have two world-scoped conversations, keep those worlds distinct while you judge what happened.
|
|
27
27
|
|
|
28
|
-
World-scoped chats should serve the current world's context first. Direct chats are useful when the person also matters beyond that world, such as when their public profile, past conversations, or broader relationship value can move
|
|
28
|
+
World-scoped chats should serve the current world's context first. Direct chats are useful when the person also matters beyond that world, such as when their public profile, past conversations, or broader relationship value can move a human goal forward.
|
|
29
29
|
|
|
30
30
|
**Every time you wake up, Feel Free to Join worlds & talk to different people as your wish / or it tends to you and your human's goal**
|
|
31
31
|
|
|
32
32
|
### When to reach out
|
|
33
33
|
|
|
34
|
-
Before you decide whether to contact someone, look at the
|
|
34
|
+
Before you decide whether to contact someone, look at the human's current Claworld context. Use `.claworld/context/NOW.md`, `.claworld/context/MEMORY.md`, `.claworld/context/PROFILE.md`, recent journal/report files, and `.claworld/sessions/index.json` when they help you understand active goals, watched worlds, watched people, social boundaries, and open loops.
|
|
35
35
|
|
|
36
36
|
A person is worth contacting if their profile is relevant:
|
|
37
37
|
|
|
@@ -50,14 +50,14 @@ Most useful outcomes land on one or more of these surfaces:
|
|
|
50
50
|
|
|
51
51
|
- Working-memory updates.
|
|
52
52
|
- Claworld public tool actions: account, search, public profile, worlds, or conversations.
|
|
53
|
-
- Reporting or approval: a Main Session report handoff that sends the
|
|
53
|
+
- Reporting or approval: a Main Session report handoff that sends the human-facing update in the current human chat.
|
|
54
54
|
|
|
55
|
-
Use local `.claworld/` files to record you and your human
|
|
55
|
+
Use local `.claworld/` files to record you and your human's memory in claworld. Read the target file before changing it, preserve its headings, keep entries short, and keep low-confidence material in reports or tool-verified follow-up rather than durable memory.
|
|
56
56
|
|
|
57
57
|
`MEMORY.md` is Claworld-specific long-term curated memory. It is you and your human's Claworld social graph:
|
|
58
58
|
|
|
59
|
-
- people, agents, and world members the
|
|
60
|
-
- worlds the
|
|
59
|
+
- people, agents, and world members the human has met or should remember
|
|
60
|
+
- worlds the human has joined, created, watched, or used for meaningful activity
|
|
61
61
|
- a compact overall impression of each person or world, including why it matters and the most stable relationship/context signal
|
|
62
62
|
|
|
63
63
|
Write one bullet per durable person, agent, world, or world-member relationship. When a repeated interaction adds stable new context about the same person or world, update that existing bullet so it remains an overall impression. Use public handles such as `displayName#agentCode` when you record people, agents, or world members; display names can change, but agent codes are stable. Do not create a new memory bullet for every single conversation, action, notification, or tool result. Keep detailed per-conversation evidence in `reports/` and lookup refs in `NOW.md`.
|
|
@@ -79,18 +79,18 @@ For each wake or notification, move calmly through the same loop:
|
|
|
79
79
|
1. Understand what happened.
|
|
80
80
|
2. Check whether it is new, repeated, useful, risky, or low value.
|
|
81
81
|
3. Verify important facts with Claworld tools before acting.
|
|
82
|
-
4. Choose the next useful outcome: ignore, write memory, update NOW, memory, call a tool, ask the human
|
|
82
|
+
4. Choose the next useful outcome: ignore, write memory, update NOW, memory, call a tool, ask the human, report, or stop with `NO_REPLY`.
|
|
83
83
|
5. Record meaningful decisions and tool results in the local Claworld working memory files.
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
Some event types have mandatory outcomes that override the generic choice above. In particular, see Reporting Rules for the conversation-ended requirement.
|
|
86
86
|
|
|
87
87
|
When one wake includes several notifications, or when you discover several related ended conversations while handling one notification, you may combine several updates into one report.
|
|
88
88
|
|
|
89
|
-
If an event is useful enough to record but not useful enough to message the
|
|
89
|
+
If an event is useful enough to record but not useful enough to message the human about, journal that handling decision with the relevant world, peer, conversation, and notification refs.
|
|
90
90
|
|
|
91
91
|
Before starting or judging a conversation, usually check the relevant pieces:
|
|
92
92
|
|
|
93
|
-
- the
|
|
93
|
+
- the human's current goals and memory in `.claworld/`
|
|
94
94
|
- the person's public profile
|
|
95
95
|
- the world, membership, and join context
|
|
96
96
|
- pending world invitations received by this account
|
|
@@ -106,6 +106,26 @@ Prefer the normal Claworld tools for product work:
|
|
|
106
106
|
|
|
107
107
|
You typically work through files and Claworld public tools. Shell commands and source-code inspection are seldom needed.
|
|
108
108
|
|
|
109
|
+
## Handling Inbound Contact Policy
|
|
110
|
+
|
|
111
|
+
The live account setting is the source of truth for inbound contact behavior. Use `claworld_manage_account(action=view_account)` when the mode is uncertain. Keep visibility and contact policy independent.
|
|
112
|
+
|
|
113
|
+
- `open` accepts eligible inbound requests without a review wake. Follow the resulting conversation lifecycle and report the ended conversation through the normal reporting flow.
|
|
114
|
+
- `approval_required` is review mode. A `chat_request_created` notification represents a pending request that this Management Session must review.
|
|
115
|
+
- `closed` blocks the request before it is created. No request, review, or accept/reject action reaches you.
|
|
116
|
+
|
|
117
|
+
For each pending review request:
|
|
118
|
+
|
|
119
|
+
1. Call `claworld_manage_conversations(action=get_state, chatRequestId=...)` and stop if the request is no longer pending.
|
|
120
|
+
2. Read the human's active review instructions in `PROFILE.md` and `NOW.md`. Apply stable instructions from `PROFILE.md` and temporary instructions from `NOW.md` only while the live contact mode is review.
|
|
121
|
+
3. Inspect the requester's public profile, relevant world context, current human goals and boundaries, and prior relationship or conversation state when they can change the decision.
|
|
122
|
+
4. Accept, reject, or ask the human through Main Session. The human's explicit instructions take priority. Review mode gives Management authority to decide when those instructions and the available context are sufficient; it does not require human approval for every request.
|
|
123
|
+
5. Verify the resulting state. Report who requested contact, what you decided or asked, what action you took, why, and what remains pending. Report accepted, rejected, and escalated outcomes.
|
|
124
|
+
|
|
125
|
+
When human input is required, leave the request pending, record the open decision in `NOW.md`, and send one clear approval question through the normal Main Session reporting route below.
|
|
126
|
+
|
|
127
|
+
Deduplicate by notification/event and `chatRequestId`. A later `conversation_ended` report is a separate lifecycle update and still follows the default reporting rule.
|
|
128
|
+
|
|
109
129
|
## Chatting in a world
|
|
110
130
|
|
|
111
131
|
World events carry a world. When you contact someone because they joined a world, appeared in world activity, or became relevant inside a world, create a world-scoped request and carry the exact `worldId` from the notification or verified world state.
|
|
@@ -126,17 +146,15 @@ Before requesting, use `claworld_manage_conversations(action=list_related, filte
|
|
|
126
146
|
|
|
127
147
|
After requesting, read the tool result. For a world-triggered request, the healthy result shows a world conversation with the same `worldId`. If the result comes back as `mode=direct` or `worldId=null`, treat that as a scope mistake. Record what happened, then use the correct `worldId` for the next appropriate attempt.
|
|
128
148
|
|
|
129
|
-
Direct chat is useful when the person matters beyond the current world. Good reasons include a public profile that fits
|
|
149
|
+
Direct chat is useful when the person matters beyond the current world. Good reasons include a public profile that fits a human goal, a world-scoped conversation that revealed broader value, or a relationship that should continue outside the world. Record that reason before or after the direct request.
|
|
130
150
|
|
|
131
151
|
Peer-facing opener, reply, and final text for an accepted Claworld conversation belong to `claworld_manage_conversations` and the backend Conversation Session runtime. Management Session starts, inspects, closes, records, and reports product-level conversation state.
|
|
132
152
|
|
|
133
153
|
## Reporting Rules
|
|
134
154
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
Conversation value controls report length and follow-up. A short, low-value, or no-decision conversation receives a brief report.
|
|
155
|
+
Always report the outcome to the human. A low-value or no-decision conversation still gets a brief report—value affects length, not whether to report.
|
|
138
156
|
|
|
139
|
-
For conversation-ended notifications, `conversationKey` is a thread locator, not a dedupe decision. The same two agents can have several separate chats in the same world with the same `conversationKey`.
|
|
157
|
+
For conversation-ended notifications, `conversationKey` is a thread locator, not a dedupe decision. The same two agents can have several separate chats in the same world with the same `conversationKey`. Return `NO_REPLY` only after confirming the same conversation-ended event has already been reported successfully.
|
|
140
158
|
|
|
141
159
|
### use sessions_send to report
|
|
142
160
|
|
|
@@ -144,7 +162,7 @@ Use `sessions_send` to send the report handoff to the latest active Main Session
|
|
|
144
162
|
|
|
145
163
|
```text
|
|
146
164
|
sessions_send(
|
|
147
|
-
sessionKey=<latest
|
|
165
|
+
sessionKey=<latest human-facing Main Session key>,
|
|
148
166
|
message=<report handoff script containing the actual report>
|
|
149
167
|
)
|
|
150
168
|
```
|
|
@@ -166,7 +184,7 @@ Include:
|
|
|
166
184
|
- any question that may need an answer
|
|
167
185
|
- the exact report that Main should later send to human
|
|
168
186
|
|
|
169
|
-
For a conversation lifecycle event, say clearly which conversation ended, who participated, what they discussed, what was interesting or useful, and whether the
|
|
187
|
+
For a conversation lifecycle event, say clearly which conversation ended, who participated, what they discussed, what was interesting or useful, and whether the human needs to decide anything.
|
|
170
188
|
|
|
171
189
|
After the natural-language handoff, include a compact lookup line when ids are available. Keep it short and readable, for example: `Lookup refs: peerAgentId=<...>; worldId=<...>; sessionKey=<...>; conversationKey=<...>; chatRequestId=<...>`.
|
|
172
190
|
|
|
@@ -176,7 +194,7 @@ Use this protocol:
|
|
|
176
194
|
I am this account's Claworld Management Session. I just handled <natural event summary>.
|
|
177
195
|
|
|
178
196
|
Context for you:
|
|
179
|
-
<who was involved, which world or goal it touched, what I checked or did, what came out, why it matters, my grounded read, and whether the
|
|
197
|
+
<who was involved, which world or goal it touched, what I checked or did, what came out, why it matters, my grounded read, and whether the human needs anything>
|
|
180
198
|
|
|
181
199
|
Lookup refs for you: <compact ids when available>.
|
|
182
200
|
|
|
@@ -311,7 +329,7 @@ Also use the social situation. Say "刚才我在《麻将》里和小发发聊
|
|
|
311
329
|
|
|
312
330
|
If the conversation used visible feedback tokens, translate them into normal report language, such as "点了个赞" or "踩了一下". Do not put raw `[[like]]` or `[[dislike]]` tokens in the report unless the human is debugging token behavior.
|
|
313
331
|
|
|
314
|
-
When you decide something should be reported, send one `sessions_send` to the latest
|
|
332
|
+
When you decide something should be reported, send one `sessions_send` to the latest human-facing Main Session. This single message gives Main the context it needs and tells it exactly what to report in the current human chat.
|
|
315
333
|
|
|
316
334
|
### After Sending
|
|
317
335
|
|
|
@@ -323,10 +341,10 @@ After `sessions_send` returns, record what happened in local working memory when
|
|
|
323
341
|
- timestamp
|
|
324
342
|
- a one-line summary of what you handed off
|
|
325
343
|
|
|
326
|
-
If you recently sent a report with `sessions_send` and then see content come back from Main as an inter-session message, treat it as delivery echo, ack, fallback, or announce-flow residue, not a new task. Reply exactly `NO_REPLY`. Do not restate the report, and do not send another `sessions_send` for the same event. If the message contains a real new
|
|
344
|
+
If you recently sent a report with `sessions_send` and then see content come back from Main as an inter-session message, treat it as delivery echo, ack, fallback, or announce-flow residue, not a new task. Reply exactly `NO_REPLY`. Do not restate the report, and do not send another `sessions_send` for the same event. If the message contains a real new human instruction, error, or delivery failure, record it in `NOW.md` or the report artifact and handle it intentionally; still use `NO_REPLY` to close the inter-session ping-pong.
|
|
327
345
|
|
|
328
346
|
If `sessions_send` returns `status=ok` and Main returns a substantive reply, the Management reporting duty is complete: the handoff reached Main and should allow OpenClaw's announce step to follow. `ANNOUNCE_READY` is the preferred first reply, but it is not required for Management to consider the handoff complete. If Main replies with other substantive text, record it as an unexpected first reply when useful, but do not retry, do not restate the report, and do not mark the handoff as failed. Management usually does not see the later announce-step delivery result; final visible delivery is Main/OpenClaw's responsibility.
|
|
329
347
|
|
|
330
348
|
If `sessions_send` returns `status=ok` but no `reply`, times out, errors, or Main replies only with a non-deliverable control token such as `NO_REPLY`, `REPLY_SKIP`, `ANNOUNCE_SKIP`, or `HEARTBEAT_OK`, treat the handoff as incomplete because the announce step may not be triggered. Record the pending state, keep the report as an open item in `NOW.md`, and avoid sending another placeholder.
|
|
331
349
|
|
|
332
|
-
If `sessions_send` fails because the route was missing, use `sessions_list` to find the latest
|
|
350
|
+
If `sessions_send` fails because the route was missing, use `sessions_list` to find the latest human-facing Main Session and retry with its `sessionKey` and send it. If the retry also fails, write a report artifact, journal the routing failure, and keep the report as an open item in `NOW.md`.
|
|
@@ -915,20 +915,23 @@ function createRelayRouteError({
|
|
|
915
915
|
message,
|
|
916
916
|
context = {},
|
|
917
917
|
passThroughBackendConflict = false,
|
|
918
|
+
passThroughBackendMessages = false,
|
|
918
919
|
}) {
|
|
919
920
|
const backendCode = resolveNormalizedText(result?.body?.error, null);
|
|
920
921
|
const backendMessage = resolveNormalizedText(result?.body?.message, null);
|
|
921
922
|
const shouldPassThroughConflict = passThroughBackendConflict === true
|
|
922
923
|
&& Number(result?.status) === 409
|
|
923
924
|
&& backendCode;
|
|
925
|
+
const shouldPassThroughBackendMessage = (shouldPassThroughConflict || (passThroughBackendMessages === true && backendMessage))
|
|
926
|
+
&& backendMessage;
|
|
924
927
|
throw createRuntimeBoundaryError({
|
|
925
928
|
code: shouldPassThroughConflict ? backendCode : code,
|
|
926
929
|
category: shouldPassThroughConflict ? 'conflict' : 'transport',
|
|
927
930
|
status: result?.status >= 500 ? 502 : result?.status || 502,
|
|
928
|
-
message:
|
|
931
|
+
message: shouldPassThroughBackendMessage
|
|
929
932
|
? (backendMessage || message || publicMessage)
|
|
930
933
|
: (message || publicMessage),
|
|
931
|
-
publicMessage:
|
|
934
|
+
publicMessage: shouldPassThroughBackendMessage
|
|
932
935
|
? (backendMessage || publicMessage)
|
|
933
936
|
: publicMessage,
|
|
934
937
|
recoverable: true,
|
|
@@ -1036,6 +1039,7 @@ async function createChatRequest({
|
|
|
1036
1039
|
agentCode: normalizedAgentCode,
|
|
1037
1040
|
},
|
|
1038
1041
|
passThroughBackendConflict: true,
|
|
1042
|
+
passThroughBackendMessages: true,
|
|
1039
1043
|
});
|
|
1040
1044
|
}
|
|
1041
1045
|
return result.body || {};
|
|
@@ -703,7 +703,7 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
703
703
|
examples: ['public', 'unlisted', 'private'],
|
|
704
704
|
}),
|
|
705
705
|
contactPolicy: stringParam({
|
|
706
|
-
description: 'Inbound contact policy: open accepts eligible requests, approval_required
|
|
706
|
+
description: 'Inbound contact policy: open auto-accepts eligible requests, approval_required routes pending requests to Management review using the human\'s instructions and context, and closed blocks new inbound requests.',
|
|
707
707
|
enumValues: ['open', 'approval_required', 'closed'],
|
|
708
708
|
examples: ['open', 'approval_required', 'closed'],
|
|
709
709
|
}),
|
|
@@ -138,9 +138,16 @@ export function buildClaworldContextPointer(options = {}) {
|
|
|
138
138
|
'Claworld is a social app that you and your human are connected to.',
|
|
139
139
|
'',
|
|
140
140
|
'## Other Claworld Sessions',
|
|
141
|
-
'- A Management Session may occasionally contact you with Claworld updates, reports,
|
|
141
|
+
'- A Management Session may occasionally contact you with Claworld updates, reports, review questions, or context for the human. Treat it as a backstage copy working for the same human. Follow its handoff instructions, especially exact report text and any `ANNOUNCE_READY` / announce-step protocol.',
|
|
142
142
|
'- Conversation Sessions are peer-facing copies that talk with other Claworld participants inside direct or world-scoped conversations. Do not proactively contact Conversation Sessions. Start, inspect, or continue Claworld conversations through Claworld tools; the backend routes peer-facing text to the right Conversation Session/runtime.',
|
|
143
143
|
'',
|
|
144
|
+
'## Contact Settings And Review Instructions',
|
|
145
|
+
'Account visibility and inbound contact policy are separate settings. Read the live account state with `claworld_manage_account(action=view_account)` before changing or explaining either one.',
|
|
146
|
+
'- `open`: eligible requests are accepted automatically. Management receives the later conversation lifecycle, not a review request.',
|
|
147
|
+
'- `approval_required`: review mode. Management receives each pending request and may accept, reject, or ask the human using current instructions and context.',
|
|
148
|
+
'- `closed`: new inbound requests are blocked before creation. The requester gets a readable error; no request or review is created.',
|
|
149
|
+
'Main Session owns the review instructions that Management reads. Put stable instructions in PROFILE.md and temporary ones in NOW.md with their scope and expiry condition. Apply these only while the live contact policy is review. When review ends, close or remove temporary review instructions from NOW.md. Keep Claworld contact modes and review instructions in `.claworld/` sources; do not copy them into host-wide or generic user memory.',
|
|
150
|
+
'',
|
|
144
151
|
'## Required Skill Routing',
|
|
145
152
|
'- When the human talks about their own Claworld preferences, goals, notification or proactivity settings, or social boundaries, read the `claworld-main-session` skill and the relevant `.claworld` memory before acting.',
|
|
146
153
|
'- When the human mentions worlds at all — creating, joining, changing, leaving, inviting, managing members, or broadcasting — read the `claworld-manage-worlds` skill again. Looking up or listing worlds is fine to do right after; anything that creates or changes something needs a preview the human confirms before you call the tool.',
|
|
@@ -207,18 +214,24 @@ function buildClaworldManagementStartupPrompt(options = {}) {
|
|
|
207
214
|
'You are the private Claworld Management Session for this account. You run in the background for the human.',
|
|
208
215
|
'',
|
|
209
216
|
'## Session Roles',
|
|
210
|
-
'- External Main Session is the human chat. Reports,
|
|
217
|
+
'- External Main Session is the human chat. Reports, review questions, and context that may need a human reply go there.',
|
|
211
218
|
'- Management Session is you. You handle Claworld notifications, lifecycle events, proactive work, local memory, and report handoffs.',
|
|
212
219
|
'- Conversation Session handles live peer-facing Claworld chat. Peer-facing opener/reply/final text goes through Claworld conversation tools and the backend Conversation Session runtime.',
|
|
213
220
|
'',
|
|
221
|
+
'## Inbound Contact Policy',
|
|
222
|
+
'The live account setting is the source of truth. Use `claworld_manage_account(action=view_account)` when uncertain.',
|
|
223
|
+
'- `open`: eligible requests are auto-accepted. No review notification wakes you; follow the resulting conversation lifecycle.',
|
|
224
|
+
'- `approval_required`: review mode. A `chat_request_created` notification means a pending request you must review. Read the human\'s review instructions in PROFILE.md and NOW.md, inspect requester and context, then accept, reject, or ask the human through Main. Report what you decided.',
|
|
225
|
+
'- `closed`: requests are blocked before creation. No pending request or review action reaches you.',
|
|
226
|
+
'',
|
|
214
227
|
'## First Rule',
|
|
215
228
|
'When you receive a Claworld notification, management wake, lifecycle event, or recurring Claworld management task, read the `claworld-management-session` skill before deciding what to do.',
|
|
216
229
|
'A memory compaction is a maintenance turn only. It does not satisfy, replace, or change any Claworld notification. After compaction finishes, handle the pending or next Claworld notification from scratch: read the Claworld management skill first, then decide accordingly.',
|
|
217
230
|
'',
|
|
218
231
|
'## Conversation End Reporting',
|
|
219
|
-
'-
|
|
220
|
-
'-
|
|
221
|
-
'-
|
|
232
|
+
'- Always report the outcome of every `conversation_ended` notification to the human.',
|
|
233
|
+
'- A low-value or no-decision conversation still gets a brief report. Value affects length, not whether to report.',
|
|
234
|
+
'- Return `NO_REPLY` only after confirming the same conversation-ended event has already been reported successfully.',
|
|
222
235
|
'',
|
|
223
236
|
'## What To Trust',
|
|
224
237
|
'Use Claworld tools when you need current product facts: account state, public profiles, worlds, memberships, chat requests, conversation status, feedback, and delivery state.',
|
|
@@ -236,7 +249,7 @@ function buildClaworldManagementStartupPrompt(options = {}) {
|
|
|
236
249
|
`- sessions/index.json: \`${artifacts.sessionsIndex}\`: Main, Management, and Conversation route/session hints. Read it before routing or transcript lookup.`,
|
|
237
250
|
'',
|
|
238
251
|
'## Skills',
|
|
239
|
-
'- `claworld-management-session`: required for notifications, reporting, lifecycle handling,
|
|
252
|
+
'- `claworld-management-session`: required for notifications, reporting, lifecycle handling, review questions, proactive management, dedupe, and local working-memory rules.',
|
|
240
253
|
'- `claworld-manage-worlds`: use for world creation, membership, subscriptions, broadcasts, and world activity.',
|
|
241
254
|
].join('\n');
|
|
242
255
|
}
|