4runr-os 2.1.4 → 2.1.6
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/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/tui_mk1/kernel.d.ts.map +1 -1
- package/dist/tui_mk1/kernel.js +107 -4
- package/dist/tui_mk1/kernel.js.map +1 -1
- package/dist/tui_mk1/layout/layoutEngine.d.ts +38 -19
- package/dist/tui_mk1/layout/layoutEngine.d.ts.map +1 -1
- package/dist/tui_mk1/layout/layoutEngine.js +521 -228
- package/dist/tui_mk1/layout/layoutEngine.js.map +1 -1
- package/dist/tui_mk1/log.d.ts +23 -0
- package/dist/tui_mk1/log.d.ts.map +1 -0
- package/dist/tui_mk1/log.js +125 -0
- package/dist/tui_mk1/log.js.map +1 -0
- package/dist/tui_mk1/logger.d.ts.map +1 -1
- package/dist/tui_mk1/logger.js +20 -10
- package/dist/tui_mk1/logger.js.map +1 -1
- package/dist/tui_mk1/mk1App.d.ts +13 -18
- package/dist/tui_mk1/mk1App.d.ts.map +1 -1
- package/dist/tui_mk1/mk1App.js +334 -157
- package/dist/tui_mk1/mk1App.js.map +1 -1
- package/dist/tui_mk1/resizeController.d.ts.map +1 -1
- package/dist/tui_mk1/resizeController.js +15 -1
- package/dist/tui_mk1/resizeController.js.map +1 -1
- package/dist/tui_mk1/stdoutGuard.d.ts.map +1 -1
- package/dist/tui_mk1/stdoutGuard.js +7 -0
- package/dist/tui_mk1/stdoutGuard.js.map +1 -1
- package/dist/tui_mk1/terminalRestore.d.ts.map +1 -1
- package/dist/tui_mk1/terminalRestore.js +19 -1
- package/dist/tui_mk1/terminalRestore.js.map +1 -1
- package/dist/tui_mk1/ui/offenderScanner.d.ts +31 -0
- package/dist/tui_mk1/ui/offenderScanner.d.ts.map +1 -0
- package/dist/tui_mk1/ui/offenderScanner.js +80 -0
- package/dist/tui_mk1/ui/offenderScanner.js.map +1 -0
- package/dist/tui_mk1/ui/safe.d.ts +9 -0
- package/dist/tui_mk1/ui/safe.d.ts.map +1 -0
- package/dist/tui_mk1/ui/safe.js +29 -0
- package/dist/tui_mk1/ui/safe.js.map +1 -0
- package/dist/tui_mk1/ui/safeText.d.ts +22 -0
- package/dist/tui_mk1/ui/safeText.d.ts.map +1 -0
- package/dist/tui_mk1/ui/safeText.js +50 -0
- package/dist/tui_mk1/ui/safeText.js.map +1 -0
- package/dist/tui_mk1/ui/uiBuilder.d.ts +44 -0
- package/dist/tui_mk1/ui/uiBuilder.d.ts.map +1 -0
- package/dist/tui_mk1/ui/uiBuilder.js +467 -0
- package/dist/tui_mk1/ui/uiBuilder.js.map +1 -0
- package/dist/tui_mk1/viewport/safeViewport.d.ts +10 -1
- package/dist/tui_mk1/viewport/safeViewport.d.ts.map +1 -1
- package/dist/tui_mk1/viewport/safeViewport.js +47 -15
- package/dist/tui_mk1/viewport/safeViewport.js.map +1 -1
- package/dist/tui_mk2/kernel.d.ts +28 -0
- package/dist/tui_mk2/kernel.d.ts.map +1 -0
- package/dist/tui_mk2/kernel.js +138 -0
- package/dist/tui_mk2/kernel.js.map +1 -0
- package/dist/tui_mk2/mk2App.d.ts +33 -0
- package/dist/tui_mk2/mk2App.d.ts.map +1 -0
- package/dist/tui_mk2/mk2App.js +135 -0
- package/dist/tui_mk2/mk2App.js.map +1 -0
- package/package.json +8 -7
- package/dist/tui_mk1/ui/panels/createSection.d.ts +0 -18
- package/dist/tui_mk1/ui/panels/createSection.d.ts.map +0 -1
- package/dist/tui_mk1/ui/panels/createSection.js +0 -42
- package/dist/tui_mk1/ui/panels/createSection.js.map +0 -1
- package/dist/tui_mk1/ui/panels.d.ts +0 -23
- package/dist/tui_mk1/ui/panels.d.ts.map +0 -1
- package/dist/tui_mk1/ui/panels.js +0 -108
- package/dist/tui_mk1/ui/panels.js.map +0 -1
- package/dist/tui_mk1/ui/render/sectionRenderer.d.ts +0 -21
- package/dist/tui_mk1/ui/render/sectionRenderer.d.ts.map +0 -1
- package/dist/tui_mk1/ui/render/sectionRenderer.js +0 -32
- package/dist/tui_mk1/ui/render/sectionRenderer.js.map +0 -1
- package/dist/tui_mk1/ui/widgetManager.d.ts +0 -58
- package/dist/tui_mk1/ui/widgetManager.d.ts.map +0 -1
- package/dist/tui_mk1/ui/widgetManager.js +0 -197
- package/dist/tui_mk1/ui/widgetManager.js.map +0 -1
- package/dist/ui/boot/sequence.d.ts +0 -10
- package/dist/ui/boot/sequence.d.ts.map +0 -1
- package/dist/ui/boot/sequence.js +0 -171
- package/dist/ui/boot/sequence.js.map +0 -1
- package/dist/ui/constraints/layoutSpec.d.ts +0 -47
- package/dist/ui/constraints/layoutSpec.d.ts.map +0 -1
- package/dist/ui/constraints/layoutSpec.js +0 -60
- package/dist/ui/constraints/layoutSpec.js.map +0 -1
- package/dist/ui/constraints/unknownHandling.d.ts +0 -29
- package/dist/ui/constraints/unknownHandling.d.ts.map +0 -1
- package/dist/ui/constraints/unknownHandling.js +0 -60
- package/dist/ui/constraints/unknownHandling.js.map +0 -1
- package/dist/ui/drilldowns/feed.d.ts +0 -11
- package/dist/ui/drilldowns/feed.d.ts.map +0 -1
- package/dist/ui/drilldowns/feed.js +0 -68
- package/dist/ui/drilldowns/feed.js.map +0 -1
- package/dist/ui/drilldowns/index.d.ts +0 -7
- package/dist/ui/drilldowns/index.d.ts.map +0 -1
- package/dist/ui/drilldowns/index.js +0 -8
- package/dist/ui/drilldowns/index.js.map +0 -1
- package/dist/ui/drilldowns/posture.d.ts +0 -11
- package/dist/ui/drilldowns/posture.d.ts.map +0 -1
- package/dist/ui/drilldowns/posture.js +0 -74
- package/dist/ui/drilldowns/posture.js.map +0 -1
- package/dist/ui/intelligence-posture-view.d.ts +0 -22
- package/dist/ui/intelligence-posture-view.d.ts.map +0 -1
- package/dist/ui/intelligence-posture-view.js +0 -169
- package/dist/ui/intelligence-posture-view.js.map +0 -1
- package/dist/ui/navigation/keymaps.d.ts +0 -26
- package/dist/ui/navigation/keymaps.d.ts.map +0 -1
- package/dist/ui/navigation/keymaps.js +0 -135
- package/dist/ui/navigation/keymaps.js.map +0 -1
- package/dist/ui/navigation/palette.d.ts +0 -10
- package/dist/ui/navigation/palette.d.ts.map +0 -1
- package/dist/ui/navigation/palette.js +0 -133
- package/dist/ui/navigation/palette.js.map +0 -1
- package/dist/ui/navigation/state.d.ts +0 -47
- package/dist/ui/navigation/state.d.ts.map +0 -1
- package/dist/ui/navigation/state.js +0 -84
- package/dist/ui/navigation/state.js.map +0 -1
- package/dist/ui/navigation/types.d.ts +0 -38
- package/dist/ui/navigation/types.d.ts.map +0 -1
- package/dist/ui/navigation/types.js +0 -36
- package/dist/ui/navigation/types.js.map +0 -1
- package/dist/ui/panels/active-assets.d.ts +0 -12
- package/dist/ui/panels/active-assets.d.ts.map +0 -1
- package/dist/ui/panels/active-assets.js +0 -83
- package/dist/ui/panels/active-assets.js.map +0 -1
- package/dist/ui/panels/capability-flags.d.ts +0 -12
- package/dist/ui/panels/capability-flags.d.ts.map +0 -1
- package/dist/ui/panels/capability-flags.js +0 -59
- package/dist/ui/panels/capability-flags.js.map +0 -1
- package/dist/ui/panels/command-surface.d.ts +0 -12
- package/dist/ui/panels/command-surface.d.ts.map +0 -1
- package/dist/ui/panels/command-surface.js +0 -55
- package/dist/ui/panels/command-surface.js.map +0 -1
- package/dist/ui/panels/network-origin.d.ts +0 -12
- package/dist/ui/panels/network-origin.d.ts.map +0 -1
- package/dist/ui/panels/network-origin.js +0 -79
- package/dist/ui/panels/network-origin.js.map +0 -1
- package/dist/ui/panels/operations-feed.d.ts +0 -12
- package/dist/ui/panels/operations-feed.d.ts.map +0 -1
- package/dist/ui/panels/operations-feed.js +0 -90
- package/dist/ui/panels/operations-feed.js.map +0 -1
- package/dist/ui/panels/posture.d.ts +0 -12
- package/dist/ui/panels/posture.d.ts.map +0 -1
- package/dist/ui/panels/posture.js +0 -84
- package/dist/ui/panels/posture.js.map +0 -1
- package/dist/ui/panels/resources.d.ts +0 -11
- package/dist/ui/panels/resources.d.ts.map +0 -1
- package/dist/ui/panels/resources.js +0 -88
- package/dist/ui/panels/resources.js.map +0 -1
- package/dist/ui/primitives/Panel.d.ts +0 -25
- package/dist/ui/primitives/Panel.d.ts.map +0 -1
- package/dist/ui/primitives/Panel.js +0 -59
- package/dist/ui/primitives/Panel.js.map +0 -1
- package/dist/ui/rendering/metricRenderer.d.ts +0 -24
- package/dist/ui/rendering/metricRenderer.d.ts.map +0 -1
- package/dist/ui/rendering/metricRenderer.js +0 -86
- package/dist/ui/rendering/metricRenderer.js.map +0 -1
- package/dist/ui/runtime/hub.d.ts +0 -12
- package/dist/ui/runtime/hub.d.ts.map +0 -1
- package/dist/ui/runtime/hub.js +0 -486
- package/dist/ui/runtime/hub.js.map +0 -1
- package/dist/ui/runtime/hubValidation.d.ts +0 -23
- package/dist/ui/runtime/hubValidation.d.ts.map +0 -1
- package/dist/ui/runtime/hubValidation.js +0 -90
- package/dist/ui/runtime/hubValidation.js.map +0 -1
- package/dist/ui/runtime/index.d.ts +0 -29
- package/dist/ui/runtime/index.d.ts.map +0 -1
- package/dist/ui/runtime/index.js +0 -297
- package/dist/ui/runtime/index.js.map +0 -1
- package/dist/ui/runtime/no-tui.d.ts +0 -12
- package/dist/ui/runtime/no-tui.d.ts.map +0 -1
- package/dist/ui/runtime/no-tui.js +0 -77
- package/dist/ui/runtime/no-tui.js.map +0 -1
- package/dist/ui/runtime/state-builder.d.ts +0 -13
- package/dist/ui/runtime/state-builder.d.ts.map +0 -1
- package/dist/ui/runtime/state-builder.js +0 -114
- package/dist/ui/runtime/state-builder.js.map +0 -1
- package/dist/ui/runtime/terminalSizeCheck.d.ts +0 -10
- package/dist/ui/runtime/terminalSizeCheck.d.ts.map +0 -1
- package/dist/ui/runtime/terminalSizeCheck.js +0 -51
- package/dist/ui/runtime/terminalSizeCheck.js.map +0 -1
- package/dist/ui/runtime/tuiLogGate.d.ts +0 -22
- package/dist/ui/runtime/tuiLogGate.d.ts.map +0 -1
- package/dist/ui/runtime/tuiLogGate.js +0 -68
- package/dist/ui/runtime/tuiLogGate.js.map +0 -1
- package/dist/ui/state/types.d.ts +0 -72
- package/dist/ui/state/types.d.ts.map +0 -1
- package/dist/ui/state/types.js +0 -6
- package/dist/ui/state/types.js.map +0 -1
- package/dist/ui/theme/borders.d.ts +0 -20
- package/dist/ui/theme/borders.d.ts.map +0 -1
- package/dist/ui/theme/borders.js +0 -55
- package/dist/ui/theme/borders.js.map +0 -1
- package/dist/ui/theme/tokens.d.ts +0 -28
- package/dist/ui/theme/tokens.d.ts.map +0 -1
- package/dist/ui/theme/tokens.js +0 -50
- package/dist/ui/theme/tokens.js.map +0 -1
- package/dist/ui/theme/typography.d.ts +0 -14
- package/dist/ui/theme/typography.d.ts.map +0 -1
- package/dist/ui/theme/typography.js +0 -30
- package/dist/ui/theme/typography.js.map +0 -1
- package/dist/ui/v3/collectors/assets.collector.d.ts +0 -20
- package/dist/ui/v3/collectors/assets.collector.d.ts.map +0 -1
- package/dist/ui/v3/collectors/assets.collector.js +0 -80
- package/dist/ui/v3/collectors/assets.collector.js.map +0 -1
- package/dist/ui/v3/collectors/capabilities.collector.d.ts +0 -18
- package/dist/ui/v3/collectors/capabilities.collector.d.ts.map +0 -1
- package/dist/ui/v3/collectors/capabilities.collector.js +0 -113
- package/dist/ui/v3/collectors/capabilities.collector.js.map +0 -1
- package/dist/ui/v3/collectors/network.collector.d.ts +0 -18
- package/dist/ui/v3/collectors/network.collector.d.ts.map +0 -1
- package/dist/ui/v3/collectors/network.collector.js +0 -37
- package/dist/ui/v3/collectors/network.collector.js.map +0 -1
- package/dist/ui/v3/collectors/posture.derive.d.ts +0 -24
- package/dist/ui/v3/collectors/posture.derive.d.ts.map +0 -1
- package/dist/ui/v3/collectors/posture.derive.js +0 -57
- package/dist/ui/v3/collectors/posture.derive.js.map +0 -1
- package/dist/ui/v3/collectors/resources.d.ts +0 -23
- package/dist/ui/v3/collectors/resources.d.ts.map +0 -1
- package/dist/ui/v3/collectors/resources.js +0 -136
- package/dist/ui/v3/collectors/resources.js.map +0 -1
- package/dist/ui/v3/commands/commandEngine.d.ts +0 -77
- package/dist/ui/v3/commands/commandEngine.d.ts.map +0 -1
- package/dist/ui/v3/commands/commandEngine.js +0 -3289
- package/dist/ui/v3/commands/commandEngine.js.map +0 -1
- package/dist/ui/v3/commands/commandResult.d.ts +0 -25
- package/dist/ui/v3/commands/commandResult.d.ts.map +0 -1
- package/dist/ui/v3/commands/commandResult.js +0 -19
- package/dist/ui/v3/commands/commandResult.js.map +0 -1
- package/dist/ui/v3/commands/diagnose.d.ts +0 -17
- package/dist/ui/v3/commands/diagnose.d.ts.map +0 -1
- package/dist/ui/v3/commands/diagnose.js +0 -62
- package/dist/ui/v3/commands/diagnose.js.map +0 -1
- package/dist/ui/v3/commands/errorClassifier.d.ts +0 -23
- package/dist/ui/v3/commands/errorClassifier.d.ts.map +0 -1
- package/dist/ui/v3/commands/errorClassifier.js +0 -63
- package/dist/ui/v3/commands/errorClassifier.js.map +0 -1
- package/dist/ui/v3/commands/parser.d.ts +0 -14
- package/dist/ui/v3/commands/parser.d.ts.map +0 -1
- package/dist/ui/v3/commands/parser.js +0 -29
- package/dist/ui/v3/commands/parser.js.map +0 -1
- package/dist/ui/v3/commands/router.d.ts +0 -13
- package/dist/ui/v3/commands/router.d.ts.map +0 -1
- package/dist/ui/v3/commands/router.js +0 -150
- package/dist/ui/v3/commands/router.js.map +0 -1
- package/dist/ui/v3/config/gateway.d.ts +0 -40
- package/dist/ui/v3/config/gateway.d.ts.map +0 -1
- package/dist/ui/v3/config/gateway.js +0 -113
- package/dist/ui/v3/config/gateway.js.map +0 -1
- package/dist/ui/v3/core/event.d.ts +0 -19
- package/dist/ui/v3/core/event.d.ts.map +0 -1
- package/dist/ui/v3/core/event.js +0 -7
- package/dist/ui/v3/core/event.js.map +0 -1
- package/dist/ui/v3/core/eventBus.d.ts +0 -39
- package/dist/ui/v3/core/eventBus.d.ts.map +0 -1
- package/dist/ui/v3/core/eventBus.js +0 -79
- package/dist/ui/v3/core/eventBus.js.map +0 -1
- package/dist/ui/v3/core/feedStore.d.ts +0 -34
- package/dist/ui/v3/core/feedStore.d.ts.map +0 -1
- package/dist/ui/v3/core/feedStore.js +0 -46
- package/dist/ui/v3/core/feedStore.js.map +0 -1
- package/dist/ui/v3/core/logger.d.ts +0 -40
- package/dist/ui/v3/core/logger.d.ts.map +0 -1
- package/dist/ui/v3/core/logger.js +0 -191
- package/dist/ui/v3/core/logger.js.map +0 -1
- package/dist/ui/v3/core/opEvent.d.ts +0 -15
- package/dist/ui/v3/core/opEvent.d.ts.map +0 -1
- package/dist/ui/v3/core/opEvent.js +0 -7
- package/dist/ui/v3/core/opEvent.js.map +0 -1
- package/dist/ui/v3/index.d.ts +0 -8
- package/dist/ui/v3/index.d.ts.map +0 -1
- package/dist/ui/v3/index.js +0 -51
- package/dist/ui/v3/index.js.map +0 -1
- package/dist/ui/v3/runtime/moduleConfig.d.ts +0 -21
- package/dist/ui/v3/runtime/moduleConfig.d.ts.map +0 -1
- package/dist/ui/v3/runtime/moduleConfig.js +0 -41
- package/dist/ui/v3/runtime/moduleConfig.js.map +0 -1
- package/dist/ui/v3/section0/index.d.ts +0 -22
- package/dist/ui/v3/section0/index.d.ts.map +0 -1
- package/dist/ui/v3/section0/index.js +0 -88
- package/dist/ui/v3/section0/index.js.map +0 -1
- package/dist/ui/v3/section0/runtime/createScreen.d.ts +0 -27
- package/dist/ui/v3/section0/runtime/createScreen.d.ts.map +0 -1
- package/dist/ui/v3/section0/runtime/createScreen.js +0 -55
- package/dist/ui/v3/section0/runtime/createScreen.js.map +0 -1
- package/dist/ui/v3/section0/runtime/lifecycle.d.ts +0 -53
- package/dist/ui/v3/section0/runtime/lifecycle.d.ts.map +0 -1
- package/dist/ui/v3/section0/runtime/lifecycle.js +0 -172
- package/dist/ui/v3/section0/runtime/lifecycle.js.map +0 -1
- package/dist/ui/v3/section1/index.d.ts +0 -19
- package/dist/ui/v3/section1/index.d.ts.map +0 -1
- package/dist/ui/v3/section1/index.js +0 -413
- package/dist/ui/v3/section1/index.js.map +0 -1
- package/dist/ui/v3/section1/runtime/commandLine.d.ts +0 -49
- package/dist/ui/v3/section1/runtime/commandLine.d.ts.map +0 -1
- package/dist/ui/v3/section1/runtime/commandLine.js +0 -183
- package/dist/ui/v3/section1/runtime/commandLine.js.map +0 -1
- package/dist/ui/v3/section1/runtime/focusLock.d.ts +0 -24
- package/dist/ui/v3/section1/runtime/focusLock.d.ts.map +0 -1
- package/dist/ui/v3/section1/runtime/focusLock.js +0 -44
- package/dist/ui/v3/section1/runtime/focusLock.js.map +0 -1
- package/dist/ui/v3/state/assertUiState.d.ts +0 -27
- package/dist/ui/v3/state/assertUiState.d.ts.map +0 -1
- package/dist/ui/v3/state/assertUiState.js +0 -89
- package/dist/ui/v3/state/assertUiState.js.map +0 -1
- package/dist/ui/v3/state/capabilitiesStore.d.ts +0 -54
- package/dist/ui/v3/state/capabilitiesStore.d.ts.map +0 -1
- package/dist/ui/v3/state/capabilitiesStore.js +0 -76
- package/dist/ui/v3/state/capabilitiesStore.js.map +0 -1
- package/dist/ui/v3/state/defaultState.d.ts +0 -19
- package/dist/ui/v3/state/defaultState.d.ts.map +0 -1
- package/dist/ui/v3/state/defaultState.js +0 -28
- package/dist/ui/v3/state/defaultState.js.map +0 -1
- package/dist/ui/v3/state/gatewayConnectionStore.d.ts +0 -72
- package/dist/ui/v3/state/gatewayConnectionStore.d.ts.map +0 -1
- package/dist/ui/v3/state/gatewayConnectionStore.js +0 -108
- package/dist/ui/v3/state/gatewayConnectionStore.js.map +0 -1
- package/dist/ui/v3/state/initializePostureState.d.ts +0 -23
- package/dist/ui/v3/state/initializePostureState.d.ts.map +0 -1
- package/dist/ui/v3/state/initializePostureState.js +0 -41
- package/dist/ui/v3/state/initializePostureState.js.map +0 -1
- package/dist/ui/v3/state/panelStore.d.ts +0 -80
- package/dist/ui/v3/state/panelStore.d.ts.map +0 -1
- package/dist/ui/v3/state/panelStore.js +0 -131
- package/dist/ui/v3/state/panelStore.js.map +0 -1
- package/dist/ui/v3/state/resourcesData.d.ts +0 -15
- package/dist/ui/v3/state/resourcesData.d.ts.map +0 -1
- package/dist/ui/v3/state/resourcesData.js +0 -7
- package/dist/ui/v3/state/resourcesData.js.map +0 -1
- package/dist/ui/v3/state/uiState.d.ts +0 -22
- package/dist/ui/v3/state/uiState.d.ts.map +0 -1
- package/dist/ui/v3/state/uiState.js +0 -13
- package/dist/ui/v3/state/uiState.js.map +0 -1
- package/dist/ui/v3/state/uiStateBuilder.d.ts +0 -32
- package/dist/ui/v3/state/uiStateBuilder.d.ts.map +0 -1
- package/dist/ui/v3/state/uiStateBuilder.js +0 -73
- package/dist/ui/v3/state/uiStateBuilder.js.map +0 -1
- package/dist/ui/v3/state/uiStateTypes.d.ts +0 -59
- package/dist/ui/v3/state/uiStateTypes.d.ts.map +0 -1
- package/dist/ui/v3/state/uiStateTypes.js +0 -8
- package/dist/ui/v3/state/uiStateTypes.js.map +0 -1
- package/dist/ui/v3/state/value.d.ts +0 -80
- package/dist/ui/v3/state/value.d.ts.map +0 -1
- package/dist/ui/v3/state/value.js +0 -96
- package/dist/ui/v3/state/value.js.map +0 -1
- package/dist/ui/v3/tui/geometry.d.ts +0 -83
- package/dist/ui/v3/tui/geometry.d.ts.map +0 -1
- package/dist/ui/v3/tui/geometry.js +0 -201
- package/dist/ui/v3/tui/geometry.js.map +0 -1
- package/dist/ui/v3/tui/startTui.d.ts +0 -37
- package/dist/ui/v3/tui/startTui.d.ts.map +0 -1
- package/dist/ui/v3/tui/startTui.js +0 -61
- package/dist/ui/v3/tui/startTui.js.map +0 -1
- package/dist/ui/v3/tui/terminalMode.d.ts +0 -31
- package/dist/ui/v3/tui/terminalMode.d.ts.map +0 -1
- package/dist/ui/v3/tui/terminalMode.js +0 -76
- package/dist/ui/v3/tui/terminalMode.js.map +0 -1
- package/dist/ui/v3/ui/debugUtils.d.ts +0 -67
- package/dist/ui/v3/ui/debugUtils.d.ts.map +0 -1
- package/dist/ui/v3/ui/debugUtils.js +0 -238
- package/dist/ui/v3/ui/debugUtils.js.map +0 -1
- package/dist/ui/v3/ui/focus.d.ts +0 -28
- package/dist/ui/v3/ui/focus.d.ts.map +0 -1
- package/dist/ui/v3/ui/focus.js +0 -38
- package/dist/ui/v3/ui/focus.js.map +0 -1
- package/dist/ui/v3/ui/layout/hubLayout.d.ts +0 -43
- package/dist/ui/v3/ui/layout/hubLayout.d.ts.map +0 -1
- package/dist/ui/v3/ui/layout/hubLayout.js +0 -170
- package/dist/ui/v3/ui/layout/hubLayout.js.map +0 -1
- package/dist/ui/v3/ui/layout/phase1Layout.d.ts +0 -63
- package/dist/ui/v3/ui/layout/phase1Layout.d.ts.map +0 -1
- package/dist/ui/v3/ui/layout/phase1Layout.js +0 -274
- package/dist/ui/v3/ui/layout/phase1Layout.js.map +0 -1
- package/dist/ui/v3/ui/layout/phase1Layout.test.d.ts +0 -5
- package/dist/ui/v3/ui/layout/phase1Layout.test.d.ts.map +0 -1
- package/dist/ui/v3/ui/layout/phase1Layout.test.js +0 -120
- package/dist/ui/v3/ui/layout/phase1Layout.test.js.map +0 -1
- package/dist/ui/v3/ui/minimalRuntime.d.ts +0 -14
- package/dist/ui/v3/ui/minimalRuntime.d.ts.map +0 -1
- package/dist/ui/v3/ui/minimalRuntime.js +0 -111
- package/dist/ui/v3/ui/minimalRuntime.js.map +0 -1
- package/dist/ui/v3/ui/panels/AssetsPanel.d.ts +0 -17
- package/dist/ui/v3/ui/panels/AssetsPanel.d.ts.map +0 -1
- package/dist/ui/v3/ui/panels/AssetsPanel.js +0 -53
- package/dist/ui/v3/ui/panels/AssetsPanel.js.map +0 -1
- package/dist/ui/v3/ui/panels/CapabilitiesPanel.d.ts +0 -20
- package/dist/ui/v3/ui/panels/CapabilitiesPanel.d.ts.map +0 -1
- package/dist/ui/v3/ui/panels/CapabilitiesPanel.js +0 -67
- package/dist/ui/v3/ui/panels/CapabilitiesPanel.js.map +0 -1
- package/dist/ui/v3/ui/panels/NetworkPanel.d.ts +0 -31
- package/dist/ui/v3/ui/panels/NetworkPanel.d.ts.map +0 -1
- package/dist/ui/v3/ui/panels/NetworkPanel.js +0 -153
- package/dist/ui/v3/ui/panels/NetworkPanel.js.map +0 -1
- package/dist/ui/v3/ui/panels/PosturePanel.d.ts +0 -16
- package/dist/ui/v3/ui/panels/PosturePanel.d.ts.map +0 -1
- package/dist/ui/v3/ui/panels/PosturePanel.js +0 -60
- package/dist/ui/v3/ui/panels/PosturePanel.js.map +0 -1
- package/dist/ui/v3/ui/panels/ResourcesPanel.d.ts +0 -20
- package/dist/ui/v3/ui/panels/ResourcesPanel.d.ts.map +0 -1
- package/dist/ui/v3/ui/panels/ResourcesPanel.js +0 -66
- package/dist/ui/v3/ui/panels/ResourcesPanel.js.map +0 -1
- package/dist/ui/v3/ui/phase1Runtime.d.ts +0 -29
- package/dist/ui/v3/ui/phase1Runtime.d.ts.map +0 -1
- package/dist/ui/v3/ui/phase1Runtime.js +0 -1648
- package/dist/ui/v3/ui/phase1Runtime.js.map +0 -1
- package/dist/ui/v3/ui/phase1RuntimeClean.d.ts +0 -34
- package/dist/ui/v3/ui/phase1RuntimeClean.d.ts.map +0 -1
- package/dist/ui/v3/ui/phase1RuntimeClean.js +0 -1841
- package/dist/ui/v3/ui/phase1RuntimeClean.js.map +0 -1
- package/dist/ui/v3/ui/primitives/Panel.d.ts +0 -39
- package/dist/ui/v3/ui/primitives/Panel.d.ts.map +0 -1
- package/dist/ui/v3/ui/primitives/Panel.js +0 -105
- package/dist/ui/v3/ui/primitives/Panel.js.map +0 -1
- package/dist/ui/v3/ui/theme.d.ts +0 -37
- package/dist/ui/v3/ui/theme.d.ts.map +0 -1
- package/dist/ui/v3/ui/theme.js +0 -40
- package/dist/ui/v3/ui/theme.js.map +0 -1
- package/dist/ui/v3/ui/uiRuntime.d.ts +0 -40
- package/dist/ui/v3/ui/uiRuntime.d.ts.map +0 -1
- package/dist/ui/v3/ui/uiRuntime.js +0 -60
- package/dist/ui/v3/ui/uiRuntime.js.map +0 -1
- package/dist/ui/v3/ui/widgets/CommandLine.d.ts +0 -26
- package/dist/ui/v3/ui/widgets/CommandLine.d.ts.map +0 -1
- package/dist/ui/v3/ui/widgets/CommandLine.js +0 -67
- package/dist/ui/v3/ui/widgets/CommandLine.js.map +0 -1
- package/dist/ui/v3/v1Adapters/agents.d.ts +0 -72
- package/dist/ui/v3/v1Adapters/agents.d.ts.map +0 -1
- package/dist/ui/v3/v1Adapters/agents.js +0 -182
- package/dist/ui/v3/v1Adapters/agents.js.map +0 -1
- package/dist/ui/v3/v1Adapters/config.d.ts +0 -67
- package/dist/ui/v3/v1Adapters/config.d.ts.map +0 -1
- package/dist/ui/v3/v1Adapters/config.js +0 -78
- package/dist/ui/v3/v1Adapters/config.js.map +0 -1
- package/dist/ui/v3/v1Adapters/connect.d.ts +0 -77
- package/dist/ui/v3/v1Adapters/connect.d.ts.map +0 -1
- package/dist/ui/v3/v1Adapters/connect.js +0 -576
- package/dist/ui/v3/v1Adapters/connect.js.map +0 -1
- package/dist/ui/v3/v1Adapters/httpDebug.d.ts +0 -19
- package/dist/ui/v3/v1Adapters/httpDebug.d.ts.map +0 -1
- package/dist/ui/v3/v1Adapters/httpDebug.js +0 -60
- package/dist/ui/v3/v1Adapters/httpDebug.js.map +0 -1
- package/dist/ui/v3/v1Adapters/runs.d.ts +0 -77
- package/dist/ui/v3/v1Adapters/runs.d.ts.map +0 -1
- package/dist/ui/v3/v1Adapters/runs.js +0 -339
- package/dist/ui/v3/v1Adapters/runs.js.map +0 -1
- package/dist/ui/v4/engine/renderFrame.d.ts +0 -47
- package/dist/ui/v4/engine/renderFrame.d.ts.map +0 -1
- package/dist/ui/v4/engine/renderFrame.js +0 -653
- package/dist/ui/v4/engine/renderFrame.js.map +0 -1
- package/dist/ui/v4/engine/resizeController.d.ts +0 -48
- package/dist/ui/v4/engine/resizeController.d.ts.map +0 -1
- package/dist/ui/v4/engine/resizeController.js +0 -285
- package/dist/ui/v4/engine/resizeController.js.map +0 -1
- package/dist/ui/v4/engine/safeViewport.d.ts +0 -47
- package/dist/ui/v4/engine/safeViewport.d.ts.map +0 -1
- package/dist/ui/v4/engine/safeViewport.js +0 -123
- package/dist/ui/v4/engine/safeViewport.js.map +0 -1
- package/dist/ui/v4/engine/terminalProfile.d.ts +0 -56
- package/dist/ui/v4/engine/terminalProfile.d.ts.map +0 -1
- package/dist/ui/v4/engine/terminalProfile.js +0 -115
- package/dist/ui/v4/engine/terminalProfile.js.map +0 -1
- package/dist/ui/v4/index.d.ts +0 -28
- package/dist/ui/v4/index.d.ts.map +0 -1
- package/dist/ui/v4/index.js +0 -993
- package/dist/ui/v4/index.js.map +0 -1
- package/dist/ui/v4/layout/layoutEngine.d.ts +0 -62
- package/dist/ui/v4/layout/layoutEngine.d.ts.map +0 -1
- package/dist/ui/v4/layout/layoutEngine.js +0 -294
- package/dist/ui/v4/layout/layoutEngine.js.map +0 -1
- package/dist/ui/v4/runtime/keepAlive.d.ts +0 -21
- package/dist/ui/v4/runtime/keepAlive.d.ts.map +0 -1
- package/dist/ui/v4/runtime/keepAlive.js +0 -149
- package/dist/ui/v4/runtime/keepAlive.js.map +0 -1
- package/dist/ui/v4/runtime/logger.d.ts +0 -35
- package/dist/ui/v4/runtime/logger.d.ts.map +0 -1
- package/dist/ui/v4/runtime/logger.js +0 -109
- package/dist/ui/v4/runtime/logger.js.map +0 -1
- package/dist/ui/v5/debug/assertNoOverflow.d.ts +0 -28
- package/dist/ui/v5/debug/assertNoOverflow.d.ts.map +0 -1
- package/dist/ui/v5/debug/assertNoOverflow.js +0 -63
- package/dist/ui/v5/debug/assertNoOverflow.js.map +0 -1
- package/dist/ui/v5/debug/debugCommands.d.ts +0 -20
- package/dist/ui/v5/debug/debugCommands.d.ts.map +0 -1
- package/dist/ui/v5/debug/debugCommands.js +0 -461
- package/dist/ui/v5/debug/debugCommands.js.map +0 -1
- package/dist/ui/v5/debugCommands.d.ts +0 -20
- package/dist/ui/v5/debugCommands.d.ts.map +0 -1
- package/dist/ui/v5/debugCommands.js +0 -81
- package/dist/ui/v5/debugCommands.js.map +0 -1
- package/dist/ui/v5/guardrails/stdoutGuard.d.ts +0 -23
- package/dist/ui/v5/guardrails/stdoutGuard.d.ts.map +0 -1
- package/dist/ui/v5/guardrails/stdoutGuard.js +0 -94
- package/dist/ui/v5/guardrails/stdoutGuard.js.map +0 -1
- package/dist/ui/v5/guardrails/terminalRestore.d.ts +0 -17
- package/dist/ui/v5/guardrails/terminalRestore.d.ts.map +0 -1
- package/dist/ui/v5/guardrails/terminalRestore.js +0 -47
- package/dist/ui/v5/guardrails/terminalRestore.js.map +0 -1
- package/dist/ui/v5/index.d.ts +0 -30
- package/dist/ui/v5/index.d.ts.map +0 -1
- package/dist/ui/v5/index.js +0 -243
- package/dist/ui/v5/index.js.map +0 -1
- package/dist/ui/v5/kernel/kernel.d.ts +0 -81
- package/dist/ui/v5/kernel/kernel.d.ts.map +0 -1
- package/dist/ui/v5/kernel/kernel.js +0 -339
- package/dist/ui/v5/kernel/kernel.js.map +0 -1
- package/dist/ui/v5/kernel.d.ts +0 -75
- package/dist/ui/v5/kernel.d.ts.map +0 -1
- package/dist/ui/v5/kernel.js +0 -289
- package/dist/ui/v5/kernel.js.map +0 -1
- package/dist/ui/v5/layout/clampRect.d.ts +0 -28
- package/dist/ui/v5/layout/clampRect.d.ts.map +0 -1
- package/dist/ui/v5/layout/clampRect.js +0 -45
- package/dist/ui/v5/layout/clampRect.js.map +0 -1
- package/dist/ui/v5/layout/layoutEngine.d.ts +0 -16
- package/dist/ui/v5/layout/layoutEngine.d.ts.map +0 -1
- package/dist/ui/v5/layout/layoutEngine.js +0 -99
- package/dist/ui/v5/layout/layoutEngine.js.map +0 -1
- package/dist/ui/v5/renderGate.d.ts +0 -19
- package/dist/ui/v5/renderGate.d.ts.map +0 -1
- package/dist/ui/v5/renderGate.js +0 -36
- package/dist/ui/v5/renderGate.js.map +0 -1
- package/dist/ui/v5/resize/resizeController.d.ts +0 -62
- package/dist/ui/v5/resize/resizeController.d.ts.map +0 -1
- package/dist/ui/v5/resize/resizeController.js +0 -141
- package/dist/ui/v5/resize/resizeController.js.map +0 -1
- package/dist/ui/v5/resizeController.d.ts +0 -55
- package/dist/ui/v5/resizeController.d.ts.map +0 -1
- package/dist/ui/v5/resizeController.js +0 -124
- package/dist/ui/v5/resizeController.js.map +0 -1
- package/dist/ui/v5/runtime/keepAlive.d.ts +0 -37
- package/dist/ui/v5/runtime/keepAlive.d.ts.map +0 -1
- package/dist/ui/v5/runtime/keepAlive.js +0 -122
- package/dist/ui/v5/runtime/keepAlive.js.map +0 -1
- package/dist/ui/v5/runtime/restoreTerminal.d.ts +0 -34
- package/dist/ui/v5/runtime/restoreTerminal.d.ts.map +0 -1
- package/dist/ui/v5/runtime/restoreTerminal.js +0 -100
- package/dist/ui/v5/runtime/restoreTerminal.js.map +0 -1
- package/dist/ui/v5/runtime/stdoutGuard.d.ts +0 -42
- package/dist/ui/v5/runtime/stdoutGuard.d.ts.map +0 -1
- package/dist/ui/v5/runtime/stdoutGuard.js +0 -156
- package/dist/ui/v5/runtime/stdoutGuard.js.map +0 -1
- package/dist/ui/v5/viewport/getViewport.d.ts +0 -23
- package/dist/ui/v5/viewport/getViewport.d.ts.map +0 -1
- package/dist/ui/v5/viewport/getViewport.js +0 -117
- package/dist/ui/v5/viewport/getViewport.js.map +0 -1
- package/dist/ui/v5/viewport.d.ts +0 -41
- package/dist/ui/v5/viewport.d.ts.map +0 -1
- package/dist/ui/v5/viewport.js +0 -90
- package/dist/ui/v5/viewport.js.map +0 -1
- package/dist/ui/widgets/flagRow.d.ts +0 -25
- package/dist/ui/widgets/flagRow.d.ts.map +0 -1
- package/dist/ui/widgets/flagRow.js +0 -57
- package/dist/ui/widgets/flagRow.js.map +0 -1
- package/dist/ui/widgets/index.d.ts +0 -9
- package/dist/ui/widgets/index.d.ts.map +0 -1
- package/dist/ui/widgets/index.js +0 -9
- package/dist/ui/widgets/index.js.map +0 -1
- package/dist/ui/widgets/meter.d.ts +0 -18
- package/dist/ui/widgets/meter.d.ts.map +0 -1
- package/dist/ui/widgets/meter.js +0 -38
- package/dist/ui/widgets/meter.js.map +0 -1
- package/dist/ui/widgets/miniMap.d.ts +0 -26
- package/dist/ui/widgets/miniMap.d.ts.map +0 -1
- package/dist/ui/widgets/miniMap.js +0 -94
- package/dist/ui/widgets/miniMap.js.map +0 -1
- package/dist/ui/widgets/sparkline.d.ts +0 -17
- package/dist/ui/widgets/sparkline.d.ts.map +0 -1
- package/dist/ui/widgets/sparkline.js +0 -65
- package/dist/ui/widgets/sparkline.js.map +0 -1
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Structural Fix A: Logger Wrapper
|
|
3
|
-
*
|
|
4
|
-
* Hard enforcement: No console.log/process.stdout.write in TUI mode
|
|
5
|
-
* All output goes through eventBus as [SYS] / [ERR] depending on level
|
|
6
|
-
*
|
|
7
|
-
* Rules:
|
|
8
|
-
* - logger.info() → Operations feed (NOT stdout)
|
|
9
|
-
* - logger.error() → Operations feed AND stderr (optional)
|
|
10
|
-
* - logger.raw() is FORBIDDEN
|
|
11
|
-
* - stdout.write is monkeypatched to throw in TUI mode
|
|
12
|
-
*/
|
|
13
|
-
import { eventBus } from './eventBus.js';
|
|
14
|
-
let tuiMode = false;
|
|
15
|
-
let allowStdoutDuringBoot = true; // Allow stdout writes during boot (blessed needs this)
|
|
16
|
-
let originalStdoutWrite = null;
|
|
17
|
-
let originalConsoleLog = null;
|
|
18
|
-
let originalConsoleError = null;
|
|
19
|
-
let originalConsoleWarn = null;
|
|
20
|
-
let originalConsoleInfo = null;
|
|
21
|
-
let originalConsoleDebug = null;
|
|
22
|
-
// Guard rate limiting (prevent spam)
|
|
23
|
-
let lastWarnAt = 0;
|
|
24
|
-
const WARN_THROTTLE_MS = 2000; // 2 seconds
|
|
25
|
-
let lastWarnMessage = '';
|
|
26
|
-
/**
|
|
27
|
-
* Structural Fix A: Enable TUI mode (suppresses all stdout/console writes)
|
|
28
|
-
*
|
|
29
|
-
* Monkeypatches stdout.write and console methods to throw errors
|
|
30
|
-
* Only the renderer (blessed) is allowed to write to stdout
|
|
31
|
-
*/
|
|
32
|
-
export function enableTuiMode() {
|
|
33
|
-
if (tuiMode)
|
|
34
|
-
return; // Already enabled
|
|
35
|
-
tuiMode = true;
|
|
36
|
-
// Structural Fix A: Monkeypatch stdout.write to block (but allow during boot)
|
|
37
|
-
// This prevents ANY code from writing to stdout outside the renderer
|
|
38
|
-
// BUT: Allow writes during boot phase (blessed needs this for screen init)
|
|
39
|
-
originalStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
40
|
-
process.stdout.write = function (chunk, encoding, cb) {
|
|
41
|
-
// Allow stdout writes during boot phase (blessed screen creation needs this)
|
|
42
|
-
if (allowStdoutDuringBoot) {
|
|
43
|
-
return originalStdoutWrite(chunk, encoding, cb);
|
|
44
|
-
}
|
|
45
|
-
// Allow blessed to write (it's the renderer)
|
|
46
|
-
// Check if this is coming from blessed by checking stack trace
|
|
47
|
-
const stack = new Error().stack || '';
|
|
48
|
-
const isBlessed = stack.includes('blessed') ||
|
|
49
|
-
stack.includes('neo-blessed') ||
|
|
50
|
-
stack.includes('blessed-contrib') ||
|
|
51
|
-
stack.includes('node_modules/blessed') ||
|
|
52
|
-
stack.includes('node_modules/neo-blessed');
|
|
53
|
-
if (isBlessed) {
|
|
54
|
-
// This is from blessed - allow it
|
|
55
|
-
return originalStdoutWrite(chunk, encoding, cb);
|
|
56
|
-
}
|
|
57
|
-
// Allow ANSI escape codes for cursor control (legitimate terminal control)
|
|
58
|
-
// These are used by hideCursor() and cleanup functions
|
|
59
|
-
const chunkStr = String(chunk);
|
|
60
|
-
const isAnsiEscape = chunkStr.startsWith('\x1b[') || chunkStr.startsWith('\x1b?');
|
|
61
|
-
if (isAnsiEscape) {
|
|
62
|
-
// ANSI escape codes are legitimate terminal control - allow them
|
|
63
|
-
return originalStdoutWrite(chunk, encoding, cb);
|
|
64
|
-
}
|
|
65
|
-
// Part B3: Fix spam loop - guard writes to stderr, NOT stdout or eventBus
|
|
66
|
-
// Writing to eventBus could trigger stdout writes in render loops, causing infinite spam
|
|
67
|
-
const chunkPreview = chunkStr.substring(0, 100);
|
|
68
|
-
const now = Date.now();
|
|
69
|
-
const message = `[TUI] STDOUT WRITE OUTSIDE TUI blocked: ${chunkPreview}. Use logger.info() instead.`;
|
|
70
|
-
// Rate limiting: Only emit warning if:
|
|
71
|
-
// 1. At least 2 seconds since last warning, OR
|
|
72
|
-
// 2. Message is different from last warning (dedupe)
|
|
73
|
-
const shouldWarn = (now - lastWarnAt >= WARN_THROTTLE_MS) || (message !== lastWarnMessage);
|
|
74
|
-
if (shouldWarn) {
|
|
75
|
-
lastWarnAt = now;
|
|
76
|
-
lastWarnMessage = message;
|
|
77
|
-
// Part B3: Write to stderr ONLY (not stdout, not eventBus) to prevent spam loops
|
|
78
|
-
// stderr is safe because it's not owned by the renderer
|
|
79
|
-
// DO NOT emit to Operations feed - this causes spam in the UI
|
|
80
|
-
// If you need to debug stdout writes, check stderr output
|
|
81
|
-
if (originalConsoleError) {
|
|
82
|
-
originalConsoleError(message);
|
|
83
|
-
}
|
|
84
|
-
// DO NOT emit to eventBus - this causes Operations panel spam
|
|
85
|
-
// The warning is already visible in stderr for debugging
|
|
86
|
-
}
|
|
87
|
-
// Block the write (don't allow it)
|
|
88
|
-
// Return true to indicate "handled" (but we didn't actually write)
|
|
89
|
-
if (typeof cb === 'function') {
|
|
90
|
-
cb();
|
|
91
|
-
}
|
|
92
|
-
return true;
|
|
93
|
-
};
|
|
94
|
-
// Structural Fix A: Monkeypatch console methods to use logger
|
|
95
|
-
originalConsoleLog = console.log;
|
|
96
|
-
originalConsoleError = console.error;
|
|
97
|
-
originalConsoleWarn = console.warn;
|
|
98
|
-
originalConsoleInfo = console.info;
|
|
99
|
-
originalConsoleDebug = console.debug;
|
|
100
|
-
console.log = (...args) => {
|
|
101
|
-
const msg = args.map(a => String(a)).join(' ');
|
|
102
|
-
eventBus.emit({ tag: "SYS", msg, level: 'INFO' });
|
|
103
|
-
};
|
|
104
|
-
console.error = (...args) => {
|
|
105
|
-
const msg = args.map(a => String(a)).join(' ');
|
|
106
|
-
eventBus.emit({ tag: "ERR", msg, level: 'ERROR' });
|
|
107
|
-
// Also write to stderr (not stdout) for critical errors
|
|
108
|
-
if (originalConsoleError) {
|
|
109
|
-
originalConsoleError(...args);
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
console.warn = (...args) => {
|
|
113
|
-
const msg = args.map(a => String(a)).join(' ');
|
|
114
|
-
eventBus.emit({ tag: "SYS", msg, level: 'WARN' });
|
|
115
|
-
};
|
|
116
|
-
console.info = (...args) => {
|
|
117
|
-
const msg = args.map(a => String(a)).join(' ');
|
|
118
|
-
eventBus.emit({ tag: "SYS", msg, level: 'INFO' });
|
|
119
|
-
};
|
|
120
|
-
console.debug = (...args) => {
|
|
121
|
-
const msg = args.map(a => String(a)).join(' ');
|
|
122
|
-
eventBus.emit({ tag: "SYS", msg, level: 'INFO' });
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Disable boot phase (enable strict stdout blocking)
|
|
127
|
-
* Call this after blessed screen is created and first render completes
|
|
128
|
-
*/
|
|
129
|
-
export function disableBootPhase() {
|
|
130
|
-
allowStdoutDuringBoot = false;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Disable TUI mode (restores console/stdout)
|
|
134
|
-
*/
|
|
135
|
-
export function disableTuiMode() {
|
|
136
|
-
if (!tuiMode)
|
|
137
|
-
return; // Already disabled
|
|
138
|
-
tuiMode = false;
|
|
139
|
-
allowStdoutDuringBoot = true; // Reset boot flag
|
|
140
|
-
// Restore original functions
|
|
141
|
-
if (originalStdoutWrite) {
|
|
142
|
-
process.stdout.write = originalStdoutWrite;
|
|
143
|
-
originalStdoutWrite = null;
|
|
144
|
-
}
|
|
145
|
-
if (originalConsoleLog) {
|
|
146
|
-
console.log = originalConsoleLog;
|
|
147
|
-
originalConsoleLog = null;
|
|
148
|
-
}
|
|
149
|
-
if (originalConsoleError) {
|
|
150
|
-
console.error = originalConsoleError;
|
|
151
|
-
originalConsoleError = null;
|
|
152
|
-
}
|
|
153
|
-
if (originalConsoleWarn) {
|
|
154
|
-
console.warn = originalConsoleWarn;
|
|
155
|
-
originalConsoleWarn = null;
|
|
156
|
-
}
|
|
157
|
-
if (originalConsoleInfo) {
|
|
158
|
-
console.info = originalConsoleInfo;
|
|
159
|
-
originalConsoleInfo = null;
|
|
160
|
-
}
|
|
161
|
-
if (originalConsoleDebug) {
|
|
162
|
-
console.debug = originalConsoleDebug;
|
|
163
|
-
originalConsoleDebug = null;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Structural Fix A: Logger interface
|
|
168
|
-
*
|
|
169
|
-
* All logging goes through Operations feed, NOT stdout
|
|
170
|
-
*/
|
|
171
|
-
export const logger = {
|
|
172
|
-
debug: (msg) => {
|
|
173
|
-
eventBus.emit({ tag: "SYS", msg, level: 'INFO' });
|
|
174
|
-
},
|
|
175
|
-
info: (msg) => {
|
|
176
|
-
eventBus.emit({ tag: "SYS", msg, level: 'INFO' });
|
|
177
|
-
},
|
|
178
|
-
warn: (msg) => {
|
|
179
|
-
eventBus.emit({ tag: "SYS", msg, level: 'WARN' });
|
|
180
|
-
},
|
|
181
|
-
error: (msg) => {
|
|
182
|
-
eventBus.emit({ tag: "ERR", msg, level: 'ERROR' });
|
|
183
|
-
// Also write to stderr for critical errors (not stdout)
|
|
184
|
-
if (!tuiMode && originalConsoleError) {
|
|
185
|
-
originalConsoleError(msg);
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
// Structural Fix A: raw() is FORBIDDEN - do not use
|
|
189
|
-
// raw: () => { throw new Error('logger.raw() is forbidden - use logger.info() instead'); }
|
|
190
|
-
};
|
|
191
|
-
//# sourceMappingURL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Q,EAAE;QAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,EAAE,CAAC,GAAW,EAAQ,EAAE;QAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;QACnD,wDAAwD;QACxD,IAAI,CAAC,OAAO,IAAI,oBAAoB,EAAE,CAAC;YACrC,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,oDAAoD;IACpD,2FAA2F;CAC5F,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 2: Operations Feed Event Types
|
|
3
|
-
*
|
|
4
|
-
* Minimal event interface for the Operations Feed output bus.
|
|
5
|
-
*/
|
|
6
|
-
export type OpTag = "SYS" | "CMD" | "RUN" | "NET" | "SEC" | "DB" | "GW" | "ERR" | "OK" | "WARN" | "DBG" | "INFO";
|
|
7
|
-
export type OpLevel = 'INFO' | 'WARN' | 'ERROR';
|
|
8
|
-
export interface OpEvent {
|
|
9
|
-
id: string;
|
|
10
|
-
ts: number;
|
|
11
|
-
tag: OpTag;
|
|
12
|
-
level: OpLevel;
|
|
13
|
-
msg: string;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=opEvent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opEvent.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/core/opEvent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AACjH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,KAAK,CAAC;IACX,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opEvent.js","sourceRoot":"","sources":["../../../../src/ui/v3/core/opEvent.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
package/dist/ui/v3/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/v3/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/ui/v3/index.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* 4Runr Terminal UI V3 - Main Entry
|
|
4
|
-
*
|
|
5
|
-
* Phase 1: Layout Skeleton + Dedicated Command Line
|
|
6
|
-
*/
|
|
7
|
-
// Export for use as a library
|
|
8
|
-
export { startPhase1Runtime } from './ui/phase1RuntimeClean.js';
|
|
9
|
-
// If run directly (not imported), start the TUI
|
|
10
|
-
const isMainModule = import.meta.url === `file://${process.argv[1]?.replace(/\\/g, '/')}` ||
|
|
11
|
-
process.argv[1]?.endsWith('index.js') ||
|
|
12
|
-
process.argv[1]?.endsWith('index.ts');
|
|
13
|
-
if (isMainModule) {
|
|
14
|
-
// Check for V5 flag first (new development)
|
|
15
|
-
if (process.env.TUI_V5 === '1') {
|
|
16
|
-
// V5 mode - Display Kernel (Phase 1)
|
|
17
|
-
const { startV5Shell } = await import('../v5/index.js');
|
|
18
|
-
startV5Shell().catch((error) => {
|
|
19
|
-
console.error('FATAL: V5 shell failed to start:', error);
|
|
20
|
-
process.exit(1);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
else if (process.env.TUI_V4 === '1') {
|
|
24
|
-
// ⚠️ V4 FROZEN: Display issues - development moved to V5
|
|
25
|
-
// V4 is preserved for reference only. Use at your own risk.
|
|
26
|
-
// See packages/os-cli/src/ui/v4/FROZEN.md
|
|
27
|
-
const { startV4Shell } = await import('../v4/index.js');
|
|
28
|
-
startV4Shell().catch((error) => {
|
|
29
|
-
console.error('FATAL: V4 shell failed to start:', error);
|
|
30
|
-
process.exit(1);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
// Check for NO_TUI mode
|
|
35
|
-
const noTUI = process.env.NO_TUI === '1' || process.argv.includes('--mode=print');
|
|
36
|
-
if (noTUI) {
|
|
37
|
-
// NO_TUI fallback mode (for CI/SSH)
|
|
38
|
-
console.log('4Runr OS UI v3 (print mode)');
|
|
39
|
-
process.exit(0);
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
// TUI mode (Phase 1) - V3
|
|
43
|
-
const { startPhase1Runtime } = await import('./ui/phase1RuntimeClean.js');
|
|
44
|
-
startPhase1Runtime().catch((error) => {
|
|
45
|
-
console.error('FATAL: TUI failed to start:', error);
|
|
46
|
-
process.exit(1);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=index.js.map
|
package/dist/ui/v3/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/v3/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,8BAA8B;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,gDAAgD;AAChD,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAA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,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;YAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;aAAM,CAAC;YACN,0BAA0B;YAC1B,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC;YAC1E,kBAAkB,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gBACnC,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;gBACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Module Configuration Probe
|
|
3
|
-
*
|
|
4
|
-
* Checks module availability at boot time.
|
|
5
|
-
* Used to set initial UiState before first render to prevent flicker.
|
|
6
|
-
*/
|
|
7
|
-
export interface ModuleConfig {
|
|
8
|
-
enabled: boolean;
|
|
9
|
-
reason: string;
|
|
10
|
-
nextAction?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Check if posture module is enabled
|
|
14
|
-
*
|
|
15
|
-
* Checks:
|
|
16
|
-
* - POSTURE_ENABLED env or build flag
|
|
17
|
-
* - If posture requires URL: POSTURE_URL exists
|
|
18
|
-
* - If module not built: hard false
|
|
19
|
-
*/
|
|
20
|
-
export declare function isPostureEnabled(): ModuleConfig;
|
|
21
|
-
//# sourceMappingURL=moduleConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"moduleConfig.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/runtime/moduleConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,IAAI,YAAY,CA4B/C"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Module Configuration Probe
|
|
3
|
-
*
|
|
4
|
-
* Checks module availability at boot time.
|
|
5
|
-
* Used to set initial UiState before first render to prevent flicker.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Check if posture module is enabled
|
|
9
|
-
*
|
|
10
|
-
* Checks:
|
|
11
|
-
* - POSTURE_ENABLED env or build flag
|
|
12
|
-
* - If posture requires URL: POSTURE_URL exists
|
|
13
|
-
* - If module not built: hard false
|
|
14
|
-
*/
|
|
15
|
-
export function isPostureEnabled() {
|
|
16
|
-
// Check build-time flag (if posture module is compiled in)
|
|
17
|
-
// For now, assume posture is not built unless explicitly enabled
|
|
18
|
-
const buildEnabled = process.env.POSTURE_ENABLED === '1' || process.env.POSTURE_ENABLED === 'true';
|
|
19
|
-
if (!buildEnabled) {
|
|
20
|
-
return {
|
|
21
|
-
enabled: false,
|
|
22
|
-
reason: 'Posture module not enabled in this build',
|
|
23
|
-
nextAction: 'Set POSTURE_ENABLED=1 or enable posture service'
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
// If posture requires a URL, check if it's configured
|
|
27
|
-
const postureUrl = process.env.POSTURE_URL;
|
|
28
|
-
if (!postureUrl || !postureUrl.trim()) {
|
|
29
|
-
return {
|
|
30
|
-
enabled: false,
|
|
31
|
-
reason: 'POSTURE_URL not configured',
|
|
32
|
-
nextAction: 'Set POSTURE_URL environment variable'
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
// Posture is enabled and configured
|
|
36
|
-
return {
|
|
37
|
-
enabled: true,
|
|
38
|
-
reason: 'Posture module enabled'
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=moduleConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"moduleConfig.js","sourceRoot":"","sources":["../../../../src/ui/v3/runtime/moduleConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB;IAC9B,2DAA2D;IAC3D,iEAAiE;IACjE,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,MAAM,CAAC;IAEnG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,0CAA0C;YAClD,UAAU,EAAE,iDAAiD;SAC9D,CAAC;IACJ,CAAC;IAED,sDAAsD;IACtD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IAC3C,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC;QACtC,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,4BAA4B;YACpC,UAAU,EAAE,sCAAsC;SACnD,CAAC;IACJ,CAAC;IAED,oCAAoC;IACpC,OAAO;QACL,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,wBAAwB;KACjC,CAAC;AACJ,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Section 0 - Stable App Shell
|
|
4
|
-
*
|
|
5
|
-
* Objective: Build a minimal TUI app shell that:
|
|
6
|
-
* - starts reliably
|
|
7
|
-
* - exits cleanly
|
|
8
|
-
* - restores the terminal every time
|
|
9
|
-
* - does not register duplicate handlers or multiple render loops
|
|
10
|
-
*
|
|
11
|
-
* No UI panels, no commands, no collectors yet. Just a stable shell.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Start Section 0 TUI shell
|
|
15
|
-
*
|
|
16
|
-
* Rules:
|
|
17
|
-
* - One render loop only (or none for Section 0 - just render once)
|
|
18
|
-
* - No console.log() while TUI is active
|
|
19
|
-
* - Exit must always restore terminal state
|
|
20
|
-
*/
|
|
21
|
-
export declare function startSection0(): Promise<void>;
|
|
22
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/section0/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;GAUG;AAaH;;;;;;;GAOG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAwDnD"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Section 0 - Stable App Shell
|
|
4
|
-
*
|
|
5
|
-
* Objective: Build a minimal TUI app shell that:
|
|
6
|
-
* - starts reliably
|
|
7
|
-
* - exits cleanly
|
|
8
|
-
* - restores the terminal every time
|
|
9
|
-
* - does not register duplicate handlers or multiple render loops
|
|
10
|
-
*
|
|
11
|
-
* No UI panels, no commands, no collectors yet. Just a stable shell.
|
|
12
|
-
*/
|
|
13
|
-
import { createScreen } from './runtime/createScreen.js';
|
|
14
|
-
import { initializeLifecycle } from './runtime/lifecycle.js';
|
|
15
|
-
import blessed from 'neo-blessed';
|
|
16
|
-
const blessedLib = blessed;
|
|
17
|
-
// Suppress console.log during TUI (write debug logs to file if needed)
|
|
18
|
-
const originalConsoleLog = console.log;
|
|
19
|
-
const originalConsoleError = console.error;
|
|
20
|
-
/**
|
|
21
|
-
* Start Section 0 TUI shell
|
|
22
|
-
*
|
|
23
|
-
* Rules:
|
|
24
|
-
* - One render loop only (or none for Section 0 - just render once)
|
|
25
|
-
* - No console.log() while TUI is active
|
|
26
|
-
* - Exit must always restore terminal state
|
|
27
|
-
*/
|
|
28
|
-
export async function startSection0() {
|
|
29
|
-
// Suppress console.log during TUI
|
|
30
|
-
console.log = () => { };
|
|
31
|
-
// Keep console.error for fatal errors (but restore before using)
|
|
32
|
-
let consoleErrorRestored = false;
|
|
33
|
-
const restoreConsoleError = () => {
|
|
34
|
-
if (!consoleErrorRestored) {
|
|
35
|
-
console.error = originalConsoleError;
|
|
36
|
-
consoleErrorRestored = true;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
try {
|
|
40
|
-
// Create screen (singleton, guarded)
|
|
41
|
-
const screen = createScreen();
|
|
42
|
-
// Initialize lifecycle (exit handlers, guarded against duplicates)
|
|
43
|
-
initializeLifecycle(screen);
|
|
44
|
-
// Create a single centered text node
|
|
45
|
-
const message = '4Runr OS V3 — Shell OK (press q to exit)';
|
|
46
|
-
const textNode = blessedLib.box({
|
|
47
|
-
top: Math.floor((screen.height - 1) / 2),
|
|
48
|
-
left: Math.floor((screen.width - message.length) / 2),
|
|
49
|
-
width: message.length,
|
|
50
|
-
height: 1,
|
|
51
|
-
content: message,
|
|
52
|
-
tags: true,
|
|
53
|
-
style: {
|
|
54
|
-
fg: 'cyan',
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
screen.append(textNode);
|
|
58
|
-
// Single render (no loop for Section 0)
|
|
59
|
-
screen.render();
|
|
60
|
-
// Restore console.log after successful start (for future use if needed)
|
|
61
|
-
// But keep it suppressed during TUI operation
|
|
62
|
-
// console.log = originalConsoleLog; // Commented: keep suppressed during TUI
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
// Restore console.error for error output
|
|
66
|
-
restoreConsoleError();
|
|
67
|
-
console.error('FATAL: Section 0 TUI failed to start:', error);
|
|
68
|
-
// Ensure terminal is restored even on error
|
|
69
|
-
if (process.stdout.isTTY) {
|
|
70
|
-
process.stdout.write('\x1b[?25h'); // Show cursor
|
|
71
|
-
process.stdout.write('\x1b[?1049l'); // Exit alternate screen
|
|
72
|
-
}
|
|
73
|
-
process.exit(1);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
// If run directly (not imported), start the TUI
|
|
77
|
-
// Simple check: if this file is executed directly, start the TUI
|
|
78
|
-
const scriptPath = process.argv[1]?.replace(/\\/g, '/') || '';
|
|
79
|
-
const isMainModule = scriptPath.includes('section0/index.js') ||
|
|
80
|
-
scriptPath.includes('section0/index.ts') ||
|
|
81
|
-
import.meta.url.includes('section0/index');
|
|
82
|
-
if (isMainModule) {
|
|
83
|
-
startSection0().catch((error) => {
|
|
84
|
-
console.error('FATAL: Section 0 failed:', error);
|
|
85
|
-
process.exit(1);
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/v3/section0/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,OAAO,MAAM,aAAa,CAAC;AAGlC,MAAM,UAAU,GAAG,OAAc,CAAC;AAElC,uEAAuE;AACvE,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC;AACvC,MAAM,oBAAoB,GAAG,OAAO,CAAC,KAAK,CAAC;AAE3C;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,kCAAkC;IAClC,OAAO,CAAC,GAAG,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IAEvB,iEAAiE;IACjE,IAAI,oBAAoB,GAAG,KAAK,CAAC;IACjC,MAAM,mBAAmB,GAAG,GAAG,EAAE;QAC/B,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC1B,OAAO,CAAC,KAAK,GAAG,oBAAoB,CAAC;YACrC,oBAAoB,GAAG,IAAI,CAAC;QAC9B,CAAC;IACH,CAAC,CAAC;IAEF,IAAI,CAAC;QACH,qCAAqC;QACrC,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;QAE9B,mEAAmE;QACnE,mBAAmB,CA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AAC,IAAI,EAAE,CAAC;AAC9D,MAAM,YAAY,GAAG,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IACxC,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IACxC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAEhE,IAAI,YAAY,EAAE,CAAC;IACjB,aAAa,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QAC9B,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 0 - Create Screen
|
|
3
|
-
*
|
|
4
|
-
* Responsibilities:
|
|
5
|
-
* - Initialize neo-blessed screen cleanly
|
|
6
|
-
* - Ensure only one screen instance exists
|
|
7
|
-
* - Configure screen with proper settings
|
|
8
|
-
*/
|
|
9
|
-
import type { Widgets } from 'neo-blessed';
|
|
10
|
-
/**
|
|
11
|
-
* Create or get the singleton screen instance
|
|
12
|
-
*
|
|
13
|
-
* Rules:
|
|
14
|
-
* - Must only create one screen instance
|
|
15
|
-
* - If screen already exists, return it (do not create another)
|
|
16
|
-
* - Configure with smartCSR, fullUnicode, dockBorders, warnings: false
|
|
17
|
-
*/
|
|
18
|
-
export declare function createScreen(): Widgets.Screen;
|
|
19
|
-
/**
|
|
20
|
-
* Get the current screen instance (may be null)
|
|
21
|
-
*/
|
|
22
|
-
export declare function getScreen(): Widgets.Screen | null;
|
|
23
|
-
/**
|
|
24
|
-
* Clear the screen instance reference (for testing/cleanup)
|
|
25
|
-
*/
|
|
26
|
-
export declare function clearScreen(): void;
|
|
27
|
-
//# sourceMappingURL=createScreen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/v3/section0/runtime/createScreen.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAM3C;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAAC,MAAM,CAyB7C;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAEjD;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAElC"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 0 - Create Screen
|
|
3
|
-
*
|
|
4
|
-
* Responsibilities:
|
|
5
|
-
* - Initialize neo-blessed screen cleanly
|
|
6
|
-
* - Ensure only one screen instance exists
|
|
7
|
-
* - Configure screen with proper settings
|
|
8
|
-
*/
|
|
9
|
-
import blessed from 'neo-blessed';
|
|
10
|
-
const blessedLib = blessed;
|
|
11
|
-
let screenInstance = null;
|
|
12
|
-
/**
|
|
13
|
-
* Create or get the singleton screen instance
|
|
14
|
-
*
|
|
15
|
-
* Rules:
|
|
16
|
-
* - Must only create one screen instance
|
|
17
|
-
* - If screen already exists, return it (do not create another)
|
|
18
|
-
* - Configure with smartCSR, fullUnicode, dockBorders, warnings: false
|
|
19
|
-
*/
|
|
20
|
-
export function createScreen() {
|
|
21
|
-
if (screenInstance) {
|
|
22
|
-
return screenInstance;
|
|
23
|
-
}
|
|
24
|
-
screenInstance = blessedLib.screen({
|
|
25
|
-
smartCSR: true,
|
|
26
|
-
fullUnicode: true,
|
|
27
|
-
dockBorders: true,
|
|
28
|
-
warnings: false,
|
|
29
|
-
title: '4Runr OS (Terminal UI V3)',
|
|
30
|
-
});
|
|
31
|
-
if (!screenInstance) {
|
|
32
|
-
throw new Error('Failed to create blessed screen');
|
|
33
|
-
}
|
|
34
|
-
// Hide cursor on start (will be restored on exit)
|
|
35
|
-
if (screenInstance.program && screenInstance.program.hideCursor) {
|
|
36
|
-
screenInstance.program.hideCursor();
|
|
37
|
-
}
|
|
38
|
-
else if (process.stdout.isTTY) {
|
|
39
|
-
process.stdout.write('\x1b[?25l'); // ANSI hide cursor
|
|
40
|
-
}
|
|
41
|
-
return screenInstance;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Get the current screen instance (may be null)
|
|
45
|
-
*/
|
|
46
|
-
export function getScreen() {
|
|
47
|
-
return screenInstance;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Clear the screen instance reference (for testing/cleanup)
|
|
51
|
-
*/
|
|
52
|
-
export function clearScreen() {
|
|
53
|
-
screenInstance = null;
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=createScreen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createScreen.js","sourceRoot":"","sources":["../../../../../src/ui/v3/section0/runtime/createScreen.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,OAAO,MAAM,aAAa,CAAC;AAGlC,MAAM,UAAU,GAAG,OAAc,CAAC;AAElC,IAAI,cAAc,GAA0B,IAAI,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY;IAC1B,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;QACjC,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,IAAI;QACjB,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,2BAA2B;KACnC,CAAmB,CAAC;IAErB,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IAED,kDAAkD;IAClD,IAAK,cAAsB,CAAC,OAAO,IAAK,cAAsB,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACjF,cAAsB,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;IAC/C,CAAC;SAAM,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAChC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,mBAAmB;IACxD,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,cAAc,GAAG,IAAI,CAAC;AACxB,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 0 - Lifecycle Management
|
|
3
|
-
*
|
|
4
|
-
* Responsibilities:
|
|
5
|
-
* - Attach exit handlers (single registration, guarded)
|
|
6
|
-
* - Implement safe shutdown that always restores terminal
|
|
7
|
-
* - Track handler attachment to prevent duplicates
|
|
8
|
-
*/
|
|
9
|
-
import type { Widgets } from 'neo-blessed';
|
|
10
|
-
/**
|
|
11
|
-
* Attach exit handlers to screen
|
|
12
|
-
*
|
|
13
|
-
* Rules:
|
|
14
|
-
* - Must attach handlers exactly once (protected by exitHandlersAttached guard)
|
|
15
|
-
* - If called again, must no-op
|
|
16
|
-
* - Registers: q → exit, C-c → exit, escape → exit (optional)
|
|
17
|
-
*/
|
|
18
|
-
export declare function attachExitHandlers(screen: Widgets.Screen): void;
|
|
19
|
-
/**
|
|
20
|
-
* Attach process-level exit handlers
|
|
21
|
-
*
|
|
22
|
-
* Rules:
|
|
23
|
-
* - Must attach handlers exactly once (protected by exitHandlersAttached guard)
|
|
24
|
-
* - If called again, must no-op
|
|
25
|
-
* - Registers: SIGINT, SIGTERM
|
|
26
|
-
* - Tracks listeners for cleanup
|
|
27
|
-
*/
|
|
28
|
-
export declare function attachProcessExitHandlers(): void;
|
|
29
|
-
/**
|
|
30
|
-
* Initialize all exit handlers (screen + process)
|
|
31
|
-
*
|
|
32
|
-
* This is the main entry point for lifecycle setup.
|
|
33
|
-
*/
|
|
34
|
-
export declare function initializeLifecycle(screen: Widgets.Screen): void;
|
|
35
|
-
/**
|
|
36
|
-
* Get internal debug counters (for checkpoint verification)
|
|
37
|
-
*
|
|
38
|
-
* These counters verify:
|
|
39
|
-
* - Exit handlers attach exactly once
|
|
40
|
-
* - Shutdown runs exactly once
|
|
41
|
-
*
|
|
42
|
-
* Example expectation: Pressing q triggers exactly one shutdown path.
|
|
43
|
-
*/
|
|
44
|
-
export declare function getDebugCounters(): {
|
|
45
|
-
shutdownCallCount: number;
|
|
46
|
-
screenHandlerAttachmentCount: number;
|
|
47
|
-
processHandlerAttachmentCount: number;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Reset lifecycle state (for testing only)
|
|
51
|
-
*/
|
|
52
|
-
export declare function resetLifecycle(): void;
|
|
53
|
-
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../../src/ui/v3/section0/runtime/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAmF3C;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,IAAI,CAsB/D;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAuBhD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,IAAI,CAGhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI;IAClC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,4BAA4B,EAAE,MAAM,CAAC;IACrC,6BAA6B,EAAE,MAAM,CAAC;CACvC,CAMA;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAQrC"}
|