@mariozechner/pi-coding-agent 0.56.2 → 0.57.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +3 -1
  3. package/dist/core/agent-session.d.ts +1 -0
  4. package/dist/core/agent-session.d.ts.map +1 -1
  5. package/dist/core/agent-session.js +50 -17
  6. package/dist/core/agent-session.js.map +1 -1
  7. package/dist/core/auth-storage.d.ts +1 -0
  8. package/dist/core/auth-storage.d.ts.map +1 -1
  9. package/dist/core/auth-storage.js +25 -1
  10. package/dist/core/auth-storage.js.map +1 -1
  11. package/dist/core/compaction/utils.d.ts +3 -0
  12. package/dist/core/compaction/utils.d.ts.map +1 -1
  13. package/dist/core/compaction/utils.js +16 -1
  14. package/dist/core/compaction/utils.js.map +1 -1
  15. package/dist/core/extensions/index.d.ts +1 -1
  16. package/dist/core/extensions/index.d.ts.map +1 -1
  17. package/dist/core/extensions/index.js.map +1 -1
  18. package/dist/core/extensions/runner.d.ts +3 -2
  19. package/dist/core/extensions/runner.d.ts.map +1 -1
  20. package/dist/core/extensions/runner.js +32 -0
  21. package/dist/core/extensions/runner.js.map +1 -1
  22. package/dist/core/extensions/types.d.ts +8 -1
  23. package/dist/core/extensions/types.d.ts.map +1 -1
  24. package/dist/core/extensions/types.js.map +1 -1
  25. package/dist/core/package-manager.d.ts.map +1 -1
  26. package/dist/core/package-manager.js +1 -1
  27. package/dist/core/package-manager.js.map +1 -1
  28. package/dist/core/sdk.d.ts.map +1 -1
  29. package/dist/core/sdk.js +7 -0
  30. package/dist/core/sdk.js.map +1 -1
  31. package/dist/core/settings-manager.d.ts +1 -0
  32. package/dist/core/settings-manager.d.ts.map +1 -1
  33. package/dist/core/settings-manager.js +26 -2
  34. package/dist/core/settings-manager.js.map +1 -1
  35. package/dist/index.d.ts +1 -1
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js.map +1 -1
  38. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  39. package/dist/modes/interactive/interactive-mode.js +13 -4
  40. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  41. package/dist/modes/rpc/jsonl.d.ts +17 -0
  42. package/dist/modes/rpc/jsonl.d.ts.map +1 -0
  43. package/dist/modes/rpc/jsonl.js +49 -0
  44. package/dist/modes/rpc/jsonl.js.map +1 -0
  45. package/dist/modes/rpc/rpc-client.d.ts +1 -1
  46. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  47. package/dist/modes/rpc/rpc-client.js +7 -11
  48. package/dist/modes/rpc/rpc-client.js.map +1 -1
  49. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  50. package/dist/modes/rpc/rpc-mode.js +9 -11
  51. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  52. package/docs/compaction.md +2 -0
  53. package/docs/extensions.md +30 -1
  54. package/docs/rpc.md +40 -3
  55. package/docs/tmux.md +39 -0
  56. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  57. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  58. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  59. package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
  60. package/examples/extensions/overlay-qa-tests.ts +468 -1
  61. package/examples/extensions/provider-payload.ts +14 -0
  62. package/examples/extensions/with-deps/index.ts +1 -5
  63. package/examples/extensions/with-deps/package-lock.json +2 -2
  64. package/examples/extensions/with-deps/package.json +1 -1
  65. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,58 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.57.0] - 2026-03-07
