@averyyy/pi-coding-agent 1.4.0-piclient.9 → 1.5.0-piclient.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +122 -4
- package/dist/bundle/chunks/anthropic-messages-WU4RRDFO.js +6 -0
- package/dist/bundle/chunks/azure-openai-responses-M725JFGO.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +7 -4
- package/dist/bundle/chunks/chunk-3UW3IQIY.js +16 -0
- package/dist/bundle/chunks/chunk-4RKLODCT.js +2 -0
- package/dist/bundle/chunks/{chunk-3LTMO2WY.js → chunk-75IISYAM.js} +2 -2
- package/dist/bundle/chunks/{chunk-CF5GWZHW.js → chunk-A3Y7H47A.js} +1 -1
- package/dist/bundle/chunks/chunk-FFMDRXC4.js +10 -0
- package/dist/bundle/chunks/{chunk-D3OXAPLU.js → chunk-G23G7KNC.js} +2 -9
- package/dist/bundle/chunks/chunk-GJFZM2RZ.js +129 -0
- package/dist/bundle/chunks/chunk-GO33PKBT.js +9 -0
- package/dist/bundle/chunks/chunk-J55RSOMM.js +1592 -0
- package/dist/bundle/chunks/{chunk-H2AI7MFJ.js → chunk-JM6XUN2B.js} +2 -2
- package/dist/bundle/chunks/{chunk-BRYV63PL.js → chunk-LTLKVIE2.js} +8 -7
- package/dist/bundle/chunks/{chunk-MKWEYCNF.js → chunk-N4CTF6DK.js} +2 -2
- package/dist/bundle/chunks/chunk-O5CTLHDX.js +82 -0
- package/dist/bundle/chunks/{chunk-3NEJV7UG.js → chunk-OB5DESD7.js} +1 -1
- package/dist/bundle/chunks/chunk-OV4EHN3Q.js +2 -0
- package/dist/bundle/chunks/{chunk-3EGEEHMN.js → chunk-OW4KH7CI.js} +1 -1
- package/dist/bundle/chunks/{chunk-HZG4C6GI.js → chunk-OXKIVFVM.js} +1 -1
- package/dist/bundle/chunks/chunk-P7FPUEYA.js +2 -0
- package/dist/bundle/chunks/chunk-PWQUNMKT.js +4 -0
- package/dist/bundle/chunks/{chunk-VHUVVKJM.js → chunk-WATJAG5U.js} +1 -1
- package/dist/bundle/chunks/{chunk-VYYRESZJ.js → chunk-YH5RGRHQ.js} +3 -3
- package/dist/bundle/chunks/{cli-QUNA6INU.js → cli-2Q4CKMZK.js} +11 -9
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-QIIM6OB4.js → cloudflare-workers-ai-system-one-JEJELFEJ.js} +1 -1
- package/dist/bundle/chunks/devin.js +1 -1
- package/dist/bundle/chunks/{easter-egg-3d-4L2AVJKX.js → easter-egg-3d-UEH5CVEM.js} +1 -1
- package/dist/bundle/chunks/{execute-UNST3ORJ.js → execute-BOGNP5CQ.js} +1 -1
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/google-antigravity-runtime.js +3 -3
- package/dist/bundle/chunks/google-antigravity.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-PNRT4EAN.js → google-generative-ai-UTHMOBSC.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-ZLSXUSEM.js → google-vertex-MKY2BEE7.js} +1 -1
- package/dist/bundle/chunks/image-resize-worker.js +1 -1
- package/dist/bundle/chunks/kimi-coding.js +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-U4EH6TAM.js → llama-cpp-classify-CYHVVBOQ.js} +1 -1
- package/dist/bundle/chunks/meta.js +1 -1
- package/dist/bundle/chunks/mistral-conversations-U2CRJEWX.js +5 -0
- package/dist/bundle/chunks/{openai-codex-responses-UIB63WGM.js → openai-codex-responses-DK2NKO47.js} +1 -1
- package/dist/bundle/chunks/openai-completions-VPNLDI5K.js +7 -0
- package/dist/bundle/chunks/{openai-decisions-Q46R33J3.js → openai-decisions-UZ6HF7LF.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-FGTD6NDJ.js → openai-responses-S5QT5K5D.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-WBAVKHHY.js → openrouter-images-P5CYCO4P.js} +1 -1
- package/dist/bundle/chunks/pi-messages-XPX326L5.js +8 -0
- package/dist/bundle/chunks/radius.js +1 -1
- package/dist/bundle/chunks/{runtime-SITSZTHV.js → runtime-2Z3FBQRD.js} +1 -1
- package/dist/bundle/chunks/{typesafe-system-one-DFEHTLK5.js → typesafe-system-one-NKVLMGFF.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-FXCA64MK.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/cli/auth-check.d.ts.map +1 -1
- package/dist/cli/auth-check.js +12 -1
- package/dist/cli/auth-check.js.map +1 -1
- package/dist/cli/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js +6 -0
- package/dist/cli/credential-print.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 +6 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +35 -7
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/bug-report.d.ts +4 -4
- 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 +14 -5
- package/dist/core/compaction/branch-summarization.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 +79 -15
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/template.css +9 -0
- package/dist/core/export-html/template.js +165 -45
- 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/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 +7 -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 +8 -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 +1678 -2029
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +2 -3
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +5 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +17 -11
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +11 -14
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +167 -198
- 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 +160 -46
- 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/pi-server-accounts.d.ts +22 -0
- package/dist/core/pi-server-accounts.d.ts.map +1 -0
- package/dist/core/pi-server-accounts.js +137 -0
- package/dist/core/pi-server-accounts.js.map +1 -0
- package/dist/core/pi-server-client.d.ts +15 -7
- package/dist/core/pi-server-client.d.ts.map +1 -1
- package/dist/core/pi-server-client.js +85 -4
- package/dist/core/pi-server-client.js.map +1 -1
- package/dist/core/pi-server-observer.d.ts +4 -0
- package/dist/core/pi-server-observer.d.ts.map +1 -1
- package/dist/core/pi-server-observer.js +24 -0
- package/dist/core/pi-server-observer.js.map +1 -1
- package/dist/core/pi-server-request.d.ts +1 -1
- package/dist/core/pi-server-request.d.ts.map +1 -1
- package/dist/core/pi-server-request.js +2 -2
- package/dist/core/pi-server-request.js.map +1 -1
- package/dist/core/pi-server-subagents.d.ts +26 -0
- package/dist/core/pi-server-subagents.d.ts.map +1 -0
- package/dist/core/pi-server-subagents.js +112 -0
- package/dist/core/pi-server-subagents.js.map +1 -0
- package/dist/core/project-trust.js +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/provider-composer.d.ts +1 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +1 -0
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +3 -2
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +32 -16
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts +6 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +42 -24
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +61 -18
- 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 +1 -1
- 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.js +2 -2
- 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/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/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 +30 -7
- 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 +10 -4
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +5 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +179 -58
- 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 +55 -4
- 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 +4 -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/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +14 -0
- 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 +30 -35
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/cli.md +21 -11
- package/docs/custom-provider.md +2 -0
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +3173 -225
- 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/packages.md +24 -0
- package/docs/quickstart.md +7 -3
- package/docs/sessions.md +11 -3
- package/docs/settings.md +5 -4
- package/docs/slash-commands.md +3 -2
- package/docs/terminal-setup.md +3 -1
- package/docs/tmux.md +6 -0
- package/docs/tui.md +2 -0
- package/docs/windows.md +27 -0
- 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 +13 -14
- package/schemas/models.schema.json +36 -36
- package/schemas/settings.schema.json +17 -0
- package/dist/bundle/chunks/anthropic-messages-3TZAX2CL.js +0 -6
- package/dist/bundle/chunks/azure-openai-responses-5OV6AS44.js +0 -2
- package/dist/bundle/chunks/chunk-3V45WARH.js +0 -7
- package/dist/bundle/chunks/chunk-GA3MDGH3.js +0 -82
- package/dist/bundle/chunks/chunk-H2UJDH5M.js +0 -131
- package/dist/bundle/chunks/chunk-H76KZMOI.js +0 -2
- package/dist/bundle/chunks/chunk-K47GPRYD.js +0 -1577
- package/dist/bundle/chunks/chunk-PG7P2LUM.js +0 -4
- package/dist/bundle/chunks/chunk-TEPMHNKQ.js +0 -2
- package/dist/bundle/chunks/chunk-TLSZ4DWU.js +0 -16
- package/dist/bundle/chunks/chunk-WVXVPMMO.js +0 -2
- package/dist/bundle/chunks/mistral-conversations-OJFHLO4F.js +0 -5
- package/dist/bundle/chunks/openai-completions-T5JB7LUM.js +0 -7
- package/dist/bundle/chunks/pi-messages-S7RKCD5K.js +0 -8
- package/dist/bundle/chunks/virtual-modules-2WW4BVZM.js +0 -2
- 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
|
@@ -2,18 +2,18 @@ import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
|
2
2
|
import { basename, dirname, join, resolve, sep } from "node:path";
|
|
3
3
|
import { detectCapabilities, getTerminalColorMode } from "@earendil-works/pi-tui";
|
|
4
4
|
import chalk from "chalk";
|
|
5
|
-
import { CONFIG_DIR_NAME } from "../config.js";
|
|
5
|
+
import { APP_NAME, CONFIG_DIR_NAME } from "../config.js";
|
|
6
6
|
import { loadThemeFromPath } from "../modes/interactive/theme/theme.js";
|
|
7
|
-
import { canonicalizePath, isLocalPath, resolvePath } from "../utils/paths.js";
|
|
7
|
+
import { canonicalizePath, isLocalPath, isPathWithin, pathsEqual, resolvePath } from "../utils/paths.js";
|
|
8
8
|
import { stripBom } from "../utils/text.js";
|
|
9
9
|
import { createEventBus } from "./event-bus.js";
|
|
10
10
|
import { clearExtensionCache, createExtensionRuntime, loadExtensionFromFactory, loadExtensionsCached, } from "./extensions/loader.js";
|
|
11
11
|
import { findGitPaths } from "./footer-data-provider.js";
|
|
12
|
-
import { DefaultPackageManager } from "./package-manager.js";
|
|
12
|
+
import { DefaultPackageManager, } from "./package-manager.js";
|
|
13
13
|
import { loadPromptTemplates } from "./prompt-templates.js";
|
|
14
14
|
import { SettingsManager } from "./settings-manager.js";
|
|
15
15
|
import { loadSkills } from "./skills.js";
|
|
16
|
-
import { BUILTIN_PATH_PREFIX, createSourceInfo, getSyntheticPathSource, isSyntheticPath, } from "./source-info.js";
|
|
16
|
+
import { BUILTIN_PATH_PREFIX, createSourceInfo, getResourcePathKey, getSyntheticPathSource, isSyntheticPath, } from "./source-info.js";
|
|
17
17
|
import { resetTimings } from "./timings.js";
|
|
18
18
|
const HOST_PROVIDED_EXTENSION_PACKAGES = new Set([
|
|
19
19
|
"@earendil-works/pi-agent-core",
|
|
@@ -54,6 +54,20 @@ function collectExtensionPackageWarnings(extensionPaths, metadataByPath) {
|
|
|
54
54
|
}
|
|
55
55
|
return warnings;
|
|
56
56
|
}
|
|
57
|
+
/** Describe a package that was skipped because it could not be installed, including how to drop it. */
|
|
58
|
+
function describePackageInstallFailure(failure) {
|
|
59
|
+
const hint = failure.scope === "temporary"
|
|
60
|
+
? "Check the source and try again."
|
|
61
|
+
: `Run "${APP_NAME} remove ${failure.source}${failure.scope === "project" ? " --local" : ""}" to remove it from settings.json.`;
|
|
62
|
+
return `failed to install (${failure.message}). ${hint}`;
|
|
63
|
+
}
|
|
64
|
+
/** One-line startup warning for a package that could not be installed. */
|
|
65
|
+
export function formatPackageInstallWarning(failure) {
|
|
66
|
+
return `Extension package "${failure.source}": ${describePackageInstallFailure(failure)}`;
|
|
67
|
+
}
|
|
68
|
+
function collectPackageInstallWarnings(...failures) {
|
|
69
|
+
return failures.flatMap((entries) => (entries ?? []).map((failure) => ({ path: failure.source, warning: describePackageInstallFailure(failure) })));
|
|
70
|
+
}
|
|
57
71
|
function mergeExtensionWarnings(result, warnings) {
|
|
58
72
|
result.warnings = [
|
|
59
73
|
...new Map([...(result.warnings ?? []), ...warnings].map((warning) => [`${warning.path}\0${warning.warning}`, warning])).values(),
|
|
@@ -145,13 +159,13 @@ function findShadowedContextFile(cwd) {
|
|
|
145
159
|
const mainRepoRoot = dirname(commonGitDir);
|
|
146
160
|
// False for an ordinary repo, where the two are the same dir, and for a sibling
|
|
147
161
|
// worktree (`git worktree add ../feat`), whose main repo is not an ancestor.
|
|
148
|
-
if (!worktreeRoot
|
|
162
|
+
if (!isPathWithin(mainRepoRoot, worktreeRoot) || pathsEqual(worktreeRoot, mainRepoRoot))
|
|
149
163
|
return undefined;
|
|
150
164
|
// dirname of the common git dir is the main worktree root only when that dir is
|
|
151
165
|
// itself checked out from the same repo. In a bare layout (`proj/.bare` +
|
|
152
166
|
// `proj/main`) it is just the directory holding `.bare`, which tracks nothing; a
|
|
153
167
|
// submodule's gitdir has no `commondir`, so it lands under `.git/modules`.
|
|
154
|
-
if (canonicalizePath(join(mainRepoRoot, ".git"))
|
|
168
|
+
if (!pathsEqual(canonicalizePath(join(mainRepoRoot, ".git")), commonGitDir))
|
|
155
169
|
return undefined;
|
|
156
170
|
const worktreeContextFile = loadContextFileFromDir(worktreeRoot);
|
|
157
171
|
return worktreeContextFile ? join(mainRepoRoot, basename(worktreeContextFile.path)) : undefined;
|
|
@@ -175,7 +189,7 @@ export function loadProjectContextFiles(options) {
|
|
|
175
189
|
// symlinks to the main repo's file resolves to the shadowed path itself.
|
|
176
190
|
const isShadowed = shadowedContextFile !== undefined &&
|
|
177
191
|
contextFile !== null &&
|
|
178
|
-
join(canonicalizePath(currentDir), basename(contextFile.path))
|
|
192
|
+
pathsEqual(join(canonicalizePath(currentDir), basename(contextFile.path)), shadowedContextFile);
|
|
179
193
|
if (contextFile && !isShadowed && !seenPaths.has(contextFile.path)) {
|
|
180
194
|
ancestorContextFiles.unshift(contextFile);
|
|
181
195
|
seenPaths.add(contextFile.path);
|
|
@@ -287,6 +301,9 @@ export class DefaultResourceLoader {
|
|
|
287
301
|
this.lastThemePaths = [];
|
|
288
302
|
this.loaded = false;
|
|
289
303
|
}
|
|
304
|
+
getEventBus() {
|
|
305
|
+
return this.eventBus;
|
|
306
|
+
}
|
|
290
307
|
getExtensions() {
|
|
291
308
|
return this.extensionsResult;
|
|
292
309
|
}
|
|
@@ -364,6 +381,7 @@ export class DefaultResourceLoader {
|
|
|
364
381
|
const cliExtensionPaths = await this.packageManager.resolveExtensionSources(this.additionalExtensionPaths, {
|
|
365
382
|
temporary: true,
|
|
366
383
|
});
|
|
384
|
+
const installWarnings = collectPackageInstallWarnings(resolvedPaths.installFailures, cliExtensionPaths.installFailures);
|
|
367
385
|
// Kept on the instance so post-reload passes (extendResources) can still resolve package metadata.
|
|
368
386
|
this.resourceMetadataByPath = new Map();
|
|
369
387
|
const metadataByPath = this.resourceMetadataByPath;
|
|
@@ -404,7 +422,7 @@ export class DefaultResourceLoader {
|
|
|
404
422
|
!this.disabledBuiltinExtensions.has(path.slice(BUILTIN_PATH_PREFIX.length)));
|
|
405
423
|
const packageWarnings = collectExtensionPackageWarnings(extensionPaths, metadataByPath);
|
|
406
424
|
const extensionsResult = await this.loadFinalExtensionSet(extensionPaths, preTrustExtensions);
|
|
407
|
-
mergeExtensionWarnings(extensionsResult, packageWarnings);
|
|
425
|
+
mergeExtensionWarnings(extensionsResult, [...installWarnings, ...packageWarnings]);
|
|
408
426
|
for (const p of this.additionalExtensionPaths) {
|
|
409
427
|
if (isLocalPath(p)) {
|
|
410
428
|
const resolved = this.resolveResourcePath(p);
|
|
@@ -500,8 +518,9 @@ export class DefaultResourceLoader {
|
|
|
500
518
|
resource.metadata,
|
|
501
519
|
]));
|
|
502
520
|
const packageWarnings = collectExtensionPackageWarnings(extensionPaths, metadataByPath);
|
|
521
|
+
const installWarnings = collectPackageInstallWarnings(resolvedPaths.installFailures, cliExtensionPaths.installFailures);
|
|
503
522
|
const extensionsResult = await loadExtensionsCached(extensionPaths, this.cwd, this.eventBus);
|
|
504
|
-
mergeExtensionWarnings(extensionsResult, packageWarnings);
|
|
523
|
+
mergeExtensionWarnings(extensionsResult, [...installWarnings, ...packageWarnings]);
|
|
505
524
|
if (!options.includeInlineFactories) {
|
|
506
525
|
return extensionsResult;
|
|
507
526
|
}
|
|
@@ -516,6 +535,9 @@ export class DefaultResourceLoader {
|
|
|
516
535
|
resolveExtensionLoadPath(path) {
|
|
517
536
|
return isSyntheticPath(path) ? path : resolvePath(path, this.cwd, { normalizeUnicodeSpaces: true });
|
|
518
537
|
}
|
|
538
|
+
getExtensionPathKey(path) {
|
|
539
|
+
return getResourcePathKey(this.resolveExtensionLoadPath(path));
|
|
540
|
+
}
|
|
519
541
|
/** Load extension paths: files from disk and `builtin:<name>` paths from the built-in extensions. */
|
|
520
542
|
async loadExtensionPaths(paths, runtime) {
|
|
521
543
|
const isBuiltinPath = (path) => path.startsWith(BUILTIN_PATH_PREFIX);
|
|
@@ -543,22 +565,22 @@ export class DefaultResourceLoader {
|
|
|
543
565
|
const preloaded = preTrustExtensions?.extensions ?? [];
|
|
544
566
|
const preloadedByPath = new Map(preloaded
|
|
545
567
|
.filter((extension) => !extension.path.startsWith("<inline:"))
|
|
546
|
-
.map((extension) => [extension.resolvedPath, extension]));
|
|
547
|
-
const failedPreloadPaths = new Set((preTrustExtensions?.errors ?? []).map((error) => this.
|
|
568
|
+
.map((extension) => [getResourcePathKey(extension.resolvedPath), extension]));
|
|
569
|
+
const failedPreloadPaths = new Set((preTrustExtensions?.errors ?? []).map((error) => this.getExtensionPathKey(error.path)));
|
|
548
570
|
const remainingPaths = extensionPaths.filter((path) => {
|
|
549
|
-
const
|
|
550
|
-
return !preloadedByPath.has(
|
|
571
|
+
const pathKey = this.getExtensionPathKey(path);
|
|
572
|
+
return !preloadedByPath.has(pathKey) && !failedPreloadPaths.has(pathKey);
|
|
551
573
|
});
|
|
552
574
|
const remainingExtensions = await this.loadExtensionPaths(remainingPaths, preTrustExtensions?.runtime);
|
|
553
575
|
const loadedByPath = new Map(preloadedByPath);
|
|
554
576
|
for (const extension of remainingExtensions.extensions) {
|
|
555
|
-
loadedByPath.set(extension.resolvedPath, extension);
|
|
577
|
+
loadedByPath.set(getResourcePathKey(extension.resolvedPath), extension);
|
|
556
578
|
}
|
|
557
579
|
const inlineExtensions = preTrustExtensions
|
|
558
580
|
? { extensions: preloaded.filter((extension) => extension.path.startsWith("<inline:")), errors: [] }
|
|
559
581
|
: await this.loadExtensionFactories(remainingExtensions.runtime);
|
|
560
582
|
const orderedExtensions = extensionPaths
|
|
561
|
-
.map((path) => loadedByPath.get(this.
|
|
583
|
+
.map((path) => loadedByPath.get(this.getExtensionPathKey(path)))
|
|
562
584
|
.filter((extension) => extension !== undefined);
|
|
563
585
|
orderedExtensions.push(...inlineExtensions.extensions);
|
|
564
586
|
const replacementWarnings = [];
|
|
@@ -712,9 +734,7 @@ export class DefaultResourceLoader {
|
|
|
712
734
|
const normalizedResourcePath = resolve(resourcePath);
|
|
713
735
|
if (extraSourceInfos) {
|
|
714
736
|
for (const [sourcePath, sourceInfo] of extraSourceInfos.entries()) {
|
|
715
|
-
|
|
716
|
-
if (normalizedResourcePath === normalizedSourcePath ||
|
|
717
|
-
normalizedResourcePath.startsWith(`${normalizedSourcePath}${sep}`)) {
|
|
737
|
+
if (isPathWithin(sourcePath, normalizedResourcePath)) {
|
|
718
738
|
return { ...sourceInfo, path: resourcePath };
|
|
719
739
|
}
|
|
720
740
|
}
|
|
@@ -725,9 +745,7 @@ export class DefaultResourceLoader {
|
|
|
725
745
|
return createSourceInfo(resourcePath, exact);
|
|
726
746
|
}
|
|
727
747
|
for (const [sourcePath, metadata] of metadataByPath.entries()) {
|
|
728
|
-
|
|
729
|
-
if (normalizedResourcePath === normalizedSourcePath ||
|
|
730
|
-
normalizedResourcePath.startsWith(`${normalizedSourcePath}${sep}`)) {
|
|
748
|
+
if (isPathWithin(sourcePath, normalizedResourcePath)) {
|
|
731
749
|
return createSourceInfo(resourcePath, metadata);
|
|
732
750
|
}
|
|
733
751
|
}
|
|
@@ -780,10 +798,10 @@ export class DefaultResourceLoader {
|
|
|
780
798
|
const seen = new Set();
|
|
781
799
|
for (const p of [...primary, ...additional]) {
|
|
782
800
|
const resolved = this.resolveResourcePath(p);
|
|
783
|
-
const
|
|
784
|
-
if (seen.has(
|
|
801
|
+
const pathKey = getResourcePathKey(resolved);
|
|
802
|
+
if (seen.has(pathKey))
|
|
785
803
|
continue;
|
|
786
|
-
seen.add(
|
|
804
|
+
seen.add(pathKey);
|
|
787
805
|
merged.push(resolved);
|
|
788
806
|
}
|
|
789
807
|
return merged;
|