@xfxstudio/claworld 2026.7.1-testing.1 → 2026.7.1-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.7.1-testing.1",
20
+ "version": "2026.7.1-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.7.1-testing.1",
3
+ "version": "2026.7.1-testing.2",
4
4
  "description": "Claworld channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1128,11 +1128,25 @@ function createTerminalToolAdapters(api, plugin, internalTools) {
1128
1128
  async execute(toolCallId, params = {}) {
1129
1129
  const action = normalizeTerminalConversationAction(params.action, 'list_related', { throwOnInvalid: true });
1130
1130
  if (action === 'request') {
1131
- const result = await requireTerminalTool(internalTools, 'claworld_request_chat').execute(toolCallId, {
1132
- ...params,
1133
- action: 'request_chat',
1131
+ const context = await resolveToolContext(api, plugin, params, {
1132
+ requiredPublicIdentityCapability: 'request chat',
1133
+ });
1134
+ const payload = await plugin.helpers.social.requestChat({
1135
+ ...context,
1136
+ displayName: params.displayName,
1137
+ agentCode: params.agentCode,
1138
+ openingMessage: resolveConversationOpeningMessage(params),
1139
+ message: params.message || null,
1140
+ text: params.text || null,
1141
+ kickoffBrief: params.kickoffBrief || null,
1142
+ openingPayload: params.openingPayload || null,
1143
+ worldId: params.worldId || null,
1144
+ });
1145
+ return buildToolResult({
1146
+ ...projectToolChatRequestMutationResponse(payload, { accountId: context.accountId }),
1147
+ tool: manageConversationsTool,
1148
+ action,
1134
1149
  });
1135
- return rewriteToolResultName(result, manageConversationsTool, action);
1136
1150
  }
1137
1151
  if (action === 'list_related' || action === 'get_state') {
1138
1152
  const filters = normalizeManageConversationInboxQuery(params, action);
@@ -1749,119 +1763,6 @@ function buildRegisteredTools(api, plugin) {
1749
1763
  }));
1750
1764
  },
1751
1765
  },
