@bastani/atomic 0.9.4 → 0.9.5-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 (759) hide show
  1. package/CHANGELOG.md +136 -2
  2. package/README.md +2 -2
  3. package/dist/builtin/cursor/CHANGELOG.md +6 -0
  4. package/dist/builtin/cursor/package.json +3 -3
  5. package/dist/builtin/cursor/src/model-mapper.ts +6 -3
  6. package/dist/builtin/intercom/CHANGELOG.md +31 -0
  7. package/dist/builtin/intercom/README.md +29 -21
  8. package/dist/builtin/intercom/broker/broker.ts +9 -120
  9. package/dist/builtin/intercom/broker/client.ts +29 -54
  10. package/dist/builtin/intercom/broker/delivered-message-cache.ts +44 -0
  11. package/dist/builtin/intercom/broker/paths.ts +42 -5
  12. package/dist/builtin/intercom/broker/pending-send-registry.ts +142 -0
  13. package/dist/builtin/intercom/broker/send-handler.ts +106 -0
  14. package/dist/builtin/intercom/broker/send-signature.ts +37 -0
  15. package/dist/builtin/intercom/broker/spawn.ts +78 -10
  16. package/dist/builtin/intercom/config.ts +6 -3
  17. package/dist/builtin/intercom/contact-supervisor-tool.ts +6 -4
  18. package/dist/builtin/intercom/foreground-detach-handoff.ts +136 -0
  19. package/dist/builtin/intercom/index-heavy.ts +50 -54
  20. package/dist/builtin/intercom/index.ts +320 -272
  21. package/dist/builtin/intercom/intercom-tool.ts +9 -3
  22. package/dist/builtin/intercom/lazy-heavy-proxy.ts +114 -0
  23. package/dist/builtin/intercom/lazy-subagent-ack.ts +20 -0
  24. package/dist/builtin/intercom/lazy-tool-execution.ts +39 -0
  25. package/dist/builtin/intercom/lifecycle-lease.ts +51 -0
  26. package/dist/builtin/intercom/lifecycle.ts +37 -20
  27. package/dist/builtin/intercom/package.json +12 -6
  28. package/dist/builtin/intercom/reply-routing.ts +17 -0
  29. package/dist/builtin/intercom/result-renderers.ts +1 -1
  30. package/dist/builtin/intercom/subagent-relay.ts +58 -12
  31. package/dist/builtin/intercom/types.ts +3 -3
  32. package/dist/builtin/intercom/ui/compose.ts +2 -2
  33. package/dist/builtin/intercom/ui/inline-message.ts +2 -2
  34. package/dist/builtin/intercom/ui/session-list.ts +2 -2
  35. package/dist/builtin/mcp/CHANGELOG.md +23 -0
  36. package/dist/builtin/mcp/OAUTH.md +1 -0
  37. package/dist/builtin/mcp/README.md +10 -6
  38. package/dist/builtin/mcp/apps-cancellation.ts +32 -0
  39. package/dist/builtin/mcp/call-tool-result.ts +9 -0
  40. package/dist/builtin/mcp/caller-wait.ts +50 -0
  41. package/dist/builtin/mcp/command-registration.ts +82 -0
  42. package/dist/builtin/mcp/direct-tool-executor.ts +279 -0
  43. package/dist/builtin/mcp/direct-tools.ts +40 -255
  44. package/dist/builtin/mcp/host-html-template.ts +4 -2
  45. package/dist/builtin/mcp/index.ts +274 -239
  46. package/dist/builtin/mcp/init.ts +96 -126
  47. package/dist/builtin/mcp/mcp-auth-flow.ts +247 -237
  48. package/dist/builtin/mcp/mcp-callback-server.ts +89 -68
  49. package/dist/builtin/mcp/mcp-oauth-provider.ts +23 -1
  50. package/dist/builtin/mcp/metadata-hydration.ts +52 -0
  51. package/dist/builtin/mcp/package.json +3 -3
  52. package/dist/builtin/mcp/proxy-auth.ts +4 -4
  53. package/dist/builtin/mcp/proxy-call.ts +111 -40
  54. package/dist/builtin/mcp/proxy-connect.ts +35 -15
  55. package/dist/builtin/mcp/proxy-info-modes.ts +106 -23
  56. package/dist/builtin/mcp/proxy-modes.ts +3 -3
  57. package/dist/builtin/mcp/session-cleanup-barrier.ts +43 -0
  58. package/dist/builtin/mcp/startup-warmup.ts +98 -0
  59. package/dist/builtin/mcp/state-lease.ts +12 -0
  60. package/dist/builtin/mcp/tool-result-renderer.ts +3 -3
  61. package/dist/builtin/mcp/ui-server.ts +8 -8
  62. package/dist/builtin/mcp/ui-session.ts +9 -18
  63. package/dist/builtin/subagents/CHANGELOG.md +60 -0
  64. package/dist/builtin/subagents/README.md +30 -29
  65. package/dist/builtin/subagents/agents/code-simplifier.md +2 -2
  66. package/dist/builtin/subagents/agents/codebase-analyzer.md +2 -2
  67. package/dist/builtin/subagents/agents/codebase-locator.md +2 -2
  68. package/dist/builtin/subagents/agents/codebase-online-researcher.md +2 -2
  69. package/dist/builtin/subagents/agents/codebase-pattern-finder.md +2 -2
  70. package/dist/builtin/subagents/agents/codebase-research-analyzer.md +2 -2
  71. package/dist/builtin/subagents/agents/codebase-research-locator.md +2 -2
  72. package/dist/builtin/subagents/agents/debugger.md +2 -2
  73. package/dist/builtin/subagents/agents/worker.md +2 -2
  74. package/dist/builtin/subagents/package.json +5 -5
  75. package/dist/builtin/subagents/prompts/review-loop.md +1 -1
  76. package/dist/builtin/subagents/skills/subagent/SKILL.md +37 -36
  77. package/dist/builtin/subagents/src/extension/api-lifecycle.ts +64 -0
  78. package/dist/builtin/subagents/src/extension/fanout-child.ts +44 -51
  79. package/dist/builtin/subagents/src/extension/index.ts +289 -320
  80. package/dist/builtin/subagents/src/extension/prompt-guidance.ts +7 -10
  81. package/dist/builtin/subagents/src/extension/schemas.ts +22 -5
  82. package/dist/builtin/subagents/src/extension/startup-maintenance.ts +89 -0
  83. package/dist/builtin/subagents/src/extension/tool-description.ts +29 -0
  84. package/dist/builtin/subagents/src/intercom/intercom-bridge.ts +13 -2
  85. package/dist/builtin/subagents/src/intercom/result-intercom.ts +4 -4
  86. package/dist/builtin/subagents/src/runs/background/async-event-journal.ts +106 -0
  87. package/dist/builtin/subagents/src/runs/background/async-execution-common.ts +26 -20
  88. package/dist/builtin/subagents/src/runs/background/async-execution-single.ts +13 -2
  89. package/dist/builtin/subagents/src/runs/background/async-execution-types.ts +3 -0
  90. package/dist/builtin/subagents/src/runs/background/async-job-tracker.ts +1 -1
  91. package/dist/builtin/subagents/src/runs/background/completion-claims.ts +189 -0
  92. package/dist/builtin/subagents/src/runs/background/completion-dedupe.ts +44 -7
  93. package/dist/builtin/subagents/src/runs/background/completion-notification.ts +34 -0
  94. package/dist/builtin/subagents/src/runs/background/notify.ts +72 -22
  95. package/dist/builtin/subagents/src/runs/background/result-delivery-processor.ts +232 -0
  96. package/dist/builtin/subagents/src/runs/background/result-file-claims.ts +151 -0
  97. package/dist/builtin/subagents/src/runs/background/result-quarantine.ts +72 -0
  98. package/dist/builtin/subagents/src/runs/background/result-retry-scheduler.ts +48 -0
  99. package/dist/builtin/subagents/src/runs/background/result-status.ts +81 -0
  100. package/dist/builtin/subagents/src/runs/background/result-watcher-data.ts +59 -0
  101. package/dist/builtin/subagents/src/runs/background/result-watcher.ts +177 -233
  102. package/dist/builtin/subagents/src/runs/background/run-id-resolver.ts +3 -2
  103. package/dist/builtin/subagents/src/runs/background/stale-run-reconciler.ts +73 -14
  104. package/dist/builtin/subagents/src/runs/background/subagent-runner-streaming.ts +29 -15
  105. package/dist/builtin/subagents/src/runs/background/top-level-async.ts +1 -2
  106. package/dist/builtin/subagents/src/runs/foreground/chain-execution-dynamic-step.ts +1 -0
  107. package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-runner.ts +1 -0
  108. package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-step.ts +1 -0
  109. package/dist/builtin/subagents/src/runs/foreground/chain-execution-sequential-step.ts +7 -9
  110. package/dist/builtin/subagents/src/runs/foreground/chain-execution-types.ts +3 -13
  111. package/dist/builtin/subagents/src/runs/foreground/chain-execution.ts +2 -15
  112. package/dist/builtin/subagents/src/runs/foreground/execution-attempt-finalize.ts +2 -2
  113. package/dist/builtin/subagents/src/runs/foreground/execution-attempt.ts +63 -46
  114. package/dist/builtin/subagents/src/runs/foreground/execution-detach-reservations.ts +48 -0
  115. package/dist/builtin/subagents/src/runs/foreground/execution-detach-route.ts +17 -0
  116. package/dist/builtin/subagents/src/runs/foreground/execution-run-sync.ts +39 -26
  117. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-async.ts +3 -1
  118. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-chain.ts +3 -51
  119. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-context.ts +6 -11
  120. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-input.ts +11 -2
  121. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel-task.ts +2 -0
  122. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel.ts +5 -112
  123. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-resume.ts +2 -0
  124. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-single.ts +68 -118
  125. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-status.ts +79 -7
  126. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-types.ts +2 -2
  127. package/dist/builtin/subagents/src/runs/foreground/subagent-executor.ts +3 -0
  128. package/dist/builtin/subagents/src/runs/shared/pi-args.ts +2 -2
  129. package/dist/builtin/subagents/src/runs/shared/pi-spawn.ts +55 -12
  130. package/dist/builtin/subagents/src/shared/artifacts.ts +22 -11
  131. package/dist/builtin/subagents/src/shared/event-jsonl-writer.ts +294 -0
  132. package/dist/builtin/subagents/src/shared/exclusive-file-publication.ts +44 -0
  133. package/dist/builtin/subagents/src/shared/jsonl-writer.ts +1 -0
  134. package/dist/builtin/subagents/src/shared/model-info.ts +2 -2
  135. package/dist/builtin/subagents/src/shared/settings.ts +20 -10
  136. package/dist/builtin/subagents/src/shared/types-async.ts +3 -1
  137. package/dist/builtin/subagents/src/shared/types-config.ts +2 -0
  138. package/dist/builtin/subagents/src/shared/types-runtime.ts +3 -2
  139. package/dist/builtin/subagents/src/slash/slash-commands.ts +9 -12
  140. package/dist/builtin/subagents/src/slash/slash-live-state.ts +63 -32
  141. package/dist/builtin/subagents/src/tui/render-event-formatting.ts +15 -48
  142. package/dist/builtin/subagents/src/tui/render-layout.ts +9 -0
  143. package/dist/builtin/subagents/src/tui/render-result.ts +7 -0
  144. package/dist/builtin/subagents/src/tui/render-stable-output.ts +1 -0
  145. package/dist/builtin/subagents/src/tui/render-widget-graph.ts +27 -25
  146. package/dist/builtin/subagents/src/tui/render-widget.ts +177 -132
  147. package/dist/builtin/subagents/src/tui/render.ts +1 -1
  148. package/dist/builtin/web-access/CHANGELOG.md +14 -0
  149. package/dist/builtin/web-access/README.md +4 -0
  150. package/dist/builtin/web-access/content-tools.ts +8 -3
  151. package/dist/builtin/web-access/index-heavy.ts +1 -1
  152. package/dist/builtin/web-access/index.ts +190 -46
  153. package/dist/builtin/web-access/lifecycle-lease.ts +38 -0
  154. package/dist/builtin/web-access/package.json +2 -2
  155. package/dist/builtin/web-access/result-renderers.ts +1 -1
  156. package/dist/builtin/web-access/summary-review.ts +1 -1
  157. package/dist/builtin/web-access/web-search-activity.ts +1 -1
  158. package/dist/builtin/web-access/web-search-return.ts +7 -0
  159. package/dist/builtin/web-access/web-search-summary.ts +1 -1
  160. package/dist/builtin/web-access/web-search-tool.ts +4 -2
  161. package/dist/builtin/workflows/CHANGELOG.md +98 -0
  162. package/dist/builtin/workflows/README.md +20 -16
  163. package/dist/builtin/workflows/builtin/deep-research-codebase-utils.ts +33 -9
  164. package/dist/builtin/workflows/builtin/goal-artifacts.ts +3 -1
  165. package/dist/builtin/workflows/builtin/goal-ledger.ts +3 -0
  166. package/dist/builtin/workflows/builtin/goal-prompts.ts +39 -5
  167. package/dist/builtin/workflows/builtin/goal-reducer.ts +21 -0
  168. package/dist/builtin/workflows/builtin/goal-reports.ts +23 -0
  169. package/dist/builtin/workflows/builtin/goal-review.ts +85 -6
  170. package/dist/builtin/workflows/builtin/goal-runner.ts +122 -49
  171. package/dist/builtin/workflows/builtin/goal-schemas.ts +22 -0
  172. package/dist/builtin/workflows/builtin/goal-types.ts +25 -1
  173. package/dist/builtin/workflows/builtin/goal.d.ts +5 -0
  174. package/dist/builtin/workflows/builtin/goal.ts +13 -2
  175. package/dist/builtin/workflows/builtin/index.d.ts +8 -0
  176. package/dist/builtin/workflows/builtin/open-claude-design-runner.ts +16 -5
  177. package/dist/builtin/workflows/builtin/ralph-core.ts +100 -15
  178. package/dist/builtin/workflows/builtin/ralph-models.ts +98 -66
  179. package/dist/builtin/workflows/builtin/ralph-review-gate.ts +37 -5
  180. package/dist/builtin/workflows/builtin/ralph-reviewer-prompt.ts +159 -0
  181. package/dist/builtin/workflows/builtin/ralph-runner.ts +75 -165
  182. package/dist/builtin/workflows/builtin/ralph.d.ts +3 -0
  183. package/dist/builtin/workflows/builtin/ralph.ts +4 -1
  184. package/dist/builtin/workflows/builtin/review-convergence.ts +111 -0
  185. package/dist/builtin/workflows/builtin/shared-prompts.ts +20 -1
  186. package/dist/builtin/workflows/package.json +2 -2
  187. package/dist/builtin/workflows/skills/create-spec/SKILL.md +2 -0
  188. package/dist/builtin/workflows/skills/impeccable/SKILL.md +16 -13
  189. package/dist/builtin/workflows/skills/impeccable/reference/adapt.md +1 -0
  190. package/dist/builtin/workflows/skills/impeccable/reference/adapt.native.md +58 -0
  191. package/dist/builtin/workflows/skills/impeccable/reference/android.md +40 -0
  192. package/dist/builtin/workflows/skills/impeccable/reference/animate.md +2 -0
  193. package/dist/builtin/workflows/skills/impeccable/reference/audit.md +2 -0
  194. package/dist/builtin/workflows/skills/impeccable/reference/audit.native.md +139 -0
  195. package/dist/builtin/workflows/skills/impeccable/reference/bolder.md +69 -62
  196. package/dist/builtin/workflows/skills/impeccable/reference/critique.md +21 -7
  197. package/dist/builtin/workflows/skills/impeccable/reference/document.md +1 -1
  198. package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +92 -0
  199. package/dist/builtin/workflows/skills/impeccable/reference/init.md +29 -7
  200. package/dist/builtin/workflows/skills/impeccable/reference/ios.md +45 -0
  201. package/dist/builtin/workflows/skills/impeccable/reference/layout.md +25 -1
  202. package/dist/builtin/workflows/skills/impeccable/reference/typeset.md +23 -1
  203. package/dist/builtin/workflows/skills/impeccable/scripts/context-signals.mjs +2 -1
  204. package/dist/builtin/workflows/skills/impeccable/scripts/context.mjs +75 -14
  205. package/dist/builtin/workflows/skills/impeccable/scripts/detector/browser/injected/index.mjs +1 -1
  206. package/dist/builtin/workflows/skills/impeccable/scripts/detector/cli/main.mjs +31 -0
  207. package/dist/builtin/workflows/skills/impeccable/scripts/detector/design-system.mjs +64 -0
  208. package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +118 -11
  209. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +16 -11
  210. package/dist/builtin/workflows/skills/impeccable/scripts/detector/registry/antipatterns.mjs +66 -0
  211. package/dist/builtin/workflows/skills/impeccable/scripts/detector/rules/checks.mjs +42 -10
  212. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/fonts.mjs +30 -0
  213. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/page.mjs +4 -6
  214. package/dist/builtin/workflows/skills/impeccable/scripts/hook-admin.mjs +660 -0
  215. package/dist/builtin/workflows/skills/impeccable/scripts/hook-before-edit.mjs +516 -0
  216. package/dist/builtin/workflows/skills/impeccable/scripts/hook-lib.mjs +1764 -0
  217. package/dist/builtin/workflows/skills/impeccable/scripts/hook.mjs +61 -0
  218. package/dist/builtin/workflows/skills/impeccable/scripts/lib/impeccable-config.mjs +4 -2
  219. package/dist/builtin/workflows/skills/impeccable/scripts/lib/is-generated.mjs +2 -2
  220. package/dist/builtin/workflows/skills/impeccable/scripts/live/svelte-component.mjs +13 -16
  221. package/dist/builtin/workflows/skills/impeccable/scripts/live-accept.mjs +17 -11
  222. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +104 -37
  223. package/dist/builtin/workflows/skills/impeccable/scripts/live-wrap.mjs +9 -0
  224. package/dist/builtin/workflows/src/durable/backend.ts +12 -0
  225. package/dist/builtin/workflows/src/durable/child-primitive.ts +12 -8
  226. package/dist/builtin/workflows/src/durable/dbos-backend.ts +63 -2
  227. package/dist/builtin/workflows/src/durable/dbos-envelope.ts +28 -0
  228. package/dist/builtin/workflows/src/durable/resume-catalog.ts +12 -0
  229. package/dist/builtin/workflows/src/durable/resume-runtime.ts +5 -2
  230. package/dist/builtin/workflows/src/durable/stage-primitive.ts +167 -28
  231. package/dist/builtin/workflows/src/durable/types.ts +30 -1
  232. package/dist/builtin/workflows/src/engine/primitives/task.ts +3 -1
  233. package/dist/builtin/workflows/src/engine/run-durable-finalize.ts +1 -2
  234. package/dist/builtin/workflows/src/engine/run-returned-status.ts +50 -16
  235. package/dist/builtin/workflows/src/engine/run.ts +32 -32
  236. package/dist/builtin/workflows/src/engine/runtime.ts +5 -0
  237. package/dist/builtin/workflows/src/extension/extension-factory.ts +3 -0
  238. package/dist/builtin/workflows/src/extension/extension-lifecycle.ts +9 -2
  239. package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +137 -27
  240. package/dist/builtin/workflows/src/extension/lifecycle-notifications.ts +22 -6
  241. package/dist/builtin/workflows/src/extension/public-types.ts +1 -1
  242. package/dist/builtin/workflows/src/extension/workflow-command-completions.ts +13 -1
  243. package/dist/builtin/workflows/src/extension/workflow-command-registration.ts +19 -4
  244. package/dist/builtin/workflows/src/extension/workflow-command-surfaces.ts +9 -0
  245. package/dist/builtin/workflows/src/extension/workflow-prompts.ts +17 -17
  246. package/dist/builtin/workflows/src/extension/workflow-run-control-command.ts +48 -23
  247. package/dist/builtin/workflows/src/extension/workflow-schema.ts +15 -2
  248. package/dist/builtin/workflows/src/extension/workflow-tool-control.ts +20 -8
  249. package/dist/builtin/workflows/src/extension/workflow-tool.ts +24 -8
  250. package/dist/builtin/workflows/src/runs/background/status.ts +4 -3
  251. package/dist/builtin/workflows/src/runs/foreground/executor-continuation.ts +13 -3
  252. package/dist/builtin/workflows/src/runs/foreground/executor-direct-helpers.ts +29 -8
  253. package/dist/builtin/workflows/src/runs/foreground/executor-hil.ts +1 -1
  254. package/dist/builtin/workflows/src/runs/foreground/executor-stage-control.ts +8 -0
  255. package/dist/builtin/workflows/src/runs/foreground/executor-stage-factory.ts +4 -3
  256. package/dist/builtin/workflows/src/runs/foreground/stage-control-registry.ts +2 -0
  257. package/dist/builtin/workflows/src/runs/foreground/stage-runner-controller.ts +18 -19
  258. package/dist/builtin/workflows/src/runs/foreground/stage-runner-unresolved-overflow.ts +38 -0
  259. package/dist/builtin/workflows/src/runs/foreground/stage-tool-execution-buffer.ts +47 -0
  260. package/dist/builtin/workflows/src/runs/shared/model-fallback-candidates.ts +1 -1
  261. package/dist/builtin/workflows/src/runs/shared/worktree-git.ts +155 -20
  262. package/dist/builtin/workflows/src/runs/shared/worktree-types.ts +6 -0
  263. package/dist/builtin/workflows/src/runs/shared/worktree.ts +2 -1
  264. package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +2 -2
  265. package/dist/builtin/workflows/src/shared/authoring-contract-stage.ts +2 -2
  266. package/dist/builtin/workflows/src/shared/persistence-restore-helpers.ts +18 -1
  267. package/dist/builtin/workflows/src/shared/persistence-restore.ts +23 -5
  268. package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +4 -0
  269. package/dist/builtin/workflows/src/shared/resume-continuation.ts +2 -0
  270. package/dist/builtin/workflows/src/shared/returned-run-status.ts +116 -0
  271. package/dist/builtin/workflows/src/shared/workflow-failures-decisions.ts +2 -0
  272. package/dist/builtin/workflows/src/tui/graph-view-render-helpers.ts +21 -3
  273. package/dist/builtin/workflows/src/tui/graph-view-state.ts +3 -0
  274. package/dist/builtin/workflows/src/tui/graph-view-types.ts +3 -0
  275. package/dist/builtin/workflows/src/tui/stage-chat-view-archive-history.ts +1 -23
  276. package/dist/builtin/workflows/src/tui/stage-chat-view-footer-status.ts +54 -9
  277. package/dist/builtin/workflows/src/tui/stage-chat-view-pending-tools.ts +9 -0
  278. package/dist/builtin/workflows/src/tui/stage-chat-view-render-settings.ts +27 -0
  279. package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +5 -6
  280. package/dist/builtin/workflows/src/tui/stage-chat-view.ts +5 -2
  281. package/dist/builtin/workflows/src/tui/status-list.ts +22 -15
  282. package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +4 -4
  283. package/dist/bun/internal-intercom-broker.d.ts +6 -0
  284. package/dist/bun/internal-intercom-broker.d.ts.map +1 -0
  285. package/dist/bun/internal-intercom-broker.js +39 -0
  286. package/dist/bun/internal-intercom-broker.js.map +1 -0
  287. package/dist/bun/split-loader.d.ts +2 -0
  288. package/dist/bun/split-loader.d.ts.map +1 -0
  289. package/dist/bun/split-loader.js +50 -0
  290. package/dist/bun/split-loader.js.map +1 -0
  291. package/dist/cli/args.d.ts.map +1 -1
  292. package/dist/cli/args.js +2 -2
  293. package/dist/cli/args.js.map +1 -1
  294. package/dist/config.d.ts.map +1 -1
  295. package/dist/config.js +6 -4
  296. package/dist/config.js.map +1 -1
  297. package/dist/core/agent-session-auto-compaction.d.ts +26 -6
  298. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  299. package/dist/core/agent-session-auto-compaction.js +178 -19
  300. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  301. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  302. package/dist/core/agent-session-compaction.js +25 -4
  303. package/dist/core/agent-session-compaction.js.map +1 -1
  304. package/dist/core/agent-session-events.d.ts.map +1 -1
  305. package/dist/core/agent-session-events.js +12 -2
  306. package/dist/core/agent-session-events.js.map +1 -1
  307. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  308. package/dist/core/agent-session-extension-bindings.js +1 -1
  309. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  310. package/dist/core/agent-session-message-queue.d.ts.map +1 -1
  311. package/dist/core/agent-session-message-queue.js +1 -1
  312. package/dist/core/agent-session-message-queue.js.map +1 -1
  313. package/dist/core/agent-session-methods.d.ts +13 -4
  314. package/dist/core/agent-session-methods.d.ts.map +1 -1
  315. package/dist/core/agent-session-methods.js.map +1 -1
  316. package/dist/core/agent-session-models.d.ts +2 -2
  317. package/dist/core/agent-session-models.d.ts.map +1 -1
  318. package/dist/core/agent-session-models.js.map +1 -1
  319. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  320. package/dist/core/agent-session-prompt.js +2 -1
  321. package/dist/core/agent-session-prompt.js.map +1 -1
  322. package/dist/core/agent-session-retry.d.ts +2 -0
  323. package/dist/core/agent-session-retry.d.ts.map +1 -1
  324. package/dist/core/agent-session-retry.js +152 -4
  325. package/dist/core/agent-session-retry.js.map +1 -1
  326. package/dist/core/agent-session-services.d.ts +1 -0
  327. package/dist/core/agent-session-services.d.ts.map +1 -1
  328. package/dist/core/agent-session-services.js +4 -2
  329. package/dist/core/agent-session-services.js.map +1 -1
  330. package/dist/core/agent-session-types.d.ts +15 -1
  331. package/dist/core/agent-session-types.d.ts.map +1 -1
  332. package/dist/core/agent-session-types.js +1 -1
  333. package/dist/core/agent-session-types.js.map +1 -1
  334. package/dist/core/agent-session.d.ts +6 -0
  335. package/dist/core/agent-session.d.ts.map +1 -1
  336. package/dist/core/agent-session.js +6 -0
  337. package/dist/core/agent-session.js.map +1 -1
  338. package/dist/core/anthropic-thinking-guard.d.ts +5 -5
  339. package/dist/core/anthropic-thinking-guard.d.ts.map +1 -1
  340. package/dist/core/anthropic-thinking-guard.js +42 -32
  341. package/dist/core/anthropic-thinking-guard.js.map +1 -1
  342. package/dist/core/atomic-guide-command.d.ts.map +1 -1
  343. package/dist/core/atomic-guide-command.js +15 -15
  344. package/dist/core/atomic-guide-command.js.map +1 -1
  345. package/dist/core/auth-storage.d.ts.map +1 -1
  346. package/dist/core/auth-storage.js +14 -9
  347. package/dist/core/auth-storage.js.map +1 -1
  348. package/dist/core/builtin-packages.d.ts.map +1 -1
  349. package/dist/core/builtin-packages.js +8 -4
  350. package/dist/core/builtin-packages.js.map +1 -1
  351. package/dist/core/compaction/compaction.d.ts +2 -0
  352. package/dist/core/compaction/compaction.d.ts.map +1 -1
  353. package/dist/core/compaction/compaction.js +79 -46
  354. package/dist/core/compaction/compaction.js.map +1 -1
  355. package/dist/core/compaction/context-assistant-turns.d.ts +42 -0
  356. package/dist/core/compaction/context-assistant-turns.d.ts.map +1 -0
  357. package/dist/core/compaction/context-assistant-turns.js +87 -0
  358. package/dist/core/compaction/context-assistant-turns.js.map +1 -0
  359. package/dist/core/compaction/context-compaction-critical.d.ts +15 -0
  360. package/dist/core/compaction/context-compaction-critical.d.ts.map +1 -0
  361. package/dist/core/compaction/context-compaction-critical.js +57 -0
  362. package/dist/core/compaction/context-compaction-critical.js.map +1 -0
  363. package/dist/core/compaction/context-compaction-eviction-alternates.d.ts +18 -0
  364. package/dist/core/compaction/context-compaction-eviction-alternates.d.ts.map +1 -0
  365. package/dist/core/compaction/context-compaction-eviction-alternates.js +186 -0
  366. package/dist/core/compaction/context-compaction-eviction-alternates.js.map +1 -0
  367. package/dist/core/compaction/context-compaction-eviction.d.ts +12 -0
  368. package/dist/core/compaction/context-compaction-eviction.d.ts.map +1 -0
  369. package/dist/core/compaction/context-compaction-eviction.js +222 -0
  370. package/dist/core/compaction/context-compaction-eviction.js.map +1 -0
  371. package/dist/core/compaction/context-compaction-prompt.d.ts.map +1 -1
  372. package/dist/core/compaction/context-compaction-prompt.js +1 -1
  373. package/dist/core/compaction/context-compaction-prompt.js.map +1 -1
  374. package/dist/core/compaction/context-compaction-runner.d.ts +7 -1
  375. package/dist/core/compaction/context-compaction-runner.d.ts.map +1 -1
  376. package/dist/core/compaction/context-compaction-runner.js +113 -21
  377. package/dist/core/compaction/context-compaction-runner.js.map +1 -1
  378. package/dist/core/compaction/context-compaction-types.d.ts +2 -0
  379. package/dist/core/compaction/context-compaction-types.d.ts.map +1 -1
  380. package/dist/core/compaction/context-compaction-types.js.map +1 -1
  381. package/dist/core/compaction/context-deletion-application.d.ts +5 -4
  382. package/dist/core/compaction/context-deletion-application.d.ts.map +1 -1
  383. package/dist/core/compaction/context-deletion-application.js +17 -15
  384. package/dist/core/compaction/context-deletion-application.js.map +1 -1
  385. package/dist/core/compaction/context-deletion-store.d.ts.map +1 -1
  386. package/dist/core/compaction/context-deletion-store.js +1 -1
  387. package/dist/core/compaction/context-deletion-store.js.map +1 -1
  388. package/dist/core/compaction/context-deletion-targets.d.ts +2 -1
  389. package/dist/core/compaction/context-deletion-targets.d.ts.map +1 -1
  390. package/dist/core/compaction/context-deletion-targets.js +36 -31
  391. package/dist/core/compaction/context-deletion-targets.js.map +1 -1
  392. package/dist/core/compaction/context-deletion-tool-helpers.d.ts.map +1 -1
  393. package/dist/core/compaction/context-deletion-tool-helpers.js +116 -43
  394. package/dist/core/compaction/context-deletion-tool-helpers.js.map +1 -1
  395. package/dist/core/compaction/context-transcript-analysis.d.ts +4 -2
  396. package/dist/core/compaction/context-transcript-analysis.d.ts.map +1 -1
  397. package/dist/core/compaction/context-transcript-analysis.js +36 -40
  398. package/dist/core/compaction/context-transcript-analysis.js.map +1 -1
  399. package/dist/core/copilot-anthropic-sse-repair.d.ts +23 -0
  400. package/dist/core/copilot-anthropic-sse-repair.d.ts.map +1 -0
  401. package/dist/core/copilot-anthropic-sse-repair.js +340 -0
  402. package/dist/core/copilot-anthropic-sse-repair.js.map +1 -0
  403. package/dist/core/copilot-gemini-reasoning.d.ts +16 -8
  404. package/dist/core/copilot-gemini-reasoning.d.ts.map +1 -1
  405. package/dist/core/copilot-gemini-reasoning.js +27 -22
  406. package/dist/core/copilot-gemini-reasoning.js.map +1 -1
  407. package/dist/core/copilot-hosts.d.ts +12 -0
  408. package/dist/core/copilot-hosts.d.ts.map +1 -0
  409. package/dist/core/copilot-hosts.js +33 -0
  410. package/dist/core/copilot-hosts.js.map +1 -0
  411. package/dist/core/copilot-model-catalog.d.ts.map +1 -1
  412. package/dist/core/copilot-model-catalog.js +3 -2
  413. package/dist/core/copilot-model-catalog.js.map +1 -1
  414. package/dist/core/copilot-model-synthesis.d.ts.map +1 -1
  415. package/dist/core/copilot-model-synthesis.js +3 -1
  416. package/dist/core/copilot-model-synthesis.js.map +1 -1
  417. package/dist/core/extensions/agent-events.d.ts +1 -1
  418. package/dist/core/extensions/agent-events.d.ts.map +1 -1
  419. package/dist/core/extensions/agent-events.js.map +1 -1
  420. package/dist/core/extensions/loader-core.d.ts.map +1 -1
  421. package/dist/core/extensions/loader-core.js +6 -0
  422. package/dist/core/extensions/loader-core.js.map +1 -1
  423. package/dist/core/extensions/loader-virtual-modules.d.ts +8 -1
  424. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  425. package/dist/core/extensions/loader-virtual-modules.js +10 -4
  426. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  427. package/dist/core/extensions/provider-types.d.ts +2 -7
  428. package/dist/core/extensions/provider-types.d.ts.map +1 -1
  429. package/dist/core/extensions/provider-types.js.map +1 -1
  430. package/dist/core/footer-data-provider.d.ts +6 -0
  431. package/dist/core/footer-data-provider.d.ts.map +1 -1
  432. package/dist/core/footer-data-provider.js +72 -29
  433. package/dist/core/footer-data-provider.js.map +1 -1
  434. package/dist/core/http-dispatcher.d.ts.map +1 -1
  435. package/dist/core/http-dispatcher.js +5 -5
  436. package/dist/core/http-dispatcher.js.map +1 -1
  437. package/dist/core/messages.d.ts +9 -0
  438. package/dist/core/messages.d.ts.map +1 -1
  439. package/dist/core/messages.js +100 -18
  440. package/dist/core/messages.js.map +1 -1
  441. package/dist/core/model-registry-builtins.d.ts.map +1 -1
  442. package/dist/core/model-registry-builtins.js +5 -0
  443. package/dist/core/model-registry-builtins.js.map +1 -1
  444. package/dist/core/model-registry-custom-loader.d.ts.map +1 -1
  445. package/dist/core/model-registry-custom-loader.js +49 -8
  446. package/dist/core/model-registry-custom-loader.js.map +1 -1
  447. package/dist/core/model-registry-dynamic.d.ts.map +1 -1
  448. package/dist/core/model-registry-dynamic.js +11 -5
  449. package/dist/core/model-registry-dynamic.js.map +1 -1
  450. package/dist/core/model-registry-loader.d.ts.map +1 -1
  451. package/dist/core/model-registry-loader.js +8 -0
  452. package/dist/core/model-registry-loader.js.map +1 -1
  453. package/dist/core/model-registry-schemas.d.ts +93 -8
  454. package/dist/core/model-registry-schemas.d.ts.map +1 -1
  455. package/dist/core/model-registry-schemas.js +24 -12
  456. package/dist/core/model-registry-schemas.js.map +1 -1
  457. package/dist/core/model-registry-types.d.ts +7 -6
  458. package/dist/core/model-registry-types.d.ts.map +1 -1
  459. package/dist/core/model-registry-types.js.map +1 -1
  460. package/dist/core/model-registry.d.ts +5 -0
  461. package/dist/core/model-registry.d.ts.map +1 -1
  462. package/dist/core/model-registry.js +23 -0
  463. package/dist/core/model-registry.js.map +1 -1
  464. package/dist/core/model-resolver-cli.d.ts.map +1 -1
  465. package/dist/core/model-resolver-cli.js +33 -5
  466. package/dist/core/model-resolver-cli.js.map +1 -1
  467. package/dist/core/model-resolver-initial.d.ts +6 -1
  468. package/dist/core/model-resolver-initial.d.ts.map +1 -1
  469. package/dist/core/model-resolver-initial.js +12 -7
  470. package/dist/core/model-resolver-initial.js.map +1 -1
  471. package/dist/core/model-resolver-scope.d.ts +9 -0
  472. package/dist/core/model-resolver-scope.d.ts.map +1 -1
  473. package/dist/core/model-resolver-scope.js +12 -4
  474. package/dist/core/model-resolver-scope.js.map +1 -1
  475. package/dist/core/model-resolver.d.ts +4 -3
  476. package/dist/core/model-resolver.d.ts.map +1 -1
  477. package/dist/core/model-resolver.js +2 -2
  478. package/dist/core/model-resolver.js.map +1 -1
  479. package/dist/core/openai-responses-payload-sanitizer.d.ts +7 -0
  480. package/dist/core/openai-responses-payload-sanitizer.d.ts.map +1 -0
  481. package/dist/core/openai-responses-payload-sanitizer.js +74 -0
  482. package/dist/core/openai-responses-payload-sanitizer.js.map +1 -0
  483. package/dist/core/package-manager-auto-resources.d.ts +2 -2
  484. package/dist/core/package-manager-auto-resources.d.ts.map +1 -1
  485. package/dist/core/package-manager-auto-resources.js +32 -52
  486. package/dist/core/package-manager-auto-resources.js.map +1 -1
  487. package/dist/core/package-manager-resolver.d.ts.map +1 -1
  488. package/dist/core/package-manager-resolver.js +23 -14
  489. package/dist/core/package-manager-resolver.js.map +1 -1
  490. package/dist/core/package-manager-resource-collector.d.ts +3 -3
  491. package/dist/core/package-manager-resource-collector.d.ts.map +1 -1
  492. package/dist/core/package-manager-resource-collector.js +76 -73
  493. package/dist/core/package-manager-resource-collector.js.map +1 -1
  494. package/dist/core/package-manager-resource-files.d.ts +9 -8
  495. package/dist/core/package-manager-resource-files.d.ts.map +1 -1
  496. package/dist/core/package-manager-resource-files.js +92 -81
  497. package/dist/core/package-manager-resource-files.js.map +1 -1
  498. package/dist/core/prompt-templates-async.d.ts +3 -0
  499. package/dist/core/prompt-templates-async.d.ts.map +1 -0
  500. package/dist/core/prompt-templates-async.js +118 -0
  501. package/dist/core/prompt-templates-async.js.map +1 -0
  502. package/dist/core/provider-context-usage.d.ts +11 -0
  503. package/dist/core/provider-context-usage.d.ts.map +1 -0
  504. package/dist/core/provider-context-usage.js +58 -0
  505. package/dist/core/provider-context-usage.js.map +1 -0
  506. package/dist/core/resource-loader-assets.d.ts +3 -3
  507. package/dist/core/resource-loader-assets.d.ts.map +1 -1
  508. package/dist/core/resource-loader-assets.js +66 -83
  509. package/dist/core/resource-loader-assets.js.map +1 -1
  510. package/dist/core/resource-loader-context-files.d.ts +1 -0
  511. package/dist/core/resource-loader-context-files.d.ts.map +1 -1
  512. package/dist/core/resource-loader-context-files.js +13 -10
  513. package/dist/core/resource-loader-context-files.js.map +1 -1
  514. package/dist/core/resource-loader-core.d.ts +1 -1
  515. package/dist/core/resource-loader-core.d.ts.map +1 -1
  516. package/dist/core/resource-loader-core.js +5 -5
  517. package/dist/core/resource-loader-core.js.map +1 -1
  518. package/dist/core/resource-loader-extensions.d.ts.map +1 -1
  519. package/dist/core/resource-loader-extensions.js +4 -0
  520. package/dist/core/resource-loader-extensions.js.map +1 -1
  521. package/dist/core/resource-loader-reload.d.ts.map +1 -1
  522. package/dist/core/resource-loader-reload.js +54 -7
  523. package/dist/core/resource-loader-reload.js.map +1 -1
  524. package/dist/core/resource-loader-types.d.ts +7 -1
  525. package/dist/core/resource-loader-types.d.ts.map +1 -1
  526. package/dist/core/resource-loader-types.js.map +1 -1
  527. package/dist/core/sdk-types.d.ts +2 -0
  528. package/dist/core/sdk-types.d.ts.map +1 -1
  529. package/dist/core/sdk-types.js.map +1 -1
  530. package/dist/core/sdk.d.ts.map +1 -1
  531. package/dist/core/sdk.js +9 -6
  532. package/dist/core/sdk.js.map +1 -1
  533. package/dist/core/session-entry-normalization.d.ts +7 -0
  534. package/dist/core/session-entry-normalization.d.ts.map +1 -0
  535. package/dist/core/session-entry-normalization.js +14 -0
  536. package/dist/core/session-entry-normalization.js.map +1 -0
  537. package/dist/core/session-manager-core.d.ts.map +1 -1
  538. package/dist/core/session-manager-core.js +1 -0
  539. package/dist/core/session-manager-core.js.map +1 -1
  540. package/dist/core/session-manager-history.d.ts +2 -2
  541. package/dist/core/session-manager-history.d.ts.map +1 -1
  542. package/dist/core/session-manager-history.js +127 -108
  543. package/dist/core/session-manager-history.js.map +1 -1
  544. package/dist/core/settings-manager-basic-accessors.d.ts +3 -2
  545. package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
  546. package/dist/core/settings-manager-basic-accessors.js +6 -0
  547. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  548. package/dist/core/settings-manager-core.d.ts.map +1 -1
  549. package/dist/core/settings-manager-core.js +3 -2
  550. package/dist/core/settings-manager-core.js.map +1 -1
  551. package/dist/core/settings-storage.d.ts.map +1 -1
  552. package/dist/core/settings-storage.js +2 -1
  553. package/dist/core/settings-storage.js.map +1 -1
  554. package/dist/core/settings-types.d.ts +2 -1
  555. package/dist/core/settings-types.d.ts.map +1 -1
  556. package/dist/core/settings-types.js.map +1 -1
  557. package/dist/core/skills-async.d.ts +3 -0
  558. package/dist/core/skills-async.d.ts.map +1 -0
  559. package/dist/core/skills-async.js +269 -0
  560. package/dist/core/skills-async.js.map +1 -0
  561. package/dist/core/slash-commands.d.ts +2 -0
  562. package/dist/core/slash-commands.d.ts.map +1 -1
  563. package/dist/core/slash-commands.js +141 -0
  564. package/dist/core/slash-commands.js.map +1 -1
  565. package/dist/core/tools/bash.d.ts.map +1 -1
  566. package/dist/core/tools/bash.js +11 -8
  567. package/dist/core/tools/bash.js.map +1 -1
  568. package/dist/core/trust-manager.d.ts +9 -0
  569. package/dist/core/trust-manager.d.ts.map +1 -1
  570. package/dist/core/trust-manager.js +44 -2
  571. package/dist/core/trust-manager.js.map +1 -1
  572. package/dist/index-extensions.d.ts +1 -1
  573. package/dist/index-extensions.d.ts.map +1 -1
  574. package/dist/index-extensions.js.map +1 -1
  575. package/dist/index.d.ts +2 -1
  576. package/dist/index.d.ts.map +1 -1
  577. package/dist/index.js +2 -1
  578. package/dist/index.js.map +1 -1
  579. package/dist/main-deferred-startup.d.ts +33 -0
  580. package/dist/main-deferred-startup.d.ts.map +1 -0
  581. package/dist/main-deferred-startup.js +44 -0
  582. package/dist/main-deferred-startup.js.map +1 -0
  583. package/dist/main-early-input.d.ts +41 -0
  584. package/dist/main-early-input.d.ts.map +1 -0
  585. package/dist/main-early-input.js +154 -0
  586. package/dist/main-early-input.js.map +1 -0
  587. package/dist/main-session.d.ts.map +1 -1
  588. package/dist/main-session.js +1 -0
  589. package/dist/main-session.js.map +1 -1
  590. package/dist/main.d.ts +0 -6
  591. package/dist/main.d.ts.map +1 -1
  592. package/dist/main.js +47 -39
  593. package/dist/main.js.map +1 -1
  594. package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
  595. package/dist/modes/interactive/components/chat-session-host-actions.js +0 -1
  596. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  597. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  598. package/dist/modes/interactive/components/chat-session-host-events.js +15 -0
  599. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  600. package/dist/modes/interactive/components/settings-selector-options.d.ts.map +1 -1
  601. package/dist/modes/interactive/components/settings-selector-options.js +3 -1
  602. package/dist/modes/interactive/components/settings-selector-options.js.map +1 -1
  603. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  604. package/dist/modes/interactive/components/thinking-selector.js +2 -1
  605. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  606. package/dist/modes/interactive/interactive-agent-events.d.ts.map +1 -1
  607. package/dist/modes/interactive/interactive-agent-events.js +37 -2
  608. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  609. package/dist/modes/interactive/interactive-auth-login.d.ts.map +1 -1
  610. package/dist/modes/interactive/interactive-auth-login.js +0 -1
  611. package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
  612. package/dist/modes/interactive/interactive-autocomplete.d.ts.map +1 -1
  613. package/dist/modes/interactive/interactive-autocomplete.js +21 -9
  614. package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
  615. package/dist/modes/interactive/interactive-child-ordering.d.ts +7 -0
  616. package/dist/modes/interactive/interactive-child-ordering.d.ts.map +1 -0
  617. package/dist/modes/interactive/interactive-child-ordering.js +26 -0
  618. package/dist/modes/interactive/interactive-child-ordering.js.map +1 -0
  619. package/dist/modes/interactive/interactive-deferred-startup.d.ts +8 -1
  620. package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
  621. package/dist/modes/interactive/interactive-deferred-startup.js +86 -26
  622. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
  623. package/dist/modes/interactive/interactive-editor-actions.d.ts.map +1 -1
  624. package/dist/modes/interactive/interactive-editor-actions.js +13 -13
  625. package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
  626. package/dist/modes/interactive/interactive-extension-runtime.d.ts.map +1 -1
  627. package/dist/modes/interactive/interactive-extension-runtime.js +16 -0
  628. package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
  629. package/dist/modes/interactive/interactive-hotkeys-debug.d.ts.map +1 -1
  630. package/dist/modes/interactive/interactive-hotkeys-debug.js +4 -3
  631. package/dist/modes/interactive/interactive-hotkeys-debug.js.map +1 -1
  632. package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
  633. package/dist/modes/interactive/interactive-input-handling.js +360 -230
  634. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  635. package/dist/modes/interactive/interactive-mode-base.d.ts +19 -4
  636. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  637. package/dist/modes/interactive/interactive-mode-base.js +46 -4
  638. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  639. package/dist/modes/interactive/interactive-mode-deps.d.ts +3 -3
  640. package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
  641. package/dist/modes/interactive/interactive-mode-deps.js +3 -3
  642. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  643. package/dist/modes/interactive/interactive-mode-surface.d.ts +27 -17
  644. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  645. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  646. package/dist/modes/interactive/interactive-mode-types.d.ts +8 -1
  647. package/dist/modes/interactive/interactive-mode-types.d.ts.map +1 -1
  648. package/dist/modes/interactive/interactive-mode-types.js.map +1 -1
  649. package/dist/modes/interactive/interactive-model-routing.d.ts.map +1 -1
  650. package/dist/modes/interactive/interactive-model-routing.js +14 -10
  651. package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
  652. package/dist/modes/interactive/interactive-onboarding.d.ts +0 -9
  653. package/dist/modes/interactive/interactive-onboarding.d.ts.map +1 -1
  654. package/dist/modes/interactive/interactive-onboarding.js +24 -201
  655. package/dist/modes/interactive/interactive-onboarding.js.map +1 -1
  656. package/dist/modes/interactive/interactive-process-lifecycle.d.ts.map +1 -1
  657. package/dist/modes/interactive/interactive-process-lifecycle.js +43 -9
  658. package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
  659. package/dist/modes/interactive/interactive-render-chat.d.ts.map +1 -1
  660. package/dist/modes/interactive/interactive-render-chat.js +93 -10
  661. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  662. package/dist/modes/interactive/interactive-resource-disclosure.d.ts.map +1 -1
  663. package/dist/modes/interactive/interactive-resource-disclosure.js +3 -2
  664. package/dist/modes/interactive/interactive-resource-disclosure.js.map +1 -1
  665. package/dist/modes/interactive/interactive-resource-rendering.d.ts.map +1 -1
  666. package/dist/modes/interactive/interactive-resource-rendering.js +10 -8
  667. package/dist/modes/interactive/interactive-resource-rendering.js.map +1 -1
  668. package/dist/modes/interactive/interactive-session-routing.d.ts.map +1 -1
  669. package/dist/modes/interactive/interactive-session-routing.js +9 -5
  670. package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
  671. package/dist/modes/interactive/interactive-session-runtime.d.ts.map +1 -1
  672. package/dist/modes/interactive/interactive-session-runtime.js +1 -1
  673. package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
  674. package/dist/modes/interactive/interactive-slash-commands.d.ts.map +1 -1
  675. package/dist/modes/interactive/interactive-slash-commands.js +1 -1
  676. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  677. package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
  678. package/dist/modes/interactive/interactive-startup.js +102 -98
  679. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  680. package/dist/modes/interactive/theme/global-theme.d.ts.map +1 -1
  681. package/dist/modes/interactive/theme/global-theme.js +26 -2
  682. package/dist/modes/interactive/theme/global-theme.js.map +1 -1
  683. package/dist/modes/interactive/theme/theme-class.d.ts +1 -1
  684. package/dist/modes/interactive/theme/theme-class.d.ts.map +1 -1
  685. package/dist/modes/interactive/theme/theme-class.js +2 -0
  686. package/dist/modes/interactive/theme/theme-class.js.map +1 -1
  687. package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
  688. package/dist/modes/interactive/theme/theme-loading.d.ts.map +1 -1
  689. package/dist/modes/interactive/theme/theme-loading.js +3 -0
  690. package/dist/modes/interactive/theme/theme-loading.js.map +1 -1
  691. package/dist/modes/interactive/theme/theme.d.ts +1 -1
  692. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  693. package/dist/modes/interactive/theme/theme.js +1 -1
  694. package/dist/modes/interactive/theme/theme.js.map +1 -1
  695. package/dist/utils/child-process.d.ts +8 -1
  696. package/dist/utils/child-process.d.ts.map +1 -1
  697. package/dist/utils/child-process.js +39 -6
  698. package/dist/utils/child-process.js.map +1 -1
  699. package/dist/utils/clipboard-image.d.ts.map +1 -1
  700. package/dist/utils/clipboard-image.js +3 -0
  701. package/dist/utils/clipboard-image.js.map +1 -1
  702. package/dist/utils/event-loop.d.ts +7 -0
  703. package/dist/utils/event-loop.d.ts.map +1 -0
  704. package/dist/utils/event-loop.js +14 -0
  705. package/dist/utils/event-loop.js.map +1 -0
  706. package/dist/utils/fs-watch.d.ts +24 -1
  707. package/dist/utils/fs-watch.d.ts.map +1 -1
  708. package/dist/utils/fs-watch.js +60 -5
  709. package/dist/utils/fs-watch.js.map +1 -1
  710. package/dist/utils/json.d.ts +4 -0
  711. package/dist/utils/json.d.ts.map +1 -1
  712. package/dist/utils/json.js +8 -0
  713. package/dist/utils/json.js.map +1 -1
  714. package/dist/utils/module-require.d.ts +11 -0
  715. package/dist/utils/module-require.d.ts.map +1 -1
  716. package/dist/utils/module-require.js +14 -1
  717. package/dist/utils/module-require.js.map +1 -1
  718. package/dist/utils/split-launcher.d.ts +38 -0
  719. package/dist/utils/split-launcher.d.ts.map +1 -0
  720. package/dist/utils/split-launcher.js +63 -0
  721. package/dist/utils/split-launcher.js.map +1 -0
  722. package/docs/changelog.mdx +19 -0
  723. package/docs/compaction.md +100 -64
  724. package/docs/custom-provider.md +18 -5
  725. package/docs/development.md +4 -0
  726. package/docs/extensions.md +11 -2
  727. package/docs/json.md +3 -1
  728. package/docs/keybindings.md +2 -2
  729. package/docs/models.md +69 -10
  730. package/docs/providers.md +3 -2
  731. package/docs/quickstart.md +15 -11
  732. package/docs/rpc.md +5 -3
  733. package/docs/sdk.md +1 -1
  734. package/docs/settings.md +33 -3
  735. package/docs/subagents.md +40 -5
  736. package/docs/terminal-setup.md +4 -0
  737. package/docs/tools.md +1 -1
  738. package/docs/usage.md +8 -6
  739. package/docs/windows.md +4 -0
  740. package/docs/workflows.md +59 -36
  741. package/examples/extensions/preset.ts +2 -2
  742. package/examples/extensions/subagent/README.md +2 -2
  743. package/examples/extensions/subagent/index.ts +1 -2
  744. package/examples/extensions/subagent/schemas.ts +4 -1
  745. package/examples/sdk/12-full-control.ts +1 -1
  746. package/npm-shrinkwrap.json +538 -51
  747. package/package.json +10 -9
  748. package/dist/builtin/subagents/src/runs/foreground/chain-clarify-behavior.ts +0 -75
  749. package/dist/builtin/subagents/src/runs/foreground/chain-clarify-component.ts +0 -202
  750. package/dist/builtin/subagents/src/runs/foreground/chain-clarify-edit.ts +0 -97
  751. package/dist/builtin/subagents/src/runs/foreground/chain-clarify-editor.ts +0 -160
  752. package/dist/builtin/subagents/src/runs/foreground/chain-clarify-frame.ts +0 -72
  753. package/dist/builtin/subagents/src/runs/foreground/chain-clarify-render-modes.ts +0 -161
  754. package/dist/builtin/subagents/src/runs/foreground/chain-clarify-render-selectors.ts +0 -203
  755. package/dist/builtin/subagents/src/runs/foreground/chain-clarify-selectors.ts +0 -234
  756. package/dist/builtin/subagents/src/runs/foreground/chain-clarify-state.ts +0 -103
  757. package/dist/builtin/subagents/src/runs/foreground/chain-clarify-types.ts +0 -29
  758. package/dist/builtin/subagents/src/runs/foreground/chain-clarify.ts +0 -9
  759. package/dist/builtin/subagents/src/runs/foreground/chain-execution-clarify.ts +0 -117
