@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
package/docs/providers.md CHANGED
@@ -30,15 +30,25 @@ Use `/login` in interactive mode, then select a provider:
30
30
  - xAI (Grok/X subscription)
31
31
  - Radius
32
32
 
33
- Use `/login <provider>` (for example `/login openrouter` or `/login kimi-coding`) to jump directly to a provider, then select subscription or API-key authentication when both are available. OpenRouter opens its provider-owned browser PKCE flow and asks whether it should mint a new API key; complete the browser redirect before returning to Atomic. On a remote or headless machine the browser cannot reach the loopback callback, so the OpenRouter login also accepts a pasted value: give it the final redirect URL, or the authorization code on its own. Claude and ChatGPT (Codex) offer the same paste fallback, as does an extension provider that sets `usesCallbackServer`. Kimi Code displays its provider-owned device URL/code and polls until approval, then refreshes expired tokens automatically. Built-in and extension-provided OAuth use the same direct and isolated-session lifecycle: engine-only extensions expose only safe display metadata to the terminal, while acquisition, transactional persistence, and logout remain engine-owned. Credentials and executable provider functions never cross to the isolated frontend; model-catalog refresh is separate bounded background work.
33
+ Use `/login <provider>`, such as `/login openrouter` or `/login kimi-coding`, to go directly to a provider. Select subscription or API-key authentication when both are available.
34
+
35
+ OpenRouter opens its browser PKCE flow and asks whether to mint a new API key. Complete the browser redirect before returning to Atomic. On remote or headless machines, the browser cannot reach the loopback callback; paste the final redirect URL or authorization code instead. Claude, ChatGPT Codex, and extension providers that set `usesCallbackServer` offer the same fallback.
36
+
37
+ Kimi Code displays its device URL/code and polls until approval, then refreshes expired tokens automatically.
38
+
39
+ Built-in and extension-provided OAuth work in both direct and isolated sessions. Login completes once credentials are saved; model-catalog refresh runs separately.
34
40
 
35
41
  Escape or Ctrl+C quietly cancels the matching login, including immediate/pre-device native aborts, and leaves the previously committed credential and catalog unchanged. Provider denial, device expiry, timeout, browser/network/protocol failure, malformed responses, token exchange, and persistence failures remain visible. Atomic claims success when the provider flow and credential persistence complete; it does not wait for model-catalog or ambient-availability refresh work.
36
42
 
37
43
  Use `/logout` to clear credentials. Logout immediately invalidates authentication in the active interactive engine and removes the selected provider from both `~/.atomic/agent/auth.json` and any effective legacy `~/.pi/agent/auth.json`, so the provider remains logged out after restart. Environment variables, command-line credentials, and `models.json` configuration cannot be cleared by Atomic; when one of those sources still authenticates the provider, the logout status names the remaining source.
38
44
 
45
+ Type `/logout ` to autocomplete providers with stored credentials, or use `/logout kimi-coding` to open a filtered selector; press Enter in the selector to remove the credential, or Escape to cancel.
46
+
39
47
  ### Token Refresh
40
48
 
41
- A stored OAuth token is refreshed once fewer than **five minutes** of validity remain, rather than at expiry, so a long turn is not started on a credential that dies mid-request. The refresh runs inside the `auth.json` lock and re-checks the stored expiry after taking it, so concurrent sessions sharing one credential file — subagents, workflow stages, RPC children — refresh it once between them rather than once each, and a session that arrives after the rotation finds nothing to do. A token still outside the window is not touched.
49
+ Atomic refreshes a stored OAuth token when fewer than **five minutes** of validity remain, so a long turn does not start with a token about to expire. Tokens outside this window are untouched.
50
+
51
+ Concurrent sessions sharing `auth.json`, including workflow stages and subagents, coordinate token refresh rather than rotating the same credential independently.
42
52
 
43
53
  ### Verify Readiness Before a Session
44
54
 
@@ -70,13 +80,13 @@ The selection Atomic records stays the canonical `-fast` identity even when the
70
80
 
71
81
  A fast variant's route owns two request fields: the upstream model ID and the service tier. A `before_provider_request` hook may rewrite anything else, but replacing the payload with a non-object or changing either route-owned field is refused with an error naming the model and the remedy, because a model recorded, persisted, and billed as `-fast` must not go out as a different model or at an ordinary tier. Select the normal sibling instead when a request needs different routing. A model without a fast variant keeps unrestricted hook freedom, and an explicit per-request service tier still applies to it without granting fast-model identity.
72
82
 
73
- Atomic does not publish a fast variant for a model whose API is served by an extension's own stream function, including a natively registered provider: it cannot enforce the route through a transport it does not serialize. Such a provider keeps its normal models and its own transport untouched.
83
+ Models served by an extension's own stream function, including native provider registrations, do not get automatic fast variants. Their normal models and custom transport remain available.
74
84
 
75
85
  Fast behavior comes from explicit route metadata attached when the variant is derived — never from the `-fast` suffix. If a provider, a `models.json` custom model, or an extension already defines that exact `-fast` ID, that model wins: it routes exactly as it is declared, Atomic suppresses the derived duplicate, and interactive startup and `--list-models` print a warning naming the model to rename or remove. Fast variants are not derived for Azure OpenAI, OpenRouter, or generic OpenAI-compatible providers.
76
86
 
