Skip to content

Commit ebf3321

Browse files
committed
mcp-resurrect
1 parent 733b697 commit ebf3321

3 files changed

Lines changed: 22 additions & 5 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agent-swarm-kit",
3-
"version": "1.1.88",
3+
"version": "1.1.89",
44
"description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
55
"author": {
66
"name": "Petr Tripolsky",

src/classes/MCP.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,16 @@ export class MergeMCP implements IMCP {
246246
error
247247
)}`
248248
);
249+
{
250+
const { callbacks = {} } = swarm.agentSchemaService.get(agentName);
251+
callbacks.onResurrect &&
252+
callbacks.onResurrect(
253+
dto.clientId,
254+
dto.agentName,
255+
"tool",
256+
`MCP execution failed toolName=${toolName}`
257+
);
258+
}
249259
await commitStopTools(dto.clientId, agentName);
250260
await commitFlush(dto.clientId, agentName);
251261
await emit(createPlaceholder(), dto.clientId, agentName);
@@ -279,9 +289,16 @@ export class MCPUtils {
279289
});
280290
swarm.mcpValidationService.validate(mcpName, METHOD_NAME_UPDATE);
281291
if (clientId) {
282-
return await swarm.mcpPublicService.updateToolsForClient(METHOD_NAME_UPDATE, clientId, mcpName);
292+
return await swarm.mcpPublicService.updateToolsForClient(
293+
METHOD_NAME_UPDATE,
294+
clientId,
295+
mcpName
296+
);
283297
}
284-
return await swarm.mcpPublicService.updateToolsForAll(METHOD_NAME_UPDATE, mcpName);
298+
return await swarm.mcpPublicService.updateToolsForAll(
299+
METHOD_NAME_UPDATE,
300+
mcpName
301+
);
285302
}
286303
}
287304

0 commit comments

Comments
 (0)