@bastani/atomic 0.10.14-alpha.1 → 0.10.15-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/_shared/dist-KOELCESV.js +2 -2
  3. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  4. package/dist/_shared/lib-4PES5P4V.js +2 -2
  5. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +3 -3
  6. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
  7. package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
  8. package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
  9. package/dist/_shared/runtime-O4KCSG4C.js +2 -2
  10. package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
  11. package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
  12. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  13. package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
  14. package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
  15. package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
  16. package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
  17. package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
  18. package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
  19. package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
  20. package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
  21. package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
  22. package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
  23. package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
  24. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  25. package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
  26. package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
  27. package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
  28. package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
  29. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  30. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  31. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  32. package/dist/builtin/intercom/package.json +1 -1
  33. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  34. package/dist/builtin/mcp/package.json +1 -1
  35. package/dist/builtin/subagents/package.json +1 -1
  36. package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
  37. package/dist/builtin/web-access/index.bundle.mjs +1 -1
  38. package/dist/builtin/web-access/package.json +1 -1
  39. package/dist/cli/auth-cli.code.js +1 -1
  40. package/dist/cli/auth-cli.impl.js +3 -3
  41. package/dist/cli/auth-cli.js +3 -3
  42. package/dist/cli/blueprint-command.impl.js +3 -3
  43. package/dist/cli/blueprint-command.js +3 -3
  44. package/dist/cli/intercom-command.code.js +3 -3
  45. package/dist/cli/intercom-command.impl.js +3 -3
  46. package/dist/cli/intercom-command.js +3 -3
  47. package/dist/cli/list-models.impl.js +3 -3
  48. package/dist/cli/list-models.js +3 -3
  49. package/dist/cli/session-picker.code.js +1 -1
  50. package/dist/cli/session-picker.impl.js +3 -3
  51. package/dist/cli/session-picker.js +3 -3
  52. package/dist/cli/startup-ui.code.js +1 -1
  53. package/dist/cli/startup-ui.impl.js +3 -3
  54. package/dist/cli/startup-ui.js +3 -3
  55. package/dist/cli/storage-command.impl.js +3 -3
  56. package/dist/cli/storage-command.js +3 -3
  57. package/dist/cli/storage-search-session.code.js +1 -1
  58. package/dist/cli/storage-search-session.impl.js +3 -3
  59. package/dist/cli/storage-search-session.js +3 -3
  60. package/dist/cli/team-command.code.js +1 -1
  61. package/dist/cli/team-command.impl.js +3 -3
  62. package/dist/cli/team-command.js +3 -3
  63. package/dist/cli.js +2 -2
  64. package/dist/core/compaction/compactor.d.ts +0 -8
  65. package/dist/core/debug.impl.js +3 -3
  66. package/dist/core/debug.js +3 -3
  67. package/dist/core/export-html/card-projection.impl.js +3 -3
  68. package/dist/core/export-html/card-projection.js +3 -3
  69. package/dist/core/export-html/index.code.js +2 -2
  70. package/dist/core/export-html/index.impl.js +3 -3
  71. package/dist/core/export-html/index.js +3 -3
  72. package/dist/core/export-html/json-spans.impl.js +3 -3
  73. package/dist/core/export-html/json-spans.js +3 -3
  74. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  75. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  76. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  77. package/dist/core/export-html/tool-renderer.js +3 -3
  78. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  79. package/dist/core/extensions/jiti-loader.js +3 -3
  80. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  81. package/dist/core/extensions/jiti-static-loader.js +3 -3
  82. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  83. package/dist/core/extensions/loader-host-modules.js +3 -3
  84. package/dist/core/intercom-broker-control-host.code.js +1 -1
  85. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  86. package/dist/core/intercom-broker-control-host.js +3 -3
  87. package/dist/core/intercom-broker-control.code.js +2 -2
  88. package/dist/core/intercom-broker-control.impl.js +3 -3
  89. package/dist/core/intercom-broker-control.js +3 -3
  90. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  91. package/dist/core/package-manager-storage-adapters.js +3 -3
  92. package/dist/core/sdk.code.js +1 -1
  93. package/dist/core/sdk.impl.js +3 -3
  94. package/dist/core/sdk.js +3 -3
  95. package/dist/core/session-manager-core.js +3 -3
  96. package/dist/core/session-manager-list.impl.js +3 -3
  97. package/dist/core/session-manager-list.js +3 -3
  98. package/dist/core/session-manager.impl.js +3 -3
  99. package/dist/core/session-manager.js +3 -3
  100. package/dist/core/session-storage.impl.js +3 -3
  101. package/dist/core/session-storage.js +3 -3
  102. package/dist/core/storage/index.js +2 -2
  103. package/dist/core/storage/node-sqlite-thread.js +2 -2
  104. package/dist/core/storage/node-sqlite.js +2 -2
  105. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  106. package/dist/core/storage/offline-snapshot-file.js +3 -3
  107. package/dist/core/storage/provider.js +2 -2
  108. package/dist/core/storage/selection.js +2 -2
  109. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  110. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  111. package/dist/core/storage/session/branch-fork-source.js +3 -3
  112. package/dist/core/storage/session/card-view.impl.js +3 -3
  113. package/dist/core/storage/session/card-view.js +3 -3
  114. package/dist/core/storage/session/child-reader.code.js +2 -2
  115. package/dist/core/storage/session/child-reader.impl.js +3 -3
  116. package/dist/core/storage/session/child-reader.js +3 -3
  117. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  118. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  119. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  120. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  121. package/dist/core/storage/session/expanded-child-details.js +3 -3
  122. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  123. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  124. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  125. package/dist/core/storage/session/fork-row-index.js +3 -3
  126. package/dist/core/storage/session/fork-staging.code.js +1 -1
  127. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  128. package/dist/core/storage/session/fork-staging.js +3 -3
  129. package/dist/core/storage/session/fork-window.code.js +2 -2
  130. package/dist/core/storage/session/fork-window.impl.js +3 -3
  131. package/dist/core/storage/session/fork-window.js +3 -3
  132. package/dist/core/storage/session/history-pages.impl.js +3 -3
  133. package/dist/core/storage/session/history-pages.js +3 -3
  134. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  135. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  136. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  137. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  138. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  139. package/dist/core/storage/session/memory-session-store.js +3 -3
  140. package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
  141. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  142. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  143. package/dist/core/storage/session/released-history-files.code.js +1 -1
  144. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  145. package/dist/core/storage/session/released-history-files.js +3 -3
  146. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  147. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  148. package/dist/core/storage/session/session-resume.impl.js +3 -3
  149. package/dist/core/storage/session/session-resume.js +3 -3
  150. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  151. package/dist/core/storage/session/snapshot-cut.js +3 -3
  152. package/dist/core/storage/session/snapshot-history.code.js +2 -2
  153. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  154. package/dist/core/storage/session/snapshot-history.js +3 -3
  155. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  156. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  157. package/dist/core/storage/session/sql-session-store.js +3 -3
  158. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  159. package/dist/core/storage/session/tree-outline.js +3 -3
  160. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  161. package/dist/core/storage/session/tree-presentation.js +3 -3
  162. package/dist/core/storage/storage-status.impl.js +3 -3
  163. package/dist/core/storage/storage-status.js +3 -3
  164. package/dist/core/storage/team.impl.js +3 -3
  165. package/dist/core/storage/team.js +3 -3
  166. package/dist/core/structured-output/index.code.js +1 -1
  167. package/dist/core/structured-output/index.impl.js +3 -3
  168. package/dist/core/structured-output/index.js +3 -3
  169. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  170. package/dist/core/tasks/task-completion-entry.js +3 -3
  171. package/dist/core/tasks/task-file-history.code.js +2 -2
  172. package/dist/core/tasks/task-file-history.impl.js +3 -3
  173. package/dist/core/tasks/task-file-history.js +3 -3
  174. package/dist/core/tasks/task-reference-archive.code.js +2 -2
  175. package/dist/core/tasks/task-reference-archive.js +3 -3
  176. package/dist/core/tasks/task-reference-identity.js +3 -3
  177. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  178. package/dist/core/tasks/task-reference-stream.js +3 -3
  179. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  180. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  181. package/dist/core/tasks/task-view-source.impl.js +3 -3
  182. package/dist/core/tasks/task-view-source.js +3 -3
  183. package/dist/core/tools/read-url.impl.js +3 -3
  184. package/dist/core/tools/read-url.js +3 -3
  185. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  186. package/dist/core/worktree-snapshot/errors.code.js +1 -1
  187. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  188. package/dist/core/worktree-snapshot/errors.js +3 -3
  189. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  190. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  191. package/dist/extensions/codemode/execute.impl.js +3 -3
  192. package/dist/extensions/codemode/execute.js +3 -3
  193. package/dist/extensions/codemode/renderer.impl.js +3 -3
  194. package/dist/extensions/codemode/renderer.js +3 -3
  195. package/dist/extensions/mcp/cli.code.js +1 -1
  196. package/dist/extensions/mcp/cli.impl.js +3 -3
  197. package/dist/extensions/mcp/cli.js +3 -3
  198. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  199. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  200. package/dist/extensions/mcp/cli.lazy.js +3 -3
  201. package/dist/extensions/mcp/runtime.code.js +1 -1
  202. package/dist/extensions/mcp/runtime.impl.js +3 -3
  203. package/dist/extensions/mcp/runtime.js +3 -3
  204. package/dist/index.d.ts +21 -1
  205. package/dist/index.js +2 -2
  206. package/dist/main-first-time-setup.code.js +1 -1
  207. package/dist/main-first-time-setup.impl.js +3 -3
  208. package/dist/main-first-time-setup.js +3 -3
  209. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  210. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  211. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  212. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  213. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  214. package/dist/modes/print-mode.js +1 -1
  215. package/dist/package-manager-cli.code.js +2 -2
  216. package/dist/package-manager-cli.impl.js +3 -3
  217. package/dist/package-manager-cli.js +3 -3
  218. package/dist/startup-files.json +1 -1
  219. package/dist/startup-stages/6.js +1 -1
  220. package/dist/utils/startup-database-spare.code.js +1 -1
  221. package/dist/utils/startup-database-spare.impl.js +3 -3
  222. package/dist/utils/startup-database-spare.js +3 -3
  223. package/dist/utils/tools-manager.impl.js +3 -3
  224. package/dist/utils/tools-manager.js +3 -3
  225. package/docs/background-tasks/reference.md +182 -0
  226. package/docs/background-tasks.md +98 -405
  227. package/docs/build.md +67 -27
  228. package/docs/changelog.mdx +9 -0
  229. package/docs/codemode.md +108 -39
  230. package/docs/compaction/branch-summaries.md +54 -0
  231. package/docs/compaction/custom-compactors.md +161 -0
  232. package/docs/compaction/memory-compaction.md +77 -0
  233. package/docs/compaction/reference.md +86 -38
  234. package/docs/compaction.md +51 -252
  235. package/docs/computer-use.md +169 -321
  236. package/docs/containerization.md +71 -57
  237. package/docs/custom-provider/api-reference.md +119 -25
  238. package/docs/custom-provider/oauth.md +114 -132
  239. package/docs/custom-provider/override.md +37 -27
  240. package/docs/custom-provider/registration.md +107 -83
  241. package/docs/custom-provider/streaming.md +85 -71
  242. package/docs/custom-provider.md +85 -52
  243. package/docs/development.md +39 -29
  244. package/docs/docs.json +76 -63
  245. package/docs/environment-variables.md +94 -44
  246. package/docs/extensions/api-reference.md +86 -43
  247. package/docs/extensions/authoring.md +162 -154
  248. package/docs/extensions/events.md +80 -25
  249. package/docs/extensions/examples.md +90 -85
  250. package/docs/extensions/ui.md +206 -82
  251. package/docs/extensions.md +79 -108
  252. package/docs/getting-started/authentication.md +67 -36
  253. package/docs/getting-started/first-session.md +53 -43
  254. package/docs/getting-started/installation.md +116 -89
  255. package/docs/getting-started/project-instructions.md +48 -34
  256. package/docs/guides/configuration.md +82 -20
  257. package/docs/guides/non-interactive.md +66 -24
  258. package/docs/guides/resume-on-any-machine.md +135 -82
  259. package/docs/guides/team-setup.md +114 -105
  260. package/docs/guides.md +76 -32
  261. package/docs/herdr.md +15 -16
  262. package/docs/how-atomic-works.md +140 -0
  263. package/docs/index.md +58 -44
  264. package/docs/intercom/operations.md +141 -151
  265. package/docs/intercom/reference.md +85 -108
  266. package/docs/intercom.md +84 -145
  267. package/docs/json.md +120 -67
  268. package/docs/keybindings.md +85 -49
  269. package/docs/libraries/agent-core.md +137 -275
  270. package/docs/libraries/ai.md +100 -84
  271. package/docs/libraries/codemode.md +210 -300
  272. package/docs/libraries/schema.md +59 -53
  273. package/docs/libraries/storage-postgres.md +49 -35
  274. package/docs/libraries/telemetry.md +153 -354
  275. package/docs/libraries/tui.md +265 -393
  276. package/docs/libraries.md +42 -26
  277. package/docs/llama-cpp.md +171 -161
  278. package/docs/mcp-servers.md +90 -51
  279. package/docs/models/choose-a-model.md +188 -0
  280. package/docs/models/reference.md +74 -30
  281. package/docs/models.md +153 -88
  282. package/docs/orchestration/migrating-workflows.md +23 -16
  283. package/docs/orchestration/patterns.md +39 -44
  284. package/docs/orchestration.md +65 -26
  285. package/docs/packages/authoring.md +51 -29
  286. package/docs/packages/reference.md +42 -21
  287. package/docs/packages.md +69 -58
  288. package/docs/programmatic.md +118 -24
  289. package/docs/prompt-templates.md +84 -83
  290. package/docs/providers/reference.md +43 -48
  291. package/docs/providers.md +219 -451
  292. package/docs/quickstart.md +140 -120
  293. package/docs/reference/cli.md +135 -97
  294. package/docs/reference.md +20 -18
  295. package/docs/rpc/examples.md +76 -20
  296. package/docs/rpc/extension-ui.md +64 -38
  297. package/docs/rpc/protocol.md +361 -110
  298. package/docs/rpc.md +57 -17
  299. package/docs/sdk/reference.md +409 -534
  300. package/docs/sdk/storage.md +53 -13
  301. package/docs/sdk/structured-decisions.md +82 -56
  302. package/docs/sdk/web-server.md +57 -43
  303. package/docs/sdk.md +106 -84
  304. package/docs/security.md +42 -64
  305. package/docs/session-format.md +62 -38
  306. package/docs/sessions.md +99 -214
  307. package/docs/settings.md +165 -195
  308. package/docs/shell-aliases.md +9 -6
  309. package/docs/skills/authoring.md +69 -48
  310. package/docs/skills/reference.md +51 -20
  311. package/docs/skills.md +99 -148
  312. package/docs/slash-commands.md +129 -0
  313. package/docs/storage/custom-adapters.md +160 -85
  314. package/docs/storage/jsonl.md +81 -66
  315. package/docs/storage/postgres/pgbouncer.md +120 -126
  316. package/docs/storage/postgres/tuning.md +120 -143
  317. package/docs/storage/postgres.md +314 -330
  318. package/docs/storage/sqlite.md +71 -42
  319. package/docs/storage.md +298 -302
  320. package/docs/subagents/authoring.md +55 -38
  321. package/docs/subagents/reference.md +73 -33
  322. package/docs/subagents.md +119 -187
  323. package/docs/terminal-setup.md +50 -38
  324. package/docs/termux.md +67 -41
  325. package/docs/themes/reference.md +23 -19
  326. package/docs/themes.md +142 -127
  327. package/docs/tmux.md +47 -55
  328. package/docs/tools.md +147 -109
  329. package/docs/tui/reference.md +166 -214
  330. package/docs/tui.md +196 -341
  331. package/docs/usage.md +118 -138
  332. package/docs/verification.md +79 -51
  333. package/docs/web-access.md +121 -101
  334. package/docs/windows.md +26 -27
  335. package/docs/worktree-snapshots/reference.md +245 -0
  336. package/docs/worktree-snapshots.md +71 -259
  337. package/package.json +8 -8
  338. package/dist/_shared/startup-0-2-5QHPCEON.js.map +0 -1
  339. package/docs/guides/intercom.md +0 -32
  340. package/docs/guides/orchestration.md +0 -28
  341. package/docs/guides/subagents.md +0 -37
