@bastani/atomic 0.9.13-alpha.1 → 0.9.13-alpha.2

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 (1048) hide show
  1. package/CHANGELOG.md +130 -0
  2. package/README.md +35 -17
  3. package/dist/builtin/i-have-adhd/CHANGELOG.md +17 -0
  4. package/dist/builtin/i-have-adhd/LICENSE +21 -0
  5. package/dist/builtin/i-have-adhd/README.md +18 -0
  6. package/dist/builtin/i-have-adhd/index.ts +238 -0
  7. package/dist/builtin/i-have-adhd/package.json +56 -0
  8. package/dist/builtin/i-have-adhd/skills/i-have-adhd/SKILL.md +140 -0
  9. package/dist/builtin/intercom/CHANGELOG.md +19 -0
  10. package/dist/builtin/intercom/README.md +25 -4
  11. package/dist/builtin/intercom/broker/bounded-stderr-install.ts +18 -0
  12. package/dist/builtin/intercom/broker/bounded-stderr.ts +132 -0
  13. package/dist/builtin/intercom/broker/broker.ts +12 -23
  14. package/dist/builtin/intercom/broker/client.ts +70 -3
  15. package/dist/builtin/intercom/broker/paths.ts +9 -0
  16. package/dist/builtin/intercom/broker/presence-handler.ts +103 -0
  17. package/dist/builtin/intercom/broker/spawn.ts +128 -29
  18. package/dist/builtin/intercom/foreground-detach-handoff.ts +30 -14
  19. package/dist/builtin/intercom/group.ts +64 -25
  20. package/dist/builtin/intercom/index-heavy.ts +38 -5
  21. package/dist/builtin/intercom/index.ts +7 -3
  22. package/dist/builtin/intercom/intercom-tool.ts +82 -5
  23. package/dist/builtin/intercom/lazy-subagent-ack.ts +11 -6
  24. package/dist/builtin/intercom/package.json +2 -3
  25. package/dist/builtin/intercom/runtime-group.ts +13 -0
  26. package/dist/builtin/intercom/skills/intercom/SKILL.md +30 -2
  27. package/dist/builtin/intercom/subagent-relay.ts +32 -16
  28. package/dist/builtin/intercom/terminal-ordering-barrier.ts +21 -4
  29. package/dist/builtin/intercom/types.ts +3 -1
  30. package/dist/builtin/intercom/ui/compose.ts +8 -6
  31. package/dist/builtin/intercom/ui/session-list.ts +7 -5
  32. package/dist/builtin/mcp/CHANGELOG.md +13 -0
  33. package/dist/builtin/mcp/glimpse-ui.ts +2 -1
  34. package/dist/builtin/mcp/index.ts +1 -11
  35. package/dist/builtin/mcp/mcp-panel.ts +35 -34
  36. package/dist/builtin/mcp/mcp-setup-panel.ts +35 -33
  37. package/dist/builtin/mcp/npx-resolver.ts +3 -2
  38. package/dist/builtin/mcp/package.json +3 -3
  39. package/dist/builtin/mcp/sampling-handler.ts +5 -1
  40. package/dist/builtin/mcp/server-manager.ts +4 -7
  41. package/dist/builtin/subagents/CHANGELOG.md +33 -0
  42. package/dist/builtin/subagents/README.md +124 -323
  43. package/dist/builtin/subagents/agents/worker.md +1 -1
  44. package/dist/builtin/subagents/package.json +5 -5
  45. package/dist/builtin/subagents/prompts/parallel-context-build.md +2 -2
  46. package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +4 -4
  47. package/dist/builtin/subagents/prompts/review-loop.md +1 -1
  48. package/dist/builtin/subagents/skills/subagent/SKILL.md +39 -102
  49. package/dist/builtin/subagents/src/agents/agent-discovery.ts +1 -29
  50. package/dist/builtin/subagents/src/agents/agent-loaders.ts +1 -40
  51. package/dist/builtin/subagents/src/agents/agent-management-helpers.ts +6 -135
  52. package/dist/builtin/subagents/src/agents/agent-management.ts +52 -282
  53. package/dist/builtin/subagents/src/agents/agent-paths.ts +0 -22
  54. package/dist/builtin/subagents/src/agents/agent-types.ts +0 -40
  55. package/dist/builtin/subagents/src/agents/agents.ts +0 -3
  56. package/dist/builtin/subagents/src/agents/identity.ts +2 -4
  57. package/dist/builtin/subagents/src/agents/skills-paths.ts +8 -1
  58. package/dist/builtin/subagents/src/extension/doctor.ts +3 -23
  59. package/dist/builtin/subagents/src/extension/index.ts +9 -7
  60. package/dist/builtin/subagents/src/extension/prompt-guidance.ts +2 -2
  61. package/dist/builtin/subagents/src/extension/schemas.ts +1 -157
  62. package/dist/builtin/subagents/src/extension/startup-maintenance.ts +0 -2
  63. package/dist/builtin/subagents/src/extension/tool-description.ts +4 -13
  64. package/dist/builtin/subagents/src/intercom/intercom-bridge.ts +6 -2
  65. package/dist/builtin/subagents/src/intercom/result-intercom.ts +20 -22
  66. package/dist/builtin/subagents/src/intercom/supervisor-authorization.ts +9 -2
  67. package/dist/builtin/subagents/src/runs/background/async-job-tracker.ts +97 -16
  68. package/dist/builtin/subagents/src/runs/background/completion-notification.ts +8 -3
  69. package/dist/builtin/subagents/src/runs/background/notify.ts +54 -18
  70. package/dist/builtin/subagents/src/runs/foreground/execution-updates.ts +0 -5
  71. package/dist/builtin/subagents/src/runs/foreground/execution.ts +1 -4
  72. package/dist/builtin/subagents/src/runs/foreground/inprocess-run-sync.ts +117 -15
  73. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-async.ts +11 -40
  74. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-context.ts +11 -22
  75. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-input.ts +10 -173
  76. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel-task.ts +6 -4
  77. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel.ts +9 -2
  78. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-single.ts +9 -2
  79. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-status.ts +32 -12
  80. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-types.ts +2 -6
  81. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-worktree.ts +1 -14
  82. package/dist/builtin/subagents/src/runs/foreground/subagent-executor.ts +56 -31
  83. package/dist/builtin/subagents/src/runs/inprocess/background-single.ts +46 -30
  84. package/dist/builtin/subagents/src/runs/inprocess/background.ts +2 -1
  85. package/dist/builtin/subagents/src/runs/inprocess/runner.ts +343 -89
  86. package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-projection.ts +0 -2
  87. package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-sanitize.ts +1 -3
  88. package/dist/builtin/subagents/src/runs/shared/intercom-group.ts +23 -7
  89. package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +0 -86
  90. package/dist/builtin/subagents/src/runs/shared/worktree.ts +7 -2
  91. package/dist/builtin/subagents/src/shared/formatters.ts +2 -56
  92. package/dist/builtin/subagents/src/shared/settings.ts +14 -350
  93. package/dist/builtin/subagents/src/shared/types-async.ts +8 -31
  94. package/dist/builtin/subagents/src/shared/types-config.ts +20 -22
  95. package/dist/builtin/subagents/src/shared/types-depth.ts +30 -56
  96. package/dist/builtin/subagents/src/shared/types-results.ts +9 -58
  97. package/dist/builtin/subagents/src/shared/types-runtime.ts +0 -1
  98. package/dist/builtin/subagents/src/shared/utils.ts +5 -0
  99. package/dist/builtin/subagents/src/slash/bridge-settlement.ts +87 -0
  100. package/dist/builtin/subagents/src/slash/prompt-template-bridge.ts +47 -7
  101. package/dist/builtin/subagents/src/slash/slash-bridge.ts +27 -7
  102. package/dist/builtin/subagents/src/slash/slash-commands.ts +37 -82
  103. package/dist/builtin/subagents/src/slash/slash-live-state.ts +1 -92
  104. package/dist/builtin/subagents/src/tui/render-event-formatting.ts +2 -35
  105. package/dist/builtin/subagents/src/tui/render-progress.ts +89 -0
  106. package/dist/builtin/subagents/src/tui/render-result-compact.ts +43 -71
  107. package/dist/builtin/subagents/src/tui/render-result.ts +41 -90
  108. package/dist/builtin/subagents/src/tui/render-stable-output.ts +0 -5
  109. package/dist/builtin/subagents/src/tui/render-widget-graph.ts +6 -55
  110. package/dist/builtin/web-access/CHANGELOG.md +14 -0
  111. package/dist/builtin/web-access/chrome-cookies.ts +3 -2
  112. package/dist/builtin/web-access/github-api.ts +7 -6
  113. package/dist/builtin/web-access/github-extract.ts +2 -1
  114. package/dist/builtin/web-access/package.json +3 -3
  115. package/dist/builtin/web-access/subprocess.ts +3 -1
  116. package/dist/builtin/web-access/summary-review.ts +2 -2
  117. package/dist/builtin/web-access/web-search-features.ts +38 -22
  118. package/dist/builtin/web-access/web-search-summary.ts +2 -2
  119. package/dist/builtin/workflows/CHANGELOG.md +45 -0
  120. package/dist/builtin/workflows/README.md +41 -1
  121. package/dist/builtin/workflows/builtin/open-claude-design-utils.ts +3 -0
  122. package/dist/builtin/workflows/builtin/ralph-models.ts +25 -20
  123. package/dist/builtin/workflows/builtin/shared-prompts.ts +5 -2
  124. package/dist/builtin/workflows/package.json +2 -2
  125. package/dist/builtin/workflows/src/durable/backend.ts +18 -1
  126. package/dist/builtin/workflows/src/durable/completed-catalog-stage-groups.ts +60 -3
  127. package/dist/builtin/workflows/src/durable/completed-catalog.ts +67 -1
  128. package/dist/builtin/workflows/src/durable/completed-subtree.ts +22 -7
  129. package/dist/builtin/workflows/src/durable/dbos-metadata.ts +4 -0
  130. package/dist/builtin/workflows/src/durable/local-command.ts +2 -1
  131. package/dist/builtin/workflows/src/durable/types.ts +17 -1
  132. package/dist/builtin/workflows/src/durable/workflow-child-result.ts +3 -1
  133. package/dist/builtin/workflows/src/engine/primitives/workflow.ts +1 -1
  134. package/dist/builtin/workflows/src/engine/run-durable-finalize.ts +10 -2
  135. package/dist/builtin/workflows/src/engine/run-durable-topology.ts +9 -2
  136. package/dist/builtin/workflows/src/extension/atomic-stage-session.ts +7 -1
  137. package/dist/builtin/workflows/src/extension/companions.ts +1 -1
  138. package/dist/builtin/workflows/src/extension/index.bundle.mjs +947 -447
  139. package/dist/builtin/workflows/src/extension/lifecycle-notifications.ts +31 -3
  140. package/dist/builtin/workflows/src/extension/mcp.ts +13 -2
  141. package/dist/builtin/workflows/src/extension/render-result.ts +1 -0
  142. package/dist/builtin/workflows/src/extension/ui-surface.ts +7 -20
  143. package/dist/builtin/workflows/src/extension/wiring.ts +33 -6
  144. package/dist/builtin/workflows/src/extension/workflow-ports.ts +14 -6
  145. package/dist/builtin/workflows/src/extension/workflow-prompts.ts +11 -6
  146. package/dist/builtin/workflows/src/extension/workflow-run-control-command.ts +8 -0
  147. package/dist/builtin/workflows/src/extension/workflow-tool-control.ts +2 -0
  148. package/dist/builtin/workflows/src/intercom/intercom-routing.ts +12 -6
  149. package/dist/builtin/workflows/src/intercom/result-intercom.ts +35 -4
  150. package/dist/builtin/workflows/src/runs/background/status.ts +15 -0
  151. package/dist/builtin/workflows/src/runs/foreground/executor-abort.ts +11 -3
  152. package/dist/builtin/workflows/src/runs/foreground/executor-child-boundary.ts +2 -1
  153. package/dist/builtin/workflows/src/runs/foreground/executor-exit-manager.ts +26 -2
  154. package/dist/builtin/workflows/src/runs/foreground/executor-run-finalizers.ts +3 -2
  155. package/dist/builtin/workflows/src/runs/shared/worktree-git-runner.ts +5 -2
  156. package/dist/builtin/workflows/src/runs/shared/worktree-setup.ts +2 -0
  157. package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +5 -3
  158. package/dist/builtin/workflows/src/shared/authoring-contract-stage.ts +5 -3
  159. package/dist/builtin/workflows/src/shared/graph-store-snapshot.ts +34 -2
  160. package/dist/builtin/workflows/src/shared/persistence-restore-helpers.ts +23 -6
  161. package/dist/builtin/workflows/src/shared/stage-ui-broker.ts +10 -4
  162. package/dist/builtin/workflows/src/shared/store-public-types.ts +4 -2
  163. package/dist/builtin/workflows/src/shared/store-types.ts +1 -1
  164. package/dist/builtin/workflows/src/shared/workflow-artifact-env.ts +21 -0
  165. package/dist/builtin/workflows/src/shared/workflow-artifacts.ts +2 -5
  166. package/dist/builtin/workflows/src/tui/dispatch-confirm.ts +37 -2
  167. package/dist/builtin/workflows/src/tui/graph-view-constants.ts +0 -15
  168. package/dist/builtin/workflows/src/tui/graph-view-graph-render.ts +38 -47
  169. package/dist/builtin/workflows/src/tui/graph-view-input.ts +48 -45
  170. package/dist/builtin/workflows/src/tui/graph-view-layout.ts +266 -0
  171. package/dist/builtin/workflows/src/tui/graph-view-render-helpers.ts +1 -86
  172. package/dist/builtin/workflows/src/tui/graph-view-render.ts +209 -91
  173. package/dist/builtin/workflows/src/tui/graph-view-state.ts +5 -7
  174. package/dist/builtin/workflows/src/tui/graph-view-types.ts +13 -7
  175. package/dist/builtin/workflows/src/tui/inline-form-editor.ts +8 -6
  176. package/dist/builtin/workflows/src/tui/inline-form-overlay.ts +2 -1
  177. package/dist/builtin/workflows/src/tui/inputs-overlay.ts +7 -4
  178. package/dist/builtin/workflows/src/tui/inputs-picker-input.ts +66 -0
  179. package/dist/builtin/workflows/src/tui/keybindings-adapter.ts +1 -0
  180. package/dist/builtin/workflows/src/tui/node-card.ts +1 -1
  181. package/dist/builtin/workflows/src/tui/overlay-adapter.ts +18 -46
  182. package/dist/builtin/workflows/src/tui/overlay-terminal-modes.ts +15 -26
  183. package/dist/builtin/workflows/src/tui/session-overlays.ts +5 -2
  184. package/dist/builtin/workflows/src/tui/session-picker.ts +27 -0
  185. package/dist/builtin/workflows/src/tui/stage-chat-view-footer-status.ts +5 -14
  186. package/dist/builtin/workflows/src/tui/stage-chat-view-input.ts +8 -7
  187. package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +12 -3
  188. package/dist/builtin/workflows/src/tui/stage-chat-view-types.ts +1 -11
  189. package/dist/builtin/workflows/src/tui/stage-chat-view.ts +0 -8
  190. package/dist/builtin/workflows/src/tui/status-list.ts +1 -0
  191. package/dist/builtin/workflows/src/tui/store-widget-installer.ts +2 -6
  192. package/dist/builtin/workflows/src/tui/workflow-attach-pane-types.ts +0 -15
  193. package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +2 -26
  194. package/dist/builtin/workflows/src/tui/workflow-status.ts +3 -3
  195. package/dist/bun/split-loader.js +2 -0
  196. package/dist/bun/split-loader.js.map +1 -1
  197. package/dist/cli/args.d.ts.map +1 -1
  198. package/dist/cli/args.js +6 -2
  199. package/dist/cli/args.js.map +1 -1
  200. package/dist/cli/auth-check.d.ts +35 -0
  201. package/dist/cli/auth-check.d.ts.map +1 -0
  202. package/dist/cli/auth-check.js +100 -0
  203. package/dist/cli/auth-check.js.map +1 -0
  204. package/dist/cli/auth-command.d.ts +27 -0
  205. package/dist/cli/auth-command.d.ts.map +1 -0
  206. package/dist/cli/auth-command.js +150 -0
  207. package/dist/cli/auth-command.js.map +1 -0
  208. package/dist/cli/config-selector.js +2 -2
  209. package/dist/cli/config-selector.js.map +1 -1
  210. package/dist/cli/credential-print.d.ts +18 -23
  211. package/dist/cli/credential-print.d.ts.map +1 -1
  212. package/dist/cli/credential-print.js +42 -88
  213. package/dist/cli/credential-print.js.map +1 -1
  214. package/dist/cli/experimental/auth.d.ts +16 -0
  215. package/dist/cli/experimental/auth.d.ts.map +1 -0
  216. package/dist/cli/experimental/auth.js +13 -0
  217. package/dist/cli/experimental/auth.js.map +1 -0
  218. package/dist/cli/experimental/cli.d.ts +6 -0
  219. package/dist/cli/experimental/cli.d.ts.map +1 -0
  220. package/dist/cli/experimental/cli.js +5 -0
  221. package/dist/cli/experimental/cli.js.map +1 -0
  222. package/dist/cli/experimental/command-options.d.ts +17 -0
  223. package/dist/cli/experimental/command-options.d.ts.map +1 -0
  224. package/dist/cli/experimental/command-options.js +35 -0
  225. package/dist/cli/experimental/command-options.js.map +1 -0
  226. package/dist/cli/experimental/command.d.ts +63 -0
  227. package/dist/cli/experimental/command.d.ts.map +1 -0
  228. package/dist/cli/experimental/command.js +127 -0
  229. package/dist/cli/experimental/command.js.map +1 -0
  230. package/dist/cli/experimental/commands/client.d.ts +13 -0
  231. package/dist/cli/experimental/commands/client.d.ts.map +1 -0
  232. package/dist/cli/experimental/commands/client.js +25 -0
  233. package/dist/cli/experimental/commands/client.js.map +1 -0
  234. package/dist/cli/experimental/commands/pi.d.ts +15 -0
  235. package/dist/cli/experimental/commands/pi.d.ts.map +1 -0
  236. package/dist/cli/experimental/commands/pi.js +28 -0
  237. package/dist/cli/experimental/commands/pi.js.map +1 -0
  238. package/dist/cli/experimental/commands/server.d.ts +13 -0
  239. package/dist/cli/experimental/commands/server.d.ts.map +1 -0
  240. package/dist/cli/experimental/commands/server.js +25 -0
  241. package/dist/cli/experimental/commands/server.js.map +1 -0
  242. package/dist/cli/experimental/transport-address.d.ts +10 -0
  243. package/dist/cli/experimental/transport-address.d.ts.map +1 -0
  244. package/dist/cli/experimental/transport-address.js +38 -0
  245. package/dist/cli/experimental/transport-address.js.map +1 -0
  246. package/dist/cli/session-picker.js +2 -2
  247. package/dist/cli/session-picker.js.map +1 -1
  248. package/dist/cli/startup-ui.d.ts.map +1 -1
  249. package/dist/cli/startup-ui.js +4 -10
  250. package/dist/cli/startup-ui.js.map +1 -1
  251. package/dist/cli.js +2 -0
  252. package/dist/cli.js.map +1 -1
  253. package/dist/client/index.d.ts +3 -0
  254. package/dist/client/index.d.ts.map +1 -0
  255. package/dist/client/index.js +3 -0
  256. package/dist/client/index.js.map +1 -0
  257. package/dist/client/remote-session.d.ts +64 -0
  258. package/dist/client/remote-session.d.ts.map +1 -0
  259. package/dist/client/remote-session.js +351 -0
  260. package/dist/client/remote-session.js.map +1 -0
  261. package/dist/client/transcript.d.ts +12 -0
  262. package/dist/client/transcript.d.ts.map +1 -0
  263. package/dist/client/transcript.js +98 -0
  264. package/dist/client/transcript.js.map +1 -0
  265. package/dist/core/agent-session-auto-compaction.d.ts +17 -13
  266. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  267. package/dist/core/agent-session-auto-compaction.js +146 -64
  268. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  269. package/dist/core/agent-session-bash.d.ts.map +1 -1
  270. package/dist/core/agent-session-bash.js +2 -0
  271. package/dist/core/agent-session-bash.js.map +1 -1
  272. package/dist/core/agent-session-compaction.d.ts +3 -6
  273. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  274. package/dist/core/agent-session-compaction.js +64 -28
  275. package/dist/core/agent-session-compaction.js.map +1 -1
  276. package/dist/core/agent-session-events.d.ts +1 -11
  277. package/dist/core/agent-session-events.d.ts.map +1 -1
  278. package/dist/core/agent-session-events.js +15 -23
  279. package/dist/core/agent-session-events.js.map +1 -1
  280. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  281. package/dist/core/agent-session-extension-bindings.js +4 -2
  282. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  283. package/dist/core/agent-session-methods.d.ts +6 -2
  284. package/dist/core/agent-session-methods.d.ts.map +1 -1
  285. package/dist/core/agent-session-methods.js.map +1 -1
  286. package/dist/core/agent-session-models.d.ts +1 -0
  287. package/dist/core/agent-session-models.d.ts.map +1 -1
  288. package/dist/core/agent-session-models.js +11 -4
  289. package/dist/core/agent-session-models.js.map +1 -1
  290. package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -1
  291. package/dist/core/agent-session-post-tool-compaction.js +22 -6
  292. package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
  293. package/dist/core/agent-session-runtime-auth.d.ts.map +1 -1
  294. package/dist/core/agent-session-runtime-auth.js +3 -0
  295. package/dist/core/agent-session-runtime-auth.js.map +1 -1
  296. package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
  297. package/dist/core/agent-session-tool-hooks.js +25 -14
  298. package/dist/core/agent-session-tool-hooks.js.map +1 -1
  299. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  300. package/dist/core/agent-session-tool-registry.js +4 -0
  301. package/dist/core/agent-session-tool-registry.js.map +1 -1
  302. package/dist/core/agent-session-types.d.ts +2 -0
  303. package/dist/core/agent-session-types.d.ts.map +1 -1
  304. package/dist/core/agent-session-types.js.map +1 -1
  305. package/dist/core/agent-session.d.ts +6 -0
  306. package/dist/core/agent-session.d.ts.map +1 -1
  307. package/dist/core/agent-session.js +30 -0
  308. package/dist/core/agent-session.js.map +1 -1
  309. package/dist/core/atomic-guide-command.d.ts.map +1 -1
  310. package/dist/core/atomic-guide-command.js +2 -3
  311. package/dist/core/atomic-guide-command.js.map +1 -1
  312. package/dist/core/auth-storage.d.ts +18 -1
  313. package/dist/core/auth-storage.d.ts.map +1 -1
  314. package/dist/core/auth-storage.js +83 -0
  315. package/dist/core/auth-storage.js.map +1 -1
  316. package/dist/core/bash-executor.d.ts +5 -0
  317. package/dist/core/bash-executor.d.ts.map +1 -1
  318. package/dist/core/bash-executor.js +43 -19
  319. package/dist/core/bash-executor.js.map +1 -1
  320. package/dist/core/builtin-packages.d.ts.map +1 -1
  321. package/dist/core/builtin-packages.js +6 -0
  322. package/dist/core/builtin-packages.js.map +1 -1
  323. package/dist/core/codex-fast-mode.d.ts.map +1 -1
  324. package/dist/core/codex-fast-mode.js +8 -3
  325. package/dist/core/codex-fast-mode.js.map +1 -1
  326. package/dist/core/exec.d.ts.map +1 -1
  327. package/dist/core/exec.js +4 -3
  328. package/dist/core/exec.js.map +1 -1
  329. package/dist/core/extensions/agent-events.d.ts +0 -1
  330. package/dist/core/extensions/agent-events.d.ts.map +1 -1
  331. package/dist/core/extensions/agent-events.js.map +1 -1
  332. package/dist/core/extensions/api-types.d.ts +5 -3
  333. package/dist/core/extensions/api-types.d.ts.map +1 -1
  334. package/dist/core/extensions/api-types.js.map +1 -1
  335. package/dist/core/extensions/context-types.d.ts +15 -0
  336. package/dist/core/extensions/context-types.d.ts.map +1 -1
  337. package/dist/core/extensions/context-types.js.map +1 -1
  338. package/dist/core/extensions/event-results.d.ts +5 -0
  339. package/dist/core/extensions/event-results.d.ts.map +1 -1
  340. package/dist/core/extensions/event-results.js.map +1 -1
  341. package/dist/core/extensions/index.d.ts +2 -1
  342. package/dist/core/extensions/index.d.ts.map +1 -1
  343. package/dist/core/extensions/index.js +1 -0
  344. package/dist/core/extensions/index.js.map +1 -1
  345. package/dist/core/extensions/loader-api.d.ts.map +1 -1
  346. package/dist/core/extensions/loader-api.js +14 -1
  347. package/dist/core/extensions/loader-api.js.map +1 -1
  348. package/dist/core/extensions/loader-discovery.d.ts.map +1 -1
  349. package/dist/core/extensions/loader-discovery.js +3 -23
  350. package/dist/core/extensions/loader-discovery.js.map +1 -1
  351. package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
  352. package/dist/core/extensions/loader-runtime.js +20 -3
  353. package/dist/core/extensions/loader-runtime.js.map +1 -1
  354. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  355. package/dist/core/extensions/loader-virtual-modules.js +7 -1
  356. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  357. package/dist/core/extensions/message-types.d.ts +6 -0
  358. package/dist/core/extensions/message-types.d.ts.map +1 -1
  359. package/dist/core/extensions/message-types.js.map +1 -1
  360. package/dist/core/extensions/provider-types.d.ts +9 -3
  361. package/dist/core/extensions/provider-types.d.ts.map +1 -1
  362. package/dist/core/extensions/provider-types.js.map +1 -1
  363. package/dist/core/extensions/runner-registries.d.ts +2 -1
  364. package/dist/core/extensions/runner-registries.d.ts.map +1 -1
  365. package/dist/core/extensions/runner-registries.js +3 -0
  366. package/dist/core/extensions/runner-registries.js.map +1 -1
  367. package/dist/core/extensions/runner-ui.d.ts.map +1 -1
  368. package/dist/core/extensions/runner-ui.js +1 -0
  369. package/dist/core/extensions/runner-ui.js.map +1 -1
  370. package/dist/core/extensions/runner.d.ts +2 -1
  371. package/dist/core/extensions/runner.d.ts.map +1 -1
  372. package/dist/core/extensions/runner.js +6 -2
  373. package/dist/core/extensions/runner.js.map +1 -1
  374. package/dist/core/extensions/runtime-types.d.ts +4 -1
  375. package/dist/core/extensions/runtime-types.d.ts.map +1 -1
  376. package/dist/core/extensions/runtime-types.js.map +1 -1
  377. package/dist/core/extensions/stale-context.d.ts +5 -0
  378. package/dist/core/extensions/stale-context.d.ts.map +1 -0
  379. package/dist/core/extensions/stale-context.js +11 -0
  380. package/dist/core/extensions/stale-context.js.map +1 -0
  381. package/dist/core/extensions/ui-types.d.ts +14 -11
  382. package/dist/core/extensions/ui-types.d.ts.map +1 -1
  383. package/dist/core/extensions/ui-types.js.map +1 -1
  384. package/dist/core/footer-data-provider.d.ts.map +1 -1
  385. package/dist/core/footer-data-provider.js +3 -2
  386. package/dist/core/footer-data-provider.js.map +1 -1
  387. package/dist/core/index.d.ts +1 -1
  388. package/dist/core/index.d.ts.map +1 -1
  389. package/dist/core/index.js.map +1 -1
  390. package/dist/core/intercom-runtime-group.d.ts +13 -0
  391. package/dist/core/intercom-runtime-group.d.ts.map +1 -0
  392. package/dist/core/intercom-runtime-group.js +23 -0
  393. package/dist/core/intercom-runtime-group.js.map +1 -0
  394. package/dist/core/keybindings.d.ts +44 -4
  395. package/dist/core/keybindings.d.ts.map +1 -1
  396. package/dist/core/model-config.d.ts +39 -5
  397. package/dist/core/model-config.d.ts.map +1 -1
  398. package/dist/core/model-config.js +6 -0
  399. package/dist/core/model-config.js.map +1 -1
  400. package/dist/core/model-registry.d.ts +12 -5
  401. package/dist/core/model-registry.d.ts.map +1 -1
  402. package/dist/core/model-registry.js +20 -12
  403. package/dist/core/model-registry.js.map +1 -1
  404. package/dist/core/model-resolver-cli.d.ts.map +1 -1
  405. package/dist/core/model-resolver-cli.js +46 -14
  406. package/dist/core/model-resolver-cli.js.map +1 -1
  407. package/dist/core/model-resolver-defaults.d.ts.map +1 -1
  408. package/dist/core/model-resolver-defaults.js +2 -0
  409. package/dist/core/model-resolver-defaults.js.map +1 -1
  410. package/dist/core/model-resolver-scope.d.ts +2 -0
  411. package/dist/core/model-resolver-scope.d.ts.map +1 -1
  412. package/dist/core/model-resolver-scope.js +12 -9
  413. package/dist/core/model-resolver-scope.js.map +1 -1
  414. package/dist/core/model-resolver.d.ts +1 -1
  415. package/dist/core/model-resolver.d.ts.map +1 -1
  416. package/dist/core/model-resolver.js +1 -1
  417. package/dist/core/model-resolver.js.map +1 -1
  418. package/dist/core/model-runtime-snapshot.d.ts +10 -0
  419. package/dist/core/model-runtime-snapshot.d.ts.map +1 -1
  420. package/dist/core/model-runtime-snapshot.js +14 -1
  421. package/dist/core/model-runtime-snapshot.js.map +1 -1
  422. package/dist/core/model-runtime-streaming.d.ts +3 -1
  423. package/dist/core/model-runtime-streaming.d.ts.map +1 -1
  424. package/dist/core/model-runtime-streaming.js +16 -0
  425. package/dist/core/model-runtime-streaming.js.map +1 -1
  426. package/dist/core/model-runtime-types.d.ts +2 -0
  427. package/dist/core/model-runtime-types.d.ts.map +1 -1
  428. package/dist/core/model-runtime-types.js.map +1 -1
  429. package/dist/core/model-runtime.d.ts +37 -10
  430. package/dist/core/model-runtime.d.ts.map +1 -1
  431. package/dist/core/model-runtime.js +312 -113
  432. package/dist/core/model-runtime.js.map +1 -1
  433. package/dist/core/oauth-login.d.ts.map +1 -1
  434. package/dist/core/oauth-login.js +2 -1
  435. package/dist/core/oauth-login.js.map +1 -1
  436. package/dist/core/openai-responses-payload-sanitizer.d.ts.map +1 -1
  437. package/dist/core/openai-responses-payload-sanitizer.js +18 -2
  438. package/dist/core/openai-responses-payload-sanitizer.js.map +1 -1
  439. package/dist/core/package-manager-git.d.ts.map +1 -1
  440. package/dist/core/package-manager-git.js +56 -10
  441. package/dist/core/package-manager-git.js.map +1 -1
  442. package/dist/core/package-manager-manifest.d.ts +1 -1
  443. package/dist/core/package-manager-manifest.d.ts.map +1 -1
  444. package/dist/core/package-manager-manifest.js +19 -9
  445. package/dist/core/package-manager-manifest.js.map +1 -1
  446. package/dist/core/package-manager-resource-collector.js.map +1 -1
  447. package/dist/core/package-manager-resource-files.d.ts.map +1 -1
  448. package/dist/core/package-manager-resource-files.js +1 -2
  449. package/dist/core/package-manager-resource-files.js.map +1 -1
  450. package/dist/core/provider-composer-internal.d.ts +10 -2
  451. package/dist/core/provider-composer-internal.d.ts.map +1 -1
  452. package/dist/core/provider-composer-internal.js +7 -3
  453. package/dist/core/provider-composer-internal.js.map +1 -1
  454. package/dist/core/provider-composer.d.ts.map +1 -1
  455. package/dist/core/provider-composer.js +19 -12
  456. package/dist/core/provider-composer.js.map +1 -1
  457. package/dist/core/provider-display-names.d.ts.map +1 -1
  458. package/dist/core/provider-display-names.js +2 -0
  459. package/dist/core/provider-display-names.js.map +1 -1
  460. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  461. package/dist/core/remote-catalog-provider.js +77 -67
  462. package/dist/core/remote-catalog-provider.js.map +1 -1
  463. package/dist/core/resolve-config-value.d.ts.map +1 -1
  464. package/dist/core/resolve-config-value.js +3 -0
  465. package/dist/core/resolve-config-value.js.map +1 -1
  466. package/dist/core/resource-loader-context-files.d.ts.map +1 -1
  467. package/dist/core/resource-loader-context-files.js +13 -5
  468. package/dist/core/resource-loader-context-files.js.map +1 -1
  469. package/dist/core/runtime-credentials.d.ts +5 -5
  470. package/dist/core/runtime-credentials.d.ts.map +1 -1
  471. package/dist/core/runtime-credentials.js +8 -8
  472. package/dist/core/runtime-credentials.js.map +1 -1
  473. package/dist/core/session-manager-list.d.ts.map +1 -1
  474. package/dist/core/session-manager-list.js +3 -1
  475. package/dist/core/session-manager-list.js.map +1 -1
  476. package/dist/core/settings-manager-ui-accessors.d.ts +8 -1
  477. package/dist/core/settings-manager-ui-accessors.d.ts.map +1 -1
  478. package/dist/core/settings-manager-ui-accessors.js +31 -0
  479. package/dist/core/settings-manager-ui-accessors.js.map +1 -1
  480. package/dist/core/settings-manager.d.ts +2 -1
  481. package/dist/core/settings-manager.d.ts.map +1 -1
  482. package/dist/core/settings-manager.js.map +1 -1
  483. package/dist/core/settings-merge.d.ts.map +1 -1
  484. package/dist/core/settings-merge.js +13 -16
  485. package/dist/core/settings-merge.js.map +1 -1
  486. package/dist/core/settings-types.d.ts +5 -0
  487. package/dist/core/settings-types.d.ts.map +1 -1
  488. package/dist/core/settings-types.js.map +1 -1
  489. package/dist/core/slash-commands.d.ts.map +1 -1
  490. package/dist/core/slash-commands.js +0 -2
  491. package/dist/core/slash-commands.js.map +1 -1
  492. package/dist/core/tools/ask-user-question/state/questionnaire-session.d.ts +2 -2
  493. package/dist/core/tools/ask-user-question/state/questionnaire-session.d.ts.map +1 -1
  494. package/dist/core/tools/ask-user-question/state/questionnaire-session.js +39 -2
  495. package/dist/core/tools/ask-user-question/state/questionnaire-session.js.map +1 -1
  496. package/dist/core/tools/bash-async-execution.d.ts +2 -0
  497. package/dist/core/tools/bash-async-execution.d.ts.map +1 -1
  498. package/dist/core/tools/bash-async-execution.js +4 -1
  499. package/dist/core/tools/bash-async-execution.js.map +1 -1
  500. package/dist/core/tools/bash-async-output.d.ts +1 -0
  501. package/dist/core/tools/bash-async-output.d.ts.map +1 -1
  502. package/dist/core/tools/bash-async-output.js +62 -27
  503. package/dist/core/tools/bash-async-output.js.map +1 -1
  504. package/dist/core/tools/bash-pty-native.d.ts.map +1 -1
  505. package/dist/core/tools/bash-pty-native.js +2 -1
  506. package/dist/core/tools/bash-pty-native.js.map +1 -1
  507. package/dist/core/tools/bash.d.ts +9 -0
  508. package/dist/core/tools/bash.d.ts.map +1 -1
  509. package/dist/core/tools/bash.js +34 -16
  510. package/dist/core/tools/bash.js.map +1 -1
  511. package/dist/core/tools/directory-tree.d.ts +11 -0
  512. package/dist/core/tools/directory-tree.d.ts.map +1 -1
  513. package/dist/core/tools/directory-tree.js +26 -0
  514. package/dist/core/tools/directory-tree.js.map +1 -1
  515. package/dist/core/tools/edit.d.ts +4 -0
  516. package/dist/core/tools/edit.d.ts.map +1 -1
  517. package/dist/core/tools/edit.js +12 -8
  518. package/dist/core/tools/edit.js.map +1 -1
  519. package/dist/core/tools/errno.d.ts +25 -0
  520. package/dist/core/tools/errno.d.ts.map +1 -0
  521. package/dist/core/tools/errno.js +29 -0
  522. package/dist/core/tools/errno.js.map +1 -0
  523. package/dist/core/tools/find.d.ts +8 -1
  524. package/dist/core/tools/find.d.ts.map +1 -1
  525. package/dist/core/tools/find.js +20 -15
  526. package/dist/core/tools/find.js.map +1 -1
  527. package/dist/core/tools/grep.d.ts.map +1 -1
  528. package/dist/core/tools/grep.js +5 -1
  529. package/dist/core/tools/grep.js.map +1 -1
  530. package/dist/core/tools/index.d.ts +7 -7
  531. package/dist/core/tools/index.d.ts.map +1 -1
  532. package/dist/core/tools/index.js +7 -7
  533. package/dist/core/tools/index.js.map +1 -1
  534. package/dist/core/tools/ls.d.ts +4 -0
  535. package/dist/core/tools/ls.d.ts.map +1 -1
  536. package/dist/core/tools/ls.js +5 -1
  537. package/dist/core/tools/ls.js.map +1 -1
  538. package/dist/core/tools/output-accumulator.d.ts +8 -1
  539. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  540. package/dist/core/tools/output-accumulator.js +50 -28
  541. package/dist/core/tools/output-accumulator.js.map +1 -1
  542. package/dist/core/tools/oversized-tool-result.d.ts.map +1 -1
  543. package/dist/core/tools/oversized-tool-result.js +129 -22
  544. package/dist/core/tools/oversized-tool-result.js.map +1 -1
  545. package/dist/core/tools/persisted-output-file.d.ts +80 -0
  546. package/dist/core/tools/persisted-output-file.d.ts.map +1 -0
  547. package/dist/core/tools/persisted-output-file.js +284 -0
  548. package/dist/core/tools/persisted-output-file.js.map +1 -0
  549. package/dist/core/tools/read.d.ts +10 -0
  550. package/dist/core/tools/read.d.ts.map +1 -1
  551. package/dist/core/tools/read.js +20 -8
  552. package/dist/core/tools/read.js.map +1 -1
  553. package/dist/core/tools/search.d.ts +4 -0
  554. package/dist/core/tools/search.d.ts.map +1 -1
  555. package/dist/core/tools/search.js +5 -1
  556. package/dist/core/tools/search.js.map +1 -1
  557. package/dist/core/tools/session-temp-cleanup.d.ts +133 -0
  558. package/dist/core/tools/session-temp-cleanup.d.ts.map +1 -0
  559. package/dist/core/tools/session-temp-cleanup.js +669 -0
  560. package/dist/core/tools/session-temp-cleanup.js.map +1 -0
  561. package/dist/core/tools/session-temp-dir.d.ts +116 -0
  562. package/dist/core/tools/session-temp-dir.d.ts.map +1 -0
  563. package/dist/core/tools/session-temp-dir.js +409 -0
  564. package/dist/core/tools/session-temp-dir.js.map +1 -0
  565. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  566. package/dist/core/tools/tool-definition-wrapper.js +2 -0
  567. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  568. package/dist/core/tools/tool-limits.d.ts +11 -0
  569. package/dist/core/tools/tool-limits.d.ts.map +1 -1
  570. package/dist/core/tools/tool-limits.js +11 -0
  571. package/dist/core/tools/tool-limits.js.map +1 -1
  572. package/dist/core/tools/windows-directory-security.d.ts +82 -0
  573. package/dist/core/tools/windows-directory-security.d.ts.map +1 -0
  574. package/dist/core/tools/windows-directory-security.js +238 -0
  575. package/dist/core/tools/windows-directory-security.js.map +1 -0
  576. package/dist/core/tools/write.d.ts +4 -0
  577. package/dist/core/tools/write.d.ts.map +1 -1
  578. package/dist/core/tools/write.js +8 -4
  579. package/dist/core/tools/write.js.map +1 -1
  580. package/dist/core/trust-manager.js +1 -1
  581. package/dist/core/trust-manager.js.map +1 -1
  582. package/dist/extensions/llama/huggingface-ui.d.ts +1 -1
  583. package/dist/extensions/llama/huggingface-ui.d.ts.map +1 -1
  584. package/dist/extensions/llama/huggingface-ui.js +6 -5
  585. package/dist/extensions/llama/huggingface-ui.js.map +1 -1
  586. package/dist/extensions/llama/index.d.ts.map +1 -1
  587. package/dist/extensions/llama/index.js +11 -2
  588. package/dist/extensions/llama/index.js.map +1 -1
  589. package/dist/extensions/llama/provider.d.ts.map +1 -1
  590. package/dist/extensions/llama/provider.js +24 -8
  591. package/dist/extensions/llama/provider.js.map +1 -1
  592. package/dist/extensions/llama/ui.d.ts.map +1 -1
  593. package/dist/extensions/llama/ui.js +5 -2
  594. package/dist/extensions/llama/ui.js.map +1 -1
  595. package/dist/index-extensions.d.ts +2 -2
  596. package/dist/index-extensions.d.ts.map +1 -1
  597. package/dist/index-extensions.js +1 -1
  598. package/dist/index-extensions.js.map +1 -1
  599. package/dist/index.d.ts +5 -2
  600. package/dist/index.d.ts.map +1 -1
  601. package/dist/index.js +6 -2
  602. package/dist/index.js.map +1 -1
  603. package/dist/main-runtime-api-key.d.ts +2 -2
  604. package/dist/main-runtime-api-key.d.ts.map +1 -1
  605. package/dist/main-runtime-api-key.js +7 -2
  606. package/dist/main-runtime-api-key.js.map +1 -1
  607. package/dist/main-session.js +2 -2
  608. package/dist/main-session.js.map +1 -1
  609. package/dist/main.d.ts.map +1 -1
  610. package/dist/main.js +130 -26
  611. package/dist/main.js.map +1 -1
  612. package/dist/modes/index.d.ts +1 -0
  613. package/dist/modes/index.d.ts.map +1 -1
  614. package/dist/modes/index.js.map +1 -1
  615. package/dist/modes/interactive/components/assistant-message.d.ts +6 -2
  616. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  617. package/dist/modes/interactive/components/assistant-message.js +18 -5
  618. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  619. package/dist/modes/interactive/components/bordered-loader.d.ts +1 -1
  620. package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
  621. package/dist/modes/interactive/components/bordered-loader.js +5 -4
  622. package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
  623. package/dist/modes/interactive/components/branch-summary-message.d.ts +2 -1
  624. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  625. package/dist/modes/interactive/components/branch-summary-message.js +3 -2
  626. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  627. package/dist/modes/interactive/components/chat-message-renderer.d.ts +17 -7
  628. package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
  629. package/dist/modes/interactive/components/chat-message-renderer.js +35 -69
  630. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  631. package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
  632. package/dist/modes/interactive/components/chat-session-host-actions.js +11 -3
  633. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  634. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  635. package/dist/modes/interactive/components/chat-session-host-events.js +25 -15
  636. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  637. package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
  638. package/dist/modes/interactive/components/chat-session-host-rendering.js +9 -4
  639. package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
  640. package/dist/modes/interactive/components/chat-session-host-state.d.ts +2 -0
  641. package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
  642. package/dist/modes/interactive/components/chat-session-host-state.js +2 -0
  643. package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
  644. package/dist/modes/interactive/components/chat-session-host.d.ts +9 -0
  645. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  646. package/dist/modes/interactive/components/chat-session-host.js +14 -0
  647. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  648. package/dist/modes/interactive/components/chat-transcript.d.ts +32 -0
  649. package/dist/modes/interactive/components/chat-transcript.d.ts.map +1 -1
  650. package/dist/modes/interactive/components/chat-transcript.js +173 -5
  651. package/dist/modes/interactive/components/chat-transcript.js.map +1 -1
  652. package/dist/modes/interactive/components/config-selector-list.d.ts +1 -1
  653. package/dist/modes/interactive/components/config-selector-list.d.ts.map +1 -1
  654. package/dist/modes/interactive/components/config-selector-list.js +9 -8
  655. package/dist/modes/interactive/components/config-selector-list.js.map +1 -1
  656. package/dist/modes/interactive/components/custom-editor.d.ts +1 -1
  657. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  658. package/dist/modes/interactive/components/custom-editor.js +32 -10
  659. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  660. package/dist/modes/interactive/components/custom-message.d.ts +2 -1
  661. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  662. package/dist/modes/interactive/components/custom-message.js +3 -2
  663. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  664. package/dist/modes/interactive/components/extension-editor.d.ts +1 -1
  665. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  666. package/dist/modes/interactive/components/extension-editor.js +3 -2
  667. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  668. package/dist/modes/interactive/components/extension-input.d.ts +1 -1
  669. package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
  670. package/dist/modes/interactive/components/extension-input.js +1 -0
  671. package/dist/modes/interactive/components/extension-input.js.map +1 -1
  672. package/dist/modes/interactive/components/extension-selector.d.ts +1 -1
  673. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
  674. package/dist/modes/interactive/components/extension-selector.js +4 -0
  675. package/dist/modes/interactive/components/extension-selector.js.map +1 -1
  676. package/dist/modes/interactive/components/fast-mode-selector.d.ts +1 -1
  677. package/dist/modes/interactive/components/fast-mode-selector.d.ts.map +1 -1
  678. package/dist/modes/interactive/components/fast-mode-selector.js +7 -5
  679. package/dist/modes/interactive/components/fast-mode-selector.js.map +1 -1
  680. package/dist/modes/interactive/components/first-time-setup.d.ts +1 -1
  681. package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
  682. package/dist/modes/interactive/components/first-time-setup.js +3 -0
  683. package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
  684. package/dist/modes/interactive/components/footer.js +1 -1
  685. package/dist/modes/interactive/components/footer.js.map +1 -1
  686. package/dist/modes/interactive/components/host-input-form.d.ts +1 -1
  687. package/dist/modes/interactive/components/host-input-form.d.ts.map +1 -1
  688. package/dist/modes/interactive/components/host-input-form.js +6 -5
  689. package/dist/modes/interactive/components/host-input-form.js.map +1 -1
  690. package/dist/modes/interactive/components/index.d.ts +1 -1
  691. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  692. package/dist/modes/interactive/components/index.js.map +1 -1
  693. package/dist/modes/interactive/components/login-dialog.d.ts +1 -1
  694. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  695. package/dist/modes/interactive/components/login-dialog.js +2 -1
  696. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  697. package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
  698. package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
  699. package/dist/modes/interactive/components/markdown-transform.js +19 -0
  700. package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
  701. package/dist/modes/interactive/components/mermaid.d.ts +11 -0
  702. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
  703. package/dist/modes/interactive/components/mermaid.js +81 -0
  704. package/dist/modes/interactive/components/mermaid.js.map +1 -0
  705. package/dist/modes/interactive/components/model-selector.d.ts +2 -2
  706. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  707. package/dist/modes/interactive/components/model-selector.js +9 -6
  708. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  709. package/dist/modes/interactive/components/oauth-selector.d.ts +1 -1
  710. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  711. package/dist/modes/interactive/components/oauth-selector.js +3 -2
  712. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  713. package/dist/modes/interactive/components/scoped-models-selector.d.ts +6 -2
  714. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  715. package/dist/modes/interactive/components/scoped-models-selector.js +39 -13
  716. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  717. package/dist/modes/interactive/components/session-selector-delete.d.ts.map +1 -1
  718. package/dist/modes/interactive/components/session-selector-delete.js +2 -1
  719. package/dist/modes/interactive/components/session-selector-delete.js.map +1 -1
  720. package/dist/modes/interactive/components/session-selector-list.d.ts +1 -1
  721. package/dist/modes/interactive/components/session-selector-list.d.ts.map +1 -1
  722. package/dist/modes/interactive/components/session-selector-list.js +12 -11
  723. package/dist/modes/interactive/components/session-selector-list.js.map +1 -1
  724. package/dist/modes/interactive/components/session-selector.d.ts +1 -1
  725. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  726. package/dist/modes/interactive/components/session-selector.js +3 -3
  727. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  728. package/dist/modes/interactive/components/settings-selector-handlers.d.ts.map +1 -1
  729. package/dist/modes/interactive/components/settings-selector-handlers.js +9 -0
  730. package/dist/modes/interactive/components/settings-selector-handlers.js.map +1 -1
  731. package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
  732. package/dist/modes/interactive/components/settings-selector-items.js +21 -0
  733. package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
  734. package/dist/modes/interactive/components/settings-selector-submenus.d.ts +3 -3
  735. package/dist/modes/interactive/components/settings-selector-submenus.d.ts.map +1 -1
  736. package/dist/modes/interactive/components/settings-selector-submenus.js +6 -1
  737. package/dist/modes/interactive/components/settings-selector-submenus.js.map +1 -1
  738. package/dist/modes/interactive/components/settings-selector-types.d.ts +8 -1
  739. package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
  740. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  741. package/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -1
  742. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  743. package/dist/modes/interactive/components/skill-invocation-message.js +3 -2
  744. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  745. package/dist/modes/interactive/components/tool-execution.d.ts +2 -0
  746. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  747. package/dist/modes/interactive/components/tool-execution.js +50 -27
  748. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  749. package/dist/modes/interactive/components/tree-selector-component.d.ts +1 -1
  750. package/dist/modes/interactive/components/tree-selector-component.d.ts.map +1 -1
  751. package/dist/modes/interactive/components/tree-selector-component.js +2 -3
  752. package/dist/modes/interactive/components/tree-selector-component.js.map +1 -1
  753. package/dist/modes/interactive/components/tree-selector-help.d.ts +1 -1
  754. package/dist/modes/interactive/components/tree-selector-help.d.ts.map +1 -1
  755. package/dist/modes/interactive/components/tree-selector-help.js +3 -1
  756. package/dist/modes/interactive/components/tree-selector-help.js.map +1 -1
  757. package/dist/modes/interactive/components/tree-selector-label-input.d.ts +1 -1
  758. package/dist/modes/interactive/components/tree-selector-label-input.d.ts.map +1 -1
  759. package/dist/modes/interactive/components/tree-selector-label-input.js +1 -0
  760. package/dist/modes/interactive/components/tree-selector-label-input.js.map +1 -1
  761. package/dist/modes/interactive/components/tree-selector-list.d.ts +1 -1
  762. package/dist/modes/interactive/components/tree-selector-list.d.ts.map +1 -1
  763. package/dist/modes/interactive/components/tree-selector-list.js +3 -0
  764. package/dist/modes/interactive/components/tree-selector-list.js.map +1 -1
  765. package/dist/modes/interactive/components/trust-selector.d.ts +1 -1
  766. package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
  767. package/dist/modes/interactive/components/trust-selector.js +4 -0
  768. package/dist/modes/interactive/components/trust-selector.js.map +1 -1
  769. package/dist/modes/interactive/components/user-message-selector.d.ts +1 -1
  770. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  771. package/dist/modes/interactive/components/user-message-selector.js +4 -0
  772. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  773. package/dist/modes/interactive/components/user-message.d.ts +4 -1
  774. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  775. package/dist/modes/interactive/components/user-message.js +10 -2
  776. package/dist/modes/interactive/components/user-message.js.map +1 -1
  777. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  778. package/dist/modes/interactive/external-editor.js +2 -1
  779. package/dist/modes/interactive/external-editor.js.map +1 -1
  780. package/dist/modes/interactive/interactive-agent-events.js +36 -18
  781. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  782. package/dist/modes/interactive/interactive-auth-login.js +9 -2
  783. package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
  784. package/dist/modes/interactive/interactive-auth-routing.d.ts.map +1 -1
  785. package/dist/modes/interactive/interactive-auth-routing.js +5 -1
  786. package/dist/modes/interactive/interactive-auth-routing.js.map +1 -1
  787. package/dist/modes/interactive/interactive-bash-compact.js +16 -4
  788. package/dist/modes/interactive/interactive-bash-compact.js.map +1 -1
  789. package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
  790. package/dist/modes/interactive/interactive-deferred-startup.js +3 -0
  791. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
  792. package/dist/modes/interactive/interactive-editor-actions.js +2 -0
  793. package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
  794. package/dist/modes/interactive/interactive-extension-context.js +12 -7
  795. package/dist/modes/interactive/interactive-extension-context.js.map +1 -1
  796. package/dist/modes/interactive/interactive-extension-custom-ui.js +1 -0
  797. package/dist/modes/interactive/interactive-extension-custom-ui.js.map +1 -1
  798. package/dist/modes/interactive/interactive-extension-dialogs.js +7 -0
  799. package/dist/modes/interactive/interactive-extension-dialogs.js.map +1 -1
  800. package/dist/modes/interactive/interactive-extension-widgets.js +7 -24
  801. package/dist/modes/interactive/interactive-extension-widgets.js.map +1 -1
  802. package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
  803. package/dist/modes/interactive/interactive-input-handling.js +9 -8
  804. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  805. package/dist/modes/interactive/interactive-mode-base.d.ts +52 -3
  806. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  807. package/dist/modes/interactive/interactive-mode-base.js +143 -5
  808. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  809. package/dist/modes/interactive/interactive-mode-deps.d.ts +2 -2
  810. package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
  811. package/dist/modes/interactive/interactive-mode-deps.js +2 -2
  812. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  813. package/dist/modes/interactive/interactive-mode-surface.d.ts +9 -3
  814. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  815. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  816. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  817. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  818. package/dist/modes/interactive/interactive-mode.js +1 -0
  819. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  820. package/dist/modes/interactive/interactive-model-routing.js +107 -41
  821. package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
  822. package/dist/modes/interactive/interactive-process-lifecycle.js +1 -1
  823. package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
  824. package/dist/modes/interactive/interactive-render-chat.js +24 -6
  825. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  826. package/dist/modes/interactive/interactive-selectors.js +44 -5
  827. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  828. package/dist/modes/interactive/interactive-session-runtime.js +1 -0
  829. package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
  830. package/dist/modes/interactive/interactive-slash-commands.js +9 -4
  831. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  832. package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
  833. package/dist/modes/interactive/interactive-startup.js +37 -18
  834. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  835. package/dist/modes/interactive/interactive-tui.d.ts +21 -0
  836. package/dist/modes/interactive/interactive-tui.d.ts.map +1 -0
  837. package/dist/modes/interactive/interactive-tui.js +279 -0
  838. package/dist/modes/interactive/interactive-tui.js.map +1 -0
  839. package/dist/modes/interactive/streaming-assistant-message.d.ts +34 -0
  840. package/dist/modes/interactive/streaming-assistant-message.d.ts.map +1 -0
  841. package/dist/modes/interactive/streaming-assistant-message.js +76 -0
  842. package/dist/modes/interactive/streaming-assistant-message.js.map +1 -0
  843. package/dist/modes/interactive/theme/catppuccin-frappe.json +1 -0
  844. package/dist/modes/interactive/theme/catppuccin-latte.json +1 -0
  845. package/dist/modes/interactive/theme/catppuccin-macchiato.json +1 -0
  846. package/dist/modes/interactive/theme/catppuccin-mocha.json +1 -0
  847. package/dist/modes/interactive/theme/dark.json +1 -0
  848. package/dist/modes/interactive/theme/light.json +1 -0
  849. package/dist/modes/interactive/theme/terminal-detection.d.ts +10 -0
  850. package/dist/modes/interactive/theme/terminal-detection.d.ts.map +1 -1
  851. package/dist/modes/interactive/theme/terminal-detection.js +19 -0
  852. package/dist/modes/interactive/theme/terminal-detection.js.map +1 -1
  853. package/dist/modes/interactive/theme/theme-class.d.ts +2 -2
  854. package/dist/modes/interactive/theme/theme-class.d.ts.map +1 -1
  855. package/dist/modes/interactive/theme/theme-class.js +5 -1
  856. package/dist/modes/interactive/theme/theme-class.js.map +1 -1
  857. package/dist/modes/interactive/theme/theme-controller.d.ts +3 -1
  858. package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
  859. package/dist/modes/interactive/theme/theme-controller.js +10 -13
  860. package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
  861. package/dist/modes/interactive/theme/theme-loading.d.ts.map +1 -1
  862. package/dist/modes/interactive/theme/theme-loading.js +1 -0
  863. package/dist/modes/interactive/theme/theme-loading.js.map +1 -1
  864. package/dist/modes/interactive/theme/theme-schema.d.ts +4 -0
  865. package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
  866. package/dist/modes/interactive/theme/theme-schema.js +2 -1
  867. package/dist/modes/interactive/theme/theme-schema.js.map +1 -1
  868. package/dist/modes/interactive/theme/theme-schema.json +5 -1
  869. package/dist/modes/interactive/theme/theme.d.ts +1 -1
  870. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  871. package/dist/modes/interactive/theme/theme.js +1 -1
  872. package/dist/modes/interactive/theme/theme.js.map +1 -1
  873. package/dist/modes/interactive-engine/engine-custom-ui.d.ts +1 -1
  874. package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
  875. package/dist/modes/interactive-engine/engine-custom-ui.js +28 -11
  876. package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
  877. package/dist/modes/interactive-engine/engine-render-service.js +3 -3
  878. package/dist/modes/interactive-engine/engine-render-service.js.map +1 -1
  879. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +2 -1
  880. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -1
  881. package/dist/modes/interactive-engine/extension-ui-bridge.js +2 -2
  882. package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -1
  883. package/dist/modes/interactive-engine/isolated-runtime.d.ts +7 -0
  884. package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
  885. package/dist/modes/interactive-engine/isolated-runtime.js +7 -0
  886. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  887. package/dist/modes/interactive-engine/protocol.d.ts +12 -10
  888. package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
  889. package/dist/modes/interactive-engine/protocol.js +14 -11
  890. package/dist/modes/interactive-engine/protocol.js.map +1 -1
  891. package/dist/modes/interactive-engine/remote-component.d.ts +11 -1
  892. package/dist/modes/interactive-engine/remote-component.d.ts.map +1 -1
  893. package/dist/modes/interactive-engine/remote-component.js +48 -8
  894. package/dist/modes/interactive-engine/remote-component.js.map +1 -1
  895. package/dist/modes/interactive-engine/terminal-mode-controller.d.ts +19 -12
  896. package/dist/modes/interactive-engine/terminal-mode-controller.d.ts.map +1 -1
  897. package/dist/modes/interactive-engine/terminal-mode-controller.js +54 -35
  898. package/dist/modes/interactive-engine/terminal-mode-controller.js.map +1 -1
  899. package/dist/modes/json-event.d.ts +28 -0
  900. package/dist/modes/json-event.d.ts.map +1 -0
  901. package/dist/modes/json-event.js +12 -0
  902. package/dist/modes/json-event.js.map +1 -0
  903. package/dist/modes/print-mode.d.ts.map +1 -1
  904. package/dist/modes/print-mode.js +2 -1
  905. package/dist/modes/print-mode.js.map +1 -1
  906. package/dist/modes/rpc/rpc-client-process.d.ts +1 -0
  907. package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
  908. package/dist/modes/rpc/rpc-client-process.js +5 -1
  909. package/dist/modes/rpc/rpc-client-process.js.map +1 -1
  910. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  911. package/dist/modes/rpc/rpc-client.js +7 -2
  912. package/dist/modes/rpc/rpc-client.js.map +1 -1
  913. package/dist/modes/rpc/rpc-command-handler.js +1 -1
  914. package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
  915. package/dist/modes/rpc/rpc-event-buffer.d.ts +9 -0
  916. package/dist/modes/rpc/rpc-event-buffer.d.ts.map +1 -1
  917. package/dist/modes/rpc/rpc-event-buffer.js +10 -5
  918. package/dist/modes/rpc/rpc-event-buffer.js.map +1 -1
  919. package/dist/modes/rpc/rpc-extension-ui.d.ts.map +1 -1
  920. package/dist/modes/rpc/rpc-extension-ui.js +3 -0
  921. package/dist/modes/rpc/rpc-extension-ui.js.map +1 -1
  922. package/dist/modes/rpc/rpc-input.js +1 -1
  923. package/dist/modes/rpc/rpc-input.js.map +1 -1
  924. package/dist/modes/rpc/rpc-output-buffer.d.ts +9 -0
  925. package/dist/modes/rpc/rpc-output-buffer.d.ts.map +1 -1
  926. package/dist/modes/rpc/rpc-output-buffer.js +10 -5
  927. package/dist/modes/rpc/rpc-output-buffer.js.map +1 -1
  928. package/dist/modes/rpc/rpc-provider-auth.d.ts.map +1 -1
  929. package/dist/modes/rpc/rpc-provider-auth.js +3 -0
  930. package/dist/modes/rpc/rpc-provider-auth.js.map +1 -1
  931. package/dist/modes/rpc/rpc-responses.d.ts +1 -1
  932. package/dist/modes/rpc/rpc-responses.d.ts.map +1 -1
  933. package/dist/modes/rpc/rpc-responses.js +13 -1
  934. package/dist/modes/rpc/rpc-responses.js.map +1 -1
  935. package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
  936. package/dist/modes/rpc/rpc-session-binding.js +2 -1
  937. package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
  938. package/dist/modes/rpc/rpc-types.d.ts +9 -2
  939. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  940. package/dist/modes/rpc/rpc-types.js.map +1 -1
  941. package/dist/rpc-entry.js +2 -0
  942. package/dist/rpc-entry.js.map +1 -1
  943. package/dist/self-update-plan.d.ts.map +1 -1
  944. package/dist/self-update-plan.js +5 -4
  945. package/dist/self-update-plan.js.map +1 -1
  946. package/dist/server/create-harness.d.ts +53 -0
  947. package/dist/server/create-harness.d.ts.map +1 -0
  948. package/dist/server/create-harness.js +349 -0
  949. package/dist/server/create-harness.js.map +1 -0
  950. package/dist/utils/agent-attribution.d.ts +2 -0
  951. package/dist/utils/agent-attribution.d.ts.map +1 -0
  952. package/dist/utils/agent-attribution.js +2 -0
  953. package/dist/utils/agent-attribution.js.map +1 -0
  954. package/dist/utils/child-process.d.ts +3 -1
  955. package/dist/utils/child-process.d.ts.map +1 -1
  956. package/dist/utils/child-process.js +24 -4
  957. package/dist/utils/child-process.js.map +1 -1
  958. package/dist/utils/clipboard-image.d.ts.map +1 -1
  959. package/dist/utils/clipboard-image.js +2 -1
  960. package/dist/utils/clipboard-image.js.map +1 -1
  961. package/dist/utils/clipboard.d.ts.map +1 -1
  962. package/dist/utils/clipboard.js +12 -3
  963. package/dist/utils/clipboard.js.map +1 -1
  964. package/dist/utils/management-http.d.ts +23 -0
  965. package/dist/utils/management-http.d.ts.map +1 -0
  966. package/dist/utils/management-http.js +50 -0
  967. package/dist/utils/management-http.js.map +1 -0
  968. package/dist/utils/open-browser.d.ts.map +1 -1
  969. package/dist/utils/open-browser.js +2 -1
  970. package/dist/utils/open-browser.js.map +1 -1
  971. package/dist/utils/paths.d.ts +2 -0
  972. package/dist/utils/paths.d.ts.map +1 -1
  973. package/dist/utils/paths.js +13 -0
  974. package/dist/utils/paths.js.map +1 -1
  975. package/dist/utils/shell.d.ts.map +1 -1
  976. package/dist/utils/shell.js +17 -4
  977. package/dist/utils/shell.js.map +1 -1
  978. package/dist/utils/tool-result-images.d.ts +17 -0
  979. package/dist/utils/tool-result-images.d.ts.map +1 -0
  980. package/dist/utils/tool-result-images.js +41 -0
  981. package/dist/utils/tool-result-images.js.map +1 -0
  982. package/dist/utils/tools-manager.d.ts.map +1 -1
  983. package/dist/utils/tools-manager.js +7 -8
  984. package/dist/utils/tools-manager.js.map +1 -1
  985. package/dist/utils/version-check.d.ts +4 -0
  986. package/dist/utils/version-check.d.ts.map +1 -1
  987. package/dist/utils/version-check.js +20 -2
  988. package/dist/utils/version-check.js.map +1 -1
  989. package/docs/compaction.md +2 -1
  990. package/docs/custom-provider.md +15 -7
  991. package/docs/development.md +1 -0
  992. package/docs/docs.json +1 -0
  993. package/docs/environment-variables.md +4 -0
  994. package/docs/extensions.md +102 -18
  995. package/docs/i-have-adhd.md +36 -0
  996. package/docs/intercom.md +26 -6
  997. package/docs/json.md +2 -2
  998. package/docs/keybindings.md +55 -12
  999. package/docs/models/model-selection.md +34 -8
  1000. package/docs/models.md +28 -3
  1001. package/docs/providers.md +20 -2
  1002. package/docs/quickstart.md +5 -5
  1003. package/docs/rpc.md +18 -12
  1004. package/docs/sdk.md +43 -7
  1005. package/docs/security.md +10 -10
  1006. package/docs/sessions.md +2 -0
  1007. package/docs/settings.md +25 -5
  1008. package/docs/subagents.md +15 -30
  1009. package/docs/themes.md +5 -3
  1010. package/docs/tools.md +21 -1
  1011. package/docs/tui.md +41 -24
  1012. package/docs/usage.md +40 -14
  1013. package/docs/windows.md +2 -0
  1014. package/docs/workflows.md +216 -20
  1015. package/examples/extensions/custom-provider-anthropic/index.ts +9 -2
  1016. package/examples/extensions/custom-provider-gitlab-duo/index.ts +9 -2
  1017. package/examples/extensions/modal-editor.ts +8 -10
  1018. package/examples/extensions/rainbow-editor.ts +3 -2
  1019. package/examples/extensions/subagent/README.md +16 -45
  1020. package/examples/extensions/subagent/index.ts +6 -96
  1021. package/examples/extensions/subagent/render.ts +0 -78
  1022. package/examples/extensions/subagent/runner.ts +0 -3
  1023. package/examples/extensions/subagent/schemas.ts +0 -13
  1024. package/examples/extensions/subagent/types.ts +1 -2
  1025. package/examples/sdk/09-api-keys-and-oauth.ts +6 -2
  1026. package/examples/sdk/12-full-control.ts +8 -2
  1027. package/examples/sdk/README.md +4 -1
  1028. package/npm-shrinkwrap.json +191 -634
  1029. package/package.json +14 -7
  1030. package/dist/builtin/subagents/src/agents/chain-serializer.ts +0 -257
  1031. package/dist/builtin/subagents/src/runs/foreground/chain-execution-details.ts +0 -38
  1032. package/dist/builtin/subagents/src/runs/foreground/chain-execution-dynamic-step.ts +0 -280
  1033. package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-runner.ts +0 -217
  1034. package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-step.ts +0 -271
  1035. package/dist/builtin/subagents/src/runs/foreground/chain-execution-sequential-step.ts +0 -271
  1036. package/dist/builtin/subagents/src/runs/foreground/chain-execution-types.ts +0 -200
  1037. package/dist/builtin/subagents/src/runs/foreground/chain-execution.ts +0 -184
  1038. package/dist/builtin/subagents/src/runs/foreground/execution-structured-retries.ts +0 -19
  1039. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-chain.ts +0 -109
  1040. package/dist/builtin/subagents/src/runs/shared/chain-outputs.ts +0 -126
  1041. package/dist/builtin/subagents/src/runs/shared/dynamic-fanout.ts +0 -393
  1042. package/dist/builtin/subagents/src/runs/shared/structured-output.ts +0 -150
  1043. package/dist/builtin/subagents/src/runs/shared/workflow-graph.ts +0 -232
  1044. package/dist/builtin/subagents/src/slash/saved-chain-mapping.ts +0 -60
  1045. package/dist/builtin/subagents/src/tui/render-chain-graph.ts +0 -341
  1046. package/examples/extensions/subagent/prompts/implement-and-review.md +0 -10
  1047. package/examples/extensions/subagent/prompts/implement.md +0 -10
  1048. package/examples/extensions/subagent/prompts/scout-and-plan.md +0 -9
