@xfxstudio/claworld 2026.5.6-testing.1 → 2026.5.10-testing.1
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
CHANGED
|
@@ -6,18 +6,9 @@
|
|
|
6
6
|
"skills": [
|
|
7
7
|
"./skills"
|
|
8
8
|
],
|
|
9
|
-
"contracts": {
|
|
10
|
-
"tools": [
|
|
11
|
-
"claworld_manage_account",
|
|
12
|
-
"claworld_search",
|
|
13
|
-
"claworld_get_public_profile",
|
|
14
|
-
"claworld_manage_worlds",
|
|
15
|
-
"claworld_manage_conversations"
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
9
|
"name": "Claworld Persona Relay",
|
|
19
10
|
"description": "Claworld relay world channel plugin for OpenClaw.",
|
|
20
|
-
"version": "2026.5.
|
|
11
|
+
"version": "2026.5.10-testing.1",
|
|
21
12
|
"configSchema": {
|
|
22
13
|
"type": "object",
|
|
23
14
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -582,17 +582,19 @@ async function deliverRelayMessage({ runtimeConfig, to, text, fetchImpl, logger,
|
|
|
582
582
|
|
|
583
583
|
if (!result.ok) {
|
|
584
584
|
logger.error?.('[claworld:outbound] message delivery failed', { status: result.status, body: result.body });
|
|
585
|
-
|
|
586
|
-
result,
|
|
587
|
-
runtimeConfig,
|
|
585
|
+
throw createRuntimeBoundaryError({
|
|
588
586
|
code: 'relay_message_delivery_failed',
|
|
589
|
-
|
|
587
|
+
category: 'transport',
|
|
588
|
+
status: result.status >= 500 ? 502 : result.status,
|
|
590
589
|
message: `claworld outbound failed: ${result.status}`,
|
|
590
|
+
publicMessage: 'claworld outbound message delivery failed',
|
|
591
|
+
recoverable: true,
|
|
591
592
|
context: {
|
|
593
|
+
accountId: runtimeConfig.accountId || null,
|
|
592
594
|
fromAgentId,
|
|
593
595
|
targetAgentId,
|
|
596
|
+
status: result.status,
|
|
594
597
|
},
|
|
595
|
-
passThroughBackendConflict: true,
|
|
596
598
|
});
|
|
597
599
|
}
|
|
598
600
|
|
|
@@ -628,23 +630,13 @@ function createRelayRouteError({
|
|
|
628
630
|
publicMessage,
|
|
629
631
|
message,
|
|
630
632
|
context = {},
|
|
631
|
-
passThroughBackendConflict = false,
|
|
632
633
|
}) {
|
|
633
|
-
const backendCode = resolveNormalizedText(result?.body?.error, null);
|
|
634
|
-
const backendMessage = resolveNormalizedText(result?.body?.message, null);
|
|
635
|
-
const shouldPassThroughConflict = passThroughBackendConflict === true
|
|
636
|
-
&& Number(result?.status) === 409
|
|
637
|
-
&& backendCode;
|
|
638
634
|
throw createRuntimeBoundaryError({
|
|
639
|
-
code
|
|
640
|
-
category:
|
|
635
|
+
code,
|
|
636
|
+
category: 'transport',
|
|
641
637
|
status: result?.status >= 500 ? 502 : result?.status || 502,
|
|
642
|
-
message:
|
|
643
|
-
|
|
644
|
-
: (message || publicMessage),
|
|
645
|
-
publicMessage: shouldPassThroughConflict
|
|
646
|
-
? (backendMessage || publicMessage)
|
|
647
|
-
: publicMessage,
|
|
638
|
+
message: message || publicMessage,
|
|
639
|
+
publicMessage,
|
|
648
640
|
recoverable: true,
|
|
649
641
|
context: {
|
|
650
642
|
accountId: runtimeConfig.accountId || null,
|
|
@@ -735,7 +727,6 @@ async function createChatRequest({
|
|
|
735
727
|
displayName: normalizedDisplayName,
|
|
736
728
|
agentCode: normalizedAgentCode,
|
|
737
729
|
},
|
|
738
|
-
passThroughBackendConflict: true,
|
|
739
730
|
});
|
|
740
731
|
}
|
|
741
732
|
return result.body || {};
|
|
@@ -818,7 +809,6 @@ async function acceptChatRequest({
|
|
|
818
809
|
code: 'chat_request_accept_failed',
|
|
819
810
|
publicMessage: 'failed to accept chat request',
|
|
820
811
|
context: { actorAgentId, chatRequestId },
|
|
821
|
-
passThroughBackendConflict: true,
|
|
822
812
|
});
|
|
823
813
|
}
|
|
824
814
|
return normalizeChatInboxPayloadSessionKeys(result.body || {}, { localAgentId });
|
|
@@ -847,7 +837,6 @@ async function rejectChatRequest({
|
|
|
847
837
|
code: 'chat_request_reject_failed',
|
|
848
838
|
publicMessage: 'failed to reject chat request',
|
|
849
839
|
context: { actorAgentId, chatRequestId },
|
|
850
|
-
passThroughBackendConflict: true,
|
|
851
840
|
});
|
|
852
841
|
}
|
|
853
842
|
return result.body || {};
|
|
@@ -595,34 +595,6 @@ function projectToolAccountProfile(identityPayload = null) {
|
|
|
595
595
|
return normalizeText(identityPayload?.profile, null);
|
|
596
596
|
}
|
|
597
597
|
|
|
598
|
-
function projectToolAccountProfileState(identityPayload = null) {
|
|
599
|
-
const profilePayload = normalizeObject(identityPayload?.accountProfile, null);
|
|
600
|
-
const profile = normalizeText(profilePayload?.profile, projectToolAccountProfile(identityPayload));
|
|
601
|
-
const ready = profilePayload
|
|
602
|
-
? profilePayload.ready === true
|
|
603
|
-
: Boolean(profile);
|
|
604
|
-
return {
|
|
605
|
-
status: normalizeText(profilePayload?.status, ready ? 'ready' : 'pending'),
|
|
606
|
-
ready,
|
|
607
|
-
profile,
|
|
608
|
-
reason: normalizeText(profilePayload?.reason, ready ? null : 'account_profile_missing'),
|
|
609
|
-
requiredAction: normalizeText(profilePayload?.requiredAction, ready ? null : 'update_agent_profile'),
|
|
610
|
-
nextAction: normalizeText(profilePayload?.nextAction, ready ? null : 'update_agent_profile'),
|
|
611
|
-
nextTool: normalizeText(profilePayload?.nextTool, ready ? null : 'claworld_manage_account'),
|
|
612
|
-
missingFields: Array.isArray(profilePayload?.missingFields)
|
|
613
|
-
? profilePayload.missingFields
|
|
614
|
-
: (ready
|
|
615
|
-
? []
|
|
616
|
-
: [
|
|
617
|
-
{
|
|
618
|
-
fieldId: 'profile',
|
|
619
|
-
label: 'Account Profile',
|
|
620
|
-
description: 'A non-empty global Claworld account profile used when other agents need to know who you are.',
|
|
621
|
-
},
|
|
622
|
-
]),
|
|
623
|
-
};
|
|
624
|
-
}
|
|
625
|
-
|
|
626
598
|
function projectToolChatRequestApprovalPolicy(payload = null) {
|
|
627
599
|
const policy = normalizeObject(payload, null);
|
|
628
600
|
if (!policy) return null;
|
|
@@ -680,10 +652,7 @@ export function projectToolAccountViewResponse({
|
|
|
680
652
|
pairingPayload = null,
|
|
681
653
|
identityPayload = null,
|
|
682
654
|
} = {}) {
|
|
683
|
-
const publicIdentityState = projectToolAccountIdentityFields(identityPayload);
|
|
684
|
-
const accountProfile = projectToolAccountProfileState(identityPayload);
|
|
685
655
|
const identityReady = identityPayload?.ready === true;
|
|
686
|
-
const accountProfileReady = accountProfile.ready === true;
|
|
687
656
|
const activationReady = pairingPayload?.status === 'paired';
|
|
688
657
|
const bindingReady = typeof pairingPayload?.bindingReady === 'boolean'
|
|
689
658
|
? pairingPayload.bindingReady
|
|
@@ -694,30 +663,7 @@ export function projectToolAccountViewResponse({
|
|
|
694
663
|
? (bindingReady ? 'bound' : 'identity_unresolved')
|
|
695
664
|
: 'unactivated',
|
|
696
665
|
);
|
|
697
|
-
const ready = activationReady && identityReady
|
|
698
|
-
const blockedAction = !identityReady
|
|
699
|
-
? {
|
|
700
|
-
requiredAction: publicIdentityState.requiredAction,
|
|
701
|
-
nextAction: publicIdentityState.nextAction,
|
|
702
|
-
nextTool: publicIdentityState.nextTool,
|
|
703
|
-
missingFields: publicIdentityState.missingFields,
|
|
704
|
-
reason: 'public_identity_incomplete',
|
|
705
|
-
}
|
|
706
|
-
: !accountProfileReady
|
|
707
|
-
? {
|
|
708
|
-
requiredAction: accountProfile.requiredAction,
|
|
709
|
-
nextAction: accountProfile.nextAction,
|
|
710
|
-
nextTool: accountProfile.nextTool,
|
|
711
|
-
missingFields: accountProfile.missingFields,
|
|
712
|
-
reason: accountProfile.reason,
|
|
713
|
-
}
|
|
714
|
-
: {
|
|
715
|
-
requiredAction: null,
|
|
716
|
-
nextAction: null,
|
|
717
|
-
nextTool: null,
|
|
718
|
-
missingFields: [],
|
|
719
|
-
reason: null,
|
|
720
|
-
};
|
|
666
|
+
const ready = activationReady && identityReady;
|
|
721
667
|
const relayResolved = pairingPayload?.relayAgent?.resolved ?? null;
|
|
722
668
|
const relayOnline = pairingPayload?.relayAgent?.online ?? null;
|
|
723
669
|
const resolvedShareCard = identityPayload && Object.prototype.hasOwnProperty.call(identityPayload, 'shareCard')
|
|
@@ -728,12 +674,10 @@ export function projectToolAccountViewResponse({
|
|
|
728
674
|
status: ready ? 'ready' : 'pending',
|
|
729
675
|
ready,
|
|
730
676
|
readiness: pairingPayload?.status === 'paired'
|
|
731
|
-
? (identityReady
|
|
732
|
-
? (accountProfileReady ? 'paired_and_ready' : 'paired_but_account_profile_incomplete')
|
|
733
|
-
: 'paired_but_identity_pending')
|
|
677
|
+
? (identityReady ? 'paired_and_ready' : 'paired_but_identity_pending')
|
|
734
678
|
: 'installed_unactivated',
|
|
735
679
|
accountId: normalizeText(pairingPayload?.runtimeConfig?.accountId, normalizeText(accountId, null)),
|
|
736
|
-
reason: normalizeText(pairingPayload?.reason,
|
|
680
|
+
reason: normalizeText(pairingPayload?.reason, null),
|
|
737
681
|
bindingSource: normalizeText(pairingPayload?.bindingSource, null),
|
|
738
682
|
activation: {
|
|
739
683
|
status: activationReady ? 'ready' : 'pending',
|
|
@@ -743,7 +687,6 @@ export function projectToolAccountViewResponse({
|
|
|
743
687
|
bindingReady,
|
|
744
688
|
bindingStatus,
|
|
745
689
|
publicIdentityReady: identityReady,
|
|
746
|
-
accountProfileReady,
|
|
747
690
|
relayPresenceResolved: relayResolved,
|
|
748
691
|
relayOnline,
|
|
749
692
|
},
|
|
@@ -759,13 +702,8 @@ export function projectToolAccountViewResponse({
|
|
|
759
702
|
resolved: relayResolved,
|
|
760
703
|
bindingStatus,
|
|
761
704
|
},
|
|
762
|
-
profile:
|
|
763
|
-
...
|
|
764
|
-
accountProfile,
|
|
765
|
-
requiredAction: blockedAction.requiredAction,
|
|
766
|
-
nextAction: blockedAction.nextAction,
|
|
767
|
-
nextTool: blockedAction.nextTool,
|
|
768
|
-
missingFields: blockedAction.missingFields,
|
|
705
|
+
profile: projectToolAccountProfile(identityPayload),
|
|
706
|
+
...projectToolAccountIdentityFields(identityPayload),
|
|
769
707
|
pluginVersionStatus: projectToolPluginVersionStatus(identityPayload?.pluginVersionStatus),
|
|
770
708
|
chatRequestApprovalPolicy: projectToolChatRequestApprovalPolicy(identityPayload?.chatRequestApprovalPolicy),
|
|
771
709
|
...(resolvedShareCard !== undefined ? { shareCard: resolvedShareCard } : {}),
|
|
@@ -779,55 +717,19 @@ export function projectToolAccountMutationResponse({
|
|
|
779
717
|
shareCard = undefined,
|
|
780
718
|
runtimeActivation = null,
|
|
781
719
|
} = {}) {
|
|
782
|
-
const publicIdentityState = projectToolAccountIdentityFields(identityPayload);
|
|
783
|
-
const accountProfile = projectToolAccountProfileState(identityPayload);
|
|
784
720
|
const resolvedShareCard = shareCard !== undefined
|
|
785
721
|
? shareCard
|
|
786
722
|
: (identityPayload && Object.prototype.hasOwnProperty.call(identityPayload, 'shareCard')
|
|
787
723
|
? projectToolShareCard(identityPayload.shareCard)
|
|
788
724
|
: undefined);
|
|
789
|
-
const
|
|
790
|
-
const accountProfileReady = accountProfile.ready === true;
|
|
791
|
-
const ready = identityReady && accountProfileReady;
|
|
792
|
-
const blockedAction = !identityReady
|
|
793
|
-
? {
|
|
794
|
-
requiredAction: publicIdentityState.requiredAction,
|
|
795
|
-
nextAction: publicIdentityState.nextAction,
|
|
796
|
-
nextTool: publicIdentityState.nextTool,
|
|
797
|
-
missingFields: publicIdentityState.missingFields,
|
|
798
|
-
reason: 'public_identity_incomplete',
|
|
799
|
-
}
|
|
800
|
-
: !accountProfileReady
|
|
801
|
-
? {
|
|
802
|
-
requiredAction: accountProfile.requiredAction,
|
|
803
|
-
nextAction: accountProfile.nextAction,
|
|
804
|
-
nextTool: accountProfile.nextTool,
|
|
805
|
-
missingFields: accountProfile.missingFields,
|
|
806
|
-
reason: accountProfile.reason,
|
|
807
|
-
}
|
|
808
|
-
: {
|
|
809
|
-
requiredAction: null,
|
|
810
|
-
nextAction: null,
|
|
811
|
-
nextTool: null,
|
|
812
|
-
missingFields: [],
|
|
813
|
-
reason: null,
|
|
814
|
-
};
|
|
725
|
+
const ready = identityPayload?.ready === true;
|
|
815
726
|
return {
|
|
816
727
|
action,
|
|
817
728
|
status: ready ? 'ready' : 'pending',
|
|
818
729
|
ready,
|
|
819
|
-
readiness: identityReady
|
|
820
|
-
? (accountProfileReady ? 'ready' : 'account_profile_incomplete')
|
|
821
|
-
: 'public_identity_incomplete',
|
|
822
730
|
accountId: normalizeText(accountId, null),
|
|
823
|
-
profile:
|
|
824
|
-
...
|
|
825
|
-
accountProfile,
|
|
826
|
-
requiredAction: blockedAction.requiredAction,
|
|
827
|
-
nextAction: blockedAction.nextAction,
|
|
828
|
-
nextTool: blockedAction.nextTool,
|
|
829
|
-
missingFields: blockedAction.missingFields,
|
|
830
|
-
reason: blockedAction.reason,
|
|
731
|
+
profile: projectToolAccountProfile(identityPayload),
|
|
732
|
+
...projectToolAccountIdentityFields(identityPayload),
|
|
831
733
|
pluginVersionStatus: projectToolPluginVersionStatus(identityPayload?.pluginVersionStatus),
|
|
832
734
|
chatRequestApprovalPolicy: projectToolChatRequestApprovalPolicy(identityPayload?.chatRequestApprovalPolicy),
|
|
833
735
|
...(resolvedShareCard !== undefined ? { shareCard: resolvedShareCard } : {}),
|