@earendil-works/pi-coding-agent 0.84.1 → 0.84.3
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 +139 -0
- package/README.md +9 -4
- package/dist/bundle/chunks/anthropic-messages-JWX2WP65.js +45 -0
- package/dist/bundle/chunks/anthropic.js +75 -0
- package/dist/bundle/chunks/azure-openai-responses-5ENVCQ7U.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +74 -0
- package/dist/bundle/chunks/chunk-4L3WN2XY.js +2 -0
- package/dist/bundle/chunks/chunk-6CYCI3EJ.js +12 -0
- package/dist/bundle/chunks/chunk-6R7UI4IY.js +2 -0
- package/dist/bundle/chunks/chunk-AXIIZGTV.js +2 -0
- package/dist/bundle/chunks/chunk-DRQDKNXA.js +2 -0
- package/dist/bundle/chunks/chunk-E5KXRMZK.js +1547 -0
- package/dist/bundle/chunks/chunk-GMWCTUPB.js +2 -0
- package/dist/bundle/chunks/chunk-GPPBJGBU.js +50 -0
- package/dist/bundle/chunks/chunk-JUUC5AZY.js +2 -0
- package/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
- package/dist/bundle/chunks/chunk-MNAIPA3J.js +2 -0
- package/dist/bundle/chunks/chunk-NBBFIJUL.js +11 -0
- package/dist/bundle/chunks/chunk-NUHFSC37.js +25 -0
- package/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
- package/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
- package/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
- package/dist/bundle/chunks/chunk-TEPMHNKQ.js +2 -0
- package/dist/bundle/chunks/chunk-TRDNDS6A.js +4 -0
- package/dist/bundle/chunks/chunk-UAQELI3K.js +2 -0
- package/dist/bundle/chunks/chunk-XDUWOHPL.js +6 -0
- package/dist/bundle/chunks/chunk-XNGRGP62.js +2 -0
- package/dist/bundle/chunks/dist-RDWOYWHR.js +13 -0
- package/dist/bundle/chunks/github-copilot.js +2 -0
- package/dist/bundle/chunks/google-generative-ai-XDKMGBCJ.js +2 -0
- package/dist/bundle/chunks/google-vertex-D5FGEO3Y.js +2 -0
- package/dist/bundle/chunks/image-resize-worker.js +2 -0
- package/dist/bundle/chunks/kimi-coding.js +2 -0
- package/dist/bundle/chunks/lib-HGQMNYVT.js +9 -0
- package/dist/bundle/chunks/mistral-conversations-YK73UAOZ.js +5 -0
- package/dist/bundle/chunks/multipart-parser-SQ6GDJL7.js +3 -0
- package/dist/bundle/chunks/openai-codex-responses-GJVBJXLB.js +8 -0
- package/dist/bundle/chunks/openai-codex.js +75 -0
- package/dist/bundle/chunks/openai-completions-JD4WAC3R.js +7 -0
- package/dist/bundle/chunks/openai-responses-BSOJMSEV.js +2 -0
- package/dist/bundle/chunks/openrouter-images-N4XVVFSD.js +2 -0
- package/dist/bundle/chunks/openrouter.js +75 -0
- package/dist/bundle/chunks/pi-messages-TPFH44NP.js +8 -0
- package/dist/bundle/chunks/radius.js +75 -0
- package/dist/bundle/chunks/src-UK77SYZE.js +4 -0
- package/dist/bundle/chunks/xai.js +2 -0
- package/dist/bundle/cli.js +3 -0
- package/dist/bundle/client.js +2 -0
- package/dist/bundle/index.js +2 -0
- package/dist/bundle/rpc-entry.js +3 -0
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +40 -9
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-command.d.ts.map +1 -1
- package/dist/cli/auth-command.js +5 -4
- package/dist/cli/auth-command.js.map +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js +2 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/config.d.ts +4 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +22 -14
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +33 -9
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +169 -101
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +6 -7
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +3 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +4 -3
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +41 -32
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/defaults.d.ts +1 -0
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/defaults.js +9 -0
- package/dist/core/defaults.js.map +1 -1
- package/dist/core/experimental.d.ts +4 -0
- package/dist/core/experimental.d.ts.map +1 -1
- package/dist/core/experimental.js +4 -0
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/extensions/index.d.ts +2 -2
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +115 -48
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +42 -9
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js +3 -0
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +1 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/keybindings.d.ts +38 -13
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +26 -5
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-config.d.ts +10 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +4 -1
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts +1 -0
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +14 -8
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/models-store.d.ts.map +1 -1
- package/dist/core/models-store.js +2 -1
- package/dist/core/models-store.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +22 -14
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-manifest.d.ts.map +1 -1
- package/dist/core/pi-manifest.js +2 -1
- package/dist/core/pi-manifest.js.map +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +2 -2
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +2 -1
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +3 -2
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts +7 -5
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +12 -4
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-export.d.ts +4 -0
- package/dist/core/session-export.d.ts.map +1 -0
- package/dist/core/session-export.js +32 -0
- package/dist/core/session-export.js.map +1 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +4 -3
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-diagnostics.d.ts +9 -0
- package/dist/core/settings-diagnostics.d.ts.map +1 -0
- package/dist/core/settings-diagnostics.js +21 -0
- package/dist/core/settings-diagnostics.js.map +1 -0
- package/dist/core/settings-manager.d.ts +15 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +64 -10
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +51 -33
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +2 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +12 -3
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +14 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +38 -20
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts +0 -5
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +2 -5
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +22 -4
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +4 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +18 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/powershell.d.ts +16 -0
- package/dist/core/tools/powershell.d.ts.map +1 -0
- package/dist/core/tools/powershell.js +39 -0
- package/dist/core/tools/powershell.js.map +1 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +2 -0
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +2 -0
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +2 -1
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/extensions/llama/index.d.ts.map +1 -1
- package/dist/extensions/llama/index.js +2 -0
- package/dist/extensions/llama/index.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +6 -2
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +4 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +23 -16
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +4 -3
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +9 -3
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +58 -13
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +10 -3
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +128 -56
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.js +165 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +15 -3
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +74 -17
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +10 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +2 -1
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +19 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +250 -129
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.js +34 -0
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/modes/interactive/session-share.d.ts +16 -0
- package/dist/modes/interactive/session-share.d.ts.map +1 -0
- package/dist/modes/interactive/session-share.js +188 -0
- package/dist/modes/interactive/session-share.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +2 -0
- package/dist/modes/interactive/theme/light.json +2 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +10 -2
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +25 -11
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +9 -1
- package/dist/modes/interactive/theme/theme.d.ts +5 -3
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +16 -5
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/json-event.d.ts +18 -12
- package/dist/modes/json-event.d.ts.map +1 -1
- package/dist/modes/json-event.js +22 -5
- package/dist/modes/json-event.js.map +1 -1
- package/dist/package-manager-cli.d.ts +1 -0
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +187 -3
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/server/create-harness.d.ts.map +1 -1
- package/dist/server/create-harness.js +2 -0
- package/dist/server/create-harness.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +2 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/management-http.d.ts +5 -3
- package/dist/utils/management-http.d.ts.map +1 -1
- package/dist/utils/management-http.js +14 -10
- package/dist/utils/management-http.js.map +1 -1
- package/dist/utils/shell.d.ts +3 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +17 -5
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +1 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +60 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/text.d.ts +8 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +9 -0
- package/dist/utils/text.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +10 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +14 -19
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/compaction.md +21 -6
- package/docs/custom-provider.md +6 -3
- package/docs/environment-variables.md +16 -10
- package/docs/extensions.md +21 -7
- package/docs/json.md +12 -5
- package/docs/keybindings.md +15 -9
- package/docs/llama-cpp.md +2 -0
- package/docs/models.md +8 -2
- package/docs/packages.md +2 -2
- package/docs/rpc.md +24 -7
- package/docs/sdk.md +16 -2
- package/docs/settings.md +41 -2
- package/docs/skills.md +4 -3
- package/docs/terminal-setup.md +34 -11
- package/docs/themes.md +24 -3
- package/docs/tui.md +2 -2
- package/docs/usage.md +9 -4
- package/docs/windows.md +24 -2
- package/examples/extensions/border-status-editor.ts +1 -1
- 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/git-checkpoint.ts +2 -2
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/notify.ts +3 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +3 -1
- package/examples/extensions/subagent/agents.ts +40 -9
- package/examples/extensions/subagent/index.ts +27 -4
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/rpc-extension-ui.ts +1 -1
- package/examples/sdk/06-extensions.ts +1 -1
- package/examples/sdk/README.md +1 -1
- package/npm-shrinkwrap.json +28 -132
- package/package.json +12 -14
package/docs/rpc.md
CHANGED
|
@@ -919,6 +919,14 @@ Emitted during streaming of assistant messages. Contains a delta event without a
|
|
|
919
919
|
```json
|
|
920
920
|
{
|
|
921
921
|
"type": "message_update",
|
|
922
|
+
"usage": {
|
|
923
|
+
"input": 100,
|
|
924
|
+
"output": 1,
|
|
925
|
+
"cacheRead": 0,
|
|
926
|
+
"cacheWrite": 0,
|
|
927
|
+
"totalTokens": 101,
|
|
928
|
+
"cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}
|
|
929
|
+
},
|
|
922
930
|
"assistantMessageEvent": {
|
|
923
931
|
"type": "text_delta",
|
|
924
932
|
"contentIndex": 0,
|
|
@@ -937,23 +945,32 @@ The `assistantMessageEvent` field contains one of these delta types:
|
|
|
937
945
|
| `thinking_start` | Thinking block started |
|
|
938
946
|
| `thinking_delta` | Thinking content chunk |
|
|
939
947
|
| `thinking_end` | Thinking block ended |
|
|
940
|
-
| `toolcall_start` | Tool call started |
|
|
948
|
+
| `toolcall_start` | Tool call started (includes `id` and `toolName`) |
|
|
941
949
|
| `toolcall_delta` | Tool call arguments chunk |
|
|
942
950
|
| `toolcall_end` | Tool call ended (includes full `toolCall` object) |
|
|
943
951
|
|
|
944
952
|
Example streaming a text response:
|
|
945
953
|
```json
|
|
946
|
-
{"type":"message_update","assistantMessageEvent":{"type":"text_start","contentIndex":0}}
|
|
947
|
-
{"type":"message_update","assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":"Hello"}}
|
|
948
|
-
{"type":"message_update","assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":" world"}}
|
|
949
|
-
{"type":"message_update","assistantMessageEvent":{"type":"text_end","contentIndex":0,"content":"Hello world"}}
|
|
954
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"text_start","contentIndex":0}}
|
|
955
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":"Hello"}}
|
|
956
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":" world"}}
|
|
957
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"text_end","contentIndex":0,"content":"Hello world"}}
|
|
958
|
+
```
|
|
959
|
+
|
|
960
|
+
The top-level `usage` field contains the latest cumulative provider-reported usage. It may remain
|
|
961
|
+
zero until completion when a provider does not report usage during streaming.
|
|
962
|
+
|
|
963
|
+
Example starting a tool call:
|
|
964
|
+
```json
|
|
965
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"toolcall_start","contentIndex":1,"id":"call_abc123","toolName":"write"}}
|
|
950
966
|
```
|
|
951
967
|
|
|
952
968
|
`message_update` intentionally omits the former cumulative `message` field and
|
|
953
969
|
`assistantMessageEvent.partial`. Clients that need a live partial message must assemble it
|
|
954
970
|
from `message_start` and subsequent events using `contentIndex`. Treat `message_end.message`
|
|
955
|
-
as authoritative. For tool calls,
|
|
956
|
-
contains the completed
|
|
971
|
+
as authoritative. For tool calls, `toolcall_start` provides the call `id` and `toolName`;
|
|
972
|
+
buffer `toolcall_delta.delta` for arguments. `toolcall_end.toolCall` contains the completed
|
|
973
|
+
call.
|
|
957
974
|
|
|
958
975
|
### bash_execution_update
|
|
959
976
|
|
package/docs/sdk.md
CHANGED
|
@@ -372,6 +372,13 @@ import { ModelRuntime } from "@earendil-works/pi-coding-agent";
|
|
|
372
372
|
|
|
373
373
|
const modelRuntime = await ModelRuntime.create();
|
|
374
374
|
|
|
375
|
+
// create() restores cached catalogs but does not refresh them from pi.dev by default.
|
|
376
|
+
// Opt in to a create-time network refresh and bound how long it may take:
|
|
377
|
+
const refreshedRuntime = await ModelRuntime.create({
|
|
378
|
+
allowModelNetwork: true,
|
|
379
|
+
modelRefreshTimeoutMs: 15_000,
|
|
380
|
+
});
|
|
381
|
+
|
|
375
382
|
// Find specific built-in model (doesn't check if API key exists)
|
|
376
383
|
const opus = getModel("anthropic", "claude-opus-4-5");
|
|
377
384
|
if (!opus) throw new Error("Model not found");
|
|
@@ -402,6 +409,8 @@ If no model is provided:
|
|
|
402
409
|
2. Uses default from settings
|
|
403
410
|
3. Falls back to first available model
|
|
404
411
|
|
|
412
|
+
Remote catalogs are persisted locally so later runtimes can restore them without a network request. The default file is `~/.pi/agent/models-store.json`; set `modelsStorePath` to choose another location, or inject `modelsStore` to control persistence. Network refreshes are throttled to once per provider every four hours unless forced. To force an immediate refresh, call `await modelRuntime.refresh({ allowNetwork: true, force: true, signal })`. Setting `PI_OFFLINE` disables model network access.
|
|
413
|
+
|
|
405
414
|
To match CLI model parsing, use the exported resolver helpers:
|
|
406
415
|
|
|
407
416
|
```typescript
|
|
@@ -510,7 +519,7 @@ const { session } = await createAgentSession({ resourceLoader: loader });
|
|
|
510
519
|
|
|
511
520
|
Specify which built-in tools to enable:
|
|
512
521
|
|
|
513
|
-
- Built-in tool names: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`
|
|
522
|
+
- Built-in tool names: `read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, `ls`
|
|
514
523
|
- Default built-ins: `read`, `bash`, `edit`, `write`
|
|
515
524
|
- `noTools: "all"` disables all tools
|
|
516
525
|
- `noTools: "builtin"` disables default built-ins while keeping extension and custom tools enabled
|
|
@@ -531,6 +540,11 @@ const { session } = await createAgentSession({
|
|
|
531
540
|
tools: ["read", "bash", "grep"],
|
|
532
541
|
});
|
|
533
542
|
|
|
543
|
+
// Use PowerShell instead of Bash on Windows
|
|
544
|
+
const { session } = await createAgentSession({
|
|
545
|
+
tools: ["read", "powershell", "edit", "write"],
|
|
546
|
+
});
|
|
547
|
+
|
|
534
548
|
// Disable one tool while keeping the rest available
|
|
535
549
|
const { session } = await createAgentSession({
|
|
536
550
|
excludeTools: ["ask_question"],
|
|
@@ -1187,7 +1201,7 @@ SettingsManager
|
|
|
1187
1201
|
// Tool factories
|
|
1188
1202
|
createCodingTools
|
|
1189
1203
|
createReadOnlyTools
|
|
1190
|
-
createReadTool, createBashTool, createEditTool, createWriteTool
|
|
1204
|
+
createReadTool, createBashTool, createPowerShellTool, createEditTool, createWriteTool
|
|
1191
1205
|
createGrepTool, createFindTool, createLsTool
|
|
1192
1206
|
|
|
1193
1207
|
// Types
|
package/docs/settings.md
CHANGED
|
@@ -31,8 +31,8 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
|
|
|
31
31
|
| `defaultModel` | string | - | Default model ID |
|
|
32
32
|
| `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
|
|
33
33
|
| `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
|
|
34
|
-
| `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses |
|
|
35
|
-
| `thinkingBudgets` | object | - | Custom token budgets per thinking level |
|
|
34
|
+
| `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses and compaction or branch-summary usage |
|
|
35
|
+
| `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. |
|
|
36
36
|
|
|
37
37
|
#### thinkingBudgets
|
|
38
38
|
|
|
@@ -66,6 +66,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
|
|
|
66
66
|
| `autocompleteMaxVisible` | number | `5` | Max visible items in autocomplete dropdown (3-20) |
|
|
67
67
|
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
|
|
68
68
|
| `tuiMode` | string | `"regular"` | Interactive TUI mode: `"regular"` or experimental `"fullscreen"`. Changes from `/settings` apply immediately; `--tui-mode` overrides this setting at startup |
|
|
69
|
+
| `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 |
|
|
69
70
|
| `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 |
|
|
70
71
|
|
|
71
72
|
For VS Code, include `--wait` so pi resumes after the editor exits:
|
|
@@ -191,6 +192,20 @@ Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explic
|
|
|
191
192
|
| `shellCommandPrefix` | string | - | Prefix for every bash command (e.g., `"shopt -s expand_aliases"`) |
|
|
192
193
|
| `npmCommand` | string[] | - | Command argv used for npm package lookup/install operations (e.g., `["mise", "exec", "node@20", "--", "npm"]`) |
|
|
193
194
|
|
|
195
|
+
Windows paths in JSON must use forward slashes or escaped backslashes:
|
|
196
|
+
|
|
197
|
+
```json
|
|
198
|
+
{
|
|
199
|
+
"shellPath": "C:/Program Files/Git/bin/bash.exe"
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
```json
|
|
204
|
+
{
|
|
205
|
+
"shellPath": "C:\\Program Files\\Git\\bin\\bash.exe"
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
194
209
|
```json
|
|
195
210
|
{
|
|
196
211
|
"npmCommand": ["mise", "exec", "node@20", "--", "npm"]
|
|
@@ -199,6 +214,30 @@ Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explic
|
|
|
199
214
|
|
|
200
215
|
`npmCommand` is used for all npm package-manager operations, including installs, uninstalls, and dependency installs inside git packages. User-scoped npm packages install under `~/.pi/agent/npm/`; project-scoped npm packages install under `.pi/npm/`. Use argv-style entries exactly as the process should be launched. When `npmCommand` is configured, git package dependency installs use plain `install` to avoid npm-specific flags in wrappers or alternate package managers.
|
|
201
216
|
|
|
217
|
+
### Tools
|
|
218
|
+
|
|
219
|
+
| Setting | Type | Default | Description |
|
|
220
|
+
|---------|------|---------|-------------|
|
|
221
|
+
| `defaultTools` | string[] | - | Built-in tools enabled initially. When omitted, Pi uses its standard defaults |
|
|
222
|
+
|
|
223
|
+
`defaultTools` selects the built-in tools enabled at startup. Extension and SDK custom tools remain enabled. Available built-ins are `read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, and `ls`:
|
|
224
|
+
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"defaultTools": ["bash", "edit", "write"]
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
On Windows, select `powershell` instead of `bash`, or include both:
|
|
232
|
+
|
|
233
|
+
```json
|
|
234
|
+
{
|
|
235
|
+
"defaultTools": ["read", "powershell", "edit", "write"]
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
An empty array starts with no built-in tools while preserving extension and SDK custom tools. `--tools` replaces this behavior with a strict allowlist for all tools, `--no-tools` disables all tools, and `--no-builtin-tools` disables the built-in defaults. `--exclude-tools` filters the resulting list. A project `defaultTools` array replaces the global array.
|
|
240
|
+
|
|
202
241
|
### Sessions
|
|
203
242
|
|
|
204
243
|
| Setting | Type | Default | Description |
|
package/docs/skills.md
CHANGED
|
@@ -34,9 +34,10 @@ Pi loads skills from:
|
|
|
34
34
|
- CLI: `--skill <path>` (repeatable, additive even with `--no-skills`)
|
|
35
35
|
|
|
36
36
|
Discovery rules:
|
|
37
|
-
- In `~/.pi/agent/skills/` and `.pi/skills/`, direct root `.md` files are discovered as individual skills
|
|
37
|
+
- In `~/.pi/agent/skills/` and `.pi/skills/`, direct root `.md` files are discovered as individual skills when they have valid skill frontmatter with a non-empty `description`
|
|
38
38
|
- In all skill locations, directories containing `SKILL.md` are discovered recursively
|
|
39
|
-
- In `~/.agents/skills/` and project `.agents/skills/`, root `.md` files are ignored
|
|
39
|
+
- In `~/.agents/skills/` and project `.agents/skills/`, root `.md` files are ignored, but nested `.md` files in grouping folders are discovered when they declare skill frontmatter
|
|
40
|
+
- Root Markdown files other than `SKILL.md` that do not look like skills are ignored silently
|
|
40
41
|
|
|
41
42
|
Disable discovery with `--no-skills` (explicit `--skill` paths still load).
|
|
42
43
|
|
|
@@ -183,7 +184,7 @@ Pi validates skills against the Agent Skills standard. Most issues produce warni
|
|
|
183
184
|
|
|
184
185
|
Unknown frontmatter fields are ignored.
|
|
185
186
|
|
|
186
|
-
|
|
187
|
+
Declared skills with missing descriptions are not loaded. Malformed `SKILL.md` files and `SKILL.md` files without a description produce warnings and are not loaded. Other Markdown files without valid skill frontmatter are ignored.
|
|
187
188
|
|
|
188
189
|
Name collisions (same name from different locations) warn and keep the first skill found.
|
|
189
190
|
|
package/docs/terminal-setup.md
CHANGED
|
@@ -2,9 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Pi uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration.
|
|
4
4
|
|
|
5
|
-
## Kitty
|
|
5
|
+
## Kitty
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Works out of the box.
|
|
8
|
+
|
|
9
|
+
## iTerm2
|
|
10
|
+
|
|
11
|
+
### Regular TUI mode
|
|
12
|
+
|
|
13
|
+
Works out of the box.
|
|
14
|
+
|
|
15
|
+
### Fullscreen TUI mode
|
|
16
|
+
|
|
17
|
+
Pi owns the viewport, so iTerm2 sends mouse-wheel reports instead of scrolling its native scrollback. With iTerm2's default fast-trackpad behavior, those reports can lose most of an accelerated wheel delta, making fullscreen scrolling much slower than regular scrolling.
|
|
18
|
+
|
|
19
|
+
If fast mouse-wheel gestures move only about one line at a time in fullscreen mode:
|
|
20
|
+
|
|
21
|
+
1. Open **iTerm2 → Settings → Advanced**.
|
|
22
|
+
2. Search for **Trackpad scrolls fast?** and set it to **No**.
|
|
23
|
+
|
|
24
|
+
This is an iTerm2-wide workaround and may also change native trackpad scrolling. The underlying behavior is tracked in [iTerm2 issue 9619](https://gitlab.com/gnachman/iterm2/-/work_items/9619).
|
|
8
25
|
|
|
9
26
|
## Apple Terminal
|
|
10
27
|
|
|
@@ -32,6 +49,10 @@ If Claude Code 2.x or newer is the only reason you added that mapping, you can r
|
|
|
32
49
|
|
|
33
50
|
Pi binds `Ctrl+J` as a default newline alias, so `Shift+Enter` keeps working in tmux via that remap without extra pi configuration.
|
|
34
51
|
|
|
52
|
+
### Fullscreen TUI mode
|
|
53
|
+
|
|
54
|
+
In fullscreen mode, links remain clickable, but Ghostty does not show its hover underline or lower-left URL preview while pi captures mouse input. Hold `Shift+Command` on macOS or `Shift+Ctrl` on Linux to use Ghostty's native link handling.
|
|
55
|
+
|
|
35
56
|
## WezTerm
|
|
36
57
|
|
|
37
58
|
WezTerm usually works out of the box for `Shift+Enter` via xterm modifyOtherKeys. To use the Kitty keyboard protocol explicitly, create `~/.wezterm.lua`:
|
|
@@ -99,7 +120,15 @@ Add to `keybindings.json`:
|
|
|
99
120
|
|
|
100
121
|
## Windows Terminal
|
|
101
122
|
|
|
102
|
-
|
|
123
|
+
Pi uses Windows-style keybindings when running natively on Windows or in WSL:
|
|
124
|
+
|
|
125
|
+
- `Alt+V` pastes an image or clipboard text.
|
|
126
|
+
- `Ctrl+F` searches the transcript in fullscreen mode, and `Ctrl+Up`/`Ctrl+Down` jump between marked messages.
|
|
127
|
+
- `Alt+P` cycles to the previous model.
|
|
128
|
+
- `Ctrl+Z` undoes editing on native Windows; WSL uses `Alt+Z` so `Ctrl+Z` can suspend pi.
|
|
129
|
+
- `Ctrl+Q` queues a follow-up message and `Alt+Q` restores queued messages.
|
|
130
|
+
|
|
131
|
+
Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward `Shift+Enter` for inserting a new line:
|
|
103
132
|
|
|
104
133
|
```json
|
|
105
134
|
{
|
|
@@ -107,20 +136,14 @@ Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward
|
|
|
107
136
|
{
|
|
108
137
|
"command": { "action": "sendInput", "input": "\u001b[13;2u" },
|
|
109
138
|
"keys": "shift+enter"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"command": { "action": "sendInput", "input": "\u001b[13;3u" },
|
|
113
|
-
"keys": "alt+enter"
|
|
114
139
|
}
|
|
115
140
|
]
|
|
116
141
|
}
|
|
117
142
|
```
|
|
118
143
|
|
|
119
|
-
|
|
120
|
-
- Windows Terminal binds `Alt+Enter` to fullscreen by default. That prevents pi from receiving `Alt+Enter` for follow-up queueing.
|
|
121
|
-
- Remapping `Alt+Enter` to `sendInput` forwards the real key chord to pi instead.
|
|
144
|
+
Windows Terminal binds `Alt+Enter` to fullscreen by default. To use it instead of pi's `Ctrl+Q` default for follow-up queueing, configure Windows Terminal to send the key and bind `app.message.followUp` to `alt+enter` in pi.
|
|
122
145
|
|
|
123
|
-
If you already have an `actions` array, add the
|
|
146
|
+
If you already have an `actions` array, add the object to it. Fully close and reopen Windows Terminal after changing its settings.
|
|
124
147
|
|
|
125
148
|
## xfce4-terminal, terminator
|
|
126
149
|
|
package/docs/themes.md
CHANGED
|
@@ -39,6 +39,23 @@ Select a theme via `/settings` or in `settings.json`:
|
|
|
39
39
|
|
|
40
40
|
On first run, pi detects your terminal background and defaults to `dark` or `light`.
|
|
41
41
|
|
|
42
|
+
### Initial Theme
|
|
43
|
+
|
|
44
|
+
Start an interactive run with a theme without changing the saved setting:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pi --use-theme light
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
To follow terminal appearance, use `lightTheme/darkTheme` syntax:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pi --use-theme light/dark
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The CLI value is the initial theme for that run. Choosing another theme later in `/settings` applies it immediately
|
|
57
|
+
and saves it normally.
|
|
58
|
+
|
|
42
59
|
## Creating a Custom Theme
|
|
43
60
|
|
|
44
61
|
1. Create a theme file:
|
|
@@ -72,6 +89,8 @@ vim ~/.pi/agent/themes/my-theme.json
|
|
|
72
89
|
"thinkingText": "secondary",
|
|
73
90
|
"selectedBg": "#2d2d30",
|
|
74
91
|
"scrollbarThumb": "#555566",
|
|
92
|
+
"searchMatchBg": "#2d2d30",
|
|
93
|
+
"searchMatchText": "",
|
|
75
94
|
"userMessageBg": "#2d2d30",
|
|
76
95
|
"userMessageText": "",
|
|
77
96
|
"customMessageBg": "#2d2d30",
|
|
@@ -141,13 +160,13 @@ vim ~/.pi/agent/themes/my-theme.json
|
|
|
141
160
|
|
|
142
161
|
- `name` is required, must be unique, and must not contain `/`.
|
|
143
162
|
- `vars` is optional. Define reusable colors here, then reference them in `colors`.
|
|
144
|
-
- `colors` must define all 51 required tokens. `thinkingMax`
|
|
163
|
+
- `colors` must define all 51 required tokens. `thinkingMax`, `scrollbarThumb`, and the two search highlight tokens are optional and use the fallbacks listed below.
|
|
145
164
|
|
|
146
165
|
The `$schema` field enables editor auto-completion and validation.
|
|
147
166
|
|
|
148
167
|
## Color Tokens
|
|
149
168
|
|
|
150
|
-
Every theme must define all 51 required color tokens. `thinkingMax`
|
|
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.
|
|
151
170
|
|
|
152
171
|
### Core UI (11 colors)
|
|
153
172
|
|
|
@@ -165,12 +184,14 @@ Every theme must define all 51 required color tokens. `thinkingMax` and `scrollb
|
|
|
165
184
|
| `text` | Default text (usually `""`) |
|
|
166
185
|
| `thinkingText` | Thinking block text |
|
|
167
186
|
|
|
168
|
-
### Backgrounds & Content (11 required,
|
|
187
|
+
### Backgrounds & Content (11 required, 3 optional)
|
|
169
188
|
|
|
170
189
|
| Token | Purpose |
|
|
171
190
|
|-------|---------|
|
|
172
191
|
| `selectedBg` | Selected line background |
|
|
173
192
|
| `scrollbarThumb` | Fullscreen scrollbar thumb background; optional, falls back to `selectedBg` |
|
|
193
|
+
| `searchMatchBg` | Transcript search match background and current-match text; optional, falls back to `selectedBg` |
|
|
194
|
+
| `searchMatchText` | Transcript search match text and current-match background; optional, falls back to `text` |
|
|
174
195
|
| `userMessageBg` | User message background |
|
|
175
196
|
| `userMessageText` | User message text |
|
|
176
197
|
| `customMessageBg` | Extension message background |
|
package/docs/tui.md
CHANGED
|
@@ -431,7 +431,7 @@ renderResult(result, options, theme, context) {
|
|
|
431
431
|
|
|
432
432
|
| Category | Colors |
|
|
433
433
|
|----------|--------|
|
|
434
|
-
| General | `text`, `accent`, `muted`, `dim` |
|
|
434
|
+
| General | `text`, `accent`, `muted`, `dim`, `searchMatchText` |
|
|
435
435
|
| Status | `success`, `error`, `warning` |
|
|
436
436
|
| Borders | `border`, `borderAccent`, `borderMuted` |
|
|
437
437
|
| Messages | `userMessageText`, `customMessageText`, `customMessageLabel` |
|
|
@@ -444,7 +444,7 @@ renderResult(result, options, theme, context) {
|
|
|
444
444
|
|
|
445
445
|
**Background colors** (`theme.bg(color, text)`):
|
|
446
446
|
|
|
447
|
-
`selectedBg`, `userMessageBg`, `customMessageBg`, `toolPendingBg`, `toolSuccessBg`, `toolErrorBg`
|
|
447
|
+
`selectedBg`, `searchMatchBg`, `userMessageBg`, `customMessageBg`, `toolPendingBg`, `toolSuccessBg`, `toolErrorBg`
|
|
448
448
|
|
|
449
449
|
**For Markdown**, use `getMarkdownTheme()`:
|
|
450
450
|
|
package/docs/usage.md
CHANGED
|
@@ -142,7 +142,7 @@ If you use pi for open source work and want to publish sessions for model, promp
|
|
|
142
142
|
## CLI Reference
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
|
-
pi [options] [@files...] [messages...]
|
|
145
|
+
pi [options] [--] [@files...] [messages...]
|
|
146
146
|
```
|
|
147
147
|
|
|
148
148
|
### Package Commands
|
|
@@ -213,7 +213,7 @@ cat README.md | pi -p "Summarize this text"
|
|
|
213
213
|
| `--no-builtin-tools`, `-nbt` | Disable built-in tools but keep extension/custom tools enabled |
|
|
214
214
|
| `--no-tools`, `-nt` | Disable all tools |
|
|
215
215
|
|
|
216
|
-
Built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`.
|
|
216
|
+
Built-in tools: `read`, `bash`, `powershell` (Windows), `edit`, `write`, `grep`, `find`, `ls`.
|
|
217
217
|
|
|
218
218
|
### Resource Options
|
|
219
219
|
|
|
@@ -242,15 +242,17 @@ pi --no-extensions -e ./my-extension.ts
|
|
|
242
242
|
| `--system-prompt <text>` | Replace default prompt; context files and skills are still appended |
|
|
243
243
|
| `--append-system-prompt <text>` | Append to system prompt |
|
|
244
244
|
| `--tui-mode <mode>` | TUI mode: `regular` (default) or experimental `fullscreen` |
|
|
245
|
+
| `--use-theme <name[/name]>` | Set the initial interactive theme for this run without changing settings |
|
|
245
246
|
| `--verbose` | Force verbose startup |
|
|
246
247
|
| `-a`, `--approve` | Trust project-local files for this run |
|
|
247
248
|
| `-na`, `--no-approve` | Ignore project-local files for this run |
|
|
249
|
+
| `--` | Stop option parsing; remaining arguments are prompts or `@file` inputs |
|
|
248
250
|
| `-h`, `--help` | Show help |
|
|
249
251
|
| `-v`, `--version` | Show version |
|
|
250
252
|
|
|
251
|
-
In `fullscreen` mode, the transcript scrolls inside the terminal viewport while queued messages, working status, extension widgets, editor, and footer remain fixed at the bottom. Mouse/trackpad input scrolls the region under the pointer; keyboard viewport actions always remain available. Inline images work in terminals that support the Kitty graphics protocol, including Kitty and Ghostty. In iTerm2 they render as text placeholders because its inline-image protocol cannot delete or crop placements during application-owned scrolling. In `regular` mode, pi uses the main screen and terminal-owned scrollback, and iTerm2 inline images continue to render normally.
|
|
253
|
+
In `fullscreen` mode, the transcript scrolls inside the terminal viewport while queued messages, working status, extension widgets, editor, and footer remain fixed at the bottom. Mouse/trackpad input scrolls the region under the pointer; keyboard viewport actions always remain available. Inline images work in terminals that support the Kitty graphics protocol, including Kitty and Ghostty. In iTerm2 they render as text placeholders because its inline-image protocol cannot delete or crop placements during application-owned scrolling. In `regular` mode, pi uses the main screen and terminal-owned scrollback, and iTerm2 inline images continue to render normally. See [Terminal setup](terminal-setup.md) for terminal-specific settings and workarounds.
|
|
252
254
|
|
|
253
|
-
Set **TUI mode** in `/settings` to switch between `regular` and `fullscreen` immediately and choose the default for future sessions.
|
|
255
|
+
Set **TUI mode** in `/settings` to switch between `regular` and `fullscreen` immediately and choose the default for future sessions. **Fullscreen exit output** controls whether exiting fullscreen prints the final transcript or restores the previous screen and prints only the session resume hint.
|
|
254
256
|
|
|
255
257
|
### File Arguments
|
|
256
258
|
|
|
@@ -271,6 +273,9 @@ pi "List all .ts files in src/"
|
|
|
271
273
|
# Non-interactive
|
|
272
274
|
pi -p "Summarize this codebase"
|
|
273
275
|
|
|
276
|
+
# Prompt beginning with a dash
|
|
277
|
+
pi -p -- "- Summarize these points"
|
|
278
|
+
|
|
274
279
|
# Non-interactive with piped stdin
|
|
275
280
|
cat README.md | pi -p "Summarize this text"
|
|
276
281
|
|
package/docs/windows.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Windows Setup
|
|
2
2
|
|
|
3
|
-
Pi
|
|
3
|
+
Pi uses Git Bash by default on Windows. Checked locations (in order):
|
|
4
4
|
|
|
5
5
|
1. Custom path from `~/.pi/agent/settings.json`
|
|
6
6
|
2. Git Bash (`C:\Program Files\Git\bin\bash.exe`)
|
|
@@ -8,7 +8,29 @@ Pi requires a bash shell on Windows. Checked locations (in order):
|
|
|
8
8
|
|
|
9
9
|
For most users, [Git for Windows](https://git-scm.com/download/win) is sufficient.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## PowerShell Tool
|
|
12
|
+
|
|
13
|
+
The optional `powershell` tool runs commands through `pwsh.exe` when available, otherwise Windows PowerShell. It starts PowerShell with `-NoProfile -NonInteractive -ExecutionPolicy Bypass`. Administrator-enforced execution policies can still take precedence.
|
|
14
|
+
|
|
15
|
+
Use `defaultTools` to replace the model-facing `bash` tool:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"defaultTools": ["read", "powershell", "edit", "write"]
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or enable both while comparing behavior:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"defaultTools": ["read", "bash", "powershell", "edit", "write"]
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The `!` and `!!` editor commands still use Bash.
|
|
32
|
+
|
|
33
|
+
## Custom Bash Path
|
|
12
34
|
|
|
13
35
|
```json
|
|
14
36
|
{
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.84.
|
|
3
|
+
"version": "0.84.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.84.
|
|
9
|
+
"version": "0.84.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -46,8 +46,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
pi.on("
|
|
50
|
-
// Clear checkpoints after agent completes
|
|
49
|
+
pi.on("agent_settled", async () => {
|
|
50
|
+
// Clear checkpoints after the full agent run completes
|
|
51
51
|
checkpoints.clear();
|
|
52
52
|
});
|
|
53
53
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-gondolin",
|
|
3
|
-
"version": "0.84.
|
|
3
|
+
"version": "0.84.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-gondolin",
|
|
9
|
-
"version": "0.84.
|
|
9
|
+
"version": "0.84.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@earendil-works/gondolin": "0.12.0"
|
|
12
12
|
}
|
|
@@ -49,7 +49,9 @@ function notify(title: string, body: string): void {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export default function (pi: ExtensionAPI) {
|
|
52
|
-
|
|
52
|
+
// `agent_end` fires after each low-level run; Pi may still retry, compact,
|
|
53
|
+
// or continue with queued follow-ups. Notify only after the full run settles.
|
|
54
|
+
pi.on("agent_settled", async () => {
|
|
53
55
|
notify("Pi", "Ready for input");
|
|
54
56
|
});
|
|
55
57
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "1.14.
|
|
9
|
+
"version": "1.14.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|
|
@@ -62,7 +62,7 @@ This tool executes a separate `pi` subprocess with a delegated system prompt and
|
|
|
62
62
|
|
|
63
63
|
To enable project-local agents, pass `agentScope: "both"` (or `"project"`). Only do this for repositories you trust.
|
|
64
64
|
|
|
65
|
-
When running interactively, the tool prompts for confirmation before running project-local agents. Set `confirmProjectAgents: false` to disable.
|
|
65
|
+
When running interactively, the tool prompts for confirmation before running project-local agents in untrusted projects. Trusted projects skip the additional prompt. Set `confirmProjectAgents: false` to disable confirmation.
|
|
66
66
|
|
|
67
67
|
## Usage
|
|
68
68
|
|
|
@@ -137,6 +137,8 @@ model: claude-haiku-4-5
|
|
|
137
137
|
System prompt for the agent goes here.
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
+
When `model` is omitted, the subagent inherits the dispatching session's active model and thinking level.
|
|
141
|
+
|
|
140
142
|
**Locations:**
|
|
141
143
|
- `~/.pi/agent/agents/*.md` - User-level (always loaded)
|
|
142
144
|
- `.pi/agents/*.md` - Project-level (only with `agentScope: "project"` or `"both"`)
|