@bastani/atomic 0.10.9 → 0.10.10-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +211 -155
  3. package/dist/_shared/dist-KOELCESV.js +2 -2
  4. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  5. package/dist/_shared/lib-4PES5P4V.js +2 -2
  6. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +27 -12
  7. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  8. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
  9. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  10. package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
  11. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  12. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
  13. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
  14. package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
  15. package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
  16. package/dist/_shared/runtime-O4KCSG4C.js +5 -5
  17. package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
  18. package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
  19. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  20. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  21. package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
  22. package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
  23. package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
  24. package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
  25. package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
  26. package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
  27. package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +145 -58
  28. package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
  29. package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
  30. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
  31. package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
  32. package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
  33. package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
  34. package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
  35. package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
  36. package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
  37. package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
  38. package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
  39. package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
  40. package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
  41. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  42. package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
  43. package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
  44. package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
  45. package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
  46. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  47. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  48. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  49. package/dist/builtin/intercom/README.md +85 -114
  50. package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
  51. package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
  52. package/dist/builtin/intercom/group.ts +7 -3
  53. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  54. package/dist/builtin/intercom/package.json +1 -1
  55. package/dist/builtin/mcp/README.md +37 -27
  56. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  57. package/dist/builtin/mcp/package.json +1 -1
  58. package/dist/builtin/subagents/CHANGELOG.md +8 -0
  59. package/dist/builtin/subagents/README.md +71 -138
  60. package/dist/builtin/subagents/package.json +1 -1
  61. package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
  62. package/dist/builtin/web-access/CHANGELOG.md +9 -0
  63. package/dist/builtin/web-access/README.md +60 -87
  64. package/dist/builtin/web-access/index.bundle.mjs +387 -351
  65. package/dist/builtin/web-access/package.json +1 -1
  66. package/dist/cli/args.js +2 -2
  67. package/dist/cli/auth-cli.code.js +4 -4
  68. package/dist/cli/auth-cli.impl.js +3 -3
  69. package/dist/cli/auth-cli.js +3 -3
  70. package/dist/cli/blueprint-command.code.js +2 -2
  71. package/dist/cli/blueprint-command.impl.js +3 -3
  72. package/dist/cli/blueprint-command.js +3 -3
  73. package/dist/cli/intercom-command.code.js +3 -3
  74. package/dist/cli/intercom-command.impl.js +3 -3
  75. package/dist/cli/intercom-command.js +3 -3
  76. package/dist/cli/list-models.code.js +3 -3
  77. package/dist/cli/list-models.impl.js +3 -3
  78. package/dist/cli/list-models.js +3 -3
  79. package/dist/cli/session-picker.code.js +2 -2
  80. package/dist/cli/session-picker.impl.js +3 -3
  81. package/dist/cli/session-picker.js +3 -3
  82. package/dist/cli/startup-ui.code.js +2 -2
  83. package/dist/cli/startup-ui.impl.js +3 -3
  84. package/dist/cli/startup-ui.js +3 -3
  85. package/dist/cli/storage-command.impl.js +3 -3
  86. package/dist/cli/storage-command.js +3 -3
  87. package/dist/cli/storage-search-session.code.js +2 -2
  88. package/dist/cli/storage-search-session.impl.js +3 -3
  89. package/dist/cli/storage-search-session.js +3 -3
  90. package/dist/cli/team-command.code.js +2 -2
  91. package/dist/cli/team-command.impl.js +3 -3
  92. package/dist/cli/team-command.js +3 -3
  93. package/dist/cli.js +2 -2
  94. package/dist/core/agent-session-methods.d.ts +4 -1
  95. package/dist/core/agent-session-methods.js.map +1 -1
  96. package/dist/core/agent-session.d.ts +3 -0
  97. package/dist/core/compaction/compactor.d.ts +20 -14
  98. package/dist/core/compaction/errors.d.ts +120 -0
  99. package/dist/core/compaction/index.d.ts +1 -0
  100. package/dist/core/compaction/model-resolver.d.ts +2 -2
  101. package/dist/core/debug.impl.js +3 -3
  102. package/dist/core/debug.js +3 -3
  103. package/dist/core/export-html/card-projection.impl.js +3 -3
  104. package/dist/core/export-html/card-projection.js +3 -3
  105. package/dist/core/export-html/index.code.js +2 -2
  106. package/dist/core/export-html/index.impl.js +3 -3
  107. package/dist/core/export-html/index.js +3 -3
  108. package/dist/core/export-html/json-spans.impl.js +3 -3
  109. package/dist/core/export-html/json-spans.js +3 -3
  110. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  111. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  112. package/dist/core/export-html/tool-renderer.code.js +1 -1
  113. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  114. package/dist/core/export-html/tool-renderer.js +3 -3
  115. package/dist/core/extensions/api-types.d.ts +1 -1
  116. package/dist/core/extensions/api-types.js.map +1 -1
  117. package/dist/core/extensions/index.d.ts +1 -1
  118. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  119. package/dist/core/extensions/jiti-loader.js +3 -3
  120. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  121. package/dist/core/extensions/jiti-static-loader.js +3 -3
  122. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  123. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  124. package/dist/core/extensions/loader-host-modules.js +3 -3
  125. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  126. package/dist/core/extensions/provider-types.d.ts +18 -6
  127. package/dist/core/extensions/provider-types.js.map +1 -1
  128. package/dist/core/extensions/runner-context.js +1 -1
  129. package/dist/core/intercom-broker-control-host.code.js +1 -1
  130. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  131. package/dist/core/intercom-broker-control-host.js +3 -3
  132. package/dist/core/intercom-broker-control.code.js +3 -3
  133. package/dist/core/intercom-broker-control.impl.js +3 -3
  134. package/dist/core/intercom-broker-control.js +3 -3
  135. package/dist/core/model-config.d.ts +40 -0
  136. package/dist/core/model-registry.js +1 -1
  137. package/dist/core/model-resolver-scope.d.ts +4 -4
  138. package/dist/core/model-runtime.d.ts +1 -1
  139. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  140. package/dist/core/package-manager-storage-adapters.js +3 -3
  141. package/dist/core/provider-composer-internal.d.ts +11 -2
  142. package/dist/core/sdk.code.js +3 -3
  143. package/dist/core/sdk.impl.js +3 -3
  144. package/dist/core/sdk.js +3 -3
  145. package/dist/core/session-manager-core.js +5 -5
  146. package/dist/core/session-manager-list.impl.js +3 -3
  147. package/dist/core/session-manager-list.js +3 -3
  148. package/dist/core/session-manager.code.js +1 -1
  149. package/dist/core/session-manager.impl.js +3 -3
  150. package/dist/core/session-manager.js +3 -3
  151. package/dist/core/session-storage.impl.js +3 -3
  152. package/dist/core/session-storage.js +3 -3
  153. package/dist/core/settings-manager-basic-accessors.d.ts +6 -2
  154. package/dist/core/storage/index.js +2 -2
  155. package/dist/core/storage/node-sqlite-thread.js +2 -2
  156. package/dist/core/storage/node-sqlite.js +2 -2
  157. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  158. package/dist/core/storage/offline-snapshot-file.js +3 -3
  159. package/dist/core/storage/provider.js +2 -2
  160. package/dist/core/storage/selection.js +2 -2
  161. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  162. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  163. package/dist/core/storage/session/branch-fork-source.js +3 -3
  164. package/dist/core/storage/session/card-view.impl.js +3 -3
  165. package/dist/core/storage/session/card-view.js +3 -3
  166. package/dist/core/storage/session/child-reader.code.js +3 -3
  167. package/dist/core/storage/session/child-reader.impl.js +3 -3
  168. package/dist/core/storage/session/child-reader.js +3 -3
  169. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  170. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  171. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  172. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  173. package/dist/core/storage/session/expanded-child-details.js +3 -3
  174. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  175. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  176. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  177. package/dist/core/storage/session/fork-row-index.js +3 -3
  178. package/dist/core/storage/session/fork-staging.code.js +2 -2
  179. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  180. package/dist/core/storage/session/fork-staging.js +3 -3
  181. package/dist/core/storage/session/fork-window.code.js +3 -3
  182. package/dist/core/storage/session/fork-window.impl.js +3 -3
  183. package/dist/core/storage/session/fork-window.js +3 -3
  184. package/dist/core/storage/session/history-pages.impl.js +3 -3
  185. package/dist/core/storage/session/history-pages.js +3 -3
  186. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  187. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  188. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  189. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  190. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  191. package/dist/core/storage/session/memory-session-store.js +3 -3
  192. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  193. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  194. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  195. package/dist/core/storage/session/released-history-files.code.js +3 -3
  196. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  197. package/dist/core/storage/session/released-history-files.js +3 -3
  198. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  199. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  200. package/dist/core/storage/session/session-resume.impl.js +3 -3
  201. package/dist/core/storage/session/session-resume.js +3 -3
  202. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  203. package/dist/core/storage/session/snapshot-cut.js +3 -3
  204. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  205. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  206. package/dist/core/storage/session/snapshot-history.js +3 -3
  207. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  208. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  209. package/dist/core/storage/session/sql-session-store.js +3 -3
  210. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  211. package/dist/core/storage/session/tree-outline.js +3 -3
  212. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  213. package/dist/core/storage/session/tree-presentation.js +3 -3
  214. package/dist/core/storage/storage-status.impl.js +3 -3
  215. package/dist/core/storage/storage-status.js +3 -3
  216. package/dist/core/storage/team.impl.js +3 -3
  217. package/dist/core/storage/team.js +3 -3
  218. package/dist/core/structured-output/index.code.js +1 -1
  219. package/dist/core/structured-output/index.impl.js +3 -3
  220. package/dist/core/structured-output/index.js +3 -3
  221. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  222. package/dist/core/tasks/task-completion-entry.js +3 -3
  223. package/dist/core/tasks/task-file-history.code.js +3 -3
  224. package/dist/core/tasks/task-file-history.impl.js +3 -3
  225. package/dist/core/tasks/task-file-history.js +3 -3
  226. package/dist/core/tasks/task-reference-archive.code.js +4 -4
  227. package/dist/core/tasks/task-reference-archive.js +3 -3
  228. package/dist/core/tasks/task-reference-identity.code.js +1 -1
  229. package/dist/core/tasks/task-reference-identity.js +3 -3
  230. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  231. package/dist/core/tasks/task-reference-stream.js +3 -3
  232. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  233. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  234. package/dist/core/tasks/task-view-source.impl.js +3 -3
  235. package/dist/core/tasks/task-view-source.js +3 -3
  236. package/dist/core/tools/read-url.code.js +2 -2
  237. package/dist/core/tools/read-url.impl.js +3 -3
  238. package/dist/core/tools/read-url.js +3 -3
  239. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  240. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  241. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  242. package/dist/core/worktree-snapshot/errors.js +3 -3
  243. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  244. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  245. package/dist/extensions/codemode/execute.code.js +1 -1
  246. package/dist/extensions/codemode/execute.impl.js +3 -3
  247. package/dist/extensions/codemode/execute.js +3 -3
  248. package/dist/extensions/codemode/renderer.code.js +2 -2
  249. package/dist/extensions/codemode/renderer.impl.js +3 -3
  250. package/dist/extensions/codemode/renderer.js +3 -3
  251. package/dist/extensions/mcp/cli.code.js +2 -2
  252. package/dist/extensions/mcp/cli.impl.js +3 -3
  253. package/dist/extensions/mcp/cli.js +3 -3
  254. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  255. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  256. package/dist/extensions/mcp/cli.lazy.js +3 -3
  257. package/dist/extensions/mcp/runtime.code.js +1 -1
  258. package/dist/extensions/mcp/runtime.impl.js +3 -3
  259. package/dist/extensions/mcp/runtime.js +3 -3
  260. package/dist/index-extensions.d.ts +1 -1
  261. package/dist/index.d.ts +8 -1
  262. package/dist/index.js +7 -7
  263. package/dist/main-first-time-setup.code.js +2 -2
  264. package/dist/main-first-time-setup.impl.js +3 -3
  265. package/dist/main-first-time-setup.js +3 -3
  266. package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -0
  267. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  268. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  269. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  270. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  271. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  272. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  273. package/dist/modes/interactive/theme/color-utils.d.ts +5 -5
  274. package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
  275. package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
  276. package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
  277. package/dist/modes/print-mode.js +1 -1
  278. package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
  279. package/dist/modes/rpc/rpc-types.d.ts +29 -2
  280. package/dist/package-manager-cli.code.js +5 -5
  281. package/dist/package-manager-cli.impl.js +3 -3
  282. package/dist/package-manager-cli.js +3 -3
  283. package/dist/rpc-entry.js +1 -1
  284. package/dist/startup-files.json +1 -1
  285. package/dist/startup-stages/5.js +1 -1
  286. package/dist/startup-stages/7.js +1 -1
  287. package/dist/startup-stages/8.js +1 -2
  288. package/dist/startup-stages/9.js +2 -1
  289. package/dist/utils/native-module.d.ts +44 -0
  290. package/dist/utils/startup-database-spare.code.js +3 -3
  291. package/dist/utils/startup-database-spare.impl.js +3 -3
  292. package/dist/utils/startup-database-spare.js +3 -3
  293. package/dist/utils/tools-manager.code.js +1 -1
  294. package/dist/utils/tools-manager.impl.js +3 -3
  295. package/dist/utils/tools-manager.js +3 -3
  296. package/docs/background-tasks.md +235 -243
  297. package/docs/build.md +12 -11
  298. package/docs/codemode.md +60 -51
  299. package/docs/compaction/reference.md +61 -24
  300. package/docs/compaction.md +117 -65
  301. package/docs/computer-use.md +179 -146
  302. package/docs/containerization.md +79 -33
  303. package/docs/custom-provider/api-reference.md +148 -11
  304. package/docs/custom-provider/oauth.md +44 -27
  305. package/docs/custom-provider/override.md +14 -7
  306. package/docs/custom-provider/registration.md +75 -65
  307. package/docs/custom-provider/streaming.md +42 -19
  308. package/docs/custom-provider.md +25 -61
  309. package/docs/development.md +47 -43
  310. package/docs/docs.json +33 -33
  311. package/docs/environment-variables.md +83 -57
  312. package/docs/extensions/api-reference.md +323 -734
  313. package/docs/extensions/authoring.md +186 -269
  314. package/docs/extensions/events.md +308 -375
  315. package/docs/extensions/examples.md +122 -74
  316. package/docs/extensions/ui.md +217 -197
  317. package/docs/extensions.md +152 -259
  318. package/docs/getting-started/authentication.md +27 -14
  319. package/docs/getting-started/first-session.md +25 -26
  320. package/docs/getting-started/installation.md +62 -84
  321. package/docs/getting-started/project-instructions.md +39 -14
  322. package/docs/guides/configuration.md +42 -20
  323. package/docs/guides/intercom.md +17 -13
  324. package/docs/guides/non-interactive.md +29 -16
  325. package/docs/guides/orchestration.md +16 -10
  326. package/docs/guides/resume-on-any-machine.md +54 -49
  327. package/docs/guides/subagents.md +22 -14
  328. package/docs/guides/team-setup.md +37 -26
  329. package/docs/guides.md +22 -21
  330. package/docs/herdr.md +21 -16
  331. package/docs/index.md +16 -17
  332. package/docs/intercom/operations.md +68 -66
  333. package/docs/intercom/reference.md +196 -191
  334. package/docs/intercom.md +103 -92
  335. package/docs/json.md +71 -71
  336. package/docs/keybindings.md +63 -50
  337. package/docs/libraries/agent-core.md +49 -8
  338. package/docs/libraries/ai.md +21 -12
  339. package/docs/libraries/codemode.md +28 -6
  340. package/docs/libraries/schema.md +7 -7
  341. package/docs/libraries/telemetry.md +7 -7
  342. package/docs/libraries/tui.md +74 -94
  343. package/docs/libraries.md +5 -5
  344. package/docs/llama-cpp.md +38 -33
  345. package/docs/mcp-servers.md +96 -90
  346. package/docs/models/reference.md +46 -33
  347. package/docs/models-configuration.md +12 -6
  348. package/docs/models.md +93 -88
  349. package/docs/orchestration/migrating-workflows.md +21 -19
  350. package/docs/orchestration/patterns.md +35 -20
  351. package/docs/orchestration.md +22 -21
  352. package/docs/packages/authoring.md +28 -19
  353. package/docs/packages/reference.md +75 -16
  354. package/docs/packages.md +31 -33
  355. package/docs/programmatic.md +22 -21
  356. package/docs/prompt-templates.md +63 -41
  357. package/docs/providers/reference.md +35 -19
  358. package/docs/providers.md +61 -71
  359. package/docs/quickstart.md +32 -46
  360. package/docs/reference/cli.md +249 -252
  361. package/docs/reference.md +23 -20
  362. package/docs/rpc/examples.md +74 -17
  363. package/docs/rpc/extension-ui.md +79 -62
  364. package/docs/rpc/protocol.md +816 -358
  365. package/docs/rpc.md +75 -151
  366. package/docs/sdk/reference.md +175 -45
  367. package/docs/sdk/structured-decisions.md +92 -62
  368. package/docs/sdk/web-server.md +79 -46
  369. package/docs/sdk.md +237 -195
  370. package/docs/security.md +106 -43
  371. package/docs/session-format.md +96 -59
  372. package/docs/sessions.md +149 -113
  373. package/docs/settings.md +289 -204
  374. package/docs/shell-aliases.md +15 -6
  375. package/docs/skills/authoring.md +17 -9
  376. package/docs/skills/reference.md +23 -21
  377. package/docs/skills.md +104 -97
  378. package/docs/storage.md +140 -242
  379. package/docs/subagents/authoring.md +147 -16
  380. package/docs/subagents/reference.md +100 -30
  381. package/docs/subagents.md +220 -252
  382. package/docs/terminal-setup.md +97 -69
  383. package/docs/termux.md +51 -85
  384. package/docs/themes/reference.md +51 -37
  385. package/docs/themes.md +49 -54
  386. package/docs/tmux.md +38 -21
  387. package/docs/tools.md +198 -147
  388. package/docs/tui/reference.md +64 -32
  389. package/docs/tui.md +38 -66
  390. package/docs/usage.md +76 -78
  391. package/docs/verification.md +25 -25
  392. package/docs/web-access.md +72 -55
  393. package/docs/windows.md +53 -58
  394. package/docs/worktree-snapshots.md +62 -65
  395. package/package.json +8 -8
  396. package/schemas/models.schema.json +51 -0
  397. package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
  398. package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
  399. package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
  400. package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
  401. package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
