@maxmo74/pi-coding-agent 1.5.0-max.8 → 1.6.0-max.16
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 +214 -0
- package/README.md +1 -1
- package/dist/bundle/chunks/anthropic-messages-WAFIHSF7.js +6 -0
- package/dist/bundle/chunks/{azure-openai-responses-FSC6BAW3.js → azure-openai-responses-EB4MRIM4.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +3 -3
- package/dist/bundle/chunks/chunk-E6LJTZYC.js +82 -0
- package/dist/bundle/chunks/chunk-EEBRZED2.js +44 -0
- package/dist/bundle/chunks/chunk-EVSO24NP.js +2 -0
- package/dist/bundle/chunks/chunk-EXXWEFU5.js +1247 -0
- package/dist/bundle/chunks/{chunk-EOO47QGR.js → chunk-F7LEMV2T.js} +1 -1
- package/dist/bundle/chunks/chunk-I6HYYNH6.js +8 -0
- package/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
- package/dist/bundle/chunks/{chunk-V6KH5QG4.js → chunk-ILDLA2JW.js} +1 -1
- package/dist/bundle/chunks/chunk-INODY4DR.js +2 -0
- package/dist/bundle/chunks/{chunk-MSIQUO5T.js → chunk-KREOSXD7.js} +1 -1
- package/dist/bundle/chunks/chunk-LWG2CUTI.js +31 -0
- package/dist/bundle/chunks/{chunk-3TGLJEWK.js → chunk-NRLRGOCX.js} +1 -1
- package/dist/bundle/chunks/chunk-NRY4NBZW.js +4 -0
- package/dist/bundle/chunks/chunk-NV3NPOPF.js +20 -0
- package/dist/bundle/chunks/{chunk-C2WU32PX.js → chunk-RCNEHRMW.js} +1 -1
- package/dist/bundle/chunks/{chunk-4EYXVSA5.js → chunk-X26YOAEH.js} +15 -14
- package/dist/bundle/chunks/chunk-X6RQRO3L.js +16 -0
- package/dist/bundle/chunks/chunk-XGGZYFNG.js +55 -0
- package/dist/bundle/chunks/chunk-XJ2YV77J.js +30 -0
- package/dist/bundle/chunks/{chunk-YZKQS34S.js → chunk-Y55SJART.js} +5 -1
- package/dist/bundle/chunks/chunk-YOWSKVK7.js +2 -0
- package/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
- package/dist/bundle/chunks/{cli-MCOUW5WS.js → cli-QMJEURSM.js} +7 -7
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-WLAFJSP6.js → cloudflare-workers-ai-system-one-AMCR7QEI.js} +1 -1
- package/dist/bundle/chunks/codemode-worker.js +2 -0
- package/dist/bundle/chunks/{easter-egg-3d-WMBNSJ4M.js → easter-egg-3d-7CBVPJQ3.js} +1 -1
- package/dist/bundle/chunks/{execute-4CEBORGZ.js → execute-XDNPBEMU.js} +5 -3
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/google-generative-ai-43M4N5LK.js +2 -0
- package/dist/bundle/chunks/google-vertex-2B3PASK2.js +2 -0
- package/dist/bundle/chunks/{llama-cpp-classify-V5U3QKXI.js → llama-cpp-classify-XXZYF3RR.js} +1 -1
- package/dist/bundle/chunks/{mistral-conversations-S4OWXIXQ.js → mistral-conversations-E3D5ZQKB.js} +2 -2
- package/dist/bundle/chunks/{openai-codex-responses-QAWLOQSN.js → openai-codex-responses-MSQDSDUR.js} +2 -2
- package/dist/bundle/chunks/openai-completions-4IC6AGTR.js +7 -0
- package/dist/bundle/chunks/{openai-decisions-IXI34BYG.js → openai-decisions-LZ2RLVRX.js} +1 -1
- package/dist/bundle/chunks/openai-responses-MCO3BHCC.js +4 -0
- package/dist/bundle/chunks/{openrouter-images-PISKSFMS.js → openrouter-images-SHUJ3VSG.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-NORUKF4E.js → pi-messages-NIKOQ4O7.js} +1 -1
- package/dist/bundle/chunks/{runtime-FQB7RU7U.js → runtime-F3SXQONS.js} +1 -1
- package/dist/bundle/chunks/{typesafe-system-one-CHVC2UUI.js → typesafe-system-one-R2CDUWNO.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-2WYTGPJ3.js +2 -0
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +5 -3
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-command.d.ts.map +1 -1
- package/dist/cli/auth-command.js +26 -2
- package/dist/cli/auth-command.js.map +1 -1
- package/dist/cli/auth-login.d.ts +15 -0
- package/dist/cli/auth-login.d.ts.map +1 -0
- package/dist/cli/auth-login.js +232 -0
- package/dist/cli/auth-login.js.map +1 -0
- package/dist/cli/auth-logout.d.ts +14 -0
- package/dist/cli/auth-logout.d.ts.map +1 -0
- package/dist/cli/auth-logout.js +57 -0
- package/dist/cli/auth-logout.js.map +1 -0
- package/dist/cli/auth-terminal.d.ts +17 -0
- package/dist/cli/auth-terminal.d.ts.map +1 -0
- package/dist/cli/auth-terminal.js +63 -0
- package/dist/cli/auth-terminal.js.map +1 -0
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +12 -7
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +9 -6
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +4 -0
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +16 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +40 -3
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +31 -9
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +160 -63
- 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 +3 -2
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +3 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/cache-warmer.d.ts +4 -37
- package/dist/core/cache-warmer.d.ts.map +1 -1
- package/dist/core/cache-warmer.js +11 -89
- package/dist/core/cache-warmer.js.map +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +2 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/exec.d.ts +1 -0
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +4 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/ansi-to-html.d.ts +6 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js +57 -20
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/template.js +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +2 -3
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +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 +28 -6
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +14 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +33 -6
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/keybindings.d.ts +2 -2
- package/dist/core/keybindings.js +1 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +12 -37
- package/dist/core/mcp-servers.d.ts.map +1 -1
- package/dist/core/mcp-servers.js +42 -121
- package/dist/core/mcp-servers.js.map +1 -1
- package/dist/core/model-config.d.ts +52 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-resolver.d.ts +0 -8
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +22 -85
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +5 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +11 -4
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts +26 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +95 -7
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-ai-schemas.d.ts +4 -0
- package/dist/core/pi-ai-schemas.d.ts.map +1 -1
- package/dist/core/preferred-providers.d.ts +17 -0
- package/dist/core/preferred-providers.d.ts.map +1 -0
- package/dist/core/preferred-providers.js +24 -0
- package/dist/core/preferred-providers.js.map +1 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +18 -2
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +3 -1
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/provider-matching.d.ts +6 -0
- package/dist/core/provider-matching.d.ts.map +1 -0
- package/dist/core/provider-matching.js +8 -0
- package/dist/core/provider-matching.js.map +1 -0
- package/dist/core/radius-mcp.d.ts +13 -0
- package/dist/core/radius-mcp.d.ts.map +1 -0
- package/dist/core/radius-mcp.js +29 -0
- package/dist/core/radius-mcp.js.map +1 -0
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +9 -0
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts +5 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +2 -0
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts +8 -0
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/runtime-credentials.js +15 -1
- package/dist/core/runtime-credentials.js.map +1 -1
- package/dist/core/session-cwd.d.ts +7 -0
- package/dist/core/session-cwd.d.ts.map +1 -1
- package/dist/core/session-cwd.js +9 -1
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +45 -36
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-ownership.js +15 -1
- package/dist/core/session-ownership.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +1 -1
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +1 -1
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +35 -5
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts +23 -14
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +182 -41
- 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 +8 -7
- 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 +96 -39
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +5 -3
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +87 -75
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +2 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +4 -1
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/powershell.d.ts.map +1 -1
- package/dist/core/tools/powershell.js +15 -2
- package/dist/core/tools/powershell.js.map +1 -1
- package/dist/core/tools/read.d.ts +13 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +146 -35
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/renderers/read.d.ts.map +1 -1
- package/dist/core/tools/renderers/read.js +6 -2
- package/dist/core/tools/renderers/read.js.map +1 -1
- package/dist/core/tools/truncate.d.ts +4 -14
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +23 -29
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/extensions/codemode/execute.js +4 -4
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +34 -12
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/llama/client.d.ts +2 -0
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +23 -2
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +6 -4
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/llama/ui.d.ts.map +1 -1
- package/dist/extensions/llama/ui.js +15 -3
- package/dist/extensions/llama/ui.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts +2 -0
- package/dist/extensions/mcp/cli.d.ts.map +1 -1
- package/dist/extensions/mcp/cli.js +49 -14
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/config.d.ts.map +1 -1
- package/dist/extensions/mcp/config.js +4 -7
- package/dist/extensions/mcp/config.js.map +1 -1
- package/dist/extensions/mcp/index.d.ts.map +1 -1
- package/dist/extensions/mcp/index.js +7 -9
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/oauth.d.ts +11 -49
- package/dist/extensions/mcp/oauth.d.ts.map +1 -1
- package/dist/extensions/mcp/oauth.js +56 -319
- package/dist/extensions/mcp/oauth.js.map +1 -1
- package/dist/extensions/mcp/resources.d.ts +1 -1
- package/dist/extensions/mcp/resources.d.ts.map +1 -1
- package/dist/extensions/mcp/resources.js +4 -3
- package/dist/extensions/mcp/resources.js.map +1 -1
- package/dist/extensions/mcp/runtime.d.ts +4 -3
- package/dist/extensions/mcp/runtime.d.ts.map +1 -1
- package/dist/extensions/mcp/runtime.js +7 -5
- package/dist/extensions/mcp/runtime.js.map +1 -1
- package/dist/extensions/mcp/tools.d.ts +2 -23
- package/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/dist/extensions/mcp/tools.js +6 -58
- package/dist/extensions/mcp/tools.js.map +1 -1
- package/dist/extensions/tool-search/tool.d.ts.map +1 -1
- package/dist/extensions/tool-search/tool.js +18 -6
- package/dist/extensions/tool-search/tool.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +98 -27
- package/dist/main.js.map +1 -1
- package/dist/modes/diagnostics-stderr.d.ts +4 -0
- package/dist/modes/diagnostics-stderr.d.ts.map +1 -0
- package/dist/modes/diagnostics-stderr.js +11 -0
- package/dist/modes/diagnostics-stderr.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +2 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +9 -3
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +5 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +12 -4
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +5 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +12 -4
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +5 -2
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +5 -2
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +10 -3
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js +11 -5
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +9 -1
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +1 -18
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/mermaid.d.ts +2 -1
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
- package/dist/modes/interactive/components/mermaid.js +25 -20
- package/dist/modes/interactive/components/mermaid.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +19 -8
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +10 -3
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +39 -8
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/provider-brand.d.ts +14 -0
- package/dist/modes/interactive/components/provider-brand.d.ts.map +1 -0
- package/dist/modes/interactive/components/provider-brand.js +66 -0
- package/dist/modes/interactive/components/provider-brand.js.map +1 -0
- package/dist/modes/interactive/components/radius-login-selector.d.ts +1 -2
- package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/radius-login-selector.js +8 -38
- package/dist/modes/interactive/components/radius-login-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +9 -1
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +8 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +41 -9
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.js +5 -1
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +5 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +12 -4
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts.map +1 -1
- package/dist/modes/interactive/components/themed-text.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/components/tool-execution.d.ts +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +3 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +19 -10
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +2 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +9 -3
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +2 -2
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +14 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +232 -127
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/session-share.js +2 -0
- package/dist/modes/interactive/session-share.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +5 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +35 -23
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +67 -45
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +53 -9
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/changelog.d.ts +2 -2
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +15 -8
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/flush-stdout.d.ts +8 -0
- package/dist/utils/flush-stdout.d.ts.map +1 -0
- package/dist/utils/flush-stdout.js +23 -0
- package/dist/utils/flush-stdout.js.map +1 -0
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js +3 -1
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/terminal-question.d.ts +8 -0
- package/dist/utils/terminal-question.d.ts.map +1 -0
- package/dist/utils/terminal-question.js +24 -0
- package/dist/utils/terminal-question.js.map +1 -0
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/web-url.d.ts +12 -0
- package/dist/utils/web-url.d.ts.map +1 -0
- package/dist/utils/web-url.js +20 -0
- package/dist/utils/web-url.js.map +1 -0
- package/docs/cli.md +14 -1
- package/docs/extensions.md +31 -11
- package/docs/keybindings.md +1 -1
- package/docs/llama-cpp.md +5 -8
- package/docs/models-configuration.md +9 -3
- package/docs/models.md +2 -1
- package/docs/nvidia-rtx-llama-cpp.md +5 -5
- package/docs/prompt-templates.md +1 -1
- package/docs/providers.md +4 -2
- package/docs/rpc-commands.md +1 -1
- package/docs/rpc.md +4 -2
- package/docs/sessions.md +7 -1
- package/docs/settings.md +1 -1
- package/docs/tui.md +3 -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/gondolin/index.ts +4 -7
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/plan-mode/index.ts +23 -13
- package/examples/extensions/plan-mode/utils.ts +42 -16
- package/examples/extensions/subagent/README.md +14 -11
- package/examples/extensions/subagent/index.ts +392 -171
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/tsconfig.json +63 -35
- package/package.json +11 -11
- package/schemas/models.schema.json +30 -1
- package/schemas/settings.schema.json +1 -1
- package/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +0 -6
- package/dist/bundle/chunks/chunk-62VOPMLK.js +0 -65
- package/dist/bundle/chunks/chunk-7O7QKK6A.js +0 -2
- package/dist/bundle/chunks/chunk-B46VJEHW.js +0 -44
- package/dist/bundle/chunks/chunk-CF5GWZHW.js +0 -31
- package/dist/bundle/chunks/chunk-CHWNPHIS.js +0 -82
- package/dist/bundle/chunks/chunk-FGCQRPD5.js +0 -1239
- package/dist/bundle/chunks/chunk-GN3QYODH.js +0 -16
- package/dist/bundle/chunks/chunk-NL4X6LBY.js +0 -4
- package/dist/bundle/chunks/chunk-NZY7EIPA.js +0 -4
- package/dist/bundle/chunks/chunk-R2EGYMOO.js +0 -7
- package/dist/bundle/chunks/chunk-UKVNB6C4.js +0 -2
- package/dist/bundle/chunks/chunk-USJZMAIR.js +0 -2
- package/dist/bundle/chunks/chunk-VOLAXWGI.js +0 -2
- package/dist/bundle/chunks/google-generative-ai-INGKNW72.js +0 -2
- package/dist/bundle/chunks/google-vertex-IBTX6MBF.js +0 -2
- package/dist/bundle/chunks/openai-completions-EJNYB6IX.js +0 -7
- package/dist/bundle/chunks/openai-responses-MD3562FB.js +0 -4
- package/dist/bundle/chunks/virtual-modules-CLD44EYP.js +0 -2
- package/dist/utils/deprecation.d.ts +0 -4
- package/dist/utils/deprecation.d.ts.map +0 -1
- package/dist/utils/deprecation.js +0 -13
- package/dist/utils/deprecation.js.map +0 -1
|
@@ -111,13 +111,15 @@ See [Describe model input and caching](models.md#describe-model-input-and-cachin
|
|
|
111
111
|
| Field | Type | Default | Description |
|
|
112
112
|
|---|---|---|---|
|
|
113
113
|
| `supportsStore` | boolean | | Whether the provider supports the store field. Default: auto-detected from URL. |
|
|
114
|
-
| `supportsDeveloperRole` | boolean | | Whether the
|
|
114
|
+
| `supportsDeveloperRole` | boolean | | Whether to send system messages of reasoning models (the system prompt and mid-conversation system messages) with the developer role instead of system. Default: true only for api.openai.com. |
|
|
115
115
|
| `supportsReasoningEffort` | boolean | | Whether the provider supports reasoning_effort. Default: auto-detected from URL. |
|
|
116
116
|
| `supportsUsageInStreaming` | boolean | `true` | Whether the provider supports stream_options.include_usage for token usage in streaming responses. |
|
|
117
117
|
| `supportsFinishReason` | boolean | `true` | Whether streamed responses include finish_reason. When false, pi infers stop or toolUse when the stream ends. |
|
|
118
118
|
| `maxTokensField` | `"max_completion_tokens" \| "max_tokens"` | | Which field to use for max tokens. Default: auto-detected from URL. |
|
|
119
119
|
| `requiresToolResultName` | boolean | | Whether tool results require the name field. Default: auto-detected from URL. |
|
|
120
120
|
| `requiresAssistantAfterToolResult` | boolean | | Whether a user message after tool results requires an assistant message in between. Default: auto-detected from URL. |
|
|
121
|
+
| `requiresNonNullAssistantContent` | boolean | | Whether replayed assistant messages with no text (e.g. tool-call-only messages) must send "" instead of null content. Default: false. |
|
|
122
|
+
| `requiresToolsWithToolHistory` | boolean | | Whether requests without tools must send "tools": [] when the conversation contains tool calls or tool results. Needed by some proxies in front of Anthropic, such as older LiteLLM versions. Default: false, the field is omitted. |
|
|
121
123
|
| `requiresThinkingAsText` | boolean | | Whether thinking blocks must be converted to text blocks with <thinking> delimiters. Default: auto-detected from URL. |
|
|
122
124
|
| `requiresReasoningContentOnAssistantMessages` | boolean | | Whether all replayed assistant messages must include an empty reasoning_content field when reasoning is enabled. Default: auto-detected from URL. |
|
|
123
125
|
| `thinkingFormat` | `"openai" \| "openrouter" \| "deepseek" \| "together" \| "baseten" \| "zai" \| "qwen" \| "chat-template" \| "qwen-chat-template" \| "string-thinking" \| "ant-ling"` | | Format for reasoning or thinking parameters. When omitted, Pi auto-detects the format from the provider URL. "openai" uses reasoning_effort, "openrouter" uses reasoning.effort, "deepseek" uses thinking.type plus reasoning_effort when supported, "together" uses reasoning.enabled plus reasoning_effort when supported, "baseten" uses configurable chat_template_args plus reasoning_effort when supported, "zai" uses thinking.type, "qwen" uses top-level enable_thinking, "qwen-chat-template" uses chat_template_kwargs.enable_thinking and preserve_thinking, "chat-template" uses configurable chat_template_kwargs, "string-thinking" uses top-level thinking, and "ant-ling" uses reasoning.effort only when the mapped effort is non-null. |
|
|
@@ -135,6 +137,7 @@ See [Describe model input and caching](models.md#describe-model-input-and-cachin
|
|
|
135
137
|
| `cacheControlFormat` | `"anthropic"` | | Cache control convention for prompt caching. Anthropic applies cache_control markers to the system prompt, last tool definition, and last user, assistant, or tool-result text content. |
|
|
136
138
|
| `sendSessionAffinityHeaders` | boolean | | Whether to send session-affinity data from options.sessionId. Default: true for OpenRouter endpoints, false otherwise. |
|
|
137
139
|
| `sessionAffinityFormat` | `"openai" \| "openai-nosession" \| "openrouter"` | | Session-affinity header format. openai sends session_id, x-client-request-id, and x-session-affinity; openai-nosession sends x-client-request-id and x-session-affinity; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected. |
|
|
140
|
+
| `promptCacheKeyMode` | `"auto" \| "enabled" \| "disabled"` | | Controls the prompt_cache_key request field. auto sends it to api.openai.com, or with long cache retention when supportsLongCacheRetention is true; enabled sends it whenever caching is active, for compatible proxies; disabled never sends it. Default: auto. |
|
|
138
141
|
| `supportsLongCacheRetention` | boolean | | Whether the provider supports long prompt cache retention (prompt_cache_retention: "24h" or Anthropic-style cache_control.ttl: "1h", depending on format). Default: auto-detected from provider and URL. |
|
|
139
142
|
| `vllmPriority` | number | | vLLM scheduler priority sent as the top-level priority request field. Lower values are handled earlier and the server default is 0. Only meaningful with --scheduling-policy priority. Off by default and not set on the generated catalog. |
|
|
140
143
|
|
|
@@ -146,14 +149,15 @@ Also applies to `azure-openai-responses` and `openai-codex-responses`.
|
|
|
146
149
|
|---|---|---|---|
|
|
147
150
|
| `supportsDeveloperRole` | boolean | `true` | Whether the provider supports the developer role instead of system. |
|
|
148
151
|
| `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts developer or system messages after the conversation has started. When false, later system messages are folded into the leading system message. The generated catalog enables this for verified models. |
|
|
149
|
-
| `sessionAffinityFormat` | `"openai" \| "openai-nosession" \| "openrouter"` | | Session-affinity header format. openai sends
|
|
152
|
+
| `sessionAffinityFormat` | `"openai" \| "openai-nosession" \| "openrouter"` | | Session-affinity header format. openai sends session-id and x-client-request-id; openai-nosession sends x-client-request-id; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected. |
|
|
153
|
+
| `promptCacheKeyMode` | `"auto" \| "enabled" \| "disabled"` | | Controls the prompt_cache_key request field. auto and enabled send it whenever caching is active; disabled never sends it, for compatible proxies that reject it. Default: auto. |
|
|
150
154
|
| `supportsLongCacheRetention` | boolean | `true` | Whether the provider supports long prompt cache retention. This uses prompt_cache_options.ttl: "30m" on GPT-5.6+ and prompt_cache_retention: "24h" on earlier models. |
|
|
151
155
|
| `supportsStrictMode` | boolean | | Whether the provider supports strict JSON-schema function tools. Defaults are API-specific; generated OpenAI models enable it explicitly. |
|
|
152
156
|
| `supportsOpenAIGrammarTools` | boolean | `false` | Whether to emit OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools. The generated catalog enables this for capable models. |
|
|
153
157
|
| `supportsAdditionalTools` | boolean | `false` | Whether the model supports message-anchored additional_tools input items. |
|
|
154
158
|
| `supportsToolSearch` | boolean | `false` | Whether the model supports client-executed tool search for transcript-anchored additions. |
|
|
155
159
|
| `supportsExplicitPromptCacheMode` | boolean | `false` | Whether the model accepts prompt_cache_options. Older OpenAI models reject the parameter. |
|
|
156
|
-
| `supportsMidConvoEffort` | boolean | `false` | Whether thinking level changes are sent as configuration_update input items instead of changing reasoning.effort, so a change keeps the prompt cache.
|
|
160
|
+
| `supportsMidConvoEffort` | boolean | `false` | Whether thinking level changes are sent as configuration_update input items instead of changing reasoning.effort, so a change keeps the prompt cache. Used by the openai-responses and openai-codex-responses APIs, and ignored with Sign in with ChatGPT on the openai provider. |
|
|
157
161
|
| `supportsMaxOutputTokens` | boolean | `true` | Whether the provider accepts max_output_tokens. Some Codex-protocol gateways reject it. |
|
|
158
162
|
|
|
159
163
|
### `anthropic-messages`
|
|
@@ -172,6 +176,7 @@ Also applies to `azure-openai-responses` and `openai-codex-responses`.
|
|
|
172
176
|
| `supportsMidConvoEffort` | boolean | `false` | Whether the exact model transport supports effort-only system messages and thinking binding controls. |
|
|
173
177
|
| `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system-role messages inside the conversation. When false, later system messages are folded into the top-level system prompt. |
|
|
174
178
|
| `supportsMidConvoToolChanges` | boolean | `false` | Whether the exact model accepts mid-conversation tool_addition and tool_removal blocks. Requires supportsMidConvoSystemMessages. |
|
|
179
|
+
| `supportsMessageThreads` | boolean | | Whether the endpoint supports Anthropic message threads, which let a request with a session id send only the new messages and continue from the previous reply. Default: true for a baseUrl on api.anthropic.com, false otherwise. Set true for gateways that forward the thread request field. |
|
|
175
180
|
| `allowedFallbackModels` | `object[]` | | Models Anthropic accepts for server-side refusal fallback, with local pricing metadata for returned fallback responses. When absent or empty, callers must omit fallbacks; Anthropic rejects the field for models with no permitted fallback targets. |
|
|
176
181
|
|
|
177
182
|
### `bedrock-converse-stream`
|
|
@@ -185,6 +190,7 @@ Also applies to `azure-openai-responses` and `openai-codex-responses`.
|
|
|
185
190
|
| Field | Type | Default | Description |
|
|
186
191
|
|---|---|---|---|
|
|
187
192
|
| `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system messages after the conversation has started. When false, later system messages are folded into the leading system message. |
|
|
193
|
+
| `supportsStrictMode` | boolean | `false` | Whether the model supports strict (schema-constrained) function tools. |
|
|
188
194
|
|
|
189
195
|
### `typesafe-system-one`
|
|
190
196
|
|
package/docs/models.md
CHANGED
|
@@ -141,7 +141,7 @@ Compatibility settings should describe verified differences in the endpoint's re
|
|
|
141
141
|
|
|
142
142
|
## Use classifier models
|
|
143
143
|
|
|
144
|
-
Classifier models do not chat. They answer typed questions about JSON state: pick one of several choices, answer yes or no, or give a score, each with probabilities. Pi includes TypeSafe's Jev model from these providers, Cloudflare's Clef, Clef Flash, and Clef Omni models from Workers AI and OpenRouter,
|
|
144
|
+
Classifier models do not chat. They answer typed questions about JSON state: pick one of several choices, answer yes or no, or give a score, each with probabilities. Pi includes TypeSafe's Jev model from these providers, Cloudflare's Clef, Clef Flash, and Clef Omni models from Workers AI and OpenRouter, OpenAI's GPT-6 Luna through the [Decisions API](https://developers.openai.com/api/docs/guides/decisions), and Microsoft-Decision-1 through GitHub Copilot:
|
|
145
145
|
|
|
146
146
|
| Provider | Model IDs | Authentication |
|
|
147
147
|
|---|---|---|
|
|
@@ -151,6 +151,7 @@ Classifier models do not chat. They answer typed questions about JSON state: pic
|
|
|
151
151
|
| `vercel-ai-gateway` | `typesafe-ai/jev` | `AI_GATEWAY_API_KEY` |
|
|
152
152
|
| `opencode` | `jev-1.13`, `jev-1.13-free` | `OPENCODE_API_KEY` |
|
|
153
153
|
| `openai` | `gpt-6-luna` | `OPENAI_API_KEY` |
|
|
154
|
+
| `github-copilot` | `microsoft-decision-1` | `COPILOT_GITHUB_TOKEN` or `/login` |
|
|
154
155
|
|
|
155
156
|
Chat models on a [llama.cpp router](llama-cpp.md#classification) are also listed as classifier models.
|
|
156
157
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Run Pi with NVIDIA RTX and llama.cpp
|
|
2
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
|
|
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 and starts it with `llama serve`. `llama serve` accepts the same options as `llama-server`.
|
|
4
4
|
|
|
5
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
6
|
|
|
@@ -8,12 +8,12 @@ The examples below use Windows PowerShell. See [Local Models with llama.cpp](lla
|
|
|
8
8
|
|
|
9
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
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
|
|
11
|
+
3. Run `llama serve --help` and check that it lists `--models-preset`. If the build has no `llama` program or the option is missing, it cannot load the recipe as a router preset. Use a newer build that still meets the recipe's requirements.
|
|
12
12
|
4. Install Pi with the [Quickstart](quickstart.md). On native Windows, also see [Run Pi on Windows](windows.md).
|
|
13
13
|
|
|
14
14
|
## Convert the recipe to a preset
|
|
15
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
|
|
16
|
+
A preset lists the settings for one or more models. Each section name becomes the model ID shown in Pi. Save the preset in the llama.cpp folder, or pass its full path when starting the router.
|
|
17
17
|
|
|
18
18
|
Convert each option from the recipe command into one preset line:
|
|
19
19
|
|
|
@@ -82,7 +82,7 @@ spec-draft-backend-sampling = true
|
|
|
82
82
|
Open PowerShell in the llama.cpp folder and run:
|
|
83
83
|
|
|
84
84
|
```powershell
|
|
85
|
-
.\llama
|
|
85
|
+
.\llama.exe serve --models-preset qwen3.8-27b.ini --host 127.0.0.1
|
|
86
86
|
```
|
|
87
87
|
|
|
88
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.
|
|
@@ -91,6 +91,6 @@ Use the [router health checks](llama-cpp.md#troubleshooting) to confirm that the
|
|
|
91
91
|
|
|
92
92
|
## Use the model in Pi
|
|
93
93
|
|
|
94
|
-
Follow [Configure Pi](llama-cpp.md#configure-pi) and connect to `http://127.0.0.1:
|
|
94
|
+
Follow [Configure Pi](llama-cpp.md#configure-pi) and connect to `http://127.0.0.1:9931`. The preset section name is the model ID, so select `qwen3.8-27b` in `/model` for this example.
|
|
95
95
|
|
|
96
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/prompt-templates.md
CHANGED
|
@@ -46,7 +46,7 @@ Templates support these substitutions:
|
|
|
46
46
|
| `${@:N}` | Arguments starting at position `N` |
|
|
47
47
|
| `${@:N:L}` | `L` arguments starting at position `N` |
|
|
48
48
|
|
|
49
|
-
Arguments follow shell-like quoting, so `/review "API compatibility"` supplies one argument containing a space.
|
|
49
|
+
Arguments follow shell-like quoting, so `/review "API compatibility"` supplies one argument containing a space. A quote only starts quoting at the beginning of an argument, so apostrophes inside words such as `doesn't` stay as text, and a quote with no closing match is kept as text. Inside a quoted argument, a backslash before the same quote character keeps it as text, so `/review "the \"fast\" path"` supplies `the "fast" path`; other backslashes are kept as typed.
|
|
50
50
|
|
|
51
51
|
<a id="choose-where-it-loads"></a>
|
|
52
52
|
|
package/docs/providers.md
CHANGED
|
@@ -57,8 +57,10 @@ This table covers providers with a single primary API-key variable. Providers th
|
|
|
57
57
|
| MiniMax | `MINIMAX_API_KEY` |
|
|
58
58
|
| MiniMax (China) | `MINIMAX_CN_API_KEY` |
|
|
59
59
|
| Moonshot AI (Global and China) | `MOONSHOT_API_KEY` |
|
|
60
|
-
| Qwen Token Plan
|
|
61
|
-
| Qwen Token Plan (China) | `
|
|
60
|
+
| Qwen Token Plan Team | `QWEN_TOKEN_PLAN_TEAM_API_KEY` |
|
|
61
|
+
| Qwen Token Plan Team (China) | `QWEN_TOKEN_PLAN_TEAM_CN_API_KEY` |
|
|
62
|
+
| Qwen Token Plan Individual | `QWEN_TOKEN_PLAN_INDIVIDUAL_API_KEY` |
|
|
63
|
+
| Qwen Token Plan Individual (China) | `QWEN_TOKEN_PLAN_INDIVIDUAL_CN_API_KEY` |
|
|
62
64
|
| Xiaomi MiMo | `XIAOMI_API_KEY` |
|
|
63
65
|
| Xiaomi MiMo Token Plan (China) | `XIAOMI_TOKEN_PLAN_CN_API_KEY` |
|
|
64
66
|
| Xiaomi MiMo Token Plan (Amsterdam) | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` |
|
package/docs/rpc-commands.md
CHANGED
|
@@ -746,7 +746,7 @@ Response:
|
|
|
746
746
|
|
|
747
747
|
### get_last_assistant_text
|
|
748
748
|
|
|
749
|
-
Get the text content of the last assistant message.
|
|
749
|
+
Get the text content of the last assistant message. Messages without text from an aborted or failed turn, or that only call tools, are skipped.
|
|
750
750
|
|
|
751
751
|
```json
|
|
752
752
|
{"type": "get_last_assistant_text"}
|
package/docs/rpc.md
CHANGED
|
@@ -90,9 +90,11 @@ Clients must also handle child-process startup failures, unexpected exits, stder
|
|
|
90
90
|
|
|
91
91
|
## Shutdown
|
|
92
92
|
|
|
93
|
-
Close the child's stdin to request an orderly shutdown. Pi disposes the active runtime before exiting. Clients should still handle process signals and unexpected exits.
|
|
93
|
+
Close the child's stdin to request an orderly shutdown. Pi disposes the active runtime and waits for pending work to finish before exiting, so give it time to exit before killing it. Clients should still handle process signals and unexpected exits.
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
SIGTERM and SIGHUP also start an orderly shutdown. Once a shutdown has started, from either stdin EOF or a signal, a stdin EOF or a single signal does not interrupt it; a second signal exits at once. Closing stdin and sending SIGTERM together is safe.
|
|
96
|
+
|
|
97
|
+
An extension can also request shutdown with `ctx.shutdown()`. If the session is idle and no command is being handled, Pi shuts down right away. Otherwise it shuts down once the current command finishes (for `prompt`, once the prompt settles) or the active run emits `agent_settled`. (A request made while an extension-started compaction is running waits for the next command or run to finish.)
|
|
96
98
|
|
|
97
99
|
## Minimal client
|
|
98
100
|
|
package/docs/sessions.md
CHANGED
|
@@ -21,7 +21,13 @@ Each session records the working directory it was created in and never changes i
|
|
|
21
21
|
| `--resume`, `/resume`, `--session`, `/import` | The session's working directory, which can differ from the current directory |
|
|
22
22
|
| `--fork`, or a `--session` ID from another directory that you choose to fork | The current directory, in a new session |
|
|
23
23
|
|
|
24
|
-
If a session's working directory no longer exists,
|
|
24
|
+
If a session's working directory no longer exists, for example after the project folder was renamed, interactive mode asks how to open it:
|
|
25
|
+
|
|
26
|
+
- **Continue** runs the session in the current directory. Pi does not store that choice, so it asks again the next time you open the session.
|
|
27
|
+
- **Fork** copies the session into the current directory as a new session with a new ID, like `--fork`. The original stays unchanged. At startup the copy is stored like other new sessions for the current directory; from `/resume` or `/import` it is stored next to the current session, like `/new`.
|
|
28
|
+
- **Cancel** leaves the current session open, or exits at startup.
|
|
29
|
+
|
|
30
|
+
Other modes exit with an error.
|
|
25
31
|
|
|
26
32
|
Use `/name` or `--name` to assign a recognizable session name. Run `/session` to verify the current session file, ID, message count, token usage, and cost.
|
|
27
33
|
|
package/docs/settings.md
CHANGED
|
@@ -18,7 +18,7 @@ Add `"$schema": "https://pi.dev/schemas/settings.schema.json"` to `settings.json
|
|
|
18
18
|
| `enabledModels` | `string[]` | All available models | Model patterns used for startup selection and model cycling. Uses the same format as `--models`. |
|
|
19
19
|
| `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in the transcript. |
|
|
20
20
|
| `showCacheMissNotices` | boolean | `false` | Show notices for significant cache misses, successful cache warming, compaction usage, and provider recovery. |
|
|
21
|
-
| `cacheWarming` | `"off" \| "streaming" \| "idle"` | `"
|
|
21
|
+
| `cacheWarming` | `"off" \| "streaming" \| "idle"` | `"idle"` | Keep eligible provider prompt caches warm during active runs and, with `"idle"`, for up to 30 minutes between runs. `"streaming"` warms only during active runs. Global setting only. |
|
|
22
22
|
|
|
23
23
|
Cache warming runs only when the model declares a cache lifetime and Pi estimates at least $0.05 in avoided cache-miss cost. Refresh usage counts toward session totals but does not enter model context. `/session` shows the next decision; extensions can override it with `cache_warming_decision`. See [Prompt Cache Lifetimes](models.md#prompt-cache-lifetimes).
|
|
24
24
|
|
package/docs/tui.md
CHANGED
|
@@ -21,6 +21,8 @@ These APIs receive Pi’s active theme and keybindings where needed. Do not crea
|
|
|
21
21
|
|
|
22
22
|
A component renders an array of terminal lines for an available width. It can optionally handle keyboard and mouse input, and it must invalidate cached output when its state or theme-dependent content changes.
|
|
23
23
|
|
|
24
|
+
Treat lines returned by `render()` as read-only, including `super.render()` in a subclass. Built-in components such as `Container`, `Box`, `Text`, and `Markdown` return the same cached array while nothing changed, so modifying it in place corrupts later frames. Copy first, for example `const lines = [...super.render(width)]`, and cache the result if it is expensive. Return a new array when your output changes: parents reuse an unchanged array without reading it again.
|
|
25
|
+
|
|
24
26
|
Every rendered line must fit within the supplied width. Measure visible terminal columns rather than string length because ANSI escapes, wide characters, emoji, and combining characters change display width.
|
|
25
27
|
|
|
26
28
|
Use `visibleWidth()`, `truncateToWidth()`, `sliceByColumn()`, and `wrapTextWithAnsi()` instead of implementing terminal-width handling yourself. Pi resets styling and hyperlinks after every line, so reapply styles on each rendered line.
|
|
@@ -135,7 +137,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
135
137
|
|
|
136
138
|
This component does not display a text cursor, so it does not need `Focusable`. A component containing `Input` or `Editor` must implement `Focusable` and propagate its `focused` value to that child.
|
|
137
139
|
|
|
138
|
-
Custom components do not report pi as waiting for the user, because `ctx.ui.custom()` also hosts loaders and other non-blocking UI. When
|
|
140
|
+
Custom components do not report pi as waiting for the user, because `ctx.ui.custom()` also hosts loaders and other non-blocking UI. When a component waits for an answer, pass `blocked: { kind: "question", message: "Pick a color" }` so terminals that support [program status](terminal-setup.md#program-status) show pi as blocked. `kind` is `"question"`, `"permission"`, or `"auth"`. An inline component reports blocked while it is visible: a newer dialog or component shown in its place reports its own status instead. An overlay reports blocked from when it is shown until it calls `done()`, also while it is hidden with `setHidden()` or covered by another overlay. When several blocking prompts are open, the most recently shown one supplies `kind` and `message`.
|
|
139
141
|
|
|
140
142
|
Pass `overlay: true` to draw above existing content. Overlay options control size, anchors, offsets, margins, and responsive visibility. An overlay handle can change focus or temporarily hide and show the overlay with `setHidden()` while the interaction remains active.
|
|
141
143
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "1.5.
|
|
9
|
+
"version": "1.5.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -169,14 +169,11 @@ async function walkGuestFiles(
|
|
|
169
169
|
return walkDirectory(root, "");
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
// Like the built-in find and grep: a pattern with '/' is relative to the search root, one without
|
|
173
|
+
// '/' matches file names at any depth.
|
|
172
174
|
function matchesToolGlob(relativePath: string, pattern: string): boolean {
|
|
173
|
-
const normalizedPattern = toPosix(pattern);
|
|
174
|
-
if (normalizedPattern.includes("/"))
|
|
175
|
-
return (
|
|
176
|
-
path.posix.matchesGlob(relativePath, normalizedPattern) ||
|
|
177
|
-
path.posix.matchesGlob(relativePath, `**/${normalizedPattern}`)
|
|
178
|
-
);
|
|
179
|
-
}
|
|
175
|
+
const normalizedPattern = toPosix(pattern).replace(/^(?:\.\/)+/, "");
|
|
176
|
+
if (normalizedPattern.includes("/")) return path.posix.matchesGlob(relativePath, normalizedPattern);
|
|
180
177
|
return path.posix.matchesGlob(path.posix.basename(relativePath), normalizedPattern);
|
|
181
178
|
}
|
|
182
179
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-gondolin",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-gondolin",
|
|
9
|
-
"version": "1.5.
|
|
9
|
+
"version": "1.5.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@earendil-works/gondolin": "0.14.0"
|
|
12
12
|
}
|
|
@@ -16,7 +16,7 @@ import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
|
|
16
16
|
import type { AssistantMessage, TextContent } from "@earendil-works/pi-ai";
|
|
17
17
|
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
18
18
|
import { Key } from "@earendil-works/pi-tui";
|
|
19
|
-
import { extractTodoItems, isSafeCommand, markCompletedSteps, type TodoItem } from "./utils.ts";
|
|
19
|
+
import { allStepsComplete, extractTodoItems, isSafeCommand, markCompletedSteps, type TodoItem } from "./utils.ts";
|
|
20
20
|
|
|
21
21
|
// Tools
|
|
22
22
|
const PLAN_MODE_TOOLS = ["read", "bash", "grep", "find", "ls", "questionnaire"];
|
|
@@ -36,11 +36,16 @@ function isAssistantMessage(m: AgentMessage): m is AssistantMessage {
|
|
|
36
36
|
return m.role === "assistant" && Array.isArray(m.content);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
// Extract text content from an assistant message
|
|
39
|
+
// Extract text content from an assistant message.
|
|
40
|
+
// Includes thinking blocks: with reasoning-max models the [DONE:n] tags and
|
|
41
|
+
// plan drafts usually land in thinking, not the visible text.
|
|
40
42
|
function getTextContent(message: AssistantMessage): string {
|
|
41
43
|
return message.content
|
|
42
|
-
.
|
|
43
|
-
|
|
44
|
+
.map((block) => {
|
|
45
|
+
if (block.type === "text") return block.text;
|
|
46
|
+
if (block.type === "thinking") return (block as { thinking?: string }).thinking ?? "";
|
|
47
|
+
return "";
|
|
48
|
+
})
|
|
44
49
|
.join("\n");
|
|
45
50
|
}
|
|
46
51
|
|
|
@@ -70,12 +75,11 @@ export default function planModeExtension(pi: ExtensionAPI): void {
|
|
|
70
75
|
// Widget showing todo list
|
|
71
76
|
if (executionMode && todoItems.length > 0) {
|
|
72
77
|
const lines = todoItems.map((item) => {
|
|
78
|
+
const text = item.text.length > 60 ? `${item.text.slice(0, 57)}...` : item.text;
|
|
73
79
|
if (item.completed) {
|
|
74
|
-
return (
|
|
75
|
-
ctx.ui.theme.fg("success", "☑ ") + ctx.ui.theme.fg("muted", ctx.ui.theme.strikethrough(item.text))
|
|
76
|
-
);
|
|
80
|
+
return ctx.ui.theme.fg("success", "☑ ") + ctx.ui.theme.fg("muted", ctx.ui.theme.strikethrough(text));
|
|
77
81
|
}
|
|
78
|
-
return `${ctx.ui.theme.fg("muted", "☐ ")}${
|
|
82
|
+
return `${ctx.ui.theme.fg("muted", "☐ ")}${text}`;
|
|
79
83
|
});
|
|
80
84
|
ctx.ui.setWidget("plan-todos", lines);
|
|
81
85
|
} else {
|
|
@@ -255,10 +259,9 @@ After completing a step, include a [DONE:n] tag in your response.`,
|
|
|
255
259
|
if (!executionMode || todoItems.length === 0) return;
|
|
256
260
|
if (!isAssistantMessage(event.message)) return;
|
|
257
261
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
+
markCompletedSteps(getTextContent(event.message), todoItems);
|
|
263
|
+
// Always refresh: cheap, keeps the widget consistent even when nothing matched.
|
|
264
|
+
updateStatus(ctx);
|
|
262
265
|
persistState();
|
|
263
266
|
});
|
|
264
267
|
|
|
@@ -266,11 +269,18 @@ After completing a step, include a [DONE:n] tag in your response.`,
|
|
|
266
269
|
pi.on("agent_end", async (event, ctx) => {
|
|
267
270
|
// Check if execution is complete
|
|
268
271
|
if (executionMode && todoItems.length > 0) {
|
|
272
|
+
// Fallback: the model wrapped up without [DONE:n] tags ("All steps complete").
|
|
273
|
+
const lastAssistant = [...event.messages].reverse().find(isAssistantMessage);
|
|
274
|
+
if (lastAssistant && allStepsComplete(getTextContent(lastAssistant))) {
|
|
275
|
+
for (const t of todoItems) t.completed = true;
|
|
276
|
+
}
|
|
269
277
|
if (todoItems.every((t) => t.completed)) {
|
|
270
278
|
const completedList = todoItems.map((t) => `~~${t.text}~~`).join("\n");
|
|
271
279
|
pi.sendMessage(
|
|
272
280
|
{ customType: "plan-complete", content: `**Plan Complete!** ✓\n\n${completedList}`, display: true },
|
|
273
|
-
|
|
281
|
+
// nextTurn: delivered with the next user prompt instead of triggering an
|
|
282
|
+
// extra (expensive, reasoning-max) LLM turn to acknowledge the card.
|
|
283
|
+
{ deliverAs: "nextTurn" },
|
|
274
284
|
);
|
|
275
285
|
executionMode = false;
|
|
276
286
|
todoItems = [];
|
|
@@ -120,26 +120,30 @@ export function cleanStepText(text: string): string {
|
|
|
120
120
|
if (cleaned.length > 0) {
|
|
121
121
|
cleaned = cleaned.charAt(0).toUpperCase() + cleaned.slice(1);
|
|
122
122
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
123
|
+
// Keep full text: the exec message and widget display need the whole step.
|
|
124
|
+
// The widget truncates for display (see updateStatus in index.ts).
|
|
126
125
|
return cleaned;
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
export function extractTodoItems(message: string): TodoItem[] {
|
|
130
129
|
const items: TodoItem[] = [];
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
|
|
130
|
+
// Take the LAST "Plan:" section: since getTextContent includes thinking blocks,
|
|
131
|
+
// a draft in the reasoning block can precede the user-visible plan in the text
|
|
132
|
+
// block — the text block comes last in content order.
|
|
133
|
+
const headers = [...message.matchAll(/\*{0,2}Plan:\*{0,2}\s*\n/gi)];
|
|
134
|
+
if (headers.length === 0) return items;
|
|
135
|
+
const lastHeader = headers[headers.length - 1];
|
|
136
|
+
const planSection = message.slice((lastHeader.index ?? 0) + lastHeader[0].length);
|
|
137
|
+
// Full-line capture: step titles may contain bold/italic/backticks ("1. **Step** \`x\` …").
|
|
138
|
+
// cleanStepText strips the markdown; / and - items are still skipped below.
|
|
139
|
+
const numberedPattern = /^\s*(\d+)[.)]\s+(.+)$/gm;
|
|
136
140
|
|
|
137
141
|
for (const match of planSection.matchAll(numberedPattern)) {
|
|
138
142
|
const text = match[2]
|
|
139
143
|
.trim()
|
|
140
144
|
.replace(/\*{1,2}$/, "")
|
|
141
145
|
.trim();
|
|
142
|
-
if (text.length > 5 && !text.startsWith("
|
|
146
|
+
if (text.length > 5 && !text.startsWith("/") && !text.startsWith("-")) {
|
|
143
147
|
const cleaned = cleanStepText(text);
|
|
144
148
|
if (cleaned.length > 3) {
|
|
145
149
|
items.push({ step: items.length + 1, text: cleaned, completed: false });
|
|
@@ -151,18 +155,40 @@ export function extractTodoItems(message: string): TodoItem[] {
|
|
|
151
155
|
|
|
152
156
|
export function extractDoneSteps(message: string): number[] {
|
|
153
157
|
const steps: number[] = [];
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
158
|
+
// Canonical and bracket variants: [DONE:1], [DONE: 1], [DONE 1], [Done:1]
|
|
159
|
+
for (const match of message.matchAll(/\[DONE\s*:?\s*(\d+)\]/gi)) {
|
|
160
|
+
steps.push(Number(match[1]));
|
|
161
|
+
}
|
|
162
|
+
// "Done: 1" without brackets
|
|
163
|
+
for (const match of message.matchAll(/\bDone\s*:\s*(\d+)\b/gi)) {
|
|
164
|
+
steps.push(Number(match[1]));
|
|
165
|
+
}
|
|
166
|
+
// "Step 1 done", "Step 2 is complete", "Step 3 finished" — adjacency-anchored,
|
|
167
|
+
// so "Step 9 is not done" / "Step 9 incomplete" never match.
|
|
168
|
+
for (const match of message.matchAll(/\bStep\s*(\d+)\s+(?:is\s+)?(?:done|complete|completed|finished)\b/gi)) {
|
|
169
|
+
steps.push(Number(match[1]));
|
|
157
170
|
}
|
|
158
|
-
return steps;
|
|
171
|
+
return [...new Set(steps)];
|
|
159
172
|
}
|
|
160
173
|
|
|
161
174
|
export function markCompletedSteps(text: string, items: TodoItem[]): number {
|
|
162
175
|
const doneSteps = extractDoneSteps(text);
|
|
176
|
+
let marked = 0;
|
|
163
177
|
for (const step of doneSteps) {
|
|
164
|
-
const item = items.find((t) => t.step === step);
|
|
165
|
-
if (item)
|
|
178
|
+
const item = items.find((t) => t.step === step && !t.completed);
|
|
179
|
+
if (item) {
|
|
180
|
+
item.completed = true;
|
|
181
|
+
marked++;
|
|
182
|
+
}
|
|
166
183
|
}
|
|
167
|
-
return
|
|
184
|
+
return marked;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Whole-plan completion phrasing, used as a fallback when the model summarizes
|
|
188
|
+
// without [DONE:n] tags. Only consulted on the run's final message (agent_end).
|
|
189
|
+
export function allStepsComplete(message: string): boolean {
|
|
190
|
+
return (
|
|
191
|
+
/(?:all|every)\s+steps?\s+(?:are|is\s+)?(?:done|complete|completed|finished)/i.test(message) ||
|
|
192
|
+
/\b(?:the\s+)?plan\s+(?:is\s+)?(?:complete|completed|done)\b/i.test(message)
|
|
193
|
+
);
|
|
168
194
|
}
|
|
@@ -8,7 +8,7 @@ Delegate tasks to specialized subagents with isolated context windows.
|
|
|
8
8
|
- **Streaming output**: See tool calls and progress as they happen
|
|
9
9
|
- **Parallel streaming**: All parallel tasks stream updates simultaneously
|
|
10
10
|
- **Markdown rendering**: Final output rendered with proper formatting (expanded view)
|
|
11
|
-
- **Usage
|
|
11
|
+
- **Usage display**: Shows turns, tokens, cost, and context usage inside each subagent result
|
|
12
12
|
- **Abort support**: Ctrl+C propagates to kill subagent processes
|
|
13
13
|
|
|
14
14
|
## Structure
|
|
@@ -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
|
|
65
|
+
When running interactively, the tool prompts for confirmation before running project-local agents unless the session trust context reports trusted and the agents come from that session project's `.pi/agents` directory. Agents loaded from another task `cwd` still require confirmation. Set `confirmProjectAgents: false` to disable confirmation.
|
|
66
66
|
|
|
67
67
|
## Usage
|
|
68
68
|
|
|
@@ -112,8 +112,8 @@ Use a chain: first have scout find the read tool, then have planner suggest impr
|
|
|
112
112
|
**Parallel mode streaming**:
|
|
113
113
|
- Shows all tasks with live status (⏳ running, ✓ done, ✗ failed)
|
|
114
114
|
- Updates as each task makes progress
|
|
115
|
-
-
|
|
116
|
-
- Returns each completed task
|
|
115
|
+
- Distinguishes pending, running, completed, failed, and aborted tasks
|
|
116
|
+
- Returns each completed task summary to the parent model with its own 50 KB limit
|
|
117
117
|
- Returns failure diagnostics from stderr/error messages when a child exits before producing output
|
|
118
118
|
|
|
119
119
|
**Tool call formatting** (mimics built-in tools):
|
|
@@ -140,7 +140,7 @@ System prompt for the agent goes here.
|
|
|
140
140
|
When `model` is omitted, the subagent inherits the dispatching session's active model and thinking level.
|
|
141
141
|
|
|
142
142
|
**Locations:**
|
|
143
|
-
- `~/.pi/agent/agents/*.md` - User-level (
|
|
143
|
+
- `~/.pi/agent/agents/*.md` - User-level (with `agentScope: "user"` or `"both"`)
|
|
144
144
|
- `.pi/agents/*.md` - Project-level (only with `agentScope: "project"` or `"both"`)
|
|
145
145
|
|
|
146
146
|
Project agents override user agents with the same name when `agentScope: "both"`.
|
|
@@ -164,14 +164,17 @@ Project agents override user agents with the same name when `agentScope: "both"`
|
|
|
164
164
|
|
|
165
165
|
## Error Handling
|
|
166
166
|
|
|
167
|
-
- **Exit code != 0**: Tool returns error with stderr/output
|
|
168
|
-
- **
|
|
169
|
-
- **stopReason "
|
|
170
|
-
- **
|
|
167
|
+
- **Exit code != 0 or signal termination**: Tool returns an error with preserved stderr/output
|
|
168
|
+
- **Spawn errors**: Tool returns the spawn diagnostic
|
|
169
|
+
- **stopReason "error"**: LLM error is propagated with its error message
|
|
170
|
+
- **Abort**: Ctrl+C sends SIGTERM, escalates to SIGKILL after five seconds if needed, and preserves partial details/usage
|
|
171
|
+
- **Chain mode**: Stops at the first failing step and reports which step failed
|
|
171
172
|
|
|
172
173
|
## Limitations
|
|
173
174
|
|
|
174
175
|
- Output truncated to last 10 items in collapsed view (expand to see all)
|
|
175
|
-
-
|
|
176
|
-
-
|
|
176
|
+
- Single and chain output is capped at 50 KB/2,000 lines; full results remain in tool details
|
|
177
|
+
- Parallel output keeps a separate 50 KB budget per task, allowing up to roughly 400 KB across eight tasks
|
|
178
|
+
- Child usage is displayed in tool details but is not added to the calling session's usage totals
|
|
179
|
+
- Agents are snapshotted from each task's effective cwd when the tool invocation starts; relative task cwd values resolve from the session cwd
|
|
177
180
|
- Parallel mode limited to 8 tasks, 4 concurrent
|