@bastani/atomic 0.9.20-alpha.3 → 0.9.20-alpha.4

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 (763) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/README.md +15 -7
  3. package/dist/builtin/intercom/CHANGELOG.md +18 -0
  4. package/dist/builtin/intercom/README.md +2 -2
  5. package/dist/builtin/intercom/broker/send-handler.ts +59 -2
  6. package/dist/builtin/intercom/index.bundle.mjs +101 -16
  7. package/dist/builtin/intercom/package.json +3 -3
  8. package/dist/builtin/intercom/session-target.ts +34 -9
  9. package/dist/builtin/intercom/skills/intercom/SKILL.md +4 -4
  10. package/dist/builtin/mcp/CHANGELOG.md +13 -0
  11. package/dist/builtin/mcp/OAUTH.md +1 -1
  12. package/dist/builtin/mcp/README.md +3 -1
  13. package/dist/builtin/mcp/index.bundle.mjs +412 -64
  14. package/dist/builtin/mcp/package.json +3 -3
  15. package/dist/builtin/subagents/CHANGELOG.md +27 -0
  16. package/dist/builtin/subagents/README.md +2 -2
  17. package/dist/builtin/subagents/agents/code-simplifier.md +2 -3
  18. package/dist/builtin/subagents/agents/codebase-analyzer.md +2 -3
  19. package/dist/builtin/subagents/agents/codebase-locator.md +2 -3
  20. package/dist/builtin/subagents/agents/codebase-online-researcher.md +2 -3
  21. package/dist/builtin/subagents/agents/codebase-pattern-finder.md +2 -3
  22. package/dist/builtin/subagents/agents/codebase-research-analyzer.md +2 -3
  23. package/dist/builtin/subagents/agents/codebase-research-locator.md +2 -3
  24. package/dist/builtin/subagents/agents/debugger.md +1 -2
  25. package/dist/builtin/subagents/agents/worker.md +1 -2
  26. package/dist/builtin/subagents/package.json +4 -8
  27. package/dist/builtin/subagents/skills/subagent/SKILL.md +15 -13
  28. package/dist/builtin/subagents/src/extension/index.bundle.mjs +249 -63
  29. package/dist/builtin/web-access/CHANGELOG.md +12 -0
  30. package/dist/builtin/web-access/index.bundle.mjs +367 -295
  31. package/dist/builtin/web-access/package.json +3 -3
  32. package/dist/builtin/workflows/CHANGELOG.md +68 -0
  33. package/dist/builtin/workflows/README.md +29 -30
  34. package/dist/builtin/workflows/builtin/adversarial-verification.js +3 -3
  35. package/dist/builtin/workflows/builtin/{chunk-yeee2jrc.js → chunk-119kxb28.js} +5 -46
  36. package/dist/builtin/workflows/builtin/chunk-1dydq7w3.js +9722 -0
  37. package/dist/builtin/workflows/builtin/{chunk-31j2gs7h.js → chunk-9y0f90rd.js} +4 -6
  38. package/dist/builtin/workflows/builtin/{chunk-z29qbehr.js → chunk-d1xqh1rd.js} +4 -6
  39. package/dist/builtin/workflows/builtin/{chunk-zqtm1d2c.js → chunk-hnbbb5r0.js} +12 -217
  40. package/dist/builtin/workflows/builtin/{chunk-wf741bv3.js → chunk-k18g9me8.js} +4 -6
  41. package/dist/builtin/workflows/builtin/{chunk-g0csgs7w.js → chunk-kf5xpbkz.js} +8 -10
  42. package/dist/builtin/workflows/builtin/{chunk-a2kdsqn8.js → chunk-n4yxrsm9.js} +1 -1
  43. package/dist/builtin/workflows/builtin/{chunk-xtxcq5tj.js → chunk-n8g2da69.js} +17 -1
  44. package/dist/builtin/workflows/builtin/{chunk-fg9esgkj.js → chunk-scgprmdj.js} +4 -6
  45. package/dist/builtin/workflows/builtin/{chunk-6w6cvk6b.js → chunk-sn5mchnx.js} +4 -6
  46. package/dist/builtin/workflows/builtin/{chunk-ewkkkbak.js → chunk-vt9zgr9d.js} +9 -91
  47. package/dist/builtin/workflows/builtin/classify-and-act.js +3 -3
  48. package/dist/builtin/workflows/builtin/fan-out-and-synthesize.js +3 -3
  49. package/dist/builtin/workflows/builtin/generate-and-filter.js +3 -3
  50. package/dist/builtin/workflows/builtin/goal.js +4 -4
  51. package/dist/builtin/workflows/builtin/index.js +12 -12
  52. package/dist/builtin/workflows/builtin/loop-until-done.js +3 -3
  53. package/dist/builtin/workflows/builtin/open-claude-design.js +3 -3
  54. package/dist/builtin/workflows/builtin/ralph.js +4 -4
  55. package/dist/builtin/workflows/builtin/steering-context.js +1 -1
  56. package/dist/builtin/workflows/builtin/tournament.js +3 -3
  57. package/dist/builtin/workflows/package.json +3 -3
  58. package/dist/builtin/workflows/src/authoring.d.ts +2 -0
  59. package/dist/builtin/workflows/src/durable/dependency-doctor-types.d.ts +42 -0
  60. package/dist/builtin/workflows/src/extension/index.bundle.mjs +82005 -78701
  61. package/dist/builtin/workflows/src/index.js +8900 -1200
  62. package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +11 -0
  63. package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +4 -1
  64. package/dist/cli/args.js +2 -2
  65. package/dist/cli/args.js.map +1 -1
  66. package/dist/config.d.ts +1 -0
  67. package/dist/config.d.ts.map +1 -1
  68. package/dist/config.js +1 -0
  69. package/dist/config.js.map +1 -1
  70. package/dist/core/agent-session-accessors.d.ts.map +1 -1
  71. package/dist/core/agent-session-accessors.js +2 -1
  72. package/dist/core/agent-session-accessors.js.map +1 -1
  73. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  74. package/dist/core/agent-session-auto-compaction.js +9 -2
  75. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  76. package/dist/core/agent-session-bash.d.ts +3 -1
  77. package/dist/core/agent-session-bash.d.ts.map +1 -1
  78. package/dist/core/agent-session-bash.js +18 -6
  79. package/dist/core/agent-session-bash.js.map +1 -1
  80. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  81. package/dist/core/agent-session-compaction.js +25 -8
  82. package/dist/core/agent-session-compaction.js.map +1 -1
  83. package/dist/core/agent-session-events.d.ts +6 -6
  84. package/dist/core/agent-session-events.d.ts.map +1 -1
  85. package/dist/core/agent-session-events.js +145 -62
  86. package/dist/core/agent-session-events.js.map +1 -1
  87. package/dist/core/agent-session-export.d.ts +1 -1
  88. package/dist/core/agent-session-export.d.ts.map +1 -1
  89. package/dist/core/agent-session-export.js +18 -19
  90. package/dist/core/agent-session-export.js.map +1 -1
  91. package/dist/core/agent-session-extension-bindings.d.ts +3 -2
  92. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  93. package/dist/core/agent-session-extension-bindings.js +274 -70
  94. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  95. package/dist/core/agent-session-message-queue.d.ts +1 -1
  96. package/dist/core/agent-session-message-queue.d.ts.map +1 -1
  97. package/dist/core/agent-session-message-queue.js +30 -4
  98. package/dist/core/agent-session-message-queue.js.map +1 -1
  99. package/dist/core/agent-session-methods.d.ts +19 -11
  100. package/dist/core/agent-session-methods.d.ts.map +1 -1
  101. package/dist/core/agent-session-methods.js.map +1 -1
  102. package/dist/core/agent-session-models.d.ts +2 -2
  103. package/dist/core/agent-session-models.d.ts.map +1 -1
  104. package/dist/core/agent-session-models.js +38 -29
  105. package/dist/core/agent-session-models.js.map +1 -1
  106. package/dist/core/agent-session-persistent-custom-messages.d.ts +1 -1
  107. package/dist/core/agent-session-persistent-custom-messages.js.map +1 -1
  108. package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -1
  109. package/dist/core/agent-session-post-tool-compaction.js +18 -1
  110. package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
  111. package/dist/core/agent-session-prompt.d.ts +1 -1
  112. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  113. package/dist/core/agent-session-prompt.js +104 -22
  114. package/dist/core/agent-session-prompt.js.map +1 -1
  115. package/dist/core/agent-session-queue-pause.d.ts +2 -0
  116. package/dist/core/agent-session-queue-pause.d.ts.map +1 -1
  117. package/dist/core/agent-session-queue-pause.js +13 -2
  118. package/dist/core/agent-session-queue-pause.js.map +1 -1
  119. package/dist/core/agent-session-retry.d.ts +0 -3
  120. package/dist/core/agent-session-retry.d.ts.map +1 -1
  121. package/dist/core/agent-session-retry.js +24 -11
  122. package/dist/core/agent-session-retry.js.map +1 -1
  123. package/dist/core/agent-session-runtime-auth.d.ts.map +1 -1
  124. package/dist/core/agent-session-runtime-auth.js +10 -0
  125. package/dist/core/agent-session-runtime-auth.js.map +1 -1
  126. package/dist/core/agent-session-runtime.d.ts +17 -1
  127. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  128. package/dist/core/agent-session-runtime.js +428 -197
  129. package/dist/core/agent-session-runtime.js.map +1 -1
  130. package/dist/core/agent-session-services.d.ts +4 -0
  131. package/dist/core/agent-session-services.d.ts.map +1 -1
  132. package/dist/core/agent-session-services.js +31 -2
  133. package/dist/core/agent-session-services.js.map +1 -1
  134. package/dist/core/agent-session-state.d.ts +10 -2
  135. package/dist/core/agent-session-state.d.ts.map +1 -1
  136. package/dist/core/agent-session-state.js +32 -22
  137. package/dist/core/agent-session-state.js.map +1 -1
  138. package/dist/core/agent-session-summary.d.ts.map +1 -1
  139. package/dist/core/agent-session-summary.js +9 -2
  140. package/dist/core/agent-session-summary.js.map +1 -1
  141. package/dist/core/agent-session-tasks.d.ts +1 -0
  142. package/dist/core/agent-session-tasks.d.ts.map +1 -1
  143. package/dist/core/agent-session-tasks.js +24 -3
  144. package/dist/core/agent-session-tasks.js.map +1 -1
  145. package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
  146. package/dist/core/agent-session-tool-hooks.js +26 -3
  147. package/dist/core/agent-session-tool-hooks.js.map +1 -1
  148. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  149. package/dist/core/agent-session-tool-registry.js +0 -2
  150. package/dist/core/agent-session-tool-registry.js.map +1 -1
  151. package/dist/core/agent-session-transfer.js.map +1 -1
  152. package/dist/core/agent-session-tree.d.ts.map +1 -1
  153. package/dist/core/agent-session-tree.js +6 -0
  154. package/dist/core/agent-session-tree.js.map +1 -1
  155. package/dist/core/agent-session-types.d.ts +5 -0
  156. package/dist/core/agent-session-types.d.ts.map +1 -1
  157. package/dist/core/agent-session-types.js.map +1 -1
  158. package/dist/core/agent-session.d.ts +15 -8
  159. package/dist/core/agent-session.d.ts.map +1 -1
  160. package/dist/core/agent-session.js +113 -66
  161. package/dist/core/agent-session.js.map +1 -1
  162. package/dist/core/auth-storage.d.ts +5 -3
  163. package/dist/core/auth-storage.d.ts.map +1 -1
  164. package/dist/core/auth-storage.js +18 -5
  165. package/dist/core/auth-storage.js.map +1 -1
  166. package/dist/core/builtin-diagnostics.d.ts +2 -0
  167. package/dist/core/builtin-diagnostics.d.ts.map +1 -0
  168. package/dist/core/builtin-diagnostics.js +14 -0
  169. package/dist/core/builtin-diagnostics.js.map +1 -0
  170. package/dist/core/builtin-packages.d.ts +5 -2
  171. package/dist/core/builtin-packages.d.ts.map +1 -1
  172. package/dist/core/builtin-packages.js +24 -3
  173. package/dist/core/builtin-packages.js.map +1 -1
  174. package/dist/core/builtin-resource-loader.d.ts +4 -0
  175. package/dist/core/builtin-resource-loader.d.ts.map +1 -0
  176. package/dist/core/builtin-resource-loader.js +239 -0
  177. package/dist/core/builtin-resource-loader.js.map +1 -0
  178. package/dist/core/cache-retention.d.ts +4 -0
  179. package/dist/core/cache-retention.d.ts.map +1 -0
  180. package/dist/core/cache-retention.js +58 -0
  181. package/dist/core/cache-retention.js.map +1 -0
  182. package/dist/core/cache-stats.d.ts.map +1 -1
  183. package/dist/core/cache-stats.js +11 -0
  184. package/dist/core/cache-stats.js.map +1 -1
  185. package/dist/core/cache-warmer.d.ts +66 -0
  186. package/dist/core/cache-warmer.d.ts.map +1 -0
  187. package/dist/core/cache-warmer.js +313 -0
  188. package/dist/core/cache-warmer.js.map +1 -0
  189. package/dist/core/child-session-options.d.ts +5 -0
  190. package/dist/core/child-session-options.d.ts.map +1 -0
  191. package/dist/core/child-session-options.js +30 -0
  192. package/dist/core/child-session-options.js.map +1 -0
  193. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  194. package/dist/core/compaction/branch-summarization.js +2 -2
  195. package/dist/core/compaction/branch-summarization.js.map +1 -1
  196. package/dist/core/compaction/compaction-boundary.d.ts.map +1 -1
  197. package/dist/core/compaction/compaction-boundary.js +2 -1
  198. package/dist/core/compaction/compaction-boundary.js.map +1 -1
  199. package/dist/core/compaction/compaction.d.ts.map +1 -1
  200. package/dist/core/compaction/compaction.js +18 -0
  201. package/dist/core/compaction/compaction.js.map +1 -1
  202. package/dist/core/compaction/fallback-planner.d.ts +1 -0
  203. package/dist/core/compaction/fallback-planner.d.ts.map +1 -1
  204. package/dist/core/compaction/fallback-planner.js +2 -0
  205. package/dist/core/compaction/fallback-planner.js.map +1 -1
  206. package/dist/core/compaction/range-planner.d.ts.map +1 -1
  207. package/dist/core/compaction/range-planner.js +3 -3
  208. package/dist/core/compaction/range-planner.js.map +1 -1
  209. package/dist/core/compaction/session-summarization.d.ts.map +1 -1
  210. package/dist/core/compaction/session-summarization.js +2 -1
  211. package/dist/core/compaction/session-summarization.js.map +1 -1
  212. package/dist/core/credential-screening.d.ts +17 -0
  213. package/dist/core/credential-screening.d.ts.map +1 -0
  214. package/dist/core/credential-screening.js +30 -0
  215. package/dist/core/credential-screening.js.map +1 -0
  216. package/dist/core/decision-provider.d.ts +4 -0
  217. package/dist/core/decision-provider.d.ts.map +1 -0
  218. package/dist/core/decision-provider.js +12 -0
  219. package/dist/core/decision-provider.js.map +1 -0
  220. package/dist/core/execution-model-router.d.ts +28 -0
  221. package/dist/core/execution-model-router.d.ts.map +1 -0
  222. package/dist/core/execution-model-router.js +165 -0
  223. package/dist/core/execution-model-router.js.map +1 -0
  224. package/dist/core/extensions/agent-events.d.ts +4 -4
  225. package/dist/core/extensions/agent-events.d.ts.map +1 -1
  226. package/dist/core/extensions/agent-events.js.map +1 -1
  227. package/dist/core/extensions/api-types.d.ts +46 -40
  228. package/dist/core/extensions/api-types.d.ts.map +1 -1
  229. package/dist/core/extensions/api-types.js.map +1 -1
  230. package/dist/core/extensions/context-types.d.ts +7 -1
  231. package/dist/core/extensions/context-types.d.ts.map +1 -1
  232. package/dist/core/extensions/context-types.js.map +1 -1
  233. package/dist/core/extensions/event-results.d.ts +7 -6
  234. package/dist/core/extensions/event-results.d.ts.map +1 -1
  235. package/dist/core/extensions/event-results.js.map +1 -1
  236. package/dist/core/extensions/event-types.d.ts +2 -1
  237. package/dist/core/extensions/event-types.d.ts.map +1 -1
  238. package/dist/core/extensions/event-types.js.map +1 -1
  239. package/dist/core/extensions/extension-work.d.ts +14 -0
  240. package/dist/core/extensions/extension-work.d.ts.map +1 -0
  241. package/dist/core/extensions/extension-work.js +73 -0
  242. package/dist/core/extensions/extension-work.js.map +1 -0
  243. package/dist/core/extensions/herdr-file-integration.d.ts +36 -0
  244. package/dist/core/extensions/herdr-file-integration.d.ts.map +1 -0
  245. package/dist/core/extensions/herdr-file-integration.js +60 -0
  246. package/dist/core/extensions/herdr-file-integration.js.map +1 -0
  247. package/dist/core/extensions/host-input.d.ts +51 -0
  248. package/dist/core/extensions/host-input.d.ts.map +1 -0
  249. package/dist/core/extensions/host-input.js +211 -0
  250. package/dist/core/extensions/host-input.js.map +1 -0
  251. package/dist/core/extensions/index.d.ts +4 -2
  252. package/dist/core/extensions/index.d.ts.map +1 -1
  253. package/dist/core/extensions/index.js +0 -3
  254. package/dist/core/extensions/index.js.map +1 -1
  255. package/dist/core/extensions/jiti-loader.d.ts +2 -0
  256. package/dist/core/extensions/jiti-loader.d.ts.map +1 -0
  257. package/dist/core/extensions/jiti-loader.js +3 -0
  258. package/dist/core/extensions/jiti-loader.js.map +1 -0
  259. package/dist/core/extensions/jiti-static-loader.d.ts +2 -0
  260. package/dist/core/extensions/jiti-static-loader.d.ts.map +1 -0
  261. package/dist/core/extensions/jiti-static-loader.js +3 -0
  262. package/dist/core/extensions/jiti-static-loader.js.map +1 -0
  263. package/dist/core/extensions/loader-api.d.ts +7 -0
  264. package/dist/core/extensions/loader-api.d.ts.map +1 -1
  265. package/dist/core/extensions/loader-api.js +154 -28
  266. package/dist/core/extensions/loader-api.js.map +1 -1
  267. package/dist/core/extensions/loader-bindings.d.ts +24 -0
  268. package/dist/core/extensions/loader-bindings.d.ts.map +1 -0
  269. package/dist/core/extensions/loader-bindings.js +128 -0
  270. package/dist/core/extensions/loader-bindings.js.map +1 -0
  271. package/dist/core/extensions/loader-core.d.ts +2 -1
  272. package/dist/core/extensions/loader-core.d.ts.map +1 -1
  273. package/dist/core/extensions/loader-core.js +91 -14
  274. package/dist/core/extensions/loader-core.js.map +1 -1
  275. package/dist/core/extensions/loader-host-modules.d.ts.map +1 -1
  276. package/dist/core/extensions/loader-host-modules.js +3 -1
  277. package/dist/core/extensions/loader-host-modules.js.map +1 -1
  278. package/dist/core/extensions/loader-rollback.d.ts +14 -0
  279. package/dist/core/extensions/loader-rollback.d.ts.map +1 -0
  280. package/dist/core/extensions/loader-rollback.js +95 -0
  281. package/dist/core/extensions/loader-rollback.js.map +1 -0
  282. package/dist/core/extensions/loader-runtime.d.ts +3 -1
  283. package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
  284. package/dist/core/extensions/loader-runtime.js +38 -14
  285. package/dist/core/extensions/loader-runtime.js.map +1 -1
  286. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  287. package/dist/core/extensions/loader-virtual-modules.js +9 -2
  288. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  289. package/dist/core/extensions/loader.d.ts +1 -1
  290. package/dist/core/extensions/loader.d.ts.map +1 -1
  291. package/dist/core/extensions/loader.js +1 -1
  292. package/dist/core/extensions/loader.js.map +1 -1
  293. package/dist/core/extensions/reactive-widget.d.ts +1 -1
  294. package/dist/core/extensions/reactive-widget.js.map +1 -1
  295. package/dist/core/extensions/runner-context.d.ts +4 -0
  296. package/dist/core/extensions/runner-context.d.ts.map +1 -1
  297. package/dist/core/extensions/runner-context.js +25 -0
  298. package/dist/core/extensions/runner-context.js.map +1 -1
  299. package/dist/core/extensions/runner-events.d.ts +8 -4
  300. package/dist/core/extensions/runner-events.d.ts.map +1 -1
  301. package/dist/core/extensions/runner-events.js +55 -53
  302. package/dist/core/extensions/runner-events.js.map +1 -1
  303. package/dist/core/extensions/runner-project-trust.d.ts.map +1 -1
  304. package/dist/core/extensions/runner-project-trust.js +2 -4
  305. package/dist/core/extensions/runner-project-trust.js.map +1 -1
  306. package/dist/core/extensions/runner.d.ts +31 -4
  307. package/dist/core/extensions/runner.d.ts.map +1 -1
  308. package/dist/core/extensions/runner.js +219 -23
  309. package/dist/core/extensions/runner.js.map +1 -1
  310. package/dist/core/extensions/runtime-types.d.ts +2 -0
  311. package/dist/core/extensions/runtime-types.d.ts.map +1 -1
  312. package/dist/core/extensions/runtime-types.js.map +1 -1
  313. package/dist/core/extensions/types.d.ts +3 -2
  314. package/dist/core/extensions/types.d.ts.map +1 -1
  315. package/dist/core/extensions/types.js +0 -12
  316. package/dist/core/extensions/types.js.map +1 -1
  317. package/dist/core/extensions/workflow-activity-hub.d.ts +2 -0
  318. package/dist/core/extensions/workflow-activity-hub.d.ts.map +1 -1
  319. package/dist/core/extensions/workflow-activity-hub.js +5 -3
  320. package/dist/core/extensions/workflow-activity-hub.js.map +1 -1
  321. package/dist/core/extensions/wrapper.d.ts.map +1 -1
  322. package/dist/core/extensions/wrapper.js +5 -3
  323. package/dist/core/extensions/wrapper.js.map +1 -1
  324. package/dist/core/fast-model-routing.d.ts +3 -3
  325. package/dist/core/fast-model-routing.d.ts.map +1 -1
  326. package/dist/core/fast-model-routing.js +3 -3
  327. package/dist/core/fast-model-routing.js.map +1 -1
  328. package/dist/core/fast-model-variants.d.ts +4 -0
  329. package/dist/core/fast-model-variants.d.ts.map +1 -1
  330. package/dist/core/fast-model-variants.js +3 -0
  331. package/dist/core/fast-model-variants.js.map +1 -1
  332. package/dist/core/index.d.ts +4 -1
  333. package/dist/core/index.d.ts.map +1 -1
  334. package/dist/core/index.js +2 -0
  335. package/dist/core/index.js.map +1 -1
  336. package/dist/core/mandatory-resource-loader.d.ts +4 -0
  337. package/dist/core/mandatory-resource-loader.d.ts.map +1 -1
  338. package/dist/core/mandatory-resource-loader.js +29 -1
  339. package/dist/core/mandatory-resource-loader.js.map +1 -1
  340. package/dist/core/mandatory-runtime-tools.d.ts +1 -4
  341. package/dist/core/mandatory-runtime-tools.d.ts.map +1 -1
  342. package/dist/core/mandatory-runtime-tools.js +1 -9
  343. package/dist/core/mandatory-runtime-tools.js.map +1 -1
  344. package/dist/core/messages.d.ts.map +1 -1
  345. package/dist/core/messages.js +8 -1
  346. package/dist/core/messages.js.map +1 -1
  347. package/dist/core/model-config.d.ts +41 -10
  348. package/dist/core/model-config.d.ts.map +1 -1
  349. package/dist/core/model-config.js +11 -2
  350. package/dist/core/model-config.js.map +1 -1
  351. package/dist/core/model-registry.d.ts +4 -2
  352. package/dist/core/model-registry.d.ts.map +1 -1
  353. package/dist/core/model-registry.js +6 -2
  354. package/dist/core/model-registry.js.map +1 -1
  355. package/dist/core/model-routing-constraints.d.ts +24 -0
  356. package/dist/core/model-routing-constraints.d.ts.map +1 -0
  357. package/dist/core/model-routing-constraints.js +46 -0
  358. package/dist/core/model-routing-constraints.js.map +1 -0
  359. package/dist/core/model-routing-task.d.ts +4 -0
  360. package/dist/core/model-routing-task.d.ts.map +1 -0
  361. package/dist/core/model-routing-task.js +76 -0
  362. package/dist/core/model-routing-task.js.map +1 -0
  363. package/dist/core/model-runtime-streaming.d.ts +13 -3
  364. package/dist/core/model-runtime-streaming.d.ts.map +1 -1
  365. package/dist/core/model-runtime-streaming.js +15 -5
  366. package/dist/core/model-runtime-streaming.js.map +1 -1
  367. package/dist/core/model-runtime-types.d.ts +2 -2
  368. package/dist/core/model-runtime-types.d.ts.map +1 -1
  369. package/dist/core/model-runtime-types.js.map +1 -1
  370. package/dist/core/model-runtime.d.ts +6 -3
  371. package/dist/core/model-runtime.d.ts.map +1 -1
  372. package/dist/core/model-runtime.js +29 -2
  373. package/dist/core/model-runtime.js.map +1 -1
  374. package/dist/core/provider-composer-internal.d.ts +3 -2
  375. package/dist/core/provider-composer-internal.d.ts.map +1 -1
  376. package/dist/core/provider-composer-internal.js +2 -0
  377. package/dist/core/provider-composer-internal.js.map +1 -1
  378. package/dist/core/provider-composer.d.ts.map +1 -1
  379. package/dist/core/provider-composer.js.map +1 -1
  380. package/dist/core/resolve-config-value.d.ts +2 -0
  381. package/dist/core/resolve-config-value.d.ts.map +1 -1
  382. package/dist/core/resolve-config-value.js +23 -1
  383. package/dist/core/resolve-config-value.js.map +1 -1
  384. package/dist/core/resource-loader-core.d.ts +6 -0
  385. package/dist/core/resource-loader-core.d.ts.map +1 -1
  386. package/dist/core/resource-loader-core.js +37 -6
  387. package/dist/core/resource-loader-core.js.map +1 -1
  388. package/dist/core/resource-loader-extensions.d.ts.map +1 -1
  389. package/dist/core/resource-loader-extensions.js +2 -0
  390. package/dist/core/resource-loader-extensions.js.map +1 -1
  391. package/dist/core/resource-loader-reload.d.ts.map +1 -1
  392. package/dist/core/resource-loader-reload.js +7 -2
  393. package/dist/core/resource-loader-reload.js.map +1 -1
  394. package/dist/core/resource-loader.d.ts +1 -1
  395. package/dist/core/resource-loader.d.ts.map +1 -1
  396. package/dist/core/resource-loader.js +1 -1
  397. package/dist/core/resource-loader.js.map +1 -1
  398. package/dist/core/runtime-credentials.d.ts +2 -0
  399. package/dist/core/runtime-credentials.d.ts.map +1 -1
  400. package/dist/core/runtime-credentials.js +15 -0
  401. package/dist/core/runtime-credentials.js.map +1 -1
  402. package/dist/core/sdk-types.d.ts +13 -5
  403. package/dist/core/sdk-types.d.ts.map +1 -1
  404. package/dist/core/sdk-types.js.map +1 -1
  405. package/dist/core/sdk.d.ts +3 -1
  406. package/dist/core/sdk.d.ts.map +1 -1
  407. package/dist/core/sdk.js +211 -37
  408. package/dist/core/sdk.js.map +1 -1
  409. package/dist/core/session-lifecycle-scope.d.ts +15 -0
  410. package/dist/core/session-lifecycle-scope.d.ts.map +1 -0
  411. package/dist/core/session-lifecycle-scope.js +13 -0
  412. package/dist/core/session-lifecycle-scope.js.map +1 -0
  413. package/dist/core/session-lifecycle-work.d.ts +17 -0
  414. package/dist/core/session-lifecycle-work.d.ts.map +1 -0
  415. package/dist/core/session-lifecycle-work.js +144 -0
  416. package/dist/core/session-lifecycle-work.js.map +1 -0
  417. package/dist/core/session-manager-core.d.ts +8 -4
  418. package/dist/core/session-manager-core.d.ts.map +1 -1
  419. package/dist/core/session-manager-core.js +27 -3
  420. package/dist/core/session-manager-core.js.map +1 -1
  421. package/dist/core/session-manager-history.d.ts.map +1 -1
  422. package/dist/core/session-manager-history.js +3 -0
  423. package/dist/core/session-manager-history.js.map +1 -1
  424. package/dist/core/session-manager-list.d.ts +3 -3
  425. package/dist/core/session-manager-list.d.ts.map +1 -1
  426. package/dist/core/session-manager-list.js +89 -74
  427. package/dist/core/session-manager-list.js.map +1 -1
  428. package/dist/core/session-manager-storage.d.ts.map +1 -1
  429. package/dist/core/session-manager-storage.js +10 -7
  430. package/dist/core/session-manager-storage.js.map +1 -1
  431. package/dist/core/session-manager-types.d.ts +13 -3
  432. package/dist/core/session-manager-types.d.ts.map +1 -1
  433. package/dist/core/session-manager-types.js.map +1 -1
  434. package/dist/core/session-manager.d.ts +1 -1
  435. package/dist/core/session-manager.d.ts.map +1 -1
  436. package/dist/core/session-manager.js.map +1 -1
  437. package/dist/core/session-startup-rollback.d.ts +5 -0
  438. package/dist/core/session-startup-rollback.d.ts.map +1 -0
  439. package/dist/core/session-startup-rollback.js +16 -0
  440. package/dist/core/session-startup-rollback.js.map +1 -0
  441. package/dist/core/settings-manager-basic-accessors.d.ts +5 -0
  442. package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
  443. package/dist/core/settings-manager-basic-accessors.js +35 -0
  444. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  445. package/dist/core/settings-manager-core.d.ts.map +1 -1
  446. package/dist/core/settings-manager-core.js +4 -0
  447. package/dist/core/settings-manager-core.js.map +1 -1
  448. package/dist/core/settings-manager.d.ts +1 -0
  449. package/dist/core/settings-manager.d.ts.map +1 -1
  450. package/dist/core/settings-manager.js +1 -0
  451. package/dist/core/settings-manager.js.map +1 -1
  452. package/dist/core/settings-types.d.ts +4 -0
  453. package/dist/core/settings-types.d.ts.map +1 -1
  454. package/dist/core/settings-types.js +1 -1
  455. package/dist/core/settings-types.js.map +1 -1
  456. package/dist/core/settings-write-ownership.d.ts +7 -0
  457. package/dist/core/settings-write-ownership.d.ts.map +1 -0
  458. package/dist/core/settings-write-ownership.js +24 -0
  459. package/dist/core/settings-write-ownership.js.map +1 -0
  460. package/dist/core/slash-commands.js +1 -1
  461. package/dist/core/slash-commands.js.map +1 -1
  462. package/dist/core/structured-output/index.d.ts +12 -0
  463. package/dist/core/structured-output/index.d.ts.map +1 -0
  464. package/dist/core/structured-output/index.js +251 -0
  465. package/dist/core/structured-output/index.js.map +1 -0
  466. package/dist/core/structured-output/invalid-output.d.ts +8 -0
  467. package/dist/core/structured-output/invalid-output.d.ts.map +1 -0
  468. package/dist/core/structured-output/invalid-output.js +4 -0
  469. package/dist/core/structured-output/invalid-output.js.map +1 -0
  470. package/dist/core/structured-output/jev-client.d.ts +20 -0
  471. package/dist/core/structured-output/jev-client.d.ts.map +1 -0
  472. package/dist/core/structured-output/jev-client.js +116 -0
  473. package/dist/core/structured-output/jev-client.js.map +1 -0
  474. package/dist/core/structured-output/jev.d.ts +5 -0
  475. package/dist/core/structured-output/jev.d.ts.map +1 -0
  476. package/dist/core/structured-output/jev.js +275 -0
  477. package/dist/core/structured-output/jev.js.map +1 -0
  478. package/dist/core/structured-output/resolver.d.ts +41 -0
  479. package/dist/core/structured-output/resolver.d.ts.map +1 -0
  480. package/dist/core/structured-output/resolver.js +56 -0
  481. package/dist/core/structured-output/resolver.js.map +1 -0
  482. package/dist/core/structured-output/types.d.ts +68 -0
  483. package/dist/core/structured-output/types.d.ts.map +1 -0
  484. package/dist/core/structured-output/types.js +2 -0
  485. package/dist/core/structured-output/types.js.map +1 -0
  486. package/dist/core/system-prompt.d.ts +48 -5
  487. package/dist/core/system-prompt.d.ts.map +1 -1
  488. package/dist/core/system-prompt.js +130 -99
  489. package/dist/core/system-prompt.js.map +1 -1
  490. package/dist/core/tasks/contracts.d.ts +6 -0
  491. package/dist/core/tasks/contracts.d.ts.map +1 -1
  492. package/dist/core/tasks/contracts.js.map +1 -1
  493. package/dist/core/tasks/supervisor.d.ts.map +1 -1
  494. package/dist/core/tasks/supervisor.js +7 -0
  495. package/dist/core/tasks/supervisor.js.map +1 -1
  496. package/dist/core/tools/ask-user-question/ask-user-question.d.ts +4 -1
  497. package/dist/core/tools/ask-user-question/ask-user-question.d.ts.map +1 -1
  498. package/dist/core/tools/ask-user-question/ask-user-question.js +31 -35
  499. package/dist/core/tools/ask-user-question/ask-user-question.js.map +1 -1
  500. package/dist/core/tools/ask-user-question/index.d.ts +1 -1
  501. package/dist/core/tools/ask-user-question/index.js.map +1 -1
  502. package/dist/core/tools/ask-user-question/state/build-questionnaire.d.ts +1 -1
  503. package/dist/core/tools/ask-user-question/state/build-questionnaire.js.map +1 -1
  504. package/dist/core/tools/ask-user-question/state/key-router.d.ts +1 -1
  505. package/dist/core/tools/ask-user-question/state/key-router.js.map +1 -1
  506. package/dist/core/tools/ask-user-question/state/questionnaire-session.d.ts +1 -1
  507. package/dist/core/tools/ask-user-question/state/questionnaire-session.js.map +1 -1
  508. package/dist/core/tools/ask-user-question/state/row-intent.d.ts +1 -1
  509. package/dist/core/tools/ask-user-question/state/row-intent.js.map +1 -1
  510. package/dist/core/tools/ask-user-question/state/selectors/contract.d.ts +1 -1
  511. package/dist/core/tools/ask-user-question/state/selectors/contract.js.map +1 -1
  512. package/dist/core/tools/ask-user-question/state/selectors/derivations.d.ts +1 -1
  513. package/dist/core/tools/ask-user-question/state/selectors/derivations.js.map +1 -1
  514. package/dist/core/tools/ask-user-question/state/state-reducer.d.ts +1 -1
  515. package/dist/core/tools/ask-user-question/state/state-reducer.js.map +1 -1
  516. package/dist/core/tools/ask-user-question/state/state.d.ts +1 -1
  517. package/dist/core/tools/ask-user-question/state/state.js.map +1 -1
  518. package/dist/core/tools/ask-user-question/tool/format-answer.d.ts +1 -1
  519. package/dist/core/tools/ask-user-question/tool/format-answer.js.map +1 -1
  520. package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts +1 -1
  521. package/dist/core/tools/ask-user-question/tool/response-envelope.js.map +1 -1
  522. package/dist/core/tools/ask-user-question/tool/validate-questionnaire.d.ts +1 -1
  523. package/dist/core/tools/ask-user-question/tool/validate-questionnaire.js.map +1 -1
  524. package/dist/core/tools/ask-user-question/view/components/multi-select-view.d.ts +1 -1
  525. package/dist/core/tools/ask-user-question/view/components/multi-select-view.js.map +1 -1
  526. package/dist/core/tools/ask-user-question/view/components/preview/markdown-content-cache.d.ts +1 -1
  527. package/dist/core/tools/ask-user-question/view/components/preview/markdown-content-cache.js.map +1 -1
  528. package/dist/core/tools/ask-user-question/view/components/preview/preview-block-renderer.d.ts +1 -1
  529. package/dist/core/tools/ask-user-question/view/components/preview/preview-block-renderer.js.map +1 -1
  530. package/dist/core/tools/ask-user-question/view/components/preview/preview-layout-decider.d.ts +1 -1
  531. package/dist/core/tools/ask-user-question/view/components/preview/preview-layout-decider.js.map +1 -1
  532. package/dist/core/tools/ask-user-question/view/components/preview/preview-pane.d.ts +1 -1
  533. package/dist/core/tools/ask-user-question/view/components/preview/preview-pane.js.map +1 -1
  534. package/dist/core/tools/ask-user-question/view/components/submit-picker.js.map +1 -1
  535. package/dist/core/tools/ask-user-question/view/components/wrapping-select.js.map +1 -1
  536. package/dist/core/tools/ask-user-question/view/dialog-builder.d.ts +1 -1
  537. package/dist/core/tools/ask-user-question/view/dialog-builder.js.map +1 -1
  538. package/dist/core/tools/ask-user-question/view/props-adapter.d.ts +1 -1
  539. package/dist/core/tools/ask-user-question/view/props-adapter.js.map +1 -1
  540. package/dist/core/tools/ask-user-question/view/tab-content-strategy.d.ts +1 -1
  541. package/dist/core/tools/ask-user-question/view/tab-content-strategy.js.map +1 -1
  542. package/dist/core/tools/bash.d.ts.map +1 -1
  543. package/dist/core/tools/bash.js +16 -11
  544. package/dist/core/tools/bash.js.map +1 -1
  545. package/dist/core/tools/find.d.ts +2 -2
  546. package/dist/core/tools/find.d.ts.map +1 -1
  547. package/dist/core/tools/find.js +1 -1
  548. package/dist/core/tools/find.js.map +1 -1
  549. package/dist/core/usage-totals.d.ts.map +1 -1
  550. package/dist/core/usage-totals.js +4 -0
  551. package/dist/core/usage-totals.js.map +1 -1
  552. package/dist/extensions/herdr/index.d.ts.map +1 -1
  553. package/dist/extensions/herdr/index.js +0 -7
  554. package/dist/extensions/herdr/index.js.map +1 -1
  555. package/dist/extensions/llama/client.d.ts +2 -0
  556. package/dist/extensions/llama/client.d.ts.map +1 -1
  557. package/dist/extensions/llama/client.js +6 -2
  558. package/dist/extensions/llama/client.js.map +1 -1
  559. package/dist/extensions/llama/provider.d.ts.map +1 -1
  560. package/dist/extensions/llama/provider.js +18 -4
  561. package/dist/extensions/llama/provider.js.map +1 -1
  562. package/dist/index.d.ts +10 -1
  563. package/dist/index.d.ts.map +1 -1
  564. package/dist/index.js +5 -0
  565. package/dist/index.js.map +1 -1
  566. package/dist/main-session.d.ts.map +1 -1
  567. package/dist/main-session.js +19 -10
  568. package/dist/main-session.js.map +1 -1
  569. package/dist/main.d.ts.map +1 -1
  570. package/dist/main.js +4 -5
  571. package/dist/main.js.map +1 -1
  572. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  573. package/dist/modes/interactive/components/branch-summary-message.js +12 -5
  574. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  575. package/dist/modes/interactive/components/chat-message-renderer.d.ts +5 -1
  576. package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
  577. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  578. package/dist/modes/interactive/components/chat-session-host-events.d.ts +2 -2
  579. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  580. package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -1
  581. package/dist/modes/interactive/components/compaction-boundary-message.js +17 -9
  582. package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
  583. package/dist/modes/interactive/components/custom-editor.d.ts +6 -0
  584. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  585. package/dist/modes/interactive/components/custom-editor.js +17 -0
  586. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  587. package/dist/modes/interactive/components/host-input-form-mount.d.ts +1 -1
  588. package/dist/modes/interactive/components/host-input-form-mount.js.map +1 -1
  589. package/dist/modes/interactive/components/host-input-form.d.ts +1 -1
  590. package/dist/modes/interactive/components/host-input-form.js.map +1 -1
  591. package/dist/modes/interactive/components/host-session-picker.d.ts +1 -1
  592. package/dist/modes/interactive/components/host-session-picker.js.map +1 -1
  593. package/dist/modes/interactive/components/reserved-bottom-overlay.d.ts +1 -1
  594. package/dist/modes/interactive/components/reserved-bottom-overlay.js.map +1 -1
  595. package/dist/modes/interactive/components/scroll-widget.d.ts +1 -1
  596. package/dist/modes/interactive/components/scroll-widget.js.map +1 -1
  597. package/dist/modes/interactive/components/settings-selector-handlers.d.ts.map +1 -1
  598. package/dist/modes/interactive/components/settings-selector-handlers.js +3 -0
  599. package/dist/modes/interactive/components/settings-selector-handlers.js.map +1 -1
  600. package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
  601. package/dist/modes/interactive/components/settings-selector-items.js +50 -1
  602. package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
  603. package/dist/modes/interactive/components/settings-selector-submenus.d.ts.map +1 -1
  604. package/dist/modes/interactive/components/settings-selector-submenus.js +2 -1
  605. package/dist/modes/interactive/components/settings-selector-submenus.js.map +1 -1
  606. package/dist/modes/interactive/components/settings-selector-types.d.ts +6 -1
  607. package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
  608. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  609. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  610. package/dist/modes/interactive/components/skill-invocation-message.js +11 -4
  611. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  612. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  613. package/dist/modes/interactive/components/tool-execution.js +14 -9
  614. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  615. package/dist/modes/interactive/interactive-auth-login.js +1 -1
  616. package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
  617. package/dist/modes/interactive/interactive-auth-routing.js +2 -2
  618. package/dist/modes/interactive/interactive-auth-routing.js.map +1 -1
  619. package/dist/modes/interactive/interactive-autocomplete.js +4 -0
  620. package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
  621. package/dist/modes/interactive/interactive-bash-compact.d.ts.map +1 -1
  622. package/dist/modes/interactive/interactive-bash-compact.js +13 -6
  623. package/dist/modes/interactive/interactive-bash-compact.js.map +1 -1
  624. package/dist/modes/interactive/interactive-extension-runtime.js +5 -0
  625. package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
  626. package/dist/modes/interactive/interactive-input-handling.js +2 -2
  627. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  628. package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -1
  629. package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
  630. package/dist/modes/interactive/interactive-mode-deps.js +1 -1
  631. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  632. package/dist/modes/interactive/interactive-mode-surface.d.ts +1 -1
  633. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  634. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  635. package/dist/modes/interactive/interactive-render-chat.js +27 -25
  636. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  637. package/dist/modes/interactive/interactive-selectors.js +10 -0
  638. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  639. package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
  640. package/dist/modes/interactive/interactive-startup.js +2 -2
  641. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  642. package/dist/modes/interactive/interactive-tui.js.map +1 -1
  643. package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
  644. package/dist/modes/interactive-engine/engine-custom-ui.js +3 -1
  645. package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
  646. package/dist/modes/interactive-engine/engine-input-form.d.ts +1 -1
  647. package/dist/modes/interactive-engine/engine-input-form.js.map +1 -1
  648. package/dist/modes/interactive-engine/engine-session-picker.d.ts +1 -1
  649. package/dist/modes/interactive-engine/engine-session-picker.js.map +1 -1
  650. package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
  651. package/dist/modes/interactive-engine/isolated-runtime.js +10 -1
  652. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  653. package/dist/modes/interactive-engine/protocol.d.ts +1 -1
  654. package/dist/modes/interactive-engine/protocol.js.map +1 -1
  655. package/dist/modes/interactive-engine/remote-component.js.map +1 -1
  656. package/dist/modes/rpc/rpc-keybindings-reload.d.ts +1 -1
  657. package/dist/modes/rpc/rpc-keybindings-reload.js.map +1 -1
  658. package/dist/modes/rpc/rpc-provider-auth.d.ts +1 -1
  659. package/dist/modes/rpc/rpc-provider-auth.js.map +1 -1
  660. package/dist/session-id-target.d.ts +31 -0
  661. package/dist/session-id-target.d.ts.map +1 -0
  662. package/dist/session-id-target.js +57 -0
  663. package/dist/session-id-target.js.map +1 -0
  664. package/dist/utils/abort.d.ts.map +1 -1
  665. package/dist/utils/abort.js +29 -4
  666. package/dist/utils/abort.js.map +1 -1
  667. package/dist/utils/clipboard-image.d.ts.map +1 -1
  668. package/dist/utils/clipboard-image.js +1 -12
  669. package/dist/utils/clipboard-image.js.map +1 -1
  670. package/dist/utils/clipboard.d.ts.map +1 -1
  671. package/dist/utils/clipboard.js +87 -23
  672. package/dist/utils/clipboard.js.map +1 -1
  673. package/dist/utils/wsl.d.ts +3 -0
  674. package/dist/utils/wsl.d.ts.map +1 -0
  675. package/dist/utils/wsl.js +15 -0
  676. package/dist/utils/wsl.js.map +1 -0
  677. package/docs/background-tasks.md +24 -14
  678. package/docs/build.md +6 -16
  679. package/docs/compaction/reference.md +10 -12
  680. package/docs/compaction.md +30 -112
  681. package/docs/computer-use.md +1 -3
  682. package/docs/containerization.md +4 -5
  683. package/docs/custom-provider/api-reference.md +10 -1
  684. package/docs/custom-provider/oauth.md +4 -2
  685. package/docs/custom-provider/streaming.md +8 -3
  686. package/docs/custom-provider.md +1 -1
  687. package/docs/development.md +13 -138
  688. package/docs/docs.json +19 -5
  689. package/docs/environment-variables.md +20 -4
  690. package/docs/extensions/api-reference.md +6 -2
  691. package/docs/extensions/authoring.md +10 -7
  692. package/docs/extensions/events.md +14 -24
  693. package/docs/extensions/ui.md +3 -4
  694. package/docs/extensions.md +22 -18
  695. package/docs/getting-started/authentication.md +4 -1
  696. package/docs/getting-started/first-session.md +8 -6
  697. package/docs/getting-started/installation.md +8 -4
  698. package/docs/getting-started/project-instructions.md +5 -1
  699. package/docs/guides/configuration.md +10 -5
  700. package/docs/guides/non-interactive.md +2 -2
  701. package/docs/guides.md +8 -17
  702. package/docs/herdr.md +2 -1
  703. package/docs/index.md +2 -2
  704. package/docs/intercom/operations.md +16 -70
  705. package/docs/intercom/reference.md +15 -5
  706. package/docs/intercom.md +10 -6
  707. package/docs/json.md +12 -2
  708. package/docs/keybindings.md +13 -8
  709. package/docs/llama-cpp.md +5 -1
  710. package/docs/{mcp.md → mcp-servers.md} +21 -2
  711. package/docs/models/evals.md +133 -465
  712. package/docs/models/model-selection.md +27 -116
  713. package/docs/models/reference.md +18 -21
  714. package/docs/models.md +7 -4
  715. package/docs/packages/authoring.md +5 -1
  716. package/docs/packages/reference.md +5 -1
  717. package/docs/packages.md +5 -3
  718. package/docs/programmatic.md +3 -1
  719. package/docs/prompt-templates.md +2 -10
  720. package/docs/providers/reference.md +2 -2
  721. package/docs/providers.md +41 -16
  722. package/docs/quickstart.md +7 -3
  723. package/docs/reference/cli.md +19 -11
  724. package/docs/reference.md +3 -6
  725. package/docs/rpc/protocol.md +11 -13
  726. package/docs/rpc.md +5 -1
  727. package/docs/sdk/reference.md +59 -239
  728. package/docs/sdk/structured-decisions.md +132 -0
  729. package/docs/sdk.md +181 -17
  730. package/docs/security.md +7 -4
  731. package/docs/session-format.md +18 -5
  732. package/docs/sessions.md +12 -6
  733. package/docs/settings.md +68 -16
  734. package/docs/skills/authoring.md +7 -1
  735. package/docs/skills.md +25 -6
  736. package/docs/subagents/authoring.md +11 -1
  737. package/docs/subagents/reference.md +98 -10
  738. package/docs/subagents.md +45 -35
  739. package/docs/terminal-setup.md +4 -2
  740. package/docs/termux.md +3 -1
  741. package/docs/themes/reference.md +4 -1
  742. package/docs/themes.md +1 -1
  743. package/docs/tools.md +431 -20
  744. package/docs/tui/reference.md +13 -14
  745. package/docs/tui.md +10 -6
  746. package/docs/usage.md +19 -7
  747. package/docs/web-access.md +5 -1
  748. package/docs/windows.md +18 -11
  749. package/docs/workflows/api-reference.md +135 -25
  750. package/docs/workflows/authoring.md +48 -39
  751. package/docs/workflows/builtins.md +20 -26
  752. package/docs/workflows/operations.md +284 -137
  753. package/docs/workflows/reliable-design.md +62 -129
  754. package/docs/workflows.md +10 -16
  755. package/examples/extensions/custom-provider-anthropic/index.ts +15 -10
  756. package/examples/extensions/custom-provider-gitlab-duo/index.ts +2 -2
  757. package/examples/extensions/prompt-customizer.ts +17 -37
  758. package/npm-shrinkwrap.json +502 -709
  759. package/package.json +12 -10
  760. package/dist/builtin/workflows/builtin/chunk-m0xfsef8.js +0 -2813
  761. package/docs/models/artificial-analysis-index.md +0 -89
  762. package/docs/models/pareto-efficiency.md +0 -90
  763. package/docs/tools/edit.md +0 -378
