@astralyn/pi 1.2.0 → 1.3.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 (121) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/bundle/chunks/anthropic-messages-MSB6JBS2.js +6 -0
  3. package/dist/bundle/chunks/{azure-openai-responses-IBTOZ5MH.js → azure-openai-responses-ATZ757I2.js} +1 -1
  4. package/dist/bundle/chunks/bedrock-converse-stream.js +14 -11
  5. package/dist/bundle/chunks/{chunk-UQECUCUH.js → chunk-KSCGI7JW.js} +2 -2
  6. package/dist/bundle/chunks/chunk-LUYFHZ6W.js +11 -0
  7. package/dist/bundle/chunks/{chunk-LHSPN2IO.js → chunk-NM2KGRFS.js} +1 -1
  8. package/dist/bundle/chunks/{chunk-A5HU4TE6.js → chunk-R2KES7LS.js} +31 -31
  9. package/dist/bundle/chunks/{chunk-5B3S5DVL.js → chunk-SA2AQYEI.js} +5 -2
  10. package/dist/bundle/chunks/{chunk-B2UOWO4A.js → chunk-YHRHHXFG.js} +1 -1
  11. package/dist/bundle/chunks/github-copilot.js +1 -1
  12. package/dist/bundle/chunks/{google-generative-ai-M44TSMAN.js → google-generative-ai-QRLQ4MCJ.js} +1 -1
  13. package/dist/bundle/chunks/{google-vertex-3C4OWLFX.js → google-vertex-L3T6EGTL.js} +1 -1
  14. package/dist/bundle/chunks/mistral-conversations-6E6SS3WF.js +5 -0
  15. package/dist/bundle/chunks/{openai-codex-responses-O5EUDL54.js → openai-codex-responses-4GUO76XJ.js} +1 -1
  16. package/dist/bundle/chunks/{openai-completions-X3SSG5BQ.js → openai-completions-O4TKZCIM.js} +1 -1
  17. package/dist/bundle/chunks/openai-responses-VBQKJFNO.js +3 -0
  18. package/dist/bundle/chunks/{pi-messages-ZXNERWJG.js → pi-messages-3POWZ43C.js} +1 -1
  19. package/dist/bundle/chunks/{virtual-modules-OZTPKGU7.js → virtual-modules-TG53AOL4.js} +1 -1
  20. package/dist/bundle/cli.js +1 -1
  21. package/dist/bundle/index.js +1 -1
  22. package/dist/bundle/rpc-entry.js +1 -1
  23. package/dist/cli/credential-print.d.ts.map +1 -1
  24. package/dist/cli/credential-print.js +4 -4
  25. package/dist/cli/credential-print.js.map +1 -1
  26. package/dist/core/agent-session.d.ts +4 -2
  27. package/dist/core/agent-session.d.ts.map +1 -1
  28. package/dist/core/agent-session.js +5 -4
  29. package/dist/core/agent-session.js.map +1 -1
  30. package/dist/core/export-html/template.js +21 -16
  31. package/dist/core/model-config.d.ts +24 -8
  32. package/dist/core/model-config.d.ts.map +1 -1
  33. package/dist/core/model-resolver.d.ts +56 -43
  34. package/dist/core/model-resolver.d.ts.map +1 -1
  35. package/dist/core/model-resolver.js +247 -352
  36. package/dist/core/model-resolver.js.map +1 -1
  37. package/dist/core/prompt-templates.d.ts.map +1 -1
  38. package/dist/core/prompt-templates.js +7 -2
  39. package/dist/core/prompt-templates.js.map +1 -1
  40. package/dist/core/settings-defaults.d.ts +1 -0
  41. package/dist/core/settings-defaults.d.ts.map +1 -1
  42. package/dist/core/settings-defaults.js +1 -0
  43. package/dist/core/settings-defaults.js.map +1 -1
  44. package/dist/core/settings-manager.d.ts +4 -2
  45. package/dist/core/settings-manager.d.ts.map +1 -1
  46. package/dist/core/settings-manager.js +11 -0
  47. package/dist/core/settings-manager.js.map +1 -1
  48. package/dist/core/settings-schema.d.ts +2 -0
  49. package/dist/core/settings-schema.d.ts.map +1 -1
  50. package/dist/core/settings-schema.js +4 -0
  51. package/dist/core/settings-schema.js.map +1 -1
  52. package/dist/core/slash-commands.js +1 -1
  53. package/dist/core/slash-commands.js.map +1 -1
  54. package/dist/core/tools/render-utils.d.ts +2 -0
  55. package/dist/core/tools/render-utils.d.ts.map +1 -1
  56. package/dist/core/tools/render-utils.js +21 -0
  57. package/dist/core/tools/render-utils.js.map +1 -1
  58. package/dist/core/tools/renderers/read.d.ts.map +1 -1
  59. package/dist/core/tools/renderers/read.js +7 -11
  60. package/dist/core/tools/renderers/read.js.map +1 -1
  61. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  62. package/dist/extensions/codemode/execute.js +12 -0
  63. package/dist/extensions/codemode/execute.js.map +1 -1
  64. package/dist/index.d.ts +1 -0
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +1 -0
  67. package/dist/index.js.map +1 -1
  68. package/dist/main.d.ts.map +1 -1
  69. package/dist/main.js +1 -0
  70. package/dist/main.js.map +1 -1
  71. package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
  72. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  73. package/dist/modes/interactive/components/settings-selector.js +10 -0
  74. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  75. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  76. package/dist/modes/interactive/components/tree-selector.js +2 -9
  77. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  78. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  79. package/dist/modes/interactive/interactive-mode.js +9 -3
  80. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  81. package/dist/modes/interactive/session-share.d.ts.map +1 -1
  82. package/dist/modes/interactive/session-share.js +9 -2
  83. package/dist/modes/interactive/session-share.js.map +1 -1
  84. package/dist/modes/interactive/tasks/layout.d.ts +2 -0
  85. package/dist/modes/interactive/tasks/layout.d.ts.map +1 -1
  86. package/dist/modes/interactive/tasks/layout.js +32 -6
  87. package/dist/modes/interactive/tasks/layout.js.map +1 -1
  88. package/dist/modes/interactive/tasks/manager.d.ts.map +1 -1
  89. package/dist/modes/interactive/tasks/manager.js +20 -2
  90. package/dist/modes/interactive/tasks/manager.js.map +1 -1
  91. package/docs/bundled/tasks.md +1 -1
  92. package/docs/codemode.md +1 -0
  93. package/docs/development.md +0 -13
  94. package/docs/docs.json +12 -0
  95. package/docs/environment-variables.md +0 -2
  96. package/docs/extensions.md +1 -1
  97. package/docs/llama-cpp.md +1 -1
  98. package/docs/nvidia-rtx-llama-cpp.md +96 -0
  99. package/docs/providers.md +1 -1
  100. package/docs/sdk.md +0 -27
  101. package/docs/sessions.md +1 -1
  102. package/docs/settings.md +2 -1
  103. package/docs/usage.md +5 -5
  104. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  105. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  106. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  107. package/examples/extensions/gondolin/package-lock.json +2 -2
  108. package/examples/extensions/gondolin/package.json +1 -1
  109. package/examples/extensions/minimal-mode.ts +4 -5
  110. package/examples/extensions/sandbox/package-lock.json +2 -2
  111. package/examples/extensions/sandbox/package.json +1 -1
  112. package/examples/extensions/with-deps/package-lock.json +2 -2
  113. package/examples/extensions/with-deps/package.json +1 -1
  114. package/npm-shrinkwrap.json +124 -124
  115. package/package.json +6 -6
  116. package/schemas/models.schema.json +5 -5
  117. package/schemas/settings.schema.json +18 -0
  118. package/dist/bundle/chunks/anthropic-messages-NVP5OPIM.js +0 -6
  119. package/dist/bundle/chunks/chunk-7HJ6CHUB.js +0 -11
  120. package/dist/bundle/chunks/mistral-conversations-I5PL4VCZ.js +0 -5
  121. package/dist/bundle/chunks/openai-responses-NYPNKVDV.js +0 -3