package/docs/subagents.md CHANGED
@@ -5,7 +5,7 @@ description: "Run focused Atomic child agents"
5
5
 
6
6
  # Subagents
7
7
 
8
- Atomic bundles `@bastani/subagents`, an extension for bounded specialist delegation with separate context while the parent remains in control. Use a single agent, chain, or parallel fan-out when isolation or a specialist pass materially helps with locating code, analyzing behavior, researching references, reproducing actual failures, or simplifying code. Keep interactive, exploratory, conceptual, and conversation-led work inline when direct user steering is more useful.
8
+ Atomic bundles `@bastani/subagents`, an extension for bounded specialist delegation with separate context while the parent remains in control. Use a single agent or parallel fan-out when isolation or a specialist pass materially helps with locating code, analyzing behavior, researching references, reproducing actual failures, or simplifying code. Keep interactive, exploratory, conceptual, and conversation-led work inline when direct user steering is more useful.
9
9
 
10
10
  You do not need to install anything separately when you use `@bastani/atomic`.
11
11
 
@@ -25,13 +25,14 @@ Run a parallel review composition: one pass for current behavior, one for failur
25
25
  Research the upstream library behavior online, then compare it with our local implementation.
26
26
  ```
27
27
 
28
- Atomic decides whether delegation adds value, which specialist fits each bounded part, and whether the work should run as a single child, parallel group, chain, foreground run, or selective background run. Multiple steps, files, tests, validation, or parallelism alone do not require a workflow; clearly delegated long-running autonomous work that needs durable stages, checkpoints, resumability, HIL, gates, retries, or loops is usually better served by a workflow.
28
+ Atomic decides whether delegation adds value, which specialist fits each bounded part, and whether the work should run as a single child, parallel group, foreground run, or selective background run. Multiple steps, files, tests, validation, or parallelism alone do not require a workflow; clearly delegated long-running autonomous work that needs durable stages, checkpoints, resumability, HIL, gates, retries, or loops is usually better served by a workflow.
29
29
 
30
30
  ## Subagent execution is non-interactive
31
31
 
32
- Supported subagent launches start immediately without opening a preview/editor prompt or waiting for terminal input. This applies to single, parallel, chain, foreground, background, fanout, prompt-template, and human-entered `/run`, `/chain`, `/parallel`, and `/run-chain` execution. Ask any necessary questions in the parent conversation before delegating.
32
+ Supported subagent launches start immediately without opening a preview/editor prompt or waiting for terminal input. This applies to single, parallel, foreground, background, fanout, prompt-template, and human-entered `/run` and `/parallel` execution. Ask any necessary questions in the parent conversation before delegating.
33
33
 
34
34
  The human slash commands remain registered and continue to use their separate parsing and event-bridge path, including background and fork flags.
35
+ Prompt-template delegation comes from the separately installed `pi-prompt-template-model` extension, whose `requestDelegatedRun` emits `prompt-template:subagent:request`. If that caller must survive an extension reload, import `registerPromptTemplateBridgeRequestSettlement` from `@bastani/subagents`, register it before the emit, and unregister it from the normal response, cancellation, or abort path. The hook rejects the caller only when the old bridge drops a stale response emit; normal completion still arrives through `prompt-template:subagent:response`. Atomic cannot register this opt-in for an out-of-tree emitter.
35
36
 
36
37
  Subagents now run and return their results directly. Atomic does not infer acceptance gates from prompt wording, inject `acceptance-report` instructions into child prompts, parse or strip `acceptance-report` blocks, or reject completed child runs because changed-file, test, or review evidence is missing. Put any evidence or validation requirements directly in the task text you give the parent or child agent.
37
38
 
@@ -51,9 +52,9 @@ Atomic's implementation adapts the prompt foreground release and later-result re
51
52
 
52
53
  ## Migration from acceptance gates
53
54
 
54
- If you have older subagent calls, saved chains, or custom agents that used the removed gate fields:
55
+ If you have older subagent calls or custom agents that used the removed gate fields:
55
56
 
56
- - Remove `acceptance` properties from `subagent()` calls, `tasks` entries, `chain` steps, static parallel task items, and dynamic fanout parallel templates. Atomic no longer reads these fields; JSON chain rewrites drop legacy copies.
57
+ - Remove `acceptance` properties from `subagent()` calls, task entries, and parallel task items. Atomic no longer reads these fields.
57
58
  - Remove `completionGuard: false` from agent frontmatter and custom agent definitions. The no-mutation completion guard no longer exists, so the override has no effect and management rewrites strip it.
58
59
  - Move validation, command, evidence, review, or residual-risk requirements into the natural-language task text passed to the parent or child agent.
59
60
 
@@ -134,13 +135,15 @@ Inside workflow stages, completion delivery observes the stage generation bounda
134
135
 
135
136
  When a workflow graph overlay is open, Atomic also publishes the live async subagent summary into the shared status surface. The below-editor async widget remains available when the workflow overlay is hidden, and the overlay statusline keeps the run count/state visible while the graph fills the terminal.
136
137
 
138
+ While a child is running, the jobs widget shows its resolved model, effective reasoning level, and applied Codex fast-mode marker for each step. The same badge appears in the completed result, including after a model fallback; parallel steps keep their metadata separate.
139
+
137
140
  ## Orchestrator model and group policy
138
141
 
139
- Atomic applies the same delegation policy to any parent chat or workflow stage that orchestrates subagents. A named agent uses the model and fallback chain declared by its agent definition, so the orchestrator normally omits the subagent tool's explicit `model` argument. An override needs either the user's exact model request or a documented task-specific reason recorded before launch; model diversity alone is not enough.
142
+ Atomic applies the same delegation policy to any parent chat or workflow stage that orchestrates subagents. A named agent uses the model and fallback sequence declared by its agent definition, so the orchestrator normally omits the subagent tool's explicit `model` argument. An override needs either the user's exact model request or a documented task-specific reason recorded before launch; model diversity alone is not enough.
140
143
 
141
144
  If an agent declares no model or fallback policy, the orchestrator consults the role guidance in [Model selection](/models/model-selection), then calls `workflow({ action: "models" })` when that tool is available. It may pin only a returned `fullId` and may add a thinking suffix only when the model entry lists that level. When the catalog tool is unavailable, the catalog is empty, or no recommended model is present, the child stays unpinned and the orchestrator reports the limit instead of inventing a model or inspecting credentials.
142
145
 
143
- Each workflow invocation automatically receives one stable, non-`"default"` Intercom group as typed admission policy. Its stages and delegated children carry that group across single, parallel, chain, async, and follow-up work unless a call explicitly overrides `group`. Outside workflows, children inherit the launching session's resolved group. This isolates workflow runs from unrelated runs and the main chat while `contact_supervisor` retains its authorized cross-group route.
146
+ Each workflow invocation automatically receives one stable, non-`"default"` Intercom group as typed admission policy. Its stages and delegated children carry that group across single, parallel, async, and follow-up work unless a call explicitly overrides `group`. Outside workflows, children inherit the launching session's resolved group. This isolates workflow runs from unrelated runs and the main chat while `contact_supervisor` retains its authorized cross-group route.
144
147
 
145
148
  ## Context and execution modes
146
149
 
@@ -157,9 +160,9 @@ Fresh child sessions use normal Atomic package discovery when an agent omits `ex
157
160
 