4
+
5
+ ### New Features
6
+
7
+ - Extensions can intercept and modify provider request payloads via `before_provider_request`. See [docs/extensions.md#before_provider_request](docs/extensions.md#before_provider_request).
8
+ - Extension UIs can use non-capturing overlays with explicit focus control via `OverlayOptions.nonCapturing` and `OverlayHandle.focus()` / `unfocus()` / `isFocused()`. See [docs/extensions.md](docs/extensions.md) and [../tui/README.md](../tui/README.md).
9
+ - RPC mode now uses strict LF-only JSONL framing for robust payload handling. See [docs/rpc.md](docs/rpc.md).
10
+
11
+ ### Breaking Changes
12
+
13
+ - RPC mode now uses strict LF-delimited JSONL framing. Clients must split records on `\n` only instead of using generic line readers such as Node `readline`, which also split on Unicode separators inside JSON payloads ([#1911](https://github.com/badlogic/pi-mono/issues/1911))
14
+
15
+ ### Added
16
+
17
+ - Added `before_provider_request` extension hook so extensions can inspect or replace provider payloads before requests are sent, with an example in `examples/extensions/provider-payload.ts`
18
+ - Added non-capturing overlay focus control for extension UIs via `OverlayOptions.nonCapturing` and `OverlayHandle.focus()` / `unfocus()` / `isFocused()` ([#1916](https://github.com/badlogic/pi-mono/pull/1916) by [@nicobailon](https://github.com/nicobailon))
19
+
20
+ ### Changed
21
+
22
+ - Overlay compositing in extension UIs now uses focus order so focused overlays render on top while preserving stack semantics for show/hide behavior ([#1916](https://github.com/badlogic/pi-mono/pull/1916) by [@nicobailon](https://github.com/nicobailon))
23
+
24
+ ### Fixed
25
+
26
+ - Fixed RPC mode stdin/stdout framing to use strict LF-delimited JSONL instead of `readline`, so payloads containing `U+2028` or `U+2029` no longer corrupt command or event streams ([#1911](https://github.com/badlogic/pi-mono/issues/1911))
27
+ - Fixed automatic overlay focus restoration in extension UIs to skip non-capturing overlays, and fixed overlay hide behavior to only reassign focus when the hidden overlay had focus ([#1916](https://github.com/badlogic/pi-mono/pull/1916) by [@nicobailon](https://github.com/nicobailon))
28
+ - Fixed `pi config` misclassifying `~/.agents/skills` as project-scoped in non-git directories under `$HOME`, so toggling those skills no longer writes project overrides to `.pi/settings.json` ([#1915](https://github.com/badlogic/pi-mono/issues/1915))
29
+
30
+ ## [0.56.3] - 2026-03-06
31
+
32
+ ### New Features
33
+
34
+ - `claude-sonnet-4-6` model available via the `google-antigravity` provider ([#1859](https://github.com/badlogic/pi-mono/issues/1859))
35
+ - Custom editors can now define their own `onEscape`/`onCtrlD` handlers without being overwritten by app defaults, enabling vim-mode extensions ([#1838](https://github.com/badlogic/pi-mono/issues/1838))
36
+ - Shift+Enter and Ctrl+Enter now work inside tmux via xterm modifyOtherKeys fallback ([docs/tmux.md](docs/tmux.md), [#1872](https://github.com/badlogic/pi-mono/issues/1872))
37
+ - Auto-compaction is now resilient to persistent API errors (e.g. 529 overloaded) and no longer retriggers spuriously after compaction ([#1834](https://github.com/badlogic/pi-mono/issues/1834), [#1860](https://github.com/badlogic/pi-mono/issues/1860))
38
+
39
+ ### Added
40
+
41
+ - Added `claude-sonnet-4-6` model for the `google-antigravity` provider ([#1859](https://github.com/badlogic/pi-mono/issues/1859)).
42
+ - Added [tmux setup documentation](docs/tmux.md) for modified enter key support ([#1872](https://github.com/badlogic/pi-mono/issues/1872))
43
+
44
+ ### Fixed
45
+
46
+ - Fixed custom editors having their `onEscape`/`onCtrlD` handlers unconditionally overwritten by app-level defaults, making vim-style escape handling impossible ([#1838](https://github.com/badlogic/pi-mono/issues/1838))
47
+ - Fixed auto-compaction retriggering on the first prompt after compaction due to stale pre-compaction assistant usage ([#1860](https://github.com/badlogic/pi-mono/issues/1860) by [@joelhooks](https://github.com/joelhooks))
48
+ - Fixed sessions never auto-compacting when hitting persistent API errors (e.g. 529 overloaded) by estimating context size from the last successful response ([#1834](https://github.com/badlogic/pi-mono/issues/1834))
49
+ - Fixed compaction summarization requests exceeding context limits by truncating tool results to 2k chars ([#1796](https://github.com/badlogic/pi-mono/issues/1796))
50
+ - Fixed `/new` leaving startup header content, including the changelog, visible after starting a fresh session ([#1880](https://github.com/badlogic/pi-mono/issues/1880))
51
+ - Fixed misleading docs and example implying that returning `{ isError: true }` from a tool's `execute` function marks the execution as failed; errors must be signaled by throwing ([#1881](https://github.com/badlogic/pi-mono/issues/1881))
52
+ - Fixed model switches through non-reasoning models to preserve the saved default thinking level instead of persisting a capability-forced `off` clamp ([#1864](https://github.com/badlogic/pi-mono/issues/1864))
53
+ - Fixed parallel pi processes failing with false "No API key found" errors due to immediate lockfile contention on `auth.json` and `settings.json` ([#1871](https://github.com/badlogic/pi-mono/issues/1871))
54
+ - Fixed OpenAI Responses reasoning replay regression that broke multi-turn reasoning continuity ([#1878](https://github.com/badlogic/pi-mono/issues/1878))
55
+
3
56
  ## [0.56.2] - 2026-03-05
4
57
 
5
58
  ### New Features
package/README.md CHANGED
@@ -68,7 +68,7 @@ pi
68
68
 
69
69
  Then just talk to pi. By default, pi gives the model four tools: `read`, `write`, `edit`, and `bash`. The model uses these to fulfill your requests. Add capabilities via [skills](#skills), [prompt templates](#prompt-templates), [extensions](#extensions), or [pi packages](#pi-packages).
70
70
 
71
- **Platform notes:** [Windows](docs/windows.md) | [Termux (Android)](docs/termux.md) | [Terminal setup](docs/terminal-setup.md) | [Shell aliases](docs/shell-aliases.md)
71
+ **Platform notes:** [Windows](docs/windows.md) | [Termux (Android)](docs/termux.md) | [tmux](docs/tmux.md) | [Terminal setup](docs/terminal-setup.md) | [Shell aliases](docs/shell-aliases.md)
72
72
 
73
73
  ---
74
74
 
@@ -395,6 +395,8 @@ For non-Node.js integrations, use RPC mode over stdin/stdout:
395
395
  pi --mode rpc
396
396
  ```
397
397
 
398
+ RPC mode uses strict LF-delimited JSONL framing. Clients must split records on `\n` only. Do not use generic line readers like Node `readline`, which also split on Unicode separators inside JSON payloads.
399
+
398
400
  See [docs/rpc.md](docs/rpc.md) for the protocol.
399
401
 
400
402
  ---
@@ -405,6 +405,7 @@ export declare class AgentSession {
405
405
  * Check if current model supports thinking/reasoning.
406
406
  */
407
407
  supportsThinking(): boolean;
408
+ private _getThinkingLevelForModelSwitch;
408
409
  private _clampThinkingLevel;
409
410
  /**
410
411
  * Set steering message mode.