@earendil-works/pi-coding-agent 0.79.4 → 0.79.5

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 (68) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/bun/restore-sandbox-env.d.ts +4 -0
  3. package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
  4. package/dist/bun/restore-sandbox-env.js +4 -0
  5. package/dist/bun/restore-sandbox-env.js.map +1 -1
  6. package/dist/core/agent-session.d.ts.map +1 -1
  7. package/dist/core/agent-session.js +10 -7
  8. package/dist/core/agent-session.js.map +1 -1
  9. package/dist/core/auth-storage.d.ts +5 -0
  10. package/dist/core/auth-storage.d.ts.map +1 -1
  11. package/dist/core/auth-storage.js +8 -1
  12. package/dist/core/auth-storage.js.map +1 -1
  13. package/dist/core/compaction/branch-summarization.d.ts +2 -0
  14. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  15. package/dist/core/compaction/branch-summarization.js +2 -2
  16. package/dist/core/compaction/branch-summarization.js.map +1 -1
  17. package/dist/core/compaction/compaction.d.ts +2 -2
  18. package/dist/core/compaction/compaction.d.ts.map +1 -1
  19. package/dist/core/compaction/compaction.js +10 -10
  20. package/dist/core/compaction/compaction.js.map +1 -1
  21. package/dist/core/export-html/vendor/marked.min.js +75 -3
  22. package/dist/core/http-dispatcher.d.ts +1 -0
  23. package/dist/core/http-dispatcher.d.ts.map +1 -1
  24. package/dist/core/http-dispatcher.js +7 -0
  25. package/dist/core/http-dispatcher.js.map +1 -1
  26. package/dist/core/model-registry.d.ts +1 -0
  27. package/dist/core/model-registry.d.ts.map +1 -1
  28. package/dist/core/model-registry.js +8 -4
  29. package/dist/core/model-registry.js.map +1 -1
  30. package/dist/core/provider-attribution.d.ts.map +1 -1
  31. package/dist/core/provider-attribution.js +10 -0
  32. package/dist/core/provider-attribution.js.map +1 -1
  33. package/dist/core/resolve-config-value.d.ts +7 -7
  34. package/dist/core/resolve-config-value.d.ts.map +1 -1
  35. package/dist/core/resolve-config-value.js +19 -19
  36. package/dist/core/resolve-config-value.js.map +1 -1
  37. package/dist/core/sdk.d.ts.map +1 -1
  38. package/dist/core/sdk.js +2 -0
  39. package/dist/core/sdk.js.map +1 -1
  40. package/dist/core/settings-manager.d.ts +1 -0
  41. package/dist/core/settings-manager.d.ts.map +1 -1
  42. package/dist/core/settings-manager.js.map +1 -1
  43. package/dist/main.d.ts.map +1 -1
  44. package/dist/main.js +17 -5
  45. package/dist/main.js.map +1 -1
  46. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  47. package/dist/modes/interactive/components/footer.js +4 -0
  48. package/dist/modes/interactive/components/footer.js.map +1 -1
  49. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  50. package/dist/modes/interactive/components/login-dialog.js +0 -1
  51. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  52. package/dist/modes/interactive/components/session-selector.d.ts +0 -1
  53. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  54. package/dist/modes/interactive/components/session-selector.js +0 -5
  55. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  56. package/docs/providers.md +20 -2
  57. package/docs/settings.md +12 -0
  58. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  59. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  60. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  61. package/examples/extensions/gondolin/package-lock.json +2 -2
  62. package/examples/extensions/gondolin/package.json +1 -1
  63. package/examples/extensions/sandbox/package-lock.json +2 -2
  64. package/examples/extensions/sandbox/package.json +1 -1
  65. package/examples/extensions/with-deps/package-lock.json +2 -2
  66. package/examples/extensions/with-deps/package.json +1 -1
  67. package/npm-shrinkwrap.json +17 -17
  68. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ## [0.79.5] - 2026-06-16