158
161
  Top-level parallel calls support up to 50 subagents after expanding each task's optional `count`. The extension's `parallel.maxTasks` setting defaults to 50 and can enforce a lower task limit; `parallel.concurrency` independently controls how many of those children run at once, while the Rust turn limiter admits at most four running turns per parent.
159
162
 
160
- Subagent tasks, parallel/chain items, and the top-level call accept a `group` field that sets the spawned child's [Intercom](/intercom) home group, so same-group subagents can intercom each other while staying isolated from other groups. A named string joins that group; `true` auto-generates one shared UUID group per parallel set. Precedence is `explicit subagent group > inherited current-session group > config > "default"`. Workflow stages carry their runtime-owned invocation group, so children launched without `group` automatically join the workflow group; callers do not need to copy or generate an ID. In other sessions, omission inherits that launching session's resolved group. The child group is applied only when the child has Intercom access (the peer `intercom` tool or subagent-only `contact_supervisor` tool); a child without Intercom receives no group. `contact_supervisor` still reaches the supervisor across group boundaries because Atomic requests a broker capability during typed admission and binds the child's registration to the issuing supervisor. Foreground and single-child paths use exact child scopes; asynchronous chains use bounded per-child slots so indexes shifted by dynamic fanout remain valid. The lightweight Intercom wrapper lazy-loads the authorization provider; provider failures abort launch, while hosts without a provider omit supervisor metadata instead of exposing a broken channel.
163
+ Subagent tasks, parallel items, and the top-level call accept a `group` field that sets the spawned child's [Intercom](/intercom) home group, so same-group subagents can intercom each other while staying isolated from other groups. A named string joins that group; `true` auto-generates one shared UUID group per parallel set. Precedence is `explicit subagent group > inherited current-session group > config > "default"`. Workflow stages carry their runtime-owned invocation group, so children launched without `group` automatically join the workflow group; callers do not need to copy or generate an ID. In other sessions, omission inherits that launching session's resolved group. The child group is applied only when the child has Intercom access (the peer `intercom` tool or subagent-only `contact_supervisor` tool); a child without Intercom receives no group. `contact_supervisor` still reaches the supervisor across group boundaries because Atomic requests a broker capability during typed admission and binds the child's registration to the issuing supervisor. Foreground and single-child paths use exact child scopes; asynchronous runs use bounded per-child slots. The lightweight Intercom wrapper lazy-loads the authorization provider; provider failures abort launch, while hosts without a provider omit supervisor metadata instead of exposing a broken channel.
161
164
 
