@bastani/atomic 0.9.19-alpha.1 → 0.9.19-alpha.3

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 (720) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +23 -0
  3. package/dist/builtin/intercom/README.md +21 -11
  4. package/dist/builtin/intercom/broker/broker.ts +81 -9
  5. package/dist/builtin/intercom/broker/client.ts +22 -0
  6. package/dist/builtin/intercom/broker/framing.ts +5 -2
  7. package/dist/builtin/intercom/broker/group-membership.ts +4 -2
  8. package/dist/builtin/intercom/broker/presence-handler.ts +14 -0
  9. package/dist/builtin/intercom/broker/send-handler.ts +43 -5
  10. package/dist/builtin/intercom/broker/terminal-questions.ts +29 -0
  11. package/dist/builtin/intercom/index.bundle.mjs +978 -742
  12. package/dist/builtin/intercom/package.json +2 -2
  13. package/dist/builtin/intercom/recipient-purpose.ts +9 -0
  14. package/dist/builtin/intercom/recoverable-disconnect.ts +2 -3
  15. package/dist/builtin/intercom/retry-policy.ts +4 -2
  16. package/dist/builtin/intercom/skills/intercom/SKILL.md +5 -4
  17. package/dist/builtin/intercom/types.ts +18 -3
  18. package/dist/builtin/mcp/CHANGELOG.md +6 -0
  19. package/dist/builtin/mcp/README.md +2 -0
  20. package/dist/builtin/mcp/index.bundle.mjs +2201 -12000
  21. package/dist/builtin/mcp/package.json +2 -2
  22. package/dist/builtin/subagents/CHANGELOG.md +33 -0
  23. package/dist/builtin/subagents/README.md +35 -14
  24. package/dist/builtin/subagents/agents/code-simplifier.md +1 -1
  25. package/dist/builtin/subagents/agents/codebase-analyzer.md +1 -1
  26. package/dist/builtin/subagents/agents/codebase-locator.md +2 -2
  27. package/dist/builtin/subagents/agents/codebase-online-researcher.md +1 -1
  28. package/dist/builtin/subagents/agents/codebase-pattern-finder.md +2 -2
  29. package/dist/builtin/subagents/agents/codebase-research-analyzer.md +1 -1
  30. package/dist/builtin/subagents/agents/codebase-research-locator.md +2 -2
  31. package/dist/builtin/subagents/agents/debugger.md +1 -1
  32. package/dist/builtin/subagents/agents/worker.md +1 -1
  33. package/dist/builtin/subagents/package.json +2 -2
  34. package/dist/builtin/subagents/skills/herdr/LICENSE +201 -0
  35. package/dist/builtin/subagents/skills/herdr/SKILL.md +202 -0
  36. package/dist/builtin/subagents/skills/subagent/SKILL.md +14 -10
  37. package/dist/builtin/subagents/skills/tmux/SKILL.md +1 -1
  38. package/dist/builtin/subagents/src/extension/index.bundle.mjs +1286 -611
  39. package/dist/builtin/web-access/index.bundle.mjs +26280 -26274
  40. package/dist/builtin/web-access/package.json +2 -2
  41. package/dist/builtin/workflows/CHANGELOG.md +51 -0
  42. package/dist/builtin/workflows/README.md +1 -1
  43. package/dist/builtin/workflows/builtin/adversarial-verification.js +5 -7
  44. package/dist/builtin/workflows/builtin/{chunk-reqr3sr3.js → chunk-1kx4aggw.js} +22 -22
  45. package/dist/builtin/workflows/builtin/{chunk-42s7sw0b.js → chunk-62v3gg9f.js} +9 -9
  46. package/dist/builtin/workflows/builtin/{chunk-wgccch41.js → chunk-6w6cvk6b.js} +16 -16
  47. package/dist/builtin/workflows/builtin/{chunk-zbekjqew.js → chunk-a2kdsqn8.js} +4 -4
  48. package/dist/builtin/workflows/builtin/{chunk-ze5x3d1r.js → chunk-fg9esgkj.js} +7 -7
  49. package/dist/builtin/workflows/builtin/{chunk-n8h4yyew.js → chunk-g0csgs7w.js} +11 -11
  50. package/dist/builtin/workflows/builtin/{chunk-79fjkcvh.js → chunk-hbnwv56f.js} +17 -17
  51. package/dist/builtin/workflows/builtin/{chunk-ed4jfn5t.js → chunk-mygmtz6e.js} +43 -43
  52. package/dist/builtin/workflows/builtin/{chunk-7430zyas.js → chunk-p8jjwfg6.js} +1 -1
  53. package/dist/builtin/workflows/builtin/{chunk-hqpe2cyx.js → chunk-r9qq7xfj.js} +49 -49
  54. package/dist/builtin/workflows/builtin/{chunk-k3w87x8y.js → chunk-t6x2d78s.js} +10 -10
  55. package/dist/builtin/workflows/builtin/{chunk-6fqs7c01.js → chunk-z0d03ktm.js} +1 -1
  56. package/dist/builtin/workflows/builtin/{chunk-b0v2xab1.js → chunk-zggjyg5z.js} +221 -23
  57. package/dist/builtin/workflows/builtin/classify-and-act.js +5 -6
  58. package/dist/builtin/workflows/builtin/fan-out-and-synthesize.js +3 -4
  59. package/dist/builtin/workflows/builtin/generate-and-filter.js +5 -6
  60. package/dist/builtin/workflows/builtin/goal.js +7 -8
  61. package/dist/builtin/workflows/builtin/index.js +20 -22
  62. package/dist/builtin/workflows/builtin/loop-until-done.js +5 -6
  63. package/dist/builtin/workflows/builtin/open-claude-design.js +3 -3
  64. package/dist/builtin/workflows/builtin/ralph.js +7 -8
  65. package/dist/builtin/workflows/builtin/steering-context.js +3 -3
  66. package/dist/builtin/workflows/builtin/tournament.js +5 -7
  67. package/dist/builtin/workflows/package.json +2 -2
  68. package/dist/builtin/workflows/src/extension/index.bundle.mjs +26708 -25862
  69. package/dist/builtin/workflows/src/index.js +921 -477
  70. package/dist/cli/config-selector.js.map +1 -1
  71. package/dist/cli/startup-ui.d.ts +1 -1
  72. package/dist/cli/startup-ui.js.map +1 -1
  73. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  74. package/dist/core/agent-session-auto-compaction.js +5 -4
  75. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  76. package/dist/core/agent-session-bash.d.ts +1 -1
  77. package/dist/core/agent-session-bash.d.ts.map +1 -1
  78. package/dist/core/agent-session-bash.js +5 -1
  79. package/dist/core/agent-session-bash.js.map +1 -1
  80. package/dist/core/agent-session-compaction.d.ts +1 -1
  81. package/dist/core/agent-session-compaction.js.map +1 -1
  82. package/dist/core/agent-session-custom-message-commit.d.ts +1 -1
  83. package/dist/core/agent-session-custom-message-commit.js.map +1 -1
  84. package/dist/core/agent-session-delivery-forwarding.d.ts +1 -1
  85. package/dist/core/agent-session-delivery-forwarding.js.map +1 -1
  86. package/dist/core/agent-session-events.d.ts.map +1 -1
  87. package/dist/core/agent-session-events.js +5 -0
  88. package/dist/core/agent-session-events.js.map +1 -1
  89. package/dist/core/agent-session-export.d.ts +1 -1
  90. package/dist/core/agent-session-export.js.map +1 -1
  91. package/dist/core/agent-session-extension-bindings.d.ts +8 -1
  92. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  93. package/dist/core/agent-session-extension-bindings.js +45 -3
  94. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  95. package/dist/core/agent-session-message-queue.d.ts +1 -1
  96. package/dist/core/agent-session-message-queue.d.ts.map +1 -1
  97. package/dist/core/agent-session-message-queue.js +2 -2
  98. package/dist/core/agent-session-message-queue.js.map +1 -1
  99. package/dist/core/agent-session-methods.d.ts +17 -7
  100. package/dist/core/agent-session-methods.d.ts.map +1 -1
  101. package/dist/core/agent-session-methods.js.map +1 -1
  102. package/dist/core/agent-session-prompt.d.ts +2 -2
  103. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  104. package/dist/core/agent-session-prompt.js +22 -18
  105. package/dist/core/agent-session-prompt.js.map +1 -1
  106. package/dist/core/agent-session-runtime-auth.d.ts +1 -1
  107. package/dist/core/agent-session-runtime-auth.js.map +1 -1
  108. package/dist/core/agent-session-runtime.d.ts +13 -4
  109. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  110. package/dist/core/agent-session-runtime.js +27 -4
  111. package/dist/core/agent-session-runtime.js.map +1 -1
  112. package/dist/core/agent-session-services.d.ts +5 -1
  113. package/dist/core/agent-session-services.d.ts.map +1 -1
  114. package/dist/core/agent-session-services.js +44 -34
  115. package/dist/core/agent-session-services.js.map +1 -1
  116. package/dist/core/agent-session-state.d.ts +1 -1
  117. package/dist/core/agent-session-state.js.map +1 -1
  118. package/dist/core/agent-session-tasks.d.ts +14 -0
  119. package/dist/core/agent-session-tasks.d.ts.map +1 -0
  120. package/dist/core/agent-session-tasks.js +120 -0
  121. package/dist/core/agent-session-tasks.js.map +1 -0
  122. package/dist/core/agent-session-tool-registry.d.ts +1 -0
  123. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  124. package/dist/core/agent-session-tool-registry.js +30 -5
  125. package/dist/core/agent-session-tool-registry.js.map +1 -1
  126. package/dist/core/agent-session-tree.d.ts.map +1 -1
  127. package/dist/core/agent-session-tree.js +3 -0
  128. package/dist/core/agent-session-tree.js.map +1 -1
  129. package/dist/core/agent-session-types.d.ts +2 -2
  130. package/dist/core/agent-session-types.js.map +1 -1
  131. package/dist/core/agent-session.d.ts +4 -1
  132. package/dist/core/agent-session.d.ts.map +1 -1
  133. package/dist/core/agent-session.js +7 -1
  134. package/dist/core/agent-session.js.map +1 -1
  135. package/dist/core/bash-executor.d.ts +1 -1
  136. package/dist/core/bash-executor.js.map +1 -1
  137. package/dist/core/export-html/index.js.map +1 -1
  138. package/dist/core/export-html/tool-renderer.d.ts +1 -1
  139. package/dist/core/export-html/tool-renderer.js.map +1 -1
  140. package/dist/core/extension-session-state.js.map +1 -1
  141. package/dist/core/extensions/agent-events.d.ts +4 -4
  142. package/dist/core/extensions/agent-events.d.ts.map +1 -1
  143. package/dist/core/extensions/agent-events.js.map +1 -1
  144. package/dist/core/extensions/api-types.d.ts +8 -2
  145. package/dist/core/extensions/api-types.d.ts.map +1 -1
  146. package/dist/core/extensions/api-types.js.map +1 -1
  147. package/dist/core/extensions/context-types.d.ts +9 -0
  148. package/dist/core/extensions/context-types.d.ts.map +1 -1
  149. package/dist/core/extensions/context-types.js.map +1 -1
  150. package/dist/core/extensions/event-results.d.ts +1 -1
  151. package/dist/core/extensions/event-results.js.map +1 -1
  152. package/dist/core/extensions/event-types.d.ts +2 -1
  153. package/dist/core/extensions/event-types.d.ts.map +1 -1
  154. package/dist/core/extensions/event-types.js.map +1 -1
  155. package/dist/core/extensions/index.d.ts +2 -1
  156. package/dist/core/extensions/index.d.ts.map +1 -1
  157. package/dist/core/extensions/index.js.map +1 -1
  158. package/dist/core/extensions/loader-api.d.ts +1 -1
  159. package/dist/core/extensions/loader-api.d.ts.map +1 -1
  160. package/dist/core/extensions/loader-api.js +10 -0
  161. package/dist/core/extensions/loader-api.js.map +1 -1
  162. package/dist/core/extensions/loader-core.d.ts +1 -1
  163. package/dist/core/extensions/loader-core.js.map +1 -1
  164. package/dist/core/extensions/loader-discovery.d.ts +1 -1
  165. package/dist/core/extensions/loader-discovery.js.map +1 -1
  166. package/dist/core/extensions/loader-host-modules.d.ts +1 -1
  167. package/dist/core/extensions/loader-host-modules.d.ts.map +1 -1
  168. package/dist/core/extensions/loader-host-modules.js +2 -1
  169. package/dist/core/extensions/loader-host-modules.js.map +1 -1
  170. package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
  171. package/dist/core/extensions/loader-runtime.js +3 -0
  172. package/dist/core/extensions/loader-runtime.js.map +1 -1
  173. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  174. package/dist/core/extensions/loader-virtual-modules.js +4 -1
  175. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  176. package/dist/core/extensions/loader.d.ts +1 -1
  177. package/dist/core/extensions/loader.js.map +1 -1
  178. package/dist/core/extensions/message-types.d.ts +1 -1
  179. package/dist/core/extensions/message-types.js.map +1 -1
  180. package/dist/core/extensions/runner-context.d.ts +11 -1
  181. package/dist/core/extensions/runner-context.d.ts.map +1 -1
  182. package/dist/core/extensions/runner-context.js +41 -2
  183. package/dist/core/extensions/runner-context.js.map +1 -1
  184. package/dist/core/extensions/runner-events.d.ts +1 -1
  185. package/dist/core/extensions/runner-events.d.ts.map +1 -1
  186. package/dist/core/extensions/runner-events.js +17 -2
  187. package/dist/core/extensions/runner-events.js.map +1 -1
  188. package/dist/core/extensions/runner-ui.js.map +1 -1
  189. package/dist/core/extensions/runner.d.ts +17 -2
  190. package/dist/core/extensions/runner.d.ts.map +1 -1
  191. package/dist/core/extensions/runner.js +68 -18
  192. package/dist/core/extensions/runner.js.map +1 -1
  193. package/dist/core/extensions/runtime-types.d.ts +4 -1
  194. package/dist/core/extensions/runtime-types.d.ts.map +1 -1
  195. package/dist/core/extensions/runtime-types.js.map +1 -1
  196. package/dist/core/extensions/tool-types.d.ts +1 -1
  197. package/dist/core/extensions/tool-types.js.map +1 -1
  198. package/dist/core/extensions/types.d.ts +1 -0
  199. package/dist/core/extensions/types.d.ts.map +1 -1
  200. package/dist/core/extensions/types.js.map +1 -1
  201. package/dist/core/extensions/ui-types.d.ts +5 -1
  202. package/dist/core/extensions/ui-types.d.ts.map +1 -1
  203. package/dist/core/extensions/ui-types.js.map +1 -1
  204. package/dist/core/extensions/workflow-activity-hub.d.ts +25 -0
  205. package/dist/core/extensions/workflow-activity-hub.d.ts.map +1 -0
  206. package/dist/core/extensions/workflow-activity-hub.js +183 -0
  207. package/dist/core/extensions/workflow-activity-hub.js.map +1 -0
  208. package/dist/core/extensions/workflow-events.d.ts +118 -0
  209. package/dist/core/extensions/workflow-events.d.ts.map +1 -0
  210. package/dist/core/extensions/workflow-events.js +2 -0
  211. package/dist/core/extensions/workflow-events.js.map +1 -0
  212. package/dist/core/footer-data-provider.d.ts +8 -4
  213. package/dist/core/footer-data-provider.d.ts.map +1 -1
  214. package/dist/core/footer-data-provider.js +97 -11
  215. package/dist/core/footer-data-provider.js.map +1 -1
  216. package/dist/core/index.d.ts +3 -3
  217. package/dist/core/index.js.map +1 -1
  218. package/dist/core/keybindings.d.ts +27 -2
  219. package/dist/core/keybindings.d.ts.map +1 -1
  220. package/dist/core/keybindings.js +7 -2
  221. package/dist/core/keybindings.js.map +1 -1
  222. package/dist/core/mandatory-runtime-tools.d.ts +1 -1
  223. package/dist/core/mandatory-runtime-tools.js.map +1 -1
  224. package/dist/core/model-fallback-failures.js +2 -2
  225. package/dist/core/model-fallback-failures.js.map +1 -1
  226. package/dist/core/model-registry.d.ts +5 -1
  227. package/dist/core/model-registry.d.ts.map +1 -1
  228. package/dist/core/model-registry.js +8 -0
  229. package/dist/core/model-registry.js.map +1 -1
  230. package/dist/core/model-resolver-defaults.js +1 -1
  231. package/dist/core/model-resolver-defaults.js.map +1 -1
  232. package/dist/core/resource-loader-assets.js.map +1 -1
  233. package/dist/core/resource-loader-core.d.ts +1 -1
  234. package/dist/core/resource-loader-core.js.map +1 -1
  235. package/dist/core/resource-loader-internals.d.ts +2 -2
  236. package/dist/core/resource-loader-internals.js.map +1 -1
  237. package/dist/core/resource-loader-reload.d.ts +2 -0
  238. package/dist/core/resource-loader-reload.d.ts.map +1 -1
  239. package/dist/core/resource-loader-reload.js +231 -191
  240. package/dist/core/resource-loader-reload.js.map +1 -1
  241. package/dist/core/resource-loader-types.d.ts +4 -2
  242. package/dist/core/resource-loader-types.d.ts.map +1 -1
  243. package/dist/core/resource-loader-types.js.map +1 -1
  244. package/dist/core/retry-policy.d.ts +1 -0
  245. package/dist/core/retry-policy.d.ts.map +1 -1
  246. package/dist/core/retry-policy.js +2 -1
  247. package/dist/core/retry-policy.js.map +1 -1
  248. package/dist/core/sdk-exports.d.ts +2 -2
  249. package/dist/core/sdk-exports.js.map +1 -1
  250. package/dist/core/sdk-types.d.ts +2 -2
  251. package/dist/core/sdk-types.js.map +1 -1
  252. package/dist/core/sdk.js.map +1 -1
  253. package/dist/core/settings-manager-basic-accessors.d.ts +1 -0
  254. package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
  255. package/dist/core/settings-manager-basic-accessors.js +2 -0
  256. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  257. package/dist/core/settings-manager-core.d.ts.map +1 -1
  258. package/dist/core/settings-manager-core.js +10 -4
  259. package/dist/core/settings-manager-core.js.map +1 -1
  260. package/dist/core/settings-storage.d.ts +1 -0
  261. package/dist/core/settings-storage.d.ts.map +1 -1
  262. package/dist/core/settings-storage.js +18 -0
  263. package/dist/core/settings-storage.js.map +1 -1
  264. package/dist/core/settings-types.d.ts +12 -0
  265. package/dist/core/settings-types.d.ts.map +1 -1
  266. package/dist/core/settings-types.js.map +1 -1
  267. package/dist/core/slash-commands.d.ts.map +1 -1
  268. package/dist/core/slash-commands.js +2 -0
  269. package/dist/core/slash-commands.js.map +1 -1
  270. package/dist/core/system-prompt.d.ts.map +1 -1
  271. package/dist/core/system-prompt.js +5 -6
  272. package/dist/core/system-prompt.js.map +1 -1
  273. package/dist/core/tasks/agent-adapter.d.ts +41 -0
  274. package/dist/core/tasks/agent-adapter.d.ts.map +1 -0
  275. package/dist/core/tasks/agent-adapter.js +105 -0
  276. package/dist/core/tasks/agent-adapter.js.map +1 -0
  277. package/dist/core/tasks/command-output.d.ts +15 -0
  278. package/dist/core/tasks/command-output.d.ts.map +1 -0
  279. package/dist/core/tasks/command-output.js +29 -0
  280. package/dist/core/tasks/command-output.js.map +1 -0
  281. package/dist/core/tasks/completion-ordering.d.ts +11 -0
  282. package/dist/core/tasks/completion-ordering.d.ts.map +1 -0
  283. package/dist/core/tasks/completion-ordering.js +19 -0
  284. package/dist/core/tasks/completion-ordering.js.map +1 -0
  285. package/dist/core/tasks/completion.d.ts +36 -0
  286. package/dist/core/tasks/completion.d.ts.map +1 -0
  287. package/dist/core/tasks/completion.js +115 -0
  288. package/dist/core/tasks/completion.js.map +1 -0
  289. package/dist/core/tasks/contracts.d.ts +404 -0
  290. package/dist/core/tasks/contracts.d.ts.map +1 -0
  291. package/dist/core/tasks/contracts.js +2 -0
  292. package/dist/core/tasks/contracts.js.map +1 -0
  293. package/dist/core/tasks/execution-scope.d.ts +10 -0
  294. package/dist/core/tasks/execution-scope.d.ts.map +1 -0
  295. package/dist/core/tasks/execution-scope.js +27 -0
  296. package/dist/core/tasks/execution-scope.js.map +1 -0
  297. package/dist/core/tasks/owner-store.d.ts +53 -0
  298. package/dist/core/tasks/owner-store.d.ts.map +1 -0
  299. package/dist/core/tasks/owner-store.js +155 -0
  300. package/dist/core/tasks/owner-store.js.map +1 -0
  301. package/dist/core/tasks/pause.d.ts +4 -0
  302. package/dist/core/tasks/pause.d.ts.map +1 -0
  303. package/dist/core/tasks/pause.js +49 -0
  304. package/dist/core/tasks/pause.js.map +1 -0
  305. package/dist/core/tasks/supervisor.d.ts +123 -0
  306. package/dist/core/tasks/supervisor.d.ts.map +1 -0
  307. package/dist/core/tasks/supervisor.js +942 -0
  308. package/dist/core/tasks/supervisor.js.map +1 -0
  309. package/dist/core/tasks/transcript.d.ts +23 -0
  310. package/dist/core/tasks/transcript.d.ts.map +1 -0
  311. package/dist/core/tasks/transcript.js +74 -0
  312. package/dist/core/tasks/transcript.js.map +1 -0
  313. package/dist/core/tools/ask-user-question/ask-user-question.d.ts +2 -2
  314. package/dist/core/tools/ask-user-question/ask-user-question.d.ts.map +1 -1
  315. package/dist/core/tools/ask-user-question/ask-user-question.js +8 -4
  316. package/dist/core/tools/ask-user-question/ask-user-question.js.map +1 -1
  317. package/dist/core/tools/ask-user-question/state/build-questionnaire.d.ts +1 -1
  318. package/dist/core/tools/ask-user-question/state/build-questionnaire.js.map +1 -1
  319. package/dist/core/tools/ask-user-question/state/questionnaire-session.d.ts +1 -1
  320. package/dist/core/tools/ask-user-question/state/questionnaire-session.js.map +1 -1
  321. package/dist/core/tools/ask-user-question/view/components/multi-select-view.d.ts +1 -1
  322. package/dist/core/tools/ask-user-question/view/components/multi-select-view.js.map +1 -1
  323. package/dist/core/tools/ask-user-question/view/components/preview/markdown-content-cache.d.ts +1 -1
  324. package/dist/core/tools/ask-user-question/view/components/preview/markdown-content-cache.js.map +1 -1
  325. package/dist/core/tools/ask-user-question/view/components/preview/preview-block-renderer.d.ts +1 -1
  326. package/dist/core/tools/ask-user-question/view/components/preview/preview-block-renderer.js.map +1 -1
  327. package/dist/core/tools/ask-user-question/view/components/submit-picker.d.ts +1 -1
  328. package/dist/core/tools/ask-user-question/view/components/submit-picker.js.map +1 -1
  329. package/dist/core/tools/ask-user-question/view/components/tab-bar.d.ts +1 -1
  330. package/dist/core/tools/ask-user-question/view/components/tab-bar.js.map +1 -1
  331. package/dist/core/tools/ask-user-question/view/dialog-builder.d.ts +1 -1
  332. package/dist/core/tools/ask-user-question/view/dialog-builder.js.map +1 -1
  333. package/dist/core/tools/ask-user-question/view/tab-content-strategy.d.ts +1 -1
  334. package/dist/core/tools/ask-user-question/view/tab-content-strategy.js.map +1 -1
  335. package/dist/core/tools/bash-pty-native.d.ts +18 -3
  336. package/dist/core/tools/bash-pty-native.d.ts.map +1 -1
  337. package/dist/core/tools/bash-pty-native.js +116 -1
  338. package/dist/core/tools/bash-pty-native.js.map +1 -1
  339. package/dist/core/tools/bash.d.ts +13 -4
  340. package/dist/core/tools/bash.d.ts.map +1 -1
  341. package/dist/core/tools/bash.js +53 -9
  342. package/dist/core/tools/bash.js.map +1 -1
  343. package/dist/core/tools/edit.d.ts.map +1 -1
  344. package/dist/core/tools/edit.js +1 -2
  345. package/dist/core/tools/edit.js.map +1 -1
  346. package/dist/core/tools/find.js.map +1 -1
  347. package/dist/core/tools/grep.js.map +1 -1
  348. package/dist/core/tools/index.d.ts +2 -2
  349. package/dist/core/tools/index.js.map +1 -1
  350. package/dist/core/tools/ls.js.map +1 -1
  351. package/dist/core/tools/powershell.d.ts +20 -10
  352. package/dist/core/tools/powershell.d.ts.map +1 -1
  353. package/dist/core/tools/powershell.js +33 -7
  354. package/dist/core/tools/powershell.js.map +1 -1
  355. package/dist/core/tools/read.d.ts.map +1 -1
  356. package/dist/core/tools/read.js +1 -2
  357. package/dist/core/tools/read.js.map +1 -1
  358. package/dist/core/tools/render-utils.d.ts +1 -1
  359. package/dist/core/tools/render-utils.js.map +1 -1
  360. package/dist/core/tools/resource-selectors.d.ts +1 -1
  361. package/dist/core/tools/resource-selectors.d.ts.map +1 -1
  362. package/dist/core/tools/resource-selectors.js +21 -10
  363. package/dist/core/tools/resource-selectors.js.map +1 -1
  364. package/dist/core/tools/search.js.map +1 -1
  365. package/dist/core/tools/todos-render.d.ts +1 -1
  366. package/dist/core/tools/todos-render.js.map +1 -1
  367. package/dist/core/tools/write.d.ts.map +1 -1
  368. package/dist/core/tools/write.js +1 -2
  369. package/dist/core/tools/write.js.map +1 -1
  370. package/dist/core/workflow-stage-admission.d.ts +10 -0
  371. package/dist/core/workflow-stage-admission.d.ts.map +1 -1
  372. package/dist/core/workflow-stage-admission.js +24 -0
  373. package/dist/core/workflow-stage-admission.js.map +1 -1
  374. package/dist/extensions/herdr/activity.d.ts +15 -0
  375. package/dist/extensions/herdr/activity.d.ts.map +1 -0
  376. package/dist/extensions/herdr/activity.js +24 -0
  377. package/dist/extensions/herdr/activity.js.map +1 -0
  378. package/dist/extensions/herdr/environment.d.ts +7 -0
  379. package/dist/extensions/herdr/environment.d.ts.map +1 -0
  380. package/dist/extensions/herdr/environment.js +6 -0
  381. package/dist/extensions/herdr/environment.js.map +1 -0
  382. package/dist/extensions/herdr/index.d.ts +9 -0
  383. package/dist/extensions/herdr/index.d.ts.map +1 -0
  384. package/dist/extensions/herdr/index.js +225 -0
  385. package/dist/extensions/herdr/index.js.map +1 -0
  386. package/dist/extensions/herdr/pane-owner.d.ts +30 -0
  387. package/dist/extensions/herdr/pane-owner.d.ts.map +1 -0
  388. package/dist/extensions/herdr/pane-owner.js +111 -0
  389. package/dist/extensions/herdr/pane-owner.js.map +1 -0
  390. package/dist/extensions/herdr/transport.d.ts +8 -0
  391. package/dist/extensions/herdr/transport.d.ts.map +1 -0
  392. package/dist/extensions/herdr/transport.js +28 -0
  393. package/dist/extensions/herdr/transport.js.map +1 -0
  394. package/dist/extensions/index.d.ts.map +1 -1
  395. package/dist/extensions/index.js +2 -0
  396. package/dist/extensions/index.js.map +1 -1
  397. package/dist/extensions/llama/huggingface-ui.d.ts +1 -1
  398. package/dist/extensions/llama/huggingface-ui.js.map +1 -1
  399. package/dist/extensions/llama/ui.js.map +1 -1
  400. package/dist/index-extensions.d.ts +3 -2
  401. package/dist/index-extensions.d.ts.map +1 -1
  402. package/dist/index-extensions.js.map +1 -1
  403. package/dist/index.d.ts +11 -3
  404. package/dist/index.d.ts.map +1 -1
  405. package/dist/index.js +8 -0
  406. package/dist/index.js.map +1 -1
  407. package/dist/main-session.js.map +1 -1
  408. package/dist/main.d.ts.map +1 -1
  409. package/dist/main.js +149 -69
  410. package/dist/main.js.map +1 -1
  411. package/dist/modes/interactive/components/armin.js.map +1 -1
  412. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  413. package/dist/modes/interactive/components/atomic-banner.d.ts +1 -1
  414. package/dist/modes/interactive/components/atomic-banner.js.map +1 -1
  415. package/dist/modes/interactive/components/atomic-working-status.js.map +1 -1
  416. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  417. package/dist/modes/interactive/components/bordered-loader.d.ts +1 -1
  418. package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
  419. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  420. package/dist/modes/interactive/components/chat-message-renderer.d.ts +12 -0
  421. package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
  422. package/dist/modes/interactive/components/chat-message-renderer.js +44 -0
  423. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  424. package/dist/modes/interactive/components/chat-session-host-actions.d.ts +1 -1
  425. package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
  426. package/dist/modes/interactive/components/chat-session-host-actions.js +43 -8
  427. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  428. package/dist/modes/interactive/components/chat-session-host-editor.d.ts +1 -1
  429. package/dist/modes/interactive/components/chat-session-host-editor.js.map +1 -1
  430. package/dist/modes/interactive/components/chat-session-host-events.d.ts +2 -2
  431. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  432. package/dist/modes/interactive/components/chat-session-host-rendering.d.ts +2 -2
  433. package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
  434. package/dist/modes/interactive/components/chat-session-host-rendering.js +12 -3
  435. package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
  436. package/dist/modes/interactive/components/chat-session-host-runtime.d.ts +4 -5
  437. package/dist/modes/interactive/components/chat-session-host-runtime.d.ts.map +1 -1
  438. package/dist/modes/interactive/components/chat-session-host-runtime.js +8 -6
  439. package/dist/modes/interactive/components/chat-session-host-runtime.js.map +1 -1
  440. package/dist/modes/interactive/components/chat-session-host-state.d.ts +7 -2
  441. package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
  442. package/dist/modes/interactive/components/chat-session-host-state.js +1 -0
  443. package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
  444. package/dist/modes/interactive/components/chat-session-host-terminal-cleanup.d.ts +1 -1
  445. package/dist/modes/interactive/components/chat-session-host-terminal-cleanup.js.map +1 -1
  446. package/dist/modes/interactive/components/chat-session-host-types.d.ts +8 -3
  447. package/dist/modes/interactive/components/chat-session-host-types.d.ts.map +1 -1
  448. package/dist/modes/interactive/components/chat-session-host-types.js.map +1 -1
  449. package/dist/modes/interactive/components/chat-session-host-utils.d.ts +1 -1
  450. package/dist/modes/interactive/components/chat-session-host-utils.d.ts.map +1 -1
  451. package/dist/modes/interactive/components/chat-session-host-utils.js +2 -0
  452. package/dist/modes/interactive/components/chat-session-host-utils.js.map +1 -1
  453. package/dist/modes/interactive/components/chat-session-host.d.ts +17 -2
  454. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  455. package/dist/modes/interactive/components/chat-session-host.js +100 -3
  456. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  457. package/dist/modes/interactive/components/chat-transcript.d.ts +1 -0
  458. package/dist/modes/interactive/components/chat-transcript.d.ts.map +1 -1
  459. package/dist/modes/interactive/components/chat-transcript.js +1 -1
  460. package/dist/modes/interactive/components/chat-transcript.js.map +1 -1
  461. package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
  462. package/dist/modes/interactive/components/config-selector-list.js.map +1 -1
  463. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  464. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  465. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  466. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  467. package/dist/modes/interactive/components/custom-message.js +12 -0
  468. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  469. package/dist/modes/interactive/components/daxnuts.js.map +1 -1
  470. package/dist/modes/interactive/components/diff.js.map +1 -1
  471. package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
  472. package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
  473. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  474. package/dist/modes/interactive/components/extension-input.js.map +1 -1
  475. package/dist/modes/interactive/components/extension-selector.js.map +1 -1
  476. package/dist/modes/interactive/components/first-time-setup.d.ts +1 -1
  477. package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
  478. package/dist/modes/interactive/components/footer.d.ts +7 -6
  479. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  480. package/dist/modes/interactive/components/footer.js +27 -9
  481. package/dist/modes/interactive/components/footer.js.map +1 -1
  482. package/dist/modes/interactive/components/host-input-form-mount.js.map +1 -1
  483. package/dist/modes/interactive/components/host-input-form.d.ts +1 -1
  484. package/dist/modes/interactive/components/host-input-form.js.map +1 -1
  485. package/dist/modes/interactive/components/index.d.ts +2 -2
  486. package/dist/modes/interactive/components/index.js.map +1 -1
  487. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
  488. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  489. package/dist/modes/interactive/components/mermaid.d.ts +1 -1
  490. package/dist/modes/interactive/components/mermaid.js.map +1 -1
  491. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  492. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  493. package/dist/modes/interactive/components/reserved-bottom-overlay.js.map +1 -1
  494. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  495. package/dist/modes/interactive/components/session-selector-header.js.map +1 -1
  496. package/dist/modes/interactive/components/session-selector-list.js.map +1 -1
  497. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  498. package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
  499. package/dist/modes/interactive/components/settings-selector-submenus.d.ts +1 -1
  500. package/dist/modes/interactive/components/settings-selector-submenus.js.map +1 -1
  501. package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -1
  502. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  503. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  504. package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
  505. package/dist/modes/interactive/components/skill-invocation-message.d.ts +1 -1
  506. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  507. package/dist/modes/interactive/components/task-completion-message.d.ts +13 -0
  508. package/dist/modes/interactive/components/task-completion-message.d.ts.map +1 -0
  509. package/dist/modes/interactive/components/task-completion-message.js +65 -0
  510. package/dist/modes/interactive/components/task-completion-message.js.map +1 -0
  511. package/dist/modes/interactive/components/task-detail.d.ts +27 -0
  512. package/dist/modes/interactive/components/task-detail.d.ts.map +1 -0
  513. package/dist/modes/interactive/components/task-detail.js +107 -0
  514. package/dist/modes/interactive/components/task-detail.js.map +1 -0
  515. package/dist/modes/interactive/components/task-inspector.d.ts +50 -0
  516. package/dist/modes/interactive/components/task-inspector.d.ts.map +1 -0
  517. package/dist/modes/interactive/components/task-inspector.js +599 -0
  518. package/dist/modes/interactive/components/task-inspector.js.map +1 -0
  519. package/dist/modes/interactive/components/task-list.d.ts +18 -0
  520. package/dist/modes/interactive/components/task-list.d.ts.map +1 -0
  521. package/dist/modes/interactive/components/task-list.js +59 -0
  522. package/dist/modes/interactive/components/task-list.js.map +1 -0
  523. package/dist/modes/interactive/components/task-live-transcript.d.ts +17 -0
  524. package/dist/modes/interactive/components/task-live-transcript.d.ts.map +1 -0
  525. package/dist/modes/interactive/components/task-live-transcript.js +33 -0
  526. package/dist/modes/interactive/components/task-live-transcript.js.map +1 -0
  527. package/dist/modes/interactive/components/task-navigation.d.ts +38 -0
  528. package/dist/modes/interactive/components/task-navigation.d.ts.map +1 -0
  529. package/dist/modes/interactive/components/task-navigation.js +93 -0
  530. package/dist/modes/interactive/components/task-navigation.js.map +1 -0
  531. package/dist/modes/interactive/components/task-row.d.ts +34 -0
  532. package/dist/modes/interactive/components/task-row.d.ts.map +1 -0
  533. package/dist/modes/interactive/components/task-row.js +158 -0
  534. package/dist/modes/interactive/components/task-row.js.map +1 -0
  535. package/dist/modes/interactive/components/theme-selector.js.map +1 -1
  536. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  537. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  538. package/dist/modes/interactive/components/transcript-follow-indicator.js.map +1 -1
  539. package/dist/modes/interactive/components/tree-selector-component.js.map +1 -1
  540. package/dist/modes/interactive/components/tree-selector-content.js.map +1 -1
  541. package/dist/modes/interactive/components/tree-selector-help.js.map +1 -1
  542. package/dist/modes/interactive/components/tree-selector-label-input.js.map +1 -1
  543. package/dist/modes/interactive/components/tree-selector-list.js.map +1 -1
  544. package/dist/modes/interactive/components/trust-selector.js.map +1 -1
  545. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  546. package/dist/modes/interactive/components/user-message.js.map +1 -1
  547. package/dist/modes/interactive/components/working-status.js.map +1 -1
  548. package/dist/modes/interactive/interactive-agent-events.js +8 -2
  549. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  550. package/dist/modes/interactive/interactive-auth-login.js +3 -1
  551. package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
  552. package/dist/modes/interactive/interactive-autocomplete.js +9 -30
  553. package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
  554. package/dist/modes/interactive/interactive-deferred-startup.js +2 -1
  555. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
  556. package/dist/modes/interactive/interactive-extension-context.js +14 -4
  557. package/dist/modes/interactive/interactive-extension-context.js.map +1 -1
  558. package/dist/modes/interactive/interactive-extension-custom-ui.js +52 -4
  559. package/dist/modes/interactive/interactive-extension-custom-ui.js.map +1 -1
  560. package/dist/modes/interactive/interactive-extension-runtime.js +1 -0
  561. package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
  562. package/dist/modes/interactive/interactive-extension-widgets.js +9 -1
  563. package/dist/modes/interactive/interactive-extension-widgets.js.map +1 -1
  564. package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
  565. package/dist/modes/interactive/interactive-input-handling.js +19 -0
  566. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  567. package/dist/modes/interactive/interactive-mode-base.d.ts +6 -1
  568. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  569. package/dist/modes/interactive/interactive-mode-base.js +4 -1
  570. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  571. package/dist/modes/interactive/interactive-mode-deps.d.ts +6 -6
  572. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  573. package/dist/modes/interactive/interactive-mode-surface.d.ts +2 -1
  574. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  575. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  576. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  577. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  578. package/dist/modes/interactive/interactive-mode.js +3 -0
  579. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  580. package/dist/modes/interactive/interactive-process-lifecycle.js +4 -1
  581. package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
  582. package/dist/modes/interactive/interactive-render-chat.js +2 -0
  583. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  584. package/dist/modes/interactive/interactive-session-routing.js +33 -23
  585. package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
  586. package/dist/modes/interactive/interactive-session-runtime.js +1 -0
  587. package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
  588. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  589. package/dist/modes/interactive/interactive-summarization-retry-events.js +2 -2
  590. package/dist/modes/interactive/interactive-summarization-retry-events.js.map +1 -1
  591. package/dist/modes/interactive/interactive-task-projection.d.ts +13 -0
  592. package/dist/modes/interactive/interactive-task-projection.d.ts.map +1 -0
  593. package/dist/modes/interactive/interactive-task-projection.js +72 -0
  594. package/dist/modes/interactive/interactive-task-projection.js.map +1 -0
  595. package/dist/modes/interactive/interactive-tui.js.map +1 -1
  596. package/dist/modes/interactive/interactive-windows-subshell.d.ts +17 -0
  597. package/dist/modes/interactive/interactive-windows-subshell.d.ts.map +1 -0
  598. package/dist/modes/interactive/interactive-windows-subshell.js +92 -0
  599. package/dist/modes/interactive/interactive-windows-subshell.js.map +1 -0
  600. package/dist/modes/interactive/skill-command-autocomplete.d.ts +12 -0
  601. package/dist/modes/interactive/skill-command-autocomplete.d.ts.map +1 -0
  602. package/dist/modes/interactive/skill-command-autocomplete.js +69 -0
  603. package/dist/modes/interactive/skill-command-autocomplete.js.map +1 -0
  604. package/dist/modes/interactive/theme/theme-class.d.ts.map +1 -1
  605. package/dist/modes/interactive/theme/theme-class.js +4 -1
  606. package/dist/modes/interactive/theme/theme-class.js.map +1 -1
  607. package/dist/modes/interactive/theme/theme-controller.d.ts +1 -1
  608. package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
  609. package/dist/modes/interactive-engine/create-isolated-runtime.d.ts +1 -1
  610. package/dist/modes/interactive-engine/create-isolated-runtime.js.map +1 -1
  611. package/dist/modes/interactive-engine/engine-custom-ui.d.ts +5 -9
  612. package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
  613. package/dist/modes/interactive-engine/engine-custom-ui.js +14 -5
  614. package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
  615. package/dist/modes/interactive-engine/engine-dialog-host.d.ts +2 -2
  616. package/dist/modes/interactive-engine/engine-dialog-host.js.map +1 -1
  617. package/dist/modes/interactive-engine/engine-project-trust.d.ts +10 -0
  618. package/dist/modes/interactive-engine/engine-project-trust.d.ts.map +1 -0
  619. package/dist/modes/interactive-engine/engine-project-trust.js +28 -0
  620. package/dist/modes/interactive-engine/engine-project-trust.js.map +1 -0
  621. package/dist/modes/interactive-engine/engine-render-service.d.ts +1 -1
  622. package/dist/modes/interactive-engine/engine-render-service.js.map +1 -1
  623. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +3 -1
  624. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -1
  625. package/dist/modes/interactive-engine/extension-ui-bridge.js +6 -0
  626. package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -1
  627. package/dist/modes/interactive-engine/input-form-host.d.ts +2 -2
  628. package/dist/modes/interactive-engine/input-form-host.js.map +1 -1
  629. package/dist/modes/interactive-engine/isolated-auth.d.ts +1 -1
  630. package/dist/modes/interactive-engine/isolated-auth.js.map +1 -1
  631. package/dist/modes/interactive-engine/isolated-runtime.d.ts +5 -2
  632. package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
  633. package/dist/modes/interactive-engine/isolated-runtime.js +40 -3
  634. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  635. package/dist/modes/interactive-engine/protocol.d.ts +9 -0
  636. package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
  637. package/dist/modes/interactive-engine/protocol.js +8 -0
  638. package/dist/modes/interactive-engine/protocol.js.map +1 -1
  639. package/dist/modes/interactive-engine/remote-component.d.ts +2 -2
  640. package/dist/modes/interactive-engine/remote-component.d.ts.map +1 -1
  641. package/dist/modes/interactive-engine/remote-component.js +3 -2
  642. package/dist/modes/interactive-engine/remote-component.js.map +1 -1
  643. package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -1
  644. package/dist/modes/interactive-engine/remote-model-catalog.js.map +1 -1
  645. package/dist/modes/interactive-engine/remote-renderer.d.ts +1 -1
  646. package/dist/modes/interactive-engine/remote-renderer.js.map +1 -1
  647. package/dist/modes/interactive-engine/session-picker-host.d.ts +2 -2
  648. package/dist/modes/interactive-engine/session-picker-host.js.map +1 -1
  649. package/dist/modes/json-event.d.ts +1 -1
  650. package/dist/modes/json-event.js.map +1 -1
  651. package/dist/modes/print-mode.js.map +1 -1
  652. package/dist/modes/rpc/rpc-bash-request-owners.d.ts +2 -2
  653. package/dist/modes/rpc/rpc-bash-request-owners.js.map +1 -1
  654. package/dist/modes/rpc/rpc-client-api.d.ts +2 -2
  655. package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
  656. package/dist/modes/rpc/rpc-client-api.js +2 -2
  657. package/dist/modes/rpc/rpc-client-api.js.map +1 -1
  658. package/dist/modes/rpc/rpc-client-waits.d.ts +1 -1
  659. package/dist/modes/rpc/rpc-client-waits.js.map +1 -1
  660. package/dist/modes/rpc/rpc-client.d.ts +3 -1
  661. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  662. package/dist/modes/rpc/rpc-client.js +20 -0
  663. package/dist/modes/rpc/rpc-client.js.map +1 -1
  664. package/dist/modes/rpc/rpc-command-handler.d.ts +4 -2
  665. package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
  666. package/dist/modes/rpc/rpc-command-handler.js +12 -4
  667. package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
  668. package/dist/modes/rpc/rpc-extension-ui.d.ts +1 -1
  669. package/dist/modes/rpc/rpc-extension-ui.js.map +1 -1
  670. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  671. package/dist/modes/rpc/rpc-mode.js +11 -2
  672. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  673. package/dist/modes/rpc/rpc-provider-auth.d.ts +1 -1
  674. package/dist/modes/rpc/rpc-provider-auth.js.map +1 -1
  675. package/dist/modes/rpc/rpc-session-binding.d.ts +4 -1
  676. package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
  677. package/dist/modes/rpc/rpc-session-binding.js +35 -1
  678. package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
  679. package/dist/modes/rpc/rpc-types.d.ts +13 -1
  680. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  681. package/dist/modes/rpc/rpc-types.js.map +1 -1
  682. package/dist/modes/rpc/task-ui-bridge.d.ts +9 -0
  683. package/dist/modes/rpc/task-ui-bridge.d.ts.map +1 -0
  684. package/dist/modes/rpc/task-ui-bridge.js +146 -0
  685. package/dist/modes/rpc/task-ui-bridge.js.map +1 -0
  686. package/dist/self-update-plan.js.map +1 -1
  687. package/docs/background-tasks.md +205 -0
  688. package/docs/compaction.md +2 -0
  689. package/docs/development.md +23 -72
  690. package/docs/docs.json +2 -0
  691. package/docs/environment-variables.md +1 -1
  692. package/docs/extensions.md +112 -6
  693. package/docs/herdr.md +53 -0
  694. package/docs/intercom.md +42 -35
  695. package/docs/keybindings.md +19 -2
  696. package/docs/models/evals.md +224 -147
  697. package/docs/models/model-selection.md +28 -19
  698. package/docs/models/pareto-efficiency.md +2 -2
  699. package/docs/providers.md +48 -46
  700. package/docs/quickstart.md +1 -1
  701. package/docs/sdk.md +244 -0
  702. package/docs/settings.md +19 -3
  703. package/docs/skills.md +23 -1
  704. package/docs/subagents.md +74 -10
  705. package/docs/themes.md +4 -0
  706. package/docs/tools.md +29 -0
  707. package/docs/tui.md +29 -2
  708. package/docs/usage.md +4 -0
  709. package/docs/windows.md +4 -4
  710. package/docs/workflows/api-reference.md +14 -5
  711. package/docs/workflows/operations.md +49 -3
  712. package/docs/workflows/reliable-design.md +35 -4
  713. package/docs/workflows/verification.md +21 -4
  714. package/docs/workflows.md +3 -1
  715. package/npm-shrinkwrap.json +797 -677
  716. package/package.json +10 -10
  717. /package/dist/builtin/workflows/builtin/{chunk-cg9tmks0.js → chunk-n1910xc4.js} +0 -0
  718. /package/dist/builtin/workflows/builtin/{chunk-wpckd35c.js → chunk-rc5ec5xx.js} +0 -0
  719. /package/dist/builtin/workflows/builtin/{chunk-7at6dnkr.js → chunk-tgt0s5e5.js} +0 -0
  720. /package/dist/builtin/workflows/builtin/{chunk-bfkmzv9h.js → chunk-xtxcq5tj.js} +0 -0
