@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,10 +1,10 @@
1
1
  ---
2
2
  title: "Package reference"
3
3
  sidebarTitle: "Packages"
4
- description: "Reference for package resource filtering patterns, glob vs exact matching, autoload overrides, precedence, and deduplication."
4
+ description: "Reference for package resource filtering patterns, glob vs exact matching, autoload overrides, precedence, deduplication, and cache paths."
5
5
  ---
6
6
 
7
- This page is the reference for package filtering, `autoload: false`, precedence, and deduplication. To install and manage packages, see [Install and manage packages](/packages) and [Package CLI commands](/reference/cli#package-commands). To publish a package, see [Create and publish packages](/packages/authoring). For project trust rules, see [Security](/security). To load local packages programmatically in the SDK, use [`DefaultResourceLoader({ additionalExtensionPaths })`](/sdk/reference#extensions).
7
+ Reference for package filtering, `autoload: false`, precedence, deduplication, and temporary cache paths. To install and manage packages, see [Install and manage packages](/packages) and [Package CLI commands](/reference/cli#package-commands). To publish a package, see [Create and publish packages](/packages/authoring).
8
8
 
9
9
  ## Package filtering
10
10
 
@@ -27,7 +27,10 @@ Use the object form in [`settings.json`](/settings) to filter which resources lo
27
27
  }
28
28
  ```
29
29
 
30
- Package filters run on top of the files collected from the package manifest (or convention directories when the package has no `atomic` manifest key). A filter cannot force-include files that the package manifest omitted or excluded.
30
+ How package filters interact with the package manifest:
31
+
32
+ - When the package manifest defines a non-empty array for a resource type, filters run only over the files enabled by that manifest entry and cannot force-include files the manifest excluded.
33
+ - When a package filter object is configured in `settings.json`, any resource type omitted from the package's `atomic` manifest—or set to `[]` under an active filter or `autoload: false`—falls back to scanning the package's convention directories (`extensions/`, `skills/`, `prompts/`, `themes/`).
31
34
 
32
35
  ### Pattern syntax
33
36
 
@@ -35,35 +38,35 @@ Package filters run on top of the files collected from the package manifest (or
35
38
  | --- | --- | --- |
36
39
  | *(key omitted)* | Default | Load all resources of this type exposed by the package |
37
40
  | `[]` | Empty | Load no resources of this type |
38
- | `pattern` (plain) | Glob (`minimatch`) | Restrict to entries matching at least one plain pattern |
39
- | `!pattern` | Glob (`minimatch`) | Exclude matching entries |
41
+ | `pattern` (plain) | Glob | Restrict to entries matching at least one plain pattern (or enable matching items under `autoload: false`) |
42
+ | `!pattern` | Glob | Exclude matching entries |
40
43
  | `+path` / `+name` | Exact match | Force-include an exact relative path, full path, or MCP server name |
41
44
  | `-path` / `-name` | Exact match | Force-exclude an exact relative path, full path, or MCP server name |
42
45
 
43
- ### Glob vs exact matching rules
46
+ ### Glob vs. exact matching rules
44
47
 
45
- - **Glob patterns (plain and `!pattern`)** use `minimatch` (case-sensitive, POSIX `/` separators on all platforms; `*` matches within one path segment, `**` crosses segments, `?` matches one character):
48
+ - **Glob patterns (plain and `!pattern`)** are case-sensitive and always use POSIX `/` separators (`*` matches within one path segment, `**` crosses segments, `?` matches a single character):
46
49
  - For file resources (`extensions`, `skills`, `prompts`, `themes`, `agents`), globs test the relative path from the package root (or settings directory), the bare filename (`basename`), and the full path.
47
- - For `SKILL.md` files, globs also test the skill's parent directory (relative path, directory basename, and full path). Writing `"!my-skill"` excludes `skills/my-skill/SKILL.md`.
50
+ - For `SKILL.md` files, globs also test the skill's parent directory (relative path, directory basename, and full path). `"!my-skill"` excludes `skills/my-skill/SKILL.md`.
48
51
  - For `mcpServers`, globs test the server name from the manifest.
49
52
  - **Exact patterns (`+path` and `-path`)** strip leading `./` or `.\`, expand `~` in top-level settings arrays, and normalize slashes to `/`:
50
- - For file resources, exact patterns match **only** the exact relative path or exact full path, plus the exact parent directory path for `SKILL.md` files (for example `"-skills/my-skill"` excludes `skills/my-skill/SKILL.md`).
51
- - Exact patterns do **not** match bare filenames. Writing `"-legacy.json"` will not exclude `themes/legacy.json`; use `"-themes/legacy.json"` or `"!legacy.json"` instead.
53
+ - For file resources, exact patterns match **only** the exact relative path or exact full path, plus the exact parent directory path for `SKILL.md` files (`"-skills/my-skill"` excludes `skills/my-skill/SKILL.md`).
54
+ - Exact patterns do **not** match bare filenames. `"-legacy.json"` will not exclude `themes/legacy.json`; write `"-themes/legacy.json"` or `"!legacy.json"` instead.
52
55
  - For `mcpServers`, `+name` and `-name` match exact server names.
53
56
 
54
57
  ### Evaluation order
55
58
 
56
59
  In **normal mode** (`autoload` omitted or `true`), operator type decides precedence regardless of array order:
57
60
 
58
- 1. **Plain include globs:** if any plain patterns exist, narrow the set to files matching at least one of them; if none exist, start with every manifest resource.
61
+ 1. **Plain include globs:** if any plain patterns exist, narrow the set to files matching at least one of them; otherwise start with every resource collected from the package.
59
62
  2. **`!pattern` glob excludes:** remove matching entries.
60
- 3. **`+path` / `+name` exact force-includes:** re-add matching manifest entries (overrides plain filters and `!pattern`).
63
+ 3. **`+path` / `+name` exact force-includes:** re-add matching entries (overrides plain filters and `!pattern`).
61
64
  4. **`-path` / `-name` exact force-excludes:** remove matching entries last (`-` always beats `+`).
62
65
 
63
- With **`"autoload": false`**, evaluation switches to **array order (last match wins)**:
66
+ With **`"autoload": false`**, evaluation switches to **array order (last match wins)** across all four forms: plain globs and `+path`/`+name` enable matching items, while `!pattern` and `-path`/`-name` disable them.
64
67
 
65
- - On a **project** entry matching a **global** package, `"autoload": false` starts from the inherited global selection and applies each entry in array order as a delta override without discovering new resources from the package.
66
- - On a **standalone** package (not present in global settings), `"autoload": false` starts empty and loads only resources explicitly enabled by matching entries in array order.
68
+ - On a **project** entry matching a **global** package, `"autoload": false` reuses the user-scoped package installation on disk (without re-installing into `.atomic/npm` or `.atomic/git`), starts from the inherited global selection, and applies each entry in array order as a delta override.
69
+ - On a **standalone** package (not present in global settings), `"autoload": false` starts empty and loads only resources enabled by matching entries in array order.
67
70
 
68
71
  ```json
69
72
  {
@@ -82,17 +85,31 @@ With **`"autoload": false`**, evaluation switches to **array order (last match w
82
85
  Top-level `extensions`, `skills`, `prompts`, and `themes` arrays in `settings.json` mix additive file or directory paths with `!`, `+`, and `-` filter patterns applied to both those paths and auto-discovered resources in the same scope:
83
86
 
84
87
  - Patterns expand `~` to your home directory (for example `"!~/skills/legacy-*"` or `"-~/skills/legacy"`).
85
- - Toggle built-in extensions (`builtin:codemode`, `builtin:tool-search`, `builtin:llama.cpp`) in the top-level `extensions` array with `"-builtin:<name>"` or `"+builtin:<name>"`.
86
- - Package [subagents](/packages/authoring#subagents) have no top-level settings array. Filter them per package with `agents` (matching paths relative to the package root).
87
- - `mcpServers` matches server names from the manifest rather than file paths.
88
+ - Toggle built-in extensions (`builtin:codemode`, `builtin:tool-search`, `builtin:llama.cpp`) in top-level `extensions` with `"-builtin:<name>"` or `"+builtin:<name>"`. Global `extensions` evaluates `builtin:<name>` overrides by operator precedence (`!` < `+` < `-`), whereas project `extensions` evaluates override entries (`!`, `+`, `-`) in array order (last match wins).
89
+ - Package [subagents](/packages/authoring#subagents) have no top-level settings array—filter them per package with `agents`.
90
+ - `mcpServers` filters match server names rather than file paths.
91
+
92
+ <Note>
93
+ Putting a plain glob (containing `*` or `?`, without `!`, `+`, or `-`) in a top-level `extensions`, `skills`, `prompts`, or `themes` array does **not** discover files from disk. It filters only the other plain paths listed in that same array and does not filter auto-discovered directories (auto-discovered directories evaluate `!`, `+`, and `-` overrides only).
94
+ </Note>
88
95
 
89
96
  ## Scope and deduplication
90
97
 
91
- - **Project overrides global.** When the same package appears in both global and project settings, the project entry wins (unless `"autoload": false` is set on the project entry to adjust the inherited global selection).
98
+ - **Project overrides global.** When the same package appears in both global and project settings, the project entry wins (unless `"autoload": false` is set on the project entry to apply delta overrides on top of the inherited global selection).
92
99
  - **Listing packages.** `atomic list` displays `User packages` and `Project packages` separately and marks object-form entries with `(filtered)`.
93
- - **Package identity.** Atomic deduplicates packages by npm package name (`npm`), normalized repository URL without `@ref` (`git`), or resolved canonical path (`local`, so `./pkg` and `/abs/path/to/pkg` match as the same package).
100
+ - **Package identity.** Atomic deduplicates packages by npm package name (`npm`), normalized repository URL without `@ref`/`#ref` (`git`), or resolved canonical path (`local`, so `./pkg` and `/abs/path/to/pkg` match as the same package).
94
101
  - **Subagent collisions.** When multiple packages define the same full subagent name, `-e` packages take precedence over project-installed packages, which take precedence over globally installed packages.
95
102
 
103
+ ### Temporary package cache
104
+
105
+ Remote packages passed with `-e` / `--extension` install into a private user-owned cache directory chosen in this order:
106
+
107
+ 1. `$XDG_RUNTIME_DIR/atomic/extensions`
108
+ 2. `<agentDir>/cache/tmp/extensions`
109
+ 3. `<tmpdir>/atomic-<uid>/extensions`
110
+
111
+ Symlinked, shared, or other-user-owned cache directories are refused. Unpinned npm specs and branch or tag git refs refresh on start and `/reload` (falling back to cached copies when offline or on error); exact `@1.2.3` npm pins and checked-out git commit hashes (7 to 64 hex characters matching `HEAD`) skip network refresh.
112
+
96
113
  ### Resource precedence order
97
114
 
98
115
  When multiple sources declare a skill, prompt template, or theme with the same name, Atomic keeps the first match in this order:
@@ -106,4 +123,8 @@ When multiple sources declare a skill, prompt template, or theme with the same n
106
123
  7. Bundled packages (`@bastani/subagents`, `@bastani/intercom`)
107
124
  8. Explicit CLI flags (`--skill`, `--prompt-template`, `--theme`)
108
125
 
109
- For prompt templates, an inherited legacy `.pi` template yields to a bundled template with the same name. For extensions, `-e` flags load before configured and auto-discovered extensions.
126
+ Special cases:
127
+
128
+ - Because explicit CLI flags (`--skill`, `--prompt-template`, `--theme`) apply last, pass `--no-skills` (`-ns`), `--no-prompt-templates` (`-np`), or `--no-themes` if you want a CLI path to override an existing or bundled resource with the same name.
129
+ - For prompt templates, an inherited legacy `.pi` template yields to a bundled template with the same name.
130
+ - For extensions, `-e` flags load before configured and auto-discovered extensions.
package/docs/packages.md CHANGED
@@ -1,57 +1,77 @@
1
1
  ---
2
2
  title: "Install and manage packages"
3
- sidebarTitle: "Atomic packages"
3
+ sidebarTitle: "Install and manage"
4
4
  description: "Install, update, remove, and configure Atomic packages from npm, git, or local directories."
5
5
  ---
6
6
 
7
- Atomic packages bundle extensions, skills, [subagents](/packages/authoring#subagents), prompt templates, themes, MCP servers, and [storage adapters](/storage/custom-adapters#adapters-from-atomic-packages) for distribution over npm, git, or local paths. Declare resources under the `atomic` key in `package.json`, or use convention directories.
8
-
9
- ## Where to go next
10
-
11
- - [Create and publish packages](/packages/authoring). Configure the package manifest, subagents, MCP servers, storage adapters, directory structure, and dependencies.
12
- - [Package reference](/packages/reference). Review pattern matching, `autoload: false` overrides, resource precedence, and deduplication rules.
7
+ Atomic packages bundle extensions, skills, [subagents](/packages/authoring#subagents), prompt templates, themes, MCP servers, and [storage adapters](/storage/custom-adapters#adapters-from-atomic-packages) for distribution over npm, git, or local directories.
8
+
9
+ <Columns cols={2}>
10
+ <Card title="Create and publish packages" href="/packages/authoring">
11
+ Declare package manifests, subagents, MCP servers, storage adapters, convention directories, and dependencies.
12
+ </Card>
13
+ <Card title="Package reference" href="/packages/reference">
14
+ Look up filter patterns, `autoload: false` overrides, resource precedence, deduplication, and cache paths.
15
+ </Card>
16
+ <Card title="Package CLI commands" href="/reference/cli#package-commands">
17
+ Full reference for `install`, `remove`, `update`, `list`, and `config` flags.
18
+ </Card>
19
+ <Card title="SDK extensions" href="/sdk/reference#extensions">
20
+ Load local packages and extensions programmatically with `DefaultResourceLoader`.
21
+ </Card>
22
+ </Columns>
13
23
 
14
24
  ## Install and manage
15
25
 
16
- > **Security:** Atomic packages run with full system access. Extensions execute arbitrary code and skills instruct the agent. Review source code before installing third-party packages. See [Security](/security) for project trust rules and [Package CLI commands](/reference/cli#package-commands) for the full command list.
26
+ <Warning>
27
+ Atomic packages run with full user permissions—extensions execute arbitrary code and skills instruct the model. Review third-party source code before installing. See [Security](/security) for project trust rules.
28
+ </Warning>
17
29
 
18
30
  ```bash
31
+ # Install globally (default) or into the current project (-l / --local)
19
32
  atomic install npm:@foo/bar@1.0.0
20
33
  atomic install git:github.com/user/repo@v1
21
- atomic install https://github.com/user/repo # Raw URLs work too
22
- atomic install /absolute/path/to/package
34
+ atomic install https://github.com/user/repo # Raw protocol URLs work directly
23
35
  atomic install ./relative/path/to/package
24
- atomic install -l npm:@foo/bar # Install into project settings (--local)
36
+ atomic install -l npm:@foo/bar # Write to .atomic/settings.json
25
37
 
38
+ # Inspect and remove
39
+ atomic list # Show global and project packages
26
40
  atomic remove npm:@foo/bar # Alias: atomic uninstall
27
- atomic list # Show packages configured in settings
28
- atomic update # Update Atomic CLI only
29
- atomic update --all # Update Atomic + packages + reconcile git refs
30
- atomic update --extensions # Update packages + reconcile git refs only
31
- atomic update --models # Force-refresh authenticated model catalogs (15s timeout)
32
- atomic update --self # Update Atomic CLI only (also: atomic update self | atomic)
33
- atomic update --self --force # Reinstall Atomic even if current
34
- atomic update --self --extensions # Same as atomic update --all
41
+
42
+ # Update packages
43
+ atomic update --extensions # Update all packages and reconcile git refs
44
+ atomic update --all # Update Atomic CLI + packages + git refs
35
45
  atomic update npm:@foo/bar # Update one package (or --extension <src>)
46
+ atomic update --models # Refresh authenticated model catalogs (15s timeout)
36
47
  ```
37
48
 
38
- Install, trust, and update behavior:
49
+ <Note>
50
+ Plain `atomic update` (or `atomic update --self`) updates only the Atomic CLI and reminds you to run `atomic update --extensions` for packages. Self-update verifies `atomic --version` on `PATH` and runs `atomic intercom upgrade`; see [Installation](/getting-started/installation) for self-update overrides (`selfUpdateCommand` / `ATOMIC_SELF_UPDATE_COMMAND`) and uninstall steps.
51
+ </Note>
52
+
53
+ ### Scope and project trust
39
54
 
40
- - **Global and project scope.** `install` and `remove` edit `~/.atomic/agent/settings.json` by default ([Settings](/settings)). Pass `-l` or `--local` to write to `.atomic/settings.json` (legacy `.pi/settings.json` is also read). Missing project packages install automatically on startup once you trust the project.
41
- - **Project trust gate.** In an untrusted project, `atomic install -l` and `atomic remove -l` exit with code 1 (`Project is not trusted. Use --approve to modify local package config.`) unless you trust the project first ([Security](/security)) or pass `-a` / `--approve`. Both `-a` / `--approve` and `-na` / `--no-approve` are accepted on `install`, `remove`, `update`, `list`, and `config`.
42
- - **Update output.** Atomic lists each updated npm version or git commit (for example `npm:@foo/bar 1.2.0 -> 1.3.0`), prints `Packages are already up to date` when nothing changed, prints warnings when no package upgraded, and reports skipped updates in offline mode.
43
- - **Offline mode.** Pass `--offline` or set `ATOMIC_OFFLINE=1` to skip automatic startup installs and package updates.
44
- - **Self-update safety.** Atomic installs the exact advertised version (showing any release note first) and only modifies installations managed and writable by the detected global package manager. On Windows, automatic self-update supports `npm` and `pnpm` installs only unless you override the command. Override auto-detection with `selfUpdateCommand` in global `settings.json` or the `ATOMIC_SELF_UPDATE_COMMAND` environment variable; otherwise Atomic prints the manual update command. To uninstall Atomic itself, see [Uninstall](/getting-started/installation#uninstall).
45
- - **Resilience and concurrency.** Startup install failures (such as offline registries) warn with the `atomic remove` command, skip that package's resources, and retry on the next start or `/reload` (`atomic install` and `atomic update --extensions` still exit non-zero). Concurrent installs serialize per package, interrupted git clones re-clone on retry, and `atomic remove` cleans up orphaned package directories.
55
+ - **Global vs. project scope.** `install` and `remove` edit `~/.atomic/agent/settings.json` by default ([Settings](/settings)). Pass `-l` / `--local` to edit `.atomic/settings.json` (legacy `.pi/settings.json` is also read). Missing project packages install automatically on startup once the project is trusted.
56
+ - **Project trust gate.** In an untrusted project, `atomic install -l` and `atomic remove -l` exit with code 1 (`Project is not trusted. Use --approve to modify local package config.`) unless you trust the project first ([Security](/security)) or pass `-a` / `--approve`. Both `-a` / `--approve` and `-na` / `--no-approve` work on `install`, `remove`, `update`, `list`, and `config`.
46
57
 
47
- Try a package for one run with `-e` or `--extension`:
58
+ ### Updating packages and offline mode
59
+
60
+ - **Flag combinations.** `--all`, `--models`, and `--extension` are mutually exclusive and cannot be combined with positional sources; `--extension` may be passed only once.
61
+ - **Output and partial failures.** Atomic reports each updated npm version or git commit (for example `npm:@foo/bar 1.2.0 -> 1.3.0`, tagged `(project)` for project scope) or prints `Packages are already up to date`. When some packages fail during a batch update, Atomic still prints the packages that succeeded before exiting non-zero.
62
+ - **Offline mode.** Pass `--offline` or set `ATOMIC_OFFLINE` to `1`, `true`, or `yes` (case-insensitive; legacy `PI_OFFLINE` is also read) to skip automatic startup installs and package updates.
63
+ - **Startup resilience.** If an automatic startup install fails (for example offline), Atomic warns with the matching `atomic remove` command, skips that package's resources, and retries on the next start or `/reload` (`atomic install` and `atomic update --extensions` still exit non-zero). Concurrent installs serialize per package, interrupted git clones re-clone on retry, and `atomic remove` cleans up orphaned directories.
64
+
65
+ ### Preview a package with `-e`
66
+
67
+ Try a package for a single run without editing `settings.json`:
48
68
 
49
69
  ```bash
50
70
  atomic -e npm:@foo/bar
51
71
  atomic -e git:github.com/user/repo
52
72
  ```
53
73
 
54
- `-e` installs into a private user-owned cache (`$XDG_RUNTIME_DIR/atomic/extensions`, else `<agentDir>/cache/tmp/extensions`, else `<tmpdir>/atomic-<uid>/extensions`; symlinks and shared or other-owned directories are refused). Unpinned npm specs and branch or tag git refs refresh on start and `/reload` (falling back to cache offline or on error). Exact `@1.2.3` npm pins and checked-out git commit hashes (7 to 64 hex characters matching `HEAD`) skip network refresh. Local `-e <dir>` paths can also load `<dir>/.atomic`, `<dir>/.pi`, and `<dir>/.agents/skills` after resolving trust for that directory.
74
+ `-e` / `--extension` installs remote sources into a private user-owned cache (see [Temporary package cache](/packages/reference#temporary-package-cache) for exact paths). Unpinned npm specs and branch or tag git refs refresh on start and `/reload` (falling back to cache offline or on error), while exact `@1.2.3` npm pins and matching git commit hashes skip network checks. Local `-e <dir>` paths can also load `<dir>/.atomic`, `<dir>/.pi`, and `<dir>/.agents/skills` after resolving trust for that directory.
55
75
 
56
76
  ## Package sources
57
77
 
@@ -64,36 +84,36 @@ npm:pkg@next
64
84
  npm:pkg
65
85
  ```
66
86
 
67
- - **Install locations.** Global npm packages install under `~/.atomic/agent/npm/` (a dedicated directory managed by Atomic, not your system global `npm -g` root). Atomic falls back to reading your system global `npm`, `pnpm`, or `bun` root only for legacy global installs already present there. Project installs (`-l` / `--local`) install under `.atomic/npm/` (legacy `.pi/npm/` fallback).
68
- - **Pinning and ranges.** Exact semver versions (`npm:pkg@1.2.3`) are pinned and skipped by `atomic update --extensions` and `--all`. Semver ranges (`^1.2.3`, `~1.2.3`) and dist-tags (`@next`) update within that range or tag when you run `atomic update --extensions` or `--all`.
69
- - **Custom package manager.** Override the npm executable with `npmCommand` in `settings.json` when using `pnpm`, `bun`, or version managers such as `mise` or `asdf`. Atomic detects `npm`, `pnpm`, and `bun` even inside wrapper commands and passes manager-specific flags to avoid unwanted peer-dependency installs (`--legacy-peer-deps` for npm, `--omit=peer` for bun, `--config.auto-install-peers=false` for pnpm):
87
+ - **Install locations.** Global npm packages install under `~/.atomic/agent/npm/` (managed by Atomic rather than your system global `npm -g` root; Atomic checks system global `npm`, `pnpm`, or `bun` roots only for legacy installs already there). Project installs (`-l`) install under `.atomic/npm/` (legacy `.pi/npm/` fallback).
88
+ - **Pinning, ranges, and dist-tags.** Exact semver versions (`npm:pkg@1.2.3`) stay pinned and are skipped by `atomic update --extensions` and `--all`. Semver ranges (`^1.2.3`, `~1.2.3`) and dist-tags (`@next`) update when you run `atomic update --extensions` or `--all`. Dist-tags also check the registry on online startup and re-install when the tag moves.
89
+ - **Custom package manager (`npmCommand`).** Override the installer in `settings.json` when using `pnpm`, `bun`, or version managers such as `mise` or `asdf`:
70
90
 
71
91
  ```json
72
92
  {
73
- "npmCommand": ["mise", "exec", "node@20", "--", "npm"]
93
+ "npmCommand": ["mise", "exec", "node@24", "--", "npm"]
74
94
  }
75
95
  ```
76
96
 
97
+ Atomic detects `npm`, `pnpm`, and `bun` even inside wrapper commands (use `--` if a wrapper mentions more than one manager name, or Atomic fails with `Ambiguous npmCommand package managers`) and passes manager-specific flags to avoid installing host peer dependencies:
98
+
99
+ - `npm`: `--legacy-peer-deps --no-audit --no-fund` (plus `--omit=dev` for git package dependencies)
100
+ - `pnpm`: `--config.auto-install-peers=false --config.strict-peer-dependencies=false --config.strict-dep-builds=false` (plus `--prod` for git dependencies)
101
+ - `bun`: `--omit=peer` (plus `--omit=dev` for git dependencies)
102
+
77
103
  ### git
78
104
 
79
105
  ```text
80
106
  git:github.com/user/repo@v1
81
107
  git:git@github.com:user/repo@main
82
108
  https://github.com/user/repo@v1
109
+ https://github.com/user/repo#v1
83
110
  ssh://git@github.com/user/repo@v1
84
111
  ```
85
112
 
86
- - Bare protocol URLs (`https://`, `http://`, `ssh://`, `git://`) work directly. Shorthand (`github.com/user/repo`, `git@github.com:user/repo`) requires the `git:` prefix.
87
- - Repository paths must include at least two path segments (`owner/repo`). Single-segment paths, path traversal (`..`, `.`), backslashes, and null bytes are rejected.
88
- - SSH uses your configured keys and `~/.ssh/config`. For CI or non-interactive use, set `GIT_TERMINAL_PROMPT=0` and `GIT_SSH_COMMAND="ssh -o BatchMode=yes -o ConnectTimeout=5"`.
89
- - Repositories clone to `~/.atomic/agent/git/<host>/<path>` (global) or `.atomic/git/<host>/<path>` (project; legacy `.pi/git/` fallback).
90
- - `@ref` accepts a branch name, tag, or commit hash. Running `atomic update --extensions` or `--all` fetches that ref (`git fetch origin -- <ref>`) and resets hard to `FETCH_HEAD`: branch refs advance to new commits on that branch, while tags and commit hashes reconcile to their exact target. Whenever the checked-out commit changes, Atomic runs `git clean -fdx` (removing untracked files in the clone) and installs production dependencies if `package.json` exists. Change a pin with `atomic install git:host/user/repo@new-ref`.
91
-
92
- ```bash
93
- atomic install git:git@github.com:user/repo
94
- atomic install ssh://git@github.com/user/repo
95
- atomic install git:git@github.com/user/repo@v1.0.0
96
- ```
113
+ - **URL syntax.** Bare protocol URLs (`https://`, `http://`, `ssh://`, `git://`) work directly; shorthand (`github.com/user/repo`, `git@github.com:user/repo`) requires the `git:` prefix. Hosted URLs accept `#ref` alongside `@ref`. Repository paths must have at least two segments (`owner/repo`) and cannot contain traversal (`..`, `.`), backslashes, or null bytes. Case-only path collisions on case-insensitive filesystems abort with an error.
114
+ - **SSH and CI.** SSH uses your keys and `~/.ssh/config`. For non-interactive or CI runs, set `GIT_TERMINAL_PROMPT=0` and `GIT_SSH_COMMAND="ssh -o BatchMode=yes -o ConnectTimeout=5"`.
115
+ - **Clone locations.** Repositories clone to `~/.atomic/agent/git/<host>/<path>` (global) or `.atomic/git/<host>/<path>` (project; legacy `.pi/git/` fallback).
116
+ - **Refs and updates.** `@ref` / `#ref` accepts a branch, tag, or commit hash. Running `atomic update --extensions` or `--all` fetches a pinned ref (`git fetch origin -- <ref>`) and resets hard to `FETCH_HEAD` (advancing branches and reconciling tags or commits). Unpinned checkouts track `@{upstream}` (when on `origin/`) or refresh `origin/HEAD`, and repair missing `dependencies` even when `HEAD` has not changed. Whenever `HEAD` changes, Atomic runs `git clean -fdx` and installs production dependencies if `package.json` exists (on Windows, locked files during cleanup warn and retry on a later update). Change a ref with `atomic install git:host/user/repo@new-ref`.
97
117
 
98
118
  ### Local paths
99
119
 
@@ -102,23 +122,14 @@ atomic install git:git@github.com/user/repo@v1.0.0
102
122
  ./relative/path/to/package
103
123
  ```
104
124
 
105
- Local paths are referenced in place without copying. When you run `atomic install /absolute/path/to/package`, Atomic stores the path in `settings.json` relative to the settings directory (`~/.atomic/agent` or `.atomic`). A file loads as a single extension; a directory loads as a package.
106
-
107
- Running `atomic remove <local-path>` deletes only the entry from `settings.json` and never deletes files from your local directory.
125
+ Local paths load in place without copying. `atomic install /absolute/path/to/package` stores the path in `settings.json` relative to the settings directory (`~/.atomic/agent` or `.atomic`). A file loads as a single extension; a directory loads as a package. `atomic remove <local-path>` removes only the settings entry and never deletes local files.
108
126
 
109
127
  ## Enable and disable resources
110
128
 
111
129
  Run `atomic config` to toggle extensions, skills, prompt templates, and themes interactively:
112
130
 
113
- - Opens global settings (`~/.atomic/agent/settings.json`). Press `Tab` to switch between global and project scope.
114
- - Run `atomic config -l` (or `--local`) to open project overrides (`.atomic/settings.json`) with inherited global entries dimmed.
115
- - Package subagents do not appear in `atomic config`. Filter them per package with `agents` in settings ([Package filtering](/packages/reference#package-filtering)).
116
- - Toggle built-in extensions (`llama.cpp`, `codemode`, `tool-search`) using `builtin:<name>` entries rather than filesystem paths ([Built-in extension resources](/extensions#built-in-extension-resources)).
117
- - If an interactive session crashes with an uncaught error whose stack crosses a loaded extension, Atomic names the extension in the exit output and suggests `atomic config` or `atomic -ne` to narrow down the cause.
118
-
119
- ## Authoring and reference
120
-
121
- - [Create and publish packages](/packages/authoring#creating-an-atomic-package). Review manifest fields, [subagents](/packages/authoring#subagents), [MCP servers](/packages/authoring#mcp-servers), [storage adapters](/packages/authoring#storage-adapters), [gallery metadata](/packages/authoring#gallery-metadata), [convention directories](/packages/authoring#convention-directories), and [dependencies](/packages/authoring#dependencies).
122
- - [Package reference](/packages/reference). Review [package filtering](/packages/reference#package-filtering) and [scope and deduplication](/packages/reference#scope-and-deduplication).
123
- - [SDK extensions](/sdk/reference#extensions). Load local packages and extensions programmatically with `DefaultResourceLoader({ additionalExtensionPaths })`.
124
- - [Package CLI commands](/reference/cli#package-commands), [Settings](/settings), and [Security](/security). Review CLI subcommands, `settings.json` keys, and project trust gates.
131
+ - Opens global settings (`~/.atomic/agent/settings.json`). Press `Tab` to switch between global and project scope in trusted projects (`Tab` is disabled in untrusted projects).
132
+ - Run `atomic config -l` (`--local`) to open project overrides (`.atomic/settings.json`) with inherited global entries dimmed. In an untrusted project, `atomic config -l` exits with code 1 unless you pass `--approve`.
133
+ - Package **subagents, MCP servers, and storage adapters** do not appear in `atomic config`. Filter `agents` and `mcpServers` per package in `settings.json` ([Package filtering](/packages/reference#package-filtering)), and select storage adapters via `storage.adapter`.
134
+ - Toggle built-in extensions (`llama.cpp`, `codemode`, `tool-search`) with `builtin:<name>` entries ([Built-in extension resources](/extensions#built-in-extension-resources)).
135
+ - If an interactive session crashes with an uncaught error whose stack crosses a loaded extension, Atomic names the extension in the exit output and suggests `atomic config` or `atomic -ne` to isolate the cause.
@@ -1,39 +1,133 @@
1
1
  ---
2
- title: "Programmatic integration"
3
- sidebarTitle: "Programmatic modes"
4
- description: "Choose between JSON event stream mode, RPC mode, the TypeScript SDK, storage adapters, and TUI component APIs, then follow a minimal integration."
2
+ title: "Choose an integration mode"
3
+ sidebarTitle: "Choose a mode"
4
+ description: "Compare Print mode, JSON event streams, RPC mode, and the TypeScript SDK, run a minimal example for each, and continue to its reference."
5
5
  ---
6
6
 
7
- Atomic provides three programmatic integration modes plus a component API for interactive extension interfaces. Choose the smallest mode that fits your integration, run its minimal example, and continue to its reference.
7
+ Atomic provides four programmatic integration modes plus a component API for interactive extension interfaces. Choose the smallest mode that fits your integration, run its minimal example below, and continue to its guide or reference.
8
8
 
9
- ## Choose an integration mode
9
+ ## Compare integration modes
10
10
 
11
- | Goal | Mode | Entry point |
11
+ | What you want | Use this | Entry point |
12
12
  | --- | --- | --- |
13
- | Run one or more prompts and parse structured output as JSON lines | [JSON event stream](/json) | `atomic --mode json` |
14
- | Drive a long-lived process with commands, interrupts, and extension UI prompts | [RPC mode](/rpc) | `atomic --mode rpc` |
15
- | Embed Atomic directly inside a Node.js application (Node.js 24.20+) | [TypeScript SDK](/sdk) | `@bastani/atomic` |
13
+ | Run one or more prompts and capture plain text in a shell pipeline | [Print mode](/guides/non-interactive) | `atomic -p` |
14
+ | Run one or more prompts and parse structured session events in scripts or CI | [JSON event stream](/json) | `atomic --mode json` |
15
+ | Drive a long-lived Atomic process from another language, editor, or service | [RPC mode](/rpc) | `atomic --mode rpc` |
16
+ | Embed Atomic directly inside a Node.js 24.20+ application | [TypeScript SDK](/sdk) | `@bastani/atomic` |
16
17
 
17
- - **JSON event stream** executes one or more positional prompts in sequence, writes newline-delimited session events to stdout, and exits.
18
+ - **Print mode** runs one or more prompts (including piped stdin or `@file` inputs), writes the final response as plain text to stdout, and exits.
19
+ - **JSON event stream** executes prompts in sequence, writes every session event as newline-delimited JSON to stdout, and exits.
18
20
  - **RPC mode** keeps an Atomic subprocess running over stdin/stdout JSON Lines so you can send follow-up prompts, steer or abort turns, switch models, and answer extension dialogs and OAuth prompts.
19
- - **TypeScript SDK** runs the same agent runtime as a library inside your Node.js application, with direct control over extensions, skills, tools, models, workspaces, and [session storage backends](/sdk/storage).
21
+ - **TypeScript SDK** runs the same agent runtime in-process inside Node.js, with direct control over extensions, skills, tools, models, workspaces, and [session storage backends](/sdk/storage).
20
22
 
21
- ## SDK guides and APIs
23
+ ## Minimal examples
22
24
 
23
- - [SDK overview](/sdk): create sessions, bind workspaces, configure Intercom policies, and handle lifecycle events.
24
- - [SDK storage backends](/sdk/storage): configure SQLite, JSONL, in-memory, and PostgreSQL for `createAgentSession()`, `createAgentSessionRuntime()`, and `SessionManager`.
25
- - [Structured decisions API](/sdk/structured-decisions): run typed classifier or chat decisions with `decide()` and `generateStructuredOutput()`.
26
- - [Embed Atomic in a web server](/sdk/web-server): build a streaming HTTP API with Next.js App Router and `createAgentSession()`.
27
- - [SDK API reference](/sdk/reference): complete session options, loaders, tool status, task supervision, run modes, and exports.
28
- - [Remote compaction models](/models#remote-compaction-models) and [Environment blueprints](/guides/resume-on-any-machine#set-the-environment-up-with-a-blueprint): plug in custom remote compactors and repeatable worktree setup for cross-machine resume.
25
+ ### Print mode
29
26
 
30
- ## RPC protocol and client guides
27
+ ```bash
28
+ git diff | atomic -p "Write a concise commit message for this diff"
29
+ ```
31
30
 
32
- - [RPC protocol reference](/rpc/protocol): every RPC command, streamed event, error shape, and JSON type.
33
- - [RPC extension UI protocol](/rpc/extension-ui): handle extension dialogs, widgets, questionnaires, and OAuth flows over RPC.
34
- - [RPC client examples](/rpc/examples): connect with the typed `RpcClient` or a standalone Node.js script.
31
+ ### JSON event stream
32
+
33
+ ```bash
34
+ atomic --mode json "List the TypeScript files in src/" 2>/dev/null \
35
+ | jq -c 'select(.type == "message_end")'
36
+ ```
37
+
38
+ ### RPC mode
39
+
40
+ Send newline-delimited JSON commands on stdin and read JSON responses and events from stdout:
41
+
42
+ ```bash
43
+ printf '%s\n' '{"id":"1","type":"prompt","message":"Say hello in one sentence."}' \
44
+ | atomic --mode rpc --no-session
45
+ ```
46
+
47
+ For multi-turn control, framing rules, and a streaming Python or TypeScript client, see [Drive Atomic over RPC](/rpc) and [Connect with RPC clients](/rpc/examples).
48
+
49
+ ### TypeScript SDK
50
+
51
+ Install `@bastani/atomic` on Node.js 24.20+, create an in-memory session, stream text deltas, and dispose cleanly in `finally`:
52
+
53
+ ```typescript
54
+ import { createAgentSession, ModelRuntime, SessionManager } from "@bastani/atomic";
55
+
56
+ const modelRuntime = await ModelRuntime.create();
57
+ const { session } = await createAgentSession({
58
+ sessionManager: SessionManager.inMemory(),
59
+ modelRuntime,
60
+ });
61
+
62
+ session.subscribe((event) => {
63
+ if (event.type === "message_update" && event.assistantMessageEvent.type === "text_delta") {
64
+ process.stdout.write(event.assistantMessageEvent.delta);
65
+ }
66
+ });
67
+
68
+ try {
69
+ await session.prompt("List the files in the current directory.");
70
+ } finally {
71
+ await session.dispose();
72
+ }
73
+ ```
74
+
75
+ ## TypeScript SDK guides
76
+
77
+ <Columns cols={2}>
78
+ <Card title="Use the TypeScript SDK" href="/sdk">
79
+ Create sessions, bind Git workspaces, configure Intercom policies, handle human input, and manage lifecycle events.
80
+ </Card>
81
+ <Card title="Configure session storage" href="/sdk/storage">
82
+ Wire SQLite, JSONL, in-memory, and PostgreSQL storage for `createAgentSession()`, `createAgentSessionRuntime()`, and `SessionManager`.
83
+ </Card>
84
+ <Card title="Make structured decisions" href="/sdk/structured-decisions">
85
+ Run typed classifier or chat decisions with `decide()`, `generateStructuredOutput()`, and `structured_output`.
86
+ </Card>
87
+ <Card title="Stream from a web server" href="/sdk/web-server">
88
+ Run Atomic behind a Next.js App Router endpoint and stream NDJSON transcript updates to a browser.
89
+ </Card>
90
+ <Card title="SDK API reference" href="/sdk/reference">
91
+ Complete reference for session options, runtime methods, resource loaders, run modes, error classes, and exports.
92
+ </Card>
93
+ <Card title="Compactors and blueprints" href="/compaction/custom-compactors">
94
+ Plug in custom remote compactors or configure repeatable [environment blueprints](/guides/resume-on-any-machine#set-the-environment-up-with-a-blueprint) for cross-machine resume.
95
+ </Card>
96
+ </Columns>
97
+
98
+ ## RPC and JSON guides
99
+
100
+ <Columns cols={2}>
101
+ <Card title="Drive Atomic over RPC" href="/rpc">
102
+ Startup flags, command concurrency lanes, strict JSONL framing, shutdown signals, and a Python client.
103
+ </Card>
104
+ <Card title="RPC protocol reference" href="/rpc/protocol">
105
+ Every RPC command, streamed event, structured error code, and JSON wire type.
106
+ </Card>
107
+ <Card title="Handle extension UI over RPC" href="/rpc/extension-ui">
108
+ Implement dialogs, notifications, widgets, questionnaires, and interactive OAuth prompts over RPC.
109
+ </Card>
110
+ <Card title="Connect with RPC clients" href="/rpc/examples">
111
+ Use the typed `RpcClient` in TypeScript or a standalone Node.js script.
112
+ </Card>
113
+ <Card title="Parse JSON event streams" href="/json">
114
+ Event shapes, `message_update` wire stripping, piped input, exit codes, and `jq` filtering for `--mode json`.
115
+ </Card>
116
+ </Columns>
35
117
 
36
118
  ## Terminal UI and standalone libraries
37
119
 
38
- - [Build TUI components](/tui) walks through custom interactive components and common patterns, and [TUI API reference](/tui/reference) documents the component, focus, input, and rendering contracts.
39
- - [Standalone libraries](/libraries) covers the six core `@bastani/atomic-*` packages (`ai`, `agent-core`, `tui`, `codemode`, `schema`, and `telemetry`) plus the optional storage adapter packages ([`@bastani/atomic-storage-postgres`](/libraries/storage-postgres)).
120
+ <Columns cols={2}>
121
+ <Card title="Build TUI components" href="/tui">
122
+ Walk through custom interactive components, overlays, status bars, and common extension UI patterns.
123
+ </Card>
124
+ <Card title="TUI API reference" href="/tui/reference">
125
+ Component, focus, keyboard input, and rendering contracts for interactive extensions.
126
+ </Card>
127
+ <Card title="Standalone libraries" href="/libraries">
128
+ Use the six core `@bastani/atomic-*` packages (`ai`, `agent-core`, `tui`, `codemode`, `schema`, and `telemetry`) directly.
129
+ </Card>
130
+ <Card title="PostgreSQL storage adapter" href="/libraries/storage-postgres">
131
+ Install the optional PostgreSQL storage adapter package (`@bastani/atomic-storage-postgres`) for shared multi-machine sessions.
132
+ </Card>
133
+ </Columns>