Skip to content

Commit 19129ac

Browse files
committed
fix(satellite): emit status event on successful tool discovery
1 parent 84b3943 commit 19129ac

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

services/satellite/src/services/remote-tool-discovery-manager.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,11 @@ export class RemoteToolDiscoveryManager {
530530
sdk_used: true
531531
}, `Successfully discovered ${cachedTools.length} tools from ${serverName} using MCP SDK in ${responseTime}ms`);
532532

533+
// Emit status change event to backend
534+
if (config.installation_id && config.team_id) {
535+
this.emitStatusChange(config.installation_id, config.team_id, 'online');
536+
}
537+
533538
// Phase 10: Notify about successful discovery (set status to 'online')
534539
if (this.statusCallback) {
535540
this.statusCallback(serverSlug, 'online');

services/satellite/src/services/stdio-tool-discovery-manager.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ export class StdioToolDiscoveryManager {
248248
this.logger.warn({ error }, 'Failed to emit mcp.tools.discovered event (non-fatal)');
249249
}
250250

251+
// Emit status change event to backend
252+
const config = processInfo.config;
253+
if (config.installation_id && config.team_id) {
254+
this.emitStatusChange(config.installation_id, config.team_id, 'online');
255+
}
256+
251257
// Phase 10: Notify about successful discovery (set status to 'online')
252258
if (this.statusCallback) {
253259
this.statusCallback(serverSlug, 'online');

0 commit comments

Comments
 (0)