@@ -0,0 +1,140 @@
1
+ ---
2
+ title: "How Atomic works"
3
+ sidebarTitle: "How Atomic works"
4
+ description: "Understand Atomic's agent loop, two-process terminal architecture, context assembly, session trees, compaction, and trust boundaries."
5
+ ---
6
+
7
+ Atomic coordinates model requests, tool execution, context assembly, and session persistence. A **session** is Atomic's durable record of a conversation, including messages, tool calls and results, model changes, worktree snapshots, and compaction boundaries.
8
+
9
+ <Warning>
10
+ **Tools run with your OS permissions.** Atomic checks **project trust** before loading project settings, instructions, extensions, skills, subagents, or MCP servers, but project trust is not a sandbox. Enabled tools and extensions execute with your operating-system user permissions. Review [Security](/security) and [Containerization](/containerization) before running Atomic on untrusted code or unattended automation.
11
+ </Warning>
12
+
13
+ ## The agent loop
14
+
15
+ Messages and events in a session form a tree. Each path from the root to an entry is a **branch**. The branch ending at the current entry is the **active branch** and supplies conversation history for the next model request.
16
+
17
+ When you submit a message, Atomic runs a turn loop:
18
+
19
+ <Steps>
20
+ <Step title="Record and assemble the request">
21
+ Atomic appends your message to the active branch, builds the system prompt and model-compatible conversation history, attaches active tool definitions and model settings, and sends the request to the selected provider.
22
+ </Step>
23
+ <Step title="Stream the response and execute tools">
24
+ The provider streams assistant text, optional reasoning blocks, and tool calls. Atomic records the response, runs each tool call in your environment, and records each tool result. That completes one turn.
25
+ </Step>
26
+ <Step title="Continue or finish">
27
+ If tool results or queued messages require another model call, Atomic starts another turn automatically. Otherwise, the run finishes and waits for your next prompt.
28
+ </Step>
29
+ </Steps>
30
+
31
+ ### Steering, follow-ups, and cancellation
32
+
33
+ You do not have to wait for a run to finish before guiding it:
34
+
35
+ | Action | Default shortcut | When it takes effect |
36
+ | --- | --- | --- |
37
+ | **Steer the active run** | `Enter` | Enters after the current assistant turn and its tool calls settle, redirecting work mid-run. |
38
+ | **Queue a follow-up** | `Alt+Enter` (`Ctrl+Q` on Windows and WSL) | Waits until the agent finishes all pending turns, then starts the next task. |
39
+ | **Pull queued messages back** | `Alt+Up` (`Alt+Q` on Windows and WSL) | Returns queued messages to the editor so you can edit or discard them. |
40
+ | **Cancel the current run** | `Esc` | Stops the active model stream or tool execution and restores queued messages to the editor. |
41
+
42
+ See [Interactive mode](/usage) and [Keybindings](/keybindings) for full queueing and shortcut details.
43
+
44
+ ## Two-process interactive architecture
45
+
46
+ In interactive mode, Atomic runs two cooperating processes:
47
+
48
+ - **The terminal UI host** owns your screen, input editor, scrolling transcript, overlays, and keyboard shortcuts.
49
+ - **The background session engine** owns model requests, tool execution, extensions, and session storage.
50
+
51
+ Keeping the UI separate from the session engine lets you type, scroll, inspect `/tasks`, queue messages, or cancel a stuck turn even while a model call, tool, or extension is busy. If a cancellation stalls or the background engine exits unexpectedly, the terminal host recovers cleanly and preserves any unsent text in your editor.
52
+
53
+ ## Context assembly pipeline
54
+
55
+ Before every model request, Atomic builds two inputs: the **system prompt** and the **conversation history**.
56
+
57
+ ### System prompt order
58
+
59
+ Atomic assembles system prompt sections in cache-friendly order so stable instructions stay cached across turns and sessions:
60
+
61
+ 1. **Base prompt, tools, and guidelines:** Atomic's default instructions (or a replacement from `SYSTEM.md` or `--system-prompt`), summaries of active tools, coding guidelines, and any `APPEND_SYSTEM.md` or `--append-system-prompt` addendum.
62
+ 2. **Built-in documentation pointers:** Paths to Atomic's local guides so the agent can look up Atomic features accurately when asked.
63
+ 3. **Project context files:** Discovered `AGENTS.override.md`, `AGENTS.md`, or `CLAUDE.md` files concatenated top-down from global config and ancestor directories to your working directory (see [Add project instructions](/getting-started/project-instructions)).
64
+ 4. **Skill catalog:** Short descriptions of discovered skills. Full `SKILL.md` instructions load on demand only when you invoke `/skill:<name>` or the agent reads the skill.
65
+ 5. **Dynamic session metadata:** The active model and reasoning level, current working directory, session folder, and current date. Placing these last prevents directory or date changes from invalidating earlier prompt-cache prefixes.
66
+
67
+ ### Conversation history and input expansion
68
+
69
+ Atomic reconstructs conversation history from the active branch on each turn:
70
+
71
+ - **Input expansion:** Prompt templates (`/template`) and skill commands (`/skill:<name>`) expand before reaching the model. `@file` references, pasted images, and `!` shell command outputs attach directly to the conversation, while `!!` shell commands run locally without entering model context.
72
+ - **Active branch conversion:** Session entries convert into model-compatible user, assistant, and tool-result messages, stopping at the most recent compaction boundary and skipping failed turns that Atomic automatically recovered from (while keeping them in raw history for inspection).
73
+ - **Extension hooks:** Extensions can inspect or transform input and context before a request leaves Atomic.
74
+
75
+ ## Sessions, trees, snapshots, and persistence
76
+
77
+ Because every session is a tree of entries linked to their parents, you can explore alternative approaches without losing earlier work:
78
+
79
+ - **Branching in place (`/tree`):** Jump back to any earlier entry and continue from there to create a new branch inside the same session.
80
+ - **Forking and cloning (`/fork`, `/clone`):** Create a new session starting from an earlier user message (`/fork`) or duplicating your current position (`/clone`). Forked sessions share their parent's stored history efficiently.
81
+ - **Subagent sessions:** [Subagents](/subagents) run in child sessions—either fresh or forked from the parent conversation—persisted in the same store so you can inspect, resume, and export them alongside your main session.
82
+ - **Storage backends:** By default, Atomic saves sessions in a local SQLite database (`~/.atomic/workflows/journal.sqlite`) with fast search and session memory recall. You can also choose per-session JSONL files or a shared PostgreSQL database to resume sessions across machines (see [Storage](/storage)).
83
+ - **Worktree snapshots:** In Git repositories, Atomic can record repository state alongside session turns so resuming a session—locally or on another machine—can restore matching files and run `.atomic/blueprint.yaml` setup steps (see [Worktree snapshots](/worktree-snapshots) and [Resume sessions on any machine](/guides/resume-on-any-machine)).
84
+
85
+ ## Context limits and compaction
86
+
87
+ Every model has a finite context window. When active context nears the limit—or when you run `/compact`—Atomic writes a compaction boundary without deleting prior messages from session history:
88
+
89
+ - **Memory compaction (default):** Clears the active context window with no extra model call and inserts a recovery boundary pointing to session history (`history://`). The agent reads or searches exact earlier turns on demand instead of relying on a lossy summary.
90
+ - **Custom compaction models:** Sends the active context once to a dedicated remote compactor (such as built-in Morph or your own endpoint) and falls back automatically to memory compaction if that endpoint fails or times out.
91
+ - **Branch summaries:** When `/tree` leaves a branch, Atomic can optionally generate a separate summary of the abandoned branch and attach it to your new branch position.
92
+
93
+ See [Context and compaction](/compaction) for details and configuration.
94
+
95
+ ## One runtime, five interfaces
96
+
97
+ Interactive chat, CLI automation, and embedded apps all run on the same agent loop, tool system, extensions, and session storage:
98
+
99
+ | Interface | How to start it | Best for |
100
+ | --- | --- | --- |
101
+ | **Interactive TUI** | `atomic` | Everyday coding, live tool inspection, `/tasks`, `/tree`, and subagents. |
102
+ | **Print mode** | `atomic -p "..."` or piped stdin | One-shot scripts, CI checks, and shell pipelines. |
103
+ | **JSON event stream** | `atomic --mode json` | Consuming structured turn, message, and tool events from stdout. |
104
+ | **RPC mode** | `atomic --mode rpc` | Driving a separate Atomic process over stdin/stdout JSON commands. |
105
+ | **TypeScript SDK** | `createAgentSession()` | Embedding Atomic directly inside a Node.js or TypeScript application. |
106
+
107
+ See [Non-interactive mode](/guides/non-interactive) and [Programmatic modes](/programmatic) to choose an integration path.
108
+
109
+ ## Extensions and bundled capabilities
110
+
111
+ Extensions are TypeScript modules loaded into the session engine. They can register tools, slash commands, keyboard shortcuts, model providers, event handlers, and custom terminal views.
112
+
113
+ Atomic also ships its built-in integrations—[subagents](/subagents), [Intercom](/intercom), [MCP servers](/mcp-servers), [web access](/web-access), and [`llama.cpp`](/llama-cpp)—as **lazy bundled extensions**. Their tools and slash commands are visible immediately, while their full runtimes load only when first used so startup stays fast.
114
+
115
+ For lighter customization without writing TypeScript, use [skills](/skills), [prompt templates](/prompt-templates), [themes](/themes), and [Atomic packages](/packages).
116
+
117
+ ## Project trust vs. OS permissions
118
+
119
+ Before loading project-controlled configuration, Atomic resolves a **project trust** decision for your working directory:
120
+
121
+ - **Blocked until trusted:** Project `settings.json`, extensions, skills, prompt templates, themes, subagents, `mcp.json`, `blueprint.yaml`, `SYSTEM.md`, `APPEND_SYSTEM.md`, and **project and ancestor context files** (`AGENTS.md` / `CLAUDE.md`).
122
+ - **Always loaded:** Your global configuration and global context files in `~/.atomic/agent/`.
123
+ - **Not a sandbox:** Trust controls which project files Atomic loads automatically—it does not restrict what enabled tools (`bash`, `read`, `edit`, `write`) or loaded extensions can access on your machine. Use `/trust` to update saved decisions, `--approve` / `--no-approve` for one-off CLI overrides, and containers when you need OS-level isolation.
124
+
125
+ ## Next steps
126
+
127
+ <Columns cols={2}>
128
+ <Card title="Use interactive mode" href="/usage">
129
+ Learn the editor, queueing, file references, and everyday shortcuts.
130
+ </Card>
131
+ <Card title="Manage sessions" href="/sessions">
132
+ Resume, search, branch with `/tree`, fork, and recall past sessions.
133
+ </Card>
134
+ <Card title="Context and compaction" href="/compaction">
135
+ See how memory compaction and custom compactors keep long runs fast.
136
+ </Card>
137
+ <Card title="Slash commands" href="/slash-commands">
138
+ Browse every built-in and bundled extension slash command.
139
+ </Card>
140
+ </Columns>
package/docs/index.md CHANGED
@@ -1,64 +1,78 @@
1
1
  ---
