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
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import { readFileSync } from "node:fs";
|
|
16
16
|
import { basename, dirname } from "node:path";
|
|
17
17
|
import { runToolCall, } from "@earendil-works/pi-agent-core";
|
|
18
|
-
import { contentText, getCurrentSystemMessage, retryDelayMs } from "@earendil-works/pi-ai";
|
|
18
|
+
import { contentText, getCurrentSystemMessage, getCurrentTools, retryDelayMs } from "@earendil-works/pi-ai";
|
|
19
19
|
import { clampThinkingLevel, cleanupSessionResources, getSupportedThinkingLevels, isContextOverflow, isRecoverableLength, isRetryableAssistantError, modelsAreEqual, resetApiProviders, streamSimple, } from "@earendil-works/pi-ai/compat";
|
|
20
20
|
import { getThemeByName, theme } from "../modes/interactive/theme/theme.js";
|
|
21
21
|
import { stripFrontmatter } from "../utils/frontmatter.js";
|
|
@@ -47,6 +47,16 @@ import { createAllToolDefinitions } from "./tools/index.js";
|
|
|
47
47
|
import { createToolDefinitionFromAgentTool } from "./tools/tool-definition-wrapper.js";
|
|
48
48
|
import { addUsageToTotals, combineUsage, createUsageTotals } from "./usage-totals.js";
|
|
49
49
|
import { findLatestResponse, getBranchSelection, getVirtualModelState, isVirtualModel, VIRTUAL_MODEL_STATE_ENTRY, } from "./virtual-models.js";
|
|
50
|
+
/**
|
|
51
|
+
* Stream functions that resolve auth through a given ModelRuntime themselves, such as the one
|
|
52
|
+
* createAgentSession installs. Summaries sent through them must not pass pre-resolved credentials:
|
|
53
|
+
* the runtime would take them as an explicit API key instead of the stored OAuth login (#11520).
|
|
54
|
+
*/
|
|
55
|
+
const runtimeStreamFunctions = new WeakMap();
|
|
56
|
+
/** Mark `streamFn` as resolving auth through `modelRuntime` on its own. */
|
|
57
|
+
export function markRuntimeStreamFunction(streamFn, modelRuntime) {
|
|
58
|
+
runtimeStreamFunctions.set(streamFn, modelRuntime);
|
|
59
|
+
}
|
|
50
60
|
/**
|
|
51
61
|
* Parse a skill block from message text.
|
|
52
62
|
* Returns null if the text doesn't contain a skill block.
|
|
@@ -123,7 +133,6 @@ export class AgentSession {
|
|
|
123
133
|
_entryIdsByMessage = new WeakMap();
|
|
124
134
|
_boundaryDispatchedMessages = new WeakSet();
|
|
125
135
|
_lastAssistantMessage;
|
|
126
|
-
_lastAssistantToolResults = [];
|
|
127
136
|
_lastActivityOutcome = "completed";
|
|
128
137
|
_isBeforeSettle = false;
|
|
129
138
|
_abortDuringBeforeSettle = false;
|
|
@@ -259,6 +268,9 @@ export class AgentSession {
|
|
|
259
268
|
if (this.agent.streamFunction === streamSimple) {
|
|
260
269
|
return { ...(await this._getRequiredRequestAuth(model, signal)), thinkingLevel };
|
|
261
270
|
}
|
|
271
|
+
if (runtimeStreamFunctions.get(this.agent.streamFunction) === this._modelRuntime) {
|
|
272
|
+
return { model, thinkingLevel };
|
|
273
|
+
}
|
|
262
274
|
try {
|
|
263
275
|
const result = await this._modelRuntime.getAuth(model, { signal });
|
|
264
276
|
if (!result)
|
|
@@ -795,7 +807,6 @@ export class AgentSession {
|
|
|
795
807
|
// extension and listener dispatch above also picks up messages that turn_end
|
|
796
808
|
// handlers queued.
|
|
797
809
|
if (event.type === "turn_end") {
|
|
798
|
-
this._lastAssistantToolResults = event.toolResults;
|
|
799
810
|
this._flushPendingCustomMessages();
|
|
800
811
|
}
|
|
801
812
|
};
|
|
@@ -838,7 +849,24 @@ export class AgentSession {
|
|
|
838
849
|
}
|
|
839
850
|
return undefined;
|
|
840
851
|
}
|
|
841
|
-
|
|
852
|
+
/**
|
|
853
|
+
* Persistently omit a failed attempt and its tool results from model context. Results are
|
|
854
|
+
* found in the projected context, so the pair stays together whether the attempt comes from
|
|
855
|
+
* the current run or a resumed session. An unpaired result fails the next request (#11227).
|
|
856
|
+
*/
|
|
857
|
+
_omitRecoveryAttempt(message) {
|
|
858
|
+
const toolCallIds = new Set(message.content.flatMap((block) => (block.type === "toolCall" ? [block.id] : [])));
|
|
859
|
+
// A context edit replaces the projected copy, so match it by source entry as well.
|
|
860
|
+
const entryId = this._findPersistedMessageEntryId(message);
|
|
861
|
+
const messages = this.agent.state.messages;
|
|
862
|
+
const index = messages.findIndex((m) => m === message || (entryId !== undefined && this._entryIdsByMessage.get(m) === entryId));
|
|
863
|
+
const toolResults = [];
|
|
864
|
+
for (const m of index < 0 ? [] : messages.slice(index + 1)) {
|
|
865
|
+
if (m.role === "assistant")
|
|
866
|
+
break;
|
|
867
|
+
if (m.role === "toolResult" && toolCallIds.has(m.toolCallId))
|
|
868
|
+
toolResults.push(m);
|
|
869
|
+
}
|
|
842
870
|
const targets = [message, ...toolResults];
|
|
843
871
|
const targetIds = targets.map((target) => this._findPersistedMessageEntryId(target));
|
|
844
872
|
const unresolvedProjectedTarget = targets.some((target, index) => targetIds[index] === undefined && this.agent.state.messages.includes(target));
|
|
@@ -1157,9 +1185,14 @@ export class AgentSession {
|
|
|
1157
1185
|
* the registered, non-hidden ones; they are declared to the model. Active tools with a
|
|
1158
1186
|
* `prepareLoadout` hook can change the declared descriptions and hide declarations from
|
|
1159
1187
|
* requests (see {@link _installHiddenDeclarationsProjection}).
|
|
1188
|
+
*
|
|
1189
|
+
* The active tools are a set: tools that stay active keep their current order and newly active
|
|
1190
|
+
* ones are appended, so reordering the same names does not change the prompt (#11495).
|
|
1160
1191
|
*/
|
|
1161
1192
|
_applyToolLoadout(toolNames) {
|
|
1162
|
-
const
|
|
1193
|
+
const requested = new Set(toolNames);
|
|
1194
|
+
const kept = this.getActiveToolNames().filter((name) => requested.has(name));
|
|
1195
|
+
const tools = [...new Set([...kept, ...requested])].flatMap((name) => {
|
|
1163
1196
|
const tool = this._toolRegistry.get(name);
|
|
1164
1197
|
return tool && this._getToolExposure(name) !== "hidden" && this._isActivatable(name) ? [tool] : [];
|
|
1165
1198
|
});
|
|
@@ -1374,11 +1407,27 @@ export class AgentSession {
|
|
|
1374
1407
|
*/
|
|
1375
1408
|
_restoreToolsFromTranscript(modifiers = []) {
|
|
1376
1409
|
this._pendingToolNames.clear();
|
|
1377
|
-
|
|
1378
|
-
|
|
1410
|
+
// All system messages on the branch, including those before a compaction. Compaction snapshots
|
|
1411
|
+
// are derived from these, so replaying them gives the current loadout.
|
|
1412
|
+
const systemMessages = this.sessionManager
|
|
1413
|
+
.getBranch()
|
|
1414
|
+
.flatMap((entry) => (entry.type === "message" && entry.message.role === "system" ? [entry.message] : []));
|
|
1415
|
+
// No recorded loadout: keep the current tools.
|
|
1416
|
+
if (systemMessages.length === 0)
|
|
1379
1417
|
return;
|
|
1380
|
-
|
|
1418
|
+
// Tools the branch ever added or removed. Removed tools stay inactive.
|
|
1419
|
+
const mentioned = new Set(systemMessages
|
|
1420
|
+
.flatMap((message) => [...(message.toolsAdded ?? []), ...(message.toolsRemoved ?? [])])
|
|
1421
|
+
.map((tool) => tool.name));
|
|
1422
|
+
// Extension tools the branch never mentioned were registered after it recorded its loadout, so
|
|
1423
|
+
// they are activated like newly registered tools. Built-in tools follow `defaultTools` instead.
|
|
1424
|
+
const newTools = [...this._toolRegistry.keys()].filter((name) => !mentioned.has(name) && !this._baseToolDefinitions.has(name) && this._isActivatedOnRegistration(name));
|
|
1425
|
+
// The recorded loadout plus the new tools, with `--tools +name`/`-name` applied.
|
|
1426
|
+
const names = applyToolModifiers([...getCurrentTools(systemMessages).map((tool) => tool.name), ...newTools], modifiers);
|
|
1427
|
+
// Recorded tools that are not registered yet, such as MCP tools of servers still connecting, are
|
|
1428
|
+
// activated when they register. Excluded tools never register, so they are not kept pending.
|
|
1381
1429
|
this._pendingToolNames = new Set(names.filter((name) => this._isAllowedTool(name)));
|
|
1430
|
+
// Ignores names that are not registered.
|
|
1382
1431
|
this._setActiveTools(names);
|
|
1383
1432
|
}
|
|
1384
1433
|
// =========================================================================
|
|
@@ -1500,9 +1549,7 @@ export class AgentSession {
|
|
|
1500
1549
|
}
|
|
1501
1550
|
async _handlePostAgentRun() {
|
|
1502
1551
|
const message = this._lastAssistantMessage;
|
|
1503
|
-
const toolResults = this._lastAssistantToolResults;
|
|
1504
1552
|
this._lastAssistantMessage = undefined;
|
|
1505
|
-
this._lastAssistantToolResults = [];
|
|
1506
1553
|
if (this._agentRunAbortRequested) {
|
|
1507
1554
|
this._finishCancelledRetry();
|
|
1508
1555
|
return false;
|
|
@@ -1528,7 +1575,7 @@ export class AgentSession {
|
|
|
1528
1575
|
});
|
|
1529
1576
|
this._retryAttempt = 0;
|
|
1530
1577
|
}
|
|
1531
|
-
if (await this._checkCompaction(message
|
|
1578
|
+
if (await this._checkCompaction(message)) {
|
|
1532
1579
|
return !this._agentRunAbortRequested;
|
|
1533
1580
|
}
|
|
1534
1581
|
// The low-level loop drains both queues before agent_end. Messages queued by
|
|
@@ -2382,7 +2429,7 @@ export class AgentSession {
|
|
|
2382
2429
|
* @param skipAbortedCheck If false, include aborted messages (for pre-prompt check). Default: true
|
|
2383
2430
|
* @returns Whether the post-run loop should call `agent.continue()` for overflow recovery or queued messages
|
|
2384
2431
|
*/
|
|
2385
|
-
async _checkCompaction(assistantMessage, skipAbortedCheck = true
|
|
2432
|
+
async _checkCompaction(assistantMessage, skipAbortedCheck = true) {
|
|
2386
2433
|
const settings = this.settingsManager.getCompactionSettings(this.model);
|
|
2387
2434
|
if (!settings.enabled)
|
|
2388
2435
|
return false;
|
|
@@ -2459,7 +2506,7 @@ export class AgentSession {
|
|
|
2459
2506
|
}
|
|
2460
2507
|
// Persistently omit the selected final attempt before post-run recovery compaction.
|
|
2461
2508
|
this._overflowRecoveryAttempted = true;
|
|
2462
|
-
this._omitRecoveryAttempt(assistantMessage
|
|
2509
|
+
this._omitRecoveryAttempt(assistantMessage);
|
|
2463
2510
|
const retry = await this._runAutoCompaction("overflow", willRetry);
|
|
2464
2511
|
if (retry)
|
|
2465
2512
|
this._failedResponse = assistantMessage;
|