77
- Provider-owned names that end in `-fast` remain ordinary exact IDs. The Vercel AI Gateway currently advertises `openai/gpt-6-astra` and `openai/gpt-6-astra-fast`; Atomic preserves both live-catalog records and their long-context prices without attaching `fastRoute` to the suffixed ID. OpenRouter independently advertises `openai/gpt-6-astra` and `openai/gpt-6-astra-pro`, also with request-wide long-context prices. If either live provider withdraws a record, the next generated catalog omits it rather than keeping a handwritten mirror.
87
+ Provider-owned names ending in `-fast` remain ordinary exact IDs. Vercel AI Gateway advertises `openai/gpt-6-astra` and `openai/gpt-6-astra-fast`; OpenRouter advertises `openai/gpt-6-astra` and `openai/gpt-6-astra-pro`. Their catalog prices and routing apply, not Atomic's first-party fast routing. Check the live catalog before selecting one.
78
88
 
79
- For first-party OpenAI Codex models on the shared ChatGPT Codex transport, explicit fast-route metadata — not the final payload tier, a caller flag, or the `-fast` suffix — selects the routing contract: `originator: codex_cli_rs` plus `x-codex-routing-hint: model=<base-upstream-model>;tier=priority` on both HTTP/SSE and WebSocket transports. Credential resolution preserves that identity when it resolves to the first-party ChatGPT endpoint; merely using `api: "openai-codex-responses"` under a renamed provider or proxy does not grant it. WebSocket fallback, reconnect, and HTTP retry attempts reuse the model route's identity, and switching between normal and fast model routes drops a cached socket before reuse. Requests to the standard OpenAI API send only the tier. On a normal model Atomic keeps the normal `originator: pi` identity and sends no routing hint, even if a standalone caller explicitly requests `serviceTier: priority`. The same contract covers standalone `modelRuntime.stream()`/`complete()`/`streamSimple()`/`completeSimple()` requests.
89
+ First-party Codex fast models keep their priority routing across retries and transport changes. Renaming a provider or setting `serviceTier: priority` on a normal model does not grant fast-model identity.
80
90
 
81
91
  Pick fast variants deliberately in workflows: parallel fan-out multiplies provider usage, and priority-tier requests are billed at a higher rate.
82
92
 
@@ -112,7 +122,7 @@ OAuth logins get their Copilot host from the token GitHub issues during login. E
112
122
 
113
123
  A `models.json` provider `baseUrl` for `github-copilot` overrides all of the above. Without `COPILOT_GITHUB_TOKEN` the provider is left exactly as upstream `pi-ai` defines it.
114
124
 
115
- Chat requests authenticated with a raw `COPILOT_GITHUB_TOKEN` (including `github_pat_`, `ghp_`, `gho_`, and `ghu_` tokens) send `Copilot-Integration-Id: copilot-developer-cli`. A `Copilot-Integration-Id` supplied through `models.json` provider headers, `modelOverrides`, or per request always takes precedence, including an explicit `vscode-chat` value. Exchanged OAuth tokens containing a `tid=` segment keep the existing OAuth headers unchanged. The env-token routing implementation and its exported helpers now live in `@bastani/pi-ai`.
125
+ Chat requests authenticated with a raw `COPILOT_GITHUB_TOKEN`, including `github_pat_`, `ghp_`, `gho_`, and `ghu_` tokens, send `Copilot-Integration-Id: copilot-developer-cli`. A header supplied through `models.json`, `modelOverrides`, or per request takes precedence, including `vscode-chat`. Exchanged OAuth tokens containing `tid=` keep their OAuth headers.
116
126
 
117
127
  Business and enterprise tokens sent to the individual host return `421 Misdirected Request`; if you see that, set `COPILOT_API_TARGET` to the host your organization issues.
118
128
 
@@ -120,15 +130,14 @@ Business and enterprise tokens sent to the individual host return `421 Misdirect
120
130
 
121
131
  Run `/login xai`, then select **Use a subscription**. `XAI_API_KEY` remains available through **Use an API key**.
122
132
 
123
- Atomic defaults xAI sessions to `grok-4.6`. Built-in workflow and subagent fallback chains use `xai/grok-4.6:xhigh`, `github-copilot/grok-4.6:xhigh`, and `openrouter/x-ai/grok-4.6:xhigh`; GitHub Copilot also exposes Grok 4.6 when the account's model policy enables it. Network-backed catalogs refresh and cache these newer entries independently of the bundled catalog snapshot.
133
+ Atomic defaults xAI sessions to `grok-4.6`. GitHub Copilot also exposes Grok 4.6 when the account's model policy enables it. Network-backed catalogs refresh and cache these newer entries independently of the bundled catalog snapshot.
124
134
 
125
- The `codebase-locator`, `codebase-pattern-finder`, and `codebase-research-locator` agents use GPT-5.6 Luna at `xhigh` and Grok fallbacks at `medium` instead. Goal and Ralph orchestration, Ralph research, and the debugger use GPT-6 Astra at `medium`; Ralph prompt refinement remains at `high`. Open Claude Design starts with Anthropic Fable 5.1 at `medium`, then GitHub Copilot Fable 5.1 and Codex, Copilot, and OpenAI Astra at `medium`.
135
+ Builtin workflows and subagents default to `model: "auto"`, selecting an available model and supported effort for each task rather than using fixed role models or shipped fallback chains. This does not change your main-chat model. To choose the decision provider, use `/settings` → **Router model**. For explicit child models, fallback lists or provider restrictions, see [Subagent reference](/subagents/reference#automatic-model-selection) and [builtin workflow model options](/workflows/builtins#built-in-workflows).
126
136
 
127
137
  ### Radius
128
138
 
129
139
  Radius is a dynamic `pi-messages` gateway. `/login radius` stores OAuth tokens in `auth.json`; its model catalog refreshes independently and is cached in `models-store.json`. API-key authentication is also available through `/login radius` or `RADIUS_API_KEY`. Custom Radius gateways can be declared in `models.json` with `"oauth": "radius"` and the gateway `baseUrl`.
130
140
 
131
-
132
141
  ## API Keys
133
142
 
134
143
  ### Environment Variables or Auth File
@@ -140,13 +149,13 @@ export ANTHROPIC_API_KEY=sk-ant-...
140
149
  atomic
141
150
  ```
