@bastani/atomic 0.9.11-alpha.9 → 0.9.12-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/CHANGELOG.md +147 -0
  2. package/README.md +1 -1
  3. package/dist/builtin/intercom/CHANGELOG.md +12 -0
  4. package/dist/builtin/intercom/closed-workflow-stage-message.ts +1 -1
  5. package/dist/builtin/intercom/contact-supervisor-tool.ts +1 -1
  6. package/dist/builtin/intercom/index-heavy.ts +2 -2
  7. package/dist/builtin/intercom/intercom-tool.ts +2 -2
  8. package/dist/builtin/intercom/intercom-utils.ts +1 -1
  9. package/dist/builtin/intercom/lifecycle.ts +2 -2
  10. package/dist/builtin/intercom/overlay.ts +2 -2
  11. package/dist/builtin/intercom/package.json +1 -1
  12. package/dist/builtin/intercom/reply-tracker.ts +1 -1
  13. package/dist/builtin/intercom/subagent-relay.ts +10 -7
  14. package/dist/builtin/mcp/CHANGELOG.md +16 -0
  15. package/dist/builtin/mcp/apps-cancellation.ts +1 -1
  16. package/dist/builtin/mcp/commands.ts +7 -7
  17. package/dist/builtin/mcp/direct-tool-executor.ts +1 -1
  18. package/dist/builtin/mcp/direct-tools.ts +3 -3
  19. package/dist/builtin/mcp/host-html-template.ts +1 -1
  20. package/dist/builtin/mcp/index.ts +3 -3
  21. package/dist/builtin/mcp/init.ts +6 -6
  22. package/dist/builtin/mcp/mcp-auth-flow.ts +1 -1
  23. package/dist/builtin/mcp/mcp-callback-server.ts +1 -1
  24. package/dist/builtin/mcp/mcp-panel-state.ts +1 -1
  25. package/dist/builtin/mcp/mcp-panel.ts +1 -1
  26. package/dist/builtin/mcp/metadata-cache.ts +1 -1
  27. package/dist/builtin/mcp/package.json +1 -1
  28. package/dist/builtin/mcp/proxy-call.ts +2 -2
  29. package/dist/builtin/mcp/proxy-info-modes.ts +2 -2
  30. package/dist/builtin/mcp/sampling-handler.ts +1 -1
  31. package/dist/builtin/mcp/server-manager.ts +3 -3
  32. package/dist/builtin/mcp/startup-warmup.ts +5 -5
  33. package/dist/builtin/mcp/state.ts +1 -1
  34. package/dist/builtin/mcp/tool-call-timeout.ts +1 -1
  35. package/dist/builtin/mcp/tool-metadata.ts +2 -2
  36. package/dist/builtin/mcp/types.ts +1 -1
  37. package/dist/builtin/mcp/ui-server.ts +4 -4
  38. package/dist/builtin/mcp/ui-session.ts +3 -3
  39. package/dist/builtin/subagents/CHANGELOG.md +26 -0
  40. package/dist/builtin/subagents/agents/code-simplifier.md +2 -2
  41. package/dist/builtin/subagents/agents/codebase-analyzer.md +2 -2
  42. package/dist/builtin/subagents/agents/codebase-locator.md +2 -2
  43. package/dist/builtin/subagents/agents/codebase-online-researcher.md +2 -2
  44. package/dist/builtin/subagents/agents/codebase-pattern-finder.md +2 -2
  45. package/dist/builtin/subagents/agents/codebase-research-analyzer.md +2 -2
  46. package/dist/builtin/subagents/agents/codebase-research-locator.md +2 -2
  47. package/dist/builtin/subagents/agents/worker.md +2 -2
  48. package/dist/builtin/subagents/package.json +1 -1
  49. package/dist/builtin/subagents/src/extension/notification-content.ts +14 -9
  50. package/dist/builtin/subagents/src/runs/background/notify.ts +20 -4
  51. package/dist/builtin/subagents/src/runs/background/result-delivery-processor.ts +5 -5
  52. package/dist/builtin/subagents/src/runs/background/result-file-claims.ts +1 -1
  53. package/dist/builtin/subagents/src/runs/background/result-status.ts +2 -2
  54. package/dist/builtin/subagents/src/runs/background/result-watcher-data.ts +2 -2
  55. package/dist/builtin/subagents/src/runs/background/result-watcher.ts +1 -1
  56. package/dist/builtin/subagents/src/runs/foreground/execution-detach-reservations.ts +1 -1
  57. package/dist/builtin/subagents/src/shared/artifacts.ts +1 -1
  58. package/dist/builtin/web-access/CHANGELOG.md +26 -0
  59. package/dist/builtin/web-access/content-tools.ts +1 -0
  60. package/dist/builtin/web-access/flat-string.ts +37 -0
  61. package/dist/builtin/web-access/github-api.ts +2 -1
  62. package/dist/builtin/web-access/github-extract.ts +3 -2
  63. package/dist/builtin/web-access/index-heavy.ts +1 -1
  64. package/dist/builtin/web-access/package.json +2 -2
  65. package/dist/builtin/workflows/CHANGELOG.md +68 -0
  66. package/dist/builtin/workflows/README.md +1 -1
  67. package/dist/builtin/workflows/builtin/goal-ledger.ts +6 -4
  68. package/dist/builtin/workflows/builtin/goal-prompts.ts +4 -1
  69. package/dist/builtin/workflows/builtin/goal-runner.ts +2 -1
  70. package/dist/builtin/workflows/builtin/goal.ts +1 -1
  71. package/dist/builtin/workflows/builtin/ralph-core.ts +15 -13
  72. package/dist/builtin/workflows/builtin/ralph-forked-prompts.ts +7 -6
  73. package/dist/builtin/workflows/builtin/ralph-models.ts +4 -4
  74. package/dist/builtin/workflows/builtin/ralph-reviewer-prompt.ts +2 -1
  75. package/dist/builtin/workflows/builtin/ralph-runner.ts +7 -9
  76. package/dist/builtin/workflows/builtin/ralph.ts +2 -1
  77. package/dist/builtin/workflows/builtin/shared-prompts.ts +34 -7
  78. package/dist/builtin/workflows/package.json +1 -1
  79. package/dist/builtin/workflows/src/authoring/keep-context.ts +46 -0
  80. package/dist/builtin/workflows/src/authoring.d.ts +11 -0
  81. package/dist/builtin/workflows/src/durable/completed-catalog.ts +14 -8
  82. package/dist/builtin/workflows/src/durable/completed-inspection.ts +10 -11
  83. package/dist/builtin/workflows/src/durable/resume-catalog.ts +1 -1
  84. package/dist/builtin/workflows/src/durable/resume-eligibility.ts +42 -0
  85. package/dist/builtin/workflows/src/durable/resume-runtime.ts +36 -37
  86. package/dist/builtin/workflows/src/durable/tool-primitive.ts +10 -2
  87. package/dist/builtin/workflows/src/engine/run.ts +1 -0
  88. package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +12 -8
  89. package/dist/builtin/workflows/src/extension/hil-answer-notifications.ts +5 -2
  90. package/dist/builtin/workflows/src/extension/index.bundle.mjs +2001 -897
  91. package/dist/builtin/workflows/src/extension/lifecycle-notifications.ts +6 -3
  92. package/dist/builtin/workflows/src/extension/postmortem-deps.ts +3 -2
  93. package/dist/builtin/workflows/src/extension/render-result.ts +4 -11
  94. package/dist/builtin/workflows/src/extension/runtime-durable-resume.ts +17 -20
  95. package/dist/builtin/workflows/src/extension/runtime.ts +3 -3
  96. package/dist/builtin/workflows/src/extension/workflow-command-completions.ts +1 -1
  97. package/dist/builtin/workflows/src/extension/workflow-command-registration.ts +3 -7
  98. package/dist/builtin/workflows/src/extension/workflow-durable-resume-command.ts +21 -24
  99. package/dist/builtin/workflows/src/extension/workflow-prompts.ts +4 -0
  100. package/dist/builtin/workflows/src/extension/workflow-resume-picker-rows.ts +38 -26
  101. package/dist/builtin/workflows/src/extension/workflow-resume-shadow.ts +2 -1
  102. package/dist/builtin/workflows/src/extension/workflow-run-control-command.ts +56 -64
  103. package/dist/builtin/workflows/src/extension/workflow-schema.ts +2 -2
  104. package/dist/builtin/workflows/src/extension/workflow-status-summary.ts +0 -5
  105. package/dist/builtin/workflows/src/extension/workflow-targets.ts +17 -20
  106. package/dist/builtin/workflows/src/extension/workflow-tool-content.ts +1 -1
  107. package/dist/builtin/workflows/src/extension/workflow-tool-control.ts +24 -51
  108. package/dist/builtin/workflows/src/extension/workflow-tool-inspection.ts +7 -29
  109. package/dist/builtin/workflows/src/extension/workflow-tool-send.ts +5 -13
  110. package/dist/builtin/workflows/src/extension/workflow-tool.ts +4 -13
  111. package/dist/builtin/workflows/src/runs/background/quit.ts +4 -3
  112. package/dist/builtin/workflows/src/runs/background/run-inspect.ts +8 -8
  113. package/dist/builtin/workflows/src/runs/background/status.ts +2 -1
  114. package/dist/builtin/workflows/src/runs/background/workflow-lifecycle-aggregate.ts +2 -1
  115. package/dist/builtin/workflows/src/runs/foreground/executor-direct-helpers.ts +5 -5
  116. package/dist/builtin/workflows/src/runs/foreground/executor-lifecycle.ts +4 -0
  117. package/dist/builtin/workflows/src/runs/foreground/executor-scheduler.ts +2 -0
  118. package/dist/builtin/workflows/src/runs/foreground/executor-stage-call.ts +23 -8
  119. package/dist/builtin/workflows/src/runs/foreground/executor-stage-factory.ts +6 -2
  120. package/dist/builtin/workflows/src/runs/foreground/executor-task-prompts.ts +5 -0
  121. package/dist/builtin/workflows/src/runs/foreground/stage-runner-context.ts +56 -10
  122. package/dist/builtin/workflows/src/runs/foreground/stage-runner-controller.ts +6 -0
  123. package/dist/builtin/workflows/src/runs/foreground/stage-runner-output.ts +137 -6
  124. package/dist/builtin/workflows/src/sdk-surface.ts +1 -0
  125. package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +2 -0
  126. package/dist/builtin/workflows/src/shared/authoring-contract-ui.ts +2 -0
  127. package/dist/builtin/workflows/src/shared/expanded-workflow-graph.ts +159 -10
  128. package/dist/builtin/workflows/src/shared/flat-string.ts +33 -0
  129. package/dist/builtin/workflows/src/shared/graph-store-snapshot.ts +144 -0
  130. package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +2 -3
  131. package/dist/builtin/workflows/src/shared/run-id.ts +36 -0
  132. package/dist/builtin/workflows/src/shared/store-internal.ts +32 -3
  133. package/dist/builtin/workflows/src/shared/store-observation.ts +10 -0
  134. package/dist/builtin/workflows/src/shared/store-public-types.ts +8 -0
  135. package/dist/builtin/workflows/src/shared/store-run-methods.ts +14 -0
  136. package/dist/builtin/workflows/src/shared/store-types.ts +4 -0
  137. package/dist/builtin/workflows/src/shared/types.ts +2 -0
  138. package/dist/builtin/workflows/src/shared/workflow-artifacts.ts +261 -0
  139. package/dist/builtin/workflows/src/tui/dispatch-confirm.ts +39 -23
  140. package/dist/builtin/workflows/src/tui/graph-canvas.ts +26 -9
  141. package/dist/builtin/workflows/src/tui/graph-view-constants.ts +3 -0
  142. package/dist/builtin/workflows/src/tui/graph-view-graph-render.ts +95 -98
  143. package/dist/builtin/workflows/src/tui/graph-view-render.ts +7 -20
  144. package/dist/builtin/workflows/src/tui/graph-view-state.ts +160 -13
  145. package/dist/builtin/workflows/src/tui/layout.ts +8 -2
  146. package/dist/builtin/workflows/src/tui/node-card.ts +57 -45
  147. package/dist/builtin/workflows/src/tui/overlay-adapter.ts +4 -2
  148. package/dist/builtin/workflows/src/tui/prompt-card-render.ts +291 -21
  149. package/dist/builtin/workflows/src/tui/prompt-card.ts +1 -1
  150. package/dist/builtin/workflows/src/tui/renderers.ts +0 -1
  151. package/dist/builtin/workflows/src/tui/run-detail.ts +52 -35
  152. package/dist/builtin/workflows/src/tui/run-identity-rows.ts +97 -0
  153. package/dist/builtin/workflows/src/tui/session-overlays.ts +24 -3
  154. package/dist/builtin/workflows/src/tui/session-picker.ts +94 -41
  155. package/dist/builtin/workflows/src/tui/stage-chat-view-archive-history.ts +190 -26
  156. package/dist/builtin/workflows/src/tui/stage-chat-view-footer-status.ts +52 -18
  157. package/dist/builtin/workflows/src/tui/stage-chat-view-input.ts +9 -5
  158. package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +44 -4
  159. package/dist/builtin/workflows/src/tui/stage-chat-view-types.ts +3 -1
  160. package/dist/builtin/workflows/src/tui/stage-chat-view.ts +3 -2
  161. package/dist/builtin/workflows/src/tui/status-list.ts +67 -45
  162. package/dist/builtin/workflows/src/tui/store-widget-installer.ts +7 -6
  163. package/dist/builtin/workflows/src/tui/widget.ts +49 -40
  164. package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +15 -10
  165. package/dist/builtin/workflows/src/tui/workflow-resume-selector.ts +21 -8
  166. package/dist/core/agent-session-accessors.d.ts.map +1 -1
  167. package/dist/core/agent-session-accessors.js +5 -0
  168. package/dist/core/agent-session-accessors.js.map +1 -1
  169. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  170. package/dist/core/agent-session-auto-compaction.js +5 -0
  171. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  172. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  173. package/dist/core/agent-session-compaction.js +3 -0
  174. package/dist/core/agent-session-compaction.js.map +1 -1
  175. package/dist/core/agent-session-events.d.ts.map +1 -1
  176. package/dist/core/agent-session-events.js +2 -1
  177. package/dist/core/agent-session-events.js.map +1 -1
  178. package/dist/core/agent-session-message-queue.d.ts +3 -7
  179. package/dist/core/agent-session-message-queue.d.ts.map +1 -1
  180. package/dist/core/agent-session-message-queue.js +27 -13
  181. package/dist/core/agent-session-message-queue.js.map +1 -1
  182. package/dist/core/agent-session-methods.d.ts +6 -4
  183. package/dist/core/agent-session-methods.d.ts.map +1 -1
  184. package/dist/core/agent-session-methods.js.map +1 -1
  185. package/dist/core/agent-session-persistent-custom-messages.d.ts.map +1 -1
  186. package/dist/core/agent-session-persistent-custom-messages.js +6 -3
  187. package/dist/core/agent-session-persistent-custom-messages.js.map +1 -1
  188. package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -1
  189. package/dist/core/agent-session-post-tool-compaction.js +11 -2
  190. package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
  191. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  192. package/dist/core/agent-session-runtime.js +5 -3
  193. package/dist/core/agent-session-runtime.js.map +1 -1
  194. package/dist/core/agent-session-tree.d.ts.map +1 -1
  195. package/dist/core/agent-session-tree.js +4 -0
  196. package/dist/core/agent-session-tree.js.map +1 -1
  197. package/dist/core/agent-session-types.d.ts +4 -0
  198. package/dist/core/agent-session-types.d.ts.map +1 -1
  199. package/dist/core/agent-session-types.js.map +1 -1
  200. package/dist/core/agent-session.d.ts +3 -2
  201. package/dist/core/agent-session.d.ts.map +1 -1
  202. package/dist/core/agent-session.js +1 -0
  203. package/dist/core/agent-session.js.map +1 -1
  204. package/dist/core/async/session-manager.d.ts +1 -1
  205. package/dist/core/async/session-manager.js.map +1 -1
  206. package/dist/core/auth-storage-backends.d.ts.map +1 -1
  207. package/dist/core/auth-storage-backends.js +12 -1
  208. package/dist/core/auth-storage-backends.js.map +1 -1
  209. package/dist/core/bounded-model-refresh.d.ts +14 -0
  210. package/dist/core/bounded-model-refresh.d.ts.map +1 -0
  211. package/dist/core/bounded-model-refresh.js +38 -0
  212. package/dist/core/bounded-model-refresh.js.map +1 -0
  213. package/dist/core/compaction/branch-summarization.js.map +1 -1
  214. package/dist/core/compaction/compaction-boundary.d.ts +2 -2
  215. package/dist/core/compaction/compaction-boundary.js.map +1 -1
  216. package/dist/core/compaction/compaction-parameters.d.ts +5 -0
  217. package/dist/core/compaction/compaction-parameters.d.ts.map +1 -1
  218. package/dist/core/compaction/compaction-parameters.js +6 -5
  219. package/dist/core/compaction/compaction-parameters.js.map +1 -1
  220. package/dist/core/compaction/compaction-runner.d.ts +4 -0
  221. package/dist/core/compaction/compaction-runner.d.ts.map +1 -1
  222. package/dist/core/compaction/compaction-runner.js +5 -1
  223. package/dist/core/compaction/compaction-runner.js.map +1 -1
  224. package/dist/core/compaction/compaction-types.d.ts +7 -1
  225. package/dist/core/compaction/compaction-types.d.ts.map +1 -1
  226. package/dist/core/compaction/compaction-types.js.map +1 -1
  227. package/dist/core/compaction/deleted-ranges.d.ts.map +1 -1
  228. package/dist/core/compaction/deleted-ranges.js +2 -0
  229. package/dist/core/compaction/deleted-ranges.js.map +1 -1
  230. package/dist/core/compaction/fallback-planner.d.ts +1 -1
  231. package/dist/core/compaction/fallback-planner.js.map +1 -1
  232. package/dist/core/compaction/range-planner.d.ts +3 -3
  233. package/dist/core/compaction/range-planner.d.ts.map +1 -1
  234. package/dist/core/compaction/range-planner.js +12 -14
  235. package/dist/core/compaction/range-planner.js.map +1 -1
  236. package/dist/core/compaction/transcript-serialization.d.ts +12 -0
  237. package/dist/core/compaction/transcript-serialization.d.ts.map +1 -1
  238. package/dist/core/compaction/transcript-serialization.js +99 -1
  239. package/dist/core/compaction/transcript-serialization.js.map +1 -1
  240. package/dist/core/compaction/utils.d.ts +3 -0
  241. package/dist/core/compaction/utils.d.ts.map +1 -1
  242. package/dist/core/compaction/utils.js +16 -0
  243. package/dist/core/compaction/utils.js.map +1 -1
  244. package/dist/core/context-tool-pairing.d.ts +4 -4
  245. package/dist/core/context-tool-pairing.js +4 -4
  246. package/dist/core/context-tool-pairing.js.map +1 -1
  247. package/dist/core/http-dispatcher.d.ts.map +1 -1
  248. package/dist/core/http-dispatcher.js +26 -1
  249. package/dist/core/http-dispatcher.js.map +1 -1
  250. package/dist/core/messages.d.ts +18 -6
  251. package/dist/core/messages.d.ts.map +1 -1
  252. package/dist/core/messages.js +46 -18
  253. package/dist/core/messages.js.map +1 -1
  254. package/dist/core/model-refresh-timeout.d.ts +9 -0
  255. package/dist/core/model-refresh-timeout.d.ts.map +1 -0
  256. package/dist/core/model-refresh-timeout.js +9 -0
  257. package/dist/core/model-refresh-timeout.js.map +1 -0
  258. package/dist/core/model-runtime-snapshot.d.ts +3 -0
  259. package/dist/core/model-runtime-snapshot.d.ts.map +1 -1
  260. package/dist/core/model-runtime-snapshot.js +59 -0
  261. package/dist/core/model-runtime-snapshot.js.map +1 -1
  262. package/dist/core/model-runtime.d.ts +7 -1
  263. package/dist/core/model-runtime.d.ts.map +1 -1
  264. package/dist/core/model-runtime.js +72 -17
  265. package/dist/core/model-runtime.js.map +1 -1
  266. package/dist/core/sdk.d.ts.map +1 -1
  267. package/dist/core/sdk.js +4 -3
  268. package/dist/core/sdk.js.map +1 -1
  269. package/dist/core/session-manager-core.d.ts +1 -1
  270. package/dist/core/session-manager-core.d.ts.map +1 -1
  271. package/dist/core/session-manager-core.js +2 -2
  272. package/dist/core/session-manager-core.js.map +1 -1
  273. package/dist/core/session-manager-entries.d.ts +1 -1
  274. package/dist/core/session-manager-entries.d.ts.map +1 -1
  275. package/dist/core/session-manager-entries.js +2 -1
  276. package/dist/core/session-manager-entries.js.map +1 -1
  277. package/dist/core/session-manager-history.d.ts.map +1 -1
  278. package/dist/core/session-manager-history.js +2 -2
  279. package/dist/core/session-manager-history.js.map +1 -1
  280. package/dist/core/session-manager-types.d.ts +3 -0
  281. package/dist/core/session-manager-types.d.ts.map +1 -1
  282. package/dist/core/session-manager-types.js.map +1 -1
  283. package/dist/core/tools/bash-async-execution.d.ts +1 -1
  284. package/dist/core/tools/bash-async-execution.js.map +1 -1
  285. package/dist/core/tools/bash.js.map +1 -1
  286. package/dist/core/tools/oversized-tool-result.js.map +1 -1
  287. package/dist/extensions/index.d.ts +1 -1
  288. package/dist/extensions/index.js.map +1 -1
  289. package/dist/extensions/llama/huggingface-ui.d.ts +2 -2
  290. package/dist/extensions/llama/huggingface-ui.js.map +1 -1
  291. package/dist/extensions/llama/index.d.ts +1 -1
  292. package/dist/extensions/llama/index.js.map +1 -1
  293. package/dist/extensions/llama/ui.d.ts +1 -1
  294. package/dist/extensions/llama/ui.js.map +1 -1
  295. package/dist/index.d.ts +1 -1
  296. package/dist/index.d.ts.map +1 -1
  297. package/dist/index.js.map +1 -1
  298. package/dist/main-app-mode.d.ts +1 -0
  299. package/dist/main-app-mode.d.ts.map +1 -1
  300. package/dist/main-app-mode.js +3 -0
  301. package/dist/main-app-mode.js.map +1 -1
  302. package/dist/main.d.ts.map +1 -1
  303. package/dist/main.js +8 -3
  304. package/dist/main.js.map +1 -1
  305. package/dist/modes/interactive/components/chat-session-host-actions.d.ts +7 -2
  306. package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
  307. package/dist/modes/interactive/components/chat-session-host-actions.js +13 -4
  308. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  309. package/dist/modes/interactive/components/chat-session-host-editor.d.ts +3 -1
  310. package/dist/modes/interactive/components/chat-session-host-editor.d.ts.map +1 -1
  311. package/dist/modes/interactive/components/chat-session-host-editor.js +2 -2
  312. package/dist/modes/interactive/components/chat-session-host-editor.js.map +1 -1
  313. package/dist/modes/interactive/components/chat-session-host-events.d.ts +3 -0
  314. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  315. package/dist/modes/interactive/components/chat-session-host-events.js +5 -4
  316. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  317. package/dist/modes/interactive/components/chat-session-host.d.ts +16 -2
  318. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  319. package/dist/modes/interactive/components/chat-session-host.js +35 -5
  320. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  321. package/dist/modes/interactive/components/index.d.ts +1 -0
  322. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  323. package/dist/modes/interactive/components/index.js.map +1 -1
  324. package/dist/modes/interactive/components/model-selector.d.ts +0 -1
  325. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  326. package/dist/modes/interactive/components/model-selector.js +25 -35
  327. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  328. package/dist/modes/interactive/interactive-editor-actions.js +2 -1
  329. package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
  330. package/dist/modes/interactive/interactive-input-handling.js +1 -1
  331. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  332. package/dist/modes/interactive/interactive-mode-surface.d.ts +4 -1
  333. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  334. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  335. package/dist/modes/interactive/interactive-model-routing.js +4 -1
  336. package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
  337. package/dist/modes/interactive/interactive-pause.d.ts +3 -1
  338. package/dist/modes/interactive/interactive-pause.d.ts.map +1 -1
  339. package/dist/modes/interactive/interactive-pause.js +5 -1
  340. package/dist/modes/interactive/interactive-pause.js.map +1 -1
  341. package/dist/modes/interactive/interactive-queueing.js +3 -3
  342. package/dist/modes/interactive/interactive-queueing.js.map +1 -1
  343. package/dist/modes/interactive-engine/engine-health.d.ts +6 -0
  344. package/dist/modes/interactive-engine/engine-health.d.ts.map +1 -1
  345. package/dist/modes/interactive-engine/engine-health.js +15 -1
  346. package/dist/modes/interactive-engine/engine-health.js.map +1 -1
  347. package/dist/modes/interactive-engine/isolated-auth.js +1 -1
  348. package/dist/modes/interactive-engine/isolated-auth.js.map +1 -1
  349. package/dist/modes/interactive-engine/isolated-runtime.d.ts +1 -0
  350. package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
  351. package/dist/modes/interactive-engine/isolated-runtime.js +7 -1
  352. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  353. package/dist/modes/interactive-engine/remote-model-catalog.d.ts.map +1 -1
  354. package/dist/modes/interactive-engine/remote-model-catalog.js +5 -1
  355. package/dist/modes/interactive-engine/remote-model-catalog.js.map +1 -1
  356. package/dist/modes/interactive-engine/remote-queue-pause.d.ts +1 -1
  357. package/dist/modes/interactive-engine/remote-queue-pause.js.map +1 -1
  358. package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
  359. package/dist/modes/rpc/rpc-command-handler.js +23 -7
  360. package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
  361. package/dist/modes/rpc/rpc-input-scheduler.js +1 -1
  362. package/dist/modes/rpc/rpc-input-scheduler.js.map +1 -1
  363. package/dist/modes/rpc/rpc-types.d.ts +2 -1
  364. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  365. package/dist/modes/rpc/rpc-types.js.map +1 -1
  366. package/docs/compaction.md +24 -0
  367. package/docs/custom-provider.md +3 -3
  368. package/docs/extensions.md +3 -1
  369. package/docs/index.md +10 -0
  370. package/docs/keybindings.md +1 -1
  371. package/docs/models.md +2 -0
  372. package/docs/providers.md +7 -3
  373. package/docs/quickstart.md +7 -1
  374. package/docs/session-format.md +2 -0
  375. package/docs/termux.md +3 -1
  376. package/docs/usage.md +3 -2
  377. package/docs/workflows.md +138 -46
  378. package/npm-shrinkwrap.json +69 -37
  379. package/package.json +4 -4
  380. package/dist/builtin/workflows/src/tui/toast.ts +0 -107
