@mariozechner/pi-coding-agent 0.58.0 → 0.58.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/README.md +18 -6
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +7 -6
- package/dist/cli/args.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +26 -9
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +6 -0
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +37 -13
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/package-manager.d.ts +4 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +60 -27
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js +43 -8
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +8 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts +3 -2
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +29 -8
- package/dist/core/skills.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +3 -2
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +1 -0
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +6 -3
- package/dist/core/tools/find.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +12 -3
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +1 -1
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +5 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.js +5 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +5 -1
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +5 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +6 -26
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +94 -11
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +16 -15
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +5 -4
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/custom-provider.md +6 -2
- package/docs/models.md +39 -1
- package/docs/packages.md +9 -0
- package/docs/settings.md +9 -0
- package/docs/terminal-setup.md +11 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
package/docs/models.md
CHANGED
|
@@ -35,6 +35,32 @@ For local models (Ollama, LM Studio, vLLM), only `id` is required per model:
|
|
|
35
35
|
|
|
36
36
|
The `apiKey` is required but Ollama ignores it, so any value works.
|
|
37
37
|
|
|
38
|
+
Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so pi sends the system prompt as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too.
|
|
39
|
+
|
|
40
|
+
You can set `compat` at the provider level to apply to all models, or at the model level to override a specific model. This commonly applies to Ollama, vLLM, SGLang, and similar OpenAI-compatible servers.
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"providers": {
|
|
45
|
+
"ollama": {
|
|
46
|
+
"baseUrl": "http://localhost:11434/v1",
|
|
47
|
+
"api": "openai-completions",
|
|
48
|
+
"apiKey": "ollama",
|
|
49
|
+
"compat": {
|
|
50
|
+
"supportsDeveloperRole": false,
|
|
51
|
+
"supportsReasoningEffort": false
|
|
52
|
+
},
|
|
53
|
+
"models": [
|
|
54
|
+
{
|
|
55
|
+
"id": "gpt-oss:20b",
|
|
56
|
+
"reasoning": true
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
38
64
|
## Full Example
|
|
39
65
|
|
|
40
66
|
Override defaults when you need specific values:
|
|
@@ -136,6 +162,7 @@ The `apiKey` and `headers` fields support three formats:
|
|
|
136
162
|
| `contextWindow` | No | `128000` | Context window size in tokens |
|
|
137
163
|
| `maxTokens` | No | `16384` | Maximum output tokens |
|
|
138
164
|
| `cost` | No | all zeros | `{"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}` (per million tokens) |
|
|
165
|
+
| `compat` | No | provider `compat` | OpenAI compatibility overrides. Merged with provider-level `compat` when both are set. |
|
|
139
166
|
|
|
140
167
|
Current behavior:
|
|
141
168
|
- `/model` and `--list-models` list entries by model `id`.
|
|
@@ -211,7 +238,10 @@ Behavior notes:
|
|
|
211
238
|
|
|
212
239
|
## OpenAI Compatibility
|
|
213
240
|
|
|
214
|
-
For providers with partial OpenAI compatibility, use the `compat` field
|
|
241
|
+
For providers with partial OpenAI compatibility, use the `compat` field.
|
|
242
|
+
|
|
243
|
+
- Provider-level `compat` applies defaults to all models under that provider.
|
|
244
|
+
- Model-level `compat` overrides provider-level values for that model.
|
|
215
245
|
|
|
216
246
|
```json
|
|
217
247
|
{
|
|
@@ -234,11 +264,19 @@ For providers with partial OpenAI compatibility, use the `compat` field:
|
|
|
234
264
|
| `supportsStore` | Provider supports `store` field |
|
|
235
265
|
| `supportsDeveloperRole` | Use `developer` vs `system` role |
|
|
236
266
|
| `supportsReasoningEffort` | Support for `reasoning_effort` parameter |
|
|
267
|
+
| `reasoningEffortMap` | Map pi thinking levels to provider-specific `reasoning_effort` values |
|
|
237
268
|
| `supportsUsageInStreaming` | Supports `stream_options: { include_usage: true }` (default: `true`) |
|
|
238
269
|
| `maxTokensField` | Use `max_completion_tokens` or `max_tokens` |
|
|
270
|
+
| `requiresToolResultName` | Include `name` on tool result messages |
|
|
271
|
+
| `requiresAssistantAfterToolResult` | Insert an assistant message before a user message after tool results |
|
|
272
|
+
| `requiresThinkingAsText` | Convert thinking blocks to plain text |
|
|
273
|
+
| `thinkingFormat` | Use `reasoning_effort`, `zai`, `qwen`, or `qwen-chat-template` thinking parameters |
|
|
274
|
+
| `supportsStrictMode` | Include the `strict` field in tool definitions |
|
|
239
275
|
| `openRouterRouting` | OpenRouter routing config passed to OpenRouter for model/provider selection |
|
|
240
276
|
| `vercelGatewayRouting` | Vercel AI Gateway routing config for provider selection (`only`, `order`) |
|
|
241
277
|
|
|
278
|
+
`qwen` uses top-level `enable_thinking`. Use `qwen-chat-template` for local Qwen-compatible servers that require `chat_template_kwargs.enable_thinking`.
|
|
279
|
+
|
|
242
280
|
Example:
|
|
243
281
|
|
|
244
282
|
```json
|
package/docs/packages.md
CHANGED
|
@@ -54,6 +54,15 @@ npm:pkg
|
|
|
54
54
|
- Versioned specs are pinned and skipped by `pi update`.
|
|
55
55
|
- Global installs use `npm install -g`.
|
|
56
56
|
- Project installs go under `.pi/npm/`.
|
|
57
|
+
- Set `npmCommand` in `settings.json` to pin npm package lookup and install operations to a specific wrapper command such as `mise` or `asdf`.
|
|
58
|
+
|
|
59
|
+
Example:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"npmCommand": ["mise", "exec", "node@20", "--", "npm"]
|
|
64
|
+
}
|
|
65
|
+
```
|
|
57
66
|
|
|
58
67
|
### git
|
|
59
68
|
|
package/docs/settings.md
CHANGED
|
@@ -117,6 +117,15 @@ When a provider requests a retry delay longer than `maxDelayMs` (e.g., Google's
|
|
|
117
117
|
|---------|------|---------|-------------|
|
|
118
118
|
| `shellPath` | string | - | Custom shell path (e.g., for Cygwin on Windows) |
|
|
119
119
|
| `shellCommandPrefix` | string | - | Prefix for every bash command (e.g., `"shopt -s expand_aliases"`) |
|
|
120
|
+
| `npmCommand` | string[] | - | Command argv used for npm package lookup/install operations (e.g., `["mise", "exec", "node@20", "--", "npm"]`) |
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"npmCommand": ["mise", "exec", "node@20", "--", "npm"]
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`npmCommand` is used for all npm package-manager operations, including `npm root -g`, installs, uninstalls, and `npm install` inside git packages. Use argv-style entries exactly as the process should be launched.
|
|
120
129
|
|
|
121
130
|
### Model Cycling
|
|
122
131
|
|
package/docs/terminal-setup.md
CHANGED
|
@@ -86,6 +86,17 @@ Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward
|
|
|
86
86
|
|
|
87
87
|
If you already have an `actions` array, add the objects to it. If the old fullscreen behavior persists, fully close and reopen Windows Terminal.
|
|
88
88
|
|
|
89
|
+
## xfce4-terminal, terminator
|
|
90
|
+
|
|
91
|
+
These terminals have limited escape sequence support. Modified Enter keys like `Ctrl+Enter` and `Shift+Enter` cannot be distinguished from plain `Enter`, preventing custom keybindings such as `submit: ["ctrl+enter"]` from working.
|
|
92
|
+
|
|
93
|
+
For the best experience, use a terminal that supports the Kitty keyboard protocol:
|
|
94
|
+
- [Kitty](https://sw.kovidgoyal.net/kitty/)
|
|
95
|
+
- [Ghostty](https://ghostty.org/)
|
|
96
|
+
- [WezTerm](https://wezfurlong.org/wezterm/)
|
|
97
|
+
- [iTerm2](https://iterm2.com/)
|
|
98
|
+
- [Alacritty](https://github.com/alacritty/alacritty) (requires compilation with Kitty protocol support)
|
|
99
|
+
|
|
89
100
|
## IntelliJ IDEA (Integrated Terminal)
|
|
90
101
|
|
|
91
102
|
The built-in terminal has limited escape sequence support. Shift+Enter cannot be distinguished from Enter in IntelliJ's terminal.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "1.9.
|
|
9
|
+
"version": "1.9.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "1.22.
|
|
9
|
+
"version": "1.22.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mariozechner/pi-coding-agent",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.2",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@mariozechner/jiti": "^2.6.2",
|
|
43
|
-
"@mariozechner/pi-agent-core": "^0.58.
|
|
44
|
-
"@mariozechner/pi-ai": "^0.58.
|
|
45
|
-
"@mariozechner/pi-tui": "^0.58.
|
|
43
|
+
"@mariozechner/pi-agent-core": "^0.58.2",
|
|
44
|
+
"@mariozechner/pi-ai": "^0.58.2",
|
|
45
|
+
"@mariozechner/pi-tui": "^0.58.2",
|
|
46
46
|
"@silvia-odwyer/photon-node": "^0.3.4",
|
|
47
47
|
"chalk": "^5.5.0",
|
|
48
48
|
"cli-highlight": "^2.1.11",
|