@@ -0,0 +1,146 @@
1
+ import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
2
+ import { getOwnerTaskStore, watchOwnerTaskStoreBinding } from "../../core/tasks/owner-store.js";
3
+ import { TaskInspector } from "../interactive/components/task-inspector.js";
4
+ import { isActiveBackgroundTask, renderTaskFooter } from "../interactive/components/task-list.js";
5
+ import { isPhysicalCtrlC } from "../interactive/interactive-key-identity.js";
6
+ const widgetVisibility = new WeakMap();
7
+ /** Render against the engine's owner. Native capabilities never cross the UI bridge. */
8
+ export function bindEngineTaskWidget(session, ui) {
9
+ const key = "atomic.background-tasks";
10
+ let unsubscribe = () => { };
11
+ let disposed = false;
12
+ let mounted = false;
13
+ let visible = true;
14
+ const connect = () => {
15
+ unsubscribe();
16
+ if (mounted)
17
+ ui.setWidget(key, undefined);
18
+ mounted = false;
19
+ const store = getOwnerTaskStore(session);
20
+ const update = () => {
21
+ if (disposed)
22
+ return;
23
+ if (!visible || !store?.backgroundTasks.some(isActiveBackgroundTask)) {
24
+ if (mounted)
25
+ ui.setWidget(key, undefined);
26
+ mounted = false;
27
+ return;
28
+ }
29
+ if (!mounted) {
30
+ mounted = true;
31
+ ui.setWidget(key, () => ({
32
+ invalidate() { },
33
+ render(width) {
34
+ return renderTaskFooter(store?.backgroundTasks ?? [], width);
35
+ },
36
+ }), { placement: "belowEditor" });
37
+ }
38
+ ui.requestRender();
39
+ };
40
+ unsubscribe = store?.subscribe(update) ?? (() => { });
41
+ update();
42
+ };
43
+ const unwatch = watchOwnerTaskStoreBinding(session, connect);
44
+ const unwatchWidget = ui.onWidgetRelease?.(key, () => {
45
+ mounted = false;
46
+ });
47
+ widgetVisibility.set(session, (value) => {
48
+ visible = value;
49
+ connect();
50
+ });
51
+ connect();
52
+ return () => {
53
+ disposed = true;
54
+ widgetVisibility.delete(session);
55
+ unwatch();
56
+ unwatchWidget?.();
57
+ unsubscribe();
58
+ if (mounted)
59
+ ui.setWidget(key, undefined);
60
+ };
61
+ }
62
+ export async function showEngineTaskInspector(session, ui, taskId) {
63
+ session.getAgentTaskHost();
64
+ const store = getOwnerTaskStore(session);
65
+ if (!store)
66
+ throw new Error("Task owner is unavailable");
67
+ try {
68
+ widgetVisibility.get(session)?.(false);
69
+ await showTaskInspector(ui, store, taskId);
70
+ }
71
+ finally {
72
+ widgetVisibility.get(session)?.(true);
73
+ }
74
+ }
75
+ /** Main CLI mount, shared by the local host and its isolated engine. */
76
+ export async function showTaskInspector(ui, store, taskId) {
77
+ let requestRender = () => { };
78
+ let finishView = () => { };
79
+ let closed = false;
80
+ let fullscreen = false;
81
+ const inspector = new TaskInspector(store, () => {
82
+ if (inspector.fullscreen !== fullscreen)
83
+ finishView();
84
+ else
85
+ requestRender();
86
+ }, () => {
87
+ closed = true;
88
+ finishView();
89
+ });
90
+ inspector.open(taskId);
91
+ try {
92
+ while (!closed) {
93
+ fullscreen = inspector.fullscreen;
94
+ await ui.custom((tui, _theme, _keys, done) => {
95
+ requestRender = () => tui.requestRender();
96
+ finishView = () => done();
97
+ return {
98
+ invalidate: () => inspector.invalidate(),
99
+ render: (width) => {
100
+ const height = Math.max(1, tui.terminal.rows);
101
+ if (!fullscreen)
102
+ return inspector.renderPicker(width, height);
103
+ const lines = inspector.renderViewport(width, height);
104
+ // Fullscreen detail pages cover all parent chat and prompt cells.
105
+ return Array.from({ length: height }, (_, row) => {
106
+ const line = truncateToWidth(lines[row] ?? "", width);
107
+ return line + " ".repeat(Math.max(0, width - visibleWidth(line)));
108
+ });
109
+ },
110
+ handleInput: (data) => {
111
+ if (isPhysicalCtrlC(data)) {
112
+ closed = true;
113
+ done();
114
+ }
115
+ else
116
+ inspector.handleInput(data);
117
+ return true;
118
+ },
119
+ };
120
+ }, {
121
+ overlay: fullscreen,
122
+ purpose: "navigation",
123
+ handlesCtrlC: true,
124
+ deferInlineCustomUiFocus: true,
125
+ handlesInternalUiAction: true,
126
+ ...(fullscreen
127
+ ? {
128
+ overlayOptions: {
129
+ anchor: "center",
130
+ width: "100%",
131
+ maxHeight: "100%",
132
+ margin: 0,
133
+ },
134
+ }
135
+ : {}),
136
+ });
137
+ // Host dismissal without a navigation transition must not reopen the view.
138
+ if (inspector.fullscreen === fullscreen)
139
+ closed = true;
140
+ }
141
+ }
142
+ finally {
143
+ inspector?.dispose();
144
+ }
145
+ }
146
+ //# sourceMappingURL=task-ui-bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-ui-bridge.js","sourceRoot":"","sources":["../../../src/modes/rpc/task-ui-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAIvE,OAAO,EAAE,iBAAiB,EAAuB,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACrH,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAE7E,MAAM,gBAAgB,GAAG,IAAI,OAAO,EAA4C,CAAC;AAEjF,wFAAwF;AACxF,MAAM,UAAU,oBAAoB,CAAC,OAAqB,EAAE,EAAsB;IACjF,MAAM,GAAG,GAAG,yBAAyB,CAAC;IACtC,IAAI,WAAW,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IAC3B,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,MAAM,OAAO,GAAG,GAAG,EAAE;QACpB,WAAW,EAAE,CAAC;QACd,IAAI,OAAO;YAAE,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAC1C,OAAO,GAAG,KAAK,CAAC;QAChB,MAAM,KAAK,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACzC,MAAM,MAAM,GAAG,GAAG,EAAE;YACnB,IAAI,QAAQ;gBAAE,OAAO;YACrB,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,EAAE,eAAe,CAAC,IAAI,CAAC,sBAAsB,CAAC,EAAE,CAAC;gBACtE,I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AC;wBACR,CAAC;;4BAAM,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;wBACnC,OAAO,IAAI,CAAC;oBACb,CAAC;iBACD,CAAC;YACH,CAAC,EACD;gBACC,OAAO,EAAE,UAAU;gBACnB,OAAO,EAAE,YAAY;gBACrB,YAAY,EAAE,IAAI;gBAClB,wBAAwB,EAAE,IAAI;gBAC9B,uBAAuB,EAAE,IAAI;gBAC7B,GAAG,CAAC,UAAU;oBACb,CAAC,CAAC;wBACA,cAAc,EAAE;4BACf,MAAM,EAAE,QAAiB;4BACzB,KAAK,EAAE,MAAe;4BACtB,SAAS,EAAE,MAAe;4BAC1B,MAAM,EAAE,CAAC;yBACT;qBACD;oBACF,CAAC,CAAC,EAAE,CAAC;aACN,CACD,CAAC;YACF,2EAA2E;YAC3E,IAAI,SAAS,CAAC,UAAU,KAAK,UAAU;gBAAE,MAAM,GAAG,IAAI,CAAC;QACxD,CAAC;IACF,CAAC;YAAS,CAAC;QACV,SAAS,EAAE,OAAO,EAAE,CAAC;IACtB,CAAC;AACF,CAAC","sourcesContent":["import { truncateToWidth, visibleWidth } from \"@earendil-works/pi-tui\";\nimport type { AgentSession } from \"../../core/agent-session.js\";\nimport type { ExtensionUIContext } from \"../../core/extensions/index.js\";\nimport type { TaskId } from \"../../core/tasks/contracts.js\";\nimport { getOwnerTaskStore, type OwnerTaskStore, watchOwnerTaskStoreBinding } from \"../../core/tasks/owner-store.js\";\nimport { TaskInspector } from \"../interactive/components/task-inspector.js\";\nimport { isActiveBackgroundTask, renderTaskFooter } from \"../interactive/components/task-list.js\";\nimport { isPhysicalCtrlC } from \"../interactive/interactive-key-identity.ts\";\n\nconst widgetVisibility = new WeakMap<AgentSession, (visible: boolean) => void>();\n\n/** Render against the engine's owner. Native capabilities never cross the UI bridge. */\nexport function bindEngineTaskWidget(session: AgentSession, ui: ExtensionUIContext): () => void {\n\tconst key = \"atomic.background-tasks\";\n\tlet unsubscribe = () => {};\n\tlet disposed = false;\n\tlet mounted = false;\n\tlet visible = true;\n\tconst connect = () => {\n\t\tunsubscribe();\n\t\tif (mounted) ui.setWidget(key, undefined);\n\t\tmounted = false;\n\t\tconst store = getOwnerTaskStore(session);\n\t\tconst update = () => {\n\t\t\tif (disposed) return;\n\t\t\tif (!visible || !store?.backgroundTasks.some(isActiveBackgroundTask)) {\n\t\t\t\tif (mounted) ui.setWidget(key, undefined);\n\t\t\t\tmounted = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!mounted) {\n\t\t\t\tmounted = true;\n\t\t\t\tui.setWidget(\n\t\t\t\t\tkey,\n\t\t\t\t\t() => ({\n\t\t\t\t\t\tinvalidate() {},\n\t\t\t\t\t\trender(width: number) {\n\t\t\t\t\t\t\treturn renderTaskFooter(store?.backgroundTasks ?? [], width);\n\t\t\t\t\t\t},\n\t\t\t\t\t}),\n\t\t\t\t\t{ placement: \"belowEditor\" },\n\t\t\t\t);\n\t\t\t}\n\t\t\tui.requestRender();\n\t\t};\n\t\tunsubscribe = store?.subscribe(update) ?? (() => {});\n\t\tupdate();\n\t};\n\tconst unwatch = watchOwnerTaskStoreBinding(session, connect);\n\tconst unwatchWidget = ui.onWidgetRelease?.(key, () => {\n\t\tmounted = false;\n\t});\n\twidgetVisibility.set(session, (value) => {\n\t\tvisible = value;\n\t\tconnect();\n\t});\n\tconnect();\n\treturn () => {\n\t\tdisposed = true;\n\t\twidgetVisibility.delete(session);\n\t\tunwatch();\n\t\tunwatchWidget?.();\n\t\tunsubscribe();\n\t\tif (mounted) ui.setWidget(key, undefined);\n\t};\n}\n\nexport async function showEngineTaskInspector(\n\tsession: AgentSession,\n\tui: Pick<ExtensionUIContext, \"custom\">,\n\ttaskId?: string,\n): Promise<void> {\n\tsession.getAgentTaskHost();\n\tconst store = getOwnerTaskStore(session);\n\tif (!store) throw new Error(\"Task owner is unavailable\");\n\ttry {\n\t\twidgetVisibility.get(session)?.(false);\n\t\tawait showTaskInspector(ui, store, taskId);\n\t} finally {\n\t\twidgetVisibility.get(session)?.(true);\n\t}\n}\n\n/** Main CLI mount, shared by the local host and its isolated engine. */\nexport async function showTaskInspector(\n\tui: Pick<ExtensionUIContext, \"custom\">,\n\tstore: OwnerTaskStore,\n\ttaskId?: string,\n): Promise<void> {\n\tlet requestRender = () => {};\n\tlet finishView = () => {};\n\tlet closed = false;\n\tlet fullscreen = false;\n\tconst inspector = new TaskInspector(\n\t\tstore,\n\t\t() => {\n\t\t\tif (inspector.fullscreen !== fullscreen) finishView();\n\t\t\telse requestRender();\n\t\t},\n\t\t() => {\n\t\t\tclosed = true;\n\t\t\tfinishView();\n\t\t},\n\t);\n\tinspector.open(taskId as TaskId | undefined);\n\ttry {\n\t\twhile (!closed) {\n\t\t\tfullscreen = inspector.fullscreen;\n\t\t\tawait ui.custom<void>(\n\t\t\t\t(tui, _theme, _keys, done) => {\n\t\t\t\t\trequestRender = () => tui.requestRender();\n\t\t\t\t\tfinishView = () => done();\n\t\t\t\t\treturn {\n\t\t\t\t\t\tinvalidate: () => inspector.invalidate(),\n\t\t\t\t\t\trender: (width: number) => {\n\t\t\t\t\t\t\tconst height = Math.max(1, tui.terminal.rows);\n\t\t\t\t\t\t\tif (!fullscreen) return inspector.renderPicker(width, height);\n\t\t\t\t\t\t\tconst lines = inspector.renderViewport(width, height);\n\t\t\t\t\t\t\t// Fullscreen detail pages cover all parent chat and prompt cells.\n\t\t\t\t\t\t\treturn Array.from({ length: height }, (_, row) => {\n\t\t\t\t\t\t\t\tconst line = truncateToWidth(lines[row] ?? \"\", width);\n\t\t\t\t\t\t\t\treturn line + \" \".repeat(Math.max(0, width - visibleWidth(line)));\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\thandleInput: (data: string) => {\n\t\t\t\t\t\t\tif (isPhysicalCtrlC(data)) {\n\t\t\t\t\t\t\t\tclosed = true;\n\t\t\t\t\t\t\t\tdone();\n\t\t\t\t\t\t\t} else inspector.handleInput(data);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toverlay: fullscreen,\n\t\t\t\t\tpurpose: \"navigation\",\n\t\t\t\t\thandlesCtrlC: true,\n\t\t\t\t\tdeferInlineCustomUiFocus: true,\n\t\t\t\t\thandlesInternalUiAction: true,\n\t\t\t\t\t...(fullscreen\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\toverlayOptions: {\n\t\t\t\t\t\t\t\t\tanchor: \"center\" as const,\n\t\t\t\t\t\t\t\t\twidth: \"100%\" as const,\n\t\t\t\t\t\t\t\t\tmaxHeight: \"100%\" as const,\n\t\t\t\t\t\t\t\t\tmargin: 0,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: {}),\n\t\t\t\t},\n\t\t\t);\n\t\t\t// Host dismissal without a navigation transition must not reopen the view.\n\t\t\tif (inspector.fullscreen === fullscreen) closed = true;\n\t\t}\n\t} finally {\n\t\tinspector?.dispose();\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"self-update-plan.js","sourceRoot":"","sources":["../src/self-update-plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EACN,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,GAErB,MAAM,0BAA0B,CAAC;AAUlC,MAAM,UAAU,mBAAmB,CAAC,OAAwB,EAAE,KAAK,GAAG,KAAK;IAC1E,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,YAAY,CAAC;IACxD,OAAO;QACN,WAAW;QACX,WAAW,EAAE,GAAG,WAAW,IAAI,OAAO,CAAC,OAAO,EAAE;QAChD,OAAO,EAAE,OAAO,CAA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,CAAC;aAC7B,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,OAAO,CAAC;IAChB,CAAC;AACF,CAAC","sourcesContent":["import { Markdown } from \"@earendil-works/pi-tui\";\nimport { APP_NAME, PACKAGE_NAME, VERSION } from \"./config.js\";\nimport { getMarkdownTheme } from \"./modes/interactive/theme/theme.ts\";\nimport {\n\tformatVersionCheckError,\n\tgetLatestPiRelease,\n\tisNewerPackageVersion,\n\ttype LatestPiRelease,\n} from \"./utils/version-check.ts\";\n\nexport interface SelfUpdatePlan {\n\tpackageName: string;\n\tinstallSpec: string;\n\tversion: string;\n\tshouldRun: boolean;\n\tnote?: string;\n}\n\nexport function buildSelfUpdatePlan(release: LatestPiRelease, force = false): SelfUpdatePlan {\n\tconst packageName = release.packageName ?? PACKAGE_NAME;\n\treturn {\n\t\tpackageName,\n\t\tinstallSpec: `${packageName}@${release.version}`,\n\t\tversion: release.version,\n\t\tshouldRun: force || packageName !== PACKAGE_NAME || isNewerPackageVersion(release.version, VERSION),\n\t\t...(release.note ? { note: release.note } : {}),\n\t};\n}\n\nexport async function resolveSelfUpdatePlan(force: boolean): Promise<SelfUpdatePlan> {\n\tlet release: LatestPiRelease | undefined;\n\ttry {\n\t\trelease = await getLatestPiRelease({ retry: true });\n\t} catch (error) {\n\t\tthrow new Error(`Could not determine latest ${APP_NAME} version: ${formatVersionCheckError(error)}`, {\n\t\t\tcause: error,\n\t\t});\n\t}\n\tif (!release) throw new Error(`Could not determine latest ${APP_NAME} version.`);\n\treturn buildSelfUpdatePlan(release, force);\n}\n\nexport function renderSelfUpdateNote(note: string, width = process.stdout.columns ?? 80): string | undefined {\n\tconst trimmed = note.trim();\n\tif (!trimmed) return undefined;\n\ttry {\n\t\treturn new Markdown(trimmed, 0, 0, getMarkdownTheme())\n\t\t\t.render(Math.max(20, width))\n\t\t\t.map((line) => line.trimEnd())\n\t\t\t.join(\"\\n\");\n\t} catch {\n\t\treturn trim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AO;QAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,QAAQ,WAAW,CAAC,CAAC;IACjF,OAAO,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE;IACtF,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/B,IAAI,CAAC;QACJ,OAAO,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,gBAAgB,EAAE,CAAC;aACpD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;aAC3B,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;aAC7B,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,OAAO,CAAC;IAChB,CAAC;AACF,CAAC","sourcesContent":["import { Markdown } from \"@earendil-works/pi-tui\";\nimport { APP_NAME, PACKAGE_NAME, VERSION } from \"./config.js\";\nimport { getMarkdownTheme } from \"./modes/interactive/theme/theme.js\";\nimport {\n\tformatVersionCheckError,\n\tgetLatestPiRelease,\n\tisNewerPackageVersion,\n\ttype LatestPiRelease,\n} from \"./utils/version-check.ts\";\n\nexport interface SelfUpdatePlan {\n\tpackageName: string;\n\tinstallSpec: string;\n\tversion: string;\n\tshouldRun: boolean;\n\tnote?: string;\n}\n\nexport function buildSelfUpdatePlan(release: LatestPiRelease, force = false): SelfUpdatePlan {\n\tconst packageName = release.packageName ?? PACKAGE_NAME;\n\treturn {\n\t\tpackageName,\n\t\tinstallSpec: `${packageName}@${release.version}`,\n\t\tversion: release.version,\n\t\tshouldRun: force || packageName !== PACKAGE_NAME || isNewerPackageVersion(release.version, VERSION),\n\t\t...(release.note ? { note: release.note } : {}),\n\t};\n}\n\nexport async function resolveSelfUpdatePlan(force: boolean): Promise<SelfUpdatePlan> {\n\tlet release: LatestPiRelease | undefined;\n\ttry {\n\t\trelease = await getLatestPiRelease({ retry: true });\n\t} catch (error) {\n\t\tthrow new Error(`Could not determine latest ${APP_NAME} version: ${formatVersionCheckError(error)}`, {\n\t\t\tcause: error,\n\t\t});\n\t}\n\tif (!release) throw new Error(`Could not determine latest ${APP_NAME} version.`);\n\treturn buildSelfUpdatePlan(release, force);\n}\n\nexport function renderSelfUpdateNote(note: string, width = process.stdout.columns ?? 80): string | undefined {\n\tconst trimmed = note.trim();\n\tif (!trimmed) return undefined;\n\ttry {\n\t\treturn new Markdown(trimmed, 0, 0, getMarkdownTheme())\n\t\t\t.render(Math.max(20, width))\n\t\t\t.map((line) => line.trimEnd())\n\t\t\t.join(\"\\n\");\n\t} catch {\n\t\treturn trimmed;\n\t}\n}\n"]}
@@ -0,0 +1,205 @@
1
+ ---
2
+ title: "Background tasks"
3
+ description: "Run subagents and shell tasks while continuing your conversation"
4
+ ---
5
+
6
+ # Background tasks
7
+
8
+ Background subagents keep working after the launch call returns. You can continue chatting without restarting them or keeping a task list open.
9
+
10
+ In main chat and live workflow-stage chat, a compact indicator appears **below the prompt box and MCP status**, and above the workflow `BACKGROUND` widget when present:
11
+
12
+ ```text
13
+ Tasks 2 local agents running · 1 queued · /tasks
14
+ ```
15
+
16
+ It summarizes only active background agents and shells, including queued work, stopping tasks, and tasks needing attention. Completed, failed, and stopped tasks leave the footer immediately; when no background work is active, the indicator disappears. Results and failure details remain in completion cards and `/tasks`, so an old failure cannot keep the live indicator red. Running tasks do not expire merely because they are quiet.
17
+
18
+ Run `/tasks` to open a compact inline picker in the editor slot, like `/workflow connect`, with the conversation still visible above it. Detail, transcript, input, and cancellation-confirmation pages use the full screen. Escape returns to the picker with the selected task preserved, then to chat. The command also appears in workflow-stage slash suggestions, including when skill commands are disabled. Foreground-only commands do not appear. Work that ran in the background stays available after completion or a later foreground wait. Updates never open the list automatically. Closing the inspector does not stop the tasks.
19
+
20
+ Main and workflow-stage pickers use the same layout for empty and populated lists. Below the picker, the footer keeps that chat's resolved model and reasoning level, current folder and Git branch, and MCP status, including while its foreground turn streams. Each picker lists only its owner's tasks.
21
+
22
+ Opening `/tasks` is navigation, not an approval request. It does not mark the agent blocked in Herdr or produce a "Main chat needs input" notice. A genuine main-chat question waiting behind the workflow graph still shows that notice until answered or the graph is hidden or closed. The inspector stays open until you close it, even when its tasks finish; task history is not deleted when the compact indicator disappears.
23
+
24
+ ## Choose how long to wait
25
+
26
+ The agent can choose foreground-first or background observation for each authorized shell or subagent call. Choosing a mode does not require a separate user confirmation and does not relax tool permissions or task ownership.
27
+
28
+ | Call | Observation behavior |
29
+ | --- | --- |
30
+ | `bash` or `powershell` without `wait` | Waits for the owner's command observation budget, normally 10 seconds, then automatically returns if still running. |
31
+ | `subagent` without `wait` | Returns after admission; the child runs in the background by default. |
32
+ | Any of these tools with `wait: { kind: "background" }` | Explicitly returns after admission without waiting for execution to finish. |
33
+ | Any of these tools with `wait: { kind: "foreground" }` | Waits for the owner's observation budget, normally 10 seconds for shells and 30 seconds for agents. |
34
+ | Any of these tools with `wait: { kind: "foreground", budgetMs: 1000 }` | Waits up to one second, then automatically yields if the original task is still running. |
35
+
36
+ If the task finishes during observation, the call returns its terminal result instead. Automatic backgrounding is **observation expiry**, not a slow-task failure, a restart, or a second execution. Use foreground-first observation for a dependency and background observation for independent work. If a dependency yields, wait for its actual completion before using the result.
37
+
38
+ Shell `budgetMs` accepts finite non-negative milliseconds; zero means no observation delay. It is only valid for foreground observation. A trusted SDK host can override the usual budgets or select `tasks.wait.kind: "until-settled"`; omitted foreground budgets then wait until settlement. Explicit per-call budgets still take precedence.
39
+
40
+ Native observation timers run independently of JavaScript. A zero-budget wait can already be backgrounded by the time a caller reads the next task snapshot, even before JavaScript awaits the result. Synchronous wait registration does not guarantee a visible foreground interval. The elapsed result still identifies the same wait and task; execution continues.
41
+
42
+ ## Background subagents
43
+
44
+ Ask Atomic to delegate a bounded task:
45
+
46
+ ```text
47
+ Have a codebase-analyzer trace the authentication flow in the background.
48
+ Keep working with me here while it runs.
49
+ ```
50
+
51
+ For tool callers, owner-bound launches default to background observation. Explicit examples:
52
+
53
+ ```ts
54
+ subagent({
55
+ agent: "codebase-analyzer",
56
+ task: "Trace the authentication flow. Do not edit files.",
57
+ wait: { kind: "background" },
58
+ })
59
+
60
+ subagent({
61
+ tasks: [
62
+ { agent: "codebase-analyzer", task: "Trace request authentication." },
63
+ { agent: "codebase-pattern-finder", task: "Find authorization test patterns." },
64
+ ],
65
+ concurrency: 2,
66
+ wait: { kind: "background" },
67
+ })
68
+ ```
69
+
70
+ Parallel tasks have independent identities. Accepted work beyond the concurrency limit stays queued. Use `/agents` to browse available definitions before choosing an agent.
71
+
72
+ Intercom communication does not cancel a parallel batch. A blocking ask or supervisor decision waits only in the requesting child and resumes that same execution after the matching reply. Sends and progress updates remain nonblocking. Foreground observations may yield so the parent can reply; execution concurrency, queued siblings, and task identities are preserved. Stop a selected task explicitly, or close its owner to cancel all owned work.
73
+
74
+ A launch result says **Launched in background**. This records what happened at launch; it is not a permanently live status label. The below-prompt indicator and `/tasks` show the current state.
75
+
76
+ ### Waiting is not restarting
77
+
78
+ To wait briefly before continuing:
79
+
80
+ ```ts
81
+ subagent({
82
+ agent: "codebase-analyzer",
83
+ task: "Trace the authentication flow.",
84
+ wait: { kind: "foreground", budgetMs: 30000 },
85
+ })
86
+ ```
87
+
88
+ If that observation budget expires, the same child continues in the background. It is not an execution timeout. Observe the task ID returned by the original call:
89
+
90
+ ```ts
91
+ subagent({ action: "wait", id: taskId, budgetMs: 1000 })
92
+ subagent({ action: "status", id: taskId })
93
+ ```
94
+
95
+ Do not launch a duplicate just to retrieve its result. Use the task ID returned at launch. IDs are scoped to the session or workflow stage that owns them.
96
+
97
+ Foreground subagent launches and explicit `action: "wait"` calls also yield when user steering or an Intercom ask/send is admitted to the waiting parent, in main chat or a live workflow stage. The message stays in the normal delivery queue so the parent can handle it and reply. This releases only observation: children keep running under the same task IDs, and other owners' waits are unaffected.
98
+
99
+ ### Completion messages
100
+
101
+ Completion creates a shaded notification card in the owning chat without depending on a model reply. It uses the chat theme's card background and padding, with a colored outcome, the agent or shell name, and an available result preview:
102
+
103
+ ```text
104
+ ✓ Subagent codebase-analyzer completed: Trace the authentication flow.
105
+ Authentication starts in …
106
+ /tasks to inspect
107
+ ```
108
+
109
+ The parent model also receives the result context. The internal receipt stays in structured message details, rather than becoming raw JSON in chat. The same persisted completion identity handles delivery retries without relaunching the child. Workflow completions remain in their owning stage chat, not the main conversation.
110
+
111
+ Stopping a subagent through `/tasks` (`x`, then `y`) also delivers a **stopped** card and stop context to the parent model. The notice arrives after termination is confirmed, not while the task is merely **Stopping**, and does not require a final response from the child. Cancelling queued work notifies without starting it. Repeated stop requests or late child results do not duplicate the notice or overwrite the recorded outcome; a task that finished before cancellation keeps its actual result. Closing the owning session or workflow stage still suppresses late notices.
112
+
113
+ Restored completions may have only an outcome and task identity if the original live task or transcript is unavailable. Atomic does not invent missing output. Excerpts are bounded; inspect retained history for more detail.
114
+
115
+ Long titles and previews are truncated or wrapped within the card width. Its background covers the ellipsis, expand hint, and trailing padding on every row.
116
+
117
+ ## Inspect tasks
118
+
119
+ | View | Controls |
120
+ | --- | --- |
121
+ | Task list | Up/Down selects; Enter opens detail; Escape returns to chat. |
122
+ | Task detail | Up/Down selects an action; Enter activates it; PageUp/PageDown scrolls the body. |
123
+ | Transcript | Up/Down scrolls; PageUp/PageDown moves one viewport; PageUp at the top loads earlier history; Home/End jumps within loaded history. |
124
+ | Go back | Left or Escape returns from transcript to detail, then from detail to the list. |
125
+ | Stop | `x` requests cancellation; confirm with `y`, or keep running with `n` or Escape. |
126
+ | Shell input | Select Input when offered; Enter sends the text plus a newline; Escape leaves input mode. |
127
+
128
+ Configured task bindings take precedence over the default Left, page, and `x` shortcuts. Input mode receives ordinary typing, including `x`, without stopping the task. The footer shows the applicable controls.
129
+
130
+ The list groups **Agents** and **Shells**, with counts and status symbols. Detail views pin identity, state, available metrics, and the selected action while their body scrolls. Missing metrics are omitted rather than displayed as zero. Recorded zero values remain visible.
131
+
132
+ Agent rows and completion cards show the resolved model and reasoning setting, for example `openai-codex/gpt-6-astra · thinking medium`. These settings update on fallback and remain after completion. Foreground results retain the same metadata. Missing settings are not inferred from token counts; early launch receipts may not yet have a resolved model.
133
+
134
+ Agent details include recent retained tool activity, the prompt, a latest-response preview, and error or attention information. Transcript inspection uses a dedicated scrolling view with a pinned title, line position, and controls, rather than nesting full chat components inside a detail box. It renders retained messages and tool results without hidden reasoning or inline images. Earlier pages do not jump back to the latest page when background activity arrives.
135
+
136
+ An open live transcript updates directly from the child's session events, including streaming assistant text and partial/final tool results. Shell output refreshes on task state updates, including updates received during an earlier output read. You do not need to leave and reopen the transcript. Reading earlier retained pages keeps your position while the live tail continues updating.
137
+
138
+ Shell details show the command, available exit information, and a bounded output tail. The preview shows up to ten wrapped lines from the retained 8 KiB tail. Output gaps and omitted earlier content are labelled. An empty output stream says **No output available**. Shell transcript inspection exposes the retained tail, not an invented agent conversation or an unlimited log viewer.
139
+
140
+ ### States
141
+
142
+ | State | Meaning |
143
+ | --- | --- |
144
+ | Queued | Admitted, waiting for execution capacity. |
145
+ | Running | Execution is live, including when the parent has stopped waiting. |
146
+ | Input needed | An owned prompt needs attention. Open question is offered when a host route is available. |
147
+ | Stopping | Cancellation was requested; termination has not yet settled. |
148
+ | Completed | Execution finished successfully. |
149
+ | Failed | Execution ended with an error. Details retain the error message. |
150
+ | Stopped | Execution was cancelled. Completed work is not undone. |
151
+
152
+ Completed, failed, and stopped tasks retain inspection but do not offer execution controls. **Foreground wait** observes a running task; it does not transfer ownership or create a second execution.
153
+
154
+ ## Background shells
155
+
156
+ Top-level model `bash` calls on POSIX and native Windows, and `powershell` calls on native Windows, use the session's task owner. A long command can outlive its foreground observation budget and return a task ID while continuing to run. Its status then appears below the prompt and under **Shells** in `/tasks`. An explicit execution timeout still ends the command; it is separate from observation yielding.
157
+
158
+ ```ts
159
+ // Background immediately, keeping the command owned and its output retained.
160
+ bash({ command: "npm run build", wait: { kind: "background" }, timeout: 600 })
161
+
162
+ // Foreground-first, automatically yielding after one second if still running.
163
+ bash({ command: "npm test", wait: { kind: "foreground", budgetMs: 1000 }, timeout: 600 })
164
+
165
+ // Keep the default automatic observation budget.
166
+ bash({ command: "npm run check" })
167
+ ```
168
+
169
+ The shell execution timeout is separate: `timeout` is seconds and defaults to 300, with a maximum of 3600. It continues counting after backgrounding. Choose a timeout appropriate for the command; reducing `budgetMs` does not shorten or extend it. Use the returned task ID to inspect or stop the existing task through `/tasks`. Background completion notifies the parent automatically, so there is no need to launch the command again to collect its result.
170
+
171
+ Shell completions use the same shaded card as subagents, with a retained output preview and available exit code. Nonzero shell exits are shown as failures even though the process itself reached a terminal state. Cancellation shows Stopped. The card and below-prompt count update in the owning main or workflow-stage chat.
172
+
173
+ Native Windows owned shells use supervised pipes or ConPTY, with Job Object containment before execution resumes and confirmed cleanup. If containment cannot be established, launch is refused rather than falling back to unsupervised execution. The legacy Windows WSL `bash.exe` stdin transport remains unsupported for owned launch because Windows jobs cannot supervise Linux guest processes. Running Atomic inside WSL uses the normal POSIX/Bash path.
174
+
175
+ Bash calls inside subagent sessions retain their existing execution paths. Without a supported task owner, explicit background requests are refused before execution; foreground calls wait for completion rather than automatically yielding. Custom operations adapters receive `wait` but must implement it themselves. External-terminal processes are not adopted into `/tasks`. A child's own tool use appears in that subagent's activity and transcript.
176
+
177
+ ## Lifetime and scope
178
+
179
+ Background means independent of the current observation, not independent of its owner. **Pausing main chat** aborts the foreground turn only; its background agents and shells keep running. Detaching a workflow pane, ending a model turn, or closing `/tasks` also leaves owned background work alone.
180
+
181
+ **Pausing a workflow stage** blocks new task launches immediately and cancels that stage generation's active and admitted queued agents and commands. Queued agents are cancelled before active cancellations free execution slots. Command setup already in flight may briefly start a shell during the pause transition; pause waits for those admissions, cancels the resulting shells, and confirms resource cleanup before completing. A successful pause leaves no owned active or queued executions. Cancellation or cleanup failures are reported instead of confirming pause. Main-chat tasks, sibling stages, and future stage generations are unaffected by a stage-scoped pause.
182
+
183
+ Pause does not close the stage's message generation: queued user and Intercom messages remain held for resume. Resume permits fresh launches but never resurrects cancelled executions; retained task results remain inspectable. Closing a session or stage generation still cancels its remaining owned work. Explicit `/tasks` stop and declared execution timeouts remain separate controls.
184
+
185
+ On native Windows, Suspend opens a PowerShell subshell rather than freezing Atomic. Exit the subshell to restore the same session; owned background tasks continue while it is open.
186
+
187
+ Task inspection is owner-scoped. It is not a machine-wide process list. Switching sessions does not copy the previous session's task rows into the new one. Missing retained history is reported explicitly.
188
+
189
+ Git branch watchers for alternate folders are shared by their chat footers and released when the last viewer closes or changes folders. Main chat and other open stage chats keep their live branch updates; closing `/tasks` alone leaves its chat footer active.
190
+
191
+ ## Task state and completion delivery
192
+
193
+ Foreground and background describe observation, not different executions. Each admitted task keeps its identity and owning session as callers start or stop waiting. The native `wasBackground` field remains set after a designated wait yields, including after a later foreground wait or settlement.
194
+
195
+ Execution outcome and resource cleanup are separate states. A terminal result does not by itself prove that resources were reaped. Cleanup failures remain explicit. Supervised shells retain output while running, and finish output draining as part of cleanup.
196
+
197
+ Native integrations can use `TaskSupervisor.taskSettlement(task)` from `@bastani/atomic-natives` to retrieve an authentic terminal receipt without creating a new wait. This supports recovery when a bounded event journal no longer contains the completion event. Session-history completion intents and acknowledgements reuse the same identity when notification delivery is retried.
198
+
199
+ UI previews are bounded and are not a substitute for retained output. Gaps and truncation are labelled; unavailable history is reported rather than reconstructed from activity counters.
200
+
201
+ ## Related documentation
202
+
203
+ - [Subagents](/subagents) covers definitions, models, context, and delegation boundaries.
204
+ - [Keybindings](/keybindings) covers task-action remapping.
205
+ - [Workflows](/workflows) covers durable stage lifecycles.
@@ -117,6 +117,8 @@ Configure defaults in `~/.atomic/agent/settings.json` or `.atomic/settings.json`
117
117
 