162
- When a subagent call, parallel task, chain step, or background run uses a `cwd`, Atomic validates that working directory before starting the child runtime. Missing or non-directory paths are reported as `cwd` problems instead of lower-level runtime errors.
165
+ When a subagent call, parallel task, or background run uses a `cwd`, Atomic validates that working directory before starting the child runtime. Missing or non-directory paths are reported as `cwd` problems instead of lower-level runtime errors.
163
166
 
164
167
  Single-agent calls also accept `reads: string[] | false`. Atomic prepends those files as read context for foreground and background execution through the same in-process session path, including `/run agent[reads=a.md+b.md]`. Relative entries resolve against the effective child `cwd` (including a relative top-level `cwd` resolved from the parent); absolute entries are unchanged. Invalid values fail before the child session starts.
165
168
 
@@ -174,10 +177,11 @@ subagent({ agent: "worker", task: "Implement it in the background.", progress: t
174
177
 
175
178
  Child-safety boundaries are enforced by typed admission policy and the bundled subagent extension:
176
179
 
177
- - Normal child sessions do not receive the `subagent` tool or the parent-only subagents skill.
180
+ - In-process child sessions load bundled extensions through normal discovery. The `subagent` tool may therefore be registered when the child's active tool selection permits it, including the default no-allowlist case; an explicit allowlist may omit it. Tool presence does not grant fanout. The bundled subagents skill remains parent-only and is stripped from child prompts, including fanout-authorized children.
178
181
  - Child context is filtered to remove parent orchestration artifacts, old control/status messages, and prior parent `subagent` tool calls/results.
179
182
  - Non-fanout children are instructed that they are not the parent orchestrator and must not propose or run subagents.
180
183
  - Nested fanout is available only for explicitly authorized agents whose resolved tools include `subagent`. Authorized fanout children receive narrower instructions that limit delegation to the assigned fanout.
184
+ - Typed admission policy lets a non-fanout child use only `list`, `get`, `status`, and `doctor`; delegation, `resume`, and `interrupt` receive the fanout refusal. A management-restricted child is also refused `create`, `update`, and `delete`.
181
185
  - The recursion guard has a hard maximum of five delegated subagent levels. The admitted depth policy may choose a lower value from `0` to `5`; deeper admission is refused rather than inherited from process environment state.
182
186
 
183
187
  This keeps the parent session responsible for orchestration unless you deliberately choose a fanout-capable custom agent.
@@ -213,30 +217,11 @@ Cite each actionable issue with file:line evidence and the observed failure or r
213
217
  Return only issues worth fixing now. Stop when the relevant diff and affected call paths have been inspected, or name the evidence you could not access.
214
218
  ```
215
219
 
216
- If an agent or chain step uses an explicit empty `tools: []` allowlist together with `outputSchema`, Atomic starts the child with only `structured_output` enabled for the required final answer. It does not omit `--tools` and accidentally restore default tools. Path-only tool entries remain extension paths and do not create a builtin allowlist by themselves. The typed child session construction registers its schema-backed `structured_output` tool before explicit allowlists are applied.
217
-
218
- ## Structured output schemas
219
-
220
- Chain and parallel steps can declare an `outputSchema` when the parent needs reliable machine-readable handoff data. Atomic passes that schema directly to a `structured_output` tool backed by the shared Atomic factory. The child should call `structured_output` when it is done:
221
-
222
- ```ts
223
- structured_output({
224
- files: ["src/auth.ts"],
225
- risks: ["missing regression test"],
226
- })
227
- ```
228
-
229
- `outputSchema` is a plain JSON Schema descriptor object. It may describe object, array, or primitive final values, and the child should pass a JSON value that matches that schema directly. Atomic no longer adds object-root restrictions, sidecar metadata, transcript-finality checks, or duplicate-call guards. The child runtime writes the tool arguments to `output.json`; the parent validates that captured JSON against the schema, reads it back as `result.structuredOutput`, and exposes it in named-chain references under `outputs.name.structured`. If the child exits without calling `structured_output`, or the captured value fails schema validation, Atomic retries up to three times with a corrective prompt that quotes the exact contract/validation error and reminds the child to call `structured_output` rather than returning plain JSON.
230
-
231
- Children without `outputSchema` do not receive `structured_output` from Atomic's default tool registry. They can still use a custom extension-provided terminating tool if you explicitly add one.
232
-
233
- Dynamic fanout `collect.outputSchema` validates the collected result array after child runs finish.
234
-
235
220
  ## Fallback models
236
221
 
237
222
  Agents can define ordered `fallbackModels` for retryable provider or model failures such as rate limits, quota/usage-limit exhaustion (for example a provider reporting `The usage limit has been reached`, or `usage_limit_reached`/`insufficient_quota` codes), auth problems, unavailable models, network timeouts, or 5xx errors. Atomic tries the requested primary model first, then configured fallbacks, and finally appends the current user-selected model as the last fallback candidate when available. The main chat and workflow stages share one failure classifier, so auth, model-availability, request-incompatibility, and transport signals are handled consistently. Cancellations, safety refusals, and task/tool failures are never retried on another model.
238
223
 
239
- A candidate that cannot serve the current request — for example an HTTP 400/413/422 bad/unprocessable/payload-too-large request, an unsupported tool or parameter, a context-length/context-window overflow, or a `too large` / `invalid_request` error — is treated as request/context incompatible and the chain advances to the next candidate rather than stopping. This means that if none of the configured candidates are applicable to the request, Atomic falls back to the currently selected user model instead of failing outright.
224
+ A candidate that cannot serve the current request — for example an HTTP 400/413/422 bad/unprocessable/payload-too-large request, an unsupported tool or parameter, a context-length/context-window overflow, or a `too large` / `invalid_request` error — is treated as request/context incompatible and the fallback sequence advances to the next candidate rather than stopping. This means that if none of the configured candidates are applicable to the request, Atomic falls back to the currently selected user model instead of failing outright.
240
225
 
241
226
  Model fallback decisions use structured provider and attempt causes. There is no per-attempt idle watchdog, no child wall-clock kill cap, and no timeout-regex classification: a quiet provider response is allowed to finish, and only an explicit termination or provider failure supplies a retryable cause. Numeric process exit codes are not used as an outcome discriminator.
242
227
 
package/docs/themes.md CHANGED
@@ -73,6 +73,7 @@ vim ~/.atomic/agent/themes/my-theme.json
73
73
  "text": "",
74
74
  "thinkingText": "secondary",
75
75
  "selectedBg": "#2d2d30",
76
+ "scrollbarThumb": "#555566",
76
77
  "userMessageBg": "#2d2d30",
77
78
  "userMessageText": "",
78
79
  "customMessageBg": "#2d2d30",
@@ -149,14 +150,14 @@ vim ~/.atomic/agent/themes/my-theme.json
149
150
 
150
151
  - `name` is required, must be unique, and must not contain `/`.
151
152
  - `vars` is optional. Define reusable colors here, then reference them in `colors` or `workingIndicator`.
152
- - `colors` must define all 51 required tokens.
153
+ - `colors` must define all 51 required tokens. `scrollbarThumb` is optional and falls back to `selectedBg` when omitted.
153
154
  - `workingIndicator` is optional and may override any subset of the six tones in the outward half of the ordinary `∀` ramp; Atomic derives omitted tones from selected background, accent, and text roles, then mirrors the palette back after `peak`. Explicit numeric values from 0 through 255 remain exact terminal palette indices. When a numeric index from 0 through 15 seeds an omitted tone, Atomic mixes from its built-in approximation of the common ANSI RGB value; the terminal still controls the actual appearance of the explicit index. Both explicit and derived tones update on theme hot reload.
154
155
 
155
156
  The `$schema` field enables editor auto-completion and validation.
156
157
 
157
158
  ## Color Tokens
158
159
 
159
- Every theme must define all 51 color tokens. There are no optional colors.
160
+ Every theme must define all 51 required color tokens. `scrollbarThumb` is optional and falls back to `selectedBg` when omitted.
160
161
 
161
162
  ### Core UI (11 colors)
162
163
 
@@ -174,11 +175,12 @@ Every theme must define all 51 color tokens. There are no optional colors.
174
175
  | `text` | Default text (usually `""`) |
175
176
  | `thinkingText` | Thinking block text |
176
177
 
177
- ### Backgrounds & Content (11 colors)
178
+ ### Backgrounds & Content (11 required, 1 optional)
178
179
 
179
180
  | Token | Purpose |
180
181
  |-------|---------|
181
182
  | `selectedBg` | Selected line background |
183
+ | `scrollbarThumb` | Fullscreen scrollbar thumb background; optional, falls back to `selectedBg` |
182
184
  | `userMessageBg` | User message background |
183
185
  | `userMessageText` | User message text |
184
186
  | `customMessageBg` | Extension message background |
package/docs/tools.md CHANGED
@@ -42,10 +42,30 @@ When explicitly enabled in settings, built-in bash interceptor rules block commo
42
42
 
43
43
  ## `find` and `search`
44
44
 
45
- `find` finds filesystem paths by glob; use `search` when you need content matches instead of path matches. `find.paths` is required and accepts file, directory, internal URL, or glob paths; copied quoted paths are normalized, exact filesystem paths with spaces/commas/semicolons are preserved before delimiter expansion, comma/semicolon-joined paths are split when at least one part resolves, whitespace-joined paths are split only when every part resolves, hidden files are included by default, `.gitignore` is respected by default (including nested `.gitignore` files outside a Git checkout), broad scans keep `node_modules`/`.git` pruned even with `gitignore:false` unless `node_modules` is explicitly present in the requested path or glob, results are capped at 200 by default, and timeout defaults to 5 seconds. Local `find` prefers the bundled Rust native `glob` implementation derived from oh-my-pi, falling back to the packaged `fd` helper only when native bindings are unavailable. Results include `scopePath`, `fileCount`, `files`, truncation/missing-path metadata, and streamed `onUpdate` snapshots during long scans.
45
+ `find` finds filesystem paths by glob; use `search` when you need content matches instead of path matches. `find.paths` is required and accepts file, directory (including a filesystem root), internal URL, or glob paths; copied quoted paths are normalized, exact filesystem paths with spaces/commas/semicolons are preserved before delimiter expansion, comma/semicolon-joined paths are split when at least one part resolves, whitespace-joined paths are split only when every part resolves, hidden files are included by default, `.gitignore` is respected by default (including nested `.gitignore` files outside a Git checkout), broad scans keep `node_modules`/`.git` pruned even with `gitignore:false` unless `node_modules` is explicitly present in the requested path or glob, results are capped at 200 by default, and timeout defaults to 5 seconds. Local `find` prefers the bundled Rust native `glob` implementation derived from oh-my-pi, falling back to the packaged `fd` helper only when native bindings are unavailable. Results include `scopePath`, `fileCount`, `files`, truncation/missing-path metadata, and streamed `onUpdate` snapshots during long scans.
46
46
 
47
47
  `search` searches file contents with a regex across files, directories, globs, archive members, SQLite selectors, and internal URLs. It accepts `pattern`, optional `paths`, `i`, `case`, `gitignore`, and `skip`. Omitted, empty-string, or empty-array `paths` search the workspace root; copied quoted paths are normalized, exact filesystem paths with delimiters are preserved, and comma/semicolon-joined filesystem/resource paths are split when at least one part resolves while whitespace joins require every part to resolve. Whitespace-only patterns are rejected; other patterns are preserved verbatim, including ripgrep-style inline flags such as `(?i)`, `(?m)`, and `(?x)` for resource-backed selectors. Default search output is paged by matching files (20 by default), caps multi-file output to 20 matches per file while single-file searches allow 200 matches, uses `search.contextBefore`/`search.contextAfter` settings (1 before and 3 after by default), and `skip` pages files while single-file searches ignore it. When pagination reaches the internal collection ceiling, the output tells you to refine the pattern/path instead of silently reporting that later matches do not exist. Line selectors scope matches first and then render context around in-range matches, so context-only lines outside the selected range do not count as hits. Local filesystem search prefers the bundled Rust ripgrep-backed native `grep` implementation derived from oh-my-pi, preserving upstream 4 MiB file caps, context, line truncation, hidden-file defaults, and `.gitignore` handling; resource-backed searches use the native in-memory matcher when available and keep the JS fallback for multiline/resource edge cases. Search details include scope, counts, file lists, per-file match counts, missing paths, displayed content metadata, and `fileLimitReached`/`meta.limits.fileLimit` when pagination has more matching files. Hashline search rows preserve match/context markers as `*LINE:...` and ` LINE:...`.
48
48
 
49
49
  Directory `read` output renders an oh-my-pi-style depth-2 tree sorted by most-recent modification time, includes file sizes/relative ages, prunes `.git`/`node_modules`, and caps child directories to 12 entries with an elision marker while preserving the oldest shown entry. `read`, `write`, and `search` support local zip/jar/tar/tgz/gzip archive members without a Python dependency, including archive members literally named `raw`, `conflicts`, `1`, `L1`, or paths like `raw:notes.txt`, SQLite table/row selectors (`limit`, `offset`, `where`, `order`, `schema`, and `sampleRows` query parameters), `skill://` and source-backed `local://` selectors (which use the underlying filesystem path for mutable hashline labels/snapshots), and session-router-backed internal resources such as `artifact://`, `agent://`, `history://`, `issue://`, `pr://`, `rule://`, `mcp://`, and `vault://` when the host exposes a router. Workspace-scoped selectors (`local://`, built-in `skill://`, local archives, and SQLite selectors) reject lexical and symlink escapes outside the workspace or skill root. Existing non-SQLite `.db`/`.sqlite` files remain plain files; archive writes reject directory targets ending in `/`; archive writes return their resolved archive path, SQLite writes return source-path metadata, shebang writes are chmodded executable and report `madeExecutable`, SQLite table reads show schema plus a 5-row sample by default, SQLite query reads default to 20 rows with a 500 cap (raw `?q=` supports single-statement `SELECT` queries only, rejects `sqlite_%` internals, `pragma_*` table-valued functions, and dangerous keywords such as `ATTACH`, and is capped to 1000 rows via streaming iteration; table lists cap to 500 excluding `sqlite_%` tables, and table row counts probe at most 50,001 rows), table writes accept `{}` as `INSERT DEFAULT VALUES`, row writes parse non-empty JSON5-style objects including comments, and SQLite writes validate column names/scalar values before binding (empty SQLite row writes delete only when a row id is present). `conflict://<id>` and `conflict://*` writes splice conflict marker regions, expand `@ours`, `@theirs`, and `@base`, and return fresh hashline snapshot headers for resolved files; scoped conflict sides such as `conflict://1/ours` are read-only. Plain `write` refuses to overwrite generated-looking files when generated markers appear near the top of the file. `read` extracts readable text for HTML URLs and notebooks (`.ipynb` cells use 0-based `cell:N` IDs and preserve unknown top-level notebook fields), and routes PDFs plus Office/document formats (`.doc`, `.docx`, `.ppt`, `.pptx`, `.xls`, `.xlsx`, `.rtf`, `.epub`) through the same `markit-ai` converter path as oh-my-pi, including upstream unsupported-format messages when no converter is available. Extensionless URL downloads are decoded when the `Content-Type` identifies the document type. Oversized URL/resource/document reads return guidance plus structured details so collapsed renderers still surface the block reason. Successful `read` results consistently return `details.meta.source`/`sourcePath` (plus `truncation`/`limits` when truncation or list limits apply), and `read`/`search` accept line selectors such as `file.ts:5-16`, `file.ts:5+3`, `file.ts:5-16,960-973`, or `https://example.test/page:5-8`; bounded read selectors include one leading and three trailing context lines unless `:raw` is used for unformatted content, and out-of-range selectors report a clear beyond-EOF message instead of returning an empty success.
50
50
 
51
51
  Plain URL reads follow oh-my-pi's fetch-pipeline truncation contract: unselected URL output shows the first 300 rendered lines (capped at 50 KiB), preserves full-output artifact/truncation metadata when available, and does not hard-block solely because the rendered URL body is large. By default Atomic rejects private, localhost, cloud-metadata, numeric/short-form private-IP URL targets (for example `2130706433`, octal/hex dotted forms, and `127.1`), IPv4-compatible and IPv4-mapped IPv6, NAT64, 6to4 private-address forms, and the full IPv6 link-local `fe80::/10` range, revalidates each manual redirect, pins DNS-validated addresses for outbound fetches, and caps streamed URL bodies; `ATOMIC_ALLOW_PRIVATE_URL_READS=1` is a dev-only escape hatch for trusted local tests and must not be set from untrusted project configuration. Local text reads use the shared 3,000-line/50 KiB output cap, while search match/context lines use the upstream 512-character cap before emitting a truncation notice.
52
+
53
+ ## Persisted tool output
54
+
55
+ Output that does not fit in a tool result is written to a file, and the result points at it — `Full output: <path>` for `bash`, `Full output saved to: <path>` for any tool result that crosses the persistence threshold. Those files are storage, so Atomic bounds where they go, how large they get, and how long they live.
56
+
57
+ **Where.** A session that persists to disk keeps its tool results in `<sessionDir>/tool-results/`, unchanged. Everything else — `bash` overflow logs, background-job logs, streamed spill files, and tool results for in-memory sessions — goes under one owner- and session-scoped temp tree:
58
+
59
+ ```text
60
+ <tmpdir>/atomic-<uid>/<session-id>/
61
+ ```
62
+
63
+ On Windows, where there is no uid, the account name is used instead — qualified by its domain and followed by a short digest, so that `CONTOSO\Alice` and `FABRIKAM\Alice`, or two names that reduce to the same safe path component, do not share one tree. The session id is reduced to a single safe path component, so a session id containing separators or `..` cannot place files outside that tree.
64
+
65
+ Directories are created with `0700` and files with `0600` on platforms that support them. On POSIX that is enforced: a root owned by another account is refused and a too-permissive one is tightened. On Windows, Node exposes neither an owner SID nor a POSIX mode, so before adopting an existing component Atomic reads its security descriptor through PowerShell `Get-Acl` and decides from SIDs: the owner must be the current user, SYSTEM, or Administrators, and every access-allowed DACL entry must grant only those principals. A foreign-owned root, a root other accounts can access (a machine-wide redirected `TMP`), and a descriptor that cannot be read or fully parsed are all refused. A successful verification is cached per path per process, keyed to the directory's metadata identity — creation, change, and last-write times — so both a directory swapped underneath the path and an in-place DACL edit (which bumps the NTFS change time) force a fresh descriptor read; only a directory whose metadata is unchanged skips the subprocess.
66
+
67
+ Because that path is predictable, Atomic validates it rather than trusting it. Every component below the system temp directory is created one level at a time and checked: a symlink is refused outright, a directory owned by another account is refused, and a directory of this account's left too permissive is tightened to `0700` and re-checked. Refusal fails closed — the tool runs with no spill file and reports no path, instead of writing your command output into a directory someone else planted. Only the final session directory is treated as replaceable: a stale file or link sitting exactly where a session directory belongs is removed (a link by itself, never its target) and recreated.
68
+
69
+ **How large.** No single persisted-output file exceeds 64 MB. Output that lands exactly on the cap is kept whole; only output that passes it is cut off there, with `[Output truncated: persisted-output cap of 67108864 bytes reached]` appended in place of the rest. The cut lands on a character boundary even when a multi-byte character is split across two chunks of streamed output, and bytes that are not valid UTF-8 — binary command output — are written through unchanged rather than decoded. The truncation is in the file only; the tool result and its `fullOutputPath` are unaffected. If a spill file cannot be written at all, `bash` reports no path rather than one pointing at a file that is not there.
70
+
71
+ **How long.** Tool-output storage is reaped on age. A sweep runs shortly after startup, off the startup path, and removes session temp trees and `tool-results` directories whose newest file is more than 30 days old. It covers the default project-nested session roots and a custom session directory chosen with `--session-dir`, `ATOMIC_CODING_AGENT_SESSION_DIR`, or the `sessionDir` setting. The newest entry decides the whole directory: one fresh file keeps everything beside it, so a path recorded weeks ago stays readable as long as the tree is still in use. Each target is throttled to once a day by a `.last-cleanup` marker and guarded by a `.cleanup.lock` exclusive lock, so concurrent Atomic sessions never race each other; for session storage that pair lives in a control directory under the temp root rather than inside the scanned directory. A tree belonging to a session the running process is using is never reaped, so a `Full output saved to:` path stays valid for the life of the session that produced it. Session transcripts and `.jsonl` session files are outside the sweep entirely: only the temp trees and `tool-results` directories are ever deleted, symlinks are never followed out of a target, and a directory the sweep cannot verify as a real directory is skipped rather than read.
package/docs/tui.md CHANGED
@@ -13,7 +13,7 @@ All components implement:
13
13
  ```typescript
14
14
  interface Component {
15
15
  render(width: number): string[];
16
- handleInput?(data: string): void;
16
+ handleInput?(data: string): boolean | void;
17
17
  wantsKeyRelease?: boolean;
18
18
  invalidate(): void;
19
19
  }
@@ -22,10 +22,12 @@ interface Component {
22
22
  | Method | Description |
23
23
  |--------|-------------|
24
24
  | `render(width)` | Return array of strings (one per line). Each line **must not exceed `width`**. |
25
- | `handleInput?(data)` | Receive keyboard input when component has focus. |
25
+ | `handleInput?(data)` | Receive keyboard input when the component has focus. A focused overlay also receives mouse input before the fullscreen viewport. Return `true` when it consumes input; return `false`, `undefined`, or `void` when a matching fullscreen viewport key or overlay mouse event should fall through to viewport handling. Non-overlay focused components leave mouse input with pi-tui so transcript scrolling, scrollbar interaction, and drag selection remain available. |
26
26
  | `wantsKeyRelease?` | If true, component receives key release events (Kitty protocol). Default: false. |
27
27
  | `invalidate()` | Clear cached render state. Called on theme changes. |
28
28
 
29
+ The installed pi-tui type still permits handlers that return `void`; Atomic treats a missing or `undefined` result as unhandled only for a matching fullscreen viewport key or a mouse event deferred to a focused overlay. Components that mutate state for such an input must return `true` so the viewport does not apply it a second time.
30
+
29
31
  The TUI appends a full SGR reset and OSC 8 reset at the end of each rendered line. Styles do not carry across lines. If you emit multi-line text with styling, reapply styles per line or use `wrapTextWithAnsi()` so styles are preserved for each wrapped line.
30
32
 
31
33
  ## Focusable Interface (IME Support)
@@ -99,21 +101,20 @@ pi.on("session_start", async (_event, ctx) => {
99
101
 
100
102
  Pass `{ signal }` to `ctx.ui.custom()` when the UI belongs to an abortable operation. If the signal aborts, Atomic dismisses the custom UI and rejects the returned promise with the signal reason. For overlays, use `options.onHandle` to receive an overlay handle for programmatic visibility control.
101
103
 
102
- In Atomic's default interactive mode, the component instance remains in the isolated engine child. The terminal host caches rendered lines and forwards input asynchronously, so `render()` and `handleInput()` must not depend on direct access to host process objects. The remote bridge preserves pi-tui's key-release contract: release events are filtered unless the child component sets `wantsKeyRelease = true`, matching a directly mounted component. Return values passed to `done()` must be JSON-safe.
104
+ In Atomic's default interactive mode, the component instance remains in the isolated engine child. The terminal host caches rendered lines and forwards input asynchronously, so `render()` and `handleInput()` must not depend on direct access to host process objects. For a matching fullscreen viewport key, or for mouse input while a workflow overlay has focus, the host waits for the child's boolean input reply: `true` keeps the input local, while `false` lets the host transcript process it. Left-button selection events are also mirrored to pi-tui when an overlay handles them, so drag and multi-click selection stays available over fullscreen workflow overlays. Mouse input remains with pi-tui when a non-overlay component has focus, preserving transcript scrolling, scrollbar interaction, and drag selection. A stalled reply has a bounded fallback. The remote bridge preserves pi-tui's key-release contract: release events are filtered unless the child component sets `wantsKeyRelease = true`, matching a directly mounted component. Return values passed to `done()` must be JSON-safe.
103
105
 
104
106
  ### Host terminal modes from an isolated component
105
107
 
106
- Because the component runs in the engine child — whose stdout is the JSONL transport, not a TTY — writing raw terminal escape sequences to `process.stdout` from `render()`/`handleInput()` is a no-op and never reaches the real host terminal. For the two host-terminal modes an overlay commonly needs, the factory `tui.terminal` exposes typed, allowlisted setters that the host applies to the real TTY over the engine protocol:
108
+ Because the component runs in the engine child — whose stdout is the JSONL transport, not a TTY — writing raw terminal escape sequences to `process.stdout` from `render()`/`handleInput()` is a no-op and never reaches the real host terminal. For the host autowrap mode an overlay may need, the factory `tui.terminal` exposes a typed, allowlisted setter that the host applies to the real TTY over the engine protocol:
107
109
 
108
110
  ```typescript
109
111
  await ctx.ui.custom((tui, theme, keybindings, done) => {
110
- tui.terminal.setMouseScrollTracking?.(true); // enable SGR mouse-scroll reporting on the host TTY
111
- tui.terminal.setAutowrap?.(false); // disable autowrap (DECAWM) — Windows terminals only
112
+ tui.terminal.setAutowrap?.(false); // disable autowrap (DECAWM) Windows terminals only
112
113
  return new MyOverlay({ onClose: done });
113
114
  }, { overlay: true });
114
115
  ```
115
116
 
116
- These are the only terminal controls exposed; arbitrary child bytes are never forwarded to the terminal. The host resets any mode a component enabled when the overlay hides, closes, is disposed, or when the engine child crashes/restarts, so a stranded child can never leave the terminal in mouse-reporting or autowrap-off mode. On non-isolated hosts and test seams the setters are absent, and callers should fall back to writing escape sequences to their own `process.stdout`.
117
+ This is the only terminal control exposed; arbitrary child bytes are never forwarded to the terminal. The host resets the mode when a component hides, closes, is disposed, or when the engine child crashes or restarts. In fullscreen, pi-tui owns its baseline mouse and autowrap modes; non-isolated overlay fallbacks do not disable that baseline. On regular non-isolated hosts and test seams the setter is absent, and callers may fall back to writing escape sequences to their own `process.stdout`.
117
118
 
118
119
  ### Host-native session picker
119
120
 
@@ -327,16 +328,21 @@ Use `matchesKey()` for key detection:
327
328
  ```typescript
328
329
  import { matchesKey, Key } from "@earendil-works/pi-tui";
329
330
 
330
- handleInput(data: string) {
331
+ handleInput(data: string): boolean {
331
332
  if (matchesKey(data, Key.up)) {
332
333
  this.selectedIndex--;
334
+ return true;
333
335
  } else if (matchesKey(data, Key.enter)) {
334
336
  this.onSelect?.(this.selectedIndex);
337
+ return true;
335
338
  } else if (matchesKey(data, Key.escape)) {
336
339
  this.onCancel?.();
340
+ return true;
337
341
  } else if (matchesKey(data, Key.ctrl("c"))) {
338
342
  // CTRL+C
343
+ return true;
339
344
  }
345
+ return false;
340
346
  }
341
347
  ```
342
348
 
@@ -387,18 +393,23 @@ class MySelector {
387
393
  this.items = items;
388
394
  }
389
395
 
390
- handleInput(data: string): void {
396
+ handleInput(data: string): boolean {
391
397
  if (matchesKey(data, Key.up) && this.selected > 0) {
392
398
  this.selected--;
393
399
  this.invalidate();
400
+ return true;
394
401
  } else if (matchesKey(data, Key.down) && this.selected < this.items.length - 1) {
395
402
  this.selected++;
396
403
  this.invalidate();
404
+ return true;
397
405
  } else if (matchesKey(data, Key.enter)) {
398
406
  this.onSelect?.(this.items[this.selected]);
407
+ return true;
399
408
  } else if (matchesKey(data, Key.escape)) {
400
409
  this.onCancel?.();
410
+ return true;
401
411
  }
412
+ return false;
402
413
  }
403
414
 
404
415
  render(width: number): string[] {
@@ -693,7 +704,11 @@ pi.registerCommand("pick", {
693
704
  return {
694
705
  render: (w) => container.render(w),
695
706
  invalidate: () => container.invalidate(),
696
- handleInput: (data) => { selectList.handleInput(data); tui.requestRender(); },
707
+ handleInput: (data) => {
708
+ selectList.handleInput(data);
709
+ tui.requestRender();
710
+ return true;
711
+ },
697
712
  };
698
713
  });
699
714
 
@@ -773,7 +788,10 @@ pi.registerCommand("settings", {
773
788
  return {
774
789
  render: (w) => container.render(w),
775
790
  invalidate: () => container.invalidate(),
776
- handleInput: (data) => settingsList.handleInput?.(data),
791
+ handleInput: (data) => {
792
+ settingsList.handleInput?.(data);
793
+ return true;
794
+ },
777
795
  };
778
796
  });
779
797
  },
@@ -895,35 +913,33 @@ type Mode = "normal" | "insert";
895
913
  class VimEditor extends CustomEditor {
896
914
  private mode: Mode = "insert";
897
915
 
898
- handleInput(data: string): void {
916
+ handleInput(data: string): boolean {
899
917
  // Escape: switch to normal mode, or pass through for app handling
900
918
  if (matchesKey(data, "escape")) {
901
919
  if (this.mode === "insert") {
902
920
  this.mode = "normal";
903
- return;
921
+ return true;
904
922
  }
905
923
  // In normal mode, escape aborts agent (handled by CustomEditor)
906
- super.handleInput(data);
907
- return;
924
+ return super.handleInput(data);
908
925
  }
909
926
 
910
927
  // Insert mode: pass everything to CustomEditor
911
928
  if (this.mode === "insert") {
912
- super.handleInput(data);
913
- return;
929
+ return super.handleInput(data);
914
930
  }
915
931
 
916
932
  // Normal mode: vim-style navigation
917
933
  switch (data) {
918
- case "i": this.mode = "insert"; return;
919
- case "h": super.handleInput("\x1b[D"); return; // Left
920
- case "j": super.handleInput("\x1b[B"); return; // Down
921
- case "k": super.handleInput("\x1b[A"); return; // Up
922
- case "l": super.handleInput("\x1b[C"); return; // Right
934
+ case "i": this.mode = "insert"; return true;
935
+ case "h": return super.handleInput("\x1b[D"); // Left
936
+ case "j": return super.handleInput("\x1b[B"); // Down
937
+ case "k": return super.handleInput("\x1b[A"); // Up
938
+ case "l": return super.handleInput("\x1b[C"); // Right
923
939
  }
924
940
  // Pass unhandled keys to super (ctrl+c, etc.), but filter printable chars
925
- if (data.length === 1 && data.charCodeAt(0) >= 32) return;
926
- super.handleInput(data);
941
+ if (data.length === 1 && data.charCodeAt(0) >= 32) return false;
942
+ return super.handleInput(data);
927
943
  }
928
944
 
929
945
  render(width: number): string[] {
@@ -954,6 +970,7 @@ export default function (pi: ExtensionAPI) {
954
970
  - **Extend `CustomEditor`** (not base `Editor`) to get app keybindings (escape to abort, ctrl+d to exit, model switching, etc.)
955
971
  - **Call `super.handleInput(data)`** for keys you don't handle
956
972
  - **Factory pattern**: `setEditorComponent` receives a factory function that gets `tui`, `theme`, and `keybindings`
973
+ - **Autocomplete limit**: custom editors installed through `setEditorComponent()` that expose `setAutocompleteMaxVisible()` inherit the active `autocompleteMaxVisible` setting
957
974
  - **Pass `undefined`** to restore the default editor: `ctx.ui.setEditorComponent(undefined)`
958
975
 
959
976
  **Examples:** [modal-editor.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/modal-editor.ts)
package/docs/usage.md CHANGED
@@ -108,12 +108,14 @@ See [Sessions](/sessions) and [Compaction](/compaction) for details.
108
108
 
109
109
  ## Context Files
110
110
 
111
- Atomic loads `AGENTS.md` or `CLAUDE.md` at startup from:
111
+ Atomic loads `AGENTS.override.md`, `AGENTS.md`, or `CLAUDE.md` at startup from:
112
112
 
113
- - `~/.atomic/agent/AGENTS.md` for global instructions
113
+ - `~/.atomic/agent/` for global instructions (legacy `~/.pi/agent/` also works)
114
114
  - parent directories, walking up from the current working directory
115
115
  - the current directory
116
116
 
117
+ If a directory contains `AGENTS.override.md`, Atomic uses it instead of that directory's `AGENTS.md` or `CLAUDE.md`. Context files from other directories still layer normally.
118
+
117
119
  Use context files for project conventions, commands, safety rules, and preferences. Disable loading with `--no-context-files` or `-nc`.
118
120
 
119
121
  ### System Prompt Files
@@ -177,17 +179,26 @@ See [Atomic Packages](/packages) for package sources and security notes.
177
179
  ### Credential Commands
178
180
 
179
181
  ```bash
182
+ atomic auth check [--provider <p>] [--model <model>] [--json] [--credentials] [--no-refresh]
180
183
  atomic auth print-api-key --model <model> [--provider <p>]
181
184
  atomic auth print-bearer-token --model <model> [--provider <p>] [--min-expiry <dur>]
182
185
  ```
183
186
 
184
- Print one configured credential for an external client a proxy, a script, or another tool that needs the same key Atomic already holds. The credential goes to **stdout and nothing else**; warnings, provider selection, refresh notices, and help all go to stderr, so `KEY=$(atomic auth print-api-key --model gpt-5.5)` can never capture a diagnostic.
187
+ `atomic auth check` verifies the effective credential a provider or model would use before a session starts. It requires at least one of `--provider` or `--model`, prints `ready`, `not_ready`, or `invalid` to stdout, and exits `0`, `1`, or `2` for those states. `--json` adds the resolved provider when one is found, credential kind, and any reason. By default, a check never emits credential material.
188
+
189
+ `--credentials` is an explicit export opt-in. It requires `--provider` or an exact `--model` target; a fuzzy model match on an otherwise-ready provider is refused as `invalid` (exit `2`) rather than exporting a credential for a provider you did not name. If that provider is not ready, the check remains `not_ready` (exit `1`). On a ready check, plain stdout becomes the resolved credential alone and JSON adds it only in the `credentials` field. A non-ready raw export leaves stdout empty and reports its status on stderr; a JSON export returns the status object without a credential. Credential writes can also exit `8` (nothing written) or `9` (only a fragment written). Treat the stream like `print-api-key` or `print-bearer-token` output.
190
+
191
+ Checks refresh expired OAuth credentials by default, using Atomic's normal locked `auth.json` update path. Pass `--no-refresh` to read credentials without creating, locking, or mutating `auth.json`; this is useful when a probe must not change stored auth state. It still reads Atomic's primary and legacy credential paths and resolves configured API-key values, including `!command`, through the normal provider configuration. In this read-only mode, malformed `auth.json` is `invalid` (exit `2`) rather than an unavailable credential. An OAuth credential export requires at least 30 minutes of life: the normal path can refresh it, while `--no-refresh` refuses a shorter-lived token.
192
+
193
+ The credential commands print one configured credential for an external client — a proxy, a script, or another tool that needs the same key Atomic already holds. The credential goes to **stdout and nothing else**; warnings, provider selection, refresh notices, and help all go to stderr, so `KEY=$(atomic auth print-api-key --model gpt-5.5)` can never capture a diagnostic.
185
194
 
186
- `--model` is required. There is no ambient "current model", so the command cannot emit a credential you did not name. When several configured providers offer the model, pass `--provider` to choose one. `--provider` and `--model` are the only options either subcommand accepts: any other flag — including `--export`, `--session-dir`, `--print`, and `--help` — is a usage error rather than a flag this path happens to ignore.
195
+ `--model` is required for the two `print-*` exports. An exporting auth check needs `--provider` or an exact `--model` target. When several configured providers offer a model, pass `--provider` to choose one. The two `print-*` subcommands accept only `--provider` and `--model`: any other flag — including `--export`, `--session-dir`, `--print`, and `--help` — is a usage error rather than a flag this path happens to ignore.
187
196
 
188
- `atomic auth` on its own — and `atomic auth help`, `--help`, or `-h` — prints this usage on stderr and exits `0`. Any other subcommand exits `1` and names the two valid ones. Help never uses stdout, so stdout from this command family is a credential or empty.
197
+ `atomic auth` on its own — and `atomic auth help`, `--help`, or `-h` — prints this usage on stderr and exits `0`. `atomic auth check --help` (or `-h`) does the same until a `--` terminator; after it, the flag is not help. Any other subcommand exits `1` and names all three valid commands. Help never uses stdout, so raw credential export stdout is a credential or empty; a JSON export writes an object that carries a credential only in its `credentials` field.
189
198
 
190
- `print-bearer-token` works only on OAuth providers and `print-api-key` only on API-key providers; asking for the wrong kind is an error rather than a silent fallback. A bearer token with less than `--min-expiry` remaining (default `30m`, accepting `ms`, `s`, `m`, or `h`) is refreshed first. Both `--min-expiry 30m` and `--min-expiry=30m` are accepted. `--min-expiry` with `print-api-key` is a usage error — an API key has no expiry. A failed refresh leaves your stored credential untouched.
199
+ `print-bearer-token` works only on OAuth providers and `print-api-key` only on API-key providers; asking for the wrong kind is an error rather than a silent fallback. A bearer token with less than `--min-expiry` remaining (default `30m`, accepting `ms`, `s`, `m`, or `h`) is refreshed first. Both `--min-expiry 30m` and `--min-expiry=30m` are accepted. `--min-expiry` with `print-api-key` is a usage error — even after a `--` terminator — because an API key has no expiry. A failed refresh leaves your stored credential untouched.
200
+
201
+ Credential-export exits (`print-api-key`, `print-bearer-token`, and the `--credentials` write itself):
191
202
 
192
203
  | Exit | Meaning |
193
204
  |------|---------|
@@ -202,27 +213,39 @@ Print one configured credential for an external client — a proxy, a script, or
202
213
  | `8` | The credential could not be written; nothing was emitted |
203
214
  | `9` | Only part of the credential was written; discard the output |
204
215
 
216
+ Auth-check exits:
217
+
218
+ | Exit | `atomic auth check` |
219
+ |------|---------------------|
220
+ | `0` | `ready` |
221
+ | `1` | `not_ready`, including a fuzzy `--model` with `--credentials` when its resolved provider is not ready |
222
+ | `2` | `invalid`, including check usage errors (unknown option, neither `--provider` nor `--model`, and a fuzzy `--model` with `--credentials` when its resolved provider is otherwise ready) |
223
+ | `8` | With `--credentials`, the credential could not be written; nothing was emitted |
224
+ | `9` | With `--credentials`, only part of the credential was written; discard the output |
225
+
205
226
  Exit `5` is reported only for a refresh that itself failed, which happens before anything is persisted; that is the only exit that promises your stored credential is untouched. Any other OAuth failure exits `7` and makes no such promise.
206
227
 
207
- Stdout is empty on every non-zero exit but one. Once the credential reaches stdout the command has succeeded: if the stream then fails to drain — a reader that closed the pipe, for example — that is reported on stderr and the exit code stays `0`, because a non-zero exit here would contradict the bytes the caller already holds. The exception is exit `9`, which reports that only part of the credential was written before the stream failed; those bytes cannot be recalled, so stdout is not empty, and the output is a fragment to discard rather than a credential to use. See [Security](/security#credential-export) before wiring this into a script.
228
+ For raw credential exports, stdout is empty on every non-zero exit but one. Once the credential reaches stdout the command has succeeded: if the stream then fails to drain — a reader that closed the pipe, for example — that is reported on stderr and the exit code stays `0`, because a non-zero exit here would contradict the bytes the caller already holds. The exception is exit `9`, which reports that only part of the credential was written before the stream failed; those bytes cannot be recalled, so stdout is not empty, and the output is a fragment to discard rather than a credential to use. `auth check --credentials --json` may instead write a credential-free JSON status object on a non-zero check result. See [Security](/security#credential-export) before wiring this into a script.
208
229
 
209
230
  ### Modes
210
231
 
211
232
  | Flag | Description |
212
233
  |------|-------------|
213
- | default | Interactive mode |
234
+ | default | Interactive mode (fullscreen TUI) |
214
235
  | `-p`, `--print` | Print response and exit |
215
236
  | `--mode json` | Output all events as JSON lines; see [JSON mode](/json) |
216
237
  | `--mode rpc` | RPC mode over stdin/stdout; see [RPC mode](/rpc) |
217
238
  | `--export <in> [out]` | Export a session to HTML |
218
239
 
240
+ Interactive sessions always use fullscreen: the transcript scrolls independently above a sticky dock containing the editor, status line, usage meter, extension widgets, and footer. Wheel and trackpad gestures go first to a focused workflow graph or stage chat overlay; events those overlays do not consume fall through to the alternate-screen viewport. Non-overlay focused components do not block pi-tui's mouse path, so transcript scrolling, scrollbar interaction, and drag selection still work.
241
+
219
242
  In print mode, Atomic also reads piped stdin and merges it into the initial prompt:
220
243
 
221
244
  ```bash
222
245
  cat README.md | atomic -p "Summarize this text"
223
246
  ```
224
247
 
225
- When a print-mode turn correctly finishes by calling an opt-in terminating structured-output tool created with `createStructuredOutputTool` (for example from an extension, SDK caller, or workflow item with a schema), Atomic ends after that tool result without an extra follow-up assistant turn. Print-mode stdout contains the terminating structured JSON payload, so `atomic -p` remains script-friendly while the same value is also available through the SDK `capture` sink, tool `details`, a configured file sink, workflow `result.structured`, or subagent `result.structuredOutput`. This also works for custom factory names such as `final_decision`. Non-terminating or unrelated tool results are not printed as the final response.
248
+ When a print-mode turn correctly finishes by calling an opt-in terminating structured-output tool created with `createStructuredOutputTool` (for example from an extension, SDK caller, or workflow item with a schema), Atomic ends after that tool result without an extra follow-up assistant turn. Print-mode stdout contains the terminating structured JSON payload, so `atomic -p` remains script-friendly while the same value is also available through the SDK `capture` sink, tool `details`, a configured file sink, or workflow `result.structured`. This also works for custom factory names such as `final_decision`. Non-terminating or unrelated tool results are not printed as the final response.
226
249
 
227
250
  ### Model Options
228
251
 
@@ -273,14 +296,14 @@ Project trust gates `.atomic`/legacy `.pi` project resources, project package se
273
296
  | Option | Description |
274
297
  |--------|-------------|
275
298
  | `-e`, `--extension <source>` | Load an extension from path, npm, or git; repeatable |
276
- | `--no-extensions` | Disable extension discovery |
299
+ | `--no-extensions`, `-ne` | Disable extension discovery |
277
300
  | `--skill <path>` | Load a skill; repeatable |
278
- | `--no-skills` | Disable skill discovery |
301
+ | `--no-skills`, `-ns` | Disable skill discovery |
279
302
  | `--prompt-template <path>` | Load a prompt template; repeatable |
280
- | `--no-prompt-templates` | Disable prompt template discovery |
303
+ | `--no-prompt-templates`, `-np` | Disable prompt template discovery |
281
304
  | `--theme <path>` | Load a theme; repeatable |
282
305
  | `--no-themes` | Disable theme discovery |
283
- | `--no-context-files`, `-nc` | Disable `AGENTS.md` and `CLAUDE.md` discovery |
306
+ | `--no-context-files`, `-nc` | Disable context-file discovery and loading |
284
307
 
285
308
  Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings. Example:
286
309
 
@@ -294,6 +317,7 @@ atomic --no-extensions -e ./my-extension.ts
294
317
  |--------|-------------|
295
318
  | `--system-prompt <text>` | Replace default prompt; context files and skills are still appended |
296
319
  | `--append-system-prompt <text>` | Append to system prompt |
320
+ | `--offline` | Disable startup network operations, including update checks, package updates, and telemetry |
297
321
  | `--verbose` | Force verbose startup |
298
322
  | `-h`, `--help` | Show help |
299
323
  | `-v`, `--version` | Show version |
@@ -340,6 +364,7 @@ atomic --tools read,search,find,ls -p "Review the code"
340
364
 
341
365
  | Variable | Description |
342
366
  |----------|-------------|
367
+ | `AI_AGENT` | Set to `atomic` by the CLI, RPC, and compiled binary entry points and in every Atomic-owned child-process environment so generic tooling can identify Atomic processes; child environments override caller-supplied values without mutating the caller's environment object |
343
368
  | `ATOMIC_CODING_AGENT_DIR` | Override config directory; default is `~/.atomic/agent`. Bundled intercom runtime/config files live under its `intercom/` subdirectory |
344
369
  | `ATOMIC_CODING_AGENT_SESSION_DIR` | Override session storage directory; overridden by `--session-dir` |
345
370
  | `ATOMIC_PACKAGE_DIR` | Override package directory, useful for Nix/Guix store paths |
@@ -349,6 +374,7 @@ atomic --tools read,search,find,ls -p "Review the code"
349
374
  | `ATOMIC_TELEMETRY` | Override install/update telemetry: `1`/`true`/`yes` or `0`/`false`/`no`. This does not disable update checks |
350
375
  | `NODE_COMPILE_CACHE` | Override the directory for Node's persistent compile cache, which Atomic enables automatically on Node >= 22.8 to speed up startup (most noticeable on Windows). Set `NODE_DISABLE_COMPILE_CACHE=1` to opt out |
351
376
  | `PI_CACHE_RETENTION` | Provider/upstream-specific prompt-cache retention knob; set to `long` where supported |
377
+ | `ATOMIC_NO_PTY` | Set to `1` to disable PTY use for bash commands (`PI_NO_PTY` is a legacy alias) |
352
378
  | `VISUAL`, `EDITOR` | External editor for CTRL+G |
353
379
 
354
380
  Every foreground or background bash execution receives one execution-time snapshot of the active session:
@@ -367,6 +393,6 @@ The snapshot is taken when the command executes, not when the tool is created, s
367
393
 
368
394
  ## Design Principles
369
395
 
370
- Atomic keeps the core CLI small, while this distribution bundles first-party package extensions for workflows, subagents, MCP, web access, and [intercom](/intercom). Other workflows can still be installed as extensions or packages, or handled externally with tools such as containers and tmux.
396
+ Atomic keeps the core CLI small, while this distribution bundles first-party package extensions for workflows, subagents, MCP, web access, [intercom](/intercom), and [i-have-adhd](/i-have-adhd). Other workflows can still be installed as extensions or packages, or handled externally with tools such as containers and tmux.
371
397
 
372
398
  For the full rationale, read the [blog post](https://mariozechner.at/posts/2025-11-30-pi-coding-agent/).
package/docs/windows.md CHANGED
@@ -16,6 +16,8 @@ For most users, [Git for Windows](https://git-scm.com/download/win) is sufficien
16
16
  }
17
17
  ```
18
18
 
19
+ Paths copied from Git Bash, MSYS2, Cygwin, or WSL are accepted anywhere Atomic resolves a file path. For example, `/c/Users/name/project/file.ts`, `/cygdrive/c/Users/name/project/file.ts`, and `/mnt/c/Users/name/project/file.ts` resolve as the matching Windows drive path.
20
+
19
21
  ## Filesystem Watchers
20
22
 
21
23
  On Windows, Atomic canonicalizes paths before starting native filesystem watchers. If a watcher target cannot be canonicalized or still contains an unsafe 8.3 short-name component such as `USERNA~1`, Atomic avoids native `fs.watch` for that target and uses polling where the feature supports it. This protects long-running sessions, async subagent result notifications, footer git status refreshes, and custom theme reloads from Windows/libuv path-prefix assertion crashes.