@bastani/atomic 0.10.9 → 0.10.10-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 (401) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +211 -155
  3. package/dist/_shared/dist-KOELCESV.js +2 -2
  4. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  5. package/dist/_shared/lib-4PES5P4V.js +2 -2
  6. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +27 -12
  7. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  8. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
  9. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  10. package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
  11. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  12. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
  13. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
  14. package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
  15. package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
  16. package/dist/_shared/runtime-O4KCSG4C.js +5 -5
  17. package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
  18. package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
  19. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  20. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  21. package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
  22. package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
  23. package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
  24. package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
  25. package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
  26. package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
  27. package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +145 -58
  28. package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
  29. package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
  30. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
  31. package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
  32. package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
  33. package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
  34. package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
  35. package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
  36. package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
  37. package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
  38. package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
  39. package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
  40. package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
  41. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  42. package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
  43. package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
  44. package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
  45. package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
  46. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  47. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  48. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  49. package/dist/builtin/intercom/README.md +85 -114
  50. package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
  51. package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
  52. package/dist/builtin/intercom/group.ts +7 -3
  53. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  54. package/dist/builtin/intercom/package.json +1 -1
  55. package/dist/builtin/mcp/README.md +37 -27
  56. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  57. package/dist/builtin/mcp/package.json +1 -1
  58. package/dist/builtin/subagents/CHANGELOG.md +8 -0
  59. package/dist/builtin/subagents/README.md +71 -138
  60. package/dist/builtin/subagents/package.json +1 -1
  61. package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
  62. package/dist/builtin/web-access/CHANGELOG.md +9 -0
  63. package/dist/builtin/web-access/README.md +60 -87
  64. package/dist/builtin/web-access/index.bundle.mjs +387 -351
  65. package/dist/builtin/web-access/package.json +1 -1
  66. package/dist/cli/args.js +2 -2
  67. package/dist/cli/auth-cli.code.js +4 -4
  68. package/dist/cli/auth-cli.impl.js +3 -3
  69. package/dist/cli/auth-cli.js +3 -3
  70. package/dist/cli/blueprint-command.code.js +2 -2
  71. package/dist/cli/blueprint-command.impl.js +3 -3
  72. package/dist/cli/blueprint-command.js +3 -3
  73. package/dist/cli/intercom-command.code.js +3 -3
  74. package/dist/cli/intercom-command.impl.js +3 -3
  75. package/dist/cli/intercom-command.js +3 -3
  76. package/dist/cli/list-models.code.js +3 -3
  77. package/dist/cli/list-models.impl.js +3 -3
  78. package/dist/cli/list-models.js +3 -3
  79. package/dist/cli/session-picker.code.js +2 -2
  80. package/dist/cli/session-picker.impl.js +3 -3
  81. package/dist/cli/session-picker.js +3 -3
  82. package/dist/cli/startup-ui.code.js +2 -2
  83. package/dist/cli/startup-ui.impl.js +3 -3
  84. package/dist/cli/startup-ui.js +3 -3
  85. package/dist/cli/storage-command.impl.js +3 -3
  86. package/dist/cli/storage-command.js +3 -3
  87. package/dist/cli/storage-search-session.code.js +2 -2
  88. package/dist/cli/storage-search-session.impl.js +3 -3
  89. package/dist/cli/storage-search-session.js +3 -3
  90. package/dist/cli/team-command.code.js +2 -2
  91. package/dist/cli/team-command.impl.js +3 -3
  92. package/dist/cli/team-command.js +3 -3
  93. package/dist/cli.js +2 -2
  94. package/dist/core/agent-session-methods.d.ts +4 -1
  95. package/dist/core/agent-session-methods.js.map +1 -1
  96. package/dist/core/agent-session.d.ts +3 -0
  97. package/dist/core/compaction/compactor.d.ts +20 -14
  98. package/dist/core/compaction/errors.d.ts +120 -0
  99. package/dist/core/compaction/index.d.ts +1 -0
  100. package/dist/core/compaction/model-resolver.d.ts +2 -2
  101. package/dist/core/debug.impl.js +3 -3
  102. package/dist/core/debug.js +3 -3
  103. package/dist/core/export-html/card-projection.impl.js +3 -3
  104. package/dist/core/export-html/card-projection.js +3 -3
  105. package/dist/core/export-html/index.code.js +2 -2
  106. package/dist/core/export-html/index.impl.js +3 -3
  107. package/dist/core/export-html/index.js +3 -3
  108. package/dist/core/export-html/json-spans.impl.js +3 -3
  109. package/dist/core/export-html/json-spans.js +3 -3
  110. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  111. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  112. package/dist/core/export-html/tool-renderer.code.js +1 -1
  113. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  114. package/dist/core/export-html/tool-renderer.js +3 -3
  115. package/dist/core/extensions/api-types.d.ts +1 -1
  116. package/dist/core/extensions/api-types.js.map +1 -1
  117. package/dist/core/extensions/index.d.ts +1 -1
  118. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  119. package/dist/core/extensions/jiti-loader.js +3 -3
  120. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  121. package/dist/core/extensions/jiti-static-loader.js +3 -3
  122. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  123. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  124. package/dist/core/extensions/loader-host-modules.js +3 -3
  125. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  126. package/dist/core/extensions/provider-types.d.ts +18 -6
  127. package/dist/core/extensions/provider-types.js.map +1 -1
  128. package/dist/core/extensions/runner-context.js +1 -1
  129. package/dist/core/intercom-broker-control-host.code.js +1 -1
  130. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  131. package/dist/core/intercom-broker-control-host.js +3 -3
  132. package/dist/core/intercom-broker-control.code.js +3 -3
  133. package/dist/core/intercom-broker-control.impl.js +3 -3
  134. package/dist/core/intercom-broker-control.js +3 -3
  135. package/dist/core/model-config.d.ts +40 -0
  136. package/dist/core/model-registry.js +1 -1
  137. package/dist/core/model-resolver-scope.d.ts +4 -4
  138. package/dist/core/model-runtime.d.ts +1 -1
  139. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  140. package/dist/core/package-manager-storage-adapters.js +3 -3
  141. package/dist/core/provider-composer-internal.d.ts +11 -2
  142. package/dist/core/sdk.code.js +3 -3
  143. package/dist/core/sdk.impl.js +3 -3
  144. package/dist/core/sdk.js +3 -3
  145. package/dist/core/session-manager-core.js +5 -5
  146. package/dist/core/session-manager-list.impl.js +3 -3
  147. package/dist/core/session-manager-list.js +3 -3
  148. package/dist/core/session-manager.code.js +1 -1
  149. package/dist/core/session-manager.impl.js +3 -3
  150. package/dist/core/session-manager.js +3 -3
  151. package/dist/core/session-storage.impl.js +3 -3
  152. package/dist/core/session-storage.js +3 -3
  153. package/dist/core/settings-manager-basic-accessors.d.ts +6 -2
  154. package/dist/core/storage/index.js +2 -2
  155. package/dist/core/storage/node-sqlite-thread.js +2 -2
  156. package/dist/core/storage/node-sqlite.js +2 -2
  157. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  158. package/dist/core/storage/offline-snapshot-file.js +3 -3
  159. package/dist/core/storage/provider.js +2 -2
  160. package/dist/core/storage/selection.js +2 -2
  161. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  162. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  163. package/dist/core/storage/session/branch-fork-source.js +3 -3
  164. package/dist/core/storage/session/card-view.impl.js +3 -3
  165. package/dist/core/storage/session/card-view.js +3 -3
  166. package/dist/core/storage/session/child-reader.code.js +3 -3
  167. package/dist/core/storage/session/child-reader.impl.js +3 -3
  168. package/dist/core/storage/session/child-reader.js +3 -3
  169. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  170. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  171. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  172. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  173. package/dist/core/storage/session/expanded-child-details.js +3 -3
  174. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  175. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  176. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  177. package/dist/core/storage/session/fork-row-index.js +3 -3
  178. package/dist/core/storage/session/fork-staging.code.js +2 -2
  179. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  180. package/dist/core/storage/session/fork-staging.js +3 -3
  181. package/dist/core/storage/session/fork-window.code.js +3 -3
  182. package/dist/core/storage/session/fork-window.impl.js +3 -3
  183. package/dist/core/storage/session/fork-window.js +3 -3
  184. package/dist/core/storage/session/history-pages.impl.js +3 -3
  185. package/dist/core/storage/session/history-pages.js +3 -3
  186. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  187. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  188. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  189. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  190. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  191. package/dist/core/storage/session/memory-session-store.js +3 -3
  192. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  193. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  194. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  195. package/dist/core/storage/session/released-history-files.code.js +3 -3
  196. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  197. package/dist/core/storage/session/released-history-files.js +3 -3
  198. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  199. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  200. package/dist/core/storage/session/session-resume.impl.js +3 -3
  201. package/dist/core/storage/session/session-resume.js +3 -3
  202. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  203. package/dist/core/storage/session/snapshot-cut.js +3 -3
  204. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  205. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  206. package/dist/core/storage/session/snapshot-history.js +3 -3
  207. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  208. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  209. package/dist/core/storage/session/sql-session-store.js +3 -3
  210. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  211. package/dist/core/storage/session/tree-outline.js +3 -3
  212. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  213. package/dist/core/storage/session/tree-presentation.js +3 -3
  214. package/dist/core/storage/storage-status.impl.js +3 -3
  215. package/dist/core/storage/storage-status.js +3 -3
  216. package/dist/core/storage/team.impl.js +3 -3
  217. package/dist/core/storage/team.js +3 -3
  218. package/dist/core/structured-output/index.code.js +1 -1
  219. package/dist/core/structured-output/index.impl.js +3 -3
  220. package/dist/core/structured-output/index.js +3 -3
  221. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  222. package/dist/core/tasks/task-completion-entry.js +3 -3
  223. package/dist/core/tasks/task-file-history.code.js +3 -3
  224. package/dist/core/tasks/task-file-history.impl.js +3 -3
  225. package/dist/core/tasks/task-file-history.js +3 -3
  226. package/dist/core/tasks/task-reference-archive.code.js +4 -4
  227. package/dist/core/tasks/task-reference-archive.js +3 -3
  228. package/dist/core/tasks/task-reference-identity.code.js +1 -1
  229. package/dist/core/tasks/task-reference-identity.js +3 -3
  230. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  231. package/dist/core/tasks/task-reference-stream.js +3 -3
  232. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  233. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  234. package/dist/core/tasks/task-view-source.impl.js +3 -3
  235. package/dist/core/tasks/task-view-source.js +3 -3
  236. package/dist/core/tools/read-url.code.js +2 -2
  237. package/dist/core/tools/read-url.impl.js +3 -3
  238. package/dist/core/tools/read-url.js +3 -3
  239. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  240. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  241. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  242. package/dist/core/worktree-snapshot/errors.js +3 -3
  243. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  244. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  245. package/dist/extensions/codemode/execute.code.js +1 -1
  246. package/dist/extensions/codemode/execute.impl.js +3 -3
  247. package/dist/extensions/codemode/execute.js +3 -3
  248. package/dist/extensions/codemode/renderer.code.js +2 -2
  249. package/dist/extensions/codemode/renderer.impl.js +3 -3
  250. package/dist/extensions/codemode/renderer.js +3 -3
  251. package/dist/extensions/mcp/cli.code.js +2 -2
  252. package/dist/extensions/mcp/cli.impl.js +3 -3
  253. package/dist/extensions/mcp/cli.js +3 -3
  254. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  255. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  256. package/dist/extensions/mcp/cli.lazy.js +3 -3
  257. package/dist/extensions/mcp/runtime.code.js +1 -1
  258. package/dist/extensions/mcp/runtime.impl.js +3 -3
  259. package/dist/extensions/mcp/runtime.js +3 -3
  260. package/dist/index-extensions.d.ts +1 -1
  261. package/dist/index.d.ts +8 -1
  262. package/dist/index.js +7 -7
  263. package/dist/main-first-time-setup.code.js +2 -2
  264. package/dist/main-first-time-setup.impl.js +3 -3
  265. package/dist/main-first-time-setup.js +3 -3
  266. package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -0
  267. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  268. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  269. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  270. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  271. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  272. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  273. package/dist/modes/interactive/theme/color-utils.d.ts +5 -5
  274. package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
  275. package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
  276. package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
  277. package/dist/modes/print-mode.js +1 -1
  278. package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
  279. package/dist/modes/rpc/rpc-types.d.ts +29 -2
  280. package/dist/package-manager-cli.code.js +5 -5
  281. package/dist/package-manager-cli.impl.js +3 -3
  282. package/dist/package-manager-cli.js +3 -3
  283. package/dist/rpc-entry.js +1 -1
  284. package/dist/startup-files.json +1 -1
  285. package/dist/startup-stages/5.js +1 -1
  286. package/dist/startup-stages/7.js +1 -1
  287. package/dist/startup-stages/8.js +1 -2
  288. package/dist/startup-stages/9.js +2 -1
  289. package/dist/utils/native-module.d.ts +44 -0
  290. package/dist/utils/startup-database-spare.code.js +3 -3
  291. package/dist/utils/startup-database-spare.impl.js +3 -3
  292. package/dist/utils/startup-database-spare.js +3 -3
  293. package/dist/utils/tools-manager.code.js +1 -1
  294. package/dist/utils/tools-manager.impl.js +3 -3
  295. package/dist/utils/tools-manager.js +3 -3
  296. package/docs/background-tasks.md +235 -243
  297. package/docs/build.md +12 -11
  298. package/docs/codemode.md +60 -51
  299. package/docs/compaction/reference.md +61 -24
  300. package/docs/compaction.md +117 -65
  301. package/docs/computer-use.md +179 -146
  302. package/docs/containerization.md +79 -33
  303. package/docs/custom-provider/api-reference.md +148 -11
  304. package/docs/custom-provider/oauth.md +44 -27
  305. package/docs/custom-provider/override.md +14 -7
  306. package/docs/custom-provider/registration.md +75 -65
  307. package/docs/custom-provider/streaming.md +42 -19
  308. package/docs/custom-provider.md +25 -61
  309. package/docs/development.md +47 -43
  310. package/docs/docs.json +33 -33
  311. package/docs/environment-variables.md +83 -57
  312. package/docs/extensions/api-reference.md +323 -734
  313. package/docs/extensions/authoring.md +186 -269
  314. package/docs/extensions/events.md +308 -375
  315. package/docs/extensions/examples.md +122 -74
  316. package/docs/extensions/ui.md +217 -197
  317. package/docs/extensions.md +152 -259
  318. package/docs/getting-started/authentication.md +27 -14
  319. package/docs/getting-started/first-session.md +25 -26
  320. package/docs/getting-started/installation.md +62 -84
  321. package/docs/getting-started/project-instructions.md +39 -14
  322. package/docs/guides/configuration.md +42 -20
  323. package/docs/guides/intercom.md +17 -13
  324. package/docs/guides/non-interactive.md +29 -16
  325. package/docs/guides/orchestration.md +16 -10
  326. package/docs/guides/resume-on-any-machine.md +54 -49
  327. package/docs/guides/subagents.md +22 -14
  328. package/docs/guides/team-setup.md +37 -26
  329. package/docs/guides.md +22 -21
  330. package/docs/herdr.md +21 -16
  331. package/docs/index.md +16 -17
  332. package/docs/intercom/operations.md +68 -66
  333. package/docs/intercom/reference.md +196 -191
  334. package/docs/intercom.md +103 -92
  335. package/docs/json.md +71 -71
  336. package/docs/keybindings.md +63 -50
  337. package/docs/libraries/agent-core.md +49 -8
  338. package/docs/libraries/ai.md +21 -12
  339. package/docs/libraries/codemode.md +28 -6
  340. package/docs/libraries/schema.md +7 -7
  341. package/docs/libraries/telemetry.md +7 -7
  342. package/docs/libraries/tui.md +74 -94
  343. package/docs/libraries.md +5 -5
  344. package/docs/llama-cpp.md +38 -33
  345. package/docs/mcp-servers.md +96 -90
  346. package/docs/models/reference.md +46 -33
  347. package/docs/models-configuration.md +12 -6
  348. package/docs/models.md +93 -88
  349. package/docs/orchestration/migrating-workflows.md +21 -19
  350. package/docs/orchestration/patterns.md +35 -20
  351. package/docs/orchestration.md +22 -21
  352. package/docs/packages/authoring.md +28 -19
  353. package/docs/packages/reference.md +75 -16
  354. package/docs/packages.md +31 -33
  355. package/docs/programmatic.md +22 -21
  356. package/docs/prompt-templates.md +63 -41
  357. package/docs/providers/reference.md +35 -19
  358. package/docs/providers.md +61 -71
  359. package/docs/quickstart.md +32 -46
  360. package/docs/reference/cli.md +249 -252
  361. package/docs/reference.md +23 -20
  362. package/docs/rpc/examples.md +74 -17
  363. package/docs/rpc/extension-ui.md +79 -62
  364. package/docs/rpc/protocol.md +816 -358
  365. package/docs/rpc.md +75 -151
  366. package/docs/sdk/reference.md +175 -45
  367. package/docs/sdk/structured-decisions.md +92 -62
  368. package/docs/sdk/web-server.md +79 -46
  369. package/docs/sdk.md +237 -195
  370. package/docs/security.md +106 -43
  371. package/docs/session-format.md +96 -59
  372. package/docs/sessions.md +149 -113
  373. package/docs/settings.md +289 -204
  374. package/docs/shell-aliases.md +15 -6
  375. package/docs/skills/authoring.md +17 -9
  376. package/docs/skills/reference.md +23 -21
  377. package/docs/skills.md +104 -97
  378. package/docs/storage.md +140 -242
  379. package/docs/subagents/authoring.md +147 -16
  380. package/docs/subagents/reference.md +100 -30
  381. package/docs/subagents.md +220 -252
  382. package/docs/terminal-setup.md +97 -69
  383. package/docs/termux.md +51 -85
  384. package/docs/themes/reference.md +51 -37
  385. package/docs/themes.md +49 -54
  386. package/docs/tmux.md +38 -21
  387. package/docs/tools.md +198 -147
  388. package/docs/tui/reference.md +64 -32
  389. package/docs/tui.md +38 -66
  390. package/docs/usage.md +76 -78
  391. package/docs/verification.md +25 -25
  392. package/docs/web-access.md +72 -55
  393. package/docs/windows.md +53 -58
  394. package/docs/worktree-snapshots.md +62 -65
  395. package/package.json +8 -8
  396. package/schemas/models.schema.json +51 -0
  397. package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
  398. package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
  399. package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
  400. package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
  401. package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
