threadwell 0.0.0 → 0.0.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.
Files changed (861) hide show
  1. package/CHANGELOG.md +4170 -0
  2. package/README.md +668 -13
  3. package/dist/bun/cli.d.ts +3 -0
  4. package/dist/bun/cli.d.ts.map +1 -0
  5. package/dist/bun/cli.js +9 -0
  6. package/dist/bun/cli.js.map +1 -0
  7. package/dist/bun/register-bedrock.d.ts +2 -0
  8. package/dist/bun/register-bedrock.d.ts.map +1 -0
  9. package/dist/bun/register-bedrock.js +4 -0
  10. package/dist/bun/register-bedrock.js.map +1 -0
  11. package/dist/bun/restore-sandbox-env.d.ts +13 -0
  12. package/dist/bun/restore-sandbox-env.d.ts.map +1 -0
  13. package/dist/bun/restore-sandbox-env.js +32 -0
  14. package/dist/bun/restore-sandbox-env.js.map +1 -0
  15. package/dist/cli/args.d.ts +53 -0
  16. package/dist/cli/args.d.ts.map +1 -0
  17. package/dist/cli/args.js +341 -0
  18. package/dist/cli/args.js.map +1 -0
  19. package/dist/cli/config-selector.d.ts +14 -0
  20. package/dist/cli/config-selector.d.ts.map +1 -0
  21. package/dist/cli/config-selector.js +31 -0
  22. package/dist/cli/config-selector.js.map +1 -0
  23. package/dist/cli/file-processor.d.ts +15 -0
  24. package/dist/cli/file-processor.d.ts.map +1 -0
  25. package/dist/cli/file-processor.js +83 -0
  26. package/dist/cli/file-processor.js.map +1 -0
  27. package/dist/cli/initial-message.d.ts +18 -0
  28. package/dist/cli/initial-message.d.ts.map +1 -0
  29. package/dist/cli/initial-message.js +22 -0
  30. package/dist/cli/initial-message.js.map +1 -0
  31. package/dist/cli/list-models.d.ts +9 -0
  32. package/dist/cli/list-models.d.ts.map +1 -0
  33. package/dist/cli/list-models.js +98 -0
  34. package/dist/cli/list-models.js.map +1 -0
  35. package/dist/cli/session-picker.d.ts +9 -0
  36. package/dist/cli/session-picker.d.ts.map +1 -0
  37. package/dist/cli/session-picker.js +35 -0
  38. package/dist/cli/session-picker.js.map +1 -0
  39. package/dist/cli.d.ts +3 -0
  40. package/dist/cli.d.ts.map +1 -0
  41. package/dist/cli.js +19 -3
  42. package/dist/cli.js.map +1 -0
  43. package/dist/config.d.ts +93 -0
  44. package/dist/config.d.ts.map +1 -0
  45. package/dist/config.js +404 -0
  46. package/dist/config.js.map +1 -0
  47. package/dist/core/agent-session-runtime.d.ts +117 -0
  48. package/dist/core/agent-session-runtime.d.ts.map +1 -0
  49. package/dist/core/agent-session-runtime.js +300 -0
  50. package/dist/core/agent-session-runtime.js.map +1 -0
  51. package/dist/core/agent-session-services.d.ts +86 -0
  52. package/dist/core/agent-session-services.d.ts.map +1 -0
  53. package/dist/core/agent-session-services.js +117 -0
  54. package/dist/core/agent-session-services.js.map +1 -0
  55. package/dist/core/agent-session.d.ts +659 -0
  56. package/dist/core/agent-session.d.ts.map +1 -0
  57. package/dist/core/agent-session.js +3210 -0
  58. package/dist/core/agent-session.js.map +1 -0
  59. package/dist/core/auth-guidance.d.ts +5 -0
  60. package/dist/core/auth-guidance.d.ts.map +1 -0
  61. package/dist/core/auth-guidance.js +21 -0
  62. package/dist/core/auth-guidance.js.map +1 -0
  63. package/dist/core/auth-storage.d.ts +141 -0
  64. package/dist/core/auth-storage.d.ts.map +1 -0
  65. package/dist/core/auth-storage.js +441 -0
  66. package/dist/core/auth-storage.js.map +1 -0
  67. package/dist/core/bash-executor.d.ts +32 -0
  68. package/dist/core/bash-executor.d.ts.map +1 -0
  69. package/dist/core/bash-executor.js +111 -0
  70. package/dist/core/bash-executor.js.map +1 -0
  71. package/dist/core/compaction/branch-summarization.d.ts +88 -0
  72. package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
  73. package/dist/core/compaction/branch-summarization.js +243 -0
  74. package/dist/core/compaction/branch-summarization.js.map +1 -0
  75. package/dist/core/compaction/compaction.d.ts +121 -0
  76. package/dist/core/compaction/compaction.d.ts.map +1 -0
  77. package/dist/core/compaction/compaction.js +615 -0
  78. package/dist/core/compaction/compaction.js.map +1 -0
  79. package/dist/core/compaction/index.d.ts +7 -0
  80. package/dist/core/compaction/index.d.ts.map +1 -0
  81. package/dist/core/compaction/index.js +7 -0
  82. package/dist/core/compaction/index.js.map +1 -0
  83. package/dist/core/compaction/utils.d.ts +38 -0
  84. package/dist/core/compaction/utils.d.ts.map +1 -0
  85. package/dist/core/compaction/utils.js +153 -0
  86. package/dist/core/compaction/utils.js.map +1 -0
  87. package/dist/core/continuity/continuity-files.d.ts +79 -0
  88. package/dist/core/continuity/continuity-files.d.ts.map +1 -0
  89. package/dist/core/continuity/continuity-files.js +326 -0
  90. package/dist/core/continuity/continuity-files.js.map +1 -0
  91. package/dist/core/continuity/continuity-intent-router.d.ts +9 -0
  92. package/dist/core/continuity/continuity-intent-router.d.ts.map +1 -0
  93. package/dist/core/continuity/continuity-intent-router.js +96 -0
  94. package/dist/core/continuity/continuity-intent-router.js.map +1 -0
  95. package/dist/core/continuity/continuity-manager.d.ts +28 -0
  96. package/dist/core/continuity/continuity-manager.d.ts.map +1 -0
  97. package/dist/core/continuity/continuity-manager.js +288 -0
  98. package/dist/core/continuity/continuity-manager.js.map +1 -0
  99. package/dist/core/continuity/continuity-service.d.ts +22 -0
  100. package/dist/core/continuity/continuity-service.d.ts.map +1 -0
  101. package/dist/core/continuity/continuity-service.js +34 -0
  102. package/dist/core/continuity/continuity-service.js.map +1 -0
  103. package/dist/core/continuity/index.d.ts +5 -0
  104. package/dist/core/continuity/index.d.ts.map +1 -0
  105. package/dist/core/continuity/index.js +5 -0
  106. package/dist/core/continuity/index.js.map +1 -0
  107. package/dist/core/defaults.d.ts +3 -0
  108. package/dist/core/defaults.d.ts.map +1 -0
  109. package/dist/core/defaults.js +2 -0
  110. package/dist/core/defaults.js.map +1 -0
  111. package/dist/core/diagnostics.d.ts +15 -0
  112. package/dist/core/diagnostics.d.ts.map +1 -0
  113. package/dist/core/diagnostics.js +2 -0
  114. package/dist/core/diagnostics.js.map +1 -0
  115. package/dist/core/event-bus.d.ts +9 -0
  116. package/dist/core/event-bus.d.ts.map +1 -0
  117. package/dist/core/event-bus.js +25 -0
  118. package/dist/core/event-bus.js.map +1 -0
  119. package/dist/core/exec.d.ts +29 -0
  120. package/dist/core/exec.d.ts.map +1 -0
  121. package/dist/core/exec.js +75 -0
  122. package/dist/core/exec.js.map +1 -0
  123. package/dist/core/export-html/ansi-to-html.d.ts +22 -0
  124. package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
  125. package/dist/core/export-html/ansi-to-html.js +249 -0
  126. package/dist/core/export-html/ansi-to-html.js.map +1 -0
  127. package/dist/core/export-html/index.d.ts +37 -0
  128. package/dist/core/export-html/index.d.ts.map +1 -0
  129. package/dist/core/export-html/index.js +224 -0
  130. package/dist/core/export-html/index.js.map +1 -0
  131. package/dist/core/export-html/template.css +1066 -0
  132. package/dist/core/export-html/template.html +55 -0
  133. package/dist/core/export-html/template.js +1834 -0
  134. package/dist/core/export-html/tool-renderer.d.ts +34 -0
  135. package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
  136. package/dist/core/export-html/tool-renderer.js +108 -0
  137. package/dist/core/export-html/tool-renderer.js.map +1 -0
  138. package/dist/core/export-html/vendor/highlight.min.js +1213 -0
  139. package/dist/core/export-html/vendor/marked.min.js +6 -0
  140. package/dist/core/extensions/index.d.ts +12 -0
  141. package/dist/core/extensions/index.d.ts.map +1 -0
  142. package/dist/core/extensions/index.js +9 -0
  143. package/dist/core/extensions/index.js.map +1 -0
  144. package/dist/core/extensions/loader.d.ts +24 -0
  145. package/dist/core/extensions/loader.d.ts.map +1 -0
  146. package/dist/core/extensions/loader.js +485 -0
  147. package/dist/core/extensions/loader.js.map +1 -0
  148. package/dist/core/extensions/runner.d.ts +159 -0
  149. package/dist/core/extensions/runner.d.ts.map +1 -0
  150. package/dist/core/extensions/runner.js +824 -0
  151. package/dist/core/extensions/runner.js.map +1 -0
  152. package/dist/core/extensions/types.d.ts +1173 -0
  153. package/dist/core/extensions/types.d.ts.map +1 -0
  154. package/dist/core/extensions/types.js +45 -0
  155. package/dist/core/extensions/types.js.map +1 -0
  156. package/dist/core/extensions/wrapper.d.ts +20 -0
  157. package/dist/core/extensions/wrapper.d.ts.map +1 -0
  158. package/dist/core/extensions/wrapper.js +22 -0
  159. package/dist/core/extensions/wrapper.js.map +1 -0
  160. package/dist/core/footer-data-provider.d.ts +72 -0
  161. package/dist/core/footer-data-provider.d.ts.map +1 -0
  162. package/dist/core/footer-data-provider.js +374 -0
  163. package/dist/core/footer-data-provider.js.map +1 -0
  164. package/dist/core/identity.d.ts +8 -0
  165. package/dist/core/identity.d.ts.map +1 -0
  166. package/dist/core/identity.js +8 -0
  167. package/dist/core/identity.js.map +1 -0
  168. package/dist/core/index.d.ts +12 -0
  169. package/dist/core/index.d.ts.map +1 -0
  170. package/dist/core/index.js +12 -0
  171. package/dist/core/index.js.map +1 -0
  172. package/dist/core/keybindings.d.ts +353 -0
  173. package/dist/core/keybindings.d.ts.map +1 -0
  174. package/dist/core/keybindings.js +295 -0
  175. package/dist/core/keybindings.js.map +1 -0
  176. package/dist/core/memory/adr/adr-candidates.d.ts +15 -0
  177. package/dist/core/memory/adr/adr-candidates.d.ts.map +1 -0
  178. package/dist/core/memory/adr/adr-candidates.js +63 -0
  179. package/dist/core/memory/adr/adr-candidates.js.map +1 -0
  180. package/dist/core/memory/adr/adr-format.d.ts +31 -0
  181. package/dist/core/memory/adr/adr-format.d.ts.map +1 -0
  182. package/dist/core/memory/adr/adr-format.js +138 -0
  183. package/dist/core/memory/adr/adr-format.js.map +1 -0
  184. package/dist/core/memory/adr/adr-service.d.ts +19 -0
  185. package/dist/core/memory/adr/adr-service.d.ts.map +1 -0
  186. package/dist/core/memory/adr/adr-service.js +63 -0
  187. package/dist/core/memory/adr/adr-service.js.map +1 -0
  188. package/dist/core/memory/adr/index.d.ts +4 -0
  189. package/dist/core/memory/adr/index.d.ts.map +1 -0
  190. package/dist/core/memory/adr/index.js +4 -0
  191. package/dist/core/memory/adr/index.js.map +1 -0
  192. package/dist/core/memory/content-ref.d.ts +22 -0
  193. package/dist/core/memory/content-ref.d.ts.map +1 -0
  194. package/dist/core/memory/content-ref.js +34 -0
  195. package/dist/core/memory/content-ref.js.map +1 -0
  196. package/dist/core/memory/context/context-candidates.d.ts +9 -0
  197. package/dist/core/memory/context/context-candidates.d.ts.map +1 -0
  198. package/dist/core/memory/context/context-candidates.js +64 -0
  199. package/dist/core/memory/context/context-candidates.js.map +1 -0
  200. package/dist/core/memory/context/context-diagnostics.d.ts +12 -0
  201. package/dist/core/memory/context/context-diagnostics.d.ts.map +1 -0
  202. package/dist/core/memory/context/context-diagnostics.js +50 -0
  203. package/dist/core/memory/context/context-diagnostics.js.map +1 -0
  204. package/dist/core/memory/context/context-format.d.ts +41 -0
  205. package/dist/core/memory/context/context-format.d.ts.map +1 -0
  206. package/dist/core/memory/context/context-format.js +199 -0
  207. package/dist/core/memory/context/context-format.js.map +1 -0
  208. package/dist/core/memory/context/index.d.ts +4 -0
  209. package/dist/core/memory/context/index.d.ts.map +1 -0
  210. package/dist/core/memory/context/index.js +4 -0
  211. package/dist/core/memory/context/index.js.map +1 -0
  212. package/dist/core/memory/context-pressure.d.ts +15 -0
  213. package/dist/core/memory/context-pressure.d.ts.map +1 -0
  214. package/dist/core/memory/context-pressure.js +36 -0
  215. package/dist/core/memory/context-pressure.js.map +1 -0
  216. package/dist/core/memory/continuity-import.d.ts +6 -0
  217. package/dist/core/memory/continuity-import.d.ts.map +1 -0
  218. package/dist/core/memory/continuity-import.js +63 -0
  219. package/dist/core/memory/continuity-import.js.map +1 -0
  220. package/dist/core/memory/dedupe.d.ts +10 -0
  221. package/dist/core/memory/dedupe.d.ts.map +1 -0
  222. package/dist/core/memory/dedupe.js +36 -0
  223. package/dist/core/memory/dedupe.js.map +1 -0
  224. package/dist/core/memory/embedding-adapter.d.ts +20 -0
  225. package/dist/core/memory/embedding-adapter.d.ts.map +1 -0
  226. package/dist/core/memory/embedding-adapter.js +11 -0
  227. package/dist/core/memory/embedding-adapter.js.map +1 -0
  228. package/dist/core/memory/event-summary.d.ts +7 -0
  229. package/dist/core/memory/event-summary.d.ts.map +1 -0
  230. package/dist/core/memory/event-summary.js +23 -0
  231. package/dist/core/memory/event-summary.js.map +1 -0
  232. package/dist/core/memory/feature/feature-format.d.ts +30 -0
  233. package/dist/core/memory/feature/feature-format.d.ts.map +1 -0
  234. package/dist/core/memory/feature/feature-format.js +121 -0
  235. package/dist/core/memory/feature/feature-format.js.map +1 -0
  236. package/dist/core/memory/feature/index.d.ts +2 -0
  237. package/dist/core/memory/feature/index.d.ts.map +1 -0
  238. package/dist/core/memory/feature/index.js +2 -0
  239. package/dist/core/memory/feature/index.js.map +1 -0
  240. package/dist/core/memory/ignore.d.ts +5 -0
  241. package/dist/core/memory/ignore.d.ts.map +1 -0
  242. package/dist/core/memory/ignore.js +26 -0
  243. package/dist/core/memory/ignore.js.map +1 -0
  244. package/dist/core/memory/index.d.ts +21 -0
  245. package/dist/core/memory/index.d.ts.map +1 -0
  246. package/dist/core/memory/index.js +20 -0
  247. package/dist/core/memory/index.js.map +1 -0
  248. package/dist/core/memory/memory-anchors.d.ts +11 -0
  249. package/dist/core/memory/memory-anchors.d.ts.map +1 -0
  250. package/dist/core/memory/memory-anchors.js +35 -0
  251. package/dist/core/memory/memory-anchors.js.map +1 -0
  252. package/dist/core/memory/memory-identity.d.ts +11 -0
  253. package/dist/core/memory/memory-identity.d.ts.map +1 -0
  254. package/dist/core/memory/memory-identity.js +19 -0
  255. package/dist/core/memory/memory-identity.js.map +1 -0
  256. package/dist/core/memory/memory-retrieval.d.ts +55 -0
  257. package/dist/core/memory/memory-retrieval.d.ts.map +1 -0
  258. package/dist/core/memory/memory-retrieval.js +128 -0
  259. package/dist/core/memory/memory-retrieval.js.map +1 -0
  260. package/dist/core/memory/memory-schema.d.ts +11 -0
  261. package/dist/core/memory/memory-schema.d.ts.map +1 -0
  262. package/dist/core/memory/memory-schema.js +111 -0
  263. package/dist/core/memory/memory-schema.js.map +1 -0
  264. package/dist/core/memory/memory-service.d.ts +35 -0
  265. package/dist/core/memory/memory-service.d.ts.map +1 -0
  266. package/dist/core/memory/memory-service.js +125 -0
  267. package/dist/core/memory/memory-service.js.map +1 -0
  268. package/dist/core/memory/memory-store.d.ts +37 -0
  269. package/dist/core/memory/memory-store.d.ts.map +1 -0
  270. package/dist/core/memory/memory-store.js +109 -0
  271. package/dist/core/memory/memory-store.js.map +1 -0
  272. package/dist/core/memory/memory-types.d.ts +55 -0
  273. package/dist/core/memory/memory-types.d.ts.map +1 -0
  274. package/dist/core/memory/memory-types.js +2 -0
  275. package/dist/core/memory/memory-types.js.map +1 -0
  276. package/dist/core/memory/redaction.d.ts +4 -0
  277. package/dist/core/memory/redaction.d.ts.map +1 -0
  278. package/dist/core/memory/redaction.js +49 -0
  279. package/dist/core/memory/redaction.js.map +1 -0
  280. package/dist/core/memory/sqlite-memory-store.d.ts +30 -0
  281. package/dist/core/memory/sqlite-memory-store.d.ts.map +1 -0
  282. package/dist/core/memory/sqlite-memory-store.js +300 -0
  283. package/dist/core/memory/sqlite-memory-store.js.map +1 -0
  284. package/dist/core/memory/startup-order.d.ts +9 -0
  285. package/dist/core/memory/startup-order.d.ts.map +1 -0
  286. package/dist/core/memory/startup-order.js +39 -0
  287. package/dist/core/memory/startup-order.js.map +1 -0
  288. package/dist/core/messages.d.ts +77 -0
  289. package/dist/core/messages.d.ts.map +1 -0
  290. package/dist/core/messages.js +123 -0
  291. package/dist/core/messages.js.map +1 -0
  292. package/dist/core/model-registry.d.ts +150 -0
  293. package/dist/core/model-registry.d.ts.map +1 -0
  294. package/dist/core/model-registry.js +727 -0
  295. package/dist/core/model-registry.js.map +1 -0
  296. package/dist/core/model-resolver.d.ts +110 -0
  297. package/dist/core/model-resolver.d.ts.map +1 -0
  298. package/dist/core/model-resolver.js +494 -0
  299. package/dist/core/model-resolver.js.map +1 -0
  300. package/dist/core/output-guard.d.ts +6 -0
  301. package/dist/core/output-guard.d.ts.map +1 -0
  302. package/dist/core/output-guard.js +59 -0
  303. package/dist/core/output-guard.js.map +1 -0
  304. package/dist/core/package-manager.d.ts +198 -0
  305. package/dist/core/package-manager.d.ts.map +1 -0
  306. package/dist/core/package-manager.js +1961 -0
  307. package/dist/core/package-manager.js.map +1 -0
  308. package/dist/core/prompt-templates.d.ts +52 -0
  309. package/dist/core/prompt-templates.d.ts.map +1 -0
  310. package/dist/core/prompt-templates.js +250 -0
  311. package/dist/core/prompt-templates.js.map +1 -0
  312. package/dist/core/provider-display-names.d.ts +2 -0
  313. package/dist/core/provider-display-names.d.ts.map +1 -0
  314. package/dist/core/provider-display-names.js +32 -0
  315. package/dist/core/provider-display-names.js.map +1 -0
  316. package/dist/core/resolve-config-value.d.ts +23 -0
  317. package/dist/core/resolve-config-value.d.ts.map +1 -0
  318. package/dist/core/resolve-config-value.js +126 -0
  319. package/dist/core/resolve-config-value.js.map +1 -0
  320. package/dist/core/resource-loader.d.ts +194 -0
  321. package/dist/core/resource-loader.d.ts.map +1 -0
  322. package/dist/core/resource-loader.js +731 -0
  323. package/dist/core/resource-loader.js.map +1 -0
  324. package/dist/core/sdk.d.ts +107 -0
  325. package/dist/core/sdk.d.ts.map +1 -0
  326. package/dist/core/sdk.js +282 -0
  327. package/dist/core/sdk.js.map +1 -0
  328. package/dist/core/session-cwd.d.ts +19 -0
  329. package/dist/core/session-cwd.d.ts.map +1 -0
  330. package/dist/core/session-cwd.js +38 -0
  331. package/dist/core/session-cwd.js.map +1 -0
  332. package/dist/core/session-manager.d.ts +333 -0
  333. package/dist/core/session-manager.d.ts.map +1 -0
  334. package/dist/core/session-manager.js +1109 -0
  335. package/dist/core/session-manager.js.map +1 -0
  336. package/dist/core/settings-manager.d.ts +295 -0
  337. package/dist/core/settings-manager.d.ts.map +1 -0
  338. package/dist/core/settings-manager.js +842 -0
  339. package/dist/core/settings-manager.js.map +1 -0
  340. package/dist/core/skills.d.ts +60 -0
  341. package/dist/core/skills.d.ts.map +1 -0
  342. package/dist/core/skills.js +404 -0
  343. package/dist/core/skills.js.map +1 -0
  344. package/dist/core/slash-commands.d.ts +14 -0
  345. package/dist/core/slash-commands.d.ts.map +1 -0
  346. package/dist/core/slash-commands.js +32 -0
  347. package/dist/core/slash-commands.js.map +1 -0
  348. package/dist/core/source-info.d.ts +18 -0
  349. package/dist/core/source-info.d.ts.map +1 -0
  350. package/dist/core/source-info.js +19 -0
  351. package/dist/core/source-info.js.map +1 -0
  352. package/dist/core/system-prompt.d.ts +28 -0
  353. package/dist/core/system-prompt.d.ts.map +1 -0
  354. package/dist/core/system-prompt.js +120 -0
  355. package/dist/core/system-prompt.js.map +1 -0
  356. package/dist/core/telemetry.d.ts +3 -0
  357. package/dist/core/telemetry.d.ts.map +1 -0
  358. package/dist/core/telemetry.js +9 -0
  359. package/dist/core/telemetry.js.map +1 -0
  360. package/dist/core/timings.d.ts +8 -0
  361. package/dist/core/timings.d.ts.map +1 -0
  362. package/dist/core/timings.js +31 -0
  363. package/dist/core/timings.js.map +1 -0
  364. package/dist/core/tools/bash.d.ts +68 -0
  365. package/dist/core/tools/bash.d.ts.map +1 -0
  366. package/dist/core/tools/bash.js +335 -0
  367. package/dist/core/tools/bash.js.map +1 -0
  368. package/dist/core/tools/edit-diff.d.ts +85 -0
  369. package/dist/core/tools/edit-diff.d.ts.map +1 -0
  370. package/dist/core/tools/edit-diff.js +338 -0
  371. package/dist/core/tools/edit-diff.js.map +1 -0
  372. package/dist/core/tools/edit.d.ts +49 -0
  373. package/dist/core/tools/edit.d.ts.map +1 -0
  374. package/dist/core/tools/edit.js +324 -0
  375. package/dist/core/tools/edit.js.map +1 -0
  376. package/dist/core/tools/file-mutation-queue.d.ts +6 -0
  377. package/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
  378. package/dist/core/tools/file-mutation-queue.js +37 -0
  379. package/dist/core/tools/file-mutation-queue.js.map +1 -0
  380. package/dist/core/tools/find.d.ts +35 -0
  381. package/dist/core/tools/find.d.ts.map +1 -0
  382. package/dist/core/tools/find.js +298 -0
  383. package/dist/core/tools/find.js.map +1 -0
  384. package/dist/core/tools/grep.d.ts +37 -0
  385. package/dist/core/tools/grep.d.ts.map +1 -0
  386. package/dist/core/tools/grep.js +304 -0
  387. package/dist/core/tools/grep.js.map +1 -0
  388. package/dist/core/tools/index.d.ts +40 -0
  389. package/dist/core/tools/index.d.ts.map +1 -0
  390. package/dist/core/tools/index.js +112 -0
  391. package/dist/core/tools/index.js.map +1 -0
  392. package/dist/core/tools/ls.d.ts +37 -0
  393. package/dist/core/tools/ls.d.ts.map +1 -0
  394. package/dist/core/tools/ls.js +169 -0
  395. package/dist/core/tools/ls.js.map +1 -0
  396. package/dist/core/tools/output-accumulator.d.ts +50 -0
  397. package/dist/core/tools/output-accumulator.d.ts.map +1 -0
  398. package/dist/core/tools/output-accumulator.js +178 -0
  399. package/dist/core/tools/output-accumulator.js.map +1 -0
  400. package/dist/core/tools/path-utils.d.ts +8 -0
  401. package/dist/core/tools/path-utils.d.ts.map +1 -0
  402. package/dist/core/tools/path-utils.js +81 -0
  403. package/dist/core/tools/path-utils.js.map +1 -0
  404. package/dist/core/tools/read.d.ts +35 -0
  405. package/dist/core/tools/read.d.ts.map +1 -0
  406. package/dist/core/tools/read.js +288 -0
  407. package/dist/core/tools/read.js.map +1 -0
  408. package/dist/core/tools/render-utils.d.ts +21 -0
  409. package/dist/core/tools/render-utils.d.ts.map +1 -0
  410. package/dist/core/tools/render-utils.js +49 -0
  411. package/dist/core/tools/render-utils.js.map +1 -0
  412. package/dist/core/tools/tool-definition-wrapper.d.ts +14 -0
  413. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
  414. package/dist/core/tools/tool-definition-wrapper.js +34 -0
  415. package/dist/core/tools/tool-definition-wrapper.js.map +1 -0
  416. package/dist/core/tools/truncate.d.ts +70 -0
  417. package/dist/core/tools/truncate.d.ts.map +1 -0
  418. package/dist/core/tools/truncate.js +205 -0
  419. package/dist/core/tools/truncate.js.map +1 -0
  420. package/dist/core/tools/write.d.ts +26 -0
  421. package/dist/core/tools/write.d.ts.map +1 -0
  422. package/dist/core/tools/write.js +213 -0
  423. package/dist/core/tools/write.js.map +1 -0
  424. package/dist/index.d.ts +28 -0
  425. package/dist/index.d.ts.map +1 -0
  426. package/dist/index.js +41 -0
  427. package/dist/index.js.map +1 -0
  428. package/dist/main.d.ts +12 -0
  429. package/dist/main.d.ts.map +1 -0
  430. package/dist/main.js +583 -0
  431. package/dist/main.js.map +1 -0
  432. package/dist/migrations.d.ts +31 -0
  433. package/dist/migrations.d.ts.map +1 -0
  434. package/dist/migrations.js +279 -0
  435. package/dist/migrations.js.map +1 -0
  436. package/dist/modes/index.d.ts +9 -0
  437. package/dist/modes/index.d.ts.map +1 -0
  438. package/dist/modes/index.js +8 -0
  439. package/dist/modes/index.js.map +1 -0
  440. package/dist/modes/interactive/assets/clankolas.png +0 -0
  441. package/dist/modes/interactive/components/armin.d.ts +34 -0
  442. package/dist/modes/interactive/components/armin.d.ts.map +1 -0
  443. package/dist/modes/interactive/components/armin.js +333 -0
  444. package/dist/modes/interactive/components/armin.js.map +1 -0
  445. package/dist/modes/interactive/components/assistant-message.d.ts +20 -0
  446. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
  447. package/dist/modes/interactive/components/assistant-message.js +122 -0
  448. package/dist/modes/interactive/components/assistant-message.js.map +1 -0
  449. package/dist/modes/interactive/components/bash-execution.d.ts +36 -0
  450. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
  451. package/dist/modes/interactive/components/bash-execution.js +182 -0
  452. package/dist/modes/interactive/components/bash-execution.js.map +1 -0
  453. package/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
  454. package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
  455. package/dist/modes/interactive/components/bordered-loader.js +54 -0
  456. package/dist/modes/interactive/components/bordered-loader.js.map +1 -0
  457. package/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
  458. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
  459. package/dist/modes/interactive/components/branch-summary-message.js +44 -0
  460. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
  461. package/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
  462. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
  463. package/dist/modes/interactive/components/compaction-summary-message.js +45 -0
  464. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
  465. package/dist/modes/interactive/components/config-selector.d.ts +71 -0
  466. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
  467. package/dist/modes/interactive/components/config-selector.js +481 -0
  468. package/dist/modes/interactive/components/config-selector.js.map +1 -0
  469. package/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
  470. package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
  471. package/dist/modes/interactive/components/countdown-timer.js +33 -0
  472. package/dist/modes/interactive/components/countdown-timer.js.map +1 -0
  473. package/dist/modes/interactive/components/custom-editor.d.ts +21 -0
  474. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
  475. package/dist/modes/interactive/components/custom-editor.js +70 -0
  476. package/dist/modes/interactive/components/custom-editor.js.map +1 -0
  477. package/dist/modes/interactive/components/custom-message.d.ts +20 -0
  478. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
  479. package/dist/modes/interactive/components/custom-message.js +79 -0
  480. package/dist/modes/interactive/components/custom-message.js.map +1 -0
  481. package/dist/modes/interactive/components/daxnuts.d.ts +23 -0
  482. package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -0
  483. package/dist/modes/interactive/components/daxnuts.js +140 -0
  484. package/dist/modes/interactive/components/daxnuts.js.map +1 -0
  485. package/dist/modes/interactive/components/diff.d.ts +12 -0
  486. package/dist/modes/interactive/components/diff.d.ts.map +1 -0
  487. package/dist/modes/interactive/components/diff.js +133 -0
  488. package/dist/modes/interactive/components/diff.js.map +1 -0
  489. package/dist/modes/interactive/components/dynamic-border.d.ts +26 -0
  490. package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
  491. package/dist/modes/interactive/components/dynamic-border.js +58 -0
  492. package/dist/modes/interactive/components/dynamic-border.js.map +1 -0
  493. package/dist/modes/interactive/components/earendil-announcement.d.ts +5 -0
  494. package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -0
  495. package/dist/modes/interactive/components/earendil-announcement.js +40 -0
  496. package/dist/modes/interactive/components/earendil-announcement.js.map +1 -0
  497. package/dist/modes/interactive/components/extension-editor.d.ts +20 -0
  498. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
  499. package/dist/modes/interactive/components/extension-editor.js +111 -0
  500. package/dist/modes/interactive/components/extension-editor.js.map +1 -0
  501. package/dist/modes/interactive/components/extension-input.d.ts +23 -0
  502. package/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
  503. package/dist/modes/interactive/components/extension-input.js +61 -0
  504. package/dist/modes/interactive/components/extension-input.js.map +1 -0
  505. package/dist/modes/interactive/components/extension-selector.d.ts +24 -0
  506. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
  507. package/dist/modes/interactive/components/extension-selector.js +78 -0
  508. package/dist/modes/interactive/components/extension-selector.js.map +1 -0
  509. package/dist/modes/interactive/components/flexible-viewport-spacer.d.ts +10 -0
  510. package/dist/modes/interactive/components/flexible-viewport-spacer.d.ts.map +1 -0
  511. package/dist/modes/interactive/components/flexible-viewport-spacer.js +20 -0
  512. package/dist/modes/interactive/components/flexible-viewport-spacer.js.map +1 -0
  513. package/dist/modes/interactive/components/footer.d.ts +27 -0
  514. package/dist/modes/interactive/components/footer.d.ts.map +1 -0
  515. package/dist/modes/interactive/components/footer.js +272 -0
  516. package/dist/modes/interactive/components/footer.js.map +1 -0
  517. package/dist/modes/interactive/components/index.d.ts +32 -0
  518. package/dist/modes/interactive/components/index.d.ts.map +1 -0
  519. package/dist/modes/interactive/components/index.js +33 -0
  520. package/dist/modes/interactive/components/index.js.map +1 -0
  521. package/dist/modes/interactive/components/keybinding-hints.d.ts +8 -0
  522. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
  523. package/dist/modes/interactive/components/keybinding-hints.js +22 -0
  524. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
  525. package/dist/modes/interactive/components/login-dialog.d.ts +46 -0
  526. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
  527. package/dist/modes/interactive/components/login-dialog.js +160 -0
  528. package/dist/modes/interactive/components/login-dialog.js.map +1 -0
  529. package/dist/modes/interactive/components/model-selector.d.ts +47 -0
  530. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
  531. package/dist/modes/interactive/components/model-selector.js +271 -0
  532. package/dist/modes/interactive/components/model-selector.js.map +1 -0
  533. package/dist/modes/interactive/components/oauth-selector.d.ts +31 -0
  534. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
  535. package/dist/modes/interactive/components/oauth-selector.js +165 -0
  536. package/dist/modes/interactive/components/oauth-selector.js.map +1 -0
  537. package/dist/modes/interactive/components/scoped-models-selector.d.ts +42 -0
  538. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
  539. package/dist/modes/interactive/components/scoped-models-selector.js +290 -0
  540. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
  541. package/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
  542. package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
  543. package/dist/modes/interactive/components/session-selector-search.js +155 -0
  544. package/dist/modes/interactive/components/session-selector-search.js.map +1 -0
  545. package/dist/modes/interactive/components/session-selector.d.ts +96 -0
  546. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
  547. package/dist/modes/interactive/components/session-selector.js +861 -0
  548. package/dist/modes/interactive/components/session-selector.js.map +1 -0
  549. package/dist/modes/interactive/components/settings-selector.d.ts +73 -0
  550. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
  551. package/dist/modes/interactive/components/settings-selector.js +531 -0
  552. package/dist/modes/interactive/components/settings-selector.js.map +1 -0
  553. package/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
  554. package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
  555. package/dist/modes/interactive/components/show-images-selector.js +39 -0
  556. package/dist/modes/interactive/components/show-images-selector.js.map +1 -0
  557. package/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
  558. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
  559. package/dist/modes/interactive/components/skill-invocation-message.js +47 -0
  560. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
  561. package/dist/modes/interactive/components/split-info-card.d.ts +18 -0
  562. package/dist/modes/interactive/components/split-info-card.d.ts.map +1 -0
  563. package/dist/modes/interactive/components/split-info-card.js +82 -0
  564. package/dist/modes/interactive/components/split-info-card.js.map +1 -0
  565. package/dist/modes/interactive/components/theme-selector.d.ts +11 -0
  566. package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
  567. package/dist/modes/interactive/components/theme-selector.js +50 -0
  568. package/dist/modes/interactive/components/theme-selector.js.map +1 -0
  569. package/dist/modes/interactive/components/thinking-selector.d.ts +11 -0
  570. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
  571. package/dist/modes/interactive/components/thinking-selector.js +51 -0
  572. package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
  573. package/dist/modes/interactive/components/tool-execution.d.ts +66 -0
  574. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
  575. package/dist/modes/interactive/components/tool-execution.js +313 -0
  576. package/dist/modes/interactive/components/tool-execution.js.map +1 -0
  577. package/dist/modes/interactive/components/tree-selector.d.ts +89 -0
  578. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
  579. package/dist/modes/interactive/components/tree-selector.js +1092 -0
  580. package/dist/modes/interactive/components/tree-selector.js.map +1 -0
  581. package/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
  582. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
  583. package/dist/modes/interactive/components/user-message-selector.js +114 -0
  584. package/dist/modes/interactive/components/user-message-selector.js.map +1 -0
  585. package/dist/modes/interactive/components/user-message.d.ts +10 -0
  586. package/dist/modes/interactive/components/user-message.d.ts.map +1 -0
  587. package/dist/modes/interactive/components/user-message.js +29 -0
  588. package/dist/modes/interactive/components/user-message.js.map +1 -0
  589. package/dist/modes/interactive/components/visual-truncate.d.ts +24 -0
  590. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
  591. package/dist/modes/interactive/components/visual-truncate.js +33 -0
  592. package/dist/modes/interactive/components/visual-truncate.js.map +1 -0
  593. package/dist/modes/interactive/interactive-mode.d.ts +369 -0
  594. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
  595. package/dist/modes/interactive/interactive-mode.js +4899 -0
  596. package/dist/modes/interactive/interactive-mode.js.map +1 -0
  597. package/dist/modes/interactive/theme/dark.json +85 -0
  598. package/dist/modes/interactive/theme/light.json +84 -0
  599. package/dist/modes/interactive/theme/theme-schema.json +335 -0
  600. package/dist/modes/interactive/theme/theme.d.ts +81 -0
  601. package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
  602. package/dist/modes/interactive/theme/theme.js +971 -0
  603. package/dist/modes/interactive/theme/theme.js.map +1 -0
  604. package/dist/modes/print-mode.d.ts +28 -0
  605. package/dist/modes/print-mode.d.ts.map +1 -0
  606. package/dist/modes/print-mode.js +131 -0
  607. package/dist/modes/print-mode.js.map +1 -0
  608. package/dist/modes/rpc/jsonl.d.ts +17 -0
  609. package/dist/modes/rpc/jsonl.d.ts.map +1 -0
  610. package/dist/modes/rpc/jsonl.js +49 -0
  611. package/dist/modes/rpc/jsonl.js.map +1 -0
  612. package/dist/modes/rpc/rpc-client.d.ts +224 -0
  613. package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
  614. package/dist/modes/rpc/rpc-client.js +410 -0
  615. package/dist/modes/rpc/rpc-client.js.map +1 -0
  616. package/dist/modes/rpc/rpc-mode.d.ts +20 -0
  617. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
  618. package/dist/modes/rpc/rpc-mode.js +601 -0
  619. package/dist/modes/rpc/rpc-mode.js.map +1 -0
  620. package/dist/modes/rpc/rpc-types.d.ts +419 -0
  621. package/dist/modes/rpc/rpc-types.d.ts.map +1 -0
  622. package/dist/modes/rpc/rpc-types.js +8 -0
  623. package/dist/modes/rpc/rpc-types.js.map +1 -0
  624. package/dist/package-manager-cli.d.ts +4 -0
  625. package/dist/package-manager-cli.d.ts.map +1 -0
  626. package/dist/package-manager-cli.js +460 -0
  627. package/dist/package-manager-cli.js.map +1 -0
  628. package/dist/utils/changelog.d.ts +21 -0
  629. package/dist/utils/changelog.d.ts.map +1 -0
  630. package/dist/utils/changelog.js +87 -0
  631. package/dist/utils/changelog.js.map +1 -0
  632. package/dist/utils/child-process.d.ts +12 -0
  633. package/dist/utils/child-process.d.ts.map +1 -0
  634. package/dist/utils/child-process.js +86 -0
  635. package/dist/utils/child-process.js.map +1 -0
  636. package/dist/utils/clipboard-image.d.ts +11 -0
  637. package/dist/utils/clipboard-image.d.ts.map +1 -0
  638. package/dist/utils/clipboard-image.js +245 -0
  639. package/dist/utils/clipboard-image.js.map +1 -0
  640. package/dist/utils/clipboard-native.d.ts +8 -0
  641. package/dist/utils/clipboard-native.d.ts.map +1 -0
  642. package/dist/utils/clipboard-native.js +14 -0
  643. package/dist/utils/clipboard-native.js.map +1 -0
  644. package/dist/utils/clipboard-text.d.ts +4 -0
  645. package/dist/utils/clipboard-text.d.ts.map +1 -0
  646. package/dist/utils/clipboard-text.js +37 -0
  647. package/dist/utils/clipboard-text.js.map +1 -0
  648. package/dist/utils/clipboard.d.ts +2 -0
  649. package/dist/utils/clipboard.d.ts.map +1 -0
  650. package/dist/utils/clipboard.js +117 -0
  651. package/dist/utils/clipboard.js.map +1 -0
  652. package/dist/utils/exif-orientation.d.ts +5 -0
  653. package/dist/utils/exif-orientation.d.ts.map +1 -0
  654. package/dist/utils/exif-orientation.js +158 -0
  655. package/dist/utils/exif-orientation.js.map +1 -0
  656. package/dist/utils/frontmatter.d.ts +8 -0
  657. package/dist/utils/frontmatter.d.ts.map +1 -0
  658. package/dist/utils/frontmatter.js +26 -0
  659. package/dist/utils/frontmatter.js.map +1 -0
  660. package/dist/utils/fs-watch.d.ts +5 -0
  661. package/dist/utils/fs-watch.d.ts.map +1 -0
  662. package/dist/utils/fs-watch.js +25 -0
  663. package/dist/utils/fs-watch.js.map +1 -0
  664. package/dist/utils/git.d.ts +26 -0
  665. package/dist/utils/git.d.ts.map +1 -0
  666. package/dist/utils/git.js +163 -0
  667. package/dist/utils/git.js.map +1 -0
  668. package/dist/utils/image-convert.d.ts +9 -0
  669. package/dist/utils/image-convert.d.ts.map +1 -0
  670. package/dist/utils/image-convert.js +39 -0
  671. package/dist/utils/image-convert.js.map +1 -0
  672. package/dist/utils/image-resize.d.ts +36 -0
  673. package/dist/utils/image-resize.d.ts.map +1 -0
  674. package/dist/utils/image-resize.js +137 -0
  675. package/dist/utils/image-resize.js.map +1 -0
  676. package/dist/utils/mime.d.ts +2 -0
  677. package/dist/utils/mime.d.ts.map +1 -0
  678. package/dist/utils/mime.js +26 -0
  679. package/dist/utils/mime.js.map +1 -0
  680. package/dist/utils/paths.d.ts +14 -0
  681. package/dist/utils/paths.d.ts.map +1 -0
  682. package/dist/utils/paths.js +34 -0
  683. package/dist/utils/paths.js.map +1 -0
  684. package/dist/utils/photon.d.ts +21 -0
  685. package/dist/utils/photon.d.ts.map +1 -0
  686. package/dist/utils/photon.js +121 -0
  687. package/dist/utils/photon.js.map +1 -0
  688. package/dist/utils/shell.d.ts +30 -0
  689. package/dist/utils/shell.d.ts.map +1 -0
  690. package/dist/utils/shell.js +190 -0
  691. package/dist/utils/shell.js.map +1 -0
  692. package/dist/utils/sleep.d.ts +5 -0
  693. package/dist/utils/sleep.d.ts.map +1 -0
  694. package/dist/utils/sleep.js +17 -0
  695. package/dist/utils/sleep.js.map +1 -0
  696. package/dist/utils/threadwell-user-agent.d.ts +2 -0
  697. package/dist/utils/threadwell-user-agent.d.ts.map +1 -0
  698. package/dist/utils/threadwell-user-agent.js +5 -0
  699. package/dist/utils/threadwell-user-agent.js.map +1 -0
  700. package/dist/utils/tools-manager.d.ts +3 -0
  701. package/dist/utils/tools-manager.d.ts.map +1 -0
  702. package/dist/utils/tools-manager.js +256 -0
  703. package/dist/utils/tools-manager.js.map +1 -0
  704. package/dist/utils/version-check.d.ts +14 -0
  705. package/dist/utils/version-check.d.ts.map +1 -0
  706. package/dist/utils/version-check.js +77 -0
  707. package/dist/utils/version-check.js.map +1 -0
  708. package/docs/compaction.md +394 -0
  709. package/docs/custom-provider.md +646 -0
  710. package/docs/development.md +71 -0
  711. package/docs/docs.json +148 -0
  712. package/docs/extensions.md +2596 -0
  713. package/docs/images/doom-extension.png +0 -0
  714. package/docs/images/exy.png +0 -0
  715. package/docs/images/interactive-mode.png +0 -0
  716. package/docs/images/tree-view.png +0 -0
  717. package/docs/index.md +64 -0
  718. package/docs/json.md +82 -0
  719. package/docs/keybindings.md +197 -0
  720. package/docs/memory.md +484 -0
  721. package/docs/models.md +474 -0
  722. package/docs/packages.md +223 -0
  723. package/docs/prompt-templates.md +88 -0
  724. package/docs/providers.md +241 -0
  725. package/docs/quickstart.md +142 -0
  726. package/docs/rpc.md +1407 -0
  727. package/docs/sdk.md +1149 -0
  728. package/docs/session-format.md +412 -0
  729. package/docs/sessions.md +137 -0
  730. package/docs/settings.md +378 -0
  731. package/docs/shell-aliases.md +13 -0
  732. package/docs/skills.md +232 -0
  733. package/docs/terminal-setup.md +106 -0
  734. package/docs/termux.md +127 -0
  735. package/docs/themes.md +295 -0
  736. package/docs/tmux.md +61 -0
  737. package/docs/tui.md +918 -0
  738. package/docs/usage.md +277 -0
  739. package/docs/windows.md +17 -0
  740. package/examples/README.md +25 -0
  741. package/examples/extensions/README.md +208 -0
  742. package/examples/extensions/auto-commit-on-exit.ts +49 -0
  743. package/examples/extensions/bash-spawn-hook.ts +30 -0
  744. package/examples/extensions/bookmark.ts +50 -0
  745. package/examples/extensions/border-status-editor.ts +147 -0
  746. package/examples/extensions/built-in-tool-renderer.ts +249 -0
  747. package/examples/extensions/claude-rules.ts +86 -0
  748. package/examples/extensions/commands.ts +72 -0
  749. package/examples/extensions/confirm-destructive.ts +59 -0
  750. package/examples/extensions/custom-compaction.ts +127 -0
  751. package/examples/extensions/custom-footer.ts +64 -0
  752. package/examples/extensions/custom-header.ts +73 -0
  753. package/examples/extensions/custom-provider-anthropic/index.ts +604 -0
  754. package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
  755. package/examples/extensions/custom-provider-anthropic/package.json +19 -0
  756. package/examples/extensions/custom-provider-gitlab-duo/index.ts +349 -0
  757. package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
  758. package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
  759. package/examples/extensions/dirty-repo-guard.ts +56 -0
  760. package/examples/extensions/doom-overlay/README.md +46 -0
  761. package/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
  762. package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
  763. package/examples/extensions/doom-overlay/doom/build.sh +152 -0
  764. package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +72 -0
  765. package/examples/extensions/doom-overlay/doom-component.ts +132 -0
  766. package/examples/extensions/doom-overlay/doom-engine.ts +173 -0
  767. package/examples/extensions/doom-overlay/doom-keys.ts +104 -0
  768. package/examples/extensions/doom-overlay/index.ts +74 -0
  769. package/examples/extensions/doom-overlay/wad-finder.ts +51 -0
  770. package/examples/extensions/dynamic-resources/SKILL.md +8 -0
  771. package/examples/extensions/dynamic-resources/dynamic.json +79 -0
  772. package/examples/extensions/dynamic-resources/dynamic.md +5 -0
  773. package/examples/extensions/dynamic-resources/index.ts +15 -0
  774. package/examples/extensions/dynamic-tools.ts +74 -0
  775. package/examples/extensions/event-bus.ts +43 -0
  776. package/examples/extensions/file-trigger.ts +41 -0
  777. package/examples/extensions/git-checkpoint.ts +53 -0
  778. package/examples/extensions/github-issue-autocomplete.ts +185 -0
  779. package/examples/extensions/handoff.ts +191 -0
  780. package/examples/extensions/hello.ts +26 -0
  781. package/examples/extensions/hidden-thinking-label.ts +53 -0
  782. package/examples/extensions/inline-bash.ts +94 -0
  783. package/examples/extensions/input-transform.ts +43 -0
  784. package/examples/extensions/interactive-shell.ts +196 -0
  785. package/examples/extensions/mac-system-theme.ts +47 -0
  786. package/examples/extensions/message-renderer.ts +59 -0
  787. package/examples/extensions/minimal-mode.ts +426 -0
  788. package/examples/extensions/modal-editor.ts +85 -0
  789. package/examples/extensions/model-status.ts +31 -0
  790. package/examples/extensions/notify.ts +55 -0
  791. package/examples/extensions/overlay-qa-tests.ts +1348 -0
  792. package/examples/extensions/overlay-test.ts +150 -0
  793. package/examples/extensions/permission-gate.ts +34 -0
  794. package/examples/extensions/pirate.ts +47 -0
  795. package/examples/extensions/plan-mode/README.md +65 -0
  796. package/examples/extensions/plan-mode/index.ts +340 -0
  797. package/examples/extensions/plan-mode/utils.ts +168 -0
  798. package/examples/extensions/preset.ts +436 -0
  799. package/examples/extensions/prompt-customizer.ts +97 -0
  800. package/examples/extensions/protected-paths.ts +30 -0
  801. package/examples/extensions/provider-payload.ts +18 -0
  802. package/examples/extensions/qna.ts +122 -0
  803. package/examples/extensions/question.ts +264 -0
  804. package/examples/extensions/questionnaire.ts +427 -0
  805. package/examples/extensions/rainbow-editor.ts +88 -0
  806. package/examples/extensions/reload-runtime.ts +37 -0
  807. package/examples/extensions/rpc-demo.ts +118 -0
  808. package/examples/extensions/sandbox/index.ts +321 -0
  809. package/examples/extensions/sandbox/package-lock.json +92 -0
  810. package/examples/extensions/sandbox/package.json +19 -0
  811. package/examples/extensions/send-user-message.ts +97 -0
  812. package/examples/extensions/session-name.ts +27 -0
  813. package/examples/extensions/shutdown-command.ts +63 -0
  814. package/examples/extensions/snake.ts +343 -0
  815. package/examples/extensions/space-invaders.ts +560 -0
  816. package/examples/extensions/ssh.ts +220 -0
  817. package/examples/extensions/status-line.ts +32 -0
  818. package/examples/extensions/structured-output.ts +65 -0
  819. package/examples/extensions/subagent/README.md +172 -0
  820. package/examples/extensions/subagent/agents/planner.md +37 -0
  821. package/examples/extensions/subagent/agents/reviewer.md +35 -0
  822. package/examples/extensions/subagent/agents/scout.md +50 -0
  823. package/examples/extensions/subagent/agents/worker.md +24 -0
  824. package/examples/extensions/subagent/agents.ts +126 -0
  825. package/examples/extensions/subagent/index.ts +987 -0
  826. package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
  827. package/examples/extensions/subagent/prompts/implement.md +10 -0
  828. package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
  829. package/examples/extensions/summarize.ts +206 -0
  830. package/examples/extensions/system-prompt-header.ts +17 -0
  831. package/examples/extensions/tic-tac-toe.ts +1008 -0
  832. package/examples/extensions/timed-confirm.ts +70 -0
  833. package/examples/extensions/titlebar-spinner.ts +58 -0
  834. package/examples/extensions/todo.ts +297 -0
  835. package/examples/extensions/tool-override.ts +144 -0
  836. package/examples/extensions/tools.ts +141 -0
  837. package/examples/extensions/trigger-compact.ts +50 -0
  838. package/examples/extensions/truncated-tool.ts +195 -0
  839. package/examples/extensions/widget-placement.ts +9 -0
  840. package/examples/extensions/with-deps/index.ts +32 -0
  841. package/examples/extensions/with-deps/package-lock.json +31 -0
  842. package/examples/extensions/with-deps/package.json +22 -0
  843. package/examples/extensions/working-indicator.ts +123 -0
  844. package/examples/extensions/working-message-test.ts +25 -0
  845. package/examples/rpc-extension-ui.ts +632 -0
  846. package/examples/sdk/01-minimal.ts +22 -0
  847. package/examples/sdk/02-custom-model.ts +49 -0
  848. package/examples/sdk/03-custom-prompt.ts +62 -0
  849. package/examples/sdk/04-skills.ts +55 -0
  850. package/examples/sdk/05-tools.ts +44 -0
  851. package/examples/sdk/06-extensions.ts +90 -0
  852. package/examples/sdk/07-context-files.ts +42 -0
  853. package/examples/sdk/08-prompt-templates.ts +51 -0
  854. package/examples/sdk/09-api-keys-and-oauth.ts +48 -0
  855. package/examples/sdk/10-settings.ts +53 -0
  856. package/examples/sdk/11-sessions.ts +48 -0
  857. package/examples/sdk/12-full-control.ts +73 -0
  858. package/examples/sdk/13-session-runtime.ts +67 -0
  859. package/examples/sdk/README.md +147 -0
  860. package/package.json +101 -33
  861. package/LICENSE +0 -21
