@bastani/atomic 0.8.26-alpha.1 → 0.8.26-alpha.10

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 (303) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/README.md +5 -5
  3. package/dist/builtin/intercom/CHANGELOG.md +54 -0
  4. package/dist/builtin/intercom/package.json +2 -2
  5. package/dist/builtin/mcp/CHANGELOG.md +54 -0
  6. package/dist/builtin/mcp/package.json +3 -3
  7. package/dist/builtin/subagents/CHANGELOG.md +55 -0
  8. package/dist/builtin/subagents/agents/codebase-online-researcher.md +9 -9
  9. package/dist/builtin/subagents/agents/debugger.md +6 -6
  10. package/dist/builtin/subagents/package.json +4 -4
  11. package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +1 -1
  12. package/dist/builtin/subagents/skills/browser/EXAMPLES.md +151 -0
  13. package/dist/builtin/subagents/skills/browser/LICENSE.txt +21 -0
  14. package/dist/builtin/subagents/skills/browser/REFERENCE.md +451 -0
  15. package/dist/builtin/subagents/skills/browser/SKILL.md +170 -0
  16. package/dist/builtin/subagents/skills/subagent/SKILL.md +4 -4
  17. package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +55 -12
  18. package/dist/builtin/subagents/src/runs/foreground/execution.ts +71 -12
  19. package/dist/builtin/subagents/src/runs/shared/acceptance.ts +2 -1
  20. package/dist/builtin/subagents/src/runs/shared/final-drain.ts +34 -0
  21. package/dist/builtin/subagents/src/runs/shared/model-fallback.ts +416 -7
  22. package/dist/builtin/subagents/src/runs/shared/worktree.ts +2 -2
  23. package/dist/builtin/web-access/CHANGELOG.md +54 -0
  24. package/dist/builtin/web-access/package.json +2 -2
  25. package/dist/builtin/workflows/CHANGELOG.md +66 -0
  26. package/dist/builtin/workflows/README.md +10 -8
  27. package/dist/builtin/workflows/builtin/deep-research-codebase.ts +11 -8
  28. package/dist/builtin/workflows/builtin/goal.ts +137 -109
  29. package/dist/builtin/workflows/builtin/index.d.ts +2 -0
  30. package/dist/builtin/workflows/builtin/open-claude-design.ts +228 -151
  31. package/dist/builtin/workflows/builtin/ralph.d.ts +2 -0
  32. package/dist/builtin/workflows/builtin/ralph.ts +452 -279
  33. package/dist/builtin/workflows/package.json +2 -2
  34. package/dist/builtin/workflows/skills/create-spec/SKILL.md +14 -0
  35. package/dist/builtin/workflows/skills/research-codebase/SKILL.md +29 -10
  36. package/dist/builtin/workflows/src/extension/index.ts +10 -2
  37. package/dist/builtin/workflows/src/extension/runtime.ts +35 -3
  38. package/dist/builtin/workflows/src/extension/wiring.ts +13 -1
  39. package/dist/builtin/workflows/src/runs/background/status.ts +52 -6
  40. package/dist/builtin/workflows/src/runs/foreground/executor.ts +453 -21
  41. package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +77 -11
  42. package/dist/builtin/workflows/src/runs/shared/model-fallback.ts +402 -8
  43. package/dist/builtin/workflows/src/runs/shared/worktree.ts +2 -2
  44. package/dist/builtin/workflows/src/shared/authoring-contract.d.ts +2 -2
  45. package/dist/builtin/workflows/src/shared/persistence-restore.ts +182 -6
  46. package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +76 -6
  47. package/dist/builtin/workflows/src/shared/stage-prompt.ts +33 -2
  48. package/dist/builtin/workflows/src/shared/store-types.ts +31 -0
  49. package/dist/builtin/workflows/src/shared/store.ts +160 -18
  50. package/dist/builtin/workflows/src/shared/types.ts +3 -3
  51. package/dist/builtin/workflows/src/shared/workflow-failures.ts +758 -132
  52. package/dist/builtin/workflows/src/tui/stage-chat-view.ts +39 -3
  53. package/dist/builtin/workflows/src/tui/store-widget-installer.ts +74 -74
  54. package/dist/core/agent-session.d.ts +33 -6
  55. package/dist/core/agent-session.d.ts.map +1 -1
  56. package/dist/core/agent-session.js +157 -182
  57. package/dist/core/agent-session.js.map +1 -1
  58. package/dist/core/atomic-guide-command.d.ts.map +1 -1
  59. package/dist/core/atomic-guide-command.js +11 -9
  60. package/dist/core/atomic-guide-command.js.map +1 -1
  61. package/dist/core/compaction/branch-summarization.d.ts +1 -1
  62. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  63. package/dist/core/compaction/branch-summarization.js +6 -3
  64. package/dist/core/compaction/branch-summarization.js.map +1 -1
  65. package/dist/core/compaction/compaction.d.ts.map +1 -1
  66. package/dist/core/compaction/compaction.js +23 -10
  67. package/dist/core/compaction/compaction.js.map +1 -1
  68. package/dist/core/compaction/context-compaction.d.ts +175 -0
  69. package/dist/core/compaction/context-compaction.d.ts.map +1 -0
  70. package/dist/core/compaction/context-compaction.js +1636 -0
  71. package/dist/core/compaction/context-compaction.js.map +1 -0
  72. package/dist/core/compaction/index.d.ts +1 -0
  73. package/dist/core/compaction/index.d.ts.map +1 -1
  74. package/dist/core/compaction/index.js +1 -0
  75. package/dist/core/compaction/index.js.map +1 -1
  76. package/dist/core/extensions/types.d.ts +3 -2
  77. package/dist/core/extensions/types.d.ts.map +1 -1
  78. package/dist/core/extensions/types.js.map +1 -1
  79. package/dist/core/footer-data-provider.d.ts.map +1 -1
  80. package/dist/core/footer-data-provider.js +3 -0
  81. package/dist/core/footer-data-provider.js.map +1 -1
  82. package/dist/core/index.d.ts +1 -1
  83. package/dist/core/index.d.ts.map +1 -1
  84. package/dist/core/index.js.map +1 -1
  85. package/dist/core/package-manager.d.ts.map +1 -1
  86. package/dist/core/package-manager.js +14 -7
  87. package/dist/core/package-manager.js.map +1 -1
  88. package/dist/core/session-manager.d.ts +41 -1
  89. package/dist/core/session-manager.d.ts.map +1 -1
  90. package/dist/core/session-manager.js +146 -7
  91. package/dist/core/session-manager.js.map +1 -1
  92. package/dist/core/slash-commands.d.ts.map +1 -1
  93. package/dist/core/slash-commands.js +1 -1
  94. package/dist/core/slash-commands.js.map +1 -1
  95. package/dist/core/tools/ask-user-question/tool/format-answer.d.ts +5 -5
  96. package/dist/core/tools/ask-user-question/tool/format-answer.d.ts.map +1 -1
  97. package/dist/core/tools/ask-user-question/tool/format-answer.js +5 -5
  98. package/dist/core/tools/ask-user-question/tool/format-answer.js.map +1 -1
  99. package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts +16 -3
  100. package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts.map +1 -1
  101. package/dist/core/tools/ask-user-question/tool/response-envelope.js +21 -3
  102. package/dist/core/tools/ask-user-question/tool/response-envelope.js.map +1 -1
  103. package/dist/index.d.ts +4 -3
  104. package/dist/index.d.ts.map +1 -1
  105. package/dist/index.js +3 -2
  106. package/dist/index.js.map +1 -1
  107. package/dist/modes/index.d.ts +1 -1
  108. package/dist/modes/index.d.ts.map +1 -1
  109. package/dist/modes/index.js.map +1 -1
  110. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  111. package/dist/modes/interactive/components/chat-session-host.js +17 -0
  112. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  113. package/dist/modes/interactive/components/context-compaction-summary-message.d.ts +17 -0
  114. package/dist/modes/interactive/components/context-compaction-summary-message.d.ts.map +1 -0
  115. package/dist/modes/interactive/components/context-compaction-summary-message.js +83 -0
  116. package/dist/modes/interactive/components/context-compaction-summary-message.js.map +1 -0
  117. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  118. package/dist/modes/interactive/components/footer.js +4 -1
  119. package/dist/modes/interactive/components/footer.js.map +1 -1
  120. package/dist/modes/interactive/components/index.d.ts +1 -0
  121. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  122. package/dist/modes/interactive/components/index.js +1 -0
  123. package/dist/modes/interactive/components/index.js.map +1 -1
  124. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  125. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  126. package/dist/modes/interactive/interactive-mode.js +75 -10
  127. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  128. package/dist/modes/rpc/rpc-client.d.ts +13 -8
  129. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  130. package/dist/modes/rpc/rpc-client.js +8 -1
  131. package/dist/modes/rpc/rpc-client.js.map +1 -1
  132. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  133. package/dist/modes/rpc/rpc-mode.js +4 -0
  134. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  135. package/dist/modes/rpc/rpc-types.d.ts +14 -3
  136. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  137. package/dist/modes/rpc/rpc-types.js.map +1 -1
  138. package/dist/utils/git-env.d.ts +10 -0
  139. package/dist/utils/git-env.d.ts.map +1 -0
  140. package/dist/utils/git-env.js +33 -0
  141. package/dist/utils/git-env.js.map +1 -0
  142. package/docs/compaction.md +185 -50
  143. package/docs/custom-provider.md +11 -9
  144. package/docs/extensions.md +46 -42
  145. package/docs/index.md +13 -6
  146. package/docs/json.md +15 -12
  147. package/docs/packages.md +2 -0
  148. package/docs/providers.md +4 -1
  149. package/docs/quickstart.md +18 -11
  150. package/docs/rpc.md +38 -23
  151. package/docs/sdk.md +17 -8
  152. package/docs/session-format.md +26 -13
  153. package/docs/sessions.md +3 -3
  154. package/docs/settings.md +2 -2
  155. package/docs/skills.md +1 -15
  156. package/docs/termux.md +9 -10
  157. package/docs/themes.md +2 -2
  158. package/docs/tmux.md +3 -3
  159. package/docs/tui.md +19 -32
  160. package/docs/usage.md +2 -2
  161. package/docs/workflows.md +60 -16
  162. package/package.json +6 -12
  163. package/dist/builtin/subagents/skills/browser-use/SKILL.md +0 -234
  164. package/dist/builtin/subagents/skills/browser-use/references/cdp-python.md +0 -76
  165. package/dist/builtin/subagents/skills/browser-use/references/multi-session.md +0 -92
  166. package/node_modules/@earendil-works/pi-tui/README.md +0 -779
  167. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +0 -54
  168. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +0 -1
  169. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +0 -632
  170. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +0 -1
  171. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +0 -22
  172. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +0 -1
  173. package/node_modules/@earendil-works/pi-tui/dist/components/box.js +0 -104
  174. package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +0 -1
  175. package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts +0 -22
  176. package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +0 -1
  177. package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js +0 -35
  178. package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js.map +0 -1
  179. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +0 -249
  180. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +0 -1
  181. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +0 -1857
  182. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +0 -1
  183. package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts +0 -28
  184. package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +0 -1
  185. package/node_modules/@earendil-works/pi-tui/dist/components/image.js +0 -89
  186. package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +0 -1
  187. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +0 -37
  188. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +0 -1
  189. package/node_modules/@earendil-works/pi-tui/dist/components/input.js +0 -378
  190. package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +0 -1
  191. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +0 -31
  192. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +0 -1
  193. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +0 -69
  194. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +0 -1
  195. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +0 -96
  196. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +0 -1
  197. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +0 -644
  198. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +0 -1
  199. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +0 -50
  200. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +0 -1
  201. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +0 -159
  202. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +0 -1
  203. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +0 -50
  204. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +0 -1
  205. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +0 -185
  206. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +0 -1
  207. package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts +0 -12
  208. package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +0 -1
  209. package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js +0 -23
  210. package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +0 -1
  211. package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +0 -19
  212. package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +0 -1
  213. package/node_modules/@earendil-works/pi-tui/dist/components/text.js +0 -89
  214. package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +0 -1
  215. package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts +0 -13
  216. package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +0 -1
  217. package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js +0 -51
  218. package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +0 -1
  219. package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts +0 -39
  220. package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +0 -1
  221. package/node_modules/@earendil-works/pi-tui/dist/editor-component.js +0 -2
  222. package/node_modules/@earendil-works/pi-tui/dist/editor-component.js.map +0 -1
  223. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +0 -16
  224. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +0 -1
  225. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +0 -110
  226. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +0 -1
  227. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +0 -23
  228. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +0 -1
  229. package/node_modules/@earendil-works/pi-tui/dist/index.js +0 -32
  230. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +0 -1
  231. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +0 -193
  232. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +0 -1
  233. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +0 -174
  234. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +0 -1
  235. package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts +0 -184
  236. package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +0 -1
  237. package/node_modules/@earendil-works/pi-tui/dist/keys.js +0 -1173
  238. package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +0 -1
  239. package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts +0 -28
  240. package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +0 -1
  241. package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js +0 -44
  242. package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js.map +0 -1
  243. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +0 -3
  244. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +0 -1
  245. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +0 -53
  246. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +0 -1
  247. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +0 -50
  248. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +0 -1
  249. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +0 -361
  250. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +0 -1
  251. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +0 -90
  252. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +0 -1
  253. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +0 -366
  254. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +0 -1
  255. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +0 -113
  256. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +0 -1
  257. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +0 -472
  258. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +0 -1
  259. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +0 -227
  260. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +0 -1
  261. package/node_modules/@earendil-works/pi-tui/dist/tui.js +0 -1106
  262. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +0 -1
  263. package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts +0 -17
  264. package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +0 -1
  265. package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js +0 -25
  266. package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js.map +0 -1
  267. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -84
  268. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +0 -1
  269. package/node_modules/@earendil-works/pi-tui/dist/utils.js +0 -1029
  270. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +0 -1
  271. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts +0 -25
  272. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +0 -1
  273. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js +0 -96
  274. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +0 -1
  275. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
  276. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
  277. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
  278. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
  279. package/node_modules/@earendil-works/pi-tui/package.json +0 -47
  280. package/node_modules/get-east-asian-width/index.d.ts +0 -60
  281. package/node_modules/get-east-asian-width/index.js +0 -30
  282. package/node_modules/get-east-asian-width/license +0 -9
  283. package/node_modules/get-east-asian-width/lookup-data.js +0 -21
  284. package/node_modules/get-east-asian-width/lookup.js +0 -138
  285. package/node_modules/get-east-asian-width/package.json +0 -71
  286. package/node_modules/get-east-asian-width/readme.md +0 -65
  287. package/node_modules/get-east-asian-width/utilities.js +0 -24
  288. package/node_modules/marked/LICENSE.md +0 -44
  289. package/node_modules/marked/README.md +0 -106
  290. package/node_modules/marked/bin/main.js +0 -282
  291. package/node_modules/marked/bin/marked.js +0 -15
  292. package/node_modules/marked/lib/marked.cjs +0 -2211
  293. package/node_modules/marked/lib/marked.cjs.map +0 -7
  294. package/node_modules/marked/lib/marked.d.cts +0 -728
  295. package/node_modules/marked/lib/marked.d.ts +0 -728
  296. package/node_modules/marked/lib/marked.esm.js +0 -2189
  297. package/node_modules/marked/lib/marked.esm.js.map +0 -7
  298. package/node_modules/marked/lib/marked.umd.js +0 -2213
  299. package/node_modules/marked/lib/marked.umd.js.map +0 -7
  300. package/node_modules/marked/man/marked.1 +0 -111
  301. package/node_modules/marked/man/marked.1.md +0 -92
  302. package/node_modules/marked/marked.min.js +0 -69
  303. package/node_modules/marked/package.json +0 -111
