@fitchmultz/pi-mcp-adapter 8.0.5 → 8.0.6

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/CHANGELOG.md CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## 8.0.6 - 2026-11-02
11
+
12
+ <!-- npm-release:unreleased:start -->
13
+ <!-- npm-release:unreleased:end -->
14
+
15
+ - Raise the Pi floor to 1.5.0 (#122) ([fc9bed1](https://github.com/fitchmultz/pi-mcp-adapter/commit/fc9bed1ac87fcfaabeca626115dbe107c0e63ac9))
16
+
17
+ ### What's Changed
18
+ * Raise the Pi floor to 1.5.0 by @fitchmultz in https://github.com/fitchmultz/pi-mcp-adapter/pull/122
19
+
20
+
21
+ **Full Changelog**: https://github.com/fitchmultz/pi-mcp-adapter/compare/v8.0.5...v8.0.6
22
+
10
23
  ## 8.0.5 - 2026-11-02
11
24
 
12
25
  <!-- npm-release:unreleased:start -->
@@ -1,4 +1,4 @@
1
- import type { AgentToolResult, Theme, ToolRenderResultOptions } from "@earendil-works/pi-coding-agent";
1
+ import type { AgentToolResult, KeybindingHints, Theme, ToolRenderResultOptions } from "@earendil-works/pi-coding-agent";
2
2
  import { type Component, Text } from "@earendil-works/pi-tui";
3
3
  type McpToolResultDetails = Record<string, unknown> & {
4
4
  error?: unknown;
@@ -17,7 +17,7 @@ export interface McpProxyToolCallInput {
17
17
  server?: string;
18
18
  action?: string;
19
19
  }
20
- interface McpToolRenderContext {
20
+ interface McpToolRenderContext extends Pick<KeybindingHints, "keyHint"> {
21
21
  isError: boolean;
22
22
  }
23
23
  export interface McpToolResultDisplay {
@@ -34,7 +34,7 @@ declare class CollapsibleText implements Component {
34
34
  private readonly ellipsis;
35
35
  private readonly expandHint;
36
36
  private readonly preTruncated;
37
- constructor(text: string, expanded: boolean, maxCollapsedLines: number, ellipsis: string, expandHint: string, preTruncated?: boolean);
37
+ constructor(text: string, expanded: boolean, maxCollapsedLines: number, ellipsis: string, expandHint: string | undefined, preTruncated?: boolean);
38
38
  render(width: number): string[];
39
39
  invalidate(): void;
40
40
  }
@@ -1,4 +1,4 @@
1
- import { getKeybindings, Text } from "@earendil-works/pi-tui";
1
+ import { Text } from "@earendil-works/pi-tui";
2
2
  const plainTheme = {
3
3
  fg: (_name, text) => text,
4
4
  bold: (text) => text,
@@ -25,7 +25,7 @@ class CollapsibleText {
25
25
  this.expandHint = expandHint;
26
26
  this.preTruncated = preTruncated;
27
27
  this.fullText = new Text(text, 0, 0);
28
- this.footerText = new Text(`${ellipsis}\n${expandHint}`, 0, 0);
28
+ this.footerText = new Text(expandHint === undefined ? ellipsis : `${ellipsis}\n${expandHint}`, 0, 0);
29
29
  }
30
30
  render(width) {
31
31
  if (this.expanded) {
@@ -53,14 +53,6 @@ class CollapsibleText {
53
53
  }
54
54
  invalidate() { }
55
55
  }
56
- // Read the shared TUI keybinding registry without importing the entire host SDK.
57
- function expandHint(theme) {
58
- const keys = getKeybindings().getKeys("app.tools.expand").join("/")
59
- .split("/").map(key => key.split("+")
60
- .map(part => process.platform === "darwin" && part.toLowerCase() === "alt" ? "option" : part)
61
- .join("+")).join("/");
62
- return theme.fg("dim", keys) + theme.fg("muted", " to expand");
63
- }
64
56
  function truncateText(value, maxChars) {
65
57
  if (value.length <= maxChars)
66
58
  return value;
@@ -232,5 +224,9 @@ export function renderMcpToolResult(result, options, theme, context) {
232
224
  ...(identity ? [activeTheme.fg("muted", identity)] : []),
233
225
  ...display.lines.map((line) => activeTheme.fg("toolOutput", line)),
234
226
  ].join("\n");
235
- return new CollapsibleText(output, expanded, DEFAULT_MAX_COLLAPSED_LINES + (identity ? 1 : 0), activeTheme.fg("muted", "…"), activeTheme.fg("muted", `(${expandHint(activeTheme)})`), display.truncated);
227
+ // Pi injects keyHint so the hint shows the user's configured keys.
228
+ const expandHint = context
229
+ ? `${activeTheme.fg("muted", "(")}${context.keyHint("app.tools.expand", "to expand")}${activeTheme.fg("muted", ")")}`
230
+ : undefined;
231
+ return new CollapsibleText(output, expanded, DEFAULT_MAX_COLLAPSED_LINES + (identity ? 1 : 0), activeTheme.fg("muted", "…"), expandHint, display.truncated);
236
232
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fitchmultz/pi-mcp-adapter",
3
- "version": "8.0.5",
3
+ "version": "8.0.6",
4
4
  "description": "Token-efficient MCP adapter for the Pi coding agent",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -105,9 +105,9 @@
105
105
  }
106
106
  },
107
107
  "devDependencies": {
108
- "@earendil-works/pi-ai": "1.4.0",
109
- "@earendil-works/pi-coding-agent": "1.4.0",
110
- "@earendil-works/pi-tui": "1.4.0",
108
+ "@earendil-works/pi-ai": "1.5.0",
109
+ "@earendil-works/pi-coding-agent": "1.5.0",
110
+ "@earendil-works/pi-tui": "1.5.0",
111
111
  "@modelcontextprotocol/server": "2.3.1",
112
112
  "@types/cross-spawn": "6.0.6",
113
113
  "@types/node": "24.19.1",