@draht/coding-agent 2026.9.5-1 → 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.
Files changed (1012) hide show
  1. package/CHANGELOG.md +452 -0
  2. package/dist/bun/cli.d.ts +1 -1
  3. package/dist/bun/cli.d.ts.map +1 -1
  4. package/dist/bun/cli.js +6 -3
  5. package/dist/bun/cli.js.map +1 -1
  6. package/dist/bun/sandbox-env-setup.d.ts +2 -0
  7. package/dist/bun/sandbox-env-setup.d.ts.map +1 -0
  8. package/dist/bun/sandbox-env-setup.js +4 -0
  9. package/dist/bun/sandbox-env-setup.js.map +1 -0
  10. package/dist/bundle/chunks/anthropic-messages-GAKYXF65.js +6 -0
  11. package/dist/bundle/chunks/anthropic.js +75 -0
  12. package/dist/bundle/chunks/azure-openai-responses-ZIXMK6JO.js +2 -0
  13. package/dist/bundle/chunks/bedrock-converse-stream.js +79 -0
  14. package/dist/bundle/chunks/chunk-2E5VODES.js +2 -0
  15. package/dist/bundle/chunks/chunk-2FBJKY7F.js +2 -0
  16. package/dist/bundle/chunks/chunk-2N4I6WXC.js +2 -0
  17. package/dist/bundle/chunks/chunk-5VZWYVZB.js +82 -0
  18. package/dist/bundle/chunks/chunk-63BK6WK2.js +2 -0
  19. package/dist/bundle/chunks/chunk-6MSE6LZ3.js +6 -0
  20. package/dist/bundle/chunks/chunk-6ZJKIMU7.js +2 -0
  21. package/dist/bundle/chunks/chunk-736QBNUZ.js +12 -0
  22. package/dist/bundle/chunks/chunk-BXSHCX3G.js +11 -0
  23. package/dist/bundle/chunks/chunk-CEJJ5XF2.js +170 -0
  24. package/dist/bundle/chunks/chunk-COF5JT7R.js +4 -0
  25. package/dist/bundle/chunks/chunk-D6TMD5Q2.js +44 -0
  26. package/dist/bundle/chunks/chunk-DPE4ALPU.js +146 -0
  27. package/dist/bundle/chunks/chunk-EBVYI75P.js +2 -0
  28. package/dist/bundle/chunks/chunk-GVXA72ZA.js +2 -0
  29. package/dist/bundle/chunks/chunk-H6FT43VC.js +137 -0
  30. package/dist/bundle/chunks/chunk-HJ72RANT.js +2 -0
  31. package/dist/bundle/chunks/chunk-HTJ3L72O.js +2 -0
  32. package/dist/bundle/chunks/chunk-HZ2UHMBT.js +2 -0
  33. package/dist/bundle/chunks/chunk-I5OKY6RH.js +11 -0
  34. package/dist/bundle/chunks/chunk-IWTUBX6V.js +4 -0
  35. package/dist/bundle/chunks/chunk-KPO5375S.js +2 -0
  36. package/dist/bundle/chunks/chunk-KVH4HR57.js +31 -0
  37. package/dist/bundle/chunks/chunk-LDAOC5RB.js +18 -0
  38. package/dist/bundle/chunks/chunk-ON6XU6AG.js +2 -0
  39. package/dist/bundle/chunks/chunk-QMN7OD6G.js +2 -0
  40. package/dist/bundle/chunks/chunk-RZKPFWMH.js +42 -0
  41. package/dist/bundle/chunks/chunk-SDRCE6OP.js +2 -0
  42. package/dist/bundle/chunks/chunk-SVNWI7EV.js +8 -0
  43. package/dist/bundle/chunks/chunk-TIA2T6EO.js +3 -0
  44. package/dist/bundle/chunks/chunk-VOFPZOUQ.js +1472 -0
  45. package/dist/bundle/chunks/chunk-XBUEMKIY.js +2 -0
  46. package/dist/bundle/chunks/chunk-XOGEYN4Q.js +2 -0
  47. package/dist/bundle/chunks/chunk-ZZD35WKM.js +2 -0
  48. package/dist/bundle/chunks/cli-SR5QBZH4.js +51 -0
  49. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-MJKOAE5S.js +2 -0
  50. package/dist/bundle/chunks/codemode-worker.js +315 -0
  51. package/dist/bundle/chunks/execute-VCYDHEYA.js +328 -0
  52. package/dist/bundle/chunks/github-copilot.js +2 -0
  53. package/dist/bundle/chunks/google-antigravity.js +75 -0
  54. package/dist/bundle/chunks/google-gemini-cli.js +75 -0
  55. package/dist/bundle/chunks/google-generative-ai-RPUPQ6PM.js +2 -0
  56. package/dist/bundle/chunks/google-vertex-EZES5QVQ.js +2 -0
  57. package/dist/bundle/chunks/https-proxy-agent-O2PVUIOI.js +13 -0
  58. package/dist/bundle/chunks/image-resize-worker.js +2 -0
  59. package/dist/bundle/chunks/jiti-loader-RKXLMQV2.js +2 -0
  60. package/dist/bundle/chunks/kimi-coding.js +2 -0
  61. package/dist/bundle/chunks/lib-XOG5PI3Y.js +9 -0
  62. package/dist/bundle/chunks/llama-cpp-classify-EJ5XMSQL.js +22 -0
  63. package/dist/bundle/chunks/meta.js +2 -0
  64. package/dist/bundle/chunks/mistral-conversations-AOYGU43Y.js +5 -0
  65. package/dist/bundle/chunks/multipart-parser-AZP5BX2W.js +3 -0
  66. package/dist/bundle/chunks/node-C2JGH2OB.js +2 -0
  67. package/dist/bundle/chunks/node-LQ52KV6B.js +16 -0
  68. package/dist/bundle/chunks/openai-chatgpt.js +75 -0
  69. package/dist/bundle/chunks/openai-codex-responses-M2Y77JEQ.js +10 -0
  70. package/dist/bundle/chunks/openai-codex.js +75 -0
  71. package/dist/bundle/chunks/openai-completions-A4OKYOYV.js +7 -0
  72. package/dist/bundle/chunks/openai-responses-6IXV53T3.js +3 -0
  73. package/dist/bundle/chunks/opencode-go.js +2 -0
  74. package/dist/bundle/chunks/openrouter-images-LYV4NKFM.js +2 -0
  75. package/dist/bundle/chunks/openrouter.js +75 -0
  76. package/dist/bundle/chunks/pi-messages-KKMEUT3Z.js +8 -0
  77. package/dist/bundle/chunks/radius.js +75 -0
  78. package/dist/bundle/chunks/runtime-6YJPGSP7.js +2 -0
  79. package/dist/bundle/chunks/settings-manager-D2EG7WDO.js +2 -0
  80. package/dist/bundle/chunks/src-TIBHS42X.js +4 -0
  81. package/dist/bundle/chunks/typesafe-system-one-YBEEY5XU.js +2 -0
  82. package/dist/bundle/chunks/virtual-modules-CBOAFAFT.js +2 -0
  83. package/dist/bundle/chunks/xai.js +75 -0
  84. package/dist/bundle/cli-runtime.js +3 -0
  85. package/dist/bundle/cli.js +5 -0
  86. package/dist/bundle/index.js +2 -0
  87. package/dist/bundle/rpc-entry.js +3 -0
  88. package/dist/cli/args.d.ts +4 -0
  89. package/dist/cli/args.d.ts.map +1 -1
  90. package/dist/cli/args.js +72 -21
  91. package/dist/cli/args.js.map +1 -1
  92. package/dist/cli/auth-check.d.ts +19 -0
  93. package/dist/cli/auth-check.d.ts.map +1 -0
  94. package/dist/cli/auth-check.js +50 -0
  95. package/dist/cli/auth-check.js.map +1 -0
  96. package/dist/cli/auth-command.d.ts +24 -0
  97. package/dist/cli/auth-command.d.ts.map +1 -0
  98. package/dist/cli/auth-command.js +103 -0
  99. package/dist/cli/auth-command.js.map +1 -0
  100. package/dist/cli/config-selector.d.ts.map +1 -1
  101. package/dist/cli/config-selector.js +3 -2
  102. package/dist/cli/config-selector.js.map +1 -1
  103. package/dist/cli/credential-print.d.ts +5 -3
  104. package/dist/cli/credential-print.d.ts.map +1 -1
  105. package/dist/cli/credential-print.js +42 -30
  106. package/dist/cli/credential-print.js.map +1 -1
  107. package/dist/cli/file-processor.d.ts +1 -1
  108. package/dist/cli/file-processor.d.ts.map +1 -1
  109. package/dist/cli/file-processor.js +2 -1
  110. package/dist/cli/file-processor.js.map +1 -1
  111. package/dist/cli/list-models.d.ts +1 -1
  112. package/dist/cli/list-models.d.ts.map +1 -1
  113. package/dist/cli/list-models.js +2 -2
  114. package/dist/cli/list-models.js.map +1 -1
  115. package/dist/cli/session-picker.d.ts +1 -1
  116. package/dist/cli/session-picker.d.ts.map +1 -1
  117. package/dist/cli/session-picker.js.map +1 -1
  118. package/dist/cli/setup.d.ts +2 -0
  119. package/dist/cli/setup.d.ts.map +1 -0
  120. package/dist/cli/setup.js +12 -0
  121. package/dist/cli/setup.js.map +1 -0
  122. package/dist/cli/startup-ui.d.ts +2 -2
  123. package/dist/cli/startup-ui.d.ts.map +1 -1
  124. package/dist/cli/startup-ui.js +42 -33
  125. package/dist/cli/startup-ui.js.map +1 -1
  126. package/dist/cli.js +3 -12
  127. package/dist/cli.js.map +1 -1
  128. package/dist/config.d.ts +20 -4
  129. package/dist/config.d.ts.map +1 -1
  130. package/dist/config.js +42 -6
  131. package/dist/config.js.map +1 -1
  132. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  133. package/dist/core/agent-session-runtime.js +12 -3
  134. package/dist/core/agent-session-runtime.js.map +1 -1
  135. package/dist/core/agent-session-services.d.ts +1 -0
  136. package/dist/core/agent-session-services.d.ts.map +1 -1
  137. package/dist/core/agent-session-services.js +14 -0
  138. package/dist/core/agent-session-services.js.map +1 -1
  139. package/dist/core/agent-session.d.ts +237 -39
  140. package/dist/core/agent-session.d.ts.map +1 -1
  141. package/dist/core/agent-session.js +1386 -565
  142. package/dist/core/agent-session.js.map +1 -1
  143. package/dist/core/auth-storage.d.ts +20 -8
  144. package/dist/core/auth-storage.d.ts.map +1 -1
  145. package/dist/core/auth-storage.js +199 -56
  146. package/dist/core/auth-storage.js.map +1 -1
  147. package/dist/core/bug-report-upload.d.ts +11 -0
  148. package/dist/core/bug-report-upload.d.ts.map +1 -0
  149. package/dist/core/bug-report-upload.js +20 -0
  150. package/dist/core/bug-report-upload.js.map +1 -0
  151. package/dist/core/bug-report.d.ts +176 -0
  152. package/dist/core/bug-report.d.ts.map +1 -0
  153. package/dist/core/bug-report.js +292 -0
  154. package/dist/core/bug-report.js.map +1 -0
  155. package/dist/core/builtins/duet.js +2 -2
  156. package/dist/core/builtins/duet.js.map +1 -1
  157. package/dist/core/cache-stats.d.ts.map +1 -1
  158. package/dist/core/cache-stats.js +12 -1
  159. package/dist/core/cache-stats.js.map +1 -1
  160. package/dist/core/cache-warmer.d.ts +103 -0
  161. package/dist/core/cache-warmer.d.ts.map +1 -0
  162. package/dist/core/cache-warmer.js +356 -0
  163. package/dist/core/cache-warmer.js.map +1 -0
  164. package/dist/core/checkpoints/checkpoint-manager.d.ts +8 -4
  165. package/dist/core/checkpoints/checkpoint-manager.d.ts.map +1 -1
  166. package/dist/core/checkpoints/checkpoint-manager.js +46 -10
  167. package/dist/core/checkpoints/checkpoint-manager.js.map +1 -1
  168. package/dist/core/checkpoints/rewind.d.ts +4 -2
  169. package/dist/core/checkpoints/rewind.d.ts.map +1 -1
  170. package/dist/core/checkpoints/rewind.js +4 -3
  171. package/dist/core/checkpoints/rewind.js.map +1 -1
  172. package/dist/core/compaction/branch-summarization.js +2 -2
  173. package/dist/core/compaction/branch-summarization.js.map +1 -1
  174. package/dist/core/compaction/compaction.d.ts +9 -6
  175. package/dist/core/compaction/compaction.d.ts.map +1 -1
  176. package/dist/core/compaction/compaction.js +196 -118
  177. package/dist/core/compaction/compaction.js.map +1 -1
  178. package/dist/core/compaction/utils.d.ts +2 -1
  179. package/dist/core/compaction/utils.d.ts.map +1 -1
  180. package/dist/core/compaction/utils.js +25 -18
  181. package/dist/core/compaction/utils.js.map +1 -1
  182. package/dist/core/crash-log.d.ts +27 -0
  183. package/dist/core/crash-log.d.ts.map +1 -0
  184. package/dist/core/crash-log.js +140 -0
  185. package/dist/core/crash-log.js.map +1 -0
  186. package/dist/core/defaults.d.ts +1 -0
  187. package/dist/core/defaults.d.ts.map +1 -1
  188. package/dist/core/defaults.js +9 -0
  189. package/dist/core/defaults.js.map +1 -1
  190. package/dist/core/experimental.js +1 -1
  191. package/dist/core/experimental.js.map +1 -1
  192. package/dist/core/export-html/template.css +10 -0
  193. package/dist/core/export-html/template.js +72 -18
  194. package/dist/core/extensions/index.d.ts +2 -2
  195. package/dist/core/extensions/index.d.ts.map +1 -1
  196. package/dist/core/extensions/index.js +1 -1
  197. package/dist/core/extensions/index.js.map +1 -1
  198. package/dist/core/extensions/jiti-loader.d.ts +2 -0
  199. package/dist/core/extensions/jiti-loader.d.ts.map +1 -0
  200. package/dist/core/extensions/jiti-loader.js +5 -0
  201. package/dist/core/extensions/jiti-loader.js.map +1 -0
  202. package/dist/core/extensions/loader.d.ts.map +1 -1
  203. package/dist/core/extensions/loader.js +228 -89
  204. package/dist/core/extensions/loader.js.map +1 -1
  205. package/dist/core/extensions/runner.d.ts +47 -8
  206. package/dist/core/extensions/runner.d.ts.map +1 -1
  207. package/dist/core/extensions/runner.js +376 -104
  208. package/dist/core/extensions/runner.js.map +1 -1
  209. package/dist/core/extensions/types.d.ts +521 -88
  210. package/dist/core/extensions/types.d.ts.map +1 -1
  211. package/dist/core/extensions/types.js +3 -0
  212. package/dist/core/extensions/types.js.map +1 -1
  213. package/dist/core/extensions/virtual-modules.d.ts +3 -0
  214. package/dist/core/extensions/virtual-modules.d.ts.map +1 -0
  215. package/dist/core/extensions/virtual-modules.js +37 -0
  216. package/dist/core/extensions/virtual-modules.js.map +1 -0
  217. package/dist/core/extensions/wrapper.d.ts +2 -2
  218. package/dist/core/extensions/wrapper.d.ts.map +1 -1
  219. package/dist/core/extensions/wrapper.js +3 -22
  220. package/dist/core/extensions/wrapper.js.map +1 -1
  221. package/dist/core/footer-data-provider.d.ts +1 -1
  222. package/dist/core/footer-data-provider.js +19 -18
  223. package/dist/core/footer-data-provider.js.map +1 -1
  224. package/dist/core/index.d.ts +2 -1
  225. package/dist/core/index.d.ts.map +1 -1
  226. package/dist/core/index.js.map +1 -1
  227. package/dist/core/keybindings.d.ts +83 -13
  228. package/dist/core/keybindings.d.ts.map +1 -1
  229. package/dist/core/keybindings.js +33 -7
  230. package/dist/core/keybindings.js.map +1 -1
  231. package/dist/core/mcp-servers.d.ts +119 -0
  232. package/dist/core/mcp-servers.d.ts.map +1 -0
  233. package/dist/core/mcp-servers.js +191 -0
  234. package/dist/core/mcp-servers.js.map +1 -0
  235. package/dist/core/messages.d.ts +1 -1
  236. package/dist/core/messages.d.ts.map +1 -1
  237. package/dist/core/messages.js +1 -0
  238. package/dist/core/messages.js.map +1 -1
  239. package/dist/core/model-config.d.ts +202 -20
  240. package/dist/core/model-config.d.ts.map +1 -1
  241. package/dist/core/model-config.js +53 -18
  242. package/dist/core/model-config.js.map +1 -1
  243. package/dist/core/model-registry.d.ts +19 -2
  244. package/dist/core/model-registry.d.ts.map +1 -1
  245. package/dist/core/model-registry.js +39 -2
  246. package/dist/core/model-registry.js.map +1 -1
  247. package/dist/core/model-resolver.d.ts +7 -5
  248. package/dist/core/model-resolver.d.ts.map +1 -1
  249. package/dist/core/model-resolver.js +29 -17
  250. package/dist/core/model-resolver.js.map +1 -1
  251. package/dist/core/model-runtime.d.ts +79 -20
  252. package/dist/core/model-runtime.d.ts.map +1 -1
  253. package/dist/core/model-runtime.js +460 -134
  254. package/dist/core/model-runtime.js.map +1 -1
  255. package/dist/core/models-store.d.ts +12 -7
  256. package/dist/core/models-store.d.ts.map +1 -1
  257. package/dist/core/models-store.js +87 -18
  258. package/dist/core/models-store.js.map +1 -1
  259. package/dist/core/multi-agent/fsm.js +8 -3
  260. package/dist/core/multi-agent/fsm.js.map +1 -1
  261. package/dist/core/multi-agent/mailbox.js +1 -3
  262. package/dist/core/multi-agent/mailbox.js.map +1 -1
  263. package/dist/core/multi-agent/permission-gate.d.ts +5 -2
  264. package/dist/core/multi-agent/permission-gate.d.ts.map +1 -1
  265. package/dist/core/multi-agent/permission-gate.js +597 -34
  266. package/dist/core/multi-agent/permission-gate.js.map +1 -1
  267. package/dist/core/multi-agent/task-board.js +2 -4
  268. package/dist/core/multi-agent/task-board.js.map +1 -1
  269. package/dist/core/multi-agent/worktree.js +1 -3
  270. package/dist/core/multi-agent/worktree.js.map +1 -1
  271. package/dist/core/nested-tool-calls.d.ts +102 -0
  272. package/dist/core/nested-tool-calls.d.ts.map +1 -0
  273. package/dist/core/nested-tool-calls.js +178 -0
  274. package/dist/core/nested-tool-calls.js.map +1 -0
  275. package/dist/core/package-manager.d.ts +10 -0
  276. package/dist/core/package-manager.d.ts.map +1 -1
  277. package/dist/core/package-manager.js +149 -33
  278. package/dist/core/package-manager.js.map +1 -1
  279. package/dist/core/pi-manifest.d.ts.map +1 -1
  280. package/dist/core/pi-manifest.js +13 -12
  281. package/dist/core/pi-manifest.js.map +1 -1
  282. package/dist/core/prompt-templates.d.ts +6 -1
  283. package/dist/core/prompt-templates.d.ts.map +1 -1
  284. package/dist/core/prompt-templates.js +63 -37
  285. package/dist/core/prompt-templates.js.map +1 -1
  286. package/dist/core/provider-attribution.js +5 -5
  287. package/dist/core/provider-attribution.js.map +1 -1
  288. package/dist/core/provider-composer.d.ts +44 -20
  289. package/dist/core/provider-composer.d.ts.map +1 -1
  290. package/dist/core/provider-composer.js +151 -51
  291. package/dist/core/provider-composer.js.map +1 -1
  292. package/dist/core/radius.d.ts +13 -0
  293. package/dist/core/radius.d.ts.map +1 -1
  294. package/dist/core/radius.js +19 -0
  295. package/dist/core/radius.js.map +1 -1
  296. package/dist/core/remote-catalog-provider.d.ts +10 -3
  297. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  298. package/dist/core/remote-catalog-provider.js +105 -81
  299. package/dist/core/remote-catalog-provider.js.map +1 -1
  300. package/dist/core/resource-loader.d.ts +7 -1
  301. package/dist/core/resource-loader.d.ts.map +1 -1
  302. package/dist/core/resource-loader.js +219 -42
  303. package/dist/core/resource-loader.js.map +1 -1
  304. package/dist/core/runtime-credentials.d.ts +5 -5
  305. package/dist/core/runtime-credentials.d.ts.map +1 -1
  306. package/dist/core/runtime-credentials.js +13 -9
  307. package/dist/core/runtime-credentials.js.map +1 -1
  308. package/dist/core/sandbox/executor.js +1 -0
  309. package/dist/core/sandbox/executor.js.map +1 -1
  310. package/dist/core/sdk.d.ts +7 -5
  311. package/dist/core/sdk.d.ts.map +1 -1
  312. package/dist/core/sdk.js +100 -52
  313. package/dist/core/sdk.js.map +1 -1
  314. package/dist/core/session-cwd.js +1 -0
  315. package/dist/core/session-cwd.js.map +1 -1
  316. package/dist/core/session-export.d.ts +8 -0
  317. package/dist/core/session-export.d.ts.map +1 -0
  318. package/dist/core/session-export.js +33 -0
  319. package/dist/core/session-export.js.map +1 -0
  320. package/dist/core/session-manager.d.ts +75 -15
  321. package/dist/core/session-manager.d.ts.map +1 -1
  322. package/dist/core/session-manager.js +314 -144
  323. package/dist/core/session-manager.js.map +1 -1
  324. package/dist/core/settings-diagnostics.d.ts +9 -0
  325. package/dist/core/settings-diagnostics.d.ts.map +1 -0
  326. package/dist/core/settings-diagnostics.js +21 -0
  327. package/dist/core/settings-diagnostics.js.map +1 -0
  328. package/dist/core/settings-manager.d.ts +84 -4
  329. package/dist/core/settings-manager.d.ts.map +1 -1
  330. package/dist/core/settings-manager.js +239 -25
  331. package/dist/core/settings-manager.js.map +1 -1
  332. package/dist/core/skills.d.ts.map +1 -1
  333. package/dist/core/skills.js +51 -33
  334. package/dist/core/skills.js.map +1 -1
  335. package/dist/core/slash-commands.d.ts.map +1 -1
  336. package/dist/core/slash-commands.js +3 -1
  337. package/dist/core/slash-commands.js.map +1 -1
  338. package/dist/core/soak/soak-log.js +6 -0
  339. package/dist/core/soak/soak-log.js.map +1 -1
  340. package/dist/core/socket-server/socket-server.js +11 -0
  341. package/dist/core/socket-server/socket-server.js.map +1 -1
  342. package/dist/core/socket-server/types.d.ts +2 -1
  343. package/dist/core/socket-server/types.d.ts.map +1 -1
  344. package/dist/core/socket-server/types.js.map +1 -1
  345. package/dist/core/source-info.d.ts +8 -0
  346. package/dist/core/source-info.d.ts.map +1 -1
  347. package/dist/core/source-info.js +16 -0
  348. package/dist/core/source-info.js.map +1 -1
  349. package/dist/core/system-prompt.d.ts +49 -6
  350. package/dist/core/system-prompt.d.ts.map +1 -1
  351. package/dist/core/system-prompt.js +126 -89
  352. package/dist/core/system-prompt.js.map +1 -1
  353. package/dist/core/tools/bash.d.ts +32 -2
  354. package/dist/core/tools/bash.d.ts.map +1 -1
  355. package/dist/core/tools/bash.js +82 -143
  356. package/dist/core/tools/bash.js.map +1 -1
  357. package/dist/core/tools/edit-diff.d.ts +0 -5
  358. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  359. package/dist/core/tools/edit-diff.js +2 -5
  360. package/dist/core/tools/edit-diff.js.map +1 -1
  361. package/dist/core/tools/edit.d.ts +5 -12
  362. package/dist/core/tools/edit.d.ts.map +1 -1
  363. package/dist/core/tools/edit.js +19 -171
  364. package/dist/core/tools/edit.js.map +1 -1
  365. package/dist/core/tools/find.d.ts +4 -0
  366. package/dist/core/tools/find.d.ts.map +1 -1
  367. package/dist/core/tools/find.js +11 -58
  368. package/dist/core/tools/find.js.map +1 -1
  369. package/dist/core/tools/grep.d.ts +4 -0
  370. package/dist/core/tools/grep.d.ts.map +1 -1
  371. package/dist/core/tools/grep.js +10 -62
  372. package/dist/core/tools/grep.js.map +1 -1
  373. package/dist/core/tools/index.d.ts +4 -1
  374. package/dist/core/tools/index.d.ts.map +1 -1
  375. package/dist/core/tools/index.js +18 -1
  376. package/dist/core/tools/index.js.map +1 -1
  377. package/dist/core/tools/ls.d.ts +4 -0
  378. package/dist/core/tools/ls.d.ts.map +1 -1
  379. package/dist/core/tools/ls.js +9 -50
  380. package/dist/core/tools/ls.js.map +1 -1
  381. package/dist/core/tools/output-accumulator.d.ts +11 -0
  382. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  383. package/dist/core/tools/output-accumulator.js +54 -12
  384. package/dist/core/tools/output-accumulator.js.map +1 -1
  385. package/dist/core/tools/powershell.d.ts +16 -0
  386. package/dist/core/tools/powershell.d.ts.map +1 -0
  387. package/dist/core/tools/powershell.js +39 -0
  388. package/dist/core/tools/powershell.js.map +1 -0
  389. package/dist/core/tools/read.d.ts +8 -1
  390. package/dist/core/tools/read.d.ts.map +1 -1
  391. package/dist/core/tools/read.js +16 -123
  392. package/dist/core/tools/read.js.map +1 -1
  393. package/dist/core/tools/render-utils.d.ts +6 -0
  394. package/dist/core/tools/render-utils.d.ts.map +1 -1
  395. package/dist/core/tools/render-utils.js +26 -0
  396. package/dist/core/tools/render-utils.js.map +1 -1
  397. package/dist/core/tools/renderers/bash.d.ts +12 -0
  398. package/dist/core/tools/renderers/bash.d.ts.map +1 -0
  399. package/dist/core/tools/renderers/bash.js +117 -0
  400. package/dist/core/tools/renderers/bash.js.map +1 -0
  401. package/dist/core/tools/renderers/edit.d.ts +23 -0
  402. package/dist/core/tools/renderers/edit.d.ts.map +1 -0
  403. package/dist/core/tools/renderers/edit.js +167 -0
  404. package/dist/core/tools/renderers/edit.js.map +1 -0
  405. package/dist/core/tools/renderers/find.d.ts +10 -0
  406. package/dist/core/tools/renderers/find.d.ts.map +1 -0
  407. package/dist/core/tools/renderers/find.js +64 -0
  408. package/dist/core/tools/renderers/find.js.map +1 -0
  409. package/dist/core/tools/renderers/grep.d.ts +10 -0
  410. package/dist/core/tools/renderers/grep.d.ts.map +1 -0
  411. package/dist/core/tools/renderers/grep.js +69 -0
  412. package/dist/core/tools/renderers/grep.js.map +1 -0
  413. package/dist/core/tools/renderers/index.d.ts +28 -0
  414. package/dist/core/tools/renderers/index.d.ts.map +1 -0
  415. package/dist/core/tools/renderers/index.js +47 -0
  416. package/dist/core/tools/renderers/index.js.map +1 -0
  417. package/dist/core/tools/renderers/ls.d.ts +10 -0
  418. package/dist/core/tools/renderers/ls.d.ts.map +1 -0
  419. package/dist/core/tools/renderers/ls.js +58 -0
  420. package/dist/core/tools/renderers/ls.js.map +1 -0
  421. package/dist/core/tools/renderers/read.d.ts +11 -0
  422. package/dist/core/tools/renderers/read.d.ts.map +1 -0
  423. package/dist/core/tools/renderers/read.js +130 -0
  424. package/dist/core/tools/renderers/read.js.map +1 -0
  425. package/dist/core/tools/renderers/write.d.ts +10 -0
  426. package/dist/core/tools/renderers/write.d.ts.map +1 -0
  427. package/dist/core/tools/renderers/write.js +153 -0
  428. package/dist/core/tools/renderers/write.js.map +1 -0
  429. package/dist/core/tools/tool-definition-wrapper.d.ts +5 -3
  430. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  431. package/dist/core/tools/tool-definition-wrapper.js +3 -1
  432. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  433. package/dist/core/tools/truncate.d.ts +14 -0
  434. package/dist/core/tools/truncate.d.ts.map +1 -1
  435. package/dist/core/tools/truncate.js +29 -0
  436. package/dist/core/tools/truncate.js.map +1 -1
  437. package/dist/core/tools/write.d.ts +4 -0
  438. package/dist/core/tools/write.d.ts.map +1 -1
  439. package/dist/core/tools/write.js +12 -147
  440. package/dist/core/tools/write.js.map +1 -1
  441. package/dist/core/trust-manager.d.ts.map +1 -1
  442. package/dist/core/trust-manager.js +4 -1
  443. package/dist/core/trust-manager.js.map +1 -1
  444. package/dist/core/usage-totals.d.ts +3 -1
  445. package/dist/core/usage-totals.d.ts.map +1 -1
  446. package/dist/core/usage-totals.js +28 -1
  447. package/dist/core/usage-totals.js.map +1 -1
  448. package/dist/core/virtual-models.d.ts +117 -0
  449. package/dist/core/virtual-models.d.ts.map +1 -0
  450. package/dist/core/virtual-models.js +124 -0
  451. package/dist/core/virtual-models.js.map +1 -0
  452. package/dist/experimental/micro/api.d.ts +81 -0
  453. package/dist/experimental/micro/api.d.ts.map +1 -0
  454. package/dist/experimental/micro/api.js +2 -0
  455. package/dist/experimental/micro/api.js.map +1 -0
  456. package/dist/experimental/micro/main.d.ts +3 -0
  457. package/dist/experimental/micro/main.d.ts.map +1 -0
  458. package/dist/experimental/micro/main.js +21 -0
  459. package/dist/experimental/micro/main.js.map +1 -0
  460. package/dist/experimental/micro/models.d.ts +11 -0
  461. package/dist/experimental/micro/models.d.ts.map +1 -0
  462. package/dist/experimental/micro/models.js +95 -0
  463. package/dist/experimental/micro/models.js.map +1 -0
  464. package/dist/experimental/micro/runtime.d.ts +12 -0
  465. package/dist/experimental/micro/runtime.d.ts.map +1 -0
  466. package/dist/experimental/micro/runtime.js +465 -0
  467. package/dist/experimental/micro/runtime.js.map +1 -0
  468. package/dist/experimental/micro/sessions.d.ts +10 -0
  469. package/dist/experimental/micro/sessions.d.ts.map +1 -0
  470. package/dist/experimental/micro/sessions.js +41 -0
  471. package/dist/experimental/micro/sessions.js.map +1 -0
  472. package/dist/experimental/micro/tools.d.ts +10 -0
  473. package/dist/experimental/micro/tools.d.ts.map +1 -0
  474. package/dist/experimental/micro/tools.js +96 -0
  475. package/dist/experimental/micro/tools.js.map +1 -0
  476. package/dist/experimental/micro/tui.d.ts +3 -0
  477. package/dist/experimental/micro/tui.d.ts.map +1 -0
  478. package/dist/experimental/micro/tui.js +510 -0
  479. package/dist/experimental/micro/tui.js.map +1 -0
  480. package/dist/experimental/mini/main.d.ts +7 -0
  481. package/dist/experimental/mini/main.d.ts.map +1 -0
  482. package/dist/experimental/mini/main.js +21 -0
  483. package/dist/experimental/mini/main.js.map +1 -0
  484. package/dist/experimental/mini/server/entry.d.ts +3 -0
  485. package/dist/experimental/mini/server/entry.d.ts.map +1 -0
  486. package/dist/experimental/mini/server/entry.js +11 -0
  487. package/dist/experimental/mini/server/entry.js.map +1 -0
  488. package/dist/experimental/mini/server/run.d.ts +13 -0
  489. package/dist/experimental/mini/server/run.d.ts.map +1 -0
  490. package/dist/experimental/mini/server/run.js +150 -0
  491. package/dist/experimental/mini/server/run.js.map +1 -0
  492. package/dist/experimental/mini/shared/protocol.d.ts +127 -0
  493. package/dist/experimental/mini/shared/protocol.d.ts.map +1 -0
  494. package/dist/experimental/mini/shared/protocol.js +13 -0
  495. package/dist/experimental/mini/shared/protocol.js.map +1 -0
  496. package/dist/experimental/mini/shared/rpc.d.ts +49 -0
  497. package/dist/experimental/mini/shared/rpc.d.ts.map +1 -0
  498. package/dist/experimental/mini/shared/rpc.js +171 -0
  499. package/dist/experimental/mini/shared/rpc.js.map +1 -0
  500. package/dist/experimental/mini/shared/transport.d.ts +35 -0
  501. package/dist/experimental/mini/shared/transport.d.ts.map +1 -0
  502. package/dist/experimental/mini/shared/transport.js +94 -0
  503. package/dist/experimental/mini/shared/transport.js.map +1 -0
  504. package/dist/experimental/mini/tui/run.d.ts +9 -0
  505. package/dist/experimental/mini/tui/run.d.ts.map +1 -0
  506. package/dist/experimental/mini/tui/run.js +62 -0
  507. package/dist/experimental/mini/tui/run.js.map +1 -0
  508. package/dist/experimental/mini/tui/session.d.ts +26 -0
  509. package/dist/experimental/mini/tui/session.d.ts.map +1 -0
  510. package/dist/experimental/mini/tui/session.js +94 -0
  511. package/dist/experimental/mini/tui/session.js.map +1 -0
  512. package/dist/experimental/mini/tui/view.d.ts +10 -0
  513. package/dist/experimental/mini/tui/view.d.ts.map +1 -0
  514. package/dist/experimental/mini/tui/view.js +461 -0
  515. package/dist/experimental/mini/tui/view.js.map +1 -0
  516. package/dist/experimental/mini/worker/entry.d.ts +3 -0
  517. package/dist/experimental/mini/worker/entry.d.ts.map +1 -0
  518. package/dist/experimental/mini/worker/entry.js +10 -0
  519. package/dist/experimental/mini/worker/entry.js.map +1 -0
  520. package/dist/experimental/mini/worker/lane-service.d.ts +44 -0
  521. package/dist/experimental/mini/worker/lane-service.d.ts.map +1 -0
  522. package/dist/experimental/mini/worker/lane-service.js +97 -0
  523. package/dist/experimental/mini/worker/lane-service.js.map +1 -0
  524. package/dist/experimental/mini/worker/models-service.d.ts +19 -0
  525. package/dist/experimental/mini/worker/models-service.d.ts.map +1 -0
  526. package/dist/experimental/mini/worker/models-service.js +136 -0
  527. package/dist/experimental/mini/worker/models-service.js.map +1 -0
  528. package/dist/experimental/mini/worker/run.d.ts +14 -0
  529. package/dist/experimental/mini/worker/run.d.ts.map +1 -0
  530. package/dist/experimental/mini/worker/run.js +88 -0
  531. package/dist/experimental/mini/worker/run.js.map +1 -0
  532. package/dist/extensions/codemode/execute.d.ts +16 -0
  533. package/dist/extensions/codemode/execute.d.ts.map +1 -0
  534. package/dist/extensions/codemode/execute.js +429 -0
  535. package/dist/extensions/codemode/execute.js.map +1 -0
  536. package/dist/extensions/codemode/execute.lazy.d.ts +3 -0
  537. package/dist/extensions/codemode/execute.lazy.d.ts.map +1 -0
  538. package/dist/extensions/codemode/execute.lazy.js +3 -0
  539. package/dist/extensions/codemode/execute.lazy.js.map +1 -0
  540. package/dist/extensions/codemode/index.d.ts +21 -0
  541. package/dist/extensions/codemode/index.d.ts.map +1 -0
  542. package/dist/extensions/codemode/index.js +31 -0
  543. package/dist/extensions/codemode/index.js.map +1 -0
  544. package/dist/extensions/codemode/renderer.d.ts +12 -0
  545. package/dist/extensions/codemode/renderer.d.ts.map +1 -0
  546. package/dist/extensions/codemode/renderer.js +137 -0
  547. package/dist/extensions/codemode/renderer.js.map +1 -0
  548. package/dist/extensions/codemode/tool.d.ts +123 -0
  549. package/dist/extensions/codemode/tool.d.ts.map +1 -0
  550. package/dist/extensions/codemode/tool.js +315 -0
  551. package/dist/extensions/codemode/tool.js.map +1 -0
  552. package/dist/extensions/codemode/worker.d.ts +7 -0
  553. package/dist/extensions/codemode/worker.d.ts.map +1 -0
  554. package/dist/extensions/codemode/worker.js +7 -0
  555. package/dist/extensions/codemode/worker.js.map +1 -0
  556. package/dist/extensions/index.d.ts.map +1 -1
  557. package/dist/extensions/index.js +9 -1
  558. package/dist/extensions/index.js.map +1 -1
  559. package/dist/extensions/llama/client.d.ts +8 -0
  560. package/dist/extensions/llama/client.d.ts.map +1 -1
  561. package/dist/extensions/llama/client.js +13 -0
  562. package/dist/extensions/llama/client.js.map +1 -1
  563. package/dist/extensions/llama/huggingface.js +2 -0
  564. package/dist/extensions/llama/huggingface.js.map +1 -1
  565. package/dist/extensions/llama/index.d.ts.map +1 -1
  566. package/dist/extensions/llama/index.js +13 -2
  567. package/dist/extensions/llama/index.js.map +1 -1
  568. package/dist/extensions/llama/provider.d.ts +4 -2
  569. package/dist/extensions/llama/provider.d.ts.map +1 -1
  570. package/dist/extensions/llama/provider.js +119 -17
  571. package/dist/extensions/llama/provider.js.map +1 -1
  572. package/dist/extensions/llama/ui.js +28 -12
  573. package/dist/extensions/llama/ui.js.map +1 -1
  574. package/dist/extensions/mcp/cli.d.ts +21 -0
  575. package/dist/extensions/mcp/cli.d.ts.map +1 -0
  576. package/dist/extensions/mcp/cli.js +500 -0
  577. package/dist/extensions/mcp/cli.js.map +1 -0
  578. package/dist/extensions/mcp/cli.lazy.d.ts +3 -0
  579. package/dist/extensions/mcp/cli.lazy.d.ts.map +1 -0
  580. package/dist/extensions/mcp/cli.lazy.js +3 -0
  581. package/dist/extensions/mcp/cli.lazy.js.map +1 -0
  582. package/dist/extensions/mcp/config.d.ts +72 -0
  583. package/dist/extensions/mcp/config.d.ts.map +1 -0
  584. package/dist/extensions/mcp/config.js +158 -0
  585. package/dist/extensions/mcp/config.js.map +1 -0
  586. package/dist/extensions/mcp/index.d.ts +76 -0
  587. package/dist/extensions/mcp/index.d.ts.map +1 -0
  588. package/dist/extensions/mcp/index.js +1055 -0
  589. package/dist/extensions/mcp/index.js.map +1 -0
  590. package/dist/extensions/mcp/log.d.ts +16 -0
  591. package/dist/extensions/mcp/log.d.ts.map +1 -0
  592. package/dist/extensions/mcp/log.js +66 -0
  593. package/dist/extensions/mcp/log.js.map +1 -0
  594. package/dist/extensions/mcp/oauth.d.ts +96 -0
  595. package/dist/extensions/mcp/oauth.d.ts.map +1 -0
  596. package/dist/extensions/mcp/oauth.js +333 -0
  597. package/dist/extensions/mcp/oauth.js.map +1 -0
  598. package/dist/extensions/mcp/resources.d.ts +43 -0
  599. package/dist/extensions/mcp/resources.d.ts.map +1 -0
  600. package/dist/extensions/mcp/resources.js +262 -0
  601. package/dist/extensions/mcp/resources.js.map +1 -0
  602. package/dist/extensions/mcp/runtime.d.ts +98 -0
  603. package/dist/extensions/mcp/runtime.d.ts.map +1 -0
  604. package/dist/extensions/mcp/runtime.js +394 -0
  605. package/dist/extensions/mcp/runtime.js.map +1 -0
  606. package/dist/extensions/mcp/runtime.lazy.d.ts +3 -0
  607. package/dist/extensions/mcp/runtime.lazy.d.ts.map +1 -0
  608. package/dist/extensions/mcp/runtime.lazy.js +3 -0
  609. package/dist/extensions/mcp/runtime.lazy.js.map +1 -0
  610. package/dist/extensions/mcp/tools.d.ts +84 -0
  611. package/dist/extensions/mcp/tools.d.ts.map +1 -0
  612. package/dist/extensions/mcp/tools.js +251 -0
  613. package/dist/extensions/mcp/tools.js.map +1 -0
  614. package/dist/extensions/mcp/ui.d.ts +60 -0
  615. package/dist/extensions/mcp/ui.d.ts.map +1 -0
  616. package/dist/extensions/mcp/ui.js +174 -0
  617. package/dist/extensions/mcp/ui.js.map +1 -0
  618. package/dist/extensions/stub-provider/provider.d.ts +2 -2
  619. package/dist/extensions/stub-provider/provider.d.ts.map +1 -1
  620. package/dist/extensions/stub-provider/provider.js +2 -1
  621. package/dist/extensions/stub-provider/provider.js.map +1 -1
  622. package/dist/extensions/tool-search/index.d.ts +12 -0
  623. package/dist/extensions/tool-search/index.d.ts.map +1 -0
  624. package/dist/extensions/tool-search/index.js +15 -0
  625. package/dist/extensions/tool-search/index.js.map +1 -0
  626. package/dist/extensions/tool-search/tool.d.ts +73 -0
  627. package/dist/extensions/tool-search/tool.d.ts.map +1 -0
  628. package/dist/extensions/tool-search/tool.js +189 -0
  629. package/dist/extensions/tool-search/tool.js.map +1 -0
  630. package/dist/index.d.ts +20 -11
  631. package/dist/index.d.ts.map +1 -1
  632. package/dist/index.js +12 -6
  633. package/dist/index.js.map +1 -1
  634. package/dist/main.d.ts +4 -0
  635. package/dist/main.d.ts.map +1 -1
  636. package/dist/main.js +123 -51
  637. package/dist/main.js.map +1 -1
  638. package/dist/migrations.d.ts +1 -1
  639. package/dist/migrations.js +7 -6
  640. package/dist/migrations.js.map +1 -1
  641. package/dist/modes/index.d.ts +1 -0
  642. package/dist/modes/index.d.ts.map +1 -1
  643. package/dist/modes/index.js.map +1 -1
  644. package/dist/modes/interactive/bug-report.d.ts +19 -0
  645. package/dist/modes/interactive/bug-report.d.ts.map +1 -0
  646. package/dist/modes/interactive/bug-report.js +211 -0
  647. package/dist/modes/interactive/bug-report.js.map +1 -0
  648. package/dist/modes/interactive/chat-viewport.d.ts +20 -0
  649. package/dist/modes/interactive/chat-viewport.d.ts.map +1 -0
  650. package/dist/modes/interactive/chat-viewport.js +28 -0
  651. package/dist/modes/interactive/chat-viewport.js.map +1 -0
  652. package/dist/modes/interactive/components/armin.js +10 -6
  653. package/dist/modes/interactive/components/armin.js.map +1 -1
  654. package/dist/modes/interactive/components/assistant-message.d.ts +6 -2
  655. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  656. package/dist/modes/interactive/components/assistant-message.js +38 -15
  657. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  658. package/dist/modes/interactive/components/bash-execution.js +9 -4
  659. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  660. package/dist/modes/interactive/components/bordered-loader.js +3 -0
  661. package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
  662. package/dist/modes/interactive/components/branch-summary-message.d.ts +1 -1
  663. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  664. package/dist/modes/interactive/components/branch-summary-message.js +15 -6
  665. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  666. package/dist/modes/interactive/components/compaction-summary-message.d.ts +1 -1
  667. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  668. package/dist/modes/interactive/components/compaction-summary-message.js +15 -6
  669. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  670. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  671. package/dist/modes/interactive/components/config-selector.js +35 -8
  672. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  673. package/dist/modes/interactive/components/countdown-timer.js +5 -0
  674. package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
  675. package/dist/modes/interactive/components/custom-editor.d.ts +10 -1
  676. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  677. package/dist/modes/interactive/components/custom-editor.js +54 -2
  678. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  679. package/dist/modes/interactive/components/custom-entry.js +4 -1
  680. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  681. package/dist/modes/interactive/components/custom-message.js +7 -1
  682. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  683. package/dist/modes/interactive/components/daxnuts.js +8 -6
  684. package/dist/modes/interactive/components/daxnuts.js.map +1 -1
  685. package/dist/modes/interactive/components/dynamic-border.js +1 -0
  686. package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
  687. package/dist/modes/interactive/components/extension-editor.d.ts +4 -1
  688. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  689. package/dist/modes/interactive/components/extension-editor.js +14 -3
  690. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  691. package/dist/modes/interactive/components/extension-input.d.ts +2 -0
  692. package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
  693. package/dist/modes/interactive/components/extension-input.js +14 -2
  694. package/dist/modes/interactive/components/extension-input.js.map +1 -1
  695. package/dist/modes/interactive/components/extension-selector.d.ts +1 -0
  696. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
  697. package/dist/modes/interactive/components/extension-selector.js +16 -1
  698. package/dist/modes/interactive/components/extension-selector.js.map +1 -1
  699. package/dist/modes/interactive/components/first-time-setup.d.ts +4 -4
  700. package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
  701. package/dist/modes/interactive/components/first-time-setup.js +12 -4
  702. package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
  703. package/dist/modes/interactive/components/footer.d.ts +7 -0
  704. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  705. package/dist/modes/interactive/components/footer.js +51 -6
  706. package/dist/modes/interactive/components/footer.js.map +1 -1
  707. package/dist/modes/interactive/components/index.d.ts +1 -1
  708. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  709. package/dist/modes/interactive/components/index.js.map +1 -1
  710. package/dist/modes/interactive/components/login-dialog.js +9 -3
  711. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  712. package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
  713. package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
  714. package/dist/modes/interactive/components/markdown-transform.js +19 -0
  715. package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
  716. package/dist/modes/interactive/components/mermaid.d.ts +11 -0
  717. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
  718. package/dist/modes/interactive/components/mermaid.js +75 -0
  719. package/dist/modes/interactive/components/mermaid.js.map +1 -0
  720. package/dist/modes/interactive/components/model-selector.d.ts +10 -4
  721. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  722. package/dist/modes/interactive/components/model-selector.js +101 -40
  723. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  724. package/dist/modes/interactive/components/oauth-selector.js +11 -3
  725. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  726. package/dist/modes/interactive/components/scoped-models-selector.d.ts +4 -0
  727. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  728. package/dist/modes/interactive/components/scoped-models-selector.js +60 -32
  729. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  730. package/dist/modes/interactive/components/session-selector.d.ts +5 -5
  731. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  732. package/dist/modes/interactive/components/session-selector.js +128 -78
  733. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  734. package/dist/modes/interactive/components/settings-selector.d.ts +23 -4
  735. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  736. package/dist/modes/interactive/components/settings-selector.js +230 -67
  737. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  738. package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
  739. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
  740. package/dist/modes/interactive/components/settings-submenu.js +165 -0
  741. package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
  742. package/dist/modes/interactive/components/show-images-selector.js +1 -0
  743. package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
  744. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  745. package/dist/modes/interactive/components/skill-invocation-message.js +14 -5
  746. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  747. package/dist/modes/interactive/components/status-indicator.d.ts +3 -1
  748. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  749. package/dist/modes/interactive/components/status-indicator.js +12 -3
  750. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  751. package/dist/modes/interactive/components/theme-selector.js +2 -0
  752. package/dist/modes/interactive/components/theme-selector.js.map +1 -1
  753. package/dist/modes/interactive/components/themed-text.d.ts +17 -0
  754. package/dist/modes/interactive/components/themed-text.d.ts.map +1 -0
  755. package/dist/modes/interactive/components/themed-text.js +29 -0
  756. package/dist/modes/interactive/components/themed-text.js.map +1 -0
  757. package/dist/modes/interactive/components/thinking-selector.d.ts +15 -3
  758. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  759. package/dist/modes/interactive/components/thinking-selector.js +76 -18
  760. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  761. package/dist/modes/interactive/components/tool-execution.d.ts +21 -4
  762. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  763. package/dist/modes/interactive/components/tool-execution.js +78 -52
  764. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  765. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  766. package/dist/modes/interactive/components/tree-selector.js +44 -18
  767. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  768. package/dist/modes/interactive/components/trust-selector.js +8 -2
  769. package/dist/modes/interactive/components/trust-selector.js.map +1 -1
  770. package/dist/modes/interactive/components/user-message-selector.js +6 -3
  771. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  772. package/dist/modes/interactive/components/user-message.d.ts +3 -1
  773. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  774. package/dist/modes/interactive/components/user-message.js +12 -2
  775. package/dist/modes/interactive/components/user-message.js.map +1 -1
  776. package/dist/modes/interactive/components/visual-truncate.d.ts +27 -3
  777. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
  778. package/dist/modes/interactive/components/visual-truncate.js +39 -6
  779. package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
  780. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  781. package/dist/modes/interactive/external-editor.js +2 -1
  782. package/dist/modes/interactive/external-editor.js.map +1 -1
  783. package/dist/modes/interactive/interactive-mode.d.ts +69 -5
  784. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  785. package/dist/modes/interactive/interactive-mode.js +1314 -593
  786. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  787. package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
  788. package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
  789. package/dist/modes/interactive/model-catalog-refresh.js +34 -0
  790. package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
  791. package/dist/modes/interactive/session-share.d.ts +23 -0
  792. package/dist/modes/interactive/session-share.d.ts.map +1 -0
  793. package/dist/modes/interactive/session-share.js +130 -0
  794. package/dist/modes/interactive/session-share.js.map +1 -0
  795. package/dist/modes/interactive/theme/dark.json +54 -63
  796. package/dist/modes/interactive/theme/light.json +52 -60
  797. package/dist/modes/interactive/theme/system-theme.d.ts +54 -0
  798. package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -0
  799. package/dist/modes/interactive/theme/system-theme.js +535 -0
  800. package/dist/modes/interactive/theme/system-theme.js.map +1 -0
  801. package/dist/modes/interactive/theme/theme-controller.d.ts +59 -7
  802. package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
  803. package/dist/modes/interactive/theme/theme-controller.js +164 -51
  804. package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
  805. package/dist/modes/interactive/theme/theme-json.d.ts +85 -0
  806. package/dist/modes/interactive/theme/theme-json.d.ts.map +1 -0
  807. package/dist/modes/interactive/theme/theme-json.js +132 -0
  808. package/dist/modes/interactive/theme/theme-json.js.map +1 -0
  809. package/dist/modes/interactive/theme/theme-schema.json +24 -3
  810. package/dist/modes/interactive/theme/theme.d.ts +80 -42
  811. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  812. package/dist/modes/interactive/theme/theme.js +274 -417
  813. package/dist/modes/interactive/theme/theme.js.map +1 -1
  814. package/dist/modes/interactive/tui-renderer.d.ts +22 -0
  815. package/dist/modes/interactive/tui-renderer.d.ts.map +1 -0
  816. package/dist/modes/interactive/tui-renderer.js +67 -0
  817. package/dist/modes/interactive/tui-renderer.js.map +1 -0
  818. package/dist/modes/json-event.d.ts +34 -0
  819. package/dist/modes/json-event.d.ts.map +1 -0
  820. package/dist/modes/json-event.js +29 -0
  821. package/dist/modes/json-event.js.map +1 -0
  822. package/dist/modes/print-mode.d.ts +1 -1
  823. package/dist/modes/print-mode.d.ts.map +1 -1
  824. package/dist/modes/print-mode.js +12 -2
  825. package/dist/modes/print-mode.js.map +1 -1
  826. package/dist/modes/rpc/rpc-client.d.ts +17 -9
  827. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  828. package/dist/modes/rpc/rpc-client.js +27 -15
  829. package/dist/modes/rpc/rpc-client.js.map +1 -1
  830. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  831. package/dist/modes/rpc/rpc-mode.js +14 -12
  832. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  833. package/dist/modes/rpc/rpc-types.d.ts +22 -1
  834. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  835. package/dist/modes/rpc/rpc-types.js.map +1 -1
  836. package/dist/package-manager-cli.d.ts +1 -0
  837. package/dist/package-manager-cli.d.ts.map +1 -1
  838. package/dist/package-manager-cli.js +217 -63
  839. package/dist/package-manager-cli.js.map +1 -1
  840. package/dist/prompts/commands/plan-phase.md +1 -0
  841. package/dist/prompts/commands/review.md +2 -0
  842. package/dist/prompts/commands/verify-work.md +1 -0
  843. package/dist/prompts/commands/why.md +4 -0
  844. package/dist/rpc-entry.js +1 -0
  845. package/dist/rpc-entry.js.map +1 -1
  846. package/dist/skills/blast-radius/SKILL.md +1 -0
  847. package/dist/skills/explainers/SKILL.md +65 -0
  848. package/dist/skills/unslop/SKILL.md +19 -1
  849. package/dist/utils/abort.d.ts +5 -0
  850. package/dist/utils/abort.d.ts.map +1 -0
  851. package/dist/utils/abort.js +48 -0
  852. package/dist/utils/abort.js.map +1 -0
  853. package/dist/utils/changelog.js +1 -1
  854. package/dist/utils/changelog.js.map +1 -1
  855. package/dist/utils/child-process.d.ts +1 -1
  856. package/dist/utils/child-process.js +1 -1
  857. package/dist/utils/child-process.js.map +1 -1
  858. package/dist/utils/clipboard-command.d.ts +7 -0
  859. package/dist/utils/clipboard-command.d.ts.map +1 -0
  860. package/dist/utils/clipboard-command.js +45 -0
  861. package/dist/utils/clipboard-command.js.map +1 -0
  862. package/dist/utils/clipboard-image.d.ts.map +1 -1
  863. package/dist/utils/clipboard-image.js +60 -91
  864. package/dist/utils/clipboard-image.js.map +1 -1
  865. package/dist/utils/clipboard.d.ts +2 -0
  866. package/dist/utils/clipboard.d.ts.map +1 -1
  867. package/dist/utils/clipboard.js +116 -121
  868. package/dist/utils/clipboard.js.map +1 -1
  869. package/dist/utils/draht-user-agent.d.ts +2 -0
  870. package/dist/utils/draht-user-agent.d.ts.map +1 -0
  871. package/dist/utils/draht-user-agent.js +5 -0
  872. package/dist/utils/draht-user-agent.js.map +1 -0
  873. package/dist/utils/exif-orientation.d.ts +2 -1
  874. package/dist/utils/exif-orientation.d.ts.map +1 -1
  875. package/dist/utils/exif-orientation.js.map +1 -1
  876. package/dist/utils/frontmatter.d.ts.map +1 -1
  877. package/dist/utils/frontmatter.js +2 -1
  878. package/dist/utils/frontmatter.js.map +1 -1
  879. package/dist/utils/management-http.d.ts +25 -0
  880. package/dist/utils/management-http.d.ts.map +1 -0
  881. package/dist/utils/management-http.js +54 -0
  882. package/dist/utils/management-http.js.map +1 -0
  883. package/dist/utils/mime.js +1 -1
  884. package/dist/utils/mime.js.map +1 -1
  885. package/dist/utils/paths.d.ts +4 -3
  886. package/dist/utils/paths.d.ts.map +1 -1
  887. package/dist/utils/paths.js +15 -4
  888. package/dist/utils/paths.js.map +1 -1
  889. package/dist/utils/photon.d.ts +2 -1
  890. package/dist/utils/photon.d.ts.map +1 -1
  891. package/dist/utils/photon.js.map +1 -1
  892. package/dist/utils/shell.d.ts +4 -3
  893. package/dist/utils/shell.d.ts.map +1 -1
  894. package/dist/utils/shell.js +20 -35
  895. package/dist/utils/shell.js.map +1 -1
  896. package/dist/utils/syntax-highlight.d.ts +1 -0
  897. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  898. package/dist/utils/syntax-highlight.js +62 -1
  899. package/dist/utils/syntax-highlight.js.map +1 -1
  900. package/dist/utils/text.d.ts +8 -0
  901. package/dist/utils/text.d.ts.map +1 -0
  902. package/dist/utils/text.js +9 -0
  903. package/dist/utils/text.js.map +1 -0
  904. package/dist/utils/tool-result-images.d.ts +21 -0
  905. package/dist/utils/tool-result-images.d.ts.map +1 -0
  906. package/dist/utils/tool-result-images.js +48 -0
  907. package/dist/utils/tool-result-images.js.map +1 -0
  908. package/dist/utils/tools-manager.d.ts +11 -1
  909. package/dist/utils/tools-manager.d.ts.map +1 -1
  910. package/dist/utils/tools-manager.js +53 -36
  911. package/dist/utils/tools-manager.js.map +1 -1
  912. package/dist/utils/version-check.d.ts +4 -1
  913. package/dist/utils/version-check.d.ts.map +1 -1
  914. package/dist/utils/version-check.js +30 -9
  915. package/dist/utils/version-check.js.map +1 -1
  916. package/dist/utils/wsl.d.ts +3 -0
  917. package/dist/utils/wsl.d.ts.map +1 -0
  918. package/dist/utils/wsl.js +15 -0
  919. package/dist/utils/wsl.js.map +1 -0
  920. package/dist/utils/zip.d.ts +7 -0
  921. package/dist/utils/zip.d.ts.map +1 -0
  922. package/dist/utils/zip.js +60 -0
  923. package/dist/utils/zip.js.map +1 -0
  924. package/docs/cli-integration.md +106 -0
  925. package/docs/cli.md +374 -0
  926. package/docs/compaction.md +91 -29
  927. package/docs/configuration.md +47 -0
  928. package/docs/containerization.md +100 -66
  929. package/docs/custom-provider.md +109 -707
  930. package/docs/docs.json +155 -99
  931. package/docs/environment-variables.md +30 -17
  932. package/docs/extensions.md +169 -2811
  933. package/docs/how-pi-works.md +53 -0
  934. package/docs/images/interactive-mode.png +0 -0
  935. package/docs/index.md +25 -69
  936. package/docs/json.md +197 -56
  937. package/docs/keybindings.md +89 -93
  938. package/docs/llama-cpp.md +18 -3
  939. package/docs/mcp.md +231 -0
  940. package/docs/message-types.md +261 -0
  941. package/docs/models.md +94 -478
  942. package/docs/packages.md +67 -163
  943. package/docs/prompt-templates.md +31 -68
  944. package/docs/providers.md +118 -215
  945. package/docs/quickstart.md +55 -108
  946. package/docs/rpc-commands.md +860 -0
  947. package/docs/rpc-extension-ui.md +200 -0
  948. package/docs/rpc.md +139 -1518
  949. package/docs/sdk.md +79 -1127
  950. package/docs/security.md +76 -32
  951. package/docs/session-format.md +73 -219
  952. package/docs/sessions.md +36 -116
  953. package/docs/settings.md +124 -257
  954. package/docs/shell-aliases.md +85 -5
  955. package/docs/skills.md +52 -189
  956. package/docs/slash-commands.md +61 -0
  957. package/docs/terminal-setup.md +132 -61
  958. package/docs/termux.md +74 -84
  959. package/docs/themes.md +91 -252
  960. package/docs/tmux.md +31 -39
  961. package/docs/tui.md +74 -891
  962. package/docs/usage.md +54 -255
  963. package/docs/virtual-models.md +114 -0
  964. package/docs/windows.md +57 -7
  965. package/examples/extensions/antigravity-image-gen.ts +9 -9
  966. package/examples/extensions/bash-spawn-hook.ts +1 -1
  967. package/examples/extensions/border-status-editor.ts +1 -1
  968. package/examples/extensions/built-in-tool-renderer.ts +16 -40
  969. package/examples/extensions/custom-compaction.ts +1 -16
  970. package/examples/extensions/custom-provider-anthropic/index.ts +20 -13
  971. package/examples/extensions/custom-provider-gitlab-duo/index.ts +4 -3
  972. package/examples/extensions/custom-provider-gitlab-duo/test.ts +5 -5
  973. package/examples/extensions/debug-provider.ts +90 -0
  974. package/examples/extensions/doom-overlay/wad-finder.ts +7 -3
  975. package/examples/extensions/dynamic-resources/dynamic.json +3 -1
  976. package/examples/extensions/git-checkpoint.ts +2 -2
  977. package/examples/extensions/handoff.ts +2 -11
  978. package/examples/extensions/jev-router.ts +113 -0
  979. package/examples/extensions/minimal-mode.ts +24 -96
  980. package/examples/extensions/notify.ts +3 -1
  981. package/examples/extensions/prompt-customizer.ts +19 -67
  982. package/examples/extensions/qna.ts +3 -7
  983. package/examples/extensions/subagent/agents.ts +40 -9
  984. package/examples/extensions/subagent/index.ts +27 -4
  985. package/examples/extensions/summarize.ts +7 -18
  986. package/examples/extensions/titlebar-spinner.ts +1 -1
  987. package/examples/rpc-client.ts +35 -0
  988. package/examples/rpc-extension-ui.ts +38 -9
  989. package/examples/sdk/02-custom-model.ts +1 -2
  990. package/examples/sdk/06-extensions.ts +1 -1
  991. package/examples/sdk/09-api-keys-and-oauth.ts +1 -1
  992. package/examples/sdk/12-full-control.ts +1 -1
  993. package/examples/sdk/14-codemode-mcp.ts +61 -0
  994. package/package.json +25 -30
  995. package/prompts/commands/plan-phase.md +1 -0
  996. package/prompts/commands/review.md +2 -0
  997. package/prompts/commands/verify-work.md +1 -0
  998. package/prompts/commands/why.md +4 -0
  999. package/skills/blast-radius/SKILL.md +1 -0
  1000. package/skills/explainers/SKILL.md +65 -0
  1001. package/skills/unslop/SKILL.md +19 -1
  1002. package/dist/utils/clipboard-native.d.ts +0 -11
  1003. package/dist/utils/clipboard-native.d.ts.map +0 -1
  1004. package/dist/utils/clipboard-native.js +0 -20
  1005. package/dist/utils/clipboard-native.js.map +0 -1
  1006. package/dist/utils/pi-user-agent.d.ts +0 -2
  1007. package/dist/utils/pi-user-agent.d.ts.map +0 -1
  1008. package/dist/utils/pi-user-agent.js +0 -5
  1009. package/dist/utils/pi-user-agent.js.map +0 -1
  1010. package/docs/development.md +0 -71
  1011. package/docs/tree.md +0 -231
  1012. package/examples/extensions/kimi-deferred-tools.ts +0 -61