142
151
 
143
- After a successful API-key or OAuth login, Atomic persists the credential and immediately marks that provider available against the model snapshot already loaded in the active session. It does not make login wait for cache restoration, ambient-availability checks, or another model-catalog request. Open `/model` to use that authenticated snapshot immediately; the selector restores and refreshes dynamic catalogs in the background with a 15-second deadline and keeps selection responsive if a provider is slow or unavailable.
152
+ After login, open `/model` to use the authenticated cached snapshot immediately. Catalog refresh runs in the background with a 15-second deadline and falls back to cached models if the provider is slow or unavailable.
144
153
 
145
- `/logout` follows the same transaction boundary in reverse: once the stored credential is deleted, Atomic immediately removes that stored-auth projection and returns to the editor without refreshing model catalogs. A short, bounded local probe preserves models when authentication still exists through an environment variable or runtime key. Refresh work that began before either login or logout cannot later overwrite the newer credential snapshot.
154
+ Logout returns without waiting for catalog refresh. Models can remain available if an environment variable or runtime key still authenticates the provider; remove that source separately. Earlier refreshes cannot undo a later login or logout.
146
155
 
147
- On a remote or headless machine, paste the authorization code or final redirect URL into the login prompt when the provider offers manual entry. A completed exchange must either return to the editor or show an error; it does not require deleting `~/.atomic`. Existing OAuth credentials use the same `auth.json` schema after the pi-ai model-runtime migration and are loaded in place.
156
+ On remote or headless machines, paste the authorization code or final redirect URL when the login prompt offers manual entry. A completed exchange returns to the editor or shows an error; it does not require deleting `~/.atomic` or migrating existing OAuth credentials.
148
157
 
