@xfxstudio/claworld 2026.7.8-testing.1 → 2026.7.9-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 +12 -1
- package/index.js +0 -1
- package/openclaw.plugin.json +3 -2
- package/package.json +3 -2
- package/skills/claworld-help/SKILL.md +10 -68
- package/skills/claworld-main-session/SKILL.md +16 -2
- package/skills/claworld-manage-worlds/SKILL.md +11 -11
- package/skills/claworld-management-session/SKILL.md +103 -21
- package/src/openclaw/index.js +1 -2
- package/src/openclaw/plugin/claworld-channel-plugin.js +3 -1
- package/src/openclaw/plugin/register.js +316 -9
- package/src/openclaw/runtime/feedback-helper.js +6 -2
- package/src/openclaw/runtime/tool-contracts.js +1 -0
- package/src/openclaw/runtime/tool-inventory.js +4 -0
- package/src/openclaw/runtime/transcript-report.js +1352 -0
- package/src/openclaw/runtime/working-memory.js +26 -4
- package/src/product-shell/contracts/search-item.js +1 -0
- package/src/openclaw/runtime/system-message-orchestrator.js +0 -1
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
projectToolWorldSearchResponse,
|
|
14
14
|
} from '../runtime/tool-contracts.js';
|
|
15
15
|
import { CLAWORLD_TOOL_CONTRACT_VERSION } from '../runtime/tool-inventory.js';
|
|
16
|
+
import { CLAWORLD_PLUGIN_CURRENT_VERSION } from '../plugin-version.js';
|
|
16
17
|
import {
|
|
17
18
|
CLAWORLD_BOOTSTRAP_TARGETS,
|
|
18
19
|
appendClaworldJournalEvent,
|
|
@@ -24,6 +25,12 @@ import {
|
|
|
24
25
|
updateClaworldSessionDirectory,
|
|
25
26
|
} from '../runtime/working-memory.js';
|
|
26
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';
|
|
27
34
|
import { setClaworldRuntime } from './runtime.js';
|
|
28
35
|
import { PUBLIC_TOOL_ACTION_CATALOG } from '../../product-shell/contracts/search-item.js';
|
|
29
36
|
import {
|
|
@@ -145,6 +152,18 @@ const CHAT_INBOX_FILTER_STATUSES = Object.freeze([
|
|
|
145
152
|
'kickoff_failed',
|
|
146
153
|
'ended',
|
|
147
154
|
]);
|
|
155
|
+
const FEEDBACK_CATEGORIES = Object.freeze([
|
|
156
|
+
'experience_issue',
|
|
157
|
+
'usage_issue',
|
|
158
|
+
'bug_report',
|
|
159
|
+
'feature_request',
|
|
160
|
+
]);
|
|
161
|
+
const FEEDBACK_IMPACTS = Object.freeze([
|
|
162
|
+
'low',
|
|
163
|
+
'medium',
|
|
164
|
+
'high',
|
|
165
|
+
'blocker',
|
|
166
|
+
]);
|
|
148
167
|
const CHAT_INBOX_FILTER_KEYS = Object.freeze([
|
|
149
168
|
'direction',
|
|
150
169
|
'mode',
|
|
@@ -177,6 +196,8 @@ const TERMINAL_ACCOUNT_ACTIONS = PUBLIC_TOOL_ACTION_CATALOG.claworld_manage_acco
|
|
|
177
196
|
const TERMINAL_WORLD_ACTIONS = PUBLIC_TOOL_ACTION_CATALOG.claworld_manage_worlds;
|
|
178
197
|
const TERMINAL_CONVERSATION_ACTIONS = PUBLIC_TOOL_ACTION_CATALOG.claworld_manage_conversations;
|
|
179
198
|
|
|
199
|
+
const CLAWORLD_WORLD_TOOL_GUIDANCE = 'Before any world operation, read the `claworld-manage-worlds` skill.';
|
|
200
|
+
|
|
180
201
|
const ACCOUNT_IMPLEMENTATION_ACTIONS = Object.freeze({
|
|
181
202
|
view_account: 'view',
|
|
182
203
|
});
|
|
@@ -240,6 +261,13 @@ function normalizeTerminalAccountAction(params = {}) {
|
|
|
240
261
|
requireManageWorldField('chatRequestPolicy', 'chatRequestPolicy is not supported by claworld_manage_account; use contactPolicy');
|
|
241
262
|
}
|
|
242
263
|
if (Object.prototype.hasOwnProperty.call(params, 'proactivitySettings')) return 'set_proactivity';
|
|
264
|
+
if (
|
|
265
|
+
hasProvidedToolParam(params, 'category')
|
|
266
|
+
|| hasProvidedToolParam(params, 'title')
|
|
267
|
+
|| hasProvidedToolParam(params, 'actualBehavior')
|
|
268
|
+
|| hasProvidedToolParam(params, 'expectedBehavior')
|
|
269
|
+
|| hasProvidedToolParam(params, 'reproductionSteps')
|
|
270
|
+
) return 'submit_feedback';
|
|
243
271
|
return 'view_account';
|
|
244
272
|
}
|
|
245
273
|
|
|
@@ -348,6 +376,66 @@ function hasProvidedToolParam(params = {}, fieldId) {
|
|
|
348
376
|
return value != null;
|
|
349
377
|
}
|
|
350
378
|
|
|
379
|
+
function normalizeFeedbackStringList(values = []) {
|
|
380
|
+
const source = Array.isArray(values) ? values : [values];
|
|
381
|
+
return [...new Set(source.map((value) => normalizeText(value, null)).filter(Boolean))];
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
function validateTerminalFeedbackPayload(params = {}) {
|
|
385
|
+
const category = normalizeText(params.category, null);
|
|
386
|
+
const impact = normalizeText(params.impact, 'medium');
|
|
387
|
+
if (!category) requireManageWorldField('category', 'category is required for action=submit_feedback');
|
|
388
|
+
if (!FEEDBACK_CATEGORIES.includes(category)) {
|
|
389
|
+
requireManageWorldField('category', `category must be one of ${FEEDBACK_CATEGORIES.join(', ')}`);
|
|
390
|
+
}
|
|
391
|
+
if (!FEEDBACK_IMPACTS.includes(impact)) {
|
|
392
|
+
requireManageWorldField('impact', `impact must be one of ${FEEDBACK_IMPACTS.join(', ')}`);
|
|
393
|
+
}
|
|
394
|
+
for (const fieldId of ['title', 'goal', 'actualBehavior', 'expectedBehavior']) {
|
|
395
|
+
if (!normalizeText(params[fieldId], null)) {
|
|
396
|
+
requireManageWorldField(fieldId, `${fieldId} is required for action=submit_feedback`);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
if (
|
|
400
|
+
params.context != null
|
|
401
|
+
&& (!params.context || typeof params.context !== 'object' || Array.isArray(params.context))
|
|
402
|
+
) {
|
|
403
|
+
requireManageWorldField('context', 'context must be an object for action=submit_feedback');
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
function normalizeTerminalFeedbackContext(params = {}) {
|
|
408
|
+
const context = normalizeObject(params.context, {}) || {};
|
|
409
|
+
const metadata = normalizeObject(context.metadata, {}) || {};
|
|
410
|
+
const redactionNotes = normalizeText(params.redactionNotes, null);
|
|
411
|
+
return {
|
|
412
|
+
worldId: normalizeText(context.worldId, normalizeText(params.worldId, null)),
|
|
413
|
+
conversationKey: normalizeText(context.conversationKey, normalizeText(params.conversationKey, null)),
|
|
414
|
+
turnId: normalizeText(context.turnId, normalizeText(params.turnId, null)),
|
|
415
|
+
deliveryId: normalizeText(context.deliveryId, normalizeText(params.deliveryId, null)),
|
|
416
|
+
targetAgentId: normalizeText(context.targetAgentId, normalizeText(params.targetAgentId, null)),
|
|
417
|
+
tags: normalizeFeedbackStringList(context.tags),
|
|
418
|
+
metadata: {
|
|
419
|
+
...metadata,
|
|
420
|
+
...(redactionNotes ? { redactionNotes } : {}),
|
|
421
|
+
},
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
function normalizeTerminalFeedbackPayload(params = {}) {
|
|
426
|
+
return {
|
|
427
|
+
category: normalizeText(params.category, null),
|
|
428
|
+
title: normalizeText(params.title, null),
|
|
429
|
+
goal: normalizeText(params.goal, null),
|
|
430
|
+
actualBehavior: normalizeText(params.actualBehavior, null),
|
|
431
|
+
expectedBehavior: normalizeText(params.expectedBehavior, null),
|
|
432
|
+
impact: normalizeText(params.impact, 'medium'),
|
|
433
|
+
details: normalizeText(params.details, null),
|
|
434
|
+
reproductionSteps: normalizeFeedbackStringList(params.reproductionSteps),
|
|
435
|
+
context: normalizeTerminalFeedbackContext(params),
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
|
|
351
439
|
function buildChatInboxFiltersParam({ description, worldIdProperty } = {}) {
|
|
352
440
|
return objectParam({
|
|
353
441
|
description,
|
|
@@ -393,6 +481,118 @@ function buildChatInboxFiltersParam({ description, worldIdProperty } = {}) {
|
|
|
393
481
|
});
|
|
394
482
|
}
|
|
395
483
|
|
|
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
|
+
|
|
396
596
|
function validateChatInboxFilterInput(filters = {}, action) {
|
|
397
597
|
const source = normalizeObject(filters, {}) || {};
|
|
398
598
|
for (const key of Object.keys(source)) {
|
|
@@ -498,6 +698,7 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
498
698
|
const searchTool = 'claworld_search';
|
|
499
699
|
const manageWorldsTool = 'claworld_manage_worlds';
|
|
500
700
|
const manageConversationsTool = 'claworld_manage_conversations';
|
|
701
|
+
const transcriptReportTool = CLAWORLD_TRANSCRIPT_REPORT_TOOL_NAME;
|
|
501
702
|
const accountTool = 'claworld_manage_account';
|
|
502
703
|
const publicProfileTool = 'claworld_get_public_profile';
|
|
503
704
|
|
|
@@ -505,7 +706,7 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
505
706
|
{
|
|
506
707
|
name: accountTool,
|
|
507
708
|
label: 'Claworld Manage Account',
|
|
508
|
-
description: 'Terminal account surface for readiness, public identity, global profile, share-card generation, visibility, inbound contact policy,
|
|
709
|
+
description: 'Terminal account surface for readiness, public identity, global profile, share-card generation, visibility, inbound contact policy, notification/proactivity policy, email-based identity verification, and authenticated feedback submission.',
|
|
509
710
|
metadata: buildToolMetadata({
|
|
510
711
|
category: 'account',
|
|
511
712
|
usageNotes: [
|
|
@@ -513,6 +714,7 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
513
714
|
'Use action=view_account for readiness; update_display_name, update_agent_profile, or set_contact_policy for common account mutations.',
|
|
514
715
|
'Use start_email_verification with email + optional displayName to start email-based identity verification, then complete_email_verification with email + code to finish.',
|
|
515
716
|
'Use subscribe_person or unsubscribe_person when a search/profile result exposes a person subscription target.',
|
|
717
|
+
'Use submit_feedback for Claworld bugs, confusing behavior, missing capability, or feature requests. The tool handles auth internally.',
|
|
516
718
|
],
|
|
517
719
|
}),
|
|
518
720
|
parameters: objectParam({
|
|
@@ -523,7 +725,7 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
523
725
|
action: stringParam({
|
|
524
726
|
description: 'Account action.',
|
|
525
727
|
enumValues: TERMINAL_ACCOUNT_ACTIONS,
|
|
526
|
-
examples: ['view_account', 'start_email_verification', 'update_display_name', 'set_contact_policy'],
|
|
728
|
+
examples: ['view_account', 'start_email_verification', 'update_display_name', 'set_contact_policy', 'submit_feedback'],
|
|
527
729
|
}),
|
|
528
730
|
displayName: stringParam({
|
|
529
731
|
description: 'Public-facing display name for update_display_name or start_email_verification.',
|
|
@@ -589,6 +791,49 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
589
791
|
minLength: 1,
|
|
590
792
|
examples: ['123456'],
|
|
591
793
|
}),
|
|
794
|
+
category: stringParam({
|
|
795
|
+
description: 'Feedback category.',
|
|
796
|
+
enumValues: FEEDBACK_CATEGORIES,
|
|
797
|
+
examples: ['bug_report', 'feature_request'],
|
|
798
|
+
}),
|
|
799
|
+
title: stringParam({
|
|
800
|
+
description: 'Short developer-readable feedback title.',
|
|
801
|
+
minLength: 1,
|
|
802
|
+
examples: ['Feedback submission should use account tool auth'],
|
|
803
|
+
}),
|
|
804
|
+
goal: stringParam({
|
|
805
|
+
description: 'What the human was trying to do.',
|
|
806
|
+
minLength: 1,
|
|
807
|
+
}),
|
|
808
|
+
actualBehavior: stringParam({
|
|
809
|
+
description: 'What actually happened.',
|
|
810
|
+
minLength: 1,
|
|
811
|
+
}),
|
|
812
|
+
expectedBehavior: stringParam({
|
|
813
|
+
description: 'What should have happened.',
|
|
814
|
+
minLength: 1,
|
|
815
|
+
}),
|
|
816
|
+
impact: stringParam({
|
|
817
|
+
description: 'Feedback impact.',
|
|
818
|
+
enumValues: FEEDBACK_IMPACTS,
|
|
819
|
+
examples: ['medium'],
|
|
820
|
+
}),
|
|
821
|
+
details: stringParam({
|
|
822
|
+
description: 'Developer-facing feedback details.',
|
|
823
|
+
minLength: 1,
|
|
824
|
+
}),
|
|
825
|
+
reproductionSteps: arrayParam({
|
|
826
|
+
description: 'Repeatable feedback reproduction steps.',
|
|
827
|
+
items: stringParam({ minLength: 1 }),
|
|
828
|
+
}),
|
|
829
|
+
context: objectParam({
|
|
830
|
+
description: 'Lookup metadata, such as worldId, conversationKey, deliveryId, targetAgentId, tags, and metadata.',
|
|
831
|
+
additionalProperties: true,
|
|
832
|
+
}),
|
|
833
|
+
redactionNotes: stringParam({
|
|
834
|
+
description: 'Optional note about what was redacted before submit_feedback.',
|
|
835
|
+
minLength: 1,
|
|
836
|
+
}),
|
|
592
837
|
},
|
|
593
838
|
}),
|
|
594
839
|
async execute(toolCallId, params = {}) {
|
|
@@ -648,6 +893,33 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
648
893
|
return buildTerminalActionResult({ tool: accountTool, action, payload });
|
|
649
894
|
}
|
|
650
895
|
|
|
896
|
+
if (action === 'submit_feedback') {
|
|
897
|
+
validateTerminalFeedbackPayload(params);
|
|
898
|
+
const feedback = normalizeTerminalFeedbackPayload(params);
|
|
899
|
+
const toolContext = await resolveToolContext(api, plugin, params, {
|
|
900
|
+
requiredPublicIdentityCapability: 'submit feedback',
|
|
901
|
+
});
|
|
902
|
+
if (typeof plugin.runtime.productShell.feedback?.submitFeedback !== 'function') {
|
|
903
|
+
requireManageWorldField('action', 'action=submit_feedback requires the feedback runtime adapter');
|
|
904
|
+
}
|
|
905
|
+
const payload = await plugin.runtime.productShell.feedback.submitFeedback({
|
|
906
|
+
...toolContext,
|
|
907
|
+
...feedback,
|
|
908
|
+
toolCallId,
|
|
909
|
+
source: 'openclaw_account_tool',
|
|
910
|
+
runtimeToolName: accountTool,
|
|
911
|
+
accountToolAction: action,
|
|
912
|
+
pluginVersion: CLAWORLD_PLUGIN_CURRENT_VERSION,
|
|
913
|
+
toolContractVersion: CLAWORLD_TOOL_CONTRACT_VERSION,
|
|
914
|
+
});
|
|
915
|
+
return buildTerminalActionResult({
|
|
916
|
+
tool: accountTool,
|
|
917
|
+
action,
|
|
918
|
+
payload: projectToolFeedbackSubmissionResponse(payload),
|
|
919
|
+
status: 'recorded',
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
|
|
651
923
|
const implementationAction = ACCOUNT_IMPLEMENTATION_ACTIONS[action] || null;
|
|
652
924
|
if (implementationAction) {
|
|
653
925
|
const implementationParams = {
|
|
@@ -892,7 +1164,7 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
892
1164
|
{
|
|
893
1165
|
name: manageWorldsTool,
|
|
894
1166
|
label: 'Claworld Manage Worlds',
|
|
895
|
-
description:
|
|
1167
|
+
description: `Terminal world surface for browsing selected world details, joining, creation, governance, broadcast, invites, membership, subscriptions, and participation context. ${CLAWORLD_WORLD_TOOL_GUIDANCE}`,
|
|
896
1168
|
metadata: buildToolMetadata({
|
|
897
1169
|
category: 'world_management',
|
|
898
1170
|
usageNotes: [
|
|
@@ -1214,7 +1486,15 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
1214
1486
|
action: 'list',
|
|
1215
1487
|
...(Object.keys(filters).length > 0 ? { filters } : {}),
|
|
1216
1488
|
});
|
|
1217
|
-
return
|
|
1489
|
+
return augmentConversationToolResultWithTranscripts(
|
|
1490
|
+
api,
|
|
1491
|
+
plugin,
|
|
1492
|
+
params,
|
|
1493
|
+
filters,
|
|
1494
|
+
result,
|
|
1495
|
+
manageConversationsTool,
|
|
1496
|
+
action,
|
|
1497
|
+
);
|
|
1218
1498
|
}
|
|
1219
1499
|
if (action === 'accept' || action === 'reject') {
|
|
1220
1500
|
const result = await requireTerminalTool(internalTools, 'claworld_chat_inbox').execute(toolCallId, {
|
|
@@ -1245,6 +1525,33 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
|
|
|
1245
1525
|
return buildToolResult({ status: 'error', tool: manageConversationsTool });
|
|
1246
1526
|
},
|
|
1247
1527
|
},
|
|
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
|
+
},
|
|
1248
1555
|
];
|
|
1249
1556
|
}
|
|
1250
1557
|
|
|
@@ -1303,7 +1610,7 @@ function buildRegisteredTools(api, plugin) {
|
|
|
1303
1610
|
{
|
|
1304
1611
|
name: 'claworld_get_world_detail',
|
|
1305
1612
|
label: 'Claworld Get World Detail',
|
|
1306
|
-
description:
|
|
1613
|
+
description: `Canonical world-inspection tool. Fetch one world detail before deciding whether to join it. ${CLAWORLD_WORLD_TOOL_GUIDANCE}`,
|
|
1307
1614
|
metadata: buildToolMetadata({
|
|
1308
1615
|
category: 'world_discovery',
|
|
1309
1616
|
usageNotes: [
|
|
@@ -1348,7 +1655,7 @@ function buildRegisteredTools(api, plugin) {
|
|
|
1348
1655
|
{
|
|
1349
1656
|
name: 'claworld_join_world',
|
|
1350
1657
|
label: 'Claworld Join World',
|
|
1351
|
-
description:
|
|
1658
|
+
description: `Canonical world-entry tool. Submit one world-scoped participantContextText for the selected world and receive the current join result, membership state, and terminal member-discovery follow-up actions. ${CLAWORLD_WORLD_TOOL_GUIDANCE}`,
|
|
1352
1659
|
metadata: buildToolMetadata({
|
|
1353
1660
|
category: 'world_join',
|
|
1354
1661
|
usageNotes: [
|
|
@@ -1406,7 +1713,7 @@ function buildRegisteredTools(api, plugin) {
|
|
|
1406
1713
|
{
|
|
1407
1714
|
name: 'claworld_create_world',
|
|
1408
1715
|
label: 'Claworld Create World',
|
|
1409
|
-
description:
|
|
1716
|
+
description: `Creator/admin entrypoint for publishing one new managed world. It also accepts the creator participantContextText and returns the self-join result block on success. ${CLAWORLD_WORLD_TOOL_GUIDANCE}`,
|
|
1410
1717
|
metadata: buildToolMetadata({
|
|
1411
1718
|
category: 'world_creation',
|
|
1412
1719
|
usageNotes: [
|
|
@@ -1494,7 +1801,7 @@ function buildRegisteredTools(api, plugin) {
|
|
|
1494
1801
|
{
|
|
1495
1802
|
name: 'claworld_manage_world',
|
|
1496
1803
|
label: 'Claworld Manage World',
|
|
1497
|
-
description:
|
|
1804
|
+
description: `Unified world management tool. Use governance actions for world management, or member actions to inspect joined worlds, update your world profile, and leave a world. ${CLAWORLD_WORLD_TOOL_GUIDANCE}`,
|
|
1498
1805
|
metadata: buildToolMetadata({
|
|
1499
1806
|
category: 'world_management',
|
|
1500
1807
|
usageNotes: [
|
|
@@ -1910,7 +2217,7 @@ function buildRegisteredTools(api, plugin) {
|
|
|
1910
2217
|
{
|
|
1911
2218
|
name: 'claworld_account',
|
|
1912
2219
|
label: 'Claworld Account',
|
|
1913
|
-
description: 'Canonical account surface. View current relay binding plus public identity readiness, or update the public display identity for the current Claworld account.',
|
|
2220
|
+
description: 'Canonical account surface. View current relay binding plus public identity readiness, or update the public display identity/profile for the current Claworld account.',
|
|
1914
2221
|
metadata: buildToolMetadata({
|
|
1915
2222
|
category: 'account',
|
|
1916
2223
|
usageNotes: [
|
|
@@ -37,6 +37,9 @@ export async function submitFeedbackReport({
|
|
|
37
37
|
fetchImpl,
|
|
38
38
|
logger = console,
|
|
39
39
|
toolCallId = null,
|
|
40
|
+
source = 'openclaw_runtime',
|
|
41
|
+
runtimeToolName = 'claworld_feedback_helper',
|
|
42
|
+
accountToolAction = null,
|
|
40
43
|
pluginVersion = null,
|
|
41
44
|
toolContractVersion = null,
|
|
42
45
|
} = {}) {
|
|
@@ -86,10 +89,11 @@ export async function submitFeedbackReport({
|
|
|
86
89
|
tags: normalizeStringList(normalizedContext.tags),
|
|
87
90
|
metadata: normalizeObject(normalizedContext.metadata),
|
|
88
91
|
},
|
|
89
|
-
source: 'openclaw_runtime',
|
|
92
|
+
source: normalizeText(source, 'openclaw_runtime'),
|
|
90
93
|
runtimeContext: {
|
|
91
94
|
channelId: 'claworld',
|
|
92
|
-
toolName: 'claworld_feedback_helper',
|
|
95
|
+
toolName: normalizeText(runtimeToolName, 'claworld_feedback_helper'),
|
|
96
|
+
accountToolAction: normalizeText(accountToolAction, null),
|
|
93
97
|
toolCallId: normalizeText(toolCallId, null),
|
|
94
98
|
...diagnostics,
|
|
95
99
|
toolContractVersion: normalizeText(toolContractVersion, null),
|
|
@@ -565,6 +565,7 @@ export function projectToolFeedbackSubmissionResponse(result = {}) {
|
|
|
565
565
|
runtime: {
|
|
566
566
|
channelId: normalizeText(runtimeContext.channelId, null),
|
|
567
567
|
toolName: normalizeText(runtimeContext.toolName, null),
|
|
568
|
+
accountToolAction: normalizeText(runtimeContext.accountToolAction, null),
|
|
568
569
|
toolCallId: normalizeText(runtimeContext.toolCallId, null),
|
|
569
570
|
openclawVersion: normalizeText(runtimeContext.openclawVersion, null),
|
|
570
571
|
pluginVersion: normalizeText(runtimeContext.pluginVersion, null),
|
|
@@ -17,12 +17,16 @@ 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
|
+
]);
|
|
20
23
|
|
|
21
24
|
export const CLAWORLD_REGISTERED_TOOL_NAMES = Object.freeze([
|
|
22
25
|
...CLAWORLD_ACCOUNT_TOOL_NAMES,
|
|
23
26
|
...CLAWORLD_SEARCH_TOOL_NAMES,
|
|
24
27
|
...CLAWORLD_WORLD_TOOL_NAMES,
|
|
25
28
|
...CLAWORLD_CONVERSATION_TOOL_NAMES,
|
|
29
|
+
...CLAWORLD_TRANSCRIPT_TOOL_NAMES,
|
|
26
30
|
]);
|
|
27
31
|
|
|
28
32
|
export const CLAWORLD_PUBLIC_TOOL_NAMES = Object.freeze([
|