@@ -5,9 +5,11 @@ description: "Verbatim line compaction, when it runs, planning rungs, and branch
5
5
 
6
6
  # Compaction & Branch Summarization
7
7
 
8
- LLMs have finite context windows. Atomic reduces transcript context with **verbatim line compaction** while preserving an exact count of recent context-visible messages as ordinary messages. Branch summarization is a separate, intentionally lossy feature used only when navigating away from a branch.
8
+ LLMs have finite context windows. Atomic reduces older transcript context with **verbatim line compaction** while preserving a configured count of recent context-visible messages. Branch summarization is a separate, lossy feature used when navigating away from a branch.
9
9
 
10
- Compaction runs entirely locally; no external compaction service is involved. It normally uses the active session model. If that model cannot rank the lines — a rate limit, a quota exhaustion, a provider error, a context overflow, or an empty plan — Atomic *borrows* the next model from your configured `fallbackModels` for that one planner request. **A configured fallback model may therefore receive the compaction transcript**, and it is sent with that provider's own credentials. Borrowing never changes the session's model or thinking level. The model only selects which lines to delete — Atomic reconstructs the retained text mechanically, so surviving lines are never rewritten.
10
+ Compaction runs locally without an external compaction service. It normally asks the active session model to rank lines. If that model cannot rank them because of a rate limit, quota exhaustion, provider error, context overflow, or empty plan, Atomic *borrows* the next model from your configured `fallbackModels` for that planner request.
11
+
12
+ **A configured fallback model may therefore receive the compaction transcript**, using that provider's own credentials. Borrowing never changes the session's model or thinking level. The model only selects lines to delete. Atomic reconstructs retained text from the originals, so surviving lines are never rewritten.
11
13
 
