@agimon-ai/doompi-runner 0.0.1-alpha.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 (417) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +47 -0
  3. package/dist/_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.cjs +1 -0
  4. package/dist/_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.mjs +1 -0
  5. package/dist/_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.cjs +1 -0
  6. package/dist/_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.mjs +1 -0
  7. package/dist/_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateParam.cjs +1 -0
  8. package/dist/_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateParam.mjs +1 -0
  9. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  10. package/dist/bin/cli.cjs +5 -0
  11. package/dist/bin/cli.cjs.map +1 -0
  12. package/dist/bin/cli.d.cts +5 -0
  13. package/dist/bin/cli.d.cts.map +1 -0
  14. package/dist/bin/cli.d.mts +5 -0
  15. package/dist/bin/cli.d.mts.map +1 -0
  16. package/dist/bin/cli.mjs +5 -0
  17. package/dist/bin/cli.mjs.map +1 -0
  18. package/dist/bin/logSink.cjs +2 -0
  19. package/dist/bin/logSink.cjs.map +1 -0
  20. package/dist/bin/logSink.d.cts +5 -0
  21. package/dist/bin/logSink.d.cts.map +1 -0
  22. package/dist/bin/logSink.d.mts +5 -0
  23. package/dist/bin/logSink.d.mts.map +1 -0
  24. package/dist/bin/logSink.mjs +2 -0
  25. package/dist/bin/logSink.mjs.map +1 -0
  26. package/dist/bin/runnerHost.cjs +2 -0
  27. package/dist/bin/runnerHost.cjs.map +1 -0
  28. package/dist/bin/runnerHost.d.cts +5 -0
  29. package/dist/bin/runnerHost.d.cts.map +1 -0
  30. package/dist/bin/runnerHost.d.mts +5 -0
  31. package/dist/bin/runnerHost.d.mts.map +1 -0
  32. package/dist/bin/runnerHost.mjs +2 -0
  33. package/dist/bin/runnerHost.mjs.map +1 -0
  34. package/dist/cli/cliApp.cjs +6 -0
  35. package/dist/cli/cliApp.cjs.map +1 -0
  36. package/dist/cli/cliApp.d.cts +23 -0
  37. package/dist/cli/cliApp.d.cts.map +1 -0
  38. package/dist/cli/cliApp.d.mts +23 -0
  39. package/dist/cli/cliApp.d.mts.map +1 -0
  40. package/dist/cli/cliApp.mjs +6 -0
  41. package/dist/cli/cliApp.mjs.map +1 -0
  42. package/dist/compaction.cjs +4 -0
  43. package/dist/compaction.cjs.map +1 -0
  44. package/dist/compaction.d.cts +14 -0
  45. package/dist/compaction.d.cts.map +1 -0
  46. package/dist/compaction.d.mts +14 -0
  47. package/dist/compaction.d.mts.map +1 -0
  48. package/dist/compaction.mjs +4 -0
  49. package/dist/compaction.mjs.map +1 -0
  50. package/dist/config.cjs +2 -0
  51. package/dist/config.cjs.map +1 -0
  52. package/dist/config.d.cts +32 -0
  53. package/dist/config.d.cts.map +1 -0
  54. package/dist/config.d.mts +32 -0
  55. package/dist/config.d.mts.map +1 -0
  56. package/dist/config.mjs +2 -0
  57. package/dist/config.mjs.map +1 -0
  58. package/dist/container/index.cjs +2 -0
  59. package/dist/container/index.cjs.map +1 -0
  60. package/dist/container/index.d.cts +14 -0
  61. package/dist/container/index.d.cts.map +1 -0
  62. package/dist/container/index.d.mts +14 -0
  63. package/dist/container/index.d.mts.map +1 -0
  64. package/dist/container/index.mjs +2 -0
  65. package/dist/container/index.mjs.map +1 -0
  66. package/dist/extension.cjs +3 -0
  67. package/dist/extension.cjs.map +1 -0
  68. package/dist/extension.d.cts +10 -0
  69. package/dist/extension.d.cts.map +1 -0
  70. package/dist/extension.d.mts +10 -0
  71. package/dist/extension.d.mts.map +1 -0
  72. package/dist/extension.mjs +3 -0
  73. package/dist/extension.mjs.map +1 -0
  74. package/dist/extensions/pi.cjs +2 -0
  75. package/dist/extensions/pi.cjs.map +1 -0
  76. package/dist/extensions/pi.d.cts +2 -0
  77. package/dist/extensions/pi.d.mts +2 -0
  78. package/dist/extensions/pi.mjs +2 -0
  79. package/dist/extensions/pi.mjs.map +1 -0
  80. package/dist/index.cjs +1 -0
  81. package/dist/index.d.cts +7 -0
  82. package/dist/index.d.mts +7 -0
  83. package/dist/index.mjs +1 -0
  84. package/dist/ptyProvider.cjs +2 -0
  85. package/dist/ptyProvider.cjs.map +1 -0
  86. package/dist/ptyProvider.d.cts +13 -0
  87. package/dist/ptyProvider.d.cts.map +1 -0
  88. package/dist/ptyProvider.d.mts +13 -0
  89. package/dist/ptyProvider.d.mts.map +1 -0
  90. package/dist/ptyProvider.mjs +2 -0
  91. package/dist/ptyProvider.mjs.map +1 -0
  92. package/dist/reconcile.cjs +2 -0
  93. package/dist/reconcile.cjs.map +1 -0
  94. package/dist/reconcile.d.cts +37 -0
  95. package/dist/reconcile.d.cts.map +1 -0
  96. package/dist/reconcile.d.mts +37 -0
  97. package/dist/reconcile.d.mts.map +1 -0
  98. package/dist/reconcile.mjs +2 -0
  99. package/dist/reconcile.mjs.map +1 -0
  100. package/dist/runnerSpec.cjs +2 -0
  101. package/dist/runnerSpec.cjs.map +1 -0
  102. package/dist/runnerSpec.d.cts +50 -0
  103. package/dist/runnerSpec.d.cts.map +1 -0
  104. package/dist/runnerSpec.d.mts +50 -0
  105. package/dist/runnerSpec.d.mts.map +1 -0
  106. package/dist/runnerSpec.mjs +2 -0
  107. package/dist/runnerSpec.mjs.map +1 -0
  108. package/dist/services/AnsiScrub/ansiScrub.cjs +5 -0
  109. package/dist/services/AnsiScrub/ansiScrub.cjs.map +1 -0
  110. package/dist/services/AnsiScrub/ansiScrub.d.cts +34 -0
  111. package/dist/services/AnsiScrub/ansiScrub.d.cts.map +1 -0
  112. package/dist/services/AnsiScrub/ansiScrub.d.mts +34 -0
  113. package/dist/services/AnsiScrub/ansiScrub.d.mts.map +1 -0
  114. package/dist/services/AnsiScrub/ansiScrub.mjs +5 -0
  115. package/dist/services/AnsiScrub/ansiScrub.mjs.map +1 -0
  116. package/dist/services/AnsiScrub/index.cjs +1 -0
  117. package/dist/services/AnsiScrub/index.d.cts +2 -0
  118. package/dist/services/AnsiScrub/index.d.mts +2 -0
  119. package/dist/services/AnsiScrub/index.mjs +1 -0
  120. package/dist/services/BashRunService/BashRunService.cjs +2 -0
  121. package/dist/services/BashRunService/BashRunService.cjs.map +1 -0
  122. package/dist/services/BashRunService/BashRunService.d.cts +38 -0
  123. package/dist/services/BashRunService/BashRunService.d.cts.map +1 -0
  124. package/dist/services/BashRunService/BashRunService.d.mts +38 -0
  125. package/dist/services/BashRunService/BashRunService.d.mts.map +1 -0
  126. package/dist/services/BashRunService/BashRunService.mjs +2 -0
  127. package/dist/services/BashRunService/BashRunService.mjs.map +1 -0
  128. package/dist/services/BashRunService/index.cjs +1 -0
  129. package/dist/services/BashRunService/index.d.cts +3 -0
  130. package/dist/services/BashRunService/index.d.mts +3 -0
  131. package/dist/services/BashRunService/index.mjs +1 -0
  132. package/dist/services/BashRunService/types.d.cts +62 -0
  133. package/dist/services/BashRunService/types.d.cts.map +1 -0
  134. package/dist/services/BashRunService/types.d.mts +62 -0
  135. package/dist/services/BashRunService/types.d.mts.map +1 -0
  136. package/dist/services/Clock/SystemClock.cjs +2 -0
  137. package/dist/services/Clock/SystemClock.cjs.map +1 -0
  138. package/dist/services/Clock/SystemClock.d.cts +11 -0
  139. package/dist/services/Clock/SystemClock.d.cts.map +1 -0
  140. package/dist/services/Clock/SystemClock.d.mts +11 -0
  141. package/dist/services/Clock/SystemClock.d.mts.map +1 -0
  142. package/dist/services/Clock/SystemClock.mjs +2 -0
  143. package/dist/services/Clock/SystemClock.mjs.map +1 -0
  144. package/dist/services/Clock/index.cjs +1 -0
  145. package/dist/services/Clock/index.d.cts +3 -0
  146. package/dist/services/Clock/index.d.mts +3 -0
  147. package/dist/services/Clock/index.mjs +1 -0
  148. package/dist/services/Clock/types.d.cts +11 -0
  149. package/dist/services/Clock/types.d.cts.map +1 -0
  150. package/dist/services/Clock/types.d.mts +11 -0
  151. package/dist/services/Clock/types.d.mts.map +1 -0
  152. package/dist/services/Launcher/Launcher.cjs +2 -0
  153. package/dist/services/Launcher/Launcher.cjs.map +1 -0
  154. package/dist/services/Launcher/Launcher.d.cts +27 -0
  155. package/dist/services/Launcher/Launcher.d.cts.map +1 -0
  156. package/dist/services/Launcher/Launcher.d.mts +27 -0
  157. package/dist/services/Launcher/Launcher.d.mts.map +1 -0
  158. package/dist/services/Launcher/Launcher.mjs +2 -0
  159. package/dist/services/Launcher/Launcher.mjs.map +1 -0
  160. package/dist/services/Launcher/index.cjs +1 -0
  161. package/dist/services/Launcher/index.d.cts +3 -0
  162. package/dist/services/Launcher/index.d.mts +3 -0
  163. package/dist/services/Launcher/index.mjs +1 -0
  164. package/dist/services/Launcher/types.d.cts +40 -0
  165. package/dist/services/Launcher/types.d.cts.map +1 -0
  166. package/dist/services/Launcher/types.d.mts +40 -0
  167. package/dist/services/Launcher/types.d.mts.map +1 -0
  168. package/dist/services/Lifeline/NodeLifeline.cjs +2 -0
  169. package/dist/services/Lifeline/NodeLifeline.cjs.map +1 -0
  170. package/dist/services/Lifeline/NodeLifeline.d.cts +21 -0
  171. package/dist/services/Lifeline/NodeLifeline.d.cts.map +1 -0
  172. package/dist/services/Lifeline/NodeLifeline.d.mts +21 -0
  173. package/dist/services/Lifeline/NodeLifeline.d.mts.map +1 -0
  174. package/dist/services/Lifeline/NodeLifeline.mjs +2 -0
  175. package/dist/services/Lifeline/NodeLifeline.mjs.map +1 -0
  176. package/dist/services/Lifeline/client.cjs +2 -0
  177. package/dist/services/Lifeline/client.cjs.map +1 -0
  178. package/dist/services/Lifeline/client.d.cts +23 -0
  179. package/dist/services/Lifeline/client.d.cts.map +1 -0
  180. package/dist/services/Lifeline/client.d.mts +23 -0
  181. package/dist/services/Lifeline/client.d.mts.map +1 -0
  182. package/dist/services/Lifeline/client.mjs +2 -0
  183. package/dist/services/Lifeline/client.mjs.map +1 -0
  184. package/dist/services/Lifeline/index.cjs +1 -0
  185. package/dist/services/Lifeline/index.d.cts +4 -0
  186. package/dist/services/Lifeline/index.d.mts +4 -0
  187. package/dist/services/Lifeline/index.mjs +1 -0
  188. package/dist/services/Lifeline/types.d.cts +19 -0
  189. package/dist/services/Lifeline/types.d.cts.map +1 -0
  190. package/dist/services/Lifeline/types.d.mts +19 -0
  191. package/dist/services/Lifeline/types.d.mts.map +1 -0
  192. package/dist/services/LogFile/LogFile.cjs +2 -0
  193. package/dist/services/LogFile/LogFile.cjs.map +1 -0
  194. package/dist/services/LogFile/LogFile.d.cts +13 -0
  195. package/dist/services/LogFile/LogFile.d.cts.map +1 -0
  196. package/dist/services/LogFile/LogFile.d.mts +13 -0
  197. package/dist/services/LogFile/LogFile.d.mts.map +1 -0
  198. package/dist/services/LogFile/LogFile.mjs +2 -0
  199. package/dist/services/LogFile/LogFile.mjs.map +1 -0
  200. package/dist/services/LogFile/index.cjs +1 -0
  201. package/dist/services/LogFile/index.d.cts +3 -0
  202. package/dist/services/LogFile/index.d.mts +3 -0
  203. package/dist/services/LogFile/index.mjs +1 -0
  204. package/dist/services/LogFile/types.d.cts +16 -0
  205. package/dist/services/LogFile/types.d.cts.map +1 -0
  206. package/dist/services/LogFile/types.d.mts +16 -0
  207. package/dist/services/LogFile/types.d.mts.map +1 -0
  208. package/dist/services/LogReader/LogReader.cjs +10 -0
  209. package/dist/services/LogReader/LogReader.cjs.map +1 -0
  210. package/dist/services/LogReader/LogReader.d.cts +14 -0
  211. package/dist/services/LogReader/LogReader.d.cts.map +1 -0
  212. package/dist/services/LogReader/LogReader.d.mts +14 -0
  213. package/dist/services/LogReader/LogReader.d.mts.map +1 -0
  214. package/dist/services/LogReader/LogReader.mjs +10 -0
  215. package/dist/services/LogReader/LogReader.mjs.map +1 -0
  216. package/dist/services/LogReader/index.cjs +1 -0
  217. package/dist/services/LogReader/index.d.cts +3 -0
  218. package/dist/services/LogReader/index.d.mts +3 -0
  219. package/dist/services/LogReader/index.mjs +1 -0
  220. package/dist/services/LogReader/types.d.cts +27 -0
  221. package/dist/services/LogReader/types.d.cts.map +1 -0
  222. package/dist/services/LogReader/types.d.mts +27 -0
  223. package/dist/services/LogReader/types.d.mts.map +1 -0
  224. package/dist/services/ProcessControl/NodeProcessControl.cjs +2 -0
  225. package/dist/services/ProcessControl/NodeProcessControl.cjs.map +1 -0
  226. package/dist/services/ProcessControl/NodeProcessControl.d.cts +11 -0
  227. package/dist/services/ProcessControl/NodeProcessControl.d.cts.map +1 -0
  228. package/dist/services/ProcessControl/NodeProcessControl.d.mts +11 -0
  229. package/dist/services/ProcessControl/NodeProcessControl.d.mts.map +1 -0
  230. package/dist/services/ProcessControl/NodeProcessControl.mjs +2 -0
  231. package/dist/services/ProcessControl/NodeProcessControl.mjs.map +1 -0
  232. package/dist/services/ProcessControl/index.cjs +1 -0
  233. package/dist/services/ProcessControl/index.d.cts +3 -0
  234. package/dist/services/ProcessControl/index.d.mts +3 -0
  235. package/dist/services/ProcessControl/index.mjs +1 -0
  236. package/dist/services/ProcessControl/types.d.cts +14 -0
  237. package/dist/services/ProcessControl/types.d.cts.map +1 -0
  238. package/dist/services/ProcessControl/types.d.mts +14 -0
  239. package/dist/services/ProcessControl/types.d.mts.map +1 -0
  240. package/dist/services/PtyHost/PtyHost.cjs +5 -0
  241. package/dist/services/PtyHost/PtyHost.cjs.map +1 -0
  242. package/dist/services/PtyHost/PtyHost.d.cts +28 -0
  243. package/dist/services/PtyHost/PtyHost.d.cts.map +1 -0
  244. package/dist/services/PtyHost/PtyHost.d.mts +28 -0
  245. package/dist/services/PtyHost/PtyHost.d.mts.map +1 -0
  246. package/dist/services/PtyHost/PtyHost.mjs +5 -0
  247. package/dist/services/PtyHost/PtyHost.mjs.map +1 -0
  248. package/dist/services/PtyHost/index.cjs +1 -0
  249. package/dist/services/PtyHost/index.d.cts +3 -0
  250. package/dist/services/PtyHost/index.d.mts +3 -0
  251. package/dist/services/PtyHost/index.mjs +1 -0
  252. package/dist/services/PtyHost/types.d.cts +39 -0
  253. package/dist/services/PtyHost/types.d.cts.map +1 -0
  254. package/dist/services/PtyHost/types.d.mts +39 -0
  255. package/dist/services/PtyHost/types.d.mts.map +1 -0
  256. package/dist/services/PtySpawner/NodePtySpawner.cjs +2 -0
  257. package/dist/services/PtySpawner/NodePtySpawner.cjs.map +1 -0
  258. package/dist/services/PtySpawner/NodePtySpawner.d.cts +18 -0
  259. package/dist/services/PtySpawner/NodePtySpawner.d.cts.map +1 -0
  260. package/dist/services/PtySpawner/NodePtySpawner.d.mts +18 -0
  261. package/dist/services/PtySpawner/NodePtySpawner.d.mts.map +1 -0
  262. package/dist/services/PtySpawner/NodePtySpawner.mjs +2 -0
  263. package/dist/services/PtySpawner/NodePtySpawner.mjs.map +1 -0
  264. package/dist/services/PtySpawner/index.cjs +1 -0
  265. package/dist/services/PtySpawner/index.d.cts +3 -0
  266. package/dist/services/PtySpawner/index.d.mts +3 -0
  267. package/dist/services/PtySpawner/index.mjs +1 -0
  268. package/dist/services/PtySpawner/types.d.cts +28 -0
  269. package/dist/services/PtySpawner/types.d.cts.map +1 -0
  270. package/dist/services/PtySpawner/types.d.mts +28 -0
  271. package/dist/services/PtySpawner/types.d.mts.map +1 -0
  272. package/dist/services/RmuxBackend/RmuxBackend.cjs +2 -0
  273. package/dist/services/RmuxBackend/RmuxBackend.cjs.map +1 -0
  274. package/dist/services/RmuxBackend/RmuxBackend.d.cts +36 -0
  275. package/dist/services/RmuxBackend/RmuxBackend.d.cts.map +1 -0
  276. package/dist/services/RmuxBackend/RmuxBackend.d.mts +36 -0
  277. package/dist/services/RmuxBackend/RmuxBackend.d.mts.map +1 -0
  278. package/dist/services/RmuxBackend/RmuxBackend.mjs +2 -0
  279. package/dist/services/RmuxBackend/RmuxBackend.mjs.map +1 -0
  280. package/dist/services/RmuxBackend/index.cjs +1 -0
  281. package/dist/services/RmuxBackend/index.d.cts +3 -0
  282. package/dist/services/RmuxBackend/index.d.mts +3 -0
  283. package/dist/services/RmuxBackend/index.mjs +1 -0
  284. package/dist/services/RmuxBackend/types.d.cts +29 -0
  285. package/dist/services/RmuxBackend/types.d.cts.map +1 -0
  286. package/dist/services/RmuxBackend/types.d.mts +29 -0
  287. package/dist/services/RmuxBackend/types.d.mts.map +1 -0
  288. package/dist/services/RunnerNamer/RunnerNamer.cjs +2 -0
  289. package/dist/services/RunnerNamer/RunnerNamer.cjs.map +1 -0
  290. package/dist/services/RunnerNamer/RunnerNamer.d.cts +13 -0
  291. package/dist/services/RunnerNamer/RunnerNamer.d.cts.map +1 -0
  292. package/dist/services/RunnerNamer/RunnerNamer.d.mts +13 -0
  293. package/dist/services/RunnerNamer/RunnerNamer.d.mts.map +1 -0
  294. package/dist/services/RunnerNamer/RunnerNamer.mjs +2 -0
  295. package/dist/services/RunnerNamer/RunnerNamer.mjs.map +1 -0
  296. package/dist/services/RunnerNamer/index.cjs +1 -0
  297. package/dist/services/RunnerNamer/index.d.cts +3 -0
  298. package/dist/services/RunnerNamer/index.d.mts +3 -0
  299. package/dist/services/RunnerNamer/index.mjs +1 -0
  300. package/dist/services/RunnerNamer/types.d.cts +12 -0
  301. package/dist/services/RunnerNamer/types.d.cts.map +1 -0
  302. package/dist/services/RunnerNamer/types.d.mts +12 -0
  303. package/dist/services/RunnerNamer/types.d.mts.map +1 -0
  304. package/dist/services/RunnerPaths/RunnerPaths.cjs +2 -0
  305. package/dist/services/RunnerPaths/RunnerPaths.cjs.map +1 -0
  306. package/dist/services/RunnerPaths/RunnerPaths.d.cts +31 -0
  307. package/dist/services/RunnerPaths/RunnerPaths.d.cts.map +1 -0
  308. package/dist/services/RunnerPaths/RunnerPaths.d.mts +31 -0
  309. package/dist/services/RunnerPaths/RunnerPaths.d.mts.map +1 -0
  310. package/dist/services/RunnerPaths/RunnerPaths.mjs +2 -0
  311. package/dist/services/RunnerPaths/RunnerPaths.mjs.map +1 -0
  312. package/dist/services/RunnerPaths/index.cjs +1 -0
  313. package/dist/services/RunnerPaths/index.d.cts +3 -0
  314. package/dist/services/RunnerPaths/index.d.mts +3 -0
  315. package/dist/services/RunnerPaths/index.mjs +1 -0
  316. package/dist/services/RunnerPaths/types.d.cts +33 -0
  317. package/dist/services/RunnerPaths/types.d.cts.map +1 -0
  318. package/dist/services/RunnerPaths/types.d.mts +33 -0
  319. package/dist/services/RunnerPaths/types.d.mts.map +1 -0
  320. package/dist/services/RunnerRegistry/RunnerRegistry.cjs +2 -0
  321. package/dist/services/RunnerRegistry/RunnerRegistry.cjs.map +1 -0
  322. package/dist/services/RunnerRegistry/RunnerRegistry.d.cts +40 -0
  323. package/dist/services/RunnerRegistry/RunnerRegistry.d.cts.map +1 -0
  324. package/dist/services/RunnerRegistry/RunnerRegistry.d.mts +40 -0
  325. package/dist/services/RunnerRegistry/RunnerRegistry.d.mts.map +1 -0
  326. package/dist/services/RunnerRegistry/RunnerRegistry.mjs +2 -0
  327. package/dist/services/RunnerRegistry/RunnerRegistry.mjs.map +1 -0
  328. package/dist/services/RunnerRegistry/index.cjs +1 -0
  329. package/dist/services/RunnerRegistry/index.d.cts +3 -0
  330. package/dist/services/RunnerRegistry/index.d.mts +3 -0
  331. package/dist/services/RunnerRegistry/index.mjs +1 -0
  332. package/dist/services/RunnerRegistry/types.d.cts +98 -0
  333. package/dist/services/RunnerRegistry/types.d.cts.map +1 -0
  334. package/dist/services/RunnerRegistry/types.d.mts +98 -0
  335. package/dist/services/RunnerRegistry/types.d.mts.map +1 -0
  336. package/dist/services/Spawner/NodeSpawner.cjs +2 -0
  337. package/dist/services/Spawner/NodeSpawner.cjs.map +1 -0
  338. package/dist/services/Spawner/NodeSpawner.d.cts +10 -0
  339. package/dist/services/Spawner/NodeSpawner.d.cts.map +1 -0
  340. package/dist/services/Spawner/NodeSpawner.d.mts +10 -0
  341. package/dist/services/Spawner/NodeSpawner.d.mts.map +1 -0
  342. package/dist/services/Spawner/NodeSpawner.mjs +2 -0
  343. package/dist/services/Spawner/NodeSpawner.mjs.map +1 -0
  344. package/dist/services/Spawner/index.cjs +1 -0
  345. package/dist/services/Spawner/index.d.cts +3 -0
  346. package/dist/services/Spawner/index.d.mts +3 -0
  347. package/dist/services/Spawner/index.mjs +1 -0
  348. package/dist/services/Spawner/types.d.cts +31 -0
  349. package/dist/services/Spawner/types.d.cts.map +1 -0
  350. package/dist/services/Spawner/types.d.mts +31 -0
  351. package/dist/services/Spawner/types.d.mts.map +1 -0
  352. package/dist/session.cjs +2 -0
  353. package/dist/session.cjs.map +1 -0
  354. package/dist/session.d.cts +10 -0
  355. package/dist/session.d.cts.map +1 -0
  356. package/dist/session.d.mts +10 -0
  357. package/dist/session.d.mts.map +1 -0
  358. package/dist/session.mjs +2 -0
  359. package/dist/session.mjs.map +1 -0
  360. package/dist/tool/bashTool.cjs +7 -0
  361. package/dist/tool/bashTool.cjs.map +1 -0
  362. package/dist/tool/bashTool.d.cts +25 -0
  363. package/dist/tool/bashTool.d.cts.map +1 -0
  364. package/dist/tool/bashTool.d.mts +25 -0
  365. package/dist/tool/bashTool.d.mts.map +1 -0
  366. package/dist/tool/bashTool.mjs +7 -0
  367. package/dist/tool/bashTool.mjs.map +1 -0
  368. package/dist/tool/responseEnvelope.cjs +10 -0
  369. package/dist/tool/responseEnvelope.cjs.map +1 -0
  370. package/dist/tool/responseEnvelope.d.cts +45 -0
  371. package/dist/tool/responseEnvelope.d.cts.map +1 -0
  372. package/dist/tool/responseEnvelope.d.mts +45 -0
  373. package/dist/tool/responseEnvelope.d.mts.map +1 -0
  374. package/dist/tool/responseEnvelope.mjs +10 -0
  375. package/dist/tool/responseEnvelope.mjs.map +1 -0
  376. package/dist/tool/schema.cjs +2 -0
  377. package/dist/tool/schema.cjs.map +1 -0
  378. package/dist/tool/schema.d.cts +25 -0
  379. package/dist/tool/schema.d.cts.map +1 -0
  380. package/dist/tool/schema.d.mts +25 -0
  381. package/dist/tool/schema.d.mts.map +1 -0
  382. package/dist/tool/schema.mjs +2 -0
  383. package/dist/tool/schema.mjs.map +1 -0
  384. package/dist/tui/bashRender.cjs +8 -0
  385. package/dist/tui/bashRender.cjs.map +1 -0
  386. package/dist/tui/bashRender.d.cts +51 -0
  387. package/dist/tui/bashRender.d.cts.map +1 -0
  388. package/dist/tui/bashRender.d.mts +51 -0
  389. package/dist/tui/bashRender.d.mts.map +1 -0
  390. package/dist/tui/bashRender.mjs +8 -0
  391. package/dist/tui/bashRender.mjs.map +1 -0
  392. package/dist/tui/format.cjs +2 -0
  393. package/dist/tui/format.cjs.map +1 -0
  394. package/dist/tui/format.d.cts +25 -0
  395. package/dist/tui/format.d.cts.map +1 -0
  396. package/dist/tui/format.d.mts +25 -0
  397. package/dist/tui/format.d.mts.map +1 -0
  398. package/dist/tui/format.mjs +2 -0
  399. package/dist/tui/format.mjs.map +1 -0
  400. package/dist/tui/runnerSpace.cjs +6 -0
  401. package/dist/tui/runnerSpace.cjs.map +1 -0
  402. package/dist/tui/runnerSpace.d.cts +52 -0
  403. package/dist/tui/runnerSpace.d.cts.map +1 -0
  404. package/dist/tui/runnerSpace.d.mts +52 -0
  405. package/dist/tui/runnerSpace.d.mts.map +1 -0
  406. package/dist/tui/runnerSpace.mjs +6 -0
  407. package/dist/tui/runnerSpace.mjs.map +1 -0
  408. package/dist/types.cjs +2 -0
  409. package/dist/types.cjs.map +1 -0
  410. package/dist/types.d.cts +28 -0
  411. package/dist/types.d.cts.map +1 -0
  412. package/dist/types.d.mts +28 -0
  413. package/dist/types.d.mts.map +1 -0
  414. package/dist/types.mjs +2 -0
  415. package/dist/types.mjs.map +1 -0
  416. package/package.json +335 -0
  417. package/skills/doom-runner/SKILL.md +69 -0
