openclaw-openagent 1.0.13 → 1.0.14

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 (128) hide show
  1. package/dist/src/messaging/executor.d.ts +2 -3
  2. package/dist/src/messaging/executor.js +4 -31
  3. package/dist/src/plugin-ui/assets/openagent-override.js +4 -5
  4. package/dist/src/runtime/update-checker.d.ts +1 -1
  5. package/dist/src/runtime/update-checker.js +9 -46
  6. package/package.json +1 -3
  7. package/src/app/channel-tools.ts +0 -249
  8. package/src/app/discovery-tools.ts +0 -273
  9. package/src/app/download-file-tool.ts +0 -133
  10. package/src/app/hooks.ts +0 -144
  11. package/src/app/index.ts +0 -84
  12. package/src/app/messaging-tools.ts +0 -79
  13. package/src/app/ops-tools.ts +0 -155
  14. package/src/app/remote-agent-tool.ts +0 -762
  15. package/src/app/types.ts +0 -68
  16. package/src/app/upload-file-tool.ts +0 -411
  17. package/src/app/verbose-preflight.ts +0 -190
  18. package/src/auth/config.ts +0 -266
  19. package/src/auth/credential-manager.ts +0 -146
  20. package/src/auth/index.ts +0 -24
  21. package/src/auth/verify.ts +0 -99
  22. package/src/channel.ts +0 -566
  23. package/src/compat.ts +0 -94
  24. package/src/config/config-schema.ts +0 -45
  25. package/src/messaging/aggregator.ts +0 -120
  26. package/src/messaging/collector.ts +0 -89
  27. package/src/messaging/executor.ts +0 -72
  28. package/src/messaging/inbound.ts +0 -150
  29. package/src/messaging/index.ts +0 -11
  30. package/src/messaging/mention-protocol.ts +0 -94
  31. package/src/messaging/process-c2c-request.ts +0 -564
  32. package/src/messaging/process-message.ts +0 -373
  33. package/src/messaging/scheduler.ts +0 -55
  34. package/src/messaging/types.ts +0 -38
  35. package/src/plugin-ui/adapters/oc-2026-04.js +0 -103
  36. package/src/plugin-ui/adapters/oc-2026-05.js +0 -125
  37. package/src/plugin-ui/adapters/oc-2026-06.js +0 -125
  38. package/src/plugin-ui/adapters/oc-unknown.js +0 -48
  39. package/src/plugin-ui/assets/agentbook-icon.svg +0 -5
  40. package/src/plugin-ui/assets/bg.png +0 -0
  41. package/src/plugin-ui/assets/icon.png +0 -0
  42. package/src/plugin-ui/assets/magic.svg +0 -5
  43. package/src/plugin-ui/assets/openagent-override.js +0 -11263
  44. package/src/plugin-ui/build.cjs +0 -463
  45. package/src/plugin-ui/index.ts +0 -18
  46. package/src/plugin-ui/modules/agent-book/panel/agent-book.js +0 -570
  47. package/src/plugin-ui/modules/agent-book/panel/agent-card.js +0 -170
  48. package/src/plugin-ui/modules/agent-book/panel/agent-data.js +0 -643
  49. package/src/plugin-ui/modules/agent-book/panel/inject-ui.js +0 -665
  50. package/src/plugin-ui/modules/agent-book/panel/mention-state.js +0 -206
  51. package/src/plugin-ui/modules/agent-book/panel/styles.js +0 -832
  52. package/src/plugin-ui/modules/agent-book/panel/theme-adapter.js +0 -86
  53. package/src/plugin-ui/modules/agent-book/remote-agent-tool/components-core.js +0 -295
  54. package/src/plugin-ui/modules/agent-book/remote-agent-tool/thought-chain-card.js +0 -211
  55. package/src/plugin-ui/modules/agent-book/scanner.js +0 -131
  56. package/src/plugin-ui/modules/agent-book/travelcard/travel-cards.js +0 -500
  57. package/src/plugin-ui/modules/agent-book/travelcard/travel-engine.js +0 -652
  58. package/src/plugin-ui/modules/agent-book/travelcard/travel-styles.js +0 -262
  59. package/src/plugin-ui/modules/loader/bootstrap.js +0 -133
  60. package/src/plugin-ui/modules/loader/shared-state.js +0 -838
  61. package/src/plugin-ui/modules/loader/ws-intercept.js +0 -199
  62. package/src/plugin-ui/modules/remote-agent/chunk-parser.js +0 -161
  63. package/src/plugin-ui/modules/remote-agent/execution-card.js +0 -530
  64. package/src/plugin-ui/modules/remote-agent/markdown-renderer.js +0 -256
  65. package/src/plugin-ui/modules/remote-agent/media-links.js +0 -151
  66. package/src/plugin-ui/modules/remote-agent/native-style-adapter.js +0 -134
  67. package/src/plugin-ui/modules/remote-agent/output-card.js +0 -342
  68. package/src/plugin-ui/modules/remote-agent/progress-store.js +0 -363
  69. package/src/plugin-ui/modules/remote-agent/render-hooks.js +0 -1700
  70. package/src/plugin-ui/modules/remote-agent/styles.js +0 -903
  71. package/src/plugin-ui/modules/remote-agent/tool-card-model.js +0 -130
  72. package/src/plugin-ui/postinstall-deploy.cjs +0 -52
  73. package/src/plugin-ui/ui-extension-loader/backup.ts +0 -92
  74. package/src/plugin-ui/ui-extension-loader/index.ts +0 -276
  75. package/src/plugin-ui/ui-extension-loader/locator.ts +0 -152
  76. package/src/plugin-ui/ui-extension-loader/manifest.ts +0 -57
  77. package/src/plugin-ui/ui-extension-loader/registry-regex.ts +0 -944
  78. package/src/plugin-ui/ui-extension-loader/removed-extensions.ts +0 -70
  79. package/src/plugin-ui/ui-extension-loader/types.ts +0 -72
  80. package/src/proxy/auth-proxy.ts +0 -414
  81. package/src/runtime/account.ts +0 -549
  82. package/src/runtime/index.ts +0 -7
  83. package/src/runtime/plugin-runtime.ts +0 -94
  84. package/src/runtime/registry.ts +0 -71
  85. package/src/runtime/update-checker.ts +0 -286
  86. package/src/sdk/CLASS_MAP.md +0 -143
  87. package/src/sdk/index.d.ts +0 -126
  88. package/src/sdk/index.js +0 -23990
  89. package/src/sdk/modules/cloud-search-module.js +0 -1117
  90. package/src/sdk/modules/follow-module.js +0 -1069
  91. package/src/sdk/modules/group-module.js +0 -7397
  92. package/src/sdk/modules/relationship-module.js +0 -2269
  93. package/src/sdk/modules/signaling-module.js +0 -1468
  94. package/src/sdk/modules/tim-upload-plugin.js +0 -730
  95. package/src/sdk/node-env/http-request.js +0 -90
  96. package/src/sdk/node-env/index.js +0 -57
  97. package/src/sdk/node-env/storage.js +0 -114
  98. package/src/sdk/package.json +0 -10
  99. package/src/sdk/tsconfig.json +0 -16
  100. package/src/state/pending-invocation-store.ts +0 -43
  101. package/src/state/store.ts +0 -756
  102. package/src/tim/c2c.ts +0 -451
  103. package/src/tim/channels.ts +0 -364
  104. package/src/tim/client.ts +0 -330
  105. package/src/tim/index.ts +0 -18
  106. package/src/tim/messages.ts +0 -166
  107. package/src/tim/sdk-logger-init.ts +0 -50
  108. package/src/tools.ts +0 -10
  109. package/src/transport/factory.ts +0 -95
  110. package/src/transport/oasn/index.ts +0 -17
  111. package/src/transport/oasn/oasn-agent-card.ts +0 -111
  112. package/src/transport/oasn/oasn-discovery.ts +0 -108
  113. package/src/transport/oasn/oasn-files.ts +0 -210
  114. package/src/transport/oasn/oasn-http.ts +0 -529
  115. package/src/transport/oasn/oasn-invocation.ts +0 -604
  116. package/src/transport/oasn/oasn-normalize.ts +0 -133
  117. package/src/transport/oasn/oasn-register.ts +0 -33
  118. package/src/transport/oasn/oasn-transport.ts +0 -318
  119. package/src/transport/oasn/oasn-types.ts +0 -404
  120. package/src/transport/tim/index.ts +0 -8
  121. package/src/transport/tim/tim-transport.ts +0 -515
  122. package/src/transport/types.ts +0 -538
  123. package/src/types/openclaw-plugin-sdk-media-store.d.ts +0 -9
  124. package/src/types/openclaw.d.ts +0 -97
  125. package/src/types/tencentcloud-chat.d.ts +0 -15
  126. package/src/util/http.ts +0 -113
  127. package/src/util/logger.ts +0 -131
  128. package/src/util/url-resolver.ts +0 -77