12
14
  ## On this page and its reference
13
15
 
@@ -47,7 +49,7 @@ The planner sees the same text numbered as `N→content` and returns only one-ba
47
49
  2,5
48
50
  ```
49
51
 
50
- Each line is `start,end` — unsigned decimal integers, one comma, no brackets or prose. Atomic safety-normalizes endpoints by swapping reversed pairs, clamping to the transcript, sorting, merging overlap/adjacency, and splitting around explicit protected spans. It then reconstructs from the original input lines. The model never writes, summarizes, reorders, or normalizes retained text. Every retained non-marker line is byte-identical to an input line and remains in input order.
52
+ The model selects lines to delete; it does not rewrite retained text. Retained non-marker lines stay byte-identical and in their original order.
51
53
 
52
54
  ### Markers and repeated compaction
53
55
 
@@ -57,7 +59,7 @@ Each deleted span is replaced on its own line with exactly:
57
59
  (filtered N lines)
58
60
  ```
59
61
 
60
- The spelling is always plural, including `(filtered 1 lines)`. When a later compaction swallows an earlier marker, Atomic adds the earlier marker's count to the new marker. Adjacent old markers are folded too, so counts remain cumulative across repeated compactions. On repeated compaction, the planner receives the prior durable verbatim summary plus every currently active ordinary message except the exact protected tail.
62
+ Counts remain cumulative across repeated compactions. The spelling is always plural, including `(filtered 1 lines)`.
61
63
 