118
118
  Exactly the configured recent-message tail is outside the compactable region; Atomic does not force the final logical turn to remain outside it. After successful automatic compaction, input queued before compaction started resumes automatically once the active run becomes idle; pressing Escape is not required to release it. Pressing Escape while compaction is active cancels it like other session operations. In isolated interactive mode, cancellation and host UI response frames use an independent RPC control lane, so they can reach the engine while the ordinary `compact` request is still pending instead of waiting behind it. Atomic writes a backup snapshot immediately before appending a compaction boundary.
119
119
 
120
+ Automatic continuations belong to the original prompt, including repeated output-cap continuations. The prompt and `agent_settled` lifecycle finish only after the entire chain drains, so status integrations such as [Herdr](/herdr) stay working through quiet response waits and continuation gaps.
121
+
120
122
  Manual compaction is single-flight. A manual request made while another manual compaction is still in flight joins that run and receives its result instead of starting a second model call, so it emits no extra `compaction_start`/`compaction_end` pair and appends no extra boundary; `abortCompaction()` (Escape) still cancels the single owning run for every waiter. A manual request made while automatic compaction is active takes ownership: it cancels unfinished automatic work, abandons any pending automatic continuation, waits for the active turn and automatic state to settle, then runs the requested manual compaction. If the automatic boundary committed first, the manual request runs after it rather than reusing that result or writing concurrently. In the interactive TUI, `/compact` uses this takeover only for automatic compaction; a second manual compaction or branch summary is still refused. Ordinary text typed during compaction remains queued and flushes after its non-mid-turn completion, including cancellation or failure.
