@bastani/atomic 0.10.0-alpha.1 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/CHANGELOG.md +260 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +22 -0
  3. package/dist/builtin/intercom/package.json +1 -1
  4. package/dist/builtin/mcp/package.json +1 -1
  5. package/dist/builtin/subagents/CHANGELOG.md +41 -0
  6. package/dist/builtin/subagents/package.json +1 -1
  7. package/dist/builtin/subagents/skills/tmux/scripts/wait-for-text.sh +33 -3
  8. package/dist/builtin/web-access/package.json +1 -1
  9. package/dist/core/agent-session-events.d.ts.map +1 -1
  10. package/dist/core/agent-session-events.js +21 -6
  11. package/dist/core/agent-session-events.js.map +1 -1
  12. package/dist/core/lifecycle-timings.d.ts +6 -0
  13. package/dist/core/lifecycle-timings.d.ts.map +1 -1
  14. package/dist/core/lifecycle-timings.js +12 -0
  15. package/dist/core/lifecycle-timings.js.map +1 -1
  16. package/dist/core/queued-message-delivery.d.ts +41 -0
  17. package/dist/core/queued-message-delivery.d.ts.map +1 -0
  18. package/dist/core/queued-message-delivery.js +48 -0
  19. package/dist/core/queued-message-delivery.js.map +1 -0
  20. package/dist/core/storage/node-sqlite-thread.d.ts +64 -0
  21. package/dist/core/storage/node-sqlite-thread.d.ts.map +1 -0
  22. package/dist/core/storage/node-sqlite-thread.js +326 -0
  23. package/dist/core/storage/node-sqlite-thread.js.map +1 -0
  24. package/dist/core/storage/node-sqlite.d.ts.map +1 -1
  25. package/dist/core/storage/node-sqlite.js +230 -104
  26. package/dist/core/storage/node-sqlite.js.map +1 -1
  27. package/dist/core/tasks/agent-panel-source.d.ts +5 -0
  28. package/dist/core/tasks/agent-panel-source.d.ts.map +1 -1
  29. package/dist/core/tasks/agent-panel-source.js +1 -1
  30. package/dist/core/tasks/agent-panel-source.js.map +1 -1
  31. package/dist/modes/interactive/agent-view/agent-view-bridge.d.ts +8 -1
  32. package/dist/modes/interactive/agent-view/agent-view-bridge.d.ts.map +1 -1
  33. package/dist/modes/interactive/agent-view/agent-view-bridge.js.map +1 -1
  34. package/dist/modes/interactive/agent-view/agent-view-switcher.d.ts +11 -5
  35. package/dist/modes/interactive/agent-view/agent-view-switcher.d.ts.map +1 -1
  36. package/dist/modes/interactive/agent-view/agent-view-switcher.js +17 -5
  37. package/dist/modes/interactive/agent-view/agent-view-switcher.js.map +1 -1
  38. package/dist/modes/interactive/agent-view/contracts.d.ts +5 -0
  39. package/dist/modes/interactive/agent-view/contracts.d.ts.map +1 -1
  40. package/dist/modes/interactive/agent-view/contracts.js.map +1 -1
  41. package/dist/modes/interactive/agent-view/install.d.ts.map +1 -1
  42. package/dist/modes/interactive/agent-view/install.js +6 -3
  43. package/dist/modes/interactive/agent-view/install.js.map +1 -1
  44. package/dist/modes/interactive/agent-view/local-port.d.ts +5 -0
  45. package/dist/modes/interactive/agent-view/local-port.d.ts.map +1 -1
  46. package/dist/modes/interactive/agent-view/local-port.js +8 -0
  47. package/dist/modes/interactive/agent-view/local-port.js.map +1 -1
  48. package/dist/modes/interactive/agent-view/remote-port.d.ts +4 -1
  49. package/dist/modes/interactive/agent-view/remote-port.d.ts.map +1 -1
  50. package/dist/modes/interactive/agent-view/remote-port.js +22 -8
  51. package/dist/modes/interactive/agent-view/remote-port.js.map +1 -1
  52. package/dist/modes/interactive/agent-view/transcript-slot.d.ts +9 -0
  53. package/dist/modes/interactive/agent-view/transcript-slot.d.ts.map +1 -1
  54. package/dist/modes/interactive/agent-view/transcript-slot.js +141 -1
  55. package/dist/modes/interactive/agent-view/transcript-slot.js.map +1 -1
  56. package/dist/modes/interactive/components/agent-panel.d.ts +6 -0
  57. package/dist/modes/interactive/components/agent-panel.d.ts.map +1 -1
  58. package/dist/modes/interactive/components/agent-panel.js +40 -10
  59. package/dist/modes/interactive/components/agent-panel.js.map +1 -1
  60. package/dist/modes/interactive/components/atomic-working-status.d.ts +15 -0
  61. package/dist/modes/interactive/components/atomic-working-status.d.ts.map +1 -1
  62. package/dist/modes/interactive/components/atomic-working-status.js +51 -3
  63. package/dist/modes/interactive/components/atomic-working-status.js.map +1 -1
  64. package/dist/modes/interactive/components/bash-execution.d.ts +2 -0
  65. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  66. package/dist/modes/interactive/components/bash-execution.js +5 -1
  67. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  68. package/dist/modes/interactive/components/branch-summary-message.d.ts +2 -0
  69. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  70. package/dist/modes/interactive/components/branch-summary-message.js +5 -1
  71. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  72. package/dist/modes/interactive/components/chat-message-renderer.d.ts +2 -0
  73. package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
  74. package/dist/modes/interactive/components/chat-message-renderer.js +17 -6
  75. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  76. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  77. package/dist/modes/interactive/components/chat-session-host-events.js +35 -4
  78. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  79. package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
  80. package/dist/modes/interactive/components/chat-session-host-rendering.js +70 -13
  81. package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
  82. package/dist/modes/interactive/components/chat-session-host-runtime.d.ts +7 -0
  83. package/dist/modes/interactive/components/chat-session-host-runtime.d.ts.map +1 -1
  84. package/dist/modes/interactive/components/chat-session-host-runtime.js +25 -4
  85. package/dist/modes/interactive/components/chat-session-host-runtime.js.map +1 -1
  86. package/dist/modes/interactive/components/chat-session-host-state.d.ts +41 -1
  87. package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
  88. package/dist/modes/interactive/components/chat-session-host-state.js +24 -3
  89. package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
  90. package/dist/modes/interactive/components/chat-session-host-steering.d.ts.map +1 -1
  91. package/dist/modes/interactive/components/chat-session-host-steering.js +2 -1
  92. package/dist/modes/interactive/components/chat-session-host-steering.js.map +1 -1
  93. package/dist/modes/interactive/components/chat-session-host.d.ts +13 -1
  94. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  95. package/dist/modes/interactive/components/chat-session-host.js +20 -2
  96. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  97. package/dist/modes/interactive/components/chat-transcript.d.ts +15 -0
  98. package/dist/modes/interactive/components/chat-transcript.d.ts.map +1 -1
  99. package/dist/modes/interactive/components/chat-transcript.js +14 -1
  100. package/dist/modes/interactive/components/chat-transcript.js.map +1 -1
  101. package/dist/modes/interactive/components/compaction-boundary-message.d.ts +2 -0
  102. package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -1
  103. package/dist/modes/interactive/components/compaction-boundary-message.js +5 -1
  104. package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
  105. package/dist/modes/interactive/components/custom-entry.d.ts +2 -0
  106. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  107. package/dist/modes/interactive/components/custom-entry.js +5 -1
  108. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  109. package/dist/modes/interactive/components/custom-message.d.ts +2 -0
  110. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  111. package/dist/modes/interactive/components/custom-message.js +5 -1
  112. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  113. package/dist/modes/interactive/components/model-column.d.ts +96 -0
  114. package/dist/modes/interactive/components/model-column.d.ts.map +1 -0
  115. package/dist/modes/interactive/components/model-column.js +207 -0
  116. package/dist/modes/interactive/components/model-column.js.map +1 -0
  117. package/dist/modes/interactive/components/prompt-slot.d.ts +73 -0
  118. package/dist/modes/interactive/components/prompt-slot.d.ts.map +1 -0
  119. package/dist/modes/interactive/components/prompt-slot.js +201 -0
  120. package/dist/modes/interactive/components/prompt-slot.js.map +1 -0
  121. package/dist/modes/interactive/components/queued-messages-view.d.ts +6 -3
  122. package/dist/modes/interactive/components/queued-messages-view.d.ts.map +1 -1
  123. package/dist/modes/interactive/components/queued-messages-view.js +7 -4
  124. package/dist/modes/interactive/components/queued-messages-view.js.map +1 -1
  125. package/dist/modes/interactive/components/session-selector.d.ts +2 -0
  126. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  127. package/dist/modes/interactive/components/session-selector.js +4 -0
  128. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  129. package/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -0
  130. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  131. package/dist/modes/interactive/components/skill-invocation-message.js +5 -1
  132. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  133. package/dist/modes/interactive/components/task-board.d.ts +12 -3
  134. package/dist/modes/interactive/components/task-board.d.ts.map +1 -1
  135. package/dist/modes/interactive/components/task-board.js +33 -17
  136. package/dist/modes/interactive/components/task-board.js.map +1 -1
  137. package/dist/modes/interactive/components/task-inspector.d.ts +6 -1
  138. package/dist/modes/interactive/components/task-inspector.d.ts.map +1 -1
  139. package/dist/modes/interactive/components/task-inspector.js +27 -7
  140. package/dist/modes/interactive/components/task-inspector.js.map +1 -1
  141. package/dist/modes/interactive/components/task-row.d.ts +4 -0
  142. package/dist/modes/interactive/components/task-row.d.ts.map +1 -1
  143. package/dist/modes/interactive/components/task-row.js +7 -1
  144. package/dist/modes/interactive/components/task-row.js.map +1 -1
  145. package/dist/modes/interactive/components/task-transcript-page.d.ts +5 -0
  146. package/dist/modes/interactive/components/task-transcript-page.d.ts.map +1 -1
  147. package/dist/modes/interactive/components/task-transcript-page.js +25 -0
  148. package/dist/modes/interactive/components/task-transcript-page.js.map +1 -1
  149. package/dist/modes/interactive/components/tool-execution.d.ts +7 -0
  150. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  151. package/dist/modes/interactive/components/tool-execution.js +19 -2
  152. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  153. package/dist/modes/interactive/components/tool-group-tracker.d.ts +20 -3
  154. package/dist/modes/interactive/components/tool-group-tracker.d.ts.map +1 -1
  155. package/dist/modes/interactive/components/tool-group-tracker.js +34 -7
  156. package/dist/modes/interactive/components/tool-group-tracker.js.map +1 -1
  157. package/dist/modes/interactive/components/transcript-block-clicks.d.ts +14 -2
  158. package/dist/modes/interactive/components/transcript-block-clicks.d.ts.map +1 -1
  159. package/dist/modes/interactive/components/transcript-block-clicks.js +23 -2
  160. package/dist/modes/interactive/components/transcript-block-clicks.js.map +1 -1
  161. package/dist/modes/interactive/interactive-agent-events.js +10 -2
  162. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  163. package/dist/modes/interactive/interactive-extension-runtime.d.ts +12 -1
  164. package/dist/modes/interactive/interactive-extension-runtime.d.ts.map +1 -1
  165. package/dist/modes/interactive/interactive-extension-runtime.js +37 -5
  166. package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
  167. package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
  168. package/dist/modes/interactive/interactive-input-handling.js +70 -46
  169. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  170. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  171. package/dist/modes/interactive/interactive-mode-base.js +7 -1
  172. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  173. package/dist/modes/interactive/interactive-prompt-turn.js +17 -9
  174. package/dist/modes/interactive/interactive-prompt-turn.js.map +1 -1
  175. package/dist/modes/interactive/interactive-queueing.d.ts.map +1 -1
  176. package/dist/modes/interactive/interactive-queueing.js +2 -1
  177. package/dist/modes/interactive/interactive-queueing.js.map +1 -1
  178. package/dist/modes/interactive/interactive-render-chat.d.ts +18 -1
  179. package/dist/modes/interactive/interactive-render-chat.d.ts.map +1 -1
  180. package/dist/modes/interactive/interactive-render-chat.js +90 -10
  181. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  182. package/dist/modes/interactive/interactive-session-routing.js +2 -0
  183. package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
  184. package/dist/modes/interactive/interactive-task-projection.js +2 -2
  185. package/dist/modes/interactive/interactive-task-projection.js.map +1 -1
  186. package/dist/modes/interactive/screen-hold.d.ts +41 -0
  187. package/dist/modes/interactive/screen-hold.d.ts.map +1 -0
  188. package/dist/modes/interactive/screen-hold.js +80 -0
  189. package/dist/modes/interactive/screen-hold.js.map +1 -0
  190. package/dist/modes/interactive/started-run-echo.d.ts +66 -0
  191. package/dist/modes/interactive/started-run-echo.d.ts.map +1 -0
  192. package/dist/modes/interactive/started-run-echo.js +75 -0
  193. package/dist/modes/interactive/started-run-echo.js.map +1 -0
  194. package/dist/modes/interactive-engine/engine-custom-ui.d.ts +1 -0
  195. package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
  196. package/dist/modes/interactive-engine/engine-custom-ui.js +25 -1
  197. package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
  198. package/dist/modes/interactive-engine/engine-quit-intent.d.ts.map +1 -1
  199. package/dist/modes/interactive-engine/engine-quit-intent.js +3 -0
  200. package/dist/modes/interactive-engine/engine-quit-intent.js.map +1 -1
  201. package/dist/modes/interactive-engine/protocol.d.ts +5 -0
  202. package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
  203. package/dist/modes/interactive-engine/protocol.js +7 -1
  204. package/dist/modes/interactive-engine/protocol.js.map +1 -1
  205. package/dist/modes/interactive-engine/remote-component.d.ts +10 -2
  206. package/dist/modes/interactive-engine/remote-component.d.ts.map +1 -1
  207. package/dist/modes/interactive-engine/remote-component.js +19 -2
  208. package/dist/modes/interactive-engine/remote-component.js.map +1 -1
  209. package/dist/modes/interactive-engine/remote-renderer.d.ts +10 -0
  210. package/dist/modes/interactive-engine/remote-renderer.d.ts.map +1 -1
  211. package/dist/modes/interactive-engine/remote-renderer.js +24 -4
  212. package/dist/modes/interactive-engine/remote-renderer.js.map +1 -1
  213. package/dist/modes/interactive-engine/transcript-frame-layout.d.ts +50 -0
  214. package/dist/modes/interactive-engine/transcript-frame-layout.d.ts.map +1 -0
  215. package/dist/modes/interactive-engine/transcript-frame-layout.js +95 -0
  216. package/dist/modes/interactive-engine/transcript-frame-layout.js.map +1 -0
  217. package/dist/modes/rpc/agent-panel-bridge.d.ts.map +1 -1
  218. package/dist/modes/rpc/agent-panel-bridge.js +16 -0
  219. package/dist/modes/rpc/agent-panel-bridge.js.map +1 -1
  220. package/dist/modes/rpc/agent-view-engine-registry.d.ts.map +1 -1
  221. package/dist/modes/rpc/agent-view-engine-registry.js +36 -1
  222. package/dist/modes/rpc/agent-view-engine-registry.js.map +1 -1
  223. package/dist/modes/rpc/agent-view-rpc-panel.d.ts.map +1 -1
  224. package/dist/modes/rpc/agent-view-rpc-panel.js +5 -1
  225. package/dist/modes/rpc/agent-view-rpc-panel.js.map +1 -1
  226. package/dist/modes/rpc/task-ui-bridge.js +1 -1
  227. package/dist/modes/rpc/task-ui-bridge.js.map +1 -1
  228. package/docs/background-tasks.md +1 -1
  229. package/docs/development.md +2 -0
  230. package/docs/extensions/authoring.md +1 -1
  231. package/docs/keybindings.md +2 -2
  232. package/docs/storage.md +1 -0
  233. package/npm-shrinkwrap.json +49 -49
  234. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"agent-view-rpc-panel.js","sourceRoot":"","sources":["../../../src/modes/rpc/agent-view-rpc-panel.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,eAAe,EACf,kBAAkB,GAClB,MAAM,gDAAgD,CAAC;AAGxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAU9D,MAAM,aAAa,GAAG,IAAI,OAAO,EAAiC,CAAC;AAEnE;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAA+B;IAC3E,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,IAAI,MAA0B,CAAC;IAC/B,MAAM,SAAS,GAAG,IAAI,G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,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,OAAO,CAAC,MAAiB,CAAC,CAAC;IAChH,OAAO,wBAAwB,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["import type { TaskId } from \"../../core/tasks/contracts.js\";\nimport {\n\ttype AgentViewBridge,\n\tagentViewBridge,\n\tsetAgentViewBridge,\n} from \"../interactive/agent-view/agent-view-bridge.ts\";\nimport type { EngineAgentViewContext } from \"./agent-view-rpc.ts\";\nimport type { AgentViewRpcCommand } from \"./agent-view-rpc-types.ts\";\nimport { createRpcSuccessResponse } from \"./rpc-responses.ts\";\nimport type { RpcResponse } from \"./rpc-types.ts\";\n\ntype Command<T extends AgentViewRpcCommand[\"type\"]> = Extract<AgentViewRpcCommand, { type: T }>;\n\n/** The engine's copy of what the host's screen shows, which the host keeps current with `set_viewed_agent`. */\ninterface EngineAgentViewBridge extends AgentViewBridge {\n\tshow(taskId: TaskId | undefined): void;\n}\n\nconst engineBridges = new WeakMap<object, EngineAgentViewBridge>();\n\n/**\n * Attach the engine's `AgentViewBridge` to `context.session`: `set_viewed_agent` feeds `viewedTaskId`, and\n * `requestView` sends `engine_view_agent` to the host, whose screen decides. Answers the detach.\n */\nexport function installEngineAgentViewBridge(context: EngineAgentViewContext): () => void {\n\tconst session = context.session;\n\tlet viewed: TaskId | undefined;\n\tconst listeners = new Set<() => void>();\n\tconst bridge: EngineAgentViewBridge = {\n\t\tviewedTaskId: () => viewed,\n\t\trequestView: (taskId) => context.send({ type: \"engine_view_agent\", taskId: taskId ?? null }),\n\t\tsubscribe(listener) {\n\t\t\tlisteners.add(listener);\n\t\t\treturn () => {\n\t\t\t\tlisteners.delete(listener);\n\t\t\t};\n\t\t},\n\t\tshow(taskId) {\n\t\t\tif (viewed === taskId) return;\n\t\t\tviewed = taskId;\n\t\t\tfor (const listener of [...listeners]) {\n\t\t\t\ttry {\n\t\t\t\t\tlistener();\n\t\t\t\t} catch {\n\t\t\t\t\t// A listener's failure must not keep the others from learning what the screen shows.\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t};\n\tsetAgentViewBridge(session, bridge);\n\tengineBridges.set(session, bridge);\n\treturn () => {\n\t\tif (engineBridges.get(session) === bridge) engineBridges.delete(session);\n\t\tif (agentViewBridge(session) === bridge) setAgentViewBridge(session, undefined);\n\t\tlisteners.clear();\n\t};\n}\n\n/** The host's screen now shows the subagent `taskId` names, or main without one. */\nexport async function handleSetViewedAgent(\n\tcommand: Command<\"set_viewed_agent\">,\n\tcontext: EngineAgentViewContext,\n): Promise<RpcResponse> {\n\tengineBridges.get(context.session)?.show(command.taskId === undefined ? undefined : (command.taskId as TaskId));\n\treturn createRpcSuccessResponse(command.id, command.type);\n}\n"]}
