@draht/coding-agent 2026.10.31 → 2026.11.5-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +131 -0
- package/dist/bundle/chunks/anthropic-messages-UJZ4SGHU.js +6 -0
- package/dist/bundle/chunks/azure-openai-responses-NCMJPZVJ.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +27 -24
- package/dist/bundle/chunks/chunk-2JZLKNZ4.js +3 -0
- package/dist/bundle/chunks/chunk-3BJ462DN.js +132 -0
- package/dist/bundle/chunks/chunk-5OXIAQP5.js +2 -0
- package/dist/bundle/chunks/chunk-6M3D4XVD.js +2 -0
- package/dist/bundle/chunks/{chunk-KVH4HR57.js → chunk-6WESOD4H.js} +1 -1
- package/dist/bundle/chunks/chunk-AOCWORXE.js +2 -0
- package/dist/bundle/chunks/chunk-BK5LXGIH.js +2 -0
- package/dist/bundle/chunks/chunk-CA23BDNK.js +2 -0
- package/dist/bundle/chunks/chunk-DWOGGNWY.js +18 -0
- package/dist/bundle/chunks/{chunk-RMLEJL4F.js → chunk-EOXOMUKR.js} +1 -1
- package/dist/bundle/chunks/chunk-F5TDVH26.js +159 -0
- package/dist/bundle/chunks/chunk-GBFVS2SF.js +12 -0
- package/dist/bundle/chunks/{chunk-ITP6IDBA.js → chunk-GQXRTK54.js} +2 -2
- package/dist/bundle/chunks/chunk-HJ3PS7QP.js +4 -0
- package/dist/bundle/chunks/chunk-ITKDPD4D.js +12 -0
- package/dist/bundle/chunks/chunk-KFREX3FS.js +10 -0
- package/dist/bundle/chunks/chunk-LO6CVU2L.js +6 -0
- package/dist/bundle/chunks/{chunk-AACPRSR2.js → chunk-P7O36UDU.js} +2 -2
- package/dist/bundle/chunks/chunk-PMINB7UH.js +1401 -0
- package/dist/bundle/chunks/chunk-PZKD35UB.js +2 -0
- package/dist/bundle/chunks/{chunk-JQF3BGRS.js → chunk-Q2QKCYPU.js} +1 -1
- package/dist/bundle/chunks/chunk-QBUTRTYN.js +2 -0
- package/dist/bundle/chunks/chunk-SUVMF4W5.js +2 -0
- package/dist/bundle/chunks/chunk-UFACUBF2.js +16 -0
- package/dist/bundle/chunks/chunk-VXO6B72D.js +9 -0
- package/dist/bundle/chunks/{chunk-NUUJKLOX.js → chunk-WXASQQBZ.js} +9 -9
- package/dist/bundle/chunks/chunk-Y3NLUJYO.js +2 -0
- package/dist/bundle/chunks/chunk-Y7QE2R34.js +2 -0
- package/dist/bundle/chunks/chunk-YD5VPPI4.js +30 -0
- package/dist/bundle/chunks/chunk-YWRWN7ZB.js +82 -0
- package/dist/bundle/chunks/{cli-LGOE6EXL.js → cli-4SUT6MJ6.js} +10 -10
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-BJVMNETD.js +2 -0
- package/dist/bundle/chunks/{execute-ZVQ7ITER.js → execute-ZI7T2SUH.js} +1 -1
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-IHELIMAC.js → google-generative-ai-N5IPPKQY.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-3QCFWSNG.js → google-vertex-A4BKUE4H.js} +1 -1
- package/dist/bundle/chunks/https-proxy-agent-WQIRL24U.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +1 -1
- package/dist/bundle/chunks/kimi-coding.js +1 -1
- package/dist/bundle/chunks/lib-ULKZYRGD.js +9 -0
- package/dist/bundle/chunks/{llama-cpp-classify-6J5XKC7Q.js → llama-cpp-classify-L4URPZ4F.js} +1 -1
- package/dist/bundle/chunks/meta.js +1 -1
- package/dist/bundle/chunks/mistral-conversations-CK2BS74V.js +5 -0
- package/dist/bundle/chunks/{multipart-parser-AZP5BX2W.js → multipart-parser-HMCXZ4BD.js} +1 -1
- package/dist/bundle/chunks/{node-BZAVEWJ3.js → node-DXZFQBEO.js} +1 -1
- package/dist/bundle/chunks/{node-C2JGH2OB.js → node-LBZLUIBE.js} +1 -1
- package/dist/bundle/chunks/openai-codex-responses-XGVNKP4D.js +10 -0
- package/dist/bundle/chunks/openai-completions-72XZO4Q3.js +7 -0
- package/dist/bundle/chunks/{openai-decisions-NDYRKL2E.js → openai-decisions-P5OCXLLD.js} +1 -1
- package/dist/bundle/chunks/openai-responses-RGLZ4E3Q.js +4 -0
- package/dist/bundle/chunks/{openrouter-images-ZIDF5HXA.js → openrouter-images-LSBWMZDK.js} +1 -1
- package/dist/bundle/chunks/pi-messages-CL4MEVNS.js +8 -0
- package/dist/bundle/chunks/radius.js +1 -1
- package/dist/bundle/chunks/{runtime-MZVF4MP6.js → runtime-F4362CZF.js} +1 -1
- package/dist/bundle/chunks/{runtime-7BIFTREJ.js → runtime-FJYRBK3O.js} +1 -1
- package/dist/bundle/chunks/settings-manager-T6G6KKY3.js +2 -0
- package/dist/bundle/chunks/src-KDGO7EGF.js +4 -0
- package/dist/bundle/chunks/typesafe-system-one-BFYS6AEA.js +2 -0
- package/dist/bundle/chunks/virtual-modules-BPZIVXNK.js +2 -0
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +8 -7
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +3 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/config.d.ts +10 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +24 -5
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +4 -3
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +16 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +104 -30
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/ai-schemas.d.ts +166 -0
- package/dist/core/ai-schemas.d.ts.map +1 -0
- package/dist/core/ai-schemas.js +21 -0
- package/dist/core/ai-schemas.js.map +1 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +3 -2
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +3 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/bug-report.d.ts +4 -4
- package/dist/core/cache-warmer.d.ts.map +1 -1
- package/dist/core/cache-warmer.js +2 -0
- package/dist/core/cache-warmer.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +4 -2
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +16 -4
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/exec.d.ts +9 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +104 -60
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/template.css +9 -0
- package/dist/core/export-html/template.js +165 -45
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +3 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/ai-extension-view.d.ts +19 -0
- package/dist/core/extensions/ai-extension-view.d.ts.map +1 -0
- package/dist/core/extensions/ai-extension-view.js +22 -0
- package/dist/core/extensions/ai-extension-view.js.map +1 -0
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +15 -9
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +9 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +55 -11
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/virtual-modules.js +6 -5
- package/dist/core/extensions/virtual-modules.js.map +1 -1
- package/dist/core/keybindings.d.ts +2 -2
- package/dist/core/keybindings.js +1 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +21 -38
- package/dist/core/mcp-servers.d.ts.map +1 -1
- package/dist/core/mcp-servers.js +58 -134
- package/dist/core/mcp-servers.js.map +1 -1
- package/dist/core/model-config.d.ts +1717 -1990
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +2 -3
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +16 -9
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +4 -4
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts +24 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +215 -52
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-manifest.d.ts +1 -0
- package/dist/core/pi-manifest.d.ts.map +1 -1
- package/dist/core/pi-manifest.js +3 -0
- package/dist/core/pi-manifest.js.map +1 -1
- package/dist/core/project-trust.js +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/provider-composer.d.ts +2 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +8 -4
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/resource-loader.d.ts +4 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +38 -23
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +3 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +7 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +32 -13
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +2 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +11 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +4 -2
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +8 -1
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +6 -15
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.js +2 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/source-info.d.ts +9 -0
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js +14 -0
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +5 -6
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +3 -3
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +2 -4
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +2 -2
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +41 -25
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +4 -5
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +73 -70
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts +2 -2
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +2 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +2 -2
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +2 -7
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/write.d.ts.map +1 -1
- package/dist/core/tools/renderers/write.js +19 -19
- package/dist/core/tools/renderers/write.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +11 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts +0 -14
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +0 -29
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write.d.ts +2 -2
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +15 -8
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +2 -0
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/extensions/codemode/renderer.d.ts.map +1 -1
- package/dist/extensions/codemode/renderer.js +6 -2
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +2 -1
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +33 -8
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/llama/client.d.ts +2 -0
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +23 -2
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/llama/ui.d.ts.map +1 -1
- package/dist/extensions/llama/ui.js +16 -4
- package/dist/extensions/llama/ui.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts +2 -0
- package/dist/extensions/mcp/cli.d.ts.map +1 -1
- package/dist/extensions/mcp/cli.js +72 -15
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/config.d.ts.map +1 -1
- package/dist/extensions/mcp/config.js +4 -7
- package/dist/extensions/mcp/config.js.map +1 -1
- package/dist/extensions/mcp/index.d.ts.map +1 -1
- package/dist/extensions/mcp/index.js +2 -2
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/oauth.d.ts +13 -50
- package/dist/extensions/mcp/oauth.d.ts.map +1 -1
- package/dist/extensions/mcp/oauth.js +53 -319
- package/dist/extensions/mcp/oauth.js.map +1 -1
- package/dist/extensions/mcp/resources.d.ts +1 -1
- package/dist/extensions/mcp/resources.d.ts.map +1 -1
- package/dist/extensions/mcp/resources.js +4 -3
- package/dist/extensions/mcp/resources.js.map +1 -1
- package/dist/extensions/mcp/runtime.d.ts +4 -3
- package/dist/extensions/mcp/runtime.d.ts.map +1 -1
- package/dist/extensions/mcp/runtime.js +4 -3
- package/dist/extensions/mcp/runtime.js.map +1 -1
- package/dist/extensions/mcp/tools.d.ts +2 -23
- package/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/dist/extensions/mcp/tools.js +6 -58
- package/dist/extensions/mcp/tools.js.map +1 -1
- package/dist/extensions/mcp/ui.d.ts +1 -0
- package/dist/extensions/mcp/ui.d.ts.map +1 -1
- package/dist/extensions/mcp/ui.js +33 -24
- package/dist/extensions/mcp/ui.js.map +1 -1
- package/dist/extensions/tool-search/tool.d.ts +21 -6
- package/dist/extensions/tool-search/tool.d.ts.map +1 -1
- package/dist/extensions/tool-search/tool.js +104 -36
- package/dist/extensions/tool-search/tool.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +16 -8
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +4 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +44 -20
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +5 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +12 -4
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +5 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +12 -4
- 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 +4 -18
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +7 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +2 -1
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +5 -2
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +12 -4
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js +11 -5
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +2 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +4 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +9 -1
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +5 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +104 -10
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +2 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.js +3 -2
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -1
- package/dist/modes/interactive/components/mermaid.d.ts +2 -1
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
- package/dist/modes/interactive/components/mermaid.js +25 -20
- package/dist/modes/interactive/components/mermaid.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +17 -6
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +13 -4
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +14 -3
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts +4 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js +86 -22
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +2 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +20 -27
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.js +2 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +5 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +12 -4
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +6 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +14 -2
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +2 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +24 -16
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +9 -1
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +3 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +6 -2
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts +1 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +16 -4
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +7 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +179 -53
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-search.d.ts +10 -0
- package/dist/modes/interactive/model-search.d.ts.map +1 -1
- package/dist/modes/interactive/model-search.js +21 -0
- package/dist/modes/interactive/model-search.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +10 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +35 -23
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +19 -10
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +53 -23
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +78 -9
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js +5 -2
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/changelog.d.ts +2 -2
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +15 -2
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/clipboard-command.d.ts.map +1 -1
- package/dist/utils/clipboard-command.js +4 -0
- package/dist/utils/clipboard-command.js.map +1 -1
- package/dist/utils/git.d.ts +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js +5 -3
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js +4 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts +17 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +42 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +14 -0
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +5 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +7 -0
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +30 -35
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/cli.md +22 -10
- package/docs/custom-provider.md +2 -0
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +3201 -233
- package/docs/keybindings.md +2 -2
- package/docs/llama-cpp.md +23 -15
- package/docs/message-types.md +1 -1
- package/docs/models-configuration.md +17 -4
- package/docs/models.md +9 -4
- package/docs/packages.md +24 -0
- package/docs/providers.md +1 -1
- package/docs/rpc.md +3 -1
- package/docs/sessions.md +11 -3
- package/docs/settings.md +5 -4
- package/docs/slash-commands.md +3 -2
- package/docs/terminal-setup.md +3 -1
- package/docs/tmux.md +6 -0
- package/docs/tui.md +2 -0
- package/docs/windows.md +27 -0
- package/eval/drahtbank/isolated-tools.ts +0 -1
- package/examples/extensions/antigravity-image-gen.ts +1 -1
- package/examples/extensions/custom-provider-anthropic/index.ts +27 -31
- package/examples/extensions/debug-provider.ts +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/plan-mode/index.ts +23 -13
- package/examples/extensions/plan-mode/utils.ts +42 -16
- package/examples/extensions/preset.ts +2 -0
- package/examples/extensions/reload-runtime.ts +17 -5
- package/examples/extensions/sandbox/package-lock.json +15 -41
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/index.ts +388 -171
- package/examples/extensions/todo.ts +7 -0
- package/examples/extensions/tools.ts +2 -0
- package/examples/tsconfig.json +188 -0
- package/package.json +15 -16
- package/schemas/models.schema.json +85 -39
- package/schemas/settings.schema.json +17 -0
- package/dist/bundle/chunks/anthropic-messages-OR5LCIS6.js +0 -6
- package/dist/bundle/chunks/azure-openai-responses-D6DVM232.js +0 -2
- package/dist/bundle/chunks/chunk-2MJ6J5N2.js +0 -6
- package/dist/bundle/chunks/chunk-2RI4GIFP.js +0 -166
- package/dist/bundle/chunks/chunk-57PET6SW.js +0 -82
- package/dist/bundle/chunks/chunk-6MSE6LZ3.js +0 -6
- package/dist/bundle/chunks/chunk-736QBNUZ.js +0 -12
- package/dist/bundle/chunks/chunk-76YNMQ57.js +0 -2
- package/dist/bundle/chunks/chunk-7JJWQ53O.js +0 -1428
- package/dist/bundle/chunks/chunk-AEG546ID.js +0 -16
- package/dist/bundle/chunks/chunk-CKPJSVRD.js +0 -2
- package/dist/bundle/chunks/chunk-CMKX4CSI.js +0 -6
- package/dist/bundle/chunks/chunk-DLEJ4D4T.js +0 -2
- package/dist/bundle/chunks/chunk-FXCTQRNN.js +0 -2
- package/dist/bundle/chunks/chunk-KINQOWAP.js +0 -4
- package/dist/bundle/chunks/chunk-LK54N67E.js +0 -7
- package/dist/bundle/chunks/chunk-QJADVGUY.js +0 -2
- package/dist/bundle/chunks/chunk-QMN7OD6G.js +0 -2
- package/dist/bundle/chunks/chunk-SYRVFGYE.js +0 -2
- package/dist/bundle/chunks/chunk-TIA2T6EO.js +0 -3
- package/dist/bundle/chunks/chunk-X4UBYFTC.js +0 -11
- package/dist/bundle/chunks/chunk-XB4F3WGD.js +0 -132
- package/dist/bundle/chunks/chunk-XOGEYN4Q.js +0 -2
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-YVG4FYXV.js +0 -2
- package/dist/bundle/chunks/https-proxy-agent-O2PVUIOI.js +0 -13
- package/dist/bundle/chunks/lib-XOG5PI3Y.js +0 -9
- package/dist/bundle/chunks/mistral-conversations-D3JRG6BL.js +0 -5
- package/dist/bundle/chunks/openai-codex-responses-CBOPSGUQ.js +0 -10
- package/dist/bundle/chunks/openai-completions-LDMDMEF2.js +0 -7
- package/dist/bundle/chunks/openai-responses-EZWJOXWT.js +0 -4
- package/dist/bundle/chunks/pi-messages-R75QWB4G.js +0 -8
- package/dist/bundle/chunks/settings-manager-QF6DRH5C.js +0 -2
- package/dist/bundle/chunks/src-TIBHS42X.js +0 -4
- package/dist/bundle/chunks/typesafe-system-one-YUNLPYVG.js +0 -2
- package/dist/bundle/chunks/virtual-modules-4DJB4LTP.js +0 -2
- /package/dist/bundle/chunks/{chunk-UQSONZLL.js → chunk-DN7SM3LX.js} +0 -0
- /package/dist/bundle/chunks/{chunk-ZZD35WKM.js → chunk-MOOADNVS.js} +0 -0
package/docs/keybindings.md
CHANGED
|
@@ -100,7 +100,7 @@ The dedicated history actions browse prompt history regardless of cursor positio
|
|
|
100
100
|
|
|
101
101
|
#### Fullscreen
|
|
102
102
|
|
|
103
|
-
In fullscreen mode, these actions control the transcript and take precedence over editor actions using the same key.
|
|
103
|
+
In fullscreen mode, these actions control the transcript and take precedence over editor actions using the same key. While an overlay or a scrollable list such as autocomplete, `/settings`, or the model selector has focus, the scrolling and prompt-jump actions go to it instead of the transcript, so `tui.select.pageUp` and `tui.select.pageDown` move the list selection. Transcript search actions keep working.
|
|
104
104
|
|
|
105
105
|
| Keybinding id | Default | Description |
|
|
106
106
|
|---|---|---|
|
|
@@ -128,7 +128,7 @@ In fullscreen mode, these actions control the transcript and take precedence ove
|
|
|
128
128
|
| `app.exit` | `ctrl+d` | Exit (when editor empty) |
|
|
129
129
|
| `app.suspend` | `ctrl+z` (None on Windows) | Suspend to background |
|
|
130
130
|
| `app.editor.external` | `ctrl+g` | Open in external editor (`externalEditor`, `$VISUAL`, `$EDITOR`, Notepad on Windows, or `nano` elsewhere) |
|
|
131
|
-
| `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows and WSL) | Paste files on macOS, images, or text from clipboard |
|
|
131
|
+
| `app.clipboard.pasteImage` | `ctrl+v` (`alt+v`, `ctrl+v` on Windows and WSL) | Paste files on macOS, images, or text from clipboard |
|
|
132
132
|
| `app.login.copyUrl` | `ctrl+x` | Copy the complete login URL while `/login` is open |
|
|
133
133
|
|
|
134
134
|
On native Windows, `app.suspend` has no default because Windows terminals do not support Unix job control. If you assign it manually, draht shows a status message instead of suspending. WSL uses the normal `ctrl+z` and `fg` behavior.
|
package/docs/llama-cpp.md
CHANGED
|
@@ -1,31 +1,39 @@
|
|
|
1
1
|
# Local Models with llama.cpp
|
|
2
2
|
|
|
3
|
-
draht supports the [llama.cpp](https://
|
|
3
|
+
draht supports the [llama.cpp](https://llama.app) router server. The router discovers multiple GGUF models and loads or unloads them on demand.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Install llama.cpp
|
|
6
|
+
|
|
7
|
+
Install llama.cpp with the [official installer](https://llama.app/docs/installation):
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
curl -LsSf https://llama.app/install.sh | sh
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Verify the installation:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
llama cli --version
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
See [llama.app](https://llama.app) for other installation methods, including package managers and building from source.
|
|
6
20
|
|
|
7
21
|
## Start the router
|
|
8
22
|
|
|
9
|
-
Start `llama
|
|
23
|
+
Start `llama serve` without `--model`, `-m`, or `-hf`. Passing a model starts single-model mode instead of router mode. See the [llama.cpp server guide](https://llama.app/docs/serve#serving-multiple-models-router-mode) for router configuration.
|
|
10
24
|
|
|
11
25
|
```bash
|
|
12
|
-
llama
|
|
13
|
-
--models-dir ~/models \
|
|
26
|
+
llama serve \
|
|
14
27
|
--no-models-autoload \
|
|
15
|
-
|
|
16
|
-
--host 127.0.0.1 \
|
|
17
|
-
--port 8080 \
|
|
18
|
-
-ngl 999 \
|
|
28
|
+
-ngl all \
|
|
19
29
|
-c 32768
|
|
20
30
|
```
|
|
21
31
|
|
|
22
32
|
Important options:
|
|
23
33
|
|
|
24
|
-
- `--models-dir ~/models` discovers local GGUF files.
|
|
25
34
|
- `--no-models-autoload` keeps loading explicit through `/llama`.
|
|
26
|
-
-
|
|
27
|
-
- `-
|
|
28
|
-
- `-c 32768` sets the context window for each loaded model. Omit it to use the model's native context, which may require substantially more memory.
|
|
35
|
+
- `-ngl all` offloads all layers to the GPU. Omit it to use automatic GPU offloading.
|
|
36
|
+
- `-c 32768` sets the context size in tokens. Use `-c 0` for the model's full context window, which may require substantially more memory. Context is shared across parallel server slots.
|
|
29
37
|
|
|
30
38
|
A single-file model can sit directly in the model directory. Put multimodal and multi-shard models in separate subdirectories:
|
|
31
39
|
|
|
@@ -41,7 +49,7 @@ A single-file model can sit directly in the model directory. Put multimodal and
|
|
|
41
49
|
└── large-model-Q4_K_M-00003-of-00003.gguf
|
|
42
50
|
```
|
|
43
51
|
|
|
44
|
-
Restart the router after manually adding files.
|
|
52
|
+
Restart the router after manually adding files. The router also supports cached models and preset files via `--models-preset`, as described in the [server guide](https://llama.app/docs/serve#serving-multiple-models-router-mode).
|
|
45
53
|
|
|
46
54
|
## Configure draht
|
|
47
55
|
|
|
@@ -63,7 +71,7 @@ export LLAMA_API_KEY=optional-secret
|
|
|
63
71
|
draht
|
|
64
72
|
```
|
|
65
73
|
|
|
66
|
-
If the server uses an API key, start `llama
|
|
74
|
+
If the server uses an API key, start `llama serve` with the matching `--api-key` value. Keep `--host 127.0.0.1` for local-only access.
|
|
67
75
|
|
|
68
76
|
## Manage models
|
|
69
77
|
|
package/docs/message-types.md
CHANGED
|
@@ -140,7 +140,7 @@ interface AssistantMessage {
|
|
|
140
140
|
}
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
`responseModel` records
|
|
143
|
+
`responseModel` records the concrete model reported by the provider, when the provider reports one. It may equal the requested model. `responseId`, `providerThinkingLevel`, `thinkingLevel`, `diagnostics`, and `rawStopReason` preserve provider or runtime details.
|
|
144
144
|
|
|
145
145
|
`"pending"` is used for a partial assistant message while it streams. The completed message in `message_end` has a terminal stop reason, and draht does not persist `"pending"` assistant messages in session JSONL.
|
|
146
146
|
|
|
@@ -114,15 +114,16 @@ See [Describe model input and caching](models.md#describe-model-input-and-cachin
|
|
|
114
114
|
| `supportsDeveloperRole` | boolean | | Whether the provider supports the developer role instead of system. Default: auto-detected from URL. |
|
|
115
115
|
| `supportsReasoningEffort` | boolean | | Whether the provider supports reasoning_effort. Default: auto-detected from URL. |
|
|
116
116
|
| `supportsUsageInStreaming` | boolean | `true` | Whether the provider supports stream_options.include_usage for token usage in streaming responses. |
|
|
117
|
-
| `supportsFinishReason` | boolean | `true` | Whether streamed responses include finish_reason. When false,
|
|
117
|
+
| `supportsFinishReason` | boolean | `true` | Whether streamed responses include finish_reason. When false, draht infers stop or toolUse when the stream ends. |
|
|
118
118
|
| `maxTokensField` | `"max_completion_tokens" \| "max_tokens"` | | Which field to use for max tokens. Default: auto-detected from URL. |
|
|
119
119
|
| `requiresToolResultName` | boolean | | Whether tool results require the name field. Default: auto-detected from URL. |
|
|
120
120
|
| `requiresAssistantAfterToolResult` | boolean | | Whether a user message after tool results requires an assistant message in between. Default: auto-detected from URL. |
|
|
121
|
+
| `requiresNonNullAssistantContent` | boolean | | Whether replayed assistant messages with no text (e.g. tool-call-only messages) must send "" instead of null content. Default: false. |
|
|
121
122
|
| `requiresThinkingAsText` | boolean | | Whether thinking blocks must be converted to text blocks with <thinking> delimiters. Default: auto-detected from URL. |
|
|
122
123
|
| `requiresReasoningContentOnAssistantMessages` | boolean | | Whether all replayed assistant messages must include an empty reasoning_content field when reasoning is enabled. Default: auto-detected from URL. |
|
|
123
124
|
| `thinkingFormat` | `"openai" \| "openrouter" \| "deepseek" \| "together" \| "baseten" \| "zai" \| "qwen" \| "chat-template" \| "qwen-chat-template" \| "string-thinking" \| "ant-ling"` | | Format for reasoning or thinking parameters. When omitted, draht auto-detects the format from the provider URL. "openai" uses reasoning_effort, "openrouter" uses reasoning.effort, "deepseek" uses thinking.type plus reasoning_effort when supported, "together" uses reasoning.enabled plus reasoning_effort when supported, "baseten" uses configurable chat_template_args plus reasoning_effort when supported, "zai" uses thinking.type, "qwen" uses top-level enable_thinking, "qwen-chat-template" uses chat_template_kwargs.enable_thinking and preserve_thinking, "chat-template" uses configurable chat_template_kwargs, "string-thinking" uses top-level thinking, and "ant-ling" uses reasoning.effort only when the mapped effort is non-null. |
|
|
124
|
-
| `chatTemplateKwargs` | object | | Kwargs sent as chat_template_kwargs when thinkingFormat is "chat-template". Use $var with "thinking.enabled", "thinking.effort", or "thinking.budget" for
|
|
125
|
-
| `chatTemplateArgs` | object | | Arguments sent as chat_template_args when thinkingFormat is "baseten". Use $var with "thinking.enabled", "thinking.effort", or "thinking.budget" for
|
|
125
|
+
| `chatTemplateKwargs` | object | | Kwargs sent as chat_template_kwargs when thinkingFormat is "chat-template". Use $var with "thinking.enabled", "thinking.effort", or "thinking.budget" for draht-controlled values. |
|
|
126
|
+
| `chatTemplateArgs` | object | | Arguments sent as chat_template_args when thinkingFormat is "baseten". Use $var with "thinking.enabled", "thinking.effort", or "thinking.budget" for draht-controlled values. |
|
|
126
127
|
| `openRouterRouting` | object | | OpenRouter provider routing preferences. Controls which upstream providers OpenRouter routes requests to. Sent as the provider field in the OpenRouter API request body. See https://openrouter.ai/docs/guides/routing/provider-selection. |
|
|
127
128
|
| `vercelGatewayRouting` | object | | Vercel AI Gateway routing preferences. Controls which upstream providers the gateway routes requests to. See https://vercel.com/docs/ai-gateway/models-and-providers/provider-options. |
|
|
128
129
|
| `zaiToolStream` | boolean | `false` | Whether z.ai supports top-level tool_stream for streaming tool call deltas. |
|
|
@@ -135,6 +136,7 @@ See [Describe model input and caching](models.md#describe-model-input-and-cachin
|
|
|
135
136
|
| `cacheControlFormat` | `"anthropic"` | | Cache control convention for prompt caching. Anthropic applies cache_control markers to the system prompt, last tool definition, and last user, assistant, or tool-result text content. |
|
|
136
137
|
| `sendSessionAffinityHeaders` | boolean | | Whether to send session-affinity data from options.sessionId. Default: true for OpenRouter endpoints, false otherwise. |
|
|
137
138
|
| `sessionAffinityFormat` | `"openai" \| "openai-nosession" \| "openrouter"` | | Session-affinity header format. openai sends session_id, x-client-request-id, and x-session-affinity; openai-nosession sends x-client-request-id and x-session-affinity; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected. |
|
|
139
|
+
| `promptCacheKeyMode` | `"auto" \| "enabled" \| "disabled"` | | Controls the prompt_cache_key request field. auto sends it to api.openai.com, or with long cache retention when supportsLongCacheRetention is true; enabled sends it whenever caching is active, for compatible proxies; disabled never sends it. Default: auto. |
|
|
138
140
|
| `supportsLongCacheRetention` | boolean | | Whether the provider supports long prompt cache retention (prompt_cache_retention: "24h" or Anthropic-style cache_control.ttl: "1h", depending on format). Default: auto-detected from provider and URL. |
|
|
139
141
|
| `vllmPriority` | number | | vLLM scheduler priority sent as the top-level priority request field. Lower values are handled earlier and the server default is 0. Only meaningful with --scheduling-policy priority. Off by default and not set on the generated catalog. |
|
|
140
142
|
|
|
@@ -146,7 +148,8 @@ Also applies to `azure-openai-responses` and `openai-codex-responses`.
|
|
|
146
148
|
|---|---|---|---|
|
|
147
149
|
| `supportsDeveloperRole` | boolean | `true` | Whether the provider supports the developer role instead of system. |
|
|
148
150
|
| `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts developer or system messages after the conversation has started. When false, later system messages are folded into the leading system message. The generated catalog enables this for verified models. |
|
|
149
|
-
| `sessionAffinityFormat` | `"openai" \| "openai-nosession" \| "openrouter"` | | Session-affinity header format. openai sends
|
|
151
|
+
| `sessionAffinityFormat` | `"openai" \| "openai-nosession" \| "openrouter"` | | Session-affinity header format. openai sends session-id and x-client-request-id; openai-nosession sends x-client-request-id; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected. |
|
|
152
|
+
| `promptCacheKeyMode` | `"auto" \| "enabled" \| "disabled"` | | Controls the prompt_cache_key request field. auto and enabled send it whenever caching is active; disabled never sends it, for compatible proxies that reject it. Default: auto. |
|
|
150
153
|
| `supportsLongCacheRetention` | boolean | `true` | Whether the provider supports long prompt cache retention. This uses prompt_cache_options.ttl: "30m" on GPT-5.6+ and prompt_cache_retention: "24h" on earlier models. |
|
|
151
154
|
| `supportsStrictMode` | boolean | | Whether the provider supports strict JSON-schema function tools. Defaults are API-specific; generated OpenAI models enable it explicitly. |
|
|
152
155
|
| `supportsOpenAIGrammarTools` | boolean | `false` | Whether to emit OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools. The generated catalog enables this for capable models. |
|
|
@@ -172,6 +175,7 @@ Also applies to `azure-openai-responses` and `openai-codex-responses`.
|
|
|
172
175
|
| `supportsMidConvoEffort` | boolean | `false` | Whether the exact model transport supports effort-only system messages and thinking binding controls. |
|
|
173
176
|
| `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system-role messages inside the conversation. When false, later system messages are folded into the top-level system prompt. |
|
|
174
177
|
| `supportsMidConvoToolChanges` | boolean | `false` | Whether the exact model accepts mid-conversation tool_addition and tool_removal blocks. Requires supportsMidConvoSystemMessages. |
|
|
178
|
+
| `supportsMessageThreads` | boolean | | Whether the endpoint supports Anthropic message threads, which let a request with a session id send only the new messages and continue from the previous reply. Default: true for provider anthropic with a baseUrl on api.anthropic.com, false otherwise. Set true for gateways that forward the thread request field. |
|
|
175
179
|
| `allowedFallbackModels` | `object[]` | | Models Anthropic accepts for server-side refusal fallback, with local pricing metadata for returned fallback responses. When absent or empty, callers must omit fallbacks; Anthropic rejects the field for models with no permitted fallback targets. |
|
|
176
180
|
|
|
177
181
|
### `bedrock-converse-stream`
|
|
@@ -185,3 +189,12 @@ Also applies to `azure-openai-responses` and `openai-codex-responses`.
|
|
|
185
189
|
| Field | Type | Default | Description |
|
|
186
190
|
|---|---|---|---|
|
|
187
191
|
| `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system messages after the conversation has started. When false, later system messages are folded into the leading system message. |
|
|
192
|
+
|
|
193
|
+
### `typesafe-system-one`
|
|
194
|
+
|
|
195
|
+
Also applies to `cloudflare-workers-ai-system-one`.
|
|
196
|
+
|
|
197
|
+
| Field | Type | Default | Description |
|
|
198
|
+
|---|---|---|---|
|
|
199
|
+
| `imageInput` | `"assets" \| "images" \| "state-image-urls"` | | How the service takes classifier images. "assets" sends TypeSafe's assets map (PNG and JPEG) and references the images from the state, as TypeSafe and Jev on Workers AI expect. "images" sends Clef's images list of data URLs (PNG, JPEG, and WebP, at most four), as Clef on Workers AI expects. "state-image-urls" places image_url parts before the state, as OpenRouter expects; OpenRouter drops assets without an error. Auto-detected from the provider, baseUrl, and model ID. Classifier models read it from the provider-level compat; models and modelOverrides entries apply to chat models only. |
|
|
200
|
+
| `sendImageOptInHeader` | boolean | | Whether requests with images send the TypeSafe-Danger-Zone-Images: true header, which TypeSafe's own API requires for its experimental image input. Defaults to true for the typesafe-system-one API unless the model is detected as OpenRouter. |
|
package/docs/models.md
CHANGED
|
@@ -145,20 +145,21 @@ Compatibility settings should describe verified differences in the endpoint's re
|
|
|
145
145
|
|
|
146
146
|
## Use classifier models
|
|
147
147
|
|
|
148
|
-
Classifier models do not chat. They answer typed questions about JSON state: pick one of several choices, answer yes or no, or give a score, each with probabilities. draht includes TypeSafe's Jev model from these providers, Cloudflare's Clef and Clef
|
|
148
|
+
Classifier models do not chat. They answer typed questions about JSON state: pick one of several choices, answer yes or no, or give a score, each with probabilities. draht includes TypeSafe's Jev model from these providers, Cloudflare's Clef, Clef Flash, and Clef Omni models from Workers AI and OpenRouter, OpenAI's GPT-6 Luna through the [Decisions API](https://developers.openai.com/api/docs/guides/decisions), and Microsoft-Decision-1 through GitHub Copilot:
|
|
149
149
|
|
|
150
150
|
| Provider | Model IDs | Authentication |
|
|
151
151
|
|---|---|---|
|
|
152
152
|
| `typesafe` | `jev-latest` | `TYPESAFE_API_KEY` |
|
|
153
|
-
| `openrouter` | `typesafe/jev-1.13`, `~typesafe/jev-latest` | `OPENROUTER_API_KEY` or `/login` |
|
|
154
|
-
| `cloudflare-workers-ai` | `typesafe/jev`, `@cf/cloudflare/clef`, `@cf/cloudflare/clef-flash` | `CLOUDFLARE_API_KEY` and `CLOUDFLARE_ACCOUNT_ID` |
|
|
153
|
+
| `openrouter` | `typesafe/jev-1.13`, `typesafe/jev-1.14`, `~typesafe/jev-latest`, `cloudflare/clef`, `cloudflare/clef-flash`, `cloudflare/clef-omni` | `OPENROUTER_API_KEY` or `/login` |
|
|
154
|
+
| `cloudflare-workers-ai` | `typesafe/jev`, `typesafe/jev-1.14.0`, `@cf/cloudflare/clef`, `@cf/cloudflare/clef-flash`, `@cf/cloudflare/clef-omni` | `CLOUDFLARE_API_KEY` and `CLOUDFLARE_ACCOUNT_ID` |
|
|
155
155
|
| `vercel-ai-gateway` | `typesafe-ai/jev` | `AI_GATEWAY_API_KEY` |
|
|
156
156
|
| `opencode` | `jev-1.13`, `jev-1.13-free` | `OPENCODE_API_KEY` |
|
|
157
157
|
| `openai` | `gpt-6-luna` | `OPENAI_API_KEY` |
|
|
158
|
+
| `github-copilot` | `microsoft-decision-1` | `COPILOT_GITHUB_TOKEN` or `/login` |
|
|
158
159
|
|
|
159
160
|
Chat models on a [llama.cpp router](llama-cpp.md#classification) are also listed as classifier models.
|
|
160
161
|
|
|
161
|
-
OpenAI's Decisions API needs an API key. Sign in with ChatGPT credentials do not work with it, so `gpt-6-luna` is not listed as available while `openai` is logged in through `/login`, even when `OPENAI_API_KEY` is set; log out of `openai` to use the key.
|
|
162
|
+
OpenAI's Decisions API needs an API key. Sign in with ChatGPT credentials do not work with it, so `gpt-6-luna` is not listed as available while `openai` is logged in through `/login`, even when `OPENAI_API_KEY` is set; log out of `openai` to use the key. The API rejects inputs above 922K tokens, but requests that run longer than about five seconds, currently above roughly 600K input tokens, fail with a gateway timeout.
|
|
162
163
|
|
|
163
164
|
Classifier models do not appear in `/model`. The model reaches them through the [`codemode`](cli.md#enable-codemode) tool, which is off unless an MCP server turned it on. Enable it with `"defaultTools": ["+codemode"]` in [settings](settings.md#tools). Scripts then list classifier models with `models.getAvailableOfType("classifier")` and call `models.classify(model, { state, questions })`:
|
|
164
165
|
|
|
@@ -179,6 +180,10 @@ return result.answers;
|
|
|
179
180
|
|
|
180
181
|
[Codemode](codemode.md#classify) describes the question and answer types.
|
|
181
182
|
|
|
183
|
+
Classifier models whose `input` includes `"image"` also judge images passed in `images`; other classifier models return an error for them. Image input works with GPT-6 Luna, with Jev from `typesafe` and `cloudflare-workers-ai`, with Clef from `cloudflare-workers-ai`, and with the OpenRouter models whose catalog lists image input. Jev takes PNG and JPEG images, and image input is experimental on TypeSafe's own API. Clef takes PNG, JPEG, and WebP images, at most four per request. Jev from `vercel-ai-gateway` and `opencode` takes text only.
|
|
184
|
+
|
|
185
|
+
Each System One service takes images in its own request format, set by the model's `compat.imageInput`. Built-in models set it, so overriding a provider's `baseUrl` keeps it. A custom provider that proxies another service's classifiers sets it in its provider-level `compat` in `models.json` (see [System One compatibility](models-configuration.md#typesafe-system-one)). OpenRouter in particular answers requests in TypeSafe's format without an error but drops the images.
|
|
186
|
+
|
|
182
187
|
When the service reports token counts, as all System One services do, `result.usage` carries them with their cost. draht adds the usage of a script's classifier calls to the `codemode` tool result, so it counts toward the session cost in the footer and `/session`. The cost uses the model's catalog price; models without one, such as TypeSafe's direct `jev-latest`, report tokens at no cost.
|
|
183
188
|
|
|
184
189
|
Extensions call classifiers through `ctx.modelRegistry.classify()`, without codemode. [Virtual models](virtual-models.md#route-requests) can use them to route requests; see the `jev-router.ts` example.
|
package/docs/packages.md
CHANGED
|
@@ -16,6 +16,8 @@ draht install ./local-package
|
|
|
16
16
|
|
|
17
17
|
`draht list` shows configured packages. Use `draht remove <source>` to remove one and `draht update --extensions` to reconcile package installations. See [Command Line](cli.md#package-commands) for every package command and option.
|
|
18
18
|
|
|
19
|
+
If a configured package fails to install at startup, for example because npm cannot reach the registry, draht warns about it, skips that package's resources, and keeps running. draht tries to install it again on the next start or `/reload`. `draht install` and `draht update --extensions` still report the failure and exit non-zero.
|
|
20
|
+
|
|
19
21
|
Personal installs are written to `~/.draht/agent/settings.json`. Add `--local` or `-l` to write the package declaration to `.draht/settings.json`. draht reads declarations from that file only after project trust is granted.
|
|
20
22
|
|
|
21
23
|
Project packages are installed and loaded only after project trust is resolved. Packages can execute extension code and can include skills that instruct the model to run programs. Review third-party package source before installing it. Review project package declarations before granting project trust.
|
|
@@ -26,6 +28,8 @@ Use `--extension` or `-e` to try a package for one invocation without adding it
|
|
|
26
28
|
draht -e npm:@example/my-tools
|
|
27
29
|
```
|
|
28
30
|
|
|
31
|
+
draht caches `-e` packages under `~/.draht/agent/tmp/extensions/` and checks them on every start and `/reload`. An npm package is reinstalled when the registry has a newer version that matches the specification. A version pinned to an exact number, such as `@1.2.3`, is not checked. A git package is fetched and reset to the remote branch or ref. A ref that is a commit hash already checked out is not fetched. If the check fails or offline mode is on, draht loads the cached copy.
|
|
32
|
+
|
|
29
33
|
## Choose a source
|
|
30
34
|
|
|
31
35
|
| Source | Example | Behavior |
|
|
@@ -75,6 +79,26 @@ Paths are relative to the package root. Arrays accept glob patterns and exclusio
|
|
|
75
79
|
|
|
76
80
|
The `pi-package` keyword makes the package findable through npm search. draht has no package gallery of its own; optional `image` and `video` manifest fields are accepted but currently unused.
|
|
77
81
|
|
|
82
|
+
## Show a changelog
|
|
83
|
+
|
|
84
|
+
After a package update, draht can show what changed. On the next fresh launch, draht reads the package changelog and shows entries newer than the last seen version under "Extension Updates", the same way it shows its own changelog. The first time draht sees a package, it records the version without showing anything.
|
|
85
|
+
|
|
86
|
+
This applies to packages that load at least one extension. Packages that only provide skills, prompt templates, or themes do not show a changelog.
|
|
87
|
+
|
|
88
|
+
By default draht reads `CHANGELOG.md` from the package root. Point `draht.changelogPath` at another file inside the package, or set it to `""` to disable the changelog:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"name": "my-draht-package",
|
|
93
|
+
"version": "1.2.0",
|
|
94
|
+
"draht": {
|
|
95
|
+
"changelogPath": "./docs/CHANGELOG.md"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Use version headings in the same format as draht's changelog, such as `## [1.2.0]` or `## 1.2.0 - 2026-01-01`. Entries are matched against the `version` field in `package.json`, so a git package only shows a changelog when that field increases. The `collapseChangelog` setting condenses the section to one line per package, such as `Updated my-draht-package to v1.2.0.` Unlike draht's own changelog, `/changelog` does not show package changelogs, so read the package's changelog file or repository for details.
|
|
101
|
+
|
|
78
102
|
## Declare dependencies
|
|
79
103
|
|
|
80
104
|
Put runtime packages imported by extensions in `dependencies`. draht installs package dependencies when it installs an npm or git source.
|
package/docs/providers.md
CHANGED
|
@@ -66,7 +66,7 @@ This table covers providers with a single primary API-key variable. Providers th
|
|
|
66
66
|
| MiniMax (China) | `MINIMAX_CN_API_KEY` |
|
|
67
67
|
| Moonshot AI (Global and China) | `MOONSHOT_API_KEY` |
|
|
68
68
|
| Qwen Token Plan and Individual | `QWEN_TOKEN_PLAN_API_KEY` |
|
|
69
|
-
| Qwen Token Plan (China) | `QWEN_TOKEN_PLAN_CN_API_KEY` |
|
|
69
|
+
| Qwen Token Plan (China) and Individual (China) | `QWEN_TOKEN_PLAN_CN_API_KEY` |
|
|
70
70
|
| Xiaomi MiMo | `XIAOMI_API_KEY` |
|
|
71
71
|
| Xiaomi MiMo Token Plan (China) | `XIAOMI_TOKEN_PLAN_CN_API_KEY` |
|
|
72
72
|
| Xiaomi MiMo Token Plan (Amsterdam) | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` |
|
package/docs/rpc.md
CHANGED
|
@@ -92,7 +92,9 @@ Clients must also handle child-process startup failures, unexpected exits, stder
|
|
|
92
92
|
|
|
93
93
|
Close the child's stdin to request an orderly shutdown. draht disposes the active runtime before exiting. Clients should still handle process signals and unexpected exits.
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
SIGTERM and SIGHUP also start an orderly shutdown. Once a shutdown has started, from either stdin EOF or a signal, a stdin EOF or a single signal does not interrupt it; a second signal exits at once. Closing stdin and sending SIGTERM together is safe.
|
|
96
|
+
|
|
97
|
+
An extension can also request shutdown with `ctx.shutdown()`. If the session is idle and no command is being handled, draht shuts down right away. Otherwise it shuts down once the current command finishes (for `prompt`, once the prompt settles) or the active run emits `agent_settled`. (A request made while an extension-started compaction is running waits for the next command or run to finish.)
|
|
96
98
|
|
|
97
99
|
## Minimal client
|
|
98
100
|
|
package/docs/sessions.md
CHANGED
|
@@ -11,7 +11,17 @@ draht --continue
|
|
|
11
11
|
draht --resume
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
`--continue` opens the most recent session for the current
|
|
14
|
+
`--continue` opens the most recent session for the current directory. `--resume` opens the session picker. In interactive mode, `/resume` opens the same picker and `/new` starts a new session.
|
|
15
|
+
|
|
16
|
+
Each session records the working directory it was created in and never changes it. draht runs a session in its working directory, so tools, `@path` references, project configuration, and context files resolve from there.
|
|
17
|
+
|
|
18
|
+
| Entry point | Working directory |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `--continue` | The current directory |
|
|
21
|
+
| `--resume`, `/resume`, `--session`, `/import` | The session's working directory, which can differ from the current directory |
|
|
22
|
+
| `--fork`, or a `--session` ID from another directory that you choose to fork | The current directory, in a new session |
|
|
23
|
+
|
|
24
|
+
If a session's working directory no longer exists, interactive mode offers to run the session in the current directory instead. draht does not store that choice, so it asks again the next time you open the session. Other modes exit with an error.
|
|
15
25
|
|
|
16
26
|
Use `/name` or `--name` to assign a recognizable session name. Run `/session` to verify the current session file, ID, message count, token usage, and cost.
|
|
17
27
|
|
|
@@ -53,8 +63,6 @@ By default, draht stores sessions under `~/.draht/agent/sessions/`, grouped by w
|
|
|
53
63
|
|
|
54
64
|
Use `--no-session` for an ephemeral run. An ephemeral session cannot be resumed after draht exits.
|
|
55
65
|
|
|
56
|
-
Use `--session` when you already know the session path or ID. Use `--fork` to create a new session from an existing session before interactive mode starts.
|
|
57
|
-
|
|
58
66
|
## Export or share a session
|
|
59
67
|
|
|
60
68
|
Use `/export` to write the current session as HTML or JSONL. Use `/share` to upload it as a private GitHub gist through the `gh` CLI. draht shows the gist URL. If `DRAHT_SHARE_VIEWER_URL` is set, draht also shows a viewer link built from that base URL.
|
package/docs/settings.md
CHANGED
|
@@ -126,7 +126,7 @@ Checkpoints back `/rewind`. See [Checkpoint commands](cli.md#checkpoint-commands
|
|
|
126
126
|
| `showHardwareCursor` | boolean | `false` | Use the terminal cursor instead of draht's drawn cursor. draht still positions it for input methods. |
|
|
127
127
|
| `terminal.showImages` | boolean | `true` | Display inline images when supported. |
|
|
128
128
|
| `terminal.imageWidthCells` | number | `60` | Preferred inline image width in terminal cells. |
|
|
129
|
-
| `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when rendered content shrinks. |
|
|
129
|
+
| `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when rendered content shrinks. When unset, `DRAHT_CLEAR_ON_SHRINK=1` enables it. |
|
|
130
130
|
| `terminal.showTerminalProgress` | boolean | `false` | Show OSC 9;4 progress in the terminal tab. |
|
|
131
131
|
| `terminal.hyperlinks` | `boolean \| "auto"` | `"auto"` | Override OSC 8 hyperlink detection. |
|
|
132
132
|
| `terminal.images` | `"kitty" \| "iterm2" \| "auto" \| false` | `"auto"` | Override inline-image protocol detection. |
|
|
@@ -144,8 +144,8 @@ See [Themes](themes.md) and [Terminal Setup](terminal-setup.md) for format and p
|
|
|
144
144
|
|---|---|---|---|
|
|
145
145
|
| `transport` | `"auto" \| "sse" \| "websocket" \| "websocket-cached"` | `"auto"` | Preferred transport for AI providers that support multiple transports. |
|
|
146
146
|
| `httpProxy` | string | None | Proxy URL applied as `HTTP_PROXY` and `HTTPS_PROXY` for draht-managed HTTP clients. **Can only be set in agent-directory settings.** |
|
|
147
|
-
| `httpIdleTimeoutMs` | number | `300000` | HTTP header and body idle timeout in milliseconds. Set to `0` to disable. |
|
|
148
|
-
| `websocketConnectTimeoutMs` | number | `15000` | WebSocket connection timeout in milliseconds. Set to `0` to disable. |
|
|
147
|
+
| `httpIdleTimeoutMs` | number \| `"disabled"` | `300000` | HTTP header and body idle timeout in milliseconds. Set to `0` or `"disabled"` to disable. |
|
|
148
|
+
| `websocketConnectTimeoutMs` | number \| `"disabled"` | `15000` | WebSocket connection timeout in milliseconds. Set to `0` or `"disabled"` to disable. |
|
|
149
149
|
| `retry.enabled` | boolean | `true` | Enable automatic agent-level retry for transient failures. |
|
|
150
150
|
| `retry.maxRetries` | number | `3` | Maximum agent-level retry attempts. |
|
|
151
151
|
| `retry.baseDelayMs` | number | `2000` | Initial exponential-backoff delay in milliseconds. |
|
|
@@ -163,6 +163,7 @@ Keep `retry.provider.maxRetries` at `0` unless provider-level retries are requir
|
|
|
163
163
|
| `shellPath` | string | Platform default | Custom shell executable path. Supports a leading `~`. |
|
|
164
164
|
| `shellCommandPrefix` | string | None | Prefix prepended to every shell command. |
|
|
165
165
|
| `npmCommand` | `string[]` | `npm` | Command and arguments used for npm package lookup and installation. |
|
|
166
|
+
| `selfUpdateCommand` | `string[]` | None | Command and arguments `draht update` runs to update draht itself, with `{packageName}`, `{version}`, and `{installSpec}` placeholders. `DRAHT_SELF_UPDATE_COMMAND` takes precedence. **Can only be set in agent-directory settings.** See [Custom update command](cli.md#custom-update-command). |
|
|
166
167
|
|
|
167
168
|
See [Shell aliases](shell-aliases.md) for shell setup and [draht Packages](packages.md) for package-manager behavior.
|
|
168
169
|
|
|
@@ -187,7 +188,7 @@ The built-in extensions are named `builtin:mcp`, `builtin:llama.cpp`, `builtin:c
|
|
|
187
188
|
|
|
188
189
|
| Setting | Type | Default | Description |
|
|
189
190
|
|---|---|---|---|
|
|
190
|
-
| `collapseChangelog` | boolean | `false` | Show a condensed changelog after an update. |
|
|
191
|
+
| `collapseChangelog` | boolean | `false` | Show a condensed changelog after an update. Also condenses extension package changelogs to one line per package. |
|
|
191
192
|
| `enableInstallTelemetry` | boolean | `true` | Send draht attribution headers with OpenRouter, NVIDIA NIM, and Cloudflare provider requests. draht has no install-ping service. Does not control update checks. |
|
|
192
193
|
| `enableAnalytics` | boolean | `false` | Opt in to analytics data sharing. Currently used only by the experimental first-run setup. |
|
|
193
194
|
| `warnings.anthropicExtraUsage` | boolean | `true` | Warn when Anthropic subscription authentication may use paid extra usage. |
|
package/docs/slash-commands.md
CHANGED
|
@@ -21,7 +21,7 @@ Extensions, prompt templates, and skills can add commands. The command menu in d
|
|
|
21
21
|
| Command | Description |
|
|
22
22
|
|---|---|
|
|
23
23
|
| `/new` | Start a new session |
|
|
24
|
-
| `/resume` |
|
|
24
|
+
| `/resume` | Resume another session |
|
|
25
25
|
| `/name [name]` | Set the session display name, or show the current name when omitted |
|
|
26
26
|
| `/session` | Show current session information and statistics |
|
|
27
27
|
| `/tree` | Navigate the session tree |
|
|
@@ -29,7 +29,7 @@ Extensions, prompt templates, and skills can add commands. The command menu in d
|
|
|
29
29
|
| `/clone` | Duplicate the current session at its current position |
|
|
30
30
|
| `/rewind` | Rewind the conversation, the files, or both to an earlier checkpoint |
|
|
31
31
|
| `/compact [instructions]` | Compact the current context, optionally with custom instructions |
|
|
32
|
-
| `/import <path>` | Import
|
|
32
|
+
| `/import <path>` | Import a JSONL session, preserving its ID and working directory |
|
|
33
33
|
|
|
34
34
|
## Export and share
|
|
35
35
|
|
|
@@ -48,6 +48,7 @@ Review a session before exporting or sharing it. Sessions can contain prompts, t
|
|
|
48
48
|
|---|---|
|
|
49
49
|
| `/trust` | Save a project trust decision for future draht processes |
|
|
50
50
|
| [`/budget [configure\|status\|new]`](budgets.md) | Configure the repository's token budgets, show usage, or start a new budget task |
|
|
51
|
+
| `/mcp` | Manage MCP servers: sign in, reconnect, enable or disable, and change exposure |
|
|
51
52
|
| `/reload` | Reload keybindings, extensions, skills, templates, themes, and context files |
|
|
52
53
|
| `/hotkeys` | Show active keyboard shortcuts |
|
|
53
54
|
| `/changelog` | Show changelog entries |
|
package/docs/terminal-setup.md
CHANGED
|
@@ -59,7 +59,7 @@ This is an iTerm2-wide setting and can also change native trackpad scrolling. Th
|
|
|
59
59
|
|
|
60
60
|
## Apple Terminal
|
|
61
61
|
|
|
62
|
-
draht enables enhanced key reporting when available. If Terminal.app still sends plain Return for `Shift+Enter`, draht uses a local macOS modifier fallback and treats it as `Shift+Enter`.
|
|
62
|
+
draht enables enhanced key reporting when available. If Terminal.app still sends plain Return or `ESC` + Return for `Shift+Enter`, draht uses a local macOS modifier fallback and treats it as `Shift+Enter`. `ESC` + Return without Shift held remains `Alt+Enter`.
|
|
63
63
|
|
|
64
64
|
The fallback works only when draht runs on the same Mac as Terminal.app. It cannot inspect the local modifier state when draht runs on another machine over SSH.
|
|
65
65
|
|
|
@@ -189,6 +189,8 @@ Windows Terminal uses draht's Windows and WSL shortcut defaults. See [Keybinding
|
|
|
189
189
|
|
|
190
190
|
### Forward Shift+Enter
|
|
191
191
|
|
|
192
|
+
When draht runs natively on Windows, it checks the local Shift key state and treats plain Return or `ESC` + Return as `Shift+Enter` while Shift is held. This fallback does not work in WSL or over SSH. If `Shift+Enter` still submits, forward it explicitly.
|
|
193
|
+
|
|
192
194
|
Open Windows Terminal's `settings.json` with `Ctrl+Shift+,` or **Settings > Open JSON file**. Add this object to its `actions` array:
|
|
193
195
|
|
|
194
196
|
```json
|
package/docs/tmux.md
CHANGED
|
@@ -53,3 +53,9 @@ set -g extended-keys on
|
|
|
53
53
|
draht supports the xterm `modifyOtherKeys` format used by these versions. Restart tmux and repeat the verification steps.
|
|
54
54
|
|
|
55
55
|
For older versions, upgrade tmux or use draht outside tmux rather than relying on modified Enter shortcuts.
|
|
56
|
+
|
|
57
|
+
## Known issues
|
|
58
|
+
|
|
59
|
+
| Issue | Affects | Remedy |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| Text such as `c0c/0c0c/0c0c` appears in the editor at startup ([tmux#4749](https://github.com/tmux/tmux/issues/4749)) | tmux 3.6 | Upgrade tmux. Changing draht's theme does not help. |
|
package/docs/tui.md
CHANGED
|
@@ -135,6 +135,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
135
135
|
|
|
136
136
|
This component does not display a text cursor, so it does not need `Focusable`. A component containing `Input` or `Editor` must implement `Focusable` and propagate its `focused` value to that child.
|
|
137
137
|
|
|
138
|
+
Custom components do not report draht as waiting for the user, because `ctx.ui.custom()` also hosts loaders and other non-blocking UI. When an inline component waits for an answer, pass `blocked: { kind: "question", message: "Pick a color" }` so terminals that support [program status](terminal-setup.md#program-status) show draht as blocked while the component is visible. `kind` is `"question"`, `"permission"`, or `"auth"`. Overlays ignore this option.
|
|
139
|
+
|
|
138
140
|
Pass `overlay: true` to draw above existing content. Overlay options control size, anchors, offsets, margins, and responsive visibility. An overlay handle can change focus or temporarily hide and show the overlay with `setHidden()` while the interaction remains active.
|
|
139
141
|
|
|
140
142
|
Focused overlays retain input ownership across ordinary renders. If another component should receive input while an overlay remains visible, explicitly release or redirect focus through the handle.
|
package/docs/windows.md
CHANGED
|
@@ -76,6 +76,33 @@ JSON uses backslashes for escape sequences. When you write a Windows path with b
|
|
|
76
76
|
|
|
77
77
|
See [Configure shell commands](shell-aliases.md) for command prefixes, aliases, and the complete shell-resolution behavior.
|
|
78
78
|
|
|
79
|
+
## Choose a terminal
|
|
80
|
+
|
|
81
|
+
Windows terminals run draht through a console host (conhost). Some bundle an up-to-date copy; others use the older one built into Windows, which has bugs that affect draht.
|
|
82
|
+
|
|
83
|
+
We recommend [Windows Terminal](https://aka.ms/terminal). It always ships an up-to-date conhost, and draht is best tested with it.
|
|
84
|
+
|
|
85
|
+
Last updated: October 2026.
|
|
86
|
+
|
|
87
|
+
| Terminal | Conhost | Status |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| [Windows Terminal](https://aka.ms/terminal) | Bundled, current | Recommended |
|
|
90
|
+
| [VS Code](https://code.visualstudio.com), [Tabby](https://tabby.sh), [WezTerm](https://wezterm.org) nightly | Bundled, current | Works |
|
|
91
|
+
| [Alacritty](https://alacritty.org) | Built-in, unless `conpty.dll` and `OpenConsole.exe` from Windows Terminal are next to `alacritty.exe` | Works only with those files |
|
|
92
|
+
| WezTerm 20240203 and older | Bundled, old | [Known issues](#known-issues) |
|
|
93
|
+
| Classic console (`cmd.exe` or PowerShell without Windows Terminal), mintty (Git Bash), ConEmu, Cmder, [Hyper](https://hyper.is), Windows OpenSSH | Built-in | [Known issues](#known-issues) |
|
|
94
|
+
|
|
79
95
|
## Configure Windows Terminal
|
|
80
96
|
|
|
81
97
|
Windows Terminal reserves or rewrites some modified keys. See [Windows Terminal](terminal-setup.md#windows-terminal) to configure `Shift+Enter` and `Alt+Enter`, and [Keybindings](keybindings.md) for draht's Windows and WSL shortcut defaults.
|
|
98
|
+
|
|
99
|
+
## Known issues
|
|
100
|
+
|
|
101
|
+
These issues come from conhost. Microsoft has fixed them in its source, but has not said when the built-in conhost will get the fixes.
|
|
102
|
+
|
|
103
|
+
| Issue | Affects | Remedy |
|
|
104
|
+
|---|---|---|
|
|
105
|
+
| Switching from fullscreen to regular mode, or `Ctrl+G` from fullscreen, crashes the session ([badlogic/pi-mono#9186](https://github.com/badlogic/pi-mono/issues/9186), [microsoft/terminal#17515](https://github.com/microsoft/terminal/issues/17515)) | Built-in conhost | Use a terminal with a current conhost, or start draht with `--tui-mode regular` |
|
|
106
|
+
| Text such as `;0;rgb:0000/0000/0000` appears in the prompt, and BEL opens the external editor ([badlogic/pi-mono#10256](https://github.com/badlogic/pi-mono/issues/10256)) | Built-in conhost behind another terminal: mintty, Windows OpenSSH | Use a terminal with a current conhost |
|
|
107
|
+
| Fragments such as `79` or `55` appear in the prompt ([badlogic/pi-mono#10717](https://github.com/badlogic/pi-mono/issues/10717)) | WezTerm 20240203 | Use WezTerm nightly |
|
|
108
|
+
| In regular mode, each keystroke redraws the input line on a new row ([badlogic/pi-mono#6300](https://github.com/badlogic/pi-mono/issues/6300)) | Built-in conhost, classic console | Use fullscreen mode (the default), or a terminal with a current conhost |
|
|
@@ -94,7 +94,6 @@ async function initializeTools(api: ExtensionAPI) {
|
|
|
94
94
|
createGrepToolDefinition(workspace, {
|
|
95
95
|
operations: {
|
|
96
96
|
isDirectory: async (path) => (await isolation.fs({ op: "stat", path })).isDirectory,
|
|
97
|
-
readFile: async (path) => (await readFile(path)).toString("utf8"),
|
|
98
97
|
spawn: (args) => {
|
|
99
98
|
const child = isolation.spawn([isolation.resolveExecutable("rg"), ...args]);
|
|
100
99
|
child.stdin.end();
|
|
@@ -31,7 +31,7 @@ import { mkdir, writeFile } from "node:fs/promises";
|
|
|
31
31
|
import { join } from "node:path";
|
|
32
32
|
import { StringEnum } from "@draht/ai";
|
|
33
33
|
import { type ExtensionAPI, getAgentDir, withFileMutationQueue } from "@draht/coding-agent";
|
|
34
|
-
import { type Static, Type } from "
|
|
34
|
+
import { type Static, Type } from "typebox";
|
|
35
35
|
|
|
36
36
|
const PROVIDER = "google-antigravity";
|
|
37
37
|
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
type TextContent,
|
|
43
43
|
type ThinkingContent,
|
|
44
44
|
type Tool,
|
|
45
|
-
|
|
45
|
+
ToolCallArgumentsStream,
|
|
46
46
|
type ToolResultMessage,
|
|
47
47
|
type TranscriptContext,
|
|
48
48
|
} from "@draht/ai";
|
|
@@ -454,8 +454,9 @@ function streamCustomAnthropic(
|
|
|
454
454
|
const anthropicStream = client.messages.stream({ ...params }, { signal: options?.signal });
|
|
455
455
|
stream.push({ type: "start", partial: output });
|
|
456
456
|
|
|
457
|
-
|
|
458
|
-
|
|
457
|
+
// Stream state per Anthropic block index, kept off the content blocks so it never reaches partial messages.
|
|
458
|
+
// ToolCallArgumentsStream reads each argument delta once and shows the arguments parsed so far.
|
|
459
|
+
const openBlocks = new Map<number, { contentIndex: number; arguments?: ToolCallArgumentsStream }>();
|
|
459
460
|
|
|
460
461
|
for await (const event of anthropicStream) {
|
|
461
462
|
if (event.type === "message_start") {
|
|
@@ -468,15 +469,12 @@ function streamCustomAnthropic(
|
|
|
468
469
|
calculateCost(model, output.usage);
|
|
469
470
|
} else if (event.type === "content_block_start") {
|
|
470
471
|
if (event.content_block.type === "text") {
|
|
471
|
-
output.content.push({ type: "text", text: ""
|
|
472
|
+
output.content.push({ type: "text", text: "" });
|
|
473
|
+
openBlocks.set(event.index, { contentIndex: output.content.length - 1 });
|
|
472
474
|
stream.push({ type: "text_start", contentIndex: output.content.length - 1, partial: output });
|
|
473
475
|
} else if (event.content_block.type === "thinking") {
|
|
474
|
-
output.content.push({
|
|
475
|
-
|
|
476
|
-
thinking: "",
|
|
477
|
-
thinkingSignature: "",
|
|
478
|
-
index: event.index,
|
|
479
|
-
} as any);
|
|
476
|
+
output.content.push({ type: "thinking", thinking: "", thinkingSignature: "" });
|
|
477
|
+
openBlocks.set(event.index, { contentIndex: output.content.length - 1 });
|
|
480
478
|
stream.push({ type: "thinking_start", contentIndex: output.content.length - 1, partial: output });
|
|
481
479
|
} else if (event.content_block.type === "tool_use") {
|
|
482
480
|
output.content.push({
|
|
@@ -484,15 +482,18 @@ function streamCustomAnthropic(
|
|
|
484
482
|
id: event.content_block.id,
|
|
485
483
|
name: isOAuth ? fromClaudeCodeName(event.content_block.name, tools) : event.content_block.name,
|
|
486
484
|
arguments: {},
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
485
|
+
});
|
|
486
|
+
openBlocks.set(event.index, {
|
|
487
|
+
contentIndex: output.content.length - 1,
|
|
488
|
+
arguments: new ToolCallArgumentsStream(),
|
|
489
|
+
});
|
|
490
490
|
stream.push({ type: "toolcall_start", contentIndex: output.content.length - 1, partial: output });
|
|
491
491
|
}
|
|
492
492
|
} else if (event.type === "content_block_delta") {
|
|
493
|
-
const
|
|
494
|
-
|
|
495
|
-
|
|
493
|
+
const open = openBlocks.get(event.index);
|
|
494
|
+
if (!open) continue;
|
|
495
|
+
const index = open.contentIndex;
|
|
496
|
+
const block = output.content[index]!;
|
|
496
497
|
|
|
497
498
|
if (event.delta.type === "text_delta" && block.type === "text") {
|
|
498
499
|
block.text += event.delta.text;
|
|
@@ -505,11 +506,8 @@ function streamCustomAnthropic(
|
|
|
505
506
|
delta: event.delta.thinking,
|
|
506
507
|
partial: output,
|
|
507
508
|
});
|
|
508
|
-
} else if (event.delta.type === "input_json_delta" && block.type === "toolCall") {
|
|
509
|
-
|
|
510
|
-
try {
|
|
511
|
-
block.arguments = JSON.parse((block as any).partialJson);
|
|
512
|
-
} catch {}
|
|
509
|
+
} else if (event.delta.type === "input_json_delta" && block.type === "toolCall" && open.arguments) {
|
|
510
|
+
block.arguments = open.arguments.append(event.delta.partial_json);
|
|
513
511
|
stream.push({
|
|
514
512
|
type: "toolcall_delta",
|
|
515
513
|
contentIndex: index,
|
|
@@ -520,20 +518,19 @@ function streamCustomAnthropic(
|
|
|
520
518
|
block.thinkingSignature = (block.thinkingSignature || "") + (event.delta as any).signature;
|
|
521
519
|
}
|
|
522
520
|
} else if (event.type === "content_block_stop") {
|
|
523
|
-
const
|
|
524
|
-
|
|
525
|
-
|
|
521
|
+
const open = openBlocks.get(event.index);
|
|
522
|
+
if (!open) continue;
|
|
523
|
+
openBlocks.delete(event.index);
|
|
524
|
+
const index = open.contentIndex;
|
|
525
|
+
const block = output.content[index]!;
|
|
526
526
|
|
|
527
|
-
delete (block as any).index;
|
|
528
527
|
if (block.type === "text") {
|
|
529
528
|
stream.push({ type: "text_end", contentIndex: index, content: block.text, partial: output });
|
|
530
529
|
} else if (block.type === "thinking") {
|
|
531
530
|
stream.push({ type: "thinking_end", contentIndex: index, content: block.thinking, partial: output });
|
|
532
|
-
} else if (block.type === "toolCall") {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
} catch {}
|
|
536
|
-
delete (block as any).partialJson;
|
|
531
|
+
} else if (block.type === "toolCall" && open.arguments) {
|
|
532
|
+
// One full parse of the complete text; malformed arguments are reported in `argumentsError`.
|
|
533
|
+
Object.assign(block, open.arguments.finish());
|
|
537
534
|
stream.push({ type: "toolcall_end", contentIndex: index, toolCall: block, partial: output });
|
|
538
535
|
}
|
|
539
536
|
} else if (event.type === "message_delta") {
|
|
@@ -563,7 +560,6 @@ function streamCustomAnthropic(
|
|
|
563
560
|
stream.push({ type: "done", reason: output.stopReason, message: output });
|
|
564
561
|
stream.end();
|
|
565
562
|
} catch (error) {
|
|
566
|
-
for (const block of output.content) delete (block as any).index;
|
|
567
563
|
output.stopReason = options?.signal?.aborted ? "aborted" : "error";
|
|
568
564
|
output.errorMessage = error instanceof Error ? error.message : JSON.stringify(error);
|
|
569
565
|
stream.push({ type: "error", reason: output.stopReason, error: output });
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* as expandable custom entries.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import type { ExtensionAPI } from "@draht/coding-agent";
|
|
10
10
|
import { Box, Text } from "@draht/tui";
|
|
11
11
|
|
|
12
12
|
const ENTRY_TYPE = "debug-provider-events";
|
|
@@ -24,7 +24,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
24
24
|
let activeEvents: unknown[] | undefined;
|
|
25
25
|
let completedEntry: ProviderDebugEntry | undefined;
|
|
26
26
|
|
|
27
|
-
pi.registerEntryRenderer<ProviderDebugEntry>(ENTRY_TYPE, (entry, { expanded }, theme) => {
|
|
27
|
+
pi.registerEntryRenderer<ProviderDebugEntry>(ENTRY_TYPE, (entry, { expanded, keyHint }, theme) => {
|
|
28
28
|
const data = entry.data;
|
|
29
29
|
if (!data) return new Text(theme.fg("warning", "[provider debug] Missing event data"), 0, 0);
|
|
30
30
|
|