@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
|
@@ -25,7 +25,7 @@ import ignore from "ignore";
|
|
|
25
25
|
import { minimatch } from "minimatch";
|
|
26
26
|
import { gt, maxSatisfying, rcompare, satisfies, valid, validRange } from "semver";
|
|
27
27
|
import { CONFIG_DIR_NAME } from "../config.js";
|
|
28
|
-
import { spawnProcess, spawnProcessSync } from "../utils/child-process.js";
|
|
28
|
+
import { spawnProcess, spawnProcessSync, waitForChildProcess } from "../utils/child-process.js";
|
|
29
29
|
import { parseGitUrl } from "../utils/git.js";
|
|
30
30
|
import { canonicalizePath, getPathComparisonKey, isLocalPath, markPathIgnoredByCloudSync, normalizePath, pathsEqual, resolvePath, } from "../utils/paths.js";
|
|
31
31
|
import { stripBom } from "../utils/text.js";
|
|
@@ -33,9 +33,24 @@ import { isStdoutTakenOver } from "./output-guard.js";
|
|
|
33
33
|
import { readPiManifest } from "./pi-manifest.js";
|
|
34
34
|
import { BUILTIN_PATH_PREFIX, getResourcePathKey } from "./source-info.js";
|
|
35
35
|
const NETWORK_TIMEOUT_MS = 10000;
|
|
36
|
+
/** End of a captured command's output kept for its error message. */
|
|
37
|
+
const CAPTURED_OUTPUT_TAIL_CHARS = 8000;
|
|
38
|
+
/** Output of git, or of ssh run by git, that failed because it could not ask for credentials. */
|
|
39
|
+
const GIT_PROMPT_FAILURE = /terminal prompts disabled|could not read (Username|Password)|Permission denied \(publickey|Host key verification failed|passphrase/i;
|
|
40
|
+
const GIT_CREDENTIALS_HINT = "git cannot ask for a password or passphrase while pi runs. Set up a git credential helper or an ssh agent, or install the package once from the shell with `pi install <source>`.";
|
|
41
|
+
/** Make git and ssh fail instead of prompting on the terminal, which a captured command cannot answer. */
|
|
42
|
+
function getNonInteractiveGitEnv(env) {
|
|
43
|
+
return {
|
|
44
|
+
...env,
|
|
45
|
+
GIT_TERMINAL_PROMPT: "0",
|
|
46
|
+
// A user-defined GIT_SSH_COMMAND is kept: it may be needed to reach the host at all.
|
|
47
|
+
GIT_SSH_COMMAND: env.GIT_SSH_COMMAND ?? "ssh -o BatchMode=yes",
|
|
48
|
+
};
|
|
49
|
+
}
|
|
36
50
|
const UPDATE_CHECK_CONCURRENCY = 4;
|
|
37
51
|
const GIT_UPDATE_CONCURRENCY = 4;
|
|
38
|
-
|
|
52
|
+
/** Whether PI_OFFLINE is set; package installs and updates then skip all network access. */
|
|
53
|
+
export function isOfflineModeEnabled() {
|
|
39
54
|
const value = process.env.PI_OFFLINE;
|
|
40
55
|
if (!value)
|
|
41
56
|
return false;
|
|
@@ -639,11 +654,13 @@ export class DefaultPackageManager {
|
|
|
639
654
|
globalNpmRoot;
|
|
640
655
|
globalNpmRootCommandKey;
|
|
641
656
|
progressCallback;
|
|
657
|
+
commandOutput;
|
|
642
658
|
constructor(options) {
|
|
643
659
|
this.cwd = resolvePath(options.cwd);
|
|
644
660
|
this.agentDir = resolvePath(options.agentDir);
|
|
645
661
|
this.settingsManager = options.settingsManager;
|
|
646
662
|
this.builtinExtensions = options.builtinExtensions ?? [];
|
|
663
|
+
this.commandOutput = options.commandOutput ?? "inherit";
|
|
647
664
|
}
|
|
648
665
|
setProgressCallback(callback) {
|
|
649
666
|
this.progressCallback = callback;
|
|
@@ -914,10 +931,8 @@ export class DefaultPackageManager {
|
|
|
914
931
|
const npmCheckResults = await this.runWithConcurrency(npmCheckTasks, UPDATE_CHECK_CONCURRENCY);
|
|
915
932
|
const userNpmUpdates = [];
|
|
916
933
|
const projectNpmUpdates = [];
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
continue;
|
|
920
|
-
}
|
|
934
|
+
const npmUpdates = npmCheckResults.filter((result) => result.shouldUpdate);
|
|
935
|
+
for (const result of npmUpdates) {
|
|
921
936
|
if (result.entry.scope === "user") {
|
|
922
937
|
userNpmUpdates.push(result.entry);
|
|
923
938
|
}
|
|
@@ -932,13 +947,59 @@ export class DefaultPackageManager {
|
|
|
932
947
|
if (projectNpmUpdates.length > 0) {
|
|
933
948
|
tasks.push(this.updateNpmBatch(projectNpmUpdates, "project"));
|
|
934
949
|
}
|
|
950
|
+
const gitUpdates = [];
|
|
935
951
|
if (gitCandidates.length > 0) {
|
|
936
952
|
const gitTasks = gitCandidates.map((entry) => async () => this.withProgress("update", entry.source, `Updating ${entry.source}...`, async () => {
|
|
953
|
+
const targetDir = this.getGitInstallPath(entry.parsed, entry.scope);
|
|
954
|
+
const from = await this.getGitHead(targetDir);
|
|
937
955
|
await this.updateGit(entry.parsed, entry.scope);
|
|
956
|
+
const to = await this.getGitHead(targetDir);
|
|
957
|
+
if (from !== to) {
|
|
958
|
+
gitUpdates.push({ source: entry.source, type: "git", scope: entry.scope, from, to });
|
|
959
|
+
}
|
|
938
960
|
}));
|
|
939
961
|
tasks.push(this.runWithConcurrency(gitTasks, GIT_UPDATE_CONCURRENCY).then(() => { }));
|
|
940
962
|
}
|
|
941
963
|
await Promise.all(tasks);
|
|
964
|
+
const updated = [];
|
|
965
|
+
for (const { entry } of npmUpdates) {
|
|
966
|
+
const installedPath = this.getManagedNpmInstallPath(entry.parsed, entry.scope);
|
|
967
|
+
const to = existsSync(installedPath) ? this.getInstalledNpmVersion(installedPath) : undefined;
|
|
968
|
+
if (to !== entry.installedVersion) {
|
|
969
|
+
updated.push({ source: entry.source, type: "npm", scope: entry.scope, from: entry.installedVersion, to });
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
// Keep git results in configured order, independent of completion order.
|
|
973
|
+
for (const entry of gitCandidates) {
|
|
974
|
+
const update = gitUpdates.find((u) => u.source === entry.source && u.scope === entry.scope);
|
|
975
|
+
if (update)
|
|
976
|
+
updated.push(update);
|
|
977
|
+
}
|
|
978
|
+
// Report each changed package, e.g. "npm:foo 1.2.0 -> 1.3.0".
|
|
979
|
+
for (const pkg of updated) {
|
|
980
|
+
const format = (value) => value === undefined ? "(none)" : pkg.type === "git" ? value.slice(0, 7) : value;
|
|
981
|
+
const scope = pkg.scope === "project" ? " (project)" : "";
|
|
982
|
+
this.emitProgress({
|
|
983
|
+
type: "result",
|
|
984
|
+
action: "update",
|
|
985
|
+
source: pkg.source,
|
|
986
|
+
message: `${pkg.source}${scope} ${format(pkg.from)} -> ${format(pkg.to)}`,
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
async getGitHead(targetDir) {
|
|
991
|
+
if (!existsSync(targetDir))
|
|
992
|
+
return undefined;
|
|
993
|
+
try {
|
|
994
|
+
const head = await this.runCommandCapture("git", ["rev-parse", "HEAD"], {
|
|
995
|
+
cwd: targetDir,
|
|
996
|
+
timeoutMs: NETWORK_TIMEOUT_MS,
|
|
997
|
+
});
|
|
998
|
+
return head.trim() || undefined;
|
|
999
|
+
}
|
|
1000
|
+
catch {
|
|
1001
|
+
return undefined;
|
|
1002
|
+
}
|
|
942
1003
|
}
|
|
943
1004
|
async shouldUpdateNpmSource(source, scope) {
|
|
944
1005
|
const installedPath = this.getManagedNpmInstallPath(source, scope);
|
|
@@ -1078,7 +1139,7 @@ export class DefaultPackageManager {
|
|
|
1078
1139
|
// A source that cannot be installed (no network, missing package, failing git prepare step)
|
|
1079
1140
|
// must not abort startup. Skip its resources, like offline mode does, and report the failure.
|
|
1080
1141
|
try {
|
|
1081
|
-
await this.installParsedSource(parsed, resolvedScope);
|
|
1142
|
+
await this.withProgress("install", resolvedSource, `Installing ${resolvedSource}...`, () => this.installParsedSource(parsed, resolvedScope));
|
|
1082
1143
|
return true;
|
|
1083
1144
|
}
|
|
1084
1145
|
catch (error) {
|
|
@@ -2309,6 +2370,9 @@ export class DefaultPackageManager {
|
|
|
2309
2370
|
});
|
|
2310
2371
|
}
|
|
2311
2372
|
runCommand(command, args, options) {
|
|
2373
|
+
if (this.commandOutput === "capture") {
|
|
2374
|
+
return this.runCommandCaptured(command, args, options);
|
|
2375
|
+
}
|
|
2312
2376
|
return new Promise((resolvePromise, reject) => {
|
|
2313
2377
|
const child = this.spawnCommand(command, args, options);
|
|
2314
2378
|
child.on("error", reject);
|
|
@@ -2322,6 +2386,30 @@ export class DefaultPackageManager {
|
|
|
2322
2386
|
});
|
|
2323
2387
|
});
|
|
2324
2388
|
}
|
|
2389
|
+
/**
|
|
2390
|
+
* Run a command without touching the terminal: output is piped and git and ssh cannot prompt.
|
|
2391
|
+
* Only the end of the output is kept, for the error message.
|
|
2392
|
+
*/
|
|
2393
|
+
async runCommandCaptured(command, args, options) {
|
|
2394
|
+
const child = spawnProcess(command, args, {
|
|
2395
|
+
cwd: options?.cwd,
|
|
2396
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
2397
|
+
env: getNonInteractiveGitEnv(getEnv()),
|
|
2398
|
+
});
|
|
2399
|
+
let output = "";
|
|
2400
|
+
const append = (chunk) => {
|
|
2401
|
+
output = (output + chunk.toString()).slice(-CAPTURED_OUTPUT_TAIL_CHARS);
|
|
2402
|
+
};
|
|
2403
|
+
child.stdout.on("data", append);
|
|
2404
|
+
child.stderr.on("data", append);
|
|
2405
|
+
// Waits for the pipes too, but not for a background process an npm script left holding them.
|
|
2406
|
+
const code = await waitForChildProcess(child);
|
|
2407
|
+
if (code === 0)
|
|
2408
|
+
return;
|
|
2409
|
+
const tail = output.trim();
|
|
2410
|
+
const hint = command === "git" && GIT_PROMPT_FAILURE.test(tail) ? `\n${GIT_CREDENTIALS_HINT}` : "";
|
|
2411
|
+
throw new Error(`${command} ${args.join(" ")} failed with code ${code}${tail ? `:\n${tail}` : ""}${hint}`);
|
|
2412
|
+
}
|
|
2325
2413
|
runCommandSync(command, args) {
|
|
2326
2414
|
const env = getEnv();
|
|
2327
2415
|
const result = spawnProcessSync(command, args, {
|