@bastani/atomic 0.10.18 → 0.10.19

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 (334) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +27 -5
  3. package/dist/_shared/config-binary-install-SNFYFXWB.js +70 -0
  4. package/dist/_shared/config-binary-install-SNFYFXWB.js.map +1 -0
  5. package/dist/_shared/dist-KOELCESV.js +2 -2
  6. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  7. package/dist/_shared/lib-4PES5P4V.js +2 -2
  8. package/dist/_shared/{mode-interactive-sdk-7KXUFI2F.js → mode-interactive-sdk-JXBZ3H27.js} +434 -11
  9. package/dist/_shared/mode-interactive-sdk-JXBZ3H27.js.map +1 -0
  10. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +21 -6
  11. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  12. package/dist/_shared/mode-shared-2QJSCUM6.js +7 -6
  13. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  14. package/dist/_shared/p0-cli-BB45ZQY6.js +56 -3
  15. package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
  16. package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
  17. package/dist/_shared/runtime-O4KCSG4C.js +3 -3
  18. package/dist/_shared/{sdk-OHKMDJ74.js → sdk-BHX35EPK.js} +40 -9
  19. package/dist/_shared/sdk-BHX35EPK.js.map +1 -0
  20. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  21. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  22. package/dist/_shared/{startup-0-0-OV6RAEAP.js → startup-0-0-4EDVBK5P.js} +464 -7
  23. package/dist/_shared/startup-0-0-4EDVBK5P.js.map +1 -0
  24. package/dist/_shared/{startup-0-1-EZAJI6RE.js → startup-0-1-H5IXVRXQ.js} +85 -7
  25. package/dist/_shared/startup-0-1-H5IXVRXQ.js.map +1 -0
  26. package/dist/_shared/startup-0-2-YZZOC22D.js +4 -4
  27. package/dist/_shared/startup-0-3-DE2NCS6A.js +4 -4
  28. package/dist/_shared/startup-0-4-ZMJV547D.js +4 -4
  29. package/dist/_shared/startup-0-5-HZX3ZPTP.js +44 -11
  30. package/dist/_shared/startup-0-5-HZX3ZPTP.js.map +1 -1
  31. package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
  32. package/dist/_shared/startup-12-0-55AAXBJZ.js +2 -2
  33. package/dist/_shared/startup-14-0-MLX36RBG.js +3 -3
  34. package/dist/_shared/startup-15-0-YUKGAC63.js +3 -3
  35. package/dist/_shared/{startup-15-1-4S7FLMNG.js → startup-15-1-WQZBOTMZ.js} +70 -28
  36. package/dist/_shared/{startup-15-1-4S7FLMNG.js.map → startup-15-1-WQZBOTMZ.js.map} +1 -1
  37. package/dist/_shared/startup-8-0-34CBHPZH.js +4 -4
  38. package/dist/_shared/{startup-8-1-LZFXSD3Z.js → startup-8-1-QZMXUGHI.js} +242 -20
  39. package/dist/_shared/startup-8-1-QZMXUGHI.js.map +1 -0
  40. package/dist/_shared/storage-command-7MGXLJGZ.js +5 -5
  41. package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
  42. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  43. package/dist/_shared/team-DOQKICG2.js +2 -2
  44. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  45. package/dist/binary-self-update.js +310 -0
  46. package/dist/binary-self-update.js.map +1 -0
  47. package/dist/builtin/intercom/index.bundle.mjs +2 -1
  48. package/dist/builtin/intercom/package.json +1 -1
  49. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  50. package/dist/builtin/mcp/package.json +1 -1
  51. package/dist/builtin/subagents/CHANGELOG.md +30 -0
  52. package/dist/builtin/subagents/package.json +1 -1
  53. package/dist/builtin/subagents/skills/agent-browser/SKILL.md +1 -1
  54. package/dist/builtin/subagents/skills/impeccable/SKILL.md +3 -3
  55. package/dist/builtin/subagents/skills/impeccable/reference/audit.md +2 -2
  56. package/dist/builtin/subagents/skills/impeccable/reference/critique.md +3 -3
  57. package/dist/builtin/subagents/skills/impeccable/reference/generate.md +1 -1
  58. package/dist/builtin/subagents/skills/impeccable/reference/init.md +0 -2
  59. package/dist/builtin/subagents/skills/impeccable/reference/live.md +4 -2
  60. package/dist/builtin/subagents/skills/impeccable/reference/new-work-comp.md +1 -1
  61. package/dist/builtin/subagents/skills/impeccable/reference/new-work-world.md +1 -1
  62. package/dist/builtin/subagents/skills/impeccable/scripts/VERSION +1 -1
  63. package/dist/builtin/subagents/skills/impeccable/scripts/engine-checksums.txt +5 -5
  64. package/dist/builtin/subagents/skills/impeccable/scripts/impeccable +28 -5
  65. package/dist/builtin/subagents/skills/impeccable/scripts/impeccable.cmd +11 -2
  66. package/dist/builtin/subagents/skills/impeccable/scripts/live-browser.js +10 -6
  67. package/dist/builtin/subagents/skills/research-codebase/SKILL.md +13 -19
  68. package/dist/builtin/subagents/skills/skill-creator/SKILL.md +1 -1
  69. package/dist/builtin/subagents/skills/subagent/SKILL.md +7 -7
  70. package/dist/builtin/subagents/skills/workflow/SKILL.md +98 -0
  71. package/dist/builtin/subagents/src/extension/index.bundle.mjs +2 -1
  72. package/dist/builtin/web-access/index.bundle.mjs +2 -1
  73. package/dist/builtin/web-access/package.json +1 -1
  74. package/dist/cli/args.js +2 -2
  75. package/dist/cli/auth-cli.code.js +3 -3
  76. package/dist/cli/auth-cli.impl.js +3 -3
  77. package/dist/cli/auth-cli.js +3 -3
  78. package/dist/cli/blueprint-command.code.js +2 -2
  79. package/dist/cli/blueprint-command.impl.js +3 -3
  80. package/dist/cli/blueprint-command.js +3 -3
  81. package/dist/cli/intercom-command.code.js +2 -2
  82. package/dist/cli/intercom-command.impl.js +3 -3
  83. package/dist/cli/intercom-command.js +3 -3
  84. package/dist/cli/list-models.code.js +2 -2
  85. package/dist/cli/list-models.impl.js +3 -3
  86. package/dist/cli/list-models.js +3 -3
  87. package/dist/cli/session-picker.code.js +1 -1
  88. package/dist/cli/session-picker.impl.js +3 -3
  89. package/dist/cli/session-picker.js +3 -3
  90. package/dist/cli/startup-ui.code.js +1 -1
  91. package/dist/cli/startup-ui.impl.js +3 -3
  92. package/dist/cli/startup-ui.js +3 -3
  93. package/dist/cli/storage-command.impl.js +3 -3
  94. package/dist/cli/storage-command.js +3 -3
  95. package/dist/cli/storage-search-session.code.js +3 -3
  96. package/dist/cli/storage-search-session.impl.js +3 -3
  97. package/dist/cli/storage-search-session.js +3 -3
  98. package/dist/cli/team-command.code.js +1 -1
  99. package/dist/cli/team-command.impl.js +3 -3
  100. package/dist/cli/team-command.js +3 -3
  101. package/dist/cli/usage-command.js +22 -0
  102. package/dist/cli/usage-command.js.map +1 -0
  103. package/dist/cli.js +2 -2
  104. package/dist/config-binary-install.js +3 -0
  105. package/dist/config-binary-install.js.map +1 -0
  106. package/dist/core/agent-session-services.js +3 -0
  107. package/dist/core/agent-session-services.js.map +1 -0
  108. package/dist/core/debug.impl.js +3 -3
  109. package/dist/core/debug.js +3 -3
  110. package/dist/core/export-html/card-projection.impl.js +3 -3
  111. package/dist/core/export-html/card-projection.js +3 -3
  112. package/dist/core/export-html/index.code.js +2 -2
  113. package/dist/core/export-html/index.impl.js +3 -3
  114. package/dist/core/export-html/index.js +3 -3
  115. package/dist/core/export-html/json-spans.impl.js +3 -3
  116. package/dist/core/export-html/json-spans.js +3 -3
  117. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  118. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  119. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  120. package/dist/core/export-html/tool-renderer.js +3 -3
  121. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  122. package/dist/core/extensions/jiti-loader.js +3 -3
  123. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  124. package/dist/core/extensions/jiti-static-loader.js +3 -3
  125. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  126. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  127. package/dist/core/extensions/loader-host-modules.js +3 -3
  128. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  129. package/dist/core/extensions/runner-context.js +2 -2
  130. package/dist/core/intercom-broker-control-host.code.js +1 -1
  131. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  132. package/dist/core/intercom-broker-control-host.js +3 -3
  133. package/dist/core/intercom-broker-control.code.js +3 -3
  134. package/dist/core/intercom-broker-control.impl.js +3 -3
  135. package/dist/core/intercom-broker-control.js +3 -3
  136. package/dist/core/{legacy-workflow-files.d.ts → legacy-workflows.d.ts} +1 -1
  137. package/dist/core/model-runtime.d.ts +8 -2
  138. package/dist/core/package-manager-storage-adapters.code.js +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/resource-loader-core.d.ts +1 -1
  142. package/dist/core/resource-loader-internals.d.ts +1 -1
  143. package/dist/core/resource-loader-types.d.ts +1 -1
  144. package/dist/core/resource-loader-types.js.map +1 -1
  145. package/dist/core/sdk.code.js +4 -4
  146. package/dist/core/sdk.impl.js +3 -3
  147. package/dist/core/sdk.js +3 -3
  148. package/dist/core/session-manager-core.js +5 -5
  149. package/dist/core/session-manager-list.impl.js +3 -3
  150. package/dist/core/session-manager-list.js +3 -3
  151. package/dist/core/session-manager.code.js +1 -1
  152. package/dist/core/session-manager.impl.js +3 -3
  153. package/dist/core/session-manager.js +3 -3
  154. package/dist/core/session-storage.code.js +1 -1
  155. package/dist/core/session-storage.impl.js +3 -3
  156. package/dist/core/session-storage.js +3 -3
  157. package/dist/core/settings-manager.js +5 -0
  158. package/dist/core/settings-manager.js.map +1 -0
  159. package/dist/core/storage/index.js +2 -2
  160. package/dist/core/storage/node-sqlite-thread.js +2 -2
  161. package/dist/core/storage/node-sqlite.js +2 -2
  162. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  163. package/dist/core/storage/offline-snapshot-file.js +3 -3
  164. package/dist/core/storage/provider.js +2 -2
  165. package/dist/core/storage/selection.js +2 -2
  166. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  167. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  168. package/dist/core/storage/session/branch-fork-source.js +3 -3
  169. package/dist/core/storage/session/card-view.impl.js +3 -3
  170. package/dist/core/storage/session/card-view.js +3 -3
  171. package/dist/core/storage/session/child-reader.code.js +3 -3
  172. package/dist/core/storage/session/child-reader.impl.js +3 -3
  173. package/dist/core/storage/session/child-reader.js +3 -3
  174. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  175. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  176. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  177. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  178. package/dist/core/storage/session/expanded-child-details.js +3 -3
  179. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  180. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  181. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  182. package/dist/core/storage/session/fork-row-index.js +3 -3
  183. package/dist/core/storage/session/fork-staging.code.js +2 -2
  184. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  185. package/dist/core/storage/session/fork-staging.js +3 -3
  186. package/dist/core/storage/session/fork-window.code.js +3 -3
  187. package/dist/core/storage/session/fork-window.impl.js +3 -3
  188. package/dist/core/storage/session/fork-window.js +3 -3
  189. package/dist/core/storage/session/history-pages.impl.js +3 -3
  190. package/dist/core/storage/session/history-pages.js +3 -3
  191. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  192. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  193. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  194. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  195. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  196. package/dist/core/storage/session/memory-session-store.js +3 -3
  197. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  198. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  199. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  200. package/dist/core/storage/session/released-history-files.code.js +2 -2
  201. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  202. package/dist/core/storage/session/released-history-files.js +3 -3
  203. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  204. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  205. package/dist/core/storage/session/session-resume.impl.js +3 -3
  206. package/dist/core/storage/session/session-resume.js +3 -3
  207. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  208. package/dist/core/storage/session/snapshot-cut.js +3 -3
  209. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  210. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  211. package/dist/core/storage/session/snapshot-history.js +3 -3
  212. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  213. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  214. package/dist/core/storage/session/sql-session-store.js +3 -3
  215. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  216. package/dist/core/storage/session/tree-outline.js +3 -3
  217. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  218. package/dist/core/storage/session/tree-presentation.js +3 -3
  219. package/dist/core/storage/storage-status.impl.js +3 -3
  220. package/dist/core/storage/storage-status.js +3 -3
  221. package/dist/core/storage/team.impl.js +3 -3
  222. package/dist/core/storage/team.js +3 -3
  223. package/dist/core/structured-output/index.code.js +1 -1
  224. package/dist/core/structured-output/index.impl.js +3 -3
  225. package/dist/core/structured-output/index.js +3 -3
  226. package/dist/core/subscription-usage-credential.d.ts +2 -0
  227. package/dist/core/subscription-usage-endpoints.d.ts +54 -0
  228. package/dist/core/subscription-usage.d.ts +55 -0
  229. package/dist/core/subscription-usage.js +3 -0
  230. package/dist/core/subscription-usage.js.map +1 -0
  231. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  232. package/dist/core/tasks/task-completion-entry.js +3 -3
  233. package/dist/core/tasks/task-file-history.code.js +3 -3
  234. package/dist/core/tasks/task-file-history.impl.js +3 -3
  235. package/dist/core/tasks/task-file-history.js +3 -3
  236. package/dist/core/tasks/task-reference-archive.code.js +4 -4
  237. package/dist/core/tasks/task-reference-archive.js +3 -3
  238. package/dist/core/tasks/task-reference-identity.js +3 -3
  239. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  240. package/dist/core/tasks/task-reference-stream.js +3 -3
  241. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  242. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  243. package/dist/core/tasks/task-view-source.code.js +1 -1
  244. package/dist/core/tasks/task-view-source.impl.js +3 -3
  245. package/dist/core/tasks/task-view-source.js +3 -3
  246. package/dist/core/tools/edit-diff.d.ts +4 -6
  247. package/dist/core/tools/read-url.code.js +3 -3
  248. package/dist/core/tools/read-url.impl.js +3 -3
  249. package/dist/core/tools/read-url.js +3 -3
  250. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  251. package/dist/core/worktree-snapshot/errors.code.js +2 -2
  252. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  253. package/dist/core/worktree-snapshot/errors.js +3 -3
  254. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  255. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  256. package/dist/extensions/codemode/execute.code.js +1 -1
  257. package/dist/extensions/codemode/execute.impl.js +3 -3
  258. package/dist/extensions/codemode/execute.js +3 -3
  259. package/dist/extensions/codemode/renderer.code.js +2 -2
  260. package/dist/extensions/codemode/renderer.impl.js +3 -3
  261. package/dist/extensions/codemode/renderer.js +3 -3
  262. package/dist/extensions/mcp/cli.code.js +2 -2
  263. package/dist/extensions/mcp/cli.impl.js +3 -3
  264. package/dist/extensions/mcp/cli.js +3 -3
  265. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  266. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  267. package/dist/extensions/mcp/cli.lazy.js +3 -3
  268. package/dist/extensions/mcp/runtime.code.js +1 -1
  269. package/dist/extensions/mcp/runtime.impl.js +3 -3
  270. package/dist/extensions/mcp/runtime.js +3 -3
  271. package/dist/index.d.ts +3 -0
  272. package/dist/index.js +7 -7
  273. package/dist/main-first-time-setup.code.js +1 -1
  274. package/dist/main-first-time-setup.impl.js +3 -3
  275. package/dist/main-first-time-setup.js +3 -3
  276. package/dist/main.js +2 -2
  277. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  278. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  279. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  280. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  281. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  282. package/dist/modes/interactive/interactive-mode-surface.d.ts +1 -0
  283. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  284. package/dist/modes/interactive/interactive-mode.js +1 -1
  285. package/dist/modes/interactive-engine/isolated-runtime.d.ts +3 -0
  286. package/dist/modes/print-mode.js +1 -1
  287. package/dist/modes/rpc/rpc-client-api.d.ts +3 -0
  288. package/dist/modes/rpc/rpc-types.d.ts +25 -0
  289. package/dist/package-manager-cli.code.js +31 -8
  290. package/dist/package-manager-cli.code.js.map +1 -1
  291. package/dist/package-manager-cli.impl.js +3 -3
  292. package/dist/package-manager-cli.js +3 -3
  293. package/dist/rpc-entry.js +2 -2
  294. package/dist/startup-files.json +1 -1
  295. package/dist/startup-stages/12.js +1 -1
  296. package/dist/startup-stages/4.js +1 -1
  297. package/dist/startup-stages/6.js +1 -1
  298. package/dist/subscription-usage-sdk.d.ts +9 -0
  299. package/dist/utils/changelog.d.ts +1 -0
  300. package/dist/utils/startup-database-spare.code.js +2 -2
  301. package/dist/utils/startup-database-spare.impl.js +3 -3
  302. package/dist/utils/startup-database-spare.js +3 -3
  303. package/dist/utils/tools-manager.code.js +1 -1
  304. package/dist/utils/tools-manager.impl.js +3 -3
  305. package/dist/utils/tools-manager.js +3 -3
  306. package/docs/changelog.mdx +46 -6
  307. package/docs/containerization.md +17 -15
  308. package/docs/docs.json +1 -0
  309. package/docs/getting-started/installation.md +132 -80
  310. package/docs/guides/subscription-usage.md +133 -0
  311. package/docs/guides/team-setup.md +14 -3
  312. package/docs/guides.md +3 -0
  313. package/docs/index.md +18 -6
  314. package/docs/intercom/operations.md +1 -1
  315. package/docs/orchestration/migrating-workflows.md +16 -10
  316. package/docs/orchestration/patterns.md +8 -2
  317. package/docs/orchestration.md +17 -8
  318. package/docs/quickstart.md +7 -15
  319. package/docs/reference/cli.md +29 -22
  320. package/docs/rpc/protocol.md +9 -1
  321. package/docs/rpc.md +1 -1
  322. package/docs/sdk/reference.md +5 -1
  323. package/docs/skills.md +20 -4
  324. package/docs/slash-commands.md +3 -2
  325. package/docs/tools.md +57 -12
  326. package/docs/usage.md +1 -0
  327. package/docs/windows.md +4 -4
  328. package/package.json +9 -9
  329. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +0 -1
  330. package/dist/_shared/sdk-OHKMDJ74.js.map +0 -1
  331. package/dist/_shared/startup-0-0-OV6RAEAP.js.map +0 -1
  332. package/dist/_shared/startup-0-1-EZAJI6RE.js.map +0 -1
  333. package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +0 -1
  334. package/dist/builtin/subagents/skills/workflow-files/SKILL.md +0 -28
