@bastani/atomic 0.10.9 → 0.10.10-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +226 -163
  3. package/dist/_shared/dist-KOELCESV.js +2 -2
  4. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  5. package/dist/_shared/lib-4PES5P4V.js +2 -2
  6. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +27 -12
  7. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  8. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
  9. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  10. package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
  11. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  12. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
  13. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
  14. package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
  15. package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
  16. package/dist/_shared/runtime-O4KCSG4C.js +5 -5
  17. package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
  18. package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
  19. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  20. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  21. package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
  22. package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
  23. package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
  24. package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
  25. package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
  26. package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
  27. package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +150 -62
  28. package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
  29. package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
  30. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
  31. package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
  32. package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
  33. package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
  34. package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
  35. package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
  36. package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
  37. package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
  38. package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
  39. package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
  40. package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
  41. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  42. package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
  43. package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
  44. package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
  45. package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
  46. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  47. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  48. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  49. package/dist/builtin/intercom/README.md +87 -116
  50. package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
  51. package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
  52. package/dist/builtin/intercom/group.ts +7 -3
  53. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  54. package/dist/builtin/intercom/package.json +1 -1
  55. package/dist/builtin/mcp/README.md +61 -27
  56. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  57. package/dist/builtin/mcp/package.json +1 -1
  58. package/dist/builtin/subagents/CHANGELOG.md +8 -0
  59. package/dist/builtin/subagents/README.md +74 -141
  60. package/dist/builtin/subagents/package.json +1 -1
  61. package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
  62. package/dist/builtin/web-access/CHANGELOG.md +9 -0
  63. package/dist/builtin/web-access/README.md +61 -88
  64. package/dist/builtin/web-access/index.bundle.mjs +387 -351
  65. package/dist/builtin/web-access/package.json +1 -1
  66. package/dist/cli/args.js +2 -2
  67. package/dist/cli/auth-cli.code.js +4 -4
  68. package/dist/cli/auth-cli.impl.js +3 -3
  69. package/dist/cli/auth-cli.js +3 -3
  70. package/dist/cli/blueprint-command.code.js +2 -2
  71. package/dist/cli/blueprint-command.impl.js +3 -3
  72. package/dist/cli/blueprint-command.js +3 -3
  73. package/dist/cli/intercom-command.code.js +3 -3
  74. package/dist/cli/intercom-command.impl.js +3 -3
  75. package/dist/cli/intercom-command.js +3 -3
  76. package/dist/cli/list-models.code.js +3 -3
  77. package/dist/cli/list-models.impl.js +3 -3
  78. package/dist/cli/list-models.js +3 -3
  79. package/dist/cli/session-picker.code.js +2 -2
  80. package/dist/cli/session-picker.impl.js +3 -3
  81. package/dist/cli/session-picker.js +3 -3
  82. package/dist/cli/startup-ui.code.js +2 -2
  83. package/dist/cli/startup-ui.impl.js +3 -3
  84. package/dist/cli/startup-ui.js +3 -3
  85. package/dist/cli/storage-command.impl.js +3 -3
  86. package/dist/cli/storage-command.js +3 -3
  87. package/dist/cli/storage-search-session.code.js +2 -2
  88. package/dist/cli/storage-search-session.impl.js +3 -3
  89. package/dist/cli/storage-search-session.js +3 -3
  90. package/dist/cli/team-command.code.js +2 -2
  91. package/dist/cli/team-command.impl.js +3 -3
  92. package/dist/cli/team-command.js +3 -3
  93. package/dist/cli.js +2 -2
  94. package/dist/core/agent-session-methods.d.ts +4 -1
  95. package/dist/core/agent-session-methods.js.map +1 -1
  96. package/dist/core/agent-session.d.ts +3 -0
  97. package/dist/core/compaction/compactor.d.ts +20 -14
  98. package/dist/core/compaction/errors.d.ts +120 -0
  99. package/dist/core/compaction/index.d.ts +1 -0
  100. package/dist/core/compaction/model-resolver.d.ts +2 -2
  101. package/dist/core/debug.impl.js +3 -3
  102. package/dist/core/debug.js +3 -3
  103. package/dist/core/export-html/card-projection.impl.js +3 -3
  104. package/dist/core/export-html/card-projection.js +3 -3
  105. package/dist/core/export-html/index.code.js +2 -2
  106. package/dist/core/export-html/index.impl.js +3 -3
  107. package/dist/core/export-html/index.js +3 -3
  108. package/dist/core/export-html/json-spans.impl.js +3 -3
  109. package/dist/core/export-html/json-spans.js +3 -3
  110. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  111. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  112. package/dist/core/export-html/tool-renderer.code.js +1 -1
  113. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  114. package/dist/core/export-html/tool-renderer.js +3 -3
  115. package/dist/core/extensions/api-types.d.ts +1 -1
  116. package/dist/core/extensions/api-types.js.map +1 -1
  117. package/dist/core/extensions/index.d.ts +1 -1
  118. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  119. package/dist/core/extensions/jiti-loader.js +3 -3
  120. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  121. package/dist/core/extensions/jiti-static-loader.js +3 -3
  122. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  123. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  124. package/dist/core/extensions/loader-host-modules.js +3 -3
  125. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  126. package/dist/core/extensions/provider-types.d.ts +18 -6
  127. package/dist/core/extensions/provider-types.js.map +1 -1
  128. package/dist/core/extensions/runner-context.js +1 -1
  129. package/dist/core/intercom-broker-control-host.code.js +1 -1
  130. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  131. package/dist/core/intercom-broker-control-host.js +3 -3
  132. package/dist/core/intercom-broker-control.code.js +3 -3
  133. package/dist/core/intercom-broker-control.impl.js +3 -3
  134. package/dist/core/intercom-broker-control.js +3 -3
  135. package/dist/core/model-config.d.ts +40 -0
  136. package/dist/core/model-registry.js +1 -1
  137. package/dist/core/model-resolver-scope.d.ts +4 -4
  138. package/dist/core/model-runtime.d.ts +1 -1
  139. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  140. package/dist/core/package-manager-storage-adapters.js +3 -3
  141. package/dist/core/provider-composer-internal.d.ts +11 -2
  142. package/dist/core/sdk.code.js +3 -3
  143. package/dist/core/sdk.impl.js +3 -3
  144. package/dist/core/sdk.js +3 -3
  145. package/dist/core/session-manager-core.js +5 -5
  146. package/dist/core/session-manager-list.impl.js +3 -3
  147. package/dist/core/session-manager-list.js +3 -3
  148. package/dist/core/session-manager.code.js +1 -1
  149. package/dist/core/session-manager.impl.js +3 -3
  150. package/dist/core/session-manager.js +3 -3
  151. package/dist/core/session-storage.impl.js +3 -3
  152. package/dist/core/session-storage.js +3 -3
  153. package/dist/core/settings-manager-basic-accessors.d.ts +6 -2
  154. package/dist/core/storage/index.js +2 -2
  155. package/dist/core/storage/node-sqlite-thread.js +2 -2
  156. package/dist/core/storage/node-sqlite.js +2 -2
  157. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  158. package/dist/core/storage/offline-snapshot-file.js +3 -3
  159. package/dist/core/storage/provider.js +2 -2
  160. package/dist/core/storage/selection.js +2 -2
  161. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  162. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  163. package/dist/core/storage/session/branch-fork-source.js +3 -3
  164. package/dist/core/storage/session/card-view.impl.js +3 -3
  165. package/dist/core/storage/session/card-view.js +3 -3
  166. package/dist/core/storage/session/child-reader.code.js +3 -3
  167. package/dist/core/storage/session/child-reader.impl.js +3 -3
  168. package/dist/core/storage/session/child-reader.js +3 -3
  169. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  170. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  171. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  172. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  173. package/dist/core/storage/session/expanded-child-details.js +3 -3
  174. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  175. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  176. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  177. package/dist/core/storage/session/fork-row-index.js +3 -3
  178. package/dist/core/storage/session/fork-staging.code.js +2 -2
  179. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  180. package/dist/core/storage/session/fork-staging.js +3 -3
  181. package/dist/core/storage/session/fork-window.code.js +3 -3
  182. package/dist/core/storage/session/fork-window.impl.js +3 -3
  183. package/dist/core/storage/session/fork-window.js +3 -3
  184. package/dist/core/storage/session/history-pages.impl.js +3 -3
  185. package/dist/core/storage/session/history-pages.js +3 -3
  186. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  187. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  188. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  189. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  190. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  191. package/dist/core/storage/session/memory-session-store.js +3 -3
  192. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  193. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  194. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  195. package/dist/core/storage/session/released-history-files.code.js +3 -3
  196. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  197. package/dist/core/storage/session/released-history-files.js +3 -3
  198. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  199. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  200. package/dist/core/storage/session/session-resume.impl.js +3 -3
  201. package/dist/core/storage/session/session-resume.js +3 -3
  202. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  203. package/dist/core/storage/session/snapshot-cut.js +3 -3
  204. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  205. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  206. package/dist/core/storage/session/snapshot-history.js +3 -3
  207. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  208. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  209. package/dist/core/storage/session/sql-session-store.js +3 -3
  210. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  211. package/dist/core/storage/session/tree-outline.js +3 -3
  212. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  213. package/dist/core/storage/session/tree-presentation.js +3 -3
  214. package/dist/core/storage/storage-status.impl.js +3 -3
  215. package/dist/core/storage/storage-status.js +3 -3
  216. package/dist/core/storage/team.impl.js +3 -3
  217. package/dist/core/storage/team.js +3 -3
  218. package/dist/core/structured-output/index.code.js +1 -1
  219. package/dist/core/structured-output/index.impl.js +3 -3
  220. package/dist/core/structured-output/index.js +3 -3
  221. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  222. package/dist/core/tasks/task-completion-entry.js +3 -3
  223. package/dist/core/tasks/task-file-history.code.js +3 -3
  224. package/dist/core/tasks/task-file-history.impl.js +3 -3
  225. package/dist/core/tasks/task-file-history.js +3 -3
  226. package/dist/core/tasks/task-reference-archive.code.js +4 -4
  227. package/dist/core/tasks/task-reference-archive.js +3 -3
  228. package/dist/core/tasks/task-reference-identity.code.js +1 -1
  229. package/dist/core/tasks/task-reference-identity.js +3 -3
  230. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  231. package/dist/core/tasks/task-reference-stream.js +3 -3
  232. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  233. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  234. package/dist/core/tasks/task-view-source.impl.js +3 -3
  235. package/dist/core/tasks/task-view-source.js +3 -3
  236. package/dist/core/tools/read-url.code.js +2 -2
  237. package/dist/core/tools/read-url.impl.js +3 -3
  238. package/dist/core/tools/read-url.js +3 -3
  239. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  240. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  241. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  242. package/dist/core/worktree-snapshot/errors.js +3 -3
  243. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  244. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  245. package/dist/extensions/codemode/execute.code.js +1 -1
  246. package/dist/extensions/codemode/execute.impl.js +3 -3
  247. package/dist/extensions/codemode/execute.js +3 -3
  248. package/dist/extensions/codemode/renderer.code.js +2 -2
  249. package/dist/extensions/codemode/renderer.impl.js +3 -3
  250. package/dist/extensions/codemode/renderer.js +3 -3
  251. package/dist/extensions/mcp/cli.code.js +2 -2
  252. package/dist/extensions/mcp/cli.impl.js +3 -3
  253. package/dist/extensions/mcp/cli.js +3 -3
  254. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  255. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  256. package/dist/extensions/mcp/cli.lazy.js +3 -3
  257. package/dist/extensions/mcp/runtime.code.js +1 -1
  258. package/dist/extensions/mcp/runtime.impl.js +3 -3
  259. package/dist/extensions/mcp/runtime.js +3 -3
  260. package/dist/index-extensions.d.ts +1 -1
  261. package/dist/index.d.ts +8 -1
  262. package/dist/index.js +7 -7
  263. package/dist/main-first-time-setup.code.js +2 -2
  264. package/dist/main-first-time-setup.impl.js +3 -3
  265. package/dist/main-first-time-setup.js +3 -3
  266. package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -0
  267. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  268. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  269. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  270. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  271. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  272. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  273. package/dist/modes/interactive/theme/color-utils.d.ts +5 -5
  274. package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
  275. package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
  276. package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
  277. package/dist/modes/print-mode.js +1 -1
  278. package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
  279. package/dist/modes/rpc/rpc-types.d.ts +29 -2
  280. package/dist/package-manager-cli.code.js +5 -5
  281. package/dist/package-manager-cli.impl.js +3 -3
  282. package/dist/package-manager-cli.js +3 -3
  283. package/dist/rpc-entry.js +1 -1
  284. package/dist/startup-files.json +1 -1
  285. package/dist/startup-stages/5.js +1 -1
  286. package/dist/startup-stages/7.js +1 -1
  287. package/dist/startup-stages/8.js +1 -2
  288. package/dist/startup-stages/9.js +2 -1
  289. package/dist/utils/native-module.d.ts +44 -0
  290. package/dist/utils/startup-database-spare.code.js +3 -3
  291. package/dist/utils/startup-database-spare.impl.js +3 -3
  292. package/dist/utils/startup-database-spare.js +3 -3
  293. package/dist/utils/tools-manager.code.js +1 -1
  294. package/dist/utils/tools-manager.impl.js +3 -3
  295. package/dist/utils/tools-manager.js +3 -3
  296. package/docs/background-tasks.md +238 -243
  297. package/docs/build.md +21 -15
  298. package/docs/changelog.mdx +1 -1
  299. package/docs/codemode.md +68 -51
  300. package/docs/compaction/reference.md +65 -26
  301. package/docs/compaction.md +118 -66
  302. package/docs/computer-use.md +179 -146
  303. package/docs/containerization.md +87 -33
  304. package/docs/custom-provider/api-reference.md +152 -13
  305. package/docs/custom-provider/oauth.md +45 -28
  306. package/docs/custom-provider/override.md +14 -7
  307. package/docs/custom-provider/registration.md +77 -67
  308. package/docs/custom-provider/streaming.md +42 -19
  309. package/docs/custom-provider.md +26 -62
  310. package/docs/development.md +81 -42
  311. package/docs/docs.json +54 -38
  312. package/docs/environment-variables.md +92 -64
  313. package/docs/extensions/api-reference.md +326 -735
  314. package/docs/extensions/authoring.md +186 -269
  315. package/docs/extensions/events.md +308 -375
  316. package/docs/extensions/examples.md +122 -74
  317. package/docs/extensions/ui.md +217 -197
  318. package/docs/extensions.md +189 -259
  319. package/docs/getting-started/authentication.md +27 -14
  320. package/docs/getting-started/first-session.md +25 -26
  321. package/docs/getting-started/installation.md +62 -84
  322. package/docs/getting-started/project-instructions.md +39 -14
  323. package/docs/guides/configuration.md +62 -20
  324. package/docs/guides/intercom.md +20 -12
  325. package/docs/guides/non-interactive.md +31 -16
  326. package/docs/guides/orchestration.md +17 -9
  327. package/docs/guides/resume-on-any-machine.md +63 -52
  328. package/docs/guides/subagents.md +26 -14
  329. package/docs/guides/team-setup.md +49 -27
  330. package/docs/guides.md +30 -23
  331. package/docs/herdr.md +22 -17
  332. package/docs/index.md +24 -17
  333. package/docs/intercom/operations.md +90 -66
  334. package/docs/intercom/reference.md +219 -192
  335. package/docs/intercom.md +111 -92
  336. package/docs/json.md +73 -71
  337. package/docs/keybindings.md +74 -48
  338. package/docs/libraries/agent-core.md +52 -9
  339. package/docs/libraries/ai.md +90 -63
  340. package/docs/libraries/codemode.md +31 -8
  341. package/docs/libraries/schema.md +12 -9
  342. package/docs/libraries/storage-libsql.md +92 -0
  343. package/docs/libraries/storage-postgres.md +119 -0
  344. package/docs/libraries/telemetry.md +42 -9
  345. package/docs/libraries/tui.md +74 -94
  346. package/docs/libraries.md +25 -8
  347. package/docs/llama-cpp.md +38 -33
  348. package/docs/mcp-servers.md +140 -88
  349. package/docs/models/reference.md +53 -36
  350. package/docs/models-configuration.md +19 -13
  351. package/docs/models.md +102 -87
  352. package/docs/orchestration/migrating-workflows.md +22 -20
  353. package/docs/orchestration/patterns.md +36 -21
  354. package/docs/orchestration.md +24 -21
  355. package/docs/packages/authoring.md +29 -18
  356. package/docs/packages/reference.md +77 -16
  357. package/docs/packages.md +34 -34
  358. package/docs/programmatic.md +28 -21
  359. package/docs/prompt-templates.md +65 -41
  360. package/docs/providers/reference.md +36 -20
  361. package/docs/providers.md +78 -76
  362. package/docs/quickstart.md +42 -54
  363. package/docs/reference/cli.md +256 -254
  364. package/docs/reference.md +30 -23
  365. package/docs/rpc/examples.md +121 -17
  366. package/docs/rpc/extension-ui.md +86 -63
  367. package/docs/rpc/protocol.md +817 -358
  368. package/docs/rpc.md +78 -152
  369. package/docs/sdk/reference.md +309 -73
  370. package/docs/sdk/storage.md +614 -0
  371. package/docs/sdk/structured-decisions.md +168 -65
  372. package/docs/sdk/web-server.md +80 -46
  373. package/docs/sdk.md +168 -215
  374. package/docs/security.md +117 -44
  375. package/docs/session-format.md +127 -76
  376. package/docs/sessions.md +155 -113
  377. package/docs/settings.md +293 -205
  378. package/docs/shell-aliases.md +15 -6
  379. package/docs/skills/authoring.md +17 -9
  380. package/docs/skills/reference.md +23 -21
  381. package/docs/skills.md +148 -97
  382. package/docs/storage.md +172 -260
  383. package/docs/subagents/authoring.md +148 -15
  384. package/docs/subagents/reference.md +105 -29
  385. package/docs/subagents.md +247 -250
  386. package/docs/terminal-setup.md +97 -69
  387. package/docs/termux.md +51 -85
  388. package/docs/themes/reference.md +51 -37
  389. package/docs/themes.md +52 -55
  390. package/docs/tmux.md +38 -21
  391. package/docs/tools.md +209 -147
  392. package/docs/tui/reference.md +64 -32
  393. package/docs/tui.md +38 -66
  394. package/docs/usage.md +94 -86
  395. package/docs/verification.md +25 -25
  396. package/docs/web-access.md +106 -54
  397. package/docs/windows.md +55 -57
  398. package/docs/worktree-snapshots.md +82 -74
  399. package/examples/sdk/11-sessions.ts +4 -4
  400. package/package.json +8 -8
  401. package/schemas/models.schema.json +58 -7
  402. package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
  403. package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
  404. package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
  405. package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
  406. package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
