4runr-os 2.1.2 → 2.1.5

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 (566) hide show
  1. package/dist/index.js +16 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/tui_mk1/kernel.d.ts.map +1 -1
  4. package/dist/tui_mk1/kernel.js +107 -4
  5. package/dist/tui_mk1/kernel.js.map +1 -1
  6. package/dist/tui_mk1/layout/layoutEngine.d.ts +38 -19
  7. package/dist/tui_mk1/layout/layoutEngine.d.ts.map +1 -1
  8. package/dist/tui_mk1/layout/layoutEngine.js +521 -228
  9. package/dist/tui_mk1/layout/layoutEngine.js.map +1 -1
  10. package/dist/tui_mk1/log.d.ts +23 -0
  11. package/dist/tui_mk1/log.d.ts.map +1 -0
  12. package/dist/tui_mk1/log.js +125 -0
  13. package/dist/tui_mk1/log.js.map +1 -0
  14. package/dist/tui_mk1/logger.d.ts.map +1 -1
  15. package/dist/tui_mk1/logger.js +20 -10
  16. package/dist/tui_mk1/logger.js.map +1 -1
  17. package/dist/tui_mk1/mk1App.d.ts +13 -18
  18. package/dist/tui_mk1/mk1App.d.ts.map +1 -1
  19. package/dist/tui_mk1/mk1App.js +334 -157
  20. package/dist/tui_mk1/mk1App.js.map +1 -1
  21. package/dist/tui_mk1/resizeController.d.ts.map +1 -1
  22. package/dist/tui_mk1/resizeController.js +15 -1
  23. package/dist/tui_mk1/resizeController.js.map +1 -1
  24. package/dist/tui_mk1/stdoutGuard.d.ts.map +1 -1
  25. package/dist/tui_mk1/stdoutGuard.js +7 -0
  26. package/dist/tui_mk1/stdoutGuard.js.map +1 -1
  27. package/dist/tui_mk1/terminalRestore.d.ts.map +1 -1
  28. package/dist/tui_mk1/terminalRestore.js +19 -1
  29. package/dist/tui_mk1/terminalRestore.js.map +1 -1
  30. package/dist/tui_mk1/ui/offenderScanner.d.ts +31 -0
  31. package/dist/tui_mk1/ui/offenderScanner.d.ts.map +1 -0
  32. package/dist/tui_mk1/ui/offenderScanner.js +80 -0
  33. package/dist/tui_mk1/ui/offenderScanner.js.map +1 -0
  34. package/dist/tui_mk1/ui/safe.d.ts +9 -0
  35. package/dist/tui_mk1/ui/safe.d.ts.map +1 -0
  36. package/dist/tui_mk1/ui/safe.js +29 -0
  37. package/dist/tui_mk1/ui/safe.js.map +1 -0
  38. package/dist/tui_mk1/ui/safeText.d.ts +22 -0
  39. package/dist/tui_mk1/ui/safeText.d.ts.map +1 -0
  40. package/dist/tui_mk1/ui/safeText.js +50 -0
  41. package/dist/tui_mk1/ui/safeText.js.map +1 -0
  42. package/dist/tui_mk1/ui/uiBuilder.d.ts +44 -0
  43. package/dist/tui_mk1/ui/uiBuilder.d.ts.map +1 -0
  44. package/dist/tui_mk1/ui/uiBuilder.js +467 -0
  45. package/dist/tui_mk1/ui/uiBuilder.js.map +1 -0
  46. package/dist/tui_mk1/viewport/safeViewport.d.ts +10 -1
  47. package/dist/tui_mk1/viewport/safeViewport.d.ts.map +1 -1
  48. package/dist/tui_mk1/viewport/safeViewport.js +47 -15
  49. package/dist/tui_mk1/viewport/safeViewport.js.map +1 -1
  50. package/dist/tui_mk2/kernel.d.ts +28 -0
  51. package/dist/tui_mk2/kernel.d.ts.map +1 -0
  52. package/dist/tui_mk2/kernel.js +86 -0
  53. package/dist/tui_mk2/kernel.js.map +1 -0
  54. package/dist/tui_mk2/mk2App.d.ts +33 -0
  55. package/dist/tui_mk2/mk2App.d.ts.map +1 -0
  56. package/dist/tui_mk2/mk2App.js +93 -0
  57. package/dist/tui_mk2/mk2App.js.map +1 -0
  58. package/package.json +8 -7
  59. package/dist/tui_mk1/ui/panels/createSection.d.ts +0 -18
  60. package/dist/tui_mk1/ui/panels/createSection.d.ts.map +0 -1
  61. package/dist/tui_mk1/ui/panels/createSection.js +0 -42
  62. package/dist/tui_mk1/ui/panels/createSection.js.map +0 -1
  63. package/dist/tui_mk1/ui/panels.d.ts +0 -23
  64. package/dist/tui_mk1/ui/panels.d.ts.map +0 -1
  65. package/dist/tui_mk1/ui/panels.js +0 -108
  66. package/dist/tui_mk1/ui/panels.js.map +0 -1
  67. package/dist/tui_mk1/ui/render/sectionRenderer.d.ts +0 -21
  68. package/dist/tui_mk1/ui/render/sectionRenderer.d.ts.map +0 -1
  69. package/dist/tui_mk1/ui/render/sectionRenderer.js +0 -32
  70. package/dist/tui_mk1/ui/render/sectionRenderer.js.map +0 -1
  71. package/dist/tui_mk1/ui/widgetManager.d.ts +0 -58
  72. package/dist/tui_mk1/ui/widgetManager.d.ts.map +0 -1
  73. package/dist/tui_mk1/ui/widgetManager.js +0 -197
  74. package/dist/tui_mk1/ui/widgetManager.js.map +0 -1
  75. package/dist/ui/boot/sequence.d.ts +0 -10
  76. package/dist/ui/boot/sequence.d.ts.map +0 -1
  77. package/dist/ui/boot/sequence.js +0 -171
  78. package/dist/ui/boot/sequence.js.map +0 -1
  79. package/dist/ui/constraints/layoutSpec.d.ts +0 -47
  80. package/dist/ui/constraints/layoutSpec.d.ts.map +0 -1
  81. package/dist/ui/constraints/layoutSpec.js +0 -60
  82. package/dist/ui/constraints/layoutSpec.js.map +0 -1
  83. package/dist/ui/constraints/unknownHandling.d.ts +0 -29
  84. package/dist/ui/constraints/unknownHandling.d.ts.map +0 -1
  85. package/dist/ui/constraints/unknownHandling.js +0 -60
  86. package/dist/ui/constraints/unknownHandling.js.map +0 -1
  87. package/dist/ui/drilldowns/feed.d.ts +0 -11
  88. package/dist/ui/drilldowns/feed.d.ts.map +0 -1
  89. package/dist/ui/drilldowns/feed.js +0 -68
  90. package/dist/ui/drilldowns/feed.js.map +0 -1
  91. package/dist/ui/drilldowns/index.d.ts +0 -7
  92. package/dist/ui/drilldowns/index.d.ts.map +0 -1
  93. package/dist/ui/drilldowns/index.js +0 -8
  94. package/dist/ui/drilldowns/index.js.map +0 -1
  95. package/dist/ui/drilldowns/posture.d.ts +0 -11
  96. package/dist/ui/drilldowns/posture.d.ts.map +0 -1
  97. package/dist/ui/drilldowns/posture.js +0 -74
  98. package/dist/ui/drilldowns/posture.js.map +0 -1
  99. package/dist/ui/intelligence-posture-view.d.ts +0 -22
  100. package/dist/ui/intelligence-posture-view.d.ts.map +0 -1
  101. package/dist/ui/intelligence-posture-view.js +0 -169
  102. package/dist/ui/intelligence-posture-view.js.map +0 -1
  103. package/dist/ui/navigation/keymaps.d.ts +0 -26
  104. package/dist/ui/navigation/keymaps.d.ts.map +0 -1
  105. package/dist/ui/navigation/keymaps.js +0 -135
  106. package/dist/ui/navigation/keymaps.js.map +0 -1
  107. package/dist/ui/navigation/palette.d.ts +0 -10
  108. package/dist/ui/navigation/palette.d.ts.map +0 -1
  109. package/dist/ui/navigation/palette.js +0 -133
  110. package/dist/ui/navigation/palette.js.map +0 -1
  111. package/dist/ui/navigation/state.d.ts +0 -47
  112. package/dist/ui/navigation/state.d.ts.map +0 -1
  113. package/dist/ui/navigation/state.js +0 -84
  114. package/dist/ui/navigation/state.js.map +0 -1
  115. package/dist/ui/navigation/types.d.ts +0 -38
  116. package/dist/ui/navigation/types.d.ts.map +0 -1
  117. package/dist/ui/navigation/types.js +0 -36
  118. package/dist/ui/navigation/types.js.map +0 -1
  119. package/dist/ui/panels/active-assets.d.ts +0 -12
  120. package/dist/ui/panels/active-assets.d.ts.map +0 -1
  121. package/dist/ui/panels/active-assets.js +0 -83
  122. package/dist/ui/panels/active-assets.js.map +0 -1
  123. package/dist/ui/panels/capability-flags.d.ts +0 -12
  124. package/dist/ui/panels/capability-flags.d.ts.map +0 -1
  125. package/dist/ui/panels/capability-flags.js +0 -59
  126. package/dist/ui/panels/capability-flags.js.map +0 -1
  127. package/dist/ui/panels/command-surface.d.ts +0 -12
  128. package/dist/ui/panels/command-surface.d.ts.map +0 -1
  129. package/dist/ui/panels/command-surface.js +0 -55
  130. package/dist/ui/panels/command-surface.js.map +0 -1
  131. package/dist/ui/panels/network-origin.d.ts +0 -12
  132. package/dist/ui/panels/network-origin.d.ts.map +0 -1
  133. package/dist/ui/panels/network-origin.js +0 -79
  134. package/dist/ui/panels/network-origin.js.map +0 -1
  135. package/dist/ui/panels/operations-feed.d.ts +0 -12
  136. package/dist/ui/panels/operations-feed.d.ts.map +0 -1
  137. package/dist/ui/panels/operations-feed.js +0 -90
  138. package/dist/ui/panels/operations-feed.js.map +0 -1
  139. package/dist/ui/panels/posture.d.ts +0 -12
  140. package/dist/ui/panels/posture.d.ts.map +0 -1
  141. package/dist/ui/panels/posture.js +0 -84
  142. package/dist/ui/panels/posture.js.map +0 -1
  143. package/dist/ui/panels/resources.d.ts +0 -11
  144. package/dist/ui/panels/resources.d.ts.map +0 -1
  145. package/dist/ui/panels/resources.js +0 -88
  146. package/dist/ui/panels/resources.js.map +0 -1
  147. package/dist/ui/primitives/Panel.d.ts +0 -25
  148. package/dist/ui/primitives/Panel.d.ts.map +0 -1
  149. package/dist/ui/primitives/Panel.js +0 -59
  150. package/dist/ui/primitives/Panel.js.map +0 -1
  151. package/dist/ui/rendering/metricRenderer.d.ts +0 -24
  152. package/dist/ui/rendering/metricRenderer.d.ts.map +0 -1
  153. package/dist/ui/rendering/metricRenderer.js +0 -86
  154. package/dist/ui/rendering/metricRenderer.js.map +0 -1
  155. package/dist/ui/runtime/hub.d.ts +0 -12
  156. package/dist/ui/runtime/hub.d.ts.map +0 -1
  157. package/dist/ui/runtime/hub.js +0 -486
  158. package/dist/ui/runtime/hub.js.map +0 -1
  159. package/dist/ui/runtime/hubValidation.d.ts +0 -23
  160. package/dist/ui/runtime/hubValidation.d.ts.map +0 -1
  161. package/dist/ui/runtime/hubValidation.js +0 -90
  162. package/dist/ui/runtime/hubValidation.js.map +0 -1
  163. package/dist/ui/runtime/index.d.ts +0 -29
  164. package/dist/ui/runtime/index.d.ts.map +0 -1
  165. package/dist/ui/runtime/index.js +0 -297
  166. package/dist/ui/runtime/index.js.map +0 -1
  167. package/dist/ui/runtime/no-tui.d.ts +0 -12
  168. package/dist/ui/runtime/no-tui.d.ts.map +0 -1
  169. package/dist/ui/runtime/no-tui.js +0 -77
  170. package/dist/ui/runtime/no-tui.js.map +0 -1
  171. package/dist/ui/runtime/state-builder.d.ts +0 -13
  172. package/dist/ui/runtime/state-builder.d.ts.map +0 -1
  173. package/dist/ui/runtime/state-builder.js +0 -114
  174. package/dist/ui/runtime/state-builder.js.map +0 -1
  175. package/dist/ui/runtime/terminalSizeCheck.d.ts +0 -10
  176. package/dist/ui/runtime/terminalSizeCheck.d.ts.map +0 -1
  177. package/dist/ui/runtime/terminalSizeCheck.js +0 -51
  178. package/dist/ui/runtime/terminalSizeCheck.js.map +0 -1
  179. package/dist/ui/runtime/tuiLogGate.d.ts +0 -22
  180. package/dist/ui/runtime/tuiLogGate.d.ts.map +0 -1
  181. package/dist/ui/runtime/tuiLogGate.js +0 -68
  182. package/dist/ui/runtime/tuiLogGate.js.map +0 -1
  183. package/dist/ui/state/types.d.ts +0 -72
  184. package/dist/ui/state/types.d.ts.map +0 -1
  185. package/dist/ui/state/types.js +0 -6
  186. package/dist/ui/state/types.js.map +0 -1
  187. package/dist/ui/theme/borders.d.ts +0 -20
  188. package/dist/ui/theme/borders.d.ts.map +0 -1
  189. package/dist/ui/theme/borders.js +0 -55
  190. package/dist/ui/theme/borders.js.map +0 -1
  191. package/dist/ui/theme/tokens.d.ts +0 -28
  192. package/dist/ui/theme/tokens.d.ts.map +0 -1
  193. package/dist/ui/theme/tokens.js +0 -50
  194. package/dist/ui/theme/tokens.js.map +0 -1
  195. package/dist/ui/theme/typography.d.ts +0 -14
  196. package/dist/ui/theme/typography.d.ts.map +0 -1
  197. package/dist/ui/theme/typography.js +0 -30
  198. package/dist/ui/theme/typography.js.map +0 -1
  199. package/dist/ui/v3/collectors/assets.collector.d.ts +0 -20
  200. package/dist/ui/v3/collectors/assets.collector.d.ts.map +0 -1
  201. package/dist/ui/v3/collectors/assets.collector.js +0 -80
  202. package/dist/ui/v3/collectors/assets.collector.js.map +0 -1
  203. package/dist/ui/v3/collectors/capabilities.collector.d.ts +0 -18
  204. package/dist/ui/v3/collectors/capabilities.collector.d.ts.map +0 -1
  205. package/dist/ui/v3/collectors/capabilities.collector.js +0 -113
  206. package/dist/ui/v3/collectors/capabilities.collector.js.map +0 -1
  207. package/dist/ui/v3/collectors/network.collector.d.ts +0 -18
  208. package/dist/ui/v3/collectors/network.collector.d.ts.map +0 -1
  209. package/dist/ui/v3/collectors/network.collector.js +0 -37
  210. package/dist/ui/v3/collectors/network.collector.js.map +0 -1
  211. package/dist/ui/v3/collectors/posture.derive.d.ts +0 -24
  212. package/dist/ui/v3/collectors/posture.derive.d.ts.map +0 -1
  213. package/dist/ui/v3/collectors/posture.derive.js +0 -57
  214. package/dist/ui/v3/collectors/posture.derive.js.map +0 -1
  215. package/dist/ui/v3/collectors/resources.d.ts +0 -23
  216. package/dist/ui/v3/collectors/resources.d.ts.map +0 -1
  217. package/dist/ui/v3/collectors/resources.js +0 -136
  218. package/dist/ui/v3/collectors/resources.js.map +0 -1
  219. package/dist/ui/v3/commands/commandEngine.d.ts +0 -77
  220. package/dist/ui/v3/commands/commandEngine.d.ts.map +0 -1
  221. package/dist/ui/v3/commands/commandEngine.js +0 -3289
  222. package/dist/ui/v3/commands/commandEngine.js.map +0 -1
  223. package/dist/ui/v3/commands/commandResult.d.ts +0 -25
  224. package/dist/ui/v3/commands/commandResult.d.ts.map +0 -1
  225. package/dist/ui/v3/commands/commandResult.js +0 -19
  226. package/dist/ui/v3/commands/commandResult.js.map +0 -1
  227. package/dist/ui/v3/commands/diagnose.d.ts +0 -17
  228. package/dist/ui/v3/commands/diagnose.d.ts.map +0 -1
  229. package/dist/ui/v3/commands/diagnose.js +0 -62
  230. package/dist/ui/v3/commands/diagnose.js.map +0 -1
  231. package/dist/ui/v3/commands/errorClassifier.d.ts +0 -23
  232. package/dist/ui/v3/commands/errorClassifier.d.ts.map +0 -1
  233. package/dist/ui/v3/commands/errorClassifier.js +0 -63
  234. package/dist/ui/v3/commands/errorClassifier.js.map +0 -1
  235. package/dist/ui/v3/commands/parser.d.ts +0 -14
  236. package/dist/ui/v3/commands/parser.d.ts.map +0 -1
  237. package/dist/ui/v3/commands/parser.js +0 -29
  238. package/dist/ui/v3/commands/parser.js.map +0 -1
  239. package/dist/ui/v3/commands/router.d.ts +0 -13
  240. package/dist/ui/v3/commands/router.d.ts.map +0 -1
  241. package/dist/ui/v3/commands/router.js +0 -150
  242. package/dist/ui/v3/commands/router.js.map +0 -1
  243. package/dist/ui/v3/config/gateway.d.ts +0 -40
  244. package/dist/ui/v3/config/gateway.d.ts.map +0 -1
  245. package/dist/ui/v3/config/gateway.js +0 -113
  246. package/dist/ui/v3/config/gateway.js.map +0 -1
  247. package/dist/ui/v3/core/event.d.ts +0 -19
  248. package/dist/ui/v3/core/event.d.ts.map +0 -1
  249. package/dist/ui/v3/core/event.js +0 -7
  250. package/dist/ui/v3/core/event.js.map +0 -1
  251. package/dist/ui/v3/core/eventBus.d.ts +0 -39
  252. package/dist/ui/v3/core/eventBus.d.ts.map +0 -1
  253. package/dist/ui/v3/core/eventBus.js +0 -79
  254. package/dist/ui/v3/core/eventBus.js.map +0 -1
  255. package/dist/ui/v3/core/feedStore.d.ts +0 -34
  256. package/dist/ui/v3/core/feedStore.d.ts.map +0 -1
  257. package/dist/ui/v3/core/feedStore.js +0 -46
  258. package/dist/ui/v3/core/feedStore.js.map +0 -1
  259. package/dist/ui/v3/core/logger.d.ts +0 -40
  260. package/dist/ui/v3/core/logger.d.ts.map +0 -1
  261. package/dist/ui/v3/core/logger.js +0 -191
  262. package/dist/ui/v3/core/logger.js.map +0 -1
  263. package/dist/ui/v3/core/opEvent.d.ts +0 -15
  264. package/dist/ui/v3/core/opEvent.d.ts.map +0 -1
  265. package/dist/ui/v3/core/opEvent.js +0 -7
  266. package/dist/ui/v3/core/opEvent.js.map +0 -1
  267. package/dist/ui/v3/index.d.ts +0 -8
  268. package/dist/ui/v3/index.d.ts.map +0 -1
  269. package/dist/ui/v3/index.js +0 -51
  270. package/dist/ui/v3/index.js.map +0 -1
  271. package/dist/ui/v3/runtime/moduleConfig.d.ts +0 -21
  272. package/dist/ui/v3/runtime/moduleConfig.d.ts.map +0 -1
  273. package/dist/ui/v3/runtime/moduleConfig.js +0 -41
  274. package/dist/ui/v3/runtime/moduleConfig.js.map +0 -1
  275. package/dist/ui/v3/section0/index.d.ts +0 -22
  276. package/dist/ui/v3/section0/index.d.ts.map +0 -1
  277. package/dist/ui/v3/section0/index.js +0 -88
  278. package/dist/ui/v3/section0/index.js.map +0 -1
  279. package/dist/ui/v3/section0/runtime/createScreen.d.ts +0 -27
  280. package/dist/ui/v3/section0/runtime/createScreen.d.ts.map +0 -1
  281. package/dist/ui/v3/section0/runtime/createScreen.js +0 -55
  282. package/dist/ui/v3/section0/runtime/createScreen.js.map +0 -1
  283. package/dist/ui/v3/section0/runtime/lifecycle.d.ts +0 -53
  284. package/dist/ui/v3/section0/runtime/lifecycle.d.ts.map +0 -1
  285. package/dist/ui/v3/section0/runtime/lifecycle.js +0 -172
  286. package/dist/ui/v3/section0/runtime/lifecycle.js.map +0 -1
  287. package/dist/ui/v3/section1/index.d.ts +0 -19
  288. package/dist/ui/v3/section1/index.d.ts.map +0 -1
  289. package/dist/ui/v3/section1/index.js +0 -413
  290. package/dist/ui/v3/section1/index.js.map +0 -1
  291. package/dist/ui/v3/section1/runtime/commandLine.d.ts +0 -49
  292. package/dist/ui/v3/section1/runtime/commandLine.d.ts.map +0 -1
  293. package/dist/ui/v3/section1/runtime/commandLine.js +0 -183
  294. package/dist/ui/v3/section1/runtime/commandLine.js.map +0 -1
  295. package/dist/ui/v3/section1/runtime/focusLock.d.ts +0 -24
  296. package/dist/ui/v3/section1/runtime/focusLock.d.ts.map +0 -1
  297. package/dist/ui/v3/section1/runtime/focusLock.js +0 -44
  298. package/dist/ui/v3/section1/runtime/focusLock.js.map +0 -1
  299. package/dist/ui/v3/state/assertUiState.d.ts +0 -27
  300. package/dist/ui/v3/state/assertUiState.d.ts.map +0 -1
  301. package/dist/ui/v3/state/assertUiState.js +0 -89
  302. package/dist/ui/v3/state/assertUiState.js.map +0 -1
  303. package/dist/ui/v3/state/capabilitiesStore.d.ts +0 -54
  304. package/dist/ui/v3/state/capabilitiesStore.d.ts.map +0 -1
  305. package/dist/ui/v3/state/capabilitiesStore.js +0 -76
  306. package/dist/ui/v3/state/capabilitiesStore.js.map +0 -1
  307. package/dist/ui/v3/state/defaultState.d.ts +0 -19
  308. package/dist/ui/v3/state/defaultState.d.ts.map +0 -1
  309. package/dist/ui/v3/state/defaultState.js +0 -28
  310. package/dist/ui/v3/state/defaultState.js.map +0 -1
  311. package/dist/ui/v3/state/gatewayConnectionStore.d.ts +0 -72
  312. package/dist/ui/v3/state/gatewayConnectionStore.d.ts.map +0 -1
  313. package/dist/ui/v3/state/gatewayConnectionStore.js +0 -108
  314. package/dist/ui/v3/state/gatewayConnectionStore.js.map +0 -1
  315. package/dist/ui/v3/state/initializePostureState.d.ts +0 -23
  316. package/dist/ui/v3/state/initializePostureState.d.ts.map +0 -1
  317. package/dist/ui/v3/state/initializePostureState.js +0 -41
  318. package/dist/ui/v3/state/initializePostureState.js.map +0 -1
  319. package/dist/ui/v3/state/panelStore.d.ts +0 -80
  320. package/dist/ui/v3/state/panelStore.d.ts.map +0 -1
  321. package/dist/ui/v3/state/panelStore.js +0 -131
  322. package/dist/ui/v3/state/panelStore.js.map +0 -1
  323. package/dist/ui/v3/state/resourcesData.d.ts +0 -15
  324. package/dist/ui/v3/state/resourcesData.d.ts.map +0 -1
  325. package/dist/ui/v3/state/resourcesData.js +0 -7
  326. package/dist/ui/v3/state/resourcesData.js.map +0 -1
  327. package/dist/ui/v3/state/uiState.d.ts +0 -22
  328. package/dist/ui/v3/state/uiState.d.ts.map +0 -1
  329. package/dist/ui/v3/state/uiState.js +0 -13
  330. package/dist/ui/v3/state/uiState.js.map +0 -1
  331. package/dist/ui/v3/state/uiStateBuilder.d.ts +0 -32
  332. package/dist/ui/v3/state/uiStateBuilder.d.ts.map +0 -1
  333. package/dist/ui/v3/state/uiStateBuilder.js +0 -73
  334. package/dist/ui/v3/state/uiStateBuilder.js.map +0 -1
  335. package/dist/ui/v3/state/uiStateTypes.d.ts +0 -59
  336. package/dist/ui/v3/state/uiStateTypes.d.ts.map +0 -1
  337. package/dist/ui/v3/state/uiStateTypes.js +0 -8
  338. package/dist/ui/v3/state/uiStateTypes.js.map +0 -1
  339. package/dist/ui/v3/state/value.d.ts +0 -80
  340. package/dist/ui/v3/state/value.d.ts.map +0 -1
  341. package/dist/ui/v3/state/value.js +0 -96
  342. package/dist/ui/v3/state/value.js.map +0 -1
  343. package/dist/ui/v3/tui/geometry.d.ts +0 -83
  344. package/dist/ui/v3/tui/geometry.d.ts.map +0 -1
  345. package/dist/ui/v3/tui/geometry.js +0 -201
  346. package/dist/ui/v3/tui/geometry.js.map +0 -1
  347. package/dist/ui/v3/tui/startTui.d.ts +0 -37
  348. package/dist/ui/v3/tui/startTui.d.ts.map +0 -1
  349. package/dist/ui/v3/tui/startTui.js +0 -61
  350. package/dist/ui/v3/tui/startTui.js.map +0 -1
  351. package/dist/ui/v3/tui/terminalMode.d.ts +0 -31
  352. package/dist/ui/v3/tui/terminalMode.d.ts.map +0 -1
  353. package/dist/ui/v3/tui/terminalMode.js +0 -76
  354. package/dist/ui/v3/tui/terminalMode.js.map +0 -1
  355. package/dist/ui/v3/ui/debugUtils.d.ts +0 -67
  356. package/dist/ui/v3/ui/debugUtils.d.ts.map +0 -1
  357. package/dist/ui/v3/ui/debugUtils.js +0 -238
  358. package/dist/ui/v3/ui/debugUtils.js.map +0 -1
  359. package/dist/ui/v3/ui/focus.d.ts +0 -28
  360. package/dist/ui/v3/ui/focus.d.ts.map +0 -1
  361. package/dist/ui/v3/ui/focus.js +0 -38
  362. package/dist/ui/v3/ui/focus.js.map +0 -1
  363. package/dist/ui/v3/ui/layout/hubLayout.d.ts +0 -43
  364. package/dist/ui/v3/ui/layout/hubLayout.d.ts.map +0 -1
  365. package/dist/ui/v3/ui/layout/hubLayout.js +0 -170
  366. package/dist/ui/v3/ui/layout/hubLayout.js.map +0 -1
  367. package/dist/ui/v3/ui/layout/phase1Layout.d.ts +0 -63
  368. package/dist/ui/v3/ui/layout/phase1Layout.d.ts.map +0 -1
  369. package/dist/ui/v3/ui/layout/phase1Layout.js +0 -274
  370. package/dist/ui/v3/ui/layout/phase1Layout.js.map +0 -1
  371. package/dist/ui/v3/ui/layout/phase1Layout.test.d.ts +0 -5
  372. package/dist/ui/v3/ui/layout/phase1Layout.test.d.ts.map +0 -1
  373. package/dist/ui/v3/ui/layout/phase1Layout.test.js +0 -120
  374. package/dist/ui/v3/ui/layout/phase1Layout.test.js.map +0 -1
  375. package/dist/ui/v3/ui/minimalRuntime.d.ts +0 -14
  376. package/dist/ui/v3/ui/minimalRuntime.d.ts.map +0 -1
  377. package/dist/ui/v3/ui/minimalRuntime.js +0 -111
  378. package/dist/ui/v3/ui/minimalRuntime.js.map +0 -1
  379. package/dist/ui/v3/ui/panels/AssetsPanel.d.ts +0 -17
  380. package/dist/ui/v3/ui/panels/AssetsPanel.d.ts.map +0 -1
  381. package/dist/ui/v3/ui/panels/AssetsPanel.js +0 -53
  382. package/dist/ui/v3/ui/panels/AssetsPanel.js.map +0 -1
  383. package/dist/ui/v3/ui/panels/CapabilitiesPanel.d.ts +0 -20
  384. package/dist/ui/v3/ui/panels/CapabilitiesPanel.d.ts.map +0 -1
  385. package/dist/ui/v3/ui/panels/CapabilitiesPanel.js +0 -67
  386. package/dist/ui/v3/ui/panels/CapabilitiesPanel.js.map +0 -1
  387. package/dist/ui/v3/ui/panels/NetworkPanel.d.ts +0 -31
  388. package/dist/ui/v3/ui/panels/NetworkPanel.d.ts.map +0 -1
  389. package/dist/ui/v3/ui/panels/NetworkPanel.js +0 -153
  390. package/dist/ui/v3/ui/panels/NetworkPanel.js.map +0 -1
  391. package/dist/ui/v3/ui/panels/PosturePanel.d.ts +0 -16
  392. package/dist/ui/v3/ui/panels/PosturePanel.d.ts.map +0 -1
  393. package/dist/ui/v3/ui/panels/PosturePanel.js +0 -60
  394. package/dist/ui/v3/ui/panels/PosturePanel.js.map +0 -1
  395. package/dist/ui/v3/ui/panels/ResourcesPanel.d.ts +0 -20
  396. package/dist/ui/v3/ui/panels/ResourcesPanel.d.ts.map +0 -1
  397. package/dist/ui/v3/ui/panels/ResourcesPanel.js +0 -66
  398. package/dist/ui/v3/ui/panels/ResourcesPanel.js.map +0 -1
  399. package/dist/ui/v3/ui/phase1Runtime.d.ts +0 -29
  400. package/dist/ui/v3/ui/phase1Runtime.d.ts.map +0 -1
  401. package/dist/ui/v3/ui/phase1Runtime.js +0 -1648
  402. package/dist/ui/v3/ui/phase1Runtime.js.map +0 -1
  403. package/dist/ui/v3/ui/phase1RuntimeClean.d.ts +0 -34
  404. package/dist/ui/v3/ui/phase1RuntimeClean.d.ts.map +0 -1
  405. package/dist/ui/v3/ui/phase1RuntimeClean.js +0 -1841
  406. package/dist/ui/v3/ui/phase1RuntimeClean.js.map +0 -1
  407. package/dist/ui/v3/ui/primitives/Panel.d.ts +0 -39
  408. package/dist/ui/v3/ui/primitives/Panel.d.ts.map +0 -1
  409. package/dist/ui/v3/ui/primitives/Panel.js +0 -105
  410. package/dist/ui/v3/ui/primitives/Panel.js.map +0 -1
  411. package/dist/ui/v3/ui/theme.d.ts +0 -37
  412. package/dist/ui/v3/ui/theme.d.ts.map +0 -1
  413. package/dist/ui/v3/ui/theme.js +0 -40
  414. package/dist/ui/v3/ui/theme.js.map +0 -1
  415. package/dist/ui/v3/ui/uiRuntime.d.ts +0 -40
  416. package/dist/ui/v3/ui/uiRuntime.d.ts.map +0 -1
  417. package/dist/ui/v3/ui/uiRuntime.js +0 -60
  418. package/dist/ui/v3/ui/uiRuntime.js.map +0 -1
  419. package/dist/ui/v3/ui/widgets/CommandLine.d.ts +0 -26
  420. package/dist/ui/v3/ui/widgets/CommandLine.d.ts.map +0 -1
  421. package/dist/ui/v3/ui/widgets/CommandLine.js +0 -67
  422. package/dist/ui/v3/ui/widgets/CommandLine.js.map +0 -1
  423. package/dist/ui/v3/v1Adapters/agents.d.ts +0 -72
  424. package/dist/ui/v3/v1Adapters/agents.d.ts.map +0 -1
  425. package/dist/ui/v3/v1Adapters/agents.js +0 -182
  426. package/dist/ui/v3/v1Adapters/agents.js.map +0 -1
  427. package/dist/ui/v3/v1Adapters/config.d.ts +0 -67
  428. package/dist/ui/v3/v1Adapters/config.d.ts.map +0 -1
  429. package/dist/ui/v3/v1Adapters/config.js +0 -78
  430. package/dist/ui/v3/v1Adapters/config.js.map +0 -1
  431. package/dist/ui/v3/v1Adapters/connect.d.ts +0 -77
  432. package/dist/ui/v3/v1Adapters/connect.d.ts.map +0 -1
  433. package/dist/ui/v3/v1Adapters/connect.js +0 -576
  434. package/dist/ui/v3/v1Adapters/connect.js.map +0 -1
  435. package/dist/ui/v3/v1Adapters/httpDebug.d.ts +0 -19
  436. package/dist/ui/v3/v1Adapters/httpDebug.d.ts.map +0 -1
  437. package/dist/ui/v3/v1Adapters/httpDebug.js +0 -60
  438. package/dist/ui/v3/v1Adapters/httpDebug.js.map +0 -1
  439. package/dist/ui/v3/v1Adapters/runs.d.ts +0 -77
  440. package/dist/ui/v3/v1Adapters/runs.d.ts.map +0 -1
  441. package/dist/ui/v3/v1Adapters/runs.js +0 -339
  442. package/dist/ui/v3/v1Adapters/runs.js.map +0 -1
  443. package/dist/ui/v4/engine/renderFrame.d.ts +0 -47
  444. package/dist/ui/v4/engine/renderFrame.d.ts.map +0 -1
  445. package/dist/ui/v4/engine/renderFrame.js +0 -653
  446. package/dist/ui/v4/engine/renderFrame.js.map +0 -1
  447. package/dist/ui/v4/engine/resizeController.d.ts +0 -48
  448. package/dist/ui/v4/engine/resizeController.d.ts.map +0 -1
  449. package/dist/ui/v4/engine/resizeController.js +0 -285
  450. package/dist/ui/v4/engine/resizeController.js.map +0 -1
  451. package/dist/ui/v4/engine/safeViewport.d.ts +0 -47
  452. package/dist/ui/v4/engine/safeViewport.d.ts.map +0 -1
  453. package/dist/ui/v4/engine/safeViewport.js +0 -123
  454. package/dist/ui/v4/engine/safeViewport.js.map +0 -1
  455. package/dist/ui/v4/engine/terminalProfile.d.ts +0 -56
  456. package/dist/ui/v4/engine/terminalProfile.d.ts.map +0 -1
  457. package/dist/ui/v4/engine/terminalProfile.js +0 -115
  458. package/dist/ui/v4/engine/terminalProfile.js.map +0 -1
  459. package/dist/ui/v4/index.d.ts +0 -28
  460. package/dist/ui/v4/index.d.ts.map +0 -1
  461. package/dist/ui/v4/index.js +0 -993
  462. package/dist/ui/v4/index.js.map +0 -1
  463. package/dist/ui/v4/layout/layoutEngine.d.ts +0 -62
  464. package/dist/ui/v4/layout/layoutEngine.d.ts.map +0 -1
  465. package/dist/ui/v4/layout/layoutEngine.js +0 -294
  466. package/dist/ui/v4/layout/layoutEngine.js.map +0 -1
  467. package/dist/ui/v4/runtime/keepAlive.d.ts +0 -21
  468. package/dist/ui/v4/runtime/keepAlive.d.ts.map +0 -1
  469. package/dist/ui/v4/runtime/keepAlive.js +0 -149
  470. package/dist/ui/v4/runtime/keepAlive.js.map +0 -1
  471. package/dist/ui/v4/runtime/logger.d.ts +0 -35
  472. package/dist/ui/v4/runtime/logger.d.ts.map +0 -1
  473. package/dist/ui/v4/runtime/logger.js +0 -109
  474. package/dist/ui/v4/runtime/logger.js.map +0 -1
  475. package/dist/ui/v5/debug/assertNoOverflow.d.ts +0 -28
  476. package/dist/ui/v5/debug/assertNoOverflow.d.ts.map +0 -1
  477. package/dist/ui/v5/debug/assertNoOverflow.js +0 -63
  478. package/dist/ui/v5/debug/assertNoOverflow.js.map +0 -1
  479. package/dist/ui/v5/debug/debugCommands.d.ts +0 -20
  480. package/dist/ui/v5/debug/debugCommands.d.ts.map +0 -1
  481. package/dist/ui/v5/debug/debugCommands.js +0 -461
  482. package/dist/ui/v5/debug/debugCommands.js.map +0 -1
  483. package/dist/ui/v5/debugCommands.d.ts +0 -20
  484. package/dist/ui/v5/debugCommands.d.ts.map +0 -1
  485. package/dist/ui/v5/debugCommands.js +0 -81
  486. package/dist/ui/v5/debugCommands.js.map +0 -1
  487. package/dist/ui/v5/guardrails/stdoutGuard.d.ts +0 -23
  488. package/dist/ui/v5/guardrails/stdoutGuard.d.ts.map +0 -1
  489. package/dist/ui/v5/guardrails/stdoutGuard.js +0 -94
  490. package/dist/ui/v5/guardrails/stdoutGuard.js.map +0 -1
  491. package/dist/ui/v5/guardrails/terminalRestore.d.ts +0 -17
  492. package/dist/ui/v5/guardrails/terminalRestore.d.ts.map +0 -1
  493. package/dist/ui/v5/guardrails/terminalRestore.js +0 -47
  494. package/dist/ui/v5/guardrails/terminalRestore.js.map +0 -1
  495. package/dist/ui/v5/index.d.ts +0 -30
  496. package/dist/ui/v5/index.d.ts.map +0 -1
  497. package/dist/ui/v5/index.js +0 -243
  498. package/dist/ui/v5/index.js.map +0 -1
  499. package/dist/ui/v5/kernel/kernel.d.ts +0 -81
  500. package/dist/ui/v5/kernel/kernel.d.ts.map +0 -1
  501. package/dist/ui/v5/kernel/kernel.js +0 -339
  502. package/dist/ui/v5/kernel/kernel.js.map +0 -1
  503. package/dist/ui/v5/kernel.d.ts +0 -75
  504. package/dist/ui/v5/kernel.d.ts.map +0 -1
  505. package/dist/ui/v5/kernel.js +0 -289
  506. package/dist/ui/v5/kernel.js.map +0 -1
  507. package/dist/ui/v5/layout/clampRect.d.ts +0 -28
  508. package/dist/ui/v5/layout/clampRect.d.ts.map +0 -1
  509. package/dist/ui/v5/layout/clampRect.js +0 -45
  510. package/dist/ui/v5/layout/clampRect.js.map +0 -1
  511. package/dist/ui/v5/layout/layoutEngine.d.ts +0 -16
  512. package/dist/ui/v5/layout/layoutEngine.d.ts.map +0 -1
  513. package/dist/ui/v5/layout/layoutEngine.js +0 -99
  514. package/dist/ui/v5/layout/layoutEngine.js.map +0 -1
  515. package/dist/ui/v5/renderGate.d.ts +0 -19
  516. package/dist/ui/v5/renderGate.d.ts.map +0 -1
  517. package/dist/ui/v5/renderGate.js +0 -36
  518. package/dist/ui/v5/renderGate.js.map +0 -1
  519. package/dist/ui/v5/resize/resizeController.d.ts +0 -62
  520. package/dist/ui/v5/resize/resizeController.d.ts.map +0 -1
  521. package/dist/ui/v5/resize/resizeController.js +0 -141
  522. package/dist/ui/v5/resize/resizeController.js.map +0 -1
  523. package/dist/ui/v5/resizeController.d.ts +0 -55
  524. package/dist/ui/v5/resizeController.d.ts.map +0 -1
  525. package/dist/ui/v5/resizeController.js +0 -124
  526. package/dist/ui/v5/resizeController.js.map +0 -1
  527. package/dist/ui/v5/runtime/keepAlive.d.ts +0 -37
  528. package/dist/ui/v5/runtime/keepAlive.d.ts.map +0 -1
  529. package/dist/ui/v5/runtime/keepAlive.js +0 -122
  530. package/dist/ui/v5/runtime/keepAlive.js.map +0 -1
  531. package/dist/ui/v5/runtime/restoreTerminal.d.ts +0 -34
  532. package/dist/ui/v5/runtime/restoreTerminal.d.ts.map +0 -1
  533. package/dist/ui/v5/runtime/restoreTerminal.js +0 -100
  534. package/dist/ui/v5/runtime/restoreTerminal.js.map +0 -1
  535. package/dist/ui/v5/runtime/stdoutGuard.d.ts +0 -42
  536. package/dist/ui/v5/runtime/stdoutGuard.d.ts.map +0 -1
  537. package/dist/ui/v5/runtime/stdoutGuard.js +0 -156
  538. package/dist/ui/v5/runtime/stdoutGuard.js.map +0 -1
  539. package/dist/ui/v5/viewport/getViewport.d.ts +0 -23
  540. package/dist/ui/v5/viewport/getViewport.d.ts.map +0 -1
  541. package/dist/ui/v5/viewport/getViewport.js +0 -117
  542. package/dist/ui/v5/viewport/getViewport.js.map +0 -1
  543. package/dist/ui/v5/viewport.d.ts +0 -41
  544. package/dist/ui/v5/viewport.d.ts.map +0 -1
  545. package/dist/ui/v5/viewport.js +0 -90
  546. package/dist/ui/v5/viewport.js.map +0 -1
  547. package/dist/ui/widgets/flagRow.d.ts +0 -25
  548. package/dist/ui/widgets/flagRow.d.ts.map +0 -1
  549. package/dist/ui/widgets/flagRow.js +0 -57
  550. package/dist/ui/widgets/flagRow.js.map +0 -1
  551. package/dist/ui/widgets/index.d.ts +0 -9
  552. package/dist/ui/widgets/index.d.ts.map +0 -1
  553. package/dist/ui/widgets/index.js +0 -9
  554. package/dist/ui/widgets/index.js.map +0 -1
  555. package/dist/ui/widgets/meter.d.ts +0 -18
  556. package/dist/ui/widgets/meter.d.ts.map +0 -1
  557. package/dist/ui/widgets/meter.js +0 -38
  558. package/dist/ui/widgets/meter.js.map +0 -1
  559. package/dist/ui/widgets/miniMap.d.ts +0 -26
  560. package/dist/ui/widgets/miniMap.d.ts.map +0 -1
  561. package/dist/ui/widgets/miniMap.js +0 -94
  562. package/dist/ui/widgets/miniMap.js.map +0 -1
  563. package/dist/ui/widgets/sparkline.d.ts +0 -17
  564. package/dist/ui/widgets/sparkline.d.ts.map +0 -1
  565. package/dist/ui/widgets/sparkline.js +0 -65
  566. package/dist/ui/widgets/sparkline.js.map +0 -1