package/docs/tools.md CHANGED
@@ -163,26 +163,71 @@ Use colon and query selectors to inspect tables, filter rows, run read-only SQL,
163
163
 
164
164
  ## `edit`
165
165
 
166
- `edit` applies exact-text replacements to one existing file (`path` plus `edits: [{ oldText, newText }]`). It also accepts a single edit object, a JSON-stringified `edits` array or object, or legacy top-level `{ path, oldText, newText }`:
166
+ Use `edit` to replace part of an existing file without rewriting the whole file. Copy the text you want to change from the file so it matches in exactly one place. You don't have to call `read` first if you already know what's in the file.
167
+
168
+ Suppose `example.js` contains this function:
169
+
170
+ ```js
171
+ function run() {
172
+ if (ready) {
173
+ start();
174
+ }
175
+ }
176
+ ```
177
+
178
+ This request adds `prepare();` before `start();`. The `oldText` block is less indented than it is in the file:
167
179
 
168
180
  ```json
169
181
  {
170
- "path": "src/example.ts",
182
+ "path": "example.js",
171
183
  "edits": [
172
- { "oldText": "const value = 1;", "newText": "const value = 2;" },
173
- { "oldText": "console.log(value);", "newText": "console.info(value);" }
184
+ {
185
+ "oldText": "if (ready) {\n start();\n}",
186
+ "newText": "if (ready) {\n prepare();\n start();\n}"
187
+ }
174
188
  ]
175
189
  }
176
190
  ```
