@kingingwang/pi-darwin-arm64 0.84.4 → 0.85.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 (37) hide show
  1. package/bin/CHANGELOG.md +75 -5
  2. package/bin/README.md +1 -1
  3. package/bin/docs/containerization.md +45 -0
  4. package/bin/docs/development.md +19 -0
  5. package/bin/docs/environment-variables.md +2 -0
  6. package/bin/docs/extensions.md +5 -2
  7. package/bin/docs/keybindings.md +5 -2
  8. package/bin/docs/models.md +4 -1
  9. package/bin/docs/rpc.md +1 -1
  10. package/bin/docs/sdk.md +5 -0
  11. package/bin/docs/settings.md +5 -5
  12. package/bin/docs/skills.md +1 -1
  13. package/bin/docs/terminal-setup.md +15 -0
  14. package/bin/docs/themes.md +8 -6
  15. package/bin/docs/tui.md +20 -1
  16. package/bin/examples/README.md +3 -0
  17. package/bin/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  18. package/bin/examples/extensions/custom-provider-anthropic/package.json +1 -1
  19. package/bin/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  20. package/bin/examples/extensions/dynamic-resources/dynamic.json +2 -0
  21. package/bin/examples/extensions/gondolin/package-lock.json +2 -2
  22. package/bin/examples/extensions/gondolin/package.json +1 -1
  23. package/bin/examples/extensions/sandbox/package-lock.json +2 -2
  24. package/bin/examples/extensions/sandbox/package.json +1 -1
  25. package/bin/examples/extensions/with-deps/package-lock.json +2 -2
  26. package/bin/examples/extensions/with-deps/package.json +1 -1
  27. package/bin/examples/plugins/pi-example-plugin/README.md +38 -0
  28. package/bin/examples/plugins/pi-example-plugin/package.json +10 -0
  29. package/bin/examples/plugins/pi-example-plugin/src/contract.ts +13 -0
  30. package/bin/examples/plugins/pi-example-plugin/src/session.ts +23 -0
  31. package/bin/examples/plugins/pi-example-plugin/src/tui.ts +31 -0
  32. package/bin/package.json +15 -8
  33. package/bin/pi +0 -0
  34. package/bin/theme/dark.json +2 -1
  35. package/bin/theme/light.json +2 -1
  36. package/bin/theme/theme-schema.json +6 -2
  37. package/package.json +1 -1
