pi-namespace-patch 1.3.0-namespace.1 → 1.5.0-namespace.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +172 -0
- package/README.md +5 -5
- package/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +6 -0
- package/dist/bundle/chunks/azure-openai-responses-FSC6BAW3.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +12 -9
- package/dist/bundle/chunks/chunk-36QC74V4.js +2 -0
- package/dist/bundle/chunks/{chunk-RXG5KZNJ.js → chunk-3BE6TOTE.js} +1 -1
- package/dist/bundle/chunks/{chunk-AKJ3ZOR3.js → chunk-3TGLJEWK.js} +1 -1
- package/dist/bundle/chunks/chunk-4EYXVSA5.js +129 -0
- package/dist/bundle/chunks/{chunk-S3GGRYIO.js → chunk-5AGIVGSV.js} +1 -1
- package/dist/bundle/chunks/{chunk-RH6M5TBT.js → chunk-62VOPMLK.js} +8 -7
- package/dist/bundle/chunks/{chunk-F5ZABL6Z.js → chunk-7CBJINYJ.js} +2 -2
- package/dist/bundle/chunks/{chunk-DRQDKNXA.js → chunk-7DDKXS2Q.js} +1 -1
- package/dist/bundle/chunks/chunk-7O7QKK6A.js +2 -0
- package/dist/bundle/chunks/chunk-AXIQEITU.js +1234 -0
- package/dist/bundle/chunks/{chunk-2LOB3CBH.js → chunk-B46VJEHW.js} +3 -3
- package/dist/bundle/chunks/chunk-C2WU32PX.js +2 -0
- package/dist/bundle/chunks/{chunk-H3QXYIF7.js → chunk-CF5GWZHW.js} +1 -1
- package/dist/bundle/chunks/chunk-CHWNPHIS.js +82 -0
- package/dist/bundle/chunks/chunk-EOO47QGR.js +2 -0
- package/dist/bundle/chunks/chunk-FFMDRXC4.js +10 -0
- package/dist/bundle/chunks/chunk-GN3QYODH.js +16 -0
- package/dist/bundle/chunks/{chunk-4L3WN2XY.js → chunk-JXWJOIH4.js} +1 -1
- package/dist/bundle/chunks/{chunk-6CYCI3EJ.js → chunk-LVVZS2NO.js} +1 -1
- package/dist/bundle/chunks/chunk-NL4X6LBY.js +4 -0
- package/dist/bundle/chunks/chunk-NZY7EIPA.js +4 -0
- package/dist/bundle/chunks/chunk-P7FPUEYA.js +2 -0
- package/dist/bundle/chunks/{chunk-5GTPJSRI.js → chunk-R2EGYMOO.js} +3 -3
- package/dist/bundle/chunks/{chunk-ZBURYEWF.js → chunk-TMTOQ7H7.js} +1 -1
- package/dist/bundle/chunks/{chunk-22CYIUS4.js → chunk-UKVNB6C4.js} +1 -1
- package/dist/bundle/chunks/chunk-V6KH5QG4.js +9 -0
- package/dist/bundle/chunks/chunk-VOLAXWGI.js +2 -0
- package/dist/bundle/chunks/chunk-YZKQS34S.js +9 -0
- package/dist/bundle/chunks/{cli-SWM4FQ6V.js → cli-MCOUW5WS.js} +11 -9
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-WLAFJSP6.js +2 -0
- package/dist/bundle/chunks/{easter-egg-3d-OX6RUCIS.js → easter-egg-3d-WMBNSJ4M.js} +1 -1
- package/dist/bundle/chunks/{execute-HXNYK3DM.js → execute-4CEBORGZ.js} +9 -3
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/google-generative-ai-INGKNW72.js +2 -0
- package/dist/bundle/chunks/google-vertex-IBTX6MBF.js +2 -0
- package/dist/bundle/chunks/https-proxy-agent-LVOO5TPL.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +1 -1
- package/dist/bundle/chunks/{jiti-loader-C3NU2SDH.js → jiti-loader-GL4HJFAD.js} +1 -1
- package/dist/bundle/chunks/{jiti-static-loader-E6ANQD5T.js → jiti-static-loader-2RCDI6B4.js} +1 -1
- package/dist/bundle/chunks/kimi-coding.js +1 -1
- package/dist/bundle/chunks/{lib-TEDK3E5I.js → lib-4AVRLBHM.js} +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-FYN623RH.js → llama-cpp-classify-V5U3QKXI.js} +2 -2
- package/dist/bundle/chunks/meta.js +1 -1
- package/dist/bundle/chunks/mistral-conversations-S4OWXIXQ.js +5 -0
- package/dist/bundle/chunks/{multipart-parser-SQ6GDJL7.js → multipart-parser-FMGQ7342.js} +1 -1
- package/dist/bundle/chunks/{node-TWVVAGPO.js → node-AUOGOBCN.js} +1 -1
- package/dist/bundle/chunks/{node-N5BSDOA5.js → node-KCMANYC2.js} +1 -1
- package/dist/bundle/chunks/openai-codex-responses-QAWLOQSN.js +10 -0
- package/dist/bundle/chunks/openai-completions-EJNYB6IX.js +7 -0
- package/dist/bundle/chunks/{openai-decisions-WVPMQ4JD.js → openai-decisions-IXI34BYG.js} +1 -1
- package/dist/bundle/chunks/openai-responses-MD3562FB.js +4 -0
- package/dist/bundle/chunks/openrouter-images-PISKSFMS.js +2 -0
- package/dist/bundle/chunks/pi-messages-NORUKF4E.js +8 -0
- package/dist/bundle/chunks/radius.js +1 -1
- package/dist/bundle/chunks/{runtime-366HE7CW.js → runtime-FQB7RU7U.js} +1 -1
- package/dist/bundle/chunks/{src-UK77SYZE.js → src-QKGKDFSU.js} +1 -1
- package/dist/bundle/chunks/typesafe-system-one-CHVC2UUI.js +2 -0
- package/dist/bundle/chunks/virtual-modules-ZVUPOVM4.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 +8 -7
- package/dist/cli/args.js.map +1 -1
- package/dist/config.d.ts +10 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +24 -5
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.js +3 -3
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +11 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +60 -13
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/bug-report.d.ts +4 -4
- package/dist/core/client-identity.d.ts +8 -0
- package/dist/core/client-identity.d.ts.map +1 -0
- package/dist/core/client-identity.js +15 -0
- package/dist/core/client-identity.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +4 -2
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +17 -6
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +2 -2
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +20 -15
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/exec.d.ts +9 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +104 -60
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +2 -0
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/template.css +9 -0
- package/dist/core/export-html/template.html +1 -0
- package/dist/core/export-html/template.js +167 -46
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +3 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
- package/dist/core/export-html/vendor/marked.min.js +30 -29
- 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 +10 -6
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/pi-ai-extension-view.d.ts +19 -0
- package/dist/core/extensions/pi-ai-extension-view.d.ts.map +1 -0
- package/dist/core/extensions/pi-ai-extension-view.js +22 -0
- package/dist/core/extensions/pi-ai-extension-view.js.map +1 -0
- package/dist/core/extensions/types.d.ts +27 -4
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/virtual-modules.js +11 -7
- package/dist/core/extensions/virtual-modules.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +11 -4
- package/dist/core/mcp-servers.d.ts.map +1 -1
- package/dist/core/mcp-servers.js +15 -5
- package/dist/core/mcp-servers.js.map +1 -1
- package/dist/core/model-config.d.ts +1783 -1219
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +50 -27
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +23 -17
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +6 -3
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts +14 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +165 -51
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-ai-schemas.d.ts +163 -0
- package/dist/core/pi-ai-schemas.d.ts.map +1 -0
- package/dist/core/pi-ai-schemas.js +21 -0
- package/dist/core/pi-ai-schemas.js.map +1 -0
- package/dist/core/pi-manifest.d.ts +1 -0
- package/dist/core/pi-manifest.d.ts.map +1 -1
- package/dist/core/pi-manifest.js +4 -0
- package/dist/core/pi-manifest.js.map +1 -1
- package/dist/core/project-trust.js +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/provider-composer.d.ts +2 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +7 -3
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/resource-loader.d.ts +4 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +39 -24
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +11 -10
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +7 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +32 -13
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +2 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +11 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +4 -2
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +8 -1
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +6 -14
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.js +2 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/source-info.d.ts +9 -0
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js +13 -0
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +5 -6
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +3 -3
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +2 -4
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +2 -2
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +2 -2
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +4 -2
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts +2 -2
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +2 -2
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +2 -7
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/write.d.ts.map +1 -1
- package/dist/core/tools/renderers/write.js +19 -19
- package/dist/core/tools/renderers/write.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +11 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/write.d.ts +2 -2
- package/dist/core/tools/write.d.ts.map +1 -1
- 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 +14 -8
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +2 -0
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/dist/extensions/codemode/execute.js +99 -24
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/renderer.d.ts.map +1 -1
- package/dist/extensions/codemode/renderer.js +6 -2
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +2 -1
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +33 -8
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/llama/ui.d.ts.map +1 -1
- package/dist/extensions/llama/ui.js +16 -4
- package/dist/extensions/llama/ui.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts.map +1 -1
- package/dist/extensions/mcp/cli.js +34 -8
- 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 +3 -2
- package/dist/extensions/mcp/config.js.map +1 -1
- package/dist/extensions/mcp/oauth.d.ts +1 -1
- package/dist/extensions/mcp/oauth.d.ts.map +1 -1
- package/dist/extensions/mcp/oauth.js +36 -13
- package/dist/extensions/mcp/oauth.js.map +1 -1
- package/dist/extensions/mcp/ui.d.ts +1 -0
- package/dist/extensions/mcp/ui.d.ts.map +1 -1
- package/dist/extensions/mcp/ui.js +33 -24
- package/dist/extensions/mcp/ui.js.map +1 -1
- package/dist/extensions/tool-search/tool.d.ts +21 -6
- package/dist/extensions/tool-search/tool.d.ts.map +1 -1
- package/dist/extensions/tool-search/tool.js +104 -36
- package/dist/extensions/tool-search/tool.js.map +1 -1
- package/dist/index.d.ts +2 -2
- 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 +15 -8
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +4 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +45 -21
- package/dist/modes/interactive/components/assistant-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 +4 -17
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +7 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +2 -1
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +2 -1
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +2 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +4 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +5 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +105 -10
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +2 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.js +3 -2
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +17 -6
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +13 -4
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +14 -3
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts +4 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js +86 -22
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +2 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +16 -24
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.js +2 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +6 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +14 -2
- 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 +5 -6
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +9 -1
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +3 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +6 -2
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts +1 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +16 -4
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +16 -15
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +221 -153
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-search.d.ts +10 -0
- package/dist/modes/interactive/model-search.d.ts.map +1 -1
- package/dist/modes/interactive/model-search.js +21 -0
- package/dist/modes/interactive/model-search.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +10 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +31 -23
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +57 -5
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js +5 -2
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/clipboard-command.d.ts.map +1 -1
- package/dist/utils/clipboard-command.js +7 -0
- package/dist/utils/clipboard-command.js.map +1 -1
- package/dist/utils/git.d.ts +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js +5 -3
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js +4 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts +17 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +42 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts +1 -0
- package/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/dist/utils/pi-user-agent.js +3 -2
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +59 -13
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +5 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +7 -0
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +34 -38
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/cli.md +21 -11
- package/docs/codemode.md +2 -2
- package/docs/compaction.md +3 -3
- package/docs/custom-provider.md +55 -1
- package/docs/docs.json +4 -0
- package/docs/environment-variables.md +3 -0
- package/docs/extensions.md +3222 -152
- package/docs/keybindings.md +1 -1
- package/docs/llama-cpp.md +23 -12
- package/docs/mcp.md +6 -4
- package/docs/message-types.md +1 -1
- package/docs/models-configuration.md +196 -0
- package/docs/models.md +21 -5
- package/docs/packages.md +24 -0
- package/docs/quickstart.md +7 -3
- package/docs/sessions.md +11 -3
- package/docs/settings.md +6 -5
- package/docs/slash-commands.md +3 -2
- package/docs/terminal-setup.md +3 -1
- package/docs/tmux.md +6 -0
- package/docs/tui.md +72 -0
- package/docs/windows.md +43 -2
- package/examples/extensions/README.md +2 -1
- package/examples/extensions/custom-provider-anthropic/index.ts +27 -31
- 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/debug-provider.ts +2 -2
- package/examples/extensions/gondolin/package-lock.json +19 -29
- package/examples/extensions/gondolin/package.json +2 -2
- package/examples/extensions/preset.ts +2 -0
- package/examples/extensions/reload-runtime.ts +17 -5
- package/examples/extensions/todo.ts +7 -0
- package/examples/extensions/tools.ts +2 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/tsconfig.json +180 -0
- package/package.json +14 -14
- package/schemas/models.schema.json +119 -65
- package/schemas/settings.schema.json +17 -0
- package/dist/bundle/chunks/anthropic-messages-UIH6DSZT.js +0 -6
- package/dist/bundle/chunks/azure-openai-responses-KZZFKCXW.js +0 -2
- package/dist/bundle/chunks/chunk-2JW42LFQ.js +0 -2
- package/dist/bundle/chunks/chunk-3ZATHNCK.js +0 -9
- package/dist/bundle/chunks/chunk-6MWTY2OB.js +0 -130
- package/dist/bundle/chunks/chunk-DOST5PQW.js +0 -82
- package/dist/bundle/chunks/chunk-GDR5JFDJ.js +0 -4
- package/dist/bundle/chunks/chunk-H2VI33AU.js +0 -1220
- package/dist/bundle/chunks/chunk-HACVPRBJ.js +0 -11
- package/dist/bundle/chunks/chunk-ITZNWD4K.js +0 -2
- package/dist/bundle/chunks/chunk-PYGXRV27.js +0 -7
- package/dist/bundle/chunks/chunk-TEPMHNKQ.js +0 -2
- package/dist/bundle/chunks/chunk-UCKJ6OH5.js +0 -11
- package/dist/bundle/chunks/chunk-WJUNYZC5.js +0 -2
- package/dist/bundle/chunks/chunk-XIX7LUWI.js +0 -2
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-UTBL2KOF.js +0 -2
- package/dist/bundle/chunks/google-generative-ai-KJOKBJM3.js +0 -2
- package/dist/bundle/chunks/google-vertex-VCLZ36OB.js +0 -2
- package/dist/bundle/chunks/https-proxy-agent-2VXB7436.js +0 -13
- package/dist/bundle/chunks/mistral-conversations-AMQJ43DD.js +0 -5
- package/dist/bundle/chunks/openai-codex-responses-ZYGHVE5B.js +0 -10
- package/dist/bundle/chunks/openai-completions-BGCEXFAB.js +0 -7
- package/dist/bundle/chunks/openai-responses-KCCCXI3B.js +0 -3
- package/dist/bundle/chunks/openrouter-images-DUPG5DZO.js +0 -2
- package/dist/bundle/chunks/pi-messages-V27DSLVC.js +0 -8
- package/dist/bundle/chunks/typesafe-system-one-ZSK3RN4B.js +0 -2
- package/dist/bundle/chunks/virtual-modules-ZXBODXVN.js +0 -2
- package/dist/core/provider-attribution.d.ts +0 -4
- package/dist/core/provider-attribution.d.ts.map +0 -1
- package/dist/core/provider-attribution.js +0 -72
- package/dist/core/provider-attribution.js.map +0 -1
- package/examples/extensions/sandbox/index.ts +0 -321
- package/examples/extensions/sandbox/package-lock.json +0 -92
- package/examples/extensions/sandbox/package.json +0 -19
package/docs/tui.md
CHANGED
|
@@ -65,6 +65,78 @@ Regular mode leaves mouse input to the terminal because the terminal owns scroll
|
|
|
65
65
|
|
|
66
66
|
`ctx.ui.custom()` temporarily gives one component control of the interactive area and resolves when that component calls the supplied completion callback.
|
|
67
67
|
|
|
68
|
+
### Build a minimal custom screen
|
|
69
|
+
|
|
70
|
+
This complete extension shows the custom-component lifecycle: render within the supplied width, use injected keybindings, invalidate cached output after state changes, request a render, and finish through `done()`.
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
74
|
+
import { truncateToWidth } from "@earendil-works/pi-tui";
|
|
75
|
+
|
|
76
|
+
export default function (pi: ExtensionAPI) {
|
|
77
|
+
pi.registerCommand("pick-target", {
|
|
78
|
+
description: "Pick a deployment target",
|
|
79
|
+
handler: async (_args, ctx) => {
|
|
80
|
+
if (ctx.mode !== "tui") {
|
|
81
|
+
ctx.ui.notify("pick-target requires interactive mode", "error");
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const choices = ["development", "staging", "production"];
|
|
86
|
+
const selected = await ctx.ui.custom<string | undefined>((tui, theme, keybindings, done) => {
|
|
87
|
+
let selectedIndex = 0;
|
|
88
|
+
let cachedWidth: number | undefined;
|
|
89
|
+
let cachedLines: string[] | undefined;
|
|
90
|
+
|
|
91
|
+
const invalidate = () => {
|
|
92
|
+
cachedWidth = undefined;
|
|
93
|
+
cachedLines = undefined;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
render(width: number): string[] {
|
|
98
|
+
if (cachedLines && cachedWidth === width) return cachedLines;
|
|
99
|
+
|
|
100
|
+
cachedWidth = width;
|
|
101
|
+
cachedLines = [
|
|
102
|
+
theme.fg("accent", "Choose a deployment target"),
|
|
103
|
+
...choices.map((choice, index) => `${index === selectedIndex ? "> " : " "}${choice}`),
|
|
104
|
+
theme.fg("dim", "up/down move, enter selects, escape cancels"),
|
|
105
|
+
].map((line) => truncateToWidth(line, width));
|
|
106
|
+
return cachedLines;
|
|
107
|
+
},
|
|
108
|
+
handleInput(data: string): void {
|
|
109
|
+
if (keybindings.matches(data, "tui.select.up")) {
|
|
110
|
+
selectedIndex = (selectedIndex - 1 + choices.length) % choices.length;
|
|
111
|
+
} else if (keybindings.matches(data, "tui.select.down")) {
|
|
112
|
+
selectedIndex = (selectedIndex + 1) % choices.length;
|
|
113
|
+
} else if (keybindings.matches(data, "tui.select.confirm")) {
|
|
114
|
+
done(choices[selectedIndex]);
|
|
115
|
+
return;
|
|
116
|
+
} else if (keybindings.matches(data, "tui.select.cancel")) {
|
|
117
|
+
done(undefined);
|
|
118
|
+
return;
|
|
119
|
+
} else {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
invalidate();
|
|
124
|
+
tui.requestRender();
|
|
125
|
+
},
|
|
126
|
+
invalidate,
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
if (selected) ctx.ui.notify(`Selected ${selected}`, "info");
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
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
|
+
|
|
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 an inline 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 while the component is visible. `kind` is `"question"`, `"permission"`, or `"auth"`. Overlays ignore this option.
|
|
139
|
+
|
|
68
140
|
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.
|
|
69
141
|
|
|
70
142
|
Focused overlays retain input ownership across ordinary renders. If another component should receive input while an overlay remains visible, explicitly release or redirect focus through the handle.
|
package/docs/windows.md
CHANGED
|
@@ -19,8 +19,9 @@ For most native Windows users, installing [Git for Windows](https://git-scm.com/
|
|
|
19
19
|
Pi resolves Bash in this order:
|
|
20
20
|
|
|
21
21
|
1. `shellPath` from `~/.pi/agent/settings.json`
|
|
22
|
-
2. Git Bash
|
|
23
|
-
3.
|
|
22
|
+
2. Git Bash at `%ProgramFiles%\Git\bin\bash.exe`
|
|
23
|
+
3. Git Bash at `%ProgramFiles(x86)%\Git\bin\bash.exe`
|
|
24
|
+
4. `bash.exe` on `PATH`, including Cygwin, MSYS2, or legacy WSL Bash
|
|
24
25
|
|
|
25
26
|
Start Pi and enter this command to verify the shell:
|
|
26
27
|
|
|
@@ -34,6 +35,13 @@ If Pi cannot find Bash, it reports the locations it checked. Install Git for Win
|
|
|
34
35
|
|
|
35
36
|
The optional `powershell` tool runs commands through `pwsh.exe` when available, then falls back to Windows PowerShell. It starts PowerShell with `-NoProfile -NonInteractive -ExecutionPolicy Bypass`. Administrator-enforced execution policies can still take precedence.
|
|
36
37
|
|
|
38
|
+
PowerShell discovery checks these locations in order:
|
|
39
|
+
|
|
40
|
+
1. `pwsh.exe` on `PATH`
|
|
41
|
+
2. `%ProgramFiles%\PowerShell\7\pwsh.exe`
|
|
42
|
+
3. `powershell.exe` on `PATH`
|
|
43
|
+
4. `%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe`
|
|
44
|
+
|
|
37
45
|
To replace the model-facing `bash` tool with `powershell`, add this to `~/.pi/agent/settings.json`:
|
|
38
46
|
|
|
39
47
|
```json
|
|
@@ -48,6 +56,12 @@ Restart Pi, then ask it to run a harmless PowerShell command. The `!` and `!!` e
|
|
|
48
56
|
|
|
49
57
|
See [Settings](settings.md#tools) for other tool combinations.
|
|
50
58
|
|
|
59
|
+
## WSL
|
|
60
|
+
|
|
61
|
+
WSL path conversion on Windows and extra Git branch polling in WSL recognize `/mnt/<drive>`, not custom mount roots.
|
|
62
|
+
|
|
63
|
+
When using the legacy WSL `bash.exe` launcher from Windows, Pi sends commands over stdin to avoid command-line quoting problems.
|
|
64
|
+
|
|
51
65
|
## Use a custom Bash executable
|
|
52
66
|
|
|
53
67
|
Set `shellPath` when Bash is installed somewhere Pi does not discover automatically:
|
|
@@ -62,6 +76,33 @@ JSON uses backslashes for escape sequences. When you write a Windows path with b
|
|
|
62
76
|
|
|
63
77
|
See [Configure shell commands](shell-aliases.md) for command prefixes, aliases, and the complete shell-resolution behavior.
|
|
64
78
|
|
|
79
|
+
## Choose a terminal
|
|
80
|
+
|
|
81
|
+
Windows terminals run Pi through a console host (conhost). Some bundle an up-to-date copy; others use the older one built into Windows, which has bugs that affect Pi.
|
|
82
|
+
|
|
83
|
+
We recommend [Windows Terminal](https://aka.ms/terminal). It always ships an up-to-date conhost, and Pi is best tested with it.
|
|
84
|
+
|
|
85
|
+
Last updated: October 2026.
|
|
86
|
+
|
|
87
|
+
| Terminal | Conhost | Status |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| [Windows Terminal](https://aka.ms/terminal) | Bundled, current | Recommended |
|
|
90
|
+
| [VS Code](https://code.visualstudio.com), [Tabby](https://tabby.sh), [WezTerm](https://wezterm.org) nightly | Bundled, current | Works |
|
|
91
|
+
| [Alacritty](https://alacritty.org) | Built-in, unless `conpty.dll` and `OpenConsole.exe` from Windows Terminal are next to `alacritty.exe` | Works only with those files |
|
|
92
|
+
| WezTerm 20240203 and older | Bundled, old | [Known issues](#known-issues) |
|
|
93
|
+
| Classic console (`cmd.exe` or PowerShell without Windows Terminal), mintty (Git Bash), ConEmu, Cmder, [Hyper](https://hyper.is), Windows OpenSSH | Built-in | [Known issues](#known-issues) |
|
|
94
|
+
|
|
65
95
|
## Configure Windows Terminal
|
|
66
96
|
|
|
67
97
|
Windows Terminal reserves or rewrites some modified keys. See [Windows Terminal](terminal-setup.md#windows-terminal) to configure `Shift+Enter` and `Alt+Enter`, and [Keybindings](keybindings.md) for Pi's Windows and WSL shortcut defaults.
|
|
98
|
+
|
|
99
|
+
## Known issues
|
|
100
|
+
|
|
101
|
+
These issues come from conhost. Microsoft has fixed them in its source, but has not said when the built-in conhost will get the fixes.
|
|
102
|
+
|
|
103
|
+
| Issue | Affects | Remedy |
|
|
104
|
+
|---|---|---|
|
|
105
|
+
| Switching from fullscreen to regular mode, or `Ctrl+G` from fullscreen, crashes the session ([#9186](https://github.com/earendil-works/pi/issues/9186), [microsoft/terminal#17515](https://github.com/microsoft/terminal/issues/17515)) | Built-in conhost | Use a terminal with a current conhost, or start Pi with `--tui-mode regular` |
|
|
106
|
+
| Text such as `;0;rgb:0000/0000/0000` appears in the prompt, and BEL opens the external editor ([#10256](https://github.com/earendil-works/pi/issues/10256)) | Built-in conhost behind another terminal: mintty, Windows OpenSSH | Use a terminal with a current conhost |
|
|
107
|
+
| Fragments such as `79` or `55` appear in the prompt ([#10717](https://github.com/earendil-works/pi/issues/10717)) | WezTerm 20240203 | Use WezTerm nightly |
|
|
108
|
+
| In regular mode, each keystroke redraws the input line on a new row ([#6300](https://github.com/earendil-works/pi/issues/6300)) | Built-in conhost, classic console | Use fullscreen mode (the default), or a terminal with a current conhost |
|
|
@@ -23,9 +23,10 @@ cp permission-gate.ts ~/.pi/agent/extensions/
|
|
|
23
23
|
| `protected-paths.ts` | Blocks writes to protected paths (.env, .git/, node_modules/) |
|
|
24
24
|
| `confirm-destructive.ts` | Confirms before destructive session actions (clear, switch, fork) |
|
|
25
25
|
| `dirty-repo-guard.ts` | Prevents session changes with uncommitted git changes |
|
|
26
|
-
| `sandbox/` | OS-level sandboxing using `@anthropic-ai/sandbox-runtime` with per-project config |
|
|
27
26
|
| `gondolin/` | Route built-in tools and `!` commands into a Gondolin micro-VM |
|
|
28
27
|
|
|
28
|
+
For isolation setup and limitations, see [Run Pi in an isolated environment](../../docs/containerization.md).
|
|
29
|
+
|
|
29
30
|
### Custom Tools
|
|
30
31
|
|
|
31
32
|
| Extension | Description |
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
type TextContent,
|
|
43
43
|
type ThinkingContent,
|
|
44
44
|
type Tool,
|
|
45
|
-
|
|
45
|
+
ToolCallArgumentsStream,
|
|
46
46
|
type ToolResultMessage,
|
|
47
47
|
type TranscriptContext,
|
|
48
48
|
} from "@earendil-works/pi-ai";
|
|
@@ -454,8 +454,9 @@ function streamCustomAnthropic(
|
|
|
454
454
|
const anthropicStream = client.messages.stream({ ...params }, { signal: options?.signal });
|
|
455
455
|
stream.push({ type: "start", partial: output });
|
|
456
456
|
|
|
457
|
-
|
|
458
|
-
|
|
457
|
+
// Stream state per Anthropic block index, kept off the content blocks so it never reaches partial messages.
|
|
458
|
+
// ToolCallArgumentsStream reads each argument delta once and shows the arguments parsed so far.
|
|
459
|
+
const openBlocks = new Map<number, { contentIndex: number; arguments?: ToolCallArgumentsStream }>();
|
|
459
460
|
|
|
460
461
|
for await (const event of anthropicStream) {
|
|
461
462
|
if (event.type === "message_start") {
|
|
@@ -468,15 +469,12 @@ function streamCustomAnthropic(
|
|
|
468
469
|
calculateCost(model, output.usage);
|
|
469
470
|
} else if (event.type === "content_block_start") {
|
|
470
471
|
if (event.content_block.type === "text") {
|
|
471
|
-
output.content.push({ type: "text", text: ""
|
|
472
|
+
output.content.push({ type: "text", text: "" });
|
|
473
|
+
openBlocks.set(event.index, { contentIndex: output.content.length - 1 });
|
|
472
474
|
stream.push({ type: "text_start", contentIndex: output.content.length - 1, partial: output });
|
|
473
475
|
} else if (event.content_block.type === "thinking") {
|
|
474
|
-
output.content.push({
|
|
475
|
-
|
|
476
|
-
thinking: "",
|
|
477
|
-
thinkingSignature: "",
|
|
478
|
-
index: event.index,
|
|
479
|
-
} as any);
|
|
476
|
+
output.content.push({ type: "thinking", thinking: "", thinkingSignature: "" });
|
|
477
|
+
openBlocks.set(event.index, { contentIndex: output.content.length - 1 });
|
|
480
478
|
stream.push({ type: "thinking_start", contentIndex: output.content.length - 1, partial: output });
|
|
481
479
|
} else if (event.content_block.type === "tool_use") {
|
|
482
480
|
output.content.push({
|
|
@@ -484,15 +482,18 @@ function streamCustomAnthropic(
|
|
|
484
482
|
id: event.content_block.id,
|
|
485
483
|
name: isOAuth ? fromClaudeCodeName(event.content_block.name, tools) : event.content_block.name,
|
|
486
484
|
arguments: {},
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
485
|
+
});
|
|
486
|
+
openBlocks.set(event.index, {
|
|
487
|
+
contentIndex: output.content.length - 1,
|
|
488
|
+
arguments: new ToolCallArgumentsStream(),
|
|
489
|
+
});
|
|
490
490
|
stream.push({ type: "toolcall_start", contentIndex: output.content.length - 1, partial: output });
|
|
491
491
|
}
|
|
492
492
|
} else if (event.type === "content_block_delta") {
|
|
493
|
-
const
|
|
494
|
-
|
|
495
|
-
|
|
493
|
+
const open = openBlocks.get(event.index);
|
|
494
|
+
if (!open) continue;
|
|
495
|
+
const index = open.contentIndex;
|
|
496
|
+
const block = output.content[index]!;
|
|
496
497
|
|
|
497
498
|
if (event.delta.type === "text_delta" && block.type === "text") {
|
|
498
499
|
block.text += event.delta.text;
|
|
@@ -505,11 +506,8 @@ function streamCustomAnthropic(
|
|
|
505
506
|
delta: event.delta.thinking,
|
|
506
507
|
partial: output,
|
|
507
508
|
});
|
|
508
|
-
} else if (event.delta.type === "input_json_delta" && block.type === "toolCall") {
|
|
509
|
-
|
|
510
|
-
try {
|
|
511
|
-
block.arguments = JSON.parse((block as any).partialJson);
|
|
512
|
-
} catch {}
|
|
509
|
+
} else if (event.delta.type === "input_json_delta" && block.type === "toolCall" && open.arguments) {
|
|
510
|
+
block.arguments = open.arguments.append(event.delta.partial_json);
|
|
513
511
|
stream.push({
|
|
514
512
|
type: "toolcall_delta",
|
|
515
513
|
contentIndex: index,
|
|
@@ -520,20 +518,19 @@ function streamCustomAnthropic(
|
|
|
520
518
|
block.thinkingSignature = (block.thinkingSignature || "") + (event.delta as any).signature;
|
|
521
519
|
}
|
|
522
520
|
} else if (event.type === "content_block_stop") {
|
|
523
|
-
const
|
|
524
|
-
|
|
525
|
-
|
|
521
|
+
const open = openBlocks.get(event.index);
|
|
522
|
+
if (!open) continue;
|
|
523
|
+
openBlocks.delete(event.index);
|
|
524
|
+
const index = open.contentIndex;
|
|
525
|
+
const block = output.content[index]!;
|
|
526
526
|
|
|
527
|
-
delete (block as any).index;
|
|
528
527
|
if (block.type === "text") {
|
|
529
528
|
stream.push({ type: "text_end", contentIndex: index, content: block.text, partial: output });
|
|
530
529
|
} else if (block.type === "thinking") {
|
|
531
530
|
stream.push({ type: "thinking_end", contentIndex: index, content: block.thinking, partial: output });
|
|
532
|
-
} else if (block.type === "toolCall") {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
} catch {}
|
|
536
|
-
delete (block as any).partialJson;
|
|
531
|
+
} else if (block.type === "toolCall" && open.arguments) {
|
|
532
|
+
// One full parse of the complete text; malformed arguments are reported in `argumentsError`.
|
|
533
|
+
Object.assign(block, open.arguments.finish());
|
|
537
534
|
stream.push({ type: "toolcall_end", contentIndex: index, toolCall: block, partial: output });
|
|
538
535
|
}
|
|
539
536
|
} else if (event.type === "message_delta") {
|
|
@@ -563,7 +560,6 @@ function streamCustomAnthropic(
|
|
|
563
560
|
stream.push({ type: "done", reason: output.stopReason, message: output });
|
|
564
561
|
stream.end();
|
|
565
562
|
} catch (error) {
|
|
566
|
-
for (const block of output.content) delete (block as any).index;
|
|
567
563
|
output.stopReason = options?.signal?.aborted ? "aborted" : "error";
|
|
568
564
|
output.errorMessage = error instanceof Error ? error.message : JSON.stringify(error);
|
|
569
565
|
stream.push({ type: "error", reason: output.stopReason, error: output });
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.5.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* as expandable custom entries.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
10
10
|
import { Box, Text } from "@earendil-works/pi-tui";
|
|
11
11
|
|
|
12
12
|
const ENTRY_TYPE = "debug-provider-events";
|
|
@@ -24,7 +24,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
24
24
|
let activeEvents: unknown[] | undefined;
|
|
25
25
|
let completedEntry: ProviderDebugEntry | undefined;
|
|
26
26
|
|
|
27
|
-
pi.registerEntryRenderer<ProviderDebugEntry>(ENTRY_TYPE, (entry, { expanded }, theme) => {
|
|
27
|
+
pi.registerEntryRenderer<ProviderDebugEntry>(ENTRY_TYPE, (entry, { expanded, keyHint }, theme) => {
|
|
28
28
|
const data = entry.data;
|
|
29
29
|
if (!data) return new Text(theme.fg("warning", "[provider debug] Missing event data"), 0, 0);
|
|
30
30
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-gondolin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-gondolin",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.5.0",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@earendil-works/gondolin": "0.
|
|
11
|
+
"@earendil-works/gondolin": "0.14.0"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"node_modules/@cto.af/wtf8": {
|
|
@@ -21,31 +21,30 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"node_modules/@earendil-works/gondolin": {
|
|
24
|
-
"version": "0.
|
|
25
|
-
"resolved": "https://registry.npmjs.org/@earendil-works/gondolin/-/gondolin-0.
|
|
26
|
-
"integrity": "sha512-
|
|
24
|
+
"version": "0.14.0",
|
|
25
|
+
"resolved": "https://registry.npmjs.org/@earendil-works/gondolin/-/gondolin-0.14.0.tgz",
|
|
26
|
+
"integrity": "sha512-MSw+EGcqFJeyKHdXEfm+nMRr74ytT4x8DGIohav0oPCHeVQAB9AajquM94cv2xqvIU3VDAaZZVC07IXsOY6OVQ==",
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"cbor2": "^2.3.0",
|
|
30
|
-
"node-forge": "^1.3.3",
|
|
31
30
|
"ssh2": "^1.17.0",
|
|
32
|
-
"undici": "^6.
|
|
31
|
+
"undici": "^6.29.0"
|
|
33
32
|
},
|
|
34
33
|
"bin": {
|
|
35
34
|
"gondolin": "dist/bin/gondolin.js"
|
|
36
35
|
},
|
|
37
36
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
37
|
+
"node": ">=22.19.0"
|
|
39
38
|
},
|
|
40
39
|
"optionalDependencies": {
|
|
41
|
-
"@earendil-works/gondolin-krun-runner-darwin-arm64": "0.
|
|
42
|
-
"@earendil-works/gondolin-krun-runner-linux-x64": "0.
|
|
40
|
+
"@earendil-works/gondolin-krun-runner-darwin-arm64": "0.14.0",
|
|
41
|
+
"@earendil-works/gondolin-krun-runner-linux-x64": "0.14.0"
|
|
43
42
|
}
|
|
44
43
|
},
|
|
45
44
|
"node_modules/@earendil-works/gondolin-krun-runner-darwin-arm64": {
|
|
46
|
-
"version": "0.
|
|
47
|
-
"resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-darwin-arm64/-/gondolin-krun-runner-darwin-arm64-0.
|
|
48
|
-
"integrity": "sha512-
|
|
45
|
+
"version": "0.14.0",
|
|
46
|
+
"resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-darwin-arm64/-/gondolin-krun-runner-darwin-arm64-0.14.0.tgz",
|
|
47
|
+
"integrity": "sha512-fvuhz1CZPaEbmXC0luZoXd1obAb0bjaaGJz33Jo63bhMlosYunAahItakh7cU0dnTlNFzufOSnpGOPqtuYjnpQ==",
|
|
49
48
|
"cpu": [
|
|
50
49
|
"arm64"
|
|
51
50
|
],
|
|
@@ -59,9 +58,9 @@
|
|
|
59
58
|
}
|
|
60
59
|
},
|
|
61
60
|
"node_modules/@earendil-works/gondolin-krun-runner-linux-x64": {
|
|
62
|
-
"version": "0.
|
|
63
|
-
"resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-linux-x64/-/gondolin-krun-runner-linux-x64-0.
|
|
64
|
-
"integrity": "sha512-
|
|
61
|
+
"version": "0.14.0",
|
|
62
|
+
"resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-linux-x64/-/gondolin-krun-runner-linux-x64-0.14.0.tgz",
|
|
63
|
+
"integrity": "sha512-91iw4smoOH/yOoAuQS6N2UZOxqSFwRhtk8rTyrokXBoWiWcveAzg4kHvnLcm40ZlNrWwzIDFrere4bkZeGDQcA==",
|
|
65
64
|
"cpu": [
|
|
66
65
|
"x64"
|
|
67
66
|
],
|
|
@@ -134,15 +133,6 @@
|
|
|
134
133
|
"license": "MIT",
|
|
135
134
|
"optional": true
|
|
136
135
|
},
|
|
137
|
-
"node_modules/node-forge": {
|
|
138
|
-
"version": "1.4.0",
|
|
139
|
-
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz",
|
|
140
|
-
"integrity": "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==",
|
|
141
|
-
"license": "(BSD-3-Clause OR GPL-2.0)",
|
|
142
|
-
"engines": {
|
|
143
|
-
"node": ">= 6.13.0"
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
136
|
"node_modules/safer-buffer": {
|
|
147
137
|
"version": "2.1.2",
|
|
148
138
|
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
|
@@ -173,9 +163,9 @@
|
|
|
173
163
|
"license": "Unlicense"
|
|
174
164
|
},
|
|
175
165
|
"node_modules/undici": {
|
|
176
|
-
"version": "6.
|
|
177
|
-
"resolved": "https://registry.npmjs.org/undici/-/undici-6.
|
|
178
|
-
"integrity": "sha512-
|
|
166
|
+
"version": "6.29.1",
|
|
167
|
+
"resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz",
|
|
168
|
+
"integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==",
|
|
179
169
|
"license": "MIT",
|
|
180
170
|
"engines": {
|
|
181
171
|
"node": ">=18.17"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-gondolin",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"clean": "echo 'nothing to clean'",
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@earendil-works/gondolin": "0.
|
|
17
|
+
"@earendil-works/gondolin": "0.14.0"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -252,6 +252,8 @@ export default function presetExtension(pi: ExtensionAPI) {
|
|
|
252
252
|
container.addChild(new DynamicBorder((str) => theme.fg("accent", str)));
|
|
253
253
|
|
|
254
254
|
return {
|
|
255
|
+
// Let PageUp/PageDown page the list instead of scrolling the fullscreen transcript.
|
|
256
|
+
capturesViewportInput: selectList.capturesViewportInput,
|
|
255
257
|
render(width: number) {
|
|
256
258
|
return container.render(width);
|
|
257
259
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reload Runtime Extension
|
|
3
3
|
*
|
|
4
4
|
* Demonstrates ctx.reload() from ExtensionCommandContext and an LLM-callable
|
|
5
|
-
* tool that
|
|
5
|
+
* tool that requests a reload once the agent has settled.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
@@ -19,19 +19,31 @@ export default function (pi: ExtensionAPI) {
|
|
|
19
19
|
},
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
// LLM-callable tool. Tools
|
|
23
|
-
//
|
|
22
|
+
// LLM-callable tool. Tools do not receive ExtensionCommandContext, so they cannot call
|
|
23
|
+
// ctx.reload(), and Pi cannot reload while the agent is running. The tool records the
|
|
24
|
+
// request and ends the run; the agent_settled handler then runs the command above.
|
|
25
|
+
let reloadRequested = false;
|
|
26
|
+
|
|
24
27
|
pi.registerTool({
|
|
25
28
|
name: "reload_runtime",
|
|
26
29
|
label: "Reload Runtime",
|
|
27
30
|
description: "Reload extensions, skills, prompts, themes, and context files",
|
|
28
31
|
parameters: Type.Object({}),
|
|
29
32
|
async execute() {
|
|
30
|
-
|
|
33
|
+
reloadRequested = true;
|
|
31
34
|
return {
|
|
32
|
-
content: [{ type: "text", text: "
|
|
35
|
+
content: [{ type: "text", text: "Reload requested. Pi reloads after this response." }],
|
|
33
36
|
details: {},
|
|
37
|
+
terminate: true,
|
|
34
38
|
};
|
|
35
39
|
},
|
|
36
40
|
});
|
|
41
|
+
|
|
42
|
+
pi.on("agent_settled", () => {
|
|
43
|
+
if (!reloadRequested) return;
|
|
44
|
+
reloadRequested = false;
|
|
45
|
+
// Sent from agent_settled, the command runs after every settled handler finishes, while
|
|
46
|
+
// the agent is idle. expandPromptTemplates dispatches it as a command, not as model input.
|
|
47
|
+
pi.sendUserMessage("/reload-runtime", { expandPromptTemplates: true });
|
|
48
|
+
});
|
|
37
49
|
}
|
|
@@ -276,6 +276,13 @@ export default function (pi: ExtensionAPI) {
|
|
|
276
276
|
|
|
277
277
|
case "clear":
|
|
278
278
|
return new Text(theme.fg("success", "✓ ") + theme.fg("muted", "Cleared all todos"), 0, 0);
|
|
279
|
+
|
|
280
|
+
default:
|
|
281
|
+
return new Text(
|
|
282
|
+
result.content[0]?.type === "text" ? theme.fg("error", result.content[0].text) : "",
|
|
283
|
+
0,
|
|
284
|
+
0,
|
|
285
|
+
);
|
|
279
286
|
}
|
|
280
287
|
},
|
|
281
288
|
});
|
|
@@ -117,6 +117,8 @@ export default function toolsExtension(pi: ExtensionAPI) {
|
|
|
117
117
|
container.addChild(settingsList);
|
|
118
118
|
|
|
119
119
|
const component = {
|
|
120
|
+
// Let PageUp/PageDown page the list instead of scrolling the fullscreen transcript.
|
|
121
|
+
capturesViewportInput: settingsList.capturesViewportInput,
|
|
120
122
|
render(width: number) {
|
|
121
123
|
return container.render(width);
|
|
122
124
|
},
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.5.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|