@bastani/atomic 0.9.8-alpha.1 → 0.9.9-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 (348) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/builtin/cursor/CHANGELOG.md +12 -0
  3. package/dist/builtin/cursor/package.json +2 -2
  4. package/dist/builtin/intercom/CHANGELOG.md +12 -0
  5. package/dist/builtin/intercom/package.json +1 -1
  6. package/dist/builtin/mcp/CHANGELOG.md +12 -0
  7. package/dist/builtin/mcp/package.json +1 -1
  8. package/dist/builtin/subagents/CHANGELOG.md +13 -0
  9. package/dist/builtin/subagents/package.json +1 -1
  10. package/dist/builtin/subagents/src/runs/background/async-execution-chain.ts +2 -0
  11. package/dist/builtin/subagents/src/runs/background/async-execution-common.ts +7 -1
  12. package/dist/builtin/subagents/src/runs/background/async-execution-single.ts +2 -0
  13. package/dist/builtin/subagents/src/runs/background/async-execution-types.ts +8 -2
  14. package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-runner.ts +2 -0
  15. package/dist/builtin/subagents/src/runs/foreground/chain-execution-sequential-step.ts +2 -0
  16. package/dist/builtin/subagents/src/runs/foreground/execution-attempt.ts +2 -1
  17. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-async.ts +2 -0
  18. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel-task.ts +2 -0
  19. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-resume.ts +2 -0
  20. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-single.ts +2 -0
  21. package/dist/builtin/subagents/src/runs/shared/pi-args.ts +6 -0
  22. package/dist/builtin/subagents/src/shared/types-config.ts +4 -0
  23. package/dist/builtin/subagents/src/shared/types-depth.ts +29 -2
  24. package/dist/builtin/web-access/CHANGELOG.md +12 -0
  25. package/dist/builtin/web-access/package.json +1 -1
  26. package/dist/builtin/workflows/CHANGELOG.md +34 -0
  27. package/dist/builtin/workflows/README.md +17 -8
  28. package/dist/builtin/workflows/builtin/goal-prompts.ts +8 -2
  29. package/dist/builtin/workflows/builtin/open-claude-design-utils.ts +26 -9
  30. package/dist/builtin/workflows/builtin/ralph-forked-prompts.ts +1 -1
  31. package/dist/builtin/workflows/builtin/ralph-reviewer-prompt.ts +8 -3
  32. package/dist/builtin/workflows/builtin/ralph-runner.ts +2 -0
  33. package/dist/builtin/workflows/builtin/shared-prompts.ts +24 -1
  34. package/dist/builtin/workflows/package.json +1 -1
  35. package/dist/builtin/workflows/src/durable/backend.ts +53 -15
  36. package/dist/builtin/workflows/src/durable/completed-catalog.ts +245 -0
  37. package/dist/builtin/workflows/src/durable/completed-inspection.ts +213 -0
  38. package/dist/builtin/workflows/src/durable/dbos-backend.ts +120 -170
  39. package/dist/builtin/workflows/src/durable/dbos-envelope.ts +84 -8
  40. package/dist/builtin/workflows/src/durable/dbos-metadata.ts +98 -0
  41. package/dist/builtin/workflows/src/durable/dbos-tombstone.ts +27 -0
  42. package/dist/builtin/workflows/src/durable/factory.ts +1 -1
  43. package/dist/builtin/workflows/src/durable/file-backend.ts +247 -241
  44. package/dist/builtin/workflows/src/durable/file-lock.ts +153 -0
  45. package/dist/builtin/workflows/src/durable/file-state.ts +104 -0
  46. package/dist/builtin/workflows/src/durable/format-version.ts +12 -0
  47. package/dist/builtin/workflows/src/durable/index.ts +12 -0
  48. package/dist/builtin/workflows/src/durable/resume-catalog.ts +16 -27
  49. package/dist/builtin/workflows/src/durable/resume-eligibility.ts +20 -0
  50. package/dist/builtin/workflows/src/durable/resume-runtime.ts +29 -29
  51. package/dist/builtin/workflows/src/durable/scoped-backend.ts +20 -3
  52. package/dist/builtin/workflows/src/durable/stage-primitive.ts +29 -8
  53. package/dist/builtin/workflows/src/durable/types.ts +3 -0
  54. package/dist/builtin/workflows/src/engine/primitives/task.ts +1 -0
  55. package/dist/builtin/workflows/src/engine/run.ts +14 -14
  56. package/dist/builtin/workflows/src/extension/extension-lifecycle.ts +39 -9
  57. package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +10 -0
  58. package/dist/builtin/workflows/src/extension/runtime-durable-resume.ts +133 -0
  59. package/dist/builtin/workflows/src/extension/runtime.ts +15 -40
  60. package/dist/builtin/workflows/src/extension/wiring.ts +9 -6
  61. package/dist/builtin/workflows/src/extension/workflow-durable-resume-command.ts +226 -0
  62. package/dist/builtin/workflows/src/extension/workflow-prompts.ts +1 -0
  63. package/dist/builtin/workflows/src/extension/workflow-run-control-command.ts +66 -112
  64. package/dist/builtin/workflows/src/extension/workflow-schema.ts +5 -5
  65. package/dist/builtin/workflows/src/extension/workflow-tool-control.ts +16 -1
  66. package/dist/builtin/workflows/src/runs/foreground/executor-direct-helpers.ts +50 -43
  67. package/dist/builtin/workflows/src/runs/foreground/executor-direct-output.ts +91 -0
  68. package/dist/builtin/workflows/src/runs/foreground/executor-direct.ts +95 -46
  69. package/dist/builtin/workflows/src/runs/foreground/executor-stage-call.ts +3 -1
  70. package/dist/builtin/workflows/src/runs/foreground/executor-task-prompts.ts +1 -1
  71. package/dist/builtin/workflows/src/runs/foreground/executor-types.ts +3 -0
  72. package/dist/builtin/workflows/src/runs/foreground/stage-runner-controller.ts +1 -1
  73. package/dist/builtin/workflows/src/runs/foreground/stage-runner-options.ts +36 -7
  74. package/dist/builtin/workflows/src/runs/shared/worktree-cache-lifecycle.ts +25 -0
  75. package/dist/builtin/workflows/src/runs/shared/worktree-cwd.ts +103 -0
  76. package/dist/builtin/workflows/src/runs/shared/worktree-generation.ts +57 -0
  77. package/dist/builtin/workflows/src/runs/shared/worktree-git.ts +134 -8
  78. package/dist/builtin/workflows/src/runs/shared/worktree.ts +2 -0
  79. package/dist/builtin/workflows/src/shared/resumable-workflow-notices.ts +43 -0
  80. package/dist/builtin/workflows/src/shared/timing.ts +4 -0
  81. package/dist/builtin/workflows/src/shared/types.ts +5 -3
  82. package/dist/builtin/workflows/src/tui/graph-view-constants.ts +1 -0
  83. package/dist/builtin/workflows/src/tui/graph-view-input.ts +24 -14
  84. package/dist/builtin/workflows/src/tui/workflow-resume-selector.ts +43 -13
  85. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  86. package/dist/core/agent-session-auto-compaction.js +5 -7
  87. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  88. package/dist/core/agent-session-compaction.d.ts +6 -34
  89. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  90. package/dist/core/agent-session-compaction.js +95 -233
  91. package/dist/core/agent-session-compaction.js.map +1 -1
  92. package/dist/core/agent-session-message-queue.d.ts +0 -4
  93. package/dist/core/agent-session-message-queue.d.ts.map +1 -1
  94. package/dist/core/agent-session-message-queue.js +1 -5
  95. package/dist/core/agent-session-message-queue.js.map +1 -1
  96. package/dist/core/agent-session-methods.d.ts +5 -6
  97. package/dist/core/agent-session-methods.d.ts.map +1 -1
  98. package/dist/core/agent-session-methods.js.map +1 -1
  99. package/dist/core/agent-session-types.d.ts +2 -12
  100. package/dist/core/agent-session-types.d.ts.map +1 -1
  101. package/dist/core/agent-session-types.js.map +1 -1
  102. package/dist/core/compaction/branch-summarization.d.ts +1 -1
  103. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  104. package/dist/core/compaction/branch-summarization.js +1 -2
  105. package/dist/core/compaction/branch-summarization.js.map +1 -1
  106. package/dist/core/compaction/compaction-boundary.d.ts +9 -0
  107. package/dist/core/compaction/compaction-boundary.d.ts.map +1 -0
  108. package/dist/core/compaction/compaction-boundary.js +115 -0
  109. package/dist/core/compaction/compaction-boundary.js.map +1 -0
  110. package/dist/core/compaction/compaction-parameters.d.ts +5 -0
  111. package/dist/core/compaction/compaction-parameters.d.ts.map +1 -0
  112. package/dist/core/compaction/compaction-parameters.js +27 -0
  113. package/dist/core/compaction/compaction-parameters.js.map +1 -0
  114. package/dist/core/compaction/compaction-runner.d.ts +14 -0
  115. package/dist/core/compaction/compaction-runner.d.ts.map +1 -0
  116. package/dist/core/compaction/compaction-runner.js +29 -0
  117. package/dist/core/compaction/compaction-runner.js.map +1 -0
  118. package/dist/core/compaction/compaction-types.d.ts +79 -0
  119. package/dist/core/compaction/compaction-types.d.ts.map +1 -0
  120. package/dist/core/compaction/compaction-types.js +6 -0
  121. package/dist/core/compaction/compaction-types.js.map +1 -0
  122. package/dist/core/compaction/deleted-ranges.d.ts +6 -0
  123. package/dist/core/compaction/deleted-ranges.d.ts.map +1 -0
  124. package/dist/core/compaction/deleted-ranges.js +134 -0
  125. package/dist/core/compaction/deleted-ranges.js.map +1 -0
  126. package/dist/core/compaction/index.d.ts +7 -1
  127. package/dist/core/compaction/index.d.ts.map +1 -1
  128. package/dist/core/compaction/index.js +7 -1
  129. package/dist/core/compaction/index.js.map +1 -1
  130. package/dist/core/compaction/range-planner.d.ts +21 -0
  131. package/dist/core/compaction/range-planner.d.ts.map +1 -0
  132. package/dist/core/compaction/range-planner.js +145 -0
  133. package/dist/core/compaction/range-planner.js.map +1 -0
  134. package/dist/core/compaction/transcript-serialization.d.ts +11 -0
  135. package/dist/core/compaction/transcript-serialization.d.ts.map +1 -0
  136. package/dist/core/compaction/transcript-serialization.js +104 -0
  137. package/dist/core/compaction/transcript-serialization.js.map +1 -0
  138. package/dist/core/extensions/context-types.d.ts +2 -2
  139. package/dist/core/extensions/context-types.d.ts.map +1 -1
  140. package/dist/core/extensions/context-types.js.map +1 -1
  141. package/dist/core/extensions/event-results.d.ts +2 -2
  142. package/dist/core/extensions/event-results.d.ts.map +1 -1
  143. package/dist/core/extensions/event-results.js.map +1 -1
  144. package/dist/core/extensions/session-events.d.ts +7 -7
  145. package/dist/core/extensions/session-events.d.ts.map +1 -1
  146. package/dist/core/extensions/session-events.js.map +1 -1
  147. package/dist/core/index.d.ts +1 -1
  148. package/dist/core/index.d.ts.map +1 -1
  149. package/dist/core/index.js.map +1 -1
  150. package/dist/core/messages.d.ts +4 -0
  151. package/dist/core/messages.d.ts.map +1 -1
  152. package/dist/core/messages.js +11 -0
  153. package/dist/core/messages.js.map +1 -1
  154. package/dist/core/provider-context-usage.d.ts.map +1 -1
  155. package/dist/core/provider-context-usage.js +1 -2
  156. package/dist/core/provider-context-usage.js.map +1 -1
  157. package/dist/core/session-manager-archive.d.ts +2 -1
  158. package/dist/core/session-manager-archive.d.ts.map +1 -1
  159. package/dist/core/session-manager-archive.js +2 -2
  160. package/dist/core/session-manager-archive.js.map +1 -1
  161. package/dist/core/session-manager-classification.d.ts +9 -0
  162. package/dist/core/session-manager-classification.d.ts.map +1 -0
  163. package/dist/core/session-manager-classification.js +37 -0
  164. package/dist/core/session-manager-classification.js.map +1 -0
  165. package/dist/core/session-manager-core.d.ts +4 -4
  166. package/dist/core/session-manager-core.d.ts.map +1 -1
  167. package/dist/core/session-manager-core.js +13 -8
  168. package/dist/core/session-manager-core.js.map +1 -1
  169. package/dist/core/session-manager-entries.d.ts +4 -3
  170. package/dist/core/session-manager-entries.d.ts.map +1 -1
  171. package/dist/core/session-manager-entries.js +12 -10
  172. package/dist/core/session-manager-entries.js.map +1 -1
  173. package/dist/core/session-manager-history.d.ts +6 -23
  174. package/dist/core/session-manager-history.d.ts.map +1 -1
  175. package/dist/core/session-manager-history.js +23 -256
  176. package/dist/core/session-manager-history.js.map +1 -1
  177. package/dist/core/session-manager-list.d.ts.map +1 -1
  178. package/dist/core/session-manager-list.js +3 -3
  179. package/dist/core/session-manager-list.js.map +1 -1
  180. package/dist/core/session-manager-storage.d.ts +1 -1
  181. package/dist/core/session-manager-storage.d.ts.map +1 -1
  182. package/dist/core/session-manager-storage.js +3 -2
  183. package/dist/core/session-manager-storage.js.map +1 -1
  184. package/dist/core/session-manager-types.d.ts +14 -15
  185. package/dist/core/session-manager-types.d.ts.map +1 -1
  186. package/dist/core/session-manager-types.js.map +1 -1
  187. package/dist/core/session-manager.d.ts +3 -2
  188. package/dist/core/session-manager.d.ts.map +1 -1
  189. package/dist/core/session-manager.js +1 -1
  190. package/dist/core/session-manager.js.map +1 -1
  191. package/dist/core/slash-commands.d.ts.map +1 -1
  192. package/dist/core/slash-commands.js +1 -1
  193. package/dist/core/slash-commands.js.map +1 -1
  194. package/dist/index.d.ts +3 -2
  195. package/dist/index.d.ts.map +1 -1
  196. package/dist/index.js +2 -1
  197. package/dist/index.js.map +1 -1
  198. package/dist/main-session.d.ts +1 -0
  199. package/dist/main-session.d.ts.map +1 -1
  200. package/dist/main-session.js +7 -0
  201. package/dist/main-session.js.map +1 -1
  202. package/dist/main.d.ts.map +1 -1
  203. package/dist/main.js +2 -2
  204. package/dist/main.js.map +1 -1
  205. package/dist/modes/interactive/components/chat-message-renderer.d.ts +4 -1
  206. package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
  207. package/dist/modes/interactive/components/chat-message-renderer.js +12 -22
  208. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  209. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  210. package/dist/modes/interactive/components/chat-session-host-events.js +5 -11
  211. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  212. package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
  213. package/dist/modes/interactive/components/chat-session-host-rendering.js +3 -0
  214. package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
  215. package/dist/modes/interactive/components/chat-session-host-state.d.ts +1 -0
  216. package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
  217. package/dist/modes/interactive/components/chat-session-host-state.js +1 -0
  218. package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
  219. package/dist/modes/interactive/components/chat-session-host-utils.d.ts.map +1 -1
  220. package/dist/modes/interactive/components/chat-session-host-utils.js +1 -1
  221. package/dist/modes/interactive/components/chat-session-host-utils.js.map +1 -1
  222. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  223. package/dist/modes/interactive/components/chat-session-host.js +1 -0
  224. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  225. package/dist/modes/interactive/components/compaction-boundary-message.d.ts +20 -0
  226. package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -0
  227. package/dist/modes/interactive/components/compaction-boundary-message.js +48 -0
  228. package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -0
  229. package/dist/modes/interactive/components/index.d.ts +1 -1
  230. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  231. package/dist/modes/interactive/components/index.js +1 -1
  232. package/dist/modes/interactive/components/index.js.map +1 -1
  233. package/dist/modes/interactive/components/session-selector-list.d.ts.map +1 -1
  234. package/dist/modes/interactive/components/session-selector-list.js +3 -0
  235. package/dist/modes/interactive/components/session-selector-list.js.map +1 -1
  236. package/dist/modes/interactive/interactive-agent-events.d.ts.map +1 -1
  237. package/dist/modes/interactive/interactive-agent-events.js +3 -47
  238. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  239. package/dist/modes/interactive/interactive-mode-deps.d.ts +2 -2
  240. package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
  241. package/dist/modes/interactive/interactive-mode-deps.js +1 -1
  242. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  243. package/dist/modes/interactive/interactive-mode-surface.d.ts +5 -3
  244. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  245. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  246. package/dist/modes/interactive/interactive-render-chat.d.ts.map +1 -1
  247. package/dist/modes/interactive/interactive-render-chat.js +21 -12
  248. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  249. package/dist/modes/rpc/rpc-client.d.ts +3 -5
  250. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  251. package/dist/modes/rpc/rpc-client.js +1 -6
  252. package/dist/modes/rpc/rpc-client.js.map +1 -1
  253. package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
  254. package/dist/modes/rpc/rpc-command-handler.js +0 -4
  255. package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
  256. package/dist/modes/rpc/rpc-types.d.ts +2 -11
  257. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  258. package/dist/modes/rpc/rpc-types.js.map +1 -1
  259. package/docs/compaction.md +97 -772
  260. package/docs/extensions.md +25 -29
  261. package/docs/json.md +2 -2
  262. package/docs/rpc.md +32 -24
  263. package/docs/sdk.md +3 -3
  264. package/docs/session-format.md +49 -30
  265. package/docs/sessions.md +5 -3
  266. package/docs/settings.md +14 -4
  267. package/docs/usage.md +1 -1
  268. package/docs/workflows.md +30 -15
  269. package/examples/extensions/custom-compaction.ts +14 -58
  270. package/examples/extensions/handoff.ts +2 -3
  271. package/npm-shrinkwrap.json +23 -23
  272. package/package.json +2 -2
  273. package/dist/core/compaction/context-assistant-turns.d.ts +0 -42
  274. package/dist/core/compaction/context-assistant-turns.d.ts.map +0 -1
  275. package/dist/core/compaction/context-assistant-turns.js +0 -87
  276. package/dist/core/compaction/context-assistant-turns.js.map +0 -1
  277. package/dist/core/compaction/context-compaction-critical.d.ts +0 -15
  278. package/dist/core/compaction/context-compaction-critical.d.ts.map +0 -1
  279. package/dist/core/compaction/context-compaction-critical.js +0 -57
  280. package/dist/core/compaction/context-compaction-critical.js.map +0 -1
  281. package/dist/core/compaction/context-compaction-eviction-alternates.d.ts +0 -18
  282. package/dist/core/compaction/context-compaction-eviction-alternates.d.ts.map +0 -1
  283. package/dist/core/compaction/context-compaction-eviction-alternates.js +0 -186
  284. package/dist/core/compaction/context-compaction-eviction-alternates.js.map +0 -1
  285. package/dist/core/compaction/context-compaction-eviction.d.ts +0 -12
  286. package/dist/core/compaction/context-compaction-eviction.d.ts.map +0 -1
  287. package/dist/core/compaction/context-compaction-eviction.js +0 -222
  288. package/dist/core/compaction/context-compaction-eviction.js.map +0 -1
  289. package/dist/core/compaction/context-compaction-metrics.d.ts +0 -28
  290. package/dist/core/compaction/context-compaction-metrics.d.ts.map +0 -1
  291. package/dist/core/compaction/context-compaction-metrics.js +0 -107
  292. package/dist/core/compaction/context-compaction-metrics.js.map +0 -1
  293. package/dist/core/compaction/context-compaction-prompt.d.ts +0 -9
  294. package/dist/core/compaction/context-compaction-prompt.d.ts.map +0 -1
  295. package/dist/core/compaction/context-compaction-prompt.js +0 -163
  296. package/dist/core/compaction/context-compaction-prompt.js.map +0 -1
  297. package/dist/core/compaction/context-compaction-runner.d.ts +0 -11
  298. package/dist/core/compaction/context-compaction-runner.d.ts.map +0 -1
  299. package/dist/core/compaction/context-compaction-runner.js +0 -273
  300. package/dist/core/compaction/context-compaction-runner.js.map +0 -1
  301. package/dist/core/compaction/context-compaction-strategy.d.ts +0 -5
  302. package/dist/core/compaction/context-compaction-strategy.d.ts.map +0 -1
  303. package/dist/core/compaction/context-compaction-strategy.js +0 -27
  304. package/dist/core/compaction/context-compaction-strategy.js.map +0 -1
  305. package/dist/core/compaction/context-compaction-types.d.ts +0 -75
  306. package/dist/core/compaction/context-compaction-types.d.ts.map +0 -1
  307. package/dist/core/compaction/context-compaction-types.js +0 -6
  308. package/dist/core/compaction/context-compaction-types.js.map +0 -1
  309. package/dist/core/compaction/context-compaction.d.ts +0 -10
  310. package/dist/core/compaction/context-compaction.d.ts.map +0 -1
  311. package/dist/core/compaction/context-compaction.js +0 -8
  312. package/dist/core/compaction/context-compaction.js.map +0 -1
  313. package/dist/core/compaction/context-deletion-application.d.ts +0 -14
  314. package/dist/core/compaction/context-deletion-application.d.ts.map +0 -1
  315. package/dist/core/compaction/context-deletion-application.js +0 -261
  316. package/dist/core/compaction/context-deletion-application.js.map +0 -1
  317. package/dist/core/compaction/context-deletion-store.d.ts +0 -78
  318. package/dist/core/compaction/context-deletion-store.d.ts.map +0 -1
  319. package/dist/core/compaction/context-deletion-store.js +0 -162
  320. package/dist/core/compaction/context-deletion-store.js.map +0 -1
  321. package/dist/core/compaction/context-deletion-targets.d.ts +0 -43
  322. package/dist/core/compaction/context-deletion-targets.d.ts.map +0 -1
  323. package/dist/core/compaction/context-deletion-targets.js +0 -292
  324. package/dist/core/compaction/context-deletion-targets.js.map +0 -1
  325. package/dist/core/compaction/context-deletion-tool-definitions.d.ts +0 -193
  326. package/dist/core/compaction/context-deletion-tool-definitions.d.ts.map +0 -1
  327. package/dist/core/compaction/context-deletion-tool-definitions.js +0 -98
  328. package/dist/core/compaction/context-deletion-tool-definitions.js.map +0 -1
  329. package/dist/core/compaction/context-deletion-tool-helpers.d.ts +0 -19
  330. package/dist/core/compaction/context-deletion-tool-helpers.d.ts.map +0 -1
  331. package/dist/core/compaction/context-deletion-tool-helpers.js +0 -210
  332. package/dist/core/compaction/context-deletion-tool-helpers.js.map +0 -1
  333. package/dist/core/compaction/context-deletion-tools.d.ts +0 -4
  334. package/dist/core/compaction/context-deletion-tools.d.ts.map +0 -1
  335. package/dist/core/compaction/context-deletion-tools.js +0 -403
  336. package/dist/core/compaction/context-deletion-tools.js.map +0 -1
  337. package/dist/core/compaction/context-transcript-analysis.d.ts +0 -11
  338. package/dist/core/compaction/context-transcript-analysis.d.ts.map +0 -1
  339. package/dist/core/compaction/context-transcript-analysis.js +0 -228
  340. package/dist/core/compaction/context-transcript-analysis.js.map +0 -1
  341. package/dist/core/session-manager-tool-dependencies.d.ts +0 -10
  342. package/dist/core/session-manager-tool-dependencies.d.ts.map +0 -1
  343. package/dist/core/session-manager-tool-dependencies.js +0 -133
  344. package/dist/core/session-manager-tool-dependencies.js.map +0 -1
  345. package/dist/modes/interactive/components/context-compaction-summary-message.d.ts +0 -17
  346. package/dist/modes/interactive/components/context-compaction-summary-message.d.ts.map +0 -1
  347. package/dist/modes/interactive/components/context-compaction-summary-message.js +0 -83
  348. package/dist/modes/interactive/components/context-compaction-summary-message.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,48 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.9-alpha.1] - 2026-07-14