@@ -0,0 +1,23 @@
1
+ //#region src/services/Lifeline/client.d.ts
2
+ /** Environment variable carrying the lifeline socket path to every runner supervisor. */
3
+ declare const LIFELINE_ENV = "DOOM_RUNNER_LIFELINE";
4
+ /**
5
+ * Reports the owning pi process dying to a runner's supervisor.
6
+ *
7
+ * A connected Unix socket drops the moment the owner's descriptors close, which
8
+ * happens on every exit path including SIGKILL, so it is the one death signal a
9
+ * graceful shutdown handler cannot provide. Connecting never blocks, the close
10
+ * edge arrives through the event loop rather than a poll, and an unref'd socket
11
+ * can never keep the supervisor alive: the watcher is therefore incapable of
12
+ * outliving the process that installed it.
13
+ *
14
+ * A refused or missing socket means the owner died before this runner started,
15
+ * which is reported the same way as a later death rather than left to hang.
16
+ *
17
+ * Runners run unwatched when no lifeline is armed, so a missing environment
18
+ * variable can never be mistaken for a dead owner.
19
+ */
20
+ declare function watchOwner(onOwnerLost: () => void, target?: string | undefined): () => void;
21
+ //#endregion
22
+ export { LIFELINE_ENV, watchOwner };
23
+ //# sourceMappingURL=client.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.mts","names":[],"sources":["../../../src/services/Lifeline/client.ts"],"mappings":";;cAGa;;;;;;;;;;;;;;;;;iBAkBG,WACd,yBACA"}
@@ -0,0 +1,2 @@
1
+ import e from"node:net";const t=`DOOM_RUNNER_LIFELINE`;function n(n,r=process.env[t]){if(!r)return()=>void 0;let i=!1,a=()=>{i||(i=!0,n())},o;try{o=e.connect(r)}catch(e){return process.emitWarning(`Could not watch the doom-runner lifeline: ${String(e)}`),()=>void 0}return o.unref(),o.on(`connect`,()=>o.resume()),o.on(`error`,a),o.on(`close`,a),()=>{i=!0,o.destroy()}}export{t as LIFELINE_ENV,n as watchOwner};
2
+ //# sourceMappingURL=client.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.mjs","names":[],"sources":["../../../src/services/Lifeline/client.ts"],"sourcesContent":["import net from 'node:net';\n\n/** Environment variable carrying the lifeline socket path to every runner supervisor. */\nexport const LIFELINE_ENV = 'DOOM_RUNNER_LIFELINE';\n\n/**\n * Reports the owning pi process dying to a runner's supervisor.\n *\n * A connected Unix socket drops the moment the owner's descriptors close, which\n * happens on every exit path including SIGKILL, so it is the one death signal a\n * graceful shutdown handler cannot provide. Connecting never blocks, the close\n * edge arrives through the event loop rather than a poll, and an unref'd socket\n * can never keep the supervisor alive: the watcher is therefore incapable of\n * outliving the process that installed it.\n *\n * A refused or missing socket means the owner died before this runner started,\n * which is reported the same way as a later death rather than left to hang.\n *\n * Runners run unwatched when no lifeline is armed, so a missing environment\n * variable can never be mistaken for a dead owner.\n */\nexport function watchOwner(\n onOwnerLost: () => void,\n target: string | undefined = process.env[LIFELINE_ENV],\n): () => void {\n if (!target) return () => undefined;\n\n let settled = false;\n const settle = (): void => {\n if (settled) return;\n settled = true;\n onOwnerLost();\n };\n\n let connection: net.Socket;\n try {\n connection = net.connect(target);\n } catch (error) {\n process.emitWarning(`Could not watch the doom-runner lifeline: ${String(error)}`);\n return () => undefined;\n }\n\n // The supervisor's own exit must never wait on this socket.\n connection.unref();\n // The owner never sends anything, so drain rather than accumulate.\n connection.on('connect', () => connection.resume());\n connection.on('error', settle);\n connection.on('close', settle);\n\n return () => {\n settled = true;\n connection.destroy();\n };\n}\n"],"mappings":"wBAGA,MAAa,EAAe,uBAkB5B,SAAgB,EACd,EACA,EAA6B,QAAQ,IAAI,GAC7B,CACZ,GAAI,CAAC,EAAQ,UAAa,IAAA,GAE1B,IAAI,EAAU,GACR,MAAqB,CACrB,IACJ,EAAU,GACV,EAAY,EACd,EAEI,EACJ,GAAI,CACF,EAAa,EAAI,QAAQ,CAAM,CACjC,OAAS,EAAO,CAEd,OADA,QAAQ,YAAY,6CAA6C,OAAO,CAAK,GAAG,MACnE,IAAA,EACf,CASA,OANA,EAAW,MAAM,EAEjB,EAAW,GAAG,cAAiB,EAAW,OAAO,CAAC,EAClD,EAAW,GAAG,QAAS,CAAM,EAC7B,EAAW,GAAG,QAAS,CAAM,MAEhB,CACX,EAAU,GACV,EAAW,QAAQ,CACrB,CACF"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./client.cjs"),t=require("./NodeLifeline.cjs");exports.LIFELINE_ENV=e.LIFELINE_ENV,Object.defineProperty(exports,"NodeLifeline",{enumerable:!0,get:function(){return t.NodeLifeline}}),exports.watchOwner=e.watchOwner;
@@ -0,0 +1,4 @@
1
+ import { ILifeline } from "./types.cjs";
2
+ import { NodeLifeline } from "./NodeLifeline.cjs";
3
+ import { LIFELINE_ENV, watchOwner } from "./client.cjs";
4
+ export { type ILifeline, LIFELINE_ENV, NodeLifeline, watchOwner };
@@ -0,0 +1,4 @@
1
+ import { ILifeline } from "./types.mjs";
2
+ import { NodeLifeline } from "./NodeLifeline.mjs";
3
+ import { LIFELINE_ENV, watchOwner } from "./client.mjs";
4
+ export { type ILifeline, LIFELINE_ENV, NodeLifeline, watchOwner };
@@ -0,0 +1 @@
1
+ import{LIFELINE_ENV as e,watchOwner as t}from"./client.mjs";import{NodeLifeline as n}from"./NodeLifeline.mjs";export{e as LIFELINE_ENV,n as NodeLifeline,t as watchOwner};
@@ -0,0 +1,19 @@
1
+ //#region src/services/Lifeline/types.d.ts
2
+ /**
3
+ * A Unix socket the owning pi process listens on for the life of a session.
4
+ *
5
+ * Runner supervisors connect to it and watch for the close edge, which arrives
6
+ * on every owner exit path including SIGKILL. That is the one death signal a
7
+ * graceful shutdown handler cannot provide.
8
+ */
9
+ interface ILifeline {
10
+ /** Binds the socket and starts listening. Idempotent; resolves with the path. */
11
+ arm(sessionId: string): Promise<string | undefined>;
12
+ /** Path of the armed lifeline, if arming succeeded. */
13
+ path(): string | undefined;
14
+ /** Stops listening and removes the socket. */
15
+ dispose(): void;
16
+ }
17
+ //#endregion
18
+ export { ILifeline };
19
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../../src/services/Lifeline/types.ts"],"mappings":";;;;;;;;UAOiB;;EAEf,IAAI,oBAAoB;;EAExB;;EAEA"}
@@ -0,0 +1,19 @@
1
+ //#region src/services/Lifeline/types.d.ts
2
+ /**
3
+ * A Unix socket the owning pi process listens on for the life of a session.
4
+ *
5
+ * Runner supervisors connect to it and watch for the close edge, which arrives
6
+ * on every owner exit path including SIGKILL. That is the one death signal a
7
+ * graceful shutdown handler cannot provide.
8
+ */
9
+ interface ILifeline {
10
+ /** Binds the socket and starts listening. Idempotent; resolves with the path. */
11
+ arm(sessionId: string): Promise<string | undefined>;
12
+ /** Path of the armed lifeline, if arming succeeded. */
13
+ path(): string | undefined;
14
+ /** Stops listening and removes the socket. */
15
+ dispose(): void;
16
+ }
17
+ //#endregion
18
+ export { ILifeline };
19
+ //# sourceMappingURL=types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.mts","names":[],"sources":["../../../src/services/Lifeline/types.ts"],"mappings":";;;;;;;;UAOiB;;EAEf,IAAI,oBAAoB;;EAExB;;EAEA"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../config.cjs"),n=require("../../types.cjs"),r=require("../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.cjs"),i=require("../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateParam.cjs"),a=require("../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.cjs");let o=require("inversify");require("reflect-metadata/lite");let s=require("node:fs");s=e.__toESM(s,1);let c=class{paths;constructor(e){this.paths=e}open(e){this.paths.ensureDirectories();let n=this.paths.logPathFor(e),r=this.paths.rotatedLogPathFor(e),i=t.getLogMaxBytes(),a=s.default.openSync(n,`w`),o=0;return{path:n,append(e){let t=Buffer.from(e,`utf8`);o+t.byteLength>i&&(s.default.closeSync(a),s.default.renameSync(n,r),a=s.default.openSync(n,`w`),o=0),s.default.writeSync(a,t),o+=t.byteLength},size(){return o},close(){try{s.default.closeSync(a)}catch{}}}}};c=a.default([(0,o.injectable)(),i.default(0,(0,o.inject)(n.TYPES.RunnerPaths)),r.default(`design:paramtypes`,[Object])],c),Object.defineProperty(exports,"LogFile",{enumerable:!0,get:function(){return c}});
2
+ //# sourceMappingURL=LogFile.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogFile.cjs","names":["getLogMaxBytes","fs","injectable","inject","TYPES"],"sources":["../../../src/services/LogFile/LogFile.ts"],"sourcesContent":["import fs from 'node:fs';\nimport { inject, injectable } from 'inversify';\nimport 'reflect-metadata/lite';\nimport { getLogMaxBytes } from '../../config.ts';\nimport { TYPES } from '../../types.ts';\nimport type { IRunnerPaths } from '../RunnerPaths/index.ts';\nimport type { ILogFile, LogWriter } from './types.ts';\n\n@injectable()\nexport class LogFile implements ILogFile {\n constructor(@inject(TYPES.RunnerPaths) private readonly paths: IRunnerPaths) {}\n\n open(id: string): LogWriter {\n this.paths.ensureDirectories();\n const logPath = this.paths.logPathFor(id);\n const rotatedPath = this.paths.rotatedLogPathFor(id);\n const maxBytes = getLogMaxBytes();\n\n // A reused name starts clean: the previous runner's output is already\n // available to whoever wanted it, and mixing two runs in one file makes\n // both unreadable.\n let handle = fs.openSync(logPath, 'w');\n let written = 0;\n\n return {\n path: logPath,\n append(text: string): void {\n const chunk = Buffer.from(text, 'utf8');\n if (written + chunk.byteLength > maxBytes) {\n fs.closeSync(handle);\n fs.renameSync(logPath, rotatedPath);\n handle = fs.openSync(logPath, 'w');\n written = 0;\n }\n fs.writeSync(handle, chunk);\n written += chunk.byteLength;\n },\n size(): number {\n return written;\n },\n close(): void {\n try {\n fs.closeSync(handle);\n } catch {\n // Closing twice is not worth reporting: the log is already flushed.\n }\n },\n };\n }\n}\n"],"mappings":"kiBASO,IAAM,EAAN,KAAkC,CACiB,MAAxD,YAAY,EAAiE,CAArB,KAAA,MAAA,CAAsB,CAE9E,KAAK,EAAuB,CAC1B,KAAK,MAAM,kBAAkB,EAC7B,IAAM,EAAU,KAAK,MAAM,WAAW,CAAE,EAClC,EAAc,KAAK,MAAM,kBAAkB,CAAE,EAC7C,EAAWA,EAAAA,eAAe,EAK5B,EAASC,EAAAA,QAAG,SAAS,EAAS,GAAG,EACjC,EAAU,EAEd,MAAO,CACL,KAAM,EACN,OAAO,EAAoB,CACzB,IAAM,EAAQ,OAAO,KAAK,EAAM,MAAM,EAClC,EAAU,EAAM,WAAa,IAC/B,EAAA,QAAG,UAAU,CAAM,EACnB,EAAA,QAAG,WAAW,EAAS,CAAW,EAClC,EAASA,EAAAA,QAAG,SAAS,EAAS,GAAG,EACjC,EAAU,GAEZ,EAAA,QAAG,UAAU,EAAQ,CAAK,EAC1B,GAAW,EAAM,UACnB,EACA,MAAe,CACb,OAAO,CACT,EACA,OAAc,CACZ,GAAI,CACF,EAAA,QAAG,UAAU,CAAM,CACrB,MAAQ,CAER,CACF,CACF,CACF,CACF,gBAzCCC,EAAAA,EAAAA,WAAAA,CAAW,EAEGC,EAAAA,QAAAA,GAAAA,EAAAA,EAAAA,OAAAA,CAAOC,EAAAA,MAAM,WAAW,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { IRunnerPaths } from "../RunnerPaths/types.cjs";
2
+ import "../RunnerPaths/index.cjs";
3
+ import { ILogFile, LogWriter } from "./types.cjs";
4
+ import "reflect-metadata/lite";
5
+ //#region src/services/LogFile/LogFile.d.ts
6
+ declare class LogFile implements ILogFile {
7
+ private readonly paths;
8
+ constructor(paths: IRunnerPaths);
9
+ open(id: string): LogWriter;
10
+ }
11
+ //#endregion
12
+ export { LogFile };
13
+ //# sourceMappingURL=LogFile.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogFile.d.cts","names":[],"sources":["../../../src/services/LogFile/LogFile.ts"],"mappings":";;;;;cASa,mBAAmB;mBAC0B;EAAA,YAAA,OAAO;EAE/D,KAAK,aAAa"}
@@ -0,0 +1,13 @@
1
+ import { IRunnerPaths } from "../RunnerPaths/types.mjs";
2
+ import "../RunnerPaths/index.mjs";
3
+ import { ILogFile, LogWriter } from "./types.mjs";
4
+ import "reflect-metadata/lite";
5
+ //#region src/services/LogFile/LogFile.d.ts
6
+ declare class LogFile implements ILogFile {
7
+ private readonly paths;
8
+ constructor(paths: IRunnerPaths);
9
+ open(id: string): LogWriter;
10
+ }
11
+ //#endregion
12
+ export { LogFile };
13
+ //# sourceMappingURL=LogFile.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogFile.d.mts","names":[],"sources":["../../../src/services/LogFile/LogFile.ts"],"mappings":";;;;;cASa,mBAAmB;mBAC0B;EAAA,YAAA,OAAO;EAE/D,KAAK,aAAa"}
@@ -0,0 +1,2 @@
1
+ import{getLogMaxBytes as e}from"../../config.mjs";import{TYPES as t}from"../../types.mjs";import n from"../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.mjs";import r from"../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateParam.mjs";import i from"../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.mjs";import{inject as a,injectable as o}from"inversify";import"reflect-metadata/lite";import s from"node:fs";let c=class{paths;constructor(e){this.paths=e}open(t){this.paths.ensureDirectories();let n=this.paths.logPathFor(t),r=this.paths.rotatedLogPathFor(t),i=e(),a=s.openSync(n,`w`),o=0;return{path:n,append(e){let t=Buffer.from(e,`utf8`);o+t.byteLength>i&&(s.closeSync(a),s.renameSync(n,r),a=s.openSync(n,`w`),o=0),s.writeSync(a,t),o+=t.byteLength},size(){return o},close(){try{s.closeSync(a)}catch{}}}}};c=i([o(),r(0,a(t.RunnerPaths)),n(`design:paramtypes`,[Object])],c);export{c as LogFile};
2
+ //# sourceMappingURL=LogFile.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogFile.mjs","names":[],"sources":["../../../src/services/LogFile/LogFile.ts"],"sourcesContent":["import fs from 'node:fs';\nimport { inject, injectable } from 'inversify';\nimport 'reflect-metadata/lite';\nimport { getLogMaxBytes } from '../../config.ts';\nimport { TYPES } from '../../types.ts';\nimport type { IRunnerPaths } from '../RunnerPaths/index.ts';\nimport type { ILogFile, LogWriter } from './types.ts';\n\n@injectable()\nexport class LogFile implements ILogFile {\n constructor(@inject(TYPES.RunnerPaths) private readonly paths: IRunnerPaths) {}\n\n open(id: string): LogWriter {\n this.paths.ensureDirectories();\n const logPath = this.paths.logPathFor(id);\n const rotatedPath = this.paths.rotatedLogPathFor(id);\n const maxBytes = getLogMaxBytes();\n\n // A reused name starts clean: the previous runner's output is already\n // available to whoever wanted it, and mixing two runs in one file makes\n // both unreadable.\n let handle = fs.openSync(logPath, 'w');\n let written = 0;\n\n return {\n path: logPath,\n append(text: string): void {\n const chunk = Buffer.from(text, 'utf8');\n if (written + chunk.byteLength > maxBytes) {\n fs.closeSync(handle);\n fs.renameSync(logPath, rotatedPath);\n handle = fs.openSync(logPath, 'w');\n written = 0;\n }\n fs.writeSync(handle, chunk);\n written += chunk.byteLength;\n },\n size(): number {\n return written;\n },\n close(): void {\n try {\n fs.closeSync(handle);\n } catch {\n // Closing twice is not worth reporting: the log is already flushed.\n }\n },\n };\n }\n}\n"],"mappings":"8cASO,IAAM,EAAN,KAAkC,CACiB,MAAxD,YAAY,EAAiE,CAArB,KAAA,MAAA,CAAsB,CAE9E,KAAK,EAAuB,CAC1B,KAAK,MAAM,kBAAkB,EAC7B,IAAM,EAAU,KAAK,MAAM,WAAW,CAAE,EAClC,EAAc,KAAK,MAAM,kBAAkB,CAAE,EAC7C,EAAW,EAAe,EAK5B,EAAS,EAAG,SAAS,EAAS,GAAG,EACjC,EAAU,EAEd,MAAO,CACL,KAAM,EACN,OAAO,EAAoB,CACzB,IAAM,EAAQ,OAAO,KAAK,EAAM,MAAM,EAClC,EAAU,EAAM,WAAa,IAC/B,EAAG,UAAU,CAAM,EACnB,EAAG,WAAW,EAAS,CAAW,EAClC,EAAS,EAAG,SAAS,EAAS,GAAG,EACjC,EAAU,GAEZ,EAAG,UAAU,EAAQ,CAAK,EAC1B,GAAW,EAAM,UACnB,EACA,MAAe,CACb,OAAO,CACT,EACA,OAAc,CACZ,GAAI,CACF,EAAG,UAAU,CAAM,CACrB,MAAQ,CAER,CACF,CACF,CACF,CACF,OAzCC,EAAW,EAEG,EAAA,EAAA,EAAO,EAAM,WAAW,CAAA"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./LogFile.cjs");Object.defineProperty(exports,"LogFile",{enumerable:!0,get:function(){return e.LogFile}});
@@ -0,0 +1,3 @@
1
+ import { ILogFile, LogWriter } from "./types.cjs";
2
+ import { LogFile } from "./LogFile.cjs";
3
+ export { type ILogFile, LogFile, type LogWriter };
@@ -0,0 +1,3 @@
1
+ import { ILogFile, LogWriter } from "./types.mjs";
2
+ import { LogFile } from "./LogFile.mjs";
3
+ export { type ILogFile, LogFile, type LogWriter };
@@ -0,0 +1 @@
1
+ import{LogFile as e}from"./LogFile.mjs";export{e as LogFile};
@@ -0,0 +1,16 @@
1
+ //#region src/services/LogFile/types.d.ts
2
+ /** An open append handle for one runner's log. */
3
+ interface LogWriter {
4
+ readonly path: string;
5
+ append(text: string): void;
6
+ /** Bytes written to the current file, after any rotation. */
7
+ size(): number;
8
+ close(): void;
9
+ }
10
+ /** Opens runner log files, truncating any output left by a previous runner of the same name. */
11
+ interface ILogFile {
12
+ open(id: string): LogWriter;
13
+ }
14
+ //#endregion
15
+ export { ILogFile, LogWriter };
16
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../../src/services/LogFile/types.ts"],"mappings":";;UACiB;WACN;EACT,OAAO;;EAEP;EACA;;;UAIe;EACf,KAAK,aAAa"}
@@ -0,0 +1,16 @@
1
+ //#region src/services/LogFile/types.d.ts
2
+ /** An open append handle for one runner's log. */
3
+ interface LogWriter {
4
+ readonly path: string;
5
+ append(text: string): void;
6
+ /** Bytes written to the current file, after any rotation. */
7
+ size(): number;
8
+ close(): void;
9
+ }
10
+ /** Opens runner log files, truncating any output left by a previous runner of the same name. */
11
+ interface ILogFile {
12
+ open(id: string): LogWriter;
13
+ }
14
+ //#endregion
15
+ export { ILogFile, LogWriter };
16
+ //# sourceMappingURL=types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.mts","names":[],"sources":["../../../src/services/LogFile/types.ts"],"mappings":";;UACiB;WACN;EACT,OAAO;;EAEP;EACA;;;UAIe;EACf,KAAK,aAAa"}
@@ -0,0 +1,10 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.cjs");let n=require("inversify");require("reflect-metadata/lite");let r=require("node:fs");r=e.__toESM(r,1);let i=class{read(e,t={}){let n,i;try{n=r.default.readFileSync(e,`utf8`),i=r.default.statSync(e).size}catch(t){if(t.code!==`ENOENT`)throw t;return{text:``,lineCount:0,totalLines:0,fileSize:0,path:e,exists:!1}}let c=a(n),l=o(s(n,t),t.lines??200);return{text:l,lineCount:a(l),totalLines:c,fileSize:i,path:e,exists:!0}}};i=t.default([(0,n.injectable)()],i);function a(e){return e.length===0?0:e.endsWith(`
2
+ `)?e.split(`
3
+ `).length-1:e.split(`
4
+ `).length}function o(e,t){if(t<=0||e.length===0)return``;let n=e.split(`
5
+ `),r=n.at(-1)===``;return r&&n.pop(),n.length<=t?e:`${n.slice(-t).join(`
6
+ `)}${r?`
7
+ `:``}`}function s(e,t){if(!t.grep)return e;let n=e.split(`
8
+ `),r=t.ignoreCase?t.grep.toLowerCase():t.grep,i=Math.max(0,t.contextLines??0),a=[];if(n.forEach((e,o)=>{(t.ignoreCase?e.toLowerCase():e).includes(r)&&a.push({start:Math.max(0,o-i),end:Math.min(n.length-1,o+i)})}),a.length===0)return``;let o=[];for(let e of a){let t=o.at(-1);t&&e.start<=t.end+1?t.end=Math.max(t.end,e.end):o.push({...e})}return o.flatMap(e=>n.slice(e.start,e.end+1)).join(`
9
+ `)}Object.defineProperty(exports,"LogReader",{enumerable:!0,get:function(){return i}}),exports.filterLogText=s;
10
+ //# sourceMappingURL=LogReader.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogReader.cjs","names":["fs","injectable"],"sources":["../../../src/services/LogReader/LogReader.ts"],"sourcesContent":["import fs from 'node:fs';\nimport { injectable } from 'inversify';\nimport 'reflect-metadata/lite';\nimport type { ILogReader, LogQuery, LogSlice } from './types.ts';\n\nconst DEFAULT_LINES = 200;\n\n@injectable()\nexport class LogReader implements ILogReader {\n read(logPath: string, query: LogQuery = {}): LogSlice {\n let text: string;\n let fileSize: number;\n try {\n text = fs.readFileSync(logPath, 'utf8');\n fileSize = fs.statSync(logPath).size;\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error;\n return { text: '', lineCount: 0, totalLines: 0, fileSize: 0, path: logPath, exists: false };\n }\n\n const totalLines = countLines(text);\n // Grep runs over the whole file before the tail is taken. Tailing first\n // would make searching a long-running log impossible, which is the main\n // reason to keep these logs at all.\n const filtered = filterLogText(text, query);\n const slice = tail(filtered, query.lines ?? DEFAULT_LINES);\n\n return { text: slice, lineCount: countLines(slice), totalLines, fileSize, path: logPath, exists: true };\n }\n}\n\nfunction countLines(text: string): number {\n if (text.length === 0) return 0;\n return text.endsWith('\\n') ? text.split('\\n').length - 1 : text.split('\\n').length;\n}\n\nfunction tail(text: string, lines: number): string {\n if (lines <= 0 || text.length === 0) return '';\n const parts = text.split('\\n');\n const trailingNewline = parts.at(-1) === '';\n if (trailingNewline) parts.pop();\n if (parts.length <= lines) return text;\n return `${parts.slice(-lines).join('\\n')}${trailingNewline ? '\\n' : ''}`;\n}\n\n/**\n * Grep with context, matching the `product-stack logs` semantics so the two\n * surfaces behave the same. Overlapping and adjacent context windows merge.\n */\nexport function filterLogText(text: string, query: Pick<LogQuery, 'grep' | 'ignoreCase' | 'contextLines'>): string {\n if (!query.grep) return text;\n const lines = text.split('\\n');\n const needle = query.ignoreCase ? query.grep.toLowerCase() : query.grep;\n const contextLines = Math.max(0, query.contextLines ?? 0);\n const ranges: Array<{ start: number; end: number }> = [];\n\n lines.forEach((line, index) => {\n const haystack = query.ignoreCase ? line.toLowerCase() : line;\n if (!haystack.includes(needle)) return;\n ranges.push({\n start: Math.max(0, index - contextLines),\n end: Math.min(lines.length - 1, index + contextLines),\n });\n });\n\n if (ranges.length === 0) return '';\n const merged: Array<{ start: number; end: number }> = [];\n for (const range of ranges) {\n const previous = merged.at(-1);\n if (previous && range.start <= previous.end + 1) {\n previous.end = Math.max(previous.end, range.end);\n } else {\n merged.push({ ...range });\n }\n }\n return merged.flatMap((range) => lines.slice(range.start, range.end + 1)).join('\\n');\n}\n"],"mappings":"oTAQO,IAAM,EAAN,KAAsC,CAC3C,KAAK,EAAiB,EAAkB,CAAC,EAAa,CACpD,IAAI,EACA,EACJ,GAAI,CACF,EAAOA,EAAAA,QAAG,aAAa,EAAS,MAAM,EACtC,EAAWA,EAAAA,QAAG,SAAS,CAAO,CAAC,CAAC,IAClC,OAAS,EAAO,CACd,GAAK,EAAgC,OAAS,SAAU,MAAM,EAC9D,MAAO,CAAE,KAAM,GAAI,UAAW,EAAG,WAAY,EAAG,SAAU,EAAG,KAAM,EAAS,OAAQ,EAAM,CAC5F,CAEA,IAAM,EAAa,EAAW,CAAI,EAK5B,EAAQ,EADG,EAAc,EAAM,CACX,EAAG,EAAM,OAAS,GAAa,EAEzD,MAAO,CAAE,KAAM,EAAO,UAAW,EAAW,CAAK,EAAG,aAAY,WAAU,KAAM,EAAS,OAAQ,EAAK,CACxG,CACF,EAtBCC,EAAAA,EAAAA,QAAAA,EAAAA,EAAAA,EAAAA,WAAAA,CAAW,CAAA,EAAA,CAAA,EAwBZ,SAAS,EAAW,EAAsB,CAExC,OADI,EAAK,SAAW,EAAU,EACvB,EAAK,SAAS;CAAI,EAAI,EAAK,MAAM;CAAI,CAAC,CAAC,OAAS,EAAI,EAAK,MAAM;CAAI,CAAC,CAAC,MAC9E,CAEA,SAAS,EAAK,EAAc,EAAuB,CACjD,GAAI,GAAS,GAAK,EAAK,SAAW,EAAG,MAAO,GAC5C,IAAM,EAAQ,EAAK,MAAM;CAAI,EACvB,EAAkB,EAAM,GAAG,EAAE,IAAM,GAGzC,OAFI,GAAiB,EAAM,IAAI,EAC3B,EAAM,QAAU,EAAc,EAC3B,GAAG,EAAM,MAAM,CAAC,CAAK,CAAC,CAAC,KAAK;CAAI,IAAI,EAAkB;EAAO,IACtE,CAMA,SAAgB,EAAc,EAAc,EAAuE,CACjH,GAAI,CAAC,EAAM,KAAM,OAAO,EACxB,IAAM,EAAQ,EAAK,MAAM;CAAI,EACvB,EAAS,EAAM,WAAa,EAAM,KAAK,YAAY,EAAI,EAAM,KAC7D,EAAe,KAAK,IAAI,EAAG,EAAM,cAAgB,CAAC,EAClD,EAAgD,CAAC,EAWvD,GATA,EAAM,SAAS,EAAM,IAAU,EACZ,EAAM,WAAa,EAAK,YAAY,EAAI,EAAA,CAC3C,SAAS,CAAM,GAC7B,EAAO,KAAK,CACV,MAAO,KAAK,IAAI,EAAG,EAAQ,CAAY,EACvC,IAAK,KAAK,IAAI,EAAM,OAAS,EAAG,EAAQ,CAAY,CACtD,CAAC,CACH,CAAC,EAEG,EAAO,SAAW,EAAG,MAAO,GAChC,IAAM,EAAgD,CAAC,EACvD,IAAK,IAAM,KAAS,EAAQ,CAC1B,IAAM,EAAW,EAAO,GAAG,EAAE,EACzB,GAAY,EAAM,OAAS,EAAS,IAAM,EAC5C,EAAS,IAAM,KAAK,IAAI,EAAS,IAAK,EAAM,GAAG,EAE/C,EAAO,KAAK,CAAE,GAAG,CAAM,CAAC,CAE5B,CACA,OAAO,EAAO,QAAS,GAAU,EAAM,MAAM,EAAM,MAAO,EAAM,IAAM,CAAC,CAAC,CAAC,CAAC,KAAK;CAAI,CACrF"}
@@ -0,0 +1,14 @@
1
+ import { ILogReader, LogQuery, LogSlice } from "./types.cjs";
2
+ import "reflect-metadata/lite";
3
+ //#region src/services/LogReader/LogReader.d.ts
4
+ declare class LogReader implements ILogReader {
5
+ read(logPath: string, query?: LogQuery): LogSlice;
6
+ }
7
+ /**
8
+ * Grep with context, matching the `product-stack logs` semantics so the two
9
+ * surfaces behave the same. Overlapping and adjacent context windows merge.
10
+ */
11
+ declare function filterLogText(text: string, query: Pick<LogQuery, 'grep' | 'ignoreCase' | 'contextLines'>): string;
12
+ //#endregion
13
+ export { LogReader, filterLogText };
14
+ //# sourceMappingURL=LogReader.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogReader.d.cts","names":[],"sources":["../../../src/services/LogReader/LogReader.ts"],"mappings":";;;cAQa,qBAAqB;EAChC,KAAK,iBAAiB,QAAO,WAAgB;;;;;;iBAwC/B,cAAc,cAAc,OAAO,KAAK"}
@@ -0,0 +1,14 @@
1
+ import { ILogReader, LogQuery, LogSlice } from "./types.mjs";
2
+ import "reflect-metadata/lite";
3
+ //#region src/services/LogReader/LogReader.d.ts
4
+ declare class LogReader implements ILogReader {
5
+ read(logPath: string, query?: LogQuery): LogSlice;
6
+ }
7
+ /**
8
+ * Grep with context, matching the `product-stack logs` semantics so the two
9
+ * surfaces behave the same. Overlapping and adjacent context windows merge.
10
+ */
11
+ declare function filterLogText(text: string, query: Pick<LogQuery, 'grep' | 'ignoreCase' | 'contextLines'>): string;
12
+ //#endregion
13
+ export { LogReader, filterLogText };
14
+ //# sourceMappingURL=LogReader.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogReader.d.mts","names":[],"sources":["../../../src/services/LogReader/LogReader.ts"],"mappings":";;;cAQa,qBAAqB;EAChC,KAAK,iBAAiB,QAAO,WAAgB;;;;;;iBAwC/B,cAAc,cAAc,OAAO,KAAK"}
@@ -0,0 +1,10 @@
1
+ import e from"../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.mjs";import{injectable as t}from"inversify";import"reflect-metadata/lite";import n from"node:fs";let r=class{read(e,t={}){let r,s;try{r=n.readFileSync(e,`utf8`),s=n.statSync(e).size}catch(t){if(t.code!==`ENOENT`)throw t;return{text:``,lineCount:0,totalLines:0,fileSize:0,path:e,exists:!1}}let c=i(r),l=a(o(r,t),t.lines??200);return{text:l,lineCount:i(l),totalLines:c,fileSize:s,path:e,exists:!0}}};r=e([t()],r);function i(e){return e.length===0?0:e.endsWith(`
2
+ `)?e.split(`
3
+ `).length-1:e.split(`
4
+ `).length}function a(e,t){if(t<=0||e.length===0)return``;let n=e.split(`
5
+ `),r=n.at(-1)===``;return r&&n.pop(),n.length<=t?e:`${n.slice(-t).join(`
6
+ `)}${r?`
7
+ `:``}`}function o(e,t){if(!t.grep)return e;let n=e.split(`
8
+ `),r=t.ignoreCase?t.grep.toLowerCase():t.grep,i=Math.max(0,t.contextLines??0),a=[];if(n.forEach((e,o)=>{(t.ignoreCase?e.toLowerCase():e).includes(r)&&a.push({start:Math.max(0,o-i),end:Math.min(n.length-1,o+i)})}),a.length===0)return``;let o=[];for(let e of a){let t=o.at(-1);t&&e.start<=t.end+1?t.end=Math.max(t.end,e.end):o.push({...e})}return o.flatMap(e=>n.slice(e.start,e.end+1)).join(`
9
+ `)}export{r as LogReader,o as filterLogText};
10
+ //# sourceMappingURL=LogReader.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogReader.mjs","names":[],"sources":["../../../src/services/LogReader/LogReader.ts"],"sourcesContent":["import fs from 'node:fs';\nimport { injectable } from 'inversify';\nimport 'reflect-metadata/lite';\nimport type { ILogReader, LogQuery, LogSlice } from './types.ts';\n\nconst DEFAULT_LINES = 200;\n\n@injectable()\nexport class LogReader implements ILogReader {\n read(logPath: string, query: LogQuery = {}): LogSlice {\n let text: string;\n let fileSize: number;\n try {\n text = fs.readFileSync(logPath, 'utf8');\n fileSize = fs.statSync(logPath).size;\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error;\n return { text: '', lineCount: 0, totalLines: 0, fileSize: 0, path: logPath, exists: false };\n }\n\n const totalLines = countLines(text);\n // Grep runs over the whole file before the tail is taken. Tailing first\n // would make searching a long-running log impossible, which is the main\n // reason to keep these logs at all.\n const filtered = filterLogText(text, query);\n const slice = tail(filtered, query.lines ?? DEFAULT_LINES);\n\n return { text: slice, lineCount: countLines(slice), totalLines, fileSize, path: logPath, exists: true };\n }\n}\n\nfunction countLines(text: string): number {\n if (text.length === 0) return 0;\n return text.endsWith('\\n') ? text.split('\\n').length - 1 : text.split('\\n').length;\n}\n\nfunction tail(text: string, lines: number): string {\n if (lines <= 0 || text.length === 0) return '';\n const parts = text.split('\\n');\n const trailingNewline = parts.at(-1) === '';\n if (trailingNewline) parts.pop();\n if (parts.length <= lines) return text;\n return `${parts.slice(-lines).join('\\n')}${trailingNewline ? '\\n' : ''}`;\n}\n\n/**\n * Grep with context, matching the `product-stack logs` semantics so the two\n * surfaces behave the same. Overlapping and adjacent context windows merge.\n */\nexport function filterLogText(text: string, query: Pick<LogQuery, 'grep' | 'ignoreCase' | 'contextLines'>): string {\n if (!query.grep) return text;\n const lines = text.split('\\n');\n const needle = query.ignoreCase ? query.grep.toLowerCase() : query.grep;\n const contextLines = Math.max(0, query.contextLines ?? 0);\n const ranges: Array<{ start: number; end: number }> = [];\n\n lines.forEach((line, index) => {\n const haystack = query.ignoreCase ? line.toLowerCase() : line;\n if (!haystack.includes(needle)) return;\n ranges.push({\n start: Math.max(0, index - contextLines),\n end: Math.min(lines.length - 1, index + contextLines),\n });\n });\n\n if (ranges.length === 0) return '';\n const merged: Array<{ start: number; end: number }> = [];\n for (const range of ranges) {\n const previous = merged.at(-1);\n if (previous && range.start <= previous.end + 1) {\n previous.end = Math.max(previous.end, range.end);\n } else {\n merged.push({ ...range });\n }\n }\n return merged.flatMap((range) => lines.slice(range.start, range.end + 1)).join('\\n');\n}\n"],"mappings":"iLAQO,IAAM,EAAN,KAAsC,CAC3C,KAAK,EAAiB,EAAkB,CAAC,EAAa,CACpD,IAAI,EACA,EACJ,GAAI,CACF,EAAO,EAAG,aAAa,EAAS,MAAM,EACtC,EAAW,EAAG,SAAS,CAAO,CAAC,CAAC,IAClC,OAAS,EAAO,CACd,GAAK,EAAgC,OAAS,SAAU,MAAM,EAC9D,MAAO,CAAE,KAAM,GAAI,UAAW,EAAG,WAAY,EAAG,SAAU,EAAG,KAAM,EAAS,OAAQ,EAAM,CAC5F,CAEA,IAAM,EAAa,EAAW,CAAI,EAK5B,EAAQ,EADG,EAAc,EAAM,CACX,EAAG,EAAM,OAAS,GAAa,EAEzD,MAAO,CAAE,KAAM,EAAO,UAAW,EAAW,CAAK,EAAG,aAAY,WAAU,KAAM,EAAS,OAAQ,EAAK,CACxG,CACF,EAtBC,EAAA,EAAA,CAAA,EAAW,CAAA,EAAA,CAAA,EAwBZ,SAAS,EAAW,EAAsB,CAExC,OADI,EAAK,SAAW,EAAU,EACvB,EAAK,SAAS;CAAI,EAAI,EAAK,MAAM;CAAI,CAAC,CAAC,OAAS,EAAI,EAAK,MAAM;CAAI,CAAC,CAAC,MAC9E,CAEA,SAAS,EAAK,EAAc,EAAuB,CACjD,GAAI,GAAS,GAAK,EAAK,SAAW,EAAG,MAAO,GAC5C,IAAM,EAAQ,EAAK,MAAM;CAAI,EACvB,EAAkB,EAAM,GAAG,EAAE,IAAM,GAGzC,OAFI,GAAiB,EAAM,IAAI,EAC3B,EAAM,QAAU,EAAc,EAC3B,GAAG,EAAM,MAAM,CAAC,CAAK,CAAC,CAAC,KAAK;CAAI,IAAI,EAAkB;EAAO,IACtE,CAMA,SAAgB,EAAc,EAAc,EAAuE,CACjH,GAAI,CAAC,EAAM,KAAM,OAAO,EACxB,IAAM,EAAQ,EAAK,MAAM;CAAI,EACvB,EAAS,EAAM,WAAa,EAAM,KAAK,YAAY,EAAI,EAAM,KAC7D,EAAe,KAAK,IAAI,EAAG,EAAM,cAAgB,CAAC,EAClD,EAAgD,CAAC,EAWvD,GATA,EAAM,SAAS,EAAM,IAAU,EACZ,EAAM,WAAa,EAAK,YAAY,EAAI,EAAA,CAC3C,SAAS,CAAM,GAC7B,EAAO,KAAK,CACV,MAAO,KAAK,IAAI,EAAG,EAAQ,CAAY,EACvC,IAAK,KAAK,IAAI,EAAM,OAAS,EAAG,EAAQ,CAAY,CACtD,CAAC,CACH,CAAC,EAEG,EAAO,SAAW,EAAG,MAAO,GAChC,IAAM,EAAgD,CAAC,EACvD,IAAK,IAAM,KAAS,EAAQ,CAC1B,IAAM,EAAW,EAAO,GAAG,EAAE,EACzB,GAAY,EAAM,OAAS,EAAS,IAAM,EAC5C,EAAS,IAAM,KAAK,IAAI,EAAS,IAAK,EAAM,GAAG,EAE/C,EAAO,KAAK,CAAE,GAAG,CAAM,CAAC,CAE5B,CACA,OAAO,EAAO,QAAS,GAAU,EAAM,MAAM,EAAM,MAAO,EAAM,IAAM,CAAC,CAAC,CAAC,CAAC,KAAK;CAAI,CACrF"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./LogReader.cjs");Object.defineProperty(exports,"LogReader",{enumerable:!0,get:function(){return e.LogReader}}),exports.filterLogText=e.filterLogText;
@@ -0,0 +1,3 @@
1
+ import { ILogReader, LogQuery, LogSlice } from "./types.cjs";
2
+ import { LogReader, filterLogText } from "./LogReader.cjs";
3
+ export { type ILogReader, type LogQuery, LogReader, type LogSlice, filterLogText };
@@ -0,0 +1,3 @@
1
+ import { ILogReader, LogQuery, LogSlice } from "./types.mjs";
2
+ import { LogReader, filterLogText } from "./LogReader.mjs";
3
+ export { type ILogReader, type LogQuery, LogReader, type LogSlice, filterLogText };
@@ -0,0 +1 @@
1
+ import{LogReader as e,filterLogText as t}from"./LogReader.mjs";export{e as LogReader,t as filterLogText};
@@ -0,0 +1,27 @@
1
+ //#region src/services/LogReader/types.d.ts
2
+ interface LogQuery {
3
+ /** Trailing lines to return before filtering. Defaults to 200. */
4
+ lines?: number;
5
+ grep?: string;
6
+ ignoreCase?: boolean;
7
+ contextLines?: number;
8
+ }
9
+ interface LogSlice {
10
+ text: string;
11
+ /** Lines in the returned slice. */
12
+ lineCount: number;
13
+ /** Lines in the whole file, so a truncated view says what it left out. */
14
+ totalLines: number;
15
+ /** Size of the log file on disk, in bytes. */
16
+ fileSize: number;
17
+ path: string;
18
+ /** False when the runner has produced no log file yet. */
19
+ exists: boolean;
20
+ }
21
+ /** Reads runner logs: tail first, then an optional grep with context. */
22
+ interface ILogReader {
23
+ read(logPath: string, query?: LogQuery): LogSlice;
24
+ }
25
+ //#endregion
26
+ export { ILogReader, LogQuery, LogSlice };
27
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../../src/services/LogReader/types.ts"],"mappings":";UAAiB;;EAEf;EACA;EACA;EACA;;UAGe;EACf;;EAEA;;EAEA;;EAEA;EACA;;EAEA;;;UAIe;EACf,KAAK,iBAAiB,QAAQ,WAAW"}
@@ -0,0 +1,27 @@
1
+ //#region src/services/LogReader/types.d.ts
2
+ interface LogQuery {
3
+ /** Trailing lines to return before filtering. Defaults to 200. */
4
+ lines?: number;
5
+ grep?: string;
6
+ ignoreCase?: boolean;
7
+ contextLines?: number;
8
+ }
9
+ interface LogSlice {
10
+ text: string;
11
+ /** Lines in the returned slice. */
12
+ lineCount: number;
13
+ /** Lines in the whole file, so a truncated view says what it left out. */
14
+ totalLines: number;
15
+ /** Size of the log file on disk, in bytes. */
16
+ fileSize: number;
17
+ path: string;
18
+ /** False when the runner has produced no log file yet. */
19
+ exists: boolean;
20
+ }
21
+ /** Reads runner logs: tail first, then an optional grep with context. */
22
+ interface ILogReader {
23
+ read(logPath: string, query?: LogQuery): LogSlice;
24
+ }
25
+ //#endregion
26
+ export { ILogReader, LogQuery, LogSlice };
27
+ //# sourceMappingURL=types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.mts","names":[],"sources":["../../../src/services/LogReader/types.ts"],"mappings":";UAAiB;;EAEf;EACA;EACA;EACA;;UAGe;EACf;;EAEA;;EAEA;;EAEA;EACA;;EAEA;;;UAIe;EACf,KAAK,iBAAiB,QAAQ,WAAW"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.cjs");let t=require("inversify");require("reflect-metadata/lite");let n=class{isAlive(e){if(!Number.isInteger(e)||e<=0)return!1;try{return process.kill(e,0),!0}catch{return!1}}signalGroup(e,t){if(!Number.isInteger(e)||e<=0)return!1;try{return process.kill(-e,t),!0}catch{return!1}}};n=e.default([(0,t.injectable)()],n),Object.defineProperty(exports,"NodeProcessControl",{enumerable:!0,get:function(){return n}});
2
+ //# sourceMappingURL=NodeProcessControl.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeProcessControl.cjs","names":["injectable"],"sources":["../../../src/services/ProcessControl/NodeProcessControl.ts"],"sourcesContent":["import { injectable } from 'inversify';\nimport 'reflect-metadata/lite';\nimport type { IProcessControl } from './types.ts';\n\nconst LIVENESS_PROBE = 0;\n\n/** Wraps `process.kill`, which doubles as the liveness probe on POSIX. */\n@injectable()\nexport class NodeProcessControl implements IProcessControl {\n isAlive(pid: number): boolean {\n if (!Number.isInteger(pid) || pid <= 0) return false;\n try {\n process.kill(pid, LIVENESS_PROBE);\n return true;\n } catch {\n // EPERM would also land here, but a process we cannot signal is not one\n // this extension can manage, so treating it as gone is the safe answer.\n return false;\n }\n }\n\n signalGroup(pid: number, signal: NodeJS.Signals): boolean {\n if (!Number.isInteger(pid) || pid <= 0) return false;\n try {\n process.kill(-pid, signal);\n return true;\n } catch {\n return false;\n }\n }\n}\n"],"mappings":"wNAQO,IAAM,EAAN,KAAoD,CACzD,QAAQ,EAAsB,CAC5B,GAAI,CAAC,OAAO,UAAU,CAAG,GAAK,GAAO,EAAG,MAAO,GAC/C,GAAI,CAEF,OADA,QAAQ,KAAK,EAAK,CAAc,EACzB,EACT,MAAQ,CAGN,MAAO,EACT,CACF,CAEA,YAAY,EAAa,EAAiC,CACxD,GAAI,CAAC,OAAO,UAAU,CAAG,GAAK,GAAO,EAAG,MAAO,GAC/C,GAAI,CAEF,OADA,QAAQ,KAAK,CAAC,EAAK,CAAM,EAClB,EACT,MAAQ,CACN,MAAO,EACT,CACF,CACF,EAvBCA,EAAAA,EAAAA,QAAAA,EAAAA,EAAAA,EAAAA,WAAAA,CAAW,CAAA,EAAA,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { IProcessControl } from "./types.cjs";
2
+ import "reflect-metadata/lite";
3
+ //#region src/services/ProcessControl/NodeProcessControl.d.ts
4
+ /** Wraps `process.kill`, which doubles as the liveness probe on POSIX. */
5
+ declare class NodeProcessControl implements IProcessControl {
6
+ isAlive(pid: number): boolean;
7
+ signalGroup(pid: number, signal: NodeJS.Signals): boolean;
8
+ }
9
+ //#endregion
10
+ export { NodeProcessControl };
11
+ //# sourceMappingURL=NodeProcessControl.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeProcessControl.d.cts","names":[],"sources":["../../../src/services/ProcessControl/NodeProcessControl.ts"],"mappings":";;;;cAQa,8BAA8B;EACzC,QAAQ;EAYR,YAAY,aAAa,QAAQ,OAAO"}
@@ -0,0 +1,11 @@
1
+ import { IProcessControl } from "./types.mjs";
2
+ import "reflect-metadata/lite";
3
+ //#region src/services/ProcessControl/NodeProcessControl.d.ts
4
+ /** Wraps `process.kill`, which doubles as the liveness probe on POSIX. */
5
+ declare class NodeProcessControl implements IProcessControl {
6
+ isAlive(pid: number): boolean;
7
+ signalGroup(pid: number, signal: NodeJS.Signals): boolean;
8
+ }
9
+ //#endregion
10
+ export { NodeProcessControl };
11
+ //# sourceMappingURL=NodeProcessControl.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeProcessControl.d.mts","names":[],"sources":["../../../src/services/ProcessControl/NodeProcessControl.ts"],"mappings":";;;;cAQa,8BAA8B;EACzC,QAAQ;EAYR,YAAY,aAAa,QAAQ,OAAO"}
@@ -0,0 +1,2 @@
1
+ import e from"../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.mjs";import{injectable as t}from"inversify";import"reflect-metadata/lite";let n=class{isAlive(e){if(!Number.isInteger(e)||e<=0)return!1;try{return process.kill(e,0),!0}catch{return!1}}signalGroup(e,t){if(!Number.isInteger(e)||e<=0)return!1;try{return process.kill(-e,t),!0}catch{return!1}}};n=e([t()],n);export{n as NodeProcessControl};
2
+ //# sourceMappingURL=NodeProcessControl.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeProcessControl.mjs","names":[],"sources":["../../../src/services/ProcessControl/NodeProcessControl.ts"],"sourcesContent":["import { injectable } from 'inversify';\nimport 'reflect-metadata/lite';\nimport type { IProcessControl } from './types.ts';\n\nconst LIVENESS_PROBE = 0;\n\n/** Wraps `process.kill`, which doubles as the liveness probe on POSIX. */\n@injectable()\nexport class NodeProcessControl implements IProcessControl {\n isAlive(pid: number): boolean {\n if (!Number.isInteger(pid) || pid <= 0) return false;\n try {\n process.kill(pid, LIVENESS_PROBE);\n return true;\n } catch {\n // EPERM would also land here, but a process we cannot signal is not one\n // this extension can manage, so treating it as gone is the safe answer.\n return false;\n }\n }\n\n signalGroup(pid: number, signal: NodeJS.Signals): boolean {\n if (!Number.isInteger(pid) || pid <= 0) return false;\n try {\n process.kill(-pid, signal);\n return true;\n } catch {\n return false;\n }\n }\n}\n"],"mappings":"0JAQO,IAAM,EAAN,KAAoD,CACzD,QAAQ,EAAsB,CAC5B,GAAI,CAAC,OAAO,UAAU,CAAG,GAAK,GAAO,EAAG,MAAO,GAC/C,GAAI,CAEF,OADA,QAAQ,KAAK,EAAK,CAAc,EACzB,EACT,MAAQ,CAGN,MAAO,EACT,CACF,CAEA,YAAY,EAAa,EAAiC,CACxD,GAAI,CAAC,OAAO,UAAU,CAAG,GAAK,GAAO,EAAG,MAAO,GAC/C,GAAI,CAEF,OADA,QAAQ,KAAK,CAAC,EAAK,CAAM,EAClB,EACT,MAAQ,CACN,MAAO,EACT,CACF,CACF,EAvBC,EAAA,EAAA,CAAA,EAAW,CAAA,EAAA,CAAA"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./NodeProcessControl.cjs");Object.defineProperty(exports,"NodeProcessControl",{enumerable:!0,get:function(){return e.NodeProcessControl}});
@@ -0,0 +1,3 @@
1
+ import { IProcessControl } from "./types.cjs";
2
+ import { NodeProcessControl } from "./NodeProcessControl.cjs";
3
+ export { type IProcessControl, NodeProcessControl };
@@ -0,0 +1,3 @@
1
+ import { IProcessControl } from "./types.mjs";
2
+ import { NodeProcessControl } from "./NodeProcessControl.mjs";
3
+ export { type IProcessControl, NodeProcessControl };
@@ -0,0 +1 @@
1
+ import{NodeProcessControl as e}from"./NodeProcessControl.mjs";export{e as NodeProcessControl};
@@ -0,0 +1,14 @@
1
+ //#region src/services/ProcessControl/types.d.ts
2
+ /** Liveness and signalling for processes this extension did not spawn itself. */
3
+ interface IProcessControl {
4
+ /** True when a process with this pid is still running. */
5
+ isAlive(pid: number): boolean;
6
+ /**
7
+ * Signals the whole process group led by `pid`.
8
+ * Returns false when the group is already gone.
9
+ */
10
+ signalGroup(pid: number, signal: NodeJS.Signals): boolean;
11
+ }
12
+ //#endregion
13
+ export { IProcessControl };
14
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../../src/services/ProcessControl/types.ts"],"mappings":";;UACiB;;EAEf,QAAQ;;;;;EAKR,YAAY,aAAa,QAAQ,OAAO"}
@@ -0,0 +1,14 @@
1
+ //#region src/services/ProcessControl/types.d.ts
2
+ /** Liveness and signalling for processes this extension did not spawn itself. */
3
+ interface IProcessControl {
4
+ /** True when a process with this pid is still running. */
5
+ isAlive(pid: number): boolean;
6
+ /**
7
+ * Signals the whole process group led by `pid`.
8
+ * Returns false when the group is already gone.
9
+ */
10
+ signalGroup(pid: number, signal: NodeJS.Signals): boolean;
11
+ }
12
+ //#endregion
13
+ export { IProcessControl };
14
+ //# sourceMappingURL=types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.mts","names":[],"sources":["../../../src/services/ProcessControl/types.ts"],"mappings":";;UACiB;;EAEf,QAAQ;;;;;EAKR,YAAY,aAAa,QAAQ,OAAO"}
@@ -0,0 +1,5 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../config.cjs"),t=require("../../types.cjs"),n=require("../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.cjs"),r=require("../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateParam.cjs"),i=require("../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.cjs"),a=require("../../runnerSpec.cjs"),o=require("../../session.cjs"),s=require("../AnsiScrub/ansiScrub.cjs");require("../AnsiScrub/index.cjs");let c=require("inversify");require("reflect-metadata/lite");const{Terminal:l}=(0,require("node:module").createRequire)(require("url").pathToFileURL(__filename).href)(`@xterm/headless`);let u=class{spawner;logFile;processControl;clock;runs=new Map;constructor(e,t,n,r){this.spawner=e,this.logFile=t,this.processControl=n,this.clock=r}async launch(t){let n=t.cols??120,r=t.rows??30,i=this.logFile.open(t.id),c=new l({cols:n,rows:r,scrollback:2e3,allowProposedApi:!0}),u=e.getResultMaxBytes()*2,f=await this.spawner.spawn({command:t.command,cwd:t.cwd,env:{...process.env,...a.NO_TERMINAL_INPUT_ENV,[o.PI_SESSION_ID_ENV]:t.sessionId},cols:n,rows:r}),p=``,m=!0,h=!1,g=()=>void 0,_=new Promise(e=>{g=e}),v=new Set;f.onData(e=>{c.write(e);let t=s.scrubTerminalOutput(e);i.append(t),m&&(p+=t,p.length>u&&(p=p.slice(-u)));for(let t of v)t(e)}),f.onExit(e=>{h||(h=!0,this.runs.delete(t.name),i.close(),g({code:e.exitCode,signal:null}))});let y={id:t.id,name:t.name,pid:f.pid,logPath:i.path,backend:`native`,output:()=>p,completion:()=>_,detach:()=>{m=!1,p=``},stop:()=>this.stopChild(f,t.name),write:e=>f.write(e),screen:()=>d(c),onData:e=>(v.add(e),()=>v.delete(e)),resize:(e,t)=>{f.resize(e,t),c.resize(e,t)}};return this.runs.set(t.name,y),y}get(e){return this.runs.get(e)}write(e,t){let n=this.runs.get(e);return n?(n.write(t.endsWith(`
2
+ `)?t:`${t}
3
+ `),!0):!1}list(){return[...this.runs.values()]}async disposeAll(){let e=[...this.runs.values()];this.runs.clear();for(let t of e)await t.stop()}async stopChild(e,t){if(this.runs.delete(t),!this.processControl.isAlive(e.pid))return!1;e.kill(`SIGTERM`);let n=this.clock.now()+2e3;for(;this.clock.now()<n;){if(!this.processControl.isAlive(e.pid))return!0;await new Promise(e=>{this.clock.after(100,e)})}return e.kill(`SIGKILL`),!0}};u=i.default([(0,c.injectable)(),r.default(0,(0,c.inject)(t.TYPES.PtySpawner)),r.default(1,(0,c.inject)(t.TYPES.LogFile)),r.default(2,(0,c.inject)(t.TYPES.ProcessControl)),r.default(3,(0,c.inject)(t.TYPES.Clock)),n.default(`design:paramtypes`,[Object,Object,Object,Object])],u);function d(e){let t=e.buffer.active,n=[];for(let r=t.baseY;r<t.baseY+e.rows;r+=1)n.push(t.getLine(r)?.translateToString(!0)??``);for(;n.length>0&&n.at(-1)===``;)n.pop();return n.join(`
4
+ `)}Object.defineProperty(exports,"PtyHost",{enumerable:!0,get:function(){return u}});
5
+ //# sourceMappingURL=PtyHost.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PtyHost.cjs","names":["createRequire","getResultMaxBytes","NO_TERMINAL_INPUT_ENV","PI_SESSION_ID_ENV","scrubTerminalOutput","injectable","inject","TYPES"],"sources":["../../../src/services/PtyHost/PtyHost.ts"],"sourcesContent":["import { createRequire } from 'node:module';\nimport type { Terminal } from '@xterm/headless';\nimport { inject, injectable } from 'inversify';\nimport 'reflect-metadata/lite';\nimport { getResultMaxBytes } from '../../config.ts';\nimport { NO_TERMINAL_INPUT_ENV } from '../../runnerSpec.ts';\nimport { TYPES } from '../../types.ts';\nimport { scrubTerminalOutput } from '../AnsiScrub/index.ts';\nimport type { IClock } from '../Clock/index.ts';\nimport type { ILogFile } from '../LogFile/index.ts';\nimport type { IProcessControl } from '../ProcessControl/index.ts';\nimport type { IPtySpawner, PtyProcess } from '../PtySpawner/index.ts';\nimport type { ExitResult } from '../Spawner/index.ts';\nimport type { IPtyHost, PtyLaunchRequest, PtyRun } from './types.ts';\nimport { PI_SESSION_ID_ENV } from '../../session.ts';\n\nconst DEFAULT_COLS = 120;\nconst DEFAULT_ROWS = 30;\n/** Enough history for the overlay to scroll without holding a whole build. */\nconst SCROLLBACK = 2_000;\nconst MEMORY_BUFFER_FACTOR = 2;\nconst TERM_GRACE_MS = 2_000;\nconst LIVENESS_POLL_MS = 100;\nconst NEWLINE = '\\n';\n\n/**\n * `@xterm/headless` publishes CommonJS, and Node's ESM loader cannot detect its\n * named exports, so it is required rather than imported.\n */\nconst { Terminal: HeadlessTerminal } = createRequire(import.meta.url)(\n '@xterm/headless',\n) as typeof import('@xterm/headless');\n\n@injectable()\nexport class PtyHost implements IPtyHost {\n private readonly runs = new Map<string, PtyRun>();\n\n constructor(\n @inject(TYPES.PtySpawner) private readonly spawner: IPtySpawner,\n @inject(TYPES.LogFile) private readonly logFile: ILogFile,\n @inject(TYPES.ProcessControl) private readonly processControl: IProcessControl,\n @inject(TYPES.Clock) private readonly clock: IClock,\n ) {}\n\n async launch(request: PtyLaunchRequest): Promise<PtyRun> {\n const cols = request.cols ?? DEFAULT_COLS;\n const rows = request.rows ?? DEFAULT_ROWS;\n const writer = this.logFile.open(request.id);\n const terminal = new HeadlessTerminal({ cols, rows, scrollback: SCROLLBACK, allowProposedApi: true });\n const memoryLimit = getResultMaxBytes() * MEMORY_BUFFER_FACTOR;\n\n const child = await this.spawner.spawn({\n command: request.command,\n cwd: request.cwd,\n env: { ...process.env, ...NO_TERMINAL_INPUT_ENV, [PI_SESSION_ID_ENV]: request.sessionId },\n cols,\n rows,\n });\n\n let buffer = '';\n let buffering = true;\n let settled = false;\n let resolveCompletion: (result: ExitResult) => void = () => undefined;\n const completion = new Promise<ExitResult>((resolve) => {\n resolveCompletion = resolve;\n });\n const dataHandlers = new Set<(data: string) => void>();\n\n child.onData((data) => {\n // The terminal keeps the screen; the log keeps text worth grepping.\n terminal.write(data);\n const scrubbed = scrubTerminalOutput(data);\n writer.append(scrubbed);\n if (buffering) {\n buffer += scrubbed;\n if (buffer.length > memoryLimit) buffer = buffer.slice(-memoryLimit);\n }\n for (const handler of dataHandlers) handler(data);\n });\n\n child.onExit((result) => {\n if (settled) return;\n settled = true;\n this.runs.delete(request.name);\n writer.close();\n resolveCompletion({ code: result.exitCode, signal: null });\n });\n\n const run: PtyRun = {\n id: request.id,\n name: request.name,\n pid: child.pid,\n logPath: writer.path,\n backend: 'native',\n output: () => buffer,\n completion: () => completion,\n detach: () => {\n buffering = false;\n buffer = '';\n },\n stop: () => this.stopChild(child, request.name),\n write: (text) => child.write(text),\n screen: () => renderScreen(terminal),\n onData: (handler) => {\n dataHandlers.add(handler);\n return () => dataHandlers.delete(handler);\n },\n resize: (nextCols, nextRows) => {\n child.resize(nextCols, nextRows);\n terminal.resize(nextCols, nextRows);\n },\n };\n\n this.runs.set(request.name, run);\n return run;\n }\n\n get(name: string): PtyRun | undefined {\n return this.runs.get(name);\n }\n\n write(name: string, text: string): boolean {\n const run = this.runs.get(name);\n if (!run) return false;\n run.write(text.endsWith(NEWLINE) ? text : `${text}${NEWLINE}`);\n return true;\n }\n\n list(): PtyRun[] {\n return [...this.runs.values()];\n }\n\n async disposeAll(): Promise<void> {\n const runs = [...this.runs.values()];\n this.runs.clear();\n for (const run of runs) await run.stop();\n }\n\n private async stopChild(child: PtyProcess, name: string): Promise<boolean> {\n this.runs.delete(name);\n if (!this.processControl.isAlive(child.pid)) return false;\n\n child.kill('SIGTERM');\n const deadline = this.clock.now() + TERM_GRACE_MS;\n while (this.clock.now() < deadline) {\n if (!this.processControl.isAlive(child.pid)) return true;\n await new Promise<void>((resolve) => {\n this.clock.after(LIVENESS_POLL_MS, resolve);\n });\n }\n child.kill('SIGKILL');\n return true;\n }\n}\n\n/** The visible rows, trimmed of trailing blanks, as plain text. */\nfunction renderScreen(terminal: Terminal): string {\n const buffer = terminal.buffer.active;\n const lines: string[] = [];\n for (let row = buffer.baseY; row < buffer.baseY + terminal.rows; row += 1) {\n lines.push(buffer.getLine(row)?.translateToString(true) ?? '');\n }\n while (lines.length > 0 && lines.at(-1) === '') lines.pop();\n return lines.join(NEWLINE);\n}\n"],"mappings":"ilBAgBA,KAaM,CAAE,SAAU,IAAA,uBAAqBA,CAAAA,CAAAA,cAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,IAA6B,CAAC,CACnE,iBACF,EAGO,IAAM,EAAN,KAAkC,CAIM,QACH,QACO,eACT,MANxC,KAAwB,IAAI,IAE5B,YACE,EACA,EACA,EACA,EACA,CAJ2C,KAAA,QAAA,EACH,KAAA,QAAA,EACO,KAAA,eAAA,EACT,KAAA,MAAA,CACrC,CAEH,MAAM,OAAO,EAA4C,CACvD,IAAM,EAAO,EAAQ,MAAQ,IACvB,EAAO,EAAQ,MAAQ,GACvB,EAAS,KAAK,QAAQ,KAAK,EAAQ,EAAE,EACrC,EAAW,IAAI,EAAiB,CAAE,OAAM,OAAM,WAAY,IAAY,iBAAkB,EAAK,CAAC,EAC9F,EAAcC,EAAAA,kBAAkB,EAAI,EAEpC,EAAQ,MAAM,KAAK,QAAQ,MAAM,CACrC,QAAS,EAAQ,QACjB,IAAK,EAAQ,IACb,IAAK,CAAE,GAAG,QAAQ,IAAK,GAAGC,EAAAA,uBAAwBC,EAAAA,mBAAoB,EAAQ,SAAU,EACxF,OACA,MACF,CAAC,EAEG,EAAS,GACT,EAAY,GACZ,EAAU,GACV,MAAwD,IAAA,GACtD,EAAa,IAAI,QAAqB,GAAY,CACtD,EAAoB,CACtB,CAAC,EACK,EAAe,IAAI,IAEzB,EAAM,OAAQ,GAAS,CAErB,EAAS,MAAM,CAAI,EACnB,IAAM,EAAWC,EAAAA,oBAAoB,CAAI,EACzC,EAAO,OAAO,CAAQ,EAClB,IACF,GAAU,EACN,EAAO,OAAS,IAAa,EAAS,EAAO,MAAM,CAAC,CAAW,IAErE,IAAK,IAAM,KAAW,EAAc,EAAQ,CAAI,CAClD,CAAC,EAED,EAAM,OAAQ,GAAW,CACnB,IACJ,EAAU,GACV,KAAK,KAAK,OAAO,EAAQ,IAAI,EAC7B,EAAO,MAAM,EACb,EAAkB,CAAE,KAAM,EAAO,SAAU,OAAQ,IAAK,CAAC,EAC3D,CAAC,EAED,IAAM,EAAc,CAClB,GAAI,EAAQ,GACZ,KAAM,EAAQ,KACd,IAAK,EAAM,IACX,QAAS,EAAO,KAChB,QAAS,SACT,WAAc,EACd,eAAkB,EAClB,WAAc,CACZ,EAAY,GACZ,EAAS,EACX,EACA,SAAY,KAAK,UAAU,EAAO,EAAQ,IAAI,EAC9C,MAAQ,GAAS,EAAM,MAAM,CAAI,EACjC,WAAc,EAAa,CAAQ,EACnC,OAAS,IACP,EAAa,IAAI,CAAO,MACX,EAAa,OAAO,CAAO,GAE1C,QAAS,EAAU,IAAa,CAC9B,EAAM,OAAO,EAAU,CAAQ,EAC/B,EAAS,OAAO,EAAU,CAAQ,CACpC,CACF,EAGA,OADA,KAAK,KAAK,IAAI,EAAQ,KAAM,CAAG,EACxB,CACT,CAEA,IAAI,EAAkC,CACpC,OAAO,KAAK,KAAK,IAAI,CAAI,CAC3B,CAEA,MAAM,EAAc,EAAuB,CACzC,IAAM,EAAM,KAAK,KAAK,IAAI,CAAI,EAG9B,OAFK,GACL,EAAI,MAAM,EAAK,SAAS;CAAO,EAAI,EAAO,GAAG;CAAgB,EACtD,IAFU,EAGnB,CAEA,MAAiB,CACf,MAAO,CAAC,GAAG,KAAK,KAAK,OAAO,CAAC,CAC/B,CAEA,MAAM,YAA4B,CAChC,IAAM,EAAO,CAAC,GAAG,KAAK,KAAK,OAAO,CAAC,EACnC,KAAK,KAAK,MAAM,EAChB,IAAK,IAAM,KAAO,EAAM,MAAM,EAAI,KAAK,CACzC,CAEA,MAAc,UAAU,EAAmB,EAAgC,CAEzE,GADA,KAAK,KAAK,OAAO,CAAI,EACjB,CAAC,KAAK,eAAe,QAAQ,EAAM,GAAG,EAAG,MAAO,GAEpD,EAAM,KAAK,SAAS,EACpB,IAAM,EAAW,KAAK,MAAM,IAAI,EAAI,IACpC,KAAO,KAAK,MAAM,IAAI,EAAI,GAAU,CAClC,GAAI,CAAC,KAAK,eAAe,QAAQ,EAAM,GAAG,EAAG,MAAO,GACpD,MAAM,IAAI,QAAe,GAAY,CACnC,KAAK,MAAM,MAAM,IAAkB,CAAO,CAC5C,CAAC,CACH,CAEA,OADA,EAAM,KAAK,SAAS,EACb,EACT,CACF,gBAxHCC,EAAAA,EAAAA,WAAAA,CAAW,EAKPC,EAAAA,QAAAA,GAAAA,EAAAA,EAAAA,OAAAA,CAAOC,EAAAA,MAAM,UAAU,CAAA,EACvBD,EAAAA,QAAAA,GAAAA,EAAAA,EAAAA,OAAAA,CAAOC,EAAAA,MAAM,OAAO,CAAA,EACpBD,EAAAA,QAAAA,GAAAA,EAAAA,EAAAA,OAAAA,CAAOC,EAAAA,MAAM,cAAc,CAAA,EAC3BD,EAAAA,QAAAA,GAAAA,EAAAA,EAAAA,OAAAA,CAAOC,EAAAA,MAAM,KAAK,CAAA,mEAmHvB,SAAS,EAAa,EAA4B,CAChD,IAAM,EAAS,EAAS,OAAO,OACzB,EAAkB,CAAC,EACzB,IAAK,IAAI,EAAM,EAAO,MAAO,EAAM,EAAO,MAAQ,EAAS,KAAM,GAAO,EACtE,EAAM,KAAK,EAAO,QAAQ,CAAG,CAAC,EAAE,kBAAkB,EAAI,GAAK,EAAE,EAE/D,KAAO,EAAM,OAAS,GAAK,EAAM,GAAG,EAAE,IAAM,IAAI,EAAM,IAAI,EAC1D,OAAO,EAAM,KAAK;CAAO,CAC3B"}
@@ -0,0 +1,28 @@
1
+ import { IClock } from "../Clock/types.cjs";
2
+ import "../Clock/index.cjs";
3
+ import { ILogFile } from "../LogFile/types.cjs";
4
+ import "../LogFile/index.cjs";
5
+ import { IProcessControl } from "../ProcessControl/types.cjs";
6
+ import "../ProcessControl/index.cjs";
7
+ import { IPtySpawner } from "../PtySpawner/types.cjs";
8
+ import "../PtySpawner/index.cjs";
9
+ import { IPtyHost, PtyLaunchRequest, PtyRun } from "./types.cjs";
10
+ import "reflect-metadata/lite";
11
+ //#region src/services/PtyHost/PtyHost.d.ts
12
+ declare class PtyHost implements IPtyHost {
13
+ private readonly spawner;
14
+ private readonly logFile;
15
+ private readonly processControl;
16
+ private readonly clock;
17
+ private readonly runs;
18
+ constructor(spawner: IPtySpawner, logFile: ILogFile, processControl: IProcessControl, clock: IClock);
19
+ launch(request: PtyLaunchRequest): Promise<PtyRun>;
20
+ get(name: string): PtyRun | undefined;
21
+ write(name: string, text: string): boolean;
22
+ list(): PtyRun[];
23
+ disposeAll(): Promise<void>;
24
+ private stopChild;
25
+ }
26
+ //#endregion
27
+ export { PtyHost };
28
+ //# sourceMappingURL=PtyHost.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PtyHost.d.cts","names":[],"sources":["../../../src/services/PtyHost/PtyHost.ts"],"mappings":";;;;;;;;;;;cAkCa,mBAAmB;mBAIe;mBACH;mBACO;mBACT;mBANvB;EAG4B,YAAA,SAAS,aACZ,SAAS,UACF,gBAAgB,iBACzB,OAAO;EAGzC,OAAO,SAAS,mBAAmB,QAAQ;EAyEjD,IAAI,eAAe;EAInB,MAAM,cAAc;EAOpB,QAAQ;EAIF,cAAc;UAMN"}