@yjjeong/omg 0.1.0

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 (702) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/LICENSE +21 -0
  3. package/README.md +153 -0
  4. package/dist/cli/args.d.ts +39 -0
  5. package/dist/cli/args.d.ts.map +1 -0
  6. package/dist/cli/args.js +129 -0
  7. package/dist/cli/args.js.map +1 -0
  8. package/dist/cli/autoCommit.d.ts +20 -0
  9. package/dist/cli/autoCommit.d.ts.map +1 -0
  10. package/dist/cli/autoCommit.js +121 -0
  11. package/dist/cli/autoCommit.js.map +1 -0
  12. package/dist/cli/bgTasks.d.ts +57 -0
  13. package/dist/cli/bgTasks.d.ts.map +1 -0
  14. package/dist/cli/bgTasks.js +193 -0
  15. package/dist/cli/bgTasks.js.map +1 -0
  16. package/dist/cli/compactor.d.ts +48 -0
  17. package/dist/cli/compactor.d.ts.map +1 -0
  18. package/dist/cli/compactor.js +73 -0
  19. package/dist/cli/compactor.js.map +1 -0
  20. package/dist/cli/doctor.d.ts +77 -0
  21. package/dist/cli/doctor.d.ts.map +1 -0
  22. package/dist/cli/doctor.js +279 -0
  23. package/dist/cli/doctor.js.map +1 -0
  24. package/dist/cli/gitStatus.d.ts +7 -0
  25. package/dist/cli/gitStatus.d.ts.map +1 -0
  26. package/dist/cli/gitStatus.js +70 -0
  27. package/dist/cli/gitStatus.js.map +1 -0
  28. package/dist/cli/handoff.d.ts +36 -0
  29. package/dist/cli/handoff.d.ts.map +1 -0
  30. package/dist/cli/handoff.js +60 -0
  31. package/dist/cli/handoff.js.map +1 -0
  32. package/dist/cli/interactive/brokers.d.ts +31 -0
  33. package/dist/cli/interactive/brokers.d.ts.map +1 -0
  34. package/dist/cli/interactive/brokers.js +259 -0
  35. package/dist/cli/interactive/brokers.js.map +1 -0
  36. package/dist/cli/interactive/index.d.ts +8 -0
  37. package/dist/cli/interactive/index.d.ts.map +1 -0
  38. package/dist/cli/interactive/index.js +731 -0
  39. package/dist/cli/interactive/index.js.map +1 -0
  40. package/dist/cli/interactive/proxyQuestions.d.ts +15 -0
  41. package/dist/cli/interactive/proxyQuestions.d.ts.map +1 -0
  42. package/dist/cli/interactive/proxyQuestions.js +48 -0
  43. package/dist/cli/interactive/proxyQuestions.js.map +1 -0
  44. package/dist/cli/interactive/tabManager.d.ts +32 -0
  45. package/dist/cli/interactive/tabManager.d.ts.map +1 -0
  46. package/dist/cli/interactive/tabManager.js +244 -0
  47. package/dist/cli/interactive/tabManager.js.map +1 -0
  48. package/dist/cli/interactive/teamHint.d.ts +2 -0
  49. package/dist/cli/interactive/teamHint.d.ts.map +1 -0
  50. package/dist/cli/interactive/teamHint.js +14 -0
  51. package/dist/cli/interactive/teamHint.js.map +1 -0
  52. package/dist/cli/login.d.ts +13 -0
  53. package/dist/cli/login.d.ts.map +1 -0
  54. package/dist/cli/login.js +53 -0
  55. package/dist/cli/login.js.map +1 -0
  56. package/dist/cli/modes/demo.d.ts +12 -0
  57. package/dist/cli/modes/demo.d.ts.map +1 -0
  58. package/dist/cli/modes/demo.js +48 -0
  59. package/dist/cli/modes/demo.js.map +1 -0
  60. package/dist/cli/modes/doctor.d.ts +28 -0
  61. package/dist/cli/modes/doctor.d.ts.map +1 -0
  62. package/dist/cli/modes/doctor.js +79 -0
  63. package/dist/cli/modes/doctor.js.map +1 -0
  64. package/dist/cli/modes/login.d.ts +5 -0
  65. package/dist/cli/modes/login.d.ts.map +1 -0
  66. package/dist/cli/modes/login.js +40 -0
  67. package/dist/cli/modes/login.js.map +1 -0
  68. package/dist/cli/modes/mcpServe.d.ts +9 -0
  69. package/dist/cli/modes/mcpServe.d.ts.map +1 -0
  70. package/dist/cli/modes/mcpServe.js +112 -0
  71. package/dist/cli/modes/mcpServe.js.map +1 -0
  72. package/dist/cli/modes/orchestrator.d.ts +14 -0
  73. package/dist/cli/modes/orchestrator.d.ts.map +1 -0
  74. package/dist/cli/modes/orchestrator.js +64 -0
  75. package/dist/cli/modes/orchestrator.js.map +1 -0
  76. package/dist/cli/modes/team.d.ts +14 -0
  77. package/dist/cli/modes/team.d.ts.map +1 -0
  78. package/dist/cli/modes/team.js +87 -0
  79. package/dist/cli/modes/team.js.map +1 -0
  80. package/dist/cli/registry.d.ts +3 -0
  81. package/dist/cli/registry.d.ts.map +1 -0
  82. package/dist/cli/registry.js +15 -0
  83. package/dist/cli/registry.js.map +1 -0
  84. package/dist/cli/slash/core.d.ts +3 -0
  85. package/dist/cli/slash/core.d.ts.map +1 -0
  86. package/dist/cli/slash/core.js +509 -0
  87. package/dist/cli/slash/core.js.map +1 -0
  88. package/dist/cli/slash/index.d.ts +3 -0
  89. package/dist/cli/slash/index.d.ts.map +1 -0
  90. package/dist/cli/slash/index.js +28 -0
  91. package/dist/cli/slash/index.js.map +1 -0
  92. package/dist/cli/slash/modes.d.ts +3 -0
  93. package/dist/cli/slash/modes.d.ts.map +1 -0
  94. package/dist/cli/slash/modes.js +530 -0
  95. package/dist/cli/slash/modes.js.map +1 -0
  96. package/dist/cli/slash/session.d.ts +3 -0
  97. package/dist/cli/slash/session.d.ts.map +1 -0
  98. package/dist/cli/slash/session.js +376 -0
  99. package/dist/cli/slash/session.js.map +1 -0
  100. package/dist/cli/slash/shared.d.ts +43 -0
  101. package/dist/cli/slash/shared.d.ts.map +1 -0
  102. package/dist/cli/slash/shared.js +6 -0
  103. package/dist/cli/slash/shared.js.map +1 -0
  104. package/dist/cli/slash/tabs.d.ts +3 -0
  105. package/dist/cli/slash/tabs.d.ts.map +1 -0
  106. package/dist/cli/slash/tabs.js +497 -0
  107. package/dist/cli/slash/tabs.js.map +1 -0
  108. package/dist/cli/slash/team.d.ts +3 -0
  109. package/dist/cli/slash/team.d.ts.map +1 -0
  110. package/dist/cli/slash/team.js +85 -0
  111. package/dist/cli/slash/team.js.map +1 -0
  112. package/dist/cli/slash.d.ts +3 -0
  113. package/dist/cli/slash.d.ts.map +1 -0
  114. package/dist/cli/slash.js +8 -0
  115. package/dist/cli/slash.js.map +1 -0
  116. package/dist/cli/teamPipeline.d.ts +42 -0
  117. package/dist/cli/teamPipeline.d.ts.map +1 -0
  118. package/dist/cli/teamPipeline.js +406 -0
  119. package/dist/cli/teamPipeline.js.map +1 -0
  120. package/dist/cli/touchedFiles.d.ts +14 -0
  121. package/dist/cli/touchedFiles.d.ts.map +1 -0
  122. package/dist/cli/touchedFiles.js +66 -0
  123. package/dist/cli/touchedFiles.js.map +1 -0
  124. package/dist/cli/turn.d.ts +47 -0
  125. package/dist/cli/turn.d.ts.map +1 -0
  126. package/dist/cli/turn.js +626 -0
  127. package/dist/cli/turn.js.map +1 -0
  128. package/dist/cli/types.d.ts +47 -0
  129. package/dist/cli/types.d.ts.map +1 -0
  130. package/dist/cli/types.js +5 -0
  131. package/dist/cli/types.js.map +1 -0
  132. package/dist/cli/uiSession.d.ts +10 -0
  133. package/dist/cli/uiSession.d.ts.map +1 -0
  134. package/dist/cli/uiSession.js +66 -0
  135. package/dist/cli/uiSession.js.map +1 -0
  136. package/dist/cli.d.ts +3 -0
  137. package/dist/cli.d.ts.map +1 -0
  138. package/dist/cli.js +128 -0
  139. package/dist/cli.js.map +1 -0
  140. package/dist/core/adapter.d.ts +47 -0
  141. package/dist/core/adapter.d.ts.map +1 -0
  142. package/dist/core/adapter.js +48 -0
  143. package/dist/core/adapter.js.map +1 -0
  144. package/dist/core/adapters/anthropic.d.ts +35 -0
  145. package/dist/core/adapters/anthropic.d.ts.map +1 -0
  146. package/dist/core/adapters/anthropic.js +203 -0
  147. package/dist/core/adapters/anthropic.js.map +1 -0
  148. package/dist/core/adapters/claudeCli.d.ts +126 -0
  149. package/dist/core/adapters/claudeCli.d.ts.map +1 -0
  150. package/dist/core/adapters/claudeCli.js +584 -0
  151. package/dist/core/adapters/claudeCli.js.map +1 -0
  152. package/dist/core/adapters/cliAdapterBase.d.ts +48 -0
  153. package/dist/core/adapters/cliAdapterBase.d.ts.map +1 -0
  154. package/dist/core/adapters/cliAdapterBase.js +105 -0
  155. package/dist/core/adapters/cliAdapterBase.js.map +1 -0
  156. package/dist/core/adapters/cliStderr.d.ts +35 -0
  157. package/dist/core/adapters/cliStderr.d.ts.map +1 -0
  158. package/dist/core/adapters/cliStderr.js +87 -0
  159. package/dist/core/adapters/cliStderr.js.map +1 -0
  160. package/dist/core/adapters/codexCli.d.ts +113 -0
  161. package/dist/core/adapters/codexCli.d.ts.map +1 -0
  162. package/dist/core/adapters/codexCli.js +424 -0
  163. package/dist/core/adapters/codexCli.js.map +1 -0
  164. package/dist/core/adapters/gemini.d.ts +17 -0
  165. package/dist/core/adapters/gemini.d.ts.map +1 -0
  166. package/dist/core/adapters/gemini.js +133 -0
  167. package/dist/core/adapters/gemini.js.map +1 -0
  168. package/dist/core/adapters/geminiCli.d.ts +91 -0
  169. package/dist/core/adapters/geminiCli.d.ts.map +1 -0
  170. package/dist/core/adapters/geminiCli.js +276 -0
  171. package/dist/core/adapters/geminiCli.js.map +1 -0
  172. package/dist/core/adapters/nudges.d.ts +21 -0
  173. package/dist/core/adapters/nudges.d.ts.map +1 -0
  174. package/dist/core/adapters/nudges.js +75 -0
  175. package/dist/core/adapters/nudges.js.map +1 -0
  176. package/dist/core/adapters/openai.d.ts +17 -0
  177. package/dist/core/adapters/openai.d.ts.map +1 -0
  178. package/dist/core/adapters/openai.js +138 -0
  179. package/dist/core/adapters/openai.js.map +1 -0
  180. package/dist/core/adapters/parseFailures.d.ts +10 -0
  181. package/dist/core/adapters/parseFailures.d.ts.map +1 -0
  182. package/dist/core/adapters/parseFailures.js +35 -0
  183. package/dist/core/adapters/parseFailures.js.map +1 -0
  184. package/dist/core/adapters/utils.d.ts +11 -0
  185. package/dist/core/adapters/utils.d.ts.map +1 -0
  186. package/dist/core/adapters/utils.js +33 -0
  187. package/dist/core/adapters/utils.js.map +1 -0
  188. package/dist/core/askBroker.d.ts +11 -0
  189. package/dist/core/askBroker.d.ts.map +1 -0
  190. package/dist/core/askBroker.js +78 -0
  191. package/dist/core/askBroker.js.map +1 -0
  192. package/dist/core/atomicWrite.d.ts +5 -0
  193. package/dist/core/atomicWrite.d.ts.map +1 -0
  194. package/dist/core/atomicWrite.js +18 -0
  195. package/dist/core/atomicWrite.js.map +1 -0
  196. package/dist/core/brokers/askBroker.d.ts +11 -0
  197. package/dist/core/brokers/askBroker.d.ts.map +1 -0
  198. package/dist/core/brokers/askBroker.js +78 -0
  199. package/dist/core/brokers/askBroker.js.map +1 -0
  200. package/dist/core/brokers/permissionBroker.d.ts +7 -0
  201. package/dist/core/brokers/permissionBroker.d.ts.map +1 -0
  202. package/dist/core/brokers/permissionBroker.js +63 -0
  203. package/dist/core/brokers/permissionBroker.js.map +1 -0
  204. package/dist/core/brokers/socketBroker.d.ts +35 -0
  205. package/dist/core/brokers/socketBroker.d.ts.map +1 -0
  206. package/dist/core/brokers/socketBroker.js +74 -0
  207. package/dist/core/brokers/socketBroker.js.map +1 -0
  208. package/dist/core/clipboard.d.ts +4 -0
  209. package/dist/core/clipboard.d.ts.map +1 -0
  210. package/dist/core/clipboard.js +46 -0
  211. package/dist/core/clipboard.js.map +1 -0
  212. package/dist/core/compactor.d.ts +32 -0
  213. package/dist/core/compactor.d.ts.map +1 -0
  214. package/dist/core/compactor.js +91 -0
  215. package/dist/core/compactor.js.map +1 -0
  216. package/dist/core/consensusEngine.d.ts +21 -0
  217. package/dist/core/consensusEngine.d.ts.map +1 -0
  218. package/dist/core/consensusEngine.js +116 -0
  219. package/dist/core/consensusEngine.js.map +1 -0
  220. package/dist/core/context/contextCompressor.d.ts +10 -0
  221. package/dist/core/context/contextCompressor.d.ts.map +1 -0
  222. package/dist/core/context/contextCompressor.js +54 -0
  223. package/dist/core/context/contextCompressor.js.map +1 -0
  224. package/dist/core/context/contextWindows.d.ts +25 -0
  225. package/dist/core/context/contextWindows.d.ts.map +1 -0
  226. package/dist/core/context/contextWindows.js +101 -0
  227. package/dist/core/context/contextWindows.js.map +1 -0
  228. package/dist/core/context/summarizer.d.ts +65 -0
  229. package/dist/core/context/summarizer.d.ts.map +1 -0
  230. package/dist/core/context/summarizer.js +184 -0
  231. package/dist/core/context/summarizer.js.map +1 -0
  232. package/dist/core/context/usageCache.d.ts +19 -0
  233. package/dist/core/context/usageCache.d.ts.map +1 -0
  234. package/dist/core/context/usageCache.js +157 -0
  235. package/dist/core/context/usageCache.js.map +1 -0
  236. package/dist/core/context/usageWindow.d.ts +19 -0
  237. package/dist/core/context/usageWindow.d.ts.map +1 -0
  238. package/dist/core/context/usageWindow.js +73 -0
  239. package/dist/core/context/usageWindow.js.map +1 -0
  240. package/dist/core/contextCompressor.d.ts +10 -0
  241. package/dist/core/contextCompressor.d.ts.map +1 -0
  242. package/dist/core/contextCompressor.js +54 -0
  243. package/dist/core/contextCompressor.js.map +1 -0
  244. package/dist/core/contextWindows.d.ts +5 -0
  245. package/dist/core/contextWindows.d.ts.map +1 -0
  246. package/dist/core/contextWindows.js +60 -0
  247. package/dist/core/contextWindows.js.map +1 -0
  248. package/dist/core/continuum/digest.d.ts +35 -0
  249. package/dist/core/continuum/digest.d.ts.map +1 -0
  250. package/dist/core/continuum/digest.js +91 -0
  251. package/dist/core/continuum/digest.js.map +1 -0
  252. package/dist/core/continuum/index.d.ts +6 -0
  253. package/dist/core/continuum/index.d.ts.map +1 -0
  254. package/dist/core/continuum/index.js +7 -0
  255. package/dist/core/continuum/index.js.map +1 -0
  256. package/dist/core/continuum/inject.d.ts +9 -0
  257. package/dist/core/continuum/inject.d.ts.map +1 -0
  258. package/dist/core/continuum/inject.js +78 -0
  259. package/dist/core/continuum/inject.js.map +1 -0
  260. package/dist/core/continuum/projectId.d.ts +10 -0
  261. package/dist/core/continuum/projectId.d.ts.map +1 -0
  262. package/dist/core/continuum/projectId.js +60 -0
  263. package/dist/core/continuum/projectId.js.map +1 -0
  264. package/dist/core/continuum/store.d.ts +24 -0
  265. package/dist/core/continuum/store.d.ts.map +1 -0
  266. package/dist/core/continuum/store.js +144 -0
  267. package/dist/core/continuum/store.js.map +1 -0
  268. package/dist/core/continuum/types.d.ts +87 -0
  269. package/dist/core/continuum/types.d.ts.map +1 -0
  270. package/dist/core/continuum/types.js +9 -0
  271. package/dist/core/continuum/types.js.map +1 -0
  272. package/dist/core/dag.d.ts +21 -0
  273. package/dist/core/dag.d.ts.map +1 -0
  274. package/dist/core/dag.js +71 -0
  275. package/dist/core/dag.js.map +1 -0
  276. package/dist/core/director.d.ts +11 -0
  277. package/dist/core/director.d.ts.map +1 -0
  278. package/dist/core/director.js +37 -0
  279. package/dist/core/director.js.map +1 -0
  280. package/dist/core/hookedToolBroker.d.ts +25 -0
  281. package/dist/core/hookedToolBroker.d.ts.map +1 -0
  282. package/dist/core/hookedToolBroker.js +95 -0
  283. package/dist/core/hookedToolBroker.js.map +1 -0
  284. package/dist/core/langHint.d.ts +9 -0
  285. package/dist/core/langHint.d.ts.map +1 -0
  286. package/dist/core/langHint.js +33 -0
  287. package/dist/core/langHint.js.map +1 -0
  288. package/dist/core/mcp/mcpClient.d.ts +42 -0
  289. package/dist/core/mcp/mcpClient.d.ts.map +1 -0
  290. package/dist/core/mcp/mcpClient.js +134 -0
  291. package/dist/core/mcp/mcpClient.js.map +1 -0
  292. package/dist/core/mcp/mcpConfig.d.ts +58 -0
  293. package/dist/core/mcp/mcpConfig.d.ts.map +1 -0
  294. package/dist/core/mcp/mcpConfig.js +148 -0
  295. package/dist/core/mcp/mcpConfig.js.map +1 -0
  296. package/dist/core/mcp/mcpManager.d.ts +31 -0
  297. package/dist/core/mcp/mcpManager.d.ts.map +1 -0
  298. package/dist/core/mcp/mcpManager.js +83 -0
  299. package/dist/core/mcp/mcpManager.js.map +1 -0
  300. package/dist/core/mcpClient.d.ts +42 -0
  301. package/dist/core/mcpClient.d.ts.map +1 -0
  302. package/dist/core/mcpClient.js +134 -0
  303. package/dist/core/mcpClient.js.map +1 -0
  304. package/dist/core/mcpConfig.d.ts +24 -0
  305. package/dist/core/mcpConfig.d.ts.map +1 -0
  306. package/dist/core/mcpConfig.js +74 -0
  307. package/dist/core/mcpConfig.js.map +1 -0
  308. package/dist/core/mcpManager.d.ts +31 -0
  309. package/dist/core/mcpManager.d.ts.map +1 -0
  310. package/dist/core/mcpManager.js +83 -0
  311. package/dist/core/mcpManager.js.map +1 -0
  312. package/dist/core/memory.d.ts +22 -0
  313. package/dist/core/memory.d.ts.map +1 -0
  314. package/dist/core/memory.js +102 -0
  315. package/dist/core/memory.js.map +1 -0
  316. package/dist/core/omgToolManifest.d.ts +34 -0
  317. package/dist/core/omgToolManifest.d.ts.map +1 -0
  318. package/dist/core/omgToolManifest.js +59 -0
  319. package/dist/core/omgToolManifest.js.map +1 -0
  320. package/dist/core/orchestration/consensusEngine.d.ts +21 -0
  321. package/dist/core/orchestration/consensusEngine.d.ts.map +1 -0
  322. package/dist/core/orchestration/consensusEngine.js +116 -0
  323. package/dist/core/orchestration/consensusEngine.js.map +1 -0
  324. package/dist/core/orchestration/dag.d.ts +21 -0
  325. package/dist/core/orchestration/dag.d.ts.map +1 -0
  326. package/dist/core/orchestration/dag.js +71 -0
  327. package/dist/core/orchestration/dag.js.map +1 -0
  328. package/dist/core/orchestration/director.d.ts +11 -0
  329. package/dist/core/orchestration/director.d.ts.map +1 -0
  330. package/dist/core/orchestration/director.js +37 -0
  331. package/dist/core/orchestration/director.js.map +1 -0
  332. package/dist/core/orchestration/orchestrator.d.ts +32 -0
  333. package/dist/core/orchestration/orchestrator.d.ts.map +1 -0
  334. package/dist/core/orchestration/orchestrator.js +214 -0
  335. package/dist/core/orchestration/orchestrator.js.map +1 -0
  336. package/dist/core/orchestration/roleRouter.d.ts +28 -0
  337. package/dist/core/orchestration/roleRouter.d.ts.map +1 -0
  338. package/dist/core/orchestration/roleRouter.js +64 -0
  339. package/dist/core/orchestration/roleRouter.js.map +1 -0
  340. package/dist/core/orchestration/teamRunner.d.ts +69 -0
  341. package/dist/core/orchestration/teamRunner.d.ts.map +1 -0
  342. package/dist/core/orchestration/teamRunner.js +477 -0
  343. package/dist/core/orchestration/teamRunner.js.map +1 -0
  344. package/dist/core/orchestration/types.d.ts +115 -0
  345. package/dist/core/orchestration/types.d.ts.map +1 -0
  346. package/dist/core/orchestration/types.js +71 -0
  347. package/dist/core/orchestration/types.js.map +1 -0
  348. package/dist/core/orchestrator.d.ts +32 -0
  349. package/dist/core/orchestrator.d.ts.map +1 -0
  350. package/dist/core/orchestrator.js +214 -0
  351. package/dist/core/orchestrator.js.map +1 -0
  352. package/dist/core/permissionBroker.d.ts +7 -0
  353. package/dist/core/permissionBroker.d.ts.map +1 -0
  354. package/dist/core/permissionBroker.js +63 -0
  355. package/dist/core/permissionBroker.js.map +1 -0
  356. package/dist/core/planConfig.d.ts +15 -0
  357. package/dist/core/planConfig.d.ts.map +1 -0
  358. package/dist/core/planConfig.js +98 -0
  359. package/dist/core/planConfig.js.map +1 -0
  360. package/dist/core/presetPersistence.d.ts +4 -0
  361. package/dist/core/presetPersistence.d.ts.map +1 -0
  362. package/dist/core/presetPersistence.js +64 -0
  363. package/dist/core/presetPersistence.js.map +1 -0
  364. package/dist/core/roleRouter.d.ts +26 -0
  365. package/dist/core/roleRouter.d.ts.map +1 -0
  366. package/dist/core/roleRouter.js +62 -0
  367. package/dist/core/roleRouter.js.map +1 -0
  368. package/dist/core/sessionList.d.ts +26 -0
  369. package/dist/core/sessionList.d.ts.map +1 -0
  370. package/dist/core/sessionList.js +278 -0
  371. package/dist/core/sessionList.js.map +1 -0
  372. package/dist/core/slugify.d.ts +2 -0
  373. package/dist/core/slugify.d.ts.map +1 -0
  374. package/dist/core/slugify.js +17 -0
  375. package/dist/core/slugify.js.map +1 -0
  376. package/dist/core/socketBroker.d.ts +19 -0
  377. package/dist/core/socketBroker.d.ts.map +1 -0
  378. package/dist/core/socketBroker.js +48 -0
  379. package/dist/core/socketBroker.js.map +1 -0
  380. package/dist/core/state/agentsMdScaffold.d.ts +15 -0
  381. package/dist/core/state/agentsMdScaffold.d.ts.map +1 -0
  382. package/dist/core/state/agentsMdScaffold.js +118 -0
  383. package/dist/core/state/agentsMdScaffold.js.map +1 -0
  384. package/dist/core/state/atomicWrite.d.ts +5 -0
  385. package/dist/core/state/atomicWrite.d.ts.map +1 -0
  386. package/dist/core/state/atomicWrite.js +18 -0
  387. package/dist/core/state/atomicWrite.js.map +1 -0
  388. package/dist/core/state/handoff.d.ts +20 -0
  389. package/dist/core/state/handoff.d.ts.map +1 -0
  390. package/dist/core/state/handoff.js +71 -0
  391. package/dist/core/state/handoff.js.map +1 -0
  392. package/dist/core/state/mcpCatalog.d.ts +11 -0
  393. package/dist/core/state/mcpCatalog.d.ts.map +1 -0
  394. package/dist/core/state/mcpCatalog.js +51 -0
  395. package/dist/core/state/mcpCatalog.js.map +1 -0
  396. package/dist/core/state/mcpRecommendations.d.ts +7 -0
  397. package/dist/core/state/mcpRecommendations.d.ts.map +1 -0
  398. package/dist/core/state/mcpRecommendations.js +57 -0
  399. package/dist/core/state/mcpRecommendations.js.map +1 -0
  400. package/dist/core/state/memory.d.ts +22 -0
  401. package/dist/core/state/memory.d.ts.map +1 -0
  402. package/dist/core/state/memory.js +102 -0
  403. package/dist/core/state/memory.js.map +1 -0
  404. package/dist/core/state/planConfig.d.ts +15 -0
  405. package/dist/core/state/planConfig.d.ts.map +1 -0
  406. package/dist/core/state/planConfig.js +98 -0
  407. package/dist/core/state/planConfig.js.map +1 -0
  408. package/dist/core/state/presetPersistence.d.ts +4 -0
  409. package/dist/core/state/presetPersistence.d.ts.map +1 -0
  410. package/dist/core/state/presetPersistence.js +67 -0
  411. package/dist/core/state/presetPersistence.js.map +1 -0
  412. package/dist/core/state/sessionList.d.ts +26 -0
  413. package/dist/core/state/sessionList.d.ts.map +1 -0
  414. package/dist/core/state/sessionList.js +278 -0
  415. package/dist/core/state/sessionList.js.map +1 -0
  416. package/dist/core/state/stackDetect.d.ts +8 -0
  417. package/dist/core/state/stackDetect.d.ts.map +1 -0
  418. package/dist/core/state/stackDetect.js +40 -0
  419. package/dist/core/state/stackDetect.js.map +1 -0
  420. package/dist/core/state/tabPersistence.d.ts +29 -0
  421. package/dist/core/state/tabPersistence.d.ts.map +1 -0
  422. package/dist/core/state/tabPersistence.js +65 -0
  423. package/dist/core/state/tabPersistence.js.map +1 -0
  424. package/dist/core/tabPersistence.d.ts +29 -0
  425. package/dist/core/tabPersistence.d.ts.map +1 -0
  426. package/dist/core/tabPersistence.js +65 -0
  427. package/dist/core/tabPersistence.js.map +1 -0
  428. package/dist/core/teamRunner.d.ts +42 -0
  429. package/dist/core/teamRunner.d.ts.map +1 -0
  430. package/dist/core/teamRunner.js +248 -0
  431. package/dist/core/teamRunner.js.map +1 -0
  432. package/dist/core/toolGate.d.ts +23 -0
  433. package/dist/core/toolGate.d.ts.map +1 -0
  434. package/dist/core/toolGate.js +51 -0
  435. package/dist/core/toolGate.js.map +1 -0
  436. package/dist/core/toolInterceptor.d.ts +7 -0
  437. package/dist/core/toolInterceptor.d.ts.map +1 -0
  438. package/dist/core/toolInterceptor.js +108 -0
  439. package/dist/core/toolInterceptor.js.map +1 -0
  440. package/dist/core/tools/hookedToolBroker.d.ts +25 -0
  441. package/dist/core/tools/hookedToolBroker.d.ts.map +1 -0
  442. package/dist/core/tools/hookedToolBroker.js +95 -0
  443. package/dist/core/tools/hookedToolBroker.js.map +1 -0
  444. package/dist/core/tools/omgToolManifest.d.ts +42 -0
  445. package/dist/core/tools/omgToolManifest.d.ts.map +1 -0
  446. package/dist/core/tools/omgToolManifest.js +66 -0
  447. package/dist/core/tools/omgToolManifest.js.map +1 -0
  448. package/dist/core/tools/toolGate.d.ts +23 -0
  449. package/dist/core/tools/toolGate.d.ts.map +1 -0
  450. package/dist/core/tools/toolGate.js +51 -0
  451. package/dist/core/tools/toolGate.js.map +1 -0
  452. package/dist/core/tools/toolInterceptor.d.ts +7 -0
  453. package/dist/core/tools/toolInterceptor.d.ts.map +1 -0
  454. package/dist/core/tools/toolInterceptor.js +108 -0
  455. package/dist/core/tools/toolInterceptor.js.map +1 -0
  456. package/dist/core/tools/tools.d.ts +34 -0
  457. package/dist/core/tools/tools.d.ts.map +1 -0
  458. package/dist/core/tools/tools.js +328 -0
  459. package/dist/core/tools/tools.js.map +1 -0
  460. package/dist/core/tools.d.ts +34 -0
  461. package/dist/core/tools.d.ts.map +1 -0
  462. package/dist/core/tools.js +300 -0
  463. package/dist/core/tools.js.map +1 -0
  464. package/dist/core/types.d.ts +107 -0
  465. package/dist/core/types.d.ts.map +1 -0
  466. package/dist/core/types.js +55 -0
  467. package/dist/core/types.js.map +1 -0
  468. package/dist/core/usageCache.d.ts +19 -0
  469. package/dist/core/usageCache.d.ts.map +1 -0
  470. package/dist/core/usageCache.js +157 -0
  471. package/dist/core/usageCache.js.map +1 -0
  472. package/dist/core/usageWindow.d.ts +19 -0
  473. package/dist/core/usageWindow.d.ts.map +1 -0
  474. package/dist/core/usageWindow.js +73 -0
  475. package/dist/core/usageWindow.js.map +1 -0
  476. package/dist/core/util/bgProtocol.d.ts +5 -0
  477. package/dist/core/util/bgProtocol.d.ts.map +1 -0
  478. package/dist/core/util/bgProtocol.js +20 -0
  479. package/dist/core/util/bgProtocol.js.map +1 -0
  480. package/dist/core/util/clipboard.d.ts +4 -0
  481. package/dist/core/util/clipboard.d.ts.map +1 -0
  482. package/dist/core/util/clipboard.js +46 -0
  483. package/dist/core/util/clipboard.js.map +1 -0
  484. package/dist/core/util/clipboardImage.d.ts +3 -0
  485. package/dist/core/util/clipboardImage.d.ts.map +1 -0
  486. package/dist/core/util/clipboardImage.js +58 -0
  487. package/dist/core/util/clipboardImage.js.map +1 -0
  488. package/dist/core/util/langHint.d.ts +9 -0
  489. package/dist/core/util/langHint.d.ts.map +1 -0
  490. package/dist/core/util/langHint.js +33 -0
  491. package/dist/core/util/langHint.js.map +1 -0
  492. package/dist/core/util/slugify.d.ts +2 -0
  493. package/dist/core/util/slugify.d.ts.map +1 -0
  494. package/dist/core/util/slugify.js +28 -0
  495. package/dist/core/util/slugify.js.map +1 -0
  496. package/dist/hooks/hookedToolProxy.mjs +118 -0
  497. package/dist/index.d.ts +2 -0
  498. package/dist/index.d.ts.map +1 -0
  499. package/dist/index.js +8 -0
  500. package/dist/index.js.map +1 -0
  501. package/dist/ipc/dispatcher.d.ts +21 -0
  502. package/dist/ipc/dispatcher.d.ts.map +1 -0
  503. package/dist/ipc/dispatcher.js +160 -0
  504. package/dist/ipc/dispatcher.js.map +1 -0
  505. package/dist/ipc/events.d.ts +33 -0
  506. package/dist/ipc/events.d.ts.map +1 -0
  507. package/dist/ipc/events.js +42 -0
  508. package/dist/ipc/events.js.map +1 -0
  509. package/dist/ipc/rpc.d.ts +31 -0
  510. package/dist/ipc/rpc.d.ts.map +1 -0
  511. package/dist/ipc/rpc.js +110 -0
  512. package/dist/ipc/rpc.js.map +1 -0
  513. package/dist/ipc/stdio.d.ts +11 -0
  514. package/dist/ipc/stdio.d.ts.map +1 -0
  515. package/dist/ipc/stdio.js +52 -0
  516. package/dist/ipc/stdio.js.map +1 -0
  517. package/dist/mcp/askClient.d.ts +9 -0
  518. package/dist/mcp/askClient.d.ts.map +1 -0
  519. package/dist/mcp/askClient.js +70 -0
  520. package/dist/mcp/askClient.js.map +1 -0
  521. package/dist/mcp/constants.d.ts +6 -0
  522. package/dist/mcp/constants.d.ts.map +1 -0
  523. package/dist/mcp/constants.js +8 -0
  524. package/dist/mcp/constants.js.map +1 -0
  525. package/dist/mcp/permissionClient.d.ts +5 -0
  526. package/dist/mcp/permissionClient.d.ts.map +1 -0
  527. package/dist/mcp/permissionClient.js +71 -0
  528. package/dist/mcp/permissionClient.js.map +1 -0
  529. package/dist/mcp/schemas.d.ts +9 -0
  530. package/dist/mcp/schemas.d.ts.map +1 -0
  531. package/dist/mcp/schemas.js +121 -0
  532. package/dist/mcp/schemas.js.map +1 -0
  533. package/dist/mcp/server.d.ts +41 -0
  534. package/dist/mcp/server.d.ts.map +1 -0
  535. package/dist/mcp/server.js +204 -0
  536. package/dist/mcp/server.js.map +1 -0
  537. package/dist/policy/loader.d.ts +27 -0
  538. package/dist/policy/loader.d.ts.map +1 -0
  539. package/dist/policy/loader.js +89 -0
  540. package/dist/policy/loader.js.map +1 -0
  541. package/dist/policy/team-claude-only.yaml +46 -0
  542. package/dist/policy/team-codex-only.yaml +46 -0
  543. package/dist/policy/team-codex.yaml +54 -0
  544. package/dist/policy/team.yaml +104 -0
  545. package/dist/toolhook/hookedToolProxy.mjs +118 -0
  546. package/dist/ui/components/App.d.ts +14 -0
  547. package/dist/ui/components/App.d.ts.map +1 -0
  548. package/dist/ui/components/App.js +803 -0
  549. package/dist/ui/components/App.js.map +1 -0
  550. package/dist/ui/components/AskPicker.d.ts +8 -0
  551. package/dist/ui/components/AskPicker.d.ts.map +1 -0
  552. package/dist/ui/components/AskPicker.js +202 -0
  553. package/dist/ui/components/AskPicker.js.map +1 -0
  554. package/dist/ui/components/CommandInput.d.ts +63 -0
  555. package/dist/ui/components/CommandInput.d.ts.map +1 -0
  556. package/dist/ui/components/CommandInput.js +994 -0
  557. package/dist/ui/components/CommandInput.js.map +1 -0
  558. package/dist/ui/components/DiffView.d.ts +19 -0
  559. package/dist/ui/components/DiffView.d.ts.map +1 -0
  560. package/dist/ui/components/DiffView.js +93 -0
  561. package/dist/ui/components/DiffView.js.map +1 -0
  562. package/dist/ui/components/Dock.d.ts +49 -0
  563. package/dist/ui/components/Dock.d.ts.map +1 -0
  564. package/dist/ui/components/Dock.js +52 -0
  565. package/dist/ui/components/Dock.js.map +1 -0
  566. package/dist/ui/components/EventLog.d.ts +42 -0
  567. package/dist/ui/components/EventLog.d.ts.map +1 -0
  568. package/dist/ui/components/EventLog.js +450 -0
  569. package/dist/ui/components/EventLog.js.map +1 -0
  570. package/dist/ui/components/FileSuggest.d.ts +8 -0
  571. package/dist/ui/components/FileSuggest.d.ts.map +1 -0
  572. package/dist/ui/components/FileSuggest.js +19 -0
  573. package/dist/ui/components/FileSuggest.js.map +1 -0
  574. package/dist/ui/components/HRule.d.ts +27 -0
  575. package/dist/ui/components/HRule.d.ts.map +1 -0
  576. package/dist/ui/components/HRule.js +75 -0
  577. package/dist/ui/components/HRule.js.map +1 -0
  578. package/dist/ui/components/HintBar.d.ts +2 -0
  579. package/dist/ui/components/HintBar.d.ts.map +1 -0
  580. package/dist/ui/components/HintBar.js +19 -0
  581. package/dist/ui/components/HintBar.js.map +1 -0
  582. package/dist/ui/components/MarkdownText.d.ts +13 -0
  583. package/dist/ui/components/MarkdownText.d.ts.map +1 -0
  584. package/dist/ui/components/MarkdownText.js +255 -0
  585. package/dist/ui/components/MarkdownText.js.map +1 -0
  586. package/dist/ui/components/PermissionPrompt.d.ts +8 -0
  587. package/dist/ui/components/PermissionPrompt.d.ts.map +1 -0
  588. package/dist/ui/components/PermissionPrompt.js +37 -0
  589. package/dist/ui/components/PermissionPrompt.js.map +1 -0
  590. package/dist/ui/components/SessionPicker.d.ts +16 -0
  591. package/dist/ui/components/SessionPicker.d.ts.map +1 -0
  592. package/dist/ui/components/SessionPicker.js +116 -0
  593. package/dist/ui/components/SessionPicker.js.map +1 -0
  594. package/dist/ui/components/SlashPalette.d.ts +8 -0
  595. package/dist/ui/components/SlashPalette.d.ts.map +1 -0
  596. package/dist/ui/components/SlashPalette.js +41 -0
  597. package/dist/ui/components/SlashPalette.js.map +1 -0
  598. package/dist/ui/components/Spinner.d.ts +37 -0
  599. package/dist/ui/components/Spinner.d.ts.map +1 -0
  600. package/dist/ui/components/Spinner.js +139 -0
  601. package/dist/ui/components/Spinner.js.map +1 -0
  602. package/dist/ui/components/StatusBar.d.ts +92 -0
  603. package/dist/ui/components/StatusBar.d.ts.map +1 -0
  604. package/dist/ui/components/StatusBar.js +268 -0
  605. package/dist/ui/components/StatusBar.js.map +1 -0
  606. package/dist/ui/components/TabChip.d.ts +11 -0
  607. package/dist/ui/components/TabChip.d.ts.map +1 -0
  608. package/dist/ui/components/TabChip.js +23 -0
  609. package/dist/ui/components/TabChip.js.map +1 -0
  610. package/dist/ui/components/TeamIndicator.d.ts +6 -0
  611. package/dist/ui/components/TeamIndicator.d.ts.map +1 -0
  612. package/dist/ui/components/TeamIndicator.js +17 -0
  613. package/dist/ui/components/TeamIndicator.js.map +1 -0
  614. package/dist/ui/components/TeamStatusPanel.d.ts +14 -0
  615. package/dist/ui/components/TeamStatusPanel.d.ts.map +1 -0
  616. package/dist/ui/components/TeamStatusPanel.js +65 -0
  617. package/dist/ui/components/TeamStatusPanel.js.map +1 -0
  618. package/dist/ui/components/ThinkingBlock.d.ts +10 -0
  619. package/dist/ui/components/ThinkingBlock.d.ts.map +1 -0
  620. package/dist/ui/components/ThinkingBlock.js +21 -0
  621. package/dist/ui/components/ThinkingBlock.js.map +1 -0
  622. package/dist/ui/components/TodoIndicator.d.ts +11 -0
  623. package/dist/ui/components/TodoIndicator.d.ts.map +1 -0
  624. package/dist/ui/components/TodoIndicator.js +37 -0
  625. package/dist/ui/components/TodoIndicator.js.map +1 -0
  626. package/dist/ui/components/ToolCallCard.d.ts +16 -0
  627. package/dist/ui/components/ToolCallCard.d.ts.map +1 -0
  628. package/dist/ui/components/ToolCallCard.js +195 -0
  629. package/dist/ui/components/ToolCallCard.js.map +1 -0
  630. package/dist/ui/components/Welcome.d.ts +8 -0
  631. package/dist/ui/components/Welcome.d.ts.map +1 -0
  632. package/dist/ui/components/Welcome.js +53 -0
  633. package/dist/ui/components/Welcome.js.map +1 -0
  634. package/dist/ui/cursorState.d.ts +29 -0
  635. package/dist/ui/cursorState.d.ts.map +1 -0
  636. package/dist/ui/cursorState.js +49 -0
  637. package/dist/ui/cursorState.js.map +1 -0
  638. package/dist/ui/diff.d.ts +34 -0
  639. package/dist/ui/diff.d.ts.map +1 -0
  640. package/dist/ui/diff.js +184 -0
  641. package/dist/ui/diff.js.map +1 -0
  642. package/dist/ui/diffLang.d.ts +2 -0
  643. package/dist/ui/diffLang.d.ts.map +1 -0
  644. package/dist/ui/diffLang.js +36 -0
  645. package/dist/ui/diffLang.js.map +1 -0
  646. package/dist/ui/emoji.d.ts +4 -0
  647. package/dist/ui/emoji.d.ts.map +1 -0
  648. package/dist/ui/emoji.js +73 -0
  649. package/dist/ui/emoji.js.map +1 -0
  650. package/dist/ui/fileMentions.d.ts +41 -0
  651. package/dist/ui/fileMentions.d.ts.map +1 -0
  652. package/dist/ui/fileMentions.js +135 -0
  653. package/dist/ui/fileMentions.js.map +1 -0
  654. package/dist/ui/hooks/useLineEditor.d.ts +44 -0
  655. package/dist/ui/hooks/useLineEditor.d.ts.map +1 -0
  656. package/dist/ui/hooks/useLineEditor.js +142 -0
  657. package/dist/ui/hooks/useLineEditor.js.map +1 -0
  658. package/dist/ui/inputHistory.d.ts +8 -0
  659. package/dist/ui/inputHistory.d.ts.map +1 -0
  660. package/dist/ui/inputHistory.js +56 -0
  661. package/dist/ui/inputHistory.js.map +1 -0
  662. package/dist/ui/jsonrpc.d.ts +17 -0
  663. package/dist/ui/jsonrpc.d.ts.map +1 -0
  664. package/dist/ui/jsonrpc.js +41 -0
  665. package/dist/ui/jsonrpc.js.map +1 -0
  666. package/dist/ui/launcher.d.ts +20 -0
  667. package/dist/ui/launcher.d.ts.map +1 -0
  668. package/dist/ui/launcher.js +185 -0
  669. package/dist/ui/launcher.js.map +1 -0
  670. package/dist/ui/markdown.d.ts +104 -0
  671. package/dist/ui/markdown.d.ts.map +1 -0
  672. package/dist/ui/markdown.js +449 -0
  673. package/dist/ui/markdown.js.map +1 -0
  674. package/dist/ui/mouse.d.ts +22 -0
  675. package/dist/ui/mouse.d.ts.map +1 -0
  676. package/dist/ui/mouse.js +31 -0
  677. package/dist/ui/mouse.js.map +1 -0
  678. package/dist/ui/outbound.d.ts +20 -0
  679. package/dist/ui/outbound.d.ts.map +1 -0
  680. package/dist/ui/outbound.js +49 -0
  681. package/dist/ui/outbound.js.map +1 -0
  682. package/dist/ui/screenMode.d.ts +25 -0
  683. package/dist/ui/screenMode.d.ts.map +1 -0
  684. package/dist/ui/screenMode.js +43 -0
  685. package/dist/ui/screenMode.js.map +1 -0
  686. package/dist/ui/slashCatalog.d.ts +18 -0
  687. package/dist/ui/slashCatalog.d.ts.map +1 -0
  688. package/dist/ui/slashCatalog.js +243 -0
  689. package/dist/ui/slashCatalog.js.map +1 -0
  690. package/dist/ui/syntax.d.ts +11 -0
  691. package/dist/ui/syntax.d.ts.map +1 -0
  692. package/dist/ui/syntax.js +78 -0
  693. package/dist/ui/syntax.js.map +1 -0
  694. package/dist/ui/theme.d.ts +165 -0
  695. package/dist/ui/theme.d.ts.map +1 -0
  696. package/dist/ui/theme.js +394 -0
  697. package/dist/ui/theme.js.map +1 -0
  698. package/dist/ui/types.d.ts +203 -0
  699. package/dist/ui/types.d.ts.map +1 -0
  700. package/dist/ui/types.js +53 -0
  701. package/dist/ui/types.js.map +1 -0
  702. package/package.json +104 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamIndicator.js","sourceRoot":"","sources":["../../../src/ui/components/TeamIndicator.tsx"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,EAAE;AACF,qEAAqE;AACrE,wEAAwE;AACxE,qEAAqE;AACrE,oEAAoE;AACpE,oEAAoE;AACpE,uCAAuC;AAEvC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAMpC,MAAM,UAAU,aAAa,CAAC,EAAE,KAAK,EAAS;IAC5C,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,YAAG,aAAa,GAAQ,EAC1D,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,YAAG,KAAK,GAAQ,EACpD,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,+BAAkB,IAC3C,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ export interface RoleStatus {