package/CHANGELOG.md CHANGED
@@ -2,6 +2,140 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.5-alpha.10] - 2026-07-11
6
+
7
+ ### Added
8
+
9
+ - Added model-capability-aware `max` thinking support across the CLI, settings, SDK/RPC/extension surfaces, Cursor model mapping, workflow stages, and bundled subagents; models still expose only the levels in their own capability maps ([#1703](https://github.com/bastani-inc/atomic/issues/1703)).
10
+ - Added request-wide `cost.tiers` support for custom `models.json` models, partial `modelOverrides`, and extension-registered providers, including complete tier validation, aggregate-input threshold selection, inherited-tier preservation for scalar overrides, and explicit tier-array replacement/clearing ([#1703](https://github.com/bastani-inc/atomic/issues/1703)).
11
+
12
+ ### Changed
13
+
14
+ - Synced the upstream Pi runtime dependencies (`@earendil-works/pi-agent-core`, `pi-ai`, and `pi-tui`) through `^0.80.6` across Atomic and bundled extensions, retained the same consolidated refresh's `lru-cache`, optional `@dbos-inc/dbos-sdk`, `napi`, `napi-derive`, and `tree-sitter` updates, regenerated Bun/Cargo/npm shrinkwrap metadata with mutually consistent 0.80.6 registry integrity, and kept versionless `0.0.0` Atomic manifests. This inherits signed empty Anthropic thinking preservation, request-wide GPT-5.4/5.5 long-context pricing, corrected GPT-5.6 catalogs/backend windows, and upstream retry/provider fixes while preserving Atomic's Copilot/Gemini behavior ([#1703](https://github.com/bastani-inc/atomic/issues/1703)).
15
+ - Replaced universal workflow/subagent routing with an intent-first least-orchestration policy across model guidance, help, and documentation. Interactive exploration stays inline, bounded specialist work may use single/chain/parallel subagents, and clearly delegated long-running autonomous work uses named, direct-shape, or custom inline TypeScript workflows when durable execution features add value. Explicit loop and stop-condition requests remain key workflow signals when the user delegates execution, so retries, evidence, and convergence are tracked.
16
+
17
+ - Explicit bash timeouts now fail before execution when non-finite, non-positive, or greater than Atomic's 3600-second ceiling; omitting the field still uses 300 seconds, and valid fractional values retain Atomic's floor behavior instead of being silently clamped into range ([#1703](https://github.com/bastani-inc/atomic/issues/1703)).
18
+
19
+ - Changed the bundled `ralph` workflow review fan-out from three reviewers to two (`reviewer-a` and `reviewer-b`), removing `reviewer-c` and its GLM-led model chain while keeping unanimous approval across the remaining reviewers.
20
+
21
+ ### Fixed
22
+
23
+ - Fixed CLI resolution of unknown/custom model IDs with a recognized `:<thinking>` suffix so the suffix is applied as the thinking level instead of leaking into the synthesized model ID, while preserving registered and unrecognized colon-bearing model IDs.
24
+ - Fixed bundled MCP readiness so failed background initialization is retryable and single-flight within the active session, stale retries cannot publish after shutdown, replacement startup waits for retired initializer/state/OAuth cleanup, and proxy/direct readiness plus lazy-connection and OAuth waits use caller-local cancellation without stopping shared producers. Direct executors reject old-state work on success and failure paths after replacement and close stale newly opened Apps views, SDK resource/tool requests receive the invocation signal, and UI-backed MCP Apps calls emit one terminal cancellation before teardown while preserving the exact host reason over SDK/notification failures.
25
+ - Fixed bundled web-access and Intercom lazy wrappers to retire session-scoped candidates on shutdown, reject calls spanning teardown, and initialize fresh state after restart; host cancellation after web provider/curator execution now preserves its exact abort reason while explicit curator user cancellation remains a normal result.
26
+ - Fixed bundled web-access lazy tools failing during native Bun heavy-module loading by resolving compatibility helpers from the canonical installed `@earendil-works/pi-ai/compat` package ([#1728](https://github.com/bastani-inc/atomic/issues/1728)).
27
+ - Fixed stale pre-compaction usage estimates after a newer inserted prefix, normalized lax null or omitted content at extension, custom-message, and restored-session boundaries, and kept Atomic's Verbatim Compaction custom-message budgeting semantics intact ([#1703](https://github.com/bastani-inc/atomic/issues/1703)).
28
+ - Fixed `models.json` `modelOverrides` so matching extension-registered provider models receive configured names, thinking maps, compatibility fields, context settings, and merged headers without replacing Atomic's dynamic Copilot/context-window behavior; normal CLI startup now loads layered legacy `.pi` and primary `.atomic` files, disjoint provider/model entries survive, and an exact primary entry replaces the complete legacy override with source-correct header precedence and `{}` restoration of built-in values ([#1703](https://github.com/bastani-inc/atomic/issues/1703)).
29
+ - Fixed project context traversal at Windows drive roots, surfaced credential persistence failures without mutating in-memory auth first, skipped unauthenticated saved defaults, preserved missing saved IDs for authenticated custom OpenAI-compatible providers, prevented removed static catalog model IDs from being synthesized during session restore, and cleared cached label timestamps when starting a new session ([#1703](https://github.com/bastani-inc/atomic/issues/1703)).
30
+ - Fixed missing exact `--session-id` handling to warn before creating the requested session, ignored rapid duplicate fork-menu selections, and kept visible custom messages emitted during streaming ordered before the live assistant row ([#1703](https://github.com/bastani-inc/atomic/issues/1703)).
31
+ - Fixed standalone clipboard image support by falling back to xclip after an empty native result and packaging each matching 0.3.9 native binding beside the wrapper in Atomic's split binary archives; caller-relative `TMPDIR` values are canonicalized before directory changes, and `--skip-deps` tolerates an absent optional clipboard wrapper while strict release builds remain loud ([#1703](https://github.com/bastani-inc/atomic/issues/1703)).
32
+ - Fixed Anthropic/GitHub Copilot signed-thinking replay after Verbatim Compaction by validating provider-visible logical assistant tool-use turns instead of isolated messages: the current final turn retains every `thinking`/`redacted_thinking` entry, completed historical turns retain all or omit all signed entries, complete grep batches and deterministic overflow eviction use the same invariant, and unsafe persisted plans heal in memory with exact retained blocks, signatures, and paired tool results restored without rewriting session JSONL. Provider-visible user/custom inputs, included bash executions, and non-empty branch summaries establish boundaries, task anchors, recent windows, and finite transcript token totals; provider-omitted empty or whitespace-only user/custom inputs and empty or malformed branch summaries do not, while whitespace-only branch summaries remain visible through their wrapper. Raw block visibility is retained separately from transcript display projections, future unknown typed blocks fail visible with a conservative token estimate, malformed siblings are transiently filtered before provider calls, and stale user-image deletion cannot remove the final provider-visible task. Raw `redacted_thinking` blocks are normalized in the transient, non-mutating LLM-compatible messages returned by `convertToLlm`, so retained opaque data serializes exactly without mutating durable history.
33
+ - Fixed bundled foreground subagent coordination so `intercom.ask` and `contact_supervisor need_decision` surface while the parent tool is active, detach only their exact child, resume through threaded replies, and expose the retained detached-to-terminal child status and actual output through public status queries; progress/send and background execution remain nonblocking and unchanged ([#1727](https://github.com/bastani-inc/atomic/issues/1727)).
34
+ - Register bridged foreground/background children with bundled Intercom before agent work and lazily gate interactive foreground launches on parent broker readiness, while disabled, unavailable, unused-parent, and management-only paths remain lazy and broker-free.
35
+
36
+ ## [0.9.5-alpha.9] - 2026-07-09
37
+
38
+ ### Changed
39
+
40
+ - Improved interactive startup responsiveness by keeping footer git watcher setup out of first paint and deferring it until the first input handler is ready, while preserving lazy footer branch reads and post-frame branch-change re-rendering. Deferred extension/resource loading no longer starts on a blind post-paint timer that can freeze live typing; instead, Atomic starts it in the background once input is ready and uses a readiness gate before the first normal prompt/model turn if the background load has not settled. This keeps first-paint/typeahead responsive while ensuring the first interactive prompt sees extension tools, skills, prompt templates, resources, and extension-registered provider/model updates. Built-in slash commands stay available immediately, and bundled extension slash commands expose lightweight metadata for autocomplete before their heavy implementations load; explicitly submitted extension slash commands load the implementation on demand and then route the same command. Explicit provider/model selections stay on the synchronous startup path because they must resolve against extension-registered providers before the session is created. Changelog and first-run notice materialization now happen after the first frame, and startup/input timing probes cover raw-mode enablement, first captured raw key, first frame, input-handler callback installation, and first submit for benchmark/probe runs.
41
+ - Documented the built-in extension lazy-startup model: lightweight tools/commands register immediately while MCP connection warmup, workflow discovery, subagent maintenance, and web-access heavy provider loading run in the background or on explicit use.
42
+
43
+ ### Fixed
44
+
45
+ - Fixed Windows native filesystem watchers to canonicalize watched paths before calling `fs.watch`, reject unresolved 8.3 short-name paths, and fall back to polling for unsafe watcher paths. This prevents libuv fs-event assertion crashes when temp, session, footer, or theme paths contain short-name components such as `USERNA~1`.
46
+ - Fixed responses truncated at the output-token cap (`stopReason: "length"`) dead-ending the model's work with a "maximum output token limit" error when the context was still below the auto-compaction threshold. Previously auto-continuation only happened as a side effect of threshold compaction, so a length truncation with input room to spare left the task half-finished. Length-truncated turns now continue directly without compacting: the incomplete assistant is removed from retry context and the generation resumes automatically so the model finishes where it left off, bounded by a small consecutive-continuation cap so a turn that keeps exceeding the per-turn output cap still terminates. Compaction-driven `willRetry: true` continuations are now consistently tracked through the normal prompt lifecycle, so `AgentSession.prompt()` waits for threshold length-stop continuation before resolving instead of treating it as fire-and-forget.
47
+ - Fixed auto-compaction after OpenAI Responses output-budget underflow errors such as `Invalid 'max_output_tokens': integer below minimum value. Expected a value >= 16, but got 1 instead.` Atomic now classifies that specific context-pressure failure as retry-worthy when the live context crosses the compaction threshold, removes the empty error assistant from retry context after compaction, and automatically continues from the preceding work anchor instead of waiting for the user to type `Continue`. Generic `invalid_request_body` errors such as malformed tool schemas are still not auto-retried, OpenAI Responses payload sanitization now prevents `max_output_tokens` values below the provider minimum of 16 from being sent, and repeated output-budget underflow continuation is capped at one compact-and-retry attempt so an unrecoverable context terminates visibly instead of looping or stalling.
48
+ - Fixed bundled workflow durable resume for reusable `git_worktree_dir` worktrees so resumed runs reuse the original invocation repository/cwd and report slow Git subprocess timeouts as Git timeouts instead of repository-detection failures.
49
+ - Removed the queued-message restore success status from the interactive UI so restoring queued messages silently returns them to the editor without showing transient restore copy.
50
+ - Fixed bundled MCP proxy metadata paths so explicit cold-cache `search`, `describe`, and server-list requests hydrate lazy server metadata on demand without reconnecting all lazy servers during startup.
51
+
52
+ ## [0.9.5-alpha.8] - 2026-07-08
53
+
54
+ ### Added
55
+
56
+ - Added main-chat `fallbackModels` support for retryable provider/model failures ([#1418](https://github.com/bastani-inc/atomic/issues/1418)). Users can configure an ordered fallback chain in settings or SDK session options with per-candidate reasoning suffixes such as `:high` and `:xhigh`; normal same-model retry remains first when enabled, fallback switches are recorded as session model changes, and the UI reports fallback progress.
57
+
58
+ ### Fixed
59
+
60
+ - Fixed provider context-window overflow recovery so an exhausted overflow auto-compaction attempt emits an explicit unresolved-overflow signal instead of silently leaving callers to retry the same model, and planner calls that themselves overflow now degrade through the deterministic overflow-eviction ladder rather than throwing before non-model reduction can run. Planner overflow is now recognized whether it is returned as an assistant error message or thrown by the provider stream before `agent.prompt()` completes, so overflow recovery skips the critical planner retry and goes directly to deterministic non-model reduction in both forms.
61
+ - Fixed overflow auto-compaction retry reliability so `AgentSession.prompt()` now waits for the `willRetry: true` post-compaction continuation before resolving. Late unresolved-overflow signals from that continuation are observed by workflow callers before they can mark the original prompt successful.
62
+ - Fixed normal interactive TTY startup so typing before the prompt box is fully mounted is captured instead of being invisibly blocked by deferred resource initialization. Atomic now starts a short-lived raw input buffer only on the existing deferred-startup fast path, keeps it active until the TUI input handler is mounted, replays draft text into the editor, queues only ordinary Enter-submitted prompts for the prompt loop, and preserves command-like early submissions such as `/settings` or `!pwd` as standalone editor submissions so normal command routing handles them after mount. Once a command-like startup submission is captured, later captured submissions wait behind it and replay in original input order after that command is routed, preventing a later ordinary prompt from leapfrogging the earlier command without merging commands and following prompts into one draft. The capture now restores terminal raw mode across early startup exits/signals and ignores split escape sequences so partial arrow-key/protocol bytes never become draft text. Trust prompts, explicit resource flags, metadata commands, non-TTY modes, and explicit provider/model selection stay on the synchronous startup path.
63
+ - Fixed the bundled intercom extension to keep broker runtime files under the active Atomic agent directory, including custom `ATOMIC_CODING_AGENT_DIR` values and the legacy `PI_CODING_AGENT_DIR` alias, while documenting the `~/.atomic/agent/intercom/` primary path and `~/.pi/agent/intercom/` fallback. The default pi-compatible `npx --no-install tsx` broker sentinel is now hardened to launch through the current runtime (`process.execPath`): Node-based installs use a resolved `tsx` CLI with a bundled `jiti` fallback, Bun source-checkout runs use the current Bun executable directly, and standalone Atomic Bun binaries use a narrow internal split-launcher broker handoff, so default startup does not depend on `npx`, `tsx`, or `bun` being on `PATH`; explicit custom broker configs remain supported.
64
+ - Fixed GitHub Copilot Claude/Anthropic Messages streams that cleanly report a terminal stop reason but omit the required `message_stop` SSE event. Atomic now adds that single terminal event only for closed, non-error Copilot `/v1/messages` event streams before provider parsing, including complete final SSE frames that reach EOF without a trailing blank-line separator and GitHub Enterprise/GHE tenant routing hosts such as `copilot-api.<enterprise>.ghe.com`, while leaving malformed, truncated, already well-formed, non-Copilot, look-alike host, non-SSE, Gemini, and OpenAI-style streams to the normal parser/retry behavior.
65
+ - Fixed bundled workflow durable resume hydration so replayed parallel reviewer fanout preserves branch structure and completed workflow stages restore persisted summaries, durations, session/model metadata, and checkpoint contents in status and graph views.
66
+
67
+ ## [0.9.5-alpha.7] - 2026-07-07
68
+
69
+ ### Changed
70
+
71
+ - Changed interactive Ctrl+C to interrupt the agent when it is busy: a single Ctrl+C now aborts the running agent turn (restoring queued messages to the editor), a running bash command, an active context compaction, or an auto-retry countdown — matching Escape and common CLI muscle memory. When idle, Ctrl+C keeps its previous behavior (first press clears the editor, a quick double-press exits), and the Ctrl+C immediately following an interrupt clears rather than exits. Escape remains the primary interrupt key.
72
+
73
+ ### Fixed
74
+
75
+ - Fixed a noticeable delay before the working spinner appeared after submitting a prompt: the interactive input loop now mounts the spinner immediately on submit (respecting extension `workingVisible` suppression) and yields once so it paints before prompt preflight — extension input hooks, template/skill expansion, auth and compaction checks, and deferred startup completion — runs. Previously the spinner was created only when the agent emitted `agent_start`, so the status row stayed empty during preflight, making Ctrl+C feel unresponsive until the spinner finally appeared. Submissions that resolve without starting an agent turn (e.g. extension slash-commands) clear the pre-shown spinner when idle so it never lingers.
76
+ - Fixed post-context-compaction provider requests so retained pre-compaction assistant usage is scrubbed from the provider-bound context clone. This keeps durable billing history intact while preventing stale high token counts from shrinking `max_output_tokens` to an invalid one-token budget on the first turn after compaction.
77
+ - Fixed auto-compaction continuation for OpenAI Responses providers by normalizing replayed `function_call.id` values to valid `fc_*` item identifiers while preserving `call_id` pairing. This prevents the opaque `400 {"code":"invalid_request_body"}` failure that could appear immediately after compaction even though a manual `Continue` message succeeded.
78
+ - Fixed auto-compaction stalling after a response reaches the maximum output-token limit: length-stopped assistant turns now compact as incomplete work, remove the truncated assistant from retry context, and automatically continue without requiring the user to type `Continue` ([#1662](https://github.com/bastani-inc/atomic/issues/1662)).
79
+ - Reduced Windows compiled-binary interactive cold-start latency by shipping release archives with a small launcher plus a sidecar app bundle instead of one monolithic executable, and by extending the deferred TUI fast path beyond extension module imports. Normal interactive TTY startup now paints and installs the input loop before bundled package/resource discovery scans skills, prompts, themes, context files, and system-prompt files. Deferred loading now uses async filesystem discovery and async file reads for package resources, skills, prompts, themes, and extension-discovered resources, with cooperative yields so Enter, Ctrl+C, rendering, and the normal prompt spinner remain responsive when a submitted prompt needs resources. Startup no longer shows a resource-loading spinner before the user submits a prompt; explicit resource flags, system-prompt inputs, unknown extension flags, model/provider selection, metadata commands, non-TTY modes, and unresolved project-trust prompts stay on the synchronous path.
80
+ - Fixed Windows compiled-binary keyboard responsiveness by avoiding invisible typeahead buffering in normal interactive startup, keeping terminal input attached to the visible editor, handling Ctrl+C globally with a SIGINT fallback, bounding Ctrl+C shutdown input draining to 250ms, and packaging the Windows console-mode helper used by the TUI for virtual-terminal input.
81
+ - Fixed the Anthropic subscription extra-usage warning racing ahead of the startup `RESOURCES` disclosure on the deferred TUI fast path: the warning is now held until after the resource summary line renders (at deferred-startup completion, agent-end disclosure flushes, or the post-prompt flush), so the `RESOURCES` line always appears first.
82
+ - Fixed deferred-startup TUI chat ordering so `RESOURCES`, changelog, update/package/tmux/subscription startup notices, and queued user prompts render in request order instead of completion order. Startup notices now use a stable block above session messages, queued inputs wait for their later `message_start`, and failed pre-prompt echoes are removed from the chat.
83
+ - Fixed Windows release archives to avoid Bun's `--bytecode` standalone executable startup crash and every runtime path that decodes the split-launcher sidecar's macOS build-machine `import.meta.url` on Windows. Windows binaries remain compiled standalone launchers but now ship the source payload instead of embedded bytecode until Bun's Windows bytecode-alignment fix is available. A centralized split-launcher helper (`ATOMIC_CODING_AGENT` + executable path detection) now resolves package assets, built-in package discovery, and — critically — the jiti resolution base next to `atomic.exe`, so the bundled built-in extensions (`mcp`, `web-access`, `intercom`, `cursor`, `workflows`, `subagents`) all load on Windows instead of failing with `File URL path must be an absolute path`.
84
+
85
+ ## [0.9.5-alpha.6] - 2026-07-06
86
+
87
+ ### Fixed
88
+
89
+ - Fixed deferred TUI extension loading so the editor keeps accepting and echoing keystrokes after first paint: startup now yields cooperatively between extension/resource-loading chunks, preserves text typed during completion, and safely queues Enter submissions made before the main prompt loop is ready.
90
+ - Fixed a warm-start TUI first-paint regression where persisted `enabledModels` or `--models` patterns forced all extensions to load synchronously before the first frame. Interactive startup now keeps the deferred-extension fast path and reapplies the model scope after extensions finish loading, preserving extension-registered provider matches and unmatched-pattern warnings without blocking paint.
91
+ - Fixed project trust prompts for bare projects that only create inert `.atomic/` or `.pi/` state: state-only directories such as `todos/` and `sessions/` no longer count as trust inputs or disable deferred extension startup, while trust-requiring config continues to prompt until the user makes an explicit persistent decision and implicit trust is persisted only by the `/reload` path.
92
+ - Fixed a security regression that could silently persist project trust at shutdown or deferred-startup completion after trust-requiring config appeared mid-session; Atomic now preserves the startup trust prompt unless the user explicitly saves a decision or the existing `/reload` implicit-trust flow applies.
93
+ - Fixed BOM-prefixed JSON state files being treated as parse failures: settings and project trust JSON readers now strip a leading UTF-8 BOM before parsing, so Windows-authored `settings.json` and `trust.json` files load the same as BOM-less files instead of silently ignoring user settings.
94
+ - Fixed the bundled workflows documentation to reflect that attached workflow stage chats render live `subagent` widgets for single, parallel, and chain calls, keep them live across attach/re-attach cycles, and let Ctrl+O expand live detail for every child. ([#1643](https://github.com/bastani-inc/atomic/issues/1643))
95
+ - Fixed a Windows `waitForChildProcess` exit-code race where the process-alive poll could report a fast-dying child as gone before Node emitted the real `exit` event, causing bash commands such as `exit 1` to be reported as successful with a fabricated exit code 0 ([#1647](https://github.com/bastani-inc/atomic/issues/1647)).
96
+
97
+ ## [0.9.5-alpha.5] - 2026-07-06
98
+
99
+ ### Added
100
+
101
+ - Added an internal tiered fallback ladder for automatic Verbatim Compaction when the strict `compression_ratio` target is not achievable: threshold and overflow auto-compaction now keep the standard strict planner pass as tier 1, tier 2 can accept a validated below-target result with at least one deletion when projected `tokensAfter` clears the relevant budget (`effectiveInputBudget - reserveTokens` for threshold, effective input budget for overflow), overflow commits from Atomic's internal ladder are gated on fitting the effective input budget even when the strict target is met, overflow-only tier 3 reruns the planner with critical LRU-style protected-entry eligibility for stale task-bearing user/custom/branch-summary context and an effective recent floor of `max(preserve_recent, 5)` across all compactable entries, and overflow-only tier 4 performs deterministic code-level LRU eviction without a model call or API credentials while enforcing the same effective last-5 recent floor until the effective input budget fits or no more safe deletion remains. The fallback tiers remain internal: extension hooks keep their existing shapes, extension-provided deletion requests still bypass the ladder including the overflow budget gate, and no public compaction mode API is exposed.
102
+ - Added hard iteration caps to compaction recovery loops: planner provider turns are capped at 50 per planner run (including tool-call turns), planner nudge follow-ups are capped at 50 per planner run, and deterministic overflow eviction is capped at 50 passes, so compaction cannot spin indefinitely and terminal failures report the achieved reduction, deletion count, projected `tokensAfter`, and budget.
103
+
104
+ ### Fixed
105
+
106
+ - Fixed overflow auto-compaction silently no-oping when planner authentication was unavailable or when the current branch has no preparable compactable transcript: overflow recovery now either skips model tiers and runs deterministic no-auth LRU eviction directly through the existing validation pipeline, or surfaces a terminal error that nothing more was safely deletable.
107
+ - Fixed feasible partial compaction results being discarded solely because they missed the strict ratio target: automatic threshold and overflow compaction now commit validated below-target deletions when their projected `tokensAfter` clears the trigger/budget boundary, including partial deletion state salvaged after a provider context-overflow error.
108
+
109
+ ## [0.9.5-alpha.4] - 2026-07-05
110
+
111
+ ### Changed
112
+
113
+ - Simplified first-run onboarding to a one-time verifiable-coding-agent-runtime explanation shown after any What's New notes and directly above the normal input box; Atomic no longer intercepts pasted tasks, saves pre-login seeds, routes first-run input to `goal`/`ralph`, raises reasoning for onboarding, or requires `/chat` to continue normally. The notice now reminds unauthenticated users to run `/login` first, and starting a new session with `/new` clears any rendered first-run notice state from the previous session canvas.
114
+
115
+ ## [0.9.5-alpha.3] - 2026-07-04
116
+
117
+ ### Changed
118
+
119
+ - Hardened the bundled workflows extension's workflow-tool prompt guidance against inline analysis-paralysis drift: the agent must now decide and state the inline-vs-workflow execution mode before its first tool call (reconnaissance explicitly counts as inline execution), budget pre-workflow scoping to a few quick reads that only sharpen the objective and validation criteria, course-correct after roughly ten deliverable-free exploration tool calls (or repeated "let me verify one more thing" loops) by writing findings to a context file and handing off to the best-fit workflow via `reads` (named or user-defined workflows discovered with `action: "list"` first, builtin `goal`/`ralph` as fallbacks when nothing more specific fits), and treat sunk inline research as transferable via files rather than a reason to stay inline. The same "Decide before you explore" and "Course-correct instead of drifting" guidance is mirrored in `docs/workflows.md` under "When to Use Workflows".
120
+
121
+ ## [0.9.5-alpha.2] - 2026-07-04
122
+
123
+ ### Changed
124
+
125
+ - Refreshed the July 2026 builtin workflow and subagent frontier model rosters bundled with Atomic: high-capacity synthesis, planning, debugging, and review paths now lead or fall back through Claude Fable 5 `:xhigh`, GPT-5.5 `:xhigh`, Opus 4.8 long-context `:xhigh`, GLM-5.2, and the valid OpenRouter Fugu Ultra mirror while keeping dominated or unsupported model IDs out of shipped chains.
126
+
127
+ ## [0.9.5-alpha.1] - 2026-07-04
128
+
129
+ ### Breaking Changes
130
+
131
+ - Hardened the builtin `goal` and `ralph` review contracts against objective-drift failures: review findings now require `objective_alignment`, Goal and Ralph review decisions require `requirements_traceability`, and reviewer approval rejects empty or non-proven traceability. Consumers that parse or synthesize these structured reviewer outputs must emit the new required fields.
132
+
133
+ ### Added
134
+
135
+ - Added immutable `acceptance_criteria` to the builtin `goal` and `ralph` workflows. Goal persists it in the ledger/model-visible projection and final reports; Ralph threads it through research, orchestrator, and reviewer prompts next to the literal objective contract. Orchestrators should pass the original task text when launching follow-up Goal or Ralph runs from reviewer findings.
136
+ - Added literal-contract prompt language shared by `goal` and `ralph`, objective-alignment arbitration for reviewer findings, non-blocking treatment for `beyond_objective`/`contradicts_objective` findings, and clause-by-clause requirements traceability so reviewer evidence must map directly back to the objective/acceptance criteria.
137
+ - Added attempt-first E2E guidance for `goal` and `ralph`: workers/reviewers must not skip playwright-cli/tmux validation because credentials or auth are merely assumed missing, and skipped E2E must cite the exact attempted commands and observed failure output.
138
+
5
139
  ## [0.9.4] - 2026-07-03
6
140
 
7
141
  ### Added
@@ -547,8 +681,8 @@
547
681
  - Fixed provider auth-status reporting for explicit `$ENV_VAR` config values, preserved uppercase literal credentials during config-value migrations (including legacy `~/.pi/agent` roots), preserved `models.json` JSONC comments/formatting during migration, and accepted the upstream `supportsDeveloperRole` flag for custom OpenAI Responses models.
548
682
  - Fixed RPC client requests to reject promptly when the child agent process exits or its stdio fails, completed the RPC-mode output/backpressure and `excludeFromContext` bash-command port, and preserved steering/follow-up queue modes across extension-triggered RPC session reloads.
549
683
  - Fixed SDK provider stream options so HTTP idle timeouts and WebSocket connect timeouts from settings are forwarded to provider streams while preserving per-request overrides.
550
- - Fixed interactive startup input handling so prompts submitted before the main input loop is installed are queued instead of dropped, and fixed signal-triggered shutdown ordering so extension `session_shutdown` cleanup runs before terminal restore writes.
551
- - Fixed the initial `--resume` session picker and all-sessions pane to honor a custom `--session-dir`.
684
+ - Fixed interactive startup input handling so prompts submitted before the main input loop is installed are queued instead of dropped, captured command-like and ordinary startup submissions replay in original input order without later prompts leapfrogging earlier commands, prompts typed behind an active startup command stay behind that command even while a prior prompt is streaming, and pre-session selectors or confirmations such as `--resume` and cross-project `--session` no longer leak typed text into chat input.
685
+ - Fixed the initial `--resume` session picker and all-sessions pane to honor a custom `--session-dir`, and fixed signal-triggered shutdown ordering so extension `session_shutdown` cleanup runs before terminal restore writes.
552
686
  - Fixed plain metadata commands (`--version`, `--help`, `--list-models`) to keep their output on stdout for scripts/completions while keeping auto-install/startup chatter off stdout.
553
687
  - Fixed OAuth login dialog prompt/manual input rendering so submitted values remain stable, auth storage writes to consistently use `0600` file mode, and self-update command generation to bypass package-manager minimum-release-age delays.
554
688
  - Fixed changelog link normalization to produce Atomic repository/tag-pinned links from local package links and legacy pi-mono URLs, wired into startup and `/changelog` output.
package/README.md CHANGED
@@ -517,7 +517,7 @@ cat README.md | atomic -p "Summarize this text"
517
517
  | `--provider <name>` | Provider (anthropic, openai, google, etc.) |
518
518
  | `--model <pattern>` | Model pattern or ID (supports `provider/id` and optional `:<thinking>`) |
519
519
  | `--api-key <key>` | API key (overrides env vars) |
520
- | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh` |
520
+ | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` (subject to model capabilities) |
521
521
  | `--models <patterns>` | Comma-separated patterns for CTRL+P cycling |
522
522
  | `--list-models [search]` | List available models |
523
523
 
@@ -528,7 +528,7 @@ cat README.md | atomic -p "Summarize this text"
528
528
  | `-c`, `--continue` | Continue most recent session |
529
529
  | `-r`, `--resume` | Browse and select session |
530
530
  | `--session <path\|id>` | Use specific session file or partial UUID |
531
- | `--session-id <id>` | Use an exact project session ID, creating it if missing |
531
+ | `--session-id <id>` | Use an exact project session ID; warn and create it when missing |
532
532
  | `--fork <path\|id>` | Fork specific session file or partial UUID into a new session |
533
533
  | `--session-dir <dir>` | Custom session storage directory |
534
534
  | `--name <name>`, `-n <name>` | Set the session display name |
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.5-alpha.10] - 2026-07-11
6
+
7
+ ### Changed
8
+
9
+ - Aligned the Cursor provider dependency with upstream `pi-ai` `^0.80.6` and mapped the new `max` thinking level to Cursor's advertised effort variants while preserving per-model capability filtering ([#1703](https://github.com/bastani-inc/atomic/issues/1703)).
10
+
5
11
  ## [0.9.4] - 2026-07-03
6
12
 
7
13
  ### Changed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/cursor",
3
- "version": "0.9.4",
3
+ "version": "0.9.5-alpha.10",
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,8 +40,8 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@bastani/atomic-natives": "0.9.4",
43
+ "@bastani/atomic-natives": "0.9.5-alpha.10",
44
44
  "@bufbuild/protobuf": "^2.12.1",
45
- "@earendil-works/pi-ai": "^0.80.3"
45
+ "@earendil-works/pi-ai": "^0.80.6"
46
46
  }
47
47
  }
@@ -61,13 +61,14 @@ interface CursorVariantGroup {
61
61
  const CURSOR_FALLBACK_RAW_MODELS = rawFallbackModels satisfies readonly CursorUsableModel[];
62
62
  const PARSEABLE_EFFORTS: readonly Exclude<CursorEffort, "default">[] = ["none", "low", "medium", "high", "xhigh", "max"];
63
63
  const EFFORT_ORDER: readonly CursorEffort[] = ["none", "low", "default", "medium", "high", "xhigh", "max"];
64
- const THINKING_LEVELS: readonly ThinkingLevel[] = ["minimal", "low", "medium", "high", "xhigh"];
64
+ const THINKING_LEVELS: readonly ThinkingLevel[] = ["minimal", "low", "medium", "high", "xhigh", "max"];
65
65
  const THINKING_LEVEL_EFFORT_PREFERENCES: Record<ThinkingLevel, readonly CursorEffort[]> = {
66
66
  minimal: ["none", "low", "default"],
67
67
  low: ["low", "none", "default"],
68
68
  medium: ["medium", "default", "low"],
69
69
  high: ["high", "medium", "default"],
70
70
  xhigh: ["max", "xhigh"],
71
+ max: ["max"],
71
72
  };
72
73
 
73
74
  const ESTIMATED_CONTEXT_WINDOW = 200_000;
@@ -277,7 +278,7 @@ function buildCursorThinkingLevelMap(group: CursorVariantGroup, effortVariants:
277
278
  // minimal/least-effort variant because `off` means minimum reasoning.
278
279
  const hasRealBaseId = group.variants.some((variant) => variant.id === group.primaryId);
279
280
  if (!hasRealBaseId) {
280
- const defaultVariant = map.minimal ?? map.low ?? map.medium ?? map.high ?? map.xhigh ?? null;
281
+ const defaultVariant = map.minimal ?? map.low ?? map.medium ?? map.high ?? map.xhigh ?? map.max ?? null;
281
282
  if (defaultVariant) map.off = defaultVariant;
282
283
  }
283
284
  return map;
@@ -289,8 +290,10 @@ function buildThinkingLevelMap(effortVariants: ReadonlyMap<CursorEffort, string>
289
290
  low: chooseEffortVariant(effortVariants, THINKING_LEVEL_EFFORT_PREFERENCES.low, primaryId),
290
291
  medium: chooseEffortVariant(effortVariants, THINKING_LEVEL_EFFORT_PREFERENCES.medium, primaryId),
291
292
  high: chooseEffortVariant(effortVariants, THINKING_LEVEL_EFFORT_PREFERENCES.high, primaryId),
292
- // `xhigh` should only be offered when Cursor advertises a true xhigh/max variant.
293
+ // `xhigh` can use Cursor's strongest advertised xhigh/max variant, while
294
+ // `max` is distinct and must not be synthesized from an xhigh-only group.
293
295
  xhigh: chooseCursorXhighVariant(effortVariants),
296
+ max: effortVariants.get("max") ?? null,
294
297
  };
295
298
  }
296
299
 
@@ -4,6 +4,37 @@ All notable changes to the `pi-intercom` extension will be documented in this fi
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.5-alpha.10] - 2026-07-11
8
+
9
+ ### Changed
10
+
11
+ - Aligned the intercom extension peer dependency with upstream `pi-tui` `^0.80.6` as part of the consolidated Pi sync; no intercom source behavior changed ([#1703](https://github.com/bastani-inc/atomic/issues/1703)).
12
+
13
+ ### Fixed
14
+
15
+ - Made lazy Intercom lifecycle replay generation-safe, session-leased, and serialized with live lifecycle forwarding, so matching end events and newer model selections cannot be overtaken by a blocked stale replay. Shutdown waits for retired replay/initializer cleanup before replacement, calls spanning teardown reject, and failed or invalidated attempts cannot leak stale resources.
16
+ - Recover from rejected lazy and delegated-child background initialization and later-generation session replay; later callers retry before executing, and concurrent retries share one initialization or replay attempt while normal sessions remain lazy.
17
+ - Made acknowledged subagent result delivery idempotent end to end: lazy initialization failure and retired relay generations emit definitive negative acknowledgements, stable completion request IDs become broker message IDs, concurrent identical client sends coalesce onto one attempt, and a bounded TTL cache confirms identical successful retries without forwarding twice. Canonical target/payload/options signatures reject conflicting ID reuse even after success and across sender sessions, while transport attempt IDs and timestamps remain retry-insensitive. Brokers reject malformed present attempt IDs instead of unsafely downgrading them, and clients accept attempt-less legacy responses only for an ID's original active generation so a delayed legacy acknowledgement cannot settle a timeout/disconnect replacement.
18
+ - Fixed foreground `intercom.ask`, `intercom.send`, and supervisor coordination to use an exact-owner probe/reservation plus an acknowledged, generation-scoped detach commit before model-visible steering delivery. This breaks parent/child ask deadlocks, promptly releases supervision for fire-and-forget progress/send, preserves threaded decision replies, leaves unmatched/background messages queued until idle, and prevents orphaned, stale, or duplicate delivery after cancellation or replacement. Interactive parents now await lazy Intercom broker/inbound-handler initialization before a foreground child launches ([#1727](https://github.com/bastani-inc/atomic/issues/1727)).
19
+ - Register bridged foreground/background children with Intercom before agent work begins and gate interactive foreground launches on lazy parent broker readiness, while preserving single-flight heavy loading, replacement/shutdown cleanup, and no startup work for unused parents, disabled sessions, or definition/control-only subagent actions. Optional import/broker/connection failures diagnose and degrade without aborting parent or child launch, while later calls retain retry behavior. Adapted from `nicobailon/pi-intercom` commits `3cb5b9c`, `02a6897`, and `9f23b97` while retaining Atomic's lazy proxy and issue #1727 detach protocol.
20
+
21
+ ## [0.9.5-alpha.8] - 2026-07-08
22
+
23
+ ### Added
24
+
25
+ - Added preferred `atomic` package manifest metadata alongside the legacy `pi` manifest metadata so Atomic package discovery uses Atomic-branded metadata without breaking pi-compatible installs.
26
+
27
+ ### Changed
28
+
29
+ - Updated intercom documentation to describe Atomic's `~/.atomic/agent/intercom/` primary config/runtime path and legacy `~/.pi/agent/intercom/` fallback.
30
+ - Updated the registered intercom tool description and prompt snippet to use Atomic/Pi-neutral local agent session wording instead of hard-coding Pi-branded session names in model-visible text.
31
+
32
+ ### Fixed
33
+
34
+ - Fixed Atomic intercom broker runtime paths to derive from the active Atomic agent directory, so `ATOMIC_CODING_AGENT_DIR` moves the broker socket, PID, spawn lock, and Windows launcher together while the legacy `PI_CODING_AGENT_DIR` alias remains supported.
35
+ - Fixed raw TypeScript intercom imports to use the bundled `@earendil-works/pi-tui` package name, matching Atomic's runtime dependency while preserving the public intercom API.
36
+ - Hardened default intercom broker startup so the pi-compatible `npx --no-install tsx` sentinel launches through the current runtime (`process.execPath`): Node-based installs use a resolved `tsx` CLI with a bundled `jiti` fallback, Bun source-checkout runs use the current Bun executable directly, and standalone Atomic Bun binaries re-enter the split launcher through a narrow internal broker handoff instead of treating the Atomic executable as a generic Bun interpreter; explicit custom `brokerCommand`/`brokerArgs` configs remain pass-through overrides.
37
+
7
38
  ## [0.9.4] - 2026-07-03
8
39
 
9
40
  ### Changed
@@ -2,9 +2,9 @@
2
2
  <img src="banner.png" alt="pi-intercom" width="1100">
3
3
  </p>
4
4
 
5
- # Pi Intercom
5
+ # Pi / Atomic Intercom
6
6
 
7
- Direct 1:1 messaging between pi sessions on the same machine. Send context, findings, or requests from one session to another — whether you're driving the conversation or letting agents coordinate.
7
+ Direct 1:1 messaging between Atomic or pi sessions on the same machine. Send context, findings, or requests from one session to another — whether you're driving the conversation or letting agents coordinate.
8
8
 
9
9
  ```text
10
10
  User flow: ALT+M or run /intercom to pick a session and send a message
@@ -12,51 +12,53 @@ User flow: ALT+M or run /intercom to pick a session and send a message
12
12
 
13
13
  ## Why
14
14
 
15
- Sometimes you're running multiple pi sessions — one researching, one executing, one reviewing. Pi-intercom lets you:
15
+ Sometimes you're running multiple Atomic/pi sessions — one researching, one executing, one reviewing. Intercom lets you:
16
16
 
17
17
  - **User-driven orchestration** — Send context or findings from your research session to your execution session
18
18
  - **Agent collaboration** — An agent can reach out to another session when it needs help or wants to share results
19
- - **Session awareness** — See what other pi sessions are running and their current status
19
+ - **Session awareness** — See what other Atomic/pi sessions are running and their current status
20
20
 
21
- Unlike pi-messenger (a shared chat room for multi-agent swarms), pi-intercom is for targeted 1:1 communication where you pick the recipient.
21
+ Unlike pi-messenger (a shared chat room for multi-agent swarms), intercom is for targeted 1:1 communication where you pick the recipient.
22
22
 
23
- Pi-intercom also integrates well with [pi-subagents](https://github.com/nicobailon/pi-subagents): delegated child agents get a child-only `contact_supervisor` tool when `pi-subagents` supplies bridge metadata. Use `reason: "need_decision"` for blocking clarification, `reason: "interview_request"` for multiple structured supervisor answers, and `reason: "progress_update"` for meaningful plan-changing updates. Normal sessions only see the regular `intercom` tool.
23
+ Intercom also integrates with delegated subagents: child agents get a child-only `contact_supervisor` tool when subagent bridge metadata is present. Atomic-prefixed bridge environment variables are supported, and legacy `PI_*` bridge metadata remains compatible. Use `reason: "need_decision"` for blocking clarification, `reason: "interview_request"` for multiple structured supervisor answers, and `reason: "progress_update"` for meaningful plan-changing updates. Normal sessions only see the regular `intercom` tool.
24
24
 
25
25
  ## In One Minute
26
26
 
27
- Each pi session that has `pi-intercom` loaded and enabled connects to a tiny local broker over a local IPC transport. The broker keeps track of connected sessions and routes direct messages to the one you target by name or session ID. The extension gives you both a tool (`intercom`) and a small overlay UI (`/intercom` or `ALT+M`). Incoming messages are rendered inline inside the recipient session, can trigger a turn immediately, and are also stored in Pi session history as extension entries.
27
+ Interactive parents lazily connect to the tiny local broker when an Intercom tool is used or immediately before a foreground child launches; the launch waits for inbound handlers and broker readiness so child coordination is available from its first turn. Delegated foreground and background children with supervisor bridge metadata register before agent work begins. The lightweight extension avoids importing the heavy runtime for unused parent sessions, disabled sessions, and noninteractive management-only work, and concurrent tool callers share one import and connection attempt. Definition/control-only subagent actions (`list`, `get`, `create`, `update`, `delete`, `status`, `interrupt`, and `doctor`) do not warm Intercom; `resume` may relaunch or contact a child and therefore retains readiness gating. If optional Intercom import, broker startup, or connection fails, the parent or child session continues with a diagnostic and later calls may retry. Lazy broker state is leased to the active session generation and cleaned up on shutdown or replacement.
28
28
 
29
29
  ## Install
30
30
 
31
+ Atomic bundles `@bastani/intercom` as a first-party extension; no separate install is needed for normal Atomic sessions. For legacy pi installations of the upstream package:
32
+
31
33
  ```bash
32
34
  pi install npm:pi-intercom
33
35
  ```
34
36
 
35
- Then restart Pi. The extension auto-connects to the broker on startup and registers the bundled `pi-intercom` skill for common coordination patterns.
37
+ Then restart Atomic or Pi. The extension registers the bundled `intercom` skill at startup. Interactive parents connect lazily on Intercom use or foreground-child launch, while bridged children connect before agent work begins; disabled sessions and noninteractive management-only operations do not load the heavy runtime or start the broker.
36
38
 
37
39
  **Recommended:** Add this snippet to your project's `AGENTS.md` to help agents understand when to coordinate across sessions:
38
40
 
39
41
  ```xml
40
- <pi-intercom>
41
- Coordinate with other local pi sessions on related codebases. Use `/skill:pi-intercom` for patterns.
42
+ <intercom>
43
+ Coordinate with other local Atomic/pi sessions on related codebases. Use `/skill:intercom` for patterns.
42
44
 
43
45
  **When:** Same codebase (parallel work), reference codebase (consulting patterns), related repos (shared libraries).
44
46
 
45
47
  **Not when:** Unrelated codebases, trivial questions, or when you can proceed independently.
46
48
 
47
49
  **Principle:** Prefer `send` for notifications; `ask` only when blocked waiting for input.
48
- </pi-intercom>
50
+ </intercom>
49
51
  ```
50
52
 
51
53
  A session becomes intercom-connected when all of these are true:
52
- - the `pi-intercom` extension is installed and loaded in that session
53
- - `enabled` is not set to `false` in `~/.pi/agent/intercom/config.json`
54
+ - the intercom extension is installed/bundled and loaded in that session
55
+ - `enabled` is not set to `false` in `~/.atomic/agent/intercom/config.json` (Atomic) or the legacy `~/.pi/agent/intercom/config.json` fallback
54
56
  - the session has started or reloaded after the extension was installed
55
57
  - the local broker is running or can be auto-started
56
58
 
57
59
  The session list only shows intercom-connected sessions, not every open Pi process on the machine.
58
60
 
59
- If a session is unnamed, pi-intercom now exposes a runtime-only fallback alias like `subagent-chat-1a2b3c4d` so other sessions can still target it. That alias is not persisted as the Pi session title, so `pi --resume` can keep showing the transcript snippet instead of a generic `session-...` name.
61
+ If a session is unnamed, intercom exposes a runtime-only fallback alias like `subagent-chat-1a2b3c4d` so other sessions can still target it. That alias is not persisted as the session title, so resume pickers can keep showing the transcript snippet instead of a generic `session-...` name.
60
62
 
61
63
  ## Quick Start
62
64
 
@@ -239,6 +241,8 @@ If any are missing, the session falls back to the regular `intercom` tool.
239
241
 
240
242
  Do not use `contact_supervisor` for routine completion handoffs. Return the final subagent result normally through `pi-subagents`.
241
243
 
244
+ During a foreground subagent run, Atomic probes for an exact live foreground owner before delivery. The matching child reserves the request, accepts a generation-scoped detach commit, and acknowledges the commit before asks, sends, decisions, interviews, and progress updates enter the parent's model-visible steering queue. Blocking calls remain alive until the parent sends the exact threaded reply; fire-and-forget calls create no reply waiter. Background and unmatched messages keep their queued-until-idle behavior, and cancellation/replacement invalidates stale handshakes.
245
+
242
246
  ### Example: Blocked Subagent Asks for Guidance
243
247
 
244
248
  ```typescript
@@ -359,7 +363,7 @@ Only registered in sessions where `pi-subagents` supplied the required child bri
359
363
 
360
364
  ## Config
361
365
 
362
- Create `~/.pi/agent/intercom/config.json`:
366
+ Create `~/.atomic/agent/intercom/config.json` for Atomic. Legacy pi-compatible installs and fallbacks continue to read `~/.pi/agent/intercom/config.json` when the Atomic config is absent:
363
367
 
364
368
  ```json
365
369
  {
@@ -372,16 +376,18 @@ Create `~/.pi/agent/intercom/config.json`:
372
376
  }
373
377
  ```
374
378
 
379
+ The default `npx --no-install tsx` pair is a compatibility sentinel: intercom recognizes it and starts the broker through the current Atomic/Pi runtime (`process.execPath`). Node-based installs use that runtime with a resolved `tsx` CLI, falling back to Atomic's bundled `jiti` loader when `tsx` is unavailable; Bun source-checkout runs use the current Bun executable directly; standalone Atomic Bun binaries re-enter the split launcher through a narrow internal broker handoff. Default startup therefore does not rely on `npx`, `tsx`, or `bun` being on `PATH`.
380
+
375
381
  | Setting | Default | Description |
376
382
  |---------|---------|-------------|
377
- | `brokerCommand` | `"npx"` | Command used to start the local broker process |
383
+ | `brokerCommand` | `"npx"` | Command used to start the local broker process; the default sentinel is hardened internally to avoid PATH lookup |
378
384
  | `brokerArgs` | `["--no-install", "tsx"]` | Arguments passed to `brokerCommand` before the broker script path |
379
385
  | `confirmSend` | false | Show a confirmation dialog before non-reply sends from an interactive session with UI |
380
386
  | `enabled` | true | Enable/disable intercom entirely |
381
387
  | `replyHint` | true | Include reply instruction in incoming messages |
382
388
  | `status` | — | Optional custom status suffix shown after the automatic lifecycle status, for example `thinking · researching` |
383
389
 
384
- For example, if you have Bun installed and want it to start the broker directly, use:
390
+ Existing pi-compatible configs that set a custom broker command still work. For example, if you intentionally want to use Bun from `PATH`, configure it explicitly:
385
391
 
386
392
  ```json
387
393
  {
@@ -390,13 +396,13 @@ For example, if you have Bun installed and want it to start the broker directly,
390
396
  }
391
397
  ```
392
398
 
393
- Pi-intercom publishes live session status automatically. Sessions register as `idle`, switch to `thinking` while the agent is running, show `tool:<name>` during tool execution, and return to `idle` on agent completion. If `status` is set in config, it is appended as context instead of replacing the lifecycle status.
399
+ Intercom publishes live session status automatically. Sessions register as `idle`, switch to `thinking` while the agent is running, show `tool:<name>` during tool execution, and return to `idle` on agent completion. If `status` is set in config, it is appended as context instead of replacing the lifecycle status.
394
400
 
395
401
  ## How It Works
396
402
 
397
403
  ```mermaid
398
404
  graph TB
399
- subgraph A["Pi Session A"]
405
+ subgraph A["Atomic/Pi Session A"]
400
406
  A1[Intercom Client]
401
407
  A2[intercom tool]
402
408
  A3[UI overlays]
@@ -407,7 +413,7 @@ graph TB
407
413
  B2[Message Router]
408
414
  end
409
415
 
410
- subgraph B["Pi Session B"]
416
+ subgraph B["Atomic/Pi Session B"]
411
417
  B3[Intercom Client]
412
418
  B4[intercom tool]
413
419
  B5[UI overlays]
@@ -424,10 +430,12 @@ Messages use length-prefixed JSON over a local socket/pipe transport (4-byte len
424
430
 
425
431
  Async extension work (startup, inbound flushes, reconnects, overlays, and relays) no-ops if the session shuts down or reloads before it settles.
426
432
 
427
- Runtime files live at `~/.pi/agent/intercom/`:
433
+ Runtime files live under the active agent directory. Atomic defaults to `~/.atomic/agent/intercom/`; setting `ATOMIC_CODING_AGENT_DIR` moves the broker socket, PID, spawn lock, Windows launcher, and config below that directory. The legacy `PI_CODING_AGENT_DIR` alias remains supported when the Atomic variable is unset. Legacy pi-compatible defaults use `~/.pi/agent/intercom/`.
434
+
428
435
  - `broker.sock` — Unix domain socket for communication (macOS/Linux only; Windows uses a named pipe instead)
429
436
  - `broker-launch.vbs` — Windows helper script used to launch the broker without a console window
430
437
  - `broker.pid` — Broker process ID
438
+ - `broker.spawn.lock` — Short-lived lock used to avoid duplicate auto-spawns
431
439
  - `config.json` — User configuration
432
440
 
433
441
  ## Design Decisions