@averyyy/pi-coding-agent 0.87.1-piclient.2 → 1.0.0-piclient.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 +183 -0
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.js.map +1 -1
- package/dist/bun/runtime-setup.d.ts.map +1 -1
- package/dist/bun/runtime-setup.js +4 -1
- package/dist/bun/runtime-setup.js.map +1 -1
- package/dist/bun/sandbox-env-setup.d.ts.map +1 -1
- package/dist/bundle/chunks/anthropic-messages-UID2PALB.js +6 -0
- package/dist/bundle/chunks/anthropic.js +2 -2
- package/dist/bundle/chunks/azure-openai-responses-WK37QQ3X.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +3 -3
- package/dist/bundle/chunks/chunk-2LGHNI5Y.js +1553 -0
- package/dist/bundle/chunks/chunk-6D7LHLKG.js +2 -0
- package/dist/bundle/chunks/chunk-7JGR3GZN.js +11 -0
- package/dist/bundle/chunks/{chunk-FUXEF6JQ.js → chunk-CWVWZD3J.js} +2 -2
- package/dist/bundle/chunks/chunk-GIUN2MS4.js +16 -0
- package/dist/bundle/chunks/chunk-H3QXYIF7.js +31 -0
- package/dist/bundle/chunks/chunk-KYK7L7MP.js +127 -0
- package/dist/bundle/chunks/chunk-LD2P6SFZ.js +2 -0
- package/dist/bundle/chunks/chunk-LDPPAHPJ.js +4 -0
- package/dist/bundle/chunks/chunk-NEUJZQL3.js +19 -0
- package/dist/bundle/chunks/chunk-OI6YFHHK.js +82 -0
- package/dist/bundle/chunks/chunk-OSKPX3Z5.js +2 -0
- package/dist/bundle/chunks/{chunk-XDUWOHPL.js → chunk-S3GGRYIO.js} +2 -2
- package/dist/bundle/chunks/chunk-SQXKOUF6.js +2 -0
- package/dist/bundle/chunks/chunk-UTB4DTYQ.js +2 -0
- package/dist/bundle/chunks/chunk-VIV3CWXG.js +2 -0
- package/dist/bundle/chunks/chunk-Y5O5BZGX.js +136 -0
- package/dist/bundle/chunks/{chunk-UZNGGY6N.js → chunk-Z772OFUN.js} +3 -3
- package/dist/bundle/chunks/cli-JE36AHMI.js +51 -0
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-NPQN263E.js +2 -0
- package/dist/bundle/chunks/codemode-worker.js +354 -0
- package/dist/bundle/chunks/execute-UX73LR4F.js +367 -0
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/google-generative-ai-OHRSHIE7.js +2 -0
- package/dist/bundle/chunks/google-vertex-KXEB3MVO.js +2 -0
- package/dist/bundle/chunks/{https-proxy-agent-2VXB7436.js → https-proxy-agent-UDEHOBGS.js} +1 -1
- package/dist/bundle/chunks/{lib-HGQMNYVT.js → lib-TEDK3E5I.js} +2 -2
- package/dist/bundle/chunks/llama-cpp-classify-XT44PI3C.js +22 -0
- package/dist/bundle/chunks/mistral-conversations-DKVFNQL6.js +5 -0
- package/dist/bundle/chunks/openai-chatgpt.js +75 -0
- package/dist/bundle/chunks/{openai-codex-responses-SG7PGUUZ.js → openai-codex-responses-WVERB76N.js} +2 -2
- package/dist/bundle/chunks/openai-codex.js +2 -2
- package/dist/bundle/chunks/{openai-completions-OBX42CLD.js → openai-completions-JXDDPZ23.js} +2 -2
- package/dist/bundle/chunks/openai-responses-WDT74L23.js +3 -0
- package/dist/bundle/chunks/{openrouter-images-N4XVVFSD.js → openrouter-images-ZVXWCSIM.js} +1 -1
- package/dist/bundle/chunks/openrouter.js +2 -2
- package/dist/bundle/chunks/pi-logo-animation-APS4JS6B.js +2 -0
- package/dist/bundle/chunks/{pi-messages-GFKBWJHZ.js → pi-messages-TM5SOOIW.js} +2 -2
- package/dist/bundle/chunks/radius.js +2 -2
- package/dist/bundle/chunks/runtime-MPXPM7VL.js +2 -0
- package/dist/bundle/chunks/typesafe-system-one-A4CZTQWZ.js +2 -0
- package/dist/bundle/chunks/virtual-modules-XLXFDFIX.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 +6 -5
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-check.d.ts.map +1 -1
- package/dist/cli/auth-check.js.map +1 -1
- package/dist/cli/auth-command.d.ts.map +1 -1
- package/dist/cli/auth-command.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/initial-message.d.ts +1 -1
- package/dist/cli/initial-message.d.ts.map +1 -1
- package/dist/cli/initial-message.js.map +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/project-trust.d.ts.map +1 -1
- package/dist/cli/project-trust.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +38 -30
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/config.d.ts +15 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +33 -4
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +1 -1
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +13 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +133 -12
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +598 -297
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-guidance.d.ts.map +1 -1
- package/dist/core/auth-guidance.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/core/bug-report-upload.d.ts.map +1 -1
- package/dist/core/bug-report-upload.js.map +1 -1
- package/dist/core/bug-report.d.ts +1 -1
- package/dist/core/bug-report.d.ts.map +1 -1
- package/dist/core/bug-report.js +1 -1
- package/dist/core/bug-report.js.map +1 -1
- package/dist/core/cache-stats.d.ts.map +1 -1
- package/dist/core/cache-stats.js.map +1 -1
- package/dist/core/cache-warmer.d.ts.map +1 -1
- package/dist/core/cache-warmer.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +1 -22
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/utils.d.ts +2 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +25 -18
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/crash-log.d.ts.map +1 -1
- package/dist/core/crash-log.js +2 -1
- package/dist/core/crash-log.js.map +1 -1
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/experimental.d.ts.map +1 -1
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/template.css +10 -0
- package/dist/core/export-html/template.js +66 -17
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- 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/jiti-loader.d.ts.map +1 -1
- package/dist/core/extensions/jiti-static-loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +67 -5
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +18 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +99 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +301 -22
- 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/wrapper.d.ts +2 -2
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js +3 -3
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/keybindings.d.ts +1 -1
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +1 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +125 -0
- package/dist/core/mcp-servers.d.ts.map +1 -0
- package/dist/core/mcp-servers.js +198 -0
- package/dist/core/mcp-servers.js.map +1 -0
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-registry.d.ts +15 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +29 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +2 -2
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +5 -5
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +47 -3
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +189 -35
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/models-store.d.ts.map +1 -1
- package/dist/core/models-store.js.map +1 -1
- package/dist/core/nested-tool-calls.d.ts +102 -0
- package/dist/core/nested-tool-calls.d.ts.map +1 -0
- package/dist/core/nested-tool-calls.js +178 -0
- package/dist/core/nested-tool-calls.js.map +1 -0
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js.map +1 -1
- package/dist/core/package-manager.d.ts +4 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +59 -12
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-client-cli-adapter.d.ts.map +1 -1
- package/dist/core/pi-client-cli-adapter.js.map +1 -1
- package/dist/core/pi-client-runtime-update.d.ts.map +1 -1
- package/dist/core/pi-client-runtime-update.js.map +1 -1
- package/dist/core/pi-manifest.d.ts.map +1 -1
- package/dist/core/pi-manifest.js.map +1 -1
- package/dist/core/pi-server-client.d.ts.map +1 -1
- package/dist/core/pi-server-client.js.map +1 -1
- package/dist/core/pi-server-protocol.d.ts.map +1 -1
- package/dist/core/pi-server-protocol.js.map +1 -1
- package/dist/core/pi-server-request.d.ts.map +1 -1
- package/dist/core/pi-server-request.js.map +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-attribution.d.ts.map +1 -1
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/provider-composer.d.ts +40 -21
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +92 -40
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/radius.d.ts +2 -0
- package/dist/core/radius.d.ts.map +1 -1
- package/dist/core/radius.js +2 -0
- package/dist/core/radius.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +8 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +21 -11
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts +7 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +161 -35
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/runtime-credentials.js.map +1 -1
- package/dist/core/sdk.d.ts +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +25 -6
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-cwd.d.ts.map +1 -1
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/session-export.d.ts.map +1 -1
- package/dist/core/session-export.js.map +1 -1
- package/dist/core/session-manager.d.ts +9 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +22 -22
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-diagnostics.d.ts.map +1 -1
- package/dist/core/settings-diagnostics.js.map +1 -1
- package/dist/core/settings-manager.d.ts +36 -4
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +75 -4
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/source-info.d.ts +8 -0
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js +16 -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 +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/telemetry.d.ts.map +1 -1
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/bash.d.ts +12 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +33 -2
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
- package/dist/core/tools/file-mutation-queue.js.map +1 -1
- 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.map +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +11 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +36 -0
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/core/tools/powershell.d.ts.map +1 -1
- package/dist/core/tools/powershell.js.map +1 -1
- 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 +6 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +26 -0
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts.map +1 -1
- package/dist/core/tools/renderers/bash.js +11 -32
- package/dist/core/tools/renderers/bash.js.map +1 -1
- package/dist/core/tools/renderers/edit.d.ts.map +1 -1
- package/dist/core/tools/renderers/edit.js.map +1 -1
- package/dist/core/tools/renderers/find.d.ts.map +1 -1
- package/dist/core/tools/renderers/find.js.map +1 -1
- package/dist/core/tools/renderers/grep.d.ts.map +1 -1
- package/dist/core/tools/renderers/grep.js.map +1 -1
- package/dist/core/tools/renderers/index.d.ts.map +1 -1
- package/dist/core/tools/renderers/index.js.map +1 -1
- package/dist/core/tools/renderers/ls.d.ts.map +1 -1
- package/dist/core/tools/renderers/ls.js.map +1 -1
- package/dist/core/tools/renderers/read.d.ts.map +1 -1
- package/dist/core/tools/renderers/read.js +3 -2
- package/dist/core/tools/renderers/read.js.map +1 -1
- package/dist/core/tools/renderers/write.d.ts.map +1 -1
- package/dist/core/tools/renderers/write.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +5 -3
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js +3 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts +14 -0
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +29 -0
- package/dist/core/tools/truncate.js.map +1 -1
- 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 +1 -0
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/usage-totals.d.ts +2 -0
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +23 -0
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/core/virtual-models.d.ts +117 -0
- package/dist/core/virtual-models.d.ts.map +1 -0
- package/dist/core/virtual-models.js +124 -0
- package/dist/core/virtual-models.js.map +1 -0
- package/dist/extensions/codemode/execute.d.ts +16 -0
- package/dist/extensions/codemode/execute.d.ts.map +1 -0
- package/dist/extensions/codemode/execute.js +536 -0
- package/dist/extensions/codemode/execute.js.map +1 -0
- package/dist/extensions/codemode/execute.lazy.d.ts +3 -0
- package/dist/extensions/codemode/execute.lazy.d.ts.map +1 -0
- package/dist/extensions/codemode/execute.lazy.js +3 -0
- package/dist/extensions/codemode/execute.lazy.js.map +1 -0
- package/dist/extensions/codemode/index.d.ts +21 -0
- package/dist/extensions/codemode/index.d.ts.map +1 -0
- package/dist/extensions/codemode/index.js +31 -0
- package/dist/extensions/codemode/index.js.map +1 -0
- package/dist/extensions/codemode/renderer.d.ts +12 -0
- package/dist/extensions/codemode/renderer.d.ts.map +1 -0
- package/dist/extensions/codemode/renderer.js +137 -0
- package/dist/extensions/codemode/renderer.js.map +1 -0
- package/dist/extensions/codemode/tool.d.ts +123 -0
- package/dist/extensions/codemode/tool.d.ts.map +1 -0
- package/dist/extensions/codemode/tool.js +268 -0
- package/dist/extensions/codemode/tool.js.map +1 -0
- package/dist/extensions/codemode/worker.d.ts +7 -0
- package/dist/extensions/codemode/worker.d.ts.map +1 -0
- package/dist/extensions/codemode/worker.js +7 -0
- package/dist/extensions/codemode/worker.js.map +1 -0
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +11 -1
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/llama/huggingface.d.ts.map +1 -1
- package/dist/extensions/llama/huggingface.js.map +1 -1
- package/dist/extensions/llama/index.d.ts.map +1 -1
- package/dist/extensions/llama/index.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 +65 -13
- 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.map +1 -1
- package/dist/extensions/mcp/cli.d.ts +21 -0
- package/dist/extensions/mcp/cli.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.js +500 -0
- package/dist/extensions/mcp/cli.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.d.ts +3 -0
- package/dist/extensions/mcp/cli.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.lazy.js +3 -0
- package/dist/extensions/mcp/cli.lazy.js.map +1 -0
- package/dist/extensions/mcp/config.d.ts +72 -0
- package/dist/extensions/mcp/config.d.ts.map +1 -0
- package/dist/extensions/mcp/config.js +158 -0
- package/dist/extensions/mcp/config.js.map +1 -0
- package/dist/extensions/mcp/index.d.ts +76 -0
- package/dist/extensions/mcp/index.d.ts.map +1 -0
- package/dist/extensions/mcp/index.js +1066 -0
- package/dist/extensions/mcp/index.js.map +1 -0
- package/dist/extensions/mcp/log.d.ts +16 -0
- package/dist/extensions/mcp/log.d.ts.map +1 -0
- package/dist/extensions/mcp/log.js +66 -0
- package/dist/extensions/mcp/log.js.map +1 -0
- package/dist/extensions/mcp/oauth.d.ts +97 -0
- package/dist/extensions/mcp/oauth.d.ts.map +1 -0
- package/dist/extensions/mcp/oauth.js +358 -0
- package/dist/extensions/mcp/oauth.js.map +1 -0
- package/dist/extensions/mcp/resources.d.ts +43 -0
- package/dist/extensions/mcp/resources.d.ts.map +1 -0
- package/dist/extensions/mcp/resources.js +262 -0
- package/dist/extensions/mcp/resources.js.map +1 -0
- package/dist/extensions/mcp/runtime.d.ts +98 -0
- package/dist/extensions/mcp/runtime.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.js +395 -0
- package/dist/extensions/mcp/runtime.js.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts +3 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.js +3 -0
- package/dist/extensions/mcp/runtime.lazy.js.map +1 -0
- package/dist/extensions/mcp/tools.d.ts +84 -0
- package/dist/extensions/mcp/tools.d.ts.map +1 -0
- package/dist/extensions/mcp/tools.js +251 -0
- package/dist/extensions/mcp/tools.js.map +1 -0
- package/dist/extensions/mcp/ui.d.ts +60 -0
- package/dist/extensions/mcp/ui.d.ts.map +1 -0
- package/dist/extensions/mcp/ui.js +174 -0
- package/dist/extensions/mcp/ui.js.map +1 -0
- package/dist/extensions/tool-search/index.d.ts +12 -0
- package/dist/extensions/tool-search/index.d.ts.map +1 -0
- package/dist/extensions/tool-search/index.js +15 -0
- package/dist/extensions/tool-search/index.js.map +1 -0
- package/dist/extensions/tool-search/tool.d.ts +73 -0
- package/dist/extensions/tool-search/tool.d.ts.map +1 -0
- package/dist/extensions/tool-search/tool.js +189 -0
- package/dist/extensions/tool-search/tool.js.map +1 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +16 -0
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/interactive/bug-report.d.ts.map +1 -1
- package/dist/modes/interactive/bug-report.js.map +1 -1
- package/dist/modes/interactive/chat-viewport.d.ts.map +1 -1
- package/dist/modes/interactive/chat-viewport.js.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- 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 +13 -3
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +4 -4
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js +8 -2
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +7 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +43 -3
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -1
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +8 -2
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +24 -21
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/pi-logo-animation.d.ts +68 -0
- package/dist/modes/interactive/components/pi-logo-animation.d.ts.map +1 -0
- package/dist/modes/interactive/components/pi-logo-animation.js +1086 -0
- package/dist/modes/interactive/components/pi-logo-animation.js.map +1 -0
- package/dist/modes/interactive/components/pi-logo-animation.lazy.d.ts +7 -0
- package/dist/modes/interactive/components/pi-logo-animation.lazy.d.ts.map +1 -0
- package/dist/modes/interactive/components/pi-logo-animation.lazy.js +12 -0
- package/dist/modes/interactive/components/pi-logo-animation.lazy.js.map +1 -0
- package/dist/modes/interactive/components/pi-logo.d.ts +19 -0
- package/dist/modes/interactive/components/pi-logo.d.ts.map +1 -0
- package/dist/modes/interactive/components/pi-logo.js +37 -0
- package/dist/modes/interactive/components/pi-logo.js.map +1 -0
- package/dist/modes/interactive/components/radius-login-selector.d.ts +15 -0
- package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/radius-login-selector.js +85 -0
- package/dist/modes/interactive/components/radius-login-selector.js.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +6 -4
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +33 -11
- package/dist/modes/interactive/components/settings-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.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts +17 -0
- package/dist/modes/interactive/components/themed-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/themed-text.js +29 -0
- package/dist/modes/interactive/components/themed-text.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +2 -2
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +5 -4
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +27 -3
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js +39 -6
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +21 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +348 -197
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -1
- package/dist/modes/interactive/model-search.d.ts.map +1 -1
- package/dist/modes/interactive/model-search.js.map +1 -1
- package/dist/modes/interactive/session-share.d.ts.map +1 -1
- package/dist/modes/interactive/session-share.js.map +1 -1
- package/dist/modes/interactive/theme/dark.json +59 -72
- package/dist/modes/interactive/theme/light.json +57 -69
- package/dist/modes/interactive/theme/system-theme.d.ts +55 -0
- package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/system-theme.js +546 -0
- package/dist/modes/interactive/theme/system-theme.js.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +46 -6
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +127 -47
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-json.d.ts +1 -0
- package/dist/modes/interactive/theme/theme-json.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-json.js +3 -1
- package/dist/modes/interactive/theme/theme-json.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +7 -2
- package/dist/modes/interactive/theme/theme.d.ts +66 -39
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +238 -317
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/tui-renderer.d.ts +2 -1
- package/dist/modes/interactive/tui-renderer.d.ts.map +1 -1
- package/dist/modes/interactive/tui-renderer.js +1 -0
- package/dist/modes/interactive/tui-renderer.js.map +1 -1
- package/dist/modes/json-event.d.ts.map +1 -1
- package/dist/modes/json-event.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +6 -6
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +12 -8
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +7 -9
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +10 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +6 -2
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/pi-client-cli.d.ts.map +1 -1
- package/dist/pi-client-cli.js.map +1 -1
- package/dist/rpc-entry.d.ts.map +1 -1
- package/dist/rpc-entry.js.map +1 -1
- package/dist/utils/abort.d.ts.map +1 -1
- package/dist/utils/abort.js.map +1 -1
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-command.d.ts.map +1 -1
- package/dist/utils/clipboard-command.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +14 -17
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +5 -0
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/deprecation.d.ts.map +1 -1
- package/dist/utils/deprecation.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js.map +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/html.d.ts.map +1 -1
- package/dist/utils/html.js.map +1 -1
- package/dist/utils/image-convert.d.ts.map +1 -1
- package/dist/utils/image-convert.js.map +1 -1
- package/dist/utils/image-process.d.ts.map +1 -1
- package/dist/utils/image-process.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/image-resize-worker.d.ts.map +1 -1
- package/dist/utils/image-resize-worker.js.map +1 -1
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/management-http.d.ts.map +1 -1
- package/dist/utils/management-http.js.map +1 -1
- package/dist/utils/mime.d.ts.map +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts +3 -3
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +5 -4
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/shell.d.ts +1 -3
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +3 -30
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/utils/sleep.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +2 -0
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/text.d.ts.map +1 -1
- package/dist/utils/text.js.map +1 -1
- package/dist/utils/tool-result-images.d.ts.map +1 -1
- package/dist/utils/tool-result-images.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/windows-self-update.d.ts.map +1 -1
- package/dist/utils/windows-self-update.js.map +1 -1
- package/dist/utils/wsl.d.ts.map +1 -1
- package/dist/utils/wsl.js.map +1 -1
- package/dist/utils/zip.d.ts.map +1 -1
- package/dist/utils/zip.js.map +1 -1
- package/docs/cli.md +58 -7
- package/docs/codemode.md +207 -0
- package/docs/configuration.md +2 -0
- package/docs/custom-provider.md +43 -4
- package/docs/docs.json +13 -1
- package/docs/environment-variables.md +2 -2
- package/docs/extensions.md +55 -0
- package/docs/index.md +1 -1
- package/docs/keybindings.md +1 -1
- package/docs/llama-cpp.md +13 -0
- package/docs/mcp.md +248 -0
- package/docs/models.md +57 -1
- package/docs/packages.md +4 -2
- package/docs/providers.md +19 -6
- package/docs/rpc-commands.md +9 -3
- package/docs/rpc.md +3 -1
- package/docs/sdk.md +8 -3
- package/docs/security.md +2 -0
- package/docs/session-format.md +5 -1
- package/docs/settings.md +24 -5
- package/docs/themes.md +33 -7
- package/docs/tui.md +18 -0
- package/docs/usage.md +1 -1
- package/docs/virtual-models.md +114 -0
- package/docs/windows.md +2 -0
- package/examples/README.md +1 -1
- package/examples/extensions/README.md +2 -0
- package/examples/extensions/built-in-tool-renderer.ts +16 -40
- 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/custom-provider-gitlab-duo/test.ts +5 -5
- package/examples/extensions/debug-provider.ts +90 -0
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/jev-router.ts +113 -0
- package/examples/extensions/minimal-mode.ts +24 -96
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/rpc-client.ts +1 -1
- package/examples/rpc-extension-ui.ts +1 -1
- package/examples/sdk/14-codemode-mcp.ts +61 -0
- package/examples/sdk/README.md +2 -1
- package/package.json +14 -12
- package/dist/bundle/chunks/anthropic-messages-J5WXPPPC.js +0 -6
- package/dist/bundle/chunks/azure-openai-responses-QJ7SPP5M.js +0 -2
- package/dist/bundle/chunks/chunk-6R7UI4IY.js +0 -2
- package/dist/bundle/chunks/chunk-BZKWNWMI.js +0 -2
- package/dist/bundle/chunks/chunk-NUHFSC37.js +0 -25
- package/dist/bundle/chunks/chunk-RCZIEVGO.js +0 -11
- package/dist/bundle/chunks/chunk-S7SZN6Z3.js +0 -2
- package/dist/bundle/chunks/chunk-X2F52Z34.js +0 -1685
- package/dist/bundle/chunks/chunk-XNGRGP62.js +0 -2
- package/dist/bundle/chunks/google-generative-ai-IMS5EK2Y.js +0 -2
- package/dist/bundle/chunks/google-vertex-O4YJEQUW.js +0 -2
- package/dist/bundle/chunks/mistral-conversations-NOSQHBEY.js +0 -5
- package/dist/bundle/chunks/openai-responses-AH7QTG23.js +0 -2
- package/dist/bundle/chunks/virtual-modules-WWGGM27U.js +0 -2
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raw provider event viewer.
|
|
3
|
+
*
|
|
4
|
+
* Usage: /debug-provider [on|off]
|
|
5
|
+
* With no argument, the command toggles capture. Captured events are persisted
|
|
6
|
+
* as expandable custom entries.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { type ExtensionAPI, keyHint } from "@earendil-works/pi-coding-agent";
|
|
10
|
+
import { Box, Text } from "@earendil-works/pi-tui";
|
|
11
|
+
|
|
12
|
+
const ENTRY_TYPE = "debug-provider-events";
|
|
13
|
+
const STATUS_KEY = "debug-provider";
|
|
14
|
+
|
|
15
|
+
interface ProviderDebugEntry {
|
|
16
|
+
provider: string;
|
|
17
|
+
api: string;
|
|
18
|
+
model: string;
|
|
19
|
+
events: unknown[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default function (pi: ExtensionAPI) {
|
|
23
|
+
let enabled = false;
|
|
24
|
+
let activeEvents: unknown[] | undefined;
|
|
25
|
+
let completedEntry: ProviderDebugEntry | undefined;
|
|
26
|
+
|
|
27
|
+
pi.registerEntryRenderer<ProviderDebugEntry>(ENTRY_TYPE, (entry, { expanded }, theme) => {
|
|
28
|
+
const data = entry.data;
|
|
29
|
+
if (!data) return new Text(theme.fg("warning", "[provider debug] Missing event data"), 0, 0);
|
|
30
|
+
|
|
31
|
+
const box = new Box(1, 1, (text) => theme.bg("customMessageBg", text));
|
|
32
|
+
const count = `${data.events.length} event${data.events.length === 1 ? "" : "s"}`;
|
|
33
|
+
const expandHint = expanded ? "" : ` (${keyHint("app.tools.expand", "to view events")})`;
|
|
34
|
+
box.addChild(
|
|
35
|
+
new Text(
|
|
36
|
+
`${theme.fg("accent", "[provider debug]")} ${data.provider}/${data.model} (${data.api}) · ${count}${expandHint}`,
|
|
37
|
+
0,
|
|
38
|
+
0,
|
|
39
|
+
),
|
|
40
|
+
);
|
|
41
|
+
if (expanded) {
|
|
42
|
+
box.addChild(new Text(JSON.stringify(data.events, null, 2), 0, 0));
|
|
43
|
+
}
|
|
44
|
+
return box;
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
pi.registerCommand("debug-provider", {
|
|
48
|
+
description: "Toggle capture of raw provider stream events",
|
|
49
|
+
handler: async (args, ctx) => {
|
|
50
|
+
const requestedState = args.trim().toLowerCase();
|
|
51
|
+
if (requestedState !== "" && requestedState !== "on" && requestedState !== "off") {
|
|
52
|
+
ctx.ui.notify("Usage: /debug-provider [on|off]", "warning");
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
enabled = requestedState === "" ? !enabled : requestedState === "on";
|
|
57
|
+
if (!enabled) {
|
|
58
|
+
activeEvents = undefined;
|
|
59
|
+
completedEntry = undefined;
|
|
60
|
+
}
|
|
61
|
+
ctx.ui.setStatus(STATUS_KEY, enabled ? "provider debug" : undefined);
|
|
62
|
+
ctx.ui.notify(`Provider event capture ${enabled ? "enabled" : "disabled"}`, "info");
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
pi.on("turn_start", () => {
|
|
67
|
+
activeEvents = enabled ? [] : undefined;
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
pi.on("provider_stream_event", (event) => {
|
|
71
|
+
activeEvents?.push(structuredClone(event.data));
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
pi.on("message_end", (event) => {
|
|
75
|
+
if (event.message.role !== "assistant" || !activeEvents) return;
|
|
76
|
+
completedEntry = {
|
|
77
|
+
provider: event.message.provider,
|
|
78
|
+
api: event.message.api,
|
|
79
|
+
model: event.message.model,
|
|
80
|
+
events: activeEvents,
|
|
81
|
+
};
|
|
82
|
+
activeEvents = undefined;
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
pi.on("turn_end", () => {
|
|
86
|
+
if (!completedEntry) return;
|
|
87
|
+
pi.appendEntry<ProviderDebugEntry>(ENTRY_TYPE, completedEntry);
|
|
88
|
+
completedEntry = undefined;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-gondolin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-gondolin",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "1.0.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@earendil-works/gondolin": "0.12.0"
|
|
12
12
|
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jev router - a virtual model that plans on a strong model and implements on a cheap one.
|
|
3
|
+
*
|
|
4
|
+
* Registers `jev/auto`, which routes between three OpenAI Codex models:
|
|
5
|
+
*
|
|
6
|
+
* - Planning: GPT-5.6 Sol for complex work, GPT-5.6 Terra otherwise. The Jev classifier rates the
|
|
7
|
+
* first user message; planning stays on the chosen model.
|
|
8
|
+
* - Implementation: GPT-5.6 Luna.
|
|
9
|
+
*
|
|
10
|
+
* The planning model explores, plans, and makes the first edit. After the first successful `edit`
|
|
11
|
+
* or `write` tool call, the next request of the same turn goes to Luna, and the session stays
|
|
12
|
+
* there. A session therefore switches models once and accepts a single prompt-cache miss.
|
|
13
|
+
*
|
|
14
|
+
* The phase is router state: Pi stores it on the session branch, so it follows the session tree
|
|
15
|
+
* and survives compaction. The selected thinking level passes through as the reasoning effort of
|
|
16
|
+
* the chosen model. Requests outside the agent loop, such as compaction summaries, go to Luna.
|
|
17
|
+
*
|
|
18
|
+
* Requires TypeSafe credentials (TYPESAFE_API_KEY) and an OpenAI Codex login.
|
|
19
|
+
* Usage: pi -e ./jev-router.ts --model jev/auto
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import type { Message } from "@earendil-works/pi-ai";
|
|
23
|
+
import type { ExtensionAPI, ExtensionContext, ModelRoute, ModelRouteRequest } from "@earendil-works/pi-coding-agent";
|
|
24
|
+
|
|
25
|
+
const PROVIDER = "openai-codex";
|
|
26
|
+
const SOL = "gpt-5.6-sol";
|
|
27
|
+
const TERRA = "gpt-5.6-terra";
|
|
28
|
+
const LUNA = "gpt-5.6-luna";
|
|
29
|
+
|
|
30
|
+
/** Tools whose successful result means implementation has started. */
|
|
31
|
+
const EDIT_TOOLS = new Set(["edit", "write"]);
|
|
32
|
+
|
|
33
|
+
interface JevState {
|
|
34
|
+
phase: "planning" | "implementation";
|
|
35
|
+
/** OpenAI Codex model for this phase. */
|
|
36
|
+
model: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
type JevRequest = ModelRouteRequest<JevState>;
|
|
40
|
+
|
|
41
|
+
function routeTo(request: JevRequest, ctx: ExtensionContext, id: string, state?: JevState): ModelRoute<JevState> {
|
|
42
|
+
const model = ctx.modelRegistry.find(PROVIDER, id);
|
|
43
|
+
if (!model) throw new Error(`Model ${PROVIDER}/${id} is not in the catalog`);
|
|
44
|
+
return { model, thinkingLevel: request.thinkingLevel, state };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function lastUserText(messages: readonly Message[]): string {
|
|
48
|
+
const content = messages.filter((message) => message.role === "user").at(-1)?.content ?? "";
|
|
49
|
+
if (typeof content === "string") return content;
|
|
50
|
+
return content.flatMap((block) => (block.type === "text" ? [block.text] : [])).join("\n");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Whether a tool call since the last user message edited a file successfully. */
|
|
54
|
+
function editedThisTurn(messages: readonly Message[]): boolean {
|
|
55
|
+
const lastUser = messages.findLastIndex((message) => message.role === "user");
|
|
56
|
+
return messages
|
|
57
|
+
.slice(lastUser + 1)
|
|
58
|
+
.some((message) => message.role === "toolResult" && EDIT_TOOLS.has(message.toolName) && !message.isError);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Planning model for a new session: Sol for complex work, Terra otherwise or when Jev is unavailable. */
|
|
62
|
+
async function choosePlanningModel(request: JevRequest, ctx: ExtensionContext): Promise<string> {
|
|
63
|
+
// Keep a planning model the session already uses, so switching to jev/auto costs no cache miss.
|
|
64
|
+
const previous = request.previous?.model;
|
|
65
|
+
if (previous?.provider === PROVIDER && (previous.id === SOL || previous.id === TERRA)) return previous.id;
|
|
66
|
+
|
|
67
|
+
const jev = ctx.modelRegistry.findOfType("classifier", "typesafe", "jev-latest");
|
|
68
|
+
if (!jev) return TERRA;
|
|
69
|
+
const result = await ctx.modelRegistry.classify(
|
|
70
|
+
jev,
|
|
71
|
+
{
|
|
72
|
+
state: { prompt: lastUserText(request.messages).slice(0, 16_000) },
|
|
73
|
+
questions: {
|
|
74
|
+
complexity: {
|
|
75
|
+
type: "choice",
|
|
76
|
+
instructions: "How demanding is the software engineering work requested in `prompt`?",
|
|
77
|
+
criteria: {
|
|
78
|
+
standard: "Ordinary features, fixes, reviews, or questions",
|
|
79
|
+
complex: "Subtle design, cross-cutting changes, or hard debugging",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{ signal: request.signal },
|
|
85
|
+
);
|
|
86
|
+
const answer = result.stopReason === "stop" ? result.answers.complexity : undefined;
|
|
87
|
+
return answer?.type === "choice" && (answer.probabilities.complex ?? 0) >= 0.5 ? SOL : TERRA;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export default function (pi: ExtensionAPI) {
|
|
91
|
+
pi.registerVirtualModel<JevState>({
|
|
92
|
+
provider: "jev",
|
|
93
|
+
id: "auto",
|
|
94
|
+
name: "Auto (Jev)",
|
|
95
|
+
thinkingLevels: ["low", "medium", "high", "xhigh"],
|
|
96
|
+
// Shared by all three models; shown before the first response.
|
|
97
|
+
contextWindow: 272_000,
|
|
98
|
+
maxTokens: 128_000,
|
|
99
|
+
async route(request, ctx) {
|
|
100
|
+
if (request.reason === "direct") return routeTo(request, ctx, LUNA);
|
|
101
|
+
const state = request.state;
|
|
102
|
+
if (!state) {
|
|
103
|
+
const model = await choosePlanningModel(request, ctx);
|
|
104
|
+
return routeTo(request, ctx, model, { phase: "planning", model });
|
|
105
|
+
}
|
|
106
|
+
// The planning model made the first edit: hand the rest of the work to Luna.
|
|
107
|
+
if (state.phase === "planning" && editedThisTurn(request.messages)) {
|
|
108
|
+
return routeTo(request, ctx, LUNA, { phase: "implementation", model: LUNA });
|
|
109
|
+
}
|
|
110
|
+
return routeTo(request, ctx, state.model);
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
}
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
|
|
19
19
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
20
20
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
createBashToolDefinition,
|
|
22
|
+
createEditToolDefinition,
|
|
23
|
+
createFindToolDefinition,
|
|
24
|
+
createGrepToolDefinition,
|
|
25
|
+
createLsToolDefinition,
|
|
26
|
+
createReadToolDefinition,
|
|
27
|
+
createWriteToolDefinition,
|
|
28
28
|
} from "@earendil-works/pi-coding-agent";
|
|
29
29
|
import { Text } from "@earendil-works/pi-tui";
|
|
30
30
|
import { homedir } from "os";
|
|
@@ -40,45 +40,26 @@ function shortenPath(path: string): string {
|
|
|
40
40
|
return path;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
// Cache for built-in tools by cwd
|
|
44
|
-
const toolCache = new Map<string, ReturnType<typeof createBuiltInTools>>();
|
|
45
|
-
|
|
46
43
|
function createBuiltInTools(cwd: string) {
|
|
47
44
|
return {
|
|
48
|
-
read:
|
|
49
|
-
bash:
|
|
50
|
-
edit:
|
|
51
|
-
write:
|
|
52
|
-
find:
|
|
53
|
-
grep:
|
|
54
|
-
ls:
|
|
45
|
+
read: createReadToolDefinition(cwd),
|
|
46
|
+
bash: createBashToolDefinition(cwd),
|
|
47
|
+
edit: createEditToolDefinition(cwd),
|
|
48
|
+
write: createWriteToolDefinition(cwd),
|
|
49
|
+
find: createFindToolDefinition(cwd),
|
|
50
|
+
grep: createGrepToolDefinition(cwd),
|
|
51
|
+
ls: createLsToolDefinition(cwd),
|
|
55
52
|
};
|
|
56
53
|
}
|
|
57
54
|
|
|
58
|
-
function getBuiltInTools(cwd: string) {
|
|
59
|
-
let tools = toolCache.get(cwd);
|
|
60
|
-
if (!tools) {
|
|
61
|
-
tools = createBuiltInTools(cwd);
|
|
62
|
-
toolCache.set(cwd, tools);
|
|
63
|
-
}
|
|
64
|
-
return tools;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
55
|
export default function (pi: ExtensionAPI) {
|
|
56
|
+
const tools = createBuiltInTools(process.cwd());
|
|
57
|
+
|
|
68
58
|
// =========================================================================
|
|
69
59
|
// Read Tool
|
|
70
60
|
// =========================================================================
|
|
71
61
|
pi.registerTool({
|
|
72
|
-
|
|
73
|
-
label: "read",
|
|
74
|
-
description:
|
|
75
|
-
"Read the contents of a file. Supports text files and images (jpg, png, gif, webp). Images are sent as attachments. For text files, output is truncated to 2000 lines or 50KB (whichever is hit first). Use offset/limit for large files.",
|
|
76
|
-
parameters: getBuiltInTools(process.cwd()).read.parameters,
|
|
77
|
-
|
|
78
|
-
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
79
|
-
const tools = getBuiltInTools(ctx.cwd);
|
|
80
|
-
return tools.read.execute(toolCallId, params, signal, onUpdate);
|
|
81
|
-
},
|
|
62
|
+
...tools.read,
|
|
82
63
|
|
|
83
64
|
renderCall(args, theme, _context) {
|
|
84
65
|
const path = shortenPath(args.path || "");
|
|
@@ -116,16 +97,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
116
97
|
// Bash Tool
|
|
117
98
|
// =========================================================================
|
|
118
99
|
pi.registerTool({
|
|
119
|
-
|
|
120
|
-
label: "bash",
|
|
121
|
-
description:
|
|
122
|
-
"Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first).",
|
|
123
|
-
parameters: getBuiltInTools(process.cwd()).bash.parameters,
|
|
124
|
-
|
|
125
|
-
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
126
|
-
const tools = getBuiltInTools(ctx.cwd);
|
|
127
|
-
return tools.bash.execute(toolCallId, params, signal, onUpdate);
|
|
128
|
-
},
|
|
100
|
+
...tools.bash,
|
|
129
101
|
|
|
130
102
|
renderCall(args, theme, _context) {
|
|
131
103
|
const command = args.command || "...";
|
|
@@ -165,16 +137,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
165
137
|
// Write Tool
|
|
166
138
|
// =========================================================================
|
|
167
139
|
pi.registerTool({
|
|
168
|
-
|
|
169
|
-
label: "write",
|
|
170
|
-
description:
|
|
171
|
-
"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.",
|
|
172
|
-
parameters: getBuiltInTools(process.cwd()).write.parameters,
|
|
173
|
-
|
|
174
|
-
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
175
|
-
const tools = getBuiltInTools(ctx.cwd);
|
|
176
|
-
return tools.write.execute(toolCallId, params, signal, onUpdate);
|
|
177
|
-
},
|
|
140
|
+
...tools.write,
|
|
178
141
|
|
|
179
142
|
renderCall(args, theme, _context) {
|
|
180
143
|
const path = shortenPath(args.path || "");
|
|
@@ -207,16 +170,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
207
170
|
// Edit Tool
|
|
208
171
|
// =========================================================================
|
|
209
172
|
pi.registerTool({
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
description:
|
|
213
|
-
"Edit a file by replacing exact text. The oldText must match exactly (including whitespace). Use this for precise, surgical edits.",
|
|
214
|
-
parameters: getBuiltInTools(process.cwd()).edit.parameters,
|
|
215
|
-
|
|
216
|
-
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
217
|
-
const tools = getBuiltInTools(ctx.cwd);
|
|
218
|
-
return tools.edit.execute(toolCallId, params, signal, onUpdate);
|
|
219
|
-
},
|
|
173
|
+
...tools.edit,
|
|
174
|
+
renderShell: "default",
|
|
220
175
|
|
|
221
176
|
renderCall(args, theme, _context) {
|
|
222
177
|
const path = shortenPath(args.path || "");
|
|
@@ -252,16 +207,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
252
207
|
// Find Tool
|
|
253
208
|
// =========================================================================
|
|
254
209
|
pi.registerTool({
|
|
255
|
-
|
|
256
|
-
label: "find",
|
|
257
|
-
description:
|
|
258
|
-
"Find files by name pattern (glob). Searches recursively from the specified path. Output limited to 200 results.",
|
|
259
|
-
parameters: getBuiltInTools(process.cwd()).find.parameters,
|
|
260
|
-
|
|
261
|
-
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
262
|
-
const tools = getBuiltInTools(ctx.cwd);
|
|
263
|
-
return tools.find.execute(toolCallId, params, signal, onUpdate);
|
|
264
|
-
},
|
|
210
|
+
...tools.find,
|
|
265
211
|
|
|
266
212
|
renderCall(args, theme, _context) {
|
|
267
213
|
const pattern = args.pattern || "";
|
|
@@ -310,16 +256,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
310
256
|
// Grep Tool
|
|
311
257
|
// =========================================================================
|
|
312
258
|
pi.registerTool({
|
|
313
|
-
|
|
314
|
-
label: "grep",
|
|
315
|
-
description:
|
|
316
|
-
"Search file contents by regex pattern. Uses ripgrep for fast searching. Output limited to 200 matches.",
|
|
317
|
-
parameters: getBuiltInTools(process.cwd()).grep.parameters,
|
|
318
|
-
|
|
319
|
-
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
320
|
-
const tools = getBuiltInTools(ctx.cwd);
|
|
321
|
-
return tools.grep.execute(toolCallId, params, signal, onUpdate);
|
|
322
|
-
},
|
|
259
|
+
...tools.grep,
|
|
323
260
|
|
|
324
261
|
renderCall(args, theme, _context) {
|
|
325
262
|
const pattern = args.pattern || "";
|
|
@@ -372,16 +309,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
372
309
|
// Ls Tool
|
|
373
310
|
// =========================================================================
|
|
374
311
|
pi.registerTool({
|
|
375
|
-
|
|
376
|
-
label: "ls",
|
|
377
|
-
description:
|
|
378
|
-
"List directory contents with file sizes. Shows files and directories with their sizes. Output limited to 500 entries.",
|
|
379
|
-
parameters: getBuiltInTools(process.cwd()).ls.parameters,
|
|
380
|
-
|
|
381
|
-
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
382
|
-
const tools = getBuiltInTools(ctx.cwd);
|
|
383
|
-
return tools.ls.execute(toolCallId, params, signal, onUpdate);
|
|
384
|
-
},
|
|
312
|
+
...tools.ls,
|
|
385
313
|
|
|
386
314
|
renderCall(args, theme, _context) {
|
|
387
315
|
const path = shortenPath(args.path || ".");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.0.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "1.0.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
package/examples/rpc-client.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Run one prompt through a Pi RPC child process.
|
|
3
3
|
*
|
|
4
4
|
* Build the coding-agent package first, then run:
|
|
5
|
-
*
|
|
5
|
+
* node examples/rpc-client.ts "Explain this repository"
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { dirname, join } from "node:path";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Demonstrates how to build a custom UI on top of the RPC protocol,
|
|
6
6
|
* including handling extension UI requests (select, confirm, input, editor).
|
|
7
7
|
*
|
|
8
|
-
* Usage:
|
|
8
|
+
* Usage: node examples/rpc-extension-ui.ts
|
|
9
9
|
*
|
|
10
10
|
* Slash commands:
|
|
11
11
|
* /select - demo select dialog
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codemode, Tool Search, and MCP
|
|
3
|
+
*
|
|
4
|
+
* The CLI loads `codemode`, `tool_search`, and MCP as built-in extensions. SDK sessions add
|
|
5
|
+
* them to the resource loader's extension factories.
|
|
6
|
+
*
|
|
7
|
+
* `codemode` and `tool_search` are registered inactive. Enable them through the `defaultTools` setting
|
|
8
|
+
* (`tools` would also restrict the session to the named tools, which hides MCP tools), or let the
|
|
9
|
+
* MCP extension activate them: `codemode` for servers with `codemode` exposure, `tool_search` for
|
|
10
|
+
* servers with `deferred` exposure.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
createAgentSession,
|
|
15
|
+
createCodemodeExtension,
|
|
16
|
+
createMcpExtension,
|
|
17
|
+
createToolSearchExtension,
|
|
18
|
+
DefaultResourceLoader,
|
|
19
|
+
getAgentDir,
|
|
20
|
+
SessionManager,
|
|
21
|
+
SettingsManager,
|
|
22
|
+
} from "@earendil-works/pi-coding-agent";
|
|
23
|
+
|
|
24
|
+
const cwd = process.cwd();
|
|
25
|
+
|
|
26
|
+
const resourceLoader = new DefaultResourceLoader({
|
|
27
|
+
cwd,
|
|
28
|
+
agentDir: getAgentDir(),
|
|
29
|
+
extensionFactories: [
|
|
30
|
+
createCodemodeExtension({ mode: "on" }),
|
|
31
|
+
createToolSearchExtension(),
|
|
32
|
+
// Reads mcp.json from the agent directory and the trusted project, like the CLI.
|
|
33
|
+
createMcpExtension(),
|
|
34
|
+
],
|
|
35
|
+
});
|
|
36
|
+
await resourceLoader.reload();
|
|
37
|
+
|
|
38
|
+
const settingsManager = SettingsManager.create(cwd);
|
|
39
|
+
// `+name` adds to the configured default tools instead of replacing them.
|
|
40
|
+
settingsManager.applyOverrides({ defaultTools: ["+codemode", "+tool_search"] });
|
|
41
|
+
|
|
42
|
+
const { session } = await createAgentSession({
|
|
43
|
+
resourceLoader,
|
|
44
|
+
settingsManager,
|
|
45
|
+
sessionManager: SessionManager.inMemory(),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
// Emits session_start, which connects the MCP servers in the background.
|
|
50
|
+
await session.bindExtensions({});
|
|
51
|
+
console.log("Active tools:", session.getActiveToolNames().join(", "));
|
|
52
|
+
session.subscribe((event) => {
|
|
53
|
+
if (event.type === "message_update" && event.assistantMessageEvent.type === "text_delta") {
|
|
54
|
+
process.stdout.write(event.assistantMessageEvent.delta);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
await session.prompt("Use codemode to count the TypeScript files in src/ and list the three largest.");
|
|
58
|
+
console.log();
|
|
59
|
+
} finally {
|
|
60
|
+
session.dispose();
|
|
61
|
+
}
|
package/examples/sdk/README.md
CHANGED
|
@@ -21,12 +21,13 @@ The runtime example shows how to build a recreate function that closes over proc
|
|
|
21
21
|
| `11-sessions.ts` | In-memory, persistent, continue, list sessions |
|
|
22
22
|
| `12-full-control.ts` | Replace everything, no discovery |
|
|
23
23
|
| `13-session-runtime.ts` | Manage runtime-backed session replacement |
|
|
24
|
+
| `14-codemode-mcp.ts` | Add the `codemode`, `tool_search`, and MCP extensions |
|
|
24
25
|
|
|
25
26
|
## Running
|
|
26
27
|
|
|
27
28
|
```bash
|
|
28
29
|
cd packages/coding-agent
|
|
29
|
-
|
|
30
|
+
node examples/sdk/01-minimal.ts
|
|
30
31
|
```
|
|
31
32
|
|
|
32
33
|
## Quick Reference
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@averyyy/pi-coding-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-piclient.1",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"scripts": {
|
|
48
48
|
"clean": "shx rm -rf dist",
|
|
49
49
|
"build": "npm run build:unbundled && node ../../scripts/build-coding-agent-bundle.mjs",
|
|
50
|
-
"build:unbundled": "
|
|
51
|
-
"build:binary": "npm --prefix ../tui run build && npm --prefix ../telemetry run build && npm --prefix ../ai run build && npm --prefix ../agent run build && npm --prefix ../protocol run build && npm --prefix ../client run build && npm run build && bun build --compile --no-compile-autoload-bunfig ./
|
|
50
|
+
"build:unbundled": "tsc -p tsconfig.build.json && shx chmod +x dist/cli.js dist/rpc-entry.js && npm run copy-assets",
|
|
51
|
+
"build:binary": "npm --prefix ../tui run build && npm --prefix ../telemetry run build && npm --prefix ../ai run build && npm --prefix ../agent run build && npm --prefix ../protocol run build && npm --prefix ../client run build && npm run build && bun build --compile --no-compile-autoload-bunfig ./dist/bun/cli.js ./src/utils/image-resize-worker.ts ./src/extensions/codemode/worker.ts --outfile dist/pi && npm run copy-binary-assets",
|
|
52
52
|
"copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/modes/interactive/assets && shx cp src/modes/interactive/assets/*.png dist/modes/interactive/assets/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/",
|
|
53
53
|
"copy-binary-assets": "shx cp package.json dist/ && shx cp README.md dist/ && shx cp CHANGELOG.md dist/ && shx mkdir -p dist/theme && shx cp src/modes/interactive/theme/*.json dist/theme/ && shx mkdir -p dist/assets && shx cp src/modes/interactive/assets/*.png dist/assets/ && shx mkdir -p dist/export-html/vendor && shx cp src/core/export-html/template.html dist/export-html/ && shx cp src/core/export-html/vendor/*.js dist/export-html/vendor/ && shx cp -r docs dist/ && shx cp -r examples dist/ && shx cp ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/",
|
|
54
54
|
"test": "vitest --run",
|
|
@@ -56,10 +56,12 @@
|
|
|
56
56
|
"prepublishOnly": "npm run clean && npm run build && npm run shrinkwrap"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@earendil-works/chord": "^0.
|
|
60
|
-
"@earendil-works/pi-agent-core": "npm:@averyyy/pi-agent-core@0.
|
|
61
|
-
"@earendil-works/pi-ai": "npm:@averyyy/pi-ai@0.
|
|
62
|
-
"@earendil-works/pi-
|
|
59
|
+
"@earendil-works/chord": "^1.0.0",
|
|
60
|
+
"@earendil-works/pi-agent-core": "npm:@averyyy/pi-agent-core@1.0.0-piclient.1",
|
|
61
|
+
"@earendil-works/pi-ai": "npm:@averyyy/pi-ai@1.0.0-piclient.1",
|
|
62
|
+
"@earendil-works/pi-codemode": "^1.0.0",
|
|
63
|
+
"@earendil-works/pi-mcp": "^1.0.0",
|
|
64
|
+
"@earendil-works/pi-tui": "npm:@averyyy/pi-tui@1.0.0-piclient.1",
|
|
63
65
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
64
66
|
"chalk": "6.0.0",
|
|
65
67
|
"cross-spawn": "7.0.6",
|
|
@@ -71,6 +73,7 @@
|
|
|
71
73
|
"jiti": "2.7.0",
|
|
72
74
|
"minimatch": "10.2.6",
|
|
73
75
|
"proper-lockfile": "4.1.2",
|
|
76
|
+
"quickjs-wasi": "3.6.2",
|
|
74
77
|
"semver": "7.8.5",
|
|
75
78
|
"typebox": "1.3.27",
|
|
76
79
|
"undici": "8.10.2",
|
|
@@ -80,9 +83,9 @@
|
|
|
80
83
|
"protobufjs": "7.6.6"
|
|
81
84
|
},
|
|
82
85
|
"devDependencies": {
|
|
83
|
-
"@earendil-works/pi-client": "^0.
|
|
84
|
-
"@earendil-works/pi-protocol": "^0.
|
|
85
|
-
"@earendil-works/pi-server": "^0.
|
|
86
|
+
"@earendil-works/pi-client": "^1.0.0",
|
|
87
|
+
"@earendil-works/pi-protocol": "^1.0.0",
|
|
88
|
+
"@earendil-works/pi-server": "^1.0.0",
|
|
86
89
|
"@types/cross-spawn": "6.0.6",
|
|
87
90
|
"@types/hosted-git-info": "3.0.5",
|
|
88
91
|
"@types/node": "22.19.19",
|
|
@@ -90,8 +93,7 @@
|
|
|
90
93
|
"@types/semver": "7.7.1",
|
|
91
94
|
"marked": "18.0.11",
|
|
92
95
|
"shx": "0.4.0",
|
|
93
|
-
"
|
|
94
|
-
"vitest": "4.1.9"
|
|
96
|
+
"vitest": "4.1.11"
|
|
95
97
|
},
|
|
96
98
|
"keywords": [
|
|
97
99
|
"coding-agent",
|