62
64
  ### Protected structure
63
65
 
@@ -75,17 +77,14 @@ You are researching only. Do not implement code changes.
75
77
  </keepContext>
76
78
  ```
77
79
 
78
- Every line of the span becomes a protected line, tag lines included, and the guarantee is mechanical rather than advisory: deletion ranges are split around protected lines after the planner responds, so a protected line survives even if the planner ignores its instructions.
79
-
80
- Three properties are worth knowing when using this for long-lived instructions:
81
-
82
- - **Spans re-arm themselves.** Each compaction re-ranks the previous compaction's output, so a constraint must survive every cycle, not just the first. Because the tag lines are protected too, the span is re-detected on the next boundary and stays protected for the life of the session.
83
- - **Tags are structural and bounded.** Each tag must be the whole line, after the transcript's role header — a tag mentioned inside prose is payload, not syntax. A span opens and closes within one message, and an unclosed span protects through the end of *its own message*, never the rest of the region. User and assistant messages may both protect: prompts, run inputs, and steering arrive as user messages, and an agent may pin its own core information — a restated contract amendment, a decision that changes later behavior. Tags inside **tool results** are inert, because that payload is file contents, fetched pages, and command output, and honoring it would let read material mark itself unreclaimable and persist ahead of real content; restate what matters in your own message instead. A closing tag with no opener is ignored.
84
- - **Kept content counts against the compression budget.** Protection does not raise the keep target. Protect 40% under a `compression_ratio` of `0.5` and the remaining 60% compresses harder to reach the same total, so the ratio stays a real bound on output size. Protecting more therefore costs the surrounding transcript, which is why the guidance is to tag the constraint rather than the material it applies to.
80
+ Protection includes the tags and survives repeated compaction, even if the planner ignores its instructions.
85
81
 
86
- Results report the force-preserved ranges as `keptRanges`, so protection that fired unexpectedly is diagnosable rather than a silent reduction in what compaction reclaimed.
82
+ - Put each tag on its own line. Tags mentioned inside prose do not protect content.
83
+ - A span stays within one user or assistant message. An unclosed span protects through that message's end; a closing tag without an opener is ignored.
84
+ - Tags in tool results have no effect. Restate important file or fetched content in your own message.
85
+ - Protected content counts toward the keep target. Protect only essential constraints, since protecting more leaves less room for surrounding context.
87
86
 
88
- Use it for role constraints, invariants, and anything whose loss would silently change behavior. Prefer it over restating a constraint: without tags, a one-line constraint competes line-by-line against bulky tool output and is the cheaper deletion.
87
+ Results report protected ranges as `keptRanges`.
89
88
 
90
89
  ## Parameters
91
90
 
@@ -102,55 +101,19 @@ Moved to [Compaction reference](/compaction/reference#per-model-budgets).
102
101
  - **Overflow:** an actual provider context overflow compacts and then retries the interrupted turn.
103
102
  - **Truncated response:** a `length` stop before the original requested output cap gets one compact-and-retry attempt, independent of reported context-window metadata. If no compactable region exists, Atomic makes at most one direct continuation under that same recovery budget; a later actual context overflow remains eligible for load-bearing recovery. A response that reached the cap keeps Atomic's bounded direct-continuation behavior.
104
103
 
105
- Exactly the configured recent-message tail is outside the compactable region; Atomic does not force the final logical turn to remain outside it. After successful automatic compaction, input queued before compaction started resumes automatically once the active run becomes idle; pressing Escape is not required to release it. Pressing Escape while compaction is active cancels it like other session operations. In isolated interactive mode, cancellation and host UI response frames use an independent RPC control lane, so they can reach the engine while the ordinary `compact` request is still pending instead of waiting behind it. Atomic writes a backup snapshot immediately before appending a compaction boundary.
104
+ The recent tail counts messages, not whole turns. Queued input resumes when the active run becomes idle after automatic compaction. Escape cancels active compaction; you do not need to press it to release queued input. Atomic saves a backup before writing the compaction boundary.
106
105
 
107
106
  Automatic continuations belong to the original prompt, including repeated output-cap continuations. The prompt and `agent_settled` lifecycle finish only after the entire chain drains, so status integrations such as [Herdr](/herdr) stay working through quiet response waits and continuation gaps.
108
107
 
109
- Manual compaction is single-flight. A manual request made while another manual compaction is still in flight joins that run and receives its result instead of starting a second model call, so it emits no extra `compaction_start`/`compaction_end` pair and appends no extra boundary; `abortCompaction()` (Escape) still cancels the single owning run for every waiter. A manual request made while automatic compaction is active takes ownership: it cancels unfinished automatic work, abandons any pending automatic continuation, waits for the active turn and automatic state to settle, then runs the requested manual compaction. If the automatic boundary committed first, the manual request runs after it rather than reusing that result or writing concurrently. In the interactive TUI, `/compact` uses this takeover only for automatic compaction; a second manual compaction or branch summary is still refused. Ordinary text typed during compaction remains queued and flushes after its non-mid-turn completion, including cancellation or failure.
108
+ Concurrent manual SDK requests share one run and result; `abortCompaction()` cancels it for all waiters. A manual request during automatic compaction cancels unfinished automatic work and its pending continuation, then runs after the active work settles. If the automatic boundary already committed, the manual run follows it. In the TUI, `/compact` can take over automatic compaction but refuses a second manual compaction or branch summary. Ordinary text remains queued until non-mid-turn compaction finishes, fails, or is cancelled.
110
109
 
111
- The post-tool check stays inside the active Pi loop: it runs the rung ladder once for that completed tool turn, returns the rebuilt context to the loop, and never calls or schedules `agent.continue()`. If the caller installed `prepareNextTurn` or `prepareNextTurnWithContext`, Atomic invokes it after compaction with that rebuilt context and sends the caller's complete replacement context through the normal context transform to the next provider request. A `shouldStopAfterTurn` result of `true` takes precedence over queued steering and follow-up messages, including messages queued while the callback is running: Atomic leaves that work pending until a later explicit prompt or continuation instead of starting another provider request. Normal context reconstruction preserves provider tool-call/result protocol validity. Below-threshold tool turns follow the unchanged request path. Because the same active run resumes without emitting another `agent_start`, the interactive TUI replaces the compaction loader with its working spinner and keeps terminal progress active as soon as successful mid-turn compaction ends; streaming feedback therefore resumes immediately without waiting for another user interaction.
110
+ SDK `prepareNextTurn` and `prepareNextTurnWithContext` callbacks receive rebuilt context after post-tool compaction. A `shouldStopAfterTurn` result of `true` leaves queued input pending until an explicit prompt or continuation. Mid-turn compaction resumes streaming without another user action.
112
111
 
113
112
  ## Planning rungs and failure behavior
114
113
 
115
- Atomic asks a planner model, at the inherited session reasoning level and through the normal session stream/provider wrapper, to rank every eligible line in one global pass and apply one threshold. The entire compactable region is sent in one classifier request; it is never split into chunks. Manual, threshold, and overflow compaction all calculate the line target directly from the prepared `compression_ratio`. Explicit protected lines form a hard keep floor.
116
-
117
- **The planner sends no output cap.** Only the provider's own context clamp bounds the response, so reasoning tokens cannot crowd out the deletion records. The reasoning level is inherited from the session and is never modified between attempts; a `model:level` suffix on a `fallbackModels` entry sets the level for that candidate only.
118
-
119
- Each planner attempt ends in exactly one typed outcome:
120
-
121
- | Outcome | Meaning | What happens next |
122
- |---|---|---|
123
- | ranked | Valid deletion records | Boundary written, `rung: "planned"` |
124
- | recovered | A length-truncated response with usable complete records | Boundary written silently, `rung: "planned"` |
125
- | overflowed | The planner request itself exceeded the context window, including a silent overflow that arrives as an ordinary `stop` or `length` completion whose usage already exceeds the window — classified before the response text is parsed, so valid-looking records or truncation recovery cannot mask it | The oldest region lines are withheld and the *same* model retried, repeatedly, until no strictly smaller view remains; the withheld head becomes a deterministic deletion |
126
- | rateLimited | A limit failure. `category` says which one — `rate_limited` for `429`/rate limit/overloaded/any `5xx`, `quota` for quota, billing, or usage-limit exhaustion — and `exhausted` separately reports whether a retry was actually scheduled | Advance to the next configured model |
127
- | unusable | Malformed output, no usable safe ranges, or reasoning starvation (`starved`) | Advance to the next configured model |
128
- | providerError | Any other provider or transport failure | Advance to the next configured model |
114
+ Atomic uses the session's reasoning level unless a fallback entry specifies its own level. The provider controls the planner's output limit.
129
115
 
130
- Each trimmed retry halves the remaining suffix, so the walk is finite, and each view
131
- derives its own keep target from `compression_ratio`. Carrying the original
132
- whole-preparation target into a smaller view would ask it to keep every visible
133
- line — a request for zero deletions, whose obedient empty answer then hits the
134
- zero-usable-ranges rejection. The planner
135
- door returns validated line numbers, so no unvalidated model output leaves it,
136
- and the runner still validates once more before writing a boundary.
137
-
138
- Generic usage-limit wording, such as `The usage limit has been reached`, is
139
- classified as quota exhaustion (`exhausted: false`). That is a deliberate local
140
- addition rather than a copy of pi-ai's tables: pi-ai lists it in neither its
141
- retryable nor its non-retryable set, so it never spends a backoff, and reporting
142
- it as transient throttling would claim a retry budget that was never used.
143
-
144
- Unavailable credentials are ladder control flow, not an early failure. If the
145
- session model has no usable credentials, no request is attempted for it, that
146
- candidate is marked attempted, and a configured fallback with its own working
147
- credentials can still rank the lines. A load-bearing caller with no usable
148
- credentials anywhere still reaches the credential-free fresh rung; a recoverable
149
- caller reports the original authentication error and writes nothing.
150
-
151
- `settings.retry` still governs transport attempts *within* one candidate, with its existing backoff. When a candidate is exhausted, Atomic borrows the next entry from `settings.fallbackModels`, resolving that candidate's own credentials. Each candidate is tried at most once per compaction run, in configured order, keyed by `provider/model:thinkingLevel`. That walk is one monotonic pass over the configured list. Each position is inspected at most once — whether it fails to resolve to a model, has no usable credentials, duplicates an earlier identity, or yields a planner — so the order can never rewind to an earlier entry even if the registry or its credentials later change.
152
-
153
- Borrowing never mutates the session: no `agent.state.model` write, no model-change or thinking-level entry, no system-prompt refresh, no `model_changed`/`model_select`/`model_fallback_start`, and no `agent.continue()`. After compaction returns, `session.model` is exactly what it was before, and the main chat's own fallback bookkeeping is untouched.
116
+ `settings.retry` controls retries within one model. If planning fails, Atomic tries configured `settings.fallbackModels` in order, using each model's own credentials. Unavailable credentials do not prevent trying later models. Borrowing does not change the chat model, thinking level, or model-selection events.
154
117
 
155
118
  When every configured model is exhausted, what happens depends on how much the caller can afford to lose:
156
119
 
@@ -161,37 +124,21 @@ When every configured model is exhausted, what happens depends on how much the c
161
124
  | Overflow recovery | load-bearing | yes | yes |
162
125
  | Post-tool preflight | load-bearing | yes | yes |
163
126
 
164
- A recoverable compaction fails honestly: it writes no compaction entry, schedules no continuation, and reports the typed cause through `compaction_end`. Manual compaction's recoverable urgency is fixed at the door: `session.compact()` projects only compaction parameters, so no runtime property on a caller-supplied object can raise it to `load_bearing` and reach the destructive rung. A load-bearing compaction always completes, falling through to the **fresh context window** rung described below.
127
+ Recoverable failure writes no boundary, schedules no continuation, and reports the cause through `compaction_end`. Manual calls cannot request destructive recovery. Overflow recovery and post-tool preflight can fall back to the fresh context window below.
165
128
 
166
- A syntactically valid usable result is accepted once after safety-only normalization, even when it deletes fewer lines or tokens than requested. Atomic never adds or restores model-selected deletions to force a target. During overflow recovery, the existing one-shot compact-and-retry continuation may therefore surface unresolved overflow naturally.
129
+ A successful compaction may delete less than requested. The retry can still report a context overflow.
167
130
 
168
131
  ### The fresh context window rung
169
132
 
170
- `startNewContextWindow` is total: no provider, no credentials, no network, no failure mode. A region below the planner minimum reaches it only when the context is already known not to fit — overflow recovery, or a post-tool preflight whose projected context is over the provider hard input limit — because no planner change could make such a region rankable. A post-tool threshold crossing that still fits is a safe no-op instead: no boundary, no planner call, and the follow-up request proceeds unchanged. Clearing a context that fits would destroy conversation for nothing. It discards the compactable region and any prior durable summary, keeps explicit protected spans, and keeps the `preserve_recent` protected tail — dropping the tail only when the tail **alone** exceeds the provider hard input limit, in which case the boundary persists `firstKeptEntryId: null`. It emits the whole region as one deletion range and hands it to the same validation and reconstruction path as every other rung, so retained lines stay byte-identical.
171
-
172
- A committed fresh boundary stays visible even when the following provider hard-input-limit gate reports its own error: `compaction_end` carries `result` and `errorMessage` independently, and the boundary is shown before the status. The fresh rung destroys conversation, so it is loud: the boundary reads `✻ Context cleared (compaction degraded)` instead of `✻ Context compacted`, in the main chat and in attached workflow stage chat alike, and `details.rung` records `"fresh"` durably. The precise cause stays in the `0600` diagnostic sidecar.
133
+ If all configured planners fail during overflow recovery or post-tool preflight, Atomic can discard older compactable conversation and its prior summary. Explicit protected spans and the recent tail remain, unless the tail alone exceeds the provider's hard input limit. A region too small to plan is cleared only when known not to fit; a post-tool threshold crossing that still fits leaves it unchanged.
173
134
 
174
- The ladder guarantees that *compaction* completes. It does not guarantee the *turn* succeeds: if every configured model is rate limited, the follow-up request will be too. What it buys is that a compaction failure does not additionally destroy the turn, that a healthy fallback model rescues quality when one exists, and that the retry starts from a small context.
135
+ The chat shows `✻ Context cleared (compaction degraded)` rather than `✻ Context compacted`, and results record `details.rung: "fresh"`. Check what context remains before continuing important work.
175
136
 
176
- During a post-tool preflight, Atomic still gates the rebuilt context: if it is known to exceed the provider's hard input limit even after compaction, Atomic refuses to send the follow-up request and reports the limit failure clearly. The fresh rung's tail-dropping rule exists so that gate is reachable rather than hollow.
137
+ Clearing context does not fix provider rate limits or guarantee the next turn succeeds. Atomic refuses a follow-up request still known to exceed the hard input limit. A committed boundary remains visible even if that request fails; `compaction_end` can contain both `result` and `errorMessage`.
177
138
 
178
139
  ### Length-truncated response recovery
179
140
 
180
- When the planner model's output is truncated at the provider's own limit (indicated by `stopReason: "length"`), Atomic silently recovers complete newline-terminated deletion records from the truncated response. Atomic sends no `max_tokens` of its own, so this reflects the provider's context clamp rather than a caller-imposed cap. A deterministic line parser validates each completed line (those followed by a newline) against the strict `start,end` grammar. The final fragment after the last newline is always discarded — even if it looks syntactically complete — because EOF may have cut a multi-digit integer (e.g. `300,30` could have intended `300,305`). If any completed line has invalid syntax or zero usable records survive validation, the attempt becomes an `unusable` outcome and the ladder advances.
181
-
182
- Example of truncated output:
183
-
184
- ```text
185
- 120,180
186
- 6,40
187
- 300,
188
- ```
189
-
190
- Recovery yields `120,180` and `6,40`; discards `300,` without guessing. The planner prompt instructs the model to emit ranges in descending deletion confidence (lowest continuation value first) so the most important deletions appear earliest and survive truncation.
191
-
192
- Successful partial recovery is an ordinary successful compaction: no warning, banner, toast, or special status copy appears. The UI shows the normal spinner then `✻ Context compacted`.
193
-
194
- For operational observability, a private recovery diagnostic sidecar is written beside persisted sessions with `0600` permissions. It records the full raw response, stop reason, usage (including `usage.reasoning`), the request `maxTokens` (now always absent, since no cap is sent), model metadata, recovered range count, and recovery category. The sidecar path is never surfaced in the success UI, error messages, or user-visible status. In-memory sessions and sidecar write failures do not affect the successful recovery.
141
+ Atomic may recover usable deletion records when the provider truncates a planner response. Successful recovery appears as ordinary `✻ Context compacted`; unusable output advances to the next configured model.
195
142
 
196
143
  ### Planner failure diagnostics
197
144
 
@@ -201,15 +148,11 @@ For a persisted session, each failed planner attempt writes its own JSON sidecar
201
148
  Compaction range planning returned malformed output (diagnostic: /path/session-compaction-diagnostic-1785222000000-019fa7….json)
202
149
  ```