@@ -1,7 +1,7 @@
1
1
  import type { ToolInfo } from "@bastani/atomic";
2
2
  import type { McpExtensionState } from "./state.js";
3
- import type { McpContent, ToolMetadata } from "./types.js";
4
- import { getServerPrefix } from "./types.js";
3
+ import type { McpContent, ToolMetadata } from "./types.ts";
4
+ import { getServerPrefix } from "./types.ts";
5
5
  import { lazyConnect, updateServerMetadata, updateMetadataCache, getFailureAgeSeconds, updateStatusBar } from "./init.js";
6
6
  import { getToolNames, findToolByName, formatSchema } from "./tool-metadata.js";
7
7
  import { transformMcpContent } from "./tool-registrar.js";
@@ -1,6 +1,6 @@
1
1
  import type { McpExtensionState } from "./state.js";
2
- import type { ToolMetadata } from "./types.js";
3
- import { getServerPrefix, parseUiPromptHandoff } from "./types.js";
2
+ import type { ToolMetadata } from "./types.ts";
3
+ import { getServerPrefix, parseUiPromptHandoff } from "./types.ts";
4
4
  import { getFailureAgeSeconds } from "./init.js";
5
5
  import { findToolByName, formatSchema } from "./tool-metadata.js";
6
6
  import { truncateAtWord } from "./utils.js";
