@draht/coding-agent 2026.7.30 → 2026.10.4-2
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 +606 -0
- package/README.md +46 -2
- package/agents/debugger.md +12 -1
- package/agents/git-committer.md +1 -0
- package/agents/implementer.md +20 -0
- package/agents/investigator.md +75 -0
- package/agents/reviewer.md +7 -0
- package/agents/spec-reviewer.md +66 -0
- package/agents/verifier.md +4 -3
- package/bin/draht-tools.cjs +472 -41
- package/dist/agents/debugger.md +12 -1
- package/dist/agents/git-committer.md +1 -0
- package/dist/agents/implementer.md +20 -0
- package/dist/agents/investigator.md +75 -0
- package/dist/agents/reviewer.md +7 -0
- package/dist/agents/spec-reviewer.md +66 -0
- package/dist/agents/verifier.md +4 -3
- package/dist/bun/cli.d.ts +1 -1
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js +6 -3
- package/dist/bun/cli.js.map +1 -1
- 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-GAKYXF65.js +6 -0
- package/dist/bundle/chunks/anthropic.js +75 -0
- package/dist/bundle/chunks/azure-openai-responses-ZIXMK6JO.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +79 -0
- package/dist/bundle/chunks/chunk-2E5VODES.js +2 -0
- package/dist/bundle/chunks/chunk-2FBJKY7F.js +2 -0
- package/dist/bundle/chunks/chunk-2N4I6WXC.js +2 -0
- package/dist/bundle/chunks/chunk-5VZWYVZB.js +82 -0
- package/dist/bundle/chunks/chunk-63BK6WK2.js +2 -0
- package/dist/bundle/chunks/chunk-6MSE6LZ3.js +6 -0
- package/dist/bundle/chunks/chunk-6ZJKIMU7.js +2 -0
- package/dist/bundle/chunks/chunk-736QBNUZ.js +12 -0
- package/dist/bundle/chunks/chunk-BXSHCX3G.js +11 -0
- package/dist/bundle/chunks/chunk-CEJJ5XF2.js +170 -0
- package/dist/bundle/chunks/chunk-COF5JT7R.js +4 -0
- package/dist/bundle/chunks/chunk-D6TMD5Q2.js +44 -0
- package/dist/bundle/chunks/chunk-DPE4ALPU.js +146 -0
- package/dist/bundle/chunks/chunk-EBVYI75P.js +2 -0
- package/dist/bundle/chunks/chunk-GVXA72ZA.js +2 -0
- package/dist/bundle/chunks/chunk-H6FT43VC.js +137 -0
- package/dist/bundle/chunks/chunk-HJ72RANT.js +2 -0
- package/dist/bundle/chunks/chunk-HTJ3L72O.js +2 -0
- package/dist/bundle/chunks/chunk-HZ2UHMBT.js +2 -0
- package/dist/bundle/chunks/chunk-I5OKY6RH.js +11 -0
- package/dist/bundle/chunks/chunk-IWTUBX6V.js +4 -0
- package/dist/bundle/chunks/chunk-KPO5375S.js +2 -0
- package/dist/bundle/chunks/chunk-KVH4HR57.js +31 -0
- package/dist/bundle/chunks/chunk-LDAOC5RB.js +18 -0
- package/dist/bundle/chunks/chunk-ON6XU6AG.js +2 -0
- package/dist/bundle/chunks/chunk-QMN7OD6G.js +2 -0
- package/dist/bundle/chunks/chunk-RZKPFWMH.js +42 -0
- package/dist/bundle/chunks/chunk-SDRCE6OP.js +2 -0
- package/dist/bundle/chunks/chunk-SVNWI7EV.js +8 -0
- package/dist/bundle/chunks/chunk-TIA2T6EO.js +3 -0
- package/dist/bundle/chunks/chunk-VOFPZOUQ.js +1472 -0
- package/dist/bundle/chunks/chunk-XBUEMKIY.js +2 -0
- package/dist/bundle/chunks/chunk-XOGEYN4Q.js +2 -0
- package/dist/bundle/chunks/chunk-ZZD35WKM.js +2 -0
- package/dist/bundle/chunks/cli-SR5QBZH4.js +51 -0
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-MJKOAE5S.js +2 -0
- package/dist/bundle/chunks/codemode-worker.js +315 -0
- package/dist/bundle/chunks/execute-VCYDHEYA.js +328 -0
- package/dist/bundle/chunks/github-copilot.js +2 -0
- package/dist/bundle/chunks/google-antigravity.js +75 -0
- package/dist/bundle/chunks/google-gemini-cli.js +75 -0
- package/dist/bundle/chunks/google-generative-ai-RPUPQ6PM.js +2 -0
- package/dist/bundle/chunks/google-vertex-EZES5QVQ.js +2 -0
- package/dist/bundle/chunks/https-proxy-agent-O2PVUIOI.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +2 -0
- package/dist/bundle/chunks/jiti-loader-RKXLMQV2.js +2 -0
- package/dist/bundle/chunks/kimi-coding.js +2 -0
- package/dist/bundle/chunks/lib-XOG5PI3Y.js +9 -0
- package/dist/bundle/chunks/llama-cpp-classify-EJ5XMSQL.js +22 -0
- package/dist/bundle/chunks/meta.js +2 -0
- package/dist/bundle/chunks/mistral-conversations-AOYGU43Y.js +5 -0
- package/dist/bundle/chunks/multipart-parser-AZP5BX2W.js +3 -0
- package/dist/bundle/chunks/node-C2JGH2OB.js +2 -0
- package/dist/bundle/chunks/node-LQ52KV6B.js +16 -0
- package/dist/bundle/chunks/openai-chatgpt.js +75 -0
- package/dist/bundle/chunks/openai-codex-responses-M2Y77JEQ.js +10 -0
- package/dist/bundle/chunks/openai-codex.js +75 -0
- package/dist/bundle/chunks/openai-completions-A4OKYOYV.js +7 -0
- package/dist/bundle/chunks/openai-responses-6IXV53T3.js +3 -0
- package/dist/bundle/chunks/opencode-go.js +2 -0
- package/dist/bundle/chunks/openrouter-images-LYV4NKFM.js +2 -0
- package/dist/bundle/chunks/openrouter.js +75 -0
- package/dist/bundle/chunks/pi-messages-KKMEUT3Z.js +8 -0
- package/dist/bundle/chunks/radius.js +75 -0
- package/dist/bundle/chunks/runtime-6YJPGSP7.js +2 -0
- package/dist/bundle/chunks/settings-manager-D2EG7WDO.js +2 -0
- package/dist/bundle/chunks/src-TIBHS42X.js +4 -0
- package/dist/bundle/chunks/typesafe-system-one-YBEEY5XU.js +2 -0
- package/dist/bundle/chunks/virtual-modules-CBOAFAFT.js +2 -0
- package/dist/bundle/chunks/xai.js +75 -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 +14 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +140 -22
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/attach-mode.d.ts +61 -0
- package/dist/cli/attach-mode.d.ts.map +1 -1
- package/dist/cli/attach-mode.js +243 -5
- package/dist/cli/attach-mode.js.map +1 -1
- 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.map +1 -1
- package/dist/cli/config-selector.js +3 -2
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/credential-print.d.ts +6 -4
- package/dist/cli/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js +47 -34
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/cli/file-processor.d.ts +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js +2 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/list-models.d.ts +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +2 -2
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.d.ts +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/setup.d.ts +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 +2 -2
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +42 -33
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.js +3 -12
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +29 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +73 -10
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +17 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +98 -32
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +2 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +15 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +266 -49
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +1503 -597
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +25 -9
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +245 -45
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bug-report-upload.d.ts +11 -0
- package/dist/core/bug-report-upload.d.ts.map +1 -0
- package/dist/core/bug-report-upload.js +20 -0
- package/dist/core/bug-report-upload.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/builtins/checkpoints.d.ts +20 -0
- package/dist/core/builtins/checkpoints.d.ts.map +1 -0
- package/dist/core/builtins/checkpoints.js +161 -0
- package/dist/core/builtins/checkpoints.js.map +1 -0
- package/dist/core/builtins/duet.d.ts +26 -0
- package/dist/core/builtins/duet.d.ts.map +1 -0
- package/dist/core/builtins/duet.js +660 -0
- package/dist/core/builtins/duet.js.map +1 -0
- package/dist/core/builtins/index.d.ts.map +1 -1
- package/dist/core/builtins/index.js +7 -1
- package/dist/core/builtins/index.js.map +1 -1
- package/dist/core/builtins/subagent.d.ts +24 -4
- package/dist/core/builtins/subagent.d.ts.map +1 -1
- package/dist/core/builtins/subagent.js +278 -35
- package/dist/core/builtins/subagent.js.map +1 -1
- package/dist/core/cache-stats.d.ts.map +1 -1
- package/dist/core/cache-stats.js +12 -1
- package/dist/core/cache-stats.js.map +1 -1
- package/dist/core/cache-warmer.d.ts +103 -0
- package/dist/core/cache-warmer.d.ts.map +1 -0
- package/dist/core/cache-warmer.js +356 -0
- package/dist/core/cache-warmer.js.map +1 -0
- package/dist/core/checkpoints/checkpoint-cli.d.ts +17 -0
- package/dist/core/checkpoints/checkpoint-cli.d.ts.map +1 -0
- package/dist/core/checkpoints/checkpoint-cli.js +78 -0
- package/dist/core/checkpoints/checkpoint-cli.js.map +1 -0
- package/dist/core/checkpoints/checkpoint-manager.d.ts +298 -0
- package/dist/core/checkpoints/checkpoint-manager.d.ts.map +1 -0
- package/dist/core/checkpoints/checkpoint-manager.js +901 -0
- package/dist/core/checkpoints/checkpoint-manager.js.map +1 -0
- package/dist/core/checkpoints/rewind.d.ts +143 -0
- package/dist/core/checkpoints/rewind.d.ts.map +1 -0
- package/dist/core/checkpoints/rewind.js +247 -0
- package/dist/core/checkpoints/rewind.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +11 -6
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +14 -6
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +221 -122
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +2 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +25 -18
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/crash-log.d.ts +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 +1 -0
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/defaults.js +9 -0
- package/dist/core/defaults.js.map +1 -1
- package/dist/core/experimental.js +1 -1
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/export-html/template.css +10 -0
- package/dist/core/export-html/template.js +72 -18
- package/dist/core/extensions/index.d.ts +2 -2
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/jiti-loader.d.ts +2 -0
- package/dist/core/extensions/jiti-loader.d.ts.map +1 -0
- package/dist/core/extensions/jiti-loader.js +5 -0
- package/dist/core/extensions/jiti-loader.js.map +1 -0
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +298 -96
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +59 -9
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +410 -103
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +701 -85
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js +3 -0
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts +3 -0
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -0
- package/dist/core/extensions/virtual-modules.js +37 -0
- package/dist/core/extensions/virtual-modules.js.map +1 -0
- package/dist/core/extensions/wrapper.d.ts +2 -2
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js +3 -22
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +1 -1
- package/dist/core/footer-data-provider.js +19 -18
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +7 -0
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/keybindings.d.ts +88 -13
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +34 -7
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +119 -0
- package/dist/core/mcp-servers.d.ts.map +1 -0
- package/dist/core/mcp-servers.js +191 -0
- package/dist/core/mcp-servers.js.map +1 -0
- package/dist/core/messages.d.ts +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +1 -0
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-config.d.ts +202 -20
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +53 -18
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-registry.d.ts +21 -3
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +47 -10
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +7 -5
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +62 -23
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +80 -15
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +466 -120
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/models-store.d.ts +12 -7
- package/dist/core/models-store.d.ts.map +1 -1
- package/dist/core/models-store.js +87 -18
- package/dist/core/models-store.js.map +1 -1
- package/dist/core/multi-agent/fsm.js +8 -3
- package/dist/core/multi-agent/fsm.js.map +1 -1
- package/dist/core/multi-agent/mailbox.js +1 -3
- package/dist/core/multi-agent/mailbox.js.map +1 -1
- package/dist/core/multi-agent/permission-gate.d.ts +5 -2
- package/dist/core/multi-agent/permission-gate.d.ts.map +1 -1
- package/dist/core/multi-agent/permission-gate.js +601 -37
- package/dist/core/multi-agent/permission-gate.js.map +1 -1
- package/dist/core/multi-agent/task-board.js +2 -4
- package/dist/core/multi-agent/task-board.js.map +1 -1
- package/dist/core/multi-agent/worktree.d.ts +2 -0
- package/dist/core/multi-agent/worktree.d.ts.map +1 -1
- package/dist/core/multi-agent/worktree.js +3 -5
- package/dist/core/multi-agent/worktree.js.map +1 -1
- package/dist/core/nested-tool-calls.d.ts +102 -0
- package/dist/core/nested-tool-calls.d.ts.map +1 -0
- package/dist/core/nested-tool-calls.js +178 -0
- package/dist/core/nested-tool-calls.js.map +1 -0
- package/dist/core/package-manager.d.ts +16 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +162 -69
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/permission-relay/index.d.ts +19 -0
- package/dist/core/permission-relay/index.d.ts.map +1 -0
- package/dist/core/permission-relay/index.js +49 -0
- package/dist/core/permission-relay/index.js.map +1 -0
- package/dist/core/permission-relay/relay-ui-context.d.ts +39 -0
- package/dist/core/permission-relay/relay-ui-context.d.ts.map +1 -0
- package/dist/core/permission-relay/relay-ui-context.js +788 -0
- package/dist/core/permission-relay/relay-ui-context.js.map +1 -0
- package/dist/core/permission-relay/types.d.ts +222 -0
- package/dist/core/permission-relay/types.d.ts.map +1 -0
- package/dist/core/permission-relay/types.js +15 -0
- package/dist/core/permission-relay/types.js.map +1 -0
- package/dist/core/pi-manifest.d.ts +14 -0
- package/dist/core/pi-manifest.d.ts.map +1 -0
- package/dist/core/pi-manifest.js +36 -0
- package/dist/core/pi-manifest.js.map +1 -0
- package/dist/core/project-trust.js +2 -2
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +6 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +63 -37
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-attribution.js +5 -5
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/provider-composer.d.ts +44 -20
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +151 -51
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/radius.d.ts +13 -0
- package/dist/core/radius.d.ts.map +1 -1
- package/dist/core/radius.js +19 -0
- package/dist/core/radius.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +10 -3
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +105 -81
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts +28 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +319 -65
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts +5 -5
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/runtime-credentials.js +13 -9
- package/dist/core/runtime-credentials.js.map +1 -1
- package/dist/core/sandbox/bash-operations.d.ts +149 -0
- package/dist/core/sandbox/bash-operations.d.ts.map +1 -0
- package/dist/core/sandbox/bash-operations.js +163 -0
- package/dist/core/sandbox/bash-operations.js.map +1 -0
- package/dist/core/sandbox/env.d.ts +83 -0
- package/dist/core/sandbox/env.d.ts.map +1 -0
- package/dist/core/sandbox/env.js +123 -0
- package/dist/core/sandbox/env.js.map +1 -0
- package/dist/core/sandbox/executor.d.ts +104 -0
- package/dist/core/sandbox/executor.d.ts.map +1 -0
- package/dist/core/sandbox/executor.js +93 -0
- package/dist/core/sandbox/executor.js.map +1 -0
- package/dist/core/sandbox/index.d.ts +36 -0
- package/dist/core/sandbox/index.d.ts.map +1 -0
- package/dist/core/sandbox/index.js +36 -0
- package/dist/core/sandbox/index.js.map +1 -0
- package/dist/core/sandbox/linux.d.ts +121 -0
- package/dist/core/sandbox/linux.d.ts.map +1 -0
- package/dist/core/sandbox/linux.js +260 -0
- package/dist/core/sandbox/linux.js.map +1 -0
- package/dist/core/sandbox/policy.d.ts +142 -0
- package/dist/core/sandbox/policy.d.ts.map +1 -0
- package/dist/core/sandbox/policy.js +297 -0
- package/dist/core/sandbox/policy.js.map +1 -0
- package/dist/core/sandbox/real-path.d.ts +112 -0
- package/dist/core/sandbox/real-path.d.ts.map +1 -0
- package/dist/core/sandbox/real-path.js +158 -0
- package/dist/core/sandbox/real-path.js.map +1 -0
- package/dist/core/sandbox/seatbelt-profile.d.ts +95 -0
- package/dist/core/sandbox/seatbelt-profile.d.ts.map +1 -0
- package/dist/core/sandbox/seatbelt-profile.js +239 -0
- package/dist/core/sandbox/seatbelt-profile.js.map +1 -0
- package/dist/core/sandbox/seatbelt.d.ts +95 -0
- package/dist/core/sandbox/seatbelt.d.ts.map +1 -0
- package/dist/core/sandbox/seatbelt.js +154 -0
- package/dist/core/sandbox/seatbelt.js.map +1 -0
- package/dist/core/sandbox/self-test.d.ts +109 -0
- package/dist/core/sandbox/self-test.d.ts.map +1 -0
- package/dist/core/sandbox/self-test.js +369 -0
- package/dist/core/sandbox/self-test.js.map +1 -0
- package/dist/core/sandbox/spawn.d.ts +33 -0
- package/dist/core/sandbox/spawn.d.ts.map +1 -0
- package/dist/core/sandbox/spawn.js +87 -0
- package/dist/core/sandbox/spawn.js.map +1 -0
- package/dist/core/sdk.d.ts +7 -5
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +103 -53
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-cwd.js +1 -0
- package/dist/core/session-cwd.js.map +1 -1
- 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 +134 -15
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +366 -149
- package/dist/core/session-manager.js.map +1 -1
- 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 +105 -4
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +274 -40
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts +3 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +70 -39
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +4 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/soak/soak-log.d.ts +298 -0
- package/dist/core/soak/soak-log.d.ts.map +1 -0
- package/dist/core/soak/soak-log.js +666 -0
- package/dist/core/soak/soak-log.js.map +1 -0
- package/dist/core/soak/soak-reader.d.ts +60 -0
- package/dist/core/soak/soak-reader.d.ts.map +1 -0
- package/dist/core/soak/soak-reader.js +106 -0
- package/dist/core/soak/soak-reader.js.map +1 -0
- package/dist/core/socket-server/discovery.d.ts +78 -1
- package/dist/core/socket-server/discovery.d.ts.map +1 -1
- package/dist/core/socket-server/discovery.js +356 -37
- package/dist/core/socket-server/discovery.js.map +1 -1
- package/dist/core/socket-server/index.d.ts +10 -4
- package/dist/core/socket-server/index.d.ts.map +1 -1
- package/dist/core/socket-server/index.js +6 -3
- package/dist/core/socket-server/index.js.map +1 -1
- package/dist/core/socket-server/permission-delivery.d.ts +125 -0
- package/dist/core/socket-server/permission-delivery.d.ts.map +1 -0
- package/dist/core/socket-server/permission-delivery.js +152 -0
- package/dist/core/socket-server/permission-delivery.js.map +1 -0
- package/dist/core/socket-server/permission-registry.d.ts +301 -0
- package/dist/core/socket-server/permission-registry.d.ts.map +1 -0
- package/dist/core/socket-server/permission-registry.js +410 -0
- package/dist/core/socket-server/permission-registry.js.map +1 -0
- package/dist/core/socket-server/permission-relay.d.ts +81 -0
- package/dist/core/socket-server/permission-relay.d.ts.map +1 -0
- package/dist/core/socket-server/permission-relay.js +528 -0
- package/dist/core/socket-server/permission-relay.js.map +1 -0
- package/dist/core/socket-server/safe-text.d.ts +83 -0
- package/dist/core/socket-server/safe-text.d.ts.map +1 -0
- package/dist/core/socket-server/safe-text.js +277 -0
- package/dist/core/socket-server/safe-text.js.map +1 -0
- package/dist/core/socket-server/session-integration.d.ts +65 -2
- package/dist/core/socket-server/session-integration.d.ts.map +1 -1
- package/dist/core/socket-server/session-integration.js +434 -32
- package/dist/core/socket-server/session-integration.js.map +1 -1
- package/dist/core/socket-server/socket-client.d.ts +21 -2
- package/dist/core/socket-server/socket-client.d.ts.map +1 -1
- package/dist/core/socket-server/socket-client.js +52 -1
- package/dist/core/socket-server/socket-client.js.map +1 -1
- package/dist/core/socket-server/socket-server.d.ts +152 -1
- package/dist/core/socket-server/socket-server.d.ts.map +1 -1
- package/dist/core/socket-server/socket-server.js +786 -26
- package/dist/core/socket-server/socket-server.js.map +1 -1
- package/dist/core/socket-server/types.d.ts +108 -3
- package/dist/core/socket-server/types.d.ts.map +1 -1
- package/dist/core/socket-server/types.js +13 -1
- package/dist/core/socket-server/types.js.map +1 -1
- package/dist/core/source-info.d.ts +8 -0
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js +16 -0
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts +49 -6
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +126 -90
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +32 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +83 -141
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts +0 -5
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +2 -5
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts +5 -12
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +36 -173
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +7 -0
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +22 -76
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +4 -0
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +10 -62
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +4 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +18 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts +4 -0
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +9 -50
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +11 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +54 -12
- package/dist/core/tools/output-accumulator.js.map +1 -1
- 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 +8 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +16 -123
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +6 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +26 -0
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts +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 +5 -3
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js +3 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts +14 -0
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +29 -0
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write.d.ts +4 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +12 -147
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts +6 -4
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +59 -22
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/usage-totals.d.ts +3 -1
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +28 -1
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/core/virtual-models.d.ts +117 -0
- package/dist/core/virtual-models.d.ts.map +1 -0
- package/dist/core/virtual-models.js +124 -0
- package/dist/core/virtual-models.js.map +1 -0
- package/dist/experimental/micro/api.d.ts +81 -0
- package/dist/experimental/micro/api.d.ts.map +1 -0
- package/dist/experimental/micro/api.js +2 -0
- package/dist/experimental/micro/api.js.map +1 -0
- package/dist/experimental/micro/main.d.ts +3 -0
- package/dist/experimental/micro/main.d.ts.map +1 -0
- package/dist/experimental/micro/main.js +21 -0
- package/dist/experimental/micro/main.js.map +1 -0
- package/dist/experimental/micro/models.d.ts +11 -0
- package/dist/experimental/micro/models.d.ts.map +1 -0
- package/dist/experimental/micro/models.js +95 -0
- package/dist/experimental/micro/models.js.map +1 -0
- package/dist/experimental/micro/runtime.d.ts +12 -0
- package/dist/experimental/micro/runtime.d.ts.map +1 -0
- package/dist/experimental/micro/runtime.js +465 -0
- package/dist/experimental/micro/runtime.js.map +1 -0
- package/dist/experimental/micro/sessions.d.ts +10 -0
- package/dist/experimental/micro/sessions.d.ts.map +1 -0
- package/dist/experimental/micro/sessions.js +41 -0
- package/dist/experimental/micro/sessions.js.map +1 -0
- package/dist/experimental/micro/tools.d.ts +10 -0
- package/dist/experimental/micro/tools.d.ts.map +1 -0
- package/dist/experimental/micro/tools.js +96 -0
- package/dist/experimental/micro/tools.js.map +1 -0
- package/dist/experimental/micro/tui.d.ts +3 -0
- package/dist/experimental/micro/tui.d.ts.map +1 -0
- package/dist/experimental/micro/tui.js +510 -0
- package/dist/experimental/micro/tui.js.map +1 -0
- package/dist/experimental/mini/main.d.ts +7 -0
- package/dist/experimental/mini/main.d.ts.map +1 -0
- package/dist/experimental/mini/main.js +21 -0
- package/dist/experimental/mini/main.js.map +1 -0
- package/dist/experimental/mini/server/entry.d.ts +3 -0
- package/dist/experimental/mini/server/entry.d.ts.map +1 -0
- package/dist/experimental/mini/server/entry.js +11 -0
- package/dist/experimental/mini/server/entry.js.map +1 -0
- package/dist/experimental/mini/server/run.d.ts +13 -0
- package/dist/experimental/mini/server/run.d.ts.map +1 -0
- package/dist/experimental/mini/server/run.js +150 -0
- package/dist/experimental/mini/server/run.js.map +1 -0
- package/dist/experimental/mini/shared/protocol.d.ts +127 -0
- package/dist/experimental/mini/shared/protocol.d.ts.map +1 -0
- package/dist/experimental/mini/shared/protocol.js +13 -0
- package/dist/experimental/mini/shared/protocol.js.map +1 -0
- package/dist/experimental/mini/shared/rpc.d.ts +49 -0
- package/dist/experimental/mini/shared/rpc.d.ts.map +1 -0
- package/dist/experimental/mini/shared/rpc.js +171 -0
- package/dist/experimental/mini/shared/rpc.js.map +1 -0
- package/dist/experimental/mini/shared/transport.d.ts +35 -0
- package/dist/experimental/mini/shared/transport.d.ts.map +1 -0
- package/dist/experimental/mini/shared/transport.js +94 -0
- package/dist/experimental/mini/shared/transport.js.map +1 -0
- package/dist/experimental/mini/tui/run.d.ts +9 -0
- package/dist/experimental/mini/tui/run.d.ts.map +1 -0
- package/dist/experimental/mini/tui/run.js +62 -0
- package/dist/experimental/mini/tui/run.js.map +1 -0
- package/dist/experimental/mini/tui/session.d.ts +26 -0
- package/dist/experimental/mini/tui/session.d.ts.map +1 -0
- package/dist/experimental/mini/tui/session.js +94 -0
- package/dist/experimental/mini/tui/session.js.map +1 -0
- package/dist/experimental/mini/tui/view.d.ts +10 -0
- package/dist/experimental/mini/tui/view.d.ts.map +1 -0
- package/dist/experimental/mini/tui/view.js +461 -0
- package/dist/experimental/mini/tui/view.js.map +1 -0
- package/dist/experimental/mini/worker/entry.d.ts +3 -0
- package/dist/experimental/mini/worker/entry.d.ts.map +1 -0
- package/dist/experimental/mini/worker/entry.js +10 -0
- package/dist/experimental/mini/worker/entry.js.map +1 -0
- package/dist/experimental/mini/worker/lane-service.d.ts +44 -0
- package/dist/experimental/mini/worker/lane-service.d.ts.map +1 -0
- package/dist/experimental/mini/worker/lane-service.js +97 -0
- package/dist/experimental/mini/worker/lane-service.js.map +1 -0
- package/dist/experimental/mini/worker/models-service.d.ts +19 -0
- package/dist/experimental/mini/worker/models-service.d.ts.map +1 -0
- package/dist/experimental/mini/worker/models-service.js +136 -0
- package/dist/experimental/mini/worker/models-service.js.map +1 -0
- package/dist/experimental/mini/worker/run.d.ts +14 -0
- package/dist/experimental/mini/worker/run.d.ts.map +1 -0
- package/dist/experimental/mini/worker/run.js +88 -0
- package/dist/experimental/mini/worker/run.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 +429 -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 +315 -0
- package/dist/extensions/codemode/tool.js.map +1 -0
- package/dist/extensions/codemode/worker.d.ts +7 -0
- package/dist/extensions/codemode/worker.d.ts.map +1 -0
- package/dist/extensions/codemode/worker.js +7 -0
- package/dist/extensions/codemode/worker.js.map +1 -0
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +13 -1
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/llama/client.d.ts +8 -0
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +13 -0
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/llama/huggingface.js +2 -0
- package/dist/extensions/llama/huggingface.js.map +1 -1
- package/dist/extensions/llama/index.d.ts.map +1 -1
- package/dist/extensions/llama/index.js +13 -2
- package/dist/extensions/llama/index.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts +4 -2
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +121 -15
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/llama/ui.js +28 -12
- package/dist/extensions/llama/ui.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts +21 -0
- package/dist/extensions/mcp/cli.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.js +500 -0
- package/dist/extensions/mcp/cli.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.d.ts +3 -0
- package/dist/extensions/mcp/cli.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.lazy.js +3 -0
- package/dist/extensions/mcp/cli.lazy.js.map +1 -0
- package/dist/extensions/mcp/config.d.ts +72 -0
- package/dist/extensions/mcp/config.d.ts.map +1 -0
- package/dist/extensions/mcp/config.js +158 -0
- package/dist/extensions/mcp/config.js.map +1 -0
- package/dist/extensions/mcp/index.d.ts +76 -0
- package/dist/extensions/mcp/index.d.ts.map +1 -0
- package/dist/extensions/mcp/index.js +1055 -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 +96 -0
- package/dist/extensions/mcp/oauth.d.ts.map +1 -0
- package/dist/extensions/mcp/oauth.js +333 -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 +394 -0
- package/dist/extensions/mcp/runtime.js.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts +3 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.js +3 -0
- package/dist/extensions/mcp/runtime.lazy.js.map +1 -0
- package/dist/extensions/mcp/tools.d.ts +84 -0
- package/dist/extensions/mcp/tools.d.ts.map +1 -0
- package/dist/extensions/mcp/tools.js +251 -0
- package/dist/extensions/mcp/tools.js.map +1 -0
- package/dist/extensions/mcp/ui.d.ts +60 -0
- package/dist/extensions/mcp/ui.d.ts.map +1 -0
- package/dist/extensions/mcp/ui.js +174 -0
- package/dist/extensions/mcp/ui.js.map +1 -0
- package/dist/extensions/stub-provider/index.d.ts +9 -0
- package/dist/extensions/stub-provider/index.d.ts.map +1 -0
- package/dist/extensions/stub-provider/index.js +13 -0
- package/dist/extensions/stub-provider/index.js.map +1 -0
- package/dist/extensions/stub-provider/provider.d.ts +77 -0
- package/dist/extensions/stub-provider/provider.d.ts.map +1 -0
- package/dist/extensions/stub-provider/provider.js +194 -0
- package/dist/extensions/stub-provider/provider.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/hooks/gsd/draht-quality-gate.js +3 -3
- package/dist/index.d.ts +20 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +4 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +365 -96
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts +1 -1
- package/dist/migrations.js +7 -6
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts +1 -0
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/bug-report.d.ts +19 -0
- package/dist/modes/interactive/bug-report.d.ts.map +1 -0
- package/dist/modes/interactive/bug-report.js +211 -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.js +10 -6
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +6 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +38 -15
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +9 -4
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +3 -0
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +15 -6
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +15 -6
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +38 -10
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js +5 -0
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +10 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +54 -2
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +4 -1
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +7 -1
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js +8 -6
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +1 -0
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +4 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +14 -3
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts +2 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +14 -2
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +50 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +218 -6
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +4 -4
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js +12 -4
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +7 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +51 -6
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +9 -3
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- 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 +10 -4
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +101 -40
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +11 -3
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +4 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +60 -32
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +5 -5
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +138 -80
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +25 -4
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +240 -67
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- 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.js +1 -0
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +14 -5
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +3 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +12 -3
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +2 -0
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts +17 -0
- package/dist/modes/interactive/components/themed-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/themed-text.js +29 -0
- package/dist/modes/interactive/components/themed-text.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +15 -3
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +76 -18
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +21 -4
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +88 -53
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +20 -2
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +65 -23
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +8 -2
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +6 -3
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +3 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +12 -2
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +27 -3
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js +39 -6
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +2 -1
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +166 -8
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1690 -599
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- 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/session-share.d.ts +23 -0
- package/dist/modes/interactive/session-share.d.ts.map +1 -0
- package/dist/modes/interactive/session-share.js +130 -0
- package/dist/modes/interactive/session-share.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +54 -63
- package/dist/modes/interactive/theme/light.json +52 -60
- package/dist/modes/interactive/theme/system-theme.d.ts +54 -0
- package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/system-theme.js +535 -0
- package/dist/modes/interactive/theme/system-theme.js.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +59 -7
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +164 -51
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- 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 +24 -3
- package/dist/modes/interactive/theme/theme.d.ts +80 -42
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +274 -417
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- 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 +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +12 -2
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +17 -9
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +27 -15
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +179 -19
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +90 -2
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts +1 -0
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +217 -63
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/prompts/commands/atomic-commit.md +1 -12
- package/dist/prompts/commands/brainstorm.md +12 -15
- package/dist/prompts/commands/create-verification-skill.md +108 -0
- package/dist/prompts/commands/discuss-phase.md +3 -14
- package/dist/prompts/commands/execute-phase.md +3 -11
- package/dist/prompts/commands/fix.md +41 -18
- package/dist/prompts/commands/grill.md +66 -0
- package/dist/prompts/commands/init-project.md +5 -15
- package/dist/prompts/commands/map-codebase.md +1 -13
- package/dist/prompts/commands/new-project.md +5 -15
- package/dist/prompts/commands/next-milestone.md +1 -13
- package/dist/prompts/commands/orchestrate.md +1 -1
- package/dist/prompts/commands/pause-work.md +1 -13
- package/dist/prompts/commands/plan-phase.md +3 -11
- package/dist/prompts/commands/progress.md +0 -13
- package/dist/prompts/commands/quick.md +3 -11
- package/dist/prompts/commands/resolve-conflicts.md +71 -0
- package/dist/prompts/commands/resume-work.md +0 -13
- package/dist/prompts/commands/review.md +6 -13
- package/dist/prompts/commands/triage.md +159 -0
- package/dist/prompts/commands/verify-work.md +5 -14
- package/dist/prompts/commands/why.md +139 -0
- package/dist/rpc-entry.js +1 -0
- package/dist/rpc-entry.js.map +1 -1
- package/dist/skills/atomic-reasoning/SKILL.md +115 -0
- package/dist/skills/blast-radius/SKILL.md +56 -0
- package/dist/skills/epistemics/SKILL.md +99 -0
- package/dist/skills/explainers/SKILL.md +65 -0
- package/dist/skills/hexagon-animation/SKILL.md +49 -0
- package/dist/skills/hexagon-animation/generate.mjs +81 -0
- package/dist/skills/hexagon-animation/template.html +361 -0
- package/dist/skills/typescript-discipline/SKILL.md +50 -0
- package/dist/skills/typescript-discipline/references/patterns.md +294 -0
- package/dist/skills/unslop/SKILL.md +119 -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/canonical-path.d.ts +28 -0
- package/dist/utils/canonical-path.d.ts.map +1 -0
- package/dist/utils/canonical-path.js +90 -0
- package/dist/utils/canonical-path.js.map +1 -0
- package/dist/utils/changelog.js +1 -1
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/child-process.d.ts +13 -2
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +26 -9
- package/dist/utils/child-process.js.map +1 -1
- 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.map +1 -1
- package/dist/utils/clipboard-image.js +60 -91
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard.d.ts +3 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +123 -108
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/draht-user-agent.d.ts +2 -0
- package/dist/utils/draht-user-agent.d.ts.map +1 -0
- package/dist/utils/draht-user-agent.js +5 -0
- package/dist/utils/draht-user-agent.js.map +1 -0
- package/dist/utils/exif-orientation.d.ts +2 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js +2 -3
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +2 -1
- package/dist/utils/frontmatter.js.map +1 -1
- 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.js +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/paths.d.ts +6 -10
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +23 -14
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.d.ts +2 -1
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/shell.d.ts +4 -3
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +26 -39
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +1 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +62 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- 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 +11 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +56 -41
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts +4 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +30 -9
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/wsl.d.ts +3 -0
- package/dist/utils/wsl.d.ts.map +1 -0
- package/dist/utils/wsl.js +15 -0
- package/dist/utils/wsl.js.map +1 -0
- package/dist/utils/zip.d.ts +7 -0
- package/dist/utils/zip.d.ts.map +1 -0
- package/dist/utils/zip.js +60 -0
- package/dist/utils/zip.js.map +1 -0
- package/docs/attachable-sessions.md +79 -0
- package/docs/cli-integration.md +106 -0
- package/docs/cli.md +374 -0
- package/docs/compaction.md +107 -45
- package/docs/configuration.md +47 -0
- package/docs/containerization.md +100 -66
- package/docs/custom-provider.md +109 -707
- package/docs/docs.json +155 -95
- package/docs/duet.md +42 -0
- package/docs/environment-variables.md +30 -17
- package/docs/extensions.md +169 -2811
- package/docs/how-pi-works.md +53 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/index.md +25 -69
- package/docs/json.md +198 -57
- package/docs/keybindings.md +89 -92
- package/docs/llama-cpp.md +23 -8
- package/docs/mcp.md +231 -0
- package/docs/message-types.md +261 -0
- package/docs/models.md +94 -478
- package/docs/packages.md +68 -164
- package/docs/prompt-templates.md +31 -68
- package/docs/providers.md +118 -215
- package/docs/quickstart.md +56 -109
- package/docs/rpc-commands.md +860 -0
- package/docs/rpc-extension-ui.md +200 -0
- package/docs/rpc.md +186 -1494
- package/docs/sdk.md +79 -1127
- package/docs/security.md +77 -33
- package/docs/session-format.md +98 -222
- package/docs/sessions.md +36 -113
- package/docs/settings.md +125 -251
- package/docs/shell-aliases.md +85 -5
- package/docs/skills.md +52 -188
- package/docs/slash-commands.md +61 -0
- package/docs/terminal-setup.md +132 -61
- package/docs/termux.md +74 -84
- package/docs/themes.md +91 -252
- package/docs/tmux.md +31 -39
- package/docs/tui.md +74 -891
- package/docs/usage.md +54 -255
- package/docs/virtual-models.md +114 -0
- package/docs/windows.md +57 -7
- package/examples/extensions/antigravity-image-gen.ts +9 -9
- package/examples/extensions/bash-spawn-hook.ts +1 -1
- package/examples/extensions/border-status-editor.ts +1 -1
- package/examples/extensions/built-in-tool-renderer.ts +16 -40
- package/examples/extensions/custom-compaction.ts +1 -16
- package/examples/extensions/custom-provider-anthropic/index.ts +20 -13
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +4 -3
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +5 -5
- package/examples/extensions/debug-provider.ts +90 -0
- package/examples/extensions/doom-overlay/wad-finder.ts +7 -3
- package/examples/extensions/dynamic-resources/dynamic.json +3 -1
- package/examples/extensions/git-checkpoint.ts +2 -2
- package/examples/extensions/handoff.ts +2 -11
- package/examples/extensions/jev-router.ts +113 -0
- package/examples/extensions/minimal-mode.ts +24 -96
- package/examples/extensions/notify.ts +3 -1
- package/examples/extensions/overlay-qa-tests.ts +3 -3
- package/examples/extensions/prompt-customizer.ts +19 -67
- package/examples/extensions/qna.ts +3 -7
- package/examples/extensions/subagent/agents.ts +40 -9
- package/examples/extensions/subagent/index.ts +27 -4
- package/examples/extensions/summarize.ts +7 -18
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/rpc-client.ts +35 -0
- package/examples/rpc-extension-ui.ts +38 -9
- package/examples/sdk/02-custom-model.ts +1 -2
- package/examples/sdk/06-extensions.ts +1 -1
- package/examples/sdk/09-api-keys-and-oauth.ts +1 -1
- package/examples/sdk/12-full-control.ts +1 -1
- package/examples/sdk/14-codemode-mcp.ts +61 -0
- package/hooks/gsd/draht-quality-gate.js +3 -3
- package/package.json +28 -32
- package/prompts/commands/atomic-commit.md +1 -12
- package/prompts/commands/brainstorm.md +12 -15
- package/prompts/commands/create-verification-skill.md +108 -0
- package/prompts/commands/discuss-phase.md +3 -14
- package/prompts/commands/execute-phase.md +3 -11
- package/prompts/commands/fix.md +41 -18
- package/prompts/commands/grill.md +66 -0
- package/prompts/commands/init-project.md +5 -15
- package/prompts/commands/map-codebase.md +1 -13
- package/prompts/commands/new-project.md +5 -15
- package/prompts/commands/next-milestone.md +1 -13
- package/prompts/commands/orchestrate.md +1 -1
- package/prompts/commands/pause-work.md +1 -13
- package/prompts/commands/plan-phase.md +3 -11
- package/prompts/commands/progress.md +0 -13
- package/prompts/commands/quick.md +3 -11
- package/prompts/commands/resolve-conflicts.md +71 -0
- package/prompts/commands/resume-work.md +0 -13
- package/prompts/commands/review.md +6 -13
- package/prompts/commands/triage.md +159 -0
- package/prompts/commands/verify-work.md +5 -14
- package/prompts/commands/why.md +139 -0
- package/skills/atomic-reasoning/SKILL.md +115 -0
- package/skills/blast-radius/SKILL.md +56 -0
- package/skills/epistemics/SKILL.md +99 -0
- package/skills/explainers/SKILL.md +65 -0
- package/skills/hexagon-animation/SKILL.md +49 -0
- package/skills/hexagon-animation/generate.mjs +81 -0
- package/skills/hexagon-animation/template.html +361 -0
- package/skills/typescript-discipline/SKILL.md +50 -0
- package/skills/typescript-discipline/references/patterns.md +294 -0
- package/skills/unslop/SKILL.md +119 -0
- package/dist/prompts/agents/build.md +0 -86
- package/dist/prompts/agents/plan.md +0 -79
- package/dist/prompts/agents/verify.md +0 -69
- package/dist/utils/clipboard-native.d.ts +0 -11
- package/dist/utils/clipboard-native.d.ts.map +0 -1
- package/dist/utils/clipboard-native.js +0 -20
- package/dist/utils/clipboard-native.js.map +0 -1
- package/dist/utils/pi-user-agent.d.ts +0 -2
- package/dist/utils/pi-user-agent.d.ts.map +0 -1
- package/dist/utils/pi-user-agent.js +0 -5
- package/dist/utils/pi-user-agent.js.map +0 -1
- package/docs/development.md +0 -71
- package/docs/tree.md +0 -231
- package/examples/extensions/kimi-deferred-tools.ts +0 -61
- package/prompts/agents/build.md +0 -86
- package/prompts/agents/plan.md +0 -79
- package/prompts/agents/verify.md +0 -69
|
@@ -12,17 +12,19 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Modes use this class and add their own I/O layer on top.
|
|
14
14
|
*/
|
|
15
|
-
import type
|
|
15
|
+
import { type Agent, type AgentEvent, type AgentMessage, type AgentState, type AgentTool, type ThinkingLevel } from "@draht/agent-core";
|
|
16
16
|
import type { ImageContent, Model, TextContent } from "@draht/ai/compat";
|
|
17
17
|
import { type BashResult } from "./bash-executor.ts";
|
|
18
|
+
import type { CacheWarmer, CacheWarmingStatus } from "./cache-warmer.ts";
|
|
18
19
|
import { type CompactionResult } from "./compaction/index.ts";
|
|
19
20
|
import { type ContextUsage, type ExtensionCommandContextActions, type ExtensionErrorListener, type ExtensionMode, ExtensionRunner, type ExtensionUIContext, type InputSource, type ReplacedSessionContext, type SessionStartEvent, type ShutdownHandler, type ToolDefinition, type ToolInfo } from "./extensions/index.ts";
|
|
20
|
-
import type
|
|
21
|
+
import { type CustomMessage } from "./messages.ts";
|
|
21
22
|
import type { ModelRuntime } from "./model-runtime.ts";
|
|
23
|
+
import { type PermissionRelay } from "./permission-relay/index.ts";
|
|
22
24
|
import { type PromptTemplate } from "./prompt-templates.ts";
|
|
23
25
|
import type { ResourceLoader } from "./resource-loader.ts";
|
|
24
|
-
import type
|
|
25
|
-
import type
|
|
26
|
+
import { type BranchSummaryEntry, type SessionEntry, SessionManager } from "./session-manager.ts";
|
|
27
|
+
import { type CacheWarmingMode, type SettingsManager } from "./settings-manager.ts";
|
|
26
28
|
import { type BashOperations } from "./tools/bash.ts";
|
|
27
29
|
/** Parsed skill block from a user message */
|
|
28
30
|
export interface ParsedSkillBlock {
|
|
@@ -36,10 +38,16 @@ export interface ParsedSkillBlock {
|
|
|
36
38
|
* Returns null if the text doesn't contain a skill block.
|
|
37
39
|
*/
|
|
38
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;
|
|
39
47
|
/** Session-specific events that extend the core AgentEvent */
|
|
40
|
-
export type AgentSessionEvent = Exclude<AgentEvent, {
|
|
48
|
+
export type AgentSessionEvent = WithParentToolCallId<Exclude<AgentEvent, {
|
|
41
49
|
type: "agent_end";
|
|
42
|
-
}
|
|
50
|
+
}>> | {
|
|
43
51
|
type: "agent_end";
|
|
44
52
|
messages: AgentMessage[];
|
|
45
53
|
willRetry: boolean;
|
|
@@ -98,11 +106,6 @@ export type AgentSessionEvent = Exclude<AgentEvent, {
|
|
|
98
106
|
reason: "manual" | "threshold" | "overflow";
|
|
99
107
|
} | {
|
|
100
108
|
type: "summarization_retry_finished";
|
|
101
|
-
} | {
|
|
102
|
-
type: "auto_retry_end";
|
|
103
|
-
success: boolean;
|
|
104
|
-
attempt: number;
|
|
105
|
-
finalError?: string;
|
|
106
109
|
} | {
|
|
107
110
|
type: "bash_execution_update";
|
|
108
111
|
id?: string;
|
|
@@ -126,8 +129,15 @@ export interface AgentSessionConfig {
|
|
|
126
129
|
customTools?: ToolDefinition[];
|
|
127
130
|
/** Canonical model/auth runtime used by coding-agent internals. */
|
|
128
131
|
modelRuntime: ModelRuntime;
|
|
132
|
+
/** Keeps the prompt cache entry of the last session request warm. */
|
|
133
|
+
cacheWarmer?: Pick<CacheWarmer, "cancel" | "status" | "onAgentSettled" | "onModeChanged" | "onWarmed">;
|
|
129
134
|
/** Initial active built-in tool names. Default: [read, bash, edit, write] */
|
|
130
135
|
initialActiveToolNames?: string[];
|
|
136
|
+
/**
|
|
137
|
+
* Whether the initial tools come from the `defaultTools` setting. When true, reload activates
|
|
138
|
+
* tools newly added to the setting. Tools removed from it stay active.
|
|
139
|
+
*/
|
|
140
|
+
usesDefaultTools?: boolean;
|
|
131
141
|
/** Optional allowlist of tool names. When provided, only these tool names are exposed. */
|
|
132
142
|
allowedToolNames?: string[];
|
|
133
143
|
/** Optional denylist of tool names. When provided, these tool names are not exposed. */
|
|
@@ -154,9 +164,11 @@ export interface ExtensionBindings {
|
|
|
154
164
|
shutdownHandler?: ShutdownHandler;
|
|
155
165
|
onError?: ExtensionErrorListener;
|
|
156
166
|
}
|
|
167
|
+
export type QueuedInputDisposition = "handled" | "queued";
|
|
168
|
+
export type PromptDisposition = QueuedInputDisposition | "started";
|
|
157
169
|
/** Options for AgentSession.prompt() */
|
|
158
170
|
export interface PromptOptions {
|
|
159
|
-
/** Whether to expand
|
|
171
|
+
/** Whether to dispatch extension commands and expand skill commands and prompt templates (default: true) */
|
|
160
172
|
expandPromptTemplates?: boolean;
|
|
161
173
|
/** Image attachments */
|
|
162
174
|
images?: ImageContent[];
|
|
@@ -164,8 +176,13 @@ export interface PromptOptions {
|
|
|
164
176
|
streamingBehavior?: "steer" | "followUp";
|
|
165
177
|
/** Source of input for extension input event handlers. Defaults to "interactive". */
|
|
166
178
|
source?: InputSource;
|
|
167
|
-
/** Internal hook used by RPC mode to observe prompt
|
|
168
|
-
preflightResult?: (
|
|
179
|
+
/** Internal hook used by RPC mode to observe how an accepted prompt was dispatched. Not called if the prompt is rejected. */
|
|
180
|
+
preflightResult?: (disposition: PromptDisposition) => void;
|
|
181
|
+
}
|
|
182
|
+
/** Options for model/thinking mutations. */
|
|
183
|
+
export interface ModelMutationOptions {
|
|
184
|
+
/** Persist the new value to global defaults. Defaults to session-only. */
|
|
185
|
+
persist?: boolean;
|
|
169
186
|
}
|
|
170
187
|
/** Result from cycleModel() */
|
|
171
188
|
export interface ModelCycleResult {
|
|
@@ -201,6 +218,7 @@ export declare class AgentSession {
|
|
|
201
218
|
private _unsubscribeAgent?;
|
|
202
219
|
private _eventListeners;
|
|
203
220
|
private _isAgentRunActive;
|
|
221
|
+
private _agentRunAbortRequested;
|
|
204
222
|
private _idleWaitPromise;
|
|
205
223
|
private _resolveIdleWait;
|
|
206
224
|
/** Tracks pending steering messages for UI display. Removed when delivered. */
|
|
@@ -209,27 +227,45 @@ export declare class AgentSession {
|
|
|
209
227
|
private _followUpMessages;
|
|
210
228
|
/** Messages queued to be included with the next user prompt as context ("asides"). */
|
|
211
229
|
private _pendingNextTurnMessages;
|
|
230
|
+
/** Context-only custom messages queued during a run, flushed once the current turn's tool results are in. */
|
|
231
|
+
private _pendingCustomMessages;
|
|
212
232
|
private _compactionAbortController;
|
|
213
233
|
private _autoCompactionAbortController;
|
|
214
234
|
private _overflowRecoveryAttempted;
|
|
215
235
|
private _branchSummaryAbortController;
|
|
216
236
|
private _retryAbortController;
|
|
217
237
|
private _retryAttempt;
|
|
238
|
+
/**
|
|
239
|
+
* Failed response that the next request repeats, set by auto-retry and overflow recovery. The
|
|
240
|
+
* retry is routed with it as `failed`, since the context no longer contains it.
|
|
241
|
+
*/
|
|
242
|
+
private _failedResponse;
|
|
218
243
|
private readonly _bashAbortControllers;
|
|
219
244
|
private _pendingBashMessages;
|
|
220
245
|
private _extensionRunner;
|
|
221
246
|
private _turnIndex;
|
|
247
|
+
private readonly _entryIdsByMessage;
|
|
248
|
+
private readonly _boundaryDispatchedMessages;
|
|
249
|
+
private _lastAssistantMessage;
|
|
250
|
+
private _lastAssistantToolResults;
|
|
251
|
+
private _lastActivityOutcome;
|
|
252
|
+
private _isBeforeSettle;
|
|
253
|
+
private _abortDuringBeforeSettle;
|
|
254
|
+
private _isEmittingAgentSettled;
|
|
255
|
+
private readonly _deferredSettledActions;
|
|
222
256
|
private _resourceLoader;
|
|
223
257
|
private _customTools;
|
|
224
258
|
private _baseToolDefinitions;
|
|
225
259
|
private _cwd;
|
|
226
260
|
private _extensionRunnerRef?;
|
|
227
261
|
private _initialActiveToolNames?;
|
|
262
|
+
private _usesDefaultTools;
|
|
228
263
|
private _allowedToolNames?;
|
|
229
264
|
private _excludedToolNames?;
|
|
230
265
|
private _baseToolsOverride?;
|
|
231
266
|
private _sessionStartEvent;
|
|
232
267
|
private _extensionUIContext?;
|
|
268
|
+
private _permissionRelay?;
|
|
233
269
|
private _extensionMode;
|
|
234
270
|
private _extensionCommandContextActions?;
|
|
235
271
|
private _extensionAbortHandler?;
|
|
@@ -237,17 +273,37 @@ export declare class AgentSession {
|
|
|
237
273
|
private _extensionErrorListener?;
|
|
238
274
|
private _extensionErrorUnsubscriber?;
|
|
239
275
|
private _modelRuntime;
|
|
276
|
+
private _cacheWarmer?;
|
|
240
277
|
private _toolRegistry;
|
|
278
|
+
/** Created on the first `ctx.executeTool()` call. */
|
|
279
|
+
private _nestedToolCalls;
|
|
280
|
+
/** Declared tools whose declarations requests leave out, from `prepareLoadout` hooks. */
|
|
281
|
+
private _hiddenDeclarations;
|
|
241
282
|
private _toolDefinitions;
|
|
242
283
|
private _toolPromptSnippets;
|
|
243
284
|
private _toolPromptGuidelines;
|
|
244
|
-
private _baseSystemPrompt;
|
|
245
285
|
private _baseSystemPromptOptions;
|
|
246
|
-
|
|
286
|
+
/** Prompt options after before_agent_start mutations for the active run. */
|
|
287
|
+
private _runSystemPromptOptions?;
|
|
247
288
|
constructor(config: AgentSessionConfig);
|
|
248
289
|
get modelRuntime(): ModelRuntime;
|
|
249
290
|
private _getRequiredRequestAuth;
|
|
250
291
|
private _getSummarizationRequestAuth;
|
|
292
|
+
/**
|
|
293
|
+
* The model whose limits apply to `message`, or undefined when the message came from another
|
|
294
|
+
* model. Under a virtual selection, that is the physical model that produced it.
|
|
295
|
+
*/
|
|
296
|
+
private _modelForMessage;
|
|
297
|
+
/**
|
|
298
|
+
* Record the selection on the current branch when the branch implies another one, so a resume
|
|
299
|
+
* restores it. Tree navigation can leave the latest `model_change` on another branch; responses
|
|
300
|
+
* cannot record a virtual selection because they name physical models. Responses do record a
|
|
301
|
+
* physical selection unless the branch holds a virtual one; checking a physical selection against
|
|
302
|
+
* responses would record it on every prompt while `prepareRequest` redirects to another model.
|
|
303
|
+
*/
|
|
304
|
+
private _recordSelection;
|
|
305
|
+
/** The model whose limits apply to the conversation. */
|
|
306
|
+
private _limitsModel;
|
|
251
307
|
/**
|
|
252
308
|
* Install tool hooks once on the Agent instance.
|
|
253
309
|
*
|
|
@@ -257,17 +313,41 @@ export declare class AgentSession {
|
|
|
257
313
|
* happens here instead of in wrappers.
|
|
258
314
|
*/
|
|
259
315
|
private _installAgentToolHooks;
|
|
316
|
+
/** `tool_call` handlers. `parentToolCallId` is set for calls another tool made. */
|
|
317
|
+
private _beforeToolCall;
|
|
318
|
+
/** `tool_result` handlers and image normalization. `parentToolCallId` is set for calls another tool made. */
|
|
319
|
+
private _afterToolCall;
|
|
320
|
+
/**
|
|
321
|
+
* Run a call that the tool call `parentToolCallId` made through `ctx.executeTool()`. It goes
|
|
322
|
+
* through the agent's tool pipeline with the session's hooks, against the callable tools.
|
|
323
|
+
*/
|
|
324
|
+
private _executeNestedToolCall;
|
|
325
|
+
/** Whether `projection`, the current session projection, exceeds the compaction threshold of `model`. */
|
|
326
|
+
private _exceedsCompactionThreshold;
|
|
327
|
+
private _compactBeforeNextAssistantResponse;
|
|
328
|
+
private _installAgentRequestProjection;
|
|
329
|
+
private _dispatchTurnEndBoundary;
|
|
330
|
+
private _installAgentBoundaryHooks;
|
|
260
331
|
private _installAgentNextTurnRefresh;
|
|
332
|
+
private _refreshFinalizedContext;
|
|
333
|
+
private _applyBoundaryDrafts;
|
|
334
|
+
private _createBoundaryPreviewManager;
|
|
335
|
+
private _getPendingBoundaryMessages;
|
|
336
|
+
private _buildBoundaryContext;
|
|
337
|
+
private _commitBoundaryDrafts;
|
|
338
|
+
private _reportInvalidBoundaryContinuation;
|
|
261
339
|
/** Emit an event to all listeners */
|
|
262
340
|
private _emit;
|
|
263
341
|
private _emitQueueUpdate;
|
|
342
|
+
private _emitSessionCompactFailed;
|
|
264
343
|
private _getIdleWaitPromise;
|
|
265
344
|
private _resolveIdleWaitIfIdle;
|
|
266
345
|
private _emitAgentSettled;
|
|
267
|
-
private _lastAssistantMessage;
|
|
268
346
|
/** Internal handler for agent events - shared by subscribe and reconnect */
|
|
269
347
|
private _handleAgentEvent;
|
|
270
348
|
private _willRetryAfterAgentEnd;
|
|
349
|
+
private _findPersistedMessageEntryId;
|
|
350
|
+
private _omitRecoveryAttempt;
|
|
271
351
|
/** Find the last assistant message in agent state (including aborted ones) */
|
|
272
352
|
private _findLastAssistantMessage;
|
|
273
353
|
private _replaceMessageInPlace;
|
|
@@ -279,41 +359,45 @@ export declare class AgentSession {
|
|
|
279
359
|
* Multiple listeners can be added. Returns unsubscribe function for this listener.
|
|
280
360
|
*/
|
|
281
361
|
subscribe(listener: AgentSessionEventListener): () => void;
|
|
282
|
-
/**
|
|
283
|
-
* Temporarily disconnect from agent events.
|
|
284
|
-
* User listeners are preserved and will receive events again after resubscribe().
|
|
285
|
-
* Used internally during operations that need to pause event processing.
|
|
286
|
-
*/
|
|
362
|
+
/** Disconnect from agent events during disposal. */
|
|
287
363
|
private _disconnectFromAgent;
|
|
288
|
-
/**
|
|
289
|
-
* Reconnect to agent events after _disconnectFromAgent().
|
|
290
|
-
* Preserves all existing listeners.
|
|
291
|
-
*/
|
|
292
|
-
private _reconnectToAgent;
|
|
293
364
|
/**
|
|
294
365
|
* Remove all listeners and disconnect from agent.
|
|
295
366
|
* Call this when completely done with the session.
|
|
296
367
|
*/
|
|
297
368
|
dispose(): void;
|
|
369
|
+
/** Refresh the public finalized transcript from the canonical session projection. */
|
|
370
|
+
refreshContext(): void;
|
|
298
371
|
/** Full agent state */
|
|
299
372
|
get state(): AgentState;
|
|
373
|
+
/** Current cache-warming state and the policy inputs that produced it. */
|
|
374
|
+
get cacheWarmingStatus(): CacheWarmingStatus | undefined;
|
|
375
|
+
/** Persist the cache-warming mode and immediately reconcile active warming. */
|
|
376
|
+
setCacheWarmingMode(mode: CacheWarmingMode): void;
|
|
300
377
|
/** Current model (may be undefined if not yet selected) */
|
|
301
378
|
get model(): Model<any> | undefined;
|
|
302
379
|
/** Current thinking level */
|
|
303
380
|
get thinkingLevel(): ThinkingLevel;
|
|
381
|
+
/** Under a virtual selection, the physical model and thinking level of the latest successful response. */
|
|
382
|
+
get routedModel(): {
|
|
383
|
+
model: Model<any>;
|
|
384
|
+
thinkingLevel?: ThinkingLevel;
|
|
385
|
+
} | undefined;
|
|
304
386
|
/** Whether the session is currently processing an agent run or post-run continuation. */
|
|
305
387
|
get isStreaming(): boolean;
|
|
306
|
-
/** Whether the session has no active agent run,
|
|
388
|
+
/** Whether the session has no active agent run, compaction, branch summary, retry, or queued continuation. */
|
|
307
389
|
get isIdle(): boolean;
|
|
308
|
-
/** Current effective system prompt
|
|
390
|
+
/** Current effective system prompt, including changes not yet sent to the model. */
|
|
309
391
|
get systemPrompt(): string;
|
|
310
392
|
/** Current retry attempt (0 if not retrying) */
|
|
311
393
|
get retryAttempt(): number;
|
|
312
394
|
/**
|
|
313
|
-
* Get the names of currently active tools.
|
|
314
|
-
*
|
|
395
|
+
* Get the names of currently active tools, which are the tools declared to the model.
|
|
396
|
+
* Tools with `codemode` or `deferred` exposure are callable from other tools without being active.
|
|
315
397
|
*/
|
|
316
398
|
getActiveToolNames(): string[];
|
|
399
|
+
/** Get the names of the tools that tools can call through `ctx.executeTool()`. */
|
|
400
|
+
getCallableToolNames(): string[];
|
|
317
401
|
/**
|
|
318
402
|
* Get all configured tools with name, description, parameter schema, prompt guidelines, and source metadata.
|
|
319
403
|
*/
|
|
@@ -321,11 +405,24 @@ export declare class AgentSession {
|
|
|
321
405
|
getToolDefinition(name: string): ToolDefinition | undefined;
|
|
322
406
|
/**
|
|
323
407
|
* Set active tools by name.
|
|
324
|
-
* Only tools in the registry can be enabled. Unknown tool names are ignored.
|
|
408
|
+
* Only tools in the registry can be enabled. Unknown and hidden tool names are ignored.
|
|
325
409
|
* Also rebuilds the system prompt to reflect the new tool set.
|
|
326
410
|
* Changes take effect on the next agent turn.
|
|
327
411
|
*/
|
|
328
412
|
setActiveToolsByName(toolNames: string[]): void;
|
|
413
|
+
private _getToolExposure;
|
|
414
|
+
/**
|
|
415
|
+
* Tools callable through `ctx.executeTool()`: the active `direct` tools and every registered
|
|
416
|
+
* `codemode` or `deferred` tool.
|
|
417
|
+
*/
|
|
418
|
+
private _getCallableTools;
|
|
419
|
+
/**
|
|
420
|
+
* Set the agent's tools for the given active tool names and return them. The active tools are
|
|
421
|
+
* the registered, non-hidden ones; they are declared to the model. Active tools with a
|
|
422
|
+
* `prepareLoadout` hook can change the declared descriptions and hide declarations from
|
|
423
|
+
* requests (see {@link _installHiddenDeclarationsProjection}).
|
|
424
|
+
*/
|
|
425
|
+
private _applyToolLoadout;
|
|
329
426
|
/** Whether compaction or branch summarization is currently running */
|
|
330
427
|
get isCompacting(): boolean;
|
|
331
428
|
/** All messages including custom types like BashExecutionMessage */
|
|
@@ -355,8 +452,45 @@ export declare class AgentSession {
|
|
|
355
452
|
private _normalizePromptSnippet;
|
|
356
453
|
private _normalizePromptGuidelines;
|
|
357
454
|
private _rebuildSystemPrompt;
|
|
455
|
+
/**
|
|
456
|
+
* Apply a prompt and tool loadout for the next request. Sets the executable tools and
|
|
457
|
+
* returns a system message patching the prompt sections the model currently has (replayed
|
|
458
|
+
* from `messages`), or undefined when the prompt is unchanged. Tool changes are declared by
|
|
459
|
+
* the agent loop before the request.
|
|
460
|
+
*
|
|
461
|
+
* A forced prompt does not affect the transcript: the structured sections are still diffed
|
|
462
|
+
* and persisted, and the forced text is projected onto the request by
|
|
463
|
+
* {@link _installAgentForcedPromptProjection}.
|
|
464
|
+
*/
|
|
465
|
+
private _preparePromptAndToolLoadout;
|
|
466
|
+
/**
|
|
467
|
+
* Send a forced prompt as the provider's leading system prompt without recording it.
|
|
468
|
+
*
|
|
469
|
+
* A `before_agent_start` handler that returns `systemPrompt` needs that exact text at the
|
|
470
|
+
* head of the request; a mid-conversation system message would leave the original prompt
|
|
471
|
+
* in place. The forced text is a rendering of the current prompt, so the transcript keeps
|
|
472
|
+
* its structured sections and the request is projected instead: the system messages
|
|
473
|
+
* collapse into one head holding the forced text and the current tools. Runs after the
|
|
474
|
+
* `context` extension handlers.
|
|
475
|
+
*/
|
|
476
|
+
/**
|
|
477
|
+
* Remove the declarations that `prepareLoadout` hooks hide from every request. The whole
|
|
478
|
+
* transcript is filtered with the current set, so the projected declarations stay consistent
|
|
479
|
+
* across requests and only change when the loadout does.
|
|
480
|
+
*/
|
|
481
|
+
private _installHiddenDeclarationsProjection;
|
|
482
|
+
private _installAgentForcedPromptProjection;
|
|
483
|
+
/**
|
|
484
|
+
* Restore the active tool loadout declared by the session transcript, if it declares one.
|
|
485
|
+
* Tools reachable only from other tools are never declared, but they do not depend on the active
|
|
486
|
+
* set, so the transcript's declarations are the whole loadout.
|
|
487
|
+
*/
|
|
488
|
+
private _restoreToolsFromTranscript;
|
|
358
489
|
private _runAgentPrompt;
|
|
359
490
|
private _handlePostAgentRun;
|
|
491
|
+
private _runBeforeSettleBoundary;
|
|
492
|
+
private _runInputHandlers;
|
|
493
|
+
private _normalizePromptImages;
|
|
360
494
|
/**
|
|
361
495
|
* Send a prompt to the agent.
|
|
362
496
|
* - Handles extension commands (registered via pi.registerCommand) immediately, even during streaming
|
|
@@ -377,23 +511,30 @@ export declare class AgentSession {
|
|
|
377
511
|
* Emits errors via extension runner if file read fails.
|
|
378
512
|
*/
|
|
379
513
|
private _expandSkillCommand;
|
|
514
|
+
private _queueUserInput;
|
|
380
515
|
/**
|
|
381
516
|
* Queue a steering message while the agent is running.
|
|
382
517
|
* Delivered after the current assistant turn finishes executing its tool calls,
|
|
383
518
|
* before the next LLM call.
|
|
384
519
|
* Expands skill commands and prompt templates. Errors on extension commands.
|
|
385
520
|
* @param images Optional image attachments to include with the message
|
|
521
|
+
* @param options Input source; defaults to interactive
|
|
386
522
|
* @throws Error if text is an extension command
|
|
387
523
|
*/
|
|
388
|
-
steer(text: string, images?: ImageContent[]
|
|
524
|
+
steer(text: string, images?: ImageContent[], options?: {
|
|
525
|
+
source?: InputSource;
|
|
526
|
+
}): Promise<QueuedInputDisposition>;
|
|
389
527
|
/**
|
|
390
528
|
* Queue a follow-up message to be processed after the agent finishes.
|
|
391
529
|
* Delivered only when agent has no more tool calls or steering messages.
|
|
392
530
|
* Expands skill commands and prompt templates. Errors on extension commands.
|
|
393
531
|
* @param images Optional image attachments to include with the message
|
|
532
|
+
* @param options Input source; defaults to interactive
|
|
394
533
|
* @throws Error if text is an extension command
|
|
395
534
|
*/
|
|
396
|
-
followUp(text: string, images?: ImageContent[]
|
|
535
|
+
followUp(text: string, images?: ImageContent[], options?: {
|
|
536
|
+
source?: InputSource;
|
|
537
|
+
}): Promise<QueuedInputDisposition>;
|
|
397
538
|
/**
|
|
398
539
|
* Internal: Queue a steering message (already expanded, no extension command check).
|
|
399
540
|
*/
|
|
@@ -409,8 +550,9 @@ export declare class AgentSession {
|
|
|
409
550
|
/**
|
|
410
551
|
* Send a custom message to the session. Creates a CustomMessageEntry.
|
|
411
552
|
*
|
|
412
|
-
* Handles
|
|
553
|
+
* Handles four cases:
|
|
413
554
|
* - Streaming: queues message, processed when loop pulls from queue
|
|
555
|
+
* - Streaming + triggerTurn false: appended to state/session once the current turn ends
|
|
414
556
|
* - Not streaming + triggerTurn: appends to state/session, starts new turn
|
|
415
557
|
* - Not streaming + no trigger: appends to state/session, no turn
|
|
416
558
|
*
|
|
@@ -422,15 +564,23 @@ export declare class AgentSession {
|
|
|
422
564
|
triggerTurn?: boolean;
|
|
423
565
|
deliverAs?: "steer" | "followUp" | "nextTurn";
|
|
424
566
|
}): Promise<void>;
|
|
567
|
+
private _appendCustomMessage;
|
|
568
|
+
/**
|
|
569
|
+
* Append custom messages queued while the agent was running.
|
|
570
|
+
* Called once the current turn's tool results are in agent state and session history.
|
|
571
|
+
*/
|
|
572
|
+
private _flushPendingCustomMessages;
|
|
425
573
|
/**
|
|
426
574
|
* Send a user message to the agent. Always triggers a turn.
|
|
427
575
|
* When the agent is streaming, use deliverAs to specify how to queue the message.
|
|
428
576
|
*
|
|
429
577
|
* @param content User message content (string or content array)
|
|
430
578
|
* @param options.deliverAs Delivery mode when streaming: "steer" or "followUp"
|
|
579
|
+
* @param options.expandPromptTemplates Whether to dispatch extension commands and expand skill commands and prompt templates. Default: false.
|
|
431
580
|
*/
|
|
432
581
|
sendUserMessage(content: string | (TextContent | ImageContent)[], options?: {
|
|
433
582
|
deliverAs?: "steer" | "followUp";
|
|
583
|
+
expandPromptTemplates?: boolean;
|
|
434
584
|
}): Promise<void>;
|
|
435
585
|
/**
|
|
436
586
|
* Clear all queued messages and return them.
|
|
@@ -456,17 +606,19 @@ export declare class AgentSession {
|
|
|
456
606
|
private _emitModelSelect;
|
|
457
607
|
/**
|
|
458
608
|
* Set model directly.
|
|
459
|
-
* Validates that auth is configured
|
|
609
|
+
* Validates that auth is configured and saves to the session transcript.
|
|
610
|
+
* Persists to global defaults only when options.persist is true.
|
|
460
611
|
* @throws Error if no auth is configured for the model
|
|
461
612
|
*/
|
|
462
|
-
setModel(model: Model<any
|
|
613
|
+
setModel(model: Model<any>, options?: ModelMutationOptions): Promise<void>;
|
|
614
|
+
private _addPersistedDefaultToNonEmptyScope;
|
|
463
615
|
/**
|
|
464
616
|
* Cycle to next/previous model.
|
|
465
617
|
* Uses scoped models (from --models flag) if available, otherwise all available models.
|
|
466
618
|
* @param direction - "forward" (default) or "backward"
|
|
467
619
|
* @returns The new model info, or undefined if only one model available
|
|
468
620
|
*/
|
|
469
|
-
cycleModel(direction?: "forward" | "backward"): Promise<ModelCycleResult | undefined>;
|
|
621
|
+
cycleModel(direction?: "forward" | "backward", options?: ModelMutationOptions): Promise<ModelCycleResult | undefined>;
|
|
470
622
|
private _cycleScopedModel;
|
|
471
623
|
private _cycleAvailableModel;
|
|
472
624
|
/** Get the selectable context windows for the current model. */
|
|
@@ -480,14 +632,15 @@ export declare class AgentSession {
|
|
|
480
632
|
/**
|
|
481
633
|
* Set thinking level.
|
|
482
634
|
* Clamps to model capabilities based on available thinking levels.
|
|
483
|
-
* Saves to session
|
|
635
|
+
* Saves the clamped level to the session transcript only if the level actually changes.
|
|
636
|
+
* Persists the requested level to global defaults only when options.persist is true.
|
|
484
637
|
*/
|
|
485
|
-
setThinkingLevel(level: ThinkingLevel): void;
|
|
638
|
+
setThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;
|
|
486
639
|
/**
|
|
487
640
|
* Cycle to next thinking level.
|
|
488
641
|
* @returns New level, or undefined if model doesn't support thinking
|
|
489
642
|
*/
|
|
490
|
-
cycleThinkingLevel(): ThinkingLevel | undefined;
|
|
643
|
+
cycleThinkingLevel(options?: ModelMutationOptions): ThinkingLevel | undefined;
|
|
491
644
|
/**
|
|
492
645
|
* Get available thinking levels for current model.
|
|
493
646
|
* The provider will clamp to what the specific model supports internally.
|
|
@@ -510,9 +663,22 @@ export declare class AgentSession {
|
|
|
510
663
|
* Saves to settings.
|
|
511
664
|
*/
|
|
512
665
|
setFollowUpMode(mode: "all" | "one-at-a-time"): void;
|
|
666
|
+
/** Generate draht's built-in compaction summary for manual and automatic compaction. */
|
|
667
|
+
private _runDefaultCompaction;
|
|
668
|
+
private _clearManualCompactionState;
|
|
513
669
|
/**
|
|
514
670
|
* Manually compact the session context.
|
|
515
|
-
*
|
|
671
|
+
*
|
|
672
|
+
* This is the manual entry point used by `/compact`, RPC, and extensions. It is
|
|
673
|
+
* separate from automatic threshold/overflow compaction, which enters through
|
|
674
|
+
* `_checkCompaction()` and `_runAutoCompaction()`. After preparation and the
|
|
675
|
+
* `session_before_compact` hook, both paths call the lower-level `compact()`
|
|
676
|
+
* function imported from `./compaction/index.ts`, unless the hook cancels or
|
|
677
|
+
* supplies a custom result.
|
|
678
|
+
*
|
|
679
|
+
* Aborts the current agent operation first. Manual compaction never retries or
|
|
680
|
+
* continues the interrupted agent turn.
|
|
681
|
+
*
|
|
516
682
|
* @param customInstructions Optional instructions for the compaction summary
|
|
517
683
|
*/
|
|
518
684
|
compact(customInstructions?: string): Promise<CompactionResult>;
|
|
@@ -525,19 +691,36 @@ export declare class AgentSession {
|
|
|
525
691
|
*/
|
|
526
692
|
abortBranchSummary(): void;
|
|
527
693
|
/**
|
|
528
|
-
*
|
|
529
|
-
*
|
|
694
|
+
* Dispatch automatic compaction after `agent_end` or before prompt submission.
|
|
695
|
+
* Manual compaction does not call this method; it enters through `compact()`.
|
|
696
|
+
*
|
|
697
|
+
* Automatic cases:
|
|
698
|
+
* 1. Overflow with retry: a context-overflow error or recoverable length stop;
|
|
699
|
+
* remove the failed assistant message, compact, and retry the turn once.
|
|
700
|
+
* 2. Overflow without retry: a successful response exceeded the configured
|
|
701
|
+
* context window; compact but preserve the completed response.
|
|
702
|
+
* 3. Threshold without retry: valid or estimated context usage crossed the
|
|
703
|
+
* configured threshold; compact without retrying the completed response.
|
|
530
704
|
*
|
|
531
|
-
*
|
|
532
|
-
*
|
|
533
|
-
*
|
|
705
|
+
* Each case calls `_runAutoCompaction()`. After preparation and the
|
|
706
|
+
* `session_before_compact` hook, that method calls the lower-level `compact()`
|
|
707
|
+
* function imported from `./compaction/index.ts`, unless the hook cancels or
|
|
708
|
+
* supplies a custom result.
|
|
534
709
|
*
|
|
535
710
|
* @param assistantMessage The assistant message to check
|
|
536
711
|
* @param skipAbortedCheck If false, include aborted messages (for pre-prompt check). Default: true
|
|
712
|
+
* @returns Whether the post-run loop should call `agent.continue()` for overflow recovery or queued messages
|
|
537
713
|
*/
|
|
538
714
|
private _checkCompaction;
|
|
539
715
|
/**
|
|
540
|
-
*
|
|
716
|
+
* Execute threshold or overflow compaction. Manual compaction uses
|
|
717
|
+
* `AgentSession.compact()` instead. Both paths call the lower-level `compact()`
|
|
718
|
+
* function imported from `./compaction/index.ts` after preparation and extension
|
|
719
|
+
* interception.
|
|
720
|
+
*
|
|
721
|
+
* @param reason Automatic trigger selected by `_checkCompaction()`
|
|
722
|
+
* @param willRetry Whether to continue the interrupted turn after overflow compaction
|
|
723
|
+
* @returns Whether the post-run loop should call `agent.continue()`
|
|
541
724
|
*/
|
|
542
725
|
private _runAutoCompaction;
|
|
543
726
|
/**
|
|
@@ -546,14 +729,35 @@ export declare class AgentSession {
|
|
|
546
729
|
setAutoCompactionEnabled(enabled: boolean): void;
|
|
547
730
|
/** Whether auto-compaction is enabled */
|
|
548
731
|
get autoCompactionEnabled(): boolean;
|
|
732
|
+
/**
|
|
733
|
+
* Install (or remove) the permission relay this session's dialogs are mirrored onto.
|
|
734
|
+
*
|
|
735
|
+
* Re-applies the extension bindings immediately: the constructor's own apply has already run
|
|
736
|
+
* by the time any caller can hand a relay over, so without the re-apply the runner would keep
|
|
737
|
+
* an undecorated context until the next reload.
|
|
738
|
+
*/
|
|
739
|
+
setPermissionRelay(relay: PermissionRelay | undefined): void;
|
|
549
740
|
bindExtensions(bindings: ExtensionBindings): Promise<void>;
|
|
550
741
|
private extendResourcesFromExtensions;
|
|
551
742
|
private buildExtensionResourcePaths;
|
|
552
743
|
private getExtensionSourceLabel;
|
|
744
|
+
/**
|
|
745
|
+
* Wrap the mode's UI context so an attached remote surface can answer the same dialogs.
|
|
746
|
+
*
|
|
747
|
+
* Returns the base untouched when no relay is installed. When one is, the decorator is built
|
|
748
|
+
* here and NOWHERE else: this is the only mode-agnostic seam every session passes through
|
|
749
|
+
* (bindExtensions for interactive/rpc/print, _buildRuntime for the constructor and reload),
|
|
750
|
+
* so a wrap installed anywhere else is silently overwritten when a mode binds its own context.
|
|
751
|
+
*/
|
|
752
|
+
private _wrapUIContext;
|
|
553
753
|
private _applyExtensionBindings;
|
|
554
754
|
private _refreshCurrentModelFromRegistry;
|
|
555
755
|
private _bindExtensionCore;
|
|
556
756
|
private _refreshToolRegistry;
|
|
757
|
+
/** Whether activating the tool declares it to the model. */
|
|
758
|
+
private _isDeclarable;
|
|
759
|
+
/** Whether registering the tool activates it, which declares it to the model. */
|
|
760
|
+
private _isActivatedOnRegistration;
|
|
557
761
|
private _buildRuntime;
|
|
558
762
|
reload(options?: {
|
|
559
763
|
beforeSessionStart?: () => void | Promise<void>;
|
|
@@ -570,6 +774,7 @@ export declare class AgentSession {
|
|
|
570
774
|
* the TUI needs to render the retry and recreate the underlying indicator.
|
|
571
775
|
*/
|
|
572
776
|
private _summarizationRetryCallbacks;
|
|
777
|
+
private _finishCancelledRetry;
|
|
573
778
|
/**
|
|
574
779
|
* Prepare a retryable error for continuation with exponential backoff.
|
|
575
780
|
* @returns true if the caller should continue the agent, false otherwise
|
|
@@ -664,9 +869,12 @@ export declare class AgentSession {
|
|
|
664
869
|
/**
|
|
665
870
|
* Export session to HTML.
|
|
666
871
|
* @param outputPath Optional output path (defaults to session directory)
|
|
872
|
+
* @param options Optional export presentation settings
|
|
667
873
|
* @returns Path to exported file
|
|
668
874
|
*/
|
|
669
|
-
exportToHtml(outputPath?: string
|
|
875
|
+
exportToHtml(outputPath?: string, options?: {
|
|
876
|
+
themeName?: string;
|
|
877
|
+
}): Promise<string>;
|
|
670
878
|
/**
|
|
671
879
|
* Export the current session branch to a JSONL file.
|
|
672
880
|
* Writes the session header followed by all entries on the current branch path.
|
|
@@ -674,6 +882,14 @@ export declare class AgentSession {
|
|
|
674
882
|
* @returns The resolved output file path.
|
|
675
883
|
*/
|
|
676
884
|
exportToJsonl(outputPath?: string): string;
|
|
885
|
+
/**
|
|
886
|
+
* Ask the current model to describe what went wrong in this session for a bug report.
|
|
887
|
+
* Used when the user declines to share the transcript itself.
|
|
888
|
+
*/
|
|
889
|
+
summarizeForBugReport(options: {
|
|
890
|
+
hint?: string;
|
|
891
|
+
signal: AbortSignal;
|
|
892
|
+
}): Promise<string>;
|
|
677
893
|
/**
|
|
678
894
|
* Get text content of last assistant message.
|
|
679
895
|
* Useful for /copy command.
|
|
@@ -690,4 +906,5 @@ export declare class AgentSession {
|
|
|
690
906
|
*/
|
|
691
907
|
get extensionRunner(): ExtensionRunner;
|
|
692
908
|
}
|
|
909
|
+
export {};
|
|
693
910
|
//# sourceMappingURL=agent-session.d.ts.map
|