@xfxstudio/claworld 2026.4.14-testing.1 → 2026.4.16-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.
Files changed (47) hide show
  1. package/openclaw.plugin.json +1 -1
  2. package/package.json +1 -1
  3. package/index.js +0 -50
  4. package/setup-entry.js +0 -6
  5. package/skills/claworld-a2a-channel-agent/SKILL.md +0 -218
  6. package/skills/claworld-help/SKILL.md +0 -304
  7. package/skills/claworld-join-and-chat/SKILL.md +0 -515
  8. package/skills/claworld-manage-worlds/SKILL.md +0 -283
  9. package/skills/claworld-manage-worlds/references/world-context-templates.md +0 -145
  10. package/src/lib/chat-request.js +0 -366
  11. package/src/lib/public-identity.js +0 -175
  12. package/src/lib/relay/agent-readable-markdown.js +0 -385
  13. package/src/lib/relay/kickoff-progress.js +0 -162
  14. package/src/lib/relay/kickoff-text.js +0 -191
  15. package/src/lib/relay/shared.js +0 -30
  16. package/src/lib/runtime-errors.js +0 -149
  17. package/src/openclaw/index.js +0 -51
  18. package/src/openclaw/plugin/account-identity.js +0 -73
  19. package/src/openclaw/plugin/claworld-channel-plugin.js +0 -3483
  20. package/src/openclaw/plugin/config-schema.js +0 -392
  21. package/src/openclaw/plugin/lifecycle.js +0 -114
  22. package/src/openclaw/plugin/managed-config.js +0 -1054
  23. package/src/openclaw/plugin/onboarding.js +0 -312
  24. package/src/openclaw/plugin/register-tooling.js +0 -728
  25. package/src/openclaw/plugin/register.js +0 -1609
  26. package/src/openclaw/plugin/relay-client-shared.js +0 -146
  27. package/src/openclaw/plugin/relay-client.js +0 -1469
  28. package/src/openclaw/plugin/runtime-backup.js +0 -105
  29. package/src/openclaw/plugin/runtime.js +0 -12
  30. package/src/openclaw/plugin-version.js +0 -67
  31. package/src/openclaw/protocol/relay-event-protocol.js +0 -43
  32. package/src/openclaw/runtime/backend-error-context.js +0 -91
  33. package/src/openclaw/runtime/canonical-result-builder.js +0 -126
  34. package/src/openclaw/runtime/demo-session-bootstrap.js +0 -32
  35. package/src/openclaw/runtime/feedback-helper.js +0 -145
  36. package/src/openclaw/runtime/inbound-session-router.js +0 -44
  37. package/src/openclaw/runtime/outbound-session-bridge.js +0 -29
  38. package/src/openclaw/runtime/product-shell-helper.js +0 -931
  39. package/src/openclaw/runtime/runtime-path.js +0 -19
  40. package/src/openclaw/runtime/system-message-orchestrator.js +0 -1
  41. package/src/openclaw/runtime/tool-contracts.js +0 -939
  42. package/src/openclaw/runtime/tool-inventory.js +0 -83
  43. package/src/openclaw/runtime/world-membership-helper.js +0 -320
  44. package/src/openclaw/runtime/world-moderation-helper.js +0 -508
  45. package/src/product-shell/contracts/chat-request-approval-policy.js +0 -93
  46. package/src/product-shell/contracts/world-orchestration.js +0 -734
  47. package/src/product-shell/orchestration/world-conversation-text.js +0 -229
