openhorse 0.2.19 → 0.2.22

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 (423) hide show
  1. package/dist/agents/coordinator.d.ts.map +1 -1
  2. package/dist/agents/fork.d.ts.map +1 -1
  3. package/dist/agents/fork.js +0 -1
  4. package/dist/agents/fork.js.map +1 -1
  5. package/dist/agents/worker-pool.d.ts.map +1 -1
  6. package/dist/agents/worker-pool.js +3 -1
  7. package/dist/agents/worker-pool.js.map +1 -1
  8. package/dist/cli.js +28 -3
  9. package/dist/cli.js.map +1 -1
  10. package/dist/commands/index.d.ts.map +1 -1
  11. package/dist/commands/index.js +202 -77
  12. package/dist/commands/index.js.map +1 -1
  13. package/dist/commands/parser.d.ts.map +1 -1
  14. package/dist/commands/parser.js +8 -3
  15. package/dist/commands/parser.js.map +1 -1
  16. package/dist/commands/types.d.ts +2 -0
  17. package/dist/commands/types.d.ts.map +1 -1
  18. package/dist/commands/types.js.map +1 -1
  19. package/dist/core/checkpoint.d.ts.map +1 -1
  20. package/dist/core/checkpoint.js +3 -0
  21. package/dist/core/checkpoint.js.map +1 -1
  22. package/dist/core/cost-tracker.d.ts +45 -5
  23. package/dist/core/cost-tracker.d.ts.map +1 -1
  24. package/dist/core/cost-tracker.js +78 -13
  25. package/dist/core/cost-tracker.js.map +1 -1
  26. package/dist/framework/index.d.ts +1 -1
  27. package/dist/framework/index.d.ts.map +1 -1
  28. package/dist/framework/index.js.map +1 -1
  29. package/dist/framework/prompt.d.ts.map +1 -1
  30. package/dist/framework/prompt.js +16 -0
  31. package/dist/framework/prompt.js.map +1 -1
  32. package/dist/framework/query.d.ts +25 -0
  33. package/dist/framework/query.d.ts.map +1 -1
  34. package/dist/framework/query.js +196 -56
  35. package/dist/framework/query.js.map +1 -1
  36. package/dist/framework/store.d.ts +6 -1
  37. package/dist/framework/store.d.ts.map +1 -1
  38. package/dist/framework/store.js +10 -1
  39. package/dist/framework/store.js.map +1 -1
  40. package/dist/harness/context-harness.d.ts.map +1 -1
  41. package/dist/harness/context-harness.js +6 -1
  42. package/dist/harness/context-harness.js.map +1 -1
  43. package/dist/harness/ledger.d.ts +1 -0
  44. package/dist/harness/ledger.d.ts.map +1 -1
  45. package/dist/harness/ledger.js +12 -0
  46. package/dist/harness/ledger.js.map +1 -1
  47. package/dist/harness/safety.d.ts +2 -0
  48. package/dist/harness/safety.d.ts.map +1 -1
  49. package/dist/harness/safety.js +27 -3
  50. package/dist/harness/safety.js.map +1 -1
  51. package/dist/index.d.ts +2 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/init.d.ts +1 -1
  54. package/dist/init.d.ts.map +1 -1
  55. package/dist/init.js +1 -1
  56. package/dist/init.js.map +1 -1
  57. package/dist/ink-ui/components/Markdown.d.ts +1 -1
  58. package/dist/ink-ui/components/Markdown.d.ts.map +1 -1
  59. package/dist/ink-ui/components/Markdown.js +1 -1
  60. package/dist/ink-ui/components/Markdown.js.map +1 -1
  61. package/dist/ink-ui/components/StatusLine.d.ts.map +1 -1
  62. package/dist/ink-ui/components/StatusLine.js +0 -2
  63. package/dist/ink-ui/components/StatusLine.js.map +1 -1
  64. package/dist/ink-ui/runtime/grapheme.d.ts +9 -8
  65. package/dist/ink-ui/runtime/grapheme.d.ts.map +1 -1
  66. package/dist/ink-ui/runtime/grapheme.js +14 -60
  67. package/dist/ink-ui/runtime/grapheme.js.map +1 -1
  68. package/dist/ink-ui/runtime/input-buffer.d.ts +9 -31
  69. package/dist/ink-ui/runtime/input-buffer.d.ts.map +1 -1
  70. package/dist/ink-ui/runtime/input-buffer.js +15 -162
  71. package/dist/ink-ui/runtime/input-buffer.js.map +1 -1
  72. package/dist/ink-ui/runtime/native-cursor.js +0 -25
  73. package/dist/ink-ui/runtime/native-cursor.js.map +1 -1
  74. package/dist/ink-ui/runtime/prompt-layout.d.ts +9 -29
  75. package/dist/ink-ui/runtime/prompt-layout.d.ts.map +1 -1
  76. package/dist/ink-ui/runtime/prompt-layout.js +18 -166
  77. package/dist/ink-ui/runtime/prompt-layout.js.map +1 -1
  78. package/dist/ink-ui/runtime/transcript-state.d.ts.map +1 -1
  79. package/dist/ink-ui/runtime/transcript-state.js +2 -0
  80. package/dist/ink-ui/runtime/transcript-state.js.map +1 -1
  81. package/dist/ink-ui/screens/ReplScreen.d.ts.map +1 -1
  82. package/dist/ink-ui/screens/ReplScreen.js +23 -5
  83. package/dist/ink-ui/screens/ReplScreen.js.map +1 -1
  84. package/dist/memory/entrypoint.js +1 -1
  85. package/dist/memory/entrypoint.js.map +1 -1
  86. package/dist/memory/storage.js +1 -1
  87. package/dist/memory/storage.js.map +1 -1
  88. package/dist/memory/store.d.ts +1 -0
  89. package/dist/memory/store.d.ts.map +1 -1
  90. package/dist/memory/store.js +9 -0
  91. package/dist/memory/store.js.map +1 -1
  92. package/dist/runtime/agent-runtime-controller.d.ts.map +1 -1
  93. package/dist/runtime/agent-runtime-controller.js +25 -0
  94. package/dist/runtime/agent-runtime-controller.js.map +1 -1
  95. package/dist/runtime/agent-runtime-protocol.d.ts +4 -1
  96. package/dist/runtime/agent-runtime-protocol.d.ts.map +1 -1
  97. package/dist/runtime/agent-runtime-protocol.js +6 -0
  98. package/dist/runtime/agent-runtime-protocol.js.map +1 -1
  99. package/dist/runtime/chat-controller.d.ts +27 -0
  100. package/dist/runtime/chat-controller.d.ts.map +1 -1
  101. package/dist/runtime/chat-controller.js +374 -88
  102. package/dist/runtime/chat-controller.js.map +1 -1
  103. package/dist/runtime/composer/buffer.d.ts +43 -0
  104. package/dist/runtime/composer/buffer.d.ts.map +1 -0
  105. package/dist/runtime/composer/buffer.js +176 -0
  106. package/dist/runtime/composer/buffer.js.map +1 -0
  107. package/dist/runtime/composer/grapheme.d.ts +19 -0
  108. package/dist/runtime/composer/grapheme.d.ts.map +1 -0
  109. package/dist/runtime/composer/grapheme.js +73 -0
  110. package/dist/runtime/composer/grapheme.js.map +1 -0
  111. package/dist/runtime/composer/history.d.ts +39 -0
  112. package/dist/runtime/composer/history.d.ts.map +1 -0
  113. package/dist/runtime/composer/history.js +91 -0
  114. package/dist/runtime/composer/history.js.map +1 -0
  115. package/dist/runtime/composer/layout.d.ts +40 -0
  116. package/dist/runtime/composer/layout.d.ts.map +1 -0
  117. package/dist/runtime/composer/layout.js +174 -0
  118. package/dist/runtime/composer/layout.js.map +1 -0
  119. package/dist/runtime/rich-text/ansi-parser.d.ts +31 -0
  120. package/dist/runtime/rich-text/ansi-parser.d.ts.map +1 -0
  121. package/dist/runtime/rich-text/ansi-parser.js +310 -0
  122. package/dist/runtime/rich-text/ansi-parser.js.map +1 -0
  123. package/dist/runtime/rich-text/layout.d.ts +12 -0
  124. package/dist/runtime/rich-text/layout.d.ts.map +1 -0
  125. package/dist/runtime/rich-text/layout.js +362 -0
  126. package/dist/runtime/rich-text/layout.js.map +1 -0
  127. package/dist/runtime/rich-text/markdown-parser.d.ts +17 -0
  128. package/dist/runtime/rich-text/markdown-parser.d.ts.map +1 -0
  129. package/dist/runtime/rich-text/markdown-parser.js +218 -0
  130. package/dist/runtime/rich-text/markdown-parser.js.map +1 -0
  131. package/dist/runtime/rich-text/sanitizer.d.ts +18 -0
  132. package/dist/runtime/rich-text/sanitizer.d.ts.map +1 -0
  133. package/dist/runtime/rich-text/sanitizer.js +32 -0
  134. package/dist/runtime/rich-text/sanitizer.js.map +1 -0
  135. package/dist/runtime/rich-text/types.d.ts +59 -0
  136. package/dist/runtime/rich-text/types.d.ts.map +1 -0
  137. package/dist/runtime/rich-text/types.js +17 -0
  138. package/dist/runtime/rich-text/types.js.map +1 -0
  139. package/dist/runtime/subagents/budget.d.ts +118 -0
  140. package/dist/runtime/subagents/budget.d.ts.map +1 -0
  141. package/dist/runtime/subagents/budget.js +173 -0
  142. package/dist/runtime/subagents/budget.js.map +1 -0
  143. package/dist/runtime/subagents/child-executor-guard.d.ts +60 -0
  144. package/dist/runtime/subagents/child-executor-guard.d.ts.map +1 -0
  145. package/dist/runtime/subagents/child-executor-guard.js +219 -0
  146. package/dist/runtime/subagents/child-executor-guard.js.map +1 -0
  147. package/dist/runtime/subagents/context-builder.d.ts +34 -0
  148. package/dist/runtime/subagents/context-builder.d.ts.map +1 -0
  149. package/dist/runtime/subagents/context-builder.js +99 -0
  150. package/dist/runtime/subagents/context-builder.js.map +1 -0
  151. package/dist/runtime/subagents/index.d.ts +21 -0
  152. package/dist/runtime/subagents/index.d.ts.map +1 -0
  153. package/dist/runtime/subagents/index.js +62 -0
  154. package/dist/runtime/subagents/index.js.map +1 -0
  155. package/dist/runtime/subagents/policy.d.ts +68 -0
  156. package/dist/runtime/subagents/policy.d.ts.map +1 -0
  157. package/dist/runtime/subagents/policy.js +230 -0
  158. package/dist/runtime/subagents/policy.js.map +1 -0
  159. package/dist/runtime/subagents/presets.d.ts +44 -0
  160. package/dist/runtime/subagents/presets.d.ts.map +1 -0
  161. package/dist/runtime/subagents/presets.js +148 -0
  162. package/dist/runtime/subagents/presets.js.map +1 -0
  163. package/dist/runtime/subagents/production.d.ts +44 -0
  164. package/dist/runtime/subagents/production.d.ts.map +1 -0
  165. package/dist/runtime/subagents/production.js +143 -0
  166. package/dist/runtime/subagents/production.js.map +1 -0
  167. package/dist/runtime/subagents/provider-gate.d.ts +99 -0
  168. package/dist/runtime/subagents/provider-gate.d.ts.map +1 -0
  169. package/dist/runtime/subagents/provider-gate.js +186 -0
  170. package/dist/runtime/subagents/provider-gate.js.map +1 -0
  171. package/dist/runtime/subagents/result-parser.d.ts +40 -0
  172. package/dist/runtime/subagents/result-parser.d.ts.map +1 -0
  173. package/dist/runtime/subagents/result-parser.js +240 -0
  174. package/dist/runtime/subagents/result-parser.js.map +1 -0
  175. package/dist/runtime/subagents/runner.d.ts +53 -0
  176. package/dist/runtime/subagents/runner.d.ts.map +1 -0
  177. package/dist/runtime/subagents/runner.js +172 -0
  178. package/dist/runtime/subagents/runner.js.map +1 -0
  179. package/dist/runtime/subagents/runtime-integration.d.ts +73 -0
  180. package/dist/runtime/subagents/runtime-integration.d.ts.map +1 -0
  181. package/dist/runtime/subagents/runtime-integration.js +148 -0
  182. package/dist/runtime/subagents/runtime-integration.js.map +1 -0
  183. package/dist/runtime/subagents/supervisor.d.ts +79 -0
  184. package/dist/runtime/subagents/supervisor.d.ts.map +1 -0
  185. package/dist/runtime/subagents/supervisor.js +301 -0
  186. package/dist/runtime/subagents/supervisor.js.map +1 -0
  187. package/dist/runtime/subagents/tool.d.ts +38 -0
  188. package/dist/runtime/subagents/tool.d.ts.map +1 -0
  189. package/dist/runtime/subagents/tool.js +171 -0
  190. package/dist/runtime/subagents/tool.js.map +1 -0
  191. package/dist/runtime/subagents/types.d.ts +152 -0
  192. package/dist/runtime/subagents/types.d.ts.map +1 -0
  193. package/dist/runtime/subagents/types.js +56 -0
  194. package/dist/runtime/subagents/types.js.map +1 -0
  195. package/dist/runtime/ui-events.d.ts +18 -0
  196. package/dist/runtime/ui-events.d.ts.map +1 -1
  197. package/dist/runtime/ui-events.js.map +1 -1
  198. package/dist/runtime/ui-view-model.d.ts +44 -1
  199. package/dist/runtime/ui-view-model.d.ts.map +1 -1
  200. package/dist/runtime/ui-view-model.js +90 -37
  201. package/dist/runtime/ui-view-model.js.map +1 -1
  202. package/dist/sdk/query.d.ts.map +1 -1
  203. package/dist/sdk/query.js +0 -1
  204. package/dist/sdk/query.js.map +1 -1
  205. package/dist/services/auto-fix/autoFixHook.d.ts.map +1 -1
  206. package/dist/services/auto-fix/autoFixHook.js +3 -2
  207. package/dist/services/auto-fix/autoFixHook.js.map +1 -1
  208. package/dist/services/auto-fix/autoFixRunner.d.ts +2 -2
  209. package/dist/services/auto-fix/autoFixRunner.d.ts.map +1 -1
  210. package/dist/services/auto-fix/autoFixRunner.js +2 -2
  211. package/dist/services/auto-fix/autoFixRunner.js.map +1 -1
  212. package/dist/services/compact/auto-compact.d.ts +15 -2
  213. package/dist/services/compact/auto-compact.d.ts.map +1 -1
  214. package/dist/services/compact/auto-compact.js +59 -27
  215. package/dist/services/compact/auto-compact.js.map +1 -1
  216. package/dist/services/compact/compact.d.ts +2 -0
  217. package/dist/services/compact/compact.d.ts.map +1 -1
  218. package/dist/services/compact/compact.js +22 -5
  219. package/dist/services/compact/compact.js.map +1 -1
  220. package/dist/services/compact/coordinator.d.ts +26 -0
  221. package/dist/services/compact/coordinator.d.ts.map +1 -0
  222. package/dist/services/compact/coordinator.js +44 -0
  223. package/dist/services/compact/coordinator.js.map +1 -0
  224. package/dist/services/compact/index.d.ts +1 -0
  225. package/dist/services/compact/index.d.ts.map +1 -1
  226. package/dist/services/compact/index.js +3 -1
  227. package/dist/services/compact/index.js.map +1 -1
  228. package/dist/services/compact/summary-generator.d.ts +6 -2
  229. package/dist/services/compact/summary-generator.d.ts.map +1 -1
  230. package/dist/services/compact/summary-generator.js +73 -32
  231. package/dist/services/compact/summary-generator.js.map +1 -1
  232. package/dist/services/concurrent-sessions.d.ts.map +1 -1
  233. package/dist/services/concurrent-sessions.js +3 -0
  234. package/dist/services/concurrent-sessions.js.map +1 -1
  235. package/dist/services/config-dir.d.ts +11 -1
  236. package/dist/services/config-dir.d.ts.map +1 -1
  237. package/dist/services/config-dir.js +19 -2
  238. package/dist/services/config-dir.js.map +1 -1
  239. package/dist/services/config.d.ts +13 -4
  240. package/dist/services/config.d.ts.map +1 -1
  241. package/dist/services/config.js +85 -4
  242. package/dist/services/config.js.map +1 -1
  243. package/dist/services/doctor.d.ts +2 -0
  244. package/dist/services/doctor.d.ts.map +1 -1
  245. package/dist/services/doctor.js +9 -2
  246. package/dist/services/doctor.js.map +1 -1
  247. package/dist/services/global-config.d.ts +33 -1
  248. package/dist/services/global-config.d.ts.map +1 -1
  249. package/dist/services/global-config.js +3 -0
  250. package/dist/services/global-config.js.map +1 -1
  251. package/dist/services/llm.d.ts +21 -4
  252. package/dist/services/llm.d.ts.map +1 -1
  253. package/dist/services/llm.js +75 -9
  254. package/dist/services/llm.js.map +1 -1
  255. package/dist/services/mcp/transports.d.ts +2 -0
  256. package/dist/services/mcp/transports.d.ts.map +1 -1
  257. package/dist/services/mcp/transports.js +23 -2
  258. package/dist/services/mcp/transports.js.map +1 -1
  259. package/dist/services/memory.d.ts.map +1 -1
  260. package/dist/services/memory.js.map +1 -1
  261. package/dist/services/model-context.d.ts +36 -0
  262. package/dist/services/model-context.d.ts.map +1 -1
  263. package/dist/services/model-context.js +243 -31
  264. package/dist/services/model-context.js.map +1 -1
  265. package/dist/services/redaction.js +1 -1
  266. package/dist/services/redaction.js.map +1 -1
  267. package/dist/services/session-memory/sessionMemory.js +1 -1
  268. package/dist/services/session-memory/sessionMemory.js.map +1 -1
  269. package/dist/services/session-storage.d.ts +39 -1
  270. package/dist/services/session-storage.d.ts.map +1 -1
  271. package/dist/services/session-storage.js +156 -28
  272. package/dist/services/session-storage.js.map +1 -1
  273. package/dist/services/task-manager.d.ts +2 -0
  274. package/dist/services/task-manager.d.ts.map +1 -1
  275. package/dist/services/task-manager.js +13 -0
  276. package/dist/services/task-manager.js.map +1 -1
  277. package/dist/services/usage-state.d.ts +55 -5
  278. package/dist/services/usage-state.d.ts.map +1 -1
  279. package/dist/services/usage-state.js +188 -59
  280. package/dist/services/usage-state.js.map +1 -1
  281. package/dist/services/verification-profile.d.ts.map +1 -1
  282. package/dist/services/verification-profile.js +3 -2
  283. package/dist/services/verification-profile.js.map +1 -1
  284. package/dist/services/workspace-diff.d.ts.map +1 -1
  285. package/dist/services/workspace-diff.js +34 -3
  286. package/dist/services/workspace-diff.js.map +1 -1
  287. package/dist/services/yaml-config.js +1 -1
  288. package/dist/skills/loader.d.ts +1 -1
  289. package/dist/skills/loader.d.ts.map +1 -1
  290. package/dist/skills/loader.js +1 -1
  291. package/dist/skills/loader.js.map +1 -1
  292. package/dist/skills/registry.d.ts +1 -1
  293. package/dist/skills/registry.d.ts.map +1 -1
  294. package/dist/skills/registry.js +1 -1
  295. package/dist/skills/registry.js.map +1 -1
  296. package/dist/skills/runtime.d.ts +9 -5
  297. package/dist/skills/runtime.d.ts.map +1 -1
  298. package/dist/skills/runtime.js +157 -12
  299. package/dist/skills/runtime.js.map +1 -1
  300. package/dist/terminal-ui/launch.d.ts +20 -3
  301. package/dist/terminal-ui/launch.d.ts.map +1 -1
  302. package/dist/terminal-ui/launch.js +86 -25
  303. package/dist/terminal-ui/launch.js.map +1 -1
  304. package/dist/terminal-ui/raw-editor.d.ts +9 -0
  305. package/dist/terminal-ui/raw-editor.d.ts.map +1 -1
  306. package/dist/terminal-ui/raw-editor.js +207 -30
  307. package/dist/terminal-ui/raw-editor.js.map +1 -1
  308. package/dist/tools/bash_security.d.ts.map +1 -1
  309. package/dist/tools/bash_security.js +14 -5
  310. package/dist/tools/bash_security.js.map +1 -1
  311. package/dist/tools/index.d.ts.map +1 -1
  312. package/dist/tools/index.js +51 -24
  313. package/dist/tools/index.js.map +1 -1
  314. package/dist/tools/lsp.js.map +1 -1
  315. package/dist/tools/plan.d.ts.map +1 -1
  316. package/dist/tools/plan.js +7 -0
  317. package/dist/tools/plan.js.map +1 -1
  318. package/dist/tools/web.d.ts +10 -0
  319. package/dist/tools/web.d.ts.map +1 -1
  320. package/dist/tools/web.js +84 -4
  321. package/dist/tools/web.js.map +1 -1
  322. package/dist/tui-core/frame.d.ts +13 -1
  323. package/dist/tui-core/frame.d.ts.map +1 -1
  324. package/dist/tui-core/frame.js +61 -8
  325. package/dist/tui-core/frame.js.map +1 -1
  326. package/dist/tui-core/input-parser.d.ts +1 -1
  327. package/dist/tui-core/input-parser.d.ts.map +1 -1
  328. package/dist/tui-core/input-parser.js +20 -1
  329. package/dist/tui-core/input-parser.js.map +1 -1
  330. package/dist/tui-core/style.d.ts +103 -0
  331. package/dist/tui-core/style.d.ts.map +1 -0
  332. package/dist/tui-core/style.js +269 -0
  333. package/dist/tui-core/style.js.map +1 -0
  334. package/dist/tui-core/terminal-writer.d.ts.map +1 -1
  335. package/dist/tui-core/terminal-writer.js +16 -3
  336. package/dist/tui-core/terminal-writer.js.map +1 -1
  337. package/dist/tui-ui/inline-surface.d.ts +185 -0
  338. package/dist/tui-ui/inline-surface.d.ts.map +1 -0
  339. package/dist/tui-ui/inline-surface.js +615 -0
  340. package/dist/tui-ui/inline-surface.js.map +1 -0
  341. package/dist/tui-ui/launch.d.ts +1 -0
  342. package/dist/tui-ui/launch.d.ts.map +1 -1
  343. package/dist/tui-ui/launch.js +398 -69
  344. package/dist/tui-ui/launch.js.map +1 -1
  345. package/dist/tui-ui/layout.d.ts +51 -2
  346. package/dist/tui-ui/layout.d.ts.map +1 -1
  347. package/dist/tui-ui/layout.js +240 -77
  348. package/dist/tui-ui/layout.js.map +1 -1
  349. package/dist/tui-ui/render-scheduler.d.ts +37 -0
  350. package/dist/tui-ui/render-scheduler.d.ts.map +1 -0
  351. package/dist/tui-ui/render-scheduler.js +118 -0
  352. package/dist/tui-ui/render-scheduler.js.map +1 -0
  353. package/dist/tui-ui/runner.d.ts +78 -5
  354. package/dist/tui-ui/runner.d.ts.map +1 -1
  355. package/dist/tui-ui/runner.js +317 -22
  356. package/dist/tui-ui/runner.js.map +1 -1
  357. package/dist/tui-ui/state.d.ts +38 -7
  358. package/dist/tui-ui/state.d.ts.map +1 -1
  359. package/dist/tui-ui/state.js +199 -40
  360. package/dist/tui-ui/state.js.map +1 -1
  361. package/dist/tui-ui/theme.d.ts +13 -0
  362. package/dist/tui-ui/theme.d.ts.map +1 -0
  363. package/dist/tui-ui/theme.js +20 -0
  364. package/dist/tui-ui/theme.js.map +1 -0
  365. package/dist/tui-ui/transcript-cache.d.ts +35 -0
  366. package/dist/tui-ui/transcript-cache.d.ts.map +1 -0
  367. package/dist/tui-ui/transcript-cache.js +74 -0
  368. package/dist/tui-ui/transcript-cache.js.map +1 -0
  369. package/dist/tui-ui/transcript-layout.d.ts +21 -0
  370. package/dist/tui-ui/transcript-layout.d.ts.map +1 -0
  371. package/dist/tui-ui/transcript-layout.js +398 -0
  372. package/dist/tui-ui/transcript-layout.js.map +1 -0
  373. package/dist/ui/box.d.ts.map +1 -1
  374. package/dist/ui/box.js +0 -11
  375. package/dist/ui/box.js.map +1 -1
  376. package/dist/ui/command-panel.d.ts.map +1 -1
  377. package/dist/ui/command-panel.js +1 -3
  378. package/dist/ui/command-panel.js.map +1 -1
  379. package/dist/ui/file-completion.js +1 -1
  380. package/dist/ui/file-completion.js.map +1 -1
  381. package/dist/ui/markdown.d.ts.map +1 -1
  382. package/dist/ui/markdown.js +1 -2
  383. package/dist/ui/markdown.js.map +1 -1
  384. package/dist/ui/multiline-input.d.ts.map +1 -1
  385. package/dist/ui/multiline-input.js +1 -2
  386. package/dist/ui/multiline-input.js.map +1 -1
  387. package/dist/ui/progress.d.ts.map +1 -1
  388. package/dist/ui/progress.js +0 -3
  389. package/dist/ui/progress.js.map +1 -1
  390. package/dist/ui/status-bar.d.ts +1 -1
  391. package/dist/ui/status-bar.d.ts.map +1 -1
  392. package/dist/ui/status-bar.js +2 -16
  393. package/dist/ui/status-bar.js.map +1 -1
  394. package/dist/ui/stream-markdown.d.ts +3 -0
  395. package/dist/ui/stream-markdown.d.ts.map +1 -1
  396. package/dist/ui/stream-markdown.js +0 -6
  397. package/dist/ui/stream-markdown.js.map +1 -1
  398. package/dist/ui/tool-preview.d.ts.map +1 -1
  399. package/dist/ui/tool-preview.js +0 -1
  400. package/dist/ui/tool-preview.js.map +1 -1
  401. package/dist/ui-v2/components/shell.d.ts.map +1 -1
  402. package/dist/ui-v2/components/shell.js +0 -8
  403. package/dist/ui-v2/components/shell.js.map +1 -1
  404. package/package.json +1 -1
  405. package/dist/cli-dbg.js +0 -717
  406. package/dist/cli-debug.d.ts +0 -7
  407. package/dist/cli-debug.d.ts.map +0 -1
  408. package/dist/cli-debug.js +0 -717
  409. package/dist/cli-debug.js.map +0 -1
  410. package/dist/cli-debug2.d.ts +0 -7
  411. package/dist/cli-debug2.d.ts.map +0 -1
  412. package/dist/cli-debug2.js +0 -717
  413. package/dist/cli-debug2.js.map +0 -1
  414. package/dist/cli-debug3.d.ts +0 -7
  415. package/dist/cli-debug3.d.ts.map +0 -1
  416. package/dist/cli-debug3.js +0 -719
  417. package/dist/cli-debug3.js.map +0 -1
  418. package/dist/cli-ink.d.ts +0 -8
  419. package/dist/cli-ink.d.ts.map +0 -1
  420. package/dist/cli-ink.js +0 -32
  421. package/dist/cli-ink.js.map +0 -1
  422. package/dist/cli-patch.js +0 -716
  423. package/dist/cli-test.js +0 -726