6
+
7
+ ### New Features
8
+
9
+ - **Provider-scoped API key environments** - `auth.json` API key entries can now include `env` overrides for provider-specific Cloudflare, Azure OpenAI, Google Vertex, Amazon Bedrock, cache retention, and proxy settings without changing the project shell. See [Auth File](docs/providers.md#auth-file).
10
+ - **Global HTTP proxy setting** - Configure `httpProxy` once in global settings to apply `HTTP_PROXY` and `HTTPS_PROXY` to Pi-managed HTTP clients. See [Network](docs/settings.md#network).
11
+ - **Vercel AI Gateway attribution** - Vercel AI Gateway requests now include Pi attribution headers by default. See [API Keys](docs/providers.md#api-keys).
12
+
13
+ ### Added
14
+
15
+ - Added Vercel AI Gateway request attribution headers (`http-referer` and `x-title`) for Vercel AI Gateway models ([#5798](https://github.com/earendil-works/pi/pull/5798) by [@rwachtler](https://github.com/rwachtler)).
16
+ - Added an `xp` footer marker when experimental features are enabled.
17
+ - Added a global `httpProxy` setting that applies as `HTTP_PROXY` and `HTTPS_PROXY` for Pi-managed HTTP clients ([#5790](https://github.com/earendil-works/pi/issues/5790)).
18
+ - Added `auth.json` API key `env` values so provider-specific environment overrides can be scoped to Pi and propagated to inherited provider configuration ([#5728](https://github.com/earendil-works/pi/issues/5728)).
19
+
20
+ ### Changed
21
+
22
+ - Updated the vendored Markdown parser used by HTML session exports to `marked` 18.0.5.
23
+
24
+ ### Fixed
25
+
26
+ - Fixed inherited OpenAI Responses streaming to tolerate null message content from OpenAI-compatible servers before tool calls ([#5819](https://github.com/earendil-works/pi/issues/5819)).
27
+ - Fixed inherited OpenCode DeepSeek V4 thinking requests to avoid sending both `thinking` and `reasoning_effort` ([#5818](https://github.com/earendil-works/pi/issues/5818)).
28
+ - Fixed device-code login to stop opening the browser automatically.
29
+ - Fixed inherited editor Cursor Up handling so non-empty drafts jump to the start of the line before browsing input history ([#5789](https://github.com/earendil-works/pi/pull/5789) by [@4h9fbZ](https://github.com/4h9fbZ)).
30
+ - Fixed inherited Z.AI GLM-5.2 thinking requests to send `reasoning_effort` with the provider's `high`/`max` effort mapping ([#5770](https://github.com/earendil-works/pi/issues/5770)).
31
+ - Fixed successful `pi update` on Windows to exit naturally instead of calling `process.exit(0)`, avoiding a Node.js/libuv assertion after version-check network requests ([#5805](https://github.com/earendil-works/pi/issues/5805)).
32
+ - Fixed inherited Google and `google-vertex` Gemini model metadata to map `latest` aliases to the current models, add Gemini 3.5 Flash for Vertex, correct Gemini 2.5 Flash Vertex cache pricing, and remove shut-down Vertex preview models ([#5761](https://github.com/earendil-works/pi/issues/5761)).
33
+ - Fixed the session selector to stay open and show the all-sessions empty state when both current-folder and all-scope session lists are empty ([#5747](https://github.com/earendil-works/pi/issues/5747)).
34
+ - Fixed inherited Moonshot AI China model metadata to include Kimi K2.7 Code, and omitted unsupported thinking-off payloads for Kimi K2.7 Code models ([#5760](https://github.com/earendil-works/pi/issues/5760)).
35
+
3
36
  ## [0.79.4] - 2026-06-15
4
37
 
5
38
  ### New Features
@@ -4,6 +4,10 @@
4
4
  * Bun compiled binaries have an empty `process.env` when running inside
5
5
  * sandbox environments (e.g. nono on Linux/macOS). On Linux we can recover
6
6
  * the environment from `/proc/self/environ`.
7
+ *
8
+ * Keep this in sync with getBunSandboxEnvValue() in
9
+ * packages/ai/src/utils/provider-env.ts. The ai package duplicates the lookup
10
+ * for direct consumers that do not go through this coding-agent entrypoint.
7
11
  */
8
12
  /**
9
13
  * Restore environment variables from `/proc/self/environ` when running
@@ -1 +1 @@
1
- {"version":3,"file":"restore-sandbox-env.d.ts","sourceRoot":"","sources":["../../src/bun/restore-sandbox-env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAiBxC","sourcesContent":["/**\n * Workaround for https://github.com/oven-sh/bun/issues/27802\n *\n * Bun compiled binaries have an empty `process.env` when running inside\n * sandbox environments (e.g. nono on Linux/macOS). On Linux we can recover\n * the environment from `/proc/self/environ`.\n */\n\nimport { readFileSync } from \"node:fs\";\n\n/**\n * Restore environment variables from `/proc/self/environ` when running\n * inside a sandbox where Bun's `process.env` is empty.\n */\nexport function restoreSandboxEnv(): void {\n\tif (!process.versions?.bun) return;\n\n\t// If process.env already has entries, nothing to fix.\n\tif (Object.keys(process.env).length > 0) return;\n\n\ttry {\n\t\tconst data = readFileSync(\"/proc/self/environ\", \"utf-8\");\n\t\tfor (const entry of data.split(\"\\0\")) {\n\t\t\tconst idx = entry.indexOf(\"=\");\n\t\t\tif (idx > 0) {\n\t\t\t\tprocess.env[entry.slice(0, idx)] = entry.slice(idx + 1);\n\t\t\t}\n\t\t}\n\t} catch {\n\t\t// /proc/self/environ may not be readable; ignore.\n\t}\n}\n"]}
1
+ {"version":3,"file":"restore-sandbox-env.d.ts","sourceRoot":"","sources":["../../src/bun/restore-sandbox-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAiBxC","sourcesContent":["/**\n * Workaround for https://github.com/oven-sh/bun/issues/27802\n *\n * Bun compiled binaries have an empty `process.env` when running inside\n * sandbox environments (e.g. nono on Linux/macOS). On Linux we can recover\n * the environment from `/proc/self/environ`.\n *\n * Keep this in sync with getBunSandboxEnvValue() in\n * packages/ai/src/utils/provider-env.ts. The ai package duplicates the lookup\n * for direct consumers that do not go through this coding-agent entrypoint.\n */\n\nimport { readFileSync } from \"node:fs\";\n\n/**\n * Restore environment variables from `/proc/self/environ` when running\n * inside a sandbox where Bun's `process.env` is empty.\n */\nexport function restoreSandboxEnv(): void {\n\tif (!process.versions?.bun) return;\n\n\t// If process.env already has entries, nothing to fix.\n\tif (Object.keys(process.env).length > 0) return;\n\n\ttry {\n\t\tconst data = readFileSync(\"/proc/self/environ\", \"utf-8\");\n\t\tfor (const entry of data.split(\"\\0\")) {\n\t\t\tconst idx = entry.indexOf(\"=\");\n\t\t\tif (idx > 0) {\n\t\t\t\tprocess.env[entry.slice(0, idx)] = entry.slice(idx + 1);\n\t\t\t}\n\t\t}\n\t} catch {\n\t\t// /proc/self/environ may not be readable; ignore.\n\t}\n}\n"]}
@@ -4,6 +4,10 @@
4
4
  * Bun compiled binaries have an empty `process.env` when running inside
5
5
  * sandbox environments (e.g. nono on Linux/macOS). On Linux we can recover
6
6
  * the environment from `/proc/self/environ`.
7
+ *
8
+ * Keep this in sync with getBunSandboxEnvValue() in
9
+ * packages/ai/src/utils/provider-env.ts. The ai package duplicates the lookup
10
+ * for direct consumers that do not go through this coding-agent entrypoint.
7
11
  */
8
12
  import { readFileSync } from "node:fs";
9
13
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"restore-sandbox-env.js","sourceRoot":"","sources":["../../src/bun/restore-sandbox-env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,iBAAiB,GAAS;IACzC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG;QAAE,OAAO;IAEnC,sDAAsD;IACtD,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO;IAEhD,IAAI,CAAC;QACJ,MAAM,IAAI,GAAG,YAAY,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QACzD,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YACtC,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAC/B,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;YACzD,CAAC;QACF,CAAC;IACF,CAAC;IAAC,MAAM,CAAC;QACR,kDAAkD;IACnD,CAAC;AAAA,CACD","sourcesContent":["/**\n * Workaround for https://github.com/oven-sh/bun/issues/27802\n *\n * Bun compiled binaries have an empty `process.env` when running inside\n * sandbox environments (e.g. nono on Linux/macOS). On Linux we can recover\n * the environment from `/proc/self/environ`.\n */\n\nimport { readFileSync } from \"node:fs\";\n\n/**\n * Restore environment variables from `/proc/self/environ` when running\n * inside a sandbox where Bun's `process.env` is empty.\n */\nexport function restoreSandboxEnv(): void {\n\tif (!process.versions?.bun) return;\n\n\t// If process.env already has entries, nothing to fix.\n\tif (Object.keys(process.env).length > 0) return;\n\n\ttry {\n\t\tconst data = readFileSync(\"/proc/self/environ\", \"utf-8\");\n\t\tfor (const entry of data.split(\"\\0\")) {\n\t\t\tconst idx = entry.indexOf(\"=\");\n\t\t\tif (idx > 0) {\n\t\t\t\tprocess.env[entry.slice(0, idx)] = entry.slice(idx + 1);\n\t\t\t}\n\t\t}\n\t} catch {\n\t\t// /proc/self/environ may not be readable; ignore.\n\t}\n}\n"]}
1
+ {"version":3,"file":"restore-sandbox-env.js","sourceRoot":"","sources":["../../src/bun/restore-sandbox-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,iBAAiB,GAAS;IACzC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG;QAAE,OAAO;IAEnC,sDAAsD;IACtD,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO;IAEhD,IAAI,CAAC;QACJ,MAAM,IAAI,GAAG,YAAY,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QACzD,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YACtC,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAC/B,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;YACzD,CAAC;QACF,CAAC;IACF,CAAC;IAAC,MAAM,CAAC;QACR,kDAAkD;IACnD,CAAC;AAAA,CACD","sourcesContent":["/**\n * Workaround for https://github.com/oven-sh/bun/issues/27802\n *\n * Bun compiled binaries have an empty `process.env` when running inside\n * sandbox environments (e.g. nono on Linux/macOS). On Linux we can recover\n * the environment from `/proc/self/environ`.\n *\n * Keep this in sync with getBunSandboxEnvValue() in\n * packages/ai/src/utils/provider-env.ts. The ai package duplicates the lookup\n * for direct consumers that do not go through this coding-agent entrypoint.\n */\n\nimport { readFileSync } from \"node:fs\";\n\n/**\n * Restore environment variables from `/proc/self/environ` when running\n * inside a sandbox where Bun's `process.env` is empty.\n */\nexport function restoreSandboxEnv(): void {\n\tif (!process.versions?.bun) return;\n\n\t// If process.env already has entries, nothing to fix.\n\tif (Object.keys(process.env).length > 0) return;\n\n\ttry {\n\t\tconst data = readFileSync(\"/proc/self/environ\", \"utf-8\");\n\t\tfor (const entry of data.split(\"\\0\")) {\n\t\t\tconst idx = entry.indexOf(\"=\");\n\t\t\tif (idx > 0) {\n\t\t\t\tprocess.env[entry.slice(0, idx)] = entry.slice(idx + 1);\n\t\t\t}\n\t\t}\n\t} catch {\n\t\t// /proc/self/environ may not be readable; ignore.\n\t}\n}\n"]}