2
2
  title: "Atomic documentation"
3
- sidebarTitle: "Overview"
3
+ sidebarTitle: "Introduction"
4
4
  description: "Install Atomic, connect a model provider, and explore guides, customization APIs, and CLI references."
5
5
  ---
6
6
 
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.
7
+ Atomic is an extensible coding agent that runs in your terminal. Give it a goal and a repository, and it inspects files, runs commands, edits code, delegates work to subagents, and saves full session history you can resume or branch anytime.
8
+
9
+ <Warning>
10
+ **Permissions and project trust.** Atomic's tools and loaded extensions run with your operating-system user permissions. **Project trust** controls which repository settings, instructions, extensions, skills, subagents, and MCP servers Atomic loads automatically, but it is not a sandbox. Review [Security](/security) and [Containerization](/containerization) before running Atomic on untrusted code or unattended automation.
11
+ </Warning>
8
12
 
9
13
  ## Quick start
10
14
 
11
- Install with a package manager (requires [Node.js 24.20.0 or newer](/getting-started/installation#nodejs-version), or Bun 1.4.5+ for Bun installs):
15
+ Install with a package manager (requires [Node.js 24.20.0 or newer](/getting-started/installation#nodejs-version) at runtime) or use the self-contained [release archive](/getting-started/installation#release-archive) with no Node.js required:
12
16
 
13
17
  ```bash
14
18
  npm install -g @bastani/atomic
15
- # or: pnpm add -g @bastani/atomic
16
- # or: bun add -g @bastani/atomic
17
- ```
18
-
19
- Atomic does not require package install scripts; pass `--ignore-scripts` if you disable lifecycle scripts during install.
20
-
21
- Or install the self-contained release archive, which needs no Node.js or package manager:
22
-
23
- ```bash
24
- # macOS / Linux
25
- curl -fsSL https://raw.githubusercontent.com/bastani-inc/atomic/main/install.sh | sh
26
- ```
27
-
28
- ```powershell
29
- # Windows PowerShell
30
- irm https://raw.githubusercontent.com/bastani-inc/atomic/main/install.ps1 | iex
31
- ```
32
-
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.
34
-
35
- Start Atomic in any project directory:
36
-
37
- ```bash
38
19
  atomic
39
20
  ```
40
21
 
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.
42
-
43
- ## First successful session
44
-
45
- 1. [Install Atomic](/getting-started/installation).
46
- 2. [Authenticate a provider](/getting-started/authentication).
47
- 3. [Run your first session](/getting-started/first-session).
48
- 4. [Add project instructions](/getting-started/project-instructions).
49
- 5. [Use interactive mode](/usage).
50
- 6. [Manage sessions](/sessions) and [compaction](/compaction).
22
+ Sign in inside Atomic with `/login`, from your shell with `atomic auth login <provider>`, or by exporting an API key such as `ANTHROPIC_API_KEY`. Follow the [Quickstart](/quickstart) for the complete four-step walkthrough, or see [Install Atomic](/getting-started/installation) for pnpm, Bun, macOS/Linux/Windows archives, and troubleshooting.
23
+
24
+ ## Start here
25
+
26
+ <Columns cols={2}>
27
+ <Card title="Quickstart" href="/quickstart">
28
+ Install Atomic, connect a provider, run your first task, and add project instructions.
29
+ </Card>
30
+ <Card title="How Atomic works" href="/how-atomic-works">
31
+ Learn the agent loop, two-process terminal architecture, context assembly, compaction, and trust model.
32
+ </Card>
33
+ <Card title="Choose a model" href="/models/choose-a-model">
34
+ Pick between subscriptions, API keys, local llama.cpp models, and compatible custom endpoints.
35
+ </Card>
36
+ <Card title="Use interactive mode" href="/usage">
37
+ Master the terminal editor, file references, shell commands, message queueing, and shortcuts.
38
+ </Card>
39
+ </Columns>
51
40
 
52
41
  ## Explore by capability
53
42
 
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 in [Storage](/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).
43
+ <Columns cols={2}>
44
+ <Card title="Sessions and branching" href="/sessions">
45
+ Resume conversations, search past history, and explore alternatives with `/tree`, `/fork`, and `/clone`.
46
+ </Card>
47
+ <Card title="Worktree snapshots and resume" href="/worktree-snapshots">
48
+ Capture repository state alongside session turns and restore checkouts locally or across machines.
49
+ </Card>
50
+ <Card title="Context and compaction" href="/compaction">
51
+ Keep long sessions within budget with zero-call memory compaction or custom remote compactors.
52
+ </Card>
53
+ <Card title="Subagents and orchestration" href="/subagents">
54
+ Delegate independent tasks to fresh or forked background subagents and verify multi-step results.
55
+ </Card>
56
+ <Card title="Intercom and background tasks" href="/intercom">
57
+ Coordinate live sessions across one host or a shared database and inspect background work in `/tasks`.
58
+ </Card>
59
+ <Card title="MCP servers and extensibility" href="/mcp-servers">
60
+ Connect external tools over Model Context Protocol or extend Atomic with skills, themes, and extensions.
61
+ </Card>
62
+ </Columns>
59
63
 
60
64
  ## Documentation paths
61
65
 
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).
66
+ <Columns cols={3}>
67
+ <Card title="Learn" href="/guides">
68
+ Onboarding, everyday terminal workflows, sessions, compaction, subagents, models, and security.
69
+ </Card>
70
+ <Card title="Build" href="/build">
71
+ Skills, prompt templates, themes, extensions, packages, custom providers, SDK, RPC, and JSON mode.
72
+ </Card>
73
+ <Card title="Reference" href="/reference">
74
+ CLI flags, slash commands, settings, environment variables, keybindings, tools, storage, and schemas.
75
+ </Card>
76
+ </Columns>
77
+
78
+ Looking for a specific topic? Jump directly to [Slash commands](/slash-commands), [CLI reference](/reference/cli), [Custom compaction models](/compaction/custom-compactors), [Resume on any machine](/guides/resume-on-any-machine), [Storage](/storage), [Structured decisions](/sdk/structured-decisions), [Terminal setup](/terminal-setup), [Platform setup](/reference#platform-setup), or [Diagnostics and debugging](/development).