@@ -0,0 +1,615 @@
1
+ "use strict";
2
+ /**
3
+ * InlineTerminalSurface: primary-screen inline TUI surface.
4
+ *
5
+ * Replaces the alternate-screen (1049) approach. Finalized transcript
6
+ * content is committed once to stdout (entering shell native scrollback),
7
+ * while the bottom live region holds only ephemeral content (streaming
8
+ * assistant, running tools, overlay, status, prompt).
9
+ *
10
+ * Control sequences used (relative addressing only):
11
+ * CR \r return to column 0
12
+ * EL2 \x1b[2K erase current line
13
+ * CUU(n) \x1b[<n>A cursor up (relative)
14
+ * CUD(n) \x1b[<n>B cursor down (relative)
15
+ * CUF(n) \x1b[<n>C cursor forward (relative)
16
+ * SGR0 \x1b[0m reset style
17
+ * DECTCEM \x1b[?25l/?25h hide/show cursor
18
+ * DECAWM \x1b[?7l/?7h disable/enable autowrap (paint batch)
19
+ *
20
+ * Forbidden (never emitted):
21
+ * \x1b[?1049h / \x1b[?1049l (alternate screen)
22
+ * CSI row;col H / f (absolute cursor positioning)
23
+ * CSI 2J (full screen clear)
24
+ * mouse reporting, OSC52, OSC8
25
+ *
26
+ * All operations are serialized via an internal FIFO queue so commit,
27
+ * renderLive, resize, suspend, and unmount never interleave on the same stream.
28
+ */
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.MemoryOutput = exports.InlineTerminalSurface = void 0;
31
+ const frame_1 = require("../tui-core/frame");
32
+ const style_1 = require("../tui-core/style");
33
+ const CR = '\r';
34
+ const EL2 = '\x1b[2K';
35
+ const ENABLE_BRACKETED_PASTE = '\x1b[?2004h';
36
+ const DISABLE_BRACKETED_PASTE = '\x1b[?2004l';
37
+ const SHOW_CURSOR = '\x1b[?25h';
38
+ const HIDE_CURSOR = '\x1b[?25l';
39
+ const DISABLE_AUTOWRAP = '\x1b[?7l';
40
+ const ENABLE_AUTOWRAP = '\x1b[?7h';
41
+ /** Fraction of the terminal height occupied by the bottom live band. */
42
+ const LIVE_BAND_RATIO = 0.75;
43
+ function cursorUp(n) {
44
+ return n > 0 ? `\x1b[${n}A` : '';
45
+ }
46
+ function cursorDown(n) {
47
+ return n > 0 ? `\x1b[${n}B` : '';
48
+ }
49
+ class InlineTerminalSurface {
50
+ constructor(options) {
51
+ this.phase = 'idle';
52
+ this.width = 0;
53
+ this.height = 0;
54
+ /** Height of the bottom live band (status + prompt + live tail). */
55
+ this.liveBandRows = 0;
56
+ this.liveRegionCapacity = 0;
57
+ this.cursorRow = 0;
58
+ this.cursorColumn = 0;
59
+ this.previousFrame = null;
60
+ /** Suppress stale-width live paints between SIGWINCH and the resize repaint. */
61
+ this.resizePending = false;
62
+ this.pendingResizeWidth = null;
63
+ this.resizeGeneration = 0;
64
+ this.resizeWaiters = [];
65
+ /** Serialized FIFO queue of pending operations. */
66
+ this.queue = [];
67
+ this.processing = false;
68
+ this.output = options.output;
69
+ this.now = options.now ?? (() => Date.now());
70
+ this.suppressColor = (0, style_1.shouldSuppressColor)();
71
+ }
72
+ /** Compute the live band height (~75% of screen, min 8, max height-1). */
73
+ static computeBandRows(height) {
74
+ const h = Math.max(1, Math.floor(height));
75
+ const minBand = 8;
76
+ const maxBand = Math.max(minBand, h - 1); // leave >=1 history row when possible
77
+ const desired = Math.round(h * LIVE_BAND_RATIO);
78
+ return Math.max(minBand, Math.min(maxBand, desired));
79
+ }
80
+ /** Live band height for the runner to size its live frame. */
81
+ getLiveBandRows() {
82
+ return this.liveBandRows;
83
+ }
84
+ /** History area rows above the band (recently scrolled committed lines). */
85
+ get historyAreaRows() {
86
+ return Math.max(0, this.height - this.liveBandRows);
87
+ }
88
+ getState() {
89
+ return {
90
+ phase: this.phase,
91
+ width: this.width,
92
+ height: this.height,
93
+ liveBandRows: this.liveBandRows,
94
+ liveRegionCapacity: this.liveRegionCapacity,
95
+ cursorRow: this.cursorRow,
96
+ cursorColumn: this.cursorColumn,
97
+ previousFrame: this.previousFrame,
98
+ };
99
+ }
100
+ /** Mark the terminal as resizing before the debounced layout pass runs. */
101
+ beginResize(width = this.width) {
102
+ this.resizeGeneration += 1;
103
+ this.resizePending = true;
104
+ this.pendingResizeWidth = Math.max(1, Math.floor(width));
105
+ return this.resizeGeneration;
106
+ }
107
+ /**
108
+ * Await completion of all queued operations.
109
+ * Because the queue is strictly FIFO, enqueueing a no-op and awaiting it
110
+ * guarantees every operation enqueued before this call has finished. Used by
111
+ * tests to deterministically observe the terminal after a burst of renders.
112
+ */
113
+ whenIdle() {
114
+ return this.enqueue(async () => { });
115
+ }
116
+ /** Safe content width: never write the last column (avoid pending-wrap). */
117
+ get safeContentWidth() {
118
+ return Math.max(1, this.width - 1);
119
+ }
120
+ /** Enqueue an operation; FIFO guarantees no interleaving. */
121
+ enqueue(op) {
122
+ return new Promise((resolve, reject) => {
123
+ this.queue.push(async () => {
124
+ try {
125
+ await op();
126
+ resolve();
127
+ }
128
+ catch (err) {
129
+ this.phase = 'failed';
130
+ reject(err);
131
+ }
132
+ });
133
+ this.drainQueue();
134
+ });
135
+ }
136
+ async drainQueue() {
137
+ if (this.processing)
138
+ return;
139
+ this.processing = true;
140
+ while (this.queue.length > 0) {
141
+ const op = this.queue.shift();
142
+ await op();
143
+ }
144
+ this.processing = false;
145
+ // Re-check in case an enqueue happened during the last op's async yield.
146
+ if (this.queue.length > 0) {
147
+ void this.drainQueue();
148
+ }
149
+ }
150
+ /** Mount: enable bracketed paste + hide cursor. NO alternate screen. */
151
+ async mount(width, height) {
152
+ await this.enqueue(async () => {
153
+ if (this.phase !== 'idle')
154
+ return;
155
+ this.width = Math.max(1, Math.floor(width));
156
+ this.height = Math.max(1, Math.floor(height));
157
+ this.liveBandRows = InlineTerminalSurface.computeBandRows(this.height);
158
+ this.phase = 'mounted';
159
+ this.liveRegionCapacity = 0;
160
+ this.cursorRow = 0;
161
+ this.cursorColumn = 0;
162
+ await this.writeRaw(`${ENABLE_BRACKETED_PASTE}${HIDE_CURSOR}`);
163
+ });
164
+ }
165
+ /**
166
+ * Commit finalized transcript entries to native scrollback.
167
+ *
168
+ * Protocol:
169
+ * 1. Erase only the live rows owned by this surface and return to their top.
170
+ * 2. Release that block and write finalized rows as ordinary line-oriented
171
+ * shell output. The terminal decides when those lines enter scrollback.
172
+ * 3. Allocate a fresh live block from the resulting cursor and repaint the
173
+ * latest live frame below the committed output.
174
+ */
175
+ async commit(batch, getLatestLiveFrame) {
176
+ let output = '';
177
+ for (;;) {
178
+ let retryAfterResize = false;
179
+ await this.enqueue(async () => {
180
+ if (this.resizePending) {
181
+ retryAfterResize = true;
182
+ return;
183
+ }
184
+ // Committed output behaves like ordinary shell output. Keeping
185
+ // autowrap enabled preserves an already-queued old-width batch if the
186
+ // terminal changes size immediately before this operation executes.
187
+ const chunks = [this.clearOwnedLiveRegion(), ENABLE_AUTOWRAP];
188
+ this.releaseLiveRegion();
189
+ for (const entry of batch.entries) {
190
+ for (const row of entry.rows) {
191
+ chunks.push(CR);
192
+ for (const [index, span] of row.entries()) {
193
+ if (index > 0)
194
+ chunks.push(style_1.SGR_RESET);
195
+ if (span.style) {
196
+ const sgr = (0, style_1.encodeStyleToSgr)(span.style, this.suppressColor);
197
+ if (sgr)
198
+ chunks.push(sgr);
199
+ }
200
+ chunks.push(span.text);
201
+ }
202
+ chunks.push(style_1.SGR_RESET);
203
+ chunks.push('\n');
204
+ }
205
+ }
206
+ const liveFrame = getLatestLiveFrame();
207
+ if (liveFrame) {
208
+ chunks.push(this.renderLiveInternal(liveFrame));
209
+ }
210
+ output = chunks.join('');
211
+ await this.writeRaw(output);
212
+ });
213
+ if (!retryAfterResize)
214
+ break;
215
+ await this.waitForResizeCompletion();
216
+ }
217
+ return { output, committedEntries: batch.entries.length };
218
+ }
219
+ /** Render the live region frame (relative addressing, changed-row diff). */
220
+ async renderLive(frame) {
221
+ let output = '';
222
+ const requestedDuringResize = this.resizePending;
223
+ await this.enqueue(async () => {
224
+ if (requestedDuringResize || this.resizePending)
225
+ return;
226
+ output = this.renderLiveInternal(frame);
227
+ await this.writeRaw(output);
228
+ });
229
+ return output;
230
+ }
231
+ renderLiveInternal(frame) {
232
+ const chunks = [];
233
+ const requiredRows = Math.min(frame.height, Math.max(1, this.liveBandRows));
234
+ // Allocate or resize the cursor-owned live block from the current cursor.
235
+ chunks.push(this.ensureCapacity(requiredRows));
236
+ // Disable autowrap while painting band rows: a row that fills the last
237
+ // column (e.g. the full-width prompt border ┌─...─┐) would otherwise leave
238
+ // the terminal in a pending-wrap state that corrupts the next row's
239
+ // repaint. Re-enabled at the end of the batch.
240
+ chunks.push(DISABLE_AUTOWRAP);
241
+ const capacity = this.liveRegionCapacity;
242
+ const prev = this.previousFrame;
243
+ let row = this.cursorRow;
244
+ // Only diff when the previous frame shares the same geometry (height and
245
+ // capacity). Any geometry change (resize, first frame) triggers a full
246
+ // repaint so we never leave stale rows behind.
247
+ const canDiff = prev !== null && prev.height === capacity && frame.height === capacity;
248
+ if (!canDiff) {
249
+ // Full repaint: move to band top, clear every band row, then write every
250
+ // frame row. Track the real cursor row in `row` so the final positioning
251
+ // block below is exact.
252
+ chunks.push(cursorUp(row));
253
+ for (let i = 0; i < capacity; i++) {
254
+ chunks.push(CR, EL2);
255
+ if (i < capacity - 1) {
256
+ chunks.push(cursorDown(1));
257
+ row += 1;
258
+ }
259
+ }
260
+ chunks.push(cursorUp(capacity - 1));
261
+ row = 0;
262
+ const frameRows = Math.min(frame.height, capacity);
263
+ for (let r = 0; r < frameRows; r++) {
264
+ chunks.push(...this.renderRowChunks(frame.rows[r] ?? []));
265
+ if (r < frameRows - 1) {
266
+ chunks.push(CR, cursorDown(1));
267
+ row += 1;
268
+ }
269
+ }
270
+ }
271
+ else {
272
+ // Changed-row diff: only repaint rows whose styled content differs from
273
+ // the previous frame. Navigation moves the real cursor to the changed
274
+ // row, clears it, and redraws — avoiding a full-band flicker on every
275
+ // tick (e.g. while a tool is running and only the status line changes).
276
+ for (let r = 0; r < capacity; r++) {
277
+ const newRow = r < frame.height ? frame.rows[r] : [];
278
+ const oldRow = r < prev.height ? prev.rows[r] : [];
279
+ if (this.renderRowString(newRow) === this.renderRowString(oldRow))
280
+ continue;
281
+ if (r < row) {
282
+ chunks.push(cursorUp(row - r));
283
+ row = r;
284
+ }
285
+ else if (r > row) {
286
+ chunks.push(cursorDown(r - row));
287
+ row = r;
288
+ }
289
+ chunks.push(CR, EL2);
290
+ chunks.push(...this.renderRowChunks(newRow));
291
+ }
292
+ }
293
+ // Position cursor at frame cursor using the precisely-tracked `row`.
294
+ const targetRow = Math.min(frame.cursor.row, this.liveRegionCapacity - 1);
295
+ const targetCol = Math.min(frame.cursor.column, Math.max(0, this.width - 1));
296
+ if (targetRow < row) {
297
+ chunks.push(cursorUp(row - targetRow));
298
+ row = targetRow;
299
+ }
300
+ else if (targetRow > row) {
301
+ chunks.push(cursorDown(targetRow - row));
302
+ row = targetRow;
303
+ }
304
+ chunks.push(CR);
305
+ if (targetCol > 0)
306
+ chunks.push(`\x1b[${targetCol}C`);
307
+ this.cursorRow = row;
308
+ this.cursorColumn = targetCol;
309
+ chunks.push(frame.cursor.visible ? SHOW_CURSOR : HIDE_CURSOR);
310
+ chunks.push(ENABLE_AUTOWRAP);
311
+ this.previousFrame = frame;
312
+ return chunks.join('');
313
+ }
314
+ /** Render a single styled frame row to ANSI chunks (text + SGR + reset). */
315
+ renderRowChunks(row) {
316
+ const chunks = [];
317
+ const spans = (0, frame_1.renderStyledFrameRow)(this.trimDefaultTrailingCells(row));
318
+ let emittedSgr = false;
319
+ for (const [index, span] of spans.entries()) {
320
+ if (index > 0)
321
+ chunks.push(style_1.SGR_RESET);
322
+ const sgr = (0, style_1.encodeStyleToSgr)(span.style, this.suppressColor);
323
+ if (sgr) {
324
+ chunks.push(sgr);
325
+ emittedSgr = true;
326
+ }
327
+ chunks.push(span.text);
328
+ }
329
+ if (emittedSgr || spans.length > 1)
330
+ chunks.push(style_1.SGR_RESET);
331
+ return chunks;
332
+ }
333
+ /** Stable string form of a styled row, used for changed-row comparison. */
334
+ renderRowString(row) {
335
+ return this.renderRowChunks(row).join('');
336
+ }
337
+ trimDefaultTrailingCells(row) {
338
+ let end = row.length;
339
+ while (end > 0) {
340
+ const cell = row[end - 1];
341
+ if (cell.char !== ' ' || (0, style_1.styleKey)(cell.style) !== '')
342
+ break;
343
+ end -= 1;
344
+ }
345
+ return row.slice(0, end);
346
+ }
347
+ renderedRowWidth(row) {
348
+ return this.trimDefaultTrailingCells(row)
349
+ .reduce((total, cell) => total + cell.width, 0);
350
+ }
351
+ /**
352
+ * Ensure the surface owns exactly `requiredRows` rows starting at the current
353
+ * cursor. Allocation uses ordinary newlines, so existing shell output is
354
+ * preserved and may naturally move into terminal scrollback.
355
+ */
356
+ ensureCapacity(requiredRows) {
357
+ const target = Math.min(requiredRows, Math.max(1, this.liveBandRows));
358
+ const chunks = [];
359
+ if (this.liveRegionCapacity !== target) {
360
+ if (this.liveRegionCapacity > 0) {
361
+ chunks.push(this.clearLiveRegion());
362
+ this.releaseLiveRegion();
363
+ }
364
+ chunks.push(CR);
365
+ for (let i = 1; i < target; i++)
366
+ chunks.push('\n');
367
+ chunks.push(cursorUp(target - 1), CR);
368
+ this.liveRegionCapacity = target;
369
+ this.cursorRow = 0;
370
+ this.cursorColumn = 0;
371
+ this.previousFrame = null;
372
+ }
373
+ return chunks.join('');
374
+ }
375
+ /** Clear the live band rows (relative, no absolute addressing). */
376
+ clearLiveRegion() {
377
+ if (this.liveRegionCapacity === 0)
378
+ return '';
379
+ const chunks = [];
380
+ chunks.push(cursorUp(this.cursorRow));
381
+ for (let i = 0; i < this.liveRegionCapacity; i++) {
382
+ chunks.push(CR, EL2);
383
+ if (i < this.liveRegionCapacity - 1)
384
+ chunks.push(cursorDown(1));
385
+ }
386
+ chunks.push(cursorUp(this.liveRegionCapacity - 1));
387
+ this.cursorRow = 0;
388
+ this.cursorColumn = 0;
389
+ return chunks.join('');
390
+ }
391
+ /**
392
+ * Clear the old live block after the terminal has already adopted a new
393
+ * width. A previously full row can occupy multiple physical rows after
394
+ * reflow, so tracked logical rows are not sufficient during resize.
395
+ */
396
+ clearReflowedLiveRegion(nextWidth) {
397
+ if (this.liveRegionCapacity === 0)
398
+ return '';
399
+ if (!this.previousFrame)
400
+ return this.clearLiveRegion();
401
+ const physicalWidth = Math.max(1, Math.floor(nextWidth));
402
+ const frame = this.previousFrame;
403
+ const rowPhysicalHeights = Array.from({ length: this.liveRegionCapacity }, (_, row) => {
404
+ const cells = frame.rows[row] ?? [];
405
+ const writtenWidth = this.renderedRowWidth(cells);
406
+ return Math.max(1, Math.ceil(Math.max(1, writtenWidth) / physicalWidth));
407
+ });
408
+ const logicalCursorRow = Math.min(this.cursorRow, rowPhysicalHeights.length - 1);
409
+ const cursorPhysicalRow = rowPhysicalHeights
410
+ .slice(0, logicalCursorRow)
411
+ .reduce((total, rows) => total + rows, 0)
412
+ + Math.floor(Math.max(0, this.cursorColumn) / physicalWidth);
413
+ const physicalRows = rowPhysicalHeights.reduce((total, rows) => total + rows, 0);
414
+ const chunks = [cursorUp(cursorPhysicalRow)];
415
+ for (let row = 0; row < physicalRows; row += 1) {
416
+ chunks.push(CR, EL2);
417
+ if (row < physicalRows - 1)
418
+ chunks.push(cursorDown(1));
419
+ }
420
+ chunks.push(cursorUp(physicalRows - 1));
421
+ this.cursorRow = 0;
422
+ this.cursorColumn = 0;
423
+ return chunks.join('');
424
+ }
425
+ clearOwnedLiveRegion() {
426
+ return this.resizePending && this.pendingResizeWidth !== null
427
+ ? this.clearReflowedLiveRegion(this.pendingResizeWidth)
428
+ : this.clearLiveRegion();
429
+ }
430
+ waitForResizeCompletion() {
431
+ if (!this.resizePending)
432
+ return Promise.resolve();
433
+ return new Promise(resolve => this.resizeWaiters.push(resolve));
434
+ }
435
+ completeResize() {
436
+ this.resizePending = false;
437
+ this.pendingResizeWidth = null;
438
+ const waiters = this.resizeWaiters.splice(0);
439
+ for (const resolve of waiters)
440
+ resolve();
441
+ }
442
+ releaseLiveRegion() {
443
+ this.liveRegionCapacity = 0;
444
+ this.cursorRow = 0;
445
+ this.cursorColumn = 0;
446
+ this.previousFrame = null;
447
+ }
448
+ /** Resize: erase only the owned block, then rebuild from the current cursor. */
449
+ async resize(width, height, getLatestLiveFrame, generation = this.resizePending ? this.resizeGeneration : this.beginResize(width)) {
450
+ await this.enqueue(async () => {
451
+ if (generation !== this.resizeGeneration)
452
+ return;
453
+ const chunks = [this.clearReflowedLiveRegion(width)];
454
+ this.releaseLiveRegion();
455
+ this.width = Math.max(1, Math.floor(width));
456
+ this.height = Math.max(1, Math.floor(height));
457
+ this.liveBandRows = InlineTerminalSurface.computeBandRows(this.height);
458
+ const liveFrame = getLatestLiveFrame();
459
+ if (liveFrame) {
460
+ chunks.push(this.renderLiveInternal(liveFrame));
461
+ }
462
+ await this.writeRaw(chunks.join(''));
463
+ if (generation === this.resizeGeneration)
464
+ this.completeResize();
465
+ });
466
+ }
467
+ /** Suspend for child process: clear live region, disable bracketed paste, show cursor. */
468
+ async suspend() {
469
+ await this.enqueue(async () => {
470
+ if (this.phase !== 'mounted')
471
+ return;
472
+ await this.writeRaw(`${this.clearOwnedLiveRegion()}${style_1.SGR_RESET}${SHOW_CURSOR}${DISABLE_BRACKETED_PASTE}${ENABLE_AUTOWRAP}`);
473
+ this.phase = 'suspended';
474
+ this.releaseLiveRegion();
475
+ this.completeResize();
476
+ });
477
+ }
478
+ /** Restore after child process: re-enable bracketed paste, rebuild live frame. */
479
+ async restore(getLatestLiveFrame) {
480
+ await this.enqueue(async () => {
481
+ if (this.phase !== 'suspended')
482
+ return;
483
+ this.phase = 'mounted';
484
+ const chunks = [`${ENABLE_BRACKETED_PASTE}${HIDE_CURSOR}`];
485
+ const liveFrame = getLatestLiveFrame();
486
+ if (liveFrame) {
487
+ chunks.push(this.renderLiveInternal(liveFrame));
488
+ }
489
+ await this.writeRaw(chunks.join(''));
490
+ });
491
+ }
492
+ /** Unmount: clear live region, restore terminal state. Does NOT erase scrollback. */
493
+ async unmount() {
494
+ await this.enqueue(async () => {
495
+ if (this.phase === 'unmounted')
496
+ return;
497
+ await this.writeRaw(`${this.clearOwnedLiveRegion()}${style_1.SGR_RESET}${SHOW_CURSOR}${DISABLE_BRACKETED_PASTE}${ENABLE_AUTOWRAP}\n`);
498
+ this.phase = 'unmounted';
499
+ this.releaseLiveRegion();
500
+ this.completeResize();
501
+ });
502
+ }
503
+ /** Flush: wait for queue to drain. Yields to I/O between checks. */
504
+ async flush() {
505
+ while (this.processing || this.queue.length > 0) {
506
+ await new Promise(resolve => setTimeout(resolve, 0));
507
+ }
508
+ }
509
+ async writeRaw(chunk) {
510
+ if (!chunk)
511
+ return;
512
+ if (this.output.writable === false) {
513
+ throw new Error('terminal output is not writable');
514
+ }
515
+ let accepted;
516
+ try {
517
+ accepted = this.output.write(chunk);
518
+ }
519
+ catch (error) {
520
+ throw error instanceof Error ? error : new Error(String(error));
521
+ }
522
+ // Node streams return a boolean. A few compatible/test streams return
523
+ // void; only an explicit false means backpressure.
524
+ if (accepted !== false)
525
+ return;
526
+ await new Promise((resolve, reject) => {
527
+ let settled = false;
528
+ const cleanup = () => {
529
+ this.output.off('drain', onDrain);
530
+ this.output.off('error', onError);
531
+ this.output.off('close', onClose);
532
+ };
533
+ const settle = (error) => {
534
+ if (settled)
535
+ return;
536
+ settled = true;
537
+ cleanup();
538
+ if (error)
539
+ reject(error);
540
+ else
541
+ resolve();
542
+ };
543
+ const onDrain = () => {
544
+ if (this.output.writable === false) {
545
+ settle(new Error('terminal output closed before drain'));
546
+ return;
547
+ }
548
+ settle();
549
+ };
550
+ const onError = (error) => {
551
+ settle(error instanceof Error ? error : new Error(String(error ?? 'terminal output error')));
552
+ };
553
+ const onClose = () => settle(new Error('terminal output closed before drain'));
554
+ this.output.on('drain', onDrain);
555
+ this.output.on('error', onError);
556
+ this.output.on('close', onClose);
557
+ });
558
+ }
559
+ /** Reset for tests. */
560
+ reset() {
561
+ this.phase = 'idle';
562
+ this.liveBandRows = 0;
563
+ this.liveRegionCapacity = 0;
564
+ this.cursorRow = 0;
565
+ this.cursorColumn = 0;
566
+ this.previousFrame = null;
567
+ this.completeResize();
568
+ this.resizeGeneration = 0;
569
+ this.queue = [];
570
+ this.processing = false;
571
+ }
572
+ }
573
+ exports.InlineTerminalSurface = InlineTerminalSurface;
574
+ // ============================================================================
575
+ // MemoryOutput: test double for surface tests
576
+ // ============================================================================
577
+ class MemoryOutput {
578
+ constructor() {
579
+ this.chunks = [];
580
+ this.writable = true;
581
+ this.drainListeners = [];
582
+ }
583
+ write(chunk) {
584
+ this.chunks.push(typeof chunk === 'string' ? chunk : Buffer.from(chunk).toString('utf8'));
585
+ return true;
586
+ }
587
+ on(event, listener) {
588
+ if (event === 'drain')
589
+ this.drainListeners.push(listener);
590
+ return this;
591
+ }
592
+ off(event, listener) {
593
+ if (event === 'drain') {
594
+ this.drainListeners = this.drainListeners.filter(l => l !== listener);
595
+ }
596
+ return this;
597
+ }
598
+ text() {
599
+ return this.chunks.join('');
600
+ }
601
+ /** Assert output never contains forbidden sequences. */
602
+ assertNoForbidden() {
603
+ const text = this.text();
604
+ if (text.includes('\x1b[?1049h'))
605
+ throw new Error('output contains alternate-screen enter');
606
+ if (text.includes('\x1b[?1049l'))
607
+ throw new Error('output contains alternate-screen exit');
608
+ if (/\x1b\[\d+;\d+H/.test(text))
609
+ throw new Error('output contains absolute cursor positioning');
610
+ if (text.includes('\x1b[2J'))
611
+ throw new Error('output contains full-screen clear');
612
+ }
613
+ }
614
+ exports.MemoryOutput = MemoryOutput;
615
+ //# sourceMappingURL=inline-surface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-surface.js","sourceRoot":"","sources":["../../src/tui-ui/inline-surface.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;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GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5F,IAAI,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3F,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QAChG,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACrF,CAAC;CACF;AAlCD,oCAkCC"}
@@ -4,4 +4,5 @@ export interface TuiLaunchOptions {
4
4
  output?: NodeJS.WriteStream;
5
5
  }
6
6
  export declare function launchTuiUI(runtime: OpenHorseUiRuntime, options?: TuiLaunchOptions): Promise<void>;
7
+ export declare function statusSnapshotString(rt: OpenHorseUiRuntime): string;
7
8
  //# sourceMappingURL=launch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../src/tui-ui/launch.ts"],"names":[],"mappings":"AACA,OAAO,EAAiC,KAAK,kBAAkB,EAA6B,MAAM,sBAAsB,CAAC;AAUzH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC;CAC7B;AAED,wBAAsB,WAAW,CAC/B,OAAO,EAAE,kBAAkB,EAC3B,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CA4Kf"}
1
+ {"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../src/tui-ui/launch.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,kBAAkB,EAGxB,MAAM,sBAAsB,CAAC;AAS9B,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC;CAC7B;AAED,wBAAsB,WAAW,CAC/B,OAAO,EAAE,kBAAkB,EAC3B,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CA4bf;AAyDD,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,kBAAkB,GAAG,MAAM,CAenE"}