package/README.md CHANGED
@@ -1,13 +1,668 @@
1
- # Threadwell
2
-
3
- Threadwell is a native continuity harness for long-running coding work.
4
-
5
- This package name is reserved for the upcoming Threadwell CLI.
6
-
7
- Planned command:
8
-
9
- ```bash
10
- thread
11
- ```
12
-
13
- Repository: https://github.com/EngramResearch/threadwell
1
+ <p align="center">
2
+ <a href="https://threadwell.local">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://threadwell.local/logo.svg">
5
+ <source media="(prefers-color-scheme: light)" srcset="https://huggingface.co/buckets/julien-c/my-training-bucket/resolve/threadwell-logo-dark.svg">
6
+ <img alt="thread logo" src="https://threadwell.local/logo.svg" width="128">
7
+ </picture>
8
+ </a>
9
+ </p>
10
+ <p align="center">
11
+ <a href="https://discord.com/invite/3cU7Bz4UPx"><img alt="Discord" src="https://img.shields.io/badge/discord-community-5865F2?style=flat-square&logo=discord&logoColor=white" /></a>
12
+ <a href="https://www.npmjs.com/package/threadwell"><img alt="npm" src="https://img.shields.io/npm/v/threadwell?style=flat-square" /></a>
13
+ <a href="local Threadwell source/actions/workflows/ci.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/Threadwell source/ci.yml?style=flat-square&branch=main" /></a>
14
+ </p>
15
+ <p align="center">
16
+ <a href="https://threadwell.local">threadwell.dev</a> domain graciously donated by
17
+ <br /><br />
18
+ <a href="https://exe.dev"><img src="docs/images/exy.png" alt="Exy mascot" width="48" /><br />exe.dev</a>
19
+ </p>
20
+
21
+ > New issues and PRs from new contributors are auto-closed by default. Maintainers review auto-closed issues daily. See [CONTRIBUTING.md](../../CONTRIBUTING.md).
22
+
23
+ ---
24
+
25
+ Threadwell is a minimal terminal coding harness. Adapt Threadwell to your workflows, not the other way around, without having to fork and modify Threadwell internals. Extend it with TypeScript [Extensions](#extensions), [Skills](#skills), [Prompt Templates](#prompt-templates), and [Themes](#themes). Put your extensions, skills, prompt templates, and themes in [Threadwell Packages](#threadwell-packages) and share them with others via npm or git.
26
+
27
+ Threadwell ships with powerful defaults but skips features like sub agents and plan mode. Instead, you can ask Threadwell to build what you want or install a third party Threadwell package that matches your workflow.
28
+
29
+ Threadwell runs in four modes: interactive, print or JSON, RPC for process integration, and an SDK for embedding in your own apps. See [openclaw/openclaw](https://github.com/openclaw/openclaw) for a real-world SDK integration.
30
+
31
+ ## Share your OSS coding agent sessions
32
+
33
+ If you use Threadwell for open source work, please share your coding agent sessions.
34
+
35
+ Public OSS session data helps improve models, prompts, tools, and evaluations using real development workflows.
36
+
37
+ For the full explanation, see [this post on X](https://x.com/badlogicgames/status/2037811643774652911).
38
+
39
+ To publish sessions, use [`badlogic/threadwell-share-hf`](https://github.com/badlogic/threadwell-share-hf). Read its README.md for setup instructions. All you need is a Hugging Face account, the Hugging Face CLI, and `threadwell-share-hf`.
40
+
41
+ You can also watch [this video](https://x.com/badlogicgames/status/2041151967695634619), where I show how I publish my `thread` sessions.
42
+
43
+ I regularly publish my own `thread` work sessions here:
44
+
45
+ - [badlogicgames/threadwell on Hugging Face](https://huggingface.co/datasets/badlogicgames/threadwell)
46
+
47
+ ## Table of Contents
48
+
49
+ - [Quick Start](#quick-start)
50
+ - [Providers & Models](#providers--models)
51
+ - [Interactive Mode](#interactive-mode)
52
+ - [Editor](#editor)
53
+ - [Commands](#commands)
54
+ - [Keyboard Shortcuts](#keyboard-shortcuts)
55
+ - [Message Queue](#message-queue)
56
+ - [Sessions](#sessions)
57
+ - [Branching](#branching)
58
+ - [Compaction](#compaction)
59
+ - [Settings](#settings)
60
+ - [Context Files](#context-files)
61
+ - [Customization](#customization)
62
+ - [Prompt Templates](#prompt-templates)
63
+ - [Skills](#skills)
64
+ - [Extensions](#extensions)
65
+ - [Themes](#themes)
66
+ - [Threadwell Packages](#threadwell-packages)
67
+ - [Programmatic Usage](#programmatic-usage)
68
+ - [Philosophy](#philosophy)
69
+ - [CLI Reference](#cli-reference)
70
+
71
+ ---
72
+
73
+ ## Quick Start
74
+
75
+ ```bash
76
+ npm install -g threadwell
77
+ ```
78
+
79
+ Authenticate with an API key:
80
+
81
+ ```bash
82
+ export ANTHROPIC_API_KEY=sk-ant-...
83
+ thread
84
+ ```
85
+
86
+ Or use your existing subscription:
87
+
88
+ ```bash
89
+ thread
90
+ /login # Then select provider
91
+ ```
92
+
93
+ Then just talk to Threadwell. By default, Threadwell gives the model four tools: `read`, `write`, `edit`, and `bash`. The model uses these to fulfill your requests. Add capabilities via [skills](#skills), [prompt templates](#prompt-templates), [extensions](#extensions), or [thread packages](#threadwell-packages).
94
+
95
+ **Platform notes:** [Windows](docs/windows.md) | [Termux (Android)](docs/termux.md) | [tmux](docs/tmux.md) | [Terminal setup](docs/terminal-setup.md) | [Shell aliases](docs/shell-aliases.md)
96
+
97
+ ---
98
+
99
+ ## Providers & Models
100
+
101
+ For each built-in provider, Threadwell maintains a list of tool-capable models, updated with every release. Authenticate via subscription (`/login`) or API key, then select any model from that provider via `/model` (or Ctrl+L).
102
+
103
+ **Subscriptions:**
104
+ - Anthropic Claude Pro/Max
105
+ - OpenAI ChatGPT Plus/Pro (Codex)
106
+ - GitHub Copilot
107
+
108
+ **API keys:**
109
+ - Anthropic
110
+ - OpenAI
111
+ - Azure OpenAI
112
+ - DeepSeek
113
+ - Google Gemini
114
+ - Google Vertex
115
+ - Amazon Bedrock
116
+ - Mistral
117
+ - Groq
118
+ - Cerebras
119
+ - Cloudflare AI Gateway
120
+ - Cloudflare Workers AI
121
+ - xAI
122
+ - OpenRouter
123
+ - Vercel AI Gateway
124
+ - ZAI
125
+ - OpenCode Zen
126
+ - OpenCode Go
127
+ - Hugging Face
128
+ - Fireworks
129
+ - Kimi For Coding
130
+ - MiniMax
131
+ - Xiaomi MiMo
132
+ - Xiaomi MiMo Token Plan (China)
133
+ - Xiaomi MiMo Token Plan (Amsterdam)
134
+ - Xiaomi MiMo Token Plan (Singapore)
135
+
136
+ See [docs/providers.md](docs/providers.md) for detailed setup instructions.
137
+
138
+ **Custom providers & models:** Add providers via `~/.threadwell/agent/models.json` if they speak a supported API (OpenAI, Anthropic, Google). For custom APIs or OAuth, use extensions. See [docs/models.md](docs/models.md) and [docs/custom-provider.md](docs/custom-provider.md).
139
+
140
+ ---
141
+
142
+ ## Interactive Mode
143
+
144
+ <p align="center"><img src="docs/images/interactive-mode.png" alt="Interactive Mode" width="600"></p>
145
+
146
+ The interface from top to bottom:
147
+
148
+ - **Startup header** - Shows shortcuts (`/hotkeys` for all), loaded AGENTS.md files, prompt templates, skills, and extensions
149
+ - **Messages** - Your messages, assistant responses, tool calls and results, notifications, errors, and extension UI
150
+ - **Editor** - Where you type; border color indicates thinking level
151
+ - **Footer** - Working directory, session name, total token/cache usage, cost, context usage, current model
152
+
153
+ The editor can be temporarily replaced by other UI, like built-in `/settings` or custom UI from extensions (e.g., a Q&A tool that lets the user answer model questions in a structured format). [Extensions](#extensions) can also replace the editor, add widgets above/below it, a status line, custom footer, or overlays.
154
+
155
+ ### Editor
156
+
157
+ | Feature | How |
158
+ |---------|-----|
159
+ | File reference | Type `@` to fuzzy-search project files |
160
+ | Path completion | Tab to complete paths |
161
+ | Multi-line | Shift+Enter (or Ctrl+Enter on Windows Terminal) |
162
+ | Images | Ctrl+V to paste (Alt+V on Windows), or drag onto terminal |
163
+ | Bash commands | `!command` runs and sends output to LLM, `!!command` runs without sending |
164
+
165
+ Standard editing keybindings for delete word, undo, etc. See [docs/keybindings.md](docs/keybindings.md).
166
+
167
+ ### Commands
168
+
169
+ Type `/` in the editor to trigger commands. [Extensions](#extensions) can register custom commands, [skills](#skills) are available as `/skill:name`, and [prompt templates](#prompt-templates) expand via `/templatename`.
170
+
171
+ | Command | Description |
172
+ |---------|-------------|
173
+ | `/login`, `/logout` | OAuth authentication |
174
+ | `/model` | Switch models |
175
+ | `/scoped-models` | Enable/disable models for Ctrl+P cycling |
176
+ | `/settings` | Thinking level, theme, message delivery, transport |
177
+ | `/resume` | Pick from previous sessions |
178
+ | `/new` | Start a new session |
179
+ | `/name <name>` | Set session display name |
180
+ | `/session` | Show session info (file, ID, messages, tokens, cost) |
181
+ | `/memory ...` | Inspect/manage Threadwell memory: status, search, recent, why, doctor, export, forget, purge |
182
+ | `/context ...` | Review and manage `CONTEXT.md` semantic candidates |
183
+ | `/adr ...` | Review and manage architecture decision records |
184
+ | `/review` | Open Threadwell review selector for context and ADR candidates |
185
+ | `/feature ...` | Create and inspect Threadwell Feature Packets |
186
+ | `/queue [long]` | Show active continuity queue tasks |
187
+ | `/tree` | Jump to any point in the session and continue from there |
188
+ | `/fork` | Create a new session from a previous user message |
189
+ | `/clone` | Duplicate the current active branch into a new session |
190
+ | `/compact [prompt]` | Manually compact context, optional custom instructions |
191
+ | `/copy` | Copy last assistant message to clipboard |
192
+ | `/export [file]` | Export session to HTML file |
193
+ | `/share` | Upload as private GitHub gist with shareable HTML link |
194
+ | `/reload` | Reload keybindings, extensions, skills, prompts, and context files (themes hot-reload automatically) |
195
+ | `/hotkeys` | Show all keyboard shortcuts |
196
+ | `/changelog` | Display version history |
197
+ | `/quit` | Quit Threadwell |
198
+
199
+ ### Keyboard Shortcuts
200
+
201
+ See `/hotkeys` for the full list. Customize via `~/.threadwell/agent/keybindings.json`. See [docs/keybindings.md](docs/keybindings.md).
202
+
203
+ **Commonly used:**
204
+
205
+ | Key | Action |
206
+ |-----|--------|
207
+ | Ctrl+C | Clear editor |
208
+ | Ctrl+C twice | Quit |
209
+ | Escape | Cancel/abort |
210
+ | Escape twice | Open `/tree` |
211
+ | Ctrl+L | Open model selector |
212
+ | Ctrl+P / Shift+Ctrl+P | Cycle scoped models forward/backward |
213
+ | Shift+Tab | Cycle thinking level |
214
+ | Ctrl+O | Collapse/expand tool output |
215
+ | Ctrl+T | Collapse/expand thinking blocks |
216
+
217
+ ### Message Queue
218
+
219
+ Submit messages while the agent is working:
220
+
221
+ - **Enter** queues a *steering* message, delivered after the current assistant turn finishes executing its tool calls
222
+ - **Alt+Enter** queues a *follow-up* message, delivered only after the agent finishes all work
223
+ - **Escape** aborts and restores queued messages to editor
224
+ - **Alt+Up** retrieves queued messages back to editor
225
+
226
+ On Windows Terminal, `Alt+Enter` is fullscreen by default. Remap it in [docs/terminal-setup.md](docs/terminal-setup.md) so Threadwell can receive the follow-up shortcut.
227
+
228
+ Configure delivery in [settings](docs/settings.md): `steeringMode` and `followUpMode` can be `"one-at-a-time"` (default, waits for response) or `"all"` (delivers all queued at once). `transport` selects provider transport preference (`"sse"`, `"websocket"`, or `"auto"`) for providers that support multiple transports.
229
+
230
+ ---
231
+
232
+ ## Sessions
233
+
234
+ Sessions are stored as JSONL files with a tree structure. Each entry has an `id` and `parentId`, enabling in-place branching without creating new files. See [docs/session-format.md](docs/session-format.md) for file format.
235
+
236
+ ### Management
237
+
238
+ Sessions auto-save to `~/.threadwell/agent/sessions/` organized by working directory.
239
+
240
+ ```bash
241
+ thread -c # Continue most recent session
242
+ thread -r # Browse and select from past sessions
243
+ thread --no-session # Ephemeral mode (don't save)
244
+ thread --session <path|id> # Use specific session file or ID
245
+ thread --fork <path|id> # Fork specific session file or ID into a new session
246
+ ```
247
+
248
+ Use `/session` in interactive mode to see the current session ID before reusing it with `--session <id>` or `--fork <id>`.
249
+
250
+ ### Branching
251
+
252
+ **`/tree`** - Navigate the session tree in-place. Select any previous point, continue from there, and switch between branches. All history preserved in a single file.
253
+
254
+ <p align="center"><img src="docs/images/tree-view.png" alt="Tree View" width="600"></p>
255
+
256
+ - Search by typing, fold/unfold and jump between branches with Ctrl+←/Ctrl+→ or Alt+←/Alt+→, page with ←/→
257
+ - Filter modes (Ctrl+O): default → no-tools → user-only → labeled-only → all
258
+ - Press Shift+L to label entries as bookmarks and Shift+T to toggle label timestamps
259
+
260
+ **`/fork`** - Create a new session file from a previous user message on the active branch. Opens a selector, copies the active path up to that point, and places the selected prompt in the editor for modification.
261
+
262
+ **`/clone`** - Duplicate the current active branch into a new session file at the current position. The new session keeps the full active-path history and opens with an empty editor.
263
+
264
+ **`--fork <path|id>`** - Fork an existing session file or partial session UUID directly from the CLI. This copies the full source session into a new session file in the current project.
265
+
266
+ ### Compaction
267
+
268
+ Long sessions can exhaust context windows. Compaction summarizes older messages while keeping recent ones.
269
+
270
+ **Manual:** `/compact` or `/compact <custom instructions>`
271
+
272
+ **Automatic:** Enabled by default. Triggers on context overflow (recovers and retries) or when approaching the limit (proactive). Configure via `/settings` or `settings.json`.
273
+
274
+ Compaction is lossy. The full history remains in the JSONL file; use `/tree` to revisit. Customize compaction behavior via [extensions](#extensions). See [docs/compaction.md](docs/compaction.md) for internals.
275
+
276
+ ---
277
+
278
+ ## Settings
279
+
280
+ Use `/settings` to modify common options, or edit JSON files directly:
281
+
282
+ | Location | Scope |
283
+ |----------|-------|
284
+ | `~/.threadwell/agent/settings.json` | Global (all projects) |
285
+ | `.threadwell/settings.json` | Project (primary Threadwell path) |
286
+ | `.threadwell/settings.json` | Project compatibility fallback |
287
+
288
+ Project settings are resolved relative to the directory where Threadwell is launched. See [docs/settings.md](docs/settings.md) for all options.
289
+
290
+ ### Telemetry and update checks
291
+
292
+ Threadwell has two separate startup features:
293
+
294
+ - **Update check:** fetches `https://threadwell.local/api/latest-version` to check whether a newer Threadwell version exists. Disable it with `THREADWELL_SKIP_VERSION_CHECK=1`. Disabling update checks only turns off this check.
295
+ - **Install/update telemetry:** after first install or a changelog-detected update, sends an anonymous version ping to `https://threadwell.local/api/report-install`. Opt out by setting `enableInstallTelemetry` to `false` in `settings.json`, or by setting `THREADWELL_TELEMETRY=0`. This does not disable update checks; Threadwell may still contact `threadwell.dev` for the latest version unless update checks are disabled or offline mode is enabled.
296
+
297
+ Use `--offline` or `THREADWELL_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
298
+
299
+ ---
300
+
301
+ ## Context Files
302
+
303
+ Threadwell loads `AGENTS.md` (or `CLAUDE.md`) at startup from:
304
+ - `~/.threadwell/agent/AGENTS.md` (global)
305
+ - Parent directories (walking up from cwd)
306
+ - Current directory
307
+
308
+ Use for project instructions, conventions, common commands. All matching files are concatenated.
309
+
310
+ Disable context file loading with `--no-context-files` (or `-nc`).
311
+
312
+ ### System Prompt
313
+
314
+ Replace the default system prompt with `.threadwell/SYSTEM.md` (project) or `~/.threadwell/agent/SYSTEM.md` (global). Append without replacing via `APPEND_SYSTEM.md`.
315
+
316
+ ---
317
+
318
+ ## Customization
319
+
320
+ ### Prompt Templates
321
+
322
+ Reusable prompts as Markdown files. Type `/name` to expand.
323
+
324
+ ```markdown
325
+ <!-- ~/.threadwell/agent/prompts/review.md -->
326
+ Review this code for bugs, security issues, and performance problems.
327
+ Focus on: {{focus}}
328
+ ```
329
+
330
+ Place in `~/.threadwell/agent/prompts/`, `.threadwell/prompts/`, or a [thread package](#threadwell-packages) to share with others. See [docs/prompt-templates.md](docs/prompt-templates.md).
331
+
332
+ ### Skills
333
+
334
+ On-demand capability packages following the [Agent Skills standard](https://agentskills.io). Invoke via `/skill:name` or let the agent load them automatically.
335
+
336
+ ```markdown
337
+ <!-- ~/.threadwell/agent/skills/my-skill/SKILL.md -->
338
+ # My Skill
339
+ Use this skill when the user asks about X.
340
+
341
+ ## Steps
342
+ 1. Do this
343
+ 2. Then that
344
+ ```
345
+
346
+ Place in `~/.threadwell/agent/skills/`, `~/.agents/skills/`, `.threadwell/skills/`, or `.agents/skills/` (from `cwd` up through parent directories) or a [thread package](#threadwell-packages) to share with others. See [docs/skills.md](docs/skills.md).
347
+
348
+ ### Extensions
349
+
350
+ <p align="center"><img src="docs/images/doom-extension.png" alt="Doom Extension" width="600"></p>
351
+
352
+ TypeScript modules that extend Threadwell with custom tools, commands, keyboard shortcuts, event handlers, and UI components.
353
+
354
+ ```typescript
355
+ export default function (thread: ExtensionAPI) {
356
+ Threadwell.registerTool({ name: "deploy", ... });
357
+ Threadwell.registerCommand("stats", { ... });
358
+ Threadwell.on("tool_call", async (event, ctx) => { ... });
359
+ }
360
+ ```
361
+
362
+ The default export can also be `async`. Threadwell waits for async extension factories before startup continues, which is useful for one-time initialization such as fetching remote model lists before calling `threadwell.registerProvider()`.
363
+
364
+ **What's possible:**
365
+ - Custom tools (or replace built-in tools entirely)
366
+ - Sub-agents and plan mode
367
+ - Custom compaction and summarization
368
+ - Permission gates and path protection
369
+ - Custom editors and UI components
370
+ - Status lines, headers, footers
371
+ - Git checkpointing and auto-commit
372
+ - SSH and sandbox execution
373
+ - MCP server integration
374
+ - Make Threadwell look like Claude Code
375
+ - Games while waiting (yes, Doom runs)
376
+ - ...anything you can dream up
377
+
378
+ Place in `~/.threadwell/agent/extensions/`, `.threadwell/extensions/`, or a [thread package](#threadwell-packages) to share with others. See [docs/extensions.md](docs/extensions.md) and [examples/extensions/](examples/extensions/).
379
+
380
+ ### Themes
381
+
382
+ Built-in: `dark`, `light`. Themes hot-reload: modify the active theme file and Threadwell immediately applies changes.
383
+
384
+ Place in `~/.threadwell/agent/themes/`, `.threadwell/themes/`, or a [thread package](#threadwell-packages) to share with others. See [docs/themes.md](docs/themes.md).
385
+
386
+ ### Threadwell Packages
387
+
388
+ Bundle and share extensions, skills, prompts, and themes via npm or git. Find packages on [npmjs.com](https://www.npmjs.com/search?q=keywords%3Athreadwell-package) or [Discord](https://discord.com/channels/1456806362351669492/1457744485428629628).
389
+
390
+ > **Security:** Threadwell packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages.
391
+
392
+ ```bash
393
+ thread install npm:@foo/threadwell-tools
394
+ thread install npm:@foo/threadwell-tools@1.2.3 # pinned version
395
+ thread install git:github.com/user/repo
396
+ thread install git:github.com/user/repo@v1 # tag or commit
397
+ thread install git:git@github.com:user/repo
398
+ thread install git:git@github.com:user/repo@v1 # tag or commit
399
+ thread install https://github.com/user/repo
400
+ thread install https://github.com/user/repo@v1 # tag or commit
401
+ thread install ssh://git@github.com/user/repo
402
+ thread install ssh://git@github.com/user/repo@v1 # tag or commit
403
+ thread remove npm:@foo/threadwell-tools
404
+ thread uninstall npm:@foo/threadwell-tools # alias for remove
405
+ thread list
406
+ thread update # update Threadwell and packages (skips pinned packages)
407
+ thread update --extensions # update packages only
408
+ thread update --self # update Threadwell only
409
+ thread update --self --force # reinstall Threadwell even if current
410
+ thread update npm:@foo/threadwell-tools # update one package
411
+ thread config # enable/disable extensions, skills, prompts, themes
412
+ ```
413
+
414
+ Packages install to `~/.threadwell/agent/git/` (git) or global npm. Use `-l` for project-local installs (`.threadwell/git/`, `.threadwell/npm/`). Git packages install dependencies with `npm install --omit=dev` by default, so runtime deps must be listed under `dependencies`; when `npmCommand` is configured, git packages use plain `install` for compatibility with wrappers. If you use a Node version manager and want package installs to reuse a stable npm context, set `npmCommand` in `settings.json`, for example `["mise", "exec", "node@20", "--", "npm"]`.
415
+
416
+ Create a package by adding a `thread` key to `package.json`:
417
+
418
+ ```json
419
+ {
420
+ "name": "my-threadwell-package",
421
+ "keywords": ["threadwell-package"],
422
+ "threadwell": {
423
+ "extensions": ["./extensions"],
424
+ "skills": ["./skills"],
425
+ "prompts": ["./prompts"],
426
+ "themes": ["./themes"]
427
+ }
428
+ }
429
+ ```
430
+
431
+ Without a `thread` manifest, Threadwell auto-discovers from conventional directories (`extensions/`, `skills/`, `prompts/`, `themes/`).
432
+
433
+ See [docs/packages.md](docs/packages.md).
434
+
435
+ ---
436
+
437
+ ## Programmatic Usage
438
+
439
+ ### SDK
440
+
441
+ ```typescript
442
+ import { AuthStorage, createAgentSession, ModelRegistry, SessionManager } from "threadwell";
443
+
444
+ const authStorage = AuthStorage.create();
445
+ const modelRegistry = ModelRegistry.create(authStorage);
446
+ const { session } = await createAgentSession({
447
+ sessionManager: SessionManager.inMemory(),
448
+ authStorage,
449
+ modelRegistry,
450
+ });
451
+
452
+ await session.prompt("What files are in the current directory?");
453
+ ```
454
+
455
+ For advanced multi-session runtime replacement, use `createAgentSessionRuntime()` and `AgentSessionRuntime`.
456
+
457
+ See [docs/sdk.md](docs/sdk.md) and [examples/sdk/](examples/sdk/).
458
+
459
+ ### RPC Mode
460
+
461
+ For non-Node.js integrations, use RPC mode over stdin/stdout:
462
+
463
+ ```bash
464
+ thread --mode rpc
465
+ ```
466
+
467
+ RPC mode uses strict LF-delimited JSONL framing. Clients must split records on `\n` only. Do not use generic line readers like Node `readline`, which also split on Unicode separators inside JSON payloads.
468
+
469
+ See [docs/rpc.md](docs/rpc.md) for the protocol.
470
+
471
+ ---
472
+
473
+ ## Philosophy
474
+
475
+ Threadwell is aggressively extensible so it doesn't have to dictate your workflow. Features that other tools bake in can be built with [extensions](#extensions), [skills](#skills), or installed from third-party [thread packages](#threadwell-packages). This keeps the core minimal while letting you shape Threadwell to fit how you work.
476
+
477
+ **No MCP.** Build CLI tools with READMEs (see [Skills](#skills)), or build an extension that adds MCP support. [Why?](https://mariozechner.at/posts/2025-11-02-what-if-you-dont-need-mcp/)
478
+
479
+ **No sub-agents.** There's many ways to do this. Spawn Threadwell instances via tmux, or build your own with [extensions](#extensions), or install a package that does it your way.
480
+
481
+ **No permission popups.** Run in a container, or build your own confirmation flow with [extensions](#extensions) inline with your environment and security requirements.
482
+
483
+ **No plan mode.** Write plans to files, or build it with [extensions](#extensions), or install a package.
484
+
485
+ **No built-in to-dos.** They confuse models. Use a TODO.md file, or build your own with [extensions](#extensions).
486
+
487
+ **No background bash.** Use tmux. Full observability, direct interaction.
488
+
489
+ Read the [blog post](https://mariozechner.at/posts/2025-11-30-threadwell-coding-agent/) for the full rationale.
490
+
491
+ ---
492
+
493
+ ## CLI Reference
494
+
495
+ ```bash
496
+ thread [options] [@files...] [messages...]
497
+ ```
498
+
499
+ ### Package Commands
500
+
501
+ ```bash
502
+ thread install <source> [-l] # Install package, -l for project-local
503
+ thread remove <source> [-l] # Remove package
504
+ thread uninstall <source> [-l] # Alias for remove
505
+ thread update [source|self] # Update Threadwell and packages (skips pinned packages)
506
+ thread update --extensions # Update packages only
507
+ thread update --self # Update Threadwell only
508
+ thread update --self --force # Reinstall Threadwell even if current
509
+ thread update --extension <src> # Update one package
510
+ thread list # List installed packages
511
+ thread config # Enable/disable package resources
512
+ ```
513
+
514
+ ### Modes
515
+
516
+ | Flag | Description |
517
+ |------|-------------|
518
+ | (default) | Interactive mode |
519
+ | `-p`, `--print` | Print response and exit |
520
+ | `--mode json` | Output all events as JSON lines (see [docs/json.md](docs/json.md)) |
521
+ | `--mode rpc` | RPC mode for process integration (see [docs/rpc.md](docs/rpc.md)) |
522
+ | `--export <in> [out]` | Export session to HTML |
523
+
524
+ In print mode, Threadwell also reads piped stdin and merges it into the initial prompt:
525
+
526
+ ```bash
527
+ cat README.md | Threadwell -p "Summarize this text"
528
+ ```
529
+
530
+ ### Model Options
531
+
532
+ | Option | Description |
533
+ |--------|-------------|
534
+ | `--provider <name>` | Provider (anthropic, openai, google, etc.) |
535
+ | `--model <pattern>` | Model pattern or ID (supports `provider/id` and optional `:<thinking>`) |
536
+ | `--api-key <key>` | API key (overrides env vars) |
537
+ | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh` |
538
+ | `--models <patterns>` | Comma-separated patterns for Ctrl+P cycling |
539
+ | `--list-models [search]` | List available models |
540
+
541
+ ### Session Options
542
+
543
+ | Option | Description |
544
+ |--------|-------------|
545
+ | `-c`, `--continue` | Continue most recent session |
546
+ | `-r`, `--resume` | Browse and select session |
547
+ | `--session <path\|id>` | Use specific session file or partial UUID |
548
+ | `--fork <path\|id>` | Fork specific session file or partial UUID into a new session |
549
+ | `--session-dir <dir>` | Custom session storage directory |
550
+ | `--no-session` | Ephemeral mode (don't save) |
551
+
552
+ ### Tool Options
553
+
554
+ | Option | Description |
555
+ |--------|-------------|
556
+ | `--tools <list>`, `-t <list>` | Allowlist specific tool names across built-in, extension, and custom tools |
557
+ | `--no-builtin-tools`, `-nbt` | Disable built-in tools by default but keep extension/custom tools enabled |
558
+ | `--no-tools`, `-nt` | Disable all tools by default |
559
+
560
+ Available built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`
561
+
562
+ ### Resource Options
563
+
564
+ | Option | Description |
565
+ |--------|-------------|
566
+ | `-e`, `--extension <source>` | Load extension from path, npm, or git (repeatable) |
567
+ | `--no-extensions` | Disable extension discovery |
568
+ | `--skill <path>` | Load skill (repeatable) |
569
+ | `--no-skills` | Disable skill discovery |
570
+ | `--prompt-template <path>` | Load prompt template (repeatable) |
571
+ | `--no-prompt-templates` | Disable prompt template discovery |
572
+ | `--theme <path>` | Load theme (repeatable) |
573
+ | `--no-themes` | Disable theme discovery |
574
+ | `--no-context-files`, `-nc` | Disable AGENTS.md and CLAUDE.md context file discovery |
575
+
576
+ Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings.json (e.g., `--no-extensions -e ./my-ext.ts`).
577
+
578
+ ### Other Options
579
+
580
+ | Option | Description |
581
+ |--------|-------------|
582
+ | `--system-prompt <text>` | Replace default prompt (context files and skills still appended) |
583
+ | `--append-system-prompt <text>` | Append to system prompt |
584
+ | `--verbose` | Force verbose startup |
585
+ | `-h`, `--help` | Show help |
586
+ | `-v`, `--version` | Show version |
587
+
588
+ ### File Arguments
589
+
590
+ Prefix files with `@` to include in the message:
591
+
592
+ ```bash
593
+ thread @prompt.md "Answer this"
594
+ thread -p @screenshot.png "What's in this image?"
595
+ thread @code.ts @test.ts "Review these files"
596
+ ```
597
+
598
+ ### Examples
599
+
600
+ ```bash
601
+ # Interactive with initial prompt
602
+ thread "List all .ts files in src/"
603
+
604
+ # Non-interactive
605
+ thread -p "Summarize this codebase"
606
+
607
+ # Non-interactive with piped stdin
608
+ cat README.md | Threadwell -p "Summarize this text"
609
+
610
+ # Different model
611
+ thread --provider openai --model gpt-4o "Help me refactor"
612
+
613
+ # Model with provider prefix (no --provider needed)
614
+ thread --model openai/gpt-4o "Help me refactor"
615
+
616
+ # Model with thinking level shorthand
617
+ thread --model sonnet:high "Solve this complex problem"
618
+
619
+ # Limit model cycling
620
+ thread --models "claude-*,gpt-4o"
621
+
622
+ # Read-only mode
623
+ thread --tools read,grep,find,ls -p "Review the code"
624
+
625
+ # High thinking level
626
+ thread --thinking high "Solve this complex problem"
627
+ ```
628
+
629
+ ### Environment Variables
630
+
631
+ | Variable | Description |
632
+ |----------|-------------|
633
+ | `THREADWELL_CODING_AGENT_DIR` | Override config directory (default: `~/.threadwell/agent`) |
634
+ | `THREADWELL_CODING_AGENT_SESSION_DIR` | Override session storage directory (overridden by `--session-dir`) |
635
+ | `THREADWELL_PACKAGE_DIR` | Override package directory (useful for Nix/Guix where store paths tokenize poorly) |
636
+ | `THREADWELL_OFFLINE` | Disable startup network operations, including update checks, package update checks, and install/update telemetry |
637
+ | `THREADWELL_SKIP_VERSION_CHECK` | Skip the Threadwell version update check at startup. This prevents the `threadwell.dev` latest-version request |
638
+ | `THREADWELL_TELEMETRY` | Override install/update telemetry. Use `1`/`true`/`yes` to enable or `0`/`false`/`no` to disable. This does not disable update checks |
639
+ | `THREADWELL_CACHE_RETENTION` | Set to `long` for extended prompt cache (Anthropic: 1h, OpenAI: 24h) |
640
+ | `VISUAL`, `EDITOR` | External editor for Ctrl+G |
641
+
642
+ ---
643
+
644
+ ## Contributing & Development
645
+
646
+ See [CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines and [docs/development.md](docs/development.md) for setup, forking, and debugging.
647
+
648
+ ---
649
+
650
+ ## Repository and release policy
651
+
652
+ Threadwell's target repository is `EngramResearch/threadwell`. The `threadwell` npm package was reserved with a `0.0.0` placeholder and should only be replaced by an explicitly approved real release.
653
+
654
+ ## License
655
+
656
+ MIT. See the repository `LICENSE` and `NOTICE.md` files.
657
+
658
+ ## Attribution
659
+
660
+ Threadwell is derived from Pi, originally developed by Mario Zechner and contributors. Pi is licensed under the MIT License; the original copyright and license notice are preserved in this repository.
661
+
662
+ Original project: https://github.com/earendil-works/pi
663
+
664
+ ## See Also
665
+
666
+ - [@threadwell/ai](https://www.npmjs.com/package/@threadwell/ai): Core LLM toolkit
667
+ - [@threadwell/agent-core](https://www.npmjs.com/package/@threadwell/agent-core): Agent framework
668
+ - [@threadwell/tui](https://www.npmjs.com/package/@threadwell/tui): Terminal UI components
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map