6
+
7
+ ### Breaking Changes
8
+
9
+ - Replaced deletion-target context compaction with durable verbatim line compaction. Legacy `context_compaction` entries are now inert archival records, so content they previously hid may re-enter context when old sessions resume; start a new conversation or compact again to establish a new boundary.
10
+ - Removed the deprecated `contextCompact()` SDK method, `context_compact` RPC command, and `context_compaction_start`/`context_compaction_end` events. Use `compact()` and `compaction_start`/`compaction_end`.
11
+ - Changed extension compaction hooks: `session_before_compact` now accepts `cancel` or a complete non-empty `compactedText` override instead of `deletionRequest`; `session_compact` exposes `VerbatimCompactionResult` and the saved `compactionEntry`.
12
+
13
+ ### Added
14
+
15
+ - Added one-pass contextual line-ranking compaction: Atomic asks the active session model at its active reasoning level, through the normal session stream/provider wrapper, for one whole-region compact `{"d":[[start,end],...]}` deletion plan, then safety-normalizes ranges and mechanically reconstructs verbatim text with cumulative `(filtered N lines)` markers.
16
+ - Added strict pi-style compaction failure semantics: oversized prompts, provider/API errors or overflow, aborts, malformed JSON, and empty/unusable ranges fail without persistence or continuation and without semantic retries, chunking, critical replans, deterministic fallback, or deterministic target correction.
17
+ - Added durable pi-style `CompactionEntry` boundaries discriminated by `details.strategy: "verbatim-lines"`, plus resumable custom-role boundary messages and a collapsible TUI card showing retained-line and token-reduction statistics.
18
+
19
+ ### Changed
20
+
21
+ - Changed `compression_ratio` to explicitly represent the fraction of compactable lines to keep. `preserve_recent` is enforced client-side, widens the tail to a user-turn start, and always protects the final logical turn. Role headers are now ordinary ranked lines; only explicit protected spans are split out of model-selected deletion ranges.
22
+ - Simplified resume reconstruction to load the persisted compacted string followed by original messages from `firstKeptEntryId`; no deletion filters, signed-thinking repair pass, or tool dependency repair is re-derived.
23
+ - Retuned the one-pass compaction classifier's retention guidance to surgically thin long tool results, preserve compact diagnostic/code/state anchors, prune repeated retry and superseded bodies, and treat formatting, stack position, markers, and query matches as contextual rather than hard categories.
24
+
25
+
26
+ ### Fixed
27
+
28
+ - Fixed resumed sessions resurrecting records hidden by earlier Verbatim Compaction entries after later compactions changed signed-thinking turn or tool-call/result dependencies. Persisted logical deletions are now an authoritative lower bound during every context rebuild: Atomic closes unsafe replay structures by adding transient omissions instead of restoring compacted calls/results, pairs each result with its concrete call occurrence so independent exchanges may reuse an opaque call ID, leaves unrelated retained history unchanged, and keeps the append-only session file intact.
29
+ - Fixed successful manual and automatic compaction UI refreshes to render the compacted transcript with exactly one visible `✻ Context compacted` boundary, while aborted and failed compactions remain unchanged.
30
+ - Fixed the bundled workflows `/workflow resume` experience to mix successful completed workflows into the existing globally newest-first, deduplicated picker with green completed styling, resolve full IDs and prefixes across live, durable, and completed targets, and reopen retained stage chats for follow-up without re-running workflow code or replaying side effects. Completed durable state is retained for authoritative inspection; rows need checkpoints and at least one strictly valid retained conversation, invalid per-stage transcript paths cannot open chat, repeated inspection refreshes changed authoritative chat handles, and selector mount failures close safely. ([#1532](https://github.com/bastani-inc/atomic/issues/1532))
31
+ - Fixed workflow-owned transcripts leaking into normal `/resume`, `-r`, `-c`, and `--continue` history by requiring complete workflow ownership markers, persisting classification in initial fork headers, inheriting it across branches, and keeping malformed legacy markers and ordinary user forks visible.
32
+
33
+ ## [0.9.8] - 2026-07-12
34
+
35
+ ### Changed
36
+
37
+ - Changed builtin `goal` and `ralph` reviewer approval to be deterministic on the reviewer's self-reported `stop_review_loop` boolean: a reviewer approves exactly when it returns `stop_review_loop=true` with no `reviewer_error`, parse failures still count as non-approval, and Goal's reducer completes on quorum of those booleans without recomputing approval from findings arrays, priorities, or `requirements_traceability` statuses. Recomputing approval from those arrays could deadlock runs whose acceptance criteria referenced the review process itself (for example "three reviewers approve" or "an unmerged PR is created"): no individual reviewer can prove such clauses, so traceability never became fully `proven` even when every reviewer explicitly approved, and the loop burned worker/review turns until `needs_human`. Reviewer prompts now state that the boolean is the single authoritative convergence signal, spell out how to derive it (blocking P0/P1/P2 findings and `required_by_objective` findings at any priority mean `false`; in-scope P3 nice-to-haves, `beyond_objective`/`contradicts_objective` observations, the reviewer-quorum process itself, and the authorized post-approval PR/MR/review final action must never hold it at `false`), and keep findings/traceability as required audit evidence.
38
+ - Synchronized the builtin `playwright-cli` skill with microsoft/playwright-cli at `793cfb32572733cbcb401e6f28d05a7a914ce408`, including current installation, snapshot search, mobile emulation, and test generation guidance.
39
+ - Renamed the builtin `effective-liteparse` skill to `liteparse` and synchronized it with run-llama/llamaparse-agent-skills at `2dcef7c62417bd2ec4671fce4621bb1e8cce48d0`; existing `/skill:effective-liteparse` references must migrate to `/skill:liteparse`.
40
+ - Synchronized the complete builtin `impeccable` skill tree with pbakaus/impeccable at `630fc2682a5bd39b25a8e61f74b6b3f14f2b1e21`, including its latest references, detector libraries, live-review scripts, and provider integrations.
41
+
42
+ ### Fixed
43
+
44
+ - Disabled terminal autowrap while the fullscreen workflow graph overlay is visible on Windows and restored the previous terminal mode when the overlay closes, preventing wrapped graph rows and stale terminal state ([#1760](https://github.com/bastani-inc/atomic/issues/1760)).
45
+ - Hardened synced Impeccable HTML filtering and preview selector escaping against nested sanitizer inputs, permissive script/style closing tags, HTML comment end-bang syntax, and backslash-containing session identifiers; also removed an ineffective CSS property replacement flagged by CodeQL.
46
+
5
47
  ## [0.9.8-alpha.1] - 2026-07-12
6
48
 
7
49
  ### Changed
@@ -2,6 +2,18 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.9-alpha.1] - 2026-07-14
6
+
7
+ ### Changed
8
+
9
+ - Published a synchronized Atomic 0.9.9-alpha.1 prerelease for the Cursor provider package; no functional Cursor provider changes were made after 0.9.8.
10
+
11
+ ## [0.9.8] - 2026-07-12
12
+
13
+ ### Changed
14
+
15
+ - Published the stable Atomic 0.9.8 release for the Cursor provider package; no functional Cursor provider changes were made after 0.9.7.
16
+
5
17
  ## [0.9.8-alpha.1] - 2026-07-12
6
18
 
7
19
  ### Changed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/cursor",
3
- "version": "0.9.8-alpha.1",
3
+ "version": "0.9.9-alpha.1",
4
4
  "private": true,
5
5
  "description": "Experimental first-party Atomic extension for Cursor OAuth, model discovery, and streaming provider registration.",
6
6
  "contributors": [
@@ -40,7 +40,7 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@bastani/atomic-natives": "0.9.8-alpha.1",
43
+ "@bastani/atomic-natives": "0.9.9-alpha.1",
44
44
  "@bufbuild/protobuf": "^2.12.1",
45
45
  "@earendil-works/pi-ai": "^0.80.6"
46
46
  }
@@ -4,6 +4,18 @@ All notable changes to the `pi-intercom` extension will be documented in this fi
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.9-alpha.1] - 2026-07-14
8
+
9
+ ### Changed
10
+
11
+ - Published a synchronized Atomic 0.9.9-alpha.1 prerelease for the intercom extension; no functional intercom changes were made after 0.9.8.
12
+
13
+ ## [0.9.8] - 2026-07-12
14
+
15
+ ### Changed
16
+
17
+ - Published the stable Atomic 0.9.8 release for the intercom extension; no functional intercom changes were made after 0.9.7.
18
+
7
19
  ## [0.9.8-alpha.1] - 2026-07-12
8
20
 
9
21
  ### Changed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/intercom",
3
- "version": "0.9.8-alpha.1",
3
+ "version": "0.9.9-alpha.1",
4
4
  "private": true,
5
5
  "description": "Atomic extension providing a private coordination channel between parent and child agent sessions. Fork of: https://github.com/nicobailon/pi-intercom",
6
6
  "contributors": [
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.9.9-alpha.1] - 2026-07-14
11
+
12
+ ### Changed
13
+
14
+ - Published a synchronized Atomic 0.9.9-alpha.1 prerelease for the MCP extension; no functional MCP changes were made after 0.9.8.
15
+
16
+ ## [0.9.8] - 2026-07-12
17
+
18
+ ### Changed
19
+
20
+ - Published the stable Atomic 0.9.8 release for the MCP extension; no functional MCP changes were made after 0.9.7.
21
+
10
22
  ## [0.9.8-alpha.1] - 2026-07-12
11
23
 
12
24
  ### Changed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/mcp",
3
- "version": "0.9.8-alpha.1",
3
+ "version": "0.9.9-alpha.1",
4
4
  "private": true,
5
5
  "description": "Atomic extension that adapts MCP (Model Context Protocol) servers into the coding agent. Fork of: https://github.com/nicobailon/pi-mcp-adapter",
6
6
  "contributors": [
@@ -2,6 +2,19 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.9-alpha.1] - 2026-07-14
6
+
7
+ ### Fixed
8
+
9
+ - Fixed first-party subagent transcripts launched inside workflow stages to inherit complete workflow ownership metadata in foreground and background execution, while fork-context children also inherit classification through the branched JSONL header.
10
+
11
+ ## [0.9.8] - 2026-07-12
12
+
13
+ ### Changed
14
+
15
+ - Synchronized the builtin `playwright-cli` skill with microsoft/playwright-cli at `793cfb32572733cbcb401e6f28d05a7a914ce408`, including current installation, snapshot search, mobile emulation, and test generation guidance.
16
+ - Renamed the builtin `effective-liteparse` skill to `liteparse` and synchronized it with run-llama/llamaparse-agent-skills at `2dcef7c62417bd2ec4671fce4621bb1e8cce48d0`; existing `/skill:effective-liteparse` references must migrate to `/skill:liteparse`.
17
+
5
18
  ## [0.9.8-alpha.1] - 2026-07-12
6
19
 
7
20
  ### Changed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/subagents",
3
- "version": "0.9.8-alpha.1",
3
+ "version": "0.9.9-alpha.1",
4
4
  "private": true,
5
5
  "description": "Atomic extension for delegating tasks to subagents with chains, parallel execution, and background runs. Fork of: https://github.com/nicobailon/pi-subagents",
6
6
  "contributors": [
@@ -6,6 +6,7 @@ import { getSubagentCodexFastModeSettings, resolveSubagentCodexFastModeScope, re
6
6
  import { resolveEffectiveThinking } from "../../shared/model-info.ts";
7
7
  import { buildChainInstructions, isDynamicParallelStep, isParallelStep, resolveStepBehavior, suppressProgressForReadOnlyTask, writeInitialProgressFile, type ResolvedStepBehavior, type SequentialStep, type StepOverrides } from "../../shared/settings.ts";
8
8
  import { ASYNC_DIR, RESULTS_DIR, SUBAGENT_ASYNC_STARTED_EVENT, resolveChildMaxSubagentDepth } from "../../shared/types.ts";
9
+ import { workflowSessionEnv } from "../../shared/types-depth.ts";
9
10
  import { resolveChildCwd } from "../../shared/utils.ts";
10
11
  import { applyThinkingSuffix, SUBAGENT_INTERCOM_SESSION_NAME_ENV } from "../shared/pi-args.ts";
11
12
  import type { RunnerStep } from "../shared/parallel-utils.ts";
@@ -305,6 +306,7 @@ export function executeAsyncChain(
305
306
  },
306
307
  id,
307
308
  runnerCwd,
309
+ workflowSessionEnv(ctx.workflowSessionMetadata),
308
310
  );
309
311
  } catch (error) {
310
312
  const message = error instanceof Error ? error.message : String(error);
@@ -85,7 +85,12 @@ export function writeAsyncRunnerConfig(cfg: object, suffix: string): string {
85
85
  return cfgPath;
86
86
  }
87
87
 
88
- export function spawnRunner(cfg: object, suffix: string, cwd: string): AsyncSpawnResult {
88
+ export function spawnRunner(
89
+ cfg: object,
90
+ suffix: string,
91
+ cwd: string,
92
+ env?: Record<string, string>,
93
+ ): AsyncSpawnResult {
89
94
  const cwdValidation = validatePiSpawnCwd(cwd);
90
95
  if (!cwdValidation.ok) return { error: cwdValidation.error };
91
96
 
@@ -101,6 +106,7 @@ export function spawnRunner(cfg: object, suffix: string, cwd: string): AsyncSpaw
101
106
  try {
102
107
  proc = spawn(spawnSpec.command, spawnSpec.args, {
103
108
  cwd,
109
+ env: { ...process.env, ...env },
104
110
  detached: true,
105
111
  stdio: "ignore",
106
112
  windowsHide: true,
@@ -6,6 +6,7 @@ import { getSubagentCodexFastModeSettings, resolveSubagentCodexFastModeScope, re
6
6
  import { resolveEffectiveThinking } from "../../shared/model-info.ts";
7
7
  import { injectSingleProgressInstruction, writeInitialProgressFile } from "../../shared/settings.ts";
8
8
  import { ASYNC_DIR, RESULTS_DIR, SUBAGENT_ASYNC_STARTED_EVENT, resolveChildMaxSubagentDepth } from "../../shared/types.ts";
9
+ import { workflowSessionEnv } from "../../shared/types-depth.ts";
9
10
  import { resolveChildCwd } from "../../shared/utils.ts";
10
11
  import { applyThinkingSuffix, SUBAGENT_INTERCOM_SESSION_NAME_ENV } from "../shared/pi-args.ts";
11
12
  import { injectSingleOutputInstruction, normalizeSingleOutputOverride, resolveSingleOutputPath, validateFileOnlyOutputMode } from "../shared/single-output.ts";
@@ -170,6 +171,7 @@ export function executeAsyncSingle(
170
171
  },
171
172
  id,
172
173
  runnerCwd,
174
+ workflowSessionEnv(ctx.workflowSessionMetadata),
173
175
  );
174
176
  } catch (error) {
175
177
  const message = error instanceof Error ? error.message : String(error);
@@ -1,4 +1,4 @@
1
- import type { ExtensionAPI } from "@bastani/atomic";
1
+ import type { ExtensionAPI, SessionWorkflowMetadata } from "@bastani/atomic";
2
2
  import type { AgentConfig } from "../../agents/agents.ts";
3
3
  import type { ChainStep } from "../../shared/settings.ts";
4
4
  import type { AvailableModelInfo } from "../shared/model-fallback.ts";
@@ -17,6 +17,7 @@ export interface AsyncExecutionContext {
17
17
  currentSessionId: string;
18
18
  currentModelProvider?: string;
19
19
  currentModel?: string;
20
+ workflowSessionMetadata?: SessionWorkflowMetadata;
20
21
  }
21
22
 
22
23
  export interface AsyncChainParams {
@@ -74,7 +75,12 @@ export interface AsyncSingleParams {
74
75
  childIntercomTarget?: (agent: string, index: number) => string | undefined;
75
76
  nestedRoute?: NestedRouteInfo;
76
77
  /** Internal launch seam used by focused runtime tests. */
77
- spawnRunner?: (config: object, suffix: string, cwd: string) => AsyncSpawnResult;
78
+ spawnRunner?: (
79
+ config: object,
80
+ suffix: string,
81
+ cwd: string,
82
+ env?: Record<string, string>,
83
+ ) => AsyncSpawnResult;
78
84
  }
79
85
 
80
86
  export interface AsyncExecutionResult {
@@ -2,6 +2,7 @@ import * as path from "node:path";
2
2
  import { INTERCOM_BRIDGE_MARKER } from "../../intercom/intercom-bridge.ts";
3
3
  import { mapConcurrent, resolveChildCwd } from "../../shared/utils.ts";
4
4
  import { MAX_CONCURRENCY, resolveChildMaxSubagentDepth, type SingleResult } from "../../shared/types.ts";
5
+ import { workflowSessionMetadataFromContext } from "../../shared/types-depth.ts";
5
6
  import {
6
7
  buildChainInstructions,
7
8
  suppressProgressForReadOnlyTask,
@@ -118,6 +119,7 @@ export async function runParallelChainTasks(input: ParallelChainRunInput): Promi
118
119
  outputMode: behavior.outputMode,
119
120
  maxSubagentDepth,
120
121
  workflowStageSubagentGuard: input.workflowStageSubagentGuard,
122
+ workflowSessionMetadata: workflowSessionMetadataFromContext(input.ctx),
121
123
  controlConfig: input.controlConfig,
122
124
  onControlEvent: input.onControlEvent,
123
125
  intercomSessionName: input.childIntercomTarget?.(task.agent, input.globalTaskIndex + taskIndex),
@@ -13,6 +13,7 @@ import {
13
13
  import { getSingleResultOutput, resolveChildCwd } from "../../shared/utils.ts";
14
14
  import { normalizeSkillInput } from "../../agents/skills.ts";
15
15
  import { resolveChildMaxSubagentDepth } from "../../shared/types.ts";
16
+ import { workflowSessionMetadataFromContext } from "../../shared/types-depth.ts";
16
17
  import { outputEntryFromResult, resolveOutputReferences } from "../shared/chain-outputs.ts";
17
18
  import { currentModelFullId, resolveModelCandidate } from "../shared/model-fallback.ts";
18
19
  import { recordRun } from "../shared/run-history.ts";
@@ -116,6 +117,7 @@ export async function runSequentialChainStep(input: {
116
117
  outputMode: behavior.outputMode,
117
118
  maxSubagentDepth,
118
119
  workflowStageSubagentGuard: context.params.workflowStageSubagentGuard,
120
+ workflowSessionMetadata: workflowSessionMetadataFromContext(context.params.ctx),
119
121
  controlConfig: context.controlConfig,
120
122
  onControlEvent: context.onControlEvent,
121
123
  intercomSessionName: context.childIntercomTarget?.(seqStep.agent, flatIndex),
@@ -75,6 +75,7 @@ export async function runSingleAttempt(
75
75
  parentCapabilityToken: options.nestedRoute?.capabilityToken,
76
76
  codexFastModeSettings: shared.fastModeSettings,
77
77
  codexFastModeScope: shared.fastModeScope,
78
+ workflowSessionMetadata: options.workflowSessionMetadata,
78
79
  structuredOutput: options.structuredOutput,
79
80
  });
80
81
  const result: SingleResult = {
@@ -129,7 +130,7 @@ export async function runSingleAttempt(
129
130
  });
130
131
  }
131
132
  const exitCode = await new Promise<number>((resolve) => {
132
- const spawnSpec = getPiSpawnCommand(args);
133
+ const spawnSpec = getPiSpawnCommand(args, options.piArgv1 ? { argv1: options.piArgv1 } : {});
133
134
  const proc = spawn(spawnSpec.command, spawnSpec.args, {
134
135
  cwd: runCwd,
135
136
  env: spawnEnv,
@@ -9,6 +9,7 @@ import {
9
9
  resolveSubagentDepthPolicy,
10
10
  resolveTopLevelParallelConcurrency,
11
11
  resolveTopLevelParallelMaxTasks,
12
+ workflowSessionMetadataFromContext,
12
13
  wrapForkTask,
13
14
  } from "../../shared/types.ts";
14
15
  import { resolveSingleProgress, type ChainStep } from "../../shared/settings.ts";
@@ -74,6 +75,7 @@ export function runAsyncPath(data: ExecutionContextData, deps: ResolvedExecutorD
74
75
  currentSessionId: deps.state.currentSessionId!,
75
76
  currentModelProvider: ctx.model?.provider,
76
77
  currentModel: currentModelFullId(ctx.model),
78
+ workflowSessionMetadata: workflowSessionMetadataFromContext(ctx),
77
79
  };
78
80
  const availableModels: ModelInfo[] = ctx.modelRegistry.getAvailable().map(toModelInfo);
79
81
  const knownModelProviders = collectKnownModelProviders(ctx.modelRegistry);
@@ -6,6 +6,7 @@ import { INTERCOM_BRIDGE_MARKER } from "../../intercom/intercom-bridge.ts";
6
6
  import type { AgentConfig } from "../../agents/agents.ts";
7
7
  import type { ModelInfo } from "../../shared/model-info.ts";
8
8
  import type { WorktreeSetup } from "../shared/worktree.ts";
9
+ import { workflowSessionMetadataFromContext } from "../../shared/types-depth.ts";
9
10
  import {
10
11
  type AgentProgress,
11
12
  type ArtifactConfig,
@@ -105,6 +106,7 @@ export async function runForegroundParallelTasks(input: ForegroundParallelRunInp
105
106
  outputMode: behavior?.outputMode,
106
107
  maxSubagentDepth: input.maxSubagentDepths[index],
107
108
  workflowStageSubagentGuard: input.workflowStageSubagentGuard,
109
+ workflowSessionMetadata: workflowSessionMetadataFromContext(input.ctx),
108
110
  controlConfig: input.controlConfig,
109
111
  onControlEvent: input.onControlEvent,
110
112
  intercomSessionName: input.childIntercomTarget?.(task.agent, index),
@@ -33,6 +33,7 @@ import {
33
33
  isWorkflowStageOrchestrationContext,
34
34
  resolveSubagentDepthPolicy,
35
35
  resolveWorkflowStageMaxSubagentDepth,
36
+ workflowSessionMetadataFromContext,
36
37
  subagentDepthBlockedMessage,
37
38
  type ArtifactConfig,
38
39
  type NestedRunSummary,
@@ -427,6 +428,7 @@ export async function resumeAsyncRun(input: {
427
428
  currentSessionId: input.deps.state.currentSessionId,
428
429
  currentModelProvider: input.ctx.model?.provider,
429
430
  currentModel: currentModelFullId(input.ctx.model),
431
+ workflowSessionMetadata: workflowSessionMetadataFromContext(input.ctx),
430
432
  },
431
433
  cwd: effectiveCwd,
432
434
  maxOutput: input.params.maxOutput,
@@ -21,6 +21,7 @@ import {
21
21
  import {
22
22
  resolveChildMaxSubagentDepth,
23
23
  resolveSubagentDepthPolicy,
24
+ workflowSessionMetadataFromContext,
24
25
  wrapForkTask,
25
26
  type AgentProgress,
26
27
  type ArtifactPaths,
@@ -179,6 +180,7 @@ export async function runSinglePath(data: ExecutionContextData, deps: ResolvedEx
179
180
  outputMode: effectiveOutputMode,
180
181
  maxSubagentDepth,
181
182
  workflowStageSubagentGuard,
183
+ workflowSessionMetadata: workflowSessionMetadataFromContext(ctx),
182
184
  onUpdate: forwardSingleUpdate,
183
185
  controlConfig,
184
186
  onControlEvent,
@@ -8,6 +8,8 @@ import {
8
8
  getEnvValue,
9
9
  type CodexFastModeResolvedSettings,
10
10
  type CodexFastModeScope,
11
+ type SessionWorkflowMetadata,
12
+ WORKFLOW_SESSION_METADATA_ENV,
11
13
  } from "@bastani/atomic";
12
14
  import { encodeNestedPathEnv, parseNestedPathEnv, type NestedPathEntry } from "./nested-path.ts";
13
15
  import { resolveMcpDirectToolNames } from "./mcp-direct-tool-allowlist.ts";
@@ -72,6 +74,7 @@ interface BuildPiArgsInput {
72
74
  parentCapabilityToken?: string;
73
75
  codexFastModeSettings?: CodexFastModeResolvedSettings;
74
76
  codexFastModeScope?: CodexFastModeScope;
77
+ workflowSessionMetadata?: SessionWorkflowMetadata;
75
78
  structuredOutput?: {
76
79
  schema: JsonSchemaObject;
77
80
  schemaPath: string;
@@ -201,6 +204,9 @@ export function buildPiArgs(input: BuildPiArgsInput): BuildPiArgsResult {
201
204
  const env: Record<string, string | undefined> = {};
202
205
  env[SUBAGENT_CHILD_ENV] = "1";
203
206
  env[SUBAGENT_FANOUT_CHILD_ENV] = fanoutAuthorized ? "1" : "0";
207
+ if (input.workflowSessionMetadata) {
208
+ env[WORKFLOW_SESSION_METADATA_ENV] = JSON.stringify(input.workflowSessionMetadata);
209
+ }
204
210
  if (input.codexFastModeSettings) {
205
211
  env[ENV_CODEX_FAST_MODE] = serializeChildCodexFastModeSettings(
206
212
  mapChildCodexFastModeSettings(input.codexFastModeSettings, input.codexFastModeScope ?? "chat"),
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import type { AgentToolResult } from "@earendil-works/pi-agent-core";
6
+ import type { SessionWorkflowMetadata } from "@bastani/atomic";
6
7
  import type { NestedRouteInfo } from "./types-async.ts";
7
8
  import type {
8
9
  ArtifactConfig,
@@ -72,11 +73,14 @@ export interface RunSyncOptions {
72
73
  index?: number;
73
74
  sessionDir?: string;
74
75
  sessionFile?: string;
76
+ /** Override the Atomic CLI entrypoint used by foreground child processes. */
77
+ piArgv1?: string;
75
78
  share?: boolean;
76
79
  outputPath?: string;
77
80
  outputMode?: OutputMode;
78
81
  maxSubagentDepth?: number;
79
82
  workflowStageSubagentGuard?: boolean;
83
+ workflowSessionMetadata?: SessionWorkflowMetadata;
80
84
  nestedRoute?: NestedRouteInfo;
81
85
  /** Override the agent's default model (format: "provider/id" or just "id") */
82
86
  modelOverride?: string;
@@ -2,8 +2,13 @@
2
2
  * Recursion-depth guard helpers for nested subagent execution.
3
3
  */
4
4
 
5
- import type { ExtensionContext } from "@bastani/atomic";
6
- import { APP_NAME, getEnvValue, WORKFLOW_STAGE_SUBAGENT_GUARD_ENV } from "@bastani/atomic";
5
+ import type { ExtensionContext, SessionWorkflowMetadata } from "@bastani/atomic";
6
+ import {
7
+ APP_NAME,
8
+ getEnvValue,
9
+ WORKFLOW_SESSION_METADATA_ENV,
10
+ WORKFLOW_STAGE_SUBAGENT_GUARD_ENV,
11
+ } from "@bastani/atomic";
7
12
  import { DEFAULT_SUBAGENT_MAX_DEPTH, MAX_SUBAGENT_NESTING_DEPTH } from "./types-runtime.ts";
8
13
 
9
14
  const ENV_PREFIX = APP_NAME.toUpperCase();
@@ -39,6 +44,28 @@ export function isWorkflowStageOrchestrationContext(ctx: Pick<ExtensionContext,
39
44
  return ctx.orchestrationContext?.kind === "workflow-stage";
40
45
  }
41
46
 
47
+ export function workflowSessionMetadataFromContext(
48
+ ctx: Pick<ExtensionContext, "orchestrationContext">,
49
+ ): SessionWorkflowMetadata | undefined {
50
+ const orchestration = ctx.orchestrationContext;
51
+ if (orchestration?.kind !== "workflow-stage") return undefined;
52
+ return {
53
+ runId: orchestration.workflowRunId,
54
+ stageId: orchestration.workflowStageId,
55
+ stageName: orchestration.workflowStageName,
56
+ };
57
+ }
58
+
59
+ export function workflowSessionEnv(metadata: SessionWorkflowMetadata | undefined): Record<string, string> {
60
+ return metadata ? { [WORKFLOW_SESSION_METADATA_ENV]: JSON.stringify(metadata) } : {};
61
+ }
62
+
63
+ export function workflowSessionEnvFromContext(
64
+ ctx: Pick<ExtensionContext, "orchestrationContext">,
65
+ ): Record<string, string> {
66
+ return workflowSessionEnv(workflowSessionMetadataFromContext(ctx));
67
+ }
68
+
42
69
  export function resolveWorkflowStageMaxSubagentDepth(
43
70
  ctx: Pick<ExtensionContext, "orchestrationContext">,
44
71
  configMaxDepth?: number,
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.9-alpha.1] - 2026-07-14
8
+
9
+ ### Changed
10
+
11
+ - Published a synchronized Atomic 0.9.9-alpha.1 prerelease for the web-access extension; no functional web-access changes were made after 0.9.8.
12
+
13
+ ## [0.9.8] - 2026-07-12
14
+
15
+ ### Changed
16
+
17
+ - Published the stable Atomic 0.9.8 release for the web-access extension; no functional web-access changes were made after 0.9.7.
18
+
7
19
  ## [0.9.8-alpha.1] - 2026-07-12
8
20
 
9
21
  ### Changed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/web-access",
3
- "version": "0.9.8-alpha.1",
3
+ "version": "0.9.9-alpha.1",
4
4
  "private": true,
5
5
  "description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
6
6
  "contributors": [
@@ -6,6 +6,40 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.9.9-alpha.1] - 2026-07-14
10
+
11
+ ### Changed
12
+
13
+ - Hardened the shared builtin `goal`/`ralph` prompt contracts against over-implementation drift (observed in eval traces where near-perfect patches lost binary reward to a single invented strictness: returning a read-only mapping proxy where the contract said "dict", marking an optional schema field required, and rejecting duplicate aliases the task's hidden tests expected to be tolerated). The literal objective contract now states that the loud-error preference applies only to error conditions the contract enumerates and that the default for unenumerated behavior is permissive acceptance (never invent a validation error, required field, uniqueness constraint, or rejection the contract does not name); that contract-named types/shapes/formats must be produced exactly, with no defensive substitutes such as read-only proxies, frozen collections, or tuples-for-lists, because consumers may check type identity literally; and that unspecified behavior defaults to preserving input verbatim over normalizing, deduplicating, reordering, or rewriting it.
14
+ - Extended the worker/orchestrator acceptance-matrix contract with rows for literal contract examples (checked character-for-character rather than paraphrased) and for each contract-constrained interface decision (types by identity, required-vs-optional per field, duplicate handling, ordering, raw-vs-normalized text), recording the permissive/preserving default whenever the contract leaves a decision open.
15
+ - Added a shared `CONTRACT_FIDELITY_AUDIT` adversarial divergence pass to the Goal worker and Ralph orchestrator prompts (`<divergence_audit>`): after checks are green and before claiming readiness, re-read each contract clause asking what plausible independent check would fail the implementation, probing the recurring divergence categories — type-identity assertions, optional fields omitted, duplicated/aliased inputs, ordering assumptions, verbatim-vs-normalized text, and any raised error the contract does not enumerate. Forked continuation prompts reference the audit in their established-guidance pointer.
16
+ - Made Goal and Ralph reviewers hunt over-implementation as seriously as gaps via a shared `REVIEWER_OVERIMPLEMENTATION_GUARD`: validation errors, required fields, uniqueness/format constraints, immutability wrappers, or normalization the contract does not require are `required_by_objective` defects, and reviewers must probe at least one contract-permitted input the worker's own tests do not exercise before approving. The independent-verification contract and reviewer action items now include contract-permitted-input and type/shape/text-identity probes alongside the existing boundary/edge/negative probes.
17
+ - Added a shared Intercom coordination protocol to every concurrent builtin Goal and Ralph reviewer prompt: reviewers now check Intercom and discover same-run siblings at review start, communicate validation plans and ownership, serialize conflicting shared-checkout or shared-environment checks, announce starts/completions/releases, share reusable execution evidence, and retain independent patch analysis and verdicts ([#1803](https://github.com/bastani-inc/atomic/issues/1803)).
18
+
19
+ ### Fixed
20
+
21
+ - Fixed the builtin `open-claude-design` artifact directory fallback to use a per-user OS tmpdir namespace (`open-claude-design-<username>`), preventing `EACCES` failures on shared hosts where another user already owns the plain `<tmpdir>/open-claude-design` directory. The legacy shared path remains a secondary fallback, and the last-resort synthesized path now also uses the per-user namespace so best-effort feedback persistence can actually create it.
22
+ - Prevented the synced Impeccable fixture's nested `git init` from inheriting hook-local Git repository variables and corrupting a linked repository's shared `core.worktree`. Runner-managed reusable worktrees now remap propagated invoking-repository `cwd` values and relative direct outputs into the selected worktree; reject blank, self, nested, foreign, lexical-escape, symlink-escape, and changed cached targets before opening a later session; key cached identity by canonical repository/target across equivalent path and ref spellings; revalidate newly created targets; and expose clearer workflow tool guidance/schema descriptions so natural-language worktree requests cannot be mistaken for runtime configuration. Temporary direct task and parallel worktrees also derive omitted/relative task cwd values from the runner invocation cwd and clean up when startup fails before their workflow callback, while relative outputs are persisted to stable runner-owned artifacts before cleanup and reject parent traversal, child symlink escapes, or a linked trusted artifact root across direct, parallel, and chain modes; blank `chainDir` values no longer bypass reusable-worktree output routing.
23
+ - Fixed the active Workflow Orchestrator graph pane to pan left and right for horizontal trackpad and terminal mouse-wheel events while preserving vertical wheel panning and pane-local input capture ([#1756](https://github.com/bastani-inc/atomic/issues/1756)).
24
+ - Fixed `/workflow resume` so its single globally newest-first, deduplicated picker includes current paused or recoverably failed and durable resumable entries alongside authoritative successful completed workflows. Completed rows use green `✓ completed` styling and open an immutable detail/chat snapshot with transcript follow-up conversation, without durable re-dispatch or workflow side-effect replay. Full IDs take precedence and prefixes resolve across the mixed namespace; completed rows require checkpoints and at least one strictly valid retained conversation, invalid per-stage paths cannot attach chat, repeated inspection refreshes changed authoritative chat handles, and selector mount failures close safely. Existing resumable workflow and ordinary internal-session history behavior remains on the original paths. ([#1532](https://github.com/bastani-inc/atomic/issues/1532))
25
+ - Fixed `/workflow resume` to deduplicate live and durable choices with live-row precedence, then globally sort the combined selector by latest run/stage or durable-update activity, newest first, with deterministic workflow-id tie-breaking independent of source enumeration order ([#1714](https://github.com/bastani-inc/atomic/issues/1714)).
26
+ - Fixed startup and restored-session workflow notices to use the authoritative durable resume catalog's status/progress rules: failed and blocked root workflows are advertised unless explicitly marked `resumable: false`, running and paused workflows require durable progress, nested child workflows and stale cache-only entries are excluded, and legacy direct or payload-wrapped checkpoint entries are parsed correctly.
27
+ - Fixed durable mid-stage workflow resume to refresh pause-adjusted active stage/task duration at repeated session checkpoints, preserve it through file and DBOS hydration, and continue accumulating it across repeated process-boundary resumes without resetting the baseline when concurrent tracked stage calls begin, double-counting earlier pauses, changing replay identity, or re-running completed side effects ([#1713](https://github.com/bastani-inc/atomic/issues/1713)).
28
+ - Fixed incompatible durable workflow records appearing as loadable resume targets by moving file state, DBOS metadata/checkpoint envelopes, and JSONL discovery caches to one shared v2 format contract; exact legacy v1 file and DBOS rows are now suppressed and permanently deleted (including DBOS checkpoint-prefix records), with per-workflow deletion and loadability queries implemented across durable backends and safely isolated from child scopes. Resume selectors, explicit target resolution, completed catalogs, restored-session notices, status/listing state, cache merges, and live resume paths accept only loadable current-format rows; compatibility preparation purges matching restored/live snapshots even when DBOS deletion fails, so failure fallbacks cannot resurrect or dispatch them. Repeated discovery is idempotent, deletion failures stay hidden and retry later, compatible and newly registered runs plus unmarked raw DBOS checkpoint outputs remain supported, and malformed, unavailable, future-version, or unsupported marked-envelope data is conservatively preserved and hidden rather than overwritten, reinterpreted, or broadly deleted.
29
+ - Fixed workflow stage session classification so fresh and fork-context stages persist complete ownership metadata before their transcripts can enter normal resume history, including custom session directories.
30
+
31
+ ## [0.9.8] - 2026-07-12
32
+
33
+ ### Changed
34
+
35
+ - Changed builtin `goal` and `ralph` reviewer approval to be deterministic on the reviewer's self-reported `stop_review_loop` boolean: a reviewer approves exactly when it returns `stop_review_loop=true` with no `reviewer_error`, parse failures still count as non-approval, and Goal's reducer completes on quorum of those booleans without recomputing approval from findings arrays, priorities, or `requirements_traceability` statuses. Recomputing approval from those arrays could deadlock runs whose acceptance criteria referenced the review process itself (for example "three reviewers approve" or "an unmerged PR is created"): no individual reviewer can prove such clauses, so traceability never became fully `proven` even when every reviewer explicitly approved, and the loop burned worker/review turns until `needs_human`. Reviewer prompts now state that the boolean is the single authoritative convergence signal, spell out how to derive it (blocking P0/P1/P2 findings and `required_by_objective` findings at any priority mean `false`; in-scope P3 nice-to-haves, `beyond_objective`/`contradicts_objective` observations, the reviewer-quorum process itself, and the authorized post-approval PR/MR/review final action must never hold it at `false`), and keep findings/traceability as required audit evidence. `findingBlocksClosure`/`isBlockingFinding` still classify findings for prompts and consolidated repair batches.
36
+ - Synchronized the complete builtin `impeccable` skill tree with pbakaus/impeccable at `630fc2682a5bd39b25a8e61f74b6b3f14f2b1e21`, including its latest references, detector libraries, live-review scripts, and provider integrations.
37
+
38
+ ### Fixed
39
+
40
+ - Disabled terminal autowrap while the fullscreen workflow graph overlay is visible on Windows and restored the previous terminal mode when the overlay closes, preventing wrapped graph rows and stale terminal state ([#1760](https://github.com/bastani-inc/atomic/issues/1760)).
41
+ - Hardened synced Impeccable HTML filtering and preview selector escaping against nested sanitizer inputs, permissive script/style closing tags, HTML comment end-bang syntax, and backslash-containing session identifiers; also removed an ineffective CSS property replacement flagged by CodeQL.
42
+
9
43
  ## [0.9.8-alpha.1] - 2026-07-12
10
44
 
11
45
  ### Changed