@@ -1,71 +1,67 @@
1
1
  ---
2
2
  title: "Terminal setup"
3
- description: "Configure terminals for Kitty keyboard protocol, modifier keys, mouse behavior, and program status reporting."
3
+ sidebarTitle: "Terminal setup"
4
+ description: "Configure terminal emulators for modified keys, mouse and clipboard behavior, inline images, hyperlinks, and status reporting."
4
5
  ---
5
6
 
6
- # Terminal setup
7
+ ## How keyboard detection works
7
8
 
8
- Atomic uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, though some need extra configuration.
9
+ Atomic enables the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) when your terminal supports it and falls back to xterm `modifyOtherKeys` where available. Most modern terminal emulators work out of the box; a few need one setting or keybinding override.
9
10
 
10
- ## Kitty
11
+ Both `Shift+Enter` and `Ctrl+J` insert a newline by default (`tui.input.newLine`). If your terminal cannot tell `Shift+Enter` apart from `Enter`, press `Ctrl+J` right away without changing any config.
11
12
 
12
- Works out of the box.
13
+ ## Terminal emulator settings
13
14
 
14
- ## iTerm2
15
+ ### Kitty
15
16
 
16
- Key reporting works out of the box. In the fullscreen TUI, Atomic owns the viewport, so iTerm2 sends mouse-wheel reports instead of scrolling its native scrollback.
17
+ Works out of the box, including Kitty inline images, OSC 8 hyperlinks, truecolor, and modified keys.
17
18
 