121
123
 
122
124
  The post-tool check stays inside the active Pi loop: it runs the rung ladder once for that completed tool turn, returns the rebuilt context to the loop, and never calls or schedules `agent.continue()`. If the caller installed `prepareNextTurn` or `prepareNextTurnWithContext`, Atomic invokes it after compaction with that rebuilt context and sends the caller's complete replacement context through the normal context transform to the next provider request. A `shouldStopAfterTurn` result of `true` takes precedence over queued steering and follow-up messages, including messages queued while the callback is running: Atomic leaves that work pending until a later explicit prompt or continuation instead of starting another provider request. Normal context reconstruction preserves provider tool-call/result protocol validity. Below-threshold tool turns follow the unchanged request path. Because the same active run resumes without emitting another `agent_start`, the interactive TUI replaces the compaction loader with its working spinner and keeps terminal progress active as soon as successful mid-turn compaction ends; streaming feedback therefore resumes immediately without waiting for another user interaction.
@@ -8,15 +8,10 @@ See [AGENTS.md](https://github.com/bastani-inc/atomic/blob/main/AGENTS.md) for a
8
8
  git clone https://github.com/bastani-inc/atomic
9
9
  cd atomic
10
10
  npm ci --ignore-scripts
11
- npm run typecheck
11
+ npm run build
12
12
  ```
13
13
 
14
- This monorepo runs a hybrid toolchain matching upstream pi: npm installs, builds, checks, and runs the vitest suites, while Bun compiles the release binaries and runs `scripts/*.ts`. Avoid yarn and pnpm. Run package scripts from the monorepo root or a package directory, for example:
15
-
16
- ```bash
17
- npm run test:unit
18
- npm run build --workspace=@bastani/atomic
19
- ```
14
+ Use npm for installs, builds, checks, and Vitest suites. Bun compiles standalone binaries and runs repository TypeScript scripts. Do not use yarn, pnpm, or `bun install`.
20
15
 
21
16
  Atomic keeps the caller's current working directory when launched from development wrappers.
22
17
 
@@ -33,7 +28,7 @@ Configure via `package.json`:
33
28
  }
34
29
  ```
35
30
 
36
- Change `name`, `configDir`, and the `bin` field for your fork. The app-specific `<appName>Config` key is preferred; legacy `piConfig` remains a backwards-compatible shim. Atomic sets these to `atomic`, `.atomic`, and the `atomic` executable. Affects CLI banner, config paths, and environment variable names.
31
+ Change `name`, `configDir`, and the `bin` field for your fork. These control the CLI banner, config paths, and environment variable names. Legacy `piConfig` remains a compatibility fallback.
37
32
 
38
33
  ## Path Resolution
39
34
 
@@ -53,86 +48,42 @@ Never use `__dirname` directly for package assets.
53
48
  - Rendered TUI lines with ANSI codes
54
49
  - Last messages sent to the LLM
55
50
 
56
- ## Startup timing probes
57
-
58
- Use `scripts/perf/windows-startup/benchmark.ts` for Windows startup claims. It launches the ordinary bare `atomic` command through a real 120x40 ConPTY, feeds ordered output into `@xterm/headless`, and timestamps each receive with `process.hrtime.bigint()`. Complete first paint requires the final `Atomic v<version>` identity, the focused `❯ ` editor, and two identical settled frames at least one 80 ms animation interval apart. `dispatchMs` runs from the Enter write to the first byte observed by a raw TCP loopback provider. The headline `spawnToDispatchMs` is exactly `startupCompleteMs + dispatchMs`; `launchToProviderFirstByteMs` separately retains the contiguous launch-to-provider interval that also contains nonce typing and editor-echo wait. The provider request must contain the nonce and the normal tool schemas, and every accepted sample must pass `/workflow list` after the timed response. See [the benchmark README](https://github.com/bastani-inc/atomic/blob/main/scripts/perf/windows-startup/README.md) for artifact preparation, cache profiles, raw records, and summary commands.
59
-
60
- Do not use `time-to-first-frame` as settled-paint evidence, and do not substitute `launchToProviderFirstByteMs` for the contract sum. The first-frame mark records the host's first requested identity frame after the header is mounted; it does not prove terminal receipt, animation settlement, engine resource readiness, or provider readiness. `ATOMIC_STARTUP_BENCHMARK=1`, `--no-extensions`, and `--no-tools` are attribution controls only. They do not run the accepted full CLI path with bundled workflows, normal extensions, tools, and provider dispatch.
61
-
62
- The process-local lifecycle timing seams use monotonic nanoseconds and remain disabled until an internal diagnostic adapter installs a synchronous sink. With no sink, they do not read the clock, write output, or schedule work. External ConPTY and TCP marks remain authoritative. Startup now has several deliberate partial orders rather than one cross-process sequence:
63
-
64
- ```text
65
- interactive host: process-entry → interactive-engine-spawn → engine-ready
66
- → tui-start → header-mounted → initialize engine-bound state
67
- → chat-output-release → interactive-input-handler-ready
68
-
69
- isolated child: process-entry → engine-ready → engine-bound
70
- → engine-resources-ready
71
-
72
- external screen: first-terminal-write → startup-coherent → startup-complete
73
-
74
- first turn: interactive-first-submit → before-provider-request
75
- ```
76
-
77
- The header and editor are mounted before the host waits for `engine-bound`; the child can therefore report binding while the host is applying its theme or requesting that frame. `engine-bound` means RPC control plus the mandatory minimal session are available. `engine-resources-ready` is a separate, generation-scoped child message sent only after a staged optional snapshot containing bundled extensions, tools, providers, skills, prompts, and themes commits. User prompts, extension commands, model/resource commands, session replacement, and tool-dispatching RPC calls wait for that gate. After a readiness failure, `/reload` bypasses the rejected gate to start a fresh transactional attempt; successful retry replaces the gate before later work proceeds. Escape cancels a first submission that is still waiting, so that continuation cannot dispatch later. `session_start` messages are queued against the candidate snapshot and released only after publication. Mandatory Intercom remains in the minimal runtime. A failed transactional candidate leaves host-managed settings, providers, tools, resources, event subscriptions, and system-prompt state unchanged, restores an unadmitted prompt draft exactly, and reports the generation failure once. Extension-owned objects stored with `sessionScopedExtensionState` are deliberately shared across reloads and are not cloned or rolled back.
78
-
79
- `engine-resources-ready` is recorded in the isolated engine process; host marks are recorded in the interactive process. The two process clocks are monotonic but must not be subtracted without an external synchronization protocol. `startup-coherent` and `startup-complete` describe internal render composition, not terminal receipt. The external VT predicates decide the reported first-paint marks.
80
-
81
- For package-manager installs under Node 22, Atomic enables Node's persistent module compile cache in both the host and isolated child and flushes the host cache before spawning the child. Explicit `NODE_COMPILE_CACHE` and `NODE_DISABLE_COMPILE_CACHE` settings pass through unchanged. This preserves Node's coverage opt-out and avoids forcing a new cache directory or a first-run-only precompile step. SEA, V8 snapshots, and package-install precompilation were not adopted because Atomic's dynamic ESM, native modules, workers, and first-run requirements do not provide a safe portable boundary.
82
-
83
- Compiled releases syntax-minify the shared CJS `app.js` sidecar without identifier minification and compile launchers with bytecode on all eight supported targets, including Windows x64 and ARM64. `bun run scripts/probe-windows-bytecode.ts` pins Bun 1.4.0, cross-compiles `bun-windows-x64-baseline` and `bun-windows-arm64` launchers, and verifies their PE machine types. Atomic observed a Bun 1.3.14 Windows startup crash in `llint_entry`, but Bun 1.4.0 already contains the embedded-bytecode alignment fix ([#26299](https://github.com/oven-sh/bun/pull/26299)) and integrity fallback ([#31961](https://github.com/oven-sh/bun/pull/31961)); the separate Bun 1.4.0 Windows report ([#40302](https://github.com/oven-sh/bun/issues/40302)) concerns a general standalone/JIT segfault and has not been shown to be bytecode-specific. Cross-compilation is not runtime validation: release candidates still require full-archive target-machine coverage of the TUI, workflows, tools, extensions, workers, and native add-ons, with Windows ARM64 validated on ARM64 hardware.
84
-
85
- Set `ATOMIC_TIMING=1` only for the older human-readable phase diagnostics. Normal interactive launches print that initial timing group before `interactiveMode.run()` starts the TUI loop, so later marks are not printed during ordinary sessions.
51
+ For startup measurements, see the [Windows startup benchmark](https://github.com/bastani-inc/atomic/blob/main/scripts/perf/windows-startup/README.md). Internal timing marks do not prove terminal first paint.
86
52
 
87
53
  ## Testing
88
54
 
89
55
  ```bash
90
- npm run typecheck # Type-check the monorepo
91
- npm run test:unit # Run unit tests
92
- npm run test:integration # Run integration tests
93
- npm run test:all # Run all tests
94
- npm run test:scripts # Run the repository script tests under node --test
95
- # Run the package Vitest suite (Node-hosted)
56
+ npm run check # Typechecks and published-shrinkwrap validation
57
+ npm run test:unit # Root unit tests
58
+ npm run test:integration # Root integration tests
59
+ npm run test:all # All root test projects
60
+ npm run test:scripts # Repository script tests under Node
96
61
  npm run test --workspace=@bastani/atomic -- test/specific.test.ts
97
62
  ```
98
63
 
99
- Root Vitest projects install a fresh in-memory durable backend before every test.
100
- Durability initialization imports the backend and its process owner rather than
101
- preloading the DBOS factory or the Atomic host. A test that needs host prototype
102
- installers must import those real modules explicitly rather than depend on a
103
- side effect of shared setup. Test-local backend overrides still use the factory's
104
- injection seam, and the next test receives a fresh backend without resetting
105
- unrelated initialization or warning state. Keep the global artifact/native setups,
106
- default isolation, worker sizing and timeout budgets unchanged when measuring
107
- test cost. See the [CI measurements](https://github.com/bastani-inc/atomic/blob/main/docs/ci.md#current-critical-path-measured-september-5-2026)
108
- for local gains and the remaining hosted Linux/Windows validation.
109
-
110
- CI runs the complete root unit and integration suites in independent Linux and
111
- Windows jobs. Each builds its own native and package prerequisites; both required
112
- result gates wait for every work job and reject failures, cancellations and skips.
113
- This trades duplicated setup for earlier integration feedback without changing
114
- test isolation, coverage or retries.
64
+ CI runs root unit and integration suites on Linux and Windows. See [CI documentation](https://github.com/bastani-inc/atomic/blob/main/docs/ci.md) for job details and release procedures.
115
65
 
116
- ## Deterministic installs
66
+ ### Installed package smoke test
117
67
 
118
- `@bastani/atomic` ships `packages/coding-agent/npm-shrinkwrap.json` so package-manager installs resolve the same dependency tree every time. Contributors working from a source checkout can validate that the checked-in shrinkwrap is up to date with:
68
+ After building, run:
119
69
 
120
70
  ```bash
121
- bun run scripts/generate-coding-agent-shrinkwrap.mjs --check
71
+ ATOMIC_REQUIRE_INSTALLED_NODE_SMOKE=1 npx vitest --run --project integration test/integration/installed-package-node-extensions.test.ts
122
72
  ```
123
73
 
124
- ## Release security boundary
74
+ This checks Node startup and builtin extension loading outside the checkout.
125
75
 
126
- Atomic's release bases remain at the `0.0.0` placeholder. `scripts/cut-release.ts` stamps the real version only on a detached tagged release commit. Tag creation runs an inert signal workflow; a separate `workflow_run` publisher loaded from protected `main` validates the exact upstream repository, source workflow/event/run, tag/SHA, immutable release-base trailers, and deterministic release tree. The privileged trigger checks out only protected workflow code: it treats the tag tree as data, exports it only after deterministic verification, and makes every read-only build verify the protected job's source checksum instead of checking out tag-selected code. Same-run artifact transport failures receive at most one retry after partial-download cleanup and still fail explicitly on the second error; verified source archives are streamed to tar over stdin for portable Windows drive-letter handling. Preparation restores the digest-verified source after documentation validation before producing artifacts. Release-source jobs configure no dependency cache, npm publication has OIDC without repository write, and GitHub Release creation has repository write without OIDC. Never move or recreate a failed release tag or dispatch the privileged publisher. See the repository's [CI/CD pipeline](https://github.com/bastani-inc/atomic/blob/main/docs/ci.md#release-pipeline) for trusted-publisher configuration.
76
+ Atomic ships an npm shrinkwrap. After dependency changes, regenerate it with `npm run shrinkwrap:coding-agent` and validate with `npm run check`.
127
77
 
128
78
  ## Project Structure
129
79
 
130
- ```
80
+ ```text
131
81
  packages/
132
- coding-agent/ # Atomic CLI, agent loop, providers, TUI, and core runtime
133
- workflows/ # First-party workflow extension bundled into Atomic
134
- subagents/ # Built-in subagent orchestration and reusable agents
135
- mcp/ # Built-in MCP adapter extension
136
- web-access/ # Built-in web search and content extraction tools
137
- intercom/ # Built-in cross-session coordination channel
82
+ ai/ # Atomic's LLM provider fork
83
+ coding-agent/ # CLI, interactive mode, and core runtime
84
+ workflows/ # Workflow execution
85
+ subagents/ # Subagent orchestration
86
+ mcp/ # MCP adapter
87
+ web-access/ # Web search and content extraction
88
+ intercom/ # Cross-session coordination
138
89
  ```
package/docs/docs.json CHANGED
@@ -20,11 +20,13 @@
20
20
  "providers",
21
21
  "environment-variables",
22
22
  "llama-cpp",
23
+ "herdr",
23
24
  "containerization",
24
25
  "security",
25
26
  "settings",
26
27
  "keybindings",
27
28
  "sessions",
29
+ "background-tasks",
28
30
  "compaction"
29
31
  ]
30
32
  },
@@ -13,7 +13,7 @@ Atomic accepts environment variables for configuration, provider credentials, an
13
13
  | `ATOMIC_SKIP_VERSION_CHECK` | `PI_SKIP_VERSION_CHECK` | Skip automatic startup version checks; explicit self-update still checks |
14
14
  | `ATOMIC_TELEMETRY` | `PI_TELEMETRY` | Enable/disable install/update telemetry |
15
15
  | `ATOMIC_REDUCED_MOTION` | `PI_REDUCED_MOTION` | Use static reduced-motion presentation |
16
- | `ATOMIC_EXPERIMENTAL` | `PI_EXPERIMENTAL` | Set to `1` to enable experimental features: built-in tool definitions request strict JSON-schema constrained sampling (`prefer`), and the footer shows an `xp` badge |
16
+ | `ATOMIC_EXPERIMENTAL` | `PI_EXPERIMENTAL` | Set to `1` to enable experimental features and preferred strict JSON-schema constrained sampling for additional built-in tools; `read`, `edit`, `write`, `bash`, and PowerShell already prefer strict sampling by default. The footer shows an `xp` badge |
17
17
 
18
18
  `PI_CACHE_RETENTION=long` is a provider/upstream prompt-cache option and intentionally has no Atomic-prefixed alias. `VISUAL` and `EDITOR` select the Ctrl+G external editor when `externalEditor` is unset.
19
19