@xfxstudio/claworld 0.2.25 → 2026.4.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/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/claworld-a2a-channel-agent/SKILL.md +21 -3
- package/skills/claworld-help/SKILL.md +1 -1
- package/skills/claworld-join-and-chat/SKILL.md +115 -21
- package/skills/claworld-manage-worlds/SKILL.md +66 -5
- package/src/lib/relay/agent-readable-markdown.js +88 -11
- package/src/openclaw/plugin/claworld-channel-plugin.js +91 -0
- package/src/openclaw/plugin/register-tooling.js +14 -1
- package/src/openclaw/plugin/register.js +334 -20
- package/src/openclaw/runtime/product-shell-helper.js +201 -2
- package/src/openclaw/runtime/tool-contracts.js +278 -20
- package/src/openclaw/runtime/tool-inventory.js +3 -0
- package/src/openclaw/runtime/world-moderation-helper.js +140 -0
|
@@ -33,6 +33,7 @@ import { createOutboundSessionBridge } from '../runtime/outbound-session-bridge.
|
|
|
33
33
|
import { createCanonicalResultBuilder } from '../runtime/canonical-result-builder.js';
|
|
34
34
|
import { createDemoSessionBootstrap } from '../runtime/demo-session-bootstrap.js';
|
|
35
35
|
import {
|
|
36
|
+
broadcastModeratedWorld,
|
|
36
37
|
createModeratedWorld,
|
|
37
38
|
fetchOwnedWorlds,
|
|
38
39
|
manageModeratedWorld,
|
|
@@ -51,6 +52,8 @@ import {
|
|
|
51
52
|
fetchWorldCandidateFeed,
|
|
52
53
|
fetchWorldDetail,
|
|
53
54
|
joinWorld,
|
|
55
|
+
searchWorldMembers,
|
|
56
|
+
searchWorlds,
|
|
54
57
|
resolveWorldSelection,
|
|
55
58
|
resolveWorldSelectionFlow,
|
|
56
59
|
} from '../runtime/product-shell-helper.js';
|
|
@@ -2990,6 +2993,20 @@ async function generateRuntimeProfileCard(context = {}) {
|
|
|
2990
2993
|
logger,
|
|
2991
2994
|
});
|
|
2992
2995
|
},
|
|
2996
|
+
searchWorlds: async (context = {}) => {
|
|
2997
|
+
const resolvedContext = await resolveBoundRuntimeContext(context);
|
|
2998
|
+
return searchWorlds({
|
|
2999
|
+
cfg: resolvedContext.cfg || {},
|
|
3000
|
+
accountId: resolvedContext.accountId || null,
|
|
3001
|
+
runtimeConfig: resolvedContext.runtimeConfig || null,
|
|
3002
|
+
query: context.query ?? context.queryText ?? null,
|
|
3003
|
+
limit: context.limit ?? null,
|
|
3004
|
+
sort: context.sort || null,
|
|
3005
|
+
page: context.page ?? null,
|
|
3006
|
+
fetchImpl,
|
|
3007
|
+
logger,
|
|
3008
|
+
});
|
|
3009
|
+
},
|
|
2993
3010
|
joinWorld: async (context = {}) => {
|
|
2994
3011
|
const resolvedContext = await resolveBoundRuntimeContext(context);
|
|
2995
3012
|
return joinWorld({
|
|
@@ -3003,6 +3020,21 @@ async function generateRuntimeProfileCard(context = {}) {
|
|
|
3003
3020
|
logger,
|
|
3004
3021
|
});
|
|
3005
3022
|
},
|
|
3023
|
+
searchWorldMembers: async (context = {}) => {
|
|
3024
|
+
const resolvedContext = await resolveBoundRuntimeContext(context);
|
|
3025
|
+
return searchWorldMembers({
|
|
3026
|
+
cfg: resolvedContext.cfg || {},
|
|
3027
|
+
accountId: resolvedContext.accountId || null,
|
|
3028
|
+
runtimeConfig: resolvedContext.runtimeConfig || null,
|
|
3029
|
+
worldId: context.worldId || null,
|
|
3030
|
+
agentId: resolvedContext.agentId || null,
|
|
3031
|
+
query: context.query ?? context.queryText ?? null,
|
|
3032
|
+
sort: context.sort || null,
|
|
3033
|
+
limit: context.limit ?? null,
|
|
3034
|
+
fetchImpl,
|
|
3035
|
+
logger,
|
|
3036
|
+
});
|
|
3037
|
+
},
|
|
3006
3038
|
fetchWorldCandidateFeed: async (context = {}) => {
|
|
3007
3039
|
const resolvedContext = await resolveBoundRuntimeContext(context);
|
|
3008
3040
|
return fetchWorldCandidateFeed({
|
|
@@ -3063,6 +3095,21 @@ async function generateRuntimeProfileCard(context = {}) {
|
|
|
3063
3095
|
logger,
|
|
3064
3096
|
});
|
|
3065
3097
|
},
|
|
3098
|
+
broadcastWorld: async (context = {}) => {
|
|
3099
|
+
const resolvedContext = await resolveBoundRuntimeContext(context);
|
|
3100
|
+
return broadcastModeratedWorld({
|
|
3101
|
+
cfg: resolvedContext.cfg || {},
|
|
3102
|
+
accountId: resolvedContext.accountId || null,
|
|
3103
|
+
runtimeConfig: resolvedContext.runtimeConfig || null,
|
|
3104
|
+
agentId: resolvedContext.agentId || null,
|
|
3105
|
+
worldId: context.worldId || null,
|
|
3106
|
+
announcementText: context.announcementText || null,
|
|
3107
|
+
audience: context.audience || null,
|
|
3108
|
+
excludeSelf: Object.prototype.hasOwnProperty.call(context, 'excludeSelf') ? context.excludeSelf : null,
|
|
3109
|
+
fetchImpl,
|
|
3110
|
+
logger,
|
|
3111
|
+
});
|
|
3112
|
+
},
|
|
3066
3113
|
manageWorld: async (context = {}) => {
|
|
3067
3114
|
const resolvedContext = await resolveBoundRuntimeContext(context);
|
|
3068
3115
|
return manageModeratedWorld({
|
|
@@ -3174,6 +3221,20 @@ async function generateRuntimeProfileCard(context = {}) {
|
|
|
3174
3221
|
logger,
|
|
3175
3222
|
});
|
|
3176
3223
|
},
|
|
3224
|
+
searchWorlds: async (context = {}) => {
|
|
3225
|
+
const resolvedContext = await resolveBoundRuntimeContext(context);
|
|
3226
|
+
return searchWorlds({
|
|
3227
|
+
cfg: resolvedContext.cfg || {},
|
|
3228
|
+
accountId: resolvedContext.accountId || null,
|
|
3229
|
+
runtimeConfig: resolvedContext.runtimeConfig || null,
|
|
3230
|
+
query: context.query ?? context.queryText ?? null,
|
|
3231
|
+
limit: context.limit ?? null,
|
|
3232
|
+
sort: context.sort || null,
|
|
3233
|
+
page: context.page ?? null,
|
|
3234
|
+
fetchImpl,
|
|
3235
|
+
logger,
|
|
3236
|
+
});
|
|
3237
|
+
},
|
|
3177
3238
|
joinWorld: async (context = {}) => {
|
|
3178
3239
|
const resolvedContext = await resolveBoundRuntimeContext(context);
|
|
3179
3240
|
return joinWorld({
|
|
@@ -3187,6 +3248,21 @@ async function generateRuntimeProfileCard(context = {}) {
|
|
|
3187
3248
|
logger,
|
|
3188
3249
|
});
|
|
3189
3250
|
},
|
|
3251
|
+
searchWorldMembers: async (context = {}) => {
|
|
3252
|
+
const resolvedContext = await resolveBoundRuntimeContext(context);
|
|
3253
|
+
return searchWorldMembers({
|
|
3254
|
+
cfg: resolvedContext.cfg || {},
|
|
3255
|
+
accountId: resolvedContext.accountId || null,
|
|
3256
|
+
runtimeConfig: resolvedContext.runtimeConfig || null,
|
|
3257
|
+
worldId: context.worldId || null,
|
|
3258
|
+
agentId: resolvedContext.agentId || null,
|
|
3259
|
+
query: context.query ?? context.queryText ?? null,
|
|
3260
|
+
sort: context.sort || null,
|
|
3261
|
+
limit: context.limit ?? null,
|
|
3262
|
+
fetchImpl,
|
|
3263
|
+
logger,
|
|
3264
|
+
});
|
|
3265
|
+
},
|
|
3190
3266
|
fetchWorldCandidateFeed: async (context = {}) => {
|
|
3191
3267
|
const resolvedContext = await resolveBoundRuntimeContext(context);
|
|
3192
3268
|
return fetchWorldCandidateFeed({
|
|
@@ -3268,6 +3344,21 @@ async function generateRuntimeProfileCard(context = {}) {
|
|
|
3268
3344
|
logger,
|
|
3269
3345
|
});
|
|
3270
3346
|
},
|
|
3347
|
+
broadcastWorld: async (context = {}) => {
|
|
3348
|
+
const resolvedContext = await resolveBoundRuntimeContext(context);
|
|
3349
|
+
return broadcastModeratedWorld({
|
|
3350
|
+
cfg: resolvedContext.cfg || {},
|
|
3351
|
+
accountId: resolvedContext.accountId || null,
|
|
3352
|
+
runtimeConfig: resolvedContext.runtimeConfig || null,
|
|
3353
|
+
agentId: resolvedContext.agentId || null,
|
|
3354
|
+
worldId: context.worldId || null,
|
|
3355
|
+
announcementText: context.announcementText || null,
|
|
3356
|
+
audience: context.audience || null,
|
|
3357
|
+
excludeSelf: Object.prototype.hasOwnProperty.call(context, 'excludeSelf') ? context.excludeSelf : null,
|
|
3358
|
+
fetchImpl,
|
|
3359
|
+
logger,
|
|
3360
|
+
});
|
|
3361
|
+
},
|
|
3271
3362
|
manageWorld: async (context = {}) => {
|
|
3272
3363
|
const resolvedContext = await resolveBoundRuntimeContext(context);
|
|
3273
3364
|
return manageModeratedWorld({
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
projectToolChatRequestMutationResponse,
|
|
4
4
|
projectToolManagedWorldResponse,
|
|
5
5
|
projectToolOwnedWorldsResponse,
|
|
6
|
+
projectToolWorldBroadcastResponse,
|
|
6
7
|
projectToolWorldMembershipListResponse,
|
|
7
8
|
projectToolWorldMembershipResponse,
|
|
8
9
|
} from '../runtime/tool-contracts.js';
|
|
@@ -381,6 +382,7 @@ export function buildToolMetadata({
|
|
|
381
382
|
export const MANAGE_WORLD_ACTIONS = Object.freeze([
|
|
382
383
|
'list',
|
|
383
384
|
'get',
|
|
385
|
+
'broadcast',
|
|
384
386
|
'update_context',
|
|
385
387
|
'pause',
|
|
386
388
|
'close',
|
|
@@ -400,8 +402,13 @@ export function inferManageWorldAction(params = {}) {
|
|
|
400
402
|
const explicitAction = normalizeManageWorldAction(params.action, null);
|
|
401
403
|
if (explicitAction) return explicitAction;
|
|
402
404
|
if (!normalizeText(params.worldId, null)) return 'list';
|
|
405
|
+
if (normalizeText(params.announcementText, null)) return 'broadcast';
|
|
403
406
|
if (normalizeText(params.participantContextText, null)) return 'update_profile';
|
|
404
|
-
if (
|
|
407
|
+
if (
|
|
408
|
+
normalizeText(params.worldContextText, null)
|
|
409
|
+
|| normalizeText(params.displayName, null)
|
|
410
|
+
|| normalizeObject(params.broadcast, null)
|
|
411
|
+
) {
|
|
405
412
|
return 'update_context';
|
|
406
413
|
}
|
|
407
414
|
return 'get';
|
|
@@ -427,6 +434,12 @@ export function projectToolManageWorldActionResponse(payload = {}, { accountId =
|
|
|
427
434
|
...projectToolOwnedWorldsResponse(payload, { accountId }),
|
|
428
435
|
};
|
|
429
436
|
}
|
|
437
|
+
if (resolvedAction === 'broadcast') {
|
|
438
|
+
return {
|
|
439
|
+
action: resolvedAction,
|
|
440
|
+
...projectToolWorldBroadcastResponse(payload, { accountId }),
|
|
441
|
+
};
|
|
442
|
+
}
|
|
430
443
|
if (resolvedAction === 'list_memberships') {
|
|
431
444
|
return {
|
|
432
445
|
action: resolvedAction,
|