package/docs/rpc.md CHANGED
@@ -1,34 +1,19 @@
1
1
  ---
2
- title: "RPC"
3
- description: "Drive a long-lived Atomic process over stdin/stdout JSONL."
2
+ title: "RPC mode"
3
+ sidebarTitle: "RPC mode"
4
+ description: "Drive a long-lived Atomic process over stdin and stdout using newline-delimited JSON commands and events."
4
5
  ---
5
6
 
6
- # RPC mode
7
+ RPC mode runs Atomic headless over a JSON Lines protocol on stdin and stdout. Use it to integrate Atomic into non-Node languages, editors, IDEs, or custom UIs.
7
8
 
8
- RPC mode runs Atomic headless over a JSON Lines protocol on stdin and stdout. Use it to embed Atomic in other languages, IDEs, or custom UIs.
9
+ If you are building a Node.js or TypeScript application, you can embed `AgentSession` directly with the [TypeScript SDK](/sdk) or use the typed `RpcClient` exported from `@bastani/atomic` (see [RPC client examples](/rpc/examples)). Compare all three programmatic modes on [Programmatic integration](/programmatic).
9
10
 
10
- If you are building a Node.js or TypeScript application, consider using `AgentSession` directly from the [SDK](/sdk) instead of spawning a subprocess. For a typed subprocess client in TypeScript, use `RpcClient` exported from `@bastani/atomic` (see [RPC client examples](/rpc/examples)).
11
+ ## Reference pages
11
12
 