203
150
 
204
- The private sidecar uses `0600` permissions where supported and records the full planner response text, stop reason, provider error, usage, the request `maxTokens` (absent — no cap is sent), timestamp, failure category, and non-secret model metadata for **the model that made that attempt**, so a run rescued by a fallback leaves per-model evidence. It does not record API keys, request headers, the planner prompt, or the numbered transcript request. The raw response itself may contain sensitive text if the model echoed input, so treat the sidecar with the same care as its adjacent session file.
205
-
206
- Diagnostic categories distinguish malformed output, valid output with no usable ranges, provider errors, stream failures, reasoning starvation (`starved`), transient rate limiting (`rate_limited`), quota exhaustion (`quota`), and context overflow (`context_overflow`) — overflow is a distinct typed outcome in code, so it is distinct in the durable record too rather than folded into a generic provider failure. When a *borrowed* fallback model produces the accepted ranking, a separate `<session>-compaction-success-<timestamp>-<id>.json` sidecar records that model and its effective thinking level, so a rescued run leaves evidence for both the model that failed and the model that succeeded. Quota, billing, and usage-limit exhaustion get their own `quota` category, so they stay distinguishable from transient throttling in the durable record and not only in provider text. A limit record additionally sets `rateLimitExhausted`, derived from observed retry activity: `true` only when a retry was actually scheduled, and `false` for quota or for a throttled request under a disabled or zero retry budget. Atomic classifies the whole HTTP `5xx` class as rate limiting, which is a local broadening — pi-ai lists only selected statuses, so it may schedule no backoff for one Atomic types this way, and `rateLimitExhausted` reports that fact rather than assuming it. Every sidecar filename carries both a timestamp and a per-attempt identifier, and is created exclusively, so two attempts inside the same millisecond — routine across overflow trims or a fast fallback walk — cannot overwrite each other's evidence. In-memory sessions do not create sidecars. If the diagnostic write fails, Atomic preserves the original classification rather than replacing the planner outcome.
151
+ Treat diagnostic sidecars like session files: a raw model response may echo sensitive input. They use `0600` permissions where supported and omit API keys, request headers, and the planner request. In-memory sessions do not create them.
207
152
 