@@ -1,6 +1,6 @@
1
1
  import type { ProviderHeaders } from "@earendil-works/pi-ai";
2
2
  import { complete, type Api, type AssistantMessage, type Message, type Model, type TextContent } from "@earendil-works/pi-ai/compat";
3
- import { truncateAtWord } from "./utils.ts";
3
+ import { truncateAtWord } from "./utils.js";
4
4
  import type { ExtensionUIContext, ModelRegistry } from "@bastani/atomic";
5
5
  import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
6
6
  import {
@@ -14,10 +14,10 @@ import type {
14
14
  import { serverStreamResultPatchNotificationSchema } from "./types.ts";
15
15
  import { resolveNpxBinary } from "./npx-resolver.ts";
16
16
  import { logger } from "./logger.ts";
17
- import { McpOAuthProvider } from "./mcp-oauth-provider.ts";
18
- import { supportsOAuth } from "./mcp-auth-flow.ts";
17
+ import { McpOAuthProvider } from "./mcp-oauth-provider.js";
18
+ import { supportsOAuth } from "./mcp-auth-flow.js";
19
19
  import { registerSamplingHandler, type ServerSamplingConfig } from "./sampling-handler.ts";
20
- import { interpolateEnvRecord, resolveBearerToken, resolveConfigPath } from "./utils.ts";
20
+ import { interpolateEnvRecord, resolveBearerToken, resolveConfigPath } from "./utils.js";
21
21
 
22
22
  interface ServerConnection {
23
23
  client: Client;
@@ -1,10 +1,10 @@
1
- import type { McpExtensionState } from "./state.ts";
1
+ import type { McpExtensionState } from "./state.js";
2
2
  import { getMissingConfiguredDirectToolServers } from "./direct-tools.ts";
3
- import { loadMetadataCache } from "./metadata-cache.ts";
4
- import { buildToolMetadata } from "./tool-metadata.ts";
5
- import { parallelLimit } from "./utils.ts";
3
+ import { loadMetadataCache } from "./metadata-cache.js";
4
+ import { buildToolMetadata } from "./tool-metadata.js";
5
+ import { parallelLimit } from "./utils.js";
6
6
  import { logger } from "./logger.ts";
7
- import { updateMetadataCache, updateStatusBar } from "./init.ts";
7
+ import { updateMetadataCache, updateStatusBar } from "./init.js";
8
8
 
9
9
  export interface McpStartupWarmupOptions {
10
10
  shouldContinue?: () => boolean;
@@ -1,5 +1,5 @@
1
1
  import type { ExtensionContext } from "@bastani/atomic";
2
- import type { ConsentManager } from "./consent-manager.ts";
2
+ import type { ConsentManager } from "./consent-manager.js";
3
3
  import type { McpLifecycleManager } from "./lifecycle.ts";
4
4
  import type { McpServerManager } from "./server-manager.ts";
5
5
  import type { ToolMetadata, McpConfig, UiSessionMessages, UiStreamSummary } from "./types.ts";
@@ -6,7 +6,7 @@ import {
6
6
  McpError,
7
7
  type CallToolRequest,
8
8
  } from "@modelcontextprotocol/sdk/types.js";
9
- import type { ServerEntry } from "./types.js";
9
+ import type { ServerEntry } from "./types.ts";
10
10
 
11
11
  export const MCP_TIMEOUT_MS_CONFIG_ERROR =
12
12
  "timeoutMs must be a finite number greater than 0 milliseconds";
@@ -1,9 +1,9 @@
1
1
  import { getToolUiResourceUri } from "@modelcontextprotocol/ext-apps/app-bridge";
2
- import type { McpExtensionState } from "./state.ts";
2
+ import type { McpExtensionState } from "./state.js";
3
3
  import type { ToolMetadata, McpTool, McpResource, ServerEntry } from "./types.ts";
4
4
  import { formatToolName, isToolExcluded } from "./types.ts";
5
5
  import { resourceNameToToolName } from "./resource-tools.ts";
6
- import { extractToolUiStreamMode } from "./utils.ts";
6
+ import { extractToolUiStreamMode } from "./utils.js";
7
7
 
8
8
  export function buildToolMetadata(
9
9
  tools: McpTool[],
@@ -379,7 +379,7 @@ export interface McpPanelCallbacks {
379
379
  canAuthenticate: (serverName: string) => boolean;
380
380
  authenticate: (serverName: string) => Promise<McpAuthResult>;
381
381
  getConnectionStatus: (serverName: string) => "connected" | "idle" | "failed" | "needs-auth";
382
- refreshCacheAfterReconnect: (serverName: string) => import("./metadata-cache.ts").ServerCacheEntry | null;
382
+ refreshCacheAfterReconnect: (serverName: string) => import("./metadata-cache.js").ServerCacheEntry | null;
383
383
  }
384
384
 
385
385
  export interface McpPanelResult {
@@ -8,11 +8,11 @@ import type {
8
8
  CallToolResult,
9
9
  } from "@modelcontextprotocol/sdk/types.js";
10
10
  import type { ConsentManager } from "./consent-manager.js";
11
- import { ServerError, wrapError } from "./errors.js";
11
+ import { ServerError, wrapError } from "./errors.ts";
12
12
  import { buildHostHtmlTemplate, buildCspMetaContent, applyCspMeta } from "./host-html-template.js";
13
- import { logger } from "./logger.js";
13
+ import { logger } from "./logger.ts";
14
14
  import { parseBody, sendJson, validateTokenBody, validateTokenQuery } from "./ui-server-http.js";
15
- import type { McpServerManager } from "./server-manager.js";
15
+ import type { McpServerManager } from "./server-manager.ts";
16
16
  import { callToolWithConfiguredTimeout } from "./tool-call-timeout.js";
17
17
  import {
18
18
  extractUiPromptText,
@@ -27,7 +27,7 @@ import {
27
27
  type UiResourceContent,
28
28
  type UiSessionMessages,
29
29
  type UiStreamSummary,
30
- } from "./types.js";
30
+ } from "./types.ts";
31
31
 
32
32
  const ABANDONED_GRACE_MS = 60_000;
33
33
  const WATCHDOG_INTERVAL_MS = 5_000;
@@ -10,9 +10,9 @@ import {
10
10
  type UiMessageParams,
11
11
  type UiModelContextParams,
12
12
  type UiStreamMode,
13
- } from "./types.js";
14
- import { logger } from "./logger.js";
15
- import { startUiServer, type UiServerHandle } from "./ui-server.js";
13
+ } from "./types.ts";
14
+ import { logger } from "./logger.ts";
15
+ import { startUiServer, type UiServerHandle } from "./ui-server.ts";
16
16
  import { isGlimpseAvailable, openGlimpseWindow } from "./glimpse-ui.js";
17
17
  import { escapeHtmlAttribute } from "./host-html-template.js";
18
18
 
@@ -2,6 +2,32 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.12-alpha.1] - 2026-08-04
6
+
7
+ ### Fixed
8
+
9
+ - Fixed bundled subagent resources failing to load on Windows when shared modules used mixed `.ts` and `.js` import spellings.
10
+
11
+ ## [0.9.11] - 2026-08-03
12
+
13
+ ### Changed
14
+
15
+ - Adopted Claude Opus 5 across every builtin subagent `fallbackModels` policy and normalized provider ordering: each Anthropic family lists its direct `anthropic/...` candidate ahead of the `github-copilot/...` mirror, Opus 5 leads the Anthropic group (`:high` for the debugger, `:low` elsewhere), and `claude-fable-5` gains its missing Copilot mirror.
16
+ - Reworked all nine bundled agent system prompts and all seven chain task templates for GPT-5.6, Claude Opus 5, and Claude Fable 5. Agent bodies are outcome-first with explicit success, evidence, output, escalation, and stop contracts, shrinking from 1,418 to 561 lines. Removing repeated self-verification and requests to reproduce internal reasoning also avoids Claude Fable 5 `reasoning_extraction` refusals that could force model fallback. Frontmatter and exported behaviour are unchanged.
17
+ - Made the builtin debugger write-capable with the same tool list as `worker`, so it applies the smallest in-scope fix after proving the root cause, and gave it the `tdd`, `playwright-cli`, and `tmux` skills plus Intercom coordination.
18
+ - Generalized orchestration guidance across parent chats and workflow stages: orchestrators preserve each agent's declared model and fallback policy by default, explicit overrides require a user request or documented need, and every invocation shares one invocation-specific Intercom group while retaining `contact_supervisor` escalation.
19
+
20
+ ### Removed
21
+
22
+ - Removed Cursor MCP compatibility imports from delegated direct-tool resolution and Cursor model candidates from every builtin subagent fallback policy ([#1994](https://github.com/bastani-inc/atomic/issues/1994)).
23
+ - Removed the `(1m)` context-window token from every builtin fallback policy; candidates now use the model's catalog context window (`github-copilot/claude-opus-4.8:medium`).
24
+
25
+ ### Fixed
26
+
27
+ - Fixed startup artifact cleanup escaping isolated agent directories, and made it far cheaper: the global scan now stays inside a host-provided sessions root, runs at most once per 24 hours per root behind a `.last-cleanup` marker and an exclusive `.cleanup.lock`, is deferred ten minutes after startup, and stops at the first entry newer than the cutoff instead of recursively stat-ing whole subtrees — eliminating tens of thousands of synchronous fs calls on long-lived machines ([#2070](https://github.com/bastani-inc/atomic/issues/2070)).
28
+ - Fixed worktree setup hooks being reported as failed when they never read their stdin. A hook that exited before the JSON input flushed made `spawnSync` report `EPIPE` and tore down the whole worktree even though the hook had completed; the child's exit status and output are now authoritative. Timeouts and other spawn errors stay fatal.
29
+ - Fixed foreground subagent runs that detached for intercom coordination completing silently. A detached single, chain, or parallel child now delivers a "Detached subagent task" completion, failure, or paused notice to the parent session through the same deduplicated, turn-triggering pipeline as background completions, including per-child `(n/m)` attribution.
30
+
5
31
  ## [0.9.11-alpha.9] - 2026-08-01
6
32
 
7
33
  ### Fixed
@@ -8,8 +8,8 @@ description: |
8
8
  - Production-quality refinement of a working draft ("ugly but working CSV parser").
9
9
  - Code that has gotten messy after several iterations.
10
10
  tools: read, edit, write, search, find, ls, bash, todo
11
- model: openai-codex/gpt-5.6-sol:medium
12
- fallbackModels: github-copilot/gpt-5.6-sol:medium, openai/gpt-5.6-sol:medium, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:medium, github-copilot/gpt-5.5:medium, openai/gpt-5.5:medium, anthropic/claude-fable-5:low, github-copilot/claude-fable-5:low, anthropic/claude-opus-4-8:medium, github-copilot/claude-opus-4.8:medium, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-sol:medium, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:medium, openrouter/anthropic/claude-fable-5:low, openrouter/anthropic/claude-opus-4-8:medium, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
11
+ model: openai-codex/gpt-5.6-luna:max
12
+ fallbackModels: github-copilot/gpt-5.6-luna:max, openai/gpt-5.6-luna:max, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:medium, github-copilot/gpt-5.5:medium, openai/gpt-5.5:medium, anthropic/claude-fable-5:low, github-copilot/claude-fable-5:low, anthropic/claude-opus-4-8:medium, github-copilot/claude-opus-4.8:medium, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-luna:max, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:medium, openrouter/anthropic/claude-fable-5:low, openrouter/anthropic/claude-opus-4-8:medium, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
13
13
  skills: tdd, playwright-cli, tmux
14
14
  ---
15
15
 
@@ -2,8 +2,8 @@
2
2
  name: codebase-analyzer
3
3
  description: Analyzes codebase implementation details. Call the codebase-analyzer agent when you need to find detailed information about specific components.
4
4
  tools: read, search, find, ls, todo
5
- model: openai-codex/gpt-5.6-sol:medium
6
- fallbackModels: github-copilot/gpt-5.6-sol:medium, openai/gpt-5.6-sol:medium, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:medium, github-copilot/gpt-5.5:medium, openai/gpt-5.5:medium, anthropic/claude-fable-5:low, github-copilot/claude-fable-5:low, anthropic/claude-opus-4-8:medium, github-copilot/claude-opus-4.8:medium, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-sol:medium, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:medium, openrouter/anthropic/claude-fable-5:low, openrouter/anthropic/claude-opus-4-8:medium, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
5
+ model: openai-codex/gpt-5.6-luna:max
6
+ fallbackModels: github-copilot/gpt-5.6-luna:max, openai/gpt-5.6-luna:max, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:medium, github-copilot/gpt-5.5:medium, openai/gpt-5.5:medium, anthropic/claude-fable-5:low, github-copilot/claude-fable-5:low, anthropic/claude-opus-4-8:medium, github-copilot/claude-opus-4.8:medium, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-luna:max, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:medium, openrouter/anthropic/claude-fable-5:low, openrouter/anthropic/claude-opus-4-8:medium, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
7
7
  skills: tdd, playwright-cli, tmux
8
8
  ---
9
9
 
@@ -2,8 +2,8 @@
2
2
  name: codebase-locator
3
3
  description: Locates files, directories, and components relevant to a feature or task. Basically a "super search/find/ls tool."
4
4
  tools: read, search, find, ls
5
- model: openai-codex/gpt-5.6-terra:high
6
- fallbackModels: github-copilot/gpt-5.6-terra:high, openai/gpt-5.6-terra:high, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:low, github-copilot/gpt-5.5:low, openai/gpt-5.5:low, anthropic/claude-opus-4-8:low, github-copilot/claude-opus-4.8:low, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-terra:high, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:low, openrouter/anthropic/claude-opus-4-8:low, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
5
+ model: openai-codex/gpt-5.6-luna:max
6
+ fallbackModels: github-copilot/gpt-5.6-luna:max, openai/gpt-5.6-luna:max, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:low, github-copilot/gpt-5.5:low, openai/gpt-5.5:low, anthropic/claude-opus-4-8:low, github-copilot/claude-opus-4.8:low, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-luna:max, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:low, openrouter/anthropic/claude-opus-4-8:low, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
7
7
  ---
8
8
 
9
9
  ## Role and goal
@@ -2,8 +2,8 @@
2
2
  name: codebase-online-researcher
3
3
  description: Online research for up-to-date documentation and library-source knowledge. Use when you need authoritative external information — official docs, ecosystem context, version-specific behavior, GitHub permalinks into open-source libraries, or video tutorials.
4
4
  tools: read, search, find, ls, bash, web_search, fetch_content, get_search_content, todo
5
- model: openai-codex/gpt-5.6-sol:medium
6
- fallbackModels: github-copilot/gpt-5.6-sol:medium, openai/gpt-5.6-sol:medium, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:medium, github-copilot/gpt-5.5:medium, openai/gpt-5.5:medium, anthropic/claude-fable-5:low, github-copilot/claude-fable-5:low, anthropic/claude-opus-4-8:medium, github-copilot/claude-opus-4.8:medium, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-sol:medium, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:medium, openrouter/anthropic/claude-fable-5:low, openrouter/anthropic/claude-opus-4-8:medium, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
5
+ model: openai-codex/gpt-5.6-luna:max
6
+ fallbackModels: github-copilot/gpt-5.6-luna:max, openai/gpt-5.6-luna:max, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:medium, github-copilot/gpt-5.5:medium, openai/gpt-5.5:medium, anthropic/claude-fable-5:low, github-copilot/claude-fable-5:low, anthropic/claude-opus-4-8:medium, github-copilot/claude-opus-4.8:medium, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-luna:max, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:medium, openrouter/anthropic/claude-fable-5:low, openrouter/anthropic/claude-opus-4-8:medium, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
7
7
  skills: playwright-cli
8
8
  ---
9
9
 
@@ -2,8 +2,8 @@
2
2
  name: codebase-pattern-finder
3
3
  description: Find similar implementations, usage examples, or existing patterns in the codebase that can be modeled after.
4
4
  tools: read, search, find, ls
5
- model: openai-codex/gpt-5.6-terra:high
6
- fallbackModels: github-copilot/gpt-5.6-terra:high, openai/gpt-5.6-terra:high, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:low, github-copilot/gpt-5.5:low, openai/gpt-5.5:low, anthropic/claude-opus-4-8:low, github-copilot/claude-opus-4.8:low, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-terra:high, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:low, openrouter/anthropic/claude-opus-4-8:low, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
5
+ model: openai-codex/gpt-5.6-luna:max
6
+ fallbackModels: github-copilot/gpt-5.6-luna:max, openai/gpt-5.6-luna:max, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:low, github-copilot/gpt-5.5:low, openai/gpt-5.5:low, anthropic/claude-opus-4-8:low, github-copilot/claude-opus-4.8:low, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-luna:max, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:low, openrouter/anthropic/claude-opus-4-8:low, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
7
7
  ---
8
8
 
9
9
  ## Role and goal
@@ -2,8 +2,8 @@
2
2
  name: codebase-research-analyzer
3
3
  description: Analyzes local research documents to extract high-value insights, decisions, and technical details while filtering out noise. Use this when you want to deep dive on a research topic or understand the rationale behind decisions.
4
4
  tools: read, search, find, ls, todo
5
- model: openai-codex/gpt-5.6-sol:medium
6
- fallbackModels: github-copilot/gpt-5.6-sol:medium, openai/gpt-5.6-sol:medium, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:medium, github-copilot/gpt-5.5:medium, openai/gpt-5.5:medium, anthropic/claude-fable-5:low, github-copilot/claude-fable-5:low, anthropic/claude-opus-4-8:medium, github-copilot/claude-opus-4.8:medium, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-sol:medium, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:medium, openrouter/anthropic/claude-fable-5:low, openrouter/anthropic/claude-opus-4-8:medium, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
5
+ model: openai-codex/gpt-5.6-luna:max
6
+ fallbackModels: github-copilot/gpt-5.6-luna:max, openai/gpt-5.6-luna:max, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:medium, github-copilot/gpt-5.5:medium, openai/gpt-5.5:medium, anthropic/claude-fable-5:low, github-copilot/claude-fable-5:low, anthropic/claude-opus-4-8:medium, github-copilot/claude-opus-4.8:medium, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-luna:max, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:medium, openrouter/anthropic/claude-fable-5:low, openrouter/anthropic/claude-opus-4-8:medium, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
7
7
  ---
8
8
 
9
9
  ## Role and goal
@@ -2,8 +2,8 @@
2
2
  name: codebase-research-locator
3
3
  description: Discovers local research documents that are relevant to the current research task.
4
4
  tools: read, search, find, ls
5
- model: openai-codex/gpt-5.6-terra:high
6
- fallbackModels: github-copilot/gpt-5.6-terra:high, openai/gpt-5.6-terra:high, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:low, github-copilot/gpt-5.5:low, openai/gpt-5.5:low, anthropic/claude-opus-4-8:low, github-copilot/claude-opus-4.8:low, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-terra:high, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:low, openrouter/anthropic/claude-opus-4-8:low, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
5
+ model: openai-codex/gpt-5.6-luna:max
6
+ fallbackModels: github-copilot/gpt-5.6-luna:max, openai/gpt-5.6-luna:max, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:low, github-copilot/gpt-5.5:low, openai/gpt-5.5:low, anthropic/claude-opus-4-8:low, github-copilot/claude-opus-4.8:low, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-luna:max, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:low, openrouter/anthropic/claude-opus-4-8:low, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
7
7
  ---
8
8
 
9
9
  ## Role and goal
@@ -5,8 +5,8 @@ systemPromptMode: replace
5
5
  inheritProjectContext: true
6
6
  inheritSkills: false
7
7
  tools: read, edit, write, search, find, ls, bash, web_search, fetch_content, get_search_content, intercom, contact_supervisor, todo
8
- model: openai-codex/gpt-5.6-sol:medium
9
- fallbackModels: github-copilot/gpt-5.6-sol:medium, openai/gpt-5.6-sol:medium, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:medium, github-copilot/gpt-5.5:medium, openai/gpt-5.5:medium, anthropic/claude-fable-5:low, github-copilot/claude-fable-5:low, anthropic/claude-opus-4-8:medium, github-copilot/claude-opus-4.8:medium, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-sol:medium, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:medium, openrouter/anthropic/claude-fable-5:low, openrouter/anthropic/claude-opus-4-8:medium, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
8
+ model: openai-codex/gpt-5.6-luna:max
9
+ fallbackModels: github-copilot/gpt-5.6-luna:max, openai/gpt-5.6-luna:max, anthropic/claude-opus-5:low, github-copilot/claude-opus-5:low, openai-codex/gpt-5.5:medium, github-copilot/gpt-5.5:medium, openai/gpt-5.5:medium, anthropic/claude-fable-5:low, github-copilot/claude-fable-5:low, anthropic/claude-opus-4-8:medium, github-copilot/claude-opus-4.8:medium, xai/grok-4.5:high, zai/glm-5.2:high, zai-coding-cn/glm-5.2:high, openrouter/openai/gpt-5.6-luna:max, openrouter/anthropic/claude-opus-5:low, openrouter/openai/gpt-5.5:medium, openrouter/anthropic/claude-fable-5:low, openrouter/anthropic/claude-opus-4-8:medium, openrouter/x-ai/grok-4.5, openrouter/z-ai/glm-5.2:xhigh
10
10
  skills: tdd, playwright-cli, tmux
11
11
  defaultContext: fork
12
12
  defaultProgress: true
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/subagents",
3
- "version": "0.9.11-alpha.9",
3
+ "version": "0.9.12-alpha.1",
4
4
  "private": true,
5
5
  "description": "Atomic extension for delegating tasks to subagents with chains, parallel execution, and background runs. Fork of: https://github.com/nicobailon/pi-subagents",
6
6
  "contributors": [
@@ -1,10 +1,6 @@
1
1
  import type { SubagentNotifyDetails } from "../runs/background/notify.ts";
2
2
 
3
- const HEADER_PREFIXES = [
4
- ["Background task completed: **", "completed"],
5
- ["Background task failed: **", "failed"],
6
- ["Background task paused: **", "paused"],
7
- ] as const;
3
+ const HEADER_STATUSES = ["completed", "failed", "paused"] as const;
8
4
 
9
5
  function isHeaderLineTerminator(character: string): boolean {
10
6
  return character === "\r" || character === "\u2028" || character === "\u2029";
@@ -15,10 +11,19 @@ function isWhitespace(character: string | undefined): boolean {
15
11
  }
16
12
 
17
13
  function parseHeader(header: string): Pick<SubagentNotifyDetails, "agent" | "status" | "taskInfo"> | undefined {
18
- const matchedPrefix = HEADER_PREFIXES.find(([prefix]) => header.startsWith(prefix));
19
- if (!matchedPrefix) return undefined;
20
- const [prefix, status] = matchedPrefix;
21
- const suffix = header.slice(prefix.length);
14
+ let markerIndex = -1;
15
+ let status: SubagentNotifyDetails["status"] | undefined;
16
+ for (const candidateStatus of HEADER_STATUSES) {
17
+ const candidateMarker = ` ${candidateStatus}: **`;
18
+ const candidateIndex = header.indexOf(candidateMarker);
19
+ if (candidateIndex < 1 || (markerIndex >= 0 && candidateIndex >= markerIndex)) continue;
20
+ markerIndex = candidateIndex;
21
+ status = candidateStatus;
22
+ }
23
+ if (markerIndex < 1 || !status) return undefined;
24
+ const label = header.slice(0, markerIndex);
25
+ if (label !== label.trim() || [...label].some(isHeaderLineTerminator)) return undefined;
26
+ const suffix = header.slice(markerIndex + ` ${status}: **`.length);
22
27
 
23
28
  if (suffix.endsWith("**")) {
24
29
  const agent = suffix.slice(0, -2);
@@ -198,8 +198,8 @@ export default function registerSubagentNotify(pi: ExtensionAPI): () => void {
198
198
 
199
199
  const taskInfo =
200
200
  result.taskIndex !== undefined && result.totalTasks !== undefined
201
- ? ` (${result.taskIndex + 1}/${result.totalTasks})`
202
- : "";
201
+ ? `(${result.taskIndex + 1}/${result.totalTasks})`
202
+ : undefined;
203
203
 
204
204
  const sessionLine = result.shareUrl
205
205
  ? `Session: ${result.shareUrl}`
@@ -214,8 +214,23 @@ export default function registerSubagentNotify(pi: ExtensionAPI): () => void {
214
214
  typeof result.noticeLabel === "string" && result.noticeLabel.trim()
215
215
  ? result.noticeLabel.trim()
216
216
  : "Background task";
217
+ let sessionLabel: string | undefined;
218
+ let sessionValue: string | undefined;
219
+ if (sessionLine) {
220
+ const separator = sessionLine.indexOf(":");
221
+ sessionLabel = sessionLine.slice(0, separator).toLowerCase();
222
+ sessionValue = sessionLine.slice(separator + 1).trim();
223
+ }
224
+ const details: SubagentNotifyDetails = {
225
+ agent,
226
+ status,
227
+ ...(taskInfo ? { taskInfo } : {}),
228
+ resultPreview: displaySummary,
229
+ ...(result.durationMs !== undefined ? { durationMs: result.durationMs } : {}),
230
+ ...(sessionLabel && sessionValue ? { sessionLabel, sessionValue } : {}),
231
+ };
217
232
  const content = [
218
- `${noticeLabel} ${status}: **${agent}**${taskInfo}`,
233
+ `${noticeLabel} ${status}: **${agent}**${taskInfo ? ` ${taskInfo}` : ""}`,
219
234
  "",
220
235
  displaySummary,
221
236
  sessionLine ? "" : undefined,
@@ -224,10 +239,11 @@ export default function registerSubagentNotify(pi: ExtensionAPI): () => void {
224
239
  .filter((line) => line !== undefined)
225
240
  .join("\n");
226
241
 
227
- const terminalMessage = {
242
+ const terminalMessage: TerminalPreludeMessage = {
228
243
  customType: "subagent-notify",
229
244
  content,
230
245
  display: true,
246
+ details,
231
247
  };
232
248
  const deliveryOptions = { triggerTurn: true, stageAdmissionKey: `subagent:${key}` } as const;
233
249
  const succeed = (): void => {
@@ -7,12 +7,12 @@ import {
7
7
  compactNestedResultChildren,
8
8
  deliverSubagentResultIntercomEvent,
9
9
  resolveSubagentResultStatus,
10
- } from "../../intercom/result-intercom.js";
11
- import type { IntercomEventBus, SubagentResultIntercomChild, SubagentState } from "../../shared/types.js";
12
- import { projectNestedRegistryForRoot } from "../shared/nested-events.js";
10
+ } from "../../intercom/result-intercom.ts";
11
+ import type { IntercomEventBus, SubagentResultIntercomChild, SubagentState } from "../../shared/types.ts";
12
+ import { projectNestedRegistryForRoot } from "../shared/nested-events.ts";
13
13
  import { type CompletionClaimSnapshot, deliverClaimedCompletion } from "./completion-claims.js";
14
- import { buildCompletionKey, lookupSeenWithTtl, recordSeen } from "./completion-dedupe.js";
15
- import { deliverLocalCompletionNotification } from "./completion-notification.js";
14
+ import { buildCompletionKey, lookupSeenWithTtl, recordSeen } from "./completion-dedupe.ts";
15
+ import { deliverLocalCompletionNotification } from "./completion-notification.ts";
16
16
  import {
17
17
  claimIdFromScheduleKey,
18
18
  claimPublicResult,
@@ -1,7 +1,7 @@
1
1
  import { randomUUID } from "node:crypto";
2
2
  import * as fs from "node:fs";
3
3
  import * as path from "node:path";
4
- import type { GroupedResultIntercomMessageInput } from "../../intercom/result-intercom.js";
4
+ import type { GroupedResultIntercomMessageInput } from "../../intercom/result-intercom.ts";
5
5
  import type { ResultFileData } from "./result-watcher-data.js";
6
6
 
7
7
  const CLAIMS_DIR = ".claims";
@@ -1,7 +1,7 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
- import { ASYNC_DIR } from "../../shared/types.js";
4
- import { NESTED_RUNS_DIR } from "../shared/nested-events.js";
3
+ import { ASYNC_DIR } from "../../shared/types.ts";
4
+ import { NESTED_RUNS_DIR } from "../shared/nested-events.ts";
5
5
  import type { ResultFileData } from "./result-watcher-data.js";
6
6
 
7
7
  const TERMINAL_ASYNC_STATES = new Set(["complete", "failed", "paused"]);
@@ -1,6 +1,6 @@
1
1
  import { createHash } from "node:crypto";
2
- import type { NestedRunSummary } from "../../shared/types.js";
3
- import { sanitizeSummary } from "../shared/nested-events.js";
2
+ import type { NestedRunSummary } from "../../shared/types.ts";
3
+ import { sanitizeSummary } from "../shared/nested-events.ts";
4
4
 
5
5
  export interface ResultFileChild {
6
6
  agent?: string;
@@ -2,7 +2,7 @@ import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
3
  import { isSafeFsWatchPathError, watchWithErrorHandler } from "@bastani/atomic";
4
4
  import { createFileCoalescer } from "../../shared/file-coalescer.js";
5
- import type { IntercomEventBus, SubagentState } from "../../shared/types.js";
5
+ import type { IntercomEventBus, SubagentState } from "../../shared/types.ts";
6
6
  import { processResultEntry, type ResultProcessorFs } from "./result-delivery-processor.js";
7
7
  import { claimIdFromScheduleKey, claimScheduleKey, listResultClaims } from "./result-file-claims.js";
8
8
  import { createRetryScheduler } from "./result-retry-scheduler.js";
@@ -1,4 +1,4 @@
1
- import type { IntercomDetachRoute } from "./execution-detach-route.js";
1
+ import type { IntercomDetachRoute } from "./execution-detach-route.ts";
2
2
 
3
3
  interface Reservation {
4
4
  route: IntercomDetachRoute;
@@ -2,7 +2,7 @@ import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
3
  import { getAgentConfigPaths } from "@bastani/atomic";
4
4
  import { appendToActiveEventWriter } from "./event-jsonl-writer.ts";
5
- import { publishFileExclusive, unlinkIfPresent } from "./exclusive-file-publication.ts";
5
+ import { publishFileExclusive, unlinkIfPresent } from "./exclusive-file-publication.js";
6
6
  import { type ArtifactPaths, TEMP_ARTIFACTS_DIR } from "./types.ts";
7
7
 
8
8
  const CLEANUP_MARKER_FILE = ".last-cleanup";
@@ -4,6 +4,32 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.12-alpha.1] - 2026-08-04
8
+
9
+ ### Fixed
10
+
11
+ - Fixed bundled web-access resources failing to load on Windows when shared modules used mixed `.ts` and `.js` import spellings.
12
+
13
+ ## [0.9.11] - 2026-08-03
14
+
15
+ ### Fixed
16
+
17
+ - Fixed PDF extraction dropping text and streaming `TypeError: Math.sumPrecise is not a function` on Node runtimes without `Math.sumPrecise`. `unpdf` is now exact-pinned to `1.7.0` — the newest release that still ships the guarded fallback — instead of floating to 1.8.0, and that upgrade also adds `cMapUrl` CJK font support, releases document proxies and canvas resources, and preserves line breaks in `extractText` ([#2141](https://github.com/bastani-inc/atomic/issues/2141)).
18
+ - Fixed retained GitHub README truncations by copying bounded text into flat strings before storing long-lived results ([#2151](https://github.com/bastani-inc/atomic/issues/2151)).
19
+
20
+ ## [0.9.11-alpha.12] - 2026-08-03
21
+
22
+ ### Fixed
23
+
24
+ - Fixed PDF extraction dropping text and streaming `TypeError: Math.sumPrecise is not a function` warnings on Node runtimes that do not implement `Math.sumPrecise`. The `unpdf` dependency was declared as the floating range `^1.6.2`, which resolves to 1.8.0 in a published or global install; that release's bundled PDF.js v6.1 dropped the guarded fallback and calls the builtin unconditionally, so extraction threw per glyph, emitted font-substitution warnings, and silently returned fewer text items. On the reported 17-page arXiv PDF this cost 69 text items and 221 characters. `unpdf` is now exact-pinned to `1.7.0`, the newest release that still ships the fallback, so no install can float to 1.8.0 ([#2141](https://github.com/bastani-inc/atomic/issues/2141)).
25
+ - Upgraded the pinned `unpdf` from 1.6.2 to 1.7.0, which adds `cMapUrl` CJK font support under Node, destroys internally created document proxies and canvas resources, and preserves line breaks in `extractText` with `mergePages`.
26
+
27
+ ## [0.9.11-alpha.11] - 2026-08-03
28
+
29
+ ### Fixed
30
+
31
+ - Fixed retained GitHub README truncations by copying bounded text into flat strings before storing long-lived results ([#2151](https://github.com/bastani-inc/atomic/issues/2151)).
32
+
7
33
  ## [0.9.11-alpha.1] - 2026-07-20
8
34
 
9
35
  ### Changed
@@ -44,6 +44,7 @@ export function registerContentTools(pi: ExtensionAPI, deps: RegisterContentTool
44
44
 
45
45
  renderCall(args, theme) {
46
46
  const { query } = args as { query?: string };
47
+ // This status-line preview is built and dropped within the same turn, so a bare slice is sufficient.
47
48
  const display = !query
48
49
  ? "(no query)"
49
50
  : query.length > 70 ? query.slice(0, 67) + "..." : query;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Truncation that actually releases the untruncated source.
3
+ *
4
+ * This local web-access copy mirrors the original helper in
5
+ * `packages/workflows/src/shared/flat-string.ts`; web-access is a standalone package and
6
+ * cannot import that workflows module.
7
+ *
8
+ * V8 does not copy characters for `String.prototype.slice`. For a flat parent of
9
+ * 13 characters or more it allocates a **SlicedString**, which is a length, an
10
+ * offset, and a pointer to the parent. Template interpolation then wraps that in
11
+ * a **ConsString**, which keeps the same pointer. So the obvious way to bound a
12
+ * value for storage:
13
+ *
14
+ * ```ts
15
+ * `${JSON.stringify(value).slice(0, 237)}...`
16
+ * ```
17
+ *
18
+ * produces a 240-character string that reports `length === 240` while holding
19
+ * the entire serialized payload alive. The bound is on what you can read, not on
20
+ * what you retain. An 8 MiB tool result summarized to 240 characters still costs
21
+ * 8 MiB for as long as anything keeps the summary.
22
+ *
23
+ * That is invisible in every ordinary test: the value is correct, its length is
24
+ * correct, and equality holds. It only shows up as heap that never comes back.
25
+ *
26
+ * `split("").join("")` copies the code units into a fresh flat string with no
27
+ * parent pointer. It is code-unit exact, including lone surrogates, because
28
+ * `split("")` splits on UTF-16 code units rather than code points.
29
+ *
30
+ * Use this at any truncation whose result outlives the value it came from —
31
+ * memoized projections, durable checkpoints, catalogs, persisted summaries.
32
+ * A truncation that is consumed and dropped within the same turn does not need
33
+ * it, and paying for a copy there is waste.
34
+ */
35
+ export function flattenTruncatedString(value: string): string {
36
+ return value.split("").join("");
37
+ }
@@ -1,5 +1,6 @@
1
1
  import { execFile } from "node:child_process";
2
2
  import type { ExtractedContent } from "./extract.js";
3
+ import { flattenTruncatedString } from "./flat-string.js";
3
4
  import type { GitHubUrlInfo } from "./github-extract.js";
4
5
 
5
6
  const MAX_TREE_ENTRIES = 200;
@@ -97,7 +98,7 @@ async function fetchReadmeViaApi(owner: string, repo: string, ref: string): Prom
97
98
  }
98
99
  try {
99
100
  const decoded = Buffer.from(stdout.trim(), "base64").toString("utf-8");
100
- resolve(decoded.length > 8192 ? decoded.slice(0, 8192) + "\n\n[README truncated at 8K chars]" : decoded);
101
+ resolve(decoded.length > 8192 ? flattenTruncatedString(decoded.slice(0, 8192) + "\n\n[README truncated at 8K chars]") : decoded);
101
102
  } catch {
102
103
  resolve(null);
103
104
  }
@@ -3,6 +3,7 @@ import { execFile } from "node:child_process";
3
3
  import { extname, join, resolve as resolvePath, sep as pathSep } from "node:path";
4
4
  import { activityMonitor } from "./activity.js";
5
5
  import type { ExtractedContent } from "./extract.js";
6
+ import { flattenTruncatedString } from "./flat-string.js";
6
7
  import { checkGhAvailable, checkRepoSize, fetchViaApi, showGhHint } from "./github-api.js";
7
8
  import { BINARY_EXTENSIONS, MAX_INLINE_FILE_CHARS, MAX_TREE_ENTRIES, NOISE_DIRS, loadGitHubConfig, parseGitHubUrl, resetGitHubConfig, type GitHubCloneConfig, type GitHubUrlInfo } from "./github-config.js";
8
9
  export { parseGitHubUrl, type GitHubUrlInfo } from "./github-config.js";
@@ -225,14 +226,14 @@ function buildDirListing(rootPath: string, subPath: string): string {
225
226
  return lines.join("\n");
226
227
  }
227
228
 
228
- function readReadme(localPath: string): string | null {
229
+ export function readReadme(localPath: string): string | null {
229
230
  const candidates = ["README.md", "readme.md", "README", "README.txt", "README.rst"];
230
231
  for (const name of candidates) {
231
232
  const readmePath = join(localPath, name);
232
233
  if (existsSync(readmePath)) {
233
234
  try {
234
235
  const content = readFileSync(readmePath, "utf-8");
235
- return content.length > 8192 ? content.slice(0, 8192) + "\n\n[README truncated at 8K chars]" : content;
236
+ return content.length > 8192 ? flattenTruncatedString(content.slice(0, 8192) + "\n\n[README truncated at 8K chars]") : content;
236
237
  } catch {
237
238
  continue;
238
239
  }
@@ -2,7 +2,7 @@ import type { ExtensionAPI } from "@bastani/atomic";
2
2
  import { CONFIG_DIR_NAME } from "@bastani/atomic";
3
3
  import { appendFileSync } from "node:fs";
4
4
  import { getActiveGoogleEmail, isGeminiWebAvailable } from "./gemini-web.js";
5
- import { isBrowserCookieAccessAllowed } from "./gemini-web-config.js";
5
+ import { isBrowserCookieAccessAllowed } from "./gemini-web-config.ts";
6
6
  import { deleteResult, getAllResults } from "./storage.js";
7
7
  import { loadConfigForExtensionInit, resolveWorkflow, saveConfig, type WebSearchWorkflow } from "./web-search-config.js";
8
8