2
+ role: string;
3
+ status: "running" | "done" | "error";
4
+ elapsedMs?: number;
5
+ /** Phase 173: provider/model the role runs on (from team.yaml). */
6
+ provider?: string;
7
+ model?: string;
8
+ }
9
+ interface Props {
10
+ roles: readonly RoleStatus[];
11
+ }
12
+ export declare function TeamStatusPanel({ roles }: Props): import("react/jsx-runtime").JSX.Element | null;
13
+ export {};
14
+ //# sourceMappingURL=TeamStatusPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamStatusPanel.d.ts","sourceRoot":"","sources":["../../../src/ui/components/TeamStatusPanel.tsx"],"names":[],"mappings":"AAcA,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAQD,UAAU,KAAK;IACb,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;CAC9B;AAOD,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,kDAkE/C"}
@@ -0,0 +1,65 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Phase 142: live multi-agent status panel.
3
+ //
4
+ // While a /team pipeline runs, the backend emits per-role lifecycle
5
+ // (running / done / error) on the live writer — so parallel reviewers
6
+ // surface individually even though their text output is buffered. App
7
+ // threads the list into status.teamRoles; this panel renders one row
8
+ // per role with an animated spinner while running and a ✓ / ✗ when it
9
+ // settles, plus elapsed time. Inspired by the parallel-task displays in
10
+ // claude-code / codex / rich.live TUIs.
11
+ import { useEffect, useState } from "react";
12
+ import { Box, Text, useStdout } from "ink";
13
+ import { theme } from "../theme.js";
14
+ /** "claude-cli·opus", or just one side when the other is missing. */
15
+ function llmLabel(r) {
16
+ if (r.provider && r.model)
17
+ return `${r.provider}·${r.model}`;
18
+ return r.model ?? r.provider ?? "";
19
+ }
20
+ function fmtElapsed(ms) {
21
+ const s = ms / 1000;
22
+ return s < 10 ? `${s.toFixed(1)}s` : `${Math.round(s)}s`;
23
+ }
24
+ export function TeamStatusPanel({ roles }) {
25
+ const [frame, setFrame] = useState(0);
26
+ const { stdout } = useStdout();
27
+ const anyRunning = roles.some((r) => r.status === "running");
28
+ useEffect(() => {
29
+ if (!anyRunning)
30
+ return;
31
+ const t = setInterval(() => setFrame((f) => (f + 1) % theme.spinner.frames.length), theme.spinner.intervalMs);
32
+ return () => clearInterval(t);
33
+ }, [anyRunning]);
34
+ if (roles.length === 0)
35
+ return null;
36
+ const spin = theme.spinner.frames[frame];
37
+ // Phase 173: column-align role + provider·model so the status lines
38
+ // up. On a narrow terminal drop the model column to avoid wrapping.
39
+ const cols = stdout?.columns ?? 80;
40
+ const showLlm = cols >= 56 && roles.some((r) => llmLabel(r));
41
+ const roleWidth = Math.max(...roles.map((r) => r.role.length));
42
+ const llmWidth = showLlm
43
+ ? Math.max(...roles.map((r) => llmLabel(r).length))
44
+ : 0;
45
+ return (_jsx(Box, { flexDirection: "column", children: roles.map((r, i) => {
46
+ const glyph = r.status === "running" ? spin : r.status === "done" ? "✓" : "✗";
47
+ const glyphColor = r.status === "running"
48
+ ? theme.spinner.color
49
+ : r.status === "done"
50
+ ? "green"
51
+ : "red";
52
+ // Phase 195: per-role color in the role label itself. Each
53
+ // function (implementer, reviewer, security, …) gets a hue so
54
+ // the eye distinguishes them at a glance without reading the
55
+ // text. Falls back to the panel's value color for any role
56
+ // name not in the theme map.
57
+ const roleColor = theme.team.roleColors[r.role] ?? theme.status.valueColor;
58
+ return (_jsxs(Box, { children: [_jsx(Text, { color: theme.status.tabColor, children: " ⊙ " }), _jsxs(Text, { color: glyphColor, children: [glyph, " "] }), _jsx(Text, { color: roleColor, bold: true, children: r.role.padEnd(roleWidth) }), showLlm && (_jsx(Text, { color: theme.hint.color, dimColor: true, children: " " + llmLabel(r).padEnd(llmWidth) })), _jsx(Text, { color: theme.hint.color, children: r.status === "running"
59
+ ? " running…"
60
+ : r.elapsedMs !== undefined
61
+ ? ` ${fmtElapsed(r.elapsedMs)}`
62
+ : "" })] }, i));
63
+ }) }));
64
+ }
65
+ //# sourceMappingURL=TeamStatusPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamStatusPanel.js","sourceRoot":"","sources":["../../../src/ui/components/TeamStatusPanel.tsx"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,sEAAsE;AACtE,qEAAqE;AACrE,sEAAsE;AACtE,wEAAwE;AACxE,wCAAwC;AAExC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAWpC,qEAAqE;AACrE,SAAS,QAAQ,CAAC,CAAa;IAC7B,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,KAAK;QAAE,OAAO,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;IAC7D,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;AACrC,CAAC;AAMD,SAAS,UAAU,CAAC,EAAU;IAC5B,MAAM,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;IACpB,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAE,KAAK,EAAS;IAC9C,MAAM,CAAC,KAAK,EAAE,QAAQ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,kBACpC,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,GAC/B,CACR,EACD,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,YAC1B,CAAC,CAAC,MAAM,KAAK,SAAS;4BACrB,CAAC,CAAC,YAAY;4BACd,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS;gCACzB,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gCAChC,CAAC,CAAC,EAAE,GACH,KAjBC,CAAC,CAkBL,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ interface Props {
2
+ text: string;
3
+ /** Phase 111: fold long reasoning to the first few lines with a
4
+ * "(N more)" marker. /verbose turns this off (collapsed=false) to
5
+ * show the full chain of thought. */
6
+ collapsed?: boolean;
7
+ }
8
+ export declare function ThinkingBlock({ text, collapsed }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=ThinkingBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThinkingBlock.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ThinkingBlock.tsx"],"names":[],"mappings":"AAWA,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb;;0CAEsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAID,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,SAAgB,EAAE,EAAE,KAAK,2CAyC9D"}
@@ -0,0 +1,21 @@
1
+ import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
+ // Phase 29: render a chain-of-thought / reasoning chunk.
3
+ //
4
+ // One row per source line, all gray-italic, prefixed by a small
5
+ // "✻ thinking" marker on the first line so the reader can scan past
6
+ // it without conflating it with the assistant's user-facing reply.
7
+ // Streamed chunks join (EventLog coalesces adjacent event/thinking
8
+ // the same way it coalesces adjacent event/text).
9
+ import { Box, Text } from "ink";
10
+ import { theme } from "../theme.js";
11
+ const MAX_THINKING_LINES = 4;
12
+ export function ThinkingBlock({ text, collapsed = true }) {
13
+ const allLines = text.split("\n").filter((l, i, a) =>
14
+ // drop a single trailing blank line
15
+ !(i === a.length - 1 && l === ""));
16
+ const fold = collapsed && allLines.length > MAX_THINKING_LINES;
17
+ const lines = fold ? allLines.slice(0, MAX_THINKING_LINES) : allLines;
18
+ const hidden = allLines.length - lines.length;
19
+ return (_jsxs(Box, { flexDirection: "column", children: [lines.map((line, i) => (_jsxs(Box, { children: [i === 0 ? (_jsxs(_Fragment, { children: [_jsxs(Text, { color: theme.thinking.glyphColor, children: [theme.thinking.glyph, " "] }), _jsxs(Text, { color: theme.thinking.labelColor, italic: true, children: [theme.thinking.label, " "] })] })) : (_jsx(Text, { color: theme.thinking.bodyColor, children: " " })), _jsx(Text, { color: theme.thinking.bodyColor, italic: true, children: line })] }, i))), hidden > 0 && (_jsxs(Box, { children: [_jsx(Text, { color: theme.thinking.bodyColor, children: " " }), _jsxs(Text, { color: theme.thinking.labelColor, italic: true, children: ["\u2026 (", hidden, " more line", hidden === 1 ? "" : "s", " of reasoning \u00B7 /verbose to expand)"] })] }))] }));
20
+ }
21
+ //# sourceMappingURL=ThinkingBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThinkingBlock.js","sourceRoot":"","sources":["../../../src/ui/components/ThinkingBlock.tsx"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,gEAAgE;AAChE,oEAAoE;AACpE,mEAAmE;AACnE,mEAAmE;AACnE,kDAAkD;AAElD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAUpC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAE7B,MAAM,UAAU,aAAa,CAAC,EA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KAfC,CAAC,CAgBL,CACP,CAAC,EACD,MAAM,GAAG,CAAC,IAAI,CACb,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,SAAS,YAAG,IAAI,GAAQ,EACpD,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,+BACxC,MAAM,gBAAY,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,gDAExC,IACH,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ export interface Todo {
2
+ content: string;
3
+ status: "pending" | "in_progress" | "completed";
4
+ activeForm?: string;
5
+ }
6
+ interface Props {
7
+ todos: readonly Todo[];
8
+ }
9
+ export declare function TodoIndicator({ todos }: Props): import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
11
+ //# sourceMappingURL=TodoIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TodoIndicator.d.ts","sourceRoot":"","sources":["../../../src/ui/components/TodoIndicator.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,IAAI;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,CAAC;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,KAAK;IACb,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;CACxB;AAmCD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,kDAqB7C"}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Phase 98 → 130: todo panel.
3
+ //
4
+ // When the model uses the TodoWrite tool, App captures the whole list
5
+ // (App parses every TodoWrite call into {content, status, activeForm}).
6
+ // We render it claude-code style: the in-progress task (◼), the pending
7
+ // queue (◻), and a tail of recently-completed tasks (✔, struck through),
8
+ // collapsing older completed ones into a "… +N completed" count so the
9
+ // panel stays compact. A one-glance answer to "what's done, what's now,
10
+ // what's next".
11
+ import { Box, Text } from "ink";
12
+ import { theme } from "../theme.js";
13
+ /** How many of the most-recent completed tasks to show in full before
14
+ * collapsing the rest into a count. */
15
+ const RECENT_DONE = 2;
16
+ function Row({ todo }) {
17
+ if (todo.status === "completed") {
18
+ return (_jsxs(Box, { children: [_jsx(Text, { color: "green", children: " ✔ " }), _jsx(Text, { color: theme.status.labelColor, strikethrough: true, children: todo.content })] }));
19
+ }
20
+ if (todo.status === "in_progress") {
21
+ return (_jsxs(Box, { children: [_jsx(Text, { color: theme.spinner.color, children: " ◼ " }), _jsx(Text, { color: theme.status.valueColor, bold: true, children: todo.activeForm || todo.content })] }));
22
+ }
23
+ return (_jsxs(Box, { children: [_jsx(Text, { color: theme.hint.color, children: " ◻ " }), _jsx(Text, { color: theme.hint.color, children: todo.content })] }));
24
+ }
25
+ export function TodoIndicator({ todos }) {
26
+ const inProgress = todos.filter((t) => t.status === "in_progress");
27
+ const pending = todos.filter((t) => t.status === "pending");
28
+ const completed = todos.filter((t) => t.status === "completed");
29
+ // Nothing left to do → hide (the run is done; don't linger).
30
+ if (inProgress.length === 0 && pending.length === 0)
31
+ return null;
32
+ const recentDone = completed.slice(-RECENT_DONE);
33
+ const hiddenDone = completed.length - recentDone.length;
34
+ const rows = [...inProgress, ...pending, ...recentDone];
35
+ return (_jsxs(Box, { flexDirection: "column", children: [rows.map((t, i) => (_jsx(Row, { todo: t }, i))), hiddenDone > 0 && (_jsx(Text, { color: theme.hint.color, children: ` … +${hiddenDone} completed` }))] }));
36
+ }
37
+ //# sourceMappingURL=TodoIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TodoIndicator.js","sourceRoot":"","sources":["../../../src/ui/components/TodoIndicator.tsx"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,sEAAsE;AACtE,wEAAwE;AACxE,wEAAw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CAAC,CAAC,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC;IACnE,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;IAC5D,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC;IAChE,6DAA6D;IAC7D,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEjE,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACxD,MAAM,IAAI,GAAW,CAAC,GAAG,UAAU,EAAE,GAAG,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC;IAEhE,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACxB,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAClB,KAAC,GAAG,IAAS,IAAI,EAAE,CAAC,IAAV,CAAC,CAAa,CACzB,CAAC,EACD,UAAU,GAAG,CAAC,IAAI,CACjB,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,YAAG,QAAQ,UAAU,YAAY,GAAQ,CACvE,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { ToolUseStartEvent, ToolUseEndEvent } from "../types.js";
2
+ interface Props {
3
+ start: ToolUseStartEvent;
4
+ end?: ToolUseEndEvent;
5
+ /** Phase 79: streamed output text accumulated by EventLog while the
6
+ * call is still in flight. Shown under the header as ⎿ rows; the
7
+ * final `end` result still replaces it once it lands. */
8
+ progress?: string;
9
+ /** Phase 101: /verbose mode — render the full output (no 3-line
10
+ * clip, lightweight tools show their body too). */
11
+ verbose?: boolean;
12
+ }
13
+ export declare function formatElapsed(ms: number): string;
14
+ export declare function ToolCallCard({ start, end, progress, verbose }: Props): import("react/jsx-runtime").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=ToolCallCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolCallCard.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ToolCallCard.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKtE,UAAU,KAAK;IACb,KAAK,EAAE,iBAAiB,CAAC;IACzB,GAAG,CAAC,EAAE,eAAe,CAAC;IACtB;;8DAE0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;wDACoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAiGD,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAQhD;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,2CA2MpE"}
@@ -0,0 +1,195 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Phase 22 → 78: claude-code-style tool call card.
3
+ //
4
+ // Header line: ⏺ ToolName(primary-arg) [OK] 1.2s
5
+ // Body (dim): ⎿ first three lines of output
6
+ // ⎿ ... (N more lines)
7
+ //
8
+ // Edit-shaped tools (old_string / new_string) render a DiffView under
9
+ // the header instead of an output preview. Errors land on a red
10
+ // continuation line so failures don't get folded out of sight.
11
+ import { useEffect, useRef, useState } from "react";
12
+ import { Box, Text } from "ink";
13
+ import { theme } from "../theme.js";
14
+ import { DiffView } from "./DiffView.js";
15
+ import { lineDiff, looksLikeUnifiedDiff, parseUnifiedDiff } from "../diff.js";
16
+ import { langFromDiffHeader } from "../diffLang.js";
17
+ const MAX_OUTPUT_LINES = 3;
18
+ const MAX_PRIMARY_ARG = 60;
19
+ function clip(s, max) {
20
+ if (s.length <= max)
21
+ return s;
22
+ return s.slice(0, max - 1) + "…";
23
+ }
24
+ // Phase 95: display-name map for the most common host CLI tools.
25
+ // Keeps the header reading like claude-code's "Update(file)" /
26
+ // "Read(file)" / "Search(pattern)" rather than the raw tool ids.
27
+ const DISPLAY_NAME = {
28
+ Edit: "Update",
29
+ MultiEdit: "Update",
30
+ Write: "Write",
31
+ NotebookEdit: "Update",
32
+ Read: "Read",
33
+ Bash: "Bash",
34
+ Glob: "Search",
35
+ Grep: "Search",
36
+ WebFetch: "Fetch",
37
+ WebSearch: "Search",
38
+ TodoWrite: "Todo",
39
+ Task: "Agent",
40
+ };
41
+ function displayName(rawName) {
42
+ return DISPLAY_NAME[rawName] ?? rawName;
43
+ }
44
+ /** Pull the single most-informative arg for the card header. Tool
45
+ * families converge on a small set of conventional keys; for
46
+ * anything outside that set, fall back to the first input entry. */
47
+ function primaryArg(input) {
48
+ // Order matters: command / file_path / pattern / query / url are
49
+ // the "primary intent" keys per tool family. `path` is only a
50
+ // fallback because tools like Grep pair `pattern` with `path` —
51
+ // pattern is what the user reads first.
52
+ if (typeof input.command === "string")
53
+ return clip(input.command, MAX_PRIMARY_ARG);
54
+ if (typeof input.file_path === "string")
55
+ return clip(input.file_path, MAX_PRIMARY_ARG);
56
+ if (typeof input.pattern === "string")
57
+ return clip(input.pattern, MAX_PRIMARY_ARG);
58
+ if (typeof input.query === "string")
59
+ return clip(input.query, MAX_PRIMARY_ARG);
60
+ if (typeof input.url === "string")
61
+ return clip(input.url, MAX_PRIMARY_ARG);
62
+ if (typeof input.path === "string")
63
+ return clip(input.path, MAX_PRIMARY_ARG);
64
+ const keys = Object.keys(input);
65
+ if (keys.length === 0)
66
+ return "";
67
+ const k = keys[0];
68
+ const v = input[k];
69
+ const s = typeof v === "string" ? v : JSON.stringify(v);
70
+ return `${k}=${clip(s, MAX_PRIMARY_ARG - k.length - 1)}`;
71
+ }
72
+ function extractEditDiff(input) {
73
+ const oldText = input["old_string"] ?? input["oldText"] ?? input["old"];
74
+ const newText = input["new_string"] ?? input["newText"] ?? input["new"];
75
+ if (typeof oldText !== "string" || typeof newText !== "string")
76
+ return null;
77
+ const fp = typeof input["file_path"] === "string"
78
+ ? input["file_path"]
79
+ : typeof input["path"] === "string"
80
+ ? input["path"]
81
+ : "";
82
+ return { oldText, newText, filePath: fp };
83
+ }
84
+ /** Phase 167: file extension → a syntax language hint for the diff.
85
+ * syntax.highlight() resolves aliases (ts/tsx/py/…) and falls back to
86
+ * plain text for unknown languages, so passing the raw extension is
87
+ * safe. Empty when there's no usable extension. */
88
+ function langFromPath(path) {
89
+ const base = path.split("/").pop() ?? "";
90
+ const dot = base.lastIndexOf(".");
91
+ if (dot <= 0 || dot === base.length - 1)
92
+ return undefined;
93
+ return base.slice(dot + 1).toLowerCase();
94
+ }
95
+ function isToolResultShape(v) {
96
+ return typeof v === "object" && v !== null && "ok" in v;
97
+ }
98
+ // Phase 66: elapsed formatter (re-exported for tests).
99
+ export function formatElapsed(ms) {
100
+ if (ms < 0)
101
+ ms = 0;
102
+ if (ms < 1000)
103
+ return `${ms}ms`;
104
+ const s = ms / 1000;
105
+ if (s < 60)
106
+ return `${s.toFixed(s < 10 ? 1 : 0)}s`;
107
+ const m = Math.floor(s / 60);
108
+ const rem = Math.floor(s % 60);
109
+ return `${m}m ${rem}s`;
110
+ }
111
+ export function ToolCallCard({ start, end, progress, verbose }) {
112
+ const editDiff = extractEditDiff(start.params.input);
113
+ const primary = primaryArg(start.params.input);
114
+ const result = end ? end.params.result : undefined;
115
+ const ok = end === undefined
116
+ ? null
117
+ : isToolResultShape(result)
118
+ ? result.ok !== false
119
+ : true;
120
+ const value = isToolResultShape(result) ? result.value : result;
121
+ const error = isToolResultShape(result) && typeof result.error === "string"
122
+ ? result.error
123
+ : "";
124
+ const valueText = typeof value === "string"
125
+ ? value
126
+ : value === undefined || value === null
127
+ ? ""
128
+ : JSON.stringify(value, null, 2);
129
+ const outputIsDiff = typeof value === "string" && looksLikeUnifiedDiff(value);
130
+ // Phase 99: lightweight read-only tools (Read/Glob/Grep/LS) don't
131
+ // get an output preview — the result lives in the model's context
132
+ // and the user only wants to see *that* the call happened. A small
133
+ // suffix like `(N lines)` lands in the header instead.
134
+ const LIGHTWEIGHT = new Set([
135
+ "Read",
136
+ "Glob",
137
+ "Grep",
138
+ "LS",
139
+ "WebSearch",
140
+ "WebFetch",
141
+ ]);
142
+ // Phase 101: /verbose disables lightweight suppression so even
143
+ // Read/Glob/Grep show their full body.
144
+ const isLightweight = !verbose && LIGHTWEIGHT.has(start.params.name);
145
+ // Phase 79: when the call is still running, surface streamed
146
+ // progress text in place of the eventual `value`. Once `end`
147
+ // arrives, the final result wins and the progress drops out.
148
+ const previewText = end === undefined ? (progress ?? "") : valueText;
149
+ // Trim trailing newline so we don't show an extra blank ⎿ row when
150
+ // the producer ends every chunk with "\n".
151
+ const outputLines = previewText
152
+ ? previewText.replace(/\n+$/, "").split("\n")
153
+ : [];
154
+ // Lightweight tools surface their line count in the header
155
+ // (Phase 99), not the body.
156
+ const lightweightCount = isLightweight && end !== undefined && outputLines.length > 0
157
+ ? outputLines.length
158
+ : 0;
159
+ // Keep the *tail* of the progress while running (most recent output
160
+ // is what the user wants to watch); keep the *head* of the final
161
+ // result (the model usually cares about the first lines).
162
+ // Phase 101: verbose mode lifts the 3-line clip.
163
+ const cap = verbose ? Number.POSITIVE_INFINITY : MAX_OUTPUT_LINES;
164
+ const shownOutput = end === undefined ? outputLines.slice(-cap) : outputLines.slice(0, cap);
165
+ const hiddenLineCount = Math.max(0, outputLines.length - shownOutput.length);
166
+ // Phase 66 elapsed timer.
167
+ const startedAtRef = useRef(Date.now());
168
+ const frozenRef = useRef(null);
169
+ const [now, setNow] = useState(Date.now());
170
+ useEffect(() => {
171
+ if (end !== undefined) {
172
+ if (frozenRef.current === null)
173
+ frozenRef.current = Date.now();
174
+ return;
175
+ }
176
+ const t = setInterval(() => setNow(Date.now()), 1000);
177
+ return () => clearInterval(t);
178
+ }, [end]);
179
+ const elapsedMs = end !== undefined && frozenRef.current !== null
180
+ ? frozenRef.current - startedAtRef.current
181
+ : now - startedAtRef.current;
182
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: theme.toolCard.headGlyphColor, children: theme.toolCard.headGlyph + " " }), _jsx(Text, { color: theme.toolCard.nameColor, bold: true, children: displayName(start.params.name) }), primary && (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.toolCard.argLabelColor, children: "(" }), _jsx(Text, { color: theme.toolCard.argValueColor, children: primary }), _jsx(Text, { color: theme.toolCard.argLabelColor, children: ")" })] })), ok === false && (_jsxs(Text, { children: [" ", _jsxs(Text, { color: theme.toolCard.failColor, bold: true, children: ["[", theme.toolCard.failBadge, "]"] })] })), lightweightCount > 0 && (_jsx(Text, { color: theme.toolCard.elapsedColor, children: ` (${lightweightCount} ${start.params.name === "Grep" || start.params.name === "Glob"
183
+ ? "matches"
184
+ : "lines"})` })), (ok === null || elapsedMs >= 1000) && (_jsx(Text, { color: theme.toolCard.elapsedColor, children: " " + (ok === null ? "running " : "") + formatElapsed(elapsedMs) }))] }), editDiff &&
185
+ (() => {
186
+ const diff = lineDiff(editDiff.oldText, editDiff.newText);
187
+ const adds = diff.filter((l) => l.kind === "add").length;
188
+ const dels = diff.filter((l) => l.kind === "del").length;
189
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: theme.toolCard.contColor, children: " " + theme.toolCard.contGlyph + " " }), _jsx(Text, { color: theme.toolCard.argLabelColor, children: `Added ${adds} line${adds === 1 ? "" : "s"}, removed ${dels} line${dels === 1 ? "" : "s"}` })] }), _jsx(Box, { paddingLeft: 2, children: _jsx(DiffView, { lines: diff, lang: langFromPath(editDiff.filePath) }) })] }));
190
+ })(), outputIsDiff && valueText && (_jsx(Box, { paddingLeft: 2, children: _jsx(DiffView, { lines: parseUnifiedDiff(valueText), lang: langFromDiffHeader(valueText) }) })), !editDiff &&
191
+ !outputIsDiff &&
192
+ !isLightweight &&
193
+ shownOutput.length > 0 && (_jsxs(Box, { flexDirection: "column", children: [shownOutput.map((line, i) => (_jsxs(Box, { children: [_jsx(Text, { color: theme.toolCard.contColor, children: " " + theme.toolCard.contGlyph + " " }), _jsx(Text, { color: theme.toolCard.outputColor, children: line })] }, i))), hiddenLineCount > 0 && (_jsxs(Box, { children: [_jsx(Text, { color: theme.toolCard.contColor, children: " " + theme.toolCard.contGlyph + " " }), _jsxs(Text, { color: theme.toolCard.argLabelColor, children: ["\u2026 (", hiddenLineCount, " more line", hiddenLineCount === 1 ? "" : "s", ")"] })] }))] })), ok === false && error && (_jsxs(Box, { children: [_jsx(Text, { color: theme.toolCard.contColor, children: " " + theme.toolCard.contGlyph + " " }), _jsxs(Text, { color: theme.toolCard.failColor, children: ["error: ", error] })] }))] }));
194
+ }
195
+ //# sourceMappingURL=ToolCallCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolCallCard.js","sourceRoot":"","sources":["../../../src/ui/components/ToolCallCard.tsx"],"names":[],"mappings":";AAAA,mDAAmD;AACnD,EAAE;AACF,qDAAqD;AACrD,+CAA+C;AAC/C,sCAAsC;AACtC,EAAE;AACF,sEAAsE;AACtE,gEAAgE;AAChE,+DAA+D;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,EAAE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: string;
5
+ }
6
+ export declare function Welcome({ provider, model, cwd }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=Welcome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Welcome.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Welcome.tsx"],"names":[],"mappings":"AAaA,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAoCD,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,KAAK,2CA6DtD"}
@@ -0,0 +1,53 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Phase 87: bigger Welcome panel.
3
+ //
4
+ // The Phase-80 two-liner was easy to miss when omg launched into an
5
+ // active terminal. This version uses an ASCII title block, a small
6
+ // info table (active provider/model + cwd), and a four-cell hint
7
+ // grid — large enough to read as "you just launched omg" without
8
+ // dominating the screen, and still gone the moment events arrive.
9
+ import { Box, Text } from "ink";
10
+ import { theme } from "../theme.js";
11
+ import { VERSION } from "../../index.js";
12
+ import { contextWindowForProvider } from "../../core/context/contextWindows.js";
13
+ function shortCwd(s, max = 60) {
14
+ if (!s)
15
+ return "—";
16
+ if (s.length <= max)
17
+ return s;
18
+ return "…" + s.slice(-(max - 1));
19
+ }
20
+ // Block letters drawn with the standard half-block / full-block
21
+ // glyphs. Six rows tall. Keeping it ASCII-conservative so it
22
+ // survives the same terminals the rest of the UI runs on.
23
+ const LOGO_LINES = [
24
+ " ██████ ███╗ ███╗ ██████╗ ",
25
+ " ██╔═══██╗████╗ ████║ ██╔════╝ ",
26
+ " ██║ ██║██╔████╔██║ ██║ ███╗",
27
+ " ██║ ██║██║╚██╔╝██║ ██║ ██║",
28
+ " ╚██████╔╝██║ ╚═╝ ██║ ╚██████╔╝",
29
+ " ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ",
30
+ ];
31
+ const HINTS = [
32
+ { key: "/", label: "slash commands" },
33
+ { key: "@file", label: "inline a file" },
34
+ { key: "!cmd", label: "shell command" },
35
+ // Phase 324: surface the two most-missed features — mode toggles and
36
+ // the new context inspector — so they're discoverable without /help.
37
+ { key: "/plan /ask", label: "plan-first / ask-before-tools modes" },
38
+ { key: "/context", label: "see what's filling the window" },
39
+ { key: "Ctrl-O/P", label: "cycle tabs" },
40
+ ];
41
+ export function Welcome({ provider, model, cwd }) {
42
+ const via = provider && model ? `${provider}/${model}` : provider ? provider : "—";
43
+ // Phase 324: show the context window up front — it frames the whole
44
+ // "how fast does context fill" question /context answers.
45
+ const win = contextWindowForProvider(provider ?? "", model);
46
+ const windowStr = win
47
+ ? win >= 1000
48
+ ? `${Math.round(win / 1000)}K tokens`
49
+ : `${win} tokens`
50
+ : null;
51
+ return (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, paddingY: 1, children: [_jsx(Box, { flexDirection: "column", children: LOGO_LINES.map((line, i) => (_jsx(Text, { color: theme.prompt.arrowColor, bold: true, children: line }, i))) }), _jsxs(Box, { marginTop: 1, children: [_jsxs(Text, { color: theme.status.labelColor, children: [" ", "multi-LLM TUI"] }), _jsx(Text, { color: theme.status.sepColor, children: " · " }), _jsxs(Text, { color: theme.status.valueColor, children: ["v", VERSION] })] }), _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: theme.status.labelColor, children: " active: " }), _jsx(Text, { color: theme.status.valueColor, children: via })] }), _jsxs(Box, { children: [_jsx(Text, { color: theme.status.labelColor, children: " cwd: " }), _jsx(Text, { color: theme.status.valueColor, children: shortCwd(cwd) })] }), windowStr ? (_jsxs(Box, { children: [_jsx(Text, { color: theme.status.labelColor, children: " context: " }), _jsx(Text, { color: theme.status.valueColor, children: windowStr })] })) : null] }), _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { color: theme.status.labelColor, children: " tips:" }), HINTS.map((h) => (_jsxs(Box, { children: [_jsx(Text, { color: theme.hint.keyColor, children: " " + h.key.padEnd(10, " ") }), _jsx(Text, { color: theme.hint.color, children: h.label })] }, h.key)))] })] }));
52
+ }
53
+ //# sourceMappingURL=Welcome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Welcome.js","sourceRoot":"","sources":["../../../src/ui/components/Welcome.tsx"],"names":[],"mappings":";AAAA,kCAAkC;AAClC,EAAE;AACF,oEAAoE;AACpE,mEAAmE;AACnE,iEAAiE;AACjE,iEAAiE;AACjE,kEAAkE;AAElE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAQhF,SAAS,QAAQ,CAAC,CAAqB,EAAE,GAAG,GAAG,EAAE;IAC/C,IAAI,CAAC,CAAC;QAAE,OAAO,GAAG,CAAC;IACnB,IAAI,CAAC,CAAC,MAAM,IAAI,GAAG;QAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC;AAED,gEAAgE;AAChE,6DAA6D;AAC7D,0DAA0D;AAC1D,MAAM,UAAU,GAAsB;IACpC,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;CAClC,CAAC;AAOF,MAAM,KAAK,GAAoB;IAC7B,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE;IACxC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAA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K,CAAC,IAAI,CAAC,QAAQ,YAC7B,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,GAC1B,EACP,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,YAAG,CAAC,CAAC,KAAK,GAAQ,KAJvC,CAAC,CAAC,GAAG,CAKT,CACP,CAAC,IACE,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,29 @@
1
+ export interface InputCursorParkState {
2
+ /** When false, the wrapper skips cursor-positioning emission —
3
+ * e.g. picker / permission-prompt modes where CommandInput
4
+ * isn't rendered and there's no ▌ to anchor on. */
5
+ active: boolean;
6
+ /** How many rows ABOVE the natural end-of-frame position the
7
+ * input's cursor row sits. The end-of-frame is one row below
8
+ * HintBar (Ink's trailing '\n'); chrome between there and the
9
+ * input cursor row adds:
10
+ * '\n' — 1
11
+ * HintBar — 1
12
+ * StatusBar — 2 (Phase 105 two-row)
13
+ * lower HRule — 1
14
+ * + 0 for single-line input cursor on the input's only row,
15
+ * or more if the cursor sits on an earlier line of a
16
+ * multi-line input.
17
+ * Updated by CommandInput. */
18
+ rowsUp: number;
19
+ /** 1-indexed column on the input row where the visual ▌ sits.
20
+ * Prompt arrow is 2 columns ("❯ "), cursor offset adds the rest.
21
+ * For multi-line input this is the column on the cursor's line. */
22
+ col: number;
23
+ }
24
+ export declare const inputCursorPark: InputCursorParkState;
25
+ /** Reset to inactive — called from App when picker/permission/ask
26
+ * hides the CommandInput so the wrapper doesn't jump the cursor
27
+ * to a stale saved position. */
28
+ export declare function clearInputCursorPark(): void;
29
+ //# sourceMappingURL=cursorState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursorState.d.ts","sourceRoot":"","sources":["../../src/ui/cursorState.ts"],"names":[],"mappings":"AAsCA,MAAM,WAAW,oBAAoB;IACnC;;wDAEoD;IACpD,MAAM,EAAE,OAAO,CAAC;IAChB;;;;;;;;;;;mCAW+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf;;wEAEoE;IACpE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,eAAe,EAAE,oBAI7B,CAAC;AAEF;;iCAEiC;AACjC,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
@@ -0,0 +1,49 @@
1
+ // Phase 267: shared cursor-position state for IME compose parking.
2
+ //
3
+ // The problem: macOS Cocoa terminals (iTerm2, Terminal.app, Warp)
4
+ // draw IME compose preview at the HARDWARE cursor position. Ink's
5
+ // log-update.js appends `'\n'` to every frame, so the hardware
6
+ // cursor lands one row BELOW the last rendered line per frame. With
7
+ // omg's default layout (HRule + StatusBar + HintBar BELOW
8
+ // CommandInput) that puts the cursor several rows below the input
9
+ // — and Korean compose draws there instead of inside the input.
10
+ //
11
+ // Phase 262 (DEC private ESC 7/8) and Phase 265 (CSI ESC [ s / u)
12
+ // tried to teleport the cursor back via escape sequences embedded
13
+ // in the rendered text. Both failed in practice. The leading
14
+ // hypothesis: even if the escapes survive Ink's text pipeline, the
15
+ // trailing `'\n'` AFTER the save-cursor point pushes the cursor
16
+ // down — and the restore at frame end runs but the terminal then
17
+ // applies the buffered '\n' (under DEC mode 2026) in a way that
18
+ // invalidates the restore. Or Ink's per-frame cursor management
19
+ // (cliCursor.hide(), eraseLines) interacts with sync-update in a
20
+ // way that drops the embedded saves.
21
+ //
22
+ // Phase 266 reordered the chrome above the input so the cursor
23
+ // would naturally end up at the bottom — but Ink's '\n' still puts
24
+ // it one row below, and the user reported the IME still drew
25
+ // off-input.
26
+ //
27
+ // Phase 267 takes a different tack: keep the visual layout as
28
+ // designed (chrome below input), and have `withSyncOutput` emit
29
+ // absolute cursor-positioning escapes AFTER the frame writes,
30
+ // bypassing Ink's text pipeline entirely. The escape isn't inside
31
+ // any Text node; it's a raw stdout write tacked onto the end of
32
+ // each frame's bytes. CommandInput updates this state in render so
33
+ // the wrapper knows where to park the cursor.
34
+ //
35
+ // The state lives at module scope (not React) because the wrapper
36
+ // runs outside the React tree. Mutation during render is safe
37
+ // because it doesn't trigger re-renders (no React hook involved).
38
+ export const inputCursorPark = {
39
+ active: false,
40
+ rowsUp: 5,
41
+ col: 3,
42
+ };
43
+ /** Reset to inactive — called from App when picker/permission/ask
44
+ * hides the CommandInput so the wrapper doesn't jump the cursor
45
+ * to a stale saved position. */
46
+ export function clearInputCursorPark() {
47
+ inputCursorPark.active = false;
48
+ }
49
+ //# sourceMappingURL=cursorState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursorState.js","sourceRoot":"","sources":["../../src/ui/cursorState.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,kEAAkE;AAClE,kEAAkE;AAClE,+DAA+D;AAC/D,oEAAoE;AACpE,0DAA0D;AAC1D,kEAAkE;AAClE,gEAAgE;AAChE,EAAE;AACF,kEAAkE;AAClE,kEAAkE;AAClE,6DAA6D;AAC7D,mEAAmE;AACnE,gEAAgE;AAChE,iEAAiE;AACjE,gEAAgE;AAChE,gEAAgE;AAChE,iEAAiE;AACjE,qCAAqC;AACrC,EAAE;AACF,+DAA+D;AAC/D,mEAAmE;AACnE,6DAA6D;AAC7D,aAAa;AACb,EAAE;AACF,8DAA8D;AAC9D,gEAAgE;AAChE,8DAA8D;AAC9D,kEAAkE;AAClE,gEAAgE;AAChE,mEAAmE;AACnE,8CAA8C;AAC9C,EAAE;AACF,kEAAkE;AAClE,8DAA8D;AAC9D,kEAAkE;AA0BlE,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;CACP,CAAC;AAEF;;iCAEiC;AACjC,MAAM,UAAU,oBAAoB;IAClC,eAAe,CAAC,MAAM,GAAG,KAAK,CAAC;AACjC,CAAC"}