@dyyz1993/pi-coding-agent 0.74.6 → 0.74.8

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.
@@ -570,6 +570,20 @@ export class AgentSession {
570
570
  this._eventListeners = [];
571
571
  cleanupSessionResources(this.sessionId);
572
572
  }
573
+ getMcpConnections() {
574
+ if (!this._mcpManager)
575
+ return [];
576
+ return this._mcpManager.getConnections().map((c) => ({
577
+ name: c.name,
578
+ status: c.status,
579
+ error: c.error,
580
+ tools: c.tools.map((t) => ({
581
+ originalName: t.originalName,
582
+ fullName: t.fullName,
583
+ description: t.description,
584
+ })),
585
+ }));
586
+ }
573
587
  // =========================================================================
574
588
  // Read-only State Access
575
589
  // =========================================================================
@@ -1690,6 +1704,8 @@ export class AgentSession {
1690
1704
  }
1691
1705
  if (bindings.registerChannel !== undefined) {
1692
1706
  this._registerChannel = bindings.registerChannel;
1707
+ this._extensionRunner.flushPendingChannels(bindings.registerChannel);
1708
+ this._extensionRunner.updateRegisterChannel(bindings.registerChannel);
1693
1709
  }
1694
1710
  this._applyExtensionBindings(this._extensionRunner);
1695
1711
  await this._extensionRunner.emit(this._sessionStartEvent);