@relay-harness/coding-agent 0.0.0-stage → 1.0.3
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 +6122 -0
- package/LICENSE +22 -0
- package/README.md +79 -2
- package/dist/bun/cli.d.ts +5 -0
- package/dist/bun/cli.d.ts.map +1 -0
- package/dist/bun/cli.js +5 -0
- package/dist/bun/cli.js.map +1 -0
- package/dist/bun/restore-sandbox-env.d.ts +17 -0
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -0
- package/dist/bun/restore-sandbox-env.js +36 -0
- package/dist/bun/restore-sandbox-env.js.map +1 -0
- package/dist/bun/runtime-setup.d.ts +2 -0
- package/dist/bun/runtime-setup.d.ts.map +1 -0
- package/dist/bun/runtime-setup.js +12 -0
- package/dist/bun/runtime-setup.js.map +1 -0
- package/dist/bun/sandbox-env-setup.d.ts +2 -0
- package/dist/bun/sandbox-env-setup.d.ts.map +1 -0
- package/dist/bun/sandbox-env-setup.js +4 -0
- package/dist/bun/sandbox-env-setup.js.map +1 -0
- package/dist/bundle/chunks/anthropic-messages-TXWUAW5N.js +6 -0
- package/dist/bundle/chunks/anthropic.js +75 -0
- package/dist/bundle/chunks/azure-openai-responses-EJG46ESA.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +83 -0
- package/dist/bundle/chunks/chunk-3QND5D7W.js +82 -0
- package/dist/bundle/chunks/chunk-3XNI2SB6.js +15 -0
- package/dist/bundle/chunks/chunk-4L3WN2XY.js +2 -0
- package/dist/bundle/chunks/chunk-5H4IRYOE.js +1791 -0
- package/dist/bundle/chunks/chunk-6CYCI3EJ.js +12 -0
- package/dist/bundle/chunks/chunk-7ZC4UXSL.js +2 -0
- package/dist/bundle/chunks/chunk-A3JYRWB6.js +2 -0
- package/dist/bundle/chunks/chunk-C47CLQZK.js +2 -0
- package/dist/bundle/chunks/chunk-DRQDKNXA.js +2 -0
- package/dist/bundle/chunks/chunk-EQ2HXQGJ.js +2 -0
- package/dist/bundle/chunks/chunk-F5ZABL6Z.js +20 -0
- package/dist/bundle/chunks/chunk-H3QXYIF7.js +31 -0
- package/dist/bundle/chunks/chunk-ISNO4JTR.js +127 -0
- package/dist/bundle/chunks/chunk-KJUDFE6Y.js +11 -0
- package/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
- package/dist/bundle/chunks/chunk-LD2P6SFZ.js +2 -0
- package/dist/bundle/chunks/chunk-MP5FU7MG.js +20 -0
- package/dist/bundle/chunks/chunk-NS67SA75.js +2 -0
- package/dist/bundle/chunks/chunk-O7R77OAK.js +2 -0
- package/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
- package/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
- package/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
- package/dist/bundle/chunks/chunk-PTRF7IZB.js +2 -0
- package/dist/bundle/chunks/chunk-RZ4KG4BP.js +44 -0
- package/dist/bundle/chunks/chunk-S3GGRYIO.js +6 -0
- package/dist/bundle/chunks/chunk-TEPMHNKQ.js +2 -0
- package/dist/bundle/chunks/chunk-TRDNDS6A.js +4 -0
- package/dist/bundle/chunks/chunk-USJZMAIR.js +2 -0
- package/dist/bundle/chunks/chunk-UTB4DTYQ.js +2 -0
- package/dist/bundle/chunks/chunk-WMTXXI7H.js +4 -0
- package/dist/bundle/chunks/chunk-XDAWU2J5.js +132 -0
- package/dist/bundle/chunks/chunk-Z2G7KLPH.js +11 -0
- package/dist/bundle/chunks/cli-K4CNHWOI.js +51 -0
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-NM3JRRWQ.js +2 -0
- package/dist/bundle/chunks/codemode-worker.js +374 -0
- package/dist/bundle/chunks/easter-egg-3d-TGRCIHA4.js +2 -0
- package/dist/bundle/chunks/execute-6E5DA2QI.js +388 -0
- package/dist/bundle/chunks/github-copilot.js +2 -0
- package/dist/bundle/chunks/google-generative-ai-HYUNEOCJ.js +2 -0
- package/dist/bundle/chunks/google-vertex-J7MDGTNM.js +2 -0
- package/dist/bundle/chunks/https-proxy-agent-2VXB7436.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +2 -0
- 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/kimi-coding.js +2 -0
- package/dist/bundle/chunks/lib-TEDK3E5I.js +9 -0
- package/dist/bundle/chunks/llama-cpp-classify-XT44PI3C.js +22 -0
- package/dist/bundle/chunks/meta.js +2 -0
- package/dist/bundle/chunks/mistral-conversations-UD2HHXKZ.js +5 -0
- package/dist/bundle/chunks/multipart-parser-SQ6GDJL7.js +3 -0
- package/dist/bundle/chunks/node-N5BSDOA5.js +16 -0
- package/dist/bundle/chunks/node-TWVVAGPO.js +2 -0
- package/dist/bundle/chunks/openai-chatgpt.js +75 -0
- package/dist/bundle/chunks/openai-codex-responses-EMHXEJR4.js +10 -0
- package/dist/bundle/chunks/openai-codex.js +75 -0
- package/dist/bundle/chunks/openai-completions-LPKRZYMC.js +7 -0
- package/dist/bundle/chunks/openai-responses-TOOBRHUV.js +3 -0
- package/dist/bundle/chunks/openrouter-images-ZVXWCSIM.js +2 -0
- package/dist/bundle/chunks/openrouter.js +75 -0
- package/dist/bundle/chunks/relay-messages-QRFJXG5X.js +8 -0
- package/dist/bundle/chunks/runtime-O5HLCH3V.js +2 -0
- package/dist/bundle/chunks/src-UK77SYZE.js +4 -0
- package/dist/bundle/chunks/typesafe-system-one-PRR5K6CI.js +2 -0
- package/dist/bundle/chunks/virtual-modules-ZGB2J7DY.js +2 -0
- package/dist/bundle/chunks/xai.js +2 -0
- package/dist/bundle/cli-runtime.js +3 -0
- package/dist/bundle/cli.js +5 -0
- package/dist/bundle/index.js +2 -0
- package/dist/bundle/rpc-entry.js +3 -0
- package/dist/cli/args.d.ts +61 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +454 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/auth-check.d.ts +19 -0
- package/dist/cli/auth-check.d.ts.map +1 -0
- package/dist/cli/auth-check.js +50 -0
- package/dist/cli/auth-check.js.map +1 -0
- package/dist/cli/auth-command.d.ts +24 -0
- package/dist/cli/auth-command.d.ts.map +1 -0
- package/dist/cli/auth-command.js +103 -0
- package/dist/cli/auth-command.js.map +1 -0
- package/dist/cli/config-selector.d.ts +16 -0
- package/dist/cli/config-selector.d.ts.map +1 -0
- package/dist/cli/config-selector.js +32 -0
- package/dist/cli/config-selector.js.map +1 -0
- package/dist/cli/credential-print.d.ts +13 -0
- package/dist/cli/credential-print.d.ts.map +1 -0
- package/dist/cli/credential-print.js +76 -0
- package/dist/cli/credential-print.js.map +1 -0
- package/dist/cli/file-processor.d.ts +15 -0
- package/dist/cli/file-processor.d.ts.map +1 -0
- package/dist/cli/file-processor.js +71 -0
- package/dist/cli/file-processor.js.map +1 -0
- package/dist/cli/initial-message.d.ts +18 -0
- package/dist/cli/initial-message.d.ts.map +1 -0
- package/dist/cli/initial-message.js +22 -0
- package/dist/cli/initial-message.js.map +1 -0
- package/dist/cli/list-models.d.ts +9 -0
- package/dist/cli/list-models.d.ts.map +1 -0
- package/dist/cli/list-models.js +98 -0
- package/dist/cli/list-models.js.map +1 -0
- package/dist/cli/project-trust.d.ts +10 -0
- package/dist/cli/project-trust.d.ts.map +1 -0
- package/dist/cli/project-trust.js +48 -0
- package/dist/cli/project-trust.js.map +1 -0
- package/dist/cli/session-picker.d.ts +10 -0
- package/dist/cli/session-picker.d.ts.map +1 -0
- package/dist/cli/session-picker.js +36 -0
- package/dist/cli/session-picker.js.map +1 -0
- package/dist/cli/setup.d.ts +2 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +12 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/startup-ui.d.ts +20 -0
- package/dist/cli/startup-ui.d.ts.map +1 -0
- package/dist/cli/startup-ui.js +193 -0
- package/dist/cli/startup-ui.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +6 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +108 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +264 -0
- package/dist/config.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts +119 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/dist/core/agent-session-runtime.js +317 -0
- package/dist/core/agent-session-runtime.js.map +1 -0
- package/dist/core/agent-session-services.d.ts +86 -0
- package/dist/core/agent-session-services.d.ts.map +1 -0
- package/dist/core/agent-session-services.js +147 -0
- package/dist/core/agent-session-services.js.map +1 -0
- package/dist/core/agent-session.d.ts +891 -0
- package/dist/core/agent-session.d.ts.map +1 -0
- package/dist/core/agent-session.js +3553 -0
- package/dist/core/agent-session.js.map +1 -0
- package/dist/core/auth-guidance.d.ts +5 -0
- package/dist/core/auth-guidance.d.ts.map +1 -0
- package/dist/core/auth-guidance.js +21 -0
- package/dist/core/auth-guidance.js.map +1 -0
- package/dist/core/auth-storage.d.ts +72 -0
- package/dist/core/auth-storage.d.ts.map +1 -0
- package/dist/core/auth-storage.js +426 -0
- package/dist/core/auth-storage.js.map +1 -0
- package/dist/core/bash-executor.d.ts +32 -0
- package/dist/core/bash-executor.d.ts.map +1 -0
- package/dist/core/bash-executor.js +106 -0
- package/dist/core/bash-executor.js.map +1 -0
- package/dist/core/bug-report.d.ts +176 -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 +49 -0
- package/dist/core/cache-stats.d.ts.map +1 -0
- package/dist/core/cache-stats.js +112 -0
- package/dist/core/cache-stats.js.map +1 -0
- 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 +98 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/dist/core/compaction/branch-summarization.js +251 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts +145 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -0
- package/dist/core/compaction/compaction.js +744 -0
- package/dist/core/compaction/compaction.js.map +1 -0
- package/dist/core/compaction/index.d.ts +7 -0
- package/dist/core/compaction/index.d.ts.map +1 -0
- package/dist/core/compaction/index.js +7 -0
- package/dist/core/compaction/index.js.map +1 -0
- package/dist/core/compaction/utils.d.ts +39 -0
- package/dist/core/compaction/utils.d.ts.map +1 -0
- package/dist/core/compaction/utils.js +149 -0
- package/dist/core/compaction/utils.js.map +1 -0
- 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 +4 -0
- package/dist/core/defaults.d.ts.map +1 -0
- package/dist/core/defaults.js +11 -0
- package/dist/core/defaults.js.map +1 -0
- package/dist/core/diagnostics.d.ts +15 -0
- package/dist/core/diagnostics.d.ts.map +1 -0
- package/dist/core/diagnostics.js +2 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/event-bus.d.ts +9 -0
- package/dist/core/event-bus.d.ts.map +1 -0
- package/dist/core/event-bus.js +25 -0
- package/dist/core/event-bus.js.map +1 -0
- package/dist/core/exec.d.ts +29 -0
- package/dist/core/exec.d.ts.map +1 -0
- package/dist/core/exec.js +75 -0
- package/dist/core/exec.js.map +1 -0
- package/dist/core/experimental.d.ts +2 -0
- package/dist/core/experimental.d.ts.map +1 -0
- package/dist/core/experimental.js +4 -0
- package/dist/core/experimental.js.map +1 -0
- package/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/dist/core/export-html/ansi-to-html.js +249 -0
- package/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/dist/core/export-html/index.d.ts +37 -0
- package/dist/core/export-html/index.d.ts.map +1 -0
- package/dist/core/export-html/index.js +226 -0
- package/dist/core/export-html/index.js.map +1 -0
- package/dist/core/export-html/template.css +1076 -0
- package/dist/core/export-html/template.html +55 -0
- package/dist/core/export-html/template.js +1918 -0
- package/dist/core/export-html/tool-renderer.d.ts +34 -0
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/dist/core/export-html/tool-renderer.js +108 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -0
- package/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/dist/core/export-html/vendor/marked.min.js +78 -0
- package/dist/core/extensions/index.d.ts +12 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/index.js +9 -0
- package/dist/core/extensions/index.js.map +1 -0
- 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 +23 -0
- package/dist/core/extensions/loader.d.ts.map +1 -0
- package/dist/core/extensions/loader.js +701 -0
- package/dist/core/extensions/loader.js.map +1 -0
- package/dist/core/extensions/runner.d.ts +213 -0
- package/dist/core/extensions/runner.d.ts.map +1 -0
- package/dist/core/extensions/runner.js +1239 -0
- package/dist/core/extensions/runner.js.map +1 -0
- package/dist/core/extensions/types.d.ts +1720 -0
- package/dist/core/extensions/types.d.ts.map +1 -0
- package/dist/core/extensions/types.js +48 -0
- package/dist/core/extensions/types.js.map +1 -0
- 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 +38 -0
- package/dist/core/extensions/virtual-modules.js.map +1 -0
- package/dist/core/extensions/wrapper.d.ts +20 -0
- package/dist/core/extensions/wrapper.d.ts.map +1 -0
- package/dist/core/extensions/wrapper.js +22 -0
- package/dist/core/extensions/wrapper.js.map +1 -0
- package/dist/core/footer-data-provider.d.ts +64 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -0
- package/dist/core/footer-data-provider.js +338 -0
- package/dist/core/footer-data-provider.js.map +1 -0
- package/dist/core/harness-core.d.ts +50 -0
- package/dist/core/harness-core.d.ts.map +1 -0
- package/dist/core/harness-core.js +240 -0
- package/dist/core/harness-core.js.map +1 -0
- package/dist/core/http-dispatcher.d.ts +22 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -0
- package/dist/core/http-dispatcher.js +98 -0
- package/dist/core/http-dispatcher.js.map +1 -0
- package/dist/core/index.d.ts +14 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +13 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/keybindings.d.ts +428 -0
- package/dist/core/keybindings.d.ts.map +1 -0
- package/dist/core/keybindings.js +321 -0
- package/dist/core/keybindings.js.map +1 -0
- 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 +77 -0
- package/dist/core/messages.d.ts.map +1 -0
- package/dist/core/messages.js +124 -0
- package/dist/core/messages.js.map +1 -0
- package/dist/core/model-config.d.ts +759 -0
- package/dist/core/model-config.d.ts.map +1 -0
- package/dist/core/model-config.js +293 -0
- package/dist/core/model-config.js.map +1 -0
- package/dist/core/model-registry.d.ts +63 -0
- package/dist/core/model-registry.d.ts.map +1 -0
- package/dist/core/model-registry.js +144 -0
- package/dist/core/model-registry.js.map +1 -0
- package/dist/core/model-resolver.d.ts +124 -0
- package/dist/core/model-resolver.d.ts.map +1 -0
- package/dist/core/model-resolver.js +589 -0
- package/dist/core/model-resolver.js.map +1 -0
- package/dist/core/model-runtime.d.ts +142 -0
- package/dist/core/model-runtime.d.ts.map +1 -0
- package/dist/core/model-runtime.js +732 -0
- package/dist/core/model-runtime.js.map +1 -0
- package/dist/core/models-store.d.ts +22 -0
- package/dist/core/models-store.d.ts.map +1 -0
- package/dist/core/models-store.js +115 -0
- package/dist/core/models-store.js.map +1 -0
- 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 +7 -0
- package/dist/core/output-guard.d.ts.map +1 -0
- package/dist/core/output-guard.js +89 -0
- package/dist/core/output-guard.js.map +1 -0
- package/dist/core/package-manager.d.ts +217 -0
- package/dist/core/package-manager.d.ts.map +1 -0
- package/dist/core/package-manager.js +2224 -0
- package/dist/core/package-manager.js.map +1 -0
- package/dist/core/project-trust.d.ts +15 -0
- package/dist/core/project-trust.d.ts.map +1 -0
- package/dist/core/project-trust.js +59 -0
- package/dist/core/project-trust.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +59 -0
- package/dist/core/prompt-templates.d.ts.map +1 -0
- package/dist/core/prompt-templates.js +262 -0
- package/dist/core/prompt-templates.js.map +1 -0
- package/dist/core/provider-attribution.d.ts +4 -0
- package/dist/core/provider-attribution.d.ts.map +1 -0
- package/dist/core/provider-attribution.js +72 -0
- package/dist/core/provider-attribution.js.map +1 -0
- package/dist/core/provider-composer.d.ts +80 -0
- package/dist/core/provider-composer.d.ts.map +1 -0
- package/dist/core/provider-composer.js +484 -0
- package/dist/core/provider-composer.js.map +1 -0
- package/dist/core/relay-manifest.d.ts +8 -0
- package/dist/core/relay-manifest.d.ts.map +1 -0
- package/dist/core/relay-manifest.js +26 -0
- package/dist/core/relay-manifest.js.map +1 -0
- package/dist/core/resolve-config-value.d.ts +30 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -0
- package/dist/core/resolve-config-value.js +247 -0
- package/dist/core/resolve-config-value.js.map +1 -0
- package/dist/core/resource-loader.d.ts +227 -0
- package/dist/core/resource-loader.d.ts.map +1 -0
- package/dist/core/resource-loader.js +1005 -0
- package/dist/core/resource-loader.js.map +1 -0
- package/dist/core/runtime-credentials.d.ts +15 -0
- package/dist/core/runtime-credentials.d.ts.map +1 -0
- package/dist/core/runtime-credentials.js +39 -0
- package/dist/core/runtime-credentials.js.map +1 -0
- package/dist/core/sdk.d.ts +108 -0
- package/dist/core/sdk.d.ts.map +1 -0
- package/dist/core/sdk.js +315 -0
- package/dist/core/sdk.js.map +1 -0
- package/dist/core/session-cwd.d.ts +19 -0
- package/dist/core/session-cwd.d.ts.map +1 -0
- package/dist/core/session-cwd.js +38 -0
- package/dist/core/session-cwd.js.map +1 -0
- package/dist/core/session-export.d.ts +8 -0
- package/dist/core/session-export.d.ts.map +1 -0
- package/dist/core/session-export.js +33 -0
- package/dist/core/session-export.js.map +1 -0
- package/dist/core/session-manager.d.ts +416 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js +1523 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/settings-diagnostics.d.ts +9 -0
- package/dist/core/settings-diagnostics.d.ts.map +1 -0
- package/dist/core/settings-diagnostics.js +21 -0
- package/dist/core/settings-diagnostics.js.map +1 -0
- package/dist/core/settings-manager.d.ts +423 -0
- package/dist/core/settings-manager.d.ts.map +1 -0
- package/dist/core/settings-manager.js +1120 -0
- package/dist/core/settings-manager.js.map +1 -0
- package/dist/core/skills.d.ts +60 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +408 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/slash-commands.d.ts +15 -0
- package/dist/core/slash-commands.d.ts.map +1 -0
- package/dist/core/slash-commands.js +29 -0
- package/dist/core/slash-commands.js.map +1 -0
- package/dist/core/source-info.d.ts +26 -0
- package/dist/core/source-info.d.ts.map +1 -0
- package/dist/core/source-info.js +35 -0
- package/dist/core/source-info.js.map +1 -0
- package/dist/core/system-prompt.d.ts +71 -0
- package/dist/core/system-prompt.d.ts.map +1 -0
- package/dist/core/system-prompt.js +147 -0
- package/dist/core/system-prompt.js.map +1 -0
- package/dist/core/telemetry.d.ts +3 -0
- package/dist/core/telemetry.d.ts.map +1 -0
- package/dist/core/telemetry.js +9 -0
- package/dist/core/telemetry.js.map +1 -0
- package/dist/core/timings.d.ts +10 -0
- package/dist/core/timings.d.ts.map +1 -0
- package/dist/core/timings.js +41 -0
- package/dist/core/timings.js.map +1 -0
- package/dist/core/tools/bash.d.ts +100 -0
- package/dist/core/tools/bash.d.ts.map +1 -0
- package/dist/core/tools/bash.js +333 -0
- package/dist/core/tools/bash.js.map +1 -0
- package/dist/core/tools/edit-diff.d.ts +101 -0
- package/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/dist/core/tools/edit-diff.js +421 -0
- package/dist/core/tools/edit-diff.js.map +1 -0
- package/dist/core/tools/edit.d.ts +44 -0
- package/dist/core/tools/edit.d.ts.map +1 -0
- package/dist/core/tools/edit.js +147 -0
- package/dist/core/tools/edit.js.map +1 -0
- package/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/dist/core/tools/file-mutation-queue.js +52 -0
- package/dist/core/tools/file-mutation-queue.js.map +1 -0
- package/dist/core/tools/find.d.ts +42 -0
- package/dist/core/tools/find.d.ts.map +1 -0
- package/dist/core/tools/find.js +251 -0
- package/dist/core/tools/find.js.map +1 -0
- package/dist/core/tools/grep.d.ts +41 -0
- package/dist/core/tools/grep.d.ts.map +1 -0
- package/dist/core/tools/grep.js +252 -0
- package/dist/core/tools/grep.js.map +1 -0
- package/dist/core/tools/index.d.ts +43 -0
- package/dist/core/tools/index.d.ts.map +1 -0
- package/dist/core/tools/index.js +129 -0
- package/dist/core/tools/index.js.map +1 -0
- package/dist/core/tools/ls.d.ts +41 -0
- package/dist/core/tools/ls.d.ts.map +1 -0
- package/dist/core/tools/ls.js +126 -0
- package/dist/core/tools/ls.js.map +1 -0
- package/dist/core/tools/output-accumulator.d.ts +63 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -0
- package/dist/core/tools/output-accumulator.js +214 -0
- package/dist/core/tools/output-accumulator.js.map +1 -0
- package/dist/core/tools/path-utils.d.ts +10 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -0
- package/dist/core/tools/path-utils.js +99 -0
- package/dist/core/tools/path-utils.js.map +1 -0
- package/dist/core/tools/powershell.d.ts +16 -0
- package/dist/core/tools/powershell.d.ts.map +1 -0
- package/dist/core/tools/powershell.js +39 -0
- package/dist/core/tools/powershell.js.map +1 -0
- package/dist/core/tools/read.d.ts +42 -0
- package/dist/core/tools/read.d.ts.map +1 -0
- package/dist/core/tools/read.js +169 -0
- package/dist/core/tools/read.js.map +1 -0
- package/dist/core/tools/render-utils.d.ts +30 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -0
- package/dist/core/tools/render-utils.js +91 -0
- package/dist/core/tools/render-utils.js.map +1 -0
- package/dist/core/tools/renderers/bash.d.ts +12 -0
- package/dist/core/tools/renderers/bash.d.ts.map +1 -0
- package/dist/core/tools/renderers/bash.js +117 -0
- package/dist/core/tools/renderers/bash.js.map +1 -0
- package/dist/core/tools/renderers/edit.d.ts +23 -0
- package/dist/core/tools/renderers/edit.d.ts.map +1 -0
- package/dist/core/tools/renderers/edit.js +167 -0
- package/dist/core/tools/renderers/edit.js.map +1 -0
- package/dist/core/tools/renderers/find.d.ts +10 -0
- package/dist/core/tools/renderers/find.d.ts.map +1 -0
- package/dist/core/tools/renderers/find.js +64 -0
- package/dist/core/tools/renderers/find.js.map +1 -0
- package/dist/core/tools/renderers/grep.d.ts +10 -0
- package/dist/core/tools/renderers/grep.d.ts.map +1 -0
- package/dist/core/tools/renderers/grep.js +69 -0
- package/dist/core/tools/renderers/grep.js.map +1 -0
- package/dist/core/tools/renderers/index.d.ts +28 -0
- package/dist/core/tools/renderers/index.d.ts.map +1 -0
- package/dist/core/tools/renderers/index.js +47 -0
- package/dist/core/tools/renderers/index.js.map +1 -0
- package/dist/core/tools/renderers/ls.d.ts +10 -0
- package/dist/core/tools/renderers/ls.d.ts.map +1 -0
- package/dist/core/tools/renderers/ls.js +58 -0
- package/dist/core/tools/renderers/ls.js.map +1 -0
- package/dist/core/tools/renderers/read.d.ts +11 -0
- package/dist/core/tools/renderers/read.d.ts.map +1 -0
- package/dist/core/tools/renderers/read.js +130 -0
- package/dist/core/tools/renderers/read.js.map +1 -0
- package/dist/core/tools/renderers/write.d.ts +10 -0
- package/dist/core/tools/renderers/write.d.ts.map +1 -0
- package/dist/core/tools/renderers/write.js +153 -0
- package/dist/core/tools/renderers/write.js.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts +16 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.js +38 -0
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -0
- package/dist/core/tools/truncate.d.ts +84 -0
- package/dist/core/tools/truncate.d.ts.map +1 -0
- package/dist/core/tools/truncate.js +244 -0
- package/dist/core/tools/truncate.js.map +1 -0
- package/dist/core/tools/write.d.ts +30 -0
- package/dist/core/tools/write.d.ts.map +1 -0
- package/dist/core/tools/write.js +61 -0
- package/dist/core/tools/write.js.map +1 -0
- package/dist/core/trust-manager.d.ts +36 -0
- package/dist/core/trust-manager.d.ts.map +1 -0
- package/dist/core/trust-manager.js +204 -0
- package/dist/core/trust-manager.js.map +1 -0
- package/dist/core/usage-totals.d.ts +21 -0
- package/dist/core/usage-totals.d.ts.map +1 -0
- package/dist/core/usage-totals.js +79 -0
- package/dist/core/usage-totals.js.map +1 -0
- 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/core/workspace-probe.d.ts +8 -0
- package/dist/core/workspace-probe.d.ts.map +1 -0
- package/dist/core/workspace-probe.js +65 -0
- package/dist/core/workspace-probe.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 +577 -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 +3 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/index.js +19 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/intake/docx.d.ts +42 -0
- package/dist/extensions/intake/docx.d.ts.map +1 -0
- package/dist/extensions/intake/docx.js +148 -0
- package/dist/extensions/intake/docx.js.map +1 -0
- package/dist/extensions/intake/index.d.ts +17 -0
- package/dist/extensions/intake/index.d.ts.map +1 -0
- package/dist/extensions/intake/index.js +88 -0
- package/dist/extensions/intake/index.js.map +1 -0
- package/dist/extensions/intake/prompt.d.ts +6 -0
- package/dist/extensions/intake/prompt.d.ts.map +1 -0
- package/dist/extensions/intake/prompt.js +41 -0
- package/dist/extensions/intake/prompt.js.map +1 -0
- package/dist/extensions/intake/questionnaire.d.ts +84 -0
- package/dist/extensions/intake/questionnaire.d.ts.map +1 -0
- package/dist/extensions/intake/questionnaire.js +472 -0
- package/dist/extensions/intake/questionnaire.js.map +1 -0
- package/dist/extensions/laya/assessment.d.ts +40 -0
- package/dist/extensions/laya/assessment.d.ts.map +1 -0
- package/dist/extensions/laya/assessment.js +191 -0
- package/dist/extensions/laya/assessment.js.map +1 -0
- package/dist/extensions/laya/docker.d.ts +19 -0
- package/dist/extensions/laya/docker.d.ts.map +1 -0
- package/dist/extensions/laya/docker.js +44 -0
- package/dist/extensions/laya/docker.js.map +1 -0
- package/dist/extensions/laya/index.d.ts +43 -0
- package/dist/extensions/laya/index.d.ts.map +1 -0
- package/dist/extensions/laya/index.js +780 -0
- package/dist/extensions/laya/index.js.map +1 -0
- package/dist/extensions/laya/learn.d.ts +67 -0
- package/dist/extensions/laya/learn.d.ts.map +1 -0
- package/dist/extensions/laya/learn.js +263 -0
- package/dist/extensions/laya/learn.js.map +1 -0
- package/dist/extensions/laya/memory.d.ts +48 -0
- package/dist/extensions/laya/memory.d.ts.map +1 -0
- package/dist/extensions/laya/memory.js +107 -0
- package/dist/extensions/laya/memory.js.map +1 -0
- package/dist/extensions/laya/model-manifest.d.ts +7 -0
- package/dist/extensions/laya/model-manifest.d.ts.map +1 -0
- package/dist/extensions/laya/model-manifest.js +48 -0
- package/dist/extensions/laya/model-manifest.js.map +1 -0
- package/dist/extensions/laya/policy.d.ts +130 -0
- package/dist/extensions/laya/policy.d.ts.map +1 -0
- package/dist/extensions/laya/policy.js +222 -0
- package/dist/extensions/laya/policy.js.map +1 -0
- package/dist/extensions/laya/questions.d.ts +60 -0
- package/dist/extensions/laya/questions.d.ts.map +1 -0
- package/dist/extensions/laya/questions.js +189 -0
- package/dist/extensions/laya/questions.js.map +1 -0
- package/dist/extensions/laya/routers.d.ts +25 -0
- package/dist/extensions/laya/routers.d.ts.map +1 -0
- package/dist/extensions/laya/routers.js +121 -0
- package/dist/extensions/laya/routers.js.map +1 -0
- package/dist/extensions/laya/runtime.d.ts +58 -0
- package/dist/extensions/laya/runtime.d.ts.map +1 -0
- package/dist/extensions/laya/runtime.js +127 -0
- package/dist/extensions/laya/runtime.js.map +1 -0
- package/dist/extensions/laya/seed.d.ts +39 -0
- package/dist/extensions/laya/seed.d.ts.map +1 -0
- package/dist/extensions/laya/seed.js +358 -0
- package/dist/extensions/laya/seed.js.map +1 -0
- package/dist/extensions/laya/server.d.ts +50 -0
- package/dist/extensions/laya/server.d.ts.map +1 -0
- package/dist/extensions/laya/server.js +251 -0
- package/dist/extensions/laya/server.js.map +1 -0
- package/dist/extensions/laya/telemetry.d.ts +94 -0
- package/dist/extensions/laya/telemetry.d.ts.map +1 -0
- package/dist/extensions/laya/telemetry.js +107 -0
- package/dist/extensions/laya/telemetry.js.map +1 -0
- package/dist/extensions/laya/train-script.d.ts +8 -0
- package/dist/extensions/laya/train-script.d.ts.map +1 -0
- package/dist/extensions/laya/train-script.js +422 -0
- package/dist/extensions/laya/train-script.js.map +1 -0
- package/dist/extensions/laya/training.d.ts +176 -0
- package/dist/extensions/laya/training.d.ts.map +1 -0
- package/dist/extensions/laya/training.js +337 -0
- package/dist/extensions/laya/training.js.map +1 -0
- package/dist/extensions/llama/client.d.ts +69 -0
- package/dist/extensions/llama/client.d.ts.map +1 -0
- package/dist/extensions/llama/client.js +313 -0
- package/dist/extensions/llama/client.js.map +1 -0
- package/dist/extensions/llama/huggingface.d.ts +23 -0
- package/dist/extensions/llama/huggingface.d.ts.map +1 -0
- package/dist/extensions/llama/huggingface.js +141 -0
- package/dist/extensions/llama/huggingface.js.map +1 -0
- package/dist/extensions/llama/index.d.ts +3 -0
- package/dist/extensions/llama/index.d.ts.map +1 -0
- package/dist/extensions/llama/index.js +219 -0
- package/dist/extensions/llama/index.js.map +1 -0
- package/dist/extensions/llama/provider.d.ts +12 -0
- package/dist/extensions/llama/provider.d.ts.map +1 -0
- package/dist/extensions/llama/provider.js +213 -0
- package/dist/extensions/llama/provider.js.map +1 -0
- package/dist/extensions/llama/ui.d.ts +42 -0
- package/dist/extensions/llama/ui.d.ts.map +1 -0
- package/dist/extensions/llama/ui.js +416 -0
- package/dist/extensions/llama/ui.js.map +1 -0
- 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 +503 -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 +194 -0
- package/dist/extensions/mcp/config.js.map +1 -0
- package/dist/extensions/mcp/index.d.ts +79 -0
- package/dist/extensions/mcp/index.d.ts.map +1 -0
- package/dist/extensions/mcp/index.js +1101 -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 +98 -0
- package/dist/extensions/mcp/oauth.d.ts.map +1 -0
- package/dist/extensions/mcp/oauth.js +366 -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 +86 -0
- package/dist/extensions/mcp/tools.d.ts.map +1 -0
- package/dist/extensions/mcp/tools.js +252 -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 +178 -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 +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +16 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +820 -0
- package/dist/main.js.map +1 -0
- package/dist/migrations.d.ts +33 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +282 -0
- package/dist/migrations.js.map +1 -0
- package/dist/modes/index.d.ts +10 -0
- package/dist/modes/index.d.ts.map +1 -0
- package/dist/modes/index.js +8 -0
- package/dist/modes/index.js.map +1 -0
- package/dist/modes/interactive/assets/clankolas.png +0 -0
- package/dist/modes/interactive/bug-report.d.ts +16 -0
- package/dist/modes/interactive/bug-report.d.ts.map +1 -0
- package/dist/modes/interactive/bug-report.js +171 -0
- package/dist/modes/interactive/bug-report.js.map +1 -0
- package/dist/modes/interactive/chat-viewport.d.ts +20 -0
- package/dist/modes/interactive/chat-viewport.d.ts.map +1 -0
- package/dist/modes/interactive/chat-viewport.js +28 -0
- package/dist/modes/interactive/chat-viewport.js.map +1 -0
- package/dist/modes/interactive/components/armin.d.ts +37 -0
- package/dist/modes/interactive/components/armin.d.ts.map +1 -0
- package/dist/modes/interactive/components/armin.js +335 -0
- package/dist/modes/interactive/components/armin.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +26 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/assistant-message.js +158 -0
- package/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/dist/modes/interactive/components/auth-url.d.ts +14 -0
- package/dist/modes/interactive/components/auth-url.d.ts.map +1 -0
- package/dist/modes/interactive/components/auth-url.js +37 -0
- package/dist/modes/interactive/components/auth-url.js.map +1 -0
- package/dist/modes/interactive/components/bash-execution.d.ts +34 -0
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/bash-execution.js +175 -0
- package/dist/modes/interactive/components/bash-execution.js.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.js +54 -0
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.js +51 -0
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.js +52 -0
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/config-selector.d.ts +102 -0
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/config-selector.js +772 -0
- package/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.js +33 -0
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -0
- package/dist/modes/interactive/components/custom-editor.d.ts +30 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-editor.js +115 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -0
- package/dist/modes/interactive/components/custom-entry.d.ts +19 -0
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-entry.js +52 -0
- package/dist/modes/interactive/components/custom-entry.js.map +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts +22 -0
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-message.js +87 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -0
- package/dist/modes/interactive/components/diff.d.ts +12 -0
- package/dist/modes/interactive/components/diff.d.ts.map +1 -0
- package/dist/modes/interactive/components/diff.js +133 -0
- package/dist/modes/interactive/components/diff.js.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.js +21 -0
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -0
- package/dist/modes/interactive/components/earendil-announcement.d.ts +5 -0
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -0
- package/dist/modes/interactive/components/earendil-announcement.js +40 -0
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.d.ts +104 -0
- package/dist/modes/interactive/components/easter-egg-3d.d.ts.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.js +1141 -0
- package/dist/modes/interactive/components/easter-egg-3d.js.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.d.ts +6 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.d.ts.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.js +23 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.js.map +1 -0
- package/dist/modes/interactive/components/extension-editor.d.ts +24 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-editor.js +103 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -0
- package/dist/modes/interactive/components/extension-input.d.ts +25 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-input.js +67 -0
- package/dist/modes/interactive/components/extension-input.js.map +1 -0
- package/dist/modes/interactive/components/extension-selector.d.ts +27 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-selector.js +87 -0
- package/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.js +109 -0
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +39 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/dist/modes/interactive/components/footer.js +265 -0
- package/dist/modes/interactive/components/footer.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +33 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/dist/modes/interactive/components/index.js +34 -0
- package/dist/modes/interactive/components/index.js.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts +13 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.js +36 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts +54 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/dist/modes/interactive/components/login-dialog.js +194 -0
- package/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.js +19 -0
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
- package/dist/modes/interactive/components/mermaid.d.ts +11 -0
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
- package/dist/modes/interactive/components/mermaid.js +75 -0
- package/dist/modes/interactive/components/mermaid.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +60 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/model-selector.js +361 -0
- package/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts +39 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.js +166 -0
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/dist/modes/interactive/components/relay-logo.d.ts +22 -0
- package/dist/modes/interactive/components/relay-logo.d.ts.map +1 -0
- package/dist/modes/interactive/components/relay-logo.js +63 -0
- package/dist/modes/interactive/components/relay-logo.js.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +46 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.js +326 -0
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.js +155 -0
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -0
- package/dist/modes/interactive/components/session-selector.d.ts +95 -0
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector.js +893 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +96 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-selector.js +742 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.js +165 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.js +39 -0
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.js +54 -0
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/dist/modes/interactive/components/status-indicator.d.ts +30 -0
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -0
- package/dist/modes/interactive/components/status-indicator.js +67 -0
- package/dist/modes/interactive/components/status-indicator.js.map +1 -0
- package/dist/modes/interactive/components/theme-selector.d.ts +11 -0
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/theme-selector.js +50 -0
- package/dist/modes/interactive/components/theme-selector.js.map +1 -0
- 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 +23 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.js +109 -0
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +68 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution.js +314 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts +94 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/tree-selector.js +1254 -0
- package/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/trust-selector.js +91 -0
- package/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.js +114 -0
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts +16 -0
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message.js +50 -0
- package/dist/modes/interactive/components/user-message.js.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts +48 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.js +66 -0
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -0
- package/dist/modes/interactive/external-editor.d.ts +12 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -0
- package/dist/modes/interactive/external-editor.js +38 -0
- package/dist/modes/interactive/external-editor.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +482 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +5861 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.js +34 -0
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/modes/interactive/model-search.d.ts +12 -0
- package/dist/modes/interactive/model-search.d.ts.map +1 -0
- package/dist/modes/interactive/model-search.js +15 -0
- package/dist/modes/interactive/model-search.js.map +1 -0
- package/dist/modes/interactive/session-share.d.ts +16 -0
- package/dist/modes/interactive/session-share.d.ts.map +1 -0
- package/dist/modes/interactive/session-share.js +119 -0
- package/dist/modes/interactive/session-share.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +78 -0
- package/dist/modes/interactive/theme/light.json +78 -0
- 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 +81 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.js +210 -0
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -0
- package/dist/modes/interactive/theme/theme-json.d.ts +85 -0
- package/dist/modes/interactive/theme/theme-json.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-json.js +132 -0
- package/dist/modes/interactive/theme/theme-json.js.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.json +361 -0
- package/dist/modes/interactive/theme/theme.d.ts +158 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme.js +912 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -0
- package/dist/modes/interactive/tui-renderer.d.ts +22 -0
- package/dist/modes/interactive/tui-renderer.d.ts.map +1 -0
- package/dist/modes/interactive/tui-renderer.js +67 -0
- package/dist/modes/interactive/tui-renderer.js.map +1 -0
- package/dist/modes/json-event.d.ts +34 -0
- package/dist/modes/json-event.d.ts.map +1 -0
- package/dist/modes/json-event.js +29 -0
- package/dist/modes/json-event.js.map +1 -0
- package/dist/modes/print-mode.d.ts +28 -0
- package/dist/modes/print-mode.d.ts.map +1 -0
- package/dist/modes/print-mode.js +142 -0
- package/dist/modes/print-mode.js.map +1 -0
- package/dist/modes/rpc/jsonl.d.ts +17 -0
- package/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/dist/modes/rpc/jsonl.js +49 -0
- package/dist/modes/rpc/jsonl.js.map +1 -0
- package/dist/modes/rpc/rpc-client.d.ts +254 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client.js +499 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -0
- package/dist/modes/rpc/rpc-mode.d.ts +20 -0
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-mode.js +655 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/dist/modes/rpc/rpc-types.d.ts +478 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-types.js +8 -0
- package/dist/modes/rpc/rpc-types.js.map +1 -0
- package/dist/package-manager-cli.d.ts +8 -0
- package/dist/package-manager-cli.d.ts.map +1 -0
- package/dist/package-manager-cli.js +524 -0
- package/dist/package-manager-cli.js.map +1 -0
- package/dist/rpc-entry.d.ts +3 -0
- package/dist/rpc-entry.d.ts.map +1 -0
- package/dist/rpc-entry.js +11 -0
- package/dist/rpc-entry.js.map +1 -0
- package/dist/utils/abort.d.ts +5 -0
- package/dist/utils/abort.d.ts.map +1 -0
- package/dist/utils/abort.js +48 -0
- package/dist/utils/abort.js.map +1 -0
- package/dist/utils/ansi.d.ts +2 -0
- package/dist/utils/ansi.d.ts.map +1 -0
- package/dist/utils/ansi.js +52 -0
- package/dist/utils/ansi.js.map +1 -0
- package/dist/utils/changelog.d.ts +22 -0
- package/dist/utils/changelog.d.ts.map +1 -0
- package/dist/utils/changelog.js +176 -0
- package/dist/utils/changelog.js.map +1 -0
- package/dist/utils/child-process.d.ts +18 -0
- package/dist/utils/child-process.d.ts.map +1 -0
- package/dist/utils/child-process.js +106 -0
- package/dist/utils/child-process.js.map +1 -0
- package/dist/utils/clipboard-command.d.ts +7 -0
- package/dist/utils/clipboard-command.d.ts.map +1 -0
- package/dist/utils/clipboard-command.js +45 -0
- package/dist/utils/clipboard-command.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts +11 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -0
- package/dist/utils/clipboard-image.js +214 -0
- package/dist/utils/clipboard-image.js.map +1 -0
- package/dist/utils/clipboard.d.ts +6 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +156 -0
- package/dist/utils/clipboard.js.map +1 -0
- package/dist/utils/deprecation.d.ts +4 -0
- package/dist/utils/deprecation.d.ts.map +1 -0
- package/dist/utils/deprecation.js +13 -0
- package/dist/utils/deprecation.js.map +1 -0
- package/dist/utils/exif-orientation.d.ts +5 -0
- package/dist/utils/exif-orientation.d.ts.map +1 -0
- package/dist/utils/exif-orientation.js +157 -0
- package/dist/utils/exif-orientation.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +8 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +27 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/fs-watch.d.ts +5 -0
- package/dist/utils/fs-watch.d.ts.map +1 -0
- package/dist/utils/fs-watch.js +25 -0
- package/dist/utils/fs-watch.js.map +1 -0
- package/dist/utils/git.d.ts +26 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +195 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/html.d.ts +7 -0
- package/dist/utils/html.d.ts.map +1 -0
- package/dist/utils/html.js +40 -0
- package/dist/utils/html.js.map +1 -0
- package/dist/utils/image-convert.d.ts +22 -0
- package/dist/utils/image-convert.d.ts.map +1 -0
- package/dist/utils/image-convert.js +84 -0
- package/dist/utils/image-convert.js.map +1 -0
- package/dist/utils/image-process.d.ts +18 -0
- package/dist/utils/image-process.d.ts.map +1 -0
- package/dist/utils/image-process.js +83 -0
- package/dist/utils/image-process.js.map +1 -0
- package/dist/utils/image-resize-core.d.ts +30 -0
- package/dist/utils/image-resize-core.d.ts.map +1 -0
- package/dist/utils/image-resize-core.js +124 -0
- package/dist/utils/image-resize-core.js.map +1 -0
- package/dist/utils/image-resize-worker.d.ts +2 -0
- package/dist/utils/image-resize-worker.d.ts.map +1 -0
- package/dist/utils/image-resize-worker.js +31 -0
- package/dist/utils/image-resize-worker.js.map +1 -0
- package/dist/utils/image-resize.d.ts +16 -0
- package/dist/utils/image-resize.d.ts.map +1 -0
- package/dist/utils/image-resize.js +97 -0
- package/dist/utils/image-resize.js.map +1 -0
- package/dist/utils/json.d.ts +3 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +7 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/management-http.d.ts +25 -0
- package/dist/utils/management-http.d.ts.map +1 -0
- package/dist/utils/management-http.js +54 -0
- package/dist/utils/management-http.js.map +1 -0
- package/dist/utils/mime.d.ts +3 -0
- package/dist/utils/mime.d.ts.map +1 -0
- package/dist/utils/mime.js +110 -0
- package/dist/utils/mime.js.map +1 -0
- package/dist/utils/open-browser.d.ts +9 -0
- package/dist/utils/open-browser.d.ts.map +1 -0
- package/dist/utils/open-browser.js +22 -0
- package/dist/utils/open-browser.js.map +1 -0
- 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 +34 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +115 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/photon.d.ts +21 -0
- package/dist/utils/photon.d.ts.map +1 -0
- package/dist/utils/photon.js +121 -0
- package/dist/utils/photon.js.map +1 -0
- package/dist/utils/relay-user-agent.d.ts +2 -0
- package/dist/utils/relay-user-agent.d.ts.map +1 -0
- package/dist/utils/relay-user-agent.js +5 -0
- package/dist/utils/relay-user-agent.js.map +1 -0
- package/dist/utils/shell.d.ts +32 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +189 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +17 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/syntax-highlight.d.ts +13 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -0
- package/dist/utils/syntax-highlight.js +179 -0
- package/dist/utils/syntax-highlight.js.map +1 -0
- package/dist/utils/text.d.ts +8 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +9 -0
- package/dist/utils/text.js.map +1 -0
- package/dist/utils/tool-result-images.d.ts +21 -0
- package/dist/utils/tool-result-images.d.ts.map +1 -0
- package/dist/utils/tool-result-images.js +48 -0
- package/dist/utils/tool-result-images.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +13 -0
- package/dist/utils/tools-manager.d.ts.map +1 -0
- package/dist/utils/tools-manager.js +343 -0
- package/dist/utils/tools-manager.js.map +1 -0
- package/dist/utils/version-check.d.ts +17 -0
- package/dist/utils/version-check.d.ts.map +1 -0
- package/dist/utils/version-check.js +78 -0
- package/dist/utils/version-check.js.map +1 -0
- 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 +316 -0
- package/docs/codemode.md +207 -0
- package/docs/compaction.md +463 -0
- package/docs/configuration.md +47 -0
- package/docs/containerization.md +154 -0
- package/docs/custom-provider.md +173 -0
- package/docs/docs.json +224 -0
- package/docs/environment-variables.md +97 -0
- package/docs/extensions.md +274 -0
- package/docs/harness-core.md +99 -0
- package/docs/how-relay-works.md +49 -0
- package/docs/images/doom-extension.png +0 -0
- package/docs/images/exy.png +0 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/index.md +39 -0
- package/docs/intake.md +40 -0
- package/docs/json.md +226 -0
- package/docs/keybindings.md +194 -0
- package/docs/laya.md +152 -0
- package/docs/llama-cpp.md +114 -0
- package/docs/mcp.md +258 -0
- package/docs/message-types.md +261 -0
- package/docs/models.md +205 -0
- package/docs/packages.md +129 -0
- package/docs/prompt-templates.md +59 -0
- package/docs/providers.md +187 -0
- package/docs/quickstart.md +139 -0
- package/docs/rpc-commands.md +860 -0
- package/docs/rpc-extension-ui.md +200 -0
- package/docs/rpc.md +193 -0
- package/docs/sdk.md +147 -0
- package/docs/security.md +99 -0
- package/docs/session-format.md +293 -0
- package/docs/sessions.md +66 -0
- package/docs/settings.md +206 -0
- package/docs/shell-aliases.md +93 -0
- package/docs/skills.md +93 -0
- package/docs/slash-commands.md +61 -0
- package/docs/terminal-setup.md +219 -0
- package/docs/termux.md +121 -0
- package/docs/themes.md +136 -0
- package/docs/tmux.md +55 -0
- package/docs/tui.md +125 -0
- package/docs/usage.md +94 -0
- package/docs/virtual-models.md +114 -0
- package/docs/windows.md +67 -0
- package/examples/README.md +39 -0
- package/examples/extensions/README.md +213 -0
- package/examples/extensions/auto-commit-on-exit.ts +49 -0
- package/examples/extensions/bash-spawn-hook.ts +30 -0
- package/examples/extensions/bookmark.ts +50 -0
- package/examples/extensions/border-status-editor.ts +150 -0
- package/examples/extensions/built-in-tool-renderer.ts +225 -0
- package/examples/extensions/claude-rules.ts +86 -0
- package/examples/extensions/commands.ts +72 -0
- package/examples/extensions/confirm-destructive.ts +59 -0
- package/examples/extensions/custom-compaction.ts +117 -0
- package/examples/extensions/custom-footer.ts +64 -0
- package/examples/extensions/custom-header.ts +73 -0
- package/examples/extensions/custom-provider-anthropic/index.ts +617 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
- package/examples/extensions/custom-provider-anthropic/package.json +19 -0
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +405 -0
- package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
- package/examples/extensions/debug-provider.ts +90 -0
- package/examples/extensions/dirty-repo-guard.ts +56 -0
- package/examples/extensions/doom-overlay/README.md +46 -0
- package/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
- package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
- package/examples/extensions/doom-overlay/doom/build.sh +152 -0
- package/examples/extensions/doom-overlay/doom/doomgeneric_relay.c +72 -0
- package/examples/extensions/doom-overlay/doom-component.ts +132 -0
- package/examples/extensions/doom-overlay/doom-engine.ts +173 -0
- package/examples/extensions/doom-overlay/doom-keys.ts +104 -0
- package/examples/extensions/doom-overlay/index.ts +74 -0
- package/examples/extensions/doom-overlay/wad-finder.ts +55 -0
- package/examples/extensions/dynamic-resources/SKILL.md +8 -0
- package/examples/extensions/dynamic-resources/dynamic.json +81 -0
- package/examples/extensions/dynamic-resources/dynamic.md +5 -0
- package/examples/extensions/dynamic-resources/index.ts +15 -0
- package/examples/extensions/dynamic-tools.ts +74 -0
- package/examples/extensions/entry-renderer.ts +41 -0
- package/examples/extensions/event-bus.ts +43 -0
- package/examples/extensions/file-trigger.ts +41 -0
- package/examples/extensions/git-checkpoint.ts +53 -0
- package/examples/extensions/git-merge-and-resolve.ts +115 -0
- package/examples/extensions/github-issue-autocomplete.ts +185 -0
- package/examples/extensions/handoff.ts +190 -0
- package/examples/extensions/hello.ts +26 -0
- package/examples/extensions/hidden-thinking-label.ts +53 -0
- package/examples/extensions/inline-bash.ts +94 -0
- package/examples/extensions/input-transform-streaming.ts +39 -0
- package/examples/extensions/input-transform.ts +43 -0
- package/examples/extensions/interactive-shell.ts +196 -0
- package/examples/extensions/jev-router.ts +113 -0
- package/examples/extensions/mac-system-theme.ts +47 -0
- package/examples/extensions/message-renderer.ts +59 -0
- package/examples/extensions/minimal-mode.ts +354 -0
- package/examples/extensions/modal-editor.ts +85 -0
- package/examples/extensions/model-status.ts +31 -0
- package/examples/extensions/notify.ts +57 -0
- package/examples/extensions/overlay-qa-tests.ts +1450 -0
- package/examples/extensions/overlay-test.ts +153 -0
- package/examples/extensions/permission-gate.ts +34 -0
- package/examples/extensions/pirate.ts +47 -0
- package/examples/extensions/plan-mode/README.md +66 -0
- package/examples/extensions/plan-mode/index.ts +390 -0
- package/examples/extensions/plan-mode/utils.ts +168 -0
- package/examples/extensions/preset.ts +436 -0
- package/examples/extensions/project-trust.ts +64 -0
- package/examples/extensions/prompt-customizer.ts +49 -0
- package/examples/extensions/protected-paths.ts +30 -0
- package/examples/extensions/provider-payload.ts +18 -0
- package/examples/extensions/qna.ts +118 -0
- package/examples/extensions/question.ts +278 -0
- package/examples/extensions/questionnaire.ts +440 -0
- package/examples/extensions/rainbow-editor.ts +88 -0
- package/examples/extensions/reload-runtime.ts +37 -0
- package/examples/extensions/rpc-demo.ts +118 -0
- package/examples/extensions/sandbox/index.ts +321 -0
- package/examples/extensions/sandbox/package-lock.json +92 -0
- package/examples/extensions/sandbox/package.json +19 -0
- package/examples/extensions/send-user-message.ts +97 -0
- package/examples/extensions/session-name.ts +27 -0
- package/examples/extensions/shutdown-command.ts +63 -0
- package/examples/extensions/snake.ts +343 -0
- package/examples/extensions/space-invaders.ts +560 -0
- package/examples/extensions/ssh.ts +220 -0
- package/examples/extensions/status-line.ts +32 -0
- package/examples/extensions/structured-output.ts +65 -0
- package/examples/extensions/subagent/README.md +196 -0
- package/examples/extensions/subagent/agents/planner.md +37 -0
- package/examples/extensions/subagent/agents/reviewer.md +35 -0
- package/examples/extensions/subagent/agents/scout.md +50 -0
- package/examples/extensions/subagent/agents/security-auditor.md +20 -0
- package/examples/extensions/subagent/agents/verifier.md +31 -0
- package/examples/extensions/subagent/agents/worker.md +24 -0
- package/examples/extensions/subagent/agents.ts +157 -0
- package/examples/extensions/subagent/index.ts +1038 -0
- package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
- package/examples/extensions/subagent/prompts/implement-and-verify.md +10 -0
- package/examples/extensions/subagent/prompts/implement.md +10 -0
- package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
- package/examples/extensions/subagent/skills/delegate/SKILL.md +48 -0
- package/examples/extensions/subagent/skills/security-audit/SKILL.md +108 -0
- package/examples/extensions/subagent/skills/security-audit/references/categories.md +130 -0
- package/examples/extensions/subagent/skills/security-audit/references/report.md +38 -0
- package/examples/extensions/summarize.ts +199 -0
- package/examples/extensions/system-prompt-header.ts +17 -0
- package/examples/extensions/tic-tac-toe.ts +1008 -0
- package/examples/extensions/timed-confirm.ts +70 -0
- package/examples/extensions/titlebar-spinner.ts +58 -0
- package/examples/extensions/todo.ts +297 -0
- package/examples/extensions/tool-override.ts +144 -0
- package/examples/extensions/tools.ts +146 -0
- package/examples/extensions/trigger-compact.ts +50 -0
- package/examples/extensions/truncated-tool.ts +195 -0
- package/examples/extensions/widget-placement.ts +9 -0
- package/examples/extensions/with-deps/index.ts +32 -0
- package/examples/extensions/with-deps/package-lock.json +31 -0
- package/examples/extensions/with-deps/package.json +22 -0
- package/examples/extensions/working-indicator.ts +123 -0
- package/examples/extensions/working-message-test.ts +25 -0
- package/examples/plugins/relay-example-plugin/README.md +38 -0
- package/examples/plugins/relay-example-plugin/package.json +10 -0
- package/examples/plugins/relay-example-plugin/src/contract.ts +13 -0
- package/examples/plugins/relay-example-plugin/src/session.ts +24 -0
- package/examples/plugins/relay-example-plugin/src/tui.ts +31 -0
- package/examples/rpc-client.ts +35 -0
- package/examples/rpc-extension-ui.ts +661 -0
- package/examples/sdk/01-minimal.ts +26 -0
- package/examples/sdk/02-custom-model.ts +49 -0
- package/examples/sdk/03-custom-prompt.ts +70 -0
- package/examples/sdk/04-skills.ts +55 -0
- package/examples/sdk/05-tools.ts +48 -0
- package/examples/sdk/06-extensions.ts +94 -0
- package/examples/sdk/07-context-files.ts +42 -0
- package/examples/sdk/08-prompt-templates.ts +51 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +34 -0
- package/examples/sdk/10-settings.ts +53 -0
- package/examples/sdk/11-sessions.ts +52 -0
- package/examples/sdk/12-full-control.ts +74 -0
- package/examples/sdk/13-session-runtime.ts +67 -0
- package/examples/sdk/14-codemode-mcp.ts +61 -0
- package/examples/sdk/README.md +141 -0
- package/package.json +111 -5
|
@@ -0,0 +1,891 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentSession - Core abstraction for agent lifecycle and session management.
|
|
3
|
+
*
|
|
4
|
+
* This class is shared between all run modes (interactive, print, rpc).
|
|
5
|
+
* It encapsulates:
|
|
6
|
+
* - Agent state access
|
|
7
|
+
* - Event subscription with automatic session persistence
|
|
8
|
+
* - Model and thinking level management
|
|
9
|
+
* - Compaction (manual and auto)
|
|
10
|
+
* - Bash execution
|
|
11
|
+
* - Session switching and branching
|
|
12
|
+
*
|
|
13
|
+
* Modes use this class and add their own I/O layer on top.
|
|
14
|
+
*/
|
|
15
|
+
import { type Agent, type AgentEvent, type AgentMessage, type AgentState, type AgentTool, type ThinkingLevel } from "@relay-harness/agent-core";
|
|
16
|
+
import type { ImageContent, Model, TextContent } from "@relay-harness/ai/compat";
|
|
17
|
+
import { type BashResult } from "./bash-executor.ts";
|
|
18
|
+
import type { CacheWarmer, CacheWarmingStatus } from "./cache-warmer.ts";
|
|
19
|
+
import { type CompactionResult } from "./compaction/index.ts";
|
|
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";
|
|
21
|
+
import { CodingHarnessCore } from "./harness-core.ts";
|
|
22
|
+
import { type CustomMessage } from "./messages.ts";
|
|
23
|
+
import type { ModelRuntime } from "./model-runtime.ts";
|
|
24
|
+
import { type PromptTemplate } from "./prompt-templates.ts";
|
|
25
|
+
import type { ResourceLoader } from "./resource-loader.ts";
|
|
26
|
+
import { type BranchSummaryEntry, type SessionEntry, SessionManager } from "./session-manager.ts";
|
|
27
|
+
import { type CacheWarmingMode, type SettingsManager } from "./settings-manager.ts";
|
|
28
|
+
import { type BashOperations } from "./tools/bash.ts";
|
|
29
|
+
/** Parsed skill block from a user message */
|
|
30
|
+
export interface ParsedSkillBlock {
|
|
31
|
+
name: string;
|
|
32
|
+
location: string;
|
|
33
|
+
content: string;
|
|
34
|
+
userMessage: string | undefined;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Parse a skill block from message text.
|
|
38
|
+
* Returns null if the text doesn't contain a skill block.
|
|
39
|
+
*/
|
|
40
|
+
export declare function parseSkillBlock(text: string): ParsedSkillBlock | null;
|
|
41
|
+
/** Tool execution events of calls a tool made through `ctx.executeTool()` carry `parentToolCallId`. */
|
|
42
|
+
type WithParentToolCallId<E> = E extends {
|
|
43
|
+
type: "tool_execution_start" | "tool_execution_update" | "tool_execution_end";
|
|
44
|
+
} ? E & {
|
|
45
|
+
parentToolCallId?: string;
|
|
46
|
+
} : E;
|
|
47
|
+
/** Session-specific events that extend the core AgentEvent */
|
|
48
|
+
export type AgentSessionEvent = WithParentToolCallId<Exclude<AgentEvent, {
|
|
49
|
+
type: "agent_end";
|
|
50
|
+
}>> | {
|
|
51
|
+
type: "agent_end";
|
|
52
|
+
messages: AgentMessage[];
|
|
53
|
+
willRetry: boolean;
|
|
54
|
+
} | {
|
|
55
|
+
type: "agent_settled";
|
|
56
|
+
} | {
|
|
57
|
+
type: "queue_update";
|
|
58
|
+
steering: readonly string[];
|
|
59
|
+
followUp: readonly string[];
|
|
60
|
+
} | {
|
|
61
|
+
type: "compaction_start";
|
|
62
|
+
reason: "manual" | "threshold" | "overflow";
|
|
63
|
+
} | {
|
|
64
|
+
type: "entry_appended";
|
|
65
|
+
entry: SessionEntry;
|
|
66
|
+
} | {
|
|
67
|
+
type: "session_info_changed";
|
|
68
|
+
name: string | undefined;
|
|
69
|
+
} | {
|
|
70
|
+
type: "thinking_level_changed";
|
|
71
|
+
level: ThinkingLevel;
|
|
72
|
+
} | {
|
|
73
|
+
type: "compaction_end";
|
|
74
|
+
reason: "manual" | "threshold" | "overflow";
|
|
75
|
+
result: CompactionResult | undefined;
|
|
76
|
+
aborted: boolean;
|
|
77
|
+
willRetry: boolean;
|
|
78
|
+
errorMessage?: string;
|
|
79
|
+
} | {
|
|
80
|
+
type: "auto_retry_start";
|
|
81
|
+
attempt: number;
|
|
82
|
+
maxAttempts: number;
|
|
83
|
+
delayMs: number;
|
|
84
|
+
errorMessage: string;
|
|
85
|
+
} | {
|
|
86
|
+
type: "auto_retry_end";
|
|
87
|
+
success: boolean;
|
|
88
|
+
attempt: number;
|
|
89
|
+
finalError?: string;
|
|
90
|
+
} | {
|
|
91
|
+
type: "summarization_retry_scheduled";
|
|
92
|
+
attempt: number;
|
|
93
|
+
maxAttempts: number;
|
|
94
|
+
delayMs: number;
|
|
95
|
+
errorMessage: string;
|
|
96
|
+
} | {
|
|
97
|
+
type: "summarization_retry_attempt_start";
|
|
98
|
+
source: "branchSummary";
|
|
99
|
+
} | {
|
|
100
|
+
type: "summarization_retry_attempt_start";
|
|
101
|
+
source: "compaction";
|
|
102
|
+
reason: "manual" | "threshold" | "overflow";
|
|
103
|
+
} | {
|
|
104
|
+
type: "summarization_retry_finished";
|
|
105
|
+
} | {
|
|
106
|
+
type: "bash_execution_update";
|
|
107
|
+
id?: string;
|
|
108
|
+
delta: string;
|
|
109
|
+
};
|
|
110
|
+
/** Listener function for agent session events */
|
|
111
|
+
export type AgentSessionEventListener = (event: AgentSessionEvent) => void;
|
|
112
|
+
export interface AgentSessionConfig {
|
|
113
|
+
agent: Agent;
|
|
114
|
+
sessionManager: SessionManager;
|
|
115
|
+
settingsManager: SettingsManager;
|
|
116
|
+
cwd: string;
|
|
117
|
+
/** Models to cycle through with Ctrl+P (from --models flag) */
|
|
118
|
+
scopedModels?: Array<{
|
|
119
|
+
model: Model<any>;
|
|
120
|
+
thinkingLevel?: ThinkingLevel;
|
|
121
|
+
}>;
|
|
122
|
+
/** Resource loader for extensions, skills, prompts, themes, context files, and system prompt */
|
|
123
|
+
resourceLoader: ResourceLoader;
|
|
124
|
+
/** SDK custom tools registered outside extensions */
|
|
125
|
+
customTools?: ToolDefinition[];
|
|
126
|
+
/** Canonical model/auth runtime used by coding-agent internals. */
|
|
127
|
+
modelRuntime: ModelRuntime;
|
|
128
|
+
/** Keeps the prompt cache entry of the last session request warm. */
|
|
129
|
+
cacheWarmer?: Pick<CacheWarmer, "cancel" | "status" | "onAgentSettled" | "onModeChanged" | "onWarmed">;
|
|
130
|
+
/** Initial active built-in tool names. Default: [read, bash, edit, write] */
|
|
131
|
+
initialActiveToolNames?: string[];
|
|
132
|
+
/**
|
|
133
|
+
* Whether the initial tools come from the `defaultTools` setting. When true, reload activates
|
|
134
|
+
* tools newly added to the setting. Tools removed from it stay active.
|
|
135
|
+
*/
|
|
136
|
+
usesDefaultTools?: boolean;
|
|
137
|
+
/** Optional allowlist of tool names. When provided, only these tool names are exposed. */
|
|
138
|
+
allowedToolNames?: string[];
|
|
139
|
+
/** Optional denylist of tool names. When provided, these tool names are not exposed. */
|
|
140
|
+
excludedToolNames?: string[];
|
|
141
|
+
/**
|
|
142
|
+
* Override base tools (useful for custom runtimes).
|
|
143
|
+
*
|
|
144
|
+
* These are synthesized into minimal ToolDefinitions internally so AgentSession can keep
|
|
145
|
+
* a definition-first registry even when callers provide plain AgentTool instances.
|
|
146
|
+
*/
|
|
147
|
+
baseToolsOverride?: Record<string, AgentTool>;
|
|
148
|
+
/** Mutable ref used by Agent to access the current ExtensionRunner */
|
|
149
|
+
extensionRunnerRef?: {
|
|
150
|
+
current?: ExtensionRunner;
|
|
151
|
+
};
|
|
152
|
+
/** Session start event metadata emitted when extensions bind to this runtime. */
|
|
153
|
+
sessionStartEvent?: SessionStartEvent;
|
|
154
|
+
}
|
|
155
|
+
export interface ExtensionBindings {
|
|
156
|
+
uiContext?: ExtensionUIContext;
|
|
157
|
+
mode?: ExtensionMode;
|
|
158
|
+
commandContextActions?: ExtensionCommandContextActions;
|
|
159
|
+
abortHandler?: () => void;
|
|
160
|
+
shutdownHandler?: ShutdownHandler;
|
|
161
|
+
onError?: ExtensionErrorListener;
|
|
162
|
+
}
|
|
163
|
+
export type QueuedInputDisposition = "handled" | "queued";
|
|
164
|
+
export type PromptDisposition = QueuedInputDisposition | "started";
|
|
165
|
+
/** Options for AgentSession.prompt() */
|
|
166
|
+
export interface PromptOptions {
|
|
167
|
+
/** Whether to dispatch extension commands and expand skill commands and prompt templates (default: true) */
|
|
168
|
+
expandPromptTemplates?: boolean;
|
|
169
|
+
/** Image attachments */
|
|
170
|
+
images?: ImageContent[];
|
|
171
|
+
/** When streaming, how to queue the message: "steer" (interrupt) or "followUp" (wait). Required if streaming. */
|
|
172
|
+
streamingBehavior?: "steer" | "followUp";
|
|
173
|
+
/** Source of input for extension input event handlers. Defaults to "interactive". */
|
|
174
|
+
source?: InputSource;
|
|
175
|
+
/** Internal hook used by RPC mode to observe how an accepted prompt was dispatched. Not called if the prompt is rejected. */
|
|
176
|
+
preflightResult?: (disposition: PromptDisposition) => void;
|
|
177
|
+
}
|
|
178
|
+
/** Options for model/thinking mutations. */
|
|
179
|
+
export interface ModelMutationOptions {
|
|
180
|
+
/** Persist the new value to global defaults. Defaults to session-only. */
|
|
181
|
+
persist?: boolean;
|
|
182
|
+
}
|
|
183
|
+
/** Result from cycleModel() */
|
|
184
|
+
export interface ModelCycleResult {
|
|
185
|
+
model: Model<any>;
|
|
186
|
+
thinkingLevel: ThinkingLevel;
|
|
187
|
+
/** Whether cycling through scoped models (--models flag) or all available */
|
|
188
|
+
isScoped: boolean;
|
|
189
|
+
}
|
|
190
|
+
/** Session statistics for /session command */
|
|
191
|
+
export interface SessionStats {
|
|
192
|
+
sessionFile: string | undefined;
|
|
193
|
+
sessionId: string;
|
|
194
|
+
userMessages: number;
|
|
195
|
+
assistantMessages: number;
|
|
196
|
+
toolCalls: number;
|
|
197
|
+
toolResults: number;
|
|
198
|
+
totalMessages: number;
|
|
199
|
+
tokens: {
|
|
200
|
+
input: number;
|
|
201
|
+
output: number;
|
|
202
|
+
cacheRead: number;
|
|
203
|
+
cacheWrite: number;
|
|
204
|
+
total: number;
|
|
205
|
+
};
|
|
206
|
+
cost: number;
|
|
207
|
+
contextUsage?: ContextUsage;
|
|
208
|
+
}
|
|
209
|
+
export declare class AgentSession {
|
|
210
|
+
readonly agent: Agent;
|
|
211
|
+
readonly sessionManager: SessionManager;
|
|
212
|
+
readonly settingsManager: SettingsManager;
|
|
213
|
+
private _scopedModels;
|
|
214
|
+
private _unsubscribeAgent?;
|
|
215
|
+
private _eventListeners;
|
|
216
|
+
private _isAgentRunActive;
|
|
217
|
+
private _agentRunAbortRequested;
|
|
218
|
+
private _idleWaitPromise;
|
|
219
|
+
private _resolveIdleWait;
|
|
220
|
+
/** Tracks pending steering messages for UI display. Removed when delivered. */
|
|
221
|
+
private _steeringMessages;
|
|
222
|
+
/** Tracks pending follow-up messages for UI display. Removed when delivered. */
|
|
223
|
+
private _followUpMessages;
|
|
224
|
+
/** Messages queued to be included with the next user prompt as context ("asides"). */
|
|
225
|
+
private _pendingNextTurnMessages;
|
|
226
|
+
/** Context-only custom messages queued during a run, flushed once the current turn's tool results are in. */
|
|
227
|
+
private _pendingCustomMessages;
|
|
228
|
+
private _compactionAbortController;
|
|
229
|
+
private _autoCompactionAbortController;
|
|
230
|
+
private _overflowRecoveryAttempted;
|
|
231
|
+
private _branchSummaryAbortController;
|
|
232
|
+
private _retryAbortController;
|
|
233
|
+
private _retryAttempt;
|
|
234
|
+
/**
|
|
235
|
+
* Failed response that the next request repeats, set by auto-retry and overflow recovery. The
|
|
236
|
+
* retry is routed with it as `failed`, since the context no longer contains it.
|
|
237
|
+
*/
|
|
238
|
+
private _failedResponse;
|
|
239
|
+
private readonly _bashAbortControllers;
|
|
240
|
+
private _pendingBashMessages;
|
|
241
|
+
private _extensionRunner;
|
|
242
|
+
private _turnIndex;
|
|
243
|
+
private readonly _entryIdsByMessage;
|
|
244
|
+
private readonly _boundaryDispatchedMessages;
|
|
245
|
+
private _lastAssistantMessage;
|
|
246
|
+
private _lastAssistantToolResults;
|
|
247
|
+
private _lastActivityOutcome;
|
|
248
|
+
private _isBeforeSettle;
|
|
249
|
+
private _abortDuringBeforeSettle;
|
|
250
|
+
private _isEmittingAgentSettled;
|
|
251
|
+
private readonly _deferredSettledActions;
|
|
252
|
+
private _resourceLoader;
|
|
253
|
+
private _customTools;
|
|
254
|
+
private _baseToolDefinitions;
|
|
255
|
+
private _cwd;
|
|
256
|
+
private _extensionRunnerRef?;
|
|
257
|
+
private _initialActiveToolNames?;
|
|
258
|
+
/**
|
|
259
|
+
* Tools of the restored or reloaded loadout that are not registered yet, such as tools of MCP
|
|
260
|
+
* servers that are still connecting. They are activated when they are registered, and dropped when
|
|
261
|
+
* `setActiveToolsByName()` deactivates a tool or the next agent run starts.
|
|
262
|
+
*/
|
|
263
|
+
private _pendingToolNames;
|
|
264
|
+
private _usesDefaultTools;
|
|
265
|
+
private _allowedToolNames?;
|
|
266
|
+
private _excludedToolNames?;
|
|
267
|
+
private _baseToolsOverride?;
|
|
268
|
+
private _sessionStartEvent;
|
|
269
|
+
private _extensionUIContext?;
|
|
270
|
+
private _extensionMode;
|
|
271
|
+
private _extensionCommandContextActions?;
|
|
272
|
+
private _extensionAbortHandler?;
|
|
273
|
+
private _extensionShutdownHandler?;
|
|
274
|
+
private _extensionErrorListener?;
|
|
275
|
+
private _extensionErrorUnsubscriber?;
|
|
276
|
+
private _modelRuntime;
|
|
277
|
+
private _harnessCore;
|
|
278
|
+
private _cacheWarmer?;
|
|
279
|
+
private _toolRegistry;
|
|
280
|
+
/** Created on the first `ctx.executeTool()` call. */
|
|
281
|
+
private _nestedToolCalls;
|
|
282
|
+
/** Declared tools whose declarations requests leave out, from `prepareLoadout` hooks. */
|
|
283
|
+
private _hiddenDeclarations;
|
|
284
|
+
private _toolDefinitions;
|
|
285
|
+
private _toolPromptSnippets;
|
|
286
|
+
private _toolPromptGuidelines;
|
|
287
|
+
private _baseSystemPromptOptions;
|
|
288
|
+
/** Prompt options after before_agent_start mutations for the active run. */
|
|
289
|
+
private _runSystemPromptOptions?;
|
|
290
|
+
constructor(config: AgentSessionConfig);
|
|
291
|
+
get modelRuntime(): ModelRuntime;
|
|
292
|
+
/** The harness pillars installed on this session: alignment, evidence, context, and skills. */
|
|
293
|
+
get harnessCore(): CodingHarnessCore;
|
|
294
|
+
private _getRequiredRequestAuth;
|
|
295
|
+
private _getSummarizationRequestAuth;
|
|
296
|
+
/**
|
|
297
|
+
* The model whose limits apply to `message`, or undefined when the message came from another
|
|
298
|
+
* model. Under a virtual selection, that is the physical model that produced it.
|
|
299
|
+
*/
|
|
300
|
+
private _modelForMessage;
|
|
301
|
+
/**
|
|
302
|
+
* Record the selection on the current branch when the branch implies another one, so a resume
|
|
303
|
+
* restores it. Tree navigation can leave the latest `model_change` on another branch; responses
|
|
304
|
+
* cannot record a virtual selection because they name physical models. Responses do record a
|
|
305
|
+
* physical selection unless the branch holds a virtual one; checking a physical selection against
|
|
306
|
+
* responses would record it on every prompt while `prepareRequest` redirects to another model.
|
|
307
|
+
*/
|
|
308
|
+
private _recordSelection;
|
|
309
|
+
/** The model whose limits apply to the conversation. */
|
|
310
|
+
private _limitsModel;
|
|
311
|
+
/**
|
|
312
|
+
* Install tool hooks once on the Agent instance.
|
|
313
|
+
*
|
|
314
|
+
* The callbacks read `this._extensionRunner` at execution time, so extension reload swaps in the
|
|
315
|
+
* new runner without reinstalling hooks. Extension-specific tool wrappers are still used to adapt
|
|
316
|
+
* registered tool execution to the extension context. Tool call and tool result interception now
|
|
317
|
+
* happens here instead of in wrappers.
|
|
318
|
+
*/
|
|
319
|
+
private _installAgentToolHooks;
|
|
320
|
+
/** `tool_call` handlers. `parentToolCallId` is set for calls another tool made. */
|
|
321
|
+
private _beforeToolCall;
|
|
322
|
+
/** `tool_result` handlers and image normalization. `parentToolCallId` is set for calls another tool made. */
|
|
323
|
+
private _afterToolCall;
|
|
324
|
+
/**
|
|
325
|
+
* Run a call that the tool call `parentToolCallId` made through `ctx.executeTool()`. It goes
|
|
326
|
+
* through the agent's tool pipeline with the session's hooks, against the callable tools.
|
|
327
|
+
*/
|
|
328
|
+
private _executeNestedToolCall;
|
|
329
|
+
/** Whether `projection`, the current session projection, exceeds the compaction threshold of `model`. */
|
|
330
|
+
private _exceedsCompactionThreshold;
|
|
331
|
+
private _compactBeforeNextAssistantResponse;
|
|
332
|
+
private _installAgentRequestProjection;
|
|
333
|
+
private _dispatchTurnEndBoundary;
|
|
334
|
+
private _installAgentBoundaryHooks;
|
|
335
|
+
private _installAgentNextTurnRefresh;
|
|
336
|
+
private _refreshFinalizedContext;
|
|
337
|
+
private _applyBoundaryDrafts;
|
|
338
|
+
private _createBoundaryPreviewManager;
|
|
339
|
+
private _getPendingBoundaryMessages;
|
|
340
|
+
private _buildBoundaryContext;
|
|
341
|
+
private _commitBoundaryDrafts;
|
|
342
|
+
private _reportInvalidBoundaryContinuation;
|
|
343
|
+
/** Emit an event to all listeners */
|
|
344
|
+
private _emit;
|
|
345
|
+
private _emitQueueUpdate;
|
|
346
|
+
private _emitSessionCompactFailed;
|
|
347
|
+
private _getIdleWaitPromise;
|
|
348
|
+
private _resolveIdleWaitIfIdle;
|
|
349
|
+
private _emitAgentSettled;
|
|
350
|
+
/** Internal handler for agent events - shared by subscribe and reconnect */
|
|
351
|
+
private _handleAgentEvent;
|
|
352
|
+
private _willRetryAfterAgentEnd;
|
|
353
|
+
private _findPersistedMessageEntryId;
|
|
354
|
+
private _omitRecoveryAttempt;
|
|
355
|
+
/** Find the last assistant message in agent state (including aborted ones) */
|
|
356
|
+
private _findLastAssistantMessage;
|
|
357
|
+
private _replaceMessageInPlace;
|
|
358
|
+
/** Emit extension events based on agent events */
|
|
359
|
+
private _emitExtensionEvent;
|
|
360
|
+
/**
|
|
361
|
+
* Subscribe to agent events.
|
|
362
|
+
* Session persistence is handled internally (saves messages on message_end).
|
|
363
|
+
* Multiple listeners can be added. Returns unsubscribe function for this listener.
|
|
364
|
+
*/
|
|
365
|
+
subscribe(listener: AgentSessionEventListener): () => void;
|
|
366
|
+
/** Disconnect from agent events during disposal. */
|
|
367
|
+
private _disconnectFromAgent;
|
|
368
|
+
/**
|
|
369
|
+
* Remove all listeners and disconnect from agent.
|
|
370
|
+
* Call this when completely done with the session.
|
|
371
|
+
*/
|
|
372
|
+
dispose(): void;
|
|
373
|
+
/** Refresh the public finalized transcript from the canonical session projection. */
|
|
374
|
+
refreshContext(): void;
|
|
375
|
+
/** Full agent state */
|
|
376
|
+
get state(): AgentState;
|
|
377
|
+
/** Current cache-warming state and the policy inputs that produced it. */
|
|
378
|
+
get cacheWarmingStatus(): CacheWarmingStatus | undefined;
|
|
379
|
+
/** Persist the cache-warming mode and immediately reconcile active warming. */
|
|
380
|
+
setCacheWarmingMode(mode: CacheWarmingMode): void;
|
|
381
|
+
/** Current model (may be undefined if not yet selected) */
|
|
382
|
+
get model(): Model<any> | undefined;
|
|
383
|
+
/** Current thinking level */
|
|
384
|
+
get thinkingLevel(): ThinkingLevel;
|
|
385
|
+
/** Under a virtual selection, the physical model and thinking level of the latest successful response. */
|
|
386
|
+
get routedModel(): {
|
|
387
|
+
model: Model<any>;
|
|
388
|
+
thinkingLevel?: ThinkingLevel;
|
|
389
|
+
} | undefined;
|
|
390
|
+
/** Whether the session is currently processing an agent run or post-run continuation. */
|
|
391
|
+
get isStreaming(): boolean;
|
|
392
|
+
/** Whether the session has no active agent run, compaction, branch summary, retry, or queued continuation. */
|
|
393
|
+
get isIdle(): boolean;
|
|
394
|
+
/** Current effective system prompt, including changes not yet sent to the model. */
|
|
395
|
+
get systemPrompt(): string;
|
|
396
|
+
/** Current retry attempt (0 if not retrying) */
|
|
397
|
+
get retryAttempt(): number;
|
|
398
|
+
/**
|
|
399
|
+
* Get the names of currently active tools, which are the tools declared to the model.
|
|
400
|
+
* Tools with `codemode` or `deferred` exposure are callable from other tools without being active.
|
|
401
|
+
*/
|
|
402
|
+
getActiveToolNames(): string[];
|
|
403
|
+
/** Get the names of the tools that tools can call through `ctx.executeTool()`. */
|
|
404
|
+
getCallableToolNames(): string[];
|
|
405
|
+
/**
|
|
406
|
+
* Get all configured tools with name, description, parameter schema, prompt guidelines, and source metadata.
|
|
407
|
+
*/
|
|
408
|
+
getAllTools(): ToolInfo[];
|
|
409
|
+
getToolDefinition(name: string): ToolDefinition | undefined;
|
|
410
|
+
/**
|
|
411
|
+
* Set active tools by name.
|
|
412
|
+
* Only tools in the registry can be enabled. Unknown and hidden tool names are ignored.
|
|
413
|
+
* Also rebuilds the system prompt to reflect the new tool set.
|
|
414
|
+
* Changes take effect on the next agent turn.
|
|
415
|
+
*/
|
|
416
|
+
setActiveToolsByName(toolNames: string[]): void;
|
|
417
|
+
private _setActiveTools;
|
|
418
|
+
private _isAllowedTool;
|
|
419
|
+
private _getToolExposure;
|
|
420
|
+
/**
|
|
421
|
+
* Tools callable through `ctx.executeTool()`: the active `direct` tools and every registered
|
|
422
|
+
* `codemode` or `deferred` tool.
|
|
423
|
+
*/
|
|
424
|
+
private _getCallableTools;
|
|
425
|
+
/**
|
|
426
|
+
* Set the agent's tools for the given active tool names and return them. The active tools are
|
|
427
|
+
* the registered, non-hidden ones; they are declared to the model. Active tools with a
|
|
428
|
+
* `prepareLoadout` hook can change the declared descriptions and hide declarations from
|
|
429
|
+
* requests (see {@link _installHiddenDeclarationsProjection}).
|
|
430
|
+
*/
|
|
431
|
+
private _applyToolLoadout;
|
|
432
|
+
/** Whether compaction or branch summarization is currently running */
|
|
433
|
+
get isCompacting(): boolean;
|
|
434
|
+
/** All messages including custom types like BashExecutionMessage */
|
|
435
|
+
get messages(): AgentMessage[];
|
|
436
|
+
/** Current steering mode */
|
|
437
|
+
get steeringMode(): "all" | "one-at-a-time";
|
|
438
|
+
/** Current follow-up mode */
|
|
439
|
+
get followUpMode(): "all" | "one-at-a-time";
|
|
440
|
+
/** Current session file path, or undefined if sessions are disabled */
|
|
441
|
+
get sessionFile(): string | undefined;
|
|
442
|
+
/** Current session ID */
|
|
443
|
+
get sessionId(): string;
|
|
444
|
+
/** Current session display name, if set */
|
|
445
|
+
get sessionName(): string | undefined;
|
|
446
|
+
/** Scoped models for cycling (from --models flag) */
|
|
447
|
+
get scopedModels(): ReadonlyArray<{
|
|
448
|
+
model: Model<any>;
|
|
449
|
+
thinkingLevel?: ThinkingLevel;
|
|
450
|
+
}>;
|
|
451
|
+
/** Update scoped models for cycling */
|
|
452
|
+
setScopedModels(scopedModels: Array<{
|
|
453
|
+
model: Model<any>;
|
|
454
|
+
thinkingLevel?: ThinkingLevel;
|
|
455
|
+
}>): void;
|
|
456
|
+
/** File-based prompt templates */
|
|
457
|
+
get promptTemplates(): ReadonlyArray<PromptTemplate>;
|
|
458
|
+
private _normalizePromptSnippet;
|
|
459
|
+
private _normalizePromptGuidelines;
|
|
460
|
+
private _rebuildSystemPrompt;
|
|
461
|
+
/**
|
|
462
|
+
* Apply a prompt and tool loadout for the next request. Sets the executable tools and
|
|
463
|
+
* returns a system message patching the prompt sections the model currently has (replayed
|
|
464
|
+
* from `messages`), or undefined when the prompt is unchanged. Tool changes are declared by
|
|
465
|
+
* the agent loop before the request.
|
|
466
|
+
*
|
|
467
|
+
* A forced prompt does not affect the transcript: the structured sections are still diffed
|
|
468
|
+
* and persisted, and the forced text is projected onto the request by
|
|
469
|
+
* {@link _installAgentForcedPromptProjection}.
|
|
470
|
+
*/
|
|
471
|
+
private _preparePromptAndToolLoadout;
|
|
472
|
+
/**
|
|
473
|
+
* Send a forced prompt as the provider's leading system prompt without recording it.
|
|
474
|
+
*
|
|
475
|
+
* A `before_agent_start` handler that returns `systemPrompt` needs that exact text at the
|
|
476
|
+
* head of the request; a mid-conversation system message would leave the original prompt
|
|
477
|
+
* in place. The forced text is a rendering of the current prompt, so the transcript keeps
|
|
478
|
+
* its structured sections and the request is projected instead: the system messages
|
|
479
|
+
* collapse into one head holding the forced text and the current tools. Runs after the
|
|
480
|
+
* `context` extension handlers.
|
|
481
|
+
*/
|
|
482
|
+
/**
|
|
483
|
+
* Remove the declarations that `prepareLoadout` hooks hide from every request. The whole
|
|
484
|
+
* transcript is filtered with the current set, so the projected declarations stay consistent
|
|
485
|
+
* across requests and only change when the loadout does.
|
|
486
|
+
*/
|
|
487
|
+
private _installHiddenDeclarationsProjection;
|
|
488
|
+
private _installAgentForcedPromptProjection;
|
|
489
|
+
/**
|
|
490
|
+
* Restore the active tool loadout declared by the session transcript, if it declares one.
|
|
491
|
+
* Tools reachable only from other tools are never declared, but they do not depend on the active
|
|
492
|
+
* set, so the transcript's declarations are the whole loadout.
|
|
493
|
+
*/
|
|
494
|
+
private _restoreToolsFromTranscript;
|
|
495
|
+
private _runAgentPrompt;
|
|
496
|
+
private _handlePostAgentRun;
|
|
497
|
+
private _runBeforeSettleBoundary;
|
|
498
|
+
private _runInputHandlers;
|
|
499
|
+
private _normalizePromptImages;
|
|
500
|
+
/**
|
|
501
|
+
* Send a prompt to the agent.
|
|
502
|
+
* - Handles extension commands (registered via relay.registerCommand) immediately, even during streaming
|
|
503
|
+
* - Expands file-based prompt templates by default
|
|
504
|
+
* - During streaming, queues via steer() or followUp() based on streamingBehavior option
|
|
505
|
+
* - Validates model and API key before sending (when not streaming)
|
|
506
|
+
* @throws Error if streaming and no streamingBehavior specified
|
|
507
|
+
* @throws Error if no model selected or no API key available (when not streaming)
|
|
508
|
+
*/
|
|
509
|
+
prompt(text: string, options?: PromptOptions): Promise<void>;
|
|
510
|
+
/**
|
|
511
|
+
* Try to execute an extension command. Returns true if command was found and executed.
|
|
512
|
+
*/
|
|
513
|
+
private _tryExecuteExtensionCommand;
|
|
514
|
+
/**
|
|
515
|
+
* Expand skill commands (/skill:name args) to their full content.
|
|
516
|
+
* Returns the expanded text, or the original text if not a skill command or skill not found.
|
|
517
|
+
* Emits errors via extension runner if file read fails.
|
|
518
|
+
*/
|
|
519
|
+
private _expandSkillCommand;
|
|
520
|
+
private _queueUserInput;
|
|
521
|
+
/**
|
|
522
|
+
* Queue a steering message while the agent is running.
|
|
523
|
+
* Delivered after the current assistant turn finishes executing its tool calls,
|
|
524
|
+
* before the next LLM call.
|
|
525
|
+
* Expands skill commands and prompt templates. Errors on extension commands.
|
|
526
|
+
* @param images Optional image attachments to include with the message
|
|
527
|
+
* @param options Input source; defaults to interactive
|
|
528
|
+
* @throws Error if text is an extension command
|
|
529
|
+
*/
|
|
530
|
+
steer(text: string, images?: ImageContent[], options?: {
|
|
531
|
+
source?: InputSource;
|
|
532
|
+
}): Promise<QueuedInputDisposition>;
|
|
533
|
+
/**
|
|
534
|
+
* Queue a follow-up message to be processed after the agent finishes.
|
|
535
|
+
* Delivered only when agent has no more tool calls or steering messages.
|
|
536
|
+
* Expands skill commands and prompt templates. Errors on extension commands.
|
|
537
|
+
* @param images Optional image attachments to include with the message
|
|
538
|
+
* @param options Input source; defaults to interactive
|
|
539
|
+
* @throws Error if text is an extension command
|
|
540
|
+
*/
|
|
541
|
+
followUp(text: string, images?: ImageContent[], options?: {
|
|
542
|
+
source?: InputSource;
|
|
543
|
+
}): Promise<QueuedInputDisposition>;
|
|
544
|
+
/**
|
|
545
|
+
* Internal: Queue a steering message (already expanded, no extension command check).
|
|
546
|
+
*/
|
|
547
|
+
private _queueSteer;
|
|
548
|
+
/**
|
|
549
|
+
* Internal: Queue a follow-up message (already expanded, no extension command check).
|
|
550
|
+
*/
|
|
551
|
+
private _queueFollowUp;
|
|
552
|
+
/**
|
|
553
|
+
* Throw an error if the text is an extension command.
|
|
554
|
+
*/
|
|
555
|
+
private _throwIfExtensionCommand;
|
|
556
|
+
/**
|
|
557
|
+
* Send a custom message to the session. Creates a CustomMessageEntry.
|
|
558
|
+
*
|
|
559
|
+
* Handles four cases:
|
|
560
|
+
* - Streaming: queues message, processed when loop pulls from queue
|
|
561
|
+
* - Streaming + triggerTurn false: appended to state/session once the current turn ends
|
|
562
|
+
* - Not streaming + triggerTurn: appends to state/session, starts new turn
|
|
563
|
+
* - Not streaming + no trigger: appends to state/session, no turn
|
|
564
|
+
*
|
|
565
|
+
* @param message Custom message with customType, content, display, details
|
|
566
|
+
* @param options.triggerTurn If true and not streaming, triggers a new LLM turn
|
|
567
|
+
* @param options.deliverAs Delivery mode: "steer", "followUp", or "nextTurn"
|
|
568
|
+
*/
|
|
569
|
+
sendCustomMessage<T = unknown>(message: Pick<CustomMessage<T>, "customType" | "content" | "display" | "details">, options?: {
|
|
570
|
+
triggerTurn?: boolean;
|
|
571
|
+
deliverAs?: "steer" | "followUp" | "nextTurn";
|
|
572
|
+
}): Promise<void>;
|
|
573
|
+
private _appendCustomMessage;
|
|
574
|
+
/**
|
|
575
|
+
* Append custom messages queued while the agent was running.
|
|
576
|
+
* Called once the current turn's tool results are in agent state and session history.
|
|
577
|
+
*/
|
|
578
|
+
private _flushPendingCustomMessages;
|
|
579
|
+
/**
|
|
580
|
+
* Send a user message to the agent. Always triggers a turn.
|
|
581
|
+
* When the agent is streaming, use deliverAs to specify how to queue the message.
|
|
582
|
+
*
|
|
583
|
+
* @param content User message content (string or content array)
|
|
584
|
+
* @param options.deliverAs Delivery mode when streaming: "steer" or "followUp"
|
|
585
|
+
* @param options.expandPromptTemplates Whether to dispatch extension commands and expand skill commands and prompt templates. Default: false.
|
|
586
|
+
*/
|
|
587
|
+
sendUserMessage(content: string | (TextContent | ImageContent)[], options?: {
|
|
588
|
+
deliverAs?: "steer" | "followUp";
|
|
589
|
+
expandPromptTemplates?: boolean;
|
|
590
|
+
}): Promise<void>;
|
|
591
|
+
/**
|
|
592
|
+
* Clear all queued messages and return them.
|
|
593
|
+
* Useful for restoring to editor when user aborts.
|
|
594
|
+
* @returns Object with steering and followUp arrays
|
|
595
|
+
*/
|
|
596
|
+
clearQueue(): {
|
|
597
|
+
steering: string[];
|
|
598
|
+
followUp: string[];
|
|
599
|
+
};
|
|
600
|
+
/** Number of pending messages (includes both steering and follow-up) */
|
|
601
|
+
get pendingMessageCount(): number;
|
|
602
|
+
/** Get pending steering messages (read-only) */
|
|
603
|
+
getSteeringMessages(): readonly string[];
|
|
604
|
+
/** Get pending follow-up messages (read-only) */
|
|
605
|
+
getFollowUpMessages(): readonly string[];
|
|
606
|
+
get resourceLoader(): ResourceLoader;
|
|
607
|
+
/**
|
|
608
|
+
* Abort current operation and wait for agent to become idle.
|
|
609
|
+
*/
|
|
610
|
+
abort(): Promise<void>;
|
|
611
|
+
waitForIdle(): Promise<void>;
|
|
612
|
+
private _emitModelSelect;
|
|
613
|
+
/**
|
|
614
|
+
* Set model directly.
|
|
615
|
+
* Validates that auth is configured and saves to the session transcript.
|
|
616
|
+
* Persists to global defaults only when options.persist is true.
|
|
617
|
+
* @throws Error if no auth is configured for the model
|
|
618
|
+
*/
|
|
619
|
+
setModel(model: Model<any>, options?: ModelMutationOptions): Promise<void>;
|
|
620
|
+
private _addPersistedDefaultToNonEmptyScope;
|
|
621
|
+
/**
|
|
622
|
+
* Cycle to next/previous model.
|
|
623
|
+
* Uses scoped models (from --models flag) if available, otherwise all available models.
|
|
624
|
+
* @param direction - "forward" (default) or "backward"
|
|
625
|
+
* @returns The new model info, or undefined if only one model available
|
|
626
|
+
*/
|
|
627
|
+
cycleModel(direction?: "forward" | "backward", options?: ModelMutationOptions): Promise<ModelCycleResult | undefined>;
|
|
628
|
+
private _cycleScopedModel;
|
|
629
|
+
private _cycleAvailableModel;
|
|
630
|
+
/**
|
|
631
|
+
* Set thinking level.
|
|
632
|
+
* Clamps to model capabilities based on available thinking levels.
|
|
633
|
+
* Saves the clamped level to the session transcript only if the level actually changes.
|
|
634
|
+
* Persists the requested level to global defaults only when options.persist is true.
|
|
635
|
+
*/
|
|
636
|
+
setThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;
|
|
637
|
+
/**
|
|
638
|
+
* Cycle to next thinking level.
|
|
639
|
+
* @returns New level, or undefined if model doesn't support thinking
|
|
640
|
+
*/
|
|
641
|
+
cycleThinkingLevel(options?: ModelMutationOptions): ThinkingLevel | undefined;
|
|
642
|
+
/**
|
|
643
|
+
* Get available thinking levels for current model.
|
|
644
|
+
* The provider will clamp to what the specific model supports internally.
|
|
645
|
+
*/
|
|
646
|
+
getAvailableThinkingLevels(): ThinkingLevel[];
|
|
647
|
+
/**
|
|
648
|
+
* Check if current model supports thinking/reasoning.
|
|
649
|
+
*/
|
|
650
|
+
supportsThinking(): boolean;
|
|
651
|
+
private _getThinkingLevelForModelSwitch;
|
|
652
|
+
private _clampThinkingLevel;
|
|
653
|
+
private syncQueueModesFromSettings;
|
|
654
|
+
/**
|
|
655
|
+
* Set steering message mode.
|
|
656
|
+
* Saves to settings.
|
|
657
|
+
*/
|
|
658
|
+
setSteeringMode(mode: "all" | "one-at-a-time"): void;
|
|
659
|
+
/**
|
|
660
|
+
* Set follow-up message mode.
|
|
661
|
+
* Saves to settings.
|
|
662
|
+
*/
|
|
663
|
+
setFollowUpMode(mode: "all" | "one-at-a-time"): void;
|
|
664
|
+
/** Generate Relay's built-in compaction summary for manual and automatic compaction. */
|
|
665
|
+
private _runDefaultCompaction;
|
|
666
|
+
private _clearManualCompactionState;
|
|
667
|
+
/**
|
|
668
|
+
* Manually compact the session context.
|
|
669
|
+
*
|
|
670
|
+
* This is the manual entry point used by `/compact`, RPC, and extensions. It is
|
|
671
|
+
* separate from automatic threshold/overflow compaction, which enters through
|
|
672
|
+
* `_checkCompaction()` and `_runAutoCompaction()`. After preparation and the
|
|
673
|
+
* `session_before_compact` hook, both paths call the lower-level `compact()`
|
|
674
|
+
* function imported from `./compaction/index.ts`, unless the hook cancels or
|
|
675
|
+
* supplies a custom result.
|
|
676
|
+
*
|
|
677
|
+
* Aborts the current agent operation first. Manual compaction never retries or
|
|
678
|
+
* continues the interrupted agent turn.
|
|
679
|
+
*
|
|
680
|
+
* @param customInstructions Optional instructions for the compaction summary
|
|
681
|
+
*/
|
|
682
|
+
compact(customInstructions?: string): Promise<CompactionResult>;
|
|
683
|
+
/**
|
|
684
|
+
* Cancel in-progress compaction (manual or auto).
|
|
685
|
+
*/
|
|
686
|
+
abortCompaction(): void;
|
|
687
|
+
/**
|
|
688
|
+
* Cancel in-progress branch summarization.
|
|
689
|
+
*/
|
|
690
|
+
abortBranchSummary(): void;
|
|
691
|
+
/**
|
|
692
|
+
* Dispatch automatic compaction after `agent_end` or before prompt submission.
|
|
693
|
+
* Manual compaction does not call this method; it enters through `compact()`.
|
|
694
|
+
*
|
|
695
|
+
* Automatic cases:
|
|
696
|
+
* 1. Overflow with retry: a context-overflow error or recoverable length stop;
|
|
697
|
+
* remove the failed assistant message, compact, and retry the turn once.
|
|
698
|
+
* 2. Overflow without retry: a successful response exceeded the configured
|
|
699
|
+
* context window; compact but preserve the completed response.
|
|
700
|
+
* 3. Threshold without retry: valid or estimated context usage crossed the
|
|
701
|
+
* configured threshold; compact without retrying the completed response.
|
|
702
|
+
*
|
|
703
|
+
* Each case calls `_runAutoCompaction()`. After preparation and the
|
|
704
|
+
* `session_before_compact` hook, that method calls the lower-level `compact()`
|
|
705
|
+
* function imported from `./compaction/index.ts`, unless the hook cancels or
|
|
706
|
+
* supplies a custom result.
|
|
707
|
+
*
|
|
708
|
+
* @param assistantMessage The assistant message to check
|
|
709
|
+
* @param skipAbortedCheck If false, include aborted messages (for pre-prompt check). Default: true
|
|
710
|
+
* @returns Whether the post-run loop should call `agent.continue()` for overflow recovery or queued messages
|
|
711
|
+
*/
|
|
712
|
+
private _checkCompaction;
|
|
713
|
+
/**
|
|
714
|
+
* Execute threshold or overflow compaction. Manual compaction uses
|
|
715
|
+
* `AgentSession.compact()` instead. Both paths call the lower-level `compact()`
|
|
716
|
+
* function imported from `./compaction/index.ts` after preparation and extension
|
|
717
|
+
* interception.
|
|
718
|
+
*
|
|
719
|
+
* @param reason Automatic trigger selected by `_checkCompaction()`
|
|
720
|
+
* @param willRetry Whether to continue the interrupted turn after overflow compaction
|
|
721
|
+
* @returns Whether the post-run loop should call `agent.continue()`
|
|
722
|
+
*/
|
|
723
|
+
private _runAutoCompaction;
|
|
724
|
+
/**
|
|
725
|
+
* Toggle auto-compaction setting.
|
|
726
|
+
*/
|
|
727
|
+
setAutoCompactionEnabled(enabled: boolean): void;
|
|
728
|
+
/** Whether auto-compaction is enabled */
|
|
729
|
+
get autoCompactionEnabled(): boolean;
|
|
730
|
+
bindExtensions(bindings: ExtensionBindings): Promise<void>;
|
|
731
|
+
private extendResourcesFromExtensions;
|
|
732
|
+
private buildExtensionResourcePaths;
|
|
733
|
+
private getExtensionSourceLabel;
|
|
734
|
+
private _applyExtensionBindings;
|
|
735
|
+
private _refreshCurrentModelFromRegistry;
|
|
736
|
+
private _bindExtensionCore;
|
|
737
|
+
private _refreshToolRegistry;
|
|
738
|
+
/** Whether activating the tool declares it to the model. */
|
|
739
|
+
private _isDeclarable;
|
|
740
|
+
/** Whether registering the tool activates it, which declares it to the model. */
|
|
741
|
+
private _isActivatedOnRegistration;
|
|
742
|
+
private _buildRuntime;
|
|
743
|
+
reload(options?: {
|
|
744
|
+
beforeSessionStart?: () => void | Promise<void>;
|
|
745
|
+
}): Promise<void>;
|
|
746
|
+
/**
|
|
747
|
+
* Check if an error is retryable (overloaded, rate limit, server errors).
|
|
748
|
+
* Context overflow errors are NOT retryable (handled by compaction instead).
|
|
749
|
+
*/
|
|
750
|
+
private _isRetryableError;
|
|
751
|
+
/**
|
|
752
|
+
* Retry policy + callbacks shared by compaction and branch-summary summarization calls.
|
|
753
|
+
* Uses the same `settings.retry` budget/backoff as agent-turn retries so a single transient
|
|
754
|
+
* stream drop no longer fails the whole operation. `source` carries the context
|
|
755
|
+
* the TUI needs to render the retry and recreate the underlying indicator.
|
|
756
|
+
*/
|
|
757
|
+
private _summarizationRetryCallbacks;
|
|
758
|
+
private _finishCancelledRetry;
|
|
759
|
+
/**
|
|
760
|
+
* Prepare a retryable error for continuation with exponential backoff.
|
|
761
|
+
* @returns true if the caller should continue the agent, false otherwise
|
|
762
|
+
*/
|
|
763
|
+
private _prepareRetry;
|
|
764
|
+
/**
|
|
765
|
+
* Cancel in-progress retry.
|
|
766
|
+
*/
|
|
767
|
+
abortRetry(): void;
|
|
768
|
+
/** Whether auto-retry is currently in progress */
|
|
769
|
+
get isRetrying(): boolean;
|
|
770
|
+
/** Whether auto-retry is enabled */
|
|
771
|
+
get autoRetryEnabled(): boolean;
|
|
772
|
+
/**
|
|
773
|
+
* Toggle auto-retry setting.
|
|
774
|
+
*/
|
|
775
|
+
setAutoRetryEnabled(enabled: boolean): void;
|
|
776
|
+
/**
|
|
777
|
+
* Execute a bash command.
|
|
778
|
+
* Adds result to agent context and session.
|
|
779
|
+
* @param command The bash command to execute
|
|
780
|
+
* @param onChunk Optional streaming callback for output
|
|
781
|
+
* @param options.excludeFromContext If true, command output won't be sent to LLM (!! prefix)
|
|
782
|
+
* @param options.id Optional identifier included in bash execution update events
|
|
783
|
+
* @param options.operations Custom BashOperations for remote execution
|
|
784
|
+
*/
|
|
785
|
+
executeBash(command: string, onChunk?: (chunk: string) => void, options?: {
|
|
786
|
+
excludeFromContext?: boolean;
|
|
787
|
+
id?: string;
|
|
788
|
+
operations?: BashOperations;
|
|
789
|
+
}): Promise<BashResult>;
|
|
790
|
+
/**
|
|
791
|
+
* Record a bash execution result in session history.
|
|
792
|
+
* Used by executeBash and by extensions that handle bash execution themselves.
|
|
793
|
+
*/
|
|
794
|
+
recordBashResult(command: string, result: BashResult, options?: {
|
|
795
|
+
excludeFromContext?: boolean;
|
|
796
|
+
}): void;
|
|
797
|
+
/**
|
|
798
|
+
* Cancel running bash command.
|
|
799
|
+
*/
|
|
800
|
+
abortBash(): void;
|
|
801
|
+
/** Whether a bash command is currently running */
|
|
802
|
+
get isBashRunning(): boolean;
|
|
803
|
+
/** Whether there are pending bash messages waiting to be flushed */
|
|
804
|
+
get hasPendingBashMessages(): boolean;
|
|
805
|
+
/**
|
|
806
|
+
* Flush pending bash messages to agent state and session.
|
|
807
|
+
* Called after agent turn completes to maintain proper message ordering.
|
|
808
|
+
*/
|
|
809
|
+
private _flushPendingBashMessages;
|
|
810
|
+
/**
|
|
811
|
+
* Set a display name for the current session.
|
|
812
|
+
*/
|
|
813
|
+
setSessionName(name: string): void;
|
|
814
|
+
/**
|
|
815
|
+
* Navigate to a different node in the session tree.
|
|
816
|
+
* Unlike fork() which creates a new session file, this stays in the same file.
|
|
817
|
+
*
|
|
818
|
+
* @param targetId The entry ID to navigate to
|
|
819
|
+
* @param options.summarize Whether user wants to summarize abandoned branch
|
|
820
|
+
* @param options.customInstructions Custom instructions for summarizer
|
|
821
|
+
* @param options.replaceInstructions If true, customInstructions replaces the default prompt
|
|
822
|
+
* @param options.label Label to attach to the branch summary entry
|
|
823
|
+
* @returns Result with editorText (if user message) and cancelled status
|
|
824
|
+
*/
|
|
825
|
+
navigateTree(targetId: string, options?: {
|
|
826
|
+
summarize?: boolean;
|
|
827
|
+
customInstructions?: string;
|
|
828
|
+
replaceInstructions?: boolean;
|
|
829
|
+
label?: string;
|
|
830
|
+
}): Promise<{
|
|
831
|
+
editorText?: string;
|
|
832
|
+
cancelled: boolean;
|
|
833
|
+
aborted?: boolean;
|
|
834
|
+
summaryEntry?: BranchSummaryEntry;
|
|
835
|
+
}>;
|
|
836
|
+
/**
|
|
837
|
+
* Get all user messages from session for fork selector.
|
|
838
|
+
*/
|
|
839
|
+
getUserMessagesForForking(): Array<{
|
|
840
|
+
entryId: string;
|
|
841
|
+
text: string;
|
|
842
|
+
}>;
|
|
843
|
+
/**
|
|
844
|
+
* Get session statistics. Aggregates over ALL session entries (including
|
|
845
|
+
* history that was compacted away), so token/cost totals reflect what was
|
|
846
|
+
* actually billed across the session.
|
|
847
|
+
*/
|
|
848
|
+
getSessionStats(): SessionStats;
|
|
849
|
+
getContextUsage(): ContextUsage | undefined;
|
|
850
|
+
/**
|
|
851
|
+
* Export session to HTML.
|
|
852
|
+
* @param outputPath Optional output path (defaults to session directory)
|
|
853
|
+
* @param options Optional export presentation settings
|
|
854
|
+
* @returns Path to exported file
|
|
855
|
+
*/
|
|
856
|
+
exportToHtml(outputPath?: string, options?: {
|
|
857
|
+
themeName?: string;
|
|
858
|
+
}): Promise<string>;
|
|
859
|
+
/**
|
|
860
|
+
* Export the current session branch to a JSONL file.
|
|
861
|
+
* Writes the session header followed by all entries on the current branch path.
|
|
862
|
+
* @param outputPath Target file path. If omitted, generates a timestamped file in cwd.
|
|
863
|
+
* @returns The resolved output file path.
|
|
864
|
+
*/
|
|
865
|
+
exportToJsonl(outputPath?: string): string;
|
|
866
|
+
/**
|
|
867
|
+
* Ask the current model to describe what went wrong in this session for a bug report.
|
|
868
|
+
* Used when the user declines to share the transcript itself.
|
|
869
|
+
*/
|
|
870
|
+
summarizeForBugReport(options: {
|
|
871
|
+
hint?: string;
|
|
872
|
+
signal: AbortSignal;
|
|
873
|
+
}): Promise<string>;
|
|
874
|
+
/**
|
|
875
|
+
* Get text content of last assistant message.
|
|
876
|
+
* Useful for /copy command.
|
|
877
|
+
* @returns Text content, or undefined if no assistant message exists
|
|
878
|
+
*/
|
|
879
|
+
getLastAssistantText(): string | undefined;
|
|
880
|
+
createReplacedSessionContext(): ReplacedSessionContext;
|
|
881
|
+
/**
|
|
882
|
+
* Check if extensions have handlers for a specific event type.
|
|
883
|
+
*/
|
|
884
|
+
hasExtensionHandlers(eventType: string): boolean;
|
|
885
|
+
/**
|
|
886
|
+
* Get the extension runner (for setting UI context and error handlers).
|
|
887
|
+
*/
|
|
888
|
+
get extensionRunner(): ExtensionRunner;
|
|
889
|
+
}
|
|
890
|
+
export {};
|
|
891
|
+
//# sourceMappingURL=agent-session.d.ts.map
|