@@ -8,7 +8,7 @@ Extensions are TypeScript modules that extend Atomic's behavior. They can subscr
8
8
 
9
9
  **Key capabilities:**
10
10
  - **Custom tools** - Register tools the LLM can call via `pi.registerTool()`
11
- - **Event interception** - Block or modify tool calls, inject context, customize compaction
11
+ - **Event interception** - Block or modify tool calls, inject context, customize legacy summary compaction and branch summaries
12
12
  - **User interaction** - Prompt users via `ctx.ui` (select, confirm, input, notify)
13
13
  - **Custom UI components** - Full TUI components with keyboard input via `ctx.ui.custom()` for complex interactions
14
14
  - **Custom commands** - Register commands like `/mycommand` via `pi.registerCommand()`
@@ -19,7 +19,7 @@ Extensions are TypeScript modules that extend Atomic's behavior. They can subscr
19
19
  - Permission gates (confirm before `rm -rf`, `sudo`, etc.)
20
20
  - Git checkpointing (stash at each turn, restore on branch)
21
21
  - Path protection (block writes to `.env`, `node_modules/`)
22
- - Custom compaction (summarize conversation your way)
22
+ - Legacy custom summary compaction (summarize older context your way)
23
23
  - Conversation summaries (see `summarize.ts` example)