208
153
  Interactive main chat and attached workflow stage chat treat `compaction_end` as the authority for cancellation and failure UI. A failed or cancelled `/compact` stops its spinner, shows the event-provided status or diagnostic path without a duplicate stack trace, writes no boundary, and leaves the session usable for another `/compact` attempt or a normal follow-up turn.
209
154
 
210
- Context thresholds and the Compacted from token count use API-aware normalized usage. OpenAI Responses, Codex Responses, and OpenAI Completions sum uncached input plus cache-read/cache-write partitions. Anthropic Messages alone applies the mirrored-cache guard needed by compatible endpoints that duplicate the same prompt tokens across `input` and cache fields.
211
-
212
- Persisted `stats.tokensBefore`, `stats.tokensAfter`, and `percentReduction` are symmetric heuristic estimates of the compactable region plus the kept tail. They are separate from the provider-aware `tokensBefore` on the compaction entry, which is used only for budgeting and display. If the reconstructed text estimates larger than the original region, `percentReduction` is negative.
155
+ The displayed token count and estimated reduction can differ. See the [persisted statistics reference](/compaction/reference#persistence-and-resume) when interpreting results.
213
156
 
214
157
  ## Persistence and resume
215
158
 
@@ -241,25 +184,7 @@ Branch summarization is a separate mechanism from context compaction. It generat
241
184
 
242
185
  ### How It Works
243
186
 
244
- 1. **Find common ancestor**: Deepest node shared by old and new positions
245
- 2. **Collect entries**: Walk from old leaf back to common ancestor
246
- 3. **Prepare with budget**: Include messages up to token budget (newest first)
247
- 4. **Generate summary**: Call the LLM with tools disabled; reject tool calls and token-cap-truncated prose
248
- 5. **Append entry**: Save `BranchSummaryEntry` at navigation point
249
-
250
- ```mermaid
251
- %%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#f8f9fa','primaryTextColor':'#2c3e50','primaryBorderColor':'#4a5568','lineColor':'#4a90e2','secondaryColor':'#ffffff','tertiaryColor':'#e9ecef'}}}%%
252
- flowchart TD
253
- A["user navigates /tree\nold leaf → new target"]
254
- B["find common ancestor"]
255
- C["collect abandoned branch entries\n(old leaf → common ancestor)"]
256
- D["prepare with token budget\n(newest first)"]
257
- E["generate branch summary\nLLM call · structured format"]
258
- F["append BranchSummaryEntry\nat common ancestor or new target"]
259
- G["navigate to new target\nbranch summary context carried forward"]
260
-
261
- A --> B --> C --> D --> E --> F --> G
262
- ```
187
+ Atomic summarizes the branch you leave, prioritizing newer messages within its token budget, and saves the summary at the navigation point. It rejects incomplete summaries rather than saving partial prose.
263
188
 
264
189
  ```text
265
190
  Tree before navigation:
@@ -280,12 +205,7 @@ After navigation with summary:
280
205
 
281
206
  ### Cumulative File Tracking
282
207
 
283
- Branch summarization tracks files cumulatively. When generating a summary, Atomic extracts file operations from:
284
-
285
- - Tool calls in the messages being summarized
286
- - Previous branch summary `details` (if any)
287
-
288
- This means file tracking accumulates across nested branch summaries, preserving the full history of read and modified files.
208
+ Branch summaries retain the cumulative history of read and modified files, including files recorded by earlier branch summaries.
289
209
 
290
210
  ### BranchSummaryEntry Structure
291
211
 
@@ -312,8 +232,6 @@ interface BranchSummaryDetails {
312
232
 
313
233
  Extensions can store custom data in `details`.
314
234
 
315
- See [`collectEntriesForBranchSummary()`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), [`prepareBranchEntries()`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), and [`generateBranchSummary()`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) for the implementation.
316
-
317
235
  ## Branch Summary Format
318
236
 
319
237
  Moved to [Compaction reference](/compaction/reference#branch-summary-format).
@@ -342,13 +260,13 @@ When prompted, choose one of:
342
260
 
343
261
  Branch summaries are separate from `/compact`: branch navigation can generate summary prose (optionally with focus instructions), while Verbatim Compaction lets a model select numbered line ranges and reconstructs retained text mechanically.
344
262
 
345
- See [Compaction](/compaction) for Verbatim Compaction, branch summarization internals, and extension hooks.
263
+ Use the [Compaction reference](/compaction/reference) for extension hooks and saved formats.
346
264
 
347
265
  ## Summary request isolation
348
266
 
349
- Verbatim planning and branch summarization are standalone provider requests. Each receives a fresh routing session ID instead of reusing the chat's provider-affinity ID, and sets cache retention to `none` so it cannot write summary/planner prompts into the main prompt cache. All three explicitly set `toolChoice: "none"` and reject returned tool calls. Prose branch/session summaries reject `length` stops rather than persisting partial text; the deletion planner alone may recover complete records from a truncated response, and every recovered range still passes the normal validation airlock. Neither sends a `max_tokens` of its own. Existing API-key, header-only `ANTHROPIC_AUTH_TOKEN`, custom-header, abort, and bounded retry behavior still applies. These controls affect provider request routing/cache writes only; successful results are persisted through the normal Atomic session lifecycle.
267
+ Summary and planner requests do not execute tools or write into the main chat's prompt cache. They retain normal authentication, cancellation, and retry behavior.
350
268
 
351
- **Isolation is per model, not per session.** When compaction borrows a fallback model, that request is built with the borrowed candidate's own API key, headers, and base URL; the session model's credentials are never sent to another provider. The corollary is a real data-flow change: **a model listed in `settings.fallbackModels` may receive the compaction transcript.** The list is user-authored, so the set of providers that can see it is yours to control — remove an entry if you do not want it to see transcript content.
269
+ **A model in `settings.fallbackModels` may receive the compaction transcript.** It uses its own provider credentials. Remove an entry if you do not want that provider to receive transcript content.
352
270
 
353
271
  ## Settings
354
272
 
@@ -59,9 +59,7 @@ Prefer direct file automation for structured tasks such as assembling slides, fi
59
59
 
60
60
  Before writing a script, identify the input format, required features, output path, and library or app version. Read the relevant API reference rather than guessing methods. Start with a read-only query or a disposable copy. Save to a new path and reopen the result to check its contents; use a compatible viewer or renderer when appearance matters. Scripts still need the same authorization as UI actions to overwrite, upload, or publish files.
61
61
 
62
- For scripts that operate an application, also keep these application-specific checks:
63
-
64
- Before writing a script, identify the target app/version, input document, object names, and output path. Read the application's API reference or scripting dictionary rather than guessing methods. Start with a read-only query or a disposable copy, and keep a record of which operations changed the document.
62
+ For scripts that operate an application, also identify the target app/version and object names. Read its API reference or scripting dictionary, and record which operations changed the document.
65
63
 
66
64
  ### macOS recipe: create a draft with osascript
67
65
 
@@ -1,10 +1,9 @@
1
1
  # Containerization
2
2
 
3
- Atomic runs with all permissions by default, but in some cases, you will want to have more control over what directories Atomic can write to and which accesses it has.
3
+ Atomic runs with all permissions by default. To restrict which directories it can write to and what it can access, choose one of two approaches:
4
4
 
5
- There are two general options. You can either
6
- 1. run the whole `atomic` process inside an isolated environment, or
7
- 2. run `atomic` on the host and route tool execution into an isolated environment.
5
+ 1. Run the whole `atomic` process inside an isolated environment.
6
+ 2. Run `atomic` on the host and route tool execution into an isolated environment.
8
7
 
9
8
  Containerization is the outer boundary, not the only one. [Security](/security) covers the project-trust prompt that gates which project-scoped extensions, skills, and settings load in the first place; read it alongside this page when you are deciding what an untrusted repository is allowed to do.
10
9
 
@@ -93,7 +92,7 @@ docker run --rm -it \
93
92
  atomic-sandbox
94
93
  ```
95
94
 
96
- The `-v "$PWD:/workspace"` mounts your current directory into the container at /workspace such that reads and writes in `/workspace` inside Docker directly affect your host files, like in the Gondolin example.
95
+ The `-v "$PWD:/workspace"` option mounts your current directory at /workspace in the container. Reads and writes in `/workspace` directly affect your host files, as in the Gondolin example.
97
96
 
98
97
  Use a named volume for `/root/.atomic/agent` if you want container-local settings and sessions. Mounting your host `~/.atomic/agent` exposes host auth and session files to the container.
99
98
 
@@ -135,7 +135,16 @@ interface ProviderModelConfig {
135
135
 
136
136
  The `cost` shape is equivalent to `Model<Api>["cost"]`. Base rates and every tier are complete rate sets. When multiple thresholds match, `calculateCost()` uses the highest threshold and applies that tier to all four cost buckets for the request.
137
137
 
138
- `openrouter` sends `reasoning: { effort }`. `deepseek` sends `thinking: { type: "enabled" | "disabled" }` and `reasoning_effort` when enabled. `together` sends `reasoning: { enabled }` and also `reasoning_effort` when `supportsReasoningEffort` is enabled. `qwen` is for DashScope-style top-level `enable_thinking`. Use `qwen-chat-template` for local Qwen-compatible servers that read `chat_template_kwargs.enable_thinking` and need `preserve_thinking`. Use `chat-template` for configurable `chat_template_kwargs`, for example DeepSeek V3.x behind vLLM with `chatTemplateKwargs: { "thinking": { "$var": "thinking.enabled" } }`. Use `thinkingFormat: "baseten"` with `chatTemplateArgs` when the provider expects toggle values under `chat_template_args` and optionally supports top-level `reasoning_effort`.
138
+ Choose the thinking format your endpoint expects:
139
+
140
+ - `openrouter` sends `reasoning: { effort }`.
141
+ - `deepseek` sends `thinking: { type: "enabled" | "disabled" }` and `reasoning_effort` when enabled.
142
+ - `together` sends `reasoning: { enabled }` and also `reasoning_effort` when `supportsReasoningEffort` is enabled.
143
+ - `qwen` is for DashScope-style top-level `enable_thinking`.
144
+ - Use `qwen-chat-template` for local Qwen-compatible servers that read `chat_template_kwargs.enable_thinking` and need `preserve_thinking`.
145
+ - Use `chat-template` for configurable `chat_template_kwargs`, for example DeepSeek V3.x behind vLLM with `chatTemplateKwargs: { "thinking": { "$var": "thinking.enabled" } }`.
146
+ - Use `thinkingFormat: "baseten"` with `chatTemplateArgs` when the provider expects toggle values under `chat_template_args` and optionally supports top-level `reasoning_effort`.
147
+
139
148
  `thinkingTokenBudgetField` sends a clamped per-level thinking budget as a top-level request field (`thinking_token_budget` on vLLM, `thinking_budget` on Qwen/SGLang, `thinking_budget_tokens` on llama.cpp). `supportsThinkingTokenBudget: true` is an alias for the vLLM field name. Do not combine it with `reasoning_effort` on DashScope Qwen models.
140
149
  `vllmPriority` sends a top-level `priority` request field for `openai-completions` providers. Lower values are scheduled earlier and the vLLM server default is `0`, so it only takes effect when vLLM runs with `--scheduling-policy priority`. Set it on a background or batch model so its long prefills queue behind interactive sessions. Unset by default and never set on the generated catalog.
141
150
  `cacheControlFormat: "anthropic"` applies Anthropic-style `cache_control` markers to the system prompt, last tool definition, and last user, assistant, or tool-result text content.
@@ -75,9 +75,11 @@ After registration, users can authenticate via `/login corporate-ai`.
75
75
 
76
76
  Existing extension OAuth definitions keep their `login`, `refreshToken`, `getApiKey`, and optional `modifyModels` methods. OAuth refresh is serialized so concurrent requests do not overwrite each other's credentials.
77
77
 
78
- In isolated interactive mode, extension code and executable OAuth methods remain in the engine process. Atomic transports only the JSON-safe provider description (`id`, `name`, `loginLabel`, and `usesCallbackServer`) to the terminal process; it never serializes provider functions or acquired credentials and does not load the extension a second time in the frontend. `loginLabel` replaces the login dialog title, while `usesCallbackServer: true` exposes a redirect-URL paste field that races the browser callback. The engine executes the provider's login closure and correlates browser URLs, device codes, progress/info messages, prompts, selections, and manual-code callbacks with the originating login.
78
+ OAuth callbacks run in the engine in isolated interactive mode. Use the provided callbacks for user interaction rather than relying on terminal-process state.
79
79
 
80
- After acquisition, the engine owns serialized credential persistence and logout. It publishes the authenticated provider against its already-loaded snapshot as soon as persistence succeeds; dynamic catalog and ambient-availability refreshes run separately under the model selector's deadline and never extend the login transaction. Logout similarly publishes stored-credential removal without invoking `refreshModels`; Atomic gives the provider's local remaining-auth probe a short deadline so extension code cannot keep the dialog open. The frontend applies the returned snapshot only after the engine transaction succeeds. Escape or Ctrl+C cancels only the matching login and leaves the prior credential/catalog intact. Built-in OAuth and direct, non-isolated extension OAuth use the same persistence and cancellation semantics; later provider registrations continue to override earlier registrations by ID.
80
+ `loginLabel` sets the dialog title. `usesCallbackServer: true` offers a redirect-URL paste field alongside the browser callback.
81
+
82
+ Successful login persists credentials before refreshing the catalog. Logout removes stored credentials without calling `refreshModels`. Escape or Ctrl+C cancels the matching login and preserves the previous credentials and catalog. Later registrations still override earlier providers by ID.
81
83
 
82
84
  Intentional cancellation is quiet, including native `AbortError`, an aborted signal or its exact reason, nested abort causes, and the legacy exact `Login cancelled` error. Provider denial, timeout, network/protocol errors, malformed responses, token exchange failures, and storage failures remain visible. Catalog-refresh failures are reported by `/model` while cached models remain selectable; they do not turn a persisted login into a failed transaction.
83
85
 
@@ -28,21 +28,26 @@ All providers follow the same pattern:
28
28
  import {
29
29
  type AssistantMessage,
30
30
  type AssistantMessageEventStream,
31
- type Context,
32
31
  type Model,
33
32
  type SimpleStreamOptions,
33
+ type TranscriptContext,
34
34
  calculateCost,
35
35
  createAssistantMessageEventStream,
36
+ getCurrentSystemPrompt,
37
+ getCurrentTools,
36
38
  } from "@bastani/pi-ai";
37
39
 
38
40
  function streamMyProvider(
39
41
  model: Model<any>,
40
- context: Context,
42
+ context: TranscriptContext,
41
43
  options?: SimpleStreamOptions
42
44
  ): AssistantMessageEventStream {
43
45
  const stream = createAssistantMessageEventStream();
44
46
 
45
47
  (async () => {
48
+ const systemPrompt = getCurrentSystemPrompt(context.messages);
49
+ const tools = getCurrentTools(context.messages);
50
+ // Initialize output message
46
51
  // Initialize output message
47
52
  const output: AssistantMessage = {
48
53
  role: "assistant",
@@ -121,7 +126,7 @@ The `partial` field in each event contains the current `AssistantMessage` state.
121
126
 
122
127
  `StopReason` is `"pending" | "stop" | "length" | "toolUse" | "error" | "aborted"`.
123
128
 
124
- Start the partial message at `"pending"`. It is the reason every in-flight message carries, and it says the terminal event has not arrived yet — it is not a default standing in for `"stop"`. Set the real reason when the provider says the turn ended, then push `done` with it.
129
+ Start every in-flight partial message at `"pending"`. This means the terminal event has not arrived, not that the turn ended with `"stop"`. When the provider reports the end of the turn, set the real reason and push `done` with it.
125
130
 
126
131
  Two checks belong immediately before `done`:
127
132
 
@@ -148,7 +148,7 @@ Moved to [Provider streaming API](/custom-provider/streaming#registration).
148
148
 
149
149
  ## Testing Your Implementation
150
150
 
151
- Test your provider against focused tests that mirror Atomic's provider contract. If you are working from the source checkout, note that provider internals come from `@bastani/pi-ai`; this monorepo does not contain a `packages/ai/test` directory to copy from directly:
151
+ Test your provider/model pairs against these behaviors. The filenames below are suggested test names, not a required test suite:
152
152
 
153
153
  | Test | Purpose |
154
154
  |------|---------|
@@ -1,55 +1,16 @@
1
1
  # Development
2
2
 
3
- See [AGENTS.md](https://github.com/bastani-inc/atomic/blob/main/AGENTS.md) for additional guidelines.
3
+ For extensions and SDK integrations, start with [Build with Atomic](/build).
4
4
 
5
5
  ## Setup
6
6
 
7
- ```bash
8
- git clone https://github.com/bastani-inc/atomic
9
- cd atomic
10
- npm ci --ignore-scripts
11
- npm run build
12
- ```
7
+ To install the released CLI, follow [Installation](/getting-started/installation).
13
8
 
14
- Use npm for installs, builds, checks, and Vitest suites. Bun compiles standalone binaries and runs repository TypeScript scripts. Do not use yarn, pnpm, or `bun install`.
15
-
16
- Atomic keeps the caller's current working directory when launched from development wrappers.
17
-
18
- Run package scripts from the monorepo root or a package directory, for example:
19
-
20
- ```bash
21
- npm run test:unit
22
- npm run build --workspace=@bastani/atomic
23
- ```
24
-
25
- ## Forking / Rebranding
26
-
27
- Configure via `package.json`:
28
-
29
- ```json
30
- {
31
- "atomicConfig": {
32
- "name": "atomic",
33
- "configDir": ".atomic"
34
- }
35
- }
36
- ```
37
-
38
- Change `name`, `configDir`, and the `bin` field for your fork. These control the CLI banner, config paths, and environment variable names. Legacy `piConfig` remains a compatibility fallback.
39
-
40
- The app-specific `<appName>Config` key is preferred. Atomic sets these to `atomic`, `.atomic`, and the `atomic` executable.
9
+ <a id="forking--rebranding"></a>
41
10
 
42
11
  ## Path Resolution
43
12
 
44
- Three execution modes: package-manager install, standalone binary, and source checkout.
45
-
46
- **Always use `src/config.ts`** for package assets:
47
-
48
- ```typescript
49
- import { getPackageDir, getThemeDir } from "./config.js";
50
- ```
51
-
52
- Never use `__dirname` directly for package assets.
13
+ Atomic supports package-manager installs and standalone archives. Keep an archive's complete payload together.
53
14
 
54
15
  ## Debug Command
55
16
 
@@ -57,7 +18,7 @@ Never use `__dirname` directly for package assets.
57
18
  - Rendered TUI lines with ANSI codes
58
19
  - Last messages sent to the LLM
59
20
 
60
- For startup measurements, see the [Windows startup benchmark](https://github.com/bastani-inc/atomic/blob/main/scripts/perf/windows-startup/README.md). Internal timing marks do not prove terminal first paint.
21
+ Review this log for sensitive conversation content before sharing it.
61
22
 
62
23
  ## PDF and engine diagnostics
63
24
 
@@ -72,105 +33,19 @@ displayed diagnostic and conversion error when reporting a PDF problem.
72
33
 
73
34
  ## Startup timing probes
74
35
 
75
- Use the [current startup benchmark instructions](https://github.com/bastani-inc/atomic/blob/main/scripts/perf/windows-startup/README.md).
76
-
77
- Use `scripts/perf/windows-startup/benchmark.ts` for Windows startup claims. It launches the ordinary bare `atomic` command through a real 120x40 ConPTY, feeds ordered output into `@xterm/headless`, and timestamps each receive with `process.hrtime.bigint()`. Complete first paint requires the final `Atomic v<version>` identity, the focused `❯ ` editor, and two identical settled frames at least one 80 ms animation interval apart. `dispatchMs` runs from the Enter write to the first byte observed by a raw TCP loopback provider. The headline `spawnToDispatchMs` is exactly `startupCompleteMs + dispatchMs`; `launchToProviderFirstByteMs` separately retains the contiguous launch-to-provider interval that also contains nonce typing and editor-echo wait. The provider request must contain the nonce and the normal tool schemas, and every accepted sample must pass `/workflow list` after the timed response. See [the benchmark README](https://github.com/bastani-inc/atomic/blob/main/scripts/perf/windows-startup/README.md) for artifact preparation, cache profiles, raw records, and summary commands.
78
-
79
- Do not use `time-to-first-frame` as settled-paint evidence, and do not substitute `launchToProviderFirstByteMs` for the contract sum. The first-frame mark records the host's first requested identity frame after the header is mounted; it does not prove terminal receipt, animation settlement, engine resource readiness, or provider readiness. `ATOMIC_STARTUP_BENCHMARK=1`, `--no-extensions`, and `--no-tools` are attribution controls only. They do not run the accepted full CLI path with bundled workflows, normal extensions, tools, and provider dispatch.
80
-
81
- The process-local lifecycle timing seams use monotonic nanoseconds and remain disabled until an internal diagnostic adapter installs a synchronous sink. With no sink, they do not read the clock, write output, or schedule work. External ConPTY and TCP marks remain authoritative. Startup now has several deliberate partial orders rather than one cross-process sequence:
82
-
83
- ```text
84
- interactive host: process-entry → interactive-engine-spawn → engine-ready
85
- → tui-start → header-mounted → initialize engine-bound state
86
- → chat-output-release → interactive-input-handler-ready
87
-
88
- isolated child: process-entry → engine-ready → engine-bound
89
- → engine-resources-ready
90
-
91
- external screen: first-terminal-write → startup-coherent → startup-complete
36
+ For a startup problem, report your OS, terminal, installation method, and Atomic version.
92
37
 
93
- first turn: interactive-first-submit → before-provider-request
94
- ```
95
-
96
- The header and editor are mounted before the host waits for `engine-bound`; the child can therefore report binding while the host is applying its theme or requesting that frame. `engine-bound` means RPC control plus the mandatory minimal session are available. `engine-resources-ready` is a separate, generation-scoped child message sent only after a staged optional snapshot containing bundled extensions, tools, providers, skills, prompts, and themes commits. User prompts, extension commands, model/resource commands, session replacement, and tool-dispatching RPC calls wait for that gate. After a readiness failure, `/reload` bypasses the rejected gate to start a fresh transactional attempt; successful retry replaces the gate before later work proceeds. Escape cancels a first submission that is still waiting, so that continuation cannot dispatch later. `session_start` messages are queued against the candidate snapshot and released only after publication. Mandatory Intercom remains in the minimal runtime. A failed transactional candidate leaves host-managed settings, providers, tools, resources, event subscriptions, and system-prompt state unchanged, restores an unadmitted prompt draft exactly, and reports the generation failure once. Extension-owned objects stored with `sessionScopedExtensionState` are deliberately shared across reloads and are not cloned or rolled back.
97
-
98
- `engine-resources-ready` is recorded in the isolated engine process; host marks are recorded in the interactive process. The two process clocks are monotonic but must not be subtracted without an external synchronization protocol. `startup-coherent` and `startup-complete` describe internal render composition, not terminal receipt. The external VT predicates decide the reported first-paint marks.
99
-
100
- For package-manager installs under Node 22, Atomic enables Node's persistent module compile cache in both the host and isolated child and flushes the host cache before spawning the child. Explicit `NODE_COMPILE_CACHE` and `NODE_DISABLE_COMPILE_CACHE` settings pass through unchanged. This preserves Node's coverage opt-out and avoids forcing a new cache directory or a first-run-only precompile step. SEA, V8 snapshots, and package-install precompilation were not adopted because Atomic's dynamic ESM, native modules, workers, and first-run requirements do not provide a safe portable boundary.
101
-
102
- Set `ATOMIC_TIMING=1` only for the older human-readable phase diagnostics. Normal interactive launches print that initial timing group before `interactiveMode.run()` starts the TUI loop, so later marks are not printed during ordinary sessions.
103
-
104
- For the current Bun version, Windows-hosted bytecode requirement, and archive-validation caveats, see [Windows interactive startup](/windows#interactive-startup).
105
-
106
- ## Testing
107
-
108
- ```bash
109
- npm run check # Typechecks and published-shrinkwrap validation
110
- npm run test:unit # Root unit tests
111
- npm run test:integration # Root integration tests
112
- npm run test:all # All root test projects
113
- npm run test:scripts # Repository script tests under Node
114
- npm run test --workspace=@bastani/atomic -- test/specific.test.ts
115
- ```
116
-
117
- CI runs root unit and integration suites on Linux and Windows. See [CI documentation](https://github.com/bastani-inc/atomic/blob/main/docs/ci.md) for job details and release procedures.
118
-
119
- To run only the typechecks:
120
-
121
- ```bash
122
- npm run typecheck # Type-check the monorepo
123
- ```
124
-
125
- ### Installed package smoke test
126
-
127
- After building, run:
128
-
129
- ```bash
130
- ATOMIC_REQUIRE_INSTALLED_NODE_SMOKE=1 npx vitest --run --project integration test/integration/installed-package-node-extensions.test.ts
131
- ```
132
-
133
- This checks Node startup and builtin extension loading outside the checkout.
134
-
135
- Atomic ships an npm shrinkwrap. After dependency changes, regenerate it with `npm run shrinkwrap:coding-agent` and validate with `npm run check`.
38
+ <a id="testing"></a>
39
+ <a id="installed-package-smoke-test"></a>
136
40
 
137
41
  ## Deterministic installs
138
42
 
139
- See [Testing](#testing) for the current shrinkwrap commands.
43
+ Package-manager installs use Atomic's published shrinkwrap.
140
44
 
141
- `@bastani/atomic` ships `packages/coding-agent/npm-shrinkwrap.json` so package-manager installs resolve the same dependency tree every time. Contributors working from a source checkout can validate that the checked-in shrinkwrap is up to date with:
45
+ ## Release security boundary
142
46
 
143
- ```bash
144
- bun run scripts/generate-coding-agent-shrinkwrap.mjs --check
145
- ```
47
+ Download official releases through the [installation instructions](/getting-started/installation). Maintainers should follow the [release pipeline](https://github.com/bastani-inc/atomic/blob/main/docs/ci.md#direct-release-trigger-and-recovery).
146
48
 
147
- ## Release security boundary
49
+ <a id="project-structure"></a>
148
50
 
149
- Follow the [current release pipeline](https://github.com/bastani-inc/atomic/blob/main/docs/ci.md#release-pipeline).
150
-
151
- Atomic's release bases remain at the `0.0.0` placeholder. `scripts/cut-release.ts` stamps the real version only on a detached tagged release commit.
152
-
153
- ## Project Structure
154
-
155
- ```text
156
- packages/
157
- ai/ # Atomic's LLM provider fork
158
- coding-agent/ # CLI, interactive mode, and core runtime
159
- workflows/ # Workflow execution
160
- subagents/ # Subagent orchestration
161
- mcp/ # MCP adapter
162
- web-access/ # Web search and content extraction
163
- intercom/ # Cross-session coordination
164
- ```
165
-
166
- The bundled companion-package roles are:
167
-
168
- ```
169
- packages/
170
- coding-agent/ # Atomic CLI, agent loop, providers, TUI, and core runtime
171
- workflows/ # First-party workflow extension bundled into Atomic
172
- subagents/ # Built-in subagent orchestration and reusable agents
173
- mcp/ # Built-in MCP adapter extension
174
- web-access/ # Built-in web search and content extraction tools
175
- intercom/ # Built-in cross-session coordination channel
176
- ```
51
+ For source setup and repository checks, see [DEV_SETUP.md](https://github.com/bastani-inc/atomic/blob/main/DEV_SETUP.md).