@earendil-works/pi-coding-agent 0.74.1 → 0.75.0

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
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.75.0] - 2026-05-17
4
+
5
+ ### Breaking Changes
6
+
7
+ - Raised the minimum supported Node.js version to 22.19.0.
8
+
9
+ ### Fixed
10
+
11
+ - Fixed compaction summary calls to use custom agent stream functions, preserving proxy-backed LLM routing ([#4484](https://github.com/earendil-works/pi/issues/4484)).
12
+ - Fixed system prompt and context file boundaries to use explicit XML tags instead of Markdown headings, reducing inconsistent boundary ingestion by models ([#4541](https://github.com/earendil-works/pi-mono/pull/4541) by [@herrnel](https://github.com/herrnel)).
13
+ - Fixed OpenAI Codex generated model metadata to use the current upstream model list inherited from `@earendil-works/pi-ai` ([#4603](https://github.com/earendil-works/pi-mono/pull/4603) by [@mattiacerutti](https://github.com/mattiacerutti)).
14
+ - Fixed GitHub Copilot GPT model thinking metadata inherited from `@earendil-works/pi-ai` to map unsupported minimal thinking to low ([#4622](https://github.com/earendil-works/pi-mono/pull/4622) by [@mattiacerutti](https://github.com/mattiacerutti)).
15
+ - Fixed user-scoped npm pi packages to install under `~/.pi/agent/npm/` instead of npm's global package root, avoiding permission errors with system-managed Node installs ([#4587](https://github.com/earendil-works/pi/issues/4587)).
16
+ - Fixed Mistral requests failing after the global fetch proxy/timeout workaround by removing the custom fetch override and using undici 8 dispatcher support instead ([#4619](https://github.com/earendil-works/pi/issues/4619)).
17
+ - Fixed default output token requests for models whose advertised output limit is effectively their full context window, avoiding impossible provider requests inherited from `@earendil-works/pi-ai` ([#4614](https://github.com/earendil-works/pi/issues/4614)).
18
+
3
19
  ## [0.74.1] - 2026-05-16
4
20
 
5
21
  ### New Features
package/README.md CHANGED
@@ -406,7 +406,7 @@ pi update npm:@foo/pi-tools # update one package
406
406
  pi config # enable/disable extensions, skills, prompts, themes
407
407
  ```
408
408
 
409
- Packages install to `~/.pi/agent/git/` (git) or global npm. Use `-l` for project-local installs (`.pi/git/`, `.pi/npm/`). Git packages install dependencies with `npm install --omit=dev` by default, so runtime deps must be listed under `dependencies`; when `npmCommand` is configured, git packages use plain `install` for compatibility with wrappers. If you use a Node version manager and want package installs to reuse a stable npm context, set `npmCommand` in `settings.json`, for example `["mise", "exec", "node@20", "--", "npm"]`.
409
+ Packages install to `~/.pi/agent/git/` (git) or `~/.pi/agent/npm/` (npm). Use `-l` for project-local installs (`.pi/git/`, `.pi/npm/`). Git packages install dependencies with `npm install --omit=dev` by default, so runtime deps must be listed under `dependencies`; when `npmCommand` is configured, git packages use plain `install` for compatibility with wrappers. If you use a Node version manager and want package installs to reuse a stable npm context, set `npmCommand` in `settings.json`, for example `["mise", "exec", "node@20", "--", "npm"]`.
410
410
 
411
411
  Create a package by adding a `pi` key to `package.json`:
412
412
 
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the refactored coding agent.\n * Uses main.ts with AgentSession and new mode modules.\n *\n * Test with: npx tsx src/cli-new.ts [args...]\n */\nimport { EnvHttpProxyAgent, setGlobalDispatcher, fetch as undiciFetch } from \"undici\";\nimport { APP_NAME } from \"./config.js\";\nimport { main } from \"./main.js\";\n\nprocess.title = APP_NAME;\nprocess.env.PI_CODING_AGENT = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\n// bodyTimeout/headersTimeout default to 300s in undici; long local-LLM stalls\n// (e.g. vLLM buffering a large tool call) exceed that and abort the SSE stream\n// with UND_ERR_BODY_TIMEOUT. Disable both — provider SDKs enforce their own\n// AbortController-based deadlines via retry.provider.timeoutMs.\n// Node 26 uses an internal undici for globalThis.fetch that does not honor npm\n// undici's global dispatcher, so route global fetch through npm undici as well.\nconst dispatcher = new EnvHttpProxyAgent({ bodyTimeout: 0, headersTimeout: 0 });\nsetGlobalDispatcher(dispatcher);\nconst fetchWithDispatcher = undiciFetch as unknown as typeof fetch;\nglobalThis.fetch = (input, init) =>\n\tfetchWithDispatcher(input, {\n\t\t...init,\n\t\tdispatcher,\n\t} as unknown as RequestInit);\n\nmain(process.argv.slice(2));\n"]}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the refactored coding agent.\n * Uses main.ts with AgentSession and new mode modules.\n *\n * Test with: npx tsx src/cli-new.ts [args...]\n */\nimport { EnvHttpProxyAgent, setGlobalDispatcher } from \"undici\";\nimport { APP_NAME } from \"./config.js\";\nimport { main } from \"./main.js\";\n\nprocess.title = APP_NAME;\nprocess.env.PI_CODING_AGENT = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\n// bodyTimeout/headersTimeout default to 300s in undici; long local-LLM stalls\n// (e.g. vLLM buffering a large tool call) exceed that and abort the SSE stream\n// with UND_ERR_BODY_TIMEOUT. Disable both — provider SDKs enforce their own\n// AbortController-based deadlines via retry.provider.timeoutMs.\nsetGlobalDispatcher(new EnvHttpProxyAgent({ bodyTimeout: 0, headersTimeout: 0 }));\n\nmain(process.argv.slice(2));\n"]}
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Test with: npx tsx src/cli-new.ts [args...]
7
7
  */
8
- import { EnvHttpProxyAgent, setGlobalDispatcher, fetch as undiciFetch } from "undici";
8
+ import { EnvHttpProxyAgent, setGlobalDispatcher } from "undici";
9
9
  import { APP_NAME } from "./config.js";
10
10
  import { main } from "./main.js";
11
11
  process.title = APP_NAME;
@@ -15,14 +15,6 @@ process.emitWarning = (() => { });
15
15
  // (e.g. vLLM buffering a large tool call) exceed that and abort the SSE stream
16
16
  // with UND_ERR_BODY_TIMEOUT. Disable both — provider SDKs enforce their own
17
17
  // AbortController-based deadlines via retry.provider.timeoutMs.
18
- // Node 26 uses an internal undici for globalThis.fetch that does not honor npm
19
- // undici's global dispatcher, so route global fetch through npm undici as well.
20
- const dispatcher = new EnvHttpProxyAgent({ bodyTimeout: 0, headersTimeout: 0 });
21
- setGlobalDispatcher(dispatcher);
22
- const fetchWithDispatcher = undiciFetch;
23
- globalThis.fetch = (input, init) => fetchWithDispatcher(input, {
24
- ...init,
25
- dispatcher,
26
- });
18
+ setGlobalDispatcher(new EnvHttpProxyAgent({ bodyTimeout: 0, headersTimeout: 0 }));
27
19
  main(process.argv.slice(2));
28
20
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC;AACzB,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,MAAM,CAAC;AACrC,OAAO,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE,CAAC,EAAC,CAAC,CAA+B,CAAC;AAE/D,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA4E;AAC5E,gEAAgE;AAChE,+EAA+E;AAC/E,gFAAgF;AAChF,MAAM,UAAU,GAAG,IAAI,iBAAiB,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC,CAAC;AAChF,mBAAmB,CAAC,UAAU,CAAC,CAAC;AAChC,MAAM,mBAAmB,GAAG,WAAsC,CAAC;AACnE,UAAU,CAAC,KAAK,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAClC,mBAAmB,CAAC,KAAK,EAAE;IAC1B,GAAG,IAAI;IACP,UAAU;CACgB,CAAC,CAAC;AAE9B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the refactored coding agent.\n * Uses main.ts with AgentSession and new mode modules.\n *\n * Test with: npx tsx src/cli-new.ts [args...]\n */\nimport { EnvHttpProxyAgent, setGlobalDispatcher, fetch as undiciFetch } from \"undici\";\nimport { APP_NAME } from \"./config.js\";\nimport { main } from \"./main.js\";\n\nprocess.title = APP_NAME;\nprocess.env.PI_CODING_AGENT = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\n// bodyTimeout/headersTimeout default to 300s in undici; long local-LLM stalls\n// (e.g. vLLM buffering a large tool call) exceed that and abort the SSE stream\n// with UND_ERR_BODY_TIMEOUT. Disable both — provider SDKs enforce their own\n// AbortController-based deadlines via retry.provider.timeoutMs.\n// Node 26 uses an internal undici for globalThis.fetch that does not honor npm\n// undici's global dispatcher, so route global fetch through npm undici as well.\nconst dispatcher = new EnvHttpProxyAgent({ bodyTimeout: 0, headersTimeout: 0 });\nsetGlobalDispatcher(dispatcher);\nconst fetchWithDispatcher = undiciFetch as unknown as typeof fetch;\nglobalThis.fetch = (input, init) =>\n\tfetchWithDispatcher(input, {\n\t\t...init,\n\t\tdispatcher,\n\t} as unknown as RequestInit);\n\nmain(process.argv.slice(2));\n"]}
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC;AACzB,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,MAAM,CAAC;AACrC,OAAO,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE,CAAC,EAAC,CAAC,CAA+B,CAAC;AAE/D,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA4E;AAC5E,gEAAgE;AAChE,mBAAmB,CAAC,IAAI,iBAAiB,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAElF,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the refactored coding agent.\n * Uses main.ts with AgentSession and new mode modules.\n *\n * Test with: npx tsx src/cli-new.ts [args...]\n */\nimport { EnvHttpProxyAgent, setGlobalDispatcher } from \"undici\";\nimport { APP_NAME } from \"./config.js\";\nimport { main } from \"./main.js\";\n\nprocess.title = APP_NAME;\nprocess.env.PI_CODING_AGENT = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\n// bodyTimeout/headersTimeout default to 300s in undici; long local-LLM stalls\n// (e.g. vLLM buffering a large tool call) exceed that and abort the SSE stream\n// with UND_ERR_BODY_TIMEOUT. Disable both — provider SDKs enforce their own\n// AbortController-based deadlines via retry.provider.timeoutMs.\nsetGlobalDispatcher(new EnvHttpProxyAgent({ bodyTimeout: 0, headersTimeout: 0 }));\n\nmain(process.argv.slice(2));\n"]}
@@ -201,6 +201,7 @@ export declare class AgentSession {
201
201
  /** Model registry for API key resolution and model discovery */
202
202
  get modelRegistry(): ModelRegistry;
203
203
  private _getRequiredRequestAuth;
204
+ private _getCompactionRequestAuth;
204
205
  /**
205
206
  * Install tool hooks once on the Agent instance.
206
207
  *