package/bin/CHANGELOG.md CHANGED
@@ -1,5 +1,71 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.85.1] - 2026-09-05
4
+
5
+ ### New Features
6
+
7
+ - **GPT-6 Astra** — Available through OpenAI API keys and OpenAI Codex subscriptions. See [API Keys](docs/providers.md#api-keys) and [OpenAI Codex](docs/providers.md#openai-codex).
8
+
9
+ ### Added
10
+
11
+ - Added GPT-6 Astra for OpenAI API keys and OpenAI Codex subscriptions.
12
+ - Added five-times-faster mouse wheel scrolling while holding Alt in fullscreen mode ([#9166](https://github.com/earendil-works/pi/pull/9166) by [@xl0](https://github.com/xl0)).
13
+
14
+ ### Fixed
15
+
16
+ - Fixed configurable save keybindings in the model and thinking selectors ([#9149](https://github.com/earendil-works/pi/pull/9149) by [@rwachtler](https://github.com/rwachtler)).
17
+ - Fixed SDK import failures caused by unintentionally publishing internal experimental code and dependencies in 0.85.0. The experimental `client` and `experimental/plugin` subpaths and server/client commands are now source-only through `pi-test.sh`; the supported local SDK and stdio RPC API are unchanged ([#9132](https://github.com/earendil-works/pi/issues/9132)).
18
+ - Fixed mouse hover changing selection and recentering autocomplete and settings lists, causing clicks to target a different item.
19
+ - Fixed long prompt-cache requests for GPT-5.6+ Responses models to use `prompt_cache_options.ttl: "30m"` instead of `prompt_cache_retention: "24h"`.
20
+
21
+ ## [0.85.0] - 2026-09-04
22
+
23
+ ### New Features
24
+
25
+ - **Persistent Claude thinking effort** — Supported Anthropic transports preserve per-turn effort and recover safely from signed-thinking mismatches. See [Model Configuration](docs/models.md#model-configuration).
26
+ - **Fullscreen transcript controls** — Jump to the latest message from a scrolled transcript and use the embedded working indicator. See [TUI Fullscreen Viewport](docs/keybindings.md#tui-fullscreen-viewport).
27
+ - **Restorable in-memory sessions** — Resume externally stored session entries through the SDK. See [Session Management](docs/sdk.md#session-management).
28
+
29
+ ### Added
30
+
31
+ - Added `SessionManager.inMemory()` support for restoring externally managed session entries ([#8980](https://github.com/earendil-works/pi/pull/8980) by [@y-nk](https://github.com/y-nk)).
32
+ - Added inherited OpenAI-compatible `vllmPriority` and `supportsMaxOutputTokens` model settings for vLLM scheduler priority and OpenAI Responses output-token limits ([#9004](https://github.com/earendil-works/pi/pull/9004) by [@AppleDannyClegg](https://github.com/AppleDannyClegg), [#8941](https://github.com/earendil-works/pi/pull/8941) by [@scturtle](https://github.com/scturtle)).
33
+ - Added inherited LaTeX rendering for relational algebra join symbols ([#9050](https://github.com/earendil-works/pi/pull/9050) by [@haoqixu](https://github.com/haoqixu)).
34
+ - Added a clickable "Jump to latest message" label with the `tui.altScreen.bottom` shortcut to the fullscreen transcript while it is scrolled up ([#9080](https://github.com/earendil-works/pi/pull/9080) by [@rwachtler](https://github.com/rwachtler)).
35
+
36
+ ### Changed
37
+
38
+ - Moved the streaming working indicator into the default editor border and matched its default spinner and label to the thinking-level border color. Custom editors retain the standalone indicator unless they opt in to embedding it ([#8799](https://github.com/earendil-works/pi/pull/8799) by [@cristinaponcela](https://github.com/cristinaponcela)).
39
+ - Reduced inherited fullscreen transcript search latency on large transcripts by caching unchanged search results, indexing ASCII runs, and limiting highlight work to visible matches ([#8800](https://github.com/earendil-works/pi/pull/8800) by [@cristinaponcela](https://github.com/cristinaponcela)).
40
+
41
+ ### Fixed
42
+
43
+ - Fixed managed `fd` and ripgrep downloads on Linux musl systems ([#9070](https://github.com/earendil-works/pi/pull/9070) by [@Charlie0113-T](https://github.com/Charlie0113-T)).
44
+ - Removed the unavailable inherited Grok Build 0.1 model from `/model` ([#9093](https://github.com/earendil-works/pi/pull/9093) by [@Jaaneek](https://github.com/Jaaneek)).
45
+ - Fixed inherited provider streams emitting incompatible event sequences and custom tool-call deltas.
46
+ - Restored the `@earendil-works/pi-coding-agent/client` compatibility entry point.
47
+ - Fixed the inherited Qwen Token Plan Individual catalog to include Qwen3.8 Flash ([#9021](https://github.com/earendil-works/pi/issues/9021)).
48
+ - Fixed inherited OpenAI Codex SSE parsing to process terminal events that are not followed by a blank line ([#9047](https://github.com/earendil-works/pi/issues/9047)).
49
+ - Fixed inherited GitHub Copilot Claude Fable 5 requests so selected reasoning levels are sent ([#8961](https://github.com/earendil-works/pi/issues/8961)).
50
+ - Fixed inherited Baseten GLM-5.2 models incorrectly advertising image input support ([#8293](https://github.com/earendil-works/pi/pull/8293) by [@Panoplos](https://github.com/Panoplos)).
51
+ - Fixed skills being unavailable when Bash is the only enabled tool ([#8552](https://github.com/earendil-works/pi/pull/8552) by [@xl0](https://github.com/xl0)).
52
+ - Fixed concurrent session shares overwriting one another ([#8613](https://github.com/earendil-works/pi/pull/8613) by [@wutongyuonce](https://github.com/wutongyuonce)).
53
+ - Fixed image orientation detection skipping EXIF data after non-EXIF APP1 segments ([#8616](https://github.com/earendil-works/pi/pull/8616) by [@wutongyuonce](https://github.com/wutongyuonce)).
54
+ - Fixed imported sessions overwriting an existing session with the same filename ([#8985](https://github.com/earendil-works/pi/pull/8985) by [@wutongyuonce](https://github.com/wutongyuonce)).
55
+ - Fixed session forks losing their compaction boundary ([#8990](https://github.com/earendil-works/pi/pull/8990) by [@acmerfight](https://github.com/acmerfight)).
56
+ - Fixed in-memory session forks before an active turn settled ([#8937](https://github.com/earendil-works/pi/pull/8937) by [@acmerfight](https://github.com/acmerfight)).
57
+ - Fixed inherited Fireworks GLM models using the wrong API adapter.
58
+ - Fixed inherited `NO_PROXY` matching for root domains and subdomains ([#8737](https://github.com/earendil-works/pi/pull/8737) by [@MeiSiristhebest](https://github.com/MeiSiristhebest)).
59
+ - Fixed `bash`, `edit`, `find`, `grep`, `ls`, `read`, and `write` tools ignoring `ctx.cwd` ([#8627](https://github.com/earendil-works/pi/pull/8627) by [@vmizg](https://github.com/vmizg)).
60
+ - Fixed inherited terminal startup under restricted seccomp policies that reject the `SIGWINCH` self-signal ([#8898](https://github.com/earendil-works/pi/pull/8898) by [@bartlomiejkida](https://github.com/bartlomiejkida)).
61
+ - Fixed inherited Zed terminal image capability detection ([#8828](https://github.com/earendil-works/pi/pull/8828) by [@Perlence](https://github.com/Perlence)).
62
+ - Fixed drag selection continuing over the fullscreen editor.
63
+ - Fixed managed `fd` and ripgrep downloads requiring the GitHub Releases API ([#8708](https://github.com/earendil-works/pi/pull/8708) by [@Terminator666666](https://github.com/Terminator666666)).
64
+ - Fixed branch summaries failing when reasoning consumes the previous 2048-token output cap ([#8845](https://github.com/earendil-works/pi/issues/8845)).
65
+ - Fixed the write tool reporting UTF-16 code-unit counts as byte counts by removing the misleading count ([#8979](https://github.com/earendil-works/pi/issues/8979)).
66
+ - Fixed proxied plain-HTTP provider requests hanging after a tool call by tunneling them with CONNECT ([#8134](https://github.com/earendil-works/pi/issues/8134)).
67
+ - Fixed RPC `abort` reporting success without cancelling an in-progress manual compaction ([#8920](https://github.com/earendil-works/pi/issues/8920)).
68
+
3
69
  ## [0.84.4] - 2026-08-28
4
70
 
5
71
  ### New Features
@@ -12,6 +78,8 @@
12
78
 
13
79
  ### Added
14
80
 
81
+ - Added `supportsMidConvoEffort` to custom Anthropic Messages model compatibility settings.
82
+ - Added transcript notices for Anthropic thinking blocks dropped during provider recovery when cache miss notices are enabled.
15
83
  - Added `ui_prompt_start` and `ui_prompt_end` extension events so host integrations can distinguish active agent work from waiting on user-facing `ctx.ui` prompts ([#8355](https://github.com/earendil-works/pi/pull/8355) by [@cristinaponcela](https://github.com/cristinaponcela)).
16
84
  - Added `detectSupportedImageMimeTypeFromFile()` to the public library exports ([#8600](https://github.com/earendil-works/pi/pull/8600) by [@xl0](https://github.com/xl0)).
17
85
  - Added inherited experimental vision-capable `deepseek-v4-flash-vision-exp` model support.
@@ -20,6 +88,11 @@
20
88
  - Added environment variables and advanced settings for overriding auto-detected terminal hyperlink, image, and truecolor capabilities ([#8665](https://github.com/earendil-works/pi/issues/8665)).
21
89
  - Added `fullscreenCopyOnSelect` to disable automatic fullscreen selection copy; when disabled, `Ctrl+X` copies the active text selection before falling back to the last assistant message, while `/tree` still copies the selected message ([#7720](https://github.com/earendil-works/pi/issues/7720)).
22
90
 
91
+ ### Changed
92
+ - Changed fullscreen scrollbars to reveal on pointer entry, support optional `scrollbarTrack` and `scrollbarThumb` theme colors with muted and text fallbacks, keep one thumb color across normal and expanded states, and support track-click jumping.
93
+ - Changed fullscreen transcript search arrows to underline on hover and capitalized the search placeholder.
94
+ - Changed selectors in `/thinking`, `/model`, `/scoped-models`, `/trust`, per-model thinking settings, and theme settings to keep active options marked while browsing. `/scoped-models` now uses consistent per-item toggles and strikes through unavailable models ([#8900](https://github.com/earendil-works/pi/pull/8900)).
95
+
23
96
  ### Fixed
24
97
 
25
98
  - Fixed toggling thinking visibility clearing partial output from running Bash tools ([#8611](https://github.com/earendil-works/pi/issues/8611)).
@@ -57,11 +130,7 @@
57
130
  - Added an optional `powershell` tool for Windows, configurable through `defaultTools` and the SDK. See [PowerShell Tool](docs/windows.md#powershell-tool).
58
131
  - Added a `/thinking` selector and searchable default choices to the model and thinking selectors; Ctrl+S saves the selected model as the global default. See [Models and Thinking](docs/keybindings.md#models-and-thinking).
59
132
  - Added optional routing session IDs to exported compaction summary helpers so callers can preserve provider routing without enabling prompt cache writes.
60
- - Added
61
-
62
-
63
-
64
- usage notices for compaction and branch summaries when cache miss notices are enabled.
133
+ - Added transcript usage notices for compaction and branch summaries when cache miss notices are enabled.
65
134
  - Added `session_compact_failed` extension events so compaction failures and aborts expose their reason, retry state, source, and error message to handlers ([#8175](https://github.com/earendil-works/pi/issues/8175)).
66
135
  - Added inherited provider-neutral `toolChoice` support to simple stream requests.
67
136
  - Added inherited automatic Anthropic server-side refusal fallback for supported first-party models, including returned-model usage pricing ([#8017](https://github.com/earendil-works/pi/issues/8017)).
@@ -135,6 +204,7 @@ usage notices for compaction and branch summaries when cache miss notices are en
135
204
 
136
205
  ### Added
137
206
 
207
+ - Added per-block fullscreen mouse expansion for thinking sections and tool results, while preserving drag selection and link activation.
138
208
  - Added fullscreen transcript search with `Ctrl+Shift+F`, incremental match highlighting, configurable search match theme colors, and next/previous navigation with `Enter`/`Ctrl+G` and `Shift+Enter`/`Ctrl+Shift+G`.
139
209
  - Added experimental strict JSON-schema constrained sampling for the default `read`, `bash`, `edit`, and `write` tools under `PI_EXPERIMENTAL=1`.
140
210
  - Added a fullscreen exit output setting to choose between printing the final transcript and only a session resume hint.
package/bin/README.md CHANGED
@@ -152,7 +152,7 @@ The interface from top to bottom:
152
152
 
153
153
  - **Startup header** - Shows shortcuts (`/hotkeys` for all), loaded AGENTS.md files, prompt templates, skills, and extensions
154
154
  - **Messages** - Your messages, assistant responses, tool calls and results, notifications, errors, and extension UI
155
- - **Editor** - Where you type; border color indicates thinking level
155
+ - **Editor** - Where you type; border color indicates thinking level and the border shows the streaming working indicator
156
156
  - **Footer** - Working directory, session name, total token/cache usage (`↑` input, `↓` output, `R` cache read, `W` cache write, `CH` latest cache hit rate), cost, context usage, current model. Totals include assistant responses, usage reported by tools, and summary generation.
157
157
 
158
158
  The editor can be temporarily replaced by other UI, like built-in `/settings` or custom UI from extensions (e.g., a Q&A tool that lets the user answer model questions in a structured format). [Extensions](#extensions) can also replace the editor, add widgets above/below it, a status line, custom footer, or overlays.
@@ -13,6 +13,7 @@ There are two general options. You can either
13
13
  | Gondolin extension | Built-in tools and `!` commands | Local micro-VM isolation while keeping auth on host | See [`examples/extensions/gondolin/`](../examples/extensions/gondolin/). |
14
14
  | Plain Docker | Whole `pi` process in a local container | Simple local isolation | Provider API keys enter the container. |
15
15
  | OpenShell | Whole `pi` process in a policy-controlled sandbox | Local or remote managed sandbox | Requires an OpenShell gateway |
16
+ | Docker Sandboxes | Whole `pi` process in a managed sandbox | Local isolation with provider keys kept on the host | Requires Docker Sandboxes (`sbx`). |
16
17
 
17
18
  Extensions run wherever the `pi` process runs. If you run host `pi` with a tool-routing extension, other custom extension tools still run on the host unless they also delegate their operations.
18
19
 
@@ -109,3 +110,47 @@ openshell sandbox download pi-sandbox /workspace/repo ./repo-out
109
110
  OpenShell providers can keep raw model API keys outside the sandbox.
110
111
  When inference routing is configured, code inside the sandbox can call `https://inference.local`, and the gateway injects the configured provider credentials upstream.
111
112
  Configure Pi to use the corresponding OpenAI-compatible or Anthropic-compatible endpoint if you want model traffic to use this route.
113
+
114
+ ## Docker Sandboxes
115
+
116
+ [Docker Sandboxes](https://docs.docker.com/ai/sandboxes/) is a managed sandbox runtime from Docker that runs the whole `pi` process inside a sandbox.
117
+ It is one of the container boundaries [No Built-in Sandbox](security.md#no-built-in-sandbox) points to.
118
+
119
+ Unlike the Plain Docker pattern above, the provider credential is not passed into the container.
120
+ The sandbox receives a sentinel value instead, and the `sbx` proxy substitutes the real credential on egress to `api.anthropic.com`.
121
+ Credentials are wired at creation time, so store yours on the host before you create the sandbox.
122
+
123
+ For a Claude Pro/Max subscription, run `claude setup-token` on a machine with Claude Code, then store the result on the host.
124
+ If an `anthropic` secret is already bound, remove it first: otherwise the proxy adds an `x-api-key` header alongside the Bearer token and Anthropic rejects the request.
125
+ `sbx secret set-custom` reads the token from stdin, so it stays out of shell history.
126
+
127
+ ```bash
128
+ sbx secret rm anthropic
129
+
130
+ sbx secret set-custom \
131
+ --host api.anthropic.com \
132
+ --env ANTHROPIC_OAUTH_TOKEN \
133
+ --placeholder 'sk-ant-oat01-{rand}'
134
+ ```
135
+
136
+ The sandbox gets an OAuth-shaped placeholder, not the real token, and the proxy swaps it on egress to that host; `ANTHROPIC_OAUTH_TOKEN` is a variable pi already reads and prefers over an API key, so no extra pi configuration is needed.
137
+
138
+ For an API key, store it with `sbx secret set anthropic` instead. The kit wires it the same way, as a sentinel the proxy substitutes on egress.
139
+
140
+ With the credential stored, launch `pi` from the project you want mounted:
141
+
142
+ ```bash
143
+ sbx run --kit "docker.io/sbx/pi-kit:latest" pi
144
+ ```
145
+
146
+ The kit pre-bakes `pi` into its image, so the sandbox starts without installing anything, and the current directory is the sandbox workspace.
147
+
148
+ Do not authenticate from inside the sandbox: `/login` there writes a real token into the container and defeats the proxy model.
149
+
150
+ Scripted use works the same way:
151
+
152
+ ```bash
153
+ sbx exec <sandbox-name> -- pi -p "list the failing tests"
154
+ ```
155
+
156
+ See the [kit documentation](https://github.com/docker/sbx-kits-contrib/tree/main/pi) for the full credential matrix, troubleshooting, and pinning.
@@ -19,6 +19,19 @@ Run from source:
19
19
 
20
20
  The script can be run from any directory. Pi keeps the caller's current working directory.
21
21
 
22
+ ### Experimental remote harness
23
+
24
+ The remote harness server/client integration is development-only. Run it from the repository with:
25
+
26
+ ```bash
27
+ PI_EXPERIMENTAL=1 ./pi-test.sh server
28
+ PI_EXPERIMENTAL=1 ./pi-test.sh client
29
+ ```
30
+
31
+ `PI_SERVER_DIR` overrides the server profile and socket directory (default: `~/.pi/server`). `PI_SERVER_ID` selects the logical server ID when `--server-id` is omitted.
32
+
33
+ The `client` and `experimental/plugin` package subpaths resolve only under the `source` condition in a checkout. Their implementations and the server/client commands are excluded from npm packages and standalone binaries. `pi-client`, `pi-protocol`, and `pi-server` are development dependencies of coding-agent, not runtime dependencies. The local SDK and stdio RPC API are unchanged.
34
+
22
35
  ## Forking / Rebranding
23
36
 
24
37
  Configure via `package.json`:
@@ -60,6 +73,12 @@ npm test # Run all tests
60
73
  npm test -- test/specific.test.ts # Run specific test
61
74
  ```
62
75
 
76
+ ### Published package smoke test
77
+
78
+ After building, run `npm run check:package-install`. It packs the public packages and installs only coding-agent as a direct dependency in a temporary directory outside the repository. Local tarball overrides select declared transitive dependencies without installing development-only packages. The check verifies SDK imports and CLI startup without credentials or model requests.
79
+
80
+ `npm run check` also checks runtime dependency declarations and rejects excluded development sources pulled into a package's build through imports.
81
+
63
82
  ## Project Structure
64
83
 
65
84
  ```
@@ -95,3 +95,5 @@ These variables are read by Pi itself:
95
95
  | `HTTP_PROXY`, `HTTPS_PROXY` | Proxy outbound HTTP requests |
96
96
 
97
97
  Provider credentials such as `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, and cloud-provider configuration are listed in [Providers](providers.md#environment-variables-or-auth-file).
98
+
99
+ `PI_SERVER_DIR` and `PI_SERVER_ID` apply only to the source-only [experimental remote harness](development.md#experimental-remote-harness), not distributed builds.
@@ -1703,7 +1703,7 @@ Typical `sourceInfo.source` values:
1703
1703
 
1704
1704
  ### pi.setModel(model)
1705
1705
 
1706
- Set the current model. Returns `false` if no API key is available for the model. See [models.md](models.md) for configuring custom models.
1706
+ Set the model for the current session. The change is recorded in session history and restored when that session is resumed, but it does not change the configured `defaultProvider` or `defaultModel` used by new sessions. Returns `false` if authentication is not configured for the model's provider. See [models.md](models.md) for configuring custom models.
1707
1707
 
1708
1708
  ```typescript
1709
1709
  const model = ctx.modelRegistry.find("anthropic", "claude-sonnet-4-5");
@@ -1717,7 +1717,9 @@ if (model) {
1717
1717
 
1718
1718
  ### pi.getThinkingLevel() / pi.setThinkingLevel(level)
1719
1719
 
1720
- Get or set the thinking level. Level is clamped to model capabilities (non-reasoning models always use "off"). Changes emit `thinking_level_select`.
1720
+ Get the current thinking level. Level is clamped to model capabilities (non-reasoning models always use "off"). Changes emit `thinking_level_select`.
1721
+
1722
+ `pi.setThinkingLevel()` changes the thinking level for the current session. The change is recorded in session history and restored when that session is resumed, but it does not change the configured default used by new sessions.
1721
1723
 
1722
1724
  ```typescript
1723
1725
  const current = pi.getThinkingLevel(); // "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"
@@ -2827,6 +2829,7 @@ export default function (pi: ExtensionAPI) {
2827
2829
  **Key points:**
2828
2830
  - Extend `CustomEditor` (not base `Editor`) to get app keybindings (escape to abort, ctrl+d, model switching)
2829
2831
  - Call `super.handleInput(data)` for keys you don't handle
2832
+ - Custom editors keep the standalone working row by default. Pass `{ embedWorkingStatus: true }` as the fourth `CustomEditor` constructor argument to use the built-in editor-border spinner instead.
2830
2833
  - Factory receives `tui`, `theme`, and `keybindings` from the app
2831
2834
  - Use `ctx.ui.getEditorComponent()` before `setEditorComponent()` to wrap the previously configured custom editor
2832
2835
  - Pass `undefined` to restore default: `ctx.ui.setEditorComponent(undefined)`
@@ -86,10 +86,12 @@ The dedicated history actions always change history entries, regardless of the c
86
86
 
87
87
  ### TUI Fullscreen Viewport
88
88
 
89
- These actions apply when interactive mode uses `--tui-mode fullscreen` and target the primary transcript scroll region. Two-finger trackpad and mouse-wheel input scroll the region under the pointer, falling back to the transcript over the fixed editor/status/footer dock. Clicking an OSC 8 hyperlink opens it in the default handler. Dragging with the primary mouse button selects text and copies it to the clipboard; holding at the transcript's top or bottom edge auto-scrolls into off-screen content. See [Terminal setup](terminal-setup.md) for terminal-specific mouse and trackpad behavior.
89
+ These actions apply when interactive mode uses `--tui-mode fullscreen` and target the primary transcript scroll region. Two-finger trackpad and mouse-wheel input scroll the region under the pointer, falling back to the transcript over the fixed editor/status/footer dock. Clicking an OSC 8 hyperlink opens it in the default handler. Dragging with the primary mouse button selects text and copies it to the clipboard; holding at the transcript's top or bottom edge auto-scrolls into off-screen content. While the transcript is scrolled up, a clickable "Jump to latest message" label on its bottom row shows the `tui.altScreen.bottom` shortcut. See [Terminal setup](terminal-setup.md) for terminal-specific mouse and trackpad behavior.
90
90
 
91
91
  Fullscreen transcript bindings take precedence over editor bindings. The default unmodified navigation keys therefore control the transcript in fullscreen mode, while their `ctrl` variants continue to control the editor. Outside fullscreen mode, both variants control the editor.
92
92
 
93
+ The transcript search panel shows the configured previous/next shortcuts and clickable arrow controls. Press `tui.altScreen.search` again, or use `tui.altScreen.searchClose`, to close it.
94
+
93
95
  | Key | Default mode | Fullscreen mode |
94
96
  |-----|--------------|-----------------|
95
97
  | `home`, `end` | Editor | Transcript |
@@ -149,7 +151,9 @@ This routing remains configurable through the ordinary action bindings. For exam
149
151
  | `app.model.select` | `ctrl+l` | Open model selector |
150
152
  | `app.model.cycleForward` | `ctrl+p` | Cycle to next model |
151
153
  | `app.model.cycleBackward` | `shift+ctrl+p` (`alt+p` on Windows and WSL) | Cycle to previous model |
154
+ | `app.models.save` | `ctrl+s` | Save the selected default model or scoped model configuration to settings |
152
155
  | `app.thinking.cycle` | `shift+tab` | Cycle thinking level |
156
+ | `app.thinking.save` | `ctrl+s` | Save current thinking level to settings |
153
157
  | `app.thinking.toggle` | `ctrl+t` | Collapse or expand thinking blocks |
154
158
 
155
159
  ### Display and Message Queue
@@ -183,7 +187,6 @@ Used inside the scoped models selector (opened via `/scoped-models`).
183
187
 
184
188
  | Keybinding id | Default | Description |
185
189
  |--------|---------|-------------|
186
- | `app.models.save` | `ctrl+s` | Save current model selection to settings |
187
190
  | `app.models.enableAll` | `ctrl+a` | Enable all models (or all matching the current search) |
188
191
  | `app.models.clearAll` | `ctrl+x` | Clear all models (or all matching the current search) |
189
192
  | `app.models.toggleProvider` | `ctrl+p` | Toggle all models for the current provider |
@@ -394,6 +394,8 @@ By default pi sends per-tool `eager_input_streaming: true`. If a proxy or Anthro
394
394
 
395
395
  Some Anthropic models require adaptive thinking (`thinking.type: "adaptive"` plus `output_config.effort`) instead of the legacy budget-based thinking payload. Built-in models set this automatically. For custom providers or aliases that route to those models, set `forceAdaptiveThinking` to `true`.
396
396
 
397
+ Claude models with per-turn effort support use `supportsMidConvoEffort`. Pi then persists each response's provider effort, reconstructs effort-only system messages on later requests, and sends thinking binding controls with `prefix_mismatch_behavior: "drop_block"` to avoid stale signed-thinking prefixes causing persistent 400 responses. Set this only for the exact supported Claude model on a faithful Anthropic Messages transport; do not enable it for APIs that merely imitate the Messages shape.
398
+
397
399
  Some Anthropic-compatible providers emit thinking blocks with empty signatures and still expect them on replay. Set `allowEmptySignature` to `true` only for those providers; real Anthropic rejects empty thinking signatures.
398
400
 
399
401
  Built-in Anthropic models enable `supportsStrictTools` in their model metadata. Custom Anthropic-compatible models must set it to `true` when their endpoint accepts strict JSON-schema tool definitions.
@@ -430,6 +432,7 @@ Built-in Anthropic models enable `supportsStrictTools` in their model metadata.
430
432
  | `sendSessionAffinityHeaders` | Whether to send `x-session-affinity` from the session id when caching is enabled. Default: auto-detected for known providers. |
431
433
  | `supportsCacheControlOnTools` | Whether the provider accepts Anthropic-style `cache_control` markers on tool definitions. Default: `true`. |
432
434
  | `forceAdaptiveThinking` | Whether to send adaptive thinking (`thinking.type: "adaptive"` plus `output_config.effort`) for this model. Built-in adaptive models set this automatically. Default: `false`. |
435
+ | `supportsMidConvoEffort` | Whether the exact Claude model transport supports per-turn effort system messages and thinking binding controls. Pi persists native effort levels and always sends `drop_block` when enabled. Default: `false`. |
433
436
  | `allowEmptySignature` | Whether to replay empty thinking signatures as `signature: ""` instead of converting thinking to text. Default: `false`. |
434
437
  | `supportsStrictTools` | Whether the provider accepts strict JSON-schema tool definitions. Default: `false`; built-in Anthropic models enable it in generated metadata. |
435
438
 
@@ -479,7 +482,7 @@ For providers with partial OpenAI compatibility, use the `compat` field.
479
482
  | `supportsStrictMode` | Whether the provider accepts strict JSON-schema function tool definitions. Defaults depend on the API; built-in OpenAI models carry explicit capability metadata. |
480
483
  | `supportsOpenAIGrammarTools` | Whether OpenAI-compatible APIs emit custom Lark/regex grammar tools. When `false`, grammar-constrained tools fall back to normal function tools. Default: `false`; the built-in model catalog enables it for GPT-5+ models on OpenAI, OpenAI Codex, Azure OpenAI, GitHub Copilot, opencode, and Cloudflare AI Gateway. |
481
484
  | `deferredToolsMode` | Use provider-specific deferred tool serialization. Currently only `"kimi"` is supported for Kimi's OpenAI-compatible Chat Completions format. |
482
- | `supportsLongCacheRetention` | Whether the provider accepts long cache retention when cache retention is `long`: `prompt_cache_retention: "24h"` for OpenAI prompt caching, or `cache_control.ttl: "1h"` when `cacheControlFormat` is `anthropic`. Default: `true`. |
485
+ | `supportsLongCacheRetention` | Whether the provider accepts long cache retention when cache retention is `long`: `prompt_cache_options.ttl: "30m"` for GPT-5.6+ Responses models, `prompt_cache_retention: "24h"` for earlier OpenAI models, or `cache_control.ttl: "1h"` when `cacheControlFormat` is `anthropic`. Default: `true`. |
483
486
  | `openRouterRouting` | OpenRouter provider routing preferences. This object is sent as-is in the `provider` field of the [OpenRouter API request](https://openrouter.ai/docs/guides/routing/provider-selection). |
484
487
  | `vercelGatewayRouting` | Vercel AI Gateway routing config for provider selection (`only`, `order`) |
485
488
 
package/bin/docs/rpc.md CHANGED
@@ -123,7 +123,7 @@ See [set_follow_up_mode](#set_follow_up_mode) for controlling how follow-up mess
123
123
 
124
124
  #### abort
125
125
 
126
- Abort the current agent operation.
126
+ Abort the current operation and wait for the session to become idle before responding.
127
127
 
128
128
  ```json
129
129
  {"type": "abort"}
package/bin/docs/sdk.md CHANGED
@@ -788,6 +788,11 @@ const { session: opened } = await createAgentSession({
788
788
  sessionManager: SessionManager.open("/path/to/session.jsonl"),
789
789
  });
790
790
 
791
+ // Resume a session kept outside the filesystem, e.g. in a database
792
+ const { session: restored } = await createAgentSession({
793
+ sessionManager: SessionManager.inMemory(process.cwd(), { id: sessionId }, entries),
794
+ });
795
+
791
796
  // List sessions
792
797
  const currentProjectSessions = await SessionManager.list(process.cwd());
793
798
  const allSessions = await SessionManager.listAll(process.cwd());
@@ -32,7 +32,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
32
32
  | `defaultThinkingLevel` | string | - | Startup thinking level (saved with Ctrl+S in `/thinking`, or edited manually): `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
33
33
  | `modelThinkingLevels` | object | - | Per-model startup thinking levels keyed by `"provider/modelId"`; configure from `/settings` → Default thinking level per model or edit manually |
34
34
  | `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
35
- | `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses and compaction or branch-summary usage |
35
+ | `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses, compaction or branch-summary usage, and provider recovery diagnostics such as dropped Anthropic thinking blocks |
36
36
  | `thinkingBudgets` | object | - | Custom token budgets per thinking level. Anthropic, Google, and Bedrock use these natively. OpenAI-compatible models use them when `compat.thinkingTokenBudgetField` (or `supportsThinkingTokenBudget`) is set. |
37
37
 
38
38
  #### thinkingBudgets
@@ -57,7 +57,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
57
57
  | `quietStartup` | boolean | `false` | Hide startup header |
58
58
  | `defaultProjectTrust` | string | `"ask"` | Fallback project trust behavior: `"ask"`, `"always"`, or `"never"`. Global setting only |
59
59
  | `collapseChangelog` | boolean | `false` | Show condensed changelog after updates |
60
- | `enableInstallTelemetry` | boolean | `true` | Send an anonymous install/update version ping after first install or changelog-detected updates. This does not control update checks |
60
+ | `enableInstallTelemetry` | boolean | `true` | Send the anonymous install/update ping and selected provider attribution headers. This does not control update checks |
61
61
  | `enableAnalytics` | boolean | `false` | Opt-in analytics data sharing. Currently only asked for during the experimental first-time setup (`PI_EXPERIMENTAL=1`) |
62
62
  | `trackingId` | string | - | Analytics tracking identifier, generated when `enableAnalytics` is turned on |
63
63
  | `doubleEscapeAction` | string | `"tree"` | Action for double-escape: `"tree"`, `"fork"`, or `"none"` |
@@ -68,7 +68,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
68
68
  | `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
69
69
  | `tuiMode` | string | `"regular"` | Interactive TUI mode: `"regular"` or experimental `"fullscreen"`. Changes from `/settings` apply immediately; `--tui-mode` overrides this setting at startup |
70
70
  | `fullscreenExitOutput` | string | `"transcript"` | Fullscreen exit output: `"transcript"` prints the final transcript and resume hint, while `"resume-hint"` restores the previous screen and prints only the resume hint. Has no effect in regular TUI mode |
71
- | `fullscreenScrollbar` | string | `"auto"` | Fullscreen transcript scrollbar: `"auto"` shows it temporarily while scrolling, `"always"` reserves the rightmost column and keeps it visible, and `"hidden"` hides it. Has no effect in regular TUI mode |
71
+ | `fullscreenScrollbar` | string | `"auto"` | Fullscreen transcript scrollbar: `"auto"` shows it temporarily while scrolling or while the pointer is over its rightmost-column track, `"always"` reserves that column and keeps it visible, and `"hidden"` hides it. Has no effect in regular TUI mode |
72
72
  | `fullscreenCopyOnSelect` | boolean | `true` | Automatically copy selected text in fullscreen mode. When disabled, selections stay highlighted and `Ctrl+X` copies the active selection |
73
73
 
74
74
  For VS Code, include `--wait` so pi resumes after the editor exits:
@@ -81,7 +81,7 @@ For VS Code, include `--wait` so pi resumes after the editor exits:
81
81
 
82
82
  ### Telemetry and update checks
83
83
 
84
- `enableInstallTelemetry` only controls the anonymous install/update ping to `https://pi.dev/api/report-install`. Opting out of telemetry does not disable update checks; Pi can still fetch `https://pi.dev/api/latest-version` to look for the latest version.
84
+ `enableInstallTelemetry` controls the anonymous install/update ping to `https://pi.dev/api/report-install` and Pi attribution headers for OpenRouter, NVIDIA NIM, and Cloudflare provider requests. Opting out disables both. It does not disable update checks; Pi can still fetch `https://pi.dev/api/latest-version` to look for the latest version.
85
85
 
86
86
  Set `PI_SKIP_VERSION_CHECK=1` to disable the Pi version update check. Use `--offline` or `PI_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
87
87
 
@@ -133,7 +133,7 @@ Set `PI_SKIP_VERSION_CHECK=1` to disable the Pi version update check. Use `--off
133
133
 
134
134
  | Setting | Type | Default | Description |
135
135
  |---------|------|---------|-------------|
136
- | `branchSummary.reserveTokens` | number | `16384` | Tokens reserved for branch summarization |
136
+ | `branchSummary.reserveTokens` | number | `16384` | Tokens reserved when selecting branch history; output is capped at 4096 tokens |
137
137
  | `branchSummary.skipPrompt` | boolean | `false` | Skip "Summarize branch?" prompt on `/tree` navigation (defaults to no summary) |
138
138
 
139
139
  ### Retry
@@ -66,7 +66,7 @@ For project-level Claude Code skills, add to `.pi/settings.json`:
66
66
 
67
67
  1. At startup, pi scans skill locations and extracts names and descriptions
68
68
  2. The system prompt includes available skills in XML format per the [specification](https://agentskills.io/integrate-skills)
69
- 3. When a task matches, the agent uses `read` to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it)
69
+ 3. When a task matches, the agent uses `read`, or `bash` when `read` is unavailable, to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it)
70
70
  4. The agent follows the instructions, using relative paths to reference scripts and assets
71
71
 
72
72
  This is progressive disclosure: only descriptions are always in context, full instructions load on-demand.
@@ -130,6 +130,21 @@ Add to `keybindings.json`:
130
130
  }
131
131
  ```
132
132
 
133
+ ## Zed (Integrated Terminal)
134
+
135
+ Add these key bindings to your Zed `keymap.json`:
136
+
137
+ ```json
138
+ {
139
+ "context": "Terminal",
140
+ "bindings": {
141
+ "shift-enter": ["terminal::SendText", "\u001b[13;2u"],
142
+ "ctrl--": ["terminal::SendText", "\u001b[45;5u"],
143
+ "ctrl-alt-]": ["terminal::SendText", "\u001b[93;7u"]
144
+ }
145
+ }
146
+ ```
147
+
133
148
  ## Windows Terminal
134
149
 
135
150
  Pi uses Windows-style keybindings when running natively on Windows or in WSL:
@@ -88,7 +88,8 @@ vim ~/.pi/agent/themes/my-theme.json
88
88
  "text": "",
89
89
  "thinkingText": "secondary",
90
90
  "selectedBg": "#2d2d30",
91
- "scrollbarThumb": "#555566",
91
+ "scrollbarTrack": "secondary",
92
+ "scrollbarThumb": "",
92
93
  "searchMatchBg": "#2d2d30",
93
94
  "searchMatchText": "",
94
95
  "userMessageBg": "#2d2d30",
@@ -160,15 +161,15 @@ vim ~/.pi/agent/themes/my-theme.json
160
161
 
161
162
  - `name` is required, must be unique, and must not contain `/`.
162
163
  - `vars` is optional. Define reusable colors here, then reference them in `colors`.
163
- - `colors` must define all 51 required tokens. `thinkingMax`, `scrollbarThumb`, and the two search highlight tokens are optional and use the fallbacks listed below.
164
+ - `colors` must define all 53 required tokens. `thinkingMax` and the two search highlight tokens are optional and use the fallbacks listed below.
164
165
 
165
166
  The `$schema` field enables editor auto-completion and validation.
166
167
 
167
168
  ## Color Tokens
168
169
 
169
- Every theme must define all 51 required color tokens. The optional tokens preserve compatibility with existing themes: `thinkingMax` falls back to `thinkingXhigh`, `scrollbarThumb` and `searchMatchBg` fall back to `selectedBg`, and `searchMatchText` falls back to `text`. Other search matches use `searchMatchText` on `searchMatchBg` with an underline; the current match reverses that foreground/background pair and uses bold text.
170
+ Every theme must define all 53 required color tokens. The optional tokens preserve compatibility with existing themes: `thinkingMax` falls back to `thinkingXhigh`, `searchMatchBg` falls back to `selectedBg`, and `searchMatchText` falls back to `text`. Other search matches use `searchMatchText` on `searchMatchBg` with an underline; the current match reverses that foreground/background pair and uses bold text.
170
171
 
171
- ### Core UI (11 colors)
172
+ ### Core UI (13 colors)
172
173
 
173
174
  | Token | Purpose |
174
175
  |-------|---------|
@@ -183,13 +184,14 @@ Every theme must define all 51 required color tokens. The optional tokens preser
183
184
  | `dim` | Tertiary text |
184
185
  | `text` | Default text (usually `""`) |
185
186
  | `thinkingText` | Thinking block text |
187
+ | `scrollbarTrack` | Fullscreen scrollbar track foreground |
188
+ | `scrollbarThumb` | Fullscreen scrollbar thumb foreground, shared by normal and expanded states |
186
189
 
187
- ### Backgrounds & Content (11 required, 3 optional)
190
+ ### Backgrounds & Content (11 required, 2 optional)
188
191
 
189
192
  | Token | Purpose |
190
193
  |-------|---------|
191
194
  | `selectedBg` | Selected line background |
192
- | `scrollbarThumb` | Fullscreen scrollbar thumb background; optional, falls back to `selectedBg` |
193
195
  | `searchMatchBg` | Transcript search match background and current-match text; optional, falls back to `selectedBg` |
194
196
  | `searchMatchText` | Transcript search match text and current-match background; optional, falls back to `text` |
195
197
  | `userMessageBg` | User message background |
package/bin/docs/tui.md CHANGED
@@ -14,6 +14,7 @@ All components implement:
14
14
  interface Component {
15
15
  render(width: number): string[];
16
16
  handleInput?(data: string): void;
17
+ handleMouse?(event: TuiMouseEvent): TuiMouseEventResult | undefined;
17
18
  wantsKeyRelease?: boolean;
18
19
  invalidate(): void;
19
20
  }
@@ -23,6 +24,7 @@ interface Component {
23
24
  |--------|-------------|
24
25
  | `render(width)` | Return array of strings (one per line). Each line **must not exceed `width`**. |
25
26
  | `handleInput?(data)` | Receive keyboard input when component has focus. |
27
+ | `handleMouse?(event)` | Receive normalized pointer input in fullscreen mode. |
26
28
  | `wantsKeyRelease?` | If true, component receives key release events (Kitty protocol). Default: false. |
27
29
  | `invalidate()` | Clear cached render state. Called on theme changes. |
28
30
 
@@ -52,7 +54,7 @@ When a `Focusable` component has focus, TUI:
52
54
  3. Positions the hardware terminal cursor at that location
53
55
  4. Shows the hardware cursor only when `showHardwareCursor` is enabled
54
56
 
55
- The cursor remains hidden by default. This keeps the fake cursor rendering, while still positioning the hardware cursor for terminals that track IME candidate windows with hidden cursors. Some terminals require a visible hardware cursor for IME positioning; enable it with `showHardwareCursor`, `setShowHardwareCursor(true)`, or `PI_HARDWARE_CURSOR=1`. The `Editor` and `Input` built-in components already implement this interface.
57
+ The cursor remains hidden by default. This keeps the fake cursor rendering, while still positioning the hardware cursor for terminals that track IME candidate windows with hidden cursors. Some terminals require a visible hardware cursor for IME positioning; enable it with the renderer's `showHardwareCursor` constructor argument or `setShowHardwareCursor(true)`. Pi also maps `PI_HARDWARE_CURSOR=1` to this setting before it creates its renderer. The `Editor` and `Input` built-in components already implement this interface.
56
58
 
57
59
  ### Container Components with Embedded Inputs
58
60
 
@@ -307,6 +309,22 @@ handleInput(data: string) {
307
309
  - With modifiers: `Key.ctrl("c")`, `Key.shift("tab")`, `Key.alt("left")`, `Key.ctrlShift("p")`
308
310
  - String format also works: `"enter"`, `"ctrl+c"`, `"shift+tab"`, `"ctrl+shift+p"`
309
311
 
312
+ ## Mouse Input
313
+
314
+ Fullscreen mode routes normalized press, release, click, move, drag, and wheel events to components and overlays. Return `{ handled: true }` to suppress default behavior, `capture: true` to retain drag/release ownership, `focus: true` to request keyboard focus, and `render: true` when a hover or release visibly changes the component. Press, click, drag, and wheel render by default; no-op move/release events do not.
315
+
316
+ ```typescript
317
+ import { MouseRegion } from "@earendil-works/pi-tui";
318
+
319
+ const clickable = new MouseRegion(content, (event) => {
320
+ if (event.type !== "click" || event.button !== "left") return undefined;
321
+ expanded = !expanded;
322
+ return { handled: true };
323
+ });
324
+ ```
325
+
326
+ Unhandled wheel input scrolls the nearest `ScrollView`; unhandled primary-button drags retain transcript selection. OSC 8 links take precedence over parent click regions. `Input`, `Editor`, `SelectList`, and `SettingsList` include fullscreen mouse behavior. Regular mode does not capture mouse input because the terminal owns its scrollback.
327
+
310
328
  ## Line Width
311
329
 
312
330
  **Critical:** Each line from `render()` must not exceed the `width` parameter.
@@ -912,6 +930,7 @@ export default function (pi: ExtensionAPI) {
912
930
 
913
931
  - **Extend `CustomEditor`** (not base `Editor`) to get app keybindings (escape to abort, ctrl+d to exit, model switching, etc.)
914
932
  - **Call `super.handleInput(data)`** for keys you don't handle
933
+ - **Working status**: custom editors keep the standalone working row by default. Pass `{ embedWorkingStatus: true }` as the fourth `CustomEditor` constructor argument to use the built-in editor-border spinner instead.
915
934
  - **Factory pattern**: `setEditorComponent` receives a factory function that gets `tui`, `theme`, and `keybindings`
916
935
  - **Pass `undefined`** to restore the default editor: `ctx.ui.setEditorComponent(undefined)`
917
936
 
@@ -18,6 +18,9 @@ Example extensions demonstrating:
18
18
  - External integrations (SSH, file watchers, system theme sync)
19
19
  - Custom providers (Anthropic with custom streaming, GitLab Duo)
20
20
 
21
+ ### [plugins/pi-example-plugin/](plugins/pi-example-plugin/)
22
+ An experimental plugin package that Pi automatically builds into separate Session-worker and TUI Chord facets.
23
+
21
24
  ## Documentation
22
25
 
23
26
  - [SDK Reference](sdk/README.md)
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider",
3
- "version": "0.84.4",
3
+ "version": "0.85.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-custom-provider",
9
- "version": "0.84.4",
9
+ "version": "0.85.1",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.52.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-anthropic",
3
3
  "private": true,
4
- "version": "0.84.4",
4
+ "version": "0.85.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-gitlab-duo",
3
3
  "private": true,
4
- "version": "0.84.4",
4
+ "version": "0.85.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -30,6 +30,8 @@
30
30
  "dim": "dimGray",
31
31
  "text": "",
32
32
  "thinkingText": "gray",
33
+ "scrollbarTrack": "darkGray",
34
+ "scrollbarThumb": "",
33
35
  "selectedBg": "selectedBg",
34
36
  "userMessageBg": "userMsgBg",
35
37
  "userMessageText": "",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
- "version": "0.84.4",
3
+ "version": "0.85.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-gondolin",
9
- "version": "0.84.4",
9
+ "version": "0.85.1",
10
10
  "dependencies": {
11
11
  "@earendil-works/gondolin": "0.12.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
3
  "private": true,
4
- "version": "0.84.4",
4
+ "version": "0.85.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-sandbox",
3
- "version": "1.14.4",
3
+ "version": "1.15.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-sandbox",
9
- "version": "1.14.4",
9
+ "version": "1.15.1",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sandbox-runtime": "^0.0.26"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-sandbox",
3
3
  "private": true,
4
- "version": "1.14.4",
4
+ "version": "1.15.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
- "version": "0.84.4",
3
+ "version": "0.85.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-with-deps",
9
- "version": "0.84.4",
9
+ "version": "0.85.1",
10
10
  "dependencies": {
11
11
  "ms": "^2.1.3"
12
12
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
3
  "private": true,
4
- "version": "0.84.4",
4
+ "version": "0.85.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -0,0 +1,38 @@
1
+ # `@earendil-works/pi-example-plugin`
2
+
3
+ This package provides conventional `session` and `tui` Chord facets. The Session-worker facet provides a remote greeting service. The TUI facet contributes `/hello` and calls that service.
4
+
5
+ The package needs no build script. Pi asks Chord to discover `src/session.ts` and `src/tui.ts`, builds both entries into its server-owned plugin cache, and sends the TUI artifact to clients.
6
+
7
+ From the repository root:
8
+
9
+ ```bash
10
+ PI_EXPERIMENTAL=1 ./pi-test.sh server \
11
+ -e "$PWD/packages/coding-agent/examples/plugins/pi-example-plugin"
12
+ ```
13
+
14
+ Alternatively, a client can select the plugin for the Session it creates or resumes on one local server:
15
+
16
+ ```bash
17
+ PI_EXPERIMENTAL=1 ./pi-test.sh client \
18
+ -e "$PWD/packages/coding-agent/examples/plugins/pi-example-plugin"
19
+ ```
20
+
21
+ Repeat `-e` to select multiple plugin packages. Client paths are resolved locally and sent only to a Unix server; Radius clients cannot select server filesystem paths. The Session and matching TUI facets are stored with that Session, so later server generations and clients can resume it without plugin arguments. Other Sessions and their workers are unaffected. An active Session rejects a different package selection instead of being restarted.
22
+
23
+ `server -e` establishes the server profile's default Session and TUI facets. Starting an explicit foreground server without `-e` clears that default. Client selection never changes the server's root facet generation.
24
+
25
+ Run `/hello Armin` in the TUI. After editing a facet, run `/reload`. The server atomically rebuilds the package, reloads the attached Session-worker generation, updates the current TUI generation, and serves the new artifact to future clients.
26
+
27
+ Package metadata can override or disable conventional entries:
28
+
29
+ ```json
30
+ {
31
+ "chord": {
32
+ "facets": {
33
+ "session": "./src/worker.ts",
34
+ "tui": false
35
+ }
36
+ }
37
+ }
38
+ ```
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@earendil-works/pi-example-plugin",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "peerDependencies": {
7
+ "@earendil-works/chord": "^0.84.4",
8
+ "@earendil-works/pi-coding-agent": "^0.84.4"
9
+ }
10
+ }
@@ -0,0 +1,13 @@
1
+ import { type Context, defineService, type ReplicatedState } from "@earendil-works/chord";
2
+
3
+ export interface ExampleFacetReply {
4
+ readonly message: string;
5
+ readonly workerActivations: number;
6
+ }
7
+
8
+ export interface ExampleFacetService {
9
+ readonly workerActivations: ReplicatedState<{ count: number }>;
10
+ greet(input: { readonly name: string }, context: Context): Promise<ExampleFacetReply>;
11
+ }
12
+
13
+ export const ExampleFacetService = defineService<ExampleFacetService>("pi.example-plugin.greeting");
@@ -0,0 +1,23 @@
1
+ import { defineFacet } from "@earendil-works/chord";
2
+ import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
3
+ import { ExampleFacetService } from "./contract.ts";
4
+
5
+ export default defineFacet({
6
+ id: "@earendil-works/pi-example-plugin/session",
7
+ setup(env) {
8
+ const workerActivations = env.replicatedState({ count: 0 });
9
+ env.provide(ExampleFacetService, {
10
+ workerActivations,
11
+ async greet({ name }) {
12
+ return {
13
+ message: `Hello ${name} from the bundled Session worker facet!!!`,
14
+ workerActivations: workerActivations.value.count,
15
+ };
16
+ },
17
+ });
18
+ env.onActivate(() => {
19
+ workerActivations.state.count += 1;
20
+ workerActivations.publish(BACKGROUND_CONTEXT);
21
+ });
22
+ },
23
+ });
@@ -0,0 +1,31 @@
1
+ import { defineFacet } from "@earendil-works/chord";
2
+ import { AgentController, PresentationUI, SlashCommands } from "@earendil-works/pi-coding-agent/experimental/plugin";
3
+ import { ExampleFacetService } from "./contract.ts";
4
+
5
+ export default defineFacet({
6
+ id: "@earendil-works/pi-example-plugin/tui",
7
+ setup(env) {
8
+ const example = env.use(ExampleFacetService);
9
+ const commands = env.use(SlashCommands);
10
+ const controller = env.use(AgentController);
11
+ const ui = env.use(PresentationUI);
12
+ env.onActivate(() => {
13
+ env.own(
14
+ commands.replace({
15
+ name: "hello",
16
+ description: "Call the bundled Session worker facet",
17
+ argumentHint: "<name>",
18
+ async run(args, context) {
19
+ const message = args.length === 0 ? "from the TUI" : args;
20
+ const reply = await example.greet({ name: message }, context);
21
+ ui.showStatus(
22
+ `We got this: ${reply.message} Worker activations: ${reply.workerActivations}.`,
23
+ context,
24
+ );
25
+ return controller.prompt({ message: `pong: ${message}`, images: null }, context);
26
+ },
27
+ }),
28
+ );
29
+ });
30
+ },
31
+ });
package/bin/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@earendil-works/pi-coding-agent",
3
- "version": "0.84.4",
3
+ "version": "0.85.1",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "piConfig": {
@@ -20,12 +20,17 @@
20
20
  "import": "./dist/bundle/rpc-entry.js"
21
21
  },
22
22
  "./client": {
23
- "types": "./dist/client/index.d.ts",
24
- "import": "./dist/client/index.js"
23
+ "source": "./src/client/index.ts"
24
+ },
25
+ "./experimental/plugin": {
26
+ "source": "./src/experimental/plugin.ts"
25
27
  }
26
28
  },
27
29
  "files": [
28
30
  "dist",
31
+ "!dist/client",
32
+ "!dist/experimental",
33
+ "!dist/cli/experimental",
29
34
  "docs",
30
35
  "examples",
31
36
  "containerization.md",
@@ -44,11 +49,10 @@
44
49
  "prepublishOnly": "npm run clean && npm run build && npm run shrinkwrap"
45
50
  },
46
51
  "dependencies": {
47
- "@earendil-works/pi-agent-core": "^0.84.4",
48
- "@earendil-works/pi-ai": "^0.84.4",
49
- "@earendil-works/pi-client": "^0.84.4",
50
- "@earendil-works/pi-protocol": "^0.84.4",
51
- "@earendil-works/pi-tui": "^0.84.4",
52
+ "@earendil-works/chord": "^0.85.1",
53
+ "@earendil-works/pi-agent-core": "^0.85.1",
54
+ "@earendil-works/pi-ai": "^0.85.1",
55
+ "@earendil-works/pi-tui": "^0.85.1",
52
56
  "@silvia-odwyer/photon-node": "0.3.4",
53
57
  "chalk": "5.6.2",
54
58
  "cross-spawn": "7.0.6",
@@ -76,6 +80,9 @@
76
80
  "@mariozechner/clipboard": "0.3.9"
77
81
  },
78
82
  "devDependencies": {
83
+ "@earendil-works/pi-client": "^0.85.1",
84
+ "@earendil-works/pi-protocol": "^0.85.1",
85
+ "@earendil-works/pi-server": "^0.85.1",
79
86
  "@types/cross-spawn": "6.0.6",
80
87
  "@types/hosted-git-info": "3.0.5",
81
88
  "@types/node": "22.19.19",
package/bin/pi CHANGED
Binary file
@@ -33,7 +33,8 @@
33
33
  "thinkingText": "gray",
34
34
 
35
35
  "selectedBg": "selectedBg",
36
- "scrollbarThumb": "selectedBg",
36
+ "scrollbarTrack": "darkGray",
37
+ "scrollbarThumb": "text",
37
38
  "searchMatchBg": "selectedBg",
38
39
  "searchMatchText": "text",
39
40
  "userMessageBg": "userMsgBg",
@@ -32,7 +32,8 @@
32
32
  "thinkingText": "mediumGray",
33
33
 
34
34
  "selectedBg": "selectedBg",
35
- "scrollbarThumb": "selectedBg",
35
+ "scrollbarTrack": "lightGray",
36
+ "scrollbarThumb": "text",
36
37
  "searchMatchBg": "selectedBg",
37
38
  "searchMatchText": "text",
38
39
  "userMessageBg": "userMsgBg",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "colors": {
36
36
  "type": "object",
37
- "description": "Theme color definitions (thinkingMax, scrollbarThumb, and search highlight colors are optional and use compatible fallbacks)",
37
+ "description": "Theme color definitions (scrollbar, thinkingMax, and search highlight colors are optional and use compatible fallbacks)",
38
38
  "required": [
39
39
  "accent",
40
40
  "border",
@@ -137,9 +137,13 @@
137
137
  "$ref": "#/$defs/colorValue",
138
138
  "description": "Selected item background"
139
139
  },
140
+ "scrollbarTrack": {
141
+ "$ref": "#/$defs/colorValue",
142
+ "description": "Fullscreen scrollbar track foreground (falls back to muted when omitted)"
143
+ },
140
144
  "scrollbarThumb": {
141
145
  "$ref": "#/$defs/colorValue",
142
- "description": "Fullscreen scrollbar thumb background (falls back to selectedBg when omitted)"
146
+ "description": "Fullscreen scrollbar thumb foreground (falls back to text when omitted)"
143
147
  },
144
148
  "searchMatchBg": {
145
149
  "$ref": "#/$defs/colorValue",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kingingwang/pi-darwin-arm64",
3
- "version": "0.84.4",
3
+ "version": "0.85.1",
4
4
  "description": "Pi standalone binary for darwin-arm64 (fork distribution)",
5
5
  "license": "MIT",
6
6
  "os": [