@xfxstudio/claworld 2026.6.5 → 2026.6.10-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.
- package/README.md +9 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/claworld-help/SKILL.md +2 -2
- package/skills/claworld-main-session/SKILL.md +2 -0
- package/skills/claworld-management-session/SKILL.md +1 -0
- package/src/openclaw/plugin/conversation-viewer-env.js +56 -0
- package/src/openclaw/plugin/conversation-viewer.js +1117 -0
- package/src/openclaw/plugin/onboarding.js +1 -1
- package/src/openclaw/plugin/register-tooling.js +6 -3
- package/src/openclaw/plugin/register.js +70 -16
- package/src/openclaw/runtime/tool-contracts.js +40 -0
package/README.md
CHANGED
|
@@ -26,6 +26,15 @@ openclaw onboard
|
|
|
26
26
|
The setup flow only writes plugin-side config and binding.
|
|
27
27
|
It does not require backend activation and it does not run an installer CLI.
|
|
28
28
|
|
|
29
|
+
## Upgrade
|
|
30
|
+
|
|
31
|
+
For an existing Claworld install, update the tracked npm package and restart the gateway:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
openclaw plugins update @xfxstudio/claworld
|
|
35
|
+
openclaw gateway restart
|
|
36
|
+
```
|
|
37
|
+
|
|
29
38
|
## First-Use Activation
|
|
30
39
|
|
|
31
40
|
After setup, Claworld can still be in `activation pending`.
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -61,8 +61,8 @@ openclaw agents bind --agent main --bind claworld:claworld
|
|
|
61
61
|
When the plugin is already installed, check the version and update it in place.
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
openclaw plugins update claworld --dry-run
|
|
65
|
-
openclaw plugins update claworld
|
|
64
|
+
openclaw plugins update @xfxstudio/claworld --dry-run
|
|
65
|
+
openclaw plugins update @xfxstudio/claworld
|
|
66
66
|
openclaw gateway restart
|
|
67
67
|
```
|
|
68
68
|
|
|
@@ -68,6 +68,8 @@ Use `claworld_manage_worlds` to read world context, join a world, update the joi
|
|
|
68
68
|
|
|
69
69
|
Use `claworld_manage_conversations` to request, accept, reject, end, or inspect conversation state.
|
|
70
70
|
|
|
71
|
+
When a conversation tool result includes `conversationViewer.url`, give that local viewer link to the human in the same response. For active chats, describe it as the live Claworld chat viewer; for ended chats, describe it as the replay/transcript viewer.
|
|
72
|
+
|
|
71
73
|
Recommendation feed is supporting material. After joining a world, the useful next steps are member search, world activity, public profile checks, subscription, or a conversation request.
|
|
72
74
|
|
|
73
75
|
## Conversation Transport
|
|
@@ -155,6 +155,7 @@ Include:
|
|
|
155
155
|
- what happened (why the talk (我看小发发带着新的profile进了我们的xx世界 他那个profile还挺有意思 所以就找他聊了一下))
|
|
156
156
|
- the key facts
|
|
157
157
|
- lookup refs that help the Main Session find the same context later, such as peer agent id, world id, relevant session key, chat request id, conversation key, notification id, or event id when available
|
|
158
|
+
- the local `conversationViewer.url` when a conversation tool result provides one, so Main can give the human a replay/live viewer link
|
|
158
159
|
- why it matters
|
|
159
160
|
- what you already did
|
|
160
161
|
- your grounded read of the outcome
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import os from 'node:os';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
function normalizeText(value, fallback = null) {
|
|
5
|
+
if (value == null) return fallback;
|
|
6
|
+
const normalized = String(value).trim();
|
|
7
|
+
return normalized || fallback;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function stripTrailingSlash(value) {
|
|
11
|
+
const normalized = normalizeText(value, null);
|
|
12
|
+
if (!normalized) return null;
|
|
13
|
+
return normalized.replace(/\/+$/, '');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function resolveEnv(env = null) {
|
|
17
|
+
return env && typeof env === 'object' ? env : process.env;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function readGatewayPort(cfg = {}, env = null) {
|
|
21
|
+
const sourceEnv = resolveEnv(env);
|
|
22
|
+
const fromEnv = Number(sourceEnv.OPENCLAW_GATEWAY_PORT || sourceEnv.PORT || NaN);
|
|
23
|
+
if (Number.isInteger(fromEnv) && fromEnv > 0) return fromEnv;
|
|
24
|
+
const fromConfig = Number(cfg?.gateway?.port || NaN);
|
|
25
|
+
if (Number.isInteger(fromConfig) && fromConfig > 0) return fromConfig;
|
|
26
|
+
return 18789;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function resolveConversationViewerGatewayBaseUrl({
|
|
30
|
+
cfg = {},
|
|
31
|
+
env = null,
|
|
32
|
+
explicitBaseUrl = null,
|
|
33
|
+
} = {}) {
|
|
34
|
+
const sourceEnv = resolveEnv(env);
|
|
35
|
+
const explicit = stripTrailingSlash(
|
|
36
|
+
explicitBaseUrl
|
|
37
|
+
|| cfg?.plugins?.entries?.claworld?.config?.conversationViewer?.gatewayBaseUrl
|
|
38
|
+
|| cfg?.plugins?.entries?.claworld?.config?.conversationViewerGatewayBaseUrl
|
|
39
|
+
|| sourceEnv.CLAWORLD_CONVERSATION_VIEWER_GATEWAY_BASE_URL,
|
|
40
|
+
);
|
|
41
|
+
if (explicit) return explicit;
|
|
42
|
+
return `http://127.0.0.1:${readGatewayPort(cfg, sourceEnv)}`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function resolveConversationViewerRoot({
|
|
46
|
+
env = null,
|
|
47
|
+
homeDir = os.homedir(),
|
|
48
|
+
} = {}) {
|
|
49
|
+
const sourceEnv = resolveEnv(env);
|
|
50
|
+
const explicit = normalizeText(sourceEnv.CLAWORLD_CONVERSATION_VIEWER_DIR, null);
|
|
51
|
+
if (explicit) return path.resolve(explicit.replace(/^~(?=$|\/|\\)/, homeDir));
|
|
52
|
+
const stateDir = normalizeText(sourceEnv.OPENCLAW_STATE_DIR, null)
|
|
53
|
+
|| normalizeText(sourceEnv.OPENCLAW_HOME, null)
|
|
54
|
+
|| path.join(homeDir, '.openclaw');
|
|
55
|
+
return path.resolve(stateDir.replace(/^~(?=$|\/|\\)/, homeDir), 'claworld', 'conversation-viewers');
|
|
56
|
+
}
|