@punch-bot/cli 0.85.1 → 1.2.0
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 +572 -3
- package/README.md +82 -174
- 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-DA6M7CRN.js +6 -0
- package/dist/bundle/chunks/anthropic.js +2 -2
- package/dist/bundle/chunks/azure-openai-responses-IJO5RNR3.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +10 -2
- package/dist/bundle/chunks/chunk-22CYIUS4.js +2 -0
- package/dist/bundle/chunks/chunk-2M76JOVH.js +8 -0
- package/dist/bundle/chunks/chunk-5HTGPCR7.js +2 -0
- package/dist/bundle/chunks/chunk-5OD3Y36V.js +11 -0
- package/dist/bundle/chunks/chunk-6C5VKHGV.js +50 -0
- package/dist/bundle/chunks/chunk-F5ZABL6Z.js +20 -0
- package/dist/bundle/chunks/{chunk-3DNTDXPG.js → chunk-FJPXW4TE.js} +3 -3
- package/dist/bundle/chunks/chunk-FLX3SJDL.js +1156 -0
- package/dist/bundle/chunks/chunk-HACVPRBJ.js +11 -0
- package/dist/bundle/chunks/chunk-ITZNWD4K.js +2 -0
- package/dist/bundle/chunks/chunk-J7I2NFJ7.js +82 -0
- package/dist/bundle/chunks/chunk-JHYQSLCR.js +2 -0
- package/dist/bundle/chunks/chunk-LPXNMA2W.js +2 -0
- package/dist/bundle/chunks/chunk-OO6DJ3CL.js +31 -0
- package/dist/bundle/chunks/chunk-PMRZO46Y.js +2 -0
- package/dist/bundle/chunks/{chunk-TRDNDS6A.js → chunk-PYGXRV27.js} +5 -2
- package/dist/bundle/chunks/chunk-RDZVAGPR.js +2 -0
- package/dist/bundle/chunks/{chunk-XDUWOHPL.js → chunk-S3GGRYIO.js} +2 -2
- package/dist/bundle/chunks/chunk-UTB4DTYQ.js +2 -0
- package/dist/bundle/chunks/chunk-WUIPA42N.js +14 -0
- package/dist/bundle/chunks/chunk-XIX7LUWI.js +2 -0
- package/dist/bundle/chunks/chunk-YWHGLBPB.js +2 -0
- package/dist/bundle/chunks/chunk-ZBURYEWF.js +2 -0
- package/dist/bundle/chunks/cli-QAQLORRY.js +51 -0
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-UTBL2KOF.js +2 -0
- package/dist/bundle/chunks/codemode-worker.js +478 -0
- package/dist/bundle/chunks/execute-2Z6BN5R3.js +499 -0
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/google-generative-ai-JSIIVUNP.js +2 -0
- package/dist/bundle/chunks/google-vertex-BZ3ID54S.js +2 -0
- package/dist/bundle/chunks/image-resize-worker.js +1 -1
- package/dist/bundle/chunks/jiti-loader-C3NU2SDH.js +21 -0
- package/dist/bundle/chunks/jiti-static-loader-E6ANQD5T.js +2 -0
- package/dist/bundle/chunks/{lib-HGQMNYVT.js → lib-TEDK3E5I.js} +2 -2
- package/dist/bundle/chunks/llama-cpp-classify-FYN623RH.js +22 -0
- package/dist/bundle/chunks/meta.js +2 -0
- package/dist/bundle/chunks/mistral-conversations-RMNTDYQK.js +5 -0
- package/dist/bundle/chunks/node-N5BSDOA5.js +16 -0
- package/dist/bundle/chunks/{node-4PXJTSWH.js → node-TWVVAGPO.js} +1 -1
- package/dist/bundle/chunks/openai-chatgpt.js +75 -0
- package/dist/bundle/chunks/openai-codex-responses-O3P3UWDP.js +10 -0
- package/dist/bundle/chunks/openai-codex.js +2 -2
- package/dist/bundle/chunks/openai-completions-G4BKSHGH.js +7 -0
- package/dist/bundle/chunks/openai-decisions-WVPMQ4JD.js +5 -0
- package/dist/bundle/chunks/openai-responses-377V6EDU.js +3 -0
- package/dist/bundle/chunks/{openrouter-images-N4XVVFSD.js → openrouter-images-YU24TD7D.js} +1 -1
- package/dist/bundle/chunks/openrouter.js +2 -2
- package/dist/bundle/chunks/{pi-messages-ZRYGTSON.js → pi-messages-V27DSLVC.js} +2 -2
- package/dist/bundle/chunks/radius.js +2 -2
- package/dist/bundle/chunks/runtime-R6O72Q4R.js +2 -0
- package/dist/bundle/chunks/typesafe-system-one-ZSK3RN4B.js +2 -0
- package/dist/bundle/chunks/virtual-modules-FOSN3OT2.js +2 -0
- package/dist/bundle/cli-runtime.js +3 -0
- package/dist/bundle/cli.js +4 -2
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts +1 -2
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +73 -53
- 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/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/cli/experimental/transport-address.d.ts +21 -0
- package/dist/cli/experimental/transport-address.d.ts.map +1 -0
- package/dist/cli/experimental/transport-address.js +89 -0
- package/dist/cli/experimental/transport-address.js.map +1 -0
- package/dist/cli/file-processor.d.ts +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 +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 +5 -35
- package/dist/cli/project-trust.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/config.d.ts +30 -11
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +72 -21
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +4 -3
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +37 -27
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +1 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +14 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +270 -22
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +1174 -410
- 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 +20 -13
- 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 +42 -52
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/bug-report-upload.d.ts +12 -0
- package/dist/core/bug-report-upload.d.ts.map +1 -0
- package/dist/core/bug-report-upload.js +22 -0
- package/dist/core/bug-report-upload.js.map +1 -0
- package/dist/core/bug-report.d.ts +184 -0
- package/dist/core/bug-report.d.ts.map +1 -0
- package/dist/core/bug-report.js +292 -0
- package/dist/core/bug-report.js.map +1 -0
- package/dist/core/cache-stats.d.ts.map +1 -1
- package/dist/core/cache-stats.js +12 -1
- package/dist/core/cache-stats.js.map +1 -1
- package/dist/core/cache-warmer.d.ts +103 -0
- package/dist/core/cache-warmer.d.ts.map +1 -0
- package/dist/core/cache-warmer.js +356 -0
- package/dist/core/cache-warmer.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +2 -2
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +5 -3
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +164 -88
- 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 +8 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +32 -26
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/crash-log.d.ts +27 -0
- package/dist/core/crash-log.d.ts.map +1 -0
- package/dist/core/crash-log.js +140 -0
- package/dist/core/crash-log.js.map +1 -0
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/delivery.d.ts.map +1 -1
- package/dist/core/delivery.js.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 +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 +93 -34
- package/dist/core/export-html/tool-renderer.d.ts +5 -11
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +8 -99
- 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 +2 -0
- package/dist/core/extensions/jiti-loader.d.ts.map +1 -0
- package/dist/core/extensions/jiti-loader.js +4 -0
- package/dist/core/extensions/jiti-loader.js.map +1 -0
- package/dist/core/extensions/jiti-static-loader.d.ts +2 -0
- package/dist/core/extensions/jiti-static-loader.d.ts.map +1 -0
- package/dist/core/extensions/jiti-static-loader.js +4 -0
- package/dist/core/extensions/jiti-static-loader.js.map +1 -0
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +102 -74
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +44 -14
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +297 -169
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +482 -238
- 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 +3 -0
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -0
- package/dist/core/extensions/virtual-modules.js +35 -0
- package/dist/core/extensions/virtual-modules.js.map +1 -0
- 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 -22
- 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 +13 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +13 -4
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +139 -0
- package/dist/core/mcp-servers.d.ts.map +1 -0
- package/dist/core/mcp-servers.js +232 -0
- package/dist/core/mcp-servers.js.map +1 -0
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +1 -0
- package/dist/core/messages.js.map +1 -1
- package/dist/{modes/interactive → core}/model-catalog-refresh.d.ts +2 -2
- package/dist/core/model-catalog-refresh.d.ts.map +1 -0
- package/dist/{modes/interactive → core}/model-catalog-refresh.js +2 -2
- package/dist/core/model-catalog-refresh.js.map +1 -0
- package/dist/core/model-config.d.ts +886 -80
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +33 -148
- 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 +19 -46
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +149 -359
- 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 +205 -43
- 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 +103 -0
- package/dist/core/nested-tool-calls.d.ts.map +1 -0
- package/dist/core/nested-tool-calls.js +179 -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 +62 -15
- package/dist/core/package-manager.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/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +2 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +6 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +68 -37
- 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 +42 -20
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +126 -40
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/radius.d.ts +5 -0
- package/dist/core/radius.d.ts.map +1 -1
- package/dist/core/radius.js +8 -0
- package/dist/core/radius.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +19 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +102 -34
- 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 +11 -2
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +170 -42
- 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 +16 -5
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +124 -52
- 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 +6 -2
- package/dist/core/session-export.d.ts.map +1 -1
- package/dist/core/session-export.js +14 -13
- package/dist/core/session-export.js.map +1 -1
- package/dist/core/session-manager.d.ts +72 -13
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +277 -124
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +65 -0
- package/dist/core/settings-defaults.d.ts.map +1 -0
- package/dist/core/settings-defaults.js +66 -0
- package/dist/core/settings-defaults.js.map +1 -0
- 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 +41 -126
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +165 -52
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +224 -0
- package/dist/core/settings-schema.d.ts.map +1 -0
- package/dist/core/settings-schema.js +285 -0
- package/dist/core/settings-schema.js.map +1 -0
- package/dist/core/skills.d.ts +4 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +6 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +3 -2
- package/dist/core/slash-commands.js.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 +55 -6
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +128 -93
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/telemetry.d.ts +2 -0
- package/dist/core/telemetry.d.ts.map +1 -1
- package/dist/core/telemetry.js +45 -0
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/theme/dark.json +78 -0
- package/dist/core/theme/light.json +78 -0
- package/dist/core/theme/system-theme.d.ts +54 -0
- package/dist/core/theme/system-theme.d.ts.map +1 -0
- package/dist/core/theme/system-theme.js +547 -0
- package/dist/core/theme/system-theme.js.map +1 -0
- package/dist/core/theme/theme-schema.d.ts +28 -0
- package/dist/core/theme/theme-schema.d.ts.map +1 -0
- package/dist/core/theme/theme-schema.js +105 -0
- package/dist/core/theme/theme-schema.js.map +1 -0
- package/dist/core/theme/theme-tokens.d.ts +257 -0
- package/dist/core/theme/theme-tokens.d.ts.map +1 -0
- package/dist/core/theme/theme-tokens.js +94 -0
- package/dist/core/theme/theme-tokens.js.map +1 -0
- package/dist/core/theme/theme.d.ts +162 -0
- package/dist/core/theme/theme.d.ts.map +1 -0
- package/dist/{modes/interactive → core}/theme/theme.js +265 -402
- package/dist/core/theme/theme.js.map +1 -0
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/bash.d.ts +14 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +43 -6
- 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 +1 -2
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +0 -3
- 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 +0 -2
- 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 +0 -2
- 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 +0 -2
- 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 +40 -10
- 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 +17 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +23 -4
- package/dist/core/tools/read.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 +0 -2
- 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 +3 -1
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +28 -1
- 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/browser/index.d.ts.map +1 -1
- package/dist/extensions/browser/index.js.map +1 -1
- 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 +665 -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 +33 -0
- package/dist/extensions/codemode/index.js.map +1 -0
- package/dist/extensions/codemode/tool.d.ts +124 -0
- package/dist/extensions/codemode/tool.d.ts.map +1 -0
- package/dist/extensions/codemode/tool.js +286 -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/context-pruning/compress_context.d.ts.map +1 -1
- package/dist/extensions/context-pruning/compress_context.js +1 -3
- package/dist/extensions/context-pruning/compress_context.js.map +1 -1
- package/dist/extensions/context-pruning/context-pruning-state.d.ts.map +1 -1
- package/dist/extensions/context-pruning/context-pruning-state.js.map +1 -1
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +6 -2
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/llama/client.d.ts +2 -0
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +7 -3
- 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 +0 -4
- 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 +103 -13
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/llama/ui.d.ts +3 -2
- package/dist/extensions/llama/ui.d.ts.map +1 -1
- package/dist/extensions/llama/ui.js +106 -364
- 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 +494 -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 +84 -0
- package/dist/extensions/mcp/config.d.ts.map +1 -0
- package/dist/extensions/mcp/config.js +196 -0
- package/dist/extensions/mcp/config.js.map +1 -0
- package/dist/extensions/mcp/index.d.ts +71 -2
- package/dist/extensions/mcp/index.d.ts.map +1 -1
- package/dist/extensions/mcp/index.js +839 -131
- package/dist/extensions/mcp/index.js.map +1 -1
- 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 +102 -0
- package/dist/extensions/mcp/oauth.d.ts.map +1 -0
- package/dist/extensions/mcp/oauth.js +428 -0
- package/dist/extensions/mcp/oauth.js.map +1 -0
- package/dist/extensions/mcp/resources.d.ts +36 -0
- package/dist/extensions/mcp/resources.d.ts.map +1 -0
- package/dist/extensions/mcp/resources.js +261 -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 +378 -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 +263 -0
- package/dist/extensions/mcp/tools.js.map +1 -0
- package/dist/extensions/punch/a2a-listen.d.ts +9 -0
- package/dist/extensions/punch/a2a-listen.d.ts.map +1 -0
- package/dist/extensions/punch/a2a-listen.js +88 -0
- package/dist/extensions/punch/a2a-listen.js.map +1 -0
- package/dist/extensions/punch/a2a.d.ts +12 -0
- package/dist/extensions/punch/a2a.d.ts.map +1 -0
- package/dist/extensions/punch/a2a.js +106 -0
- package/dist/extensions/punch/a2a.js.map +1 -0
- package/dist/extensions/punch/auth.d.ts.map +1 -1
- package/dist/extensions/punch/auth.js.map +1 -1
- package/dist/extensions/punch/collabs.d.ts.map +1 -1
- package/dist/extensions/punch/collabs.js.map +1 -1
- package/dist/extensions/punch/index.d.ts.map +1 -1
- package/dist/extensions/punch/index.js +9 -14
- package/dist/extensions/punch/index.js.map +1 -1
- package/dist/extensions/punch/routines.d.ts +1 -3
- package/dist/extensions/punch/routines.d.ts.map +1 -1
- package/dist/extensions/punch/routines.js +1 -121
- package/dist/extensions/punch/routines.js.map +1 -1
- package/dist/extensions/punch/server.d.ts.map +1 -1
- package/dist/extensions/punch/server.js.map +1 -1
- package/dist/extensions/punch/timezone.d.ts.map +1 -1
- package/dist/extensions/punch/timezone.js.map +1 -1
- package/dist/extensions/punch/todos.d.ts.map +1 -1
- package/dist/extensions/punch/todos.js.map +1 -1
- package/dist/extensions/report-progress/index.d.ts.map +1 -1
- package/dist/extensions/report-progress/index.js.map +1 -1
- package/dist/extensions/subagent/agents.d.ts.map +1 -1
- package/dist/extensions/subagent/agents.js.map +1 -1
- package/dist/extensions/subagent/index.d.ts.map +1 -1
- package/dist/extensions/subagent/index.js +0 -372
- package/dist/extensions/subagent/index.js.map +1 -1
- 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 +71 -0
- package/dist/extensions/tool-search/tool.d.ts.map +1 -0
- package/dist/extensions/tool-search/tool.js +187 -0
- package/dist/extensions/tool-search/tool.js.map +1 -0
- package/dist/extensions/webfetch/index.d.ts.map +1 -1
- package/dist/extensions/webfetch/index.js.map +1 -1
- package/dist/extensions/websearch/index.d.ts.map +1 -1
- package/dist/extensions/websearch/index.js.map +1 -1
- package/dist/index.d.ts +13 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +139 -173
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +0 -20
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts +0 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js +0 -1
- package/dist/modes/index.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 +4 -0
- 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 +16 -46
- 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 +43 -43
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/rpc-entry.d.ts.map +1 -1
- package/dist/rpc-entry.js.map +1 -1
- package/dist/server/a2a/harness-runner.d.ts.map +1 -1
- package/dist/server/a2a/harness-runner.js.map +1 -1
- package/dist/server/a2a/run-server.d.ts.map +1 -1
- package/dist/server/a2a/run-server.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 +8 -0
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js +30 -11
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +5 -2
- 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 +15 -41
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +96 -38
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/colors.d.ts +73 -0
- package/dist/utils/colors.d.ts.map +1 -0
- package/dist/utils/colors.js +273 -0
- package/dist/utils/colors.js.map +1 -0
- 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/fuzzy.d.ts +16 -0
- package/dist/utils/fuzzy.d.ts.map +1 -0
- package/dist/utils/fuzzy.js +111 -0
- package/dist/utils/fuzzy.js.map +1 -0
- 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 +12 -0
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js +5 -0
- 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 +3 -2
- 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 +9 -10
- 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 +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/oklab.d.ts +43 -0
- package/dist/utils/oklab.d.ts.map +1 -0
- package/dist/utils/oklab.js +210 -0
- package/dist/utils/oklab.js.map +1 -0
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/output-files.d.ts +15 -0
- package/dist/utils/output-files.d.ts.map +1 -0
- package/dist/utils/output-files.js +30 -0
- package/dist/utils/output-files.js.map +1 -0
- 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 +8 -1
- 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 +3 -1
- package/dist/utils/tool-result-images.d.ts.map +1 -1
- package/dist/utils/tool-result-images.js +4 -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 +3 -0
- package/dist/utils/wsl.d.ts.map +1 -0
- package/dist/utils/wsl.js +15 -0
- package/dist/utils/wsl.js.map +1 -0
- package/dist/utils/zip.d.ts +7 -0
- package/dist/utils/zip.d.ts.map +1 -0
- package/dist/utils/zip.js +60 -0
- package/dist/utils/zip.js.map +1 -0
- package/docs/cli-integration.md +106 -0
- package/docs/cli.md +333 -0
- package/docs/codemode.md +230 -0
- package/docs/compaction.md +47 -28
- package/docs/configuration.md +47 -0
- package/docs/containerization.md +109 -82
- package/docs/custom-provider.md +109 -713
- package/docs/docs.json +148 -96
- package/docs/environment-variables.md +18 -3
- package/docs/extensions.md +284 -604
- package/docs/how-pi-works.md +49 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/index.md +24 -69
- package/docs/json.md +193 -65
- package/docs/keybindings.md +58 -103
- package/docs/llama-cpp.md +24 -4
- package/docs/mcp.md +272 -0
- package/docs/message-types.md +279 -0
- package/docs/models.md +124 -489
- package/docs/nvidia-rtx-llama-cpp.md +96 -0
- package/docs/packages.md +67 -166
- package/docs/prompt-templates.md +31 -68
- package/docs/providers.md +158 -228
- package/docs/quickstart.md +61 -106
- package/docs/rpc-commands.md +860 -0
- package/docs/rpc-extension-ui.md +200 -0
- package/docs/rpc.md +131 -1554
- package/docs/sdk.md +79 -1158
- package/docs/security.md +72 -32
- package/docs/session-format.md +58 -215
- package/docs/sessions.md +35 -114
- package/docs/settings.md +98 -326
- package/docs/shell-aliases.md +85 -5
- package/docs/skills.md +51 -190
- package/docs/slash-commands.md +60 -0
- package/docs/subagents.md +2 -0
- package/docs/terminal-setup.md +7 -182
- package/docs/termux.md +74 -83
- package/docs/themes.md +89 -273
- package/docs/tmux.md +31 -39
- package/docs/tui.md +74 -910
- package/docs/usage.md +52 -129
- package/docs/virtual-models.md +114 -0
- package/docs/windows.md +45 -17
- package/examples/README.md +13 -5
- package/examples/extensions/README.md +4 -30
- package/examples/extensions/custom-provider-anthropic/index.ts +18 -12
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +17 -17
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/package.json +14 -14
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +5 -5
- package/examples/extensions/debug-provider.ts +69 -0
- package/examples/extensions/dynamic-resources/dynamic.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +5 -5
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/jev-router.ts +113 -0
- package/examples/extensions/prompt-customizer.ts +19 -67
- 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 +20 -20
- package/examples/rpc-client.ts +35 -0
- package/examples/sdk/14-codemode-mcp.ts +61 -0
- package/examples/sdk/README.md +3 -2
- package/npm-shrinkwrap.json +2425 -0
- package/package.json +20 -29
- package/schemas/models.schema.json +1157 -0
- package/schemas/settings.schema.json +734 -0
- package/schemas/theme.schema.json +365 -0
- package/dist/bundle/chunks/anthropic-messages-ASRU76PT.js +0 -6
- package/dist/bundle/chunks/azure-openai-responses-UGF6LMEX.js +0 -2
- package/dist/bundle/chunks/chunk-5PRUVL6W.js +0 -1770
- package/dist/bundle/chunks/chunk-6R7UI4IY.js +0 -2
- package/dist/bundle/chunks/chunk-A3JYRWB6.js +0 -2
- package/dist/bundle/chunks/chunk-CHB3CEFP.js +0 -2
- package/dist/bundle/chunks/chunk-ELBMWBDG.js +0 -11
- package/dist/bundle/chunks/chunk-GMWCTUPB.js +0 -2
- package/dist/bundle/chunks/chunk-GTBU4EAF.js +0 -2
- package/dist/bundle/chunks/chunk-NUHFSC37.js +0 -25
- package/dist/bundle/chunks/chunk-UIWY7TU5.js +0 -42
- package/dist/bundle/chunks/chunk-XNGRGP62.js +0 -2
- package/dist/bundle/chunks/google-generative-ai-VCD2PGIY.js +0 -2
- package/dist/bundle/chunks/google-vertex-L6U34ZRC.js +0 -2
- package/dist/bundle/chunks/mistral-conversations-IXWQ2YKN.js +0 -5
- package/dist/bundle/chunks/node-5YXRXMVN.js +0 -16
- package/dist/bundle/chunks/openai-codex-responses-P7HKQLIT.js +0 -10
- package/dist/bundle/chunks/openai-completions-O7BFLP3U.js +0 -7
- package/dist/bundle/chunks/openai-responses-QAKWAYVG.js +0 -2
- package/dist/cli/config-selector.d.ts +0 -16
- package/dist/cli/config-selector.d.ts.map +0 -1
- package/dist/cli/config-selector.js +0 -32
- package/dist/cli/config-selector.js.map +0 -1
- package/dist/cli/session-picker.d.ts +0 -10
- package/dist/cli/session-picker.d.ts.map +0 -1
- package/dist/cli/session-picker.js +0 -36
- package/dist/cli/session-picker.js.map +0 -1
- package/dist/cli/startup-ui.d.ts +0 -20
- package/dist/cli/startup-ui.d.ts.map +0 -1
- package/dist/cli/startup-ui.js +0 -185
- package/dist/cli/startup-ui.js.map +0 -1
- package/dist/core/keybindings.d.ts +0 -428
- package/dist/core/keybindings.d.ts.map +0 -1
- package/dist/core/keybindings.js +0 -321
- package/dist/core/keybindings.js.map +0 -1
- package/dist/core/tools/render-utils.d.ts +0 -24
- package/dist/core/tools/render-utils.d.ts.map +0 -1
- package/dist/core/tools/render-utils.js +0 -65
- package/dist/core/tools/render-utils.js.map +0 -1
- package/dist/core/tools/renderers/bash.d.ts +0 -12
- package/dist/core/tools/renderers/bash.d.ts.map +0 -1
- package/dist/core/tools/renderers/bash.js +0 -130
- package/dist/core/tools/renderers/bash.js.map +0 -1
- package/dist/core/tools/renderers/edit.d.ts +0 -23
- package/dist/core/tools/renderers/edit.d.ts.map +0 -1
- package/dist/core/tools/renderers/edit.js +0 -167
- package/dist/core/tools/renderers/edit.js.map +0 -1
- package/dist/core/tools/renderers/find.d.ts +0 -10
- package/dist/core/tools/renderers/find.d.ts.map +0 -1
- package/dist/core/tools/renderers/find.js +0 -64
- package/dist/core/tools/renderers/find.js.map +0 -1
- package/dist/core/tools/renderers/grep.d.ts +0 -10
- package/dist/core/tools/renderers/grep.d.ts.map +0 -1
- package/dist/core/tools/renderers/grep.js +0 -69
- package/dist/core/tools/renderers/grep.js.map +0 -1
- package/dist/core/tools/renderers/index.d.ts +0 -28
- package/dist/core/tools/renderers/index.d.ts.map +0 -1
- package/dist/core/tools/renderers/index.js +0 -47
- package/dist/core/tools/renderers/index.js.map +0 -1
- package/dist/core/tools/renderers/ls.d.ts +0 -10
- package/dist/core/tools/renderers/ls.d.ts.map +0 -1
- package/dist/core/tools/renderers/ls.js +0 -58
- package/dist/core/tools/renderers/ls.js.map +0 -1
- package/dist/core/tools/renderers/read.d.ts +0 -11
- package/dist/core/tools/renderers/read.d.ts.map +0 -1
- package/dist/core/tools/renderers/read.js +0 -129
- package/dist/core/tools/renderers/read.js.map +0 -1
- package/dist/core/tools/renderers/write.d.ts +0 -10
- package/dist/core/tools/renderers/write.d.ts.map +0 -1
- package/dist/core/tools/renderers/write.js +0 -153
- package/dist/core/tools/renderers/write.js.map +0 -1
- package/dist/extensions/mcp/mcp-client.d.ts +0 -31
- package/dist/extensions/mcp/mcp-client.d.ts.map +0 -1
- package/dist/extensions/mcp/mcp-client.js +0 -149
- package/dist/extensions/mcp/mcp-client.js.map +0 -1
- package/dist/extensions/mcp/mcp-config.d.ts +0 -47
- package/dist/extensions/mcp/mcp-config.d.ts.map +0 -1
- package/dist/extensions/mcp/mcp-config.js +0 -281
- package/dist/extensions/mcp/mcp-config.js.map +0 -1
- package/dist/extensions/mcp/mcp-transport.d.ts +0 -65
- package/dist/extensions/mcp/mcp-transport.d.ts.map +0 -1
- package/dist/extensions/mcp/mcp-transport.js +0 -278
- package/dist/extensions/mcp/mcp-transport.js.map +0 -1
- package/dist/modes/interactive/assets/clankolas.png +0 -0
- package/dist/modes/interactive/chat-viewport.d.ts +0 -20
- package/dist/modes/interactive/chat-viewport.d.ts.map +0 -1
- package/dist/modes/interactive/chat-viewport.js +0 -28
- package/dist/modes/interactive/chat-viewport.js.map +0 -1
- package/dist/modes/interactive/components/armin.d.ts +0 -34
- package/dist/modes/interactive/components/armin.d.ts.map +0 -1
- package/dist/modes/interactive/components/armin.js +0 -333
- package/dist/modes/interactive/components/armin.js.map +0 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +0 -26
- package/dist/modes/interactive/components/assistant-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/assistant-message.js +0 -158
- package/dist/modes/interactive/components/assistant-message.js.map +0 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +0 -34
- package/dist/modes/interactive/components/bash-execution.d.ts.map +0 -1
- package/dist/modes/interactive/components/bash-execution.js +0 -175
- package/dist/modes/interactive/components/bash-execution.js.map +0 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts +0 -16
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +0 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -54
- package/dist/modes/interactive/components/bordered-loader.js.map +0 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +0 -16
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/branch-summary-message.js +0 -44
- package/dist/modes/interactive/components/branch-summary-message.js.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -16
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +0 -45
- package/dist/modes/interactive/components/compaction-summary-message.js.map +0 -1
- package/dist/modes/interactive/components/config-selector.d.ts +0 -102
- package/dist/modes/interactive/components/config-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/config-selector.js +0 -761
- package/dist/modes/interactive/components/config-selector.js.map +0 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts +0 -14
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +0 -1
- package/dist/modes/interactive/components/countdown-timer.js +0 -33
- package/dist/modes/interactive/components/countdown-timer.js.map +0 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +0 -30
- package/dist/modes/interactive/components/custom-editor.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-editor.js +0 -115
- package/dist/modes/interactive/components/custom-editor.js.map +0 -1
- package/dist/modes/interactive/components/custom-entry.d.ts +0 -19
- package/dist/modes/interactive/components/custom-entry.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-entry.js +0 -52
- package/dist/modes/interactive/components/custom-entry.js.map +0 -1
- package/dist/modes/interactive/components/custom-message.d.ts +0 -22
- package/dist/modes/interactive/components/custom-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-message.js +0 -87
- package/dist/modes/interactive/components/custom-message.js.map +0 -1
- package/dist/modes/interactive/components/daxnuts.d.ts +0 -23
- package/dist/modes/interactive/components/daxnuts.d.ts.map +0 -1
- package/dist/modes/interactive/components/daxnuts.js +0 -140
- package/dist/modes/interactive/components/daxnuts.js.map +0 -1
- package/dist/modes/interactive/components/diff.d.ts +0 -12
- package/dist/modes/interactive/components/diff.d.ts.map +0 -1
- package/dist/modes/interactive/components/diff.js +0 -133
- package/dist/modes/interactive/components/diff.js.map +0 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts +0 -15
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +0 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -21
- package/dist/modes/interactive/components/dynamic-border.js.map +0 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts +0 -5
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +0 -1
- package/dist/modes/interactive/components/earendil-announcement.js +0 -40
- package/dist/modes/interactive/components/earendil-announcement.js.map +0 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +0 -21
- package/dist/modes/interactive/components/extension-editor.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-editor.js +0 -98
- package/dist/modes/interactive/components/extension-editor.js.map +0 -1
- package/dist/modes/interactive/components/extension-input.d.ts +0 -23
- package/dist/modes/interactive/components/extension-input.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-input.js +0 -61
- package/dist/modes/interactive/components/extension-input.js.map +0 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +0 -26
- package/dist/modes/interactive/components/extension-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-selector.js +0 -83
- package/dist/modes/interactive/components/extension-selector.js.map +0 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +0 -25
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +0 -1
- package/dist/modes/interactive/components/first-time-setup.js +0 -103
- package/dist/modes/interactive/components/first-time-setup.js.map +0 -1
- package/dist/modes/interactive/components/footer.d.ts +0 -32
- package/dist/modes/interactive/components/footer.d.ts.map +0 -1
- package/dist/modes/interactive/components/footer.js +0 -222
- package/dist/modes/interactive/components/footer.js.map +0 -1
- package/dist/modes/interactive/components/index.d.ts +0 -34
- package/dist/modes/interactive/components/index.d.ts.map +0 -1
- package/dist/modes/interactive/components/index.js +0 -35
- package/dist/modes/interactive/components/index.js.map +0 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +0 -13
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +0 -1
- package/dist/modes/interactive/components/keybinding-hints.js +0 -36
- package/dist/modes/interactive/components/keybinding-hints.js.map +0 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +0 -52
- package/dist/modes/interactive/components/login-dialog.d.ts.map +0 -1
- package/dist/modes/interactive/components/login-dialog.js +0 -188
- package/dist/modes/interactive/components/login-dialog.js.map +0 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +0 -3
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +0 -1
- package/dist/modes/interactive/components/markdown-transform.js +0 -19
- package/dist/modes/interactive/components/markdown-transform.js.map +0 -1
- package/dist/modes/interactive/components/mermaid.d.ts +0 -11
- package/dist/modes/interactive/components/mermaid.d.ts.map +0 -1
- package/dist/modes/interactive/components/mermaid.js +0 -75
- package/dist/modes/interactive/components/mermaid.js.map +0 -1
- package/dist/modes/interactive/components/model-selector.d.ts +0 -60
- package/dist/modes/interactive/components/model-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/model-selector.js +0 -361
- package/dist/modes/interactive/components/model-selector.js.map +0 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +0 -33
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/oauth-selector.js +0 -163
- package/dist/modes/interactive/components/oauth-selector.js.map +0 -1
- package/dist/modes/interactive/components/question-selector.d.ts +0 -24
- package/dist/modes/interactive/components/question-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/question-selector.js +0 -158
- package/dist/modes/interactive/components/question-selector.js.map +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +0 -46
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +0 -326
- package/dist/modes/interactive/components/scoped-models-selector.js.map +0 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts +0 -23
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +0 -1
- package/dist/modes/interactive/components/session-selector-search.js +0 -155
- package/dist/modes/interactive/components/session-selector-search.js.map +0 -1
- package/dist/modes/interactive/components/session-selector.d.ts +0 -95
- package/dist/modes/interactive/components/session-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/session-selector.js +0 -867
- package/dist/modes/interactive/components/session-selector.js.map +0 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +0 -92
- package/dist/modes/interactive/components/settings-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/settings-selector.js +0 -709
- package/dist/modes/interactive/components/settings-selector.js.map +0 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts +0 -72
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +0 -1
- package/dist/modes/interactive/components/settings-submenu.js +0 -165
- package/dist/modes/interactive/components/settings-submenu.js.map +0 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts +0 -10
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/show-images-selector.js +0 -39
- package/dist/modes/interactive/components/show-images-selector.js.map +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +0 -17
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +0 -47
- package/dist/modes/interactive/components/skill-invocation-message.js.map +0 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +0 -30
- package/dist/modes/interactive/components/status-indicator.d.ts.map +0 -1
- package/dist/modes/interactive/components/status-indicator.js +0 -67
- package/dist/modes/interactive/components/status-indicator.js.map +0 -1
- package/dist/modes/interactive/components/theme-selector.d.ts +0 -11
- package/dist/modes/interactive/components/theme-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/theme-selector.js +0 -50
- package/dist/modes/interactive/components/theme-selector.js.map +0 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts +0 -23
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/thinking-selector.js +0 -109
- package/dist/modes/interactive/components/thinking-selector.js.map +0 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +0 -80
- package/dist/modes/interactive/components/tool-execution.d.ts.map +0 -1
- package/dist/modes/interactive/components/tool-execution.js +0 -328
- package/dist/modes/interactive/components/tool-execution.js.map +0 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +0 -94
- package/dist/modes/interactive/components/tree-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/tree-selector.js +0 -1245
- package/dist/modes/interactive/components/tree-selector.js.map +0 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +0 -23
- package/dist/modes/interactive/components/trust-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/trust-selector.js +0 -91
- package/dist/modes/interactive/components/trust-selector.js.map +0 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +0 -30
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/user-message-selector.js +0 -114
- package/dist/modes/interactive/components/user-message-selector.js.map +0 -1
- package/dist/modes/interactive/components/user-message.d.ts +0 -16
- package/dist/modes/interactive/components/user-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/user-message.js +0 -49
- package/dist/modes/interactive/components/user-message.js.map +0 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +0 -24
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +0 -1
- package/dist/modes/interactive/components/visual-truncate.js +0 -33
- package/dist/modes/interactive/components/visual-truncate.js.map +0 -1
- package/dist/modes/interactive/external-editor.d.ts +0 -12
- package/dist/modes/interactive/external-editor.d.ts.map +0 -1
- package/dist/modes/interactive/external-editor.js +0 -38
- package/dist/modes/interactive/external-editor.js.map +0 -1
- package/dist/modes/interactive/interactive-mode.d.ts +0 -443
- package/dist/modes/interactive/interactive-mode.d.ts.map +0 -1
- package/dist/modes/interactive/interactive-mode.js +0 -5604
- package/dist/modes/interactive/interactive-mode.js.map +0 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +0 -1
- package/dist/modes/interactive/model-catalog-refresh.js.map +0 -1
- package/dist/modes/interactive/model-search.d.ts +0 -12
- package/dist/modes/interactive/model-search.d.ts.map +0 -1
- package/dist/modes/interactive/model-search.js +0 -15
- package/dist/modes/interactive/model-search.js.map +0 -1
- package/dist/modes/interactive/session-share.d.ts +0 -16
- package/dist/modes/interactive/session-share.d.ts.map +0 -1
- package/dist/modes/interactive/session-share.js +0 -184
- package/dist/modes/interactive/session-share.js.map +0 -1
- package/dist/modes/interactive/theme/dark.json +0 -91
- package/dist/modes/interactive/theme/light.json +0 -90
- package/dist/modes/interactive/theme/theme-controller.d.ts +0 -41
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme-controller.js +0 -130
- package/dist/modes/interactive/theme/theme-controller.js.map +0 -1
- package/dist/modes/interactive/theme/theme-json.d.ts +0 -84
- package/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme-json.js +0 -130
- package/dist/modes/interactive/theme/theme-json.js.map +0 -1
- package/dist/modes/interactive/theme/theme-schema.json +0 -356
- package/dist/modes/interactive/theme/theme.d.ts +0 -131
- package/dist/modes/interactive/theme/theme.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme.js.map +0 -1
- package/dist/modes/interactive/tui-renderer.d.ts +0 -21
- package/dist/modes/interactive/tui-renderer.d.ts.map +0 -1
- package/dist/modes/interactive/tui-renderer.js +0 -66
- package/dist/modes/interactive/tui-renderer.js.map +0 -1
- package/docs/development.md +0 -90
- package/examples/extensions/border-status-editor.ts +0 -145
- package/examples/extensions/built-in-tool-renderer.ts +0 -249
- package/examples/extensions/custom-footer.ts +0 -64
- package/examples/extensions/custom-header.ts +0 -73
- package/examples/extensions/doom-overlay/README.md +0 -46
- package/examples/extensions/doom-overlay/doom/build/doom.js +0 -21
- package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
- package/examples/extensions/doom-overlay/doom/build.sh +0 -152
- package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +0 -72
- package/examples/extensions/doom-overlay/doom-component.ts +0 -132
- package/examples/extensions/doom-overlay/doom-engine.ts +0 -173
- package/examples/extensions/doom-overlay/doom-keys.ts +0 -104
- package/examples/extensions/doom-overlay/index.ts +0 -74
- package/examples/extensions/doom-overlay/wad-finder.ts +0 -55
- package/examples/extensions/entry-renderer.ts +0 -41
- package/examples/extensions/github-issue-autocomplete.ts +0 -185
- package/examples/extensions/handoff.ts +0 -190
- package/examples/extensions/interactive-shell.ts +0 -196
- package/examples/extensions/kimi-deferred-tools.ts +0 -61
- package/examples/extensions/message-renderer.ts +0 -59
- package/examples/extensions/minimal-mode.ts +0 -426
- package/examples/extensions/modal-editor.ts +0 -85
- package/examples/extensions/overlay-qa-tests.ts +0 -1450
- package/examples/extensions/overlay-test.ts +0 -153
- package/examples/extensions/plan-mode/README.md +0 -66
- package/examples/extensions/plan-mode/index.ts +0 -390
- package/examples/extensions/plan-mode/utils.ts +0 -168
- package/examples/extensions/preset.ts +0 -436
- package/examples/extensions/qna.ts +0 -118
- package/examples/extensions/question.ts +0 -278
- package/examples/extensions/questionnaire.ts +0 -440
- package/examples/extensions/rainbow-editor.ts +0 -88
- package/examples/extensions/snake.ts +0 -343
- package/examples/extensions/space-invaders.ts +0 -560
- package/examples/extensions/structured-output.ts +0 -65
- package/examples/extensions/summarize.ts +0 -199
- package/examples/extensions/tic-tac-toe.ts +0 -1008
- package/examples/extensions/todo.ts +0 -297
- package/examples/extensions/tools.ts +0 -146
- package/examples/extensions/truncated-tool.ts +0 -195
- package/examples/plugins/pi-example-plugin/README.md +0 -38
- package/examples/plugins/pi-example-plugin/package.json +0 -10
- package/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
- package/examples/plugins/pi-example-plugin/src/session.ts +0 -23
- package/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
- package/examples/rpc-extension-ui.ts +0 -641
- /package/dist/bundle/chunks/{chunk-PATAL4PO.js → chunk-7ZC4UXSL.js} +0 -0
|
@@ -12,17 +12,18 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Modes use this class and add their own I/O layer on top.
|
|
14
14
|
*/
|
|
15
|
-
import type
|
|
15
|
+
import { type Agent, type AgentEvent, type AgentMessage, type AgentState, type AgentTool, type ThinkingLevel } from "@punch-bot/agent";
|
|
16
16
|
import type { ImageContent, Model, TextContent } from "@punch-bot/ai/compat";
|
|
17
17
|
import { type BashResult } from "./bash-executor.ts";
|
|
18
|
+
import type { CacheWarmer, CacheWarmingStatus } from "./cache-warmer.ts";
|
|
18
19
|
import { type CompactionResult } from "./compaction/index.ts";
|
|
19
20
|
import { type ContextUsage, type ExtensionCommandContextActions, type ExtensionErrorListener, type ExtensionMode, ExtensionRunner, type ExtensionUIContext, type InputSource, type ReplacedSessionContext, type SessionStartEvent, type ShutdownHandler, type ToolDefinition, type ToolInfo } from "./extensions/index.ts";
|
|
20
|
-
import type
|
|
21
|
+
import { type CustomMessage } from "./messages.ts";
|
|
21
22
|
import type { ModelRuntime } from "./model-runtime.ts";
|
|
22
23
|
import { type PromptTemplate } from "./prompt-templates.ts";
|
|
23
24
|
import type { ResourceLoader } from "./resource-loader.ts";
|
|
24
|
-
import type
|
|
25
|
-
import type
|
|
25
|
+
import { type BranchSummaryEntry, type SessionEntry, SessionManager } from "./session-manager.ts";
|
|
26
|
+
import { type CacheWarmingMode, type SettingsManager } from "./settings-manager.ts";
|
|
26
27
|
import { type BashOperations } from "./tools/bash.ts";
|
|
27
28
|
/** Parsed skill block from a user message */
|
|
28
29
|
export interface ParsedSkillBlock {
|
|
@@ -36,15 +37,22 @@ export interface ParsedSkillBlock {
|
|
|
36
37
|
* Returns null if the text doesn't contain a skill block.
|
|
37
38
|
*/
|
|
38
39
|
export declare function parseSkillBlock(text: string): ParsedSkillBlock | null;
|
|
40
|
+
/** Tool execution events of calls a tool made through `ctx.executeTool()` carry `parentToolCallId`. */
|
|
41
|
+
type WithParentToolCallId<E> = E extends {
|
|
42
|
+
type: "tool_execution_start" | "tool_execution_update" | "tool_execution_end";
|
|
43
|
+
} ? E & {
|
|
44
|
+
parentToolCallId?: string;
|
|
45
|
+
} : E;
|
|
39
46
|
/** Session-specific events that extend the core AgentEvent */
|
|
40
|
-
export type AgentSessionEvent = Exclude<AgentEvent, {
|
|
47
|
+
export type AgentSessionEvent = WithParentToolCallId<Exclude<AgentEvent, {
|
|
41
48
|
type: "agent_end";
|
|
42
|
-
}
|
|
49
|
+
}>> | {
|
|
43
50
|
type: "agent_end";
|
|
44
51
|
messages: AgentMessage[];
|
|
45
52
|
willRetry: boolean;
|
|
46
53
|
} | {
|
|
47
54
|
type: "agent_settled";
|
|
55
|
+
aborted: boolean;
|
|
48
56
|
} | {
|
|
49
57
|
type: "queue_update";
|
|
50
58
|
steering: readonly string[];
|
|
@@ -117,11 +125,29 @@ export interface AgentSessionConfig {
|
|
|
117
125
|
customTools?: ToolDefinition[];
|
|
118
126
|
/** Canonical model/auth runtime used by coding-agent internals. */
|
|
119
127
|
modelRuntime: ModelRuntime;
|
|
128
|
+
/** Keeps the prompt cache entry of the last session request warm. */
|
|
129
|
+
cacheWarmer?: Pick<CacheWarmer, "cancel" | "status" | "onAgentSettled" | "onModeChanged" | "onWarmed">;
|
|
120
130
|
/** Initial active built-in tool names. Default: [read, bash, edit, write] */
|
|
121
131
|
initialActiveToolNames?: string[];
|
|
122
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Whether the initial tools come from the `defaultTools` setting. When true, a resumed session
|
|
134
|
+
* replaces them with the loadout its transcript records, with `defaultToolModifiers` applied, and
|
|
135
|
+
* reload activates tools newly added to the setting. Tools removed from it stay active.
|
|
136
|
+
*/
|
|
137
|
+
usesDefaultTools?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* `+name`/`-name` entries applied on top of the `defaultTools` setting, from `--tools`. Reload
|
|
140
|
+
* applies them to the reloaded setting too, so a removed tool stays removed.
|
|
141
|
+
*/
|
|
142
|
+
defaultToolModifiers?: string[];
|
|
143
|
+
/**
|
|
144
|
+
* Optional allowlist of tool names or patterns (`*` matches any characters). When provided, only
|
|
145
|
+
* matching tools are exposed. A non-empty list without `mcp__` entries also keeps MCP tools
|
|
146
|
+
* registered for codemode and tool_search; only tool_search can declare them. An empty list
|
|
147
|
+
* exposes no tools.
|
|
148
|
+
*/
|
|
123
149
|
allowedToolNames?: string[];
|
|
124
|
-
/** Optional denylist of tool names. When provided,
|
|
150
|
+
/** Optional denylist of tool names or patterns. When provided, matching tools are not exposed. */
|
|
125
151
|
excludedToolNames?: string[];
|
|
126
152
|
/**
|
|
127
153
|
* Override base tools (useful for custom runtimes).
|
|
@@ -145,6 +171,8 @@ export interface ExtensionBindings {
|
|
|
145
171
|
shutdownHandler?: ShutdownHandler;
|
|
146
172
|
onError?: ExtensionErrorListener;
|
|
147
173
|
}
|
|
174
|
+
export type QueuedInputDisposition = "handled" | "queued";
|
|
175
|
+
export type PromptDisposition = QueuedInputDisposition | "started";
|
|
148
176
|
/** Options for AgentSession.prompt() */
|
|
149
177
|
export interface PromptOptions {
|
|
150
178
|
/** Whether to dispatch extension commands and expand skill commands and prompt templates (default: true) */
|
|
@@ -155,8 +183,8 @@ export interface PromptOptions {
|
|
|
155
183
|
streamingBehavior?: "steer" | "followUp";
|
|
156
184
|
/** Source of input for extension input event handlers. Defaults to "interactive". */
|
|
157
185
|
source?: InputSource;
|
|
158
|
-
/** Internal hook used by RPC mode to observe prompt
|
|
159
|
-
preflightResult?: (
|
|
186
|
+
/** Internal hook used by RPC mode to observe how an accepted prompt was dispatched. Not called if the prompt is rejected. */
|
|
187
|
+
preflightResult?: (disposition: PromptDisposition) => void;
|
|
160
188
|
}
|
|
161
189
|
/** Options for model/thinking mutations. */
|
|
162
190
|
export interface ModelMutationOptions {
|
|
@@ -197,6 +225,7 @@ export declare class AgentSession {
|
|
|
197
225
|
private _unsubscribeAgent?;
|
|
198
226
|
private _eventListeners;
|
|
199
227
|
private _isAgentRunActive;
|
|
228
|
+
private _agentRunAbortRequested;
|
|
200
229
|
private _idleWaitPromise;
|
|
201
230
|
private _resolveIdleWait;
|
|
202
231
|
/** Tracks pending steering messages for UI display. Removed when delivered. */
|
|
@@ -213,18 +242,46 @@ export declare class AgentSession {
|
|
|
213
242
|
private _branchSummaryAbortController;
|
|
214
243
|
private _retryAbortController;
|
|
215
244
|
private _retryAttempt;
|
|
245
|
+
/**
|
|
246
|
+
* Failed response that the next request repeats, set by auto-retry and overflow recovery. The
|
|
247
|
+
* retry is routed with it as `failed`, since the context no longer contains it.
|
|
248
|
+
*/
|
|
249
|
+
private _failedResponse;
|
|
216
250
|
private readonly _bashAbortControllers;
|
|
217
251
|
private _pendingBashMessages;
|
|
218
252
|
private _extensionRunner;
|
|
219
253
|
private _turnIndex;
|
|
254
|
+
private readonly _entryIdsByMessage;
|
|
255
|
+
private readonly _boundaryDispatchedMessages;
|
|
256
|
+
private _lastAssistantMessage;
|
|
257
|
+
private _lastAssistantToolResults;
|
|
258
|
+
private _lastActivityOutcome;
|
|
259
|
+
private _isBeforeSettle;
|
|
260
|
+
private _abortDuringBeforeSettle;
|
|
261
|
+
private _isEmittingAgentSettled;
|
|
262
|
+
private readonly _deferredSettledActions;
|
|
220
263
|
private _resourceLoader;
|
|
221
264
|
private _customTools;
|
|
222
265
|
private _baseToolDefinitions;
|
|
223
266
|
private _cwd;
|
|
224
267
|
private _extensionRunnerRef?;
|
|
225
268
|
private _initialActiveToolNames?;
|
|
226
|
-
|
|
227
|
-
|
|
269
|
+
/**
|
|
270
|
+
* Tools of the restored or reloaded loadout that are not registered yet, such as tools of MCP
|
|
271
|
+
* servers that are still connecting. They are activated when they are registered, and dropped when
|
|
272
|
+
* `setActiveToolsByName()` deactivates a tool or the next agent run starts.
|
|
273
|
+
*/
|
|
274
|
+
private _pendingToolNames;
|
|
275
|
+
private _usesDefaultTools;
|
|
276
|
+
private _defaultToolModifiers;
|
|
277
|
+
/** Matches the `--tools` entries: tool names or patterns. */
|
|
278
|
+
private _allowedTools?;
|
|
279
|
+
/**
|
|
280
|
+
* Whether the allowlist filters MCP tools: it is empty (`--no-tools`) or names an MCP tool
|
|
281
|
+
* (`mcp__*`). Otherwise it keeps MCP tools registered for codemode and tool_search.
|
|
282
|
+
*/
|
|
283
|
+
private _allowlistFiltersMcp;
|
|
284
|
+
private _excludedTools?;
|
|
228
285
|
private _baseToolsOverride?;
|
|
229
286
|
private _sessionStartEvent;
|
|
230
287
|
private _extensionUIContext?;
|
|
@@ -235,17 +292,37 @@ export declare class AgentSession {
|
|
|
235
292
|
private _extensionErrorListener?;
|
|
236
293
|
private _extensionErrorUnsubscriber?;
|
|
237
294
|
private _modelRuntime;
|
|
295
|
+
private _cacheWarmer?;
|
|
238
296
|
private _toolRegistry;
|
|
297
|
+
/** Created on the first `ctx.executeTool()` call. */
|
|
298
|
+
private _nestedToolCalls;
|
|
299
|
+
/** Declared tools whose declarations requests leave out, from `prepareLoadout` hooks. */
|
|
300
|
+
private _hiddenDeclarations;
|
|
239
301
|
private _toolDefinitions;
|
|
240
302
|
private _toolPromptSnippets;
|
|
241
303
|
private _toolPromptGuidelines;
|
|
242
|
-
private _baseSystemPrompt;
|
|
243
304
|
private _baseSystemPromptOptions;
|
|
244
|
-
|
|
305
|
+
/** Prompt options after before_agent_start mutations for the active run. */
|
|
306
|
+
private _runSystemPromptOptions?;
|
|
245
307
|
constructor(config: AgentSessionConfig);
|
|
246
308
|
get modelRuntime(): ModelRuntime;
|
|
247
309
|
private _getRequiredRequestAuth;
|
|
248
310
|
private _getSummarizationRequestAuth;
|
|
311
|
+
/**
|
|
312
|
+
* The model whose limits apply to `message`, or undefined when the message came from another
|
|
313
|
+
* model. Under a virtual selection, that is the physical model that produced it.
|
|
314
|
+
*/
|
|
315
|
+
private _modelForMessage;
|
|
316
|
+
/**
|
|
317
|
+
* Record the selection on the current branch when the branch implies another one, so a resume
|
|
318
|
+
* restores it. Tree navigation can leave the latest `model_change` on another branch; responses
|
|
319
|
+
* cannot record a virtual selection because they name physical models. Responses do record a
|
|
320
|
+
* physical selection unless the branch holds a virtual one; checking a physical selection against
|
|
321
|
+
* responses would record it on every prompt while `prepareRequest` redirects to another model.
|
|
322
|
+
*/
|
|
323
|
+
private _recordSelection;
|
|
324
|
+
/** The model whose limits apply to the conversation. */
|
|
325
|
+
private _limitsModel;
|
|
249
326
|
/**
|
|
250
327
|
* Install tool hooks once on the Agent instance.
|
|
251
328
|
*
|
|
@@ -255,8 +332,29 @@ export declare class AgentSession {
|
|
|
255
332
|
* happens here instead of in wrappers.
|
|
256
333
|
*/
|
|
257
334
|
private _installAgentToolHooks;
|
|
335
|
+
/** `tool_call` handlers. `parentToolCallId` is set for calls another tool made. */
|
|
336
|
+
private _beforeToolCall;
|
|
337
|
+
/** `tool_result` handlers and image normalization. `parentToolCallId` is set for calls another tool made. */
|
|
338
|
+
private _afterToolCall;
|
|
339
|
+
/**
|
|
340
|
+
* Run a call that the tool call `parentToolCallId` made through `ctx.executeTool()`. It goes
|
|
341
|
+
* through the agent's tool pipeline with the session's hooks, against the callable tools.
|
|
342
|
+
*/
|
|
343
|
+
private _executeNestedToolCall;
|
|
344
|
+
/** Whether `projection`, the current session projection, exceeds the compaction threshold of `model`. */
|
|
345
|
+
private _exceedsCompactionThreshold;
|
|
258
346
|
private _compactBeforeNextAssistantResponse;
|
|
347
|
+
private _installAgentRequestProjection;
|
|
348
|
+
private _dispatchTurnEndBoundary;
|
|
349
|
+
private _installAgentBoundaryHooks;
|
|
259
350
|
private _installAgentNextTurnRefresh;
|
|
351
|
+
private _refreshFinalizedContext;
|
|
352
|
+
private _applyBoundaryDrafts;
|
|
353
|
+
private _createBoundaryPreviewManager;
|
|
354
|
+
private _getPendingBoundaryMessages;
|
|
355
|
+
private _buildBoundaryContext;
|
|
356
|
+
private _commitBoundaryDrafts;
|
|
357
|
+
private _reportInvalidBoundaryContinuation;
|
|
260
358
|
/** Emit an event to all listeners */
|
|
261
359
|
private _emit;
|
|
262
360
|
private _emitQueueUpdate;
|
|
@@ -264,13 +362,15 @@ export declare class AgentSession {
|
|
|
264
362
|
private _getIdleWaitPromise;
|
|
265
363
|
private _resolveIdleWaitIfIdle;
|
|
266
364
|
private _emitAgentSettled;
|
|
267
|
-
private _lastAssistantMessage;
|
|
268
365
|
/** Internal handler for agent events - shared by subscribe and reconnect */
|
|
269
366
|
private _handleAgentEvent;
|
|
270
367
|
private _willRetryAfterAgentEnd;
|
|
368
|
+
private _findPersistedMessageEntryId;
|
|
369
|
+
private _omitRecoveryAttempt;
|
|
271
370
|
/** Find the last assistant message in agent state (including aborted ones) */
|
|
272
371
|
private _findLastAssistantMessage;
|
|
273
372
|
private _replaceMessageInPlace;
|
|
373
|
+
/** Emit extension events based on agent events */
|
|
274
374
|
private _emitExtensionEvent;
|
|
275
375
|
/**
|
|
276
376
|
* Subscribe to agent events.
|
|
@@ -285,25 +385,38 @@ export declare class AgentSession {
|
|
|
285
385
|
* Call this when completely done with the session.
|
|
286
386
|
*/
|
|
287
387
|
dispose(): void;
|
|
388
|
+
/** Refresh the public finalized transcript from the canonical session projection. */
|
|
389
|
+
refreshContext(): void;
|
|
288
390
|
/** Full agent state */
|
|
289
391
|
get state(): AgentState;
|
|
392
|
+
/** Current cache-warming state and the policy inputs that produced it. */
|
|
393
|
+
get cacheWarmingStatus(): CacheWarmingStatus | undefined;
|
|
394
|
+
/** Persist the cache-warming mode and immediately reconcile active warming. */
|
|
395
|
+
setCacheWarmingMode(mode: CacheWarmingMode): void;
|
|
290
396
|
/** Current model (may be undefined if not yet selected) */
|
|
291
397
|
get model(): Model<any> | undefined;
|
|
292
398
|
/** Current thinking level */
|
|
293
399
|
get thinkingLevel(): ThinkingLevel;
|
|
400
|
+
/** Under a virtual selection, the physical model and thinking level of the latest successful response. */
|
|
401
|
+
get routedModel(): {
|
|
402
|
+
model: Model<any>;
|
|
403
|
+
thinkingLevel?: ThinkingLevel;
|
|
404
|
+
} | undefined;
|
|
294
405
|
/** Whether the session is currently processing an agent run or post-run continuation. */
|
|
295
406
|
get isStreaming(): boolean;
|
|
296
407
|
/** Whether the session has no active agent run, compaction, branch summary, retry, or queued continuation. */
|
|
297
408
|
get isIdle(): boolean;
|
|
298
|
-
/** Current effective system prompt
|
|
409
|
+
/** Current effective system prompt, including changes not yet sent to the model. */
|
|
299
410
|
get systemPrompt(): string;
|
|
300
411
|
/** Current retry attempt (0 if not retrying) */
|
|
301
412
|
get retryAttempt(): number;
|
|
302
413
|
/**
|
|
303
|
-
* Get the names of currently active tools.
|
|
304
|
-
*
|
|
414
|
+
* Get the names of currently active tools, which are the tools declared to the model.
|
|
415
|
+
* Tools with `codemode` or `deferred` exposure are callable from other tools without being active.
|
|
305
416
|
*/
|
|
306
417
|
getActiveToolNames(): string[];
|
|
418
|
+
/** Get the names of the tools that tools can call through `ctx.executeTool()`. */
|
|
419
|
+
getCallableToolNames(): string[];
|
|
307
420
|
/**
|
|
308
421
|
* Get all configured tools with name, description, parameter schema, prompt guidelines, and source metadata.
|
|
309
422
|
*/
|
|
@@ -311,11 +424,37 @@ export declare class AgentSession {
|
|
|
311
424
|
getToolDefinition(name: string): ToolDefinition | undefined;
|
|
312
425
|
/**
|
|
313
426
|
* Set active tools by name.
|
|
314
|
-
* Only tools in the registry can be enabled. Unknown tool names are ignored.
|
|
427
|
+
* Only tools in the registry can be enabled. Unknown and hidden tool names are ignored.
|
|
315
428
|
* Also rebuilds the system prompt to reflect the new tool set.
|
|
316
429
|
* Changes take effect on the next agent turn.
|
|
317
430
|
*/
|
|
318
431
|
setActiveToolsByName(toolNames: string[]): void;
|
|
432
|
+
private _setActiveTools;
|
|
433
|
+
/**
|
|
434
|
+
* Whether `--tools` and `--exclude-tools` keep the tool registered. MCP tools stay registered
|
|
435
|
+
* unless the allowlist filters them (see `_allowlistFiltersMcp`).
|
|
436
|
+
*/
|
|
437
|
+
private _isAllowedTool;
|
|
438
|
+
/**
|
|
439
|
+
* Whether the tool may be active, which declares it to the model. MCP tools the allowlist keeps
|
|
440
|
+
* without matching them are only for codemode and tool_search: they may be declared only when
|
|
441
|
+
* tool_search can load them (non-`direct` exposure and tool_search registered). This also applies
|
|
442
|
+
* to tools restored from the transcript or set by extensions.
|
|
443
|
+
*/
|
|
444
|
+
private _isActivatable;
|
|
445
|
+
private _getToolExposure;
|
|
446
|
+
/**
|
|
447
|
+
* Tools callable through `ctx.executeTool()`: the active `direct` tools and every registered
|
|
448
|
+
* `codemode` or `deferred` tool.
|
|
449
|
+
*/
|
|
450
|
+
private _getCallableTools;
|
|
451
|
+
/**
|
|
452
|
+
* Set the agent's tools for the given active tool names and return them. The active tools are
|
|
453
|
+
* the registered, non-hidden ones; they are declared to the model. Active tools with a
|
|
454
|
+
* `prepareLoadout` hook can change the declared descriptions and hide declarations from
|
|
455
|
+
* requests (see {@link _installHiddenDeclarationsProjection}).
|
|
456
|
+
*/
|
|
457
|
+
private _applyToolLoadout;
|
|
319
458
|
/** Whether compaction or branch summarization is currently running */
|
|
320
459
|
get isCompacting(): boolean;
|
|
321
460
|
/** All messages including custom types like BashExecutionMessage */
|
|
@@ -345,9 +484,59 @@ export declare class AgentSession {
|
|
|
345
484
|
private _normalizePromptSnippet;
|
|
346
485
|
private _normalizePromptGuidelines;
|
|
347
486
|
private _rebuildSystemPrompt;
|
|
348
|
-
|
|
487
|
+
/**
|
|
488
|
+
* Apply a prompt and tool loadout for the next request. Sets the executable tools and
|
|
489
|
+
* returns a system message patching the prompt sections the model currently has (replayed
|
|
490
|
+
* from `messages`), or undefined when the prompt is unchanged. Tool changes are declared by
|
|
491
|
+
* the agent loop before the request.
|
|
492
|
+
*
|
|
493
|
+
* A forced prompt does not affect the transcript: the structured sections are still diffed
|
|
494
|
+
* and persisted, and the forced text is projected onto the request by
|
|
495
|
+
* {@link _installAgentForcedPromptProjection}.
|
|
496
|
+
*/
|
|
497
|
+
private _preparePromptAndToolLoadout;
|
|
498
|
+
/**
|
|
499
|
+
* Send a forced prompt as the provider's leading system prompt without recording it.
|
|
500
|
+
*
|
|
501
|
+
* A `before_agent_start` handler that returns `systemPrompt` needs that exact text at the
|
|
502
|
+
* head of the request; a mid-conversation system message would leave the original prompt
|
|
503
|
+
* in place. The forced text is a rendering of the current prompt, so the transcript keeps
|
|
504
|
+
* its structured sections and the request is projected instead: the system messages
|
|
505
|
+
* collapse into one head holding the forced text and the current tools. Runs after the
|
|
506
|
+
* `context` extension handlers.
|
|
507
|
+
*/
|
|
508
|
+
/**
|
|
509
|
+
* Remove the declarations that `prepareLoadout` hooks hide from every request. The whole
|
|
510
|
+
* transcript is filtered with the current set, so the projected declarations stay consistent
|
|
511
|
+
* across requests and only change when the loadout does.
|
|
512
|
+
*/
|
|
513
|
+
private _installHiddenDeclarationsProjection;
|
|
514
|
+
private _installAgentForcedPromptProjection;
|
|
515
|
+
/**
|
|
516
|
+
* Restore the active tool loadout declared by the session transcript, if it declares one.
|
|
517
|
+
* Tools reachable only from other tools are never declared, but they do not depend on the active
|
|
518
|
+
* set, so the transcript's declarations are the whole loadout.
|
|
519
|
+
* @param modifiers `+name`/`-name` entries applied to the restored loadout.
|
|
520
|
+
*/
|
|
521
|
+
private _restoreToolsFromTranscript;
|
|
522
|
+
/**
|
|
523
|
+
* Start a run from a user or custom message. The session counts as busy from here on, so
|
|
524
|
+
* messages sent while before_agent_start handlers run are queued into this run instead of
|
|
525
|
+
* starting another, and an abort requested meanwhile aborts the run as soon as it exists.
|
|
526
|
+
* @param onStarted Called once the run's messages are prepared, before the first request.
|
|
527
|
+
*/
|
|
528
|
+
private _startRun;
|
|
529
|
+
/**
|
|
530
|
+
* Prepare a run and return its starting messages: compact first when needed, emit
|
|
531
|
+
* before_agent_start, apply the run's prompt options and tool loadout, and build the starting
|
|
532
|
+
* message followed by pending nextTurn messages (consumed here) and handler messages, with a
|
|
533
|
+
* system patch first when the prompt changed.
|
|
534
|
+
*/
|
|
535
|
+
private _prepareRun;
|
|
349
536
|
private _handlePostAgentRun;
|
|
537
|
+
private _runBeforeSettleBoundary;
|
|
350
538
|
private _runInputHandlers;
|
|
539
|
+
private _normalizePromptImages;
|
|
351
540
|
/**
|
|
352
541
|
* Send a prompt to the agent.
|
|
353
542
|
* - Handles extension commands (registered via pi.registerCommand) immediately, even during streaming
|
|
@@ -358,6 +547,9 @@ export declare class AgentSession {
|
|
|
358
547
|
* @throws Error if no model selected or no API key available (when not streaming)
|
|
359
548
|
*/
|
|
360
549
|
prompt(text: string, options?: PromptOptions): Promise<void>;
|
|
550
|
+
/**
|
|
551
|
+
* Try to execute an extension command. Returns true if command was found and executed.
|
|
552
|
+
*/
|
|
361
553
|
private _tryExecuteExtensionCommand;
|
|
362
554
|
/**
|
|
363
555
|
* Expand skill commands (/skill:name args) to their full content.
|
|
@@ -377,7 +569,7 @@ export declare class AgentSession {
|
|
|
377
569
|
*/
|
|
378
570
|
steer(text: string, images?: ImageContent[], options?: {
|
|
379
571
|
source?: InputSource;
|
|
380
|
-
}): Promise<
|
|
572
|
+
}): Promise<QueuedInputDisposition>;
|
|
381
573
|
/**
|
|
382
574
|
* Queue a follow-up message to be processed after the agent finishes.
|
|
383
575
|
* Delivered only when agent has no more tool calls or steering messages.
|
|
@@ -388,8 +580,14 @@ export declare class AgentSession {
|
|
|
388
580
|
*/
|
|
389
581
|
followUp(text: string, images?: ImageContent[], options?: {
|
|
390
582
|
source?: InputSource;
|
|
391
|
-
}): Promise<
|
|
583
|
+
}): Promise<QueuedInputDisposition>;
|
|
584
|
+
/**
|
|
585
|
+
* Internal: Queue a steering message (already expanded, no extension command check).
|
|
586
|
+
*/
|
|
392
587
|
private _queueSteer;
|
|
588
|
+
/**
|
|
589
|
+
* Internal: Queue a follow-up message (already expanded, no extension command check).
|
|
590
|
+
*/
|
|
393
591
|
private _queueFollowUp;
|
|
394
592
|
/**
|
|
395
593
|
* Throw an error if the text is an extension command.
|
|
@@ -503,6 +701,7 @@ export declare class AgentSession {
|
|
|
503
701
|
* Saves to settings.
|
|
504
702
|
*/
|
|
505
703
|
setFollowUpMode(mode: "all" | "one-at-a-time"): void;
|
|
704
|
+
/** Generate Pi's built-in compaction summary for manual and automatic compaction. */
|
|
506
705
|
private _runDefaultCompaction;
|
|
507
706
|
private _clearManualCompactionState;
|
|
508
707
|
/**
|
|
@@ -529,7 +728,38 @@ export declare class AgentSession {
|
|
|
529
728
|
* Cancel in-progress branch summarization.
|
|
530
729
|
*/
|
|
531
730
|
abortBranchSummary(): void;
|
|
731
|
+
/**
|
|
732
|
+
* Dispatch automatic compaction after `agent_end` or before prompt submission.
|
|
733
|
+
* Manual compaction does not call this method; it enters through `compact()`.
|
|
734
|
+
*
|
|
735
|
+
* Automatic cases:
|
|
736
|
+
* 1. Overflow with retry: a context-overflow error or recoverable length stop;
|
|
737
|
+
* remove the failed assistant message, compact, and retry the turn once.
|
|
738
|
+
* 2. Overflow without retry: a successful response exceeded the configured
|
|
739
|
+
* context window; compact but preserve the completed response.
|
|
740
|
+
* 3. Threshold without retry: valid or estimated context usage crossed the
|
|
741
|
+
* configured threshold; compact without retrying the completed response.
|
|
742
|
+
*
|
|
743
|
+
* Each case calls `_runAutoCompaction()`. After preparation and the
|
|
744
|
+
* `session_before_compact` hook, that method calls the lower-level `compact()`
|
|
745
|
+
* function imported from `./compaction/index.ts`, unless the hook cancels or
|
|
746
|
+
* supplies a custom result.
|
|
747
|
+
*
|
|
748
|
+
* @param assistantMessage The assistant message to check
|
|
749
|
+
* @param skipAbortedCheck If false, include aborted messages (for pre-prompt check). Default: true
|
|
750
|
+
* @returns Whether the post-run loop should call `agent.continue()` for overflow recovery or queued messages
|
|
751
|
+
*/
|
|
532
752
|
private _checkCompaction;
|
|
753
|
+
/**
|
|
754
|
+
* Execute threshold or overflow compaction. Manual compaction uses
|
|
755
|
+
* `AgentSession.compact()` instead. Both paths call the lower-level `compact()`
|
|
756
|
+
* function imported from `./compaction/index.ts` after preparation and extension
|
|
757
|
+
* interception.
|
|
758
|
+
*
|
|
759
|
+
* @param reason Automatic trigger selected by `_checkCompaction()`
|
|
760
|
+
* @param willRetry Whether to continue the interrupted turn after overflow compaction
|
|
761
|
+
* @returns Whether the post-run loop should call `agent.continue()`
|
|
762
|
+
*/
|
|
533
763
|
private _runAutoCompaction;
|
|
534
764
|
/**
|
|
535
765
|
* Toggle auto-compaction setting.
|
|
@@ -545,6 +775,10 @@ export declare class AgentSession {
|
|
|
545
775
|
private _refreshCurrentModelFromRegistry;
|
|
546
776
|
private _bindExtensionCore;
|
|
547
777
|
private _refreshToolRegistry;
|
|
778
|
+
/** Whether activating the tool declares it to the model. */
|
|
779
|
+
private _isDeclarable;
|
|
780
|
+
/** Whether registering the tool activates it, which declares it to the model. */
|
|
781
|
+
private _isActivatedOnRegistration;
|
|
548
782
|
private _buildRuntime;
|
|
549
783
|
reload(options?: {
|
|
550
784
|
beforeSessionStart?: () => void | Promise<void>;
|
|
@@ -561,6 +795,11 @@ export declare class AgentSession {
|
|
|
561
795
|
* the TUI needs to render the retry and recreate the underlying indicator.
|
|
562
796
|
*/
|
|
563
797
|
private _summarizationRetryCallbacks;
|
|
798
|
+
private _finishCancelledRetry;
|
|
799
|
+
/**
|
|
800
|
+
* Prepare a retryable error for continuation with exponential backoff.
|
|
801
|
+
* @returns true if the caller should continue the agent, false otherwise
|
|
802
|
+
*/
|
|
564
803
|
private _prepareRetry;
|
|
565
804
|
/**
|
|
566
805
|
* Cancel in-progress retry.
|
|
@@ -664,6 +903,14 @@ export declare class AgentSession {
|
|
|
664
903
|
* @returns The resolved output file path.
|
|
665
904
|
*/
|
|
666
905
|
exportToJsonl(outputPath?: string): string;
|
|
906
|
+
/**
|
|
907
|
+
* Ask the current model to describe what went wrong in this session for a bug report.
|
|
908
|
+
* Used when the user declines to share the transcript itself.
|
|
909
|
+
*/
|
|
910
|
+
summarizeForBugReport(options: {
|
|
911
|
+
hint?: string;
|
|
912
|
+
signal: AbortSignal;
|
|
913
|
+
}): Promise<string>;
|
|
667
914
|
/**
|
|
668
915
|
* Get text content of last assistant message.
|
|
669
916
|
* Useful for /copy command.
|
|
@@ -680,4 +927,5 @@ export declare class AgentSession {
|
|
|
680
927
|
*/
|
|
681
928
|
get extensionRunner(): ExtensionRunner;
|
|
682
929
|
}
|
|
930
|
+
export {};
|
|
683
931
|
//# sourceMappingURL=agent-session.d.ts.map
|