@@ -1,146 +0,0 @@
1
- import { createRuntimeBoundaryError } from '../../lib/runtime-errors.js';
2
-
3
- export const DUPLICATE_CONNECTION_CLOSE_CODE = 4001;
4
- export const STALE_CONNECTION_CLOSE_CODE = 4002;
5
- export const TERMINAL_CLOSE_REASONS = new Set(['duplicate_connection_replaced', 'stale_connection']);
6
- export const DEFAULT_REPLY_ACK_TIMEOUT_MS = 5000;
7
-
8
- export function normalizeRelayWebSocketUrl(serverUrl) {
9
- const parsed = new URL(serverUrl);
10
- if (parsed.protocol === 'http:') parsed.protocol = 'ws:';
11
- if (parsed.protocol === 'https:') parsed.protocol = 'wss:';
12
-
13
- const pathname = parsed.pathname || '/';
14
- const normalizedPathname = pathname.replace(/\/+$/, '') || '/';
15
- parsed.pathname = normalizedPathname === '/' || normalizedPathname === ''
16
- ? '/ws'
17
- : normalizedPathname.endsWith('/ws')
18
- ? normalizedPathname
19
- : normalizedPathname + '/ws';
20
-
21
- return parsed.toString();
22
- }
23
-
24
- export function buildInboundEnvelope(message = {}) {
25
- const data = message.data || {};
26
- if (message.event !== 'delivery') return null;
27
- const metadata = data.metadata && typeof data.metadata === 'object' && !Array.isArray(data.metadata)
28
- ? { ...data.metadata }
29
- : {};
30
- return {
31
- eventType: data.eventType || 'delivery',
32
- deliveryId: data.deliveryId || null,
33
- sessionKey: data.sessionKey || null,
34
- createdAt: data.createdAt || null,
35
- updatedAt: data.updatedAt || null,
36
- turnCreatedAt: data.turnCreatedAt || null,
37
- payload: data.payload && typeof data.payload === 'object' && !Array.isArray(data.payload)
38
- ? { ...data.payload }
39
- : {},
40
- metadata,
41
- };
42
- }
43
-
44
- export function normalizeOptionalText(value) {
45
- if (value == null) return null;
46
- const normalized = String(value).trim();
47
- return normalized || null;
48
- }
49
-
50
- export function requireClientMessageId(value = null) {
51
- const normalized = normalizeOptionalText(value);
52
- if (!normalized) {
53
- throw new Error('claworld relay clientMessageId is required for POST /v1/messages');
54
- }
55
- return normalized;
56
- }
57
-
58
- export function buildReplyAckTimeoutError({ deliveryId, timeoutMs, context = {} } = {}) {
59
- return createRuntimeBoundaryError({
60
- code: 'relay_reply_ack_timeout',
61
- category: 'transport',
62
- status: 504,
63
- message: `timed out waiting for relay reply acknowledgement for ${deliveryId || 'unknown-delivery'} after ${timeoutMs}ms`,
64
- publicMessage: 'relay reply acknowledgement timed out',
65
- recoverable: true,
66
- context,
67
- });
68
- }
69
-
70
- export function buildAcceptedAckTimeoutError({ deliveryId, timeoutMs, context = {} } = {}) {
71
- return createRuntimeBoundaryError({
72
- code: 'relay_delivery_accept_ack_timeout',
73
- category: 'transport',
74
- status: 504,
75
- message: `timed out waiting for relay delivery acceptance acknowledgement for ${deliveryId || 'unknown-delivery'} after ${timeoutMs}ms`,
76
- publicMessage: 'relay delivery acceptance acknowledgement timed out',
77
- recoverable: true,
78
- context,
79
- });
80
- }
81
-
82
- export function buildReplyFallbackError({
83
- deliveryId = null,
84
- status = 502,
85
- body = {},
86
- context = {},
87
- } = {}) {
88
- return createRuntimeBoundaryError({
89
- code: normalizeOptionalText(body?.code) || normalizeOptionalText(body?.error) || 'relay_reply_fallback_failed',
90
- category: status >= 500 ? 'runtime' : 'transport',
91
- status: Number.isInteger(status) ? status : 502,
92
- message: normalizeOptionalText(body?.message) || normalizeOptionalText(body?.reason) || 'relay reply fallback failed',
93
- publicMessage: 'relay reply fallback failed',
94
- recoverable: status >= 500,
95
- context: {
96
- deliveryId: normalizeOptionalText(deliveryId),
97
- ...context,
98
- },
99
- });
100
- }
101
-
102
- export function buildKeepSilentAckTimeoutError({ deliveryId, timeoutMs, context = {} } = {}) {
103
- return createRuntimeBoundaryError({
104
- code: 'relay_kept_silent_ack_timeout',
105
- category: 'transport',
106
- status: 504,
107
- message: `timed out waiting for relay kept_silent acknowledgement for ${deliveryId || 'unknown-delivery'} after ${timeoutMs}ms`,
108
- publicMessage: 'relay kept_silent acknowledgement timed out',
109
- recoverable: true,
110
- context,
111
- });
112
- }
113
-
114
- export function buildKeepSilentFallbackError({
115
- deliveryId = null,
116
- status = 502,
117
- body = {},
118
- context = {},
119
- } = {}) {
120
- return createRuntimeBoundaryError({
121
- code: normalizeOptionalText(body?.code) || normalizeOptionalText(body?.error) || 'relay_kept_silent_fallback_failed',
122
- category: status >= 500 ? 'runtime' : 'transport',
123
- status: Number.isInteger(status) ? status : 502,
124
- message: normalizeOptionalText(body?.message) || normalizeOptionalText(body?.reason) || 'relay kept_silent fallback failed',
125
- publicMessage: 'relay kept_silent fallback failed',
126
- recoverable: status >= 500,
127
- context: {
128
- deliveryId: normalizeOptionalText(deliveryId),
129
- ...context,
130
- },
131
- });
132
- }
133
-
134
- export function isReplyAlreadyApplied(result = null, deliveryId = null) {
135
- if (!result || result.status !== 409) return false;
136
- if (normalizeOptionalText(result.body?.reason) !== 'delivery_not_replyable') return false;
137
- if (normalizeOptionalText(result.body?.delivery?.deliveryId) !== normalizeOptionalText(deliveryId)) return false;
138
- return normalizeOptionalText(result.body?.delivery?.status) === 'replied';
139
- }
140
-
141
- export function isDeliveryKeptSilentAlreadyApplied(result = null, deliveryId = null) {
142
- if (!result || result.status !== 409) return false;
143
- if (normalizeOptionalText(result.body?.reason) !== 'delivery_not_replyable') return false;
144
- if (normalizeOptionalText(result.body?.delivery?.deliveryId) !== normalizeOptionalText(deliveryId)) return false;
145
- return normalizeOptionalText(result.body?.delivery?.status) === 'kept_silent';
146
- }