18
- iTerm2's default fast-trackpad behavior can drop most of an accelerated wheel delta in those reports, which makes fullscreen scrolling slower than native scrolling.
19
+ ### iTerm2
19
20
 
20
- If fast mouse-wheel gestures move only about one line at a time in Atomic:
21
+ Key reporting, iTerm2 inline images, OSC 8 hyperlinks, and truecolor work out of the box. In the fullscreen TUI, Atomic owns the viewport, so iTerm2 sends mouse-wheel reports instead of scrolling its native scrollback.
22
+
23
+ iTerm2's default fast-trackpad setting can drop most of an accelerated wheel delta in those reports, making fullscreen scrolling feel slower than native scrolling. If fast trackpad scrolls move only about one line at a time:
21
24
 
22
25
  1. Open iTerm2 settings and go to **Advanced**.
23
26
  2. Search for **Trackpad scrolls fast?** and set it to **No**.
24
27
 
25
- This setting applies across iTerm2 and may also change native trackpad scrolling. The underlying behavior is tracked in [iTerm2 issue 9619](https://gitlab.com/gnachman/iterm2/-/work_items/9619).
26
-
27
- ## Apple Terminal
28
+ This setting applies across iTerm2 and may also affect native trackpad scrolling. See [iTerm2 issue 9619](https://gitlab.com/gnachman/iterm2/-/work_items/9619).
28
29
 
29
- Atomic enables enhanced key reporting when available. If Terminal.app still sends plain Return for `SHIFT+Enter`, Atomic uses a local macOS modifier fallback to treat that Return as `SHIFT+Enter`.
30
+ ### Apple Terminal
30
31
 
31
- This fallback works only when Atomic runs on the same Mac as Terminal.app; it cannot inspect the local keyboard over remote SSH.
32
+ Atomic enables enhanced key reporting when available. If Terminal.app still sends plain Return or `ESC+CR` when you press `Shift+Enter`, Atomic uses a local macOS modifier fallback to recognize `Shift+Enter`. This fallback works only when Atomic runs on the same Mac as Terminal.app, not over remote SSH.
32
33
 
33
- Because Terminal.app draws gaps between rows of the block-character logo in the startup header, Atomic shows a text `∀ Atomic` wordmark with the version and session details instead.
34
+ Apple Terminal does not support 24-bit truecolor, so Atomic automatically uses 256-color mode. Because Terminal.app draws gaps between rows of the block-character logo, Atomic displays a text `∀ Atomic` wordmark with version and session details instead.
34
35
 
35
- ## Ghostty
36
+ ### Ghostty
36
37
 
37
- Add to your Ghostty config (`~/Library/Application Support/com.mitchellh.ghostty/config` on macOS, `~/.config/ghostty/config` on Linux):
38
+ Add this line to your Ghostty config (`~/Library/Application Support/com.mitchellh.ghostty/config` on macOS, `~/.config/ghostty/config` on Linux) so `Option+Backspace` or `Alt+Backspace` deletes the previous word cleanly:
38
39
 
39
40
  ```text
40
41
  keybind = alt+backspace=text:\x1b\x7f
41
42
  ```
42
43
 
43
- Older terminal setups may have added this Ghostty mapping:
44
+ Older setups may have added:
44
45
 
45
46
  ```text
46
47
  keybind = shift+enter=text:\n
47
48
  ```
48
49
 
49
- That mapping sends a raw linefeed byte (`CTRL+J`), so tmux and Atomic do not receive a real `shift+enter` key event. Remove it unless another tool in your setup still needs it. Because `ctrl+j` is already bound to `tui.input.newLine` by default (`["shift+enter", "ctrl+j"]`), keeping that mapping still inserts a newline in Atomic with no change to `~/.atomic/agent/keybindings.json`.
50
+ That mapping sends a raw linefeed byte (`Ctrl+J`), preventing tmux and Atomic from seeing a real `Shift+Enter` key event. Remove it unless another tool still needs it. Because `Ctrl+J` is already bound to `tui.input.newLine` (`["shift+enter", "ctrl+j"]`), keeping it still inserts a newline in Atomic with no change to `~/.atomic/agent/keybindings.json`.
50
51
 
51
- In the fullscreen TUI, links stay clickable, though Ghostty does not show its hover underline or lower-left URL preview while Atomic captures mouse input. Hold `Shift+Command` on macOS or `Shift+Ctrl` on Linux to use Ghostty's native link handling.
52
+ In the fullscreen TUI, links stay clickable, though Ghostty hides its hover underline and lower-left URL preview while Atomic captures mouse input. Hold `Shift+Command` on macOS or `Shift+Ctrl` on Linux to use Ghostty's native link handling.
52
53
 
53
- ## WezTerm
54
+ ### WezTerm
54
55
 
55
- WezTerm usually works out of the box for `SHIFT+Enter` through xterm `modifyOtherKeys`. To enable the Kitty keyboard protocol explicitly, create `~/.wezterm.lua`:
56
+ WezTerm usually works out of the box for `Shift+Enter` via xterm `modifyOtherKeys`. To enable the Kitty keyboard protocol explicitly and forward `Option+Enter` for macOS or Linux follow-up queueing (WezTerm binds `Option+Enter` to fullscreen on macOS by default), configure `~/.wezterm.lua`:
56
57
 
57
58
  ```lua
58
59
  local wezterm = require 'wezterm'
59
60
  local config = wezterm.config_builder()
60
- config.enable_kitty_keyboard = true
61
- return config
62
- ```
63
61
 
64
- On macOS, WezTerm binds `Option+Enter` to fullscreen by default. To forward `Option+Enter` for Atomic follow-up queueing, add this override:
62
+ config.enable_kitty_keyboard = true
65
63
 
66
- ```lua
67
- local wezterm = require 'wezterm'
68
- local config = wezterm.config_builder()
64
+ -- Optional on macOS/Linux (Windows and WSL use Ctrl+Q by default):
69
65
  config.keys = {
70
66
  {
71
67
  key = 'Enter',
@@ -73,16 +69,17 @@ config.keys = {
73
69
  action = wezterm.action.SendString('\x1b[13;3u'),
74
70
  },
75
71
  }
72
+
76
73
  return config
77
74
  ```
78
75
 
79
- If you already have a `config.keys` table, add the entry to it.
76
+ If you already have a `~/.wezterm.lua` or `config.keys` table, merge these settings into your existing file instead of replacing it.
80
77
 
81
- On WSL, WezTerm may need a visible hardware cursor to position CJK IME candidate windows. Set `ATOMIC_HARDWARE_CURSOR=1` before running Atomic, or set `"showHardwareCursor": true` in settings. The legacy `PI_HARDWARE_CURSOR=1` alias also works.
78
+ On WSL, WezTerm may need a visible hardware cursor to position CJK IME candidate windows. Set `"showHardwareCursor": true` in `~/.atomic/agent/settings.json`, or set `ATOMIC_HARDWARE_CURSOR=1` (legacy `PI_HARDWARE_CURSOR=1`) before launching Atomic. An explicit `showHardwareCursor` value in `settings.json` takes precedence over the environment variable.
82
79
 
83
- ## Alacritty
80
+ ### Alacritty
84
81
 
85
- Alacritty usually works out of the box for `SHIFT+Enter`. On macOS, `Option+Enter` may arrive as plain `Enter`. To forward `Option+Enter` for Atomic follow-up queueing, add to `~/.config/alacritty/alacritty.toml`:
82
+ Alacritty usually works out of the box for `Shift+Enter`. On macOS, `Option+Enter` may arrive as plain `Enter`. To forward `Option+Enter` for follow-up queueing, add this entry to `~/.config/alacritty/alacritty.toml` and restart Alacritty:
86
83
 
87
84
  ```toml
88
85
  [[keyboard.bindings]]
@@ -91,17 +88,11 @@ mods = "Alt"
91
88
  chars = "\u001b[13;3u"
92
89
  ```
93
90
 
94
- Restart Alacritty after saving the change.
95
-
96
- ## VS Code (integrated terminal)
97
-
98
- VS Code 1.109.5 and newer enable the Kitty keyboard protocol in the integrated terminal by default, so `SHIFT+Enter` works out of the box.
91
+ ### VS Code (integrated terminal)
99
92
 
100
- Older VS Code versions need an explicit terminal keybinding in `keybindings.json`:
93
+ VS Code 1.109.5 and newer enable the Kitty keyboard protocol in the integrated terminal by default, so `Shift+Enter` works out of the box.
101
94
 
102
- - macOS: `~/Library/Application Support/Code/User/keybindings.json`
103
- - Linux: `~/.config/Code/User/keybindings.json`
104
- - Windows: `%APPDATA%\Code\User\keybindings.json`
95
+ Older VS Code versions need an explicit terminal keybinding in `keybindings.json` (`~/Library/Application Support/Code/User/keybindings.json` on macOS, `~/.config/Code/User/keybindings.json` on Linux, `%APPDATA%\Code\User\keybindings.json` on Windows):
105
96
 
106
97
  ```json
107
98
  {
@@ -112,7 +103,7 @@ Older VS Code versions need an explicit terminal keybinding in `keybindings.json
112
103
  }
113
104
  ```
114
105
 
115
- ## Zed (integrated terminal)
106
+ ### Zed (integrated terminal)
116
107
 
117
108
  Add these bindings to your Zed `keymap.json`:
118
109
 
@@ -127,9 +118,9 @@ Add these bindings to your Zed `keymap.json`:
127
118
  }
128
119
  ```
129
120
 
130
- ## Windows Terminal
121
+ ### Windows Terminal
131
122
 
132
- Add a `shift+enter` action to `settings.json` (press `CTRL+SHIFT+,` or open **Settings**, then **Open JSON file**) so `SHIFT+Enter` inserts a new line:
123
+ On native Windows, Atomic checks the native Shift modifier on Return automatically. Add this `shift+enter` action to `settings.json` (press `Ctrl+Shift+,` or open **Settings**, then **Open JSON file**) when using WSL, SSH into Linux, or explicit CSI-u reporting:
133
124
 
134
125
  ```json
135
126
  {
@@ -142,44 +133,81 @@ Add a `shift+enter` action to `settings.json` (press `CTRL+SHIFT+,` or open **Se
142
133
  }
143
134
  ```
144
135
 
145
- On Windows and WSL, follow-up queueing defaults to `Ctrl+Q` (`Alt+Q` to dequeue), so you do not need to remap `ALT+Enter` for default keybindings. If you manually bind an Atomic action to `alt+enter`, add a matching `sendInput` action for `"keys": "alt+enter"` with `"input": "\u001b[13;3u"` to override Windows Terminal's default fullscreen shortcut.
136
+ On Windows and WSL, follow-up queueing defaults to `Ctrl+Q` and dequeue defaults to `Alt+Q`, so you do not need to remap `Alt+Enter` for default shortcuts. Only add an `alt+enter` action (`"input": "\u001b[13;3u"`) if you bind an Atomic action to `alt+enter` yourself. If you already have an `actions` array, append the entry to it and fully reopen Windows Terminal.
137
+
138
+ ### xfce4-terminal and terminator
139
+
140
+ These terminals have limited escape-sequence support and cannot distinguish `Ctrl+Enter` or `Shift+Enter` from plain `Enter`. Use `Ctrl+J` to insert newlines right away, or switch to a terminal with Kitty keyboard protocol support such as [Kitty](https://sw.kovidgoyal.net/kitty/), [Ghostty](https://ghostty.org/), [WezTerm](https://wezfurlong.org/wezterm/), [iTerm2](https://iterm2.com/), or [Alacritty](https://github.com/alacritty/alacritty) for full modified-key bindings.
141
+
142
+ ### IntelliJ IDEA (integrated terminal)
146
143
 
147
- If you already have an `actions` array, append the entry to it. Fully close and reopen Windows Terminal if the old behavior persists.
144
+ The built-in terminal cannot distinguish `Shift+Enter` from `Enter`; press `Ctrl+J` to insert newlines, or use a dedicated terminal emulator for full keybinding support.
148
145
 
149
- ## xfce4-terminal and terminator
146
+ The hardware cursor is hidden by default for compatibility. To show it, set `"showHardwareCursor": true` in settings or launch with `ATOMIC_HARDWARE_CURSOR=1` (legacy `PI_HARDWARE_CURSOR=1`).
150
147
 
151
- These terminals have limited escape-sequence support. Modified Enter keys such as `CTRL+Enter` and `SHIFT+Enter` cannot be distinguished from plain `Enter`, so custom bindings such as `"tui.input.submit": ["ctrl+enter"]` will not work.
148
+ ## Clipboard and mouse behavior
152
149
 
153
- For full keybinding support, use a terminal with Kitty keyboard protocol support:
150
+ ### Clipboard and OSC 52
154
151
 
155
- - [Kitty](https://sw.kovidgoyal.net/kitty/)
156
- - [Ghostty](https://ghostty.org/)
157
- - [WezTerm](https://wezfurlong.org/wezterm/)
158
- - [iTerm2](https://iterm2.com/)
159
- - [Alacritty](https://github.com/alacritty/alacritty) (when built with Kitty protocol support)
152
+ Atomic writes to your local clipboard using the platform tool (`pbcopy` on macOS, `clip` on Windows, `wl-copy` from `wl-clipboard` on Wayland, `xclip` or `xsel` on X11, or `termux-clipboard-set` in Termux).
160
153
 
161
- ## IntelliJ IDEA (integrated terminal)
154
+ - **Remote and headless sessions:** Over SSH, Mosh, or Rex (when `SSH_CONNECTION`, `SSH_CLIENT`, `MOSH_CONNECTION`, or `REX_SESSION` is set), and on headless Linux without `DISPLAY` or `WAYLAND_DISPLAY`, Atomic automatically sends copies through OSC 52 so your local client terminal receives the text.
155
+ - **WSL:** Inside Windows Terminal (`WT_SESSION`), Atomic prefers OSC 52 and falls back to Windows clipboard interop.
156
+ - **Forcing OSC 52:** Set `ATOMIC_CLIPBOARD_OSC52=1` (legacy `PI_CLIPBOARD_OSC52=1`) to also emit OSC 52 after local clipboard writes, which helps inside remote multiplexers or IDE daemons that do not set SSH environment variables.
157
+ - **Size limit and terminal support:** OSC 52 payloads are capped at 100,000 base64 characters (about 75 KB of UTF-8 text). Larger copies fail with a size-limit error when no local clipboard is available. Ensure your terminal emulator allows clipboard writes through OSC 52.
162
158
 
163
- The built-in terminal has limited escape-sequence support and cannot distinguish `SHIFT+Enter` from `Enter`.
159
+ ### Mouse, trackpad, and text selection
164
160
 
165
- To show the hardware cursor, set `ATOMIC_HARDWARE_CURSOR=1` (legacy alias `PI_HARDWARE_CURSOR=1`) before starting Atomic; the hardware cursor is hidden by default for compatibility. Use a dedicated terminal emulator for full keybinding support.
161
+ In the fullscreen TUI, Atomic captures mouse input for clicking expandable blocks and key hints, wheel scrolling (`Alt+wheel` scrolls five times as far when your terminal forwards Alt with wheel events), and drag, double-click, or triple-click selection.
162
+
163
+ - **Auto-copy and scroll settings:** Text selection copies automatically on mouse release unless `"fullscreenCopyOnSelect": false` is set in [Settings](/settings). Adjust wheel speed with `fullscreenWheelScrollLines` (`"auto"` or `1` to `100`) and scrollbar visibility with `fullscreenScrollbar` (`"auto"`, `"always"`, or `"hidden"`).
164
+ - **Windows right-click paste:** On native Windows outside VS Code's integrated terminal, an unmodified secondary mouse click pastes clipboard text into the focused input.
165
+ - **Multiplexers:** Inside tmux, GNU Screen, and Zellij, Atomic uses button-motion mouse reporting (`1002h`) instead of all-motion reporting (`1003h`) to keep terminal traffic light while preserving clicks, scrolling, and drag selection.
166
+ - **Native terminal override:** Hold `Shift` (or `Shift+Command` on macOS / `Shift+Ctrl` on Linux in Ghostty) to bypass Atomic's mouse capture and use your terminal emulator's own selection or link handling.
167
+
168
+ ## Inline images, hyperlinks, and colors
169
+
170
+ Atomic detects terminal capabilities automatically:
171
+
172
+ | Terminal | Inline images | OSC 8 hyperlinks | Color mode |
173
+ | --- | --- | --- | --- |
174
+ | Kitty, Ghostty, WezTerm, Warp, Herdr, Rex, Orca (`ORCA_IMAGE_PROTOCOL=kitty`) | Kitty protocol | Yes | Truecolor |
175
+ | iTerm2 | iTerm2 protocol | Yes | Truecolor |
176
+ | Windows Terminal (`WT_SESSION`), Alacritty, VS Code, Zed | No | Yes | Truecolor |
177
+ | IntelliJ IDEA (`JetBrains-JediTerm`), Windows consoles without `WT_SESSION` | No | No | Truecolor |
178
+ | Apple Terminal, GNU Screen (without `COLORTERM=truecolor`) | No | No | 256-color |
179
+ | tmux | Off by default | Only when `hyperlinks` is in `client_termfeatures` | Truecolor when `COLORTERM=truecolor`/`24bit` or `TERM` ends in `-direct` |
180
+
181
+ Override detected capabilities in `~/.atomic/agent/settings.json` (settings take precedence over environment variables) or with environment variables:
182
+
183
+ - **Inline images:** `terminal.images` (`"kitty"`, `"iterm2"`, `"auto"`, or `false`) or `ATOMIC_IMAGE_PROTOCOL` (`kitty`, `iterm2`, `none`, `0`, or `auto`). Control visibility and width with `terminal.showImages` and `terminal.imageWidthCells`.
184
+ - **OSC 8 hyperlinks:** `terminal.hyperlinks` (`true`, `false`, or `"auto"`) or `ATOMIC_HYPERLINKS` (`1`, `0`, or `auto`).
185
+ - **24-bit color:** `terminal.trueColor` (`true`, `false`, or `"auto"`) or `ATOMIC_TRUE_COLOR` (`1`, `0`, or `auto`).
186
+
187
+ See [tmux setup](/tmux) for multiplexer-specific image and hyperlink details.
188
+
189
+ ## SSH and Escape key delay
190
+
191
+ When Atomic receives a lone `ESC` byte, it waits briefly to tell whether you pressed `Escape` or started an `Alt`/escape sequence. The default wait is `10` ms locally and `100` ms when `SSH_CONNECTION` or `SSH_TTY` is set.
192
+
193
+ Over high-latency SSH connections, increase this wait with `ATOMIC_TUI_ESC_TIMEOUT` (legacy `PI_TUI_ESC_TIMEOUT`) if `Alt` combinations register as `Escape`:
194
+
195
+ ```bash
196
+ ATOMIC_TUI_ESC_TIMEOUT=150 atomic
197
+ ```
166
198
 
167
199
  ## Program status
168
200
 
169
- Atomic reports its state with the [Program Status Protocol (OSC 7501)](https://www.superlogical.com/rex/docs/build/program-status), so supporting terminals and dashboards can show whether it is working, waiting for you, done, or failed:
201
+ Atomic reports its state using the [Program Status Protocol (OSC 7501)](https://www.superlogical.com/rex/docs/build/program-status) so supporting terminals and dashboards can show whether it is working, waiting for input, done, or failed:
170
202
 
171
203
  | State | When |
172
204
  | --- | --- |
173
205
  | `working` | An agent run or compaction is in progress. The message is the session name, or `Compacting context`. |
174
- | `blocked` | A dialog, question, or login waits for you. |
175
- | `done` | The agent run finished successfully. The message is the session name. |
176
- | `error` | A run ended with an error that is not retried. The message is the first line of the error. |
177
- | `idle` | Atomic started, or you cancelled the run. |
178
-
179
- Reports never include prompts or model output. Atomic sends them only after the terminal answers the protocol's support query; tmux and screen do not forward them. Set `ATOMIC_PROGRAM_STATUS=1` to send reports without querying, or `ATOMIC_PROGRAM_STATUS=0` to disable them (`PI_PROGRAM_STATUS` is a legacy alias).
180
-
181
- ## Moved sections
206
+ | `blocked` | A dialog, question, or login waits for you. Project trust prompts do not report `blocked` through OSC 7501. |
207
+ | `done` | An agent run or manual `/compact` finished successfully. The message is the session name. |
208
+ | `error` | A run or manual `/compact` ended with an error that is not retried. The message is the first line of the error. |
209
+ | `idle` | Atomic started, or you cancelled the run or compaction. |
182
210
 
183
- <a id="startup-typing" />
211
+ Reports never include prompts or model output. Status messages are capped at 2,048 UTF-8 bytes and control characters are replaced with spaces. On normal exit or `Ctrl+Z` suspend, Atomic sends `state=clear` to remove the indicator (and re-sends its status on resume).
184
212
 
185
- Startup typing moved to [Interactive use](/usage#startup-typing).
213
+ Atomic sends reports only after the terminal answers its support query; tmux and GNU Screen do not forward OSC 7501. Set `ATOMIC_PROGRAM_STATUS=1` to force reports without querying, or `ATOMIC_PROGRAM_STATUS=0` to disable them (`PI_PROGRAM_STATUS` is a legacy alias). Any other value queries the terminal normally.
package/docs/termux.md CHANGED
@@ -1,132 +1,90 @@
1
1
  ---
2
- title: "Termux"
3
- description: "Android Termux compatibility, native module requirements, clipboard support, and setup notes."
2
+ title: "Termux (Android) setup"
3
+ sidebarTitle: "Termux (Android)"
4
+ description: "Install Atomic in Termux on Android, build the required native module, and configure clipboard access."
4
5
  ---
5
6
 
6
- # Termux (Android) setup
7
-
8
7
  [Termux](https://termux.dev/) provides a terminal emulator and Linux environment on Android.
9
8
 
10
- Termux uses Android's bionic libc, not Alpine's musl libc. Do not run the root `install.sh` there. Atomic's glibc and musl Linux release archives are not Android packages and do not provide a Termux target.
11
-
12
- ## Native module requirement
13
-
14
- Atomic requires its `@bastani/atomic-natives` native module to start any session. Without a compatible native binary, Atomic exits at startup with `NativeModuleUnavailableError`.
15
-
16
- Atomic does not publish a prebuilt `@bastani/atomic-natives` package for Android ARM64. To run Atomic in Termux, you must build the native binding locally for Android ARM64 and point `NAPI_RS_NATIVE_LIBRARY_PATH` to the compiled `.node` file before starting Atomic.
17
-
18
- ## Prerequisites
9
+ ## Requirements and limitations
19
10
 
20
- 1. Install [Termux](https://github.com/termux/termux-app#installation) from GitHub or F-Droid (the Google Play version is deprecated).
21
- 2. Install [Termux:API](https://github.com/termux/termux-api#installation) from GitHub or F-Droid for clipboard and device integrations.
11
+ - **Do not run `install.sh`:** Termux uses Android's bionic libc rather than glibc or Alpine's musl libc. Running Atomic's release-archive installer exits with `unsupported Linux libc: bionic`.
12
+ - **Local Android ARM64 native module required:** Atomic requires `@bastani/atomic-natives` to start any session and exits with `NativeModuleUnavailableError` when no compatible binary is found. Atomic does not publish a prebuilt Android ARM64 package. Build the addon locally from `crates/atomic-natives` in the [Atomic repository](https://github.com/bastani-inc/atomic) using Rust and `@napi-rs/cli` (NAPI-RS), then set `NAPI_RS_NATIVE_LIBRARY_PATH` to the compiled `.node` file. Setting `NAPI_RS_NATIVE_LIBRARY_PATH` bypasses Atomic's exact native-module release version check; add the `export` line to `~/.bashrc` so it persists across shells.
13
+ - **Install `fd` and `ripgrep` from Termux:** On Android, Atomic does not auto-download Linux `fd` or `rg` binaries because they cannot run on bionic libc. Install both packages through `pkg`.
14
+ - **Termux apps:** Install [Termux](https://github.com/termux/termux-app#installation) and [Termux:API](https://github.com/termux/termux-api#installation) from GitHub or F-Droid (the Google Play version is deprecated).
15
+ - **Text-only clipboard:** Image clipboard paste (`Ctrl+V`) is not supported on Termux.
16
+ - **Shared storage access:** Run `termux-setup-storage` once to grant access to `/storage/emulated/0`.
22
17
 
23
- ## Installation
18
+ ## Install Atomic in Termux
24
19
 
25
20
  ```bash
26
21
  # Update packages
27
22
  pkg update && pkg upgrade
28
23
 
29
- # Install dependencies
30
- pkg install nodejs termux-api git
24
+ # Install Node.js, Git, Termux:API CLI tools, fd, and ripgrep
25
+ pkg install nodejs termux-api git fd ripgrep
31
26
 
32
27
  # Install Atomic with npm (included with Termux's nodejs package)
33
- npm install -g @bastani/atomic
28
+ npm install -g --ignore-scripts @bastani/atomic
34
29
 
35
30
  # Create config directory
36
31
  mkdir -p ~/.atomic/agent
37
32
 
38
- # Point Atomic to your locally built Android ARM64 native binding
33
+ # Point Atomic to your locally built Android ARM64 native module
39
34
  export NAPI_RS_NATIVE_LIBRARY_PATH=/path/to/atomic_natives.android-arm64.node
35
+ echo 'export NAPI_RS_NATIVE_LIBRARY_PATH=/path/to/atomic_natives.android-arm64.node' >> ~/.bashrc
40
36
 
41
37
  # Run Atomic
42
38
  atomic
43
39
  ```
44
40
 
45
- Atomic does not require package install scripts; pass `--ignore-scripts` if you disable lifecycle scripts during installation.
41
+ Atomic does not require npm install scripts, so `--ignore-scripts` is safe.
46
42
 
47
43
  ## Clipboard support
48
44
 
49
- In Termux, Atomic uses `termux-clipboard-set` and `termux-clipboard-get` for text clipboard operations. Both the Termux:API app and the `termux-api` package must be installed.
45
+ When `TERMUX_VERSION` is set, Atomic uses `termux-clipboard-set` and `termux-clipboard-get` for text clipboard operations. Both commands time out after 5 seconds and require both the Termux:API Android app and the `termux-api` package.
46
+
47
+ If `termux-clipboard-set` fails, Atomic does not automatically fall back to OSC 52 unless you are connected over SSH, Mosh, or Rex, or set `ATOMIC_CLIPBOARD_OSC52=1`. Otherwise Atomic reports that the clipboard is unavailable.
50
48
 
51
49
  Image clipboard paste (`Ctrl+V`) is not supported on Termux.
52
50
 
53
51
  ## Example AGENTS.md for Termux
54
52
 
55
- Create `~/.atomic/agent/AGENTS.md` to document your Termux environment for the model:
53
+ Create `~/.atomic/agent/AGENTS.md` to document your Termux environment and helper commands for the model:
56
54
 
57
- ````markdown
58
- # Agent Environment: Termux on Android
55
+ ```markdown
56
+ # Agent environment: Termux on Android
59
57
 
60
58
  ## Location
61
- - **OS**: Android (Termux terminal emulator)
62
- - **Home**: `/data/data/com.termux/files/home`
63
- - **Prefix**: `/data/data/com.termux/files/usr`
64
- - **Shared storage**: `/storage/emulated/0` (Downloads, Documents, etc.)
65
-
66
- ## Opening URLs
67
- ```bash
68
- termux-open-url "https://example.com"
69
- ```
70
-
71
- ## Opening Files
72
- ```bash
73
- termux-open file.pdf # Opens with default app
74
- termux-open --chooser image.jpg # Choose app
75
- ```
76
-
77
- ## Clipboard
78
- ```bash
79
- termux-clipboard-set "text" # Copy
80
- termux-clipboard-get # Paste
81
- ```
82
-
83
- ## Notifications
84
- ```bash
85
- termux-notification -t "Title" -c "Content"
86
- ```
87
-
88
- ## Device Info
89
- ```bash
90
- termux-battery-status # Battery info
91
- termux-wifi-connectioninfo # WiFi info
92
- termux-telephony-deviceinfo # Device info
93
- ```
94
-
95
- ## Sharing
96
- ```bash
97
- termux-share -a send file.txt # Share file
98
- ```
99
-
100
- ## Other Useful Commands
101
- ```bash
102
- termux-toast "message" # Quick toast popup
103
- termux-vibrate # Vibrate device
104
- termux-tts-speak "hello" # Text to speech
105
- termux-camera-photo out.jpg # Take photo
106
- ```
59
+ - OS: Android (Termux terminal emulator)
60
+ - Home: `/data/data/com.termux/files/home`
61
+ - Prefix: `/data/data/com.termux/files/usr`
62
+ - Shared storage: `/storage/emulated/0` (Downloads, Documents, etc.)
63
+
64
+ ## Useful Termux:API commands
65
+ - Open a URL: `termux-open-url "https://example.com"`
66
+ - Open a file: `termux-open file.pdf` or `termux-open --chooser image.jpg`
67
+ - Copy and paste text: `termux-clipboard-set "text"` and `termux-clipboard-get`
68
+ - Send a notification: `termux-notification -t "Title" -c "Content"`
69
+ - Check device info: `termux-battery-status`, `termux-wifi-connectioninfo`, `termux-telephony-deviceinfo`
70
+ - Share a file: `termux-share -a send file.txt`
71
+ - Quick helpers: `termux-toast "message"`, `termux-vibrate`, `termux-tts-speak "hello"`, `termux-camera-photo out.jpg`
107
72
 
108
73
  ## Notes
109
- - Termux:API app must be installed for `termux-*` commands
110
- - Use `pkg install termux-api` for the command-line tools
111
- - Storage permission needed for `/storage/emulated/0` access
112
- ````
113
-
114
- ## Limitations
115
-
116
- - **No prebuilt Android ARM64 native module:** Termux uses Android's bionic libc rather than glibc or musl, and Atomic ships no prebuilt Android native package. Starting a session fails with `NativeModuleUnavailableError` unless `NAPI_RS_NATIVE_LIBRARY_PATH` points to a locally built Android ARM64 binding.
117
- - **No image clipboard:** Termux clipboard commands support text only.
118
- - **Shared storage access:** Run `termux-setup-storage` once to grant access to `/storage/emulated/0`.
74
+ - Both the Termux:API Android app and `pkg install termux-api` are required for `termux-*` commands.
75
+ - Run `termux-setup-storage` before accessing `/storage/emulated/0`.
76
+ ```
119
77
 
120
78
  ## Troubleshooting
121
79
 
122
80
  ### Clipboard not working
123
81
 
124
- Install both apps from GitHub or F-Droid:
82
+ Install both Android apps from GitHub or F-Droid:
125
83
 
126
84
  1. Termux
127
85
  2. Termux:API
128
86
 
129
- Then install the CLI tools:
87
+ Then install the CLI helper package:
130
88
 
131
89
  ```bash
132
90
  pkg install termux-api
@@ -134,12 +92,20 @@ pkg install termux-api
134
92
 
135
93
  ### Permission denied for shared storage
136
94
 
137
- Run once to grant storage permissions:
95
+ Run once to grant storage permission:
138
96
 
139
97
  ```bash
140
98
  termux-setup-storage
141
99
  ```
142
100
 
101
+ ### Missing `fd` or `rg` warnings
102
+
103
+ If Atomic warns that `fd` or `rg` could not be found on Android, install them with `pkg`:
104
+
105
+ ```bash
106
+ pkg install fd ripgrep
107
+ ```
108
+
143
109
  ### Package installation issues
144
110
 
145
111
  Termux has no official `pkg install bun` package. Use npm from the `nodejs` package unless you installed Bun separately.
@@ -148,5 +114,5 @@ If npm fails, clear its cache and retry:
148
114
 
149
115
  ```bash
150
116
  npm cache clean --force
151
- npm install -g @bastani/atomic
117
+ npm install -g --ignore-scripts @bastani/atomic
152
118
  ```