@bastani/atomic 0.10.14 → 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 +17 -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 +1 -1
  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
@@ -1,50 +1,61 @@
1
1
  ---
2
2
  title: "Build custom providers"
3
- sidebarTitle: "Custom providers"
4
- description: "Register custom model providers, proxies, OAuth login flows, and streaming APIs from an Atomic extension."
3
+ sidebarTitle: "Build Custom Providers"
4
+ description: "Register custom model providers, proxies, OAuth login flows, multi-account aliases, and streaming APIs from an Atomic extension."
5
5
  ---
6
6
 
7
- Extensions can register custom model providers with `atomic.registerProvider()`, create multi-account aliases with `atomic.registerProviderAlias()`, and remove overrides with `atomic.unregisterProvider()`:
7
+ Extensions can register custom model providers with `atomic.registerProvider()`, create multi-account aliases with `atomic.registerProviderAlias()`, and remove registrations with `atomic.unregisterProvider()`.
8
8
 
9
- - **Proxies:** Route requests through corporate proxies or API gateways.
10
- - **Custom endpoints:** Connect self-hosted or private model deployments.
11
- - **OAuth and SSO:** Add custom login flows for enterprise providers.
12
- - **Custom APIs:** Implement streaming, image generation, classification, or remote compaction for non-standard APIs.
9
+ If you only need to add chat or compactor models for an API Atomic already supports, configure `~/.atomic/agent/models.json` instead. SDK hosts can register extension providers inline through `extensionFactories` ([SDK extensions](/sdk/reference#extensions)).
13
10
 
14
- If you only need to add chat or compactor models for an API Atomic already supports, use [Configure custom models](/models) instead. SDK hosts can also register providers inline through `extensionFactories`; see [SDK extensions](/sdk/reference#extensions).
11
+ ## Choose the right approach
15
12
 
16
- ## Where to go next
17
-
18
- Start with the quick reference below, then use the focused guides for your scenario:
19
-
20
- - [Override a built-in provider](/custom-provider/override): change `baseUrl` or headers for a built-in provider while keeping its models.
21
- - [Register a custom provider](/custom-provider/registration): add static or dynamically discovered models, choose a streaming API, set up [multi-account aliases](/custom-provider/registration#multiple-accounts-for-one-provider), or unregister providers.
22
- - [Add OAuth login to a provider](/custom-provider/oauth): implement login callbacks, credential storage, rejected-login handling, and dynamic catalog refresh.
23
- - [Implement provider streaming](/custom-provider/streaming): build a custom `streamSimple` handler with stream events, tool calls, stop reasons, and cost calculation.
24
- - [Custom provider API reference](/custom-provider/api-reference): TypeScript interfaces for `ProviderConfig`, `ProviderModelConfig`, `ProviderCompactorModelConfig`, `ProviderAliasConfig`, `RefreshModelsContext`, and native `Provider` registrations.
25
-
26
- ## Example extensions
27
-
28
- See these complete provider examples in the repository:
29
-
30
- - [`examples/extensions/custom-provider-anthropic/`](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/custom-provider-anthropic)
31
- - [`examples/extensions/custom-provider-gitlab-duo/`](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/custom-provider-gitlab-duo)
13
+ | What you want | Use this |
14
+ | --- | --- |
15
+ | Add a local server, proxy, or custom model on a supported API without writing TypeScript | [Configure custom models](/models) (`models.json`) |
16
+ | Route a built-in provider through a proxy or attach dynamic headers while keeping its models | [Override a built-in provider](/custom-provider/override) |
17
+ | Register static or dynamically discovered models, or add multi-account aliases | [Register a custom provider](/custom-provider/registration) |
18
+ | Add interactive OAuth or SSO login and dynamic catalog refresh | [Add OAuth login to a provider](/custom-provider/oauth) |
19
+ | Connect a non-standard chat streaming protocol | [Implement provider streaming](/custom-provider/streaming) |
20
+ | Control auth, credential-scoped filtering, and persisted catalog state directly | [Native `Provider` registration](/custom-provider/api-reference#native-provider-registration) |
21
+
22
+ ## Guides and reference
23
+
24
+ <Columns cols={2}>
25
+ <Card title="Override a built-in provider" href="/custom-provider/override">
26
+ Change `baseUrl` or headers for a built-in provider while keeping its existing models and login.
27
+ </Card>
28
+ <Card title="Register a custom provider" href="/custom-provider/registration">
29
+ Register static or dynamically discovered models, choose a built-in API, add account aliases, or unregister a provider.
30
+ </Card>
31
+ <Card title="Add OAuth login" href="/custom-provider/oauth">
32
+ Integrate browser, device-code, or manual-code login with `/login`, handle token refresh, and refresh catalogs.
33
+ </Card>
34
+ <Card title="Implement streaming" href="/custom-provider/streaming">
35
+ Build a custom `streamSimple` handler with stream events, tool calls, stop reasons, and usage cost calculation.
36
+ </Card>
37
+ <Card title="Custom provider API reference" href="/custom-provider/api-reference">
38
+ Package imports and TypeScript interfaces for `ProviderConfig`, `ProviderModelConfig`, OAuth callbacks, and native `Provider`.
39
+ </Card>
40
+ </Columns>
32
41
 
33
42
  ## Quick reference
34
43
 
44
+ Register providers inside an `async` extension factory so Atomic waits for registration and model discovery before startup finishes:
45
+
35
46
  ```typescript
36
47
  import type { ExtensionAPI } from "@bastani/atomic";
37
48
 
38
49
  export default async function (atomic: ExtensionAPI) {
39
- // Override baseUrl for an existing provider
50
+ // Override baseUrl for an existing built-in provider
40
51
  await atomic.registerProvider("anthropic", {
41
- baseUrl: "https://proxy.example.com"
52
+ baseUrl: "https://proxy.example.com",
42
53
  });
43
54
 
44
- // Register a new provider with models
55
+ // Register a new provider with a chat model
45
56
  await atomic.registerProvider("my-provider", {
46
57
  name: "My Provider",
47
- baseUrl: "https://api.example.com",
58
+ baseUrl: "https://api.example.com/v1",
48
59
  apiKey: "$MY_API_KEY",
49
60
  api: "openai-completions",
50
61
  models: [
@@ -55,25 +66,39 @@ export default async function (atomic: ExtensionAPI) {
55
66
  input: ["text", "image"],
56
67
  cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
57
68
  contextWindow: 128000,
58
- maxTokens: 4096
59
- }
60
- ]
69
+ maxTokens: 4096,
70
+ },
71
+ ],
61
72
  });
62
73
  }
63
74
  ```
64
75
 
65
76
  ### Registration and merge rules
66
77
 
67
- - **Await registration inside the extension factory.** For dynamic model discovery, fetch and register models inside the async extension factory rather than `session_start`. Atomic waits for the factory before startup completes, making the provider available at interactive startup and in `atomic --list-models`.
68
- - **Two `registerProvider` overloads.** Pass `(id, config)` for config-object registration, or pass a native `Provider` instance from `@bastani/atomic-ai` (`await atomic.registerProvider(provider)`) for full control over auth, filtering, and catalog persistence. See [Custom provider API reference](/custom-provider/api-reference).
69
- - **Repeated registrations merge defined fields.** Calling `atomic.registerProvider(id, config)` again for the same `id` merges defined fields over the previous registration while keeping `undefined` fields intact, except when registering or replacing an alias (`aliasOf`), which resets the previous registration.
70
- - **Interaction with `models.json` and credentials.** Extension `headers` merge over `models.json` `headers` (extension values win on key collision). `models.json` `modelOverrides` still apply on top of extension-registered chat and compactor models. See [Credential resolution order](/providers/reference#resolution-order) for how extension `apiKey` interacts with `auth.json` and environment variables.
71
- - **Partial vs full model registration.** Passing only `baseUrl` or `headers` for an existing provider keeps its built-in models. Supplying `models` replaces that provider's models across chat, image, classifier, and compactor operations.
72
- - **Required fields.** When defining `models`, `baseUrl` is required at provider or model level (unless overriding a built-in provider that already has one), and `api` is required at model level (or provider level for chat and compactor models) unless overriding a built-in provider that supplies defaults. When supplying `streamSimple`, `api` is required at provider level. Every model requires `id`, `name`, `input`, and `cost`; chat and classifier models require `contextWindow`; chat models also require `maxTokens` and `reasoning`; image models require `output`; compactor models (`type: "compactor"`, `ProviderCompactorModelConfig`) accept optional `endpointPath`, `compactionParams`, `timeoutMs`, and `maxTokens` (see [Compactor request contract](/compaction/reference#compactor-request-contract)).
78
+ - **Await registration in the extension factory.** Fetch and register dynamic models inside the `async` factory rather than `session_start` so the provider is available immediately at startup and in `atomic --list-models`.
79
+ - **Two `registerProvider` overloads.** Pass `(id, config)` for config-object registration, or pass a native `Provider` instance from `@bastani/atomic-ai` (`await atomic.registerProvider(provider)`) for full control over authentication, model filtering, and persisted catalogs.
80
+ - **Repeated registrations merge defined fields.** Calling `registerProvider(id, config)` again for the same `id` merges defined fields over the previous registration while leaving `undefined` fields untouched. Setting or replacing `aliasOf` resets the previous registration instead.
81
+ - **Interaction with `models.json` and credentials.** Extension `headers` merge over `models.json` `headers` (extension values win on key collision), and `models.json` `modelOverrides` still apply on top of extension-registered chat and compactor models. See [Credential resolution order](/providers/reference#resolution-order).
82
+ - **Partial override vs. full model replacement.** Passing only `baseUrl` or `headers` for an existing provider preserves its built-in models. Supplying `models` replaces that provider's models across chat, image, classifier, and compactor operations.
83
+
84
+ ### Required model fields
85
+
86
+ Every entry in `models` requires `id`, `name`, `input`, and `cost`. Additional requirements depend on `type`:
87
+
88
+ | Model type | Required fields | Optional and handler fields |
89
+ | --- | --- | --- |
90
+ | Chat (`type: "chat"` or omitted) | `contextWindow`, `maxTokens`, `reasoning` | `api`, `baseUrl`, `thinkingLevelMap`, `promptCache`, `inputLimits`, `samplingParams`, `samplingParamsByThinkingLevel`, `headers`, `compat` |
91
+ | Image (`type: "image"`) | `api`, `output` | `baseUrl`, `capabilities`, `inputLimits`, `headers`; requires a matching handler in `images[api]` |
92
+ | Classifier (`type: "classifier"`) | `api`, `contextWindow` | `baseUrl`, `inputLimits`, `headers`, `compat`; requires a matching handler in `classifiers[api]` |
93
+ | Compactor (`type: "compactor"`) | `api` (at model or provider level) | `baseUrl`, `endpointPath`, `compactionParams`, `timeoutMs`, `maxTokens`, `inputLimits`, `headers` ([Compactor request contract](/compaction/reference#compactor-request-contract)) |
94
+
95
+ <Note>
96
+ When defining `models`, set `baseUrl` at the provider or model level unless overriding a built-in provider that already has one. Set `api` at the model level (or provider level for chat and compactor models) unless overriding a built-in provider that supplies defaults. When supplying a custom `streamSimple`, `api` is required at the provider level.
97
+ </Note>
73
98
 
74
99
  ### Mixed-operation providers
75
100
 
76
- An omitted `type` defaults to `"chat"`. Image and classifier entries require explicit `type` discriminants and matching handlers in `images` or `classifiers` keyed by each model's `api`. Compactor entries use `type: "compactor"` and follow the HTTP [compactor request contract](/compaction/reference#compactor-request-contract):
101
+ An omitted `type` defaults to `"chat"`. Image and classifier entries require explicit `type` values and matching handlers in `images` or `classifiers` keyed by each model's `api`. Compactor entries use `type: "compactor"` and follow the HTTP [compactor request contract](/compaction/reference#compactor-request-contract):
77
102
 
78
103
  ```typescript
79
104
  await atomic.registerProvider("media-tools", {
@@ -111,20 +136,28 @@ await atomic.registerProvider("media-tools", {
111
136
 
112
137
  Model-level `baseUrl` overrides the provider endpoint. Equal model IDs across different operations (chat, image, classifier, compactor) stay distinct, including model-specific headers.
113
138
 
114
- ## Testing your implementation
139
+ ## Verify your implementation
115
140
 
116
- Verify your provider and model pairs against these scenarios (filenames are suggested test names):
141
+ Test each provider and model pair against these scenarios before shipping:
117
142
 
118
- | Test | Purpose |
143
+ | Scenario | What to verify |
119
144
  | --- | --- |
120
- | `stream.test.ts` | Basic streaming and text output |
121
- | `tokens.test.ts` | Token counting and usage reporting |
122
- | `abort.test.ts` | `AbortSignal` cancellation handling |
123
- | `empty.test.ts` | Empty and minimal responses |
124
- | `context-overflow.test.ts` | Context window limit errors |
125
- | `image-limits.test.ts` | Image input handling and limits |
126
- | `unicode-surrogate.test.ts` | Unicode edge cases |
127
- | `tool-call-without-result.test.ts` | Tool call edge cases |
128
- | `image-tool-result.test.ts` | Images returned in tool results |
129
- | `total-tokens.test.ts` | Total token calculation |
130
- | `cross-provider-handoff.test.ts` | Conversation handoff across providers |
145
+ | Basic streaming | Text chunks stream incrementally and finalize with `stopReason: "stop"` |
146
+ | Token usage reporting | `usage.input`, `usage.output`, `cacheRead`, `cacheWrite`, and `cost` populate accurately |
147
+ | Total token calculation | `usage.totalTokens` matches the sum of billed token buckets and updates cost tiers |
148
+ | Cancellation | Aborting `options.signal` stops the upstream request and emits `stopReason: "aborted"` |
149
+ | Empty and minimal responses | Short replies and empty streams settle cleanly without hanging or misreporting `"stop"` |
150
+ | Context overflow | Context-window limit errors surface as error events so Atomic can compact and retry |
151
+ | Image inputs and limits | Image attachments serialize cleanly and respect `inputLimits` resizing constraints |
152
+ | Unicode surrogate pairs | Multi-byte UTF-8 characters and surrogate pairs survive chunk boundaries intact |
153
+ | Tool calls without results | Incomplete or interrupted tool-call turns serialize without upstream 400 errors |
154
+ | Images in tool results | Image blocks returned inside tool results reach the model cleanly |
155
+ | Cross-provider handoff | Conversations started on another provider continue cleanly when switched to yours |
156
+
157
+ ## Example extensions
158
+
159
+ Complete working examples are available in the Atomic repository:
160
+
161
+ - [Anthropic custom provider](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/custom-provider-anthropic)
162
+ - [GitLab Duo custom provider](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/custom-provider-gitlab-duo)
163
+ - [Multi-account provider aliases](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/provider-accounts.ts)
@@ -4,7 +4,7 @@ sidebarTitle: "Diagnostics"
4
4
  description: "Enable debug logs, capture UI snapshots, profile event-loop stalls, and collect diagnostics for bug reports."
5
5
  ---
6
6
 
7
- Use these tools to inspect failures, diagnose slow startup or UI stalls, and gather bug-report diagnostics. To build extensions, custom providers, or SDK integrations, start with [Build with Atomic](/build). To install the CLI, see [Installation](/getting-started/installation).
7
+ Use these tools to inspect failures, diagnose slow startup or UI stalls, and collect bug-report diagnostics. To build extensions, custom providers, or SDK integrations, start with [Build with Atomic](/build). To install the CLI, see [Installation](/getting-started/installation).
8
8
 
9
9
  <Note>
10
10
  Building Atomic from source or contributing to the repository? See [DEV_SETUP.md](https://github.com/bastani-inc/atomic/blob/main/DEV_SETUP.md) and [CONTRIBUTING.md](https://github.com/bastani-inc/atomic/blob/main/CONTRIBUTING.md).
@@ -12,9 +12,11 @@ Building Atomic from source or contributing to the repository? See [DEV_SETUP.md
12
12
 
13
13
  ## Debugging
14
14
 
15
- Enable debug mode from **Debug mode** in `/settings` (the global [`debug` setting](/settings#debug-mode)), by passing `--debug`, by setting `ATOMIC_DEBUG=1` (legacy `PI_DEBUG=1`; see [Environment variables](/environment-variables#diagnostics-and-performance)), or over RPC with [`set_debug`](/rpc/protocol#set_debug) (`{"type": "set_debug", "enabled": true}`, which leaves saved settings unchanged). The footer displays a `debug` badge while debug mode is active.
15
+ Enable debug mode from **Debug mode** in `/settings` (the global [`debug` setting](/settings#debug-mode)), by passing `--debug`, by setting `ATOMIC_DEBUG=1` (legacy `PI_DEBUG=1`; see [Environment variables](/environment-variables#diagnostics-and-performance)), or over RPC with [`set_debug`](/rpc/protocol#set_debug) (`{"type": "set_debug", "enabled": true}`, which leaves saved settings unchanged). The footer shows a `debug` badge while debug mode is active.
16
16
 
17
- Only the exact value `"1"` enables debug mode via environment variable (`true` and `yes` are ignored). If `"debug": true` is saved in `~/.atomic/agent/settings.json`, setting `ATOMIC_DEBUG=0` does not turn debug mode off for that run; toggle **Debug mode** in `/settings` or edit `settings.json` instead.
17
+ <Note>
18
+ Only the exact value `"1"` enables debug mode through the environment variable (`true` and `yes` are ignored). If `"debug": true` is saved in `~/.atomic/agent/settings.json`, setting `ATOMIC_DEBUG=0` does not turn debug mode off for that run; toggle **Debug mode** in `/settings` or edit `settings.json` instead.
19
+ </Note>
18
20
 
19
21
  When debug mode is active, Atomic appends one JSON line per event to `~/.atomic/agent/atomic-debug.log` in the form `{"at", "pid", "area", "event", "data"}`:
20
22
 
@@ -24,23 +26,25 @@ When debug mode is active, Atomic appends one JSON line per event to `~/.atomic/
24
26
  | `engine` | Background session recovery events and late tool results dropped after the conversation moved past them (`stale-detached-call`). |
25
27
  | `storage` | Storage fallback and diagnostic events across SQLite [writer queues](/storage), worktree snapshot pools (locks, leases, evictions, seeds, refs), lock releases, compaction backups, resume checkouts and timings, startup progress, and migrations. Writer-queue degradation records its code, reason, adapter, path, and error code; other storage fallback events include redacted error messages and causes. |
26
28
 
27
- Debug mode logs record IDs, names, counts, and status details, never prompts or conversation text. Common credential formats are replaced with `[redacted]`: bearer tokens, JWTs, GitHub tokens, private key blocks, `sk-...` API keys, credentials embedded in URLs (`https://user:pass@host`), and `key: value` or `key=value` pairs whose name contains a key, token, secret, or password. Other secret formats can pass through, so review the log before sharing it. Individual text fields truncate at 2,000 characters.
29
+ Debug mode logs record IDs, names, counts, and status details—never prompts or conversation text. Common credential formats (bearer tokens, JWTs, GitHub tokens, private key blocks, `sk-...` API keys, URL credentials, and key/token/secret/password pairs) are replaced with `[redacted]`, and individual text fields truncate at 2,000 characters. Review the log before sharing it because unusual secret formats can still pass through.
28
30
 
29
- The Intercom broker and other child processes started while debug mode is on inherit it, and subagents follow it right away. Processes already running keep the setting they started with until they restart. If the debug log cannot be written, Atomic prints one warning and keeps running.
31
+ The Intercom broker and other child processes started while debug mode is on inherit it, and subagents follow it right away. Already-running processes keep the setting they started with until restart. If the debug log cannot be written, Atomic prints one warning and continues.
30
32
 
31
33
  Extensions and SDK programs can read debug state and append records with the [debug output API](/sdk/reference#debug-output).
32
34
 
33
35
  ### Capture a UI and message snapshot (`/debug`)
34
36
 
35
- Run `/debug` (a hidden slash command) or press `Shift+Ctrl+D` anywhere in the TUI (regardless of which element has focus) to append a diagnostic snapshot to `~/.atomic/agent/atomic-debug.log`.
37
+ Run `/debug` (an unlisted slash command) or press `Shift+Ctrl+D` anywhere in the TUI (regardless of which element has focus) to append a plain-text diagnostic snapshot to `~/.atomic/agent/atomic-debug.log`.
36
38
 
37
- Each snapshot appends plain text containing:
39
+ Each snapshot records:
38
40
 
39
41
  - Timestamp, terminal dimensions (`columns x rows`), and total rendered line count
40
42
  - Every rendered TUI line, JSON-escaped with ANSI codes and visible widths
41
43
  - **All messages in the current session context** as JSONL, **completely unredacted**
42
44
 
43
- Because `/debug` writes your full session messages with no credential redaction and appends plain text into the same `atomic-debug.log` file where debug mode appends JSONL, delete `atomic-debug.log` before reproducing an issue (Atomic never trims or rotates it) and review and redact the file before sharing.
45
+ <Warning>
46
+ `/debug` and `Shift+Ctrl+D` write all messages in the current session context **completely unredacted**—including prompts, file contents, tool outputs, and any credentials in your conversation—into the same `~/.atomic/agent/atomic-debug.log` file used by debug mode. Atomic never trims or rotates this file. Delete `atomic-debug.log` before reproducing an issue, and review and redact it before sharing.
47
+ </Warning>
44
48
 
45
49
  ## Finding what freezes the UI
46
50
 
@@ -52,7 +56,7 @@ ATOMIC_EVENT_LOOP_BLOCK_MS=100 atomic
52
56
 
53
57
  `ATOMIC_EVENT_LOOP_BLOCK_MS` must be a positive whole number (`1` or greater); `"0"`, negative numbers, decimals, and non-numeric values are ignored and no monitor starts.
54
58
 
55
- Interactive sessions log both the terminal UI process (`role: "host"`) and the background session worker (`role: "engine"`) to `~/.atomic/agent/event-loop-blocks.jsonl`. Single-process runs write only `role: "host"`. Override the log file path with `ATOMIC_EVENT_LOOP_BLOCK_LOG` (relative paths resolve from the startup working directory). If the file cannot be written at startup, Atomic prints one warning and skips monitoring.
59
+ Interactive sessions log both the terminal UI process (`role: "host"`) and the background session worker (`role: "engine"`) to `~/.atomic/agent/event-loop-blocks.jsonl`. Single-process runs write only `role: "host"`. Override the path with `ATOMIC_EVENT_LOOP_BLOCK_LOG` (relative paths resolve from the startup working directory). If the file cannot be written at startup, Atomic prints one warning and skips monitoring.
56
60
 
57
61
  | `type` | Written | Fields |
58
62
  | --- | --- | --- |
@@ -60,11 +64,9 @@ Interactive sessions log both the terminal UI process (`role: "host"`) and the b
60
64
  | `block` | After each stall at or above `thresholdMs` | `at` (when the event loop was due to respond), `role`, `pid`, `durationMs`, `thresholdMs`, `samples`, `hotFrames` (up to 10 most specific functions first), and `stacks` (up to 3 most common stacks, trimmed to the first 12 and last 12 frames) |
61
65
  | `delay` | When ready for input (`startup`), when starting to quit (`session`), and on exit (`shutdown`) | `at`, `role`, `pid`, `phase` (`"startup"`, `"session"`, or `"shutdown"`), `durationMs`, `ticks`, `p50Ms`, `p99Ms`, and `maxMs` |
62
66
 
63
- Quit Atomic cleanly, close the terminal or console window, or sign out of Windows so the final `shutdown` delay summary flushes to disk.
64
-
65
- Block records contain function names and source paths, never prompts or message text. Atomic never trims `event-loop-blocks.jsonl`, so delete it before reproducing a new issue.
67
+ Quit Atomic cleanly, close the terminal or console window, or sign out of Windows so the final `shutdown` delay summary flushes to disk. Block records contain function names and source paths—never prompts or message text. Atomic never trims `event-loop-blocks.jsonl`, so delete it before reproducing a new issue.
66
68
 
67
- The monitor checks the event loop every 20 ms, tracks delay histograms at 10 ms resolution, and samples the CPU every 2 ms using a sampling profiler rather than debugger pauses. A `debugger;` statement does not pause Atomic just because monitoring is active, and an attached debugger keeps control of its own breakpoints. Completed 5-second profile windows stay available until overlapping stalls are recorded, and functions sharing a name are tracked separately by source location.
69
+ The monitor checks the event loop every 20 ms, tracks delay histograms at 10 ms resolution, and samples CPU stacks every 2 ms using a sampling profiler rather than debugger pauses. A `debugger;` statement does not pause Atomic just because monitoring is active, and an attached debugger keeps control of its own breakpoints.
68
70
 
69
71
  Because CPU sampling adds some overhead, pass `ATOMIC_EVENT_LOOP_BLOCK_STACKS=0` (must be exact `"0"`; `"false"` leaves stacks enabled) when measuring raw latency:
70
72
 
@@ -76,38 +78,44 @@ In delay-only mode, `start` records report `stacks: "disabled"` and `block` reco
76
78
 
77
79
  ## Terminal rendering diagnostics
78
80
 
79
- Capture raw TUI output and redraw logs with three environment variables (legacy `PI_*` aliases work when the `ATOMIC_*` variable is unset; see [TUI debug logging](/tui/reference#debug-logging) and [Environment variables](/environment-variables#diagnostics-and-performance)):
81
+ Capture raw terminal output and main-screen redraw logs with three environment variables (legacy `PI_*` aliases work when the `ATOMIC_*` variable is unset; see [TUI debug logging](/tui/reference#debug-logging) and [Environment variables](/environment-variables#diagnostics-and-performance)):
80
82
 
81
- - **`ATOMIC_TUI_WRITE_LOG`** writes the raw ANSI stdout stream to a file path, or to one `tui-<timestamp>-<pid>.log` file per process inside a directory path.
82
- - **`ATOMIC_TUI_DEBUG=1`** writes main-screen render snapshots to `/tmp/tui/render-<timestamp>-<random>.log`.
83
- - **`ATOMIC_TUI_DEBUG_REDRAW=1`** logs full-redraw triggers to `pi-tui-debug.log` in the TUI log directory.
83
+ | Variable | Output location | Scope |
84
+ | --- | --- | --- |
85
+ | `ATOMIC_TUI_WRITE_LOG` | File path, or `tui-<timestamp>-<pid>.log` inside a directory path | Raw ANSI stdout stream in both fullscreen and main-screen modes |
86
+ | `ATOMIC_TUI_DEBUG=1` | `/tmp/tui/render-<timestamp>-<random>.log` | Main-screen render snapshots (`TuiMainScreen` only, not fullscreen) |
87
+ | `ATOMIC_TUI_DEBUG_REDRAW=1` | `~/.atomic/agent/pi-tui-debug.log` (or `<agentDir>/pi-tui-debug.log`) | Main-screen full-redraw triggers (`TuiMainScreen` only; the `pi-` filename prefix is intentional) |
84
88
 
85
89
  ```bash
86
90
  ATOMIC_TUI_WRITE_LOG=/tmp/tui-ansi.log atomic
87
91
  ```
88
92
 
89
- Review captured terminal logs for sensitive content before sharing them.
93
+ <Warning>
94
+ Terminal output logs contain everything painted to your screen, including prompts, code, and tool outputs. Review and redact captured terminal logs before sharing them.
95
+ </Warning>
90
96
 
91
97
  ## Subsystem status and native troubleshooting
92
98
 
93
- Check subsystem health and logs before collecting full traces:
99
+ Check subsystem health before collecting full traces:
94
100
 
95
- - **`atomic storage status`** verifies active storage selection, adapter loading, database connectivity, and peer brokers ([Checking the selected storage](/storage#checking-the-selected-storage)).
96
- - **`atomic intercom status`** inspects the local Intercom broker; broker logs live at `~/.atomic/agent/intercom/broker.log` and `broker-watchdog.log` ([Intercom operations](/intercom/operations#local-files-logs-and-locks)).
97
- - **`atomic mcp list`** validates MCP configuration and tests enabled server connections ([MCP servers](/mcp-servers#shell-commands)).
98
- - **`/tools`** lists active and inactive tools plus which `git` binary Atomic selected ([Tools](/tools)).
99
- - **`/session snapshot`** shows [worktree snapshots](/worktree-snapshots) and the `Last resume` timing breakdown ([Inspecting snapshots](/worktree-snapshots#inspecting-snapshots)).
101
+ | Check | What it verifies |
102
+ | --- | --- |
103
+ | `atomic storage status` | Active storage selection, adapter loading, database connectivity, and peer brokers ([Checking the selected storage](/storage#checking-the-selected-storage)) |
104
+ | `atomic intercom status` | Local Intercom broker state; broker logs live at `~/.atomic/agent/intercom/broker.log` and `broker-watchdog.log` ([Intercom operations](/intercom/operations#local-files-logs-and-locks)) |
105
+ | `atomic mcp list` | MCP configuration and enabled server connections ([MCP servers](/mcp-servers#shell-commands)) |
106
+ | `/tools` | Active and inactive tools plus which `git` binary Atomic selected ([Tools](/tools)) |
107
+ | `/session snapshot` | [Worktree snapshots](/worktree-snapshots) and the `Last resume` timing breakdown ([Inspecting snapshots](/worktree-snapshots#inspecting-snapshots)) |
100
108
 
101
- For process-spawning or native-addon errors:
109
+ For process-spawning or native-module errors:
102
110
 
103
111
  - Set `ATOMIC_HOST_SPAWN=child-process` to launch helper processes (Git snapshots, `rg`, `fd`, worktree setup, and standalone shell commands) through standard Node child spawning instead of Atomic's native spawner ([Environment variables](/environment-variables#diagnostics-and-performance)).
104
- - If startup fails with `NativeModuleUnavailableError`, check [Package manager troubleshooting](/getting-started/installation#package-manager-troubleshooting) or point `NAPI_RS_NATIVE_LIBRARY_PATH` at a locally built `.node` binary (which bypasses Atomic's exact release version check).
112
+ - If startup fails because the native module cannot load, check [Package manager troubleshooting](/getting-started/installation#package-manager-troubleshooting) or point `NAPI_RS_NATIVE_LIBRARY_PATH` at a locally built `.node` binary (which bypasses Atomic's exact release version check).
105
113
 
106
114
  ## Document conversion diagnostics
107
115
 
108
- Diagnostics from document conversion (`.pdf`, `.doc`, `.docx`, `.ppt`, `.pptx`, `.xls`, `.xlsx`, `.rtf`, and `.epub`) and background session workers appear as status messages in interactive sessions and on stderr or console output in other modes. Conversion failures also include diagnostic details in the tool error result.
116
+ Diagnostics from document conversion (`.pdf`, `.doc`, `.docx`, `.ppt`, `.pptx`, `.xls`, `.xlsx`, `.rtf`, and `.epub`) and background session workers appear as status messages in interactive sessions, on stderr or console output in other modes, and in tool error results when conversion fails.
109
117
 
110
- Long or noisy diagnostics may truncate, and interactive sessions keep only recent messages. Atomic strips ANSI escape codes and control characters so diagnostics render as plain text, and RPC clients receive them separately from JSON responses. Atomic does not write an `atomic-engine-stderr.log` file; copy the displayed diagnostic text and conversion error when reporting a document conversion issue.
118
+ Long or noisy diagnostics may truncate, and interactive sessions retain only recent messages. Atomic strips ANSI escape codes and control characters so diagnostics render as plain text, and RPC clients receive them separately from JSON responses. Copy the displayed diagnostic text and conversion error when reporting a document conversion issue.
111
119
 
112
120
  ## Startup timing and bug reports
113
121
 
@@ -116,7 +124,9 @@ To profile slow startup or session resume (see [Environment variables](/environm
116
124
  - Set `ATOMIC_TIMING=1` (legacy `PI_TIMING=1`) to print startup timings and `atomic --session` resume timings to stderr ([Inspecting snapshots](/worktree-snapshots#inspecting-snapshots)).
117
125
  - Set `ATOMIC_STARTUP_TRACE=/tmp/atomic-startup.jsonl` (legacy `PI_STARTUP_TRACE`) to append JSONL startup milestones with wall-clock timestamps.
118
126
 
119
- To draft a bug report from inside Atomic, run `/skill:feedback <summary>`. It runs a debugger investigation, privacy-scrubs the Markdown draft, and lets you review it before posting to GitHub through your authenticated `gh` CLI ([Bundled skills](/skills#setup-notes-for-specific-bundled-skills)).
127
+ <Tip>
128
+ Inside Atomic, run `/skill:feedback <summary>` to draft a bug report automatically. It investigates the failure, scrubs private details from the Markdown draft, and lets you review it before posting to GitHub through your authenticated `gh` CLI ([Bundled skills](/skills#setup-notes-for-specific-bundled-skills)).
129
+ </Tip>
120
130
 
121
131
  When reporting a bug or startup problem manually, include:
122
132
 
package/docs/docs.json CHANGED
@@ -19,6 +19,7 @@
19
19
  "pages": [
20
20
  "index",
21
21
  "quickstart",
22
+ "how-atomic-works",
22
23
  "getting-started/installation",
23
24
  "getting-started/authentication",
24
25
  "getting-started/first-session",
@@ -35,16 +36,43 @@
35
36
  "sessions",
36
37
  "worktree-snapshots",
37
38
  "guides/resume-on-any-machine",
38
- "compaction"
39
+ {
40
+ "group": "Compaction",
41
+ "pages": [
42
+ "compaction",
43
+ "compaction/memory-compaction",
44
+ "compaction/custom-compactors",
45
+ "compaction/branch-summaries"
46
+ ]
47
+ }
39
48
  ]
40
49
  },
41
50
  {
42
51
  "group": "Delegate and automate",
43
52
  "pages": [
44
- "guides/orchestration",
45
- "guides/subagents",
53
+ {
54
+ "group": "Orchestration",
55
+ "pages": [
56
+ "orchestration",
57
+ "orchestration/patterns",
58
+ "orchestration/migrating-workflows"
59
+ ]
60
+ },
61
+ {
62
+ "group": "Subagents",
63
+ "pages": [
64
+ "subagents",
65
+ "subagents/authoring"
66
+ ]
67
+ },
46
68
  "background-tasks",
47
- "guides/intercom",
69
+ {
70
+ "group": "Intercom",
71
+ "pages": [
72
+ "intercom",
73
+ "intercom/operations"
74
+ ]
75
+ },
48
76
  "guides/team-setup",
49
77
  "computer-use",
50
78
  "verification"
@@ -53,6 +81,7 @@
53
81
  {
54
82
  "group": "Models and providers",
55
83
  "pages": [
84
+ "models/choose-a-model",
56
85
  "providers",
57
86
  "llama-cpp"
58
87
  ]
@@ -69,15 +98,10 @@
69
98
  {
70
99
  "tab": "Build",
71
100
  "groups": [
72
- {
73
- "group": "Overview",
74
- "pages": [
75
- "build"
76
- ]
77
- },
78
101
  {
79
102
  "group": "Customize Atomic",
80
103
  "pages": [
104
+ "build",
81
105
  {
82
106
  "group": "Skills",
83
107
  "pages": [
@@ -96,47 +120,30 @@
96
120
  "extensions/ui",
97
121
  "extensions/examples"
98
122
  ]
99
- }
100
- ]
101
- },
102
- {
103
- "group": "Orchestrate agents",
104
- "pages": [
105
- "orchestration",
106
- "orchestration/patterns",
107
- "orchestration/migrating-workflows",
108
- {
109
- "group": "Subagents",
110
- "pages": [
111
- "subagents",
112
- "subagents/authoring"
113
- ]
114
123
  },
115
124
  {
116
- "group": "Intercom",
125
+ "group": "Packages",
117
126
  "pages": [
118
- "intercom",
119
- "intercom/operations"
127
+ "packages",
128
+ "packages/authoring"
120
129
  ]
121
130
  }
122
131
  ]
123
132
  },
124
- {
125
- "group": "Share packages",
126
- "pages": [
127
- "packages",
128
- "packages/authoring"
129
- ]
130
- },
131
133
  {
132
134
  "group": "Custom models and providers",
133
135
  "pages": [
134
136
  "models",
135
- "custom-provider",
136
- "custom-provider/override",
137
- "custom-provider/registration",
138
- "custom-provider/oauth",
139
- "custom-provider/streaming"
137
+ {
138
+ "group": "Custom providers",
139
+ "pages": [
140
+ "custom-provider",
141
+ "custom-provider/override",
142
+ "custom-provider/registration",
143
+ "custom-provider/oauth",
144
+ "custom-provider/streaming"
145
+ ]
146
+ }
140
147
  ]
141
148
  },
142
149
  {
@@ -152,9 +159,14 @@
152
159
  "sdk/web-server"
153
160
  ]
154
161
  },
155
- "rpc",
156
- "rpc/extension-ui",
157
- "rpc/examples",
162
+ {
163
+ "group": "RPC mode",
164
+ "pages": [
165
+ "rpc",
166
+ "rpc/extension-ui",
167
+ "rpc/examples"
168
+ ]
169
+ },
158
170
  "json",
159
171
  "tui",
160
172
  {
@@ -182,39 +194,37 @@
182
194
  "pages": [
183
195
  "reference",
184
196
  "reference/cli",
197
+ "slash-commands",
185
198
  "settings",
186
199
  "environment-variables",
187
200
  "keybindings",
188
201
  "tools",
189
202
  "codemode",
190
203
  "mcp-servers",
191
- "web-access"
204
+ "web-access",
205
+ "background-tasks/reference"
192
206
  ]
193
207
  },
194
208
  {
195
209
  "group": "Models, sessions, and storage",
196
210
  "pages": [
197
211
  "providers/reference",
198
- "models/reference",
199
- "models-configuration",
212
+ {
213
+ "group": "Models",
214
+ "pages": [
215
+ "models/reference",
216
+ "models-configuration"
217
+ ]
218
+ },
200
219
  "session-format",
201
220
  "compaction/reference",
221
+ "worktree-snapshots/reference",
202
222
  {
203
223
  "group": "Storage",
204
224
  "pages": [
205
225
  "storage",
206
- {
207
- "group": "SQLite",
208
- "pages": [
209
- "storage/sqlite"
210
- ]
211
- },
212
- {
213
- "group": "JSONL",
214
- "pages": [
215
- "storage/jsonl"
216
- ]
217
- },
226
+ "storage/sqlite",
227
+ "storage/jsonl",
218
228
  {
219
229
  "group": "PostgreSQL",
220
230
  "pages": [
@@ -291,6 +301,9 @@
291
301
  "redirects": [
292
302
  { "source": "/workflows", "destination": "/orchestration" },
293
303
  { "source": "/guides/workflows", "destination": "/orchestration" },
304
+ { "source": "/guides/orchestration", "destination": "/orchestration" },
305
+ { "source": "/guides/subagents", "destination": "/subagents" },
306
+ { "source": "/guides/intercom", "destination": "/intercom" },
294
307
  { "source": "/workflows/builtins", "destination": "/orchestration/migrating-workflows" },
295
308
  { "source": "/workflows/authoring", "destination": "/orchestration/migrating-workflows" },
296
309
  { "source": "/workflows/reliable-design", "destination": "/orchestration/patterns" },
@@ -323,19 +336,19 @@
323
336
  },
324
337
  {
325
338
  "source": "/models/artificial-analysis-index",
326
- "destination": "/models"
339
+ "destination": "/models/choose-a-model"
327
340
  },
328
341
  {
329
342
  "source": "/models/pareto-efficiency",
330
- "destination": "/models"
343
+ "destination": "/models/choose-a-model"
331
344
  },
332
345
  {
333
346
  "source": "/models/evals",
334
- "destination": "/models"
347
+ "destination": "/models/choose-a-model"
335
348
  },
336
349
  {
337
350
  "source": "/models/model-selection",
338
- "destination": "/models"
351
+ "destination": "/models/choose-a-model"
339
352
  },
340
353
  { "source": "/postgres", "destination": "/storage/postgres" },
341
354
  { "source": "/postgresql", "destination": "/storage/postgres" },
@@ -345,7 +358,7 @@
345
358
  { "source": "/libraries/storage-libsql", "destination": "/storage#moving-off-libsql" },
346
359
  { "source": "/decisions", "destination": "/sdk/structured-decisions" },
347
360
  { "source": "/structured-decisions", "destination": "/sdk/structured-decisions" },
348
- { "source": "/compactors", "destination": "/compaction#customize-morph-or-add-a-remote-compactor" },
361
+ { "source": "/compactors", "destination": "/compaction/custom-compactors" },
349
362
  { "source": "/blueprints", "destination": "/guides/resume-on-any-machine#set-the-environment-up-with-a-blueprint" }
350
363
  ]
351
364
  }