177
191
 
178
- - **Unique, non-overlapping matches.** Each `oldText` must match exactly once against the current file (overlapping occurrences count: `}\n}` occurs twice in `}\n}\n}`). Edits match against the original file simultaneously and cannot overlap; merge adjacent changes into one edit.
179
- - **No prior `read` required.** Matches against the file's current bytes on disk, even if changed by `bash` or another process.
180
- - **Fallback normalization.** If no exact match exists, `edit` retries after normalizing compatible Unicode variants (such as full-width characters, while keeping multi-code-point characters intact), stripping trailing whitespace per line, and mapping smart single quotes (`U+2018`–`U+201B` to `'`), smart double quotes (`U+201C`–`U+201F` to `"`), Unicode dashes (`U+2010`–`U+2015`, `U+2212` to `-`), and Unicode spaces (`U+00A0`, `U+2002`–`U+200A`, `U+202F`, `U+205F`, `U+3000` to ASCII space). Normalization locates the region only; `newText` replaces that exact slice and leaves surrounding bytes untouched. A single exact match always wins over normalized matches.
181
- - **Encoding and line endings.** UTF-8 text only (invalid UTF-8 fails without modifying the file). `oldText` and `newText` cannot split surrogate pairs. Preserves UTF-8 BOM and surrounding line endings (LF, CRLF, or lone CR when the file contains no LF at all); newlines in `newText` adopt the line ending where the match starts.
182
- - **Atomicity.** Either all edits apply or the file stays unchanged.
183
- - **Notebooks.** `.ipynb` files are edited using the `# %% [code] cell:N` format shown by `read`, preserving cell metadata, outputs, and execution counts.
192
+ - `path` is the file to change, either an absolute path or one relative to the working directory.
193
+ - `edits` is the list of replacements to make in that file.
194
+ - `oldText` is the current text to find. In JSON, `\n` starts a new line.
195
+ - `newText` is what to put in its place. Use `""` to delete the matched text.
196
+
197
+ All replacements refer to the file before any edits. If two replacements overlap, combine them into one. If any replacement fails, `edit` leaves the whole file unchanged. For integrations that send an edit in another form, `edit` also accepts a single object in `edits`, an array or object encoded as a JSON string, or `oldText` and `newText` next to `path`.
198
+
199
+ ### How `edit` finds the text
200
+
201
+ 1. It looks for an exact match first.
202
+ 2. If it finds none, it allows differences such as spaces at the end of a line, curly versus straight quotes, and some other equivalent characters.
203
+ 3. If it still finds none, it tries to match whole lines with different indentation. The block can be indented more or less than the file, but the lines must nest in the same way. If one block matches and the indentation can be converted consistently, `edit` adjusts the replacement to fit the file's tabs or spaces. It does not ignore differences in spaces between words.
204
+
205
+ If a step finds multiple matches, `edit` stops and reports the ambiguity.
206
+
207
+ In this example, the `if` block has the same nesting in the request and the file. `edit` keeps the file's indentation:
208
+
209
+ ```js
210
+ function run() {
211
+ if (ready) {
212
+ prepare();
213
+ start();
214
+ }
215
+ }
216
+ ```
217
+
218
+ In interactive mode, review the file preview. It shows the indentation that `edit` will write to the file.
219
+
220
+ ### When an edit fails
221
+
222
+ If the text appears more than once, add nearby lines to `oldText` so it matches only one place. Keep those lines in `newText` too. If nothing matches in a nonempty file, `edit` points to the closest lines and shows where the text differs. For example, suppose you copy the block with its indentation but put `halt();` in `oldText` where the file says `start();`. The error points to line 3:
223
+
224
+ ```text
225
+ Could not find the exact text in example.js. Closest match: lines 2–4. Line 3: oldText has "halt();", file has "start();".
226
+ ```
227
+
228
+ Reopen the file and copy the exact lines, including their indentation, into `oldText`. Make `newText` use the same indentation. Extensions and SDK integrations can check the [edit error codes](#edit-and-write-errors) instead of parsing the message.
184
229
 
185
- Interactive mode previews file diffs as soon as arguments arrive (notebook diffs appear with the result). See [Edit and write errors](#edit-and-write-errors) for typed error codes.
230
+ `edit` works on UTF-8 text. It keeps the file's line endings and byte order mark, if present. To edit a Jupyter notebook (`.ipynb`), use the `# %% [code] cell:N` format that `read` shows. `edit` keeps the notebook's cell metadata, outputs, and execution counts. The notebook preview appears with the result.
186
231
 
187
232
  ## `write`
188
233
 
@@ -414,7 +459,7 @@ For extension and SDK integrations, `edit` and `write` failures are typed. Branc
414
459
  | `EditInputError` | `edits-empty` | `edits` is empty or missing | `path`, `totalEdits` | Pass at least one replacement. |
415
460
  | `EditInputError` | `old-text-empty` | An `oldText` is empty | `path`, `editIndex`, `totalEdits` | Provide at least one character from the file in `oldText`. |
416
461
  | `EditInputError` | `text-splits-character` | `oldText` or `newText` splits a surrogate pair (for example half an emoji) | `path`, `editIndex`, `totalEdits` | Copy complete characters. |
417
- | `EditMatchError` | `text-not-found` | `oldText` is not in the file | `path`, `editIndex`, `totalEdits` | Re-read the file and copy `oldText` verbatim. |
462
+ | `EditMatchError` | `text-not-found` | `oldText` does not match, or its indentation cannot be applied safely | `path`, `editIndex`, `totalEdits` | Check the lines in the error and copy `oldText` verbatim. |
418
463
  | `EditMatchError` | `text-not-unique` | `oldText` matches more than once | `path`, `editIndex`, `totalEdits`, `occurrences` | Include more surrounding lines. |
419
464
  | `EditMatchError` | `edits-overlap` | Two edits touch the same region | `path`, `editIndex`, `overlapsEditIndex`, `totalEdits` | Merge them into one edit. |
420
465
  | `EditMatchError` | `no-change` | Resulting file is identical | `path`, `totalEdits` | Make `newText` differ from `oldText`. |
package/docs/usage.md CHANGED
@@ -90,6 +90,7 @@ Here are the everyday commands you will use most often:
90
90
  | Command | Description |
91
91
  | --- | --- |
92
92
  | `/login [provider]` | Sign in with an OAuth account/subscription or save an API key ([Authentication](/getting-started/authentication)) |
93
+ | `/usage` | See [subscription usage](/guides/subscription-usage) for signed-in accounts while your reply keeps running |
93
94
  | `/logout [provider]` | Remove stored credentials from `~/.atomic/agent/auth.json` (leaves env vars and `models.json` untouched) |
94
95
  | `/model [provider/model]` | Switch models and save the startup default ([Choose a model](/models/choose-a-model)). Exact matches switch immediately; other text pre-filters the picker. Inside the picker, press `←`/`→` to adjust effort level and `Tab` to toggle scoped vs. all models |
95
96
  | `/thinking [level]` | Set the thinking level and save the startup default (rejects levels unsupported by the current model) |
package/docs/windows.md CHANGED
@@ -4,9 +4,9 @@ sidebarTitle: "Run on Windows"
4
4
  description: "Install Atomic on Windows, configure Bash and PowerShell, choose a terminal, and troubleshoot Windows or WSL."
5
5
  ---
6
6
 
7
- ## Install with PowerShell
7
+ ## Native install with PowerShell (recommended) {#install-with-powershell}
8
8
 
9
- Install the self-contained Windows release archive with Windows PowerShell 5.1 or newer (no Node.js or package manager required):
9
+ Run the native installer in PowerShell 5.1 or newer:
10
10
 
11
11
  ```powershell
12
12
  irm https://raw.githubusercontent.com/bastani-inc/atomic/main/install.ps1 | iex
@@ -20,7 +20,7 @@ To pin an exact release (`MAJOR.MINOR.PATCH` or `MAJOR.MINOR.PATCH-alpha.REVISIO
20
20
 
21
21
  By default, the installer verifies `SHA256SUMS`, stores versioned payloads under `%LOCALAPPDATA%\atomic`, and creates an ASCII-only `atomic.cmd` launcher plus an `atomic-current` junction in `%LOCALAPPDATA%\atomic\bin`. The relative shim supports Unicode install paths and custom bin directories.
22
22
 
23
- Override defaults with `ATOMIC_INSTALL_DIR`, `ATOMIC_BIN_DIR` (defaults to `<ATOMIC_INSTALL_DIR>\bin`, so changing `ATOMIC_INSTALL_DIR` moves the default bin directory too), `ATOMIC_VERSION` (`-Ref` takes precedence), or optional `GITHUB_TOKEN`/`GH_TOKEN` (used only if release resolution falls back to the GitHub API). See [Release archive](/getting-started/installation#release-archive) for cross-platform archive options and [Package managers](/getting-started/installation#package-managers) if you install with Node.js.
23
+ Override defaults with `ATOMIC_INSTALL_DIR`, `ATOMIC_BIN_DIR` (defaults to `<ATOMIC_INSTALL_DIR>\bin`, so changing `ATOMIC_INSTALL_DIR` moves the default bin directory too), `ATOMIC_VERSION` (`-Ref` takes precedence), or optional `GITHUB_TOKEN`/`GH_TOKEN` (used only if release resolution falls back to the GitHub API). If you use WSL, run the [macOS/Linux/WSL installer](/getting-started/installation#release-archive) inside your WSL terminal instead. If you installed with npm, pnpm, or Bun, see [Switch to the native installer](/getting-started/installation#switch-to-the-native-installer).
24
24
 
25
25
  ### Installer rules and edge cases
26
26
 
@@ -119,7 +119,7 @@ Run `atomic update` or `atomic update --self` to update Atomic (add `--force` to
119
119
 
120
120
  For writable global package-manager installs on Windows, Atomic handles loaded native add-ons during self-update so Windows file locks do not block replacement. For custom or wrapped installations, configure `selfUpdateCommand` in global settings or `ATOMIC_SELF_UPDATE_COMMAND` (see [Custom update command](/reference/cli#custom-update-command)).
121
121
 
122
- If Atomic cannot safely self-update an installation, it exits with an explanation naming the detected executable path when available and tells you how to update. Release archive installs are not updated by `atomic update`; rerun `install.ps1` instead. Standalone Bun binaries point you to the latest [Atomic releases](https://github.com/bastani-inc/atomic/releases/latest).
122
+ If `atomic update` can't update a native install, rerun the [PowerShell installer](#install-with-powershell). If another tool installed Atomic, use that tool to update it. For standalone binaries, see the latest [Atomic release](https://github.com/bastani-inc/atomic/releases/latest).
123
123
 
124
124
  ## Headless skills and file watchers
125
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.10.18",
3
+ "version": "0.10.19",
4
4
  "description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "atomicConfig": {
@@ -110,7 +110,7 @@
110
110
  "copy-binary-assets": "node ../../scripts/package-files.mjs copy package.json dist/ && node ../../scripts/package-files.mjs copy README.md dist/ && node ../../scripts/package-files.mjs copy CHANGELOG.md dist/ && node ../../scripts/package-files.mjs copy src/modes/interactive/theme/*.json dist/theme/ && node ../../scripts/package-files.mjs copy src/modes/interactive/assets/*.png dist/assets/ && node ../../scripts/package-files.mjs copy src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js src/core/export-html/saved-agent-viewer.js dist/export-html/ && node ../../scripts/package-files.mjs copy src/core/export-html/vendor/*.js dist/export-html/vendor/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/dist/native-modifiers.js dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/dist/native-module-path.js dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/dist/native-platform.js dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/native/win32/prebuilds/win32-* dist/native/win32/prebuilds/ && node ../../scripts/package-files.mjs copy docs dist/ && node ../../scripts/package-files.mjs copy examples dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/ && bun run copy-builtin-packages",
111
111
  "copy-builtin-packages": "bun run scripts/copy-builtin-packages.ts",
112
112
  "assert-binary-assets": "bun run scripts/assert-pi-runtime-assets.ts --app dist/app.js",
113
- "docs:check": "bun run scripts/validate-docs-links.ts && bun run ../../scripts/sync-changelog-docs.ts --check",
113
+ "docs:check": "bun run ../../scripts/sync-changelog-docs.ts --check && bun run scripts/validate-docs-links.ts",
114
114
  "generate:schemas": "bun run scripts/generate-schemas.ts",
115
115
  "generate:references": "bun run scripts/generate-references.ts",
116
116
  "test": "vitest --run",
@@ -118,13 +118,13 @@
118
118
  "prepack": "node -e \"require('node:fs').existsSync('scripts/split-dist.mjs') && import('./scripts/split-dist.mjs').then(() => import('./scripts/write-startup-files.mjs')).then(() => import('./scripts/write-startup-stages.mjs'))\""
119
119
  },
120
120
  "dependencies": {
121
- "@bastani/atomic-natives": "0.10.18",
122
- "@bastani/atomic-ai": "0.10.18",
123
- "@bastani/atomic-agent-core": "0.10.18",
124
- "@bastani/atomic-codemode": "0.10.18",
125
- "@bastani/atomic-tui": "0.10.18",
126
- "@bastani/atomic-schema": "0.10.18",
127
- "@bastani/atomic-telemetry": "0.10.18",
121
+ "@bastani/atomic-natives": "0.10.19",
122
+ "@bastani/atomic-ai": "0.10.19",
123
+ "@bastani/atomic-agent-core": "0.10.19",
124
+ "@bastani/atomic-codemode": "0.10.19",
125
+ "@bastani/atomic-tui": "0.10.19",
126
+ "@bastani/atomic-schema": "0.10.19",
127
+ "@bastani/atomic-telemetry": "0.10.19",
128
128
  "@silvia-odwyer/photon-node": "0.3.4",
129
129
  "chalk": "6.0.0",
130
130
  "glob": "14.0.6",