@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.
- package/LICENSE +21 -0
- package/README.md +47 -0
- package/dist/_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.cjs +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.mjs +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.cjs +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.mjs +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateParam.cjs +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateParam.mjs +1 -0
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/bin/cli.cjs +5 -0
- package/dist/bin/cli.cjs.map +1 -0
- package/dist/bin/cli.d.cts +5 -0
- package/dist/bin/cli.d.cts.map +1 -0
- package/dist/bin/cli.d.mts +5 -0
- package/dist/bin/cli.d.mts.map +1 -0
- package/dist/bin/cli.mjs +5 -0
- package/dist/bin/cli.mjs.map +1 -0
- package/dist/bin/logSink.cjs +2 -0
- package/dist/bin/logSink.cjs.map +1 -0
- package/dist/bin/logSink.d.cts +5 -0
- package/dist/bin/logSink.d.cts.map +1 -0
- package/dist/bin/logSink.d.mts +5 -0
- package/dist/bin/logSink.d.mts.map +1 -0
- package/dist/bin/logSink.mjs +2 -0
- package/dist/bin/logSink.mjs.map +1 -0
- package/dist/bin/runnerHost.cjs +2 -0
- package/dist/bin/runnerHost.cjs.map +1 -0
- package/dist/bin/runnerHost.d.cts +5 -0
- package/dist/bin/runnerHost.d.cts.map +1 -0
- package/dist/bin/runnerHost.d.mts +5 -0
- package/dist/bin/runnerHost.d.mts.map +1 -0
- package/dist/bin/runnerHost.mjs +2 -0
- package/dist/bin/runnerHost.mjs.map +1 -0
- package/dist/cli/cliApp.cjs +6 -0
- package/dist/cli/cliApp.cjs.map +1 -0
- package/dist/cli/cliApp.d.cts +23 -0
- package/dist/cli/cliApp.d.cts.map +1 -0
- package/dist/cli/cliApp.d.mts +23 -0
- package/dist/cli/cliApp.d.mts.map +1 -0
- package/dist/cli/cliApp.mjs +6 -0
- package/dist/cli/cliApp.mjs.map +1 -0
- package/dist/compaction.cjs +4 -0
- package/dist/compaction.cjs.map +1 -0
- package/dist/compaction.d.cts +14 -0
- package/dist/compaction.d.cts.map +1 -0
- package/dist/compaction.d.mts +14 -0
- package/dist/compaction.d.mts.map +1 -0
- package/dist/compaction.mjs +4 -0
- package/dist/compaction.mjs.map +1 -0
- package/dist/config.cjs +2 -0
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +32 -0
- package/dist/config.d.cts.map +1 -0
- package/dist/config.d.mts +32 -0
- package/dist/config.d.mts.map +1 -0
- package/dist/config.mjs +2 -0
- package/dist/config.mjs.map +1 -0
- package/dist/container/index.cjs +2 -0
- package/dist/container/index.cjs.map +1 -0
- package/dist/container/index.d.cts +14 -0
- package/dist/container/index.d.cts.map +1 -0
- package/dist/container/index.d.mts +14 -0
- package/dist/container/index.d.mts.map +1 -0
- package/dist/container/index.mjs +2 -0
- package/dist/container/index.mjs.map +1 -0
- package/dist/extension.cjs +3 -0
- package/dist/extension.cjs.map +1 -0
- package/dist/extension.d.cts +10 -0
- package/dist/extension.d.cts.map +1 -0
- package/dist/extension.d.mts +10 -0
- package/dist/extension.d.mts.map +1 -0
- package/dist/extension.mjs +3 -0
- package/dist/extension.mjs.map +1 -0
- package/dist/extensions/pi.cjs +2 -0
- package/dist/extensions/pi.cjs.map +1 -0
- package/dist/extensions/pi.d.cts +2 -0
- package/dist/extensions/pi.d.mts +2 -0
- package/dist/extensions/pi.mjs +2 -0
- package/dist/extensions/pi.mjs.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +7 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.mjs +1 -0
- package/dist/ptyProvider.cjs +2 -0
- package/dist/ptyProvider.cjs.map +1 -0
- package/dist/ptyProvider.d.cts +13 -0
- package/dist/ptyProvider.d.cts.map +1 -0
- package/dist/ptyProvider.d.mts +13 -0
- package/dist/ptyProvider.d.mts.map +1 -0
- package/dist/ptyProvider.mjs +2 -0
- package/dist/ptyProvider.mjs.map +1 -0
- package/dist/reconcile.cjs +2 -0
- package/dist/reconcile.cjs.map +1 -0
- package/dist/reconcile.d.cts +37 -0
- package/dist/reconcile.d.cts.map +1 -0
- package/dist/reconcile.d.mts +37 -0
- package/dist/reconcile.d.mts.map +1 -0
- package/dist/reconcile.mjs +2 -0
- package/dist/reconcile.mjs.map +1 -0
- package/dist/runnerSpec.cjs +2 -0
- package/dist/runnerSpec.cjs.map +1 -0
- package/dist/runnerSpec.d.cts +50 -0
- package/dist/runnerSpec.d.cts.map +1 -0
- package/dist/runnerSpec.d.mts +50 -0
- package/dist/runnerSpec.d.mts.map +1 -0
- package/dist/runnerSpec.mjs +2 -0
- package/dist/runnerSpec.mjs.map +1 -0
- package/dist/services/AnsiScrub/ansiScrub.cjs +5 -0
- package/dist/services/AnsiScrub/ansiScrub.cjs.map +1 -0
- package/dist/services/AnsiScrub/ansiScrub.d.cts +34 -0
- package/dist/services/AnsiScrub/ansiScrub.d.cts.map +1 -0
- package/dist/services/AnsiScrub/ansiScrub.d.mts +34 -0
- package/dist/services/AnsiScrub/ansiScrub.d.mts.map +1 -0
- package/dist/services/AnsiScrub/ansiScrub.mjs +5 -0
- package/dist/services/AnsiScrub/ansiScrub.mjs.map +1 -0
- package/dist/services/AnsiScrub/index.cjs +1 -0
- package/dist/services/AnsiScrub/index.d.cts +2 -0
- package/dist/services/AnsiScrub/index.d.mts +2 -0
- package/dist/services/AnsiScrub/index.mjs +1 -0
- package/dist/services/BashRunService/BashRunService.cjs +2 -0
- package/dist/services/BashRunService/BashRunService.cjs.map +1 -0
- package/dist/services/BashRunService/BashRunService.d.cts +38 -0
- package/dist/services/BashRunService/BashRunService.d.cts.map +1 -0
- package/dist/services/BashRunService/BashRunService.d.mts +38 -0
- package/dist/services/BashRunService/BashRunService.d.mts.map +1 -0
- package/dist/services/BashRunService/BashRunService.mjs +2 -0
- package/dist/services/BashRunService/BashRunService.mjs.map +1 -0
- package/dist/services/BashRunService/index.cjs +1 -0
- package/dist/services/BashRunService/index.d.cts +3 -0
- package/dist/services/BashRunService/index.d.mts +3 -0
- package/dist/services/BashRunService/index.mjs +1 -0
- package/dist/services/BashRunService/types.d.cts +62 -0
- package/dist/services/BashRunService/types.d.cts.map +1 -0
- package/dist/services/BashRunService/types.d.mts +62 -0
- package/dist/services/BashRunService/types.d.mts.map +1 -0
- package/dist/services/Clock/SystemClock.cjs +2 -0
- package/dist/services/Clock/SystemClock.cjs.map +1 -0
- package/dist/services/Clock/SystemClock.d.cts +11 -0
- package/dist/services/Clock/SystemClock.d.cts.map +1 -0
- package/dist/services/Clock/SystemClock.d.mts +11 -0
- package/dist/services/Clock/SystemClock.d.mts.map +1 -0
- package/dist/services/Clock/SystemClock.mjs +2 -0
- package/dist/services/Clock/SystemClock.mjs.map +1 -0
- package/dist/services/Clock/index.cjs +1 -0
- package/dist/services/Clock/index.d.cts +3 -0
- package/dist/services/Clock/index.d.mts +3 -0
- package/dist/services/Clock/index.mjs +1 -0
- package/dist/services/Clock/types.d.cts +11 -0
- package/dist/services/Clock/types.d.cts.map +1 -0
- package/dist/services/Clock/types.d.mts +11 -0
- package/dist/services/Clock/types.d.mts.map +1 -0
- package/dist/services/Launcher/Launcher.cjs +2 -0
- package/dist/services/Launcher/Launcher.cjs.map +1 -0
- package/dist/services/Launcher/Launcher.d.cts +27 -0
- package/dist/services/Launcher/Launcher.d.cts.map +1 -0
- package/dist/services/Launcher/Launcher.d.mts +27 -0
- package/dist/services/Launcher/Launcher.d.mts.map +1 -0
- package/dist/services/Launcher/Launcher.mjs +2 -0
- package/dist/services/Launcher/Launcher.mjs.map +1 -0
- package/dist/services/Launcher/index.cjs +1 -0
- package/dist/services/Launcher/index.d.cts +3 -0
- package/dist/services/Launcher/index.d.mts +3 -0
- package/dist/services/Launcher/index.mjs +1 -0
- package/dist/services/Launcher/types.d.cts +40 -0
- package/dist/services/Launcher/types.d.cts.map +1 -0
- package/dist/services/Launcher/types.d.mts +40 -0
- package/dist/services/Launcher/types.d.mts.map +1 -0
- package/dist/services/Lifeline/NodeLifeline.cjs +2 -0
- package/dist/services/Lifeline/NodeLifeline.cjs.map +1 -0
- package/dist/services/Lifeline/NodeLifeline.d.cts +21 -0
- package/dist/services/Lifeline/NodeLifeline.d.cts.map +1 -0
- package/dist/services/Lifeline/NodeLifeline.d.mts +21 -0
- package/dist/services/Lifeline/NodeLifeline.d.mts.map +1 -0
- package/dist/services/Lifeline/NodeLifeline.mjs +2 -0
- package/dist/services/Lifeline/NodeLifeline.mjs.map +1 -0
- package/dist/services/Lifeline/client.cjs +2 -0
- package/dist/services/Lifeline/client.cjs.map +1 -0
- package/dist/services/Lifeline/client.d.cts +23 -0
- package/dist/services/Lifeline/client.d.cts.map +1 -0
- package/dist/services/Lifeline/client.d.mts +23 -0
- package/dist/services/Lifeline/client.d.mts.map +1 -0
- package/dist/services/Lifeline/client.mjs +2 -0
- package/dist/services/Lifeline/client.mjs.map +1 -0
- package/dist/services/Lifeline/index.cjs +1 -0
- package/dist/services/Lifeline/index.d.cts +4 -0
- package/dist/services/Lifeline/index.d.mts +4 -0
- package/dist/services/Lifeline/index.mjs +1 -0
- package/dist/services/Lifeline/types.d.cts +19 -0
- package/dist/services/Lifeline/types.d.cts.map +1 -0
- package/dist/services/Lifeline/types.d.mts +19 -0
- package/dist/services/Lifeline/types.d.mts.map +1 -0
- package/dist/services/LogFile/LogFile.cjs +2 -0
- package/dist/services/LogFile/LogFile.cjs.map +1 -0
- package/dist/services/LogFile/LogFile.d.cts +13 -0
- package/dist/services/LogFile/LogFile.d.cts.map +1 -0
- package/dist/services/LogFile/LogFile.d.mts +13 -0
- package/dist/services/LogFile/LogFile.d.mts.map +1 -0
- package/dist/services/LogFile/LogFile.mjs +2 -0
- package/dist/services/LogFile/LogFile.mjs.map +1 -0
- package/dist/services/LogFile/index.cjs +1 -0
- package/dist/services/LogFile/index.d.cts +3 -0
- package/dist/services/LogFile/index.d.mts +3 -0
- package/dist/services/LogFile/index.mjs +1 -0
- package/dist/services/LogFile/types.d.cts +16 -0
- package/dist/services/LogFile/types.d.cts.map +1 -0
- package/dist/services/LogFile/types.d.mts +16 -0
- package/dist/services/LogFile/types.d.mts.map +1 -0
- package/dist/services/LogReader/LogReader.cjs +10 -0
- package/dist/services/LogReader/LogReader.cjs.map +1 -0
- package/dist/services/LogReader/LogReader.d.cts +14 -0
- package/dist/services/LogReader/LogReader.d.cts.map +1 -0
- package/dist/services/LogReader/LogReader.d.mts +14 -0
- package/dist/services/LogReader/LogReader.d.mts.map +1 -0
- package/dist/services/LogReader/LogReader.mjs +10 -0
- package/dist/services/LogReader/LogReader.mjs.map +1 -0
- package/dist/services/LogReader/index.cjs +1 -0
- package/dist/services/LogReader/index.d.cts +3 -0
- package/dist/services/LogReader/index.d.mts +3 -0
- package/dist/services/LogReader/index.mjs +1 -0
- package/dist/services/LogReader/types.d.cts +27 -0
- package/dist/services/LogReader/types.d.cts.map +1 -0
- package/dist/services/LogReader/types.d.mts +27 -0
- package/dist/services/LogReader/types.d.mts.map +1 -0
- package/dist/services/ProcessControl/NodeProcessControl.cjs +2 -0
- package/dist/services/ProcessControl/NodeProcessControl.cjs.map +1 -0
- package/dist/services/ProcessControl/NodeProcessControl.d.cts +11 -0
- package/dist/services/ProcessControl/NodeProcessControl.d.cts.map +1 -0
- package/dist/services/ProcessControl/NodeProcessControl.d.mts +11 -0
- package/dist/services/ProcessControl/NodeProcessControl.d.mts.map +1 -0
- package/dist/services/ProcessControl/NodeProcessControl.mjs +2 -0
- package/dist/services/ProcessControl/NodeProcessControl.mjs.map +1 -0
- package/dist/services/ProcessControl/index.cjs +1 -0
- package/dist/services/ProcessControl/index.d.cts +3 -0
- package/dist/services/ProcessControl/index.d.mts +3 -0
- package/dist/services/ProcessControl/index.mjs +1 -0
- package/dist/services/ProcessControl/types.d.cts +14 -0
- package/dist/services/ProcessControl/types.d.cts.map +1 -0
- package/dist/services/ProcessControl/types.d.mts +14 -0
- package/dist/services/ProcessControl/types.d.mts.map +1 -0
- package/dist/services/PtyHost/PtyHost.cjs +5 -0
- package/dist/services/PtyHost/PtyHost.cjs.map +1 -0
- package/dist/services/PtyHost/PtyHost.d.cts +28 -0
- package/dist/services/PtyHost/PtyHost.d.cts.map +1 -0
- package/dist/services/PtyHost/PtyHost.d.mts +28 -0
- package/dist/services/PtyHost/PtyHost.d.mts.map +1 -0
- package/dist/services/PtyHost/PtyHost.mjs +5 -0
- package/dist/services/PtyHost/PtyHost.mjs.map +1 -0
- package/dist/services/PtyHost/index.cjs +1 -0
- package/dist/services/PtyHost/index.d.cts +3 -0
- package/dist/services/PtyHost/index.d.mts +3 -0
- package/dist/services/PtyHost/index.mjs +1 -0
- package/dist/services/PtyHost/types.d.cts +39 -0
- package/dist/services/PtyHost/types.d.cts.map +1 -0
- package/dist/services/PtyHost/types.d.mts +39 -0
- package/dist/services/PtyHost/types.d.mts.map +1 -0
- package/dist/services/PtySpawner/NodePtySpawner.cjs +2 -0
- package/dist/services/PtySpawner/NodePtySpawner.cjs.map +1 -0
- package/dist/services/PtySpawner/NodePtySpawner.d.cts +18 -0
- package/dist/services/PtySpawner/NodePtySpawner.d.cts.map +1 -0
- package/dist/services/PtySpawner/NodePtySpawner.d.mts +18 -0
- package/dist/services/PtySpawner/NodePtySpawner.d.mts.map +1 -0
- package/dist/services/PtySpawner/NodePtySpawner.mjs +2 -0
- package/dist/services/PtySpawner/NodePtySpawner.mjs.map +1 -0
- package/dist/services/PtySpawner/index.cjs +1 -0
- package/dist/services/PtySpawner/index.d.cts +3 -0
- package/dist/services/PtySpawner/index.d.mts +3 -0
- package/dist/services/PtySpawner/index.mjs +1 -0
- package/dist/services/PtySpawner/types.d.cts +28 -0
- package/dist/services/PtySpawner/types.d.cts.map +1 -0
- package/dist/services/PtySpawner/types.d.mts +28 -0
- package/dist/services/PtySpawner/types.d.mts.map +1 -0
- package/dist/services/RmuxBackend/RmuxBackend.cjs +2 -0
- package/dist/services/RmuxBackend/RmuxBackend.cjs.map +1 -0
- package/dist/services/RmuxBackend/RmuxBackend.d.cts +36 -0
- package/dist/services/RmuxBackend/RmuxBackend.d.cts.map +1 -0
- package/dist/services/RmuxBackend/RmuxBackend.d.mts +36 -0
- package/dist/services/RmuxBackend/RmuxBackend.d.mts.map +1 -0
- package/dist/services/RmuxBackend/RmuxBackend.mjs +2 -0
- package/dist/services/RmuxBackend/RmuxBackend.mjs.map +1 -0
- package/dist/services/RmuxBackend/index.cjs +1 -0
- package/dist/services/RmuxBackend/index.d.cts +3 -0
- package/dist/services/RmuxBackend/index.d.mts +3 -0
- package/dist/services/RmuxBackend/index.mjs +1 -0
- package/dist/services/RmuxBackend/types.d.cts +29 -0
- package/dist/services/RmuxBackend/types.d.cts.map +1 -0
- package/dist/services/RmuxBackend/types.d.mts +29 -0
- package/dist/services/RmuxBackend/types.d.mts.map +1 -0
- package/dist/services/RunnerNamer/RunnerNamer.cjs +2 -0
- package/dist/services/RunnerNamer/RunnerNamer.cjs.map +1 -0
- package/dist/services/RunnerNamer/RunnerNamer.d.cts +13 -0
- package/dist/services/RunnerNamer/RunnerNamer.d.cts.map +1 -0
- package/dist/services/RunnerNamer/RunnerNamer.d.mts +13 -0
- package/dist/services/RunnerNamer/RunnerNamer.d.mts.map +1 -0
- package/dist/services/RunnerNamer/RunnerNamer.mjs +2 -0
- package/dist/services/RunnerNamer/RunnerNamer.mjs.map +1 -0
- package/dist/services/RunnerNamer/index.cjs +1 -0
- package/dist/services/RunnerNamer/index.d.cts +3 -0
- package/dist/services/RunnerNamer/index.d.mts +3 -0
- package/dist/services/RunnerNamer/index.mjs +1 -0
- package/dist/services/RunnerNamer/types.d.cts +12 -0
- package/dist/services/RunnerNamer/types.d.cts.map +1 -0
- package/dist/services/RunnerNamer/types.d.mts +12 -0
- package/dist/services/RunnerNamer/types.d.mts.map +1 -0
- package/dist/services/RunnerPaths/RunnerPaths.cjs +2 -0
- package/dist/services/RunnerPaths/RunnerPaths.cjs.map +1 -0
- package/dist/services/RunnerPaths/RunnerPaths.d.cts +31 -0
- package/dist/services/RunnerPaths/RunnerPaths.d.cts.map +1 -0
- package/dist/services/RunnerPaths/RunnerPaths.d.mts +31 -0
- package/dist/services/RunnerPaths/RunnerPaths.d.mts.map +1 -0
- package/dist/services/RunnerPaths/RunnerPaths.mjs +2 -0
- package/dist/services/RunnerPaths/RunnerPaths.mjs.map +1 -0
- package/dist/services/RunnerPaths/index.cjs +1 -0
- package/dist/services/RunnerPaths/index.d.cts +3 -0
- package/dist/services/RunnerPaths/index.d.mts +3 -0
- package/dist/services/RunnerPaths/index.mjs +1 -0
- package/dist/services/RunnerPaths/types.d.cts +33 -0
- package/dist/services/RunnerPaths/types.d.cts.map +1 -0
- package/dist/services/RunnerPaths/types.d.mts +33 -0
- package/dist/services/RunnerPaths/types.d.mts.map +1 -0
- package/dist/services/RunnerRegistry/RunnerRegistry.cjs +2 -0
- package/dist/services/RunnerRegistry/RunnerRegistry.cjs.map +1 -0
- package/dist/services/RunnerRegistry/RunnerRegistry.d.cts +40 -0
- package/dist/services/RunnerRegistry/RunnerRegistry.d.cts.map +1 -0
- package/dist/services/RunnerRegistry/RunnerRegistry.d.mts +40 -0
- package/dist/services/RunnerRegistry/RunnerRegistry.d.mts.map +1 -0
- package/dist/services/RunnerRegistry/RunnerRegistry.mjs +2 -0
- package/dist/services/RunnerRegistry/RunnerRegistry.mjs.map +1 -0
- package/dist/services/RunnerRegistry/index.cjs +1 -0
- package/dist/services/RunnerRegistry/index.d.cts +3 -0
- package/dist/services/RunnerRegistry/index.d.mts +3 -0
- package/dist/services/RunnerRegistry/index.mjs +1 -0
- package/dist/services/RunnerRegistry/types.d.cts +98 -0
- package/dist/services/RunnerRegistry/types.d.cts.map +1 -0
- package/dist/services/RunnerRegistry/types.d.mts +98 -0
- package/dist/services/RunnerRegistry/types.d.mts.map +1 -0
- package/dist/services/Spawner/NodeSpawner.cjs +2 -0
- package/dist/services/Spawner/NodeSpawner.cjs.map +1 -0
- package/dist/services/Spawner/NodeSpawner.d.cts +10 -0
- package/dist/services/Spawner/NodeSpawner.d.cts.map +1 -0
- package/dist/services/Spawner/NodeSpawner.d.mts +10 -0
- package/dist/services/Spawner/NodeSpawner.d.mts.map +1 -0
- package/dist/services/Spawner/NodeSpawner.mjs +2 -0
- package/dist/services/Spawner/NodeSpawner.mjs.map +1 -0
- package/dist/services/Spawner/index.cjs +1 -0
- package/dist/services/Spawner/index.d.cts +3 -0
- package/dist/services/Spawner/index.d.mts +3 -0
- package/dist/services/Spawner/index.mjs +1 -0
- package/dist/services/Spawner/types.d.cts +31 -0
- package/dist/services/Spawner/types.d.cts.map +1 -0
- package/dist/services/Spawner/types.d.mts +31 -0
- package/dist/services/Spawner/types.d.mts.map +1 -0
- package/dist/session.cjs +2 -0
- package/dist/session.cjs.map +1 -0
- package/dist/session.d.cts +10 -0
- package/dist/session.d.cts.map +1 -0
- package/dist/session.d.mts +10 -0
- package/dist/session.d.mts.map +1 -0
- package/dist/session.mjs +2 -0
- package/dist/session.mjs.map +1 -0
- package/dist/tool/bashTool.cjs +7 -0
- package/dist/tool/bashTool.cjs.map +1 -0
- package/dist/tool/bashTool.d.cts +25 -0
- package/dist/tool/bashTool.d.cts.map +1 -0
- package/dist/tool/bashTool.d.mts +25 -0
- package/dist/tool/bashTool.d.mts.map +1 -0
- package/dist/tool/bashTool.mjs +7 -0
- package/dist/tool/bashTool.mjs.map +1 -0
- package/dist/tool/responseEnvelope.cjs +10 -0
- package/dist/tool/responseEnvelope.cjs.map +1 -0
- package/dist/tool/responseEnvelope.d.cts +45 -0
- package/dist/tool/responseEnvelope.d.cts.map +1 -0
- package/dist/tool/responseEnvelope.d.mts +45 -0
- package/dist/tool/responseEnvelope.d.mts.map +1 -0
- package/dist/tool/responseEnvelope.mjs +10 -0
- package/dist/tool/responseEnvelope.mjs.map +1 -0
- package/dist/tool/schema.cjs +2 -0
- package/dist/tool/schema.cjs.map +1 -0
- package/dist/tool/schema.d.cts +25 -0
- package/dist/tool/schema.d.cts.map +1 -0
- package/dist/tool/schema.d.mts +25 -0
- package/dist/tool/schema.d.mts.map +1 -0
- package/dist/tool/schema.mjs +2 -0
- package/dist/tool/schema.mjs.map +1 -0
- package/dist/tui/bashRender.cjs +8 -0
- package/dist/tui/bashRender.cjs.map +1 -0
- package/dist/tui/bashRender.d.cts +51 -0
- package/dist/tui/bashRender.d.cts.map +1 -0
- package/dist/tui/bashRender.d.mts +51 -0
- package/dist/tui/bashRender.d.mts.map +1 -0
- package/dist/tui/bashRender.mjs +8 -0
- package/dist/tui/bashRender.mjs.map +1 -0
- package/dist/tui/format.cjs +2 -0
- package/dist/tui/format.cjs.map +1 -0
- package/dist/tui/format.d.cts +25 -0
- package/dist/tui/format.d.cts.map +1 -0
- package/dist/tui/format.d.mts +25 -0
- package/dist/tui/format.d.mts.map +1 -0
- package/dist/tui/format.mjs +2 -0
- package/dist/tui/format.mjs.map +1 -0
- package/dist/tui/runnerSpace.cjs +6 -0
- package/dist/tui/runnerSpace.cjs.map +1 -0
- package/dist/tui/runnerSpace.d.cts +52 -0
- package/dist/tui/runnerSpace.d.cts.map +1 -0
- package/dist/tui/runnerSpace.d.mts +52 -0
- package/dist/tui/runnerSpace.d.mts.map +1 -0
- package/dist/tui/runnerSpace.mjs +6 -0
- package/dist/tui/runnerSpace.mjs.map +1 -0
- package/dist/types.cjs +2 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +28 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +28 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +2 -0
- package/dist/types.mjs.map +1 -0
- package/package.json +335 -0
- 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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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"}
|