@xfxstudio/claworld 0.1.3 → 0.1.4
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/index.js +2 -2
- package/openclaw.plugin.json +4 -1
- package/package.json +3 -2
- package/skills/claworld-help/SKILL.md +244 -0
- package/skills/claworld-join-and-chat/SKILL.md +272 -0
- package/skills/claworld-manage-worlds/SKILL.md +437 -0
- package/src/openclaw/plugin/claworld-channel-plugin.js +5 -2
- package/src/openclaw/plugin/managed-config.js +15 -5
- package/src/openclaw/plugin/register.js +804 -541
- package/src/openclaw/plugin/relay-client.js +1 -1
- package/src/openclaw/runtime/tool-contracts.js +9 -1
- package/src/openclaw/runtime/tool-inventory.js +28 -24
- package/src/product-shell/social/chat-request-service.js +8 -1
|
@@ -783,6 +783,12 @@ function projectChatRequestKickoff(kickoff = {}) {
|
|
|
783
783
|
return {
|
|
784
784
|
status: normalizeText(kickoff.status, 'skipped'),
|
|
785
785
|
deliveredAt: normalizeText(kickoff.deliveredAt, null),
|
|
786
|
+
relaySessionPreparedAt: normalizeText(kickoff.relaySessionPreparedAt, null),
|
|
787
|
+
acceptedRoundPreparedAt: normalizeText(kickoff.acceptedRoundPreparedAt, null),
|
|
788
|
+
senderKickoffDeliveredAt: normalizeText(kickoff.senderKickoffDeliveredAt, normalizeText(kickoff.deliveredAt, null)),
|
|
789
|
+
openerAcceptedAt: normalizeText(kickoff.openerAcceptedAt, null),
|
|
790
|
+
openerDeliveredAt: normalizeText(kickoff.openerDeliveredAt, null),
|
|
791
|
+
liveChatEstablishedAt: normalizeText(kickoff.liveChatEstablishedAt, null),
|
|
786
792
|
reason: normalizeText(kickoff.reason, null),
|
|
787
793
|
};
|
|
788
794
|
}
|
|
@@ -883,8 +889,10 @@ export function projectToolChatRequestMutationResponse(result = {}, { accountId
|
|
|
883
889
|
nextAction: normalizeText(
|
|
884
890
|
result.nextAction,
|
|
885
891
|
normalizedStatus === 'accepted'
|
|
886
|
-
? kickoff?.status === '
|
|
892
|
+
? kickoff?.status === 'established'
|
|
887
893
|
? 'runtime_owns_live_conversation'
|
|
894
|
+
: kickoff?.status === 'sent'
|
|
895
|
+
? 'wait_for_sender_opener_delivery'
|
|
888
896
|
: kickoff?.status === 'failed'
|
|
889
897
|
? 'backend_kickoff_failed'
|
|
890
898
|
: 'chat_request_accepted_without_opening_message'
|
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
export const CLAWORLD_TOOL_CONTRACT_VERSION = 'v1';
|
|
2
2
|
|
|
3
|
-
export const CLAWORLD_FRIEND_REQUEST_TOOL_NAMES = Object.freeze([
|
|
4
|
-
'claworld_send_friend_request',
|
|
5
|
-
'claworld_list_friend_requests',
|
|
6
|
-
'claworld_accept_friend_request',
|
|
7
|
-
'claworld_reject_friend_request',
|
|
8
|
-
]);
|
|
9
|
-
|
|
10
3
|
export const CLAWORLD_CHAT_REQUEST_TOOL_NAMES = Object.freeze([
|
|
11
4
|
'claworld_request_chat',
|
|
12
5
|
'claworld_list_chat_requests',
|
|
13
6
|
'claworld_accept_chat_request',
|
|
14
7
|
]);
|
|
15
8
|
|
|
16
|
-
export const
|
|
17
|
-
|
|
18
|
-
...CLAWORLD_CHAT_REQUEST_TOOL_NAMES,
|
|
9
|
+
export const CLAWORLD_BOOTSTRAP_TOOL_NAMES = Object.freeze([
|
|
10
|
+
'claworld_pair_agent',
|
|
19
11
|
]);
|
|
20
12
|
|
|
21
|
-
export const
|
|
22
|
-
...CLAWORLD_REQUEST_TOOL_NAMES,
|
|
23
|
-
'claworld_pair_agent',
|
|
24
|
-
'claworld_resolve_agent',
|
|
13
|
+
export const CLAWORLD_FEEDBACK_TOOL_NAMES = Object.freeze([
|
|
25
14
|
'claworld_submit_feedback',
|
|
26
15
|
]);
|
|
27
16
|
|
|
@@ -29,27 +18,38 @@ export const CLAWORLD_WORLD_TOOL_NAMES = Object.freeze([
|
|
|
29
18
|
'claworld_list_worlds',
|
|
30
19
|
'claworld_get_world_detail',
|
|
31
20
|
'claworld_join_world',
|
|
32
|
-
'claworld_broadcast_world',
|
|
33
21
|
]);
|
|
34
22
|
|
|
35
|
-
export const
|
|
23
|
+
export const CLAWORLD_WORLD_ADMIN_PUBLIC_TOOL_NAMES = Object.freeze([
|
|
24
|
+
'claworld_create_world',
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
export const CLAWORLD_COMPATIBILITY_TOOL_NAMES = Object.freeze([
|
|
36
28
|
'claworld_prepare_world_join',
|
|
37
29
|
'claworld_search_world',
|
|
38
30
|
]);
|
|
39
31
|
|
|
40
|
-
export const
|
|
41
|
-
'
|
|
32
|
+
export const CLAWORLD_RETIRED_PUBLIC_TOOL_NAMES = Object.freeze([
|
|
33
|
+
'claworld_send_friend_request',
|
|
34
|
+
'claworld_list_friend_requests',
|
|
35
|
+
'claworld_accept_friend_request',
|
|
36
|
+
'claworld_reject_friend_request',
|
|
37
|
+
'claworld_broadcast_world',
|
|
42
38
|
'claworld_list_owned_worlds',
|
|
43
39
|
'claworld_manage_world',
|
|
40
|
+
'claworld_resolve_agent',
|
|
44
41
|
]);
|
|
45
42
|
|
|
46
|
-
export const
|
|
43
|
+
export const CLAWORLD_REGISTERED_TOOL_NAMES = Object.freeze([
|
|
44
|
+
...CLAWORLD_BOOTSTRAP_TOOL_NAMES,
|
|
47
45
|
...CLAWORLD_WORLD_TOOL_NAMES,
|
|
48
|
-
...
|
|
49
|
-
|
|
50
|
-
...
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
...CLAWORLD_WORLD_ADMIN_PUBLIC_TOOL_NAMES,
|
|
47
|
+
...CLAWORLD_CHAT_REQUEST_TOOL_NAMES,
|
|
48
|
+
...CLAWORLD_FEEDBACK_TOOL_NAMES,
|
|
49
|
+
]);
|
|
50
|
+
|
|
51
|
+
export const CLAWORLD_PUBLIC_TOOL_NAMES = Object.freeze([
|
|
52
|
+
...CLAWORLD_REGISTERED_TOOL_NAMES,
|
|
53
53
|
]);
|
|
54
54
|
|
|
55
55
|
export const CLAWORLD_MINIMAL_OPENCLAW_TOOL_NAMES = Object.freeze([
|
|
@@ -65,7 +65,11 @@ export const CLAWORLD_READ_ONLY_OPENCLAW_TOOL_NAMES = Object.freeze([
|
|
|
65
65
|
]);
|
|
66
66
|
|
|
67
67
|
export const CLAWORLD_PLUGIN_SMOKE_REQUIRED_TOOL_NAMES = Object.freeze([
|
|
68
|
+
...CLAWORLD_BOOTSTRAP_TOOL_NAMES,
|
|
68
69
|
...CLAWORLD_WORLD_TOOL_NAMES,
|
|
70
|
+
...CLAWORLD_WORLD_ADMIN_PUBLIC_TOOL_NAMES,
|
|
71
|
+
...CLAWORLD_CHAT_REQUEST_TOOL_NAMES,
|
|
72
|
+
...CLAWORLD_FEEDBACK_TOOL_NAMES,
|
|
69
73
|
]);
|
|
70
74
|
|
|
71
75
|
export const CLAWORLD_TOOL_PROFILES = Object.freeze({
|
|
@@ -267,13 +267,20 @@ function projectKickoff(kickoff = {}) {
|
|
|
267
267
|
return {
|
|
268
268
|
status: normalizeText(kickoff.status, 'skipped'),
|
|
269
269
|
deliveredAt: normalizeText(kickoff.deliveredAt, null),
|
|
270
|
+
relaySessionPreparedAt: normalizeText(kickoff.relaySessionPreparedAt, null),
|
|
271
|
+
acceptedRoundPreparedAt: normalizeText(kickoff.acceptedRoundPreparedAt, null),
|
|
272
|
+
senderKickoffDeliveredAt: normalizeText(kickoff.senderKickoffDeliveredAt, normalizeText(kickoff.deliveredAt, null)),
|
|
273
|
+
openerAcceptedAt: normalizeText(kickoff.openerAcceptedAt, null),
|
|
274
|
+
openerDeliveredAt: normalizeText(kickoff.openerDeliveredAt, null),
|
|
275
|
+
liveChatEstablishedAt: normalizeText(kickoff.liveChatEstablishedAt, null),
|
|
270
276
|
reason: normalizeText(kickoff.reason, null),
|
|
271
277
|
};
|
|
272
278
|
}
|
|
273
279
|
|
|
274
280
|
function resolveAcceptNextAction(kickoff) {
|
|
275
281
|
const kickoffStatus = kickoff?.status || 'skipped';
|
|
276
|
-
if (kickoffStatus === '
|
|
282
|
+
if (kickoffStatus === 'established') return 'runtime_owns_live_conversation';
|
|
283
|
+
if (kickoffStatus === 'sent') return 'wait_for_sender_opener_delivery';
|
|
277
284
|
if (kickoffStatus === 'failed') return 'backend_kickoff_failed';
|
|
278
285
|
return 'chat_request_accepted_without_opening_message';
|
|
279
286
|
}
|