package/docs/termux.md CHANGED
@@ -1,127 +1,117 @@
1
- # Termux (Android) Setup
1
+ # Run draht on Android with Termux
2
2
 
3
- draht runs on Android via [Termux](https://termux.dev/), a terminal emulator and Linux environment for Android.
3
+ draht runs on Android through [Termux](https://termux.dev/), a terminal emulator and Linux environment. Text input, file tools, and shell commands are supported. draht can copy and paste text through the Android clipboard with Termux:API. Clipboard image paste is not supported.
4
4
 
5
- ## Prerequisites
5
+ ## Before you begin
6
6
 
7
- 1. Install [Termux](https://github.com/termux/termux-app#installation) from GitHub or F-Droid (not Google Play, that version is deprecated)
8
- 2. Install [Termux:API](https://github.com/termux/termux-api#installation) from GitHub or F-Droid for clipboard and other device integrations
7
+ Install Termux from [GitHub or F-Droid](https://github.com/termux/termux-app#installation). Do not use the deprecated Google Play build.
9
8
 
10
- ## Installation
9
+ [Termux:API](https://github.com/termux/termux-api#installation) is optional. Install it only when you want draht to copy or paste Android clipboard text, or when shell commands need Android device APIs.
11
10
 
12
- ```bash
13
- # Update packages
14
- pkg update && pkg upgrade
11
+ ## Install draht
15
12
 
16
- # Install dependencies
17
- pkg install nodejs termux-api git
13
+ 1. Update Termux packages:
18
14
 
19
- # Install draht
20
- npm install -g --ignore-scripts @draht/coding-agent
15
+ ```bash
16
+ pkg update && pkg upgrade
17
+ ```
21
18
 
22
- # Create config directory
23
- mkdir -p ~/.draht/agent
19
+ 2. Install Node.js and Git:
24
20
 
25
- # Run draht
26
- draht
27
- ```
21
+ ```bash
22
+ pkg install nodejs git
23
+ ```
28
24
 
29
- ## Clipboard Support
25
+ 3. Install draht:
30
26
 
31
- Clipboard operations use `termux-clipboard-set` and `termux-clipboard-get` when running in Termux. The Termux:API app must be installed for these to work.
27
+ ```bash
28
+ npm install -g --ignore-scripts @draht/coding-agent
29
+ ```
32
30
 
33
- Image clipboard is not supported on Termux (the `ctrl+v` image paste feature will not work).
31
+ 4. Verify the installation:
34
32
 
35
- ## Example AGENTS.md for Termux
33
+ ```bash
34
+ draht --version
35
+ ```
36
36
 
37
- Create `~/.draht/agent/AGENTS.md` to help the agent understand the Termux environment:
37
+ 5. Open the folder you want to work in and start draht:
38
38
 
39
- ````markdown
40
- # Agent Environment: Termux on Android
39
+ ```bash
40
+ cd /path/to/working-folder
41
+ draht
42
+ ```
41
43
 
42
- ## Location
43
- - **OS**: Android (Termux terminal emulator)
44
- - **Home**: `/data/data/com.termux/files/home`
45
- - **Prefix**: `/data/data/com.termux/files/usr`
46
- - **Shared storage**: `/storage/emulated/0` (Downloads, Documents, etc.)
44
+ Continue with the main [Quickstart](quickstart.md#3-choose-a-model) to connect a model and run your first task.
47
45
 
48
- ## Opening URLs
49
- ```bash
50
- termux-open-url "https://example.com"
51
- ```
46
+ ## Access Android shared storage
52
47
 
53
- ## Opening Files
54
- ```bash
55
- termux-open file.pdf # Opens with default app
56
- termux-open --chooser image.jpg # Choose app
57
- ```
48
+ Termux cannot access shared Android storage until you grant permission. Run this once:
58
49
 
59
- ## Clipboard
60
50
  ```bash
61
- termux-clipboard-set "text" # Copy
62
- termux-clipboard-get # Paste
51
+ termux-setup-storage
63
52
  ```
64
53
 
65
- ## Notifications
66
- ```bash
67
- termux-notification -t "Title" -c "Content"
68
- ```
54
+ After approval, Android shared storage is available under `/storage/emulated/0` and through the links Termux creates under `~/storage/`.
69
55
 
70
- ## Device Info
71
- ```bash
72
- termux-battery-status # Battery info
73
- termux-wifi-connectioninfo # WiFi info
74
- termux-telephony-deviceinfo # Device info
75
- ```
56
+ Only grant this permission when draht should be able to access those files. Commands and tools running in Termux use the same storage permissions as the Termux process.
57
+
58
+ ## Use clipboard commands
59
+
60
+ draht uses `termux-clipboard-set` to copy text and `termux-clipboard-get` for its clipboard-paste shortcut. Shell commands can use both commands directly. Install the Termux:API app and its command-line package:
76
61
 
77
- ## Sharing
78
62
  ```bash
79
- termux-share -a send file.txt # Share file
63
+ pkg install termux-api
80
64
  ```
81
65
 
82
- ## Other Useful Commands
66
+ Verify the integration:
67
+
83
68
  ```bash
84
- termux-toast "message" # Quick toast popup
85
- termux-vibrate # Vibrate device
86
- termux-tts-speak "hello" # Text to speech
87
- termux-camera-photo out.jpg # Take photo
69
+ printf 'draht clipboard test' | termux-clipboard-set
70
+ termux-clipboard-get
88
71
  ```
89
72
 
90
- ## Notes
91
- - Termux:API app must be installed for `termux-*` commands
92
- - Use `pkg install termux-api` for the command-line tools
93
- - Storage permission needed for `/storage/emulated/0` access
94
- ````
73
+ The second command should print `draht clipboard test`.
74
+
75
+ The Termux clipboard API supports text only. draht's clipboard-paste shortcut inserts that text into the editor but cannot attach clipboard images.
76
+
77
+ ## Add Termux-specific instructions
78
+
79
+ draht detects that it is running in Termux, but it cannot infer how you want it to interact with Android. Add only the environment details relevant to your work to `~/.draht/agent/AGENTS.md`:
95
80
 
96
- ## Limitations
81
+ ````markdown
82
+ # Termux environment
83
+
84
+ - draht runs in Termux on Android.
85
+ - Shared Android storage is under `/storage/emulated/0`.
86
+ - Open URLs with `termux-open-url "https://example.com"`.
87
+ - Open files with `termux-open <path>`.
88
+ - Do not access shared storage unless the task requires it.
89
+ ````
97
90
 
98
- - **No image clipboard**: Termux clipboard API only supports text
99
- - **No native binaries**: Some optional native dependencies (like the clipboard module) are unavailable on Android ARM64 and are skipped during installation
100
- - **Storage access**: To access files in `/storage/emulated/0` (Downloads, etc.), run `termux-setup-storage` once to grant permissions
91
+ Run `/reload` after changing the file during an active session.
101
92
 
102
93
  ## Troubleshooting
103
94
 
104
- ### Clipboard not working
95
+ ### Clipboard integration fails
105
96
 
106
- Ensure both apps are installed:
107
- 1. Termux (from GitHub or F-Droid)
108
- 2. Termux:API (from GitHub or F-Droid)
97
+ Confirm that you installed both components:
109
98
 
110
- Then install the CLI tools:
111
- ```bash
112
- pkg install termux-api
113
- ```
99
+ 1. The Termux:API Android app from the same source as Termux
100
+ 2. The `termux-api` command-line package
114
101
 
115
- ### Permission denied for shared storage
102
+ Then run the clipboard verification commands above outside draht. If they fail there, fix the Termux:API installation before retrying draht's copy command.
116
103
 
117
- Run once to grant storage permissions:
118
- ```bash
119
- termux-setup-storage
120
- ```
104
+ ### Shared storage reports permission denied
105
+
106
+ Run `termux-setup-storage`, approve the Android permission request, and retry the path under `~/storage/` or `/storage/emulated/0`.
121
107
 
122
- ### Node.js installation issues
108
+ ### draht is not found after installation
109
+
110
+ Open a new Termux shell and run:
123
111
 
124
- If npm fails, try clearing the cache:
125
112
  ```bash
126
- npm cache clean --force
113
+ npm prefix -g
114
+ command -v draht
127
115
  ```
116
+
117
+ Confirm that the global npm binary directory is on `PATH`, then reinstall draht if the package is missing.
package/docs/themes.md CHANGED
@@ -1,297 +1,136 @@
1
- > draht can create themes. Ask it to build one for your setup.
1
+ # Customize draht with themes
2
2
 
3
- # Themes
3
+ Themes control the colors draht uses in interactive mode and HTML exports. draht includes the `system`, `dark`, and `light` themes. Without a `theme` setting, draht detects whether the terminal is light or dark and uses the matching built-in theme. You can select one theme, follow your terminal's light or dark appearance, or create your own palette.
4
4
 
5
- Themes are JSON files that define colors for the TUI.
5
+ ## Use your terminal's colors
6
6
 
7
- ## Table of Contents
7
+ The `system` theme builds draht's colors from your terminal's theme, so draht matches the terminal instead of bringing its own palette. It is available as an explicit choice but is not the default:
8
8
 
9
- - [Locations](#locations)
10
- - [Selecting a Theme](#selecting-a-theme)
11
- - [Creating a Custom Theme](#creating-a-custom-theme)
12
- - [Theme Format](#theme-format)
13
- - [Color Tokens](#color-tokens)
14
- - [Color Values](#color-values)
15
- - [Tips](#tips)
9
+ - draht queries the terminal's default foreground and background colors and its 16 ANSI colors.
10
+ - Each draht color takes its hue from one ANSI color, for example errors from red and links from blue.
11
+ - draht sets each color's lightness so that it stands out from the background by a minimum contrast. Body text keeps at least a 4.5:1 WCAG contrast ratio on the background and every panel.
12
+ - When the terminal switches between light and dark, draht queries the colors again and rebuilds the theme.
16
13
 
17
- ## Locations
14
+ The theme adapts to what the terminal reports:
18
15
 
19
- draht loads themes from:
16
+ | Terminal reports | Result |
17
+ |---|---|
18
+ | Background and ANSI colors | Colors from the terminal palette, placed for the actual background. |
19
+ | Background only | draht's own hues, placed for the actual background. |
20
+ | Nothing | ANSI color indices and the terminal's default colors, which the terminal renders itself. Secondary text is faint, and panels have no background color. |
20
21
 
21
- - Built-in: `dark`, `light`
22
- - Global: `~/.draht/agent/themes/*.json`
23
- - Project: `.draht/themes/*.json` (only after the project is trusted)
24
- - Packages: `themes/` directories or `pi.themes` entries in `package.json`
25
- - Settings: `themes` array with files or directories
26
- - CLI: `--theme <path>` (repeatable)
22
+ draht asks the terminal for its colors when it starts. Terminals usually answer within a few milliseconds, and draht waits at most 100 ms before showing the startup header. If the terminal does not answer in time, draht uses the ANSI color fallback, and it still applies the colors if they arrive later, for example over a slow SSH connection. `system` is a reserved name: a custom theme with that name is ignored.
27
23
 
28
- Disable discovery with `--no-themes`.
24
+ <a id="selecting-a-theme"></a>
29
25
 
30
- ## Selecting a Theme
26
+ ## Choose a theme
31
27
 
32
- Select a theme via `/settings` or in `settings.json`:
28
+ Open `/settings` and select **Theme**. You can use one theme for every terminal appearance or choose separate themes for light and dark terminals.
29
+
30
+ The selection is saved as the `theme` [setting](settings.md#terminal-and-display):
33
31
 
34
32
  ```json
35
33
  {
36
- "theme": "my-theme"
34
+ "theme": "dark"
37
35
  }
38
36
  ```
39
37
 
40
- On first run, draht detects your terminal background and defaults to `dark` or `light`.
41
-
42
- ## Creating a Custom Theme
43
-
44
- 1. Create a theme file:
45
-
46
- ```bash
47
- mkdir -p ~/.draht/agent/themes
48
- vim ~/.draht/agent/themes/my-theme.json
49
- ```
38
+ Without a `theme` setting, draht detects the terminal's light/dark appearance and uses the matching built-in `light` or `dark` theme.
50
39
 
51
- 2. Define the theme with all required colors (see [Color Tokens](#color-tokens)):
40
+ Automatic mode stores the light theme first and the dark theme second:
52
41
 
53
42
  ```json
54
43
  {
55
- "$schema": "https://raw.githubusercontent.com/draht-dev/draht/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
56
- "name": "my-theme",
57
- "vars": {
58
- "primary": "#00aaff",
59
- "secondary": 242
60
- },
61
- "colors": {
62
- "accent": "primary",
63
- "border": "primary",
64
- "borderAccent": "#00ffff",
65
- "borderMuted": "secondary",
66
- "success": "#00ff00",
67
- "error": "#ff0000",
68
- "warning": "#ffff00",
69
- "muted": "secondary",
70
- "dim": 240,
71
- "text": "",
72
- "thinkingText": "secondary",
73
- "selectedBg": "#2d2d30",
74
- "userMessageBg": "#2d2d30",
75
- "userMessageText": "",
76
- "customMessageBg": "#2d2d30",
77
- "customMessageText": "",
78
- "customMessageLabel": "primary",
79
- "toolPendingBg": "#1e1e2e",
80
- "toolSuccessBg": "#1e2e1e",
81
- "toolErrorBg": "#2e1e1e",
82
- "toolTitle": "primary",
83
- "toolOutput": "",
84
- "mdHeading": "#ffaa00",
85
- "mdLink": "primary",
86
- "mdLinkUrl": "secondary",
87
- "mdCode": "#00ffff",
88
- "mdCodeBlock": "",
89
- "mdCodeBlockBorder": "secondary",
90
- "mdQuote": "secondary",
91
- "mdQuoteBorder": "secondary",
92
- "mdHr": "secondary",
93
- "mdListBullet": "#00ffff",
94
- "toolDiffAdded": "#00ff00",
95
- "toolDiffRemoved": "#ff0000",
96
- "toolDiffContext": "secondary",
97
- "syntaxComment": "secondary",
98
- "syntaxKeyword": "primary",
99
- "syntaxFunction": "#00aaff",
100
- "syntaxVariable": "#ffaa00",
101
- "syntaxString": "#00ff00",
102
- "syntaxNumber": "#ff00ff",
103
- "syntaxType": "#00aaff",
104
- "syntaxOperator": "primary",
105
- "syntaxPunctuation": "secondary",
106
- "thinkingOff": "secondary",
107
- "thinkingMinimal": "primary",
108
- "thinkingLow": "#00aaff",
109
- "thinkingMedium": "#00ffff",
110
- "thinkingHigh": "#ff00ff",
111
- "thinkingXhigh": "#ff0000",
112
- "thinkingMax": "#ff0088",
113
- "bashMode": "#ffaa00"
114
- }
44
+ "theme": "light/dark"
115
45
  }
116
46
  ```
117
47
 
118
- 3. Select the theme via `/settings`.
48
+ draht decides whether the terminal is light or dark from its reported background and foreground colors. If the terminal does not report its background, draht uses the terminal's light/dark notification, then the `COLORFGBG` environment variable, then dark. The same decision picks the theme of a light/dark pair and the appearance of `system`. When automatic mode is active, draht changes themes when the terminal reports an appearance change. Theme names cannot contain `/` because draht reserves it for this setting format.
119
49
 
120
- **Hot reload:** When you edit the currently active custom theme file, draht reloads it automatically for immediate visual feedback.
50
+ Use `--use-theme` to choose the initial theme for one invocation without changing the saved setting:
121
51
 
122
- ## Theme Format
123
-
124
- ```json
125
- {
126
- "$schema": "https://raw.githubusercontent.com/draht-dev/draht/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
127
- "name": "my-theme",
128
- "vars": {
129
- "blue": "#0066cc",
130
- "gray": 242
131
- },
132
- "colors": {
133
- "accent": "blue",
134
- "muted": "gray",
135
- "text": "",
136
- ...
137
- }
138
- }
52
+ ```bash
53
+ draht --use-theme light
54
+ draht --use-theme light/dark
139
55
  ```
140
56
 
141
- - `name` is required and must be unique.
142
- - `vars` is optional. Define reusable colors here, then reference them in `colors`.
143
- - `colors` must define all 51 required tokens. `thinkingMax` is optional and falls back to `thinkingXhigh`.
144
-
145
- The `$schema` field enables editor auto-completion and validation.
146
-
147
- ## Color Tokens
148
-
149
- Every theme must define all 51 required color tokens. `thinkingMax` is optional for compatibility with existing themes; when omitted, it uses `thinkingXhigh`.
150
-
151
- ### Core UI (11 colors)
152
-
153
- | Token | Purpose |
154
- |-------|---------|
155
- | `accent` | Primary accent (logo, selected items, cursor) |
156
- | `border` | Normal borders |
157
- | `borderAccent` | Highlighted borders |
158
- | `borderMuted` | Subtle borders (editor) |
159
- | `success` | Success states |
160
- | `error` | Error states |
161
- | `warning` | Warning states |
162
- | `muted` | Secondary text |
163
- | `dim` | Tertiary text |
164
- | `text` | Default text (usually `""`) |
165
- | `thinkingText` | Thinking block text |
166
-
167
- ### Backgrounds & Content (11 colors)
168
-
169
- | Token | Purpose |
170
- |-------|---------|
171
- | `selectedBg` | Selected line background |
172
- | `userMessageBg` | User message background |
173
- | `userMessageText` | User message text |
174
- | `customMessageBg` | Extension message background |
175
- | `customMessageText` | Extension message text |
176
- | `customMessageLabel` | Extension message label |
177
- | `toolPendingBg` | Tool box (pending) |
178
- | `toolSuccessBg` | Tool box (success) |
179
- | `toolErrorBg` | Tool box (error) |
180
- | `toolTitle` | Tool title |
181
- | `toolOutput` | Tool output text |
182
-
183
- ### Markdown (10 colors)
184
-
185
- | Token | Purpose |
186
- |-------|---------|
187
- | `mdHeading` | Headings |
188
- | `mdLink` | Link text |
189
- | `mdLinkUrl` | Link URL |
190
- | `mdCode` | Inline code |
191
- | `mdCodeBlock` | Code block content |
192
- | `mdCodeBlockBorder` | Code block fences |
193
- | `mdQuote` | Blockquote text |
194
- | `mdQuoteBorder` | Blockquote border |
195
- | `mdHr` | Horizontal rule |
196
- | `mdListBullet` | List bullets |
197
-
198
- ### Tool Diffs (3 colors)
199
-
200
- | Token | Purpose |
201
- |-------|---------|
202
- | `toolDiffAdded` | Added lines |
203
- | `toolDiffRemoved` | Removed lines |
204
- | `toolDiffContext` | Context lines |
205
-
206
- ### Syntax Highlighting (9 colors)
207
-
208
- | Token | Purpose |
209
- |-------|---------|
210
- | `syntaxComment` | Comments |
211
- | `syntaxKeyword` | Keywords |
212
- | `syntaxFunction` | Function names |
213
- | `syntaxVariable` | Variables |
214
- | `syntaxString` | Strings |
215
- | `syntaxNumber` | Numbers |
216
- | `syntaxType` | Types |
217
- | `syntaxOperator` | Operators |
218
- | `syntaxPunctuation` | Punctuation |
219
-
220
- ### Thinking Level Borders (6 required, 1 optional)
221
-
222
- Editor border colors indicating thinking level (visual hierarchy from subtle to prominent):
223
-
224
- | Token | Purpose |
225
- |-------|---------|
226
- | `thinkingOff` | Thinking off |
227
- | `thinkingMinimal` | Minimal thinking |
228
- | `thinkingLow` | Low thinking |
229
- | `thinkingMedium` | Medium thinking |
230
- | `thinkingHigh` | High thinking |
231
- | `thinkingXhigh` | Extra high thinking |
232
- | `thinkingMax` | Maximum thinking; optional, falls back to `thinkingXhigh` |
233
-
234
- ### Bash Mode (1 color)
235
-
236
- | Token | Purpose |
237
- |-------|---------|
238
- | `bashMode` | Editor border in bash mode (`!` prefix) |
239
-
240
- ### HTML Export (optional)
241
-
242
- The `export` section controls colors for `/export` HTML output. If omitted, colors are derived from `userMessageBg`.
57
+ See [CLI resources](cli.md#resources) for the command-line option.
243
58
 
244
- ```json
245
- {
246
- "export": {
247
- "pageBg": "#18181e",
248
- "cardBg": "#1e1e24",
249
- "infoBg": "#3c3728"
250
- }
251
- }
252
- ```
59
+ ## Create a custom theme
253
60
 
254
- ## Color Values
61
+ Copy one of the [built-in themes](https://github.com/draht-dev/draht/tree/main/packages/coding-agent/src/modes/interactive/theme) or create a new JSON file conforming to the [schema](https://github.com/draht-dev/draht/blob/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json). The built-in themes use OKHSL colors, with variables for colors that several roles share, so you can adjust a hue, saturation, or lightness directly.
255
62
 
256
- Four formats are supported:
63
+ 1. Save the file as `<agent-dir>/themes/my-theme.json`. The agent directory defaults to `~/.draht/agent`.
64
+ 2. Set its `name` to `my-theme`.
65
+ 3. Change values in `vars` and `colors`.
66
+ 4. Select `my-theme` through `/settings`.
257
67
 
258
- | Format | Example | Description |
259
- |--------|---------|-------------|
260
- | Hex | `"#ff0000"` | 6-digit hex RGB |
261
- | 256-color | `39` | xterm 256-color palette index (0-255) |
262
- | Variable | `"primary"` | Reference to a `vars` entry |
263
- | Default | `""` | Terminal's default color |
68
+ Use the theme name as the filename. draht hot-reloads the active user theme only from `<agent-dir>/themes/<name>.json`. Run `/reload` after adding or changing a theme from any other source.
264
69
 
265
- ### 256-Color Palette
70
+ ## Understand the theme file
266
71
 
267
- - `0-15`: Basic ANSI colors (terminal-dependent)
268
- - `16-231`: 6×6×6 RGB cube (`16 + 36×R + 6×G + B` where R,G,B are 0-5)
269
- - `232-255`: Grayscale ramp
72
+ | Property | Required | Responsibility |
73
+ |---|---|---|
74
+ | `$schema` | No | Enables editor validation and completion against draht's published schema. |
75
+ | `name` | Yes | Identifies the theme in selectors and settings. It must be unique, cannot contain `/`, and cannot be `system`. |
76
+ | `appearance` | No | `"dark"` or `"light"`: the background the theme is designed for. draht detects it from the theme colors when omitted. |
77
+ | `vars` | No | Defines reusable color values. Variables can reference other variables. |
78
+ | `colors` | Yes | Assigns colors to terminal UI roles. The schema identifies required and optional roles. |
79
+ | `export` | No | Overrides page and panel backgrounds in HTML exports. |
270
80
 
271
- ### Terminal Compatibility
81
+ A color can be written in six forms:
272
82
 
273
- draht uses 24-bit RGB colors. Most modern terminals support this (iTerm2, Kitty, WezTerm, Windows Terminal, VS Code). For older terminals with only 256-color support, draht falls back to the nearest approximation.
83
+ | Form | Example | Meaning |
84
+ |---|---|---|
85
+ | RGB hexadecimal | `"#0af"` or `"#00aaff"` | A three- or six-digit sRGB color. |
86
+ | OKLCH | `"oklch(62% 0.1 200)"` | Perceptual lightness, chroma, and hue. |
87
+ | OKHSL | `"okhsl(250 60% 55%)"` | Hue, saturation, and lightness. Saturation is relative to the most the sRGB gamut allows at that hue and lightness, so every value is in gamut and equal saturation looks equally colorful. |
88
+ | 256-color index | `39` | An ANSI palette index from `0` through `255`. |
89
+ | Variable reference | `"primary"` | The value of an entry in `vars`. |
90
+ | Terminal default | `""` | The terminal's default foreground or background color. |
274
91
 
275
- Check truecolor support:
92
+ Terminal default colors render as the terminal's own colors. Where draht needs a concrete value, such as HTML export or extension color math, it uses the default colors the terminal reports, or a black or white guess based on the theme's appearance.
276
93
 
277
- ```bash
278
- echo $COLORTERM # Should output "truecolor" or "24bit"
279
- ```
94
+ draht resolves chained variable references. A missing variable or circular reference makes the theme invalid. draht uses truecolor when available, gamut-maps OKLCH to sRGB, and approximates colors for 256-color terminals. HTML exports convert OKHSL values to hexadecimal because CSS does not support them. If colors differ from their source values, check your terminal's truecolor detection and contrast settings. See [Configure Your Terminal](terminal-setup.md#override-detected-capabilities).
95
+
96
+ Use the [theme JSON schema](https://github.com/draht-dev/draht/blob/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json) for the exact properties, required colors, and accepted value types.
97
+
98
+ draht reports invalid theme files during startup and `/reload`.
99
+
100
+ ## Find the color to change
101
+
102
+ Theme colors describe interface roles rather than individual components. Use these groups to find the relevant part of the schema:
103
+
104
+ | Area | Color names |
105
+ |---|---|
106
+ | General interface | `accent`, `border*`, `text`, `muted`, `dim`, `success`, `error`, `warning` |
107
+ | Selection and fullscreen | `selectedBg`, `searchMatch*`, `scrollbar*` |
108
+ | Messages | `userMessage*`, `customMessage*`, `thinkingText` |
109
+ | Tool execution | `toolPendingBg`, `toolSuccessBg`, `toolErrorBg`, `toolTitle`, `toolOutput` |
110
+ | Markdown | `md*` |
111
+ | Tool diffs | `toolDiff*` |
112
+ | Syntax highlighting | `syntax*` |
113
+ | Editor modes | `thinking*`, `bashMode` |
114
+ | HTML export | `export.pageBg`, `export.cardBg`, `export.infoBg` |
280
115
 
281
- ## Tips
116
+ The schema is the format reference. The built-in themes provide complete values that you can copy and adjust.
282
117
 
283
- **Dark terminals:** Use bright, saturated colors with higher contrast.
118
+ Five colors are optional and inherit another color when omitted:
284
119
 
285
- **Light terminals:** Use darker, muted colors with lower contrast.
120
+ | Optional color | Fallback |
121
+ |---|---|
122
+ | `scrollbarTrack` | `muted` |
123
+ | `scrollbarThumb` | `text` |
124
+ | `searchMatchBg` | `selectedBg` |
125
+ | `searchMatchText` | `text` |
126
+ | `thinkingMax` | `thinkingXhigh` |
286
127
 
287
- **Color harmony:** Start with a base palette (Nord, Gruvbox, Tokyo Night), define it in `vars`, and reference consistently.
128
+ If `export` colors are omitted, draht derives HTML page and panel backgrounds from `userMessageBg`.
288
129
 
289
- **Testing:** Check your theme with different message types, tool states, markdown content, and long wrapped text.
130
+ ## Load a theme from a project or package
290
131
 
291
- **VS Code:** Set `terminal.integrated.minimumContrastRatio` to `1` for accurate colors.
132
+ Place a project theme in `.draht/themes/`. Project themes load only after [project trust](security.md#understand-project-trust) is granted.
292
133
 
293
- ## Examples
134
+ You can also load theme files and directories through the `themes` setting or distribute them in a draht package. See [Configuration](configuration.md), [Settings](settings.md#resources), and [draht Packages](packages.md).
294
135
 
295
- See the built-in themes:
296
- - [dark.json](../src/modes/interactive/theme/dark.json)
297
- - [light.json](../src/modes/interactive/theme/light.json)
136
+ Each loaded theme must have a unique name. draht reports duplicate names as resource collisions.