pi-soly 1.11.0 → 1.11.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.
Files changed (2) hide show
  1. package/mcp/init.ts +34 -7
  2. package/package.json +1 -1
package/mcp/init.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ExtensionAPI, ExtensionContext, ExtensionUIContext } from "@earendil-works/pi-coding-agent";
1
+ import type { ExtensionAPI, ExtensionContext, ExtensionUIContext, ThemeColor } from "@earendil-works/pi-coding-agent";
2
2
  import type { McpExtensionState } from "./state.ts";
3
3
  import type { ToolMetadata } from "./types.ts";
4
4
  import { existsSync } from "node:fs";
@@ -139,7 +139,7 @@ export async function initializeMcp(
139
139
  });
140
140
 
141
141
  if (ctx.hasUI && startupServers.length > 0) {
142
- ctx.ui.setStatus("mcp", `MCP: connecting to ${startupServers.length} servers...`);
142
+ ctx.ui.setStatus("mcp", `connecting ${startupServers.length} server${startupServers.length === 1 ? "" : "s"}…`);
143
143
  }
144
144
 
145
145
  const results = await parallelLimit(startupServers, 10, async ([name, definition]) => {
@@ -295,13 +295,40 @@ export function flushMetadataCache(state: McpExtensionState): void {
295
295
  export function updateStatusBar(state: McpExtensionState): void {
296
296
  const ui = state.ui;
297
297
  if (!ui) return;
298
- const total = Object.keys(state.config.mcpServers).length;
299
- if (total === 0) {
298
+ const serverNames = Object.keys(state.config.mcpServers);
299
+ if (serverNames.length === 0) {
300
300
  ui.setStatus("mcp", undefined);
301
301
  return;
302
302
  }
303
- const connectedCount = state.manager.getAllConnections().size;
304
- ui.setStatus("mcp", ui.theme.fg("accent", `MCP: ${connectedCount}/${total} servers`));
303
+ // Build compact per-server list: "unreal ✓ · github ✗"
304
+ // Status icon reflects current state:
305
+ // ✓ connected
306
+ // ✗ failed (in failureTracker, with active backoff)
307
+ // ⚠ needs-auth (OAuth)
308
+ // ○ not connected / closed
309
+ const theme = ui.theme;
310
+ const fg = (color: ThemeColor, text: string): string => theme.fg(color, text);
311
+ const parts: string[] = [];
312
+ for (const name of serverNames) {
313
+ const connection = state.manager.getConnection(name);
314
+ let icon: string;
315
+ let color: ThemeColor;
316
+ if (connection?.status === "connected") {
317
+ icon = "✓";
318
+ color = "success";
319
+ } else if (connection?.status === "needs-auth") {
320
+ icon = "⚠";
321
+ color = "warning";
322
+ } else if (state.failureTracker.has(name)) {
323
+ icon = "✗";
324
+ color = "error";
325
+ } else {
326
+ icon = "○";
327
+ color = "dim";
328
+ }
329
+ parts.push(`${name} ${fg(color, icon)}`);
330
+ }
331
+ ui.setStatus("mcp", parts.join(" · "));
305
332
  }
306
333
 
307
334
  export function getFailureAgeSeconds(state: McpExtensionState, serverName: string): number | null {
@@ -330,7 +357,7 @@ export async function lazyConnect(state: McpExtensionState, serverName: string):
330
357
 
331
358
  try {
332
359
  if (state.ui) {
333
- state.ui.setStatus("mcp", `MCP: connecting to ${serverName}...`);
360
+ state.ui.setStatus("mcp", `connecting ${serverName}…`);
334
361
  }
335
362
  const newConnection = await state.manager.connect(serverName, definition);
336
363
  if (newConnection.status === "needs-auth") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-soly",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "Project management + workflow engine for pi-coding-agent. Plans, state, MANDATORY rules, multi-question picker — one npm install, zero config. LLM is the executor (no subagent layer).",
5
5
  "type": "module",
6
6
  "main": "index.ts",