@@ -1,25 +1,37 @@
1
1
  ---
2
- title: "Subagents"
3
- description: "What subagents are, when delegation helps, and where the full subagent guide lives."
2
+ title: "Subagents overview"
3
+ sidebarTitle: "Subagents overview"
4
+ description: "Learn what subagents do, when to delegate tasks, and how background subagents work."
4
5
  ---
5
6
 
6
- # Subagents
7
+ A subagent is a separate agent session that your main session launches for a focused task. It runs in its own context window, so a long code search or debugging trace does not crowd out your main conversation.
7
8
 
8
- This short overview introduces subagents and when to delegate work. A subagent is a separate agent session that your main session launches for a focused task. It runs in its own context window, so a long search or debugging trace does not crowd out your main conversation.
9
+ This page introduces subagents at a high level. For day-to-day usage, worktrees, and run control, see [Run subagents](/subagents). For custom agent files, see [Create custom subagents](/subagents/authoring). For exact parameters, fallback rules, and `config.json`, see [Subagent reference](/subagents/reference). For programmatic child configuration, see [Subagent children in the SDK](/sdk#subagent-children).
9
10
 
10
- ## When to use one
11
+ Ask Atomic to delegate in plain language:
11
12
 
12
- Delegate bounded, independent work. Good fits include searching an unfamiliar area of the codebase, reproducing a failure, reviewing a diff with fresh context, or running several independent tasks at once. Keep work in your main session when it is small or relies on context the subagent would need to rediscover.
13
+ ```text
14
+ Have codebase-analyzer trace the authentication flow and report the entry points.
15
+ Keep working with me here while it runs.
16
+ ```
13
17
 
14
- ## What you get
18
+ ## When to use a subagent
15
19
 
16
- - Single or parallel runs that return results to your session.
17
- - Fresh or forked context, so a child can start clean or reuse the parent's conversation.
18
- - Background execution, so you can keep chatting while children run and collect results as they finish.
20
+ Delegate bounded, independent work. Good fits include searching an unfamiliar area of the codebase, reproducing a failure, reviewing a diff with fresh context, or running several independent tasks at once. Keep work in your main session when it is small or relies on nuance the subagent would need to rediscover.
21
+
22
+ ## Key capabilities
23
+
24
+ - **Background execution.** Every subagent runs in the background, so you can keep chatting in your main session while subagents work and collect results as completion notices arrive.
25
+ - **Bundled specialists.** Atomic includes ready-to-use agents such as `codebase-analyzer`, `debugger`, and `worker`. Run `/agents` to browse available specialists and inspect their prompts and tools.
26
+ - **Single or parallel runs.** Launch one subagent or a parallel batch, with optional Git worktree isolation so writers do not conflict on the same files.
27
+ - **Fresh or forked context.** Most agents start with a fresh context window so they inspect code without bias. The `worker` agent starts with a forked copy of your main conversation by default so it can pick up an approved plan immediately.
28
+ - **One-level delegation.** Only your main session launches subagents; subagents cannot launch other subagents.
19
29
 
20
30
  ## Next steps
21
31
 
22
- - [Subagents](/subagents) is the full guide to bundled agents, run control, worktrees, and execution modes.
23
- - [Custom subagents](/subagents/authoring) explains how to define and scope your own agents.
24
- - [Background and parallel work](/background-tasks) covers inspecting, waiting on, messaging, and stopping delegated tasks.
25
- - [Orchestration](/orchestration) shows how to combine codemode scripts with subagents for multi-step work.
32
+ - [Run subagents](/subagents) covers bundled agents, worktrees, run control, and coordination.
33
+ - [Create custom subagents](/subagents/authoring) explains how to write Markdown agent definitions and override built-in agents.
34
+ - [Subagent reference](/subagents/reference) covers discovery precedence, fallback models, `config.json`, tool parameters, and SDK error codes.
35
+ - [Subagent children in the SDK](/sdk#subagent-children) covers child inheritance and programmatic configuration from `@bastani/atomic`.
36
+ - [Manage background tasks](/background-tasks) covers the agent panel, `/tasks`, steering, and stopping running work.
37
+ - [Orchestrate with codemode and subagents](/orchestration) shows how to combine codemode scripts with subagents for multi-step work.
@@ -1,13 +1,12 @@
1
1
  ---
2
- title: "Team and CI setup"
3
- description: "Share Intercom with your team through one database while sessions stay private, and configure CI runners with environment variables alone."
2
+ title: "Set up teams and CI"
3
+ sidebarTitle: "Team and CI setup"
4
+ description: "Share Intercom across a team while keeping personal sessions local, and configure CI runners with environment variables."
4
5
  ---
5
6
 
6
- # Team and CI setup
7
-
8
7
  Share one libSQL or Turso database across machines so teammates can message each other over Intercom while keeping their personal sessions local. CI runners can point both sessions and Intercom at the same database using environment variables alone, so teammates can inspect and resume CI runs.
9
8
 
10
- To share both sessions and Intercom across machines, or to use PostgreSQL instead of libSQL, follow the [Storage](/storage) guide and use `atomic storage join`.
9
+ To share both sessions and Intercom across machines, or to use PostgreSQL instead of libSQL, follow the [Storage backends](/storage) guide and use `atomic storage join`.
11
10
 
12
11
  | Scope | Sessions | Intercom |
13
12
  | --- | --- | --- |
@@ -15,7 +14,12 @@ To share both sessions and Intercom across machines, or to use PostgreSQL instea
15
14
  | Team | Local (share explicitly with `/share` or export and import) | Team database, project group |
16
15
  | CI and swarms | Team database | Team database, per-run group (`ATOMIC_INTERCOM_GROUP`) |
17
16
 
18
- Run `atomic team status` to see the active profile (`individual`, `team`, `ci`, or `custom` when your settings do not match a preset).
17
+ Run `atomic team status` to see the active profile:
18
+
19
+ - `individual`: sessions use default local SQLite and Intercom has no shared adapter storage.
20
+ - `team`: sessions use default local SQLite while Intercom and shared `storage` use the same shared adapter database.
21
+ - `ci`: sessions, Intercom, and shared `storage` all use the same shared adapter database (if you ran `atomic storage join` to share sessions across your own laptops, `atomic team status` also reports `ci`).
22
+ - `custom`: any other combination, such as JSONL sessions, a non-default local SQLite file, a project `storage` override, or different adapters or prefixes between sessions and Intercom.
19
23
 
20
24
  ## Join a team
21
25
 
@@ -33,23 +37,22 @@ Command syntax:
33
37
  atomic team join <url> [--token-file <path>] [--prefix <prefix>]
34
38
  ```
35
39
 
40
+ Only `--token-file <path>` is accepted on the command line (there is no `--token` flag) so database tokens do not leak into shell history or process lists.
41
+
36
42
  Before writing anything, Atomic validates the URL, token, prefix, global settings, installed adapter, and a `SELECT 1` health check with a 15-second timeout. If any check fails, Atomic changes nothing. When all checks pass, Atomic performs four steps:
37
43
 
38
- 1. Saves the token to a mode-`600` file in your agent directory, and reuses that file if you rerun with the same token.
39
- 2. Updates three keys in `~/.atomic/agent/settings.json` atomically while leaving all other settings untouched:
40
- - `storage` points to the team database.
41
- - `sessions.storage` pins sessions to `{ "path": "workflows/journal.sqlite" }` so local transcripts stay private. Atomic prints a notice if this replaces another store.
42
- - `teamJoin` records the managed `storage` fingerprint so `atomic team leave` can separate managed values from manual edits. Leave `teamJoin` unchanged.
44
+ 1. Saves the token to a mode-`600` file in your agent directory, reusing that file if you rerun with the same token.
45
+ 2. Updates `~/.atomic/agent/settings.json` atomically while leaving all other settings untouched: sets `storage` to the team database and pins `sessions.storage` to `{ "path": "workflows/journal.sqlite" }` so personal transcripts stay local (printing a notice if this replaces another store). Atomic also writes a `teamJoin` marker used by `atomic team leave`; leave it unchanged.
43
46
  3. Restarts the Intercom broker so it routes through the team database.
44
47
  4. Prints the active profile, the current project's Intercom group, and the `atomic storage status` report.
45
48
 
46
49
  URL and prefix rules:
47
50
 
48
- - Supported URLs are `libsql://`, `https://`, `wss://`, or an absolute `file:` URL, which needs no token. Atomic refuses URLs that contain an embedded token. See [Joining a machine to a shared database](/storage#joining-a-machine-to-a-shared-database) for full database setup.
51
+ - Supported URLs are `libsql://`, `https://`, `http://`, `wss://`, `ws://`, or an absolute `file:` URL (which needs no token). Prefer TLS (`libsql://`, `https://`, or `wss://`) for remote hosts; `http://` and `ws://` work for local or private-network `sqld`. Atomic refuses URLs that contain an embedded token. See [Joining a machine to a shared database](/storage#joining-a-machine-to-a-shared-database) for full database setup.
49
52
  - Pass `--prefix` to isolate multiple teams inside one database. Everyone on a team must use the same URL and prefix.
50
53
  - Sessions that were already running keep their previous Intercom group until they restart or run `/reload`.
51
54
 
52
- ### Check and leave
55
+ ### Check status and leave
53
56
 
54
57
  ```bash
55
58
  atomic team status # Profile, project group, and storage report
@@ -63,7 +66,7 @@ atomic team leave # Return to the individual layout
63
66
 
64
67
  - Removes `storage` and `teamJoin` only when `storage` still matches the `teamJoin` record. Any manual edit leaves `storage` and its token file intact and reports why.
65
68
  - Keeps a `storage` entry that has no `teamJoin` record. Run `atomic team join` once to record it before leaving.
66
- - Removes `sessions.storage` only while it holds the local pin and no other `storage` selection remains. Other selections include a customized `storage`, a trusted project's `storage`, or a legacy `~/.pi/agent/settings.json` `storage` when using the default agent directory.
69
+ - Removes `sessions.storage` only while it holds the local pin and no other `storage` selection remains (including a customized `storage`, a trusted project's `storage`, or a legacy `~/.pi/agent/settings.json` `storage` when using the default agent directory).
67
70
  - Deletes the managed token file only if no remaining setting references it, then restarts the Intercom broker.
68
71
  - Refuses to modify settings or delete token files if global or project settings cannot be read. Fix the unreadable file first.
69
72
  - Running `atomic team leave` again makes no changes.
@@ -78,22 +81,26 @@ For multi-node broker behavior, Git lookup errors, and routing checks, see [Runn
78
81
 
79
82
  ## CI and swarms
80
83
 
84
+ > Using PostgreSQL in CI? Configure [`ATOMIC_STORAGE`](/storage#selecting-storage-per-process) instead. `ATOMIC_PROFILE=ci` and `teamProfileSelection()` support libSQL and Turso only.
85
+
81
86
  CI runners do not need a `settings.json` file. Configure them with environment variables:
82
87
 
83
88
  | Variable | Value |
84
89
  | --- | --- |
85
90
  | `ATOMIC_PROFILE` | `ci` |
86
- | `ATOMIC_TEAM_URL` | Team database URL |
87
- | `ATOMIC_TEAM_TOKEN` or `ATOMIC_TEAM_TOKEN_FILE` | Database token or an absolute path to a token file, such as under `$RUNNER_TEMP`. Omit only for an absolute `file:` URL. Atomic rejects relative paths at startup because child processes may run in different working directories. |
91
+ | `ATOMIC_TEAM_URL` | Team libSQL/Turso database URL |
92
+ | `ATOMIC_TEAM_TOKEN` or `ATOMIC_TEAM_TOKEN_FILE` | Database token, or an absolute path to a token file (such as under `$RUNNER_TEMP`). Omit only for an absolute `file:` URL. Relative paths are rejected at startup because child processes may run in different working directories. |
88
93
  | `ATOMIC_TEAM_PREFIX` | Optional prefix matching the team's database prefix |
89
94
 
90
95
  With `ATOMIC_PROFILE=ci`, both sessions and Intercom use the team database for this process and every child process it spawns. Atomic writes nothing to settings. It reads the token when opening a store and never copies it into settings, logs, or child storage selections.
91
96
 
92
97
  Validation and precedence:
93
98
 
94
- - Atomic validates these variables at startup before opening a session. Missing paired variables, unknown profiles, invalid URLs or prefixes, and empty or unreadable token files fail immediately with one error listing everything missing.
99
+ - Atomic validates these variables at startup before opening a session. Leaving **any** of `ATOMIC_TEAM_URL`, `ATOMIC_TEAM_TOKEN`, `ATOMIC_TEAM_TOKEN_FILE`, or `ATOMIC_TEAM_PREFIX` exported without `ATOMIC_PROFILE=ci` fails startup immediately (`incomplete-profile`), so unset them when not using the CI profile.
100
+ - Setting both `ATOMIC_TEAM_TOKEN` and `ATOMIC_TEAM_TOKEN_FILE` fails startup (`conflicting-token`). Empty string values (such as `ATOMIC_TEAM_PREFIX=""`) are treated as unset.
101
+ - Unknown profiles, invalid URLs or prefixes, and empty or unreadable token files fail immediately with one error listing everything missing.
95
102
  - `--storage`, `--storage-file`, and `ATOMIC_STORAGE` override the profile for all stores, including Intercom. Session-specific flags and `ATOMIC_SESSIONS_STORAGE` override only sessions. See [Selecting storage per process](/storage#selecting-storage-per-process) for the full precedence order.
96
- - If the profile selects the libSQL adapter and it is not installed, startup fails with the `atomic install` command to run.
103
+ - If the libSQL adapter is not installed, startup fails with the `atomic install` command to run.
97
104
 
98
105
  ### GitHub Actions
99
106
 
@@ -120,7 +127,7 @@ Hosted CI runners start with an empty home directory. Use `atomic blueprint cach
120
127
 
121
128
  Save caches only from a trusted job on the default branch (`push`, `schedule`, or `workflow_dispatch`), and restore them read-only in agent jobs with `actions/cache/restore`.
122
129
 
123
- In the trusted job, run [`atomic blueprint prebuild --park --approve`](/guides/resume-on-any-machine#prebuilt-worktrees). It restores the commit into a worktree, runs its blueprints to warm package stores, writes the commit into Atomic's Git object store, and parks `"kind": "build"` paths from `resume.cache`:
130
+ In the trusted job, run [`atomic blueprint prebuild --park --approve`](/guides/resume-on-any-machine#prebuilt-worktrees). It restores the commit into a worktree, runs its blueprints to warm package stores, writes the commit into Atomic's Git object store, and parks `"kind": "build"` paths from `resume.cache`. Prebuild requires a Git remote, `snapshots.enabled: true`, no uncommitted edits to tracked files, and no unpushed commits touching denied secret files. If your project extensions depend on installed Atomic packages, install those packages before running `atomic --list-models` to warm the compiled extension cache:
124
131
 
125
132
  ```yaml
126
133
  on:
@@ -137,7 +144,7 @@ jobs:
137
144
  - id: keys
138
145
  run: atomic blueprint cache-key --format github-output >> "$GITHUB_OUTPUT"
139
146
  - run: atomic blueprint prebuild --park --approve # Runs blueprints to populate stores; trust only the default branch
140
- - run: atomic --list-models # Transpiles installed extensions into Atomic's cache
147
+ - run: atomic --list-models # Compiles installed extensions into Atomic's cache
141
148
  - uses: actions/cache/save@v4
142
149
  with:
143
150
  key: ${{ steps.keys.outputs.stores-key }}
@@ -195,15 +202,23 @@ When the agent job resumes a session, Atomic fetches only the commits missing fr
195
202
  - Keys include lockfiles, key files, `resume.cache`, the repository blueprint, OS, architecture, and Atomic version, so exact hits never return stale content. `restore-keys` falls back to the newest older cache so package managers can update incrementally.
196
203
  - `cache-key` omits paths that may hold credentials and warns on stderr while leaving `$GITHUB_OUTPUT` clean. Restore only entries that `cache-key` outputs for your repository, because a cache step with an empty `path` fails.
197
204
 
198
- ### From the SDK
205
+ ## From the SDK
206
+
207
+ `@bastani/atomic/storage` exports async helpers `joinTeam()`, `leaveTeam()`, and `getTeamProfile()`, plus `teamProfileSelection()` (libSQL and Turso only).
208
+
209
+ `teamProfileSelection()` returns an adapter selection for `@bastani/atomic-storage-libsql`. Because adapter selections resolve from user-scope packages, host extension directories, or the agent directory rather than an application's `node_modules`, install the adapter with `atomic install npm:@bastani/atomic-storage-libsql` (without `-l`), or register a local package directory with `DefaultResourceLoader({ additionalExtensionPaths })`.
210
+
211
+ If you prefer managing `@bastani/atomic-storage-libsql` as an ordinary project dependency with `npm install`, call `openLibsqlDatabase()` directly and pass `sessionStore: { kind: "database", database, prefix? }` to `createAgentSession()`, closing `database` in a `finally` block. See [SDK session storage](/sdk/storage) for complete recipes and ownership rules.
199
212
 
200
- `@bastani/atomic/storage` exports async helpers `joinTeam()`, `leaveTeam()`, and `getTeamProfile()`, plus `teamProfileSelection()`.
213
+ Use `teamProfileSelection({ profile: "ci", url, token })` to pass a storage selection to `createAgentSession({ storage })` without modifying settings:
201
214
 
202
- Use `teamProfileSelection({ profile: "ci", url, token })` to pass a storage selection to `createAgentSession({ storage })` without modifying settings. An in-memory `token` stays in memory, serializes as `[redacted]`, and cannot be reopened by other processes. Pass `tokenFile` or `tokenEnv` instead when child processes need to open the store.
215
+ - `token` stays in memory, serializes as `[redacted]`, and cannot be reopened by child processes.
216
+ - `tokenEnv` stores `{ env: "<VAR>" }` so child processes can reopen the store, and checks immediately at call time that the named environment variable is set (throwing `missing-token` if unset).
217
+ - `tokenFile` resolves relative paths against `cwd` and reads the file immediately to verify it is non-empty.
203
218
 
204
219
  Intercom runs one broker per agent directory, so pass the CI environment variables to both the host process and any spawned `atomic` processes:
205
220
 
206
- ```ts
221
+ ```typescript
207
222
  import { spawn } from "node:child_process";
208
223
  import { createAgentSession } from "@bastani/atomic";
209
224
  import { teamProfileSelection } from "@bastani/atomic/storage";
@@ -211,10 +226,15 @@ import { teamProfileSelection } from "@bastani/atomic/storage";
211
226
  const url = process.env.TEAM_DATABASE_URL!;
212
227
  const token = process.env.TEAM_DATABASE_TOKEN!;
213
228
 
214
- // In-process agent: sessions use the team database.
229
+ // Embedded SDK agent: sessions use the team database (requires `atomic install npm:@bastani/atomic-storage-libsql`
230
+ // or `DefaultResourceLoader({ additionalExtensionPaths })`).
215
231
  const storage = teamProfileSelection({ profile: "ci", url, token });
216
232
  const { session } = await createAgentSession({ storage });
217
- await session.prompt("Summarize the failing tests");
233
+ try {
234
+ await session.prompt("Summarize the failing tests");
235
+ } finally {
236
+ await session.dispose();
237
+ }
218
238
 
219
239
  // Spawned agent process: sessions and Intercom both use the team database.
220
240
  const child = spawn("atomic", ["-p", "Fix the failing test"], {
@@ -235,6 +255,8 @@ Anyone with read access to the team database can read everything stored in it, i
235
255
 
236
256
  ## Related
237
257
 
238
- - [Storage](/storage) for storage setup, selections, precedence, and error reference.
258
+ - [Storage backends](/storage) for storage setup, selections, precedence, and error reference.
259
+ - [SDK session storage](/sdk/storage) for Node.js and TypeScript storage recipes, `openLibsqlDatabase()`, and store ownership rules.
260
+ - [Resume sessions on any machine](/guides/resume-on-any-machine) for cross-machine worktree snapshots and environment blueprints.
239
261
  - [Running Intercom across machines](/intercom/operations#running-intercom-across-machines) for multi-node broker details.
240
262
  - [Intercom groups](/intercom/reference#groups) for how groups isolate sessions.
package/docs/guides.md CHANGED
@@ -1,43 +1,50 @@
1
1
  ---
2
- title: Guides
3
- description: "Task guides for everyday work with Atomic: interactive use, non-interactive runs, sessions, compaction, subagents, providers, local models, security, and containers."
2
+ title: "Task guides"
3
+ sidebarTitle: "All guides"
4
+ description: "Task guides for interactive and non-interactive work, sessions, compaction, subagents, providers, and security."
4
5
  ---
5
6
 
6
- # Guides
7
+ New to Atomic? Follow the [Quickstart](/quickstart) to install, authenticate, run your first session, and add project instructions. To extend or embed Atomic, go to [Build with Atomic](/build). For exact flags, settings, events, or types, go to the [Reference index](/reference).
7
8
 
8
- Find a guide for the task you want to do with Atomic.
9
+ ## Use Atomic daily
9
10
 
10
- New to Atomic? Follow the [Quickstart](/quickstart) to install, authenticate, run a first session, and add project instructions.
11
+ - **[Interactive mode](/usage).** Use the terminal editor, slash commands, startup typing, message queue, and context files.
12
+ - **[Non-interactive mode](/guides/non-interactive).** Run one-shot prompts with `-p`, stream JSON events, or drive Atomic over RPC.
13
+ - **[Configure Atomic](/guides/configuration).** Create a global settings file and override settings per project.
14
+ - **[Sessions](/sessions).** Save, resume, name, search, and branch sessions.
15
+ - **[Worktree snapshots](/worktree-snapshots).** Capture and restore repository state alongside your session history.
16
+ - **[Resume on any machine and blueprints](/guides/resume-on-any-machine).** Continue a session on another machine that shares your storage, and automate dependency rebuilds with [`.atomic/blueprint.yaml` blueprints](/guides/resume-on-any-machine#set-the-environment-up-with-a-blueprint).
17
+ - **[Storage backends](/storage).** Choose local SQLite, PostgreSQL, or Turso/libSQL, run migrations, and export or import sessions. For programmatic apps, see [SDK storage backends](/sdk/storage).
18
+ - **[Context and compaction](/compaction).** Keep long sessions inside the model's context window, or plug in a [custom remote compactor](/compaction#customize-morph-or-add-a-remote-compactor).
19
+ - **[MCP servers](/mcp-servers).** Connect external tools and data sources over Model Context Protocol.
11
20
 
12
- Looking to extend or embed Atomic? Go to [Build with Atomic](/build). Looking up an exact flag, setting, event, or type? Go to the [Reference index](/reference).
13
-
14
- ## Everyday use
15
-
16
- 1. **[Interactive use](/usage).** Learn the interactive loop, slash commands, startup typing, and context files.
17
- 2. **[Non-interactive use](/guides/non-interactive).** Run one-shot prompts with `-p`, stream JSON events, or drive Atomic over RPC.
18
- 3. **[Configure Atomic](/guides/configuration).** Write a global settings file and override settings per project.
19
- 4. **[Sessions](/sessions).** Save, resume, name, search, and branch sessions.
20
- 5. **[Worktree snapshots](/worktree-snapshots).** Capture and restore repository state alongside your session history.
21
- 6. **[Resume on any machine](/guides/resume-on-any-machine).** Continue a session on another machine that shares your storage.
22
- 7. **[Context and compaction](/compaction).** Keep long sessions inside the model's context window.
23
-
24
- ## Running work for you
21
+ ## Delegate and automate
25
22
 
26
23
  - **[Plan a task with subagents](/guides/orchestration).** Distribute multi-step work across subagents and verify the results.
27
- - **[Subagents](/guides/subagents).** Delegate independent tasks to fresh or forked subagents in the background.
24
+ - **[Subagents](/guides/subagents).** Delegate independent tasks to fresh or forked subagents in the background (see the full [Subagents guide](/subagents)).
28
25
  - **[Background tasks](/background-tasks).** Launch, inspect, steer, and stop background subagents and shells.
29
- - **[Intercom](/guides/intercom).** Coordinate live sessions and subagents on one machine or across a shared database.
26
+ - **[Intercom](/guides/intercom).** Coordinate live sessions and subagents on one machine or across a shared database (see the full [Intercom guide](/intercom)).
30
27
  - **[Team and CI setup](/guides/team-setup).** Share Intercom with a team through one database while sessions stay private, and configure CI runners from environment variables.
28
+ - **[Structured decisions](/sdk/structured-decisions).** Make typed classifier or chat decisions with `decide()` and `generateStructuredOutput()`.
31
29
  - **[Computer use](/computer-use).** Automate desktop apps, browsers, and terminals across macOS, Linux, and Windows.
32
30
  - **[Verification](/verification).** Reproduce bugs and collect verifiable evidence across terminal, browser, and desktop environments.
33
31
 
34
- ## Models, safety, and references
32
+ ## Models and providers
35
33
 
36
34
  - **[Providers](/providers).** Configure subscription logins, API keys, and cloud providers.
37
35
  - **[Local models](/llama-cpp).** Run local models with llama.cpp.
36
+
37
+ ## Security and isolation
38
+
38
39
  - **[Security](/security).** Review project trust, sandbox boundaries, and credential export guarantees.
39
40
  - **[Containerization](/containerization).** Run Atomic or its tools inside Gondolin, Docker, or OpenShell.
41
+
42
+ ## Quick references
43
+
44
+ - **[CLI reference](/reference/cli).** Look up commands, flags, subcommands, and exit codes.
45
+ - **[Built-in tools](/tools)**, **[Codemode](/codemode)**, and **[Web access](/web-access).** Review default tools, sandbox scripting, and search/fetch controls.
40
46
  - **[Herdr](/herdr).** Configure status indicators and session restore inside Herdr panes.
41
- - **[Environment variables](/environment-variables).** Look up Atomic variables, legacy aliases, and provider credentials.
42
- - **[Settings](/settings).** Browse the full settings reference.
47
+ - **[Settings](/settings).** Browse the full `settings.json` reference.
48
+ - **[Environment variables](/environment-variables).** Look up Atomic variables, legacy aliases, color controls, and provider credentials.
43
49
  - **[Keybindings](/keybindings).** Look up default shortcuts and custom bindings.
50
+ - **[Diagnostics and debugging](/development).** Capture debug snapshots, trace UI stalls, and report bugs.
package/docs/herdr.md CHANGED
@@ -1,19 +1,20 @@
1
1
  ---
2
- title: "Herdr"
3
- description: "Automatic status reporting and session restore when running Atomic inside Herdr panes."
2
+ title: "Herdr integration"
3
+ sidebarTitle: "Herdr"
4
+ description: "Use Atomic's built-in Herdr status indicators, session restore, troubleshooting steps, and privacy controls."
4
5
  ---
5
6
 
6
- # Herdr
7
-
8
7
  Atomic reports its status to [Herdr](https://herdr.dev) automatically when you start it inside a Herdr pane. No extra extension is needed, and the pane identifies the agent as `atomic`.
9
8
 
10
- For interactive terminal automation, pane isolation, and fallbacks, see [Computer use](/computer-use#terminal-automation-with-herdr). This page covers Atomic's built-in status and restore integration.
9
+ For interactive terminal automation, pane isolation, and fallbacks, see [Computer use](/computer-use#terminal-automation-with-herdr). To let Atomic inspect or control Herdr panes, tabs, workspaces, worktrees, and commands from inside a Herdr pane (`HERDR_ENV=1`), invoke the bundled `/skill:herdr` skill ([Bundled skills](/skills#bundled-skills)). This page covers Atomic's built-in status and session-restore integration.
11
10
 
12
11
  ## Setup
13
12
 
14
- Use Herdr 0.8.2 or newer and launch Atomic inside a Herdr pane. Herdr sets the pane environment variables automatically, so no manual setup is required.
13
+ Use Herdr 0.8.2 or newer and launch Atomic inside a Herdr pane. Herdr sets the pane environment variables automatically, so no manual configuration is required.
15
14
 
16
- Status reporting runs only in interactive Atomic sessions. It stays off outside Herdr and in print, JSON, and RPC modes.
15
+ - Status reporting runs only in interactive Atomic sessions. It stays off outside Herdr and in print, JSON, and RPC modes.
16
+ - Reporting stays active even when you pass `--no-extensions` (`-ne`); only setting `herdr.enabled: false` turns it off.
17
+ - Inside Herdr panes (`TERM_PROGRAM=herdr`), Atomic automatically enables Kitty inline images and clickable OSC 8 hyperlinks.
17
18
 
18
19
  ## Status indicators
19
20
 
@@ -25,22 +26,26 @@ Status reporting runs only in interactive Atomic sessions. It stays off outside
25
26
 
26
27
  Quiet periods such as provider waits, retries, and tool execution still count as Working. Active background work keeps the pane Working after Atomic finishes its response.
27
28
 
28
- Opening `/tasks` or `/agents` does not mark the pane Blocked, and neither does a subagent asking its supervisor for guidance. A permission prompt can show Blocked. Check `/tasks` for the outcome; the pane status is not a pass or fail verdict.
29
+ All Blocked states report the fixed message `"Waiting for approval"`, even for non-approval questions or prompts. Unlike [OSC 7501 program status](/terminal-setup#program-status), Herdr also reports [project trust](/security) prompts (`/trust` or resumed-folder trust) as Blocked when no background tasks are running.
30
+
31
+ Opening [`/tasks`](/background-tasks) or [`/agents`](/subagents) does not mark the pane Blocked, and neither does a [subagent](/subagents) asking its supervisor for guidance. Check `/tasks` for pass or fail outcomes; the pane status shows activity, not a verdict.
29
32
 
30
33
  ## Restore after a Herdr restart
31
34
 
32
- With Herdr 0.9.2 or newer, Atomic also reports a resume command so Herdr can reopen the same conversation in the pane after a Herdr server restart. Atomic does not restart panes itself. To disable automatic agent restore in Herdr, set `[session] resume_agents_on_restore = false` in Herdr's config.
35
+ With Herdr 0.9.2 or newer, Atomic also reports a resume command so Herdr can reopen the same conversation in the pane after a Herdr server restart ([Sessions](/sessions), [Storage](/storage)). Atomic does not restart panes itself. To disable automatic agent restore in Herdr, set `[session] resume_agents_on_restore = false` in Herdr's config.
33
36
 
34
37
  - **Local SQLite sessions (default):** Atomic reports `atomic --session-store <path> --session <id>` (plus `--session-prefix <prefix>` when a table prefix is configured).
35
38
  - **JSONL directory sessions:** Atomic reports `atomic --session-dir <dir> --session <id>`. Session IDs ending in `.jsonl` still use `--session <id>`.
36
39
  - **Other persisted stores (such as remote libSQL or PostgreSQL):** Atomic reports `atomic --session <id>`.
37
- - **Unsaved sessions:** Sessions started with `--no-session` are reported without a resume command. A new persisted session can be reopened only after it has been saved.
38
- - **Quit vs. stop signals:** Quitting Atomic yourself (`Ctrl+D`, `Ctrl+C` twice, or `/quit`) clears the resume command so Herdr does not reopen the pane. When Herdr or the OS stops Atomic with `SIGTERM` or `SIGHUP`, the command stays registered for restore.
40
+ - **Switching sessions:** Running `/new`, `/resume`, `/fork`, or `/clone` updates the pane to the new session's ID and resume command.
41
+ - **Unsaved sessions:** Sessions started with `--no-session` report status without a resume command. For a brand-new persisted session, Atomic reports the resume command right away, though reopening succeeds only after the session's first entry is saved to storage.
42
+ - **Quit vs. stop signals:** Quitting Atomic yourself (`Ctrl+D`, `Ctrl+C` twice, `/quit`, or `/exit`) clears the resume command so Herdr does not reopen the pane. When Herdr or the OS stops Atomic with `SIGTERM`, `SIGHUP`, or a Windows console close or sign-out, the resume command stays registered for restore.
43
+ - **Resume-command safety limits:** If the resume command has more than 64 arguments, exceeds 8 KiB, or contains a single quote (`'`) or control character in any argument (such as a session path), Atomic omits the resume command while continuing to report live status.
39
44
  - **Older Herdr versions:** Herdr 0.8.2 through 0.9.1 show status indicators without session restore.
40
45
 
41
46
  ## Disable the integration
42
47
 
43
- Add this to `~/.atomic/agent/settings.json` or trusted project `.atomic/settings.json`, then reload or restart Atomic:
48
+ Add this to `~/.atomic/agent/settings.json` or trusted project `.atomic/settings.json`, then run `/reload` or restart Atomic:
44
49
 
45
50
  ```json
46
51
  {
@@ -50,7 +55,7 @@ Add this to `~/.atomic/agent/settings.json` or trusted project `.atomic/settings
50
55
  }
51
56
  ```
52
57
 
53
- Reporting is enabled by default, and disabling it also disables resume-command reporting. Project settings follow the normal [settings precedence](/settings).
58
+ Reporting is enabled by default, and disabling it also disables resume-command reporting. Running `/reload` after setting `herdr.enabled` to `false` cleanly releases the pane registration and clears the resume command. Project settings follow the normal [settings precedence](/settings).
54
59
 
55
60
  ## Troubleshooting
56
61
 
@@ -58,12 +63,12 @@ If Atomic does not appear in Herdr:
58
63
 
59
64
  - Verify that you launched Atomic inside a Herdr pane rather than an external terminal.
60
65
  - Check that Herdr is running and `herdr.enabled` is not set to `false`.
61
- - Inside a Herdr pane, Atomic reports the pane itself and skips Herdr's legacy file integration (`herdr-agent-state.ts`, usually in `~/.pi/agent/extensions`). Outside a Herdr pane, that file loads normally.
62
- - If you installed a separate `herdr-atomic-reporter` extension, disable one of the two reporters to prevent flickering status updates.
66
+ - Inside a Herdr pane, Atomic's built-in reporter supersedes Herdr's legacy file integration and skips both `herdr-agent-state.ts` and `herdr-agent-state.js` (usually in `~/.pi/agent/extensions`). Outside a Herdr pane, those files load normally.
67
+ - If you installed a separate `herdr-atomic-reporter` extension, remove or disable one of the two reporters to prevent flickering status updates.
63
68
 
64
- Custom launchers must supply `HERDR_ENV=1` along with nonempty `HERDR_BIN_PATH`, `HERDR_PANE_ID`, and `HERDR_SOCKET_PATH` values. See [Herdr's integration guide](https://herdr.dev/docs/integrations/#integrate-your-own-agent).
69
+ Custom launchers must supply `HERDR_ENV=1` along with non-empty `HERDR_BIN_PATH`, `HERDR_PANE_ID`, and `HERDR_SOCKET_PATH` values. See [Herdr's integration guide](https://herdr.dev/docs/integrations/#integrate-your-own-agent).
65
70
 
66
- Reloading or compacting a session keeps Atomic registered in the pane. If status stops updating, check Herdr's connection and reload Atomic. Reporting failures do not interrupt the agent, and Atomic does not automatically poll to reconnect.
71
+ Each `herdr` CLI status call times out after 5 seconds (with a 64 KiB output buffer). Reporting errors never interrupt the agent, and each error category logs to stderr at most once per session. Reloading or compacting a session keeps Atomic registered while enabled; if status stops updating, check Herdr's connection and run `/reload` (Atomic does not poll to reconnect).
67
72
 
68
73
  ## Privacy
69
74
 
package/docs/index.md CHANGED
@@ -1,15 +1,14 @@
1
1
  ---
2
- title: "Overview"
3
- description: "Atomic documentation overview"
2
+ title: "Atomic documentation"
3
+ sidebarTitle: "Overview"
4
+ description: "Install Atomic, connect a model provider, and explore guides, customization APIs, and CLI references."
4
5
  ---
5
6
 
6
- # Atomic documentation
7
-
8
- Atomic is a terminal coding-agent runtime with built-in file, shell, search, codemode, subagent, MCP, web access, and Intercom tools. Extend it with TypeScript extensions, skills, prompt templates, themes, and Atomic packages.
7
+ Atomic is a terminal coding agent with built-in file, shell, search, codemode, subagent, MCP, web access, and Intercom tools. Extend it with TypeScript extensions, skills, prompt templates, themes, and Atomic packages.
9
8
 
10
9
  ## Quick start
11
10
 
12
- Install with a package manager (requires Node.js 22.19+):
11
+ Install with a package manager (requires Node.js 22.19+, or Bun 1.4.5+ for Bun installs):
13
12
 
14
13
  ```bash
15
14
  npm install -g @bastani/atomic
@@ -31,7 +30,7 @@ curl -fsSL https://raw.githubusercontent.com/bastani-inc/atomic/main/install.sh
31
30
  irm https://raw.githubusercontent.com/bastani-inc/atomic/main/install.ps1 | iex
32
31
  ```
33
32
 
34
- The archive installer verifies the GitHub Release checksum and installs into a versioned directory. See [Release archive](/getting-started/installation#release-archive) for `ATOMIC_VERSION`, `ATOMIC_INSTALL_DIR`, `ATOMIC_BIN_DIR`, `GITHUB_TOKEN`/`GH_TOKEN`, default paths, and `PATH` setup.
33
+ The archive installer verifies the GitHub Release checksum and installs into a versioned directory. See [Release archive](/getting-started/installation#release-archive) for version pinning, custom install paths, and `PATH` setup.
35
34
 
36
35
  Start Atomic in any project directory:
37
36
 
@@ -39,19 +38,27 @@ Start Atomic in any project directory:
39
38
  atomic
40
39
  ```
41
40
 
42
- Authenticate with `/login` for a subscription provider, or export an API key such as `ANTHROPIC_API_KEY` before launching. See [Quickstart](/quickstart) for the full first-run walkthrough.
43
-
44
- ## Documentation paths
41
+ Authenticate with `/login`, run `atomic auth login <provider>` in your shell, or export an API key such as `ANTHROPIC_API_KEY` before launching. See [Quickstart](/quickstart) for the full first-run walkthrough.
45
42
 
46
- - **[Learn](/guides).** Install Atomic, complete your first session, and learn interactive commands, sessions, compaction, and providers.
47
- - **[Build](/build).** Extend Atomic with prompt templates, skills, subagents, Intercom, codemode, extensions, and packages, or embed it through the [SDK, RPC, or JSON mode](/programmatic).
48
- - **[Reference](/reference).** Look up CLI flags, settings, environment variables, keybindings, tools, storage, and API contracts.
49
-
50
- ### First successful session
43
+ ## First successful session
51
44
 
52
45
  1. [Install Atomic](/getting-started/installation).
53
46
  2. [Authenticate a provider](/getting-started/authentication).
54
- 3. [Start your first session](/getting-started/first-session).
47
+ 3. [Run your first session](/getting-started/first-session).
55
48
  4. [Add project instructions](/getting-started/project-instructions).
56
- 5. [Learn interactive commands](/usage).
49
+ 5. [Use interactive mode](/usage).
57
50
  6. [Manage sessions](/sessions) and [compaction](/compaction).
51
+
52
+ ## Explore by capability
53
+
54
+ - **Sessions, snapshots, and resume:** Save and branch in [Sessions](/sessions), capture repository state with [Worktree snapshots](/worktree-snapshots), resume across machines with [Environment blueprints](/guides/resume-on-any-machine#set-the-environment-up-with-a-blueprint), and share state over PostgreSQL or Turso/libSQL in [Storage backends](/storage).
55
+ - **Multi-agent work:** Delegate focused tasks with [Subagents](/subagents), coordinate live sessions with [Intercom](/intercom), and script multi-step checks with [Orchestration](/orchestration).
56
+ - **Tools and context:** Connect external tools through [MCP servers](/mcp-servers), keep long runs within budget with [Compaction and custom compactors](/compaction#customize-morph-or-add-a-remote-compactor), and inspect terminal integrations like [Herdr](/herdr).
57
+ - **Embed and extend:** Drive Atomic from Node.js with the [TypeScript SDK](/sdk), [SDK storage backends](/sdk/storage), [Structured decisions (`decide()`)](/sdk/structured-decisions), [RPC mode](/rpc), and [Standalone libraries](/libraries).
58
+ - **Troubleshoot:** Capture logs, stalls, and snapshots with [Diagnostics and debugging](/development).
59
+
60
+ ## Documentation paths
61
+
62
+ - **[Learn](/guides).** Install Atomic, run interactive and non-interactive sessions, manage context and [worktree snapshots](/worktree-snapshots), delegate work with [subagents](/subagents) and [Intercom](/intercom), connect providers, and review security and containerization.
63
+ - **[Build](/build).** Customize Atomic with skills, prompt templates, themes, extensions, [MCP servers](/mcp-servers), and packages, orchestrate agents, define custom providers and compactors, or embed Atomic through the [SDK, RPC, or JSON mode](/programmatic).
64
+ - **[Reference](/reference).** Look up CLI commands and flags, settings, environment variables, keybindings, tools, [storage](/storage), customization schemas, API protocols, [platform setup](/herdr), and [diagnostics](/development).