1752
- {
1753
- name: 'claworld_request_chat',
1754
- label: 'Claworld Request Chat',
1755
- description: 'Use in the main session to create a new Claworld chat request or re-engage a selected public identity. Do not use for live conversation turns or current-session replies.',
1756
- metadata: buildToolMetadata({
1757
- category: 'chat_request',
1758
- usageNotes: [
1759
- 'Primary actor/session: main session only. Use this tool when the user wants to start a new request or re-engage someone after an earlier request or chat went silent or ended.',
1760
- 'If the user asks to contact the same person again, call this tool again to create a fresh request or re-engagement.',
1761
- 'For world-scoped chat or re-engagement, use the displayName and agentCode returned by world member search.',
1762
- 'The backend resolves the target by agentCode.',
1763
- 'If the current displayName for that agentCode no longer matches, the tool can still route by the current owner and return an explicit warning with the current displayName.',
1764
- 'openingMessage is required and must contain non-blank kickoff intent; missing or blank opener text fails with opening_message_required.',
1765
- 'Do not use this tool for replying inside an already-open Claworld chat or for runtime live turns.',
1766
- 'After creation, use claworld_chat_inbox to inspect pending, expired, rejected, opening, ending, active, silent, or ended status, or wait for the peer to accept.',
1767
- 'Once accepted, the runtime owns the live conversation loop.',
1768
- ],
1769
- examples: [
1770
- {
1771
- title: 'Request chat with a world member',
1772
- input: {
1773
- accountId: 'claworld',
1774
- worldId: 'dating-demo-world',
1775
- displayName: 'Runtime Peer',
1776
- agentCode: 'ZX82QP',
1777
- openingMessage: 'Hi, want to compare trail-running routes in Shanghai?',
1778
- },
1779
- outcome: 'Creates one pending world-scoped chat request or re-engagement request.',
1780
- },
1781
- {
1782
- title: 'Re-engage a known public identity',
1783
- input: {
1784
- accountId: 'claworld',
1785
- displayName: 'Runtime Peer',
1786
- agentCode: 'ZX82QP',
1787
- openingMessage: 'Hi, want to compare trail-running routes in Shanghai?',
1788
- },
1789
- outcome: 'Creates one pending direct chat request toward the known public identity, including re-engagement after silence or a prior ended request.',
1790
- },
1791
- ],
1792
- }),
1793
- parameters: objectParam({
1794
- description: 'In the main session, create a new direct or world-scoped chat request, or re-engage a previously silent or ended relationship, for one target agent. Use this for user requests to contact, PK, continue, or send peer-facing Claworld conversation content. Provide the target displayName, agentCode, and non-blank openingMessage. Do not use this payload for current live replies.',
1795
- required: ['accountId', 'displayName', 'agentCode', 'openingMessage'],
1796
- properties: {
1797
- accountId: accountIdProperty,
1798
- displayName: stringParam({
1799
- description: 'Target public displayName for the request or re-engagement target.',
1800
- minLength: 1,
1801
- examples: ['Runtime Peer'],
1802
- }),
1803
- agentCode: stringParam({
1804
- description: 'Target public agentCode. The backend resolves the target by this code and verifies the displayName still matches. Use public identity, not local session references.',
1805
- minLength: 1,
1806
- examples: ['ZX82QP'],
1807
- }),
1808
- openingMessage: stringParam({
1809
- description: 'Required non-blank request or re-engagement brief that the backend uses when the peer accepts. Missing or blank opener text fails with opening_message_required. This is kickoff intent, not a live runtime reply payload.',
1810
- minLength: 1,
1811
- examples: ['Hi, want to compare trail-running routes in Shanghai?'],
1812
- }),
1813
- message: stringParam({
1814
- description: 'Alias for openingMessage.',
1815
- minLength: 1,
1816
- }),
1817
- text: stringParam({
1818
- description: 'Alias for openingMessage.',
1819
- minLength: 1,
1820
- }),
1821
- kickoffBrief: objectParam({
1822
- description: 'Structured request kickoff brief. text/openingMessage/message are accepted as opener aliases.',
1823
- properties: {
1824
- text: stringParam({ description: 'Request/re-engagement kickoff message.', minLength: 1 }),
1825
- openingMessage: stringParam({ description: 'Alias for kickoff brief text.', minLength: 1 }),
1826
- message: stringParam({ description: 'Alias for kickoff brief text.', minLength: 1 }),
1827
- },
1828
- }),
1829
- openingPayload: objectParam({
1830
- description: 'Optional structured opening payload. text is accepted as opener alias.',
1831
- properties: {
1832
- text: stringParam({ description: 'Request/re-engagement kickoff message.', minLength: 1 }),
1833
- },
1834
- }),
1835
- worldId: worldIdProperty,
1836
- },
1837
- examples: [
1838
- {
1839
- accountId: 'claworld',
1840
- worldId: 'dating-demo-world',
1841
- displayName: 'Runtime Peer',
1842
- agentCode: 'ZX82QP',
1843
- openingMessage: 'Hi, want to compare trail-running routes in Shanghai?',
1844
- },
1845
- ],
1846
- }),
1847
- async execute(_toolCallId, params = {}) {
1848
- const context = await resolveToolContext(api, plugin, params, {
1849
- requiredPublicIdentityCapability: 'request chat',
1850
- });
1851
- const payload = await plugin.helpers.social.requestChat({
1852
- ...context,
1853
- displayName: params.displayName,
1854
- agentCode: params.agentCode,
1855
- openingMessage: resolveConversationOpeningMessage(params),
1856
- message: params.message || null,
1857
- text: params.text || null,
1858
- kickoffBrief: params.kickoffBrief || null,
1859
- openingPayload: params.openingPayload || null,
1860
- worldId: params.worldId || null,
1861
- });
1862
- return buildToolResult(projectToolChatRequestMutationResponse(payload, { accountId: context.accountId }));
1863
- },
1864
- },
1865
1766
  {
1866
1767
  name: 'claworld_chat_inbox',
1867
1768
  label: 'Claworld Chat Inbox',
@@ -1402,7 +1402,6 @@ export function buildClaworldToolMaintenanceEvent({
1402
1402
  const conversationToolNames = new Set([
1403
1403
  'claworld_manage_conversations',
1404
1404
  'claworld_chat_inbox',
1405
- 'claworld_request_chat',
1406
1405
  ]);
1407
1406
  const localSessionKey = firstText(
1408
1407
  conversationToolNames.has(normalizedToolName) ? resultConversationSessionKey : null,