12
- An extension can call `ctx.shutdown()` to close an idle RPC session without another client command. Shutdown waits for any active command response and running turn. A request during extension-started compaction outside a turn is processed after the next command or turn once compaction finishes.
13
-
14
- Closing stdin, `SIGTERM`, and `SIGHUP` each start an orderly shutdown that disposes the active runtime before exiting. Once shutdown starts, a stdin close or single signal does not interrupt cleanup, so closing stdin and sending `SIGTERM` together lets disposal finish.
15
-
16
- A second signal exits immediately (`143` for `SIGTERM`, `129` for `SIGHUP`), and `SIGKILL` always ends the process immediately. Orderly shutdown exits with code `0`; if disposal fails, Atomic writes a [`shutdown_error`](/rpc/protocol#shutdown_error) event and exits with code `1` (or the signal's code when a signal started shutdown).
17
-
18
- [`abort`](/rpc/protocol#abort) holds queued messages, like `Esc` in the TUI, so a client can abort and then close stdin: any queued completion notice is saved for the next session instead of failing disposal.
19
-
20
- `get_entries`, `get_tree`, and `get_fork_messages` keep their existing response shapes (`entries`, `tree`, and `messages`). On a compacted or branched session, `get_entries` and `get_tree` cover the resident window, while `get_fork_messages` still includes prompts from older branches using short picker labels. Use [`get_history_page`](/rpc/protocol#get_history_page) (following `nextCursor`) and `get_history_chunk` to read older entries and oversized items.
21
-
22
- ## Where to go next
23
-
24
- This page starts RPC mode and walks through a minimal Python client. Reference details live on dedicated pages:
25
-
26
- - [RPC protocol](/rpc/protocol): every command, event, type, and error contract.
27
- - [RPC extension UI protocol](/rpc/extension-ui): drive extension-rendered UI and OAuth prompts over RPC.
28
- - [RPC client examples](/rpc/examples): Node.js and `RpcClient` client implementations.
29
- - [Stored session summaries](/rpc/protocol#stored-session-summaries): read session summaries without starting a model turn.
30
-
31
- Compare RPC mode with the SDK and JSON mode on [Programmatic use](/programmatic).
13
+ - [RPC protocol reference](/rpc/protocol): every command, streamed event, error code, and JSON type.
14
+ - [RPC extension UI protocol](/rpc/extension-ui): handle extension dialogs, widgets, questionnaires, and OAuth prompts.
15
+ - [RPC client examples](/rpc/examples): TypeScript `RpcClient` and standalone Node.js examples.
16
+ - [Stored session summaries](/rpc/protocol#stored-session-summaries): inspect saved sessions without starting a model turn.
32
17
 
33
18
  ## Starting RPC mode
34
19
 
@@ -36,163 +21,102 @@ Compare RPC mode with the SDK and JSON mode on [Programmatic use](/programmatic)
36
21
  atomic --mode rpc [options]
37
22
  ```
38
23
 
39
- Common options:
40
- - `--provider <name>`: set the LLM provider (`anthropic`, `openai`, `google`, and others).
41
- - `--model <pattern>`: model pattern or ID (supports `provider/id` and optional `:<thinking>`).
24
+ Common startup options:
25
+
26
+ - `--provider <name>`: select the model provider (`anthropic`, `openai`, `google`, and others).
27
+ - `--model <pattern>`: select a model by `provider/id` or pattern, with optional `:<thinking>` level.
28
+ - `--models <patterns>`: restrict scoped models (comma-separated patterns).
29
+ - `--thinking <level>`: set the initial thinking level.
30
+ - `--session <id>` / `--continue` (`-c`) / `--resume` (`-r`): open or resume a stored session.
42
31
  - `--name <name>` / `-n <name>`: set the session display name at startup.
43
- - `--no-session`: run without a resumable session ([released history may use disk](/sessions)).
32
+ - `--no-session`: run without a resumable session (released idle history may still page to disk; see [Sessions](/sessions)).
44
33
  - `--session-dir <path>`: custom session storage directory.
45
34
  - `--storage '<json>'` / `--storage-file <path>`: select storage for this process's sessions.
35
+ - `--tools <list>` / `--no-tools` / `--exclude-tools <list>`: control which tools are active.
46
36
 
47
- To give an RPC child its own store without changing user settings, start it with `ATOMIC_STORAGE` (or `--storage`) holding the same JSON selection as the `storage` setting (for example, an adapter selection with `secrets` read from `{ "env": ... }`). The child keeps its sessions there and `list_sessions` reports that store, while other `atomic` processes keep using their settings. Invalid selections fail at startup with `StorageConfigError`. See [Selecting storage per process](/storage#selecting-storage-per-process).
37
+ To isolate an RPC subprocess's session store without changing user settings, start it with `ATOMIC_STORAGE` or `--storage` set to the same JSON object as the `storage` setting (for example, an adapter config reading secrets from `{ "env": "..." }`). `list_sessions` reports that store while other `atomic` processes keep their own settings. Invalid storage selections fail at startup with `StorageConfigError`. See [Selecting storage per process](/storage#selecting-storage-per-process).
48
38
 
49
39
  ## Protocol overview
50
40
 
51
- - **Commands**: JSON objects sent to stdin, one per line.
52
- - **Responses**: JSON objects with `type: "response"` indicating command success or failure.
41
+ - **Commands**: JSON objects written to stdin, one per line.
42
+ - **Responses**: JSON objects with `type: "response"` reporting command success or failure.
53
43
  - **Events**: session events streamed to stdout as JSON lines.
54
44
 
55
- Every command accepts an optional `id` field for request/response correlation. When provided, the matching response echoes the same `id`.
45
+ Every command accepts an optional `id` string for request correlation. When you send `id`, the matching response echoes the same `id`.
56
46
 
57
- If a complete saved provider/model default names a provider that stays unsupported after registration, the process stays live and `prompt` returns a correlated error with the configuration diagnostic before emitting any event. Non-prompt commands such as `get_available_models` keep working. Clear this state with a successful explicit `set_model`, or a `cycle_model` that returns a different available model (a `null` or unchanged cycle result does not clear it). Supported providers with an unknown model or missing auth keep normal automatic fallback behavior.
47
+ If a saved default `provider/model` names a provider that remains unsupported after startup, the process stays alive and `prompt` returns a correlated error containing the configuration diagnostic before emitting any event. Non-prompt commands such as `get_available_models` keep working. Clear the error state with a successful explicit `set_model`, or a `cycle_model` that switches to a different available model (an unchanged or `null` cycle does not clear it). Supported providers with an unknown model or missing credentials fall back automatically as usual.
48
+
49
+ On compacted or branched sessions, `get_entries` and `get_tree` return the loaded context window, while `get_fork_messages` still includes prompts from older branches using short picker labels. Use [`get_history_page`](/rpc/protocol#get_history_page) (following `nextCursor`) and `get_history_chunk` to read older entries and oversized items.
58
50
 
59
51
  ### Framing
60
52
 
61
53
  RPC mode uses strict JSONL framing with LF (`\n`) as the only record delimiter.
62
54
 
63
- Atomic imposes no line-size limit on RPC or isolated interactive-engine JSONL records; commands, responses, events, and render frames serialize in full. Clients must account for memory and latency on large records and should not add smaller line caps unless they intend to reject valid output.
55
+ Atomic imposes no line-size cap on RPC JSONL records; commands, responses, and events serialize in full. Account for memory and latency on large tool outputs or images, and do not enforce smaller line limits unless you intend to reject valid output.
64
56
 
65
57
  Client framing rules:
58
+
66
59
  - Split records on `\n` only.
67
- - Accept optional `\r\n` input by stripping a trailing `\r`.
68
- - Avoid generic line readers that split on Unicode line separators.
60
+ - Strip an optional trailing `\r` from `\r\n` lines.
61
+ - Avoid generic line readers that split on Unicode line separators (`U+2028`, `U+2029`) or bare `\r`.
62
+
63
+ Node's `readline` module is not protocol-compliant because it splits on `U+2028` and `U+2029`, which are valid unescaped inside JSON strings. Similarly, Python's `text=True` universal newlines mode splits on bare `\r`; read raw bytes and split on `b"\n"`.
64
+
65
+ ## Shutdown and signals
69
66
 
70
- Node's `readline` module is not protocol-compliant for RPC mode because it splits on `U+2028` and `U+2029`, which are valid unescaped inside JSON strings.
67
+ - Closing stdin, `SIGTERM`, and `SIGHUP` start an orderly shutdown that disposes the active session before exiting. Once shutdown begins, closing stdin or sending a single signal does not interrupt cleanup, so closing stdin and sending `SIGTERM` together still lets disposal finish.
68
+ - Standalone RPC mode does not register `SIGHUP` on Windows, and skips `SIGHUP` on Unix when the process inherits `SIG_IGN` (for example under `nohup`).
69
+ - A second signal exits immediately (`143` for `SIGTERM`, `129` for `SIGHUP`), and `SIGKILL` always terminates immediately. Orderly shutdown exits with code `0`; if disposal fails, Atomic emits a [`shutdown_error`](/rpc/protocol#shutdown_error) event and exits with code `1` (or the signal's exit code when a signal started shutdown).
70
+ - An extension can call `ctx.shutdown()` to end an idle RPC session without another client command. Shutdown waits for any active command response and running turn; a request sent during extension-started compaction outside a turn runs once compaction completes.
71
+ - [`abort`](/rpc/protocol#abort) holds queued messages (like pressing `Esc` in the TUI) so a client can abort and close stdin safely, preserving queued completion notices for the next session instead of failing disposal.
71
72
 
72
- ## Example: basic client (Python)
73
+ ## Example Python client
74
+
75
+ This minimal client reads stdout as binary lines split strictly on `\n`, sends one prompt, prints streamed text deltas, and closes stdin for orderly shutdown:
73
76
 
74
77
  ```python
75
- import subprocess
76
78
  import json
79
+ import subprocess
77
80
 
78
81
  proc = subprocess.Popen(
79
82
  ["atomic", "--mode", "rpc", "--no-session"],
80
83
  stdin=subprocess.PIPE,
81
84
  stdout=subprocess.PIPE,
82
- text=True
83
85
  )
84
86
 
85
- def send(cmd):
86
- proc.stdin.write(json.dumps(cmd) + "\n")
87
+ def send(cmd: dict) -> None:
88
+ assert proc.stdin is not None
89
+ proc.stdin.write((json.dumps(cmd) + "\n").encode("utf-8"))
87
90
  proc.stdin.flush()
88
91
 
89
92
  def read_events():
90
- for line in proc.stdout:
91
- yield json.loads(line)
92
-
93
- # Send prompt
94
- send({"type": "prompt", "message": "Hello!"})
95
-
96
- # Process events
97
- for event in read_events():
98
- if event.get("type") == "message_update":
99
- delta = event.get("assistantMessageEvent", {})
100
- if delta.get("type") == "text_delta":
101
- print(delta["delta"], end="", flush=True)
102
-
103
- if event.get("type") == "agent_end":
104
- print()
105
- break
93
+ assert proc.stdout is not None
94
+ buf = b""
95
+ while True:
96
+ chunk = proc.stdout.read(4096)
97
+ if not chunk:
98
+ if buf:
99
+ yield json.loads(buf.rstrip(b"\r").decode("utf-8"))
100
+ break
101
+ buf += chunk
102
+ while b"\n" in buf:
103
+ raw_line, buf = buf.split(b"\n", 1)
104
+ line = raw_line.rstrip(b"\r")
105
+ if line:
106
+ yield json.loads(line.decode("utf-8"))
107
+
108
+ try:
109
+ send({"type": "prompt", "message": "Hello!"})
110
+ for event in read_events():
111
+ if event.get("type") == "message_update":
112
+ delta = event.get("assistantMessageEvent", {})
113
+ if delta.get("type") == "text_delta":
114
+ print(delta["delta"], end="", flush=True)
115
+ if event.get("type") == "agent_end":
116
+ print()
117
+ break
118
+ finally:
119
+ if proc.stdin:
120
+ proc.stdin.close()
121
+ proc.wait()
106
122
  ```
107
-
108
- ## Moved sections
109
-
110
- <a id="commands" />
111
- <a id="prompting" />
112
- <a id="prompt" />
113
- <a id="steer" />
114
- <a id="follow_up" />
115
- <a id="abort" />
116
- <a id="clear_queue" />
117
- <a id="new_session" />
118
- <a id="state" />
119
- <a id="get_state" />
120
- <a id="get_messages" />
121
- <a id="model" />
122
- <a id="set_model" />
123
- <a id="cycle_model" />
124
- <a id="get_available_models" />
125
- <a id="logout_provider" />
126
- <a id="thinking" />
127
- <a id="set_thinking_level" />
128
- <a id="cycle_thinking_level" />
129
- <a id="get_available_thinking_levels" />
130
- <a id="queue-modes" />
131
- <a id="set_steering_mode" />
132
- <a id="set_follow_up_mode" />
133
- <a id="compaction" />
134
- <a id="compact" />
135
- <a id="set_auto_compaction" />
136
- <a id="retry" />
137
- <a id="set_auto_retry" />
138
- <a id="abort_retry" />
139
- <a id="bash" />
140
- <a id="bash-2" />
141
- <a id="abort_bash" />
142
- <a id="session" />
143
- <a id="get_session_stats" />
144
- <a id="export_html" />
145
- <a id="switch_session" />
146
- <a id="fork" />
147
- <a id="clone" />
148
- <a id="get_fork_messages" />
149
- <a id="get_entries" />
150
- <a id="get_tree" />
151
- <a id="get_last_assistant_text" />
152
- <a id="set_session_name" />
153
- <a id="commands-2" />
154
- <a id="get_commands" />
155
- <a id="events" />
156
- <a id="event-types" />
157
- <a id="agent_start" />
158
- <a id="agent_end" />
159
- <a id="turn_start-/-turn_end" />
160
- <a id="message_start-/-message_end" />
161
- <a id="message_update-streaming" />
162
- <a id="tool_execution_start-/-tool_execution_update-/-tool_execution_end" />
163
- <a id="bash_execution_update" />
164
- <a id="queue_update" />
165
- <a id="compaction_start-/-compaction_end" />
166
- <a id="auto_retry_start-/-auto_retry_end" />
167
- <a id="summarization_retry_scheduled-/-summarization_retry_attempt_start-/-summarization_retry_finished" />
168
- <a id="extension_error" />
169
- <a id="error-handling" />
170
- <a id="types" />
171
- <a id="model-2" />
172
- <a id="usermessage" />
173
- <a id="assistantmessage" />
174
- <a id="toolresultmessage" />
175
- <a id="bashexecutionmessage" />
176
- <a id="attachment" />
177
- <a id="extension-ui-protocol" />
178
- <a id="extension-ui-requests-stdout" />
179
- <a id="select" />
180
- <a id="confirm" />
181
- <a id="input" />
182
- <a id="editor" />
183
- <a id="notify" />
184
- <a id="setstatus" />
185
- <a id="setwidget" />
186
- <a id="settitle" />
187
- <a id="set_editor_text" />
188
- <a id="extension-ui-responses-stdin" />
189
- <a id="value-response-select-input-editor" />
190
- <a id="confirmation-response-confirm" />
191
- <a id="cancellation-response-any-dialog" />
192
- <a id="example-interactive-client-node-js" />
193
-
194
- These reference sections moved to dedicated pages:
195
-
196
- - Commands, events, error handling, and JSON types: [RPC protocol](/rpc/protocol)
197
- - Extension UI requests, OAuth prompts, and responses: [RPC extension UI protocol](/rpc/extension-ui)
198
- - Node.js interactive client and `RpcClient` examples: [RPC client examples](/rpc/examples)