149
- Remote pi.dev catalogs persist their ETag and are revalidated with `If-None-Match`; an empty `304` keeps the cached models and counts as a successful check. Atomic renders the cached snapshot immediately, preserves each provider's last usable catalog on refresh failure, and prefers newer bundled data over stale remote overlays. See [Custom Models](/models/reference#catalog-freshness-and-precedence).
158
+ Catalog failures preserve the last usable models for each provider. See [catalog freshness and precedence](/models/reference#catalog-freshness-and-precedence).
150
159
 
151
160
  | Provider | Environment Variable | `auth.json` key |
152
161
  | ---------------------------------- | ------------------------------------------------------------------------- | ---------------------------- |
@@ -172,6 +181,7 @@ Remote pi.dev catalogs persist their ETag and are revalidated with `If-None-Matc
172
181
  | OpenCode Go | `OPENCODE_API_KEY` | `opencode-go` |
173
182
  | Radius | `RADIUS_API_KEY` | `radius` |
174
183
  | Hugging Face | `HF_TOKEN` | `huggingface` |
184
+ | TypeSafe Jev | `TYPESAFE_API_KEY` | `typesafe-ai` |
175
185
  | Fireworks | `FIREWORKS_API_KEY` | `fireworks` |
176
186
  | Together AI | `TOGETHER_API_KEY` | `together` |
177
187
  | Baseten | `BASETEN_API_KEY` | `baseten` |
@@ -188,9 +198,9 @@ Remote pi.dev catalogs persist their ETag and are revalidated with `If-None-Matc
188
198
  | Xiaomi MiMo Token Plan (Amsterdam) | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` | `xiaomi-token-plan-ams` |
189
199
  | Xiaomi MiMo Token Plan (Singapore) | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` | `xiaomi-token-plan-sgp` |
190
200
 
191
- Z.AI and Z.AI Coding Plan (China) default to `glm-5.3` (`zai/glm-5.3` and `zai-coding-cn/glm-5.3`), and both direct providers also expose the multimodal `glm-5.3-flash`. Baseten defaults to its directly selectable `zai-org/GLM-5.3` and also exposes `zai-org/GLM-5.3-Fast` and the multimodal `zai-org/GLM-5.3-Flash`; OpenRouter exposes `z-ai/glm-5.3` and `z-ai/glm-5.3-flash`. The full and Flash entries support `low`, `high`, and `max` reasoning; Baseten's Fast entry also supports `off`. Built-in workflow and subagent chains include the Z.AI, Z.AI Coding Plan, Baseten, and OpenRouter routes at `:high`. Use Baseten's `zai-org/GLM-5.2` or `zai-org/GLM-5.3-Fast` when fully disabled reasoning is required. Qwen Token Plan Individual defaults to `qwen3.8-max` and uses the international `QWEN_TOKEN_PLAN_API_KEY` shared with the existing Qwen Token Plan provider. These catalogs follow their upstream providers, so use `--list-models` for the current entries.
201
+ Z.AI and Z.AI Coding Plan (China) default to `glm-5.3` (`zai/glm-5.3` and `zai-coding-cn/glm-5.3`), and both direct providers also expose the multimodal `glm-5.3-flash`. Baseten defaults to its directly selectable `zai-org/GLM-5.3` and also exposes `zai-org/GLM-5.3-Fast` and the multimodal `zai-org/GLM-5.3-Flash`; OpenRouter exposes `z-ai/glm-5.3` and `z-ai/glm-5.3-flash`. The full and Flash entries support `low`, `high`, and `max` reasoning; Baseten's Fast entry also supports `off`. Use Baseten's `zai-org/GLM-5.2` or `zai-org/GLM-5.3-Fast` when fully disabled reasoning is required. Qwen Token Plan Individual defaults to `qwen3.8-max` and uses the international `QWEN_TOKEN_PLAN_API_KEY` shared with the existing Qwen Token Plan provider. These catalogs follow their upstream providers, so use `--list-models` for the current entries.
192
202
 
193
- Reference for environment variables and `auth.json` keys: `findEnvKeys()` / `getEnvApiKey()` in the installed `@bastani/pi-ai` dependency (`node_modules/@bastani/pi-ai/dist/env-api-keys.d.ts`). The private provider map those functions use is in `node_modules/@bastani/pi-ai/dist/env-api-keys.js`; Atomic does not include a separate `packages/ai` source directory in this monorepo.
203
+ Use the table above for environment-variable and `auth.json` names.
194
204
 
195
205
  #### Auth File
196
206
 
@@ -243,7 +253,6 @@ API-key credentials may include provider-scoped `env` values. They take preceden
243
253
 
244
254
  Use this when Atomic should use provider settings different from the project shell environment.
245
255
 
246
-
247
256
  ### Key Resolution
248
257
 
249
258
  The `key` field supports command execution, environment interpolation, and literals:
@@ -477,6 +486,22 @@ Or set `GOOGLE_APPLICATION_CREDENTIALS` to a service account key file.
477
486
 
478
487
  For router-mode discovery, load/unload management, and Hugging Face downloads with a local llama.cpp server, see [llama.cpp](/llama-cpp). Configure it with `/login llama.cpp` or `LLAMA_BASE_URL` and manage models with `/llama`.
479
488
 
489
+ ## TypeSafe Jev
490
+
491
+ `typesafe-ai/jev-latest` and `openrouter/~typesafe/jev-latest` are built-in structured-decision models, not chat or tool-calling models. They are available for [workflow launch routing](/workflows/operations#model-invoked-launch-routing) and [SDK structured decisions](/sdk/structured-decisions), not `/model`, chat `--model`, or child execution model fields. SDK integrations can inspect their supported capabilities with `getStructuredOutputProviders()`.
492
+
493
+ Use `/login typesafe-ai` to save an API key in `auth.json`, or set `TYPESAFE_API_KEY` in Atomic's process environment. Stored credentials take precedence over the environment key, just as for other API-key providers. `/logout` removes the saved key; an environment key remains active until you unset it. Jev appears in `/login` but not `/model`, because it only makes structured decisions. Do not put the key in prompts, decision state, or `settings.json`.
494
+
495
+ For OpenRouter, select `openrouter/~typesafe/jev-latest` in `/settings` → **Router model**, or set `"routerModel": "openrouter/~typesafe/jev-latest"`. It uses your existing `/login openrouter` sign-in or saved API key, with the usual `OPENROUTER_API_KEY` fallback. No TypeSafe key or separate login is needed. Atomic sends wire model `~typesafe/jev-latest` to OpenRouter's Decisions API, not its chat endpoint. OpenRouter credentials alone do not change automatic router selection.
496
+
497
+ Replace the former direct ID `typesafe-ai/jev` with `typesafe-ai/jev-latest` in saved router settings and SDK calls. Direct TypeSafe credentials and the wire model `jev-latest` are unchanged.
498
+
499
+ With an empty `routerModel`, configured Jev credentials select Jev for prerequisite workflow and subagent-auto routing. An explicit router selection takes precedence. General SDK structured-output requests select their inference model explicitly. This does not change the `structured_output` tool's model. User-issued `/workflow` commands bypass launch routing.
500
+
501
+ Routers can repair malformed or schema-invalid answers up to three times after the initial attempt, within one shared deadline. Generic SDK decisions remain one-shot. Large choices can require several requests, increasing latency and usage; state is never trimmed automatically. See [structured decision limits](/sdk/structured-decisions#provider-behavior-and-limits) before sending large candidate lists or context.
502
+
503
+ HTTP 401 means check the key saved through `/login typesafe-ai` or `TYPESAFE_API_KEY`, 422 means check the question/state contract, and 429 or 529 means wait before retrying explicitly. Configured credentials do not verify access or quota. See [TypeSafe's API](https://docs.typesafe.ai/api.md) and [Choice reference](https://docs.typesafe.ai/primitives/choice.md).
504
+
480
505
  ## Custom Providers
481
506
 
482
507
  **Via models.json:** Add Ollama, LM Studio, vLLM, or any provider that speaks a supported API (OpenAI Completions, OpenAI Responses, Anthropic Messages, Google Generative AI). See [Custom models](/models).
@@ -2,9 +2,9 @@
2
2
 
3
3
  **Outcome:** Atomic is installed, authenticated, and has completed one useful task in your repository.
4
4
 
5
- This page gets you from install to a useful first Atomic session. Atomic is the loop engine for all engineering work: it runs reliable coding-agent loops with stages, tools, artifacts, verification, subagents, review gates, checkpoints, and human approvals.
5
+ Follow the steps below to install Atomic and complete your first useful session. Atomic runs coding-agent loops with stages, tools, artifacts, verification, subagents, review gates, checkpoints, and human approvals for engineering work.
6
6
 
7
- It is the ordered onboarding hub: each step below links to a focused page that carries the full detail. Work through them in order.
7
+ Work through the steps in order. Each links to a focused page with full instructions.
8
8
 
9
9
  ## Onboarding path
10
10
 
@@ -126,7 +126,11 @@ atomic @README.md "Summarize this"
126
126
  atomic @src/app.ts @src/app.test.ts "Review these together"
127
127
  ```
128
128
 
129
- Images can be pasted with native macOS Cmd+V, Ctrl+V (Alt+V on Windows), or dragged into supported terminals. Inside tmux on macOS, use `Ctrl+V` for reliable image paste; native `Cmd+V` depends on terminal forwarding. VS Code's terminal may forward the empty bracketed-paste route through tmux, while Ghostty may not forward its Kitty `super+v` route through tmux. When the clipboard has both text and an image, Ctrl+V prefers the image; Cmd+V may paste text or the image depending on how the terminal delivers the gesture.
129
+ Paste images with native macOS Cmd+V or Ctrl+V. On Windows, use Alt+V instead of Ctrl+V. You can also drag images into supported terminals.
130
+
131
+ Inside tmux on macOS, use `Ctrl+V` for reliable image paste. Native `Cmd+V` depends on your terminal and may not work through tmux.
132
+
133
+ When the clipboard contains both text and an image, Ctrl+V prefers the image. Cmd+V may paste either, depending on how the terminal delivers the gesture.
130
134
 
131
135
  ### Run shell commands
132
136
 
@@ -84,7 +84,11 @@ Auth-check exits:
84
84
 
85
85
  Exit `5` is reported only for a refresh that itself failed, which happens before anything is persisted; that is the only exit that promises your stored credential is untouched. Any other OAuth failure exits `7` and makes no such promise.
86
86
 
87
- For raw credential exports, stdout is empty on every non-zero exit but one. Once the credential reaches stdout the command has succeeded: if the stream then fails to drain — a reader that closed the pipe, for example — that is reported on stderr and the exit code stays `0`, because a non-zero exit here would contradict the bytes the caller already holds. The exception is exit `9`, which reports that only part of the credential was written before the stream failed; those bytes cannot be recalled, so stdout is not empty, and the output is a fragment to discard rather than a credential to use. `auth check --credentials --json` may instead write a credential-free JSON status object on a non-zero check result. See [Security](/security#credential-export) before wiring this into a script.
87
+ Raw credential exports leave stdout empty on non-zero exits, except exit `9`. That exit means the stream failed after writing part of the credential. Discard the fragment; those bytes cannot be recalled.
88
+
89
+ Once the complete credential reaches stdout, the command has succeeded. If the stream then fails to drain, for example because a reader closed the pipe, Atomic reports it on stderr and keeps exit code `0`.
90
+
91
+ `auth check --credentials --json` may instead write a credential-free JSON status object on a non-zero check result. See [Security](/security#credential-export) before wiring this into a script.
88
92
 
89
93
  ## Modes
90
94
 
@@ -96,7 +100,11 @@ For raw credential exports, stdout is empty on every non-zero exit but one. Once
96
100
  | `--mode rpc` | RPC mode over stdin/stdout; see [RPC mode](/rpc) |
97
101
  | `--export <in> [out]` | Export a session to HTML |
98
102
 
99
- Interactive sessions always use fullscreen: the transcript scrolls independently above a sticky dock containing the editor, status line, usage meter, extension widgets, and footer. Wheel and trackpad gestures go first to a focused workflow graph or stage chat overlay; events those overlays do not consume fall through to the alternate-screen viewport. Non-overlay focused components do not block pi-tui's mouse path, so transcript scrolling, scrollbar interaction, and drag selection still work. Selection copies automatically by default; disable `fullscreenCopyOnSelect` to highlight text without copying. Ctrl+X closes workflow tool detail to the graph, clears a scoped-model selection, returns stage chat to its graph, or returns a workflow graph to main chat. It does not copy. `/copy` always copies the last assistant message. The `fullscreenExitOutput` setting controls what exiting prints: `"transcript"` (the default) paints the final transcript plus a session resume hint on the main screen, while `"resume-hint"` restores the previous screen and prints only the resume hint. See [Settings](/settings) and [Terminal setup](/terminal-setup).
103
+ Interactive sessions use fullscreen, with a scrolling transcript above the docked editor and status area. Wheel and trackpad input goes to a focused workflow graph or stage chat first, then the transcript when not consumed. Scrolling, scrollbar dragging, and selection remain available outside overlays.
104
+
105
+ Selection copies automatically unless `fullscreenCopyOnSelect` is false. Ctrl+X returns tool detail or stage chat to the graph, returns the graph to main chat, or clears a scoped-model selection. It does not copy; `/copy` copies the last assistant message.
106
+
107
+ On exit, `fullscreenExitOutput: "transcript"` prints the final transcript and resume hint. `"resume-hint"` restores the previous screen and prints only the hint. See [Settings](/settings) and [Terminal setup](/terminal-setup).
100
108
 
101
109
  In print mode, Atomic also reads piped stdin and merges it into the initial prompt:
102
110
 
@@ -123,9 +131,9 @@ When a print-mode turn correctly finishes by calling an opt-in terminating struc
123
131
  |--------|-------------|
124
132
  | `-c`, `--continue` | Continue the most recent session |
125
133
  | `-r`, `--resume` | Browse and select a session |
126
- | `--session <path\|id>` | Use a specific session file or partial UUID |
134
+ | `--session <path\|id>` | Use a session file, exact ID, or unique 8-hex UUID prefix |
127
135
  | `--session-id <id>` | Use an exact project session ID; warn and create it when missing |
128
- | `--fork <path\|id>` | Fork a session file or partial UUID into a new session |
136
+ | `--fork <path\|id>` | Fork a session file, exact ID, or unique 8-hex UUID prefix into a new session |
129
137
  | `--session-dir <dir>` | Custom session storage directory |
130
138
  | `--name <name>`, `-n <name>` | Set the session display name |
131
139
  | `--no-session` | Ephemeral mode; do not save |
@@ -134,12 +142,12 @@ When a print-mode turn correctly finishes by calling an opt-in terminating struc
134
142
 
135
143
  | Option | Description |
136
144
  |--------|-------------|
137
- | `--tools <list>`, `-t <list>` | Allowlist specific built-in, extension, and custom tools; mandatory `intercom` remains available |
138
- | `--exclude-tools <list>`, `-xt <list>` | Denylist specific built-in, extension, and custom tools; mandatory `intercom` cannot be excluded |
145
+ | `--tools <list>`, `-t <list>` | Allowlist specific coding, extension, and custom tools, including Intercom |
146
+ | `--exclude-tools <list>`, `-xt <list>` | Exclude specific coding, extension, and custom tools, including Intercom |
139
147
  | `--no-builtin-tools`, `-nbt` | Disable built-in tools but keep extension/custom tools enabled |
140
- | `--no-tools`, `-nt` | Disable every tool except mandatory `intercom` |
148
+ | `--no-tools`, `-nt` | Disable every tool, including Intercom, even with `--tools` |
141
149
 
142
- Default built-in tools: `read`, `bash`, `kill`, `edit`, `write`, `find`, `search`, `ask_user_question`, `todo`, plus `powershell` on native Windows when a PowerShell executable is available. `find.paths` accepts directories, files, or glob paths such as `*.ts` and honors `timeout`; `search` accepts `pattern`, optional `paths`, `i`, `gitignore`, and `skip` for regex content-search pagination. Use `--exclude-tools` to disable one or more non-mandatory tools while leaving the rest available, for example `atomic --exclude-tools ask_user_question`. The `defaultTools` setting selects which built-in tools a session starts with; `--tools` replaces that default with a strict allowlist over non-mandatory built-in, custom, and extension tools; `--no-builtin-tools` removes only built-ins; `--no-tools` removes every tool except ordinary bundled `intercom`. `ls` remains available as an SDK compatibility tool but is not enabled by default.
150
+ Default built-in tools: `read`, `bash`, `kill`, `edit`, `write`, `find`, `search`, `ask_user_question`, `todo`, plus `powershell` on native Windows when a PowerShell executable is available. `ls` remains available but is not a default. `defaultTools` selects initial coding tools without narrowing extension/custom tools. `--tools` selects an explicit allowlist; `--exclude-tools` subtracts from it. `--no-builtin-tools` suppresses coding defaults when no allowlist is given. `--no-tools` overrides all selection. To retain Intercom with an allowlist, include `intercom` explicitly.
143
151
 
144
152
  ## Project Trust Options
145
153
 
@@ -231,9 +239,9 @@ atomic --tools read,search,find,ls -p "Review the code"
231
239
  | `ATOMIC_REDUCED_MOTION` | Set to `1` to skip startup choreography and render the ordinary working identity as a static regular accent `∀` without a timer |
232
240
  | `ATOMIC_OFFLINE` | Disable startup network operations, including update checks, package update checks, and install/update telemetry |
233
241
  | `ATOMIC_SKIP_VERSION_CHECK` | Skip the Atomic version update check at startup. This prevents the latest-version request |
234
- | `ATOMIC_TELEMETRY` | Override install/update telemetry: `1`/`true`/`yes` or `0`/`false`/`no`. This does not disable update checks |
242
+ | `ATOMIC_TELEMETRY` | Override version-adoption pings: `1`/`true`/`yes` or `0`/`false`/`no`. This does not disable update checks (`PI_TELEMETRY` is a legacy alias) |
235
243
  | `NODE_COMPILE_CACHE` | Override the directory for Node's persistent compile cache, which Atomic enables automatically on Node >= 22.8 to speed up startup (most noticeable on Windows). Set `NODE_DISABLE_COMPILE_CACHE=1` to opt out |
236
- | `PI_CACHE_RETENTION` | Provider/upstream-specific prompt-cache retention knob; set to `long` where supported |
244
+ | `PI_CACHE_RETENTION` | Prompt-cache retention: `long` (default), `short`, or `none`, subject to provider/model support |
237
245
  | `ATOMIC_NO_PTY` | Set to `1` to disable PTY use for bash commands (`PI_NO_PTY` is a legacy alias) |
238
246
  | `VISUAL`, `EDITOR` | External editor for CTRL+G |
239
247
 
@@ -249,4 +257,4 @@ Every bash execution receives one execution-time snapshot of the active session.
249
257
 
250
258
  The snapshot is taken when the command executes, not when the tool is created, so resumed sessions, workflow stages, isolated sessions, model changes, and concurrent sessions cannot reuse stale metadata. Atomic preserves all unrelated inherited and caller-supplied environment variables; only the ten names above are cleared and overlaid. Factory-created bash tools expose the same metadata by default and can set `exposeSessionEnvironment: false` to omit it.
251
259
 
252
- `PI_*` aliases are also supported for app-specific `ATOMIC_*` variables for legacy compatibility. For example, [Intercom](/intercom) honors `PI_CODING_AGENT_DIR` when `ATOMIC_CODING_AGENT_DIR` is unset and still reads legacy `~/.pi/agent/intercom/config.json` when the Atomic config is absent. `PI_CACHE_RETENTION` is not one of those aliases and has no `ATOMIC_*` equivalent. Use `PI_CACHE_RETENTION=long` when configuring prompt-cache retention for providers/upstreams that support long-lived caches. Intercom's default broker starter works across Node-based installs, Bun source checkouts, and standalone Atomic binaries without requiring `npx`, `tsx`, or `bun` to be present on `PATH`; custom broker commands remain explicit opt-in overrides.
260
+ `PI_*` aliases are also supported for app-specific `ATOMIC_*` variables for legacy compatibility. For example, [Intercom](/intercom) honors `PI_CODING_AGENT_DIR` when `ATOMIC_CODING_AGENT_DIR` is unset and still reads legacy `~/.pi/agent/intercom/config.json` when the Atomic config is absent. `PI_CACHE_RETENTION` is not one of those aliases and has no `ATOMIC_*` equivalent. Long retention is the default for main chat, workflow stages, and subagents where supported; use `PI_CACHE_RETENTION=short atomic` to opt back into shorter caching. See [Prompt-cache retention](/environment-variables#prompt-cache-retention) for overrides and pricing tradeoffs. Intercom's default broker starter works across Node-based installs, Bun source checkouts, and standalone Atomic binaries without requiring `npx`, `tsx`, or `bun` to be present on `PATH`; custom broker commands remain explicit opt-in overrides.
package/docs/reference.md CHANGED
@@ -6,7 +6,7 @@ description: "Exact contracts: CLI, settings, environment variables, keybindings
6
6
 
7
7
  # Reference
8
8
 
9
- Reference pages state exact contracts. They use stable command, flag, setting, type, event, method, and tool names as headings, and they do not carry a tutorial narrative. If you want to learn a capability rather than look one up, start at [Guides](/guides) or [Build with Atomic](/build).
9
+ Look up exact commands, settings, types, and tool contracts here. For a walkthrough, start with [Guides](/guides) or [Build with Atomic](/build).
10
10
 
11
11
  ## Everyday contracts
12
12
 
@@ -14,7 +14,8 @@ Reference pages state exact contracts. They use stable command, flag, setting, t
14
14
  - [Settings](/settings) — every settings field, with defaults and constraints.
15
15
  - [Environment variables](/environment-variables) — Atomic/Pi aliases, provider credentials, and bash session metadata.
16
16
  - [Keybindings](/keybindings) — default shortcuts and custom keybinding actions.
17
- - [Built-in tools](/tools) — the tools Atomic ships, and the [edit tool](/tools/edit) in detail.
17
+ - [Built-in tools](/tools), including [hashline editing](/tools#edit).
18
+ - [MCP Servers](/mcp-servers) for server configuration, tool discovery, and authentication.
18
19
 
19
20
  ## Domain contracts
20
21
 
@@ -35,10 +36,6 @@ Reference pages state exact contracts. They use stable command, flag, setting, t
35
36
  - [Provider API reference](/custom-provider/api-reference) — provider config and model definition contracts.
36
37
  - [Workflow API reference](/workflows/api-reference) — workflow, stage, and context contracts.
37
38
 
38
- ## Reference
39
-
40
- - [Session format](/session-format) - JSONL session file format, entry types, and SessionManager API.
41
-
42
39
  ## Platform setup
43
40
 
44
41
  - [Windows](/windows)
@@ -309,7 +309,6 @@ Response:
309
309
 
310
310
  `models` preserves the refreshed catalog order. `scopedModels` is optional. If authentication remains through an environment variable, `authStatus.source` is `"environment"` and `authStatus.label` names the variable.
311
311
 
312
-
313
312
  ### Thinking
314
313
 
315
314
  #### set_thinking_level
@@ -339,7 +338,7 @@ Current engines include the effective level after capability clamping and, when
339
338
  {"type": "response", "command": "set_thinking_level", "success": true, "data": {"level": "high", "provider": "anthropic", "modelId": "claude-sonnet-4-20250514"}}
340
339
  ```
341
340
 
342
- Isolated interactive hosts must apply a persisted thinking default using that ACK target, not the host session model at callback time. A later `model_changed` event must not re-key the saved override. A later `thinking_level_changed` event must keep the host session's effective level even if an older ACK settles afterward. `RpcClient.setThinkingLevel(level)` stays one-argument `Promise<void>`; isolated persist reads the ACK through an internal client path.
341
+ Use the acknowledgement's provider/model when recording a persisted thinking override, not whichever model is active when your callback runs. Keep newer `thinking_level_changed` state if an older acknowledgement arrives later. `RpcClient.setThinkingLevel(level)` remains a one-argument `Promise<void>` method.
343
342
 
344
343
  #### cycle_thinking_level
345
344
 
@@ -417,7 +416,7 @@ Response:
417
416
 
418
417
  #### compact
419
418
 
420
- Run Atomic's verbatim line compactor. The selected session model receives the complete active numbered transcript except for exactly the newest `preserve_recent` context-visible messages and returns bare `start,end` deletion records; Atomic validates them and mechanically reconstructs retained lines with `(filtered N lines)` markers. The default tail is two messages, with no user-turn alignment. A value of zero sends the entire active transcript and persists `firstKeptEntryId: null`. The command appends a durable `compaction` entry with `details.strategy: "verbatim-lines"`.
419
+ Run verbatim line compaction with the session model. It preserves exactly the newest `preserve_recent` context-visible messages, default two, without aligning to user turns. Zero compacts the whole active transcript and returns `firstKeptEntryId: null`. The resulting durable entry uses `details.strategy: "verbatim-lines"`; see [Compaction](/compaction) for behavior and settings.
421
420
 
422
421
  ```json
423
422
  {"type": "compact"}
@@ -529,7 +528,9 @@ While the command runs, Atomic emits ordered deltas correlated by the command `i
529
528
  {"type":"bash_execution_update","id":"req-1","channel":"stderr","delta":"warning\n"}
530
529
  ```
531
530
 
532
- `channel` is exactly `"stdout"` or `"stderr"`. Deltas preserve the order observed for that request; concurrent bash requests may interleave globally but never share IDs. Request ownership survives `new_session`, `switch_session`, `import_session`, fork, and clone while the command is running: later deltas still stream under the original ID, the replacement session is not contaminated, and exactly one ordinary `response` remains the terminal record for completion, cancellation, or error.
531
+ `channel` is exactly `"stdout"` or `"stderr"`. Deltas preserve the observed order for each request. Concurrent bash requests may interleave globally but never share IDs.
532
+
533
+ Request ownership survives `new_session`, `switch_session`, `import_session`, fork, and clone while the command runs. Later deltas keep the original ID and do not contaminate the replacement session. Exactly one ordinary `response` is the terminal record for completion, cancellation, or error.
533
534
 
534
535
  If output was truncated, includes `fullOutputPath`. Persisted bash output lives in the owner- and session-scoped temp tree (`<tmpdir>/atomic-<uid>/<session-id>/`), not at the temp root — see [Tools](/tools#persisted-tool-output) for the layout, permissions, size cap, and retention:
535
536
  ```json
@@ -551,9 +552,9 @@ If output was truncated, includes `fullOutputPath`. Persisted bash output lives
551
552
 
552
553
  **How bash results reach the LLM:**
553
554
 
554
- The `bash` command executes immediately and returns a `BashResult`. Internally, a `BashExecutionMessage` is created and stored exactly once in the session where that request started, even if an RPC session replacement completes before the command. The message does NOT emit an event.
555
+ The `bash` command returns a `BashResult` and saves output in the session where the request started, even if another session becomes active before completion. The saved `BashExecutionMessage` emits no event of its own.
555
556
 
556
- When the next `prompt` command is sent, all messages (including `BashExecutionMessage`) are transformed before being sent to the LLM. The `BashExecutionMessage` is converted to a `UserMessage` with this format:
557
+ The initiating session's next prompt includes the output as user context in this format:
557
558
 
558
559
  ````
559
560
  Ran `ls -la`
@@ -748,7 +749,9 @@ Response:
748
749
 
749
750
  #### get_entries
750
751
 
751
- Get all session entries in append order (excluding the session header). The session is an append-only tree of entries with stable ids, so an entry id works as a durable cursor: pass the last entry id you have seen as `since` to get only entries strictly after it, even across client restarts. Unlike `get_messages`, this includes pre-compaction history and abandoned branches.
752
+ Get all session entries in append order, excluding the session header. Unlike `get_messages`, this includes pre-compaction history and abandoned branches.
753
+
754
+ Entry IDs are stable in the append-only tree. Use the last entry ID you have seen as `since` to get only entries strictly after it, even across client restarts.
752
755
 
753
756
  ```json
754
757
  {"type": "get_entries"}
@@ -961,11 +964,7 @@ Emitted when a message begins and completes. The `message` field contains an `Ag
961
964
 
962
965
  Emitted during streaming of assistant messages. Carries the streaming delta plus the latest cumulative usage.
963
966
 
964
- `message_update` deliberately omits the cumulative message snapshot: there is no `message`
965
- field, and `assistantMessageEvent` has no `partial`. `message_start` provides the
966
- initial message, the deltas build it, and `message_end` provides the final
967
- authoritative message. Repeating a snapshot on every frame would make the bytes
968
- written per assistant turn grow with the square of its length.
967
+ `message_update` has no cumulative `message`, and `assistantMessageEvent` has no `partial`. Build your message from `message_start` and deltas, then use `message_end` as the final authoritative message.
969
968
 
970
969
  The top-level `usage` field carries the latest cumulative provider-reported usage; it may
971
970
  remain zero until completion when a provider does not report usage during streaming. When
@@ -1158,7 +1157,6 @@ On final failure (max retries exceeded):
1158
1157
  }
1159
1158
  ```
1160
1159
 
1161
-
1162
1160
  ### summarization_retry_scheduled / summarization_retry_attempt_start / summarization_retry_finished
1163
1161
 
1164
1162
  Emitted when compaction planning or branch summarization retries after a transient provider error. These events use the same retry settings as automatic assistant-turn retries.
package/docs/rpc.md CHANGED
@@ -40,7 +40,11 @@ Common options:
40
40
 
41
41
  All commands support an optional `id` field for request/response correlation. If provided, the corresponding response will include the same `id`.
42
42
 
43
- If a complete saved provider/model default names a provider that remains unsupported after provider registration, the process stays live but `prompt` returns a correlated error with the generic configuration diagnostic before any user/model event is emitted. `get_available_models` and other non-prompt commands remain available. A successful explicit `set_model`, or a successful `cycle_model` that returns a different available model, clears the startup condition and allows later prompts. A null or unchanged cycle result does not clear it. Replacing the session applies the newly created session's condition again. Supported providers with an unknown model or missing authentication retain ordinary automatic fallback behavior.
43
+ A complete saved provider/model default can block prompts if its provider remains unsupported after registration. The process stays live, but `prompt` returns a correlated error with the generic configuration diagnostic before emitting any user/model event. `get_available_models` and other non-prompt commands remain available.
44
+
45
+ Clear this condition with a successful explicit `set_model` or a successful `cycle_model` that returns a different available model. A null or unchanged cycle result does not clear it. Replacing the session applies the new session's condition again.
46
+
47
+ Supported providers with an unknown model or missing authentication retain ordinary automatic fallback behavior.
44
48
 
45
49
  ### Framing
46
50