@@ -1,150 +0,0 @@
1
- /**
2
- * Command Router (Phase 3)
3
- *
4
- * Routes commands to handlers.
5
- * All output goes through EventBus (not direct feed manipulation).
6
- */
7
- import { eventBus } from '../core/eventBus.js';
8
- import { feedStore } from '../core/feedStore.js';
9
- import { exitResult, noOpResult } from './commandResult.js';
10
- import { getLastState } from '../state/uiStateBuilder.js';
11
- import { isAvailable } from '../state/value.js';
12
- /**
13
- * Route a command
14
- * Commands emit events through EventBus, not directly to feed
15
- */
16
- export function routeCommand(cmd, args) {
17
- const command = cmd.toLowerCase().trim();
18
- switch (command) {
19
- case 'help':
20
- return handleHelp();
21
- case 'clear':
22
- return handleClear();
23
- case 'exit':
24
- case 'quit':
25
- return handleExit();
26
- case 'home':
27
- return handleHome();
28
- case 'status':
29
- return handleStatus();
30
- case 'testfeed':
31
- return handleTestFeed(args);
32
- default:
33
- return handleUnknown(cmd);
34
- }
35
- }
36
- /**
37
- * Handle help command
38
- * Emits event through EventBus
39
- */
40
- function handleHelp() {
41
- eventBus.emitTag('SYS', 'COMMANDS: help, clear, exit, home, status, testfeed', 'INFO');
42
- return noOpResult();
43
- }
44
- /**
45
- * Handle clear command
46
- * Clears feed store, then emits event
47
- */
48
- function handleClear() {
49
- feedStore.clear();
50
- eventBus.emitTag('SYS', 'FEED CLEARED');
51
- return noOpResult();
52
- }
53
- /**
54
- * Handle exit command
55
- */
56
- function handleExit() {
57
- return exitResult();
58
- }
59
- /**
60
- * Handle home command
61
- * S0.3: Returns to HUB state
62
- */
63
- function handleHome() {
64
- // S0.3: State machine - always return to HUB
65
- eventBus.emitTag('SYS', 'HOME (HUB state)');
66
- return noOpResult();
67
- }
68
- /**
69
- * Handle status command
70
- * Dumps current UiState summary to OPERATIONS
71
- */
72
- function handleStatus() {
73
- const state = getLastState();
74
- // Emit status summary
75
- eventBus.emitTag('SYS', '=== UI STATE SUMMARY ===');
76
- // Resources status
77
- if (isAvailable(state.resources)) {
78
- const r = state.resources.value;
79
- eventBus.emitTag('SYS', `RESOURCES: CPU ${r.cpuPct.toFixed(1)}% | RAM ${r.ramUsedMB}/${r.ramTotalMB}MB | Disk ${r.diskUsedGB}/${r.diskTotalGB}GB`);
80
- }
81
- else {
82
- eventBus.emitTag('SYS', `RESOURCES: ${state.resources.availability} - ${state.resources.reason || 'Unknown'}`);
83
- }
84
- eventBus.emitTag('SYS', '=== END STATE SUMMARY ===');
85
- return noOpResult();
86
- }
87
- /**
88
- * Handle testfeed command
89
- * Spams long lines to test truncation
90
- */
91
- function handleTestFeed(args) {
92
- const mode = args[0]?.toLowerCase() || 'short';
93
- if (mode === 'short') {
94
- eventBus.emitTag('SYS', 'Short line test');
95
- eventBus.emitTag('CMD', 'This is a short message');
96
- eventBus.emitTag('RUN', 'Testing short lines');
97
- }
98
- else if (mode === 'long') {
99
- // Generate very long lines
100
- const longMsg1 = 'A'.repeat(200) + ' - This is a very long message that should be truncated with ...';
101
- const longMsg2 = 'B'.repeat(150) + ' - Another long message for testing truncation behavior';
102
- const longMsg3 = 'C'.repeat(300) + ' - Extremely long message to test border overflow prevention';
103
- eventBus.emitTag('SYS', longMsg1);
104
- eventBus.emitTag('CMD', longMsg2);
105
- eventBus.emitTag('ERR', longMsg3);
106
- }
107
- else if (mode === 'mixed') {
108
- // Mix of short and long
109
- eventBus.emitTag('SYS', 'Short message');
110
- eventBus.emitTag('CMD', 'X'.repeat(100) + ' - Long message mixed with short');
111
- eventBus.emitTag('RUN', 'Another short');
112
- eventBus.emitTag('NET', 'Y'.repeat(250) + ' - Very long network message');
113
- eventBus.emitTag('SYS', 'Final short message');
114
- }
115
- else {
116
- eventBus.emitTag('ERR', `Unknown testfeed mode: ${mode} (use: short, long, or mixed)`);
117
- }
118
- return noOpResult();
119
- }
120
- /**
121
- * Sanitize user input for display in error messages
122
- * Prevents raw echo of full user input (security/UX hardening)
123
- *
124
- * Rules:
125
- * - Truncate to reasonable length (50 chars)
126
- * - Strip control characters and newlines
127
- * - Replace problematic characters
128
- */
129
- function sanitizeUserInput(input, maxLength = 50) {
130
- // Remove control characters and newlines
131
- let sanitized = input.replace(/[\x00-\x1F\x7F-\x9F\n\r\t]/g, '');
132
- // Truncate to max length
133
- if (sanitized.length > maxLength) {
134
- sanitized = sanitized.substring(0, maxLength) + '...';
135
- }
136
- return sanitized;
137
- }
138
- /**
139
- * Handle unknown command
140
- * Emits error event through EventBus
141
- *
142
- * HARDENED: No raw echo of full user input in errors
143
- */
144
- function handleUnknown(cmd) {
145
- // HARDENED: Sanitize user input - don't echo full command
146
- const sanitizedCmd = sanitizeUserInput(cmd, 50);
147
- eventBus.emitTag('ERR', `UNKNOWN COMMAND: ${sanitizedCmd} (try: help)`);
148
- return noOpResult();
149
- }
150
- //# sourceMappingURL=router.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"router.js","sourceRoot":"","sources":["../../../../src/ui/v3/commands/router.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAA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CAAC,CAAC;IAEjE,yBAAyB;IACzB,IAAI,SAAS,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;QACjC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC;IACxD,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,SAAS,aAAa,CAAC,GAAW;IAChC,0DAA0D;IAC1D,MAAM,YAAY,GAAG,iBAAiB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAChD,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,oBAAoB,YAAY,cAAc,CAAC,CAAC;IACxE,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC"}
@@ -1,40 +0,0 @@
1
- /**
2
- * Section 6.2: Canonical Gateway Endpoint (FINAL, NON-NEGOTIABLE)
3
- *
4
- * Single source of truth for the platform Gateway endpoint.
5
- * This is the only place the endpoint URL should be defined.
6
- *
7
- * Smart resolution based on runtime:
8
- * - GATEWAY_URL env var (highest priority)
9
- * - ~/.4runr/config.json (if exists)
10
- * - Smart default based on runtime:
11
- * - Linux + EC2-like hostname → http://127.0.0.1:3001
12
- * - Otherwise → require config or show nextAction
13
- */
14
- /**
15
- * The canonical Gateway URL (fallback only - use resolveGatewayUrl() instead)
16
- */
17
- export declare const DEFAULT_GATEWAY_URL: string;
18
- /**
19
- * Resolve the Gateway URL with source tracking
20
- *
21
- * Priority:
22
- * 1. GATEWAY_URL environment variable (if set - allows override for development)
23
- * 2. ~/.4runr/config.json (if exists - written at install/provisioning time)
24
- * 3. Smart default based on runtime:
25
- * - Linux + EC2-like hostname → http://127.0.0.1:3001
26
- * - Windows/Mac → http://127.0.0.1:3001 (expects SSH tunnel)
27
- * - Otherwise → http://13.222.1.157:3001 (public IP fallback)
28
- *
29
- * Returns both the URL and the source for logging/debugging
30
- */
31
- export declare function resolveGatewayUrlWithSource(): {
32
- url: string;
33
- source: string;
34
- };
35
- /**
36
- * Resolve the Gateway URL (backward compatibility)
37
- */
38
- export declare function resolveGatewayUrl(): string;
39
- export declare function getCanonicalGatewayEndpoint(): string;
40
- //# sourceMappingURL=gateway.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/config/gateway.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAoEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAoB,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,IAAI;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAc7E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAGD,wBAAgB,2BAA2B,IAAI,MAAM,CAEpD"}
@@ -1,113 +0,0 @@
1
- /**
2
- * Section 6.2: Canonical Gateway Endpoint (FINAL, NON-NEGOTIABLE)
3
- *
4
- * Single source of truth for the platform Gateway endpoint.
5
- * This is the only place the endpoint URL should be defined.
6
- *
7
- * Smart resolution based on runtime:
8
- * - GATEWAY_URL env var (highest priority)
9
- * - ~/.4runr/config.json (if exists)
10
- * - Smart default based on runtime:
11
- * - Linux + EC2-like hostname → http://127.0.0.1:3001
12
- * - Otherwise → require config or show nextAction
13
- */
14
- import * as os from 'os';
15
- import * as fs from 'fs';
16
- import * as path from 'path';
17
- import { homedir } from 'os';
18
- /**
19
- * Get config directory path (~/.4runr)
20
- */
21
- function getConfigDir() {
22
- const configDir = path.join(homedir(), '.4runr');
23
- if (!fs.existsSync(configDir)) {
24
- fs.mkdirSync(configDir, { recursive: true });
25
- }
26
- return configDir;
27
- }
28
- /**
29
- * Load saved gateway URL from config file
30
- * Returns null if not found
31
- */
32
- function loadSavedGatewayUrl() {
33
- try {
34
- const configPath = path.join(getConfigDir(), 'config.json');
35
- if (fs.existsSync(configPath)) {
36
- const data = fs.readFileSync(configPath, 'utf-8');
37
- const config = JSON.parse(data);
38
- if (config.gatewayUrl && typeof config.gatewayUrl === 'string') {
39
- return config.gatewayUrl;
40
- }
41
- }
42
- }
43
- catch {
44
- // File read/parse failed - ignore
45
- }
46
- return null;
47
- }
48
- /**
49
- * Check if hostname looks like EC2 (ip-*-*-*-* pattern)
50
- */
51
- function isEc2Hostname(hostname) {
52
- return /^ip-\d+-\d+-\d+-\d+/.test(hostname);
53
- }
54
- /**
55
- * Get smart default Gateway URL based on runtime
56
- */
57
- function getSmartDefault() {
58
- const platform = process.platform;
59
- const hostname = os.hostname();
60
- // If running on Linux with EC2-like hostname, assume localhost
61
- if (platform === 'linux' && isEc2Hostname(hostname)) {
62
- return 'http://127.0.0.1:3001';
63
- }
64
- // For Windows/remote clients, try localhost first (SSH tunnel or local gateway)
65
- // If that fails, connect() will auto-fallback to public IP
66
- if (platform === 'win32' || platform === 'darwin') {
67
- return 'http://127.0.0.1:3001';
68
- }
69
- // Fallback: use public IP (requires security group configuration)
70
- // This is less secure but works if security group is properly configured
71
- return 'http://13.222.1.157:3001';
72
- }
73
- /**
74
- * The canonical Gateway URL (fallback only - use resolveGatewayUrl() instead)
75
- */
76
- export const DEFAULT_GATEWAY_URL = getSmartDefault();
77
- /**
78
- * Resolve the Gateway URL with source tracking
79
- *
80
- * Priority:
81
- * 1. GATEWAY_URL environment variable (if set - allows override for development)
82
- * 2. ~/.4runr/config.json (if exists - written at install/provisioning time)
83
- * 3. Smart default based on runtime:
84
- * - Linux + EC2-like hostname → http://127.0.0.1:3001
85
- * - Windows/Mac → http://127.0.0.1:3001 (expects SSH tunnel)
86
- * - Otherwise → http://13.222.1.157:3001 (public IP fallback)
87
- *
88
- * Returns both the URL and the source for logging/debugging
89
- */
90
- export function resolveGatewayUrlWithSource() {
91
- // Priority 1: Environment variable
92
- if (process.env.GATEWAY_URL) {
93
- return { url: process.env.GATEWAY_URL, source: 'env:GATEWAY_URL' };
94
- }
95
- // Priority 2: Config file
96
- const savedUrl = loadSavedGatewayUrl();
97
- if (savedUrl) {
98
- return { url: savedUrl, source: 'config:~/.4runr/config.json' };
99
- }
100
- // Priority 3: Smart default
101
- return { url: getSmartDefault(), source: 'default:smart' };
102
- }
103
- /**
104
- * Resolve the Gateway URL (backward compatibility)
105
- */
106
- export function resolveGatewayUrl() {
107
- return resolveGatewayUrlWithSource().url;
108
- }
109
- // Legacy exports for backwards compatibility
110
- export function getCanonicalGatewayEndpoint() {
111
- return resolveGatewayUrl();
112
- }
113
- //# sourceMappingURL=gateway.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gateway.js","sourceRoot":"","sources":["../../../../src/ui/v3/config/gateway.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAE7B;;GAEG;AACH,SAAS,YAAY;IACnB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;IACjD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,SAAS,mBAAmB;IAC1B,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,aAAa,CAAC,CAAC;QAC5D,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YAClD,MAAM,MAAM,GAAG,IAAI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,EAAE,CAAC;QACb,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,6BAA6B,EAAE,CAAC;IAClE,CAAC;IAED,4BAA4B;IAC5B,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;AAC7D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,2BAA2B,EAAE,CAAC,GAAG,CAAC;AAC3C,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,2BAA2B;IACzC,OAAO,iBAAiB,EAAE,CAAC;AAC7B,CAAC"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Event Type
3
- *
4
- * Minimal event interface for the EventBus system.
5
- */
6
- export type EventTag = 'CMD' | 'SYS' | 'ERR' | 'NET' | 'DB' | 'SEC' | 'RUN';
7
- export type EventLevel = 'INFO' | 'WARN' | 'ERROR';
8
- export interface Event {
9
- id: string;
10
- ts: number;
11
- tag: EventTag;
12
- level: EventLevel;
13
- message: string;
14
- }
15
- /**
16
- * Event input (without id and ts - will be assigned)
17
- */
18
- export type EventInput = Omit<Event, 'id' | 'ts'>;
19
- //# sourceMappingURL=event.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/core/event.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,CAAC;AAE5E,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnD,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,QAAQ,CAAC;IACd,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Event Type
3
- *
4
- * Minimal event interface for the EventBus system.
5
- */
6
- export {};
7
- //# sourceMappingURL=event.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.js","sourceRoot":"","sources":["../../../../src/ui/v3/core/event.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -1,39 +0,0 @@
1
- /**
2
- * Section 2: EventBus
3
- *
4
- * In-memory pub/sub system for Operations Feed.
5
- * All visible output goes through the EventBus.
6
- *
7
- * Rules:
8
- * - In-memory only (no persistence)
9
- * - No UI imports inside bus. Bus is pure logic.
10
- * - Must support multiple subscribers.
11
- * - Must return an unsubscribe() function.
12
- */
13
- import type { OpEvent } from './opEvent.js';
14
- export type EventListener = (e: OpEvent) => void;
15
- declare class EventBus {
16
- private subscribers;
17
- private eventCounter;
18
- /**
19
- * Emit an event
20
- * Generates id and ts if missing, then calls all subscribers synchronously
21
- */
22
- emit(e: Omit<OpEvent, "id" | "ts"> & Partial<Pick<OpEvent, "id" | "ts">>): void;
23
- /**
24
- * Subscribe to events
25
- * Returns unsubscribe function
26
- */
27
- subscribe(fn: EventListener): () => void;
28
- /**
29
- * Helper: emit with tag and message (for compatibility)
30
- */
31
- emitTag(tag: OpEvent['tag'], msg: string, level?: OpEvent['level']): void;
32
- /**
33
- * Get subscriber count (for debugging)
34
- */
35
- getSubscriberCount(): number;
36
- }
37
- export declare const eventBus: EventBus;
38
- export {};
39
- //# sourceMappingURL=eventBus.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eventBus.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/core/eventBus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;AAEjD,cAAM,QAAQ;IACZ,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,YAAY,CAAK;IAEzB;;;OAGG;IACH,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI;IAqC/E;;;OAGG;IACH,SAAS,CAAC,EAAE,EAAE,aAAa,GAAG,MAAM,IAAI;IASxC;;OAEG;IACH,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,OAAO,CAAC,OAAO,CAAU,GAAG,IAAI;IAIjF;;OAEG;IACH,kBAAkB,IAAI,MAAM;CAG7B;AAGD,eAAO,MAAM,QAAQ,UAAiB,CAAC"}
@@ -1,79 +0,0 @@
1
- /**
2
- * Section 2: EventBus
3
- *
4
- * In-memory pub/sub system for Operations Feed.
5
- * All visible output goes through the EventBus.
6
- *
7
- * Rules:
8
- * - In-memory only (no persistence)
9
- * - No UI imports inside bus. Bus is pure logic.
10
- * - Must support multiple subscribers.
11
- * - Must return an unsubscribe() function.
12
- */
13
- class EventBus {
14
- subscribers = new Set();
15
- eventCounter = 0; // Monotonic counter for IDs
16
- /**
17
- * Emit an event
18
- * Generates id and ts if missing, then calls all subscribers synchronously
19
- */
20
- emit(e) {
21
- // Generate id if missing
22
- const id = e.id || `evt-${++this.eventCounter}`;
23
- // Set ts = Date.now() if missing
24
- const ts = e.ts ?? Date.now();
25
- // Default level to INFO if not provided
26
- const level = e.level || 'INFO';
27
- const event = {
28
- id,
29
- ts,
30
- tag: e.tag,
31
- level,
32
- msg: e.msg,
33
- };
34
- // Call all subscribers synchronously
35
- // Wrap in try/catch so one bad subscriber doesn't kill updates
36
- this.subscribers.forEach(subscriber => {
37
- try {
38
- subscriber(event);
39
- }
40
- catch (error) {
41
- // Don't let subscriber errors break the bus
42
- // In TUI mode, we can't log, so we silently continue
43
- // In debug mode, we could log to stderr
44
- // Structural Fix A: Only log to stderr if DEBUG_NO_TUI is set (not in TUI mode)
45
- if (process.env.DEBUG_NO_TUI === '1') {
46
- // In non-TUI mode, it's safe to use console.error (goes to stderr, not stdout)
47
- const originalError = console.error;
48
- originalError('EventBus subscriber error:', error);
49
- }
50
- }
51
- });
52
- }
53
- /**
54
- * Subscribe to events
55
- * Returns unsubscribe function
56
- */
57
- subscribe(fn) {
58
- this.subscribers.add(fn);
59
- // Return unsubscribe function
60
- return () => {
61
- this.subscribers.delete(fn);
62
- };
63
- }
64
- /**
65
- * Helper: emit with tag and message (for compatibility)
66
- */
67
- emitTag(tag, msg, level = 'INFO') {
68
- this.emit({ tag, msg, level });
69
- }
70
- /**
71
- * Get subscriber count (for debugging)
72
- */
73
- getSubscriberCount() {
74
- return this.subscribers.size;
75
- }
76
- }
77
- // Singleton instance
78
- export const eventBus = new EventBus();
79
- //# sourceMappingURL=eventBus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eventBus.js","sourceRoot":"","sources":["../../../../src/ui/v3/core/eventBus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,MAAM,QAAQ;IACJ,WAAW,GAAuB,IAAI,GAAG,EAAE,CAAC;IAC5C,YAAY,GAAG,CAAC,CAAC,CAAC,4BAA4B;IAEtD;;;OAGG;IACH,IAAI,CAAC,CAAmE;QACtE,yBAAyB;QACzB,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,IAAI,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC;QAEhD,iCAAiC;QACjC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QAE9B,wCAAwC;QACxC,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC;QAEhC,MAA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
4
- * Bounded ring buffer for Operations Feed events.
5
- *
6
- * Rules:
7
- * - Stores last N=200 events (configurable constant)
8
- * - Truncate from the front when over capacity (drop oldest)
9
- * - No formatting here. Store raw events only.
10
- */
11
- import type { OpEvent } from './opEvent.js';
12
- declare class FeedStore {
13
- private events;
14
- /**
15
- * Push an event to the store
16
- * Truncates from the front when over capacity
17
- */
18
- push(e: OpEvent): void;
19
- /**
20
- * Clear all events
21
- */
22
- clear(): void;
23
- /**
24
- * Get latest N events
25
- */
26
- getLatest(count: number): OpEvent[];
27
- /**
28
- * Get current size
29
- */
30
- size(): number;
31
- }
32
- export declare const feedStore: FeedStore;
33
- export {};
34
- //# sourceMappingURL=feedStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feedStore.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/core/feedStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAI5C,cAAM,SAAS;IACb,OAAO,CAAC,MAAM,CAAiB;IAE/B;;;OAGG;IACH,IAAI,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;IAStB;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE;IAInC;;OAEG;IACH,IAAI,IAAI,MAAM;CAGf;AAGD,eAAO,MAAM,SAAS,WAAkB,CAAC"}
@@ -1,46 +0,0 @@
1
- /**
2
- * Section 2: FeedStore
3
- *
4
- * Bounded ring buffer for Operations Feed events.
5
- *
6
- * Rules:
7
- * - Stores last N=200 events (configurable constant)
8
- * - Truncate from the front when over capacity (drop oldest)
9
- * - No formatting here. Store raw events only.
10
- */
11
- const MAX_EVENTS = 200; // Configurable constant
12
- class FeedStore {
13
- events = [];
14
- /**
15
- * Push an event to the store
16
- * Truncates from the front when over capacity
17
- */
18
- push(e) {
19
- this.events.push(e);
20
- // Truncate from the front when over capacity (drop oldest)
21
- if (this.events.length > MAX_EVENTS) {
22
- this.events = this.events.slice(-MAX_EVENTS);
23
- }
24
- }
25
- /**
26
- * Clear all events
27
- */
28
- clear() {
29
- this.events = [];
30
- }
31
- /**
32
- * Get latest N events
33
- */
34
- getLatest(count) {
35
- return this.events.slice(-count);
36
- }
37
- /**
38
- * Get current size
39
- */
40
- size() {
41
- return this.events.length;
42
- }
43
- }
44
- // Singleton instance
45
- export const feedStore = new FeedStore();
46
- //# sourceMappingURL=feedStore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feedStore.js","sourceRoot":"","sources":["../../../../src/ui/v3/core/feedStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,UAAU,GAAG,GAAG,CAAC,CAAC,wBAAwB;AAEhD,MAAM,SAAS;IACL,MAAM,GAAc,EAAE,CAAC;IAE/B;;;OAGG;IACH,IAAI,CAAC,CAAU;QACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAEpB,2DAA2D;QAC3D,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,KAAa;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,IAAI;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAC5B,CAAC;CACF;AAED,qBAAqB;AACrB,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC"}
@@ -1,40 +0,0 @@
1
- /**
2
- * Structural Fix A: Logger Wrapper
3
- *
4
- * Hard enforcement: No console.log/process.stdout.write in TUI mode
5
- * All output goes through eventBus as [SYS] / [ERR] depending on level
6
- *
7
- * Rules:
8
- * - logger.info() → Operations feed (NOT stdout)
9
- * - logger.error() → Operations feed AND stderr (optional)
10
- * - logger.raw() is FORBIDDEN
11
- * - stdout.write is monkeypatched to throw in TUI mode
12
- */
13
- /**
14
- * Structural Fix A: Enable TUI mode (suppresses all stdout/console writes)
15
- *
16
- * Monkeypatches stdout.write and console methods to throw errors
17
- * Only the renderer (blessed) is allowed to write to stdout
18
- */
19
- export declare function enableTuiMode(): void;
20
- /**
21
- * Disable boot phase (enable strict stdout blocking)
22
- * Call this after blessed screen is created and first render completes
23
- */
24
- export declare function disableBootPhase(): void;
25
- /**
26
- * Disable TUI mode (restores console/stdout)
27
- */
28
- export declare function disableTuiMode(): void;
29
- /**
30
- * Structural Fix A: Logger interface
31
- *
32
- * All logging goes through Operations feed, NOT stdout
33
- */
34
- export declare const logger: {
35
- debug: (msg: string) => void;
36
- info: (msg: string) => void;
37
- warn: (msg: string) => void;
38
- error: (msg: string) => void;
39
- };
40
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/core/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAmBH;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,IAAI,CA4GpC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAoCrC;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM;iBACJ,MAAM,KAAG,IAAI;gBAId,MAAM,KAAG,IAAI;gBAIb,MAAM,KAAG,IAAI;iBAIZ,MAAM,KAAG,IAAI;CAU3B,CAAC"}