24
24
  - Interactive tools (questions, wizards, custom dialogs)
25
25
  - Stateful tools (todo lists, connection pools)
@@ -144,17 +144,10 @@ To share extensions via npm or git as Atomic packages, see [Atomic packages](/pa
144
144
  | `@earendil-works/pi-ai` | AI utilities (`StringEnum` for Google-compatible enums) |
145
145
  | `@earendil-works/pi-tui` | TUI components for custom rendering |
146
146
 
147
- npm dependencies work too. Add a `package.json` next to your extension (or in a parent directory), then install dependencies with npm, Bun, or pnpm:
147
+ Registry dependencies work too. Add a `package.json` next to your extension (or in a parent directory), then install dependencies with Bun:
148
148
 
149
149
  ```bash
150
- # npm
151
- npm install
152
-
153
- # Bun
154
150
  bun install
155
-
156
- # pnpm
157
- pnpm install
158
151
  ```
159
152
 
160
153
  Imports from `node_modules/` are resolved automatically.
@@ -175,7 +168,7 @@ export default function (pi: ExtensionAPI) {
175
168
  pi.on("event_name", async (event, ctx) => {
176
169
  // ctx.ui for user interaction
177
170
  const ok = await ctx.ui.confirm("Title", "Are you sure?");
178
- ctx.ui.notify("Done!", "success");
171
+ ctx.ui.notify("Done!", "info");
179
172
  ctx.ui.setStatus("my-ext", "Processing..."); // Footer status
180
173
  ctx.ui.setWidget("my-ext", ["Line 1", "Line 2"]); // Widget above editor (default)
181
174
  });
@@ -254,7 +247,7 @@ This pattern makes the fetched models available during normal startup and to `at
254
247
  ~/.atomic/agent/extensions/
255
248
  └── my-extension/
256
249
  ├── package.json # Declares dependencies and entry points
257
- ├── package-lock.json
250
+ ├── bun.lock
258
251
  ├── node_modules/ # After dependency install
259
252
  └── src/
260
253
  └── index.ts
@@ -274,7 +267,7 @@ This pattern makes the fetched models available during normal startup and to `at
274
267
  }
275
268
  ```
276
269
 
277
- The manifest key is the configured Atomic app name (`atomic` here, from the running Atomic package/config), not the extension package's own `"name"` field. The legacy `pi` key is still accepted as a compatibility shim. Run `npm install`, `bun install`, or `pnpm install` in the extension directory, then imports from `node_modules/` work automatically.
270
+ The manifest key is the configured Atomic app name (`atomic` here, from the running Atomic package/config), not the extension package's own `"name"` field. The legacy `pi` key is still accepted as a compatibility shim. Run `bun install` in the extension directory, then imports from `node_modules/` work automatically.
278
271
 
279
272
  ## Events
280
273
 
@@ -329,6 +322,9 @@ user sends another prompt ◄─────────────────
329
322
  └─► resources_discover { reason: "startup" }
330
323
 
331
324
  /compact or auto-compaction
325
+ └─► compaction_start / compaction_end (deletion-only context compaction)
326
+
327
+ legacy summary compaction APIs
332
328
  ├─► session_before_compact (can cancel or customize)
333
329
  └─► session_compact
334
330
 
@@ -398,7 +394,7 @@ pi.on("session_before_switch", async (event, ctx) => {
398
394
  });
399
395
  ```
400
396
 
401
- After a successful switch or new-session action, pi emits `session_shutdown` for the old extension instance, reloads and rebinds extensions for the new session, then emits `session_start` with `reason: "new" | "resume"` and `previousSessionFile`.
397
+ After a successful switch or new-session action, Atomic emits `session_shutdown` for the old extension instance, reloads and rebinds extensions for the new session, then emits `session_start` with `reason: "new" | "resume"` and `previousSessionFile`.
402
398
  Do cleanup work in `session_shutdown`, then reestablish any in-memory state in `session_start`.
403
399
 
404
400
  #### session_before_fork
@@ -415,12 +411,12 @@ pi.on("session_before_fork", async (event, ctx) => {
415
411
  });
416
412
  ```
417
413
 
418
- After a successful fork or clone, pi emits `session_shutdown` for the old extension instance, reloads and rebinds extensions for the new session, then emits `session_start` with `reason: "fork"` and `previousSessionFile`.
414
+ After a successful fork or clone, Atomic emits `session_shutdown` for the old extension instance, reloads and rebinds extensions for the new session, then emits `session_start` with `reason: "fork"` and `previousSessionFile`.
419
415
  Do cleanup work in `session_shutdown`, then reestablish any in-memory state in `session_start`.
420
416
 
421
417
  #### session_before_compact / session_compact
422
418
 
423
- Fired on compaction. See [Compaction](/compaction) for details.
419
+ Fired by the legacy summary compaction pipeline. `/compact` and auto-compaction now use deletion-only context compaction by default, so extensions should not rely on these events for default compaction. See [Compaction](/compaction) for details.
424
420
 
425
421
  ```typescript
426
422
  pi.on("session_before_compact", async (event, ctx) => {
@@ -509,7 +505,7 @@ pi.on("before_agent_start", async (event, ctx) => {
509
505
  });
510
506
  ```
511
507
 
512
- The `systemPromptOptions` field gives extensions access to the same structured data Pi uses to build the system prompt. This lets you inspect what Pi has loaded — custom prompts, guidelines, tool snippets, context files, skills — without re-discovering resources or re-parsing flags. Use it when your extension needs to make deep, informed changes to the system prompt while respecting user-provided configuration.
508
+ The `systemPromptOptions` field gives extensions access to the same structured data Atomic uses to build the system prompt. This lets you inspect what Atomic has loaded — custom prompts, guidelines, tool snippets, context files, skills — without re-discovering resources or re-parsing flags. Use it when your extension needs to make deep, informed changes to the system prompt while respecting user-provided configuration.
513
509
 
514
510
  Inside `before_agent_start`, `event.systemPrompt` and `ctx.getSystemPrompt()` both reflect the chained system prompt as of the current handler. Later `before_agent_start` handlers can still modify it again.
515
511
 
@@ -904,7 +900,7 @@ Use this for abort-aware nested work started by extension handlers, for example:
904
900
  - file or process helpers that accept `AbortSignal`
905
901
 
906
902
  `ctx.signal` is typically defined during active turn events such as `tool_call`, `tool_result`, `message_update`, and `turn_end`.
907
- It is usually `undefined` in idle or non-turn contexts such as session events, extension commands, and shortcuts fired while pi is idle.
903
+ It is usually `undefined` in idle or non-turn contexts such as session events, extension commands, and shortcuts fired while Atomic is idle.
908
904
 
909
905
  ```typescript
910
906
  pi.on("tool_result", async (event, ctx) => {
@@ -925,7 +921,7 @@ Control flow helpers.
925
921
 
926
922
  ### ctx.shutdown()
927
923
 
928
- Request a graceful shutdown of pi.
924
+ Request a graceful shutdown of Atomic.
929
925
 
930
926
  - **Interactive mode:** Deferred until the agent becomes idle (after processing all queued steering and follow-up messages).
931
927
  - **RPC mode:** Deferred until the next idle state (after completing the current command response, when waiting for the next command).
@@ -954,13 +950,12 @@ if (usage && usage.tokens > 100_000) {
954
950
 
955
951
  ### ctx.compact()
956
952
 
957
- Trigger compaction without awaiting completion. Use `onComplete` and `onError` for follow-up actions.
953
+ Trigger Atomic's default Verbatim Compaction without awaiting completion. This is deletion-only Context Compaction: the internal planner searches/reads transcript slices, records exact entry/content-block deletion targets with transcript-bound tools, and Atomic applies only locally validated logical deletions. Retained transcript content stays unchanged. The approach is informed by Morph's Context Compaction write-up: [Morph's Context Compaction](https://www.morphllm.com/context-compaction). Use `onComplete` and `onError` for follow-up actions.
958
954
 
959
955
  ```typescript
960
956
  ctx.compact({
961
- customInstructions: "Focus on recent changes",
962
957
  onComplete: (result) => {
963
- ctx.ui.notify("Compaction completed", "info");
958
+ ctx.ui.notify(`Compaction deleted ${result.stats.objectsDeleted} objects`, "info");
964
959
  },
965
960
  onError: (error) => {
966
961
  ctx.ui.notify(`Compaction failed: ${error.message}`, "error");
@@ -968,6 +963,8 @@ ctx.compact({
968
963
  });
969
964
  ```
970
965
 
966
+ `customInstructions` is deprecated. Passing a non-empty value to default compaction fails because Verbatim Compaction does not accept custom summary instructions.
967
+
971
968
  ### ctx.getSystemPrompt()
972
969
 
973
970
  Returns Atomic's current system prompt string.
@@ -1389,7 +1386,7 @@ Labels persist in the session and survive restarts. Use them to mark important p
1389
1386
 
1390
1387
  Register a command.
1391
1388
 
1392
- If multiple extensions register the same command name, pi keeps them all and assigns numeric invocation suffixes in load order, for example `/review:1` and `/review:2`.
1389
+ If multiple extensions register the same command name, Atomic keeps them all and assigns numeric invocation suffixes in load order, for example `/review:1` and `/review:2`.
1393
1390
 
1394
1391
  ```typescript
1395
1392
  pi.registerCommand("stats", {
@@ -1790,7 +1787,7 @@ async execute(toolCallId, params) {
1790
1787
 
1791
1788
  **Important:** Use `StringEnum` from `@earendil-works/pi-ai` for string enums. `Type.Union`/`Type.Literal` doesn't work with Google's API.
1792
1789
 
1793
- **Argument preparation:** `prepareArguments(args)` is optional. If defined, it runs before schema validation and before `execute()`. Use it to mimic an older accepted input shape when pi resumes an older session whose stored tool call arguments no longer match the current schema. Return the object you want validated against `parameters`. Keep the public schema strict. Do not add deprecated compatibility fields to `parameters` just to keep old resumed sessions working.
1790
+ **Argument preparation:** `prepareArguments(args)` is optional. If defined, it runs before schema validation and before `execute()`. Use it to mimic an older accepted input shape when Atomic resumes an older session whose stored tool call arguments no longer match the current schema. Return the object you want validated against `parameters`. Keep the public schema strict. Do not add deprecated compatibility fields to `parameters` just to keep old resumed sessions working.
1794
1791
 
1795
1792
  Example: an older session may contain an `edit` tool call with top-level `oldText` and `newText`, while the current schema only accepts `edits: [{ oldText, newText }]`.
1796
1793
 
@@ -1861,13 +1858,13 @@ See [examples/extensions/tool-override.ts](https://github.com/bastani-inc/atomic
1861
1858
  **Your implementation must match the exact result shape**, including the `details` type. The UI and session logic depend on these shapes for rendering and state tracking.
1862
1859
 
1863
1860
  Built-in tool implementations:
1864
- - [read.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/read.ts) - `ReadToolDetails`
1865
- - [bash.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/bash.ts) - `BashToolDetails`
1866
- - [edit.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/edit.ts)
1867
- - [write.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/write.ts)
1868
- - [grep.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/grep.ts) - `GrepToolDetails`
1869
- - [find.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/find.ts) - `FindToolDetails`
1870
- - [ls.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/ls.ts) - `LsToolDetails`
1861
+ - [read.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/tools/read.ts) - `ReadToolDetails`
1862
+ - [bash.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/tools/bash.ts) - `BashToolDetails`
1863
+ - [edit.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/tools/edit.ts)
1864
+ - [write.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/tools/write.ts)
1865
+ - [grep.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/tools/grep.ts) - `GrepToolDetails`
1866
+ - [find.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/tools/find.ts) - `FindToolDetails`
1867
+ - [ls.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/tools/ls.ts) - `LsToolDetails`
1871
1868
 
1872
1869
  ### Remote Execution
1873
1870
 
@@ -1990,7 +1987,7 @@ export default function (pi: ExtensionAPI) {
1990
1987
 
1991
1988
  ### Custom Rendering
1992
1989
 
1993
- Tools can provide `renderCall` and `renderResult` for custom TUI display. See [TUI components](/tui) for the full component API and [tool-execution.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/modes/interactive/components/tool-execution.ts) for how tool rows are composed.
1990
+ Tools can provide `renderCall` and `renderResult` for custom TUI display. See [TUI components](/tui) for the full component API and [tool-execution.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/modes/interactive/components/tool-execution.ts) for how tool rows are composed.
1994
1991
 
1995
1992
  By default, tool output is wrapped in a `Box` that handles padding and background. A defined `renderCall` or `renderResult` must return a `Component`. If a slot renderer is not defined, `tool-execution.ts` uses fallback rendering for that slot.
1996
1993
 
@@ -2345,18 +2342,25 @@ See [github-issue-autocomplete.ts](https://github.com/bastani-inc/atomic/blob/ma
2345
2342
  For complex UI, use `ctx.ui.custom()`. This temporarily replaces the editor with your component until `done()` is called:
2346
2343
 
2347
2344
  ```typescript
2348
- import { Text, Component } from "@earendil-works/pi-tui";
2345
+ import { Text, type Component } from "@earendil-works/pi-tui";
2349
2346
 
2350
- const result = await ctx.ui.custom<boolean>((tui, theme, keybindings, done) => {
2351
- const text = new Text("Enter Confirm · Escape Cancel", 1, 1);
2347
+ class ConfirmPrompt implements Component {
2348
+ render(width: number): string[] {
2349
+ return new Text("Enter Confirm · Escape Cancel", 1, 1).render(width);
2350
+ }
2352
2351
 
2353
- text.onKey = (key) => {
2354
- if (key === "return") done(true);
2355
- if (key === "escape") done(false);
2356
- return true;
2357
- };
2352
+ invalidate(): void {}
2358
2353
 
2359
- return text;
2354
+ handleInput(data: string): void {
2355
+ if (data === "\r") this.done(true);
2356
+ if (data === "\x1b") this.done(false);
2357
+ }
2358
+
2359
+ constructor(private readonly done: (value: boolean) => void) {}
2360
+ }
2361
+
2362
+ const result = await ctx.ui.custom<boolean>((_tui, _theme, _keybindings, done) => {
2363
+ return new ConfirmPrompt(done);
2360
2364
  });
2361
2365
 
2362
2366
  if (result) {
@@ -2568,7 +2572,7 @@ All examples in [examples/extensions/](https://github.com/bastani-inc/atomic/tre
2568
2572
  | `prompt-customizer.ts` | Add context-aware tool guidance using `systemPromptOptions` | `on("before_agent_start")`, `BuildSystemPromptOptions` |
2569
2573
  | `file-trigger.ts` | File watcher triggers messages | `sendMessage` |
2570
2574
  | **Compaction & Sessions** |||
2571
- | `custom-compaction.ts` | Custom compaction summary | `on("session_before_compact")` |
2575
+ | `custom-compaction.ts` | Legacy custom compaction summary | `on("session_before_compact")` |
2572
2576
  | `trigger-compact.ts` | Trigger compaction manually | `compact()` |
2573
2577
  | `git-checkpoint.ts` | Git stash on turns | `on("turn_start")`, `on("session_before_fork")`, `exec` |
2574
2578
  | `auto-commit-on-exit.ts` | Commit on shutdown | `on("session_shutdown")`, `exec` |
package/docs/index.md CHANGED
@@ -9,19 +9,26 @@ Atomic is a minimal terminal coding harness. It is designed to stay small at the
9
9
 
10
10
  ## Quick start
11
11
 
12
- Install Atomic with npm, Bun, or pnpm:
12
+ Install Atomic globally with npm, pnpm, or Bun:
13
+
14
+ With npm:
13
15
 
14
16
  ```bash
15
- # npm
16
17
  npm install -g @bastani/atomic
18
+ ```
17
19
 
18
- # Bun
19
- bun install -g @bastani/atomic
20
+ With pnpm:
20
21
 
21
- # pnpm
22
+ ```bash
22
23
  pnpm add -g @bastani/atomic
23
24
  ```
24
25
 
26
+ With Bun:
27
+
28
+ ```bash
29
+ bun add -g @bastani/atomic
30
+ ```
31
+
25
32
  Atomic does not require package install scripts. If you want to disable dependency lifecycle scripts during the Atomic install, you can add `--ignore-scripts` to the install command.
26
33
 
27
34
  Or download an `atomic-*` archive from the Atomic GitHub Release for your platform.
@@ -44,7 +51,7 @@ For the full first-run flow, see [Quickstart](/quickstart).
44
51
  - [Settings](/settings) - global and project settings.
45
52
  - [Keybindings](/keybindings) - default shortcuts and custom keybindings.
46
53
  - [Sessions](/sessions) - session management, branching, and tree navigation.
47
- - [Compaction](/compaction) - context compaction and branch summarization.
54
+ - [Compaction](/compaction) - Verbatim Compaction, context management, and branch summarization.
48
55
 
49
56
  ## Customization
50
57
 
package/docs/json.md CHANGED
@@ -1,28 +1,31 @@
1
1
  # JSON Event Stream Mode
2
2
 
3
3
  ```bash
4
- pi --mode json "Your prompt"
4
+ atomic --mode json "Your prompt"
5
5
  ```
6
6
 
7
- Outputs all session events as JSON lines to stdout. Useful for integrating pi into other tools or custom UIs.
7
+ Outputs all session events as JSON lines to stdout. Useful for integrating Atomic into other tools or custom UIs.
8
8
 
9
9
  ## Event Types
10
10
 
11
- Events are defined in [`AgentSessionEvent`](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/agent-session.ts#L102):
11
+ Events are defined in [`AgentSessionEvent`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/agent-session.ts#L152):
12
12
 
13
13
  ```typescript
14
14
  type AgentSessionEvent =
15
15
  | AgentEvent
16
16
  | { type: "queue_update"; steering: readonly string[]; followUp: readonly string[] }
17
17
  | { type: "compaction_start"; reason: "manual" | "threshold" | "overflow" }
18
- | { type: "compaction_end"; reason: "manual" | "threshold" | "overflow"; result: CompactionResult | undefined; aborted: boolean; willRetry: boolean; errorMessage?: string }
18
+ | { type: "session_info_changed"; name: string | undefined }
19
+ | { type: "model_changed"; model: Model<Api>; previousModel: Model<Api> | undefined; source: "set" | "cycle" | "restore" }
20
+ | { type: "thinking_level_changed"; level: ThinkingLevel }
21
+ | { type: "compaction_end"; reason: "manual" | "threshold" | "overflow"; result: ContextCompactionResult | undefined; aborted: boolean; willRetry: boolean; errorMessage?: string }
19
22
  | { type: "auto_retry_start"; attempt: number; maxAttempts: number; delayMs: number; errorMessage: string }
20
23
  | { type: "auto_retry_end"; success: boolean; attempt: number; finalError?: string };
21
24
  ```
22
25
 
23
- `queue_update` emits the full pending steering and follow-up queues whenever they change. `compaction_start` and `compaction_end` cover both manual and automatic compaction.
26
+ `queue_update` emits the full pending steering and follow-up queues whenever they change. `session_info_changed`, `model_changed`, and `thinking_level_changed` report interactive session metadata changes. `compaction_start` and `compaction_end` cover both manual and automatic Verbatim Compaction, Atomic's transcript-bound, deletion-only Context Compaction approach inspired by [Morph's Context Compaction](https://www.morphllm.com/context-compaction).
24
27
 
25
- Base events from [`AgentEvent`](https://github.com/earendil-works/pi-mono/blob/main/packages/agent/src/types.ts#L179):
28
+ Base events come from `AgentEvent` in `@earendil-works/pi-agent-core` (installed as an Atomic dependency):
26
29
 
27
30
  ```typescript
28
31
  type AgentEvent =
@@ -44,12 +47,12 @@ type AgentEvent =
44
47
 
45
48
  ## Message Types
46
49
 
47
- Base messages from [`packages/ai/src/types.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/ai/src/types.ts#L134):
48
- - `UserMessage` (line 134)
49
- - `AssistantMessage` (line 140)
50
- - `ToolResultMessage` (line 152)
50
+ Base messages come from `@earendil-works/pi-ai` (installed as an Atomic dependency):
51
+ - `UserMessage`
52
+ - `AssistantMessage`
53
+ - `ToolResultMessage`
51
54
 
52
- Extended messages from [`packages/coding-agent/src/core/messages.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/messages.ts#L29):
55
+ Extended messages from [`packages/coding-agent/src/core/messages.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/messages.ts#L29):
53
56
  - `BashExecutionMessage` (line 29)
54
57
  - `CustomMessage` (line 46)
55
58
  - `BranchSummaryMessage` (line 55)
@@ -78,5 +81,5 @@ Followed by events as they occur:
78
81
  ## Example
79
82
 
80
83
  ```bash
81
- pi --mode json "List files" 2>/dev/null | jq -c 'select(.type == "message_end")'
84
+ atomic --mode json "List files" 2>/dev/null | jq -c 'select(.type == "message_end")'
82
85
  ```
package/docs/packages.md CHANGED
@@ -178,6 +178,8 @@ Atomic bundles core packages for extensions and skills. If you import any of the
178
178
 
179
179
  Workflow packages should author workflow files with `import { defineWorkflow, Type } from "@bastani/workflows"` and export definitions produced by `defineWorkflow(...).compile()`. Do not use the removed `runWorkflow` object-form API, and do not hand-roll objects with `__piWorkflow: true`; discovery accepts only compiled definitions. `@bastani/workflows` is not a separate npm package: its types resolve through `@bastani/atomic`, so list `@bastani/atomic` and `typebox` in `peerDependencies` (the workflow SDK's emitted types reference `typebox`). A pure workflow-only package also adds the one-line ambient opt-in noted above; a package that imports `@bastani/atomic` elsewhere picks the types up automatically.
180
180
 
181
+ Package-authored workflows should follow the same guiding principles as project workflows mentioned in docs/workflows.md.
182
+
181
183
  Other Atomic packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Atomic loads packages with separate module roots, so separate installs do not collide or share modules.
182
184
 
183
185
  Example:
package/docs/providers.md CHANGED
@@ -57,6 +57,7 @@ atomic
57
57
  | OpenAI | `OPENAI_API_KEY` | `openai` |
58
58
  | DeepSeek | `DEEPSEEK_API_KEY` | `deepseek` |
59
59
  | Google Gemini | `GEMINI_API_KEY` | `google` |
60
+ | Google Vertex AI | `GOOGLE_CLOUD_API_KEY` | `google-vertex` |
60
61
  | Mistral | `MISTRAL_API_KEY` | `mistral` |
61
62
  | Groq | `GROQ_API_KEY` | `groq` |
62
63
  | Cerebras | `CEREBRAS_API_KEY` | `cerebras` |
@@ -74,12 +75,14 @@ atomic
74
75
  | Kimi For Coding | `KIMI_API_KEY` | `kimi-coding` |
75
76
  | MiniMax | `MINIMAX_API_KEY` | `minimax` |
76
77
  | MiniMax (China) | `MINIMAX_CN_API_KEY` | `minimax-cn` |
78
+ | Moonshot AI | `MOONSHOT_API_KEY` | `moonshotai` |
79
+ | Moonshot AI (China) | `MOONSHOT_API_KEY` | `moonshotai-cn` |
77
80
  | Xiaomi MiMo | `XIAOMI_API_KEY` | `xiaomi` |
78
81
  | Xiaomi MiMo Token Plan (China) | `XIAOMI_TOKEN_PLAN_CN_API_KEY` | `xiaomi-token-plan-cn` |
79
82
  | Xiaomi MiMo Token Plan (Amsterdam) | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` | `xiaomi-token-plan-ams` |
80
83
  | Xiaomi MiMo Token Plan (Singapore) | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` | `xiaomi-token-plan-sgp` |
81
84
 
82
- Reference for environment variables and `auth.json` keys: [`const envMap`](https://github.com/earendil-works/pi-mono/blob/main/packages/ai/src/env-api-keys.ts) in [`packages/ai/src/env-api-keys.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/ai/src/env-api-keys.ts).
85
+ Reference for environment variables and `auth.json` keys: `findEnvKeys()` / `getEnvApiKey()` in the installed `@earendil-works/pi-ai` dependency (`node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts`). The private provider map those functions use is in `node_modules/@earendil-works/pi-ai/dist/env-api-keys.js`; Atomic does not include a separate `packages/ai` source directory in this monorepo.
83
86
 
84
87
  #### Auth File
85
88
 
@@ -10,19 +10,26 @@ This page gets you from install to a useful first Atomic session.
10
10
 
11
11
  ## Install
12
12
 
13
- Atomic is distributed through npm-compatible package managers. Choose one:
13
+ Install the published package globally with npm, pnpm, or Bun:
14
+
15
+ With npm:
14
16
 
15
17
  ```bash
16
- # npm
17
18
  npm install -g @bastani/atomic
19
+ ```
18
20
 
19
- # Bun
20
- bun install -g @bastani/atomic
21
+ With pnpm:
21
22
 
22
- # pnpm
23
+ ```bash
23
24
  pnpm add -g @bastani/atomic
24
25
  ```
25
26
 
27
+ With Bun:
28
+
29
+ ```bash
30
+ bun add -g @bastani/atomic
31
+ ```
32
+
26
33
  Atomic does not require package install scripts. If you want to disable dependency lifecycle scripts during the Atomic install, you can add `--ignore-scripts` to the install command.
27
34
 
28
35
  Then start Atomic in the project directory you want it to work on:
@@ -73,12 +80,12 @@ Atomic ships with four workflows you can run immediately. Use `/workflow list` t
73
80
  |---|---|---|
74
81
  | `deep-research-codebase` | Broad, cross-cutting research before you decide what to change. Scout → research-history → parallel specialist waves → aggregator. | `/workflow deep-research-codebase prompt="How do payment retries work end to end?"` |
75
82
  | `goal` | Small-to-medium scope changes when you can identify the work surface, state the exact outcome, and name the validation that proves it is done — for example tests, lint/typecheck, docs builds, or observable behavior. Keeps the run bounded with a goal ledger, reviewer gates, and final status `complete`, `blocked`, or `needs_human`. | `/workflow goal objective="Implement specs/2026-03-rate-limit.md, run the focused tests, and finish when burst traffic returns 429"` |
76
- | `ralph` | Larger migrations, broad refactors, multi-package changes, and spec-to-PR work where you want Atomic to plan the approach, delegate implementation through sub-agents, simplify, review, iterate, and prepare a pull-request report. | `/workflow ralph prompt="Plan the database migration, implement it, review it, and prepare a PR"` |
83
+ | `ralph` | Larger migrations, broad refactors, multi-package changes, and spec-to-reviewed-change work where you want Atomic to plan the approach, delegate implementation through sub-agents, simplify, review, iterate, and optionally let only the final stage attempt PR creation with `create_pr=true`. | `/workflow ralph prompt="Plan the database migration, implement it, and review it" create_pr=true` |
77
84
  | `open-claude-design` | UI and design-system work with generation, critique, and refinement loops; renders a live `preview.html` you can iterate against. | `/workflow open-claude-design prompt="Refresh the settings page hierarchy" output_type=page` |
78
85
 
79
86
  <p align="center"><img src="images/workflow-list.png" alt="Workflow List" width="600" /></p>
80
87
 
81
- Inputs are bare `key=value` tokens. Values are JSON-parsed when possible, so `count=5`, `flag=true`, and `objective="multi word value"` preserve useful types. Some workflows expose reusable worktree inputs; for example, add `git_worktree_dir=../atomic-ralph-wt` to `ralph` to run its stages in a created/reused Git worktree while preserving your current repo-relative cwd. If you call `/workflow <name>` without required inputs, the TUI opens an inline picker; pass `--no-picker` to skip it.
88
+ Inputs are bare `key=value` tokens. Values are JSON-parsed when possible, so `count=5`, `flag=true`, and `objective="multi word value"` preserve useful types. Some workflows expose reusable worktree inputs; for example, add `git_worktree_dir=../atomic-ralph-wt` to `ralph` to run its stages in a created/reused Git worktree while preserving your current repo-relative cwd. Ralph skips PR creation by default; prompt text alone does not opt in. Add `create_pr=true` only when you want its final `pull-request` stage to inspect provider credentials and attempt provider-appropriate PR/MR/review creation, such as GitHub `gh`, Azure Repos `az repos pr create`, or Sapling/Phabricator tooling; Ralph's own PR-creation instructions live in that final stage. If you call `/workflow <name>` without required inputs, the TUI opens an inline picker; pass `--no-picker` to skip it.
82
89
 
83
90
  You can also launch workflows with **natural language** — just describe the task in chat and ask Atomic to run the matching workflow:
84
91
 
@@ -94,7 +101,7 @@ Atomic picks the workflow, fills in inputs from the request, and confirms before
94
101
 
95
102
  Use `goal` for small-to-medium scope changes when you can identify the work surface, state the exact outcome you want, and name the validation that proves it is done — for example specific tests, lint/typecheck commands, docs builds, or observable behavior. It keeps the run bounded, captures receipts in a goal ledger, gates completion through reviewers, and stops as `complete`, `blocked`, or `needs_human`.
96
103
 
97
- Keep using `ralph` for larger migrations, broad refactors, multi-package changes, and spec-to-PR work where you want Atomic to plan the approach, delegate implementation through sub-agents, simplify, review, iterate, and prepare a pull-request report.
104
+ Keep using `ralph` for larger migrations, broad refactors, multi-package changes, and spec-to-reviewed-change work where you want Atomic to plan the approach, delegate implementation through sub-agents, simplify, review, iterate, and optionally allow only the final `pull-request` stage to attempt PR creation with `create_pr=true`.
98
105
 
99
106
  ### Monitor and steer a run
100
107
 
@@ -125,7 +132,7 @@ Skills are reusable expert instructions. Trigger one with `/skill:<name>` follow
125
132
  | `tdd` | Test-first feature or bug work. | `/skill:tdd` |
126
133
  | `impeccable` | Critique or refine frontend and product UI. | `/skill:impeccable` |
127
134
 
128
- Use `/skill:research-codebase` for a focused area and `/workflow deep-research-codebase` when the answer spans the whole repo. A typical focused flow is `/skill:research-codebase` → `/skill:create-spec` → `/workflow goal` with an objective that identifies the work surface, states the exact outcome, and names the validation that proves it is done. Keep using `/workflow ralph` for larger migrations, broad refactors, multi-package changes, and spec-to-PR work where you want Atomic to plan, delegate through sub-agents, simplify, review, iterate, and prepare a pull-request report.
135
+ Use `/skill:research-codebase` for a focused area and `/workflow deep-research-codebase` when the answer spans the whole repo. A typical focused flow is `/skill:research-codebase` → `/skill:create-spec` → `/workflow goal` with an objective that identifies the work surface, states the exact outcome, and names the validation that proves it is done. Keep using `/workflow ralph` for larger migrations, broad refactors, multi-package changes, and spec-to-reviewed-change work where you want Atomic to plan, delegate through sub-agents, simplify, review, iterate, and optionally allow only the final `pull-request` stage to attempt PR creation with `create_pr=true`.
129
136
 
130
137
  ### Create your own workflow in natural language
131
138
 
@@ -174,7 +181,7 @@ Atomic loads context files at startup. Add an `AGENTS.md` file to tell it how to
174
181
  ```markdown
175
182
  # Project Instructions
176
183
 
177
- - Run `npm run check` after code changes.
184
+ - Run `bun run typecheck` after code changes.
178
185
  - Do not run production migrations locally.
179
186
  - Keep responses concise.
180
187
  ```
@@ -204,7 +211,7 @@ Images can be pasted with CTRL+V (ALT+V on Windows) or dragged into supported te
204
211
  In interactive mode:
205
212
 
206
213
  ```text
207
- !npm run lint
214
+ !bun run lint
208
215
  ```
209
216
 
210
217
  The command output is sent to the model. Use `!!command` to run a command without adding its output to the model context.
package/docs/rpc.md CHANGED
@@ -352,17 +352,12 @@ Response:
352
352
 
353
353
  #### compact
354
354
 
355
- Manually compact conversation context to reduce token usage.
355
+ Run Atomic's default Verbatim Compaction to reduce token usage. This command has no prompt/config fields; send no custom instructions. The selected model runs Atomic's fixed internal planner with transcript-bound tools (`context_search_transcript`, `context_read_entry`, `context_delete`, and `context_grep_delete`); Atomic validates the cumulative deletion targets locally, appends a `context_compaction` entry, and rebuilds active context with surviving entries/content blocks reused verbatim. This deletion-only Context Compaction approach is informed by Morph's article: [Morph's Context Compaction](https://www.morphllm.com/context-compaction).
356
356
 
357
357
  ```json
358
358
  {"type": "compact"}
359
359
  ```
360
360
 
361
- With custom instructions:
362
- ```json
363
- {"type": "compact", "customInstructions": "Focus on code changes"}
364
- ```
365
-
366
361
  Response:
367
362
  ```json
368
363
  {
@@ -370,10 +365,18 @@ Response:
370
365
  "command": "compact",
371
366
  "success": true,
372
367
  "data": {
373
- "summary": "Summary of conversation...",
374
- "firstKeptEntryId": "abc123",
375
- "tokensBefore": 150000,
376
- "details": {}
368
+ "promptVersion": 1,
369
+ "deletedTargets": [{ "kind": "entry", "entryId": "abc123" }],
370
+ "protectedEntryIds": ["user-task-entry"],
371
+ "stats": {
372
+ "objectsBefore": 20,
373
+ "objectsAfter": 19,
374
+ "objectsDeleted": 1,
375
+ "tokensBefore": 150000,
376
+ "tokensAfter": 120000,
377
+ "percentReduction": 20
378
+ },
379
+ "backupPath": "/path/to/session.jsonl.2026-06-06T00-00-00-000Z.compact.bak"
377
380
  }
378
381
  }
379
382
  ```
@@ -455,7 +458,7 @@ If output was truncated, includes `fullOutputPath`:
455
458
  "exitCode": 0,
456
459
  "cancelled": false,
457
460
  "truncated": true,
458
- "fullOutputPath": "/tmp/pi-bash-abc123.log"
461
+ "fullOutputPath": "/tmp/atomic-bash-abc123.log"
459
462
  }
460
463
  }
461
464
  ```
@@ -756,8 +759,10 @@ Events are streamed to stdout as JSON lines during agent operation. Events do NO
756
759
  | `tool_execution_update` | Tool execution progress (streaming output) |
757
760
  | `tool_execution_end` | Tool completes |
758
761
  | `queue_update` | Pending steering/follow-up queue changed |
759
- | `compaction_start` | Compaction begins |
760
- | `compaction_end` | Compaction completes |
762
+ | `compaction_start` | Default Verbatim Compaction begins |
763
+ | `compaction_end` | Default Verbatim Compaction completes |
764
+ | `context_compaction_start` | Compatibility `context_compact` RPC begins |
765
+ | `context_compaction_end` | Compatibility `context_compact` RPC completes |
761
766
  | `auto_retry_start` | Auto-retry begins (after transient error) |
762
767
  | `auto_retry_end` | Auto-retry completes (success or final failure) |
763
768
  | `extension_error` | Extension threw an error |
@@ -907,7 +912,7 @@ Emitted whenever the pending steering or follow-up queue changes.
907
912
 
908
913
  ### compaction_start / compaction_end
909
914
 
910
- Emitted when compaction runs, whether manual or automatic.
915
+ Emitted when default Verbatim Compaction runs, whether manual or automatic. The result records deletion targets and stats rather than a generated summary.
911
916
 
912
917
  ```json
913
918
  {"type": "compaction_start", "reason": "threshold"}
@@ -920,10 +925,17 @@ The `reason` field is `"manual"`, `"threshold"`, or `"overflow"`.
920
925
  "type": "compaction_end",
921
926
  "reason": "threshold",
922
927
  "result": {
923
- "summary": "Summary of conversation...",
924
- "firstKeptEntryId": "abc123",
925
- "tokensBefore": 150000,
926
- "details": {}
928
+ "promptVersion": 1,
929
+ "deletedTargets": [{ "kind": "entry", "entryId": "abc123" }],
930
+ "protectedEntryIds": ["user-task-entry"],
931
+ "stats": {
932
+ "objectsBefore": 20,
933
+ "objectsAfter": 19,
934
+ "objectsDeleted": 1,
935
+ "tokensBefore": 150000,
936
+ "tokensAfter": 120000,
937
+ "percentReduction": 20
938
+ }
927
939
  },
928
940
  "aborted": false,
929
941
  "willRetry": false
@@ -936,6 +948,10 @@ If compaction was aborted, `result` is `null` and `aborted` is `true`.
936
948
 
937
949
  If compaction failed (e.g., API quota exceeded), `result` is `null`, `aborted` is `false`, and `errorMessage` contains the error description.
938
950
 
951
+ ### context_compaction_start / context_compaction_end
952
+
953
+ The compatibility RPC command `context_compact` emits these events. It uses the same deletion-only Verbatim Compaction path as `compact`, but reports the historical context-compaction event names. The result contains `deletedTargets`, `protectedEntryIds`, `stats`, `promptVersion`, and optional `backupPath`.
954
+
939
955
  ### auto_retry_start / auto_retry_end
940
956
 
941
957
  Emitted when automatic retry is triggered after a transient error (overloaded, rate limit, 5xx).
@@ -1199,9 +1215,9 @@ Parse errors:
1199
1215
 
1200
1216
  ## Types
1201
1217
 
1202
- Source files:
1203
- - [`packages/ai/src/types.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/ai/src/types.ts) - `Model`, `UserMessage`, `AssistantMessage`, `ToolResultMessage`
1204
- - [`packages/agent/src/types.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/agent/src/types.ts) - `AgentMessage`, `AgentEvent`
1218
+ Source files and installed definitions:
1219
+ - `node_modules/@earendil-works/pi-ai/dist/types.d.ts` - `Model`, `UserMessage`, `AssistantMessage`, `ToolResultMessage`
1220
+ - `node_modules/@earendil-works/pi-agent-core/dist/types.d.ts` - `AgentMessage`, `AgentEvent`
1205
1221
  - [`src/core/messages.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/messages.ts) - `BashExecutionMessage`
1206
1222
  - [`src/modes/rpc/rpc-types.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/modes/rpc/rpc-types.ts) - RPC command/response types, extension UI request/response types
1207
1223
 
@@ -1233,8 +1249,7 @@ Source files:
1233
1249
  {
1234
1250
  "role": "user",
1235
1251
  "content": "Hello!",
1236
- "timestamp": 1733234567890,
1237
- "attachments": []
1252
+ "timestamp": 1733234567890
1238
1253
  }
1239
1254
  ```
1240
1255