@openclaw-cloud/agent-controller 2.4.0 → 3.0.0-beta.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/dist/config-file.js +0 -1
- package/dist/config-file.js.map +1 -1
- package/dist/config.d.ts +0 -7
- package/dist/config.js +2 -11
- package/dist/config.js.map +1 -1
- package/dist/connection.js +4 -1
- package/dist/connection.js.map +1 -1
- package/dist/handlers/chat.d.ts +1 -0
- package/dist/handlers/chat.js +40 -3
- package/dist/handlers/chat.js.map +1 -1
- package/dist/heartbeat.d.ts +1 -2
- package/dist/heartbeat.js +0 -1
- package/dist/heartbeat.js.map +1 -1
- package/dist/index.d.ts +0 -16
- package/dist/index.js +1 -137
- package/dist/index.js.map +1 -1
- package/dist/providers/claude-code/index.d.ts +1 -1
- package/dist/providers/claude-code/index.js +1 -1
- package/dist/providers/claude-code/index.js.map +1 -1
- package/dist/providers/openclaw/gateway-adapter.d.ts +1 -0
- package/dist/providers/openclaw/gateway-adapter.js +7 -0
- package/dist/providers/openclaw/gateway-adapter.js.map +1 -1
- package/dist/providers/openclaw/index.d.ts +1 -0
- package/dist/providers/openclaw/index.js +6 -0
- package/dist/providers/openclaw/index.js.map +1 -1
- package/dist/providers/types.d.ts +2 -0
- package/dist/types.d.ts +1 -79
- package/dist/types.js +0 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/openclaw-ops.js +1 -1
- package/dist/utils/openclaw-ops.js.map +1 -1
- package/package.json +1 -1
- package/dist/handlers/board-handler.d.ts +0 -43
- package/dist/handlers/board-handler.js +0 -377
- package/dist/handlers/board-handler.js.map +0 -1
- package/dist/mcp-client.d.ts +0 -64
- package/dist/mcp-client.js +0 -179
- package/dist/mcp-client.js.map +0 -1
- package/dist/skills/index.d.ts +0 -1
- package/dist/skills/index.js +0 -2
- package/dist/skills/index.js.map +0 -1
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
import { getProvider } from '../providers/index.js';
|
|
2
|
-
import { ClaudeCodeProvider } from '../providers/claude-code/index.js';
|
|
3
|
-
import { toErrorMessage } from '../utils/response.js';
|
|
4
|
-
import { logCollector } from '../connection.js';
|
|
5
|
-
/**
|
|
6
|
-
* Try to parse JSON response from MCP tool result.
|
|
7
|
-
* Returns the parsed object or throws on error.
|
|
8
|
-
*/
|
|
9
|
-
function parseMcpResult(result, toolName) {
|
|
10
|
-
if (result.isError) {
|
|
11
|
-
const errText = result.content[0]?.text ?? 'Unknown MCP error';
|
|
12
|
-
throw new Error(`MCP tool ${toolName} failed: ${errText}`);
|
|
13
|
-
}
|
|
14
|
-
const text = result.content[0]?.text;
|
|
15
|
-
if (!text)
|
|
16
|
-
throw new Error(`MCP tool ${toolName} returned empty result`);
|
|
17
|
-
return JSON.parse(text);
|
|
18
|
-
}
|
|
19
|
-
export class BoardHandler {
|
|
20
|
-
boardState = { state: 'idle', cardId: null };
|
|
21
|
-
myColumnIds = [];
|
|
22
|
-
boardId = null;
|
|
23
|
-
workspaceId = null;
|
|
24
|
-
currentCardProcessingId = null;
|
|
25
|
-
api;
|
|
26
|
-
mcpClient = null;
|
|
27
|
-
mcpToolNames = [];
|
|
28
|
-
useMcp = false;
|
|
29
|
-
constructor(api, mcpClient) {
|
|
30
|
-
this.api = api;
|
|
31
|
-
this.mcpClient = mcpClient ?? null;
|
|
32
|
-
}
|
|
33
|
-
async initialize() {
|
|
34
|
-
try {
|
|
35
|
-
// Try to connect MCP client first
|
|
36
|
-
if (this.mcpClient) {
|
|
37
|
-
try {
|
|
38
|
-
await this.mcpClient.connect();
|
|
39
|
-
this.mcpToolNames = await this.mcpClient.listTools();
|
|
40
|
-
logCollector?.push('board_mcp_tools', 'info', `MCP tools available: ${this.mcpToolNames.join(', ')}`);
|
|
41
|
-
this.useMcp = true;
|
|
42
|
-
// Set up MCP event handler for board notifications
|
|
43
|
-
this.mcpClient.setEventHandler((event) => {
|
|
44
|
-
this.onBoardEvent({
|
|
45
|
-
event: (event.type ?? event.event),
|
|
46
|
-
cardId: event.cardId,
|
|
47
|
-
columnId: event.columnId,
|
|
48
|
-
}).catch((err) => {
|
|
49
|
-
logCollector?.push('board_mcp_event_error', 'error', `MCP event handler error: ${toErrorMessage(err)}`);
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
catch (err) {
|
|
54
|
-
logCollector?.push('board_mcp_fallback', 'error', `MCP connection failed, falling back to HTTP: ${toErrorMessage(err)}`);
|
|
55
|
-
this.useMcp = false;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const data = await this.getBoard();
|
|
59
|
-
this.boardId = data.id;
|
|
60
|
-
this.workspaceId = data.workspaceId;
|
|
61
|
-
this.myColumnIds = data.myColumnIds;
|
|
62
|
-
// Seed boardState from any existing claim BEFORE the heartbeat loop
|
|
63
|
-
// can read it. Without this, BoardHandler is constructed with
|
|
64
|
-
// `boardState={state:'idle'}` and the heartbeat loop (which starts
|
|
65
|
-
// synchronously alongside this async initialize()) can fire a
|
|
66
|
-
// heartbeat that says `idle` even when the backend already has a
|
|
67
|
-
// claim+CP for this agent. The backend then overwrites the DB to
|
|
68
|
-
// idle and orphans the card.
|
|
69
|
-
if (data.myClaim) {
|
|
70
|
-
this.boardState = { state: 'working', cardId: data.myClaim.cardId };
|
|
71
|
-
this.currentCardProcessingId = data.myClaim.cardProcessingId;
|
|
72
|
-
logCollector?.push('board_state_seeded', 'info', `Board state seeded from existing claim: card=${data.myClaim.cardId}, cp=${data.myClaim.cardProcessingId ?? 'null'}`, { cardId: data.myClaim.cardId, cardProcessingId: data.myClaim.cardProcessingId });
|
|
73
|
-
}
|
|
74
|
-
logCollector?.push('board_initialized', 'info', `Board initialized: ${this.boardId} (workspace: ${this.workspaceId}), watching ${this.myColumnIds.length} column(s)`);
|
|
75
|
-
// Backfill: check for existing unassigned cards in my columns —
|
|
76
|
-
// skip when we already have a claim so we don't accidentally try to
|
|
77
|
-
// claim a second card while the existing one is still live.
|
|
78
|
-
if (!data.myClaim) {
|
|
79
|
-
await this.checkQueue(data);
|
|
80
|
-
}
|
|
81
|
-
// Return workspaceId for channel subscription (board:<workspaceId>)
|
|
82
|
-
return this.workspaceId;
|
|
83
|
-
}
|
|
84
|
-
catch (err) {
|
|
85
|
-
logCollector?.push('board_init_error', 'warn', `Board initialization failed: ${toErrorMessage(err)}`);
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
// ─── MCP-aware API methods ──────────────────────────────────────────────
|
|
90
|
-
/**
|
|
91
|
-
* Find an MCP tool name matching a path pattern.
|
|
92
|
-
* Tool names are generated from method + path: e.g. get__api_agent_board
|
|
93
|
-
*/
|
|
94
|
-
findTool(method, pathFragment) {
|
|
95
|
-
const prefix = method.toLowerCase() + '_';
|
|
96
|
-
return (this.mcpToolNames.find((t) => t.startsWith(prefix) && t.includes(pathFragment.replace(/[^a-zA-Z0-9]/g, '_'))) ?? null);
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Try an MCP tool call first; fall back to HTTP if MCP is unavailable or tool not found.
|
|
100
|
-
*/
|
|
101
|
-
async mcpOrHttp(toolName, mcpCall, httpFallback) {
|
|
102
|
-
if (this.useMcp && this.mcpClient && toolName) {
|
|
103
|
-
return mcpCall(this.mcpClient, toolName);
|
|
104
|
-
}
|
|
105
|
-
return httpFallback();
|
|
106
|
-
}
|
|
107
|
-
async getBoard() {
|
|
108
|
-
const rawTool = this.findTool('get', 'api_agent_board');
|
|
109
|
-
const toolName = rawTool && !rawTool.includes('cards') ? rawTool : null;
|
|
110
|
-
return this.mcpOrHttp(toolName, async (client, tool) => parseMcpResult(await client.callTool(tool), tool), () => this.api.get('/api/agent/board'));
|
|
111
|
-
}
|
|
112
|
-
async claimCard(cardId) {
|
|
113
|
-
return this.mcpOrHttp(this.findTool('post', 'agent_board_cards__cardId__claim'), async (client, tool) => {
|
|
114
|
-
const result = await client.callTool(tool, { cardId });
|
|
115
|
-
// Convert MCP result to Response-like for compatibility
|
|
116
|
-
if (result.isError) {
|
|
117
|
-
const text = result.content[0]?.text ?? '';
|
|
118
|
-
const status = text.includes('409') ? 409 : 500;
|
|
119
|
-
return { ok: false, status, text: () => Promise.resolve(text) };
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
ok: true,
|
|
123
|
-
status: 200,
|
|
124
|
-
text: () => Promise.resolve(result.content[0]?.text ?? ''),
|
|
125
|
-
};
|
|
126
|
-
}, () => this.api.post(`/api/agent/board/cards/${cardId}/claim`));
|
|
127
|
-
}
|
|
128
|
-
async getTask(cardId) {
|
|
129
|
-
return this.mcpOrHttp(this.findTool('get', 'agent_board_cards__cardId__task'), async (client, tool) => parseMcpResult(await client.callTool(tool, { cardId }), tool), () => this.api.get(`/api/agent/board/cards/${cardId}/task`));
|
|
130
|
-
}
|
|
131
|
-
async postResult(cardId, body) {
|
|
132
|
-
return this.mcpOrHttp(this.findTool('post', 'agent_board_cards__cardId__result'), async (client, tool) => {
|
|
133
|
-
const result = await client.callTool(tool, { cardId, body });
|
|
134
|
-
if (result.isError) {
|
|
135
|
-
throw new Error(`MCP tool ${tool} failed: ${result.content[0]?.text}`);
|
|
136
|
-
}
|
|
137
|
-
}, async () => {
|
|
138
|
-
await this.api.post(`/api/agent/board/cards/${cardId}/result`, body);
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
async postArtifact(cardId, body) {
|
|
142
|
-
return this.mcpOrHttp(this.findTool('post', 'agent_board_cards__cardId__artifacts'), async (client, tool) => {
|
|
143
|
-
await client.callTool(tool, { cardId, body });
|
|
144
|
-
}, async () => {
|
|
145
|
-
await this.api.post(`/api/agent/board/cards/${cardId}/artifacts`, body);
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
async postComment(cardId, body) {
|
|
149
|
-
return this.mcpOrHttp(this.findTool('post', 'agent_board_cards__cardId__comments'), async (client, tool) => {
|
|
150
|
-
await client.callTool(tool, { cardId, body });
|
|
151
|
-
}, async () => {
|
|
152
|
-
await this.api.post(`/api/agent/board/cards/${cardId}/comments`, body);
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
async postMove(cardId) {
|
|
156
|
-
return this.mcpOrHttp(this.findTool('post', 'agent_board_cards__cardId__move'), async (client, tool) => {
|
|
157
|
-
await client.callTool(tool, { cardId });
|
|
158
|
-
}, async () => {
|
|
159
|
-
await this.api.post(`/api/agent/board/cards/${cardId}/move`);
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
// ─── Board event handling ────────────────────────────────────────────────
|
|
163
|
-
async onBoardEvent(event) {
|
|
164
|
-
switch (event.event) {
|
|
165
|
-
case 'card:entered':
|
|
166
|
-
if (!event.columnId || !this.myColumnIds.includes(event.columnId))
|
|
167
|
-
return;
|
|
168
|
-
if (this.boardState.state !== 'idle')
|
|
169
|
-
return;
|
|
170
|
-
// RACE-2: lock state synchronously before any await so concurrent events are rejected
|
|
171
|
-
this.boardState = { state: 'claiming', cardId: event.cardId };
|
|
172
|
-
await this.tryClaimCard(event.cardId);
|
|
173
|
-
break;
|
|
174
|
-
case 'card:claimed':
|
|
175
|
-
case 'card:moved':
|
|
176
|
-
case 'card:commented':
|
|
177
|
-
// Info only, ignore
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
async tryClaimCard(cardId) {
|
|
182
|
-
try {
|
|
183
|
-
const res = await this.claimCard(cardId);
|
|
184
|
-
if (res.ok) {
|
|
185
|
-
this.boardState = { state: 'working', cardId };
|
|
186
|
-
logCollector?.push('card_claimed', 'info', `Claimed card: ${cardId}`, { cardId });
|
|
187
|
-
await this.startTask(cardId);
|
|
188
|
-
}
|
|
189
|
-
else if (res.status === 409) {
|
|
190
|
-
this.boardState = { state: 'idle', cardId: null };
|
|
191
|
-
logCollector?.push('card_claim_skipped', 'info', `Card ${cardId} already claimed or agent busy, skipping`, { cardId });
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
this.boardState = { state: 'idle', cardId: null };
|
|
195
|
-
const body = await res.text().catch(() => '');
|
|
196
|
-
logCollector?.push('card_claim_error', 'error', `Claim card ${cardId} failed (HTTP ${res.status}): ${body}`, { cardId, status: res.status });
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
catch (err) {
|
|
200
|
-
this.boardState = { state: 'idle', cardId: null };
|
|
201
|
-
logCollector?.push('card_claim_error', 'error', `tryClaimCard error: ${toErrorMessage(err)}`, { cardId });
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
async startTask(cardId) {
|
|
205
|
-
try {
|
|
206
|
-
// Fetch task prompt from backend (includes rendered workflow prompt)
|
|
207
|
-
const taskData = await this.getTask(cardId);
|
|
208
|
-
this.currentCardProcessingId = taskData.cardProcessingId;
|
|
209
|
-
process.env.BOARD_CARD_ID = cardId;
|
|
210
|
-
if (taskData.mockActions) {
|
|
211
|
-
// Mock path: execute actions directly via board API (no LLM needed)
|
|
212
|
-
await this.executeMockActions(cardId, taskData.mockActions);
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
// Real path: send prompt to agent via provider
|
|
216
|
-
const provider = getProvider();
|
|
217
|
-
if (!provider)
|
|
218
|
-
throw new Error('No agent provider configured');
|
|
219
|
-
// claude-code: board tasks flow through the channel as plain chat
|
|
220
|
-
// notifications — Claude replies asynchronously via the MCP `reply`
|
|
221
|
-
// tool, we don't block on onDone here.
|
|
222
|
-
if (provider instanceof ClaudeCodeProvider) {
|
|
223
|
-
provider.pushToChannel(`New task (card ${cardId}):\n\n${taskData.prompt}`, {
|
|
224
|
-
chat_id: 'board',
|
|
225
|
-
source: 'board',
|
|
226
|
-
message_id: cardId,
|
|
227
|
-
});
|
|
228
|
-
// BOARD-CC-COMPLETION: Claude drives card completion itself by
|
|
229
|
-
// calling the agent-board MCP tools (POST /api/agent/board/cards/:id/
|
|
230
|
-
// result | artifacts | comments | move) exposed via the backend MCP
|
|
231
|
-
// server. We intentionally do NOT call completeTask() here — that
|
|
232
|
-
// would mark the card `completed` before Claude has done any work.
|
|
233
|
-
//
|
|
234
|
-
// Trade-off: we reset local state to `idle` so the agent can claim
|
|
235
|
-
// additional cards while Claude works, but the card itself stays
|
|
236
|
-
// `claimed/in-progress` on the backend until Claude posts a result.
|
|
237
|
-
// If Claude never finishes (crash, exit) the card appears stuck
|
|
238
|
-
// until a backend reaper times it out.
|
|
239
|
-
//
|
|
240
|
-
// TODO: detect Claude's own result-call (via a `board:done` marker
|
|
241
|
-
// in reply meta, or by wiring a second MCP notification back to
|
|
242
|
-
// this handler) so we can log completion in agent-controller too.
|
|
243
|
-
logCollector?.push('card_task_handed_off', 'info', `Card ${cardId} handed to claude-code channel; completion driven by agent via MCP`, { cardId, provider: 'claude-code' });
|
|
244
|
-
delete process.env.BOARD_CARD_ID;
|
|
245
|
-
this.currentCardProcessingId = null;
|
|
246
|
-
this.boardState = { state: 'idle', cardId: null };
|
|
247
|
-
this.checkQueue().catch((err) => {
|
|
248
|
-
logCollector?.push('board_queue_check_error', 'error', `checkQueue after claude-code handoff error: ${toErrorMessage(err)}`, { cardId });
|
|
249
|
-
});
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
253
|
-
await new Promise((resolve, reject) => {
|
|
254
|
-
const timeoutId = setTimeout(() => reject(new Error('Provider timeout')), 300_000);
|
|
255
|
-
provider
|
|
256
|
-
.sendMessage({
|
|
257
|
-
sessionKey: 'board-task',
|
|
258
|
-
text: taskData.prompt,
|
|
259
|
-
idempotencyKey: `board-${cardId}-${Date.now()}`,
|
|
260
|
-
onDone: () => {
|
|
261
|
-
clearTimeout(timeoutId);
|
|
262
|
-
resolve();
|
|
263
|
-
},
|
|
264
|
-
onError: (error) => {
|
|
265
|
-
clearTimeout(timeoutId);
|
|
266
|
-
reject(new Error(error));
|
|
267
|
-
},
|
|
268
|
-
})
|
|
269
|
-
.catch((err) => {
|
|
270
|
-
clearTimeout(timeoutId);
|
|
271
|
-
reject(err);
|
|
272
|
-
});
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
// STRUCT-2: reset state after task is sent so new cards can be claimed
|
|
277
|
-
await this.completeTask(cardId);
|
|
278
|
-
}
|
|
279
|
-
catch (err) {
|
|
280
|
-
logCollector?.push('card_task_error', 'error', `startTask(${cardId}) error: ${toErrorMessage(err)}`, { cardId });
|
|
281
|
-
// Report failure to backend
|
|
282
|
-
await this.reportResult(cardId, 'failed', toErrorMessage(err));
|
|
283
|
-
this.boardState = { state: 'idle', cardId: null };
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
async executeMockActions(cardId, actions) {
|
|
287
|
-
for (const action of actions) {
|
|
288
|
-
switch (action.type) {
|
|
289
|
-
case 'wait':
|
|
290
|
-
await new Promise((r) => setTimeout(r, action.ms ?? 1000));
|
|
291
|
-
break;
|
|
292
|
-
case 'artifact':
|
|
293
|
-
await this.postArtifact(cardId, action.body ?? {});
|
|
294
|
-
break;
|
|
295
|
-
case 'comment':
|
|
296
|
-
await this.postComment(cardId, action.body ?? {});
|
|
297
|
-
break;
|
|
298
|
-
case 'result':
|
|
299
|
-
await this.postResult(cardId, (action.body ?? {}));
|
|
300
|
-
break;
|
|
301
|
-
case 'move':
|
|
302
|
-
await this.postMove(cardId);
|
|
303
|
-
break;
|
|
304
|
-
}
|
|
305
|
-
logCollector?.push('board_mock_action', 'info', `Mock action executed: ${action.type}`, {
|
|
306
|
-
cardId,
|
|
307
|
-
actionType: action.type,
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
async completeTask(cardId) {
|
|
312
|
-
logCollector?.push('card_task_completed', 'info', `Task completed: ${cardId}`, { cardId });
|
|
313
|
-
delete process.env.BOARD_CARD_ID;
|
|
314
|
-
// Report completion to backend
|
|
315
|
-
await this.reportResult(cardId, 'completed');
|
|
316
|
-
this.currentCardProcessingId = null;
|
|
317
|
-
this.boardState = { state: 'idle', cardId: null };
|
|
318
|
-
this.checkQueue().catch((err) => {
|
|
319
|
-
logCollector?.push('board_queue_check_error', 'error', `checkQueue after completeTask error: ${toErrorMessage(err)}`, { cardId });
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
async reportResult(cardId, status, error) {
|
|
323
|
-
try {
|
|
324
|
-
const body = { status };
|
|
325
|
-
if (error)
|
|
326
|
-
body.error = error;
|
|
327
|
-
await this.postResult(cardId, body);
|
|
328
|
-
logCollector?.push('card_result_reported', 'info', `Reported result for card ${cardId}: ${status}`, { cardId, status });
|
|
329
|
-
}
|
|
330
|
-
catch (err) {
|
|
331
|
-
logCollector?.push('card_result_error', 'error', `reportResult(${cardId}) error: ${toErrorMessage(err)}`, { cardId });
|
|
332
|
-
// Don't throw — result reporting failure shouldn't break the flow
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
async checkQueue(existingData) {
|
|
336
|
-
try {
|
|
337
|
-
const data = existingData ?? (await this.getBoard());
|
|
338
|
-
const candidates = [];
|
|
339
|
-
for (const col of data.columns) {
|
|
340
|
-
if (!this.myColumnIds.includes(col.id))
|
|
341
|
-
continue;
|
|
342
|
-
for (const card of col.cards) {
|
|
343
|
-
if (!card.assignedAgentId) {
|
|
344
|
-
candidates.push(card);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
if (candidates.length === 0)
|
|
349
|
-
return;
|
|
350
|
-
// Sort by priority (critical > high > medium > low) then by creation date (oldest first)
|
|
351
|
-
const priorityOrder = { critical: 0, high: 1, medium: 2, low: 3 };
|
|
352
|
-
candidates.sort((a, b) => {
|
|
353
|
-
const pa = priorityOrder[a.priority ?? 'medium'] ?? 2;
|
|
354
|
-
const pb = priorityOrder[b.priority ?? 'medium'] ?? 2;
|
|
355
|
-
if (pa !== pb)
|
|
356
|
-
return pa - pb;
|
|
357
|
-
return (a.createdAt ?? '').localeCompare(b.createdAt ?? '');
|
|
358
|
-
});
|
|
359
|
-
logCollector?.push('board_queue_check', 'info', `Queue: ${candidates.length} unassigned card(s) in my columns, trying first`, { count: candidates.length });
|
|
360
|
-
await this.tryClaimCard(candidates[0].id);
|
|
361
|
-
}
|
|
362
|
-
catch (err) {
|
|
363
|
-
logCollector?.push('board_queue_check_error', 'error', `checkQueue error: ${toErrorMessage(err)}`);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
getBoardStatus() {
|
|
367
|
-
return this.boardState;
|
|
368
|
-
}
|
|
369
|
-
getBoardId() {
|
|
370
|
-
return this.boardId;
|
|
371
|
-
}
|
|
372
|
-
/** Whether this handler is using MCP tools (vs HTTP fallback). */
|
|
373
|
-
isUsingMcp() {
|
|
374
|
-
return this.useMcp;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
//# sourceMappingURL=board-handler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"board-handler.js","sourceRoot":"","sources":["../../src/handlers/board-handler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;;GAGG;AACH,SAAS,cAAc,CAAI,MAAqB,EAAE,QAAgB;IAChE,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,mBAAmB,CAAC;QAC/D,MAAM,IAAI,KAAK,CAAC,YAAY,QAAQ,YAAY,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC;IACrC,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,YAAY,QAAQ,wBAAwB,CAAC,CAAC;IACzE,OAAO,IAAI,CAAC,KAAK,CAAC,IA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,iDAAiD,EAC5E,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,EAAE,CAC7B,CAAC;YACF,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,YAAY,EAAE,IAAI,CAChB,yBAAyB,EACzB,OAAO,EACP,qBAAqB,cAAc,CAAC,GAAG,CAAC,EAAE,CAC3C,CAAC;QACJ,CAAC;IACH,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,kEAAkE;IAClE,UAAU;QACR,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF"}
|
package/dist/mcp-client.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
export interface McpToolResult {
|
|
2
|
-
content: Array<{
|
|
3
|
-
type: string;
|
|
4
|
-
text?: string;
|
|
5
|
-
}>;
|
|
6
|
-
isError?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface McpBoardClientOptions {
|
|
9
|
-
url: string;
|
|
10
|
-
token: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* MCP client for communicating with the openclaw-cloud MCP server.
|
|
14
|
-
* Used by BoardHandler to call board tools and receive board event notifications.
|
|
15
|
-
*
|
|
16
|
-
* The backend stores MCP sessions in Redis with a TTL that is refreshed on each
|
|
17
|
-
* request and on SSE keepalives. If the session disappears server-side (Redis
|
|
18
|
-
* flush during deploy, TTL expiry during long idle, transient network drop where
|
|
19
|
-
* the GET SSE channel never recovered) every subsequent callTool returns
|
|
20
|
-
* `-32001 Session not found`. Without recovery, the agent-controller is stuck
|
|
21
|
-
* with a dead client until process restart.
|
|
22
|
-
*
|
|
23
|
-
* `callTool` and `listTools` transparently re-establish the session on
|
|
24
|
-
* `Session not found` and retry exactly once. A mutex prevents concurrent
|
|
25
|
-
* reconnects when many calls fail at the same moment. Persistent failure
|
|
26
|
-
* bubbles up and is handled by the restart-loop.
|
|
27
|
-
*/
|
|
28
|
-
export declare class McpBoardClient {
|
|
29
|
-
private client;
|
|
30
|
-
private connected;
|
|
31
|
-
private onBoardEvent?;
|
|
32
|
-
private url;
|
|
33
|
-
private token;
|
|
34
|
-
private reconnectInFlight;
|
|
35
|
-
constructor(options: McpBoardClientOptions);
|
|
36
|
-
setEventHandler(handler: (event: Record<string, unknown>) => void): void;
|
|
37
|
-
connect(): Promise<void>;
|
|
38
|
-
disconnect(): Promise<void>;
|
|
39
|
-
callTool(name: string, args?: Record<string, unknown>): Promise<McpToolResult>;
|
|
40
|
-
listTools(): Promise<string[]>;
|
|
41
|
-
isConnected(): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Match either an `McpError` carrying `code: -32001` or a generic Error whose
|
|
44
|
-
* message contains the JSON-RPC text / HTTP 404 status from the SDK transport.
|
|
45
|
-
*/
|
|
46
|
-
private isSessionLost;
|
|
47
|
-
private handleSessionLost;
|
|
48
|
-
/**
|
|
49
|
-
* Mutex-guarded reconnect. Concurrent callers all await the same in-flight
|
|
50
|
-
* promise so a burst of failed callTool invocations triggers exactly one
|
|
51
|
-
* fresh transport+session, not N. Capped at a single retry per failure —
|
|
52
|
-
* if the retry also fails, the error propagates and the supervising
|
|
53
|
-
* restart-loop takes over.
|
|
54
|
-
*/
|
|
55
|
-
private reconnect;
|
|
56
|
-
private performReconnect;
|
|
57
|
-
/**
|
|
58
|
-
* Notification handler is registered on the Client instance, so we must
|
|
59
|
-
* re-install it every time we replace that instance during reconnect.
|
|
60
|
-
* Listens for `board/event` notifications dispatched by the backend's
|
|
61
|
-
* McpSessionManager.
|
|
62
|
-
*/
|
|
63
|
-
private installNotificationHandler;
|
|
64
|
-
}
|
package/dist/mcp-client.js
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
2
|
-
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { logCollector } from './connection.js';
|
|
5
|
-
// Notification schema is shared across the initial connect() and every reconnect()
|
|
6
|
-
// so we install the same handler each time the underlying Client is replaced.
|
|
7
|
-
const BoardEventNotification = z.object({
|
|
8
|
-
method: z.literal('board/event'),
|
|
9
|
-
params: z.object({}).passthrough().optional(),
|
|
10
|
-
});
|
|
11
|
-
/**
|
|
12
|
-
* MCP client for communicating with the openclaw-cloud MCP server.
|
|
13
|
-
* Used by BoardHandler to call board tools and receive board event notifications.
|
|
14
|
-
*
|
|
15
|
-
* The backend stores MCP sessions in Redis with a TTL that is refreshed on each
|
|
16
|
-
* request and on SSE keepalives. If the session disappears server-side (Redis
|
|
17
|
-
* flush during deploy, TTL expiry during long idle, transient network drop where
|
|
18
|
-
* the GET SSE channel never recovered) every subsequent callTool returns
|
|
19
|
-
* `-32001 Session not found`. Without recovery, the agent-controller is stuck
|
|
20
|
-
* with a dead client until process restart.
|
|
21
|
-
*
|
|
22
|
-
* `callTool` and `listTools` transparently re-establish the session on
|
|
23
|
-
* `Session not found` and retry exactly once. A mutex prevents concurrent
|
|
24
|
-
* reconnects when many calls fail at the same moment. Persistent failure
|
|
25
|
-
* bubbles up and is handled by the restart-loop.
|
|
26
|
-
*/
|
|
27
|
-
export class McpBoardClient {
|
|
28
|
-
client;
|
|
29
|
-
connected = false;
|
|
30
|
-
onBoardEvent;
|
|
31
|
-
url;
|
|
32
|
-
token;
|
|
33
|
-
reconnectInFlight = null;
|
|
34
|
-
constructor(options) {
|
|
35
|
-
this.url = options.url;
|
|
36
|
-
this.token = options.token;
|
|
37
|
-
this.client = new Client({ name: 'agent-controller', version: '1.0.0' }, { capabilities: {} });
|
|
38
|
-
}
|
|
39
|
-
setEventHandler(handler) {
|
|
40
|
-
this.onBoardEvent = handler;
|
|
41
|
-
}
|
|
42
|
-
async connect() {
|
|
43
|
-
const transport = new StreamableHTTPClientTransport(new URL(this.url), {
|
|
44
|
-
requestInit: {
|
|
45
|
-
headers: { Authorization: `Bearer ${this.token}` },
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
await this.client.connect(transport);
|
|
49
|
-
this.connected = true;
|
|
50
|
-
this.installNotificationHandler();
|
|
51
|
-
console.log('[mcp] Client connected to', this.url);
|
|
52
|
-
}
|
|
53
|
-
async disconnect() {
|
|
54
|
-
if (this.connected) {
|
|
55
|
-
try {
|
|
56
|
-
await this.client.close();
|
|
57
|
-
}
|
|
58
|
-
catch {
|
|
59
|
-
// Ignore close errors
|
|
60
|
-
}
|
|
61
|
-
this.connected = false;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
async callTool(name, args = {}) {
|
|
65
|
-
if (!this.connected)
|
|
66
|
-
throw new Error('MCP client not connected');
|
|
67
|
-
try {
|
|
68
|
-
return (await this.client.callTool({ name, arguments: args }));
|
|
69
|
-
}
|
|
70
|
-
catch (err) {
|
|
71
|
-
if (!this.isSessionLost(err))
|
|
72
|
-
throw err;
|
|
73
|
-
await this.handleSessionLost(err, { tool: name });
|
|
74
|
-
return (await this.client.callTool({ name, arguments: args }));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
async listTools() {
|
|
78
|
-
if (!this.connected)
|
|
79
|
-
throw new Error('MCP client not connected');
|
|
80
|
-
try {
|
|
81
|
-
const result = await this.client.listTools();
|
|
82
|
-
return result.tools.map((t) => t.name);
|
|
83
|
-
}
|
|
84
|
-
catch (err) {
|
|
85
|
-
if (!this.isSessionLost(err))
|
|
86
|
-
throw err;
|
|
87
|
-
await this.handleSessionLost(err, { tool: 'listTools' });
|
|
88
|
-
const result = await this.client.listTools();
|
|
89
|
-
return result.tools.map((t) => t.name);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
isConnected() {
|
|
93
|
-
return this.connected;
|
|
94
|
-
}
|
|
95
|
-
// ---------------------------------------------------------------------------
|
|
96
|
-
// Reconnect / recovery internals
|
|
97
|
-
// ---------------------------------------------------------------------------
|
|
98
|
-
/**
|
|
99
|
-
* Match either an `McpError` carrying `code: -32001` or a generic Error whose
|
|
100
|
-
* message contains the JSON-RPC text / HTTP 404 status from the SDK transport.
|
|
101
|
-
*/
|
|
102
|
-
isSessionLost(err) {
|
|
103
|
-
if (err &&
|
|
104
|
-
typeof err === 'object' &&
|
|
105
|
-
'code' in err &&
|
|
106
|
-
err.code === -32001) {
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
110
|
-
return /-32001|Session not found|HTTP 404/i.test(msg);
|
|
111
|
-
}
|
|
112
|
-
async handleSessionLost(err, ctx) {
|
|
113
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
114
|
-
logCollector?.push('mcp_session_lost', 'warn', `Reconnecting after: ${message}`, ctx);
|
|
115
|
-
await this.reconnect();
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Mutex-guarded reconnect. Concurrent callers all await the same in-flight
|
|
119
|
-
* promise so a burst of failed callTool invocations triggers exactly one
|
|
120
|
-
* fresh transport+session, not N. Capped at a single retry per failure —
|
|
121
|
-
* if the retry also fails, the error propagates and the supervising
|
|
122
|
-
* restart-loop takes over.
|
|
123
|
-
*/
|
|
124
|
-
async reconnect() {
|
|
125
|
-
if (this.reconnectInFlight) {
|
|
126
|
-
return this.reconnectInFlight;
|
|
127
|
-
}
|
|
128
|
-
this.reconnectInFlight = this.performReconnect().finally(() => {
|
|
129
|
-
this.reconnectInFlight = null;
|
|
130
|
-
});
|
|
131
|
-
return this.reconnectInFlight;
|
|
132
|
-
}
|
|
133
|
-
async performReconnect() {
|
|
134
|
-
// Best-effort close — transport may already be dead.
|
|
135
|
-
try {
|
|
136
|
-
await this.client.close();
|
|
137
|
-
}
|
|
138
|
-
catch {
|
|
139
|
-
// ignored
|
|
140
|
-
}
|
|
141
|
-
// The SDK transport caches sessionId per instance; we must replace both
|
|
142
|
-
// the Client and the StreamableHTTPClientTransport, not reuse them.
|
|
143
|
-
this.client = new Client({ name: 'agent-controller', version: '1.0.0' }, { capabilities: {} });
|
|
144
|
-
const transport = new StreamableHTTPClientTransport(new URL(this.url), {
|
|
145
|
-
requestInit: {
|
|
146
|
-
headers: { Authorization: `Bearer ${this.token}` },
|
|
147
|
-
},
|
|
148
|
-
});
|
|
149
|
-
await this.client.connect(transport);
|
|
150
|
-
this.connected = true;
|
|
151
|
-
this.installNotificationHandler();
|
|
152
|
-
let toolCount;
|
|
153
|
-
try {
|
|
154
|
-
const result = await this.client.listTools();
|
|
155
|
-
toolCount = result.tools.length;
|
|
156
|
-
}
|
|
157
|
-
catch {
|
|
158
|
-
// Tool count is informational only — don't fail the reconnect over it.
|
|
159
|
-
}
|
|
160
|
-
logCollector?.push('mcp_reconnected', 'info', 'MCP session re-established', {
|
|
161
|
-
url: this.url,
|
|
162
|
-
tools: toolCount,
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Notification handler is registered on the Client instance, so we must
|
|
167
|
-
* re-install it every time we replace that instance during reconnect.
|
|
168
|
-
* Listens for `board/event` notifications dispatched by the backend's
|
|
169
|
-
* McpSessionManager.
|
|
170
|
-
*/
|
|
171
|
-
installNotificationHandler() {
|
|
172
|
-
this.client.setNotificationHandler(BoardEventNotification, (notification) => {
|
|
173
|
-
if (this.onBoardEvent && notification.params) {
|
|
174
|
-
this.onBoardEvent(notification.params);
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
//# sourceMappingURL=mcp-client.js.map
|
package/dist/mcp-client.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-client.js","sourceRoot":"","sources":["../src/mcp-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAA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