@@ -1,79 +0,0 @@
1
- /**
2
- * Messaging Tools — 4 message-related tools
3
- *
4
- * send_message, get_messages, set_channel_skill, get_channel_skill
5
- * Note: skill tools are in channel-tools.ts since they manage channel metadata
6
- *
7
- * This file contains: send_message, get_messages
8
- */
9
-
10
- import { registry } from '../runtime/registry.js';
11
- import { logger } from '../util/logger.js';
12
- import { toolResult, type ToolDescriptor, type ToolParams, type ToolResult } from './types.js';
13
-
14
- function fail(error: string): ToolResult {
15
- return toolResult(JSON.stringify({ success: false, error }));
16
- }
17
-
18
- function getRuntime() {
19
- const rt = registry.getDefault();
20
- if (!rt || !rt.isRunning) return null;
21
- return rt;
22
- }
23
-
24
- export function createSendMessageTool(): ToolDescriptor {
25
- return {
26
- name: 'openagent_send_message',
27
- label: 'Send OpenAgent Message',
28
- description: 'Send a text message to a channel',
29
- parameters: {
30
- type: 'object',
31
- properties: {
32
- channelId: { type: 'string', description: 'Channel ID' },
33
- text: { type: 'string', description: 'Message text' },
34
- },
35
- required: ['channelId', 'text'],
36
- },
37
- async execute(_id: unknown, params: ToolParams) {
38
- const rt = getRuntime();
39
- if (!rt) return fail('Not connected');
40
- try {
41
- const result = await rt.sendMessage(String(params.channelId), String(params.text));
42
- if (rt.store) {
43
- rt.store.updateLastReply(String(params.channelId));
44
- }
45
- return toolResult(JSON.stringify({ success: true, messageId: result.messageId }));
46
- } catch (err) {
47
- return fail((err as Error).message);
48
- }
49
- },
50
- };
51
- }
52
-
53
- export function createGetMessagesTool(): ToolDescriptor {
54
- return {
55
- name: 'openagent_get_messages',
56
- label: 'Get Channel Messages',
57
- description: 'Get recent messages from a channel (must join channel first)',
58
- parameters: {
59
- type: 'object',
60
- properties: {
61
- channelId: { type: 'string', description: 'Channel ID' },
62
- count: { type: 'integer', description: 'Number of messages (default 15)' },
63
- },
64
- required: ['channelId'],
65
- },
66
- async execute(_id: unknown, params: ToolParams) {
67
- const rt = getRuntime();
68
- if (!rt) return fail('Not connected');
69
- try {
70
- const count = (params.count as number) || 15;
71
- const messages = await rt.fetchMessages(String(params.channelId), count);
72
- return toolResult(JSON.stringify({ success: true, messages }));
73
- } catch (err) {
74
- logger.error(`[tools] getMessages error: ${(err as Error).message}`);
75
- return fail((err as Error).message);
76
- }
77
- },
78
- };
79
- }
@@ -1,155 +0,0 @@
1
- /**
2
- * Ops Tools — 4 operational tools
3
- *
4
- * set_strategy, get_status, set_purpose, get_purpose
5
- *
6
- * Contract ref: §0.2 refactoring-plan.md
7
- */
8
-
9
- import { registry } from '../runtime/registry.js';
10
- import { toolResult, type ToolDescriptor, type ToolResult } from './types.js';
11
-
12
- function fail(error: string): ToolResult {
13
- return toolResult(JSON.stringify({ success: false, error }));
14
- }
15
-
16
- function getRuntime() {
17
- const rt = registry.getDefault();
18
- if (!rt || !rt.isRunning) return null;
19
- return rt;
20
- }
21
-
22
- export function createSetStrategyTool(): ToolDescriptor {
23
- return {
24
- name: 'openagent_set_strategy',
25
- label: 'Set Message Strategy',
26
- description: 'Configure how you receive and respond to channel messages. Changes take effect immediately.',
27
- parameters: {
28
- type: 'object',
29
- properties: {
30
- batchWindowMs: { type: 'integer', description: 'How long to collect messages before processing (ms, default 20000)' },
31
- maxBatchSize: { type: 'integer', description: 'Max messages to buffer before forced flush (default 20)' },
32
- },
33
- required: [],
34
- },
35
- async execute(_id, params) {
36
- const rt = getRuntime();
37
- if (!rt) return fail('Not connected');
38
- try {
39
- const newConfig: { batchWindowMs?: number; maxBatchSize?: number } = {};
40
- if (params?.batchWindowMs != null) newConfig.batchWindowMs = Number(params.batchWindowMs);
41
- if (params?.maxBatchSize != null) newConfig.maxBatchSize = Number(params.maxBatchSize);
42
- const current = rt.updateStrategy(newConfig);
43
- return toolResult(JSON.stringify({
44
- success: true,
45
- batchWindowMs: current.batchWindowMs,
46
- maxBatchSize: current.maxBatchSize,
47
- }));
48
- } catch (err) {
49
- return fail((err as Error).message);
50
- }
51
- },
52
- };
53
- }
54
-
55
- /**
56
- * get_status — frozen return shape per §0.2:
57
- *
58
- * {
59
- * success, connected, agentId,
60
- * schedulerQueueSize, joinedChannels,
61
- * channels: [{ id, name, lastVisit, lastReply, lastMsgSeq }]
62
- * }
63
- */
64
- export function createGetStatusTool(): ToolDescriptor {
65
- return {
66
- name: 'openagent_get_status',
67
- label: 'Get OpenAgent Status',
68
- description: 'Get current status of the OpenAgent connection and channel state',
69
- parameters: { type: 'object', properties: {}, required: [] },
70
- async execute() {
71
- const rt = getRuntime();
72
- if (!rt) {
73
- return fail('OpenAgent is not running');
74
- }
75
- try {
76
- const joined = rt.store?.getJoinedChannels() || [];
77
- return toolResult(JSON.stringify({
78
- success: true,
79
- connected: rt.client?.isReady ?? false,
80
- agentId: rt.client?.agentId ?? '',
81
- schedulerQueueSize: rt.schedulerQueueSize,
82
- joinedChannels: joined.length,
83
- channels: joined.map((c: { channel_id: string; channel_name: string; last_visit: number; last_reply: number; last_msg_seq: number }) => ({
84
- id: c.channel_id,
85
- name: c.channel_name,
86
- lastVisit: c.last_visit ? new Date(c.last_visit).toISOString() : 'never',
87
- lastReply: c.last_reply ? new Date(c.last_reply).toISOString() : 'never',
88
- lastMsgSeq: c.last_msg_seq,
89
- })),
90
- }));
91
- } catch (err) {
92
- return fail((err as Error).message);
93
- }
94
- },
95
- };
96
- }
97
-
98
- export function createSetPurposeTool(): ToolDescriptor {
99
- return {
100
- name: 'openagent_set_purpose',
101
- label: 'Set Channel Purpose',
102
- description: 'Set or update your purpose/goal for a channel',
103
- parameters: {
104
- type: 'object',
105
- properties: {
106
- channelId: { type: 'string', description: 'Channel ID' },
107
- purpose: { type: 'string', description: 'Your purpose/goal for this channel' },
108
- },
109
- required: ['channelId', 'purpose'],
110
- },
111
- async execute(_id, params) {
112
- const rt = getRuntime();
113
- if (!rt?.store) return fail('Not connected');
114
- try {
115
- rt.store.setPurpose(String(params.channelId), String(params.purpose));
116
- return toolResult(JSON.stringify({
117
- success: true,
118
- channelId: params.channelId,
119
- purpose: params.purpose,
120
- }));
121
- } catch (err) {
122
- return fail((err as Error).message);
123
- }
124
- },
125
- };
126
- }
127
-
128
- export function createGetPurposeTool(): ToolDescriptor {
129
- return {
130
- name: 'openagent_get_purpose',
131
- label: 'Get Channel Purpose',
132
- description: 'Get your current purpose/goal for a channel',
133
- parameters: {
134
- type: 'object',
135
- properties: {
136
- channelId: { type: 'string', description: 'Channel ID' },
137
- },
138
- required: ['channelId'],
139
- },
140
- async execute(_id, params) {
141
- const rt = getRuntime();
142
- if (!rt?.store) return fail('Not connected');
143
- try {
144
- const purpose = rt.store.getPurpose(String(params.channelId));
145
- return toolResult(JSON.stringify({
146
- success: true,
147
- channelId: params.channelId,
148
- purpose: purpose || '(no purpose set)',
149
- }));
150
- } catch (err) {
151
- return fail((err as Error).message);
152
- }
153
- },
154
- };
155
- }