@xfxstudio/claworld 0.2.5 → 0.2.7
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-help/SKILL.md +2 -2
- package/skills/claworld-join-and-chat/SKILL.md +18 -9
- package/src/lib/chat-request.js +19 -0
- package/src/lib/relay/kickoff-text.js +6 -1
- package/src/openclaw/installer/core.js +16 -2
- package/src/openclaw/plugin/claworld-channel-plugin.js +164 -12
- package/src/openclaw/plugin/config-schema.js +9 -1
- package/src/openclaw/plugin/register.js +151 -15
- package/src/openclaw/plugin/relay-client.js +502 -1
- package/src/openclaw/runtime/demo-session-bootstrap.js +1 -2
- package/src/openclaw/runtime/tool-contracts.js +40 -1
- package/src/openclaw/runtime/tool-inventory.js +3 -3
- package/src/openclaw/runtime/world-moderation-helper.js +9 -13
- package/src/product-shell/catalog/default-world-catalog.js +12 -258
- package/src/product-shell/contracts/world-manifest.js +0 -38
- package/src/product-shell/contracts/world-orchestration.js +0 -6
- package/src/product-shell/index.js +1 -5
- package/src/product-shell/membership/membership-service.js +24 -6
- package/src/product-shell/orchestration/world-conversation-orchestrator.js +0 -2
- package/src/product-shell/orchestration/world-conversation-text.js +0 -2
- package/src/product-shell/social/chat-request-routes.js +24 -1
- package/src/product-shell/social/chat-request-service.js +185 -15
- package/src/product-shell/worlds/world-admin-service.js +28 -120
- package/src/product-shell/worlds/world-authorization.js +20 -17
- package/src/product-shell/worlds/world-broadcast-service.js +2 -5
- package/src/product-shell/worlds/world-text.js +0 -2
- package/src/product-shell/results/result-service.js +0 -21
|
@@ -86,7 +86,7 @@ function createBroadcastNotAllowedError({ worldId, senderAgentId, senderRole } =
|
|
|
86
86
|
worldId,
|
|
87
87
|
senderAgentId,
|
|
88
88
|
senderRole,
|
|
89
|
-
allowedRoles: ['owner'
|
|
89
|
+
allowedRoles: ['owner'],
|
|
90
90
|
};
|
|
91
91
|
return error;
|
|
92
92
|
}
|
|
@@ -138,10 +138,7 @@ export function createWorldBroadcastService({
|
|
|
138
138
|
|
|
139
139
|
function resolveAudienceAgentIds(world, { audience, excludeSelf, senderAgentId } = {}) {
|
|
140
140
|
if (audience === 'admins' || audience === 'admins_and_owner') {
|
|
141
|
-
return dedupeAgentIds([
|
|
142
|
-
world.creatorAgentId,
|
|
143
|
-
...(Array.isArray(world.adminAgentIds) ? world.adminAgentIds : []),
|
|
144
|
-
], {
|
|
141
|
+
return dedupeAgentIds([world.creatorAgentId], {
|
|
145
142
|
excludeAgentId: excludeSelf ? senderAgentId : null,
|
|
146
143
|
});
|
|
147
144
|
}
|
|
@@ -27,7 +27,6 @@ export function buildWorldContextText({
|
|
|
27
27
|
worldContextText = null,
|
|
28
28
|
interactionRules = null,
|
|
29
29
|
prohibitedRules = null,
|
|
30
|
-
ratingRules = null,
|
|
31
30
|
} = {}) {
|
|
32
31
|
const explicitWorldContextText = normalizeText(worldContextText, null);
|
|
33
32
|
if (explicitWorldContextText) return explicitWorldContextText;
|
|
@@ -41,7 +40,6 @@ export function buildWorldContextText({
|
|
|
41
40
|
normalizeText(summary, null) ? `简介:${normalizeText(summary, null)}` : null,
|
|
42
41
|
normalizeText(interactionRules, null) ? `互动规则:${normalizeText(interactionRules, null)}` : null,
|
|
43
42
|
normalizeText(prohibitedRules, null) ? `禁止事项:${normalizeText(prohibitedRules, null)}` : null,
|
|
44
|
-
normalizeText(ratingRules, null) ? `结果要求:${normalizeText(ratingRules, null)}` : null,
|
|
45
43
|
].filter(Boolean);
|
|
46
44
|
|
|
47
45
|
return lines.length > 0 ? lines.join('\n') : null;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { createCanonicalResultBuilder } from '../../openclaw/runtime/canonical-result-builder.js';
|
|
2
|
-
|
|
3
|
-
export function createResultService({ builder = createCanonicalResultBuilder() } = {}) {
|
|
4
|
-
return {
|
|
5
|
-
schema: builder.schema,
|
|
6
|
-
previewConversation({ world, conversationKey = 'cnv_preview' } = {}) {
|
|
7
|
-
const preview = builder.build({
|
|
8
|
-
conversationId: conversationKey,
|
|
9
|
-
intentSignals: world.resultContract.exampleSignals.intentSignals,
|
|
10
|
-
conversationSignals: world.resultContract.exampleSignals.conversationSignals,
|
|
11
|
-
agentSignals: world.resultContract.exampleSignals.agentSignals,
|
|
12
|
-
});
|
|
13
|
-
const rest = { ...preview };
|
|
14
|
-
delete rest.conversationId;
|
|
15
|
-
return {
|
|
16
|
-
...rest,
|
|
17
|
-
conversationKey,
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
}
|