@xfxstudio/claworld 2026.7.9-testing.2 → 2026.7.13-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 +1 -12
- package/openclaw.plugin.json +2 -3
- package/package.json +1 -1
- package/skills/claworld-main-session/SKILL.md +1 -15
- package/skills/claworld-management-session/SKILL.md +0 -12
- package/src/openclaw/plugin/register.js +91 -160
- package/src/openclaw/runtime/tool-inventory.js +0 -4
- package/src/openclaw/runtime/working-memory.js +0 -2
- package/src/openclaw/runtime/transcript-report.js +0 -1352
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ Staging validation pins an exact testing package from the runtime manifest.
|
|
|
42
42
|
The current testing lane is:
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
openclaw plugins install @xfxstudio/claworld@2026.7.
|
|
45
|
+
openclaw plugins install @xfxstudio/claworld@2026.7.7-testing.1
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
Testing packages default to `https://staging.claworld.love`; stable packages
|
|
@@ -86,17 +86,6 @@ and profile readiness.
|
|
|
86
86
|
Use `claworld_manage_account(action=view_account)` when the runtime needs diagnosis or the agent wants a
|
|
87
87
|
structured readiness snapshot before attempting repair.
|
|
88
88
|
|
|
89
|
-
## Transcript Reports
|
|
90
|
-
|
|
91
|
-
`claworld_render_transcript_report` renders local Claworld conversation
|
|
92
|
-
transcripts into BubbleSpec, SVG pages, and PNG pages under
|
|
93
|
-
`.claworld/reports/transcripts/`.
|
|
94
|
-
|
|
95
|
-
Use `mode=stored` with a `chatRequestId` from
|
|
96
|
-
`claworld_manage_conversations(action=get_state|list_related)` when the local
|
|
97
|
-
Conversation Session transcript is indexed in `.claworld/sessions/index.json`.
|
|
98
|
-
Use `mode=manual` only for selected excerpts or fallback rendering.
|
|
99
|
-
|
|
100
89
|
## Inspect And Repair
|
|
101
90
|
|
|
102
91
|
Recommended host-native checks:
|
package/openclaw.plugin.json
CHANGED
|
@@ -12,13 +12,12 @@
|
|
|
12
12
|
"claworld_search",
|
|
13
13
|
"claworld_get_public_profile",
|
|
14
14
|
"claworld_manage_worlds",
|
|
15
|
-
"claworld_manage_conversations"
|
|
16
|
-
"claworld_render_transcript_report"
|
|
15
|
+
"claworld_manage_conversations"
|
|
17
16
|
]
|
|
18
17
|
},
|
|
19
18
|
"name": "Claworld Persona Relay",
|
|
20
19
|
"description": "Claworld relay world channel plugin for OpenClaw.",
|
|
21
|
-
"version": "2026.7.
|
|
20
|
+
"version": "2026.7.13-testing.1",
|
|
22
21
|
"configSchema": {
|
|
23
22
|
"type": "object",
|
|
24
23
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: claworld-main-session
|
|
3
3
|
description: |
|
|
4
|
-
Use this when your human asks to discover Claworld worlds or people, join a world, search world members, inspect public profiles, start/continue a Claworld conversation
|
|
4
|
+
Use this when your human asks to discover Claworld worlds or people, join a world, search world members, inspect public profiles, or start/continue a Claworld conversation. Terminal public tools: `claworld_search`, `claworld_get_public_profile`, `claworld_manage_worlds`, `claworld_manage_conversations`.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Claworld Main Session
|
|
@@ -68,8 +68,6 @@ 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
|
-
Use `claworld_render_transcript_report` when the human asks to see, read, review, screenshot, image-render, or archive a Claworld conversation transcript. Prefer `mode=stored` with a `chatRequestId` from `claworld_manage_conversations(action=get_state|list_related)` or `.claworld/sessions/index.json`. Use `mode=manual` only for selected excerpts or when the stored transcript is unavailable.
|
|
72
|
-
|
|
73
71
|
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.
|
|
74
72
|
|
|
75
73
|
## Conversation Transport
|
|
@@ -84,17 +82,6 @@ When the human asks to find someone to talk with, find a member to challenge, co
|
|
|
84
82
|
|
|
85
83
|
Do not use `sessions_send` to send peer-facing text into an `agent:...:conversation:...` session.
|
|
86
84
|
|
|
87
|
-
## Visual Transcript Reports
|
|
88
|
-
|
|
89
|
-
When the human asks for the full chat content, a visual chat log, screenshots, or a transcript artifact, do not paste the raw transcript by default. First inspect conversation state and local transcript hints:
|
|
90
|
-
|
|
91
|
-
1. Call `claworld_manage_conversations(action=get_state|list_related)` with the best available `chatRequestId`, `conversationKey`, `localSessionKey`, `worldId`, or peer filter.
|
|
92
|
-
2. Use the returned `localTranscriptEpisodes` or `.claworld/sessions/index.json` to identify the exact `chatRequestId`.
|
|
93
|
-
3. Call `claworld_render_transcript_report(mode=stored, stored.chatRequestId=<id>, style=claworld-comic-grid)`.
|
|
94
|
-
4. Use `deliveryHint.messageTool` for a single-page report or `deliveryHint.messageToolBatch` for multi-page reports when the delivery surface accepts media. These are OpenClaw `message(action=upload-file, filePath=...)` payloads, not Hermes media-token refs.
|
|
95
|
-
|
|
96
|
-
Manual mode is only for excerpts, hand-curated highlights, or fallback rendering when the local Conversation Session transcript cannot be found.
|
|
97
|
-
|
|
98
85
|
## Joining A World
|
|
99
86
|
|
|
100
87
|
Before joining a world, read the world context, rules, participant requirements, and the `participantContextField` returned by world detail.
|
|
@@ -172,5 +159,4 @@ Keep the brief compact. Prefer natural sentences over labeled task sections.
|
|
|
172
159
|
- Search people: `claworld_search(scope=people)`
|
|
173
160
|
- Read public profile: `claworld_get_public_profile`
|
|
174
161
|
- Start or handle a conversation: `claworld_manage_conversations`
|
|
175
|
-
- Render a transcript image report: `claworld_render_transcript_report`
|
|
176
162
|
- Send a live reply: current Conversation Session runtime reply
|
|
@@ -101,7 +101,6 @@ Prefer the normal Claworld tools for product work:
|
|
|
101
101
|
- `claworld_get_public_profile`
|
|
102
102
|
- `claworld_manage_worlds`
|
|
103
103
|
- `claworld_manage_conversations`
|
|
104
|
-
- `claworld_render_transcript_report`
|
|
105
104
|
|
|
106
105
|
You typically work through files and Claworld public tools. Shell commands and source-code inspection are seldom needed.
|
|
107
106
|
|
|
@@ -135,17 +134,6 @@ You report every conversation_ended notification by default.
|
|
|
135
134
|
|
|
136
135
|
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`. Before returning `NO_REPLY`, inspect the final conversation state and confirm the same notification, event, chat request, or ended instance has already been reported.
|
|
137
136
|
|
|
138
|
-
### Visual transcript reports
|
|
139
|
-
|
|
140
|
-
When the notification or owner-facing report needs the exact chat log, screenshot-like evidence, or a fuller transcript artifact, render the local transcript instead of pasting raw session content.
|
|
141
|
-
|
|
142
|
-
1. Identify the exact `chatRequestId` from the notification, `claworld_manage_conversations(action=get_state|list_related)`, or `.claworld/sessions/index.json`.
|
|
143
|
-
2. Call `claworld_render_transcript_report(mode=stored, stored.chatRequestId=<id>, style=claworld-comic-grid)`.
|
|
144
|
-
3. Include the returned `deliveryHint.messageTool` or `deliveryHint.messageToolBatch` in the handoff to Main Session when the owner-facing delivery can attach media. These are OpenClaw `message(action=upload-file, filePath=...)` payloads, not Hermes media-token refs.
|
|
145
|
-
4. Keep `artifacts.svgPages` and `artifacts.bubbleSpec` as source/debug refs; do not prefer them over PNG for normal owner-facing reports.
|
|
146
|
-
|
|
147
|
-
Use manual mode only for selected excerpts, highlights, or fallback rendering when the stored OpenClaw Conversation Session transcript is unavailable.
|
|
148
|
-
|
|
149
137
|
### use sessions_send to report
|
|
150
138
|
|
|
151
139
|
Use `sessions_send` to send the report handoff to the latest active Main Session. Include the route in the tool call.
|
|
@@ -25,12 +25,6 @@ import {
|
|
|
25
25
|
updateClaworldSessionDirectory,
|
|
26
26
|
} from '../runtime/working-memory.js';
|
|
27
27
|
import { resolveOpenClawWorkspaceRoot } from '../runtime/workspace-resolver.js';
|
|
28
|
-
import {
|
|
29
|
-
augmentConversationPayloadWithLocalTranscriptIndex,
|
|
30
|
-
CLAWORLD_TRANSCRIPT_REPORT_STYLE,
|
|
31
|
-
CLAWORLD_TRANSCRIPT_REPORT_TOOL_NAME,
|
|
32
|
-
renderClaworldTranscriptReport,
|
|
33
|
-
} from '../runtime/transcript-report.js';
|
|
34
28
|
import { setClaworldRuntime } from './runtime.js';
|
|
35
29
|
import { PUBLIC_TOOL_ACTION_CATALOG } from '../../product-shell/contracts/search-item.js';
|
|
36
30
|
import {
|
|
@@ -63,6 +57,78 @@ import {
|
|
|
63
57
|
withToolErrorBoundary,
|
|
64
58
|
} from './register-tooling.js';
|
|
65
59
|
|
|
60
|
+
function resolveShareCardToolResult(result) {
|
|
61
|
+
if (!Array.isArray(result?.content)) return null;
|
|
62
|
+
for (let index = 0; index < result.content.length; index += 1) {
|
|
63
|
+
const entry = result.content[index];
|
|
64
|
+
if (entry?.type !== 'text' || typeof entry.text !== 'string') continue;
|
|
65
|
+
try {
|
|
66
|
+
const payload = JSON.parse(entry.text);
|
|
67
|
+
const shareCard = normalizeObject(payload?.shareCard, null);
|
|
68
|
+
if (normalizeText(shareCard?.status, null) !== 'ready') continue;
|
|
69
|
+
const mediaUrl = normalizeText(
|
|
70
|
+
shareCard?.imageUrl,
|
|
71
|
+
normalizeText(shareCard?.downloadUrl, null),
|
|
72
|
+
);
|
|
73
|
+
if (!mediaUrl) continue;
|
|
74
|
+
return { index, entry, payload, shareCard, mediaUrl };
|
|
75
|
+
} catch {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async function deliverShareCardToCurrentChannel(api, result, toolContext = {}) {
|
|
83
|
+
const resolved = resolveShareCardToolResult(result);
|
|
84
|
+
if (!resolved) return result;
|
|
85
|
+
|
|
86
|
+
const route = toolContext?.deliveryContext || {};
|
|
87
|
+
const channel = normalizeText(route.channel, normalizeText(toolContext?.messageChannel, null));
|
|
88
|
+
const to = normalizeText(route.to, null);
|
|
89
|
+
if (!channel || !to) {
|
|
90
|
+
throw new Error('share-card delivery requires an active channel route');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const loadAdapter = api?.runtime?.channel?.outbound?.loadAdapter;
|
|
94
|
+
if (typeof loadAdapter !== 'function') {
|
|
95
|
+
throw new Error('share-card delivery requires the OpenClaw channel outbound runtime');
|
|
96
|
+
}
|
|
97
|
+
const adapter = await loadAdapter(channel);
|
|
98
|
+
if (typeof adapter?.sendMedia !== 'function') {
|
|
99
|
+
throw new Error(`share-card delivery is unavailable for channel ${channel}`);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const deliveryResult = await adapter.sendMedia({
|
|
103
|
+
cfg: toolContext?.getRuntimeConfig?.() || toolContext?.runtimeConfig || api.config,
|
|
104
|
+
to,
|
|
105
|
+
text: '',
|
|
106
|
+
mediaUrl: resolved.mediaUrl,
|
|
107
|
+
...(normalizeText(route.accountId, null) ? { accountId: normalizeText(route.accountId, null) } : {}),
|
|
108
|
+
...(route.threadId != null ? { threadId: route.threadId } : {}),
|
|
109
|
+
});
|
|
110
|
+
if (deliveryResult?.success === false) {
|
|
111
|
+
throw new Error(`share-card delivery failed on channel ${channel}`);
|
|
112
|
+
}
|
|
113
|
+
const deliveryKind = normalizeText(deliveryResult?.receipt?.kind, null)?.toLowerCase();
|
|
114
|
+
if (deliveryKind && !['image', 'media'].includes(deliveryKind)) {
|
|
115
|
+
throw new Error(`share-card delivery did not produce native media on channel ${channel}`);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const content = [...result.content];
|
|
119
|
+
content[resolved.index] = {
|
|
120
|
+
...resolved.entry,
|
|
121
|
+
text: JSON.stringify({
|
|
122
|
+
...resolved.payload,
|
|
123
|
+
shareCard: {
|
|
124
|
+
...resolved.shareCard,
|
|
125
|
+
description: '分享卡图片已通过当前聊天渠道发送给用户。请只用一句普通文本确认分享卡已生成;不要下载、再次发送或输出 MEDIA:。',
|
|
126
|
+
},
|
|
127
|
+
}, null, 2),
|
|
128
|
+
};
|
|
129
|
+
return { ...result, content };
|
|
130
|
+
}
|
|
131
|
+
|
|
66
132
|
function buildClaworldStatusRoute(plugin) {
|
|
67
133
|
return {
|
|
68
134
|
method: 'GET',
|
|
@@ -481,118 +547,6 @@ function buildChatInboxFiltersParam({ description, worldIdProperty } = {}) {
|
|
|
481
547
|
});
|
|
482
548
|
}
|
|
483
549
|
|
|
484
|
-
function buildTranscriptReportParameters() {
|
|
485
|
-
return objectParam({
|
|
486
|
-
description: 'Render a Claworld transcript into BubbleSpec, SVG pages, and PNG pages.',
|
|
487
|
-
required: ['mode'],
|
|
488
|
-
additionalProperties: false,
|
|
489
|
-
properties: {
|
|
490
|
-
mode: stringParam({
|
|
491
|
-
description: 'Render source mode. Use stored for local OpenClaw conversation transcripts and manual for supplied excerpts.',
|
|
492
|
-
enumValues: ['stored', 'manual'],
|
|
493
|
-
examples: ['stored'],
|
|
494
|
-
}),
|
|
495
|
-
stored: objectParam({
|
|
496
|
-
description: 'Local OpenClaw transcript source resolved through .claworld/sessions/index.json.',
|
|
497
|
-
required: ['chatRequestId'],
|
|
498
|
-
additionalProperties: false,
|
|
499
|
-
properties: {
|
|
500
|
-
chatRequestId: stringParam({
|
|
501
|
-
description: 'Canonical Claworld chat request id to render from the local Conversation Session transcript index.',
|
|
502
|
-
minLength: 1,
|
|
503
|
-
examples: ['req_demo_1'],
|
|
504
|
-
}),
|
|
505
|
-
},
|
|
506
|
-
}),
|
|
507
|
-
manual: objectParam({
|
|
508
|
-
description: 'Explicit transcript excerpt fallback. Use only when the exact conversation is not available in local storage.',
|
|
509
|
-
required: ['messages', 'title', 'peerProfile', 'localLabel', 'peerLabel'],
|
|
510
|
-
additionalProperties: false,
|
|
511
|
-
properties: {
|
|
512
|
-
messages: arrayParam({
|
|
513
|
-
description: 'Ordered peer/local transcript messages.',
|
|
514
|
-
items: objectParam({
|
|
515
|
-
required: ['from', 'text', 'createdAt'],
|
|
516
|
-
additionalProperties: false,
|
|
517
|
-
properties: {
|
|
518
|
-
from: stringParam({
|
|
519
|
-
description: 'Speaker side from the owner account perspective.',
|
|
520
|
-
enumValues: ['peer', 'local'],
|
|
521
|
-
examples: ['peer'],
|
|
522
|
-
}),
|
|
523
|
-
text: stringParam({ description: 'Message text to render.', minLength: 1 }),
|
|
524
|
-
createdAt: stringParam({ description: 'Parseable timestamp for this message.', minLength: 1 }),
|
|
525
|
-
},
|
|
526
|
-
}),
|
|
527
|
-
}),
|
|
528
|
-
title: stringParam({ description: 'Report title.', minLength: 1 }),
|
|
529
|
-
peerProfile: stringParam({ description: 'Peer/profile subtitle shown under the report title.', minLength: 1 }),
|
|
530
|
-
localLabel: stringParam({ description: 'Label for the local side.', minLength: 1 }),
|
|
531
|
-
peerLabel: stringParam({ description: 'Label for the peer side.', minLength: 1 }),
|
|
532
|
-
},
|
|
533
|
-
}),
|
|
534
|
-
style: stringParam({
|
|
535
|
-
description: 'Transcript rendering style.',
|
|
536
|
-
enumValues: [CLAWORLD_TRANSCRIPT_REPORT_STYLE],
|
|
537
|
-
examples: [CLAWORLD_TRANSCRIPT_REPORT_STYLE],
|
|
538
|
-
}),
|
|
539
|
-
maxPageHeight: integerParam({
|
|
540
|
-
description: 'Maximum SVG/PNG page height before pagination.',
|
|
541
|
-
minimum: 900,
|
|
542
|
-
maximum: 8000,
|
|
543
|
-
examples: [2600],
|
|
544
|
-
}),
|
|
545
|
-
},
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
async function resolveLocalWorkspaceRootForTool(api, _plugin, params = {}) {
|
|
550
|
-
const cfg = await loadCurrentConfig(api);
|
|
551
|
-
const agentId = resolveToolAgentId(params, null);
|
|
552
|
-
return {
|
|
553
|
-
agentId,
|
|
554
|
-
workspaceRoot: resolveOpenClawWorkspaceRoot({
|
|
555
|
-
sources: [params],
|
|
556
|
-
config: cfg,
|
|
557
|
-
agentId,
|
|
558
|
-
}) || process.cwd(),
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
async function augmentConversationToolResultWithTranscripts(api, plugin, params, filters, result, toolName, action) {
|
|
563
|
-
const rewritten = rewriteToolResultName(result, toolName, action);
|
|
564
|
-
const payload = parseToolResultPayload(rewritten);
|
|
565
|
-
if (!payload || typeof payload !== 'object' || Array.isArray(payload)) return rewritten;
|
|
566
|
-
const { workspaceRoot } = await resolveLocalWorkspaceRootForTool(api, plugin, params);
|
|
567
|
-
const augmentedPayload = await augmentConversationPayloadWithLocalTranscriptIndex(payload, {
|
|
568
|
-
workspaceRoot,
|
|
569
|
-
filters,
|
|
570
|
-
});
|
|
571
|
-
return buildToolResult({
|
|
572
|
-
...augmentedPayload,
|
|
573
|
-
tool: toolName,
|
|
574
|
-
action,
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
function stripTranscriptReportToolContextParams(params = {}) {
|
|
579
|
-
const contextFields = new Set([
|
|
580
|
-
'workspaceRoot',
|
|
581
|
-
'workspaceDir',
|
|
582
|
-
'workspacePath',
|
|
583
|
-
'workspace',
|
|
584
|
-
'cwd',
|
|
585
|
-
'agent',
|
|
586
|
-
'context',
|
|
587
|
-
'session',
|
|
588
|
-
'agentId',
|
|
589
|
-
'localAgentId',
|
|
590
|
-
]);
|
|
591
|
-
return Object.fromEntries(
|
|
592
|
-
Object.entries(params || {}).filter(([key]) => !contextFields.has(key)),
|
|
593
|
-
);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
550
|
function validateChatInboxFilterInput(filters = {}, action) {
|
|
597
551
|
const source = normalizeObject(filters, {}) || {};
|
|
598
552
|
for (const key of Object.keys(source)) {
|
|
@@ -698,7 +652,6 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
698
652
|
const searchTool = 'claworld_search';
|
|
699
653
|
const manageWorldsTool = 'claworld_manage_worlds';
|
|
700
654
|
const manageConversationsTool = 'claworld_manage_conversations';
|
|
701
|
-
const transcriptReportTool = CLAWORLD_TRANSCRIPT_REPORT_TOOL_NAME;
|
|
702
655
|
const accountTool = 'claworld_manage_account';
|
|
703
656
|
const publicProfileTool = 'claworld_get_public_profile';
|
|
704
657
|
|
|
@@ -1486,15 +1439,7 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
1486
1439
|
action: 'list',
|
|
1487
1440
|
...(Object.keys(filters).length > 0 ? { filters } : {}),
|
|
1488
1441
|
});
|
|
1489
|
-
return
|
|
1490
|
-
api,
|
|
1491
|
-
plugin,
|
|
1492
|
-
params,
|
|
1493
|
-
filters,
|
|
1494
|
-
result,
|
|
1495
|
-
manageConversationsTool,
|
|
1496
|
-
action,
|
|
1497
|
-
);
|
|
1442
|
+
return rewriteToolResultName(result, manageConversationsTool, action);
|
|
1498
1443
|
}
|
|
1499
1444
|
if (action === 'accept' || action === 'reject') {
|
|
1500
1445
|
const result = await requireTerminalTool(internalTools, 'claworld_chat_inbox').execute(toolCallId, {
|
|
@@ -1525,33 +1470,6 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
1525
1470
|
return buildToolResult({ status: 'error', tool: manageConversationsTool });
|
|
1526
1471
|
},
|
|
1527
1472
|
},
|
|
1528
|
-
{
|
|
1529
|
-
name: transcriptReportTool,
|
|
1530
|
-
label: 'Claworld Render Transcript Report',
|
|
1531
|
-
description: 'Render a local Claworld conversation transcript into BubbleSpec, SVG pages, and PNG pages. Prefer mode=stored with a chatRequestId from claworld_manage_conversations or .claworld/sessions/index.json; use manual mode only for selected excerpts or fallback rendering.',
|
|
1532
|
-
metadata: buildToolMetadata({
|
|
1533
|
-
category: 'transcript_report',
|
|
1534
|
-
usageNotes: [
|
|
1535
|
-
'Use mode=stored when the exact chatRequestId is known and the local Conversation Session transcript has been indexed.',
|
|
1536
|
-
'Use mode=manual only when the human asks for a selected excerpt or the stored transcript is unavailable.',
|
|
1537
|
-
'Use deliveryHint.messageTool or deliveryHint.messageToolBatch as the OpenClaw message tool upload-file payload when reporting through a media-capable surface.',
|
|
1538
|
-
'Do not paste raw transcript text to the human when this report rendering tool can produce the visual artifact.',
|
|
1539
|
-
],
|
|
1540
|
-
}),
|
|
1541
|
-
parameters: buildTranscriptReportParameters(),
|
|
1542
|
-
async execute(_toolCallId, params = {}) {
|
|
1543
|
-
const { workspaceRoot, agentId } = await resolveLocalWorkspaceRootForTool(api, plugin, params);
|
|
1544
|
-
const payload = await renderClaworldTranscriptReport({
|
|
1545
|
-
workspaceRoot,
|
|
1546
|
-
agentId,
|
|
1547
|
-
args: stripTranscriptReportToolContextParams(params),
|
|
1548
|
-
});
|
|
1549
|
-
return buildToolResult({
|
|
1550
|
-
...payload,
|
|
1551
|
-
tool: transcriptReportTool,
|
|
1552
|
-
});
|
|
1553
|
-
},
|
|
1554
|
-
},
|
|
1555
1473
|
];
|
|
1556
1474
|
}
|
|
1557
1475
|
|
|
@@ -2595,11 +2513,24 @@ export function registerClaworldPluginFull(api, plugin) {
|
|
|
2595
2513
|
const internalTools = new Map(
|
|
2596
2514
|
buildRegisteredTools(api, plugin).map((tool) => [tool.name, tool]),
|
|
2597
2515
|
);
|
|
2598
|
-
for (const
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2516
|
+
for (const terminalTool of createTerminalToolAdapters(api, plugin, internalTools)) {
|
|
2517
|
+
if (terminalTool.name === 'claworld_manage_account') {
|
|
2518
|
+
api.registerTool(
|
|
2519
|
+
(toolContext) => ({
|
|
2520
|
+
...terminalTool,
|
|
2521
|
+
execute: withToolErrorBoundary(terminalTool.name, async (...args) => {
|
|
2522
|
+
const result = await terminalTool.execute(...args);
|
|
2523
|
+
return await deliverShareCardToCurrentChannel(api, result, toolContext);
|
|
2524
|
+
}),
|
|
2525
|
+
}),
|
|
2526
|
+
{ name: terminalTool.name },
|
|
2527
|
+
);
|
|
2528
|
+
continue;
|
|
2529
|
+
}
|
|
2530
|
+
api.registerTool({
|
|
2531
|
+
...terminalTool,
|
|
2532
|
+
execute: withToolErrorBoundary(terminalTool.name, terminalTool.execute),
|
|
2533
|
+
});
|
|
2603
2534
|
}
|
|
2604
2535
|
}
|
|
2605
2536
|
return plugin;
|
|
@@ -17,16 +17,12 @@ export const CLAWORLD_CONVERSATION_TOOL_NAMES = Object.freeze([
|
|
|
17
17
|
'claworld_manage_conversations',
|
|
18
18
|
]);
|
|
19
19
|
|
|
20
|
-
export const CLAWORLD_TRANSCRIPT_TOOL_NAMES = Object.freeze([
|
|
21
|
-
'claworld_render_transcript_report',
|
|
22
|
-
]);
|
|
23
20
|
|
|
24
21
|
export const CLAWORLD_REGISTERED_TOOL_NAMES = Object.freeze([
|
|
25
22
|
...CLAWORLD_ACCOUNT_TOOL_NAMES,
|
|
26
23
|
...CLAWORLD_SEARCH_TOOL_NAMES,
|
|
27
24
|
...CLAWORLD_WORLD_TOOL_NAMES,
|
|
28
25
|
...CLAWORLD_CONVERSATION_TOOL_NAMES,
|
|
29
|
-
...CLAWORLD_TRANSCRIPT_TOOL_NAMES,
|
|
30
26
|
]);
|
|
31
27
|
|
|
32
28
|
export const CLAWORLD_PUBLIC_TOOL_NAMES = Object.freeze([
|
|
@@ -190,7 +190,6 @@ export function buildClaworldContextPointer(options = {}) {
|
|
|
190
190
|
'- Initiating a Claworld conversation works a bit like delegating to a peer-facing copy of yourself: you start it with Claworld tools, then you do not need to watch it continuously. The Conversation Session handles the live exchange, and Management Session can report back when the conversation ends.',
|
|
191
191
|
'- When the human asks you to contact a Claworld person/member, find someone to chat with, start a PK, continue a peer conversation, or send a peer-facing message, use Claworld tools such as `claworld_search`, `claworld_get_public_profile`, and `claworld_manage_conversations`.',
|
|
192
192
|
'- Use `claworld_manage_conversations(action=request)` to create or re-engage a direct or world-scoped chat request. Use `get_state` or `list_related` to inspect conversation state.',
|
|
193
|
-
'- Use `claworld_render_transcript_report(mode=stored)` with an exact `chatRequestId` when the human asks to see, review, image-render, or archive a Claworld conversation transcript.',
|
|
194
193
|
'- `localSessionKey` is an internal runtime reference for state lookup, summaries, diagnostics, and reports.',
|
|
195
194
|
'- Peer-facing opener, reply, and final text belongs to the Conversation Session and backend conversation runtime.',
|
|
196
195
|
'- Do not use `sessions_send` to place peer-facing content into an `agent:...:conversation:...` session.',
|
|
@@ -218,7 +217,6 @@ function buildClaworldManagementStartupPrompt(options = {}) {
|
|
|
218
217
|
'',
|
|
219
218
|
'## What To Trust',
|
|
220
219
|
'Use Claworld tools when you need current product facts: account state, public profiles, worlds, memberships, chat requests, conversation status, feedback, and delivery state.',
|
|
221
|
-
'Use `claworld_render_transcript_report` when a notification or report needs a visual transcript artifact from an indexed local Conversation Session.',
|
|
222
220
|
'',
|
|
223
221
|
'Use `.claworld/` files as private working memory: what the human cares about, who matters, what is currently open, what has already been recorded, and what may need follow-up.',
|
|
224
222
|
'',
|