@@ -3261,7 +3261,7 @@ pi.unregisterMcpServer("jira");
3261
3261
 
3262
3262
  Servers registered while the extension loads connect when the session starts, together with the `mcp.json` servers; servers registered later connect right away, and `pi.unregisterMcpServer()` closes the connection and makes the server's tools unreachable. Registrations are not saved: register again on every load, for example based on the extension's own settings. A server in `mcp.json` with the same name takes precedence, and `/mcp` shows the override. Registering the same name again replaces the extension's earlier registration; names registered by another extension, invalid names, and invalid configs throw.
3263
3263
 
3264
- The built-in MCP support connects registered servers. When nothing does, because another extension replaced it (see [MCP](mcp.md#other-mcp-extensions)), each registration is reported as an extension error. Other MCP extensions can connect registered servers too: read them with `pi.getMcpServers()` on `session_start` and handle the `mcp_servers_change` event for later changes.
3264
+ The built-in MCP support connects registered servers. When nothing does, because another extension replaced it (see [MCP](mcp.md#replace-the-built-in-mcp-support)), each registration is reported as an extension error. Other MCP extensions can connect registered servers too: read them with `pi.getMcpServers()` on `session_start` and handle the `mcp_servers_change` event for later changes.
3265
3265
 
3266
3266
  ### Provider stream events
3267
3267
 
package/docs/llama-cpp.md CHANGED
@@ -41,7 +41,7 @@ A single-file model can sit directly in the model directory. Put multimodal and
41
41
  └── large-model-Q4_K_M-00003-of-00003.gguf
42
42
  ```
43
43
 
44
- Restart the router after manually adding files. For per-model context sizes and other options, use [llama.cpp model presets](https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md#model-presets).
44
+ Restart the router after manually adding files. For per-model context sizes and other options, use [llama.cpp model presets](https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md#model-presets). For settings tuned to a specific NVIDIA GPU and model, see [Run Pi with NVIDIA RTX and llama.cpp](nvidia-rtx-llama-cpp.md).
45
45
 
46
46
  ## Configure Pi
47
47
 
@@ -0,0 +1,96 @@
1
+ # Run Pi with NVIDIA RTX and llama.cpp
2
+
3
+ [NVIDIA Local AI Inference Recipes](https://nvidia.github.io/local-ai-inference-recipes/index.html) provides llama.cpp settings tuned for specific NVIDIA hardware and models. Each recipe gives a single-model `llama-server` command. Pi works with the llama.cpp router, which can serve and manage several models, so this guide converts the recipe command into a router preset.
4
+
5
+ The examples below use Windows PowerShell. See [Local Models with llama.cpp](llama-cpp.md) for Pi's complete router and model-management reference.
6
+
7
+ ## Before you begin
8
+
9
+ 1. Open the [recipe catalog](https://nvidia.github.io/local-ai-inference-recipes/index.html), select your hardware, operating system, and model, then choose **llama.cpp**. Check the prerequisites and memory requirements. Keep the recipe's launch command for the conversion below.
10
+ 2. Install llama.cpp with the recipe's setup instructions. The recipe's settings depend on its build, for example CUDA support or speculative decoding options.
11
+ 3. Run `llama-server --help` and check that it lists `--models-preset`. Without it, the build cannot load the recipe as a router preset. Use a newer build that still meets the recipe's requirements.
12
+ 4. Install Pi with the [Quickstart](quickstart.md). On native Windows, also see [Run Pi on Windows](windows.md).
13
+
14
+ ## Convert the recipe to a preset
15
+
16
+ A preset lists the settings for one or more models. Each section name becomes the model ID shown in Pi. Save the preset next to `llama-server`, or pass its full path when starting the router.
17
+
18
+ Convert each option from the recipe command into one preset line:
19
+
20
+ - Remove the leading dashes: `--ctx-size 65536` becomes `ctx-size = 65536`.
21
+ - Write options without a value as `true`: `--jinja` becomes `jinja = true`.
22
+ - Remove quotes and PowerShell line-continuation backticks around values.
23
+ - Leave out `--host` and `--port`. They belong on the router command line.
24
+ - Add `load-on-startup = true` so the router loads the model when it starts.
25
+ - Replace short model-file options with their long preset keys:
26
+
27
+ | Recipe option | Preset key |
28
+ |---|---|
29
+ | `-hf` | `hf-repo` |
30
+ | `-hff` | `hf-file` |
31
+ | `-hfrd` | `hf-repo-draft` |
32
+ | `--spec-draft-model` | `spec-draft-model` |
33
+
34
+ For example, this recipe command:
35
+
36
+ ```powershell
37
+ llama-server.exe -hf "unsloth/Qwen3.8-27B-GGUF" `
38
+ -hff "Qwen3.8-27B-UD-Q4_K_M.gguf" `
39
+ -hfrd "z-lab/Qwen3.8-27B-DFlash2-GGUF" `
40
+ --spec-draft-model "Qwen3.8-27B-DFlash2-Q4_K_M.gguf" `
41
+ --no-mmproj `
42
+ --host 127.0.0.1 `
43
+ --port 9931 `
44
+ --batch-size 4096 `
45
+ --ubatch-size 1024 `
46
+ --ctx-size 65536 `
47
+ --parallel 1 `
48
+ -ngl 999 `
49
+ --jinja `
50
+ --chat-template-kwargs '{"preserve_thinking":true}' `
51
+ --spec-type draft-dflash `
52
+ --spec-draft-n-max 7 `
53
+ --spec-draft-backend-sampling
54
+ ```
55
+
56
+ becomes `qwen3.8-27b.ini`:
57
+
58
+ ```ini
59
+ version = 1
60
+
61
+ [qwen3.8-27b]
62
+ load-on-startup = true
63
+ hf-repo = unsloth/Qwen3.8-27B-GGUF
64
+ hf-file = Qwen3.8-27B-UD-Q4_K_M.gguf
65
+ hf-repo-draft = z-lab/Qwen3.8-27B-DFlash2-GGUF
66
+ spec-draft-model = Qwen3.8-27B-DFlash2-Q4_K_M.gguf
67
+ no-mmproj = true
68
+ batch-size = 4096
69
+ ubatch-size = 1024
70
+ ctx-size = 65536
71
+ parallel = 1
72
+ ngl = 999
73
+ jinja = true
74
+ chat-template-kwargs = {"preserve_thinking":true}
75
+ spec-type = draft-dflash
76
+ spec-draft-n-max = 7
77
+ spec-draft-backend-sampling = true
78
+ ```
79
+
80
+ ## Start the router
81
+
82
+ Open PowerShell in the llama.cpp folder and run:
83
+
84
+ ```powershell
85
+ .\llama-server.exe --models-preset qwen3.8-27b.ini --host 127.0.0.1 --port 8080
86
+ ```
87
+
88
+ If the recipe requires a Hugging Face token, set `$env:HF_TOKEN` in the same PowerShell window before starting the router. On its first start, the router downloads the model files.
89
+
90
+ Use the [router health checks](llama-cpp.md#troubleshooting) to confirm that the server is ready. In Windows PowerShell, use `curl.exe` rather than `curl`, which PowerShell maps to a different command. The model is ready when `/models` lists `qwen3.8-27b` with the status `loaded`.
91
+
92
+ ## Use the model in Pi
93
+
94
+ Follow [Configure Pi](llama-cpp.md#configure-pi) and connect to `http://127.0.0.1:8080`. The preset section name is the model ID, so select `qwen3.8-27b` in `/model` for this example.
95
+
96
+ NVIDIA recipe memory settings assume that only the selected model uses the GPU. If `/llama` shows other loaded models, unload them before using the recipe model.
package/docs/providers.md CHANGED
@@ -240,7 +240,7 @@ The `azure` provider serves both Azure OpenAI Responses deployments and Azure AI
240
240
 
241
241
  Pi sends the model ID as the deployment name. If a deployment has a different name, map it with `AZURE_OPENAI_DEPLOYMENT_NAME_MAP`.
242
242
 
243
- To use a Foundry model that Pi does not include, add it under `azure` in [`models.json`](models.md#configure-a-compatible-endpoint) with `api: "openai-completions"`. Custom models require a `baseUrl`; `AZURE_OPENAI_BASE_URL` and `AZURE_OPENAI_RESOURCE_NAME` take priority over it when set:
243
+ To use a Foundry model that Pi does not include, add it under `azure` in [`models.json`](models.md#provider-configuration) with `api: "openai-completions"`. Custom models require a `baseUrl`; `AZURE_OPENAI_BASE_URL` and `AZURE_OPENAI_RESOURCE_NAME` take priority over it when set:
244
244
 
245
245
  ```json
246
246
  {
package/docs/sdk.md CHANGED
@@ -188,33 +188,6 @@ session = runtime.session;
188
188
  unsubscribe = session.subscribe(() => {});
189
189
  ```
190
190
 
191
- ### Experimental Remote Sessions
192
-
193
- The `@astralyn/pi/client` subpath provides a lifecycle controller and transcript reducers for applications that connect to a remote Pi server. It is available only in a source checkout under the `source` condition, together with `@astralyn/pi/experimental/plugin`; neither subpath is a published runtime export. See [Experimental remote harness](development.md#experimental-remote-harness). Transport and protocol primitives come from the exact `@earendil-works/pi-client` and `@earendil-works/pi-protocol` dependencies.
194
-
195
- ```typescript
196
- import { PiClient } from "@earendil-works/pi-client";
197
- import { createUnixTransportFactory } from "@earendil-works/pi-client/unix";
198
- import { RemoteSession } from "@astralyn/pi/client";
199
-
200
- await using client = await PiClient.connect({
201
- transportFactory: createUnixTransportFactory({ path: "/tmp/pi.sock" }),
202
- });
203
- await using session = await RemoteSession.create(client, {
204
- cwd: "/workspace/project",
205
- });
206
-
207
- const unsubscribe = session.subscribe(({ lifecycle, snapshot, transcript }) => {
208
- console.log(lifecycle.status, snapshot?.phase, transcript.length);
209
- });
210
- await session.submit("Inspect this project");
211
- unsubscribe();
212
- ```
213
-
214
- Use `RemoteSession.open(client, sessionId)` to acquire an existing session. The controller serializes open/create/submit/model/thinking operations, selects prompt versus steering behavior from the remote phase, supports abort and reconnect, and releases its exclusive session lease on disposal. `createTranscriptState()`, `applyTranscriptSnapshot()`, `applyTranscriptProgress()`, and `selectTranscript()` are also exported for lower-level clients that manage transcript state directly.
215
-
216
- This API is experimental. Match client and server protocol versions, bound transport queues and frame sizes, authenticate the transport, and treat peers as untrusted.
217
-
218
191
  ### Prompting and Message Queueing
219
192
 
220
193
  `PromptOptions` controls prompt expansion, queueing behavior while streaming, and prompt preflight notifications:
package/docs/sessions.md CHANGED
@@ -32,7 +32,7 @@ For the JSONL file format and SessionManager API, see [Session Format](session-f
32
32
  | `/clone` | Duplicate the current active branch into a new session |
33
33
  | `/compact [prompt]` | Summarize older context; see [Compaction](compaction.md) |
34
34
  | `/export [file]` | Export session to HTML |
35
- | `/share` | Upload as private GitHub gist with shareable HTML link |
35
+ | `/share` | Upload the session for a shareable HTML link; a Radius artifact when signed in, otherwise a private GitHub gist (see [`sessionShareDestination`](settings.md#sessions)) |
36
36
  | `/bug [description]` | Report a bug to the Pi developers; see [Reporting Bugs](#reporting-bugs) |
37
37
 
38
38
  ## Resuming and Deleting Sessions
package/docs/settings.md CHANGED
@@ -308,6 +308,7 @@ An empty array starts with no built-in tools while preserving extension and SDK
308
308
  | Setting | Type | Default | Description |
309
309
  |---------|------|---------|-------------|
310
310
  | `sessionDir` | string | - | Directory where session files are stored. Accepts absolute or relative paths, plus `~`. |
311
+ | `sessionShareDestination` | `"auto" \| "gist" \| "radius"` | `"auto"` | Destination used by `/share`. `auto` uses Radius when signed in and otherwise creates a private GitHub gist. `gist` always uses a gist. `radius` requires Radius authentication and never falls back to a gist. |
311
312
 
312
313
  ```json
313
314
  { "sessionDir": ".pi/sessions" }
@@ -442,7 +443,7 @@ This replaces `bash` with `powershell` and enables `grep`: `["-bash", "+powershe
442
443
 
443
444
  `/reload` enables tools newly added to `defaultTools`. It does not disable tools removed from it or re-enable unchanged tools you turned off. `--tools` with plain names, `--no-tools`, and `--no-builtin-tools` override `defaultTools`, also on reload.
444
445
 
445
- CLI tool options override this setting for one invocation. `--tools` with only `+name` and `-name` entries changes the resolved `defaultTools` selection instead, for example `pi --tools +codemode`. On `/reload`, these entries apply to the reloaded setting too, so a tool removed with `-name` stays removed. See [Command Line](usage.md#tools).
446
+ CLI tool options override this setting for one invocation. `--tools` with only `+name` and `-name` entries changes the resolved `defaultTools` selection instead, for example `pi --tools +codemode`. On `/reload`, these entries apply to the reloaded setting too, so a tool removed with `-name` stays removed. See [Command Line](usage.md#tool-options).
446
447
 
447
448
  | Setting | Default | Meaning |
448
449
  |---|---|---|
package/docs/usage.md CHANGED
@@ -133,7 +133,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
133
133
 
134
134
  Use `/export [file]` to write a session to HTML.
135
135
 
136
- Use `/share` to upload a private GitHub gist with a shareable HTML link.
136
+ Use `/share` to upload the session and get a shareable HTML link. By default, Radius authentication makes the artifact visible to your Radius organization; otherwise, Pi creates a private GitHub gist through the GitHub CLI. The [`sessionShareDestination`](settings.md#sessions) setting can force either destination. Review the session first because it can contain prompts, tool output, file contents, and credentials exposed during the conversation.
137
137
 
138
138
  If you use pi for open source work and want to publish sessions for model, prompt, tool, and evaluation research, see [`badlogic/pi-share-hf`](https://github.com/badlogic/pi-share-hf). It publishes sessions to Hugging Face datasets.
139
139
 
@@ -189,10 +189,10 @@ cat README.md | pi -p "Summarize this text"
189
189
  | Option | Description |
190
190
  |--------|-------------|
191
191
  | `--provider <name>` | Provider to search for `--model`, such as `anthropic` or `openai`; requires `--model` |
192
- | `--model <pattern>` | Model pattern or ID; supports `provider/id` and optional `:<thinking>` |
193
- | `--api-key <key>` | API key, overriding environment variables |
192
+ | `--model <pattern>` | Model pattern or ID; supports `provider/id` and optional `:<thinking>`. If several providers match, Pi prefers the one with credentials, otherwise it asks for `--provider` |
193
+ | `--api-key <key>` | API key, overriding environment variables; does not choose between providers that offer the same model |
194
194
  | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` |
195
- | `--models <patterns>` | Comma-separated patterns for Ctrl+P cycling |
195
+ | `--models <patterns>` | Comma-separated patterns for Ctrl+P cycling; a model offered by several providers is added for each, with a warning |
196
196
  | `--list-models [search]` | List available models |
197
197
 
198
198
  ### Session Options
@@ -369,6 +369,6 @@ These commands work outside a session, so agents can run them through `bash`. Se
369
369
  | `pi mcp login <server> [--timeout <seconds>]` | Sign in to an OAuth server: open the authorization page and wait for the browser (default 300 seconds); a terminal also accepts the pasted redirect URL |
370
370
  | `pi mcp logout <server>` | Delete the stored OAuth credentials of a server |
371
371
 
372
- `add` and `remove` change `~/.pi/agent/mcp.json`, or `.pi/mcp.json` in the current directory with `--local` (`-l`). `add` also takes `--exposure <mode>` (see [Exposure](mcp.md#exposure)) and `--description <text>` and does not connect; run `pi mcp list` to check the server.
372
+ `add` and `remove` change `~/.pi/agent/mcp.json`, or `.pi/mcp.json` in the current directory with `--local` (`-l`). `add` also takes `--exposure <mode>` (see [Exposure](mcp.md#control-tool-exposure)) and `--description <text>` and does not connect; run `pi mcp list` to check the server.
373
373
 
374
374
  Project `.pi/mcp.json` files are only read for projects that are already trusted.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-custom-provider",
9
- "version": "1.2.0",
9
+ "version": "1.3.0",
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": "1.2.0",
4
+ "version": "1.3.0",
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": "1.2.0",
4
+ "version": "1.3.0",
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-gondolin",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-gondolin",
9
- "version": "1.2.0",
9
+ "version": "1.3.0",
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": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -25,6 +25,7 @@ import {
25
25
  createLsToolDefinition,
26
26
  createReadToolDefinition,
27
27
  createWriteToolDefinition,
28
+ formatReadLineRange,
28
29
  } from "@earendil-works/pi-coding-agent";
29
30
  import { Text } from "@earendil-works/pi-tui";
30
31
  import { homedir } from "os";
@@ -65,11 +66,9 @@ export default function (pi: ExtensionAPI) {
65
66
  const path = shortenPath(args.path || "");
66
67
  let pathDisplay = path ? theme.fg("accent", path) : theme.fg("toolOutput", "...");
67
68
 
68
- // Show line range if specified
69
- if (args.offset !== undefined || args.limit !== undefined) {
70
- const startLine = args.offset ?? 1;
71
- const endLine = args.limit !== undefined ? startLine + args.limit - 1 : "";
72
- pathDisplay += theme.fg("warning", `:${startLine}${endLine ? `-${endLine}` : ""}`);
69
+ const lineRange = formatReadLineRange(args.offset, args.limit);
70
+ if (lineRange) {
71
+ pathDisplay += theme.fg("warning", lineRange);
73
72
  }
74
73
 
75
74
  return new Text(`${theme.fg("toolTitle", theme.bold("read"))} ${pathDisplay}`, 0, 0);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-sandbox",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-sandbox",
9
- "version": "1.2.0",
9
+ "version": "1.3.0",
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.2.0",
4
+ "version": "1.3.0",
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": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-with-deps",
9
- "version": "1.2.0",
9
+ "version": "1.3.0",
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": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",