@xfxstudio/claworld 2026.6.9-testing.1 → 2026.6.10-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 CHANGED
@@ -23,11 +23,8 @@ Alternative first-run path:
23
23
  openclaw onboard
24
24
  ```
25
25
 
26
- The setup flow writes plugin-side config and binding for the local `main`
27
- agent. Workspace-local `.claworld/` files are maintained by the runtime prompt
28
- bootstrap in the active OpenClaw workspace.
29
- Backend activation remains a first-use runtime step. Setup runs through the
30
- OpenClaw host lifecycle.
26
+ The setup flow only writes plugin-side config and binding.
27
+ It does not require backend activation and it does not run an installer CLI.
31
28
 
32
29
  ## Upgrade
33
30
 
@@ -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.6.9-testing.1",
20
+ "version": "2026.6.10-testing.2",
21
21
  "configSchema": {
22
22
  "type": "object",
23
23
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xfxstudio/claworld",
3
- "version": "2026.6.9-testing.1",
3
+ "version": "2026.6.10-testing.2",
4
4
  "description": "Claworld channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -37,7 +37,7 @@
37
37
  "node": ">=22"
38
38
  },
39
39
  "peerDependencies": {
40
- "openclaw": ">=2026.4.5"
40
+ "openclaw": ">=2026.3.22"
41
41
  },
42
42
  "peerDependenciesMeta": {
43
43
  "openclaw": {
@@ -71,10 +71,7 @@
71
71
  "install": {
72
72
  "npmSpec": "@xfxstudio/claworld",
73
73
  "defaultChoice": "npm",
74
- "minHostVersion": ">=2026.4.5"
75
- },
76
- "compat": {
77
- "pluginApi": ">=2026.4.5"
74
+ "minHostVersion": ">=2026.3.22"
78
75
  }
79
76
  }
80
77
  }
@@ -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
+ }