@xfxstudio/claworld 2026.5.25-testing.1 → 2026.5.25-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.
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "name": "Claworld Persona Relay",
19
19
  "description": "Claworld relay world channel plugin for OpenClaw.",
20
- "version": "2026.5.25-testing.1",
20
+ "version": "2026.5.25-testing.2",
21
21
  "configSchema": {
22
22
  "type": "object",
23
23
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xfxstudio/claworld",
3
- "version": "2026.5.25-testing.1",
3
+ "version": "2026.5.25-testing.2",
4
4
  "description": "Claworld channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -3939,12 +3939,20 @@ async function generateRuntimeProfileCard(context = {}) {
3939
3939
  },
3940
3940
  publicProfiles: {
3941
3941
  getPublicProfile: async (context = {}) => {
3942
- const resolvedContext = await resolveBoundRuntimeContext(context);
3942
+ const targetAgentId = normalizeClaworldText(
3943
+ context.targetAgentId,
3944
+ normalizeClaworldText(context.profileAgentId, normalizeClaworldText(context.agentId, null)),
3945
+ );
3946
+ const runtimeContext = { ...context };
3947
+ delete runtimeContext.agentId;
3948
+ delete runtimeContext.targetAgentId;
3949
+ delete runtimeContext.profileAgentId;
3950
+ const resolvedContext = await resolveBoundRuntimeContext(runtimeContext);
3943
3951
  return getPublicProfile({
3944
3952
  cfg: resolvedContext.cfg || {},
3945
3953
  accountId: resolvedContext.accountId || null,
3946
3954
  runtimeConfig: resolvedContext.runtimeConfig || null,
3947
- agentId: context.agentId || resolvedContext.agentId || null,
3955
+ agentId: targetAgentId || resolvedContext.agentId || null,
3948
3956
  viewerAgentId: resolvedContext.agentId || null,
3949
3957
  fetchImpl,
3950
3958
  logger,
@@ -4294,12 +4302,20 @@ async function generateRuntimeProfileCard(context = {}) {
4294
4302
  },
4295
4303
  publicProfiles: {
4296
4304
  getPublicProfile: async (context = {}) => {
4297
- const resolvedContext = await resolveBoundRuntimeContext(context);
4305
+ const targetAgentId = normalizeClaworldText(
4306
+ context.targetAgentId,
4307
+ normalizeClaworldText(context.profileAgentId, normalizeClaworldText(context.agentId, null)),
4308
+ );
4309
+ const runtimeContext = { ...context };
4310
+ delete runtimeContext.agentId;
4311
+ delete runtimeContext.targetAgentId;
4312
+ delete runtimeContext.profileAgentId;
4313
+ const resolvedContext = await resolveBoundRuntimeContext(runtimeContext);
4298
4314
  return getPublicProfile({
4299
4315
  cfg: resolvedContext.cfg || {},
4300
4316
  accountId: resolvedContext.accountId || null,
4301
4317
  runtimeConfig: resolvedContext.runtimeConfig || null,
4302
- agentId: context.agentId || resolvedContext.agentId || null,
4318
+ agentId: targetAgentId || resolvedContext.agentId || null,
4303
4319
  viewerAgentId: resolvedContext.agentId || null,
4304
4320
  fetchImpl,
4305
4321
  logger,
@@ -764,6 +764,10 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
764
764
  examples: ['Runtime Peer#ZX82QP'],
765
765
  }),
766
766
  agentId: stringParam({
767
+ description: 'Optional target agent id alias for action=get_profile; prefer targetAgentId when available.',
768
+ minLength: 1,
769
+ }),
770
+ targetAgentId: stringParam({
767
771
  description: 'Optional target agent id for action=get_profile; defaults to the current account binding.',
768
772
  minLength: 1,
769
773
  }),
@@ -795,7 +799,10 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
795
799
  if (!['get_profile', 'lookup_profile'].includes(action)) {
796
800
  requireManageWorldField('action', 'action must be one of get_profile or lookup_profile');
797
801
  }
798
- const context = await resolveToolContext(api, plugin, params);
802
+ const context = await resolveToolContext(api, plugin, {
803
+ ...params,
804
+ agentId: undefined,
805
+ });
799
806
  const lookupIdentity = normalizeText(
800
807
  params.identity,
801
808
  params.displayName && params.agentCode ? `${params.displayName}#${params.agentCode}` : null,
@@ -810,7 +817,10 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
810
817
  })
811
818
  : await plugin.runtime.productShell.publicProfiles.getPublicProfile({
812
819
  ...context,
813
- agentId: normalizeText(params.agentId, context.agentId),
820
+ targetAgentId: normalizeText(
821
+ params.targetAgentId,
822
+ normalizeText(params.agentId, context.agentId),
823
+ ),
814
824
  });
815
825
  return buildTerminalActionResult({ tool: publicProfileTool, action, payload });
816
826
  },