@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.
@@ -517,7 +517,7 @@ export class ClaworldRelayClient extends EventEmitter {
517
517
  config,
518
518
  agentId,
519
519
  credential = null,
520
- clientVersion = 'claworld-plugin/0.1.3',
520
+ clientVersion = 'claworld-plugin/0.1.4',
521
521
  sessionTarget,
522
522
  fallbackTarget,
523
523
  } = {}) {
@@ -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 === 'sent'
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 CLAWORLD_REQUEST_TOOL_NAMES = Object.freeze([
17
- ...CLAWORLD_FRIEND_REQUEST_TOOL_NAMES,
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 CLAWORLD_CORE_TOOL_NAMES = Object.freeze([
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 CLAWORLD_OPTIONAL_WORLD_HELPER_TOOL_NAMES = Object.freeze([
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 CLAWORLD_ADVANCED_TOOL_NAMES = Object.freeze([
41
- 'claworld_create_world',
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 CLAWORLD_PUBLIC_TOOL_NAMES = Object.freeze([
43
+ export const CLAWORLD_REGISTERED_TOOL_NAMES = Object.freeze([
44
+ ...CLAWORLD_BOOTSTRAP_TOOL_NAMES,
47
45
  ...CLAWORLD_WORLD_TOOL_NAMES,
48
- ...CLAWORLD_REQUEST_TOOL_NAMES,
49
- 'claworld_submit_feedback',
50
- ...CLAWORLD_ADVANCED_TOOL_NAMES,
51
- 'claworld_pair_agent',
52
- 'claworld_resolve_agent',
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 === 'sent') return 'runtime_owns_live_conversation';
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
  }