1
+ {"version":3,"file":"agent-view-rpc-panel.js","sourceRoot":"","sources":["../../../src/modes/rpc/agent-view-rpc-panel.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,eAAe,EACf,kBAAkB,GAClB,MAAM,gDAAgD,CAAC;AAGxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAU9D,MAAM,aAAa,GAAG,IAAI,OAAO,EAAiC,CAAC;AAEnE;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAA+B;IAC3E,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,IAAI,MAA0B,CAAC;IAC/B,MAAM,SAAS,GAAG,IAAI,GAAG,EAAc,CAAC;IACxC,MAAM,MAAM,GAA0B;QACrC,YAAY,EAAE,GAAG,EAAE,CAAC,MAAM;QAC1B,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CAChC,OAAO,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,mBAAmB;YACzB,MAAM,EAAE,MAAM,IAAI,IAAI;YACtB,GAAG,CAAC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O,CAAC,MAAiB,CAAC,CAAC;IAChH,OAAO,wBAAwB,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["import type { TaskId } from \"../../core/tasks/contracts.js\";\nimport {\n\ttype AgentViewBridge,\n\tagentViewBridge,\n\tsetAgentViewBridge,\n} from \"../interactive/agent-view/agent-view-bridge.ts\";\nimport type { EngineAgentViewContext } from \"./agent-view-rpc.ts\";\nimport type { AgentViewRpcCommand } from \"./agent-view-rpc-types.ts\";\nimport { createRpcSuccessResponse } from \"./rpc-responses.ts\";\nimport type { RpcResponse } from \"./rpc-types.ts\";\n\ntype Command<T extends AgentViewRpcCommand[\"type\"]> = Extract<AgentViewRpcCommand, { type: T }>;\n\n/** The engine's copy of what the host's screen shows, which the host keeps current with `set_viewed_agent`. */\ninterface EngineAgentViewBridge extends AgentViewBridge {\n\tshow(taskId: TaskId | undefined): void;\n}\n\nconst engineBridges = new WeakMap<object, EngineAgentViewBridge>();\n\n/**\n * Attach the engine's `AgentViewBridge` to `context.session`: `set_viewed_agent` feeds `viewedTaskId`, and\n * `requestView` sends `engine_view_agent` to the host, whose screen decides. Answers the detach.\n */\nexport function installEngineAgentViewBridge(context: EngineAgentViewContext): () => void {\n\tconst session = context.session;\n\tlet viewed: TaskId | undefined;\n\tconst listeners = new Set<() => void>();\n\tconst bridge: EngineAgentViewBridge = {\n\t\tviewedTaskId: () => viewed,\n\t\trequestView: (taskId, options) =>\n\t\t\tcontext.send({\n\t\t\t\ttype: \"engine_view_agent\",\n\t\t\t\ttaskId: taskId ?? null,\n\t\t\t\t...(options?.keepScreen === true ? { keepScreen: true as const } : {}),\n\t\t\t}),\n\t\tsubscribe(listener) {\n\t\t\tlisteners.add(listener);\n\t\t\treturn () => {\n\t\t\t\tlisteners.delete(listener);\n\t\t\t};\n\t\t},\n\t\tshow(taskId) {\n\t\t\tif (viewed === taskId) return;\n\t\t\tviewed = taskId;\n\t\t\tfor (const listener of [...listeners]) {\n\t\t\t\ttry {\n\t\t\t\t\tlistener();\n\t\t\t\t} catch {\n\t\t\t\t\t// A listener's failure must not keep the others from learning what the screen shows.\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t};\n\tsetAgentViewBridge(session, bridge);\n\tengineBridges.set(session, bridge);\n\treturn () => {\n\t\tif (engineBridges.get(session) === bridge) engineBridges.delete(session);\n\t\tif (agentViewBridge(session) === bridge) setAgentViewBridge(session, undefined);\n\t\tlisteners.clear();\n\t};\n}\n\n/** The host's screen now shows the subagent `taskId` names, or main without one. */\nexport async function handleSetViewedAgent(\n\tcommand: Command<\"set_viewed_agent\">,\n\tcontext: EngineAgentViewContext,\n): Promise<RpcResponse> {\n\tengineBridges.get(context.session)?.show(command.taskId === undefined ? undefined : (command.taskId as TaskId));\n\treturn createRpcSuccessResponse(command.id, command.type);\n}\n"]}
@@ -99,7 +99,7 @@ export async function showTaskInspector(ui, store, taskId, options = {}) {
99
99
  const session = boardSessions.get(options.board);
100
100
  const bridge = session === undefined ? undefined : agentViewBridge(session);
101
101
  if (bridge !== undefined)
102
- inspector.setAgentView((id) => bridge.requestView(id));
102
+ inspector.setAgentView((id) => bridge.requestView(id, { keepScreen: true }));
103
103
  const reopenOptions = { board: options.board };
104
104
  inspector.setReopen((id) => {
105
105
  void showTaskInspector(ui, store, id, reopenOptions).catch((error) => {
@@ -1 +1 @@
1
- {"version":3,"file":"task-ui-bridge.js","sourceRoot":"","sources":["../../../src/modes/rpc/task-ui-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGlH,OAAO,EAEN,wBAAwB,EACxB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,6BAA6B,GAC7B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,gCAAgC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C,CAAC,CAAC,SAAS;oBACtD,aAAa,EAAE,CAAC,GAAW,EAAsB,EAAE,CAClD,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;oBACtD,WAAW,EAAE,CAAC,IAAY,EAAE,EAAE;wBAC7B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;4BAAE,OAAO,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;wBAC/D,+FAA+F;wBAC/F,MAAM,GAAG,IAAI,CAAC;wBACd,IAAI,EAAE,CAAC;wBACP,OAAO,IAAI,CAAC;oBACb,CAAC;iBACD,CAAC;YACH,CAAC,EACD;gBACC,OAAO,EAAE,UAAU;gBACnB,OAAO,EAAE,YAAY;gBACrB,YAAY,EAAE,IAAI;gBAClB,wBAAwB,EAAE,IAAI;gBAC9B,uBAAuB,EAAE,IAAI;gBAC7B,GAAG,CAAC,UAAU;oBACb,CAAC,CAAC;wBACA,cAAc,EAAE;4BACf,MAAM,EAAE,QAAiB;4BACzB,KAAK,EAAE,MAAe;4BACtB,SAAS,EAAE,MAAe;4BAC1B,MAAM,EAAE,CAAC;yBACT;qBACD;oBACF,CAAC,CAAC,EAAE,CAAC;aACN,CACD,CAAC;YACF,2EAA2E;YAC3E,IAAI,SAAS,CAAC,UAAU,KAAK,UAAU;gBAAE,MAAM,GAAG,IAAI,CAAC;QACxD,CAAC;IACF,CAAC;YAAS,CAAC;QACV,SAAS,EAAE,OAAO,EAAE,CAAC;QACrB,oBAAoB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,SAAS,EAAE,YAAY,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC7D,CAAC","sourcesContent":["import { type TuiMouseEvent, type TuiMouseEventResult, truncateToWidth, visibleWidth } from \"@bastani/atomic-tui\";\nimport type { AgentSession } from \"../../core/agent-session.js\";\nimport type { ExtensionUIContext } from \"../../core/extensions/index.js\";\nimport {\n\ttype AgentPanelSession,\n\tagentPanelExtensionItems,\n\tagentPanelTaskId,\n\tanswerAgentPanelItem,\n\tdismissedAgentPanelItems,\n\tnotifyAgentPanelChanged,\n\topenAgentPanelItem,\n\tstopAgentPanelItem,\n\tsubscribeAgentPanelExtensions,\n} from \"../../core/tasks/agent-panel-source.ts\";\nimport { latestSubagentAttempt, waitingReleasedShells } from \"../../core/tasks/completion.js\";\nimport type { TaskId } from \"../../core/tasks/contracts.js\";\nimport { getOwnerTaskStore, type OwnerTaskStore } from \"../../core/tasks/owner-store.js\";\nimport { launchedTaskViewSource, ownerTaskViewSource, type TaskViewSource } from \"../../core/tasks/task-view-source.js\";\nimport { agentViewBridge } from \"../interactive/agent-view/agent-view-bridge.ts\";\nimport { ChatSessionHost } from \"../interactive/components/chat-session-host.ts\";\nimport { type TaskBoardSource, TaskInspector } from \"../interactive/components/task-inspector.js\";\nimport { taskDisplayText } from \"../interactive/components/task-row.js\";\nimport { type TaskTranscriptEnvironment, themedChatHostStyle } from \"../interactive/components/task-transcript-page.ts\";\nimport { isPhysicalCtrlC } from \"../interactive/interactive-key-identity.ts\";\nimport { getEditorTheme } from \"../interactive/theme/theme.js\";\nimport type { EngineHostRenderSettings } from \"../interactive-engine/protocol.ts\";\nimport { setAgentPanelVisible } from \"./agent-panel-bridge.ts\";\n\n/** The UI a task inspector mounts in: its custom UI, and the chat render settings its transcripts inherit. */\nexport type TaskInspectorUi = Pick<ExtensionUIContext, \"custom\"> &\n\tPartial<\n\t\tPick<\n\t\t\tExtensionUIContext,\n\t\t\t\"getChatRenderSettings\" | \"getToolsExpanded\" | \"setToolsExpanded\" | \"notify\" | \"getFooterDataProvider\"\n\t\t>\n\t>;\n\n/** The engine's custom UI, with the render settings of the host chat that opened the inspector. */\nexport type EngineTaskInspectorMount = Pick<ExtensionUIContext, \"custom\"> & {\n\tgetHostRenderSettings?(): EngineHostRenderSettings | undefined;\n};\n\n/**\n * The isolated engine's `/tasks`, opened from the host's chat. Its transcripts show tool output as the host chat does\n * (the engine's own state stands in until a render request carries the host's), and Ctrl+O there changes it for this\n * inspector only.\n */\nexport function engineTaskInspectorUi(\n\tui: Pick<ExtensionUIContext, \"getChatRenderSettings\" | \"getToolsExpanded\" | \"notify\" | \"getFooterDataProvider\">,\n\tmount: EngineTaskInspectorMount,\n): TaskInspectorUi {\n\tlet toggled: boolean | undefined;\n\tconst toolsExpanded = () => toggled ?? mount.getHostRenderSettings?.()?.toolOutputExpanded ?? ui.getToolsExpanded();\n\treturn {\n\t\tcustom: mount.custom,\n\t\tgetChatRenderSettings: () => ({ ...ui.getChatRenderSettings(), toolOutputExpanded: toolsExpanded() }),\n\t\tgetToolsExpanded: toolsExpanded,\n\t\tsetToolsExpanded: (expanded) => {\n\t\t\ttoggled = expanded;\n\t\t},\n\t\tgetFooterDataProvider: () => ui.getFooterDataProvider(),\n\t\tnotify: (message, type) => ui.notify(message, type),\n\t};\n}\n\nconst boardSessions = new WeakMap<TaskBoardSource, object>();\n\nexport function agentPanelBoardSource(session: AgentPanelSession & object): TaskBoardSource {\n\tconst board: TaskBoardSource = {\n\t\titems: () => agentPanelExtensionItems(session).filter((item) => agentPanelTaskId(item.id) === undefined),\n\t\tsubscribe: (listener) => subscribeAgentPanelExtensions(session, listener),\n\t\topen: (id, options) => openAgentPanelItem(session, id, options),\n\t\tstop: (id) => stopAgentPanelItem(session, id),\n\t\tanswer: (id, text, options) => answerAgentPanelItem(session, id, text, options),\n\t\tdismiss: (id) => {\n\t\t\tdismissedAgentPanelItems(session).add(id);\n\t\t\tnotifyAgentPanelChanged(session);\n\t\t},\n\t};\n\tboardSessions.set(board, session);\n\treturn board;\n}\n\nexport async function showEngineTaskInspector(\n\tsession: AgentSession,\n\tui: TaskInspectorUi,\n\ttaskId?: string,\n\toptions: { readonly waitedShellOf?: string } = {},\n): Promise<void> {\n\tsession.getAgentTaskHost();\n\tconst store = getOwnerTaskStore(session);\n\tif (!store) throw new Error(\"Task owner is unavailable\");\n\tif (options.waitedShellOf !== undefined) {\n\t\tawait openWaitedShellOf(session, ui, options.waitedShellOf);\n\t\treturn;\n\t}\n\tawait showTaskInspector(ui, store, taskId, { board: agentPanelBoardSource(session) });\n}\n\n/**\n * The waited-shell key of the subagent `taskId` the screen shows: while it waits on the shells it launched, `/tasks`\n * opens at the output of the newest one still running, in that subagent's own task list. Nothing opens otherwise.\n */\nexport async function openWaitedShellOf(session: object, ui: TaskInspectorUi, taskId: string): Promise<void> {\n\tconst store = getOwnerTaskStore(session);\n\tif (store === undefined) return;\n\tconst agent = latestSubagentAttempt(store.ownerTasks, taskId as TaskId);\n\tconst shell = agent === undefined ? undefined : waitingReleasedShells(agent, store.ownerTasks).at(-1);\n\tif (agent === undefined || shell === undefined) return;\n\tconst source = launchedTaskViewSource(ownerTaskViewSource(store), shell.parentTaskId ?? agent.ref.taskId);\n\tawait showTaskInspector(ui, store, shell.ref.taskId, {\n\t\tchat: true,\n\t\tbackLabel: agent.agentName ?? \"back\",\n\t\tsource,\n\t});\n}\n\n/** Main CLI mount, shared by the local host and its isolated engine. */\nexport async function showTaskInspector(\n\tui: TaskInspectorUi,\n\tstore: OwnerTaskStore,\n\ttaskId?: string,\n\toptions: {\n\t\treadonly chat?: boolean;\n\t\treadonly backLabel?: string;\n\t\treadonly board?: TaskBoardSource;\n\t\t/** The tasks it lists, when not the session's own: a subagent's, through its launched view of `store`. */\n\t\treadonly source?: TaskViewSource;\n\t} = {},\n): Promise<\"back\" | \"closed\"> {\n\tlet requestRender = () => {};\n\tlet finishView = () => {};\n\tlet closed = false;\n\tlet fullscreen = false;\n\tlet environment: TaskTranscriptEnvironment | undefined;\n\tlet pendingChat: TaskId | undefined;\n\tconst inspector = new TaskInspector(\n\t\toptions.source ?? store,\n\t\t() => {\n\t\t\tif (inspector.fullscreen !== fullscreen) finishView();\n\t\t\telse requestRender();\n\t\t},\n\t\t() => {\n\t\t\tclosed = true;\n\t\t\tfinishView();\n\t\t},\n\t\tundefined,\n\t\t() => environment,\n\t);\n\tif (options.board) {\n\t\tinspector.setBoardSource(options.board);\n\t\t// On the single chat screen a subagent opens there, where the main chat was, and /tasks closes.\n\t\tconst session = boardSessions.get(options.board);\n\t\tconst bridge = session === undefined ? undefined : agentViewBridge(session);\n\t\tif (bridge !== undefined) inspector.setAgentView((id) => bridge.requestView(id));\n\n\t\tconst reopenOptions = { board: options.board };\n\t\tinspector.setReopen((id) => {\n\t\t\tvoid showTaskInspector(ui, store, id, reopenOptions).catch((error: unknown) => {\n\t\t\t\ttry {\n\t\t\t\t\tui.notify?.(taskDisplayText(error instanceof Error ? error.message : String(error)), \"error\");\n\t\t\t\t} catch {}\n\t\t\t});\n\t\t});\n\t}\n\tif (options.chat && taskId !== undefined) {\n\t\tpendingChat = taskId as TaskId;\n\t} else inspector.open(taskId as TaskId | undefined);\n\tconst panelTarget = (options.board ? boardSessions.get(options.board) : undefined) ?? store;\n\tsetAgentPanelVisible(panelTarget, false);\n\ttry {\n\t\twhile (!closed) {\n\t\t\tfullscreen = inspector.fullscreen || pendingChat !== undefined;\n\t\t\tawait ui.custom<void>(\n\t\t\t\t(tui, _theme, keybindings, done) => {\n\t\t\t\t\trequestRender = () => tui.requestRender();\n\t\t\t\t\tfinishView = () => done();\n\t\t\t\t\tenvironment = {\n\t\t\t\t\t\tcreateChat: (opts) => new ChatSessionHost(opts),\n\t\t\t\t\t\ttui,\n\t\t\t\t\t\tkeybindings,\n\t\t\t\t\t\teditorTheme: getEditorTheme(),\n\t\t\t\t\t\tstyle: themedChatHostStyle(),\n\t\t\t\t\t\t...(ui.getChatRenderSettings ? { getChatRenderSettings: () => ui.getChatRenderSettings?.() } : {}),\n\t\t\t\t\t\t...(ui.getToolsExpanded ? { getToolsExpanded: () => ui.getToolsExpanded?.() === true } : {}),\n\t\t\t\t\t\t...(ui.setToolsExpanded\n\t\t\t\t\t\t\t? { setToolsExpanded: (expanded: boolean) => ui.setToolsExpanded?.(expanded) }\n\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t...(ui.getFooterDataProvider ? { footerData: ui.getFooterDataProvider() } : {}),\n\t\t\t\t\t\t...(ui.notify ? { notify: (message: string) => ui.notify?.(message, \"warning\") } : {}),\n\t\t\t\t\t};\n\t\t\t\t\tif (pendingChat !== undefined) {\n\t\t\t\t\t\tconst chat = pendingChat;\n\t\t\t\t\t\tpendingChat = undefined;\n\t\t\t\t\t\tinspector.openChat(chat, options.backLabel);\n\n\t\t\t\t\t\tif (!inspector.fullscreen) {\n\t\t\t\t\t\t\tclosed = true;\n\t\t\t\t\t\t\tqueueMicrotask(() => done());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Elapsed times and the stop notice's window advance while the view is shown.\n\t\t\t\t\tconst tick = setInterval(() => tui.requestRender(), 1000);\n\t\t\t\t\ttick.unref?.();\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdispose: () => clearInterval(tick),\n\t\t\t\t\t\tinvalidate: () => inspector.invalidate(),\n\t\t\t\t\t\trender: (width: number) => {\n\t\t\t\t\t\t\tconst height = Math.max(1, tui.terminal.rows);\n\t\t\t\t\t\t\tif (!fullscreen) return inspector.renderPicker(width, height);\n\t\t\t\t\t\t\tconst lines = inspector.renderViewport(width, height);\n\t\t\t\t\t\t\t// Fullscreen detail pages cover all parent chat and prompt cells.\n\t\t\t\t\t\t\treturn Array.from({ length: height }, (_, row) => {\n\t\t\t\t\t\t\t\tconst line = truncateToWidth(lines[row] ?? \"\", width);\n\t\t\t\t\t\t\t\treturn line + \" \".repeat(Math.max(0, width - visibleWidth(line)));\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\t// A full-screen page draws from the top row, so the click's row is the page's.\n\t\t\t\t\t\thandleMouse: (event: TuiMouseEvent): TuiMouseEventResult | undefined =>\n\t\t\t\t\t\t\tfullscreen ? inspector.handleMouse(event) : undefined,\n\t\t\t\t\t\tpaintedRowKey: (row: number): string | undefined =>\n\t\t\t\t\t\t\tfullscreen ? inspector.paintedRowKey(row) : undefined,\n\t\t\t\t\t\thandleInput: (data: string) => {\n\t\t\t\t\t\t\tif (!isPhysicalCtrlC(data)) return inspector.handleInput(data);\n\t\t\t\t\t\t\t// Ctrl+C closes the view: what it shows here (lists, details, a shell's output) has no prompt.\n\t\t\t\t\t\t\tclosed = true;\n\t\t\t\t\t\t\tdone();\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toverlay: fullscreen,\n\t\t\t\t\tpurpose: \"navigation\",\n\t\t\t\t\thandlesCtrlC: true,\n\t\t\t\t\tdeferInlineCustomUiFocus: true,\n\t\t\t\t\thandlesInternalUiAction: true,\n\t\t\t\t\t...(fullscreen\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\toverlayOptions: {\n\t\t\t\t\t\t\t\t\tanchor: \"center\" as const,\n\t\t\t\t\t\t\t\t\twidth: \"100%\" as const,\n\t\t\t\t\t\t\t\t\tmaxHeight: \"100%\" as const,\n\t\t\t\t\t\t\t\t\tmargin: 0,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: {}),\n\t\t\t\t},\n\t\t\t);\n\t\t\t// Host dismissal without a navigation transition must not reopen the view.\n\t\t\tif (inspector.fullscreen === fullscreen) closed = true;\n\t\t}\n\t} finally {\n\t\tinspector?.dispose();\n\t\tsetAgentPanelVisible(panelTarget, true);\n\t}\n\treturn inspector?.closedByBack === true ? \"back\" : \"closed\";\n}\n"]}
1
+ {"version":3,"file":"task-ui-bridge.js","sourceRoot":"","sources":["../../../src/modes/rpc/task-ui-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGlH,OAAO,EAEN,wBAAwB,EACxB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EAC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,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC7D,CAAC","sourcesContent":["import { type TuiMouseEvent, type TuiMouseEventResult, truncateToWidth, visibleWidth } from \"@bastani/atomic-tui\";\nimport type { AgentSession } from \"../../core/agent-session.js\";\nimport type { ExtensionUIContext } from \"../../core/extensions/index.js\";\nimport {\n\ttype AgentPanelSession,\n\tagentPanelExtensionItems,\n\tagentPanelTaskId,\n\tanswerAgentPanelItem,\n\tdismissedAgentPanelItems,\n\tnotifyAgentPanelChanged,\n\topenAgentPanelItem,\n\tstopAgentPanelItem,\n\tsubscribeAgentPanelExtensions,\n} from \"../../core/tasks/agent-panel-source.ts\";\nimport { latestSubagentAttempt, waitingReleasedShells } from \"../../core/tasks/completion.js\";\nimport type { TaskId } from \"../../core/tasks/contracts.js\";\nimport { getOwnerTaskStore, type OwnerTaskStore } from \"../../core/tasks/owner-store.js\";\nimport { launchedTaskViewSource, ownerTaskViewSource, type TaskViewSource } from \"../../core/tasks/task-view-source.js\";\nimport { agentViewBridge } from \"../interactive/agent-view/agent-view-bridge.ts\";\nimport { ChatSessionHost } from \"../interactive/components/chat-session-host.ts\";\nimport { type TaskBoardSource, TaskInspector } from \"../interactive/components/task-inspector.js\";\nimport { taskDisplayText } from \"../interactive/components/task-row.js\";\nimport { type TaskTranscriptEnvironment, themedChatHostStyle } from \"../interactive/components/task-transcript-page.ts\";\nimport { isPhysicalCtrlC } from \"../interactive/interactive-key-identity.ts\";\nimport { getEditorTheme } from \"../interactive/theme/theme.js\";\nimport type { EngineHostRenderSettings } from \"../interactive-engine/protocol.ts\";\nimport { setAgentPanelVisible } from \"./agent-panel-bridge.ts\";\n\n/** The UI a task inspector mounts in: its custom UI, and the chat render settings its transcripts inherit. */\nexport type TaskInspectorUi = Pick<ExtensionUIContext, \"custom\"> &\n\tPartial<\n\t\tPick<\n\t\t\tExtensionUIContext,\n\t\t\t\"getChatRenderSettings\" | \"getToolsExpanded\" | \"setToolsExpanded\" | \"notify\" | \"getFooterDataProvider\"\n\t\t>\n\t>;\n\n/** The engine's custom UI, with the render settings of the host chat that opened the inspector. */\nexport type EngineTaskInspectorMount = Pick<ExtensionUIContext, \"custom\"> & {\n\tgetHostRenderSettings?(): EngineHostRenderSettings | undefined;\n};\n\n/**\n * The isolated engine's `/tasks`, opened from the host's chat. Its transcripts show tool output as the host chat does\n * (the engine's own state stands in until a render request carries the host's), and Ctrl+O there changes it for this\n * inspector only.\n */\nexport function engineTaskInspectorUi(\n\tui: Pick<ExtensionUIContext, \"getChatRenderSettings\" | \"getToolsExpanded\" | \"notify\" | \"getFooterDataProvider\">,\n\tmount: EngineTaskInspectorMount,\n): TaskInspectorUi {\n\tlet toggled: boolean | undefined;\n\tconst toolsExpanded = () => toggled ?? mount.getHostRenderSettings?.()?.toolOutputExpanded ?? ui.getToolsExpanded();\n\treturn {\n\t\tcustom: mount.custom,\n\t\tgetChatRenderSettings: () => ({ ...ui.getChatRenderSettings(), toolOutputExpanded: toolsExpanded() }),\n\t\tgetToolsExpanded: toolsExpanded,\n\t\tsetToolsExpanded: (expanded) => {\n\t\t\ttoggled = expanded;\n\t\t},\n\t\tgetFooterDataProvider: () => ui.getFooterDataProvider(),\n\t\tnotify: (message, type) => ui.notify(message, type),\n\t};\n}\n\nconst boardSessions = new WeakMap<TaskBoardSource, object>();\n\nexport function agentPanelBoardSource(session: AgentPanelSession & object): TaskBoardSource {\n\tconst board: TaskBoardSource = {\n\t\titems: () => agentPanelExtensionItems(session).filter((item) => agentPanelTaskId(item.id) === undefined),\n\t\tsubscribe: (listener) => subscribeAgentPanelExtensions(session, listener),\n\t\topen: (id, options) => openAgentPanelItem(session, id, options),\n\t\tstop: (id) => stopAgentPanelItem(session, id),\n\t\tanswer: (id, text, options) => answerAgentPanelItem(session, id, text, options),\n\t\tdismiss: (id) => {\n\t\t\tdismissedAgentPanelItems(session).add(id);\n\t\t\tnotifyAgentPanelChanged(session);\n\t\t},\n\t};\n\tboardSessions.set(board, session);\n\treturn board;\n}\n\nexport async function showEngineTaskInspector(\n\tsession: AgentSession,\n\tui: TaskInspectorUi,\n\ttaskId?: string,\n\toptions: { readonly waitedShellOf?: string } = {},\n): Promise<void> {\n\tsession.getAgentTaskHost();\n\tconst store = getOwnerTaskStore(session);\n\tif (!store) throw new Error(\"Task owner is unavailable\");\n\tif (options.waitedShellOf !== undefined) {\n\t\tawait openWaitedShellOf(session, ui, options.waitedShellOf);\n\t\treturn;\n\t}\n\tawait showTaskInspector(ui, store, taskId, { board: agentPanelBoardSource(session) });\n}\n\n/**\n * The waited-shell key of the subagent `taskId` the screen shows: while it waits on the shells it launched, `/tasks`\n * opens at the output of the newest one still running, in that subagent's own task list. Nothing opens otherwise.\n */\nexport async function openWaitedShellOf(session: object, ui: TaskInspectorUi, taskId: string): Promise<void> {\n\tconst store = getOwnerTaskStore(session);\n\tif (store === undefined) return;\n\tconst agent = latestSubagentAttempt(store.ownerTasks, taskId as TaskId);\n\tconst shell = agent === undefined ? undefined : waitingReleasedShells(agent, store.ownerTasks).at(-1);\n\tif (agent === undefined || shell === undefined) return;\n\tconst source = launchedTaskViewSource(ownerTaskViewSource(store), shell.parentTaskId ?? agent.ref.taskId);\n\tawait showTaskInspector(ui, store, shell.ref.taskId, {\n\t\tchat: true,\n\t\tbackLabel: agent.agentName ?? \"back\",\n\t\tsource,\n\t});\n}\n\n/** Main CLI mount, shared by the local host and its isolated engine. */\nexport async function showTaskInspector(\n\tui: TaskInspectorUi,\n\tstore: OwnerTaskStore,\n\ttaskId?: string,\n\toptions: {\n\t\treadonly chat?: boolean;\n\t\treadonly backLabel?: string;\n\t\treadonly board?: TaskBoardSource;\n\t\t/** The tasks it lists, when not the session's own: a subagent's, through its launched view of `store`. */\n\t\treadonly source?: TaskViewSource;\n\t} = {},\n): Promise<\"back\" | \"closed\"> {\n\tlet requestRender = () => {};\n\tlet finishView = () => {};\n\tlet closed = false;\n\tlet fullscreen = false;\n\tlet environment: TaskTranscriptEnvironment | undefined;\n\tlet pendingChat: TaskId | undefined;\n\tconst inspector = new TaskInspector(\n\t\toptions.source ?? store,\n\t\t() => {\n\t\t\tif (inspector.fullscreen !== fullscreen) finishView();\n\t\t\telse requestRender();\n\t\t},\n\t\t() => {\n\t\t\tclosed = true;\n\t\t\tfinishView();\n\t\t},\n\t\tundefined,\n\t\t() => environment,\n\t);\n\tif (options.board) {\n\t\tinspector.setBoardSource(options.board);\n\t\t// On the single chat screen a subagent opens there, where the main chat was, and /tasks closes.\n\t\tconst session = boardSessions.get(options.board);\n\t\tconst bridge = session === undefined ? undefined : agentViewBridge(session);\n\t\tif (bridge !== undefined) inspector.setAgentView((id) => bridge.requestView(id, { keepScreen: true }));\n\n\t\tconst reopenOptions = { board: options.board };\n\t\tinspector.setReopen((id) => {\n\t\t\tvoid showTaskInspector(ui, store, id, reopenOptions).catch((error: unknown) => {\n\t\t\t\ttry {\n\t\t\t\t\tui.notify?.(taskDisplayText(error instanceof Error ? error.message : String(error)), \"error\");\n\t\t\t\t} catch {}\n\t\t\t});\n\t\t});\n\t}\n\tif (options.chat && taskId !== undefined) {\n\t\tpendingChat = taskId as TaskId;\n\t} else inspector.open(taskId as TaskId | undefined);\n\tconst panelTarget = (options.board ? boardSessions.get(options.board) : undefined) ?? store;\n\tsetAgentPanelVisible(panelTarget, false);\n\ttry {\n\t\twhile (!closed) {\n\t\t\tfullscreen = inspector.fullscreen || pendingChat !== undefined;\n\t\t\tawait ui.custom<void>(\n\t\t\t\t(tui, _theme, keybindings, done) => {\n\t\t\t\t\trequestRender = () => tui.requestRender();\n\t\t\t\t\tfinishView = () => done();\n\t\t\t\t\tenvironment = {\n\t\t\t\t\t\tcreateChat: (opts) => new ChatSessionHost(opts),\n\t\t\t\t\t\ttui,\n\t\t\t\t\t\tkeybindings,\n\t\t\t\t\t\teditorTheme: getEditorTheme(),\n\t\t\t\t\t\tstyle: themedChatHostStyle(),\n\t\t\t\t\t\t...(ui.getChatRenderSettings ? { getChatRenderSettings: () => ui.getChatRenderSettings?.() } : {}),\n\t\t\t\t\t\t...(ui.getToolsExpanded ? { getToolsExpanded: () => ui.getToolsExpanded?.() === true } : {}),\n\t\t\t\t\t\t...(ui.setToolsExpanded\n\t\t\t\t\t\t\t? { setToolsExpanded: (expanded: boolean) => ui.setToolsExpanded?.(expanded) }\n\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t...(ui.getFooterDataProvider ? { footerData: ui.getFooterDataProvider() } : {}),\n\t\t\t\t\t\t...(ui.notify ? { notify: (message: string) => ui.notify?.(message, \"warning\") } : {}),\n\t\t\t\t\t};\n\t\t\t\t\tif (pendingChat !== undefined) {\n\t\t\t\t\t\tconst chat = pendingChat;\n\t\t\t\t\t\tpendingChat = undefined;\n\t\t\t\t\t\tinspector.openChat(chat, options.backLabel);\n\n\t\t\t\t\t\tif (!inspector.fullscreen) {\n\t\t\t\t\t\t\tclosed = true;\n\t\t\t\t\t\t\tqueueMicrotask(() => done());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Elapsed times and the stop notice's window advance while the view is shown.\n\t\t\t\t\tconst tick = setInterval(() => tui.requestRender(), 1000);\n\t\t\t\t\ttick.unref?.();\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdispose: () => clearInterval(tick),\n\t\t\t\t\t\tinvalidate: () => inspector.invalidate(),\n\t\t\t\t\t\trender: (width: number) => {\n\t\t\t\t\t\t\tconst height = Math.max(1, tui.terminal.rows);\n\t\t\t\t\t\t\tif (!fullscreen) return inspector.renderPicker(width, height);\n\t\t\t\t\t\t\tconst lines = inspector.renderViewport(width, height);\n\t\t\t\t\t\t\t// Fullscreen detail pages cover all parent chat and prompt cells.\n\t\t\t\t\t\t\treturn Array.from({ length: height }, (_, row) => {\n\t\t\t\t\t\t\t\tconst line = truncateToWidth(lines[row] ?? \"\", width);\n\t\t\t\t\t\t\t\treturn line + \" \".repeat(Math.max(0, width - visibleWidth(line)));\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\t// A full-screen page draws from the top row, so the click's row is the page's.\n\t\t\t\t\t\thandleMouse: (event: TuiMouseEvent): TuiMouseEventResult | undefined =>\n\t\t\t\t\t\t\tfullscreen ? inspector.handleMouse(event) : undefined,\n\t\t\t\t\t\tpaintedRowKey: (row: number): string | undefined =>\n\t\t\t\t\t\t\tfullscreen ? inspector.paintedRowKey(row) : undefined,\n\t\t\t\t\t\thandleInput: (data: string) => {\n\t\t\t\t\t\t\tif (!isPhysicalCtrlC(data)) return inspector.handleInput(data);\n\t\t\t\t\t\t\t// Ctrl+C closes the view: what it shows here (lists, details, a shell's output) has no prompt.\n\t\t\t\t\t\t\tclosed = true;\n\t\t\t\t\t\t\tdone();\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toverlay: fullscreen,\n\t\t\t\t\tpurpose: \"navigation\",\n\t\t\t\t\thandlesCtrlC: true,\n\t\t\t\t\tdeferInlineCustomUiFocus: true,\n\t\t\t\t\thandlesInternalUiAction: true,\n\t\t\t\t\t...(fullscreen\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\toverlayOptions: {\n\t\t\t\t\t\t\t\t\tanchor: \"center\" as const,\n\t\t\t\t\t\t\t\t\twidth: \"100%\" as const,\n\t\t\t\t\t\t\t\t\tmaxHeight: \"100%\" as const,\n\t\t\t\t\t\t\t\t\tmargin: 0,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: {}),\n\t\t\t\t},\n\t\t\t);\n\t\t\t// Host dismissal without a navigation transition must not reopen the view.\n\t\t\tif (inspector.fullscreen === fullscreen) closed = true;\n\t\t}\n\t} finally {\n\t\tinspector?.dispose();\n\t\tsetAgentPanelVisible(panelTarget, true);\n\t}\n\treturn inspector?.closedByBack === true ? \"back\" : \"closed\";\n}\n"]}
@@ -21,7 +21,7 @@ Below the prompt, the **agent panel** lists the session's active background suba
21
21
 
22
22
  - **Each row shows** the status, the agent's name, the model it runs on and its reasoning level, what it works on, how long it has run, and the tokens it has used. A waiting row shows its question.
23
23
  - **Viewed marker (`●`):** While viewing the main chat, `● main` is active. While viewing a subagent, an accent `●` appears before its row (`❯` takes that column while the selection cursor is on it, with its name still highlighted) and `main` is muted. A resumed subagent stays one row, and `●` follows its latest attempt.
24
- - **The model column** names the model the subagent runs on now, as `provider/model-id`, then its reasoning level, as the footer shows the main chat's. A model without reasoning levels shows no level. The column follows the subagent: it changes as soon as the subagent falls back to another model, is resumed on a different one, or changes its reasoning level. A stopped or paused row shows the model its last turn ran on. A row whose model is not known yet leaves the column blank.
24
+ - **The model column** names the model the subagent runs on now, as `provider/model-id`, then its reasoning level, as the footer shows the main chat's. A model without reasoning levels shows no level. The column follows the subagent: it changes as soon as the subagent falls back to another model, is resumed on a different one, or changes its reasoning level. A stopped or paused row shows the model its last turn ran on. A row whose model is not known yet leaves the column blank. When a subagent's model becomes known while you look at its row, the row shows it together with its reasoning level, or the model alone if no level arrives within a second, so the row's task moves only once. While the panel or `/tasks` stays open, the column keeps its width as long as it fits, even when the longest model leaves; it is measured again when the terminal is resized or the list is opened again.
25
25
  - The task title in the panel and on the prompt's top rule stops at a whole character. A shortened title ends in `…`.
26
26
  - **Status glyphs:**
27
27
  - `∀` running
@@ -54,6 +54,8 @@ The process that draws the UI (`host`) and the engine that runs the agent and ex
54
54
  | `block` | After each stall of at least the threshold | `at` (when the UI was due to respond), `durationMs`, the number of stack `samples`, `hotFrames` (the functions most samples were in, most specific first) and the most common full `stacks` |
55
55
  | `delay` | Once the process is ready for input (the `host` as it draws its first frame, the `engine` once it has loaded its session and extensions), once it starts to quit, and as it exits | `phase` (`startup`, `session` or `shutdown`), and how late the process responded: `p50Ms`, `p99Ms`, `maxMs` over `ticks` checks. A stall counts in the phase it started in |
56
56
 
57
+ On Windows, the host ends the engine as soon as you quit. The engine then writes no `shutdown` record, and the record of a stall that ended just before you quit can be missing. If you close the terminal instead of quitting, the engine's last records are not written either.
58
+
57
59
  Records hold function names and file paths, never prompts or message text. Atomic never trims the file, so delete it before reproducing a problem.
58
60
 
59
61
  Stack collection is enabled by default for this diagnostic. Both the npm package and standalone binary use a sampling CPU profile, not debugger pauses. A `debugger;` statement does not stop the application just because the diagnostic is on, and an attached debugger keeps control of its own breakpoints. Profiles rotate every five seconds while the event loop runs. Completed profile data stays available until every overlapping stall window has been read, including a stall discovered just after a startup/session boundary, and is then discarded. Functions sharing a name are listed separately by their definition's source location. Sampling adds some CPU overhead, so use delay-only mode for latency comparisons.
@@ -710,7 +710,7 @@ The same functions are available as `options.keyHint()` and `options.keyText()`
710
710
 
711
711
  In renderers, use these instead of importing `keyHint()`, `keyHintIfBound()` or `keyText()` from `@bastani/atomic`. An extension can resolve its own copy of the package, for example from its own `node_modules`, and that copy does not see Atomic's configured keybindings: `app.*` ids then format as `""`. `rawKeyHint(key, description)` formats a literal key string and is safe to import.
712
712
 
713
- In fullscreen mode, a click on a hint from `keyHint()` or `rawKeyHint()` presses the key it names. The hint carries zero-width marks for this, which the renderer removes before writing to the terminal; use `keyText()` for key names you put in plain text, such as a notification or a log line. To make a hint you write as text clickable, pass it through `clickableHintText()` from `@bastani/atomic-tui`, for example `clickableHintText("↑↓ select · enter choose · esc cancel")`. A named or modified key can be separated from its label by a tab or Unicode space. For bare keys with such spacing, use `clickableKeysHint([{ text: "a", key: "a" }], "\u00a0accept")` to mark the key explicitly. In `clickableHintText("esc / a destination")`, the slash and its label run `/`; pass `["a"]` as the second argument if `a` is another key instead. `clickableHintText("1/2 / esc pick", ["1", "2"])` marks all three keys. A plain ratio like `1 / 2` stays text.
713
+ In fullscreen mode, a click on a hint from `keyHint()` or `rawKeyHint()` presses the key it names. A hint for `app.tools.expand` drawn inside a block that a click expands, such as your tool's result or message, is the exception: a click on it toggles that block alone, as a click anywhere else on the block does. The hint carries zero-width marks for this, which the renderer removes before writing to the terminal; use `keyText()` for key names you put in plain text, such as a notification or a log line. To make a hint you write as text clickable, pass it through `clickableHintText()` from `@bastani/atomic-tui`, for example `clickableHintText("↑↓ select · enter choose · esc cancel")`. A named or modified key can be separated from its label by a tab or Unicode space. For bare keys with such spacing, use `clickableKeysHint([{ text: "a", key: "a" }], "\u00a0accept")` to mark the key explicitly. In `clickableHintText("esc / a destination")`, the slash and its label run `/`; pass `["a"]` as the second argument if `a` is another key instead. `clickableHintText("1/2 / esc pick", ["1", "2"])` marks all three keys. A plain ratio like `1 / 2` stays text.
714
714
 
715
715
  Use namespaced keybinding ids:
716
716
  - Coding-agent ids use the `app.*` namespace, for example `app.tools.expand`, `app.editor.external`, `app.session.rename`
@@ -90,11 +90,11 @@ Local copy operations require a working native clipboard or platform command. On
90
90
 
91
91
  Tool output uses compact state-marked blocks. `app.tools.expand` (Ctrl+O by default) expands or collapses every block in the displayed transcript, including grouped calls. Consecutive finished reads, searches and directory listings share a summary row. A viewed subagent's transcript also groups finished shell calls; the main chat keeps their individual output previews.
92
92
 
93
- In fullscreen mode, a click anywhere on a block that Ctrl+O expands opens or folds just that block: its title, its output, and the `… +N lines` row alike. This works whether you are viewing the main chat or a subagent, for tool calls, grouped-call summaries, finished-agent cards, your `!` shell commands, Intercom messages, task notices, skill blocks, branch summaries and compaction boundaries. A click on a summary such as `Read 2 files` shows the calls it groups, and a click on any of them folds them again. A block with nothing more to show stays as it is.
93
+ In fullscreen mode, a click anywhere on a block that Ctrl+O expands opens or folds just that block: its title, its output, the `… +N lines` row and its `(ctrl+o to expand)` hint alike. This works whether you are viewing the main chat or a subagent, for tool calls, grouped-call summaries, finished-agent cards, your `!` shell commands, Intercom messages, task notices, skill blocks, branch summaries and compaction boundaries. A click on a summary such as `Read 2 files` shows the calls it groups, and a click on any of them folds them again. Tool calls that start after a click open as Ctrl+O last set them. One that joins a group you opened appears as its own folded block, which a click opens on its own, until Ctrl+O sets every block again. A block with nothing more to show stays as it is.
94
94
 
95
95
  A click takes effect after you release and at least half a second after the press, once it cannot be the start of a double-click. Holding the second press of a double-click does not turn it into a single click. The click uses the block’s current output and width, even if you resize while it waits. If there are no extra rows to show, the block stays as it was and the chat keeps following new output. Double- and triple-clicks select a word or a line without opening anything, a drag selects text, and a click on a link opens the link. Ctrl+O still sets every block at once and cancels earlier block clicks that haven’t taken effect. When a click expands a block while the chat follows the latest output, the view stays on that block; the jump-to-latest pill takes you back. A block keeps the state you clicked it to until Ctrl+O sets every block again. Thinking blocks are shown or hidden with their own key (`app.thinking.toggle`), not by a click.
96
96
 
97
- In fullscreen mode, a click on a key hint presses its key. This covers the hint rows under the prompt and at the bottom of `/tasks`, dialogs and pickers, the `?` keys overlay, and hints inside tool blocks and notices such as `(ctrl+o to expand)`. The key goes to the view that has the keyboard, so a click does what the key does and asks for confirmation where the key asks. In a hint that names two keys, such as `pgup/pgdn scroll` or `↑↓ select`, click the key you want; the label belongs to the last key. The same applies to a numbered hint: in `1-4 pick`, clicking `1` or `-` presses 1, and clicking `4` or `pick` presses 4. A `/` between key names, with or without surrounding spaces, belongs to the first key. If you bind an action to `/`, clicking that slash presses the key even when it is next to a `/` separator. In `esc / / pick`, the first slash belongs to `esc`, and the last slash and `pick` both press `/`. Counts such as `3/5` and paths such as `a/file.txt` in ordinary text are not shortcuts. A hint that wraps onto the next row works from every row it covers. A hint that names a slash command, such as `/tasks to manage`, runs the command and keeps what you typed in the prompt. Keys that act only on an empty prompt when typed, such as `?` and `↓`, act on a click whatever the prompt holds. A drag across a hint selects its text, and a double-click runs it once. Hints drawn behind an open dialog do nothing until the dialog closes. Clicks need the fullscreen renderer's mouse reporting; keyboard behavior is unchanged.
97
+ In fullscreen mode, a click on a key hint presses its key. This covers the hint rows under the prompt and at the bottom of `/tasks`, dialogs and pickers, the `?` keys overlay, and hints inside tool blocks and notices. The exception is a Ctrl+O hint inside a block, such as `(ctrl+o to expand)`: it is part of the block, so a click on it opens or folds that block alone, as described above, while the `ctrl+o expand` hint under the prompt still expands every block. The key goes to the view that has the keyboard, so a click does what the key does and asks for confirmation where the key asks. In a hint that names two keys, such as `pgup/pgdn scroll` or `↑↓ select`, click the key you want; the label belongs to the last key. The same applies to a numbered hint: in `1-4 pick`, clicking `1` or `-` presses 1, and clicking `4` or `pick` presses 4. A `/` between key names, with or without surrounding spaces, belongs to the first key. If you bind an action to `/`, clicking that slash presses the key even when it is next to a `/` separator. In `esc / / pick`, the first slash belongs to `esc`, and the last slash and `pick` both press `/`. Counts such as `3/5` and paths such as `a/file.txt` in ordinary text are not shortcuts. A hint that wraps onto the next row works from every row it covers. A hint that names a slash command, such as `/tasks to manage`, runs the command and keeps what you typed in the prompt. Keys that act only on an empty prompt when typed, such as `?` and `↓`, act on a click whatever the prompt holds. A drag across a hint selects its text, and a double-click runs it once. Hints drawn behind an open dialog do nothing until the dialog closes. Clicks need the fullscreen renderer's mouse reporting; keyboard behavior is unchanged.
98
98
 
99
99
  Interactive sessions use a fullscreen transcript. The wheel scrolls the region under the pointer; over the fixed editor, status, or footer it scrolls the transcript. When scrolled up, one centered, highlighted pill above the composer reads `↓ jump to bottom · ctrl+end`, or counts new messages as they arrive. Click it or use `tui.altScreen.bottom` to return to live output. The key label follows your binding; a narrow terminal drops the padding before shortening the label. While scrolled up, the first line of the prompt that started the turn you are reading stays pinned at the top, marked `↑`. Viewed subagent transcripts and `/tasks` shell output views show the same jump row; other OSC 8 links open in the default handler.
100
100
 
package/docs/storage.md CHANGED
@@ -46,6 +46,7 @@ try {
46
46
 
47
47
  **Local Node SQLite (`openNodeSqliteDatabase` / `wrapNodeSqliteDatabase`):**
48
48
  - Creates parent directories and enables WAL, `FULL` sync, foreign keys, and `busyTimeoutMs: 5000` (override via options). Pass `:memory:` for ephemeral DBs or `{ readOnly: true }` to inspect without creating files or changing journal mode.
49
+ - **Threads:** `openNodeSqliteDatabase` runs each connection to a file on a worker thread of its own, so your event loop keeps running while a statement waits for another connection's lock or a commit syncs to disk. Opening a file starts its thread (about 10 ms on Bun, 20 ms on Node), and each statement makes one round trip to it. `:memory:` databases and connections passed to `wrapNodeSqliteDatabase` run on the calling thread, as before. In one process, a `DatabaseSync` of your own or a `wrapNodeSqliteDatabase` handle that writes a file while an `openNodeSqliteDatabase` transaction on it is open can wait for its busy timeout on your thread, which the transaction needs to commit, and fail with `SQLITE_BUSY`. Open every handle that writes a shared file with `openNodeSqliteDatabase`.
49
50
  - **Open locks:** File-backed connections hold a shared lock on `<file>-open.lock` (read-only `openNodeSqliteDatabase` takes it only if lock/holder files already exist and skips it in read-only dirs; `wrapNodeSqliteDatabase` attempts it for all file-backed connections and tolerates unwritable dirs) so checkpoint cleanup never deletes live journals. Do not open crashed hosts' checkpoint journals with external tools while a new host starts.
50
51
  - **Same-process & cross-process queueing:** Separate `openNodeSqliteDatabase` handles to the same file (including symlinks) share an async queue; `wrapNodeSqliteDatabase(conn)` shares a queue per wrapped connection and leaves your connection open on `close()`. Across processes, writers queue FIFO in `<file>-writers`, wake the next writer via `<file>-wakes`, and track holders in `<file>-holders`.
51
52
  - **Group commit & lock wait:** `groupCommitHoldMs` (default `100` ms / `DEFAULT_GROUP_COMMIT_HOLD_MS`, `0` commits individually; invalid throws `StorageConfigError`) batches queued transactions on one connection per lock acquisition. Waiting writers refresh every 500 ms and bypass dead processes after 2 s (live processes are bypassed only after 2 s of active wall time so laptop/VM suspend preserves FIFO order). Exceeding `lockWaitMs` (default `30000` ms, or per-transaction `{ lockWaitMs }`) with no commits rejects with `StorageWriteLockTimeoutError`.
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.10.0-alpha.1",
3
+ "version": "0.10.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bastani/atomic",
9
- "version": "0.10.0-alpha.1",
9
+ "version": "0.10.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@bastani/atomic-natives": "0.10.0-alpha.1",
13
- "@bastani/atomic-ai": "0.10.0-alpha.1",
14
- "@bastani/atomic-agent-core": "0.10.0-alpha.1",
15
- "@bastani/atomic-codemode": "0.10.0-alpha.1",
16
- "@bastani/atomic-tui": "0.10.0-alpha.1",
12
+ "@bastani/atomic-natives": "0.10.1",
13
+ "@bastani/atomic-ai": "0.10.1",
14
+ "@bastani/atomic-agent-core": "0.10.1",
15
+ "@bastani/atomic-codemode": "0.10.1",
16
+ "@bastani/atomic-tui": "0.10.1",
17
17
  "@modelcontextprotocol/ext-apps": "^2.0.4",
18
18
  "@modelcontextprotocol/sdk": "1.32.2",
19
19
  "@mozilla/readability": "^0.6.0",
@@ -431,26 +431,26 @@
431
431
  }
432
432
  },
433
433
  "node_modules/@bastani/atomic-agent-core": {
434
- "version": "0.10.0-alpha.1",
435
- "resolved": "https://registry.npmjs.org/@bastani/atomic-agent-core/-/atomic-agent-core-0.10.0-alpha.1.tgz",
434
+ "version": "0.10.1",
435
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-agent-core/-/atomic-agent-core-0.10.1.tgz",
436
436
  "license": "MIT",
437
437
  "dependencies": {
438
- "@bastani/atomic-ai": "0.10.0-alpha.1",
439
- "@bastani/atomic-schema": "0.10.0-alpha.1"
438
+ "@bastani/atomic-ai": "0.10.1",
439
+ "@bastani/atomic-schema": "0.10.1"
440
440
  },
441
441
  "engines": {
442
442
  "node": ">=22.19.0"
443
443
  }
444
444
  },
445
445
  "node_modules/@bastani/atomic-ai": {
446
- "version": "0.10.0-alpha.1",
447
- "resolved": "https://registry.npmjs.org/@bastani/atomic-ai/-/atomic-ai-0.10.0-alpha.1.tgz",
446
+ "version": "0.10.1",
447
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-ai/-/atomic-ai-0.10.1.tgz",
448
448
  "license": "MIT",
449
449
  "dependencies": {
450
450
  "@anthropic-ai/sdk": "0.129.0",
451
451
  "@aws-sdk/client-bedrock-runtime": "3.1127.0",
452
- "@bastani/atomic-schema": "0.10.0-alpha.1",
453
- "@bastani/atomic-telemetry": "0.10.0-alpha.1",
452
+ "@bastani/atomic-schema": "0.10.1",
453
+ "@bastani/atomic-telemetry": "0.10.1",
454
454
  "@google/genai": "2.32.0",
455
455
  "@smithy/node-http-handler": "4.13.0",
456
456
  "http-proxy-agent": "9.1.0",
@@ -528,8 +528,8 @@
528
528
  }
529
529
  },
530
530
  "node_modules/@bastani/atomic-codemode": {
531
- "version": "0.10.0-alpha.1",
532
- "resolved": "https://registry.npmjs.org/@bastani/atomic-codemode/-/atomic-codemode-0.10.0-alpha.1.tgz",
531
+ "version": "0.10.1",
532
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-codemode/-/atomic-codemode-0.10.1.tgz",
533
533
  "license": "MIT",
534
534
  "dependencies": {
535
535
  "quickjs-wasi": "3.6.3"
@@ -539,18 +539,18 @@
539
539
  }
540
540
  },
541
541
  "node_modules/@bastani/atomic-natives": {
542
- "version": "0.10.0-alpha.1",
543
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.10.0-alpha.1.tgz",
542
+ "version": "0.10.1",
543
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.10.1.tgz",
544
544
  "license": "MIT",
545
545
  "optionalDependencies": {
546
- "@bastani/atomic-natives-darwin-arm64": "0.10.0-alpha.1",
547
- "@bastani/atomic-natives-darwin-x64": "0.10.0-alpha.1",
548
- "@bastani/atomic-natives-linux-arm64-gnu": "0.10.0-alpha.1",
549
- "@bastani/atomic-natives-linux-arm64-musl": "0.10.0-alpha.1",
550
- "@bastani/atomic-natives-linux-x64-gnu": "0.10.0-alpha.1",
551
- "@bastani/atomic-natives-linux-x64-musl": "0.10.0-alpha.1",
552
- "@bastani/atomic-natives-win32-arm64-msvc": "0.10.0-alpha.1",
553
- "@bastani/atomic-natives-win32-x64-msvc": "0.10.0-alpha.1"
546
+ "@bastani/atomic-natives-darwin-arm64": "0.10.1",
547
+ "@bastani/atomic-natives-darwin-x64": "0.10.1",
548
+ "@bastani/atomic-natives-linux-arm64-gnu": "0.10.1",
549
+ "@bastani/atomic-natives-linux-arm64-musl": "0.10.1",
550
+ "@bastani/atomic-natives-linux-x64-gnu": "0.10.1",
551
+ "@bastani/atomic-natives-linux-x64-musl": "0.10.1",
552
+ "@bastani/atomic-natives-win32-arm64-msvc": "0.10.1",
553
+ "@bastani/atomic-natives-win32-x64-msvc": "0.10.1"
554
554
  },
555
555
  "engines": {
556
556
  "bun": ">=1.4.2",
@@ -558,8 +558,8 @@
558
558
  }
559
559
  },
560
560
  "node_modules/@bastani/atomic-natives-darwin-arm64": {
561
- "version": "0.10.0-alpha.1",
562
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.10.0-alpha.1.tgz",
561
+ "version": "0.10.1",
562
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.10.1.tgz",
563
563
  "license": "MIT",
564
564
  "os": [
565
565
  "darwin"
@@ -570,8 +570,8 @@
570
570
  "optional": true
571
571
  },
572
572
  "node_modules/@bastani/atomic-natives-darwin-x64": {
573
- "version": "0.10.0-alpha.1",
574
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.10.0-alpha.1.tgz",
573
+ "version": "0.10.1",
574
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.10.1.tgz",
575
575
  "license": "MIT",
576
576
  "os": [
577
577
  "darwin"
@@ -582,8 +582,8 @@
582
582
  "optional": true
583
583
  },
584
584
  "node_modules/@bastani/atomic-natives-linux-arm64-gnu": {
585
- "version": "0.10.0-alpha.1",
586
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.10.0-alpha.1.tgz",
585
+ "version": "0.10.1",
586
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.10.1.tgz",
587
587
  "license": "MIT",
588
588
  "os": [
589
589
  "linux"
@@ -597,8 +597,8 @@
597
597
  "optional": true
598
598
  },
599
599
  "node_modules/@bastani/atomic-natives-linux-arm64-musl": {
600
- "version": "0.10.0-alpha.1",
601
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.10.0-alpha.1.tgz",
600
+ "version": "0.10.1",
601
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.10.1.tgz",
602
602
  "license": "MIT",
603
603
  "os": [
604
604
  "linux"
@@ -612,8 +612,8 @@
612
612
  "optional": true
613
613
  },
614
614
  "node_modules/@bastani/atomic-natives-linux-x64-gnu": {
615
- "version": "0.10.0-alpha.1",
616
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.10.0-alpha.1.tgz",
615
+ "version": "0.10.1",
616
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.10.1.tgz",
617
617
  "license": "MIT",
618
618
  "os": [
619
619
  "linux"
@@ -627,8 +627,8 @@
627
627
  "optional": true
628
628
  },
629
629
  "node_modules/@bastani/atomic-natives-linux-x64-musl": {
630
- "version": "0.10.0-alpha.1",
631
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.10.0-alpha.1.tgz",
630
+ "version": "0.10.1",
631
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.10.1.tgz",
632
632
  "license": "MIT",
633
633
  "os": [
634
634
  "linux"
@@ -642,8 +642,8 @@
642
642
  "optional": true
643
643
  },
644
644
  "node_modules/@bastani/atomic-natives-win32-arm64-msvc": {
645
- "version": "0.10.0-alpha.1",
646
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.10.0-alpha.1.tgz",
645
+ "version": "0.10.1",
646
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.10.1.tgz",
647
647
  "license": "MIT",
648
648
  "os": [
649
649
  "win32"
@@ -654,8 +654,8 @@
654
654
  "optional": true
655
655
  },
656
656
  "node_modules/@bastani/atomic-natives-win32-x64-msvc": {
657
- "version": "0.10.0-alpha.1",
658
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.10.0-alpha.1.tgz",
657
+ "version": "0.10.1",
658
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.10.1.tgz",
659
659
  "license": "MIT",
660
660
  "os": [
661
661
  "win32"
@@ -666,24 +666,24 @@
666
666
  "optional": true
667
667
  },
668
668
  "node_modules/@bastani/atomic-schema": {
669
- "version": "0.10.0-alpha.1",
670
- "resolved": "https://registry.npmjs.org/@bastani/atomic-schema/-/atomic-schema-0.10.0-alpha.1.tgz",
669
+ "version": "0.10.1",
670
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-schema/-/atomic-schema-0.10.1.tgz",
671
671
  "license": "MIT",
672
672
  "engines": {
673
673
  "node": ">=22.19.0"
674
674
  }
675
675
  },
676
676
  "node_modules/@bastani/atomic-telemetry": {
677
- "version": "0.10.0-alpha.1",
678
- "resolved": "https://registry.npmjs.org/@bastani/atomic-telemetry/-/atomic-telemetry-0.10.0-alpha.1.tgz",
677
+ "version": "0.10.1",
678
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-telemetry/-/atomic-telemetry-0.10.1.tgz",
679
679
  "license": "MIT",
680
680
  "engines": {
681
681
  "node": ">=22.19.0"
682
682
  }
683
683
  },
684
684
  "node_modules/@bastani/atomic-tui": {
685
- "version": "0.10.0-alpha.1",
686
- "resolved": "https://registry.npmjs.org/@bastani/atomic-tui/-/atomic-tui-0.10.0-alpha.1.tgz",
685
+ "version": "0.10.1",
686
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-tui/-/atomic-tui-0.10.1.tgz",
687
687
  "license": "MIT",
688
688
  "dependencies": {
689
689
  "get-east-asian-width": "1.7.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.10.0-alpha.1",
3
+ "version": "0.10.1",
4
4
  "description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "atomicConfig": {
@@ -71,11 +71,11 @@
71
71
  "prepublishOnly": "bun run clean && bun run build && bun run shrinkwrap"
72
72
  },
73
73
  "dependencies": {
74
- "@bastani/atomic-natives": "0.10.0-alpha.1",
75
- "@bastani/atomic-ai": "0.10.0-alpha.1",
76
- "@bastani/atomic-agent-core": "0.10.0-alpha.1",
77
- "@bastani/atomic-codemode": "0.10.0-alpha.1",
78
- "@bastani/atomic-tui": "0.10.0-alpha.1",
74
+ "@bastani/atomic-natives": "0.10.1",
75
+ "@bastani/atomic-ai": "0.10.1",
76
+ "@bastani/atomic-agent-core": "0.10.1",
77
+ "@bastani/atomic-codemode": "0.10.1",
78
+ "@bastani/atomic-tui": "0.10.1",
79
79
  "@modelcontextprotocol/ext-apps": "^2.0.4",
80
80
  "@modelcontextprotocol/sdk": "1.32.2",
81
81
  "@mozilla/readability": "^0.6.0",