4runr-os 2.1.4 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +86 -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 +93 -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,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Command Router (Phase 3)
|
|
3
|
-
*
|
|
4
|
-
* Routes commands to handlers.
|
|
5
|
-
* All output goes through EventBus (not direct feed manipulation).
|
|
6
|
-
*/
|
|
7
|
-
import { eventBus } from '../core/eventBus.js';
|
|
8
|
-
import { feedStore } from '../core/feedStore.js';
|
|
9
|
-
import { exitResult, noOpResult } from './commandResult.js';
|
|
10
|
-
import { getLastState } from '../state/uiStateBuilder.js';
|
|
11
|
-
import { isAvailable } from '../state/value.js';
|
|
12
|
-
/**
|
|
13
|
-
* Route a command
|
|
14
|
-
* Commands emit events through EventBus, not directly to feed
|
|
15
|
-
*/
|
|
16
|
-
export function routeCommand(cmd, args) {
|
|
17
|
-
const command = cmd.toLowerCase().trim();
|
|
18
|
-
switch (command) {
|
|
19
|
-
case 'help':
|
|
20
|
-
return handleHelp();
|
|
21
|
-
case 'clear':
|
|
22
|
-
return handleClear();
|
|
23
|
-
case 'exit':
|
|
24
|
-
case 'quit':
|
|
25
|
-
return handleExit();
|
|
26
|
-
case 'home':
|
|
27
|
-
return handleHome();
|
|
28
|
-
case 'status':
|
|
29
|
-
return handleStatus();
|
|
30
|
-
case 'testfeed':
|
|
31
|
-
return handleTestFeed(args);
|
|
32
|
-
default:
|
|
33
|
-
return handleUnknown(cmd);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Handle help command
|
|
38
|
-
* Emits event through EventBus
|
|
39
|
-
*/
|
|
40
|
-
function handleHelp() {
|
|
41
|
-
eventBus.emitTag('SYS', 'COMMANDS: help, clear, exit, home, status, testfeed', 'INFO');
|
|
42
|
-
return noOpResult();
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Handle clear command
|
|
46
|
-
* Clears feed store, then emits event
|
|
47
|
-
*/
|
|
48
|
-
function handleClear() {
|
|
49
|
-
feedStore.clear();
|
|
50
|
-
eventBus.emitTag('SYS', 'FEED CLEARED');
|
|
51
|
-
return noOpResult();
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Handle exit command
|
|
55
|
-
*/
|
|
56
|
-
function handleExit() {
|
|
57
|
-
return exitResult();
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Handle home command
|
|
61
|
-
* S0.3: Returns to HUB state
|
|
62
|
-
*/
|
|
63
|
-
function handleHome() {
|
|
64
|
-
// S0.3: State machine - always return to HUB
|
|
65
|
-
eventBus.emitTag('SYS', 'HOME (HUB state)');
|
|
66
|
-
return noOpResult();
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Handle status command
|
|
70
|
-
* Dumps current UiState summary to OPERATIONS
|
|
71
|
-
*/
|
|
72
|
-
function handleStatus() {
|
|
73
|
-
const state = getLastState();
|
|
74
|
-
// Emit status summary
|
|
75
|
-
eventBus.emitTag('SYS', '=== UI STATE SUMMARY ===');
|
|
76
|
-
// Resources status
|
|
77
|
-
if (isAvailable(state.resources)) {
|
|
78
|
-
const r = state.resources.value;
|
|
79
|
-
eventBus.emitTag('SYS', `RESOURCES: CPU ${r.cpuPct.toFixed(1)}% | RAM ${r.ramUsedMB}/${r.ramTotalMB}MB | Disk ${r.diskUsedGB}/${r.diskTotalGB}GB`);
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
eventBus.emitTag('SYS', `RESOURCES: ${state.resources.availability} - ${state.resources.reason || 'Unknown'}`);
|
|
83
|
-
}
|
|
84
|
-
eventBus.emitTag('SYS', '=== END STATE SUMMARY ===');
|
|
85
|
-
return noOpResult();
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Handle testfeed command
|
|
89
|
-
* Spams long lines to test truncation
|
|
90
|
-
*/
|
|
91
|
-
function handleTestFeed(args) {
|
|
92
|
-
const mode = args[0]?.toLowerCase() || 'short';
|
|
93
|
-
if (mode === 'short') {
|
|
94
|
-
eventBus.emitTag('SYS', 'Short line test');
|
|
95
|
-
eventBus.emitTag('CMD', 'This is a short message');
|
|
96
|
-
eventBus.emitTag('RUN', 'Testing short lines');
|
|
97
|
-
}
|
|
98
|
-
else if (mode === 'long') {
|
|
99
|
-
// Generate very long lines
|
|
100
|
-
const longMsg1 = 'A'.repeat(200) + ' - This is a very long message that should be truncated with ...';
|
|
101
|
-
const longMsg2 = 'B'.repeat(150) + ' - Another long message for testing truncation behavior';
|
|
102
|
-
const longMsg3 = 'C'.repeat(300) + ' - Extremely long message to test border overflow prevention';
|
|
103
|
-
eventBus.emitTag('SYS', longMsg1);
|
|
104
|
-
eventBus.emitTag('CMD', longMsg2);
|
|
105
|
-
eventBus.emitTag('ERR', longMsg3);
|
|
106
|
-
}
|
|
107
|
-
else if (mode === 'mixed') {
|
|
108
|
-
// Mix of short and long
|
|
109
|
-
eventBus.emitTag('SYS', 'Short message');
|
|
110
|
-
eventBus.emitTag('CMD', 'X'.repeat(100) + ' - Long message mixed with short');
|
|
111
|
-
eventBus.emitTag('RUN', 'Another short');
|
|
112
|
-
eventBus.emitTag('NET', 'Y'.repeat(250) + ' - Very long network message');
|
|
113
|
-
eventBus.emitTag('SYS', 'Final short message');
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
eventBus.emitTag('ERR', `Unknown testfeed mode: ${mode} (use: short, long, or mixed)`);
|
|
117
|
-
}
|
|
118
|
-
return noOpResult();
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Sanitize user input for display in error messages
|
|
122
|
-
* Prevents raw echo of full user input (security/UX hardening)
|
|
123
|
-
*
|
|
124
|
-
* Rules:
|
|
125
|
-
* - Truncate to reasonable length (50 chars)
|
|
126
|
-
* - Strip control characters and newlines
|
|
127
|
-
* - Replace problematic characters
|
|
128
|
-
*/
|
|
129
|
-
function sanitizeUserInput(input, maxLength = 50) {
|
|
130
|
-
// Remove control characters and newlines
|
|
131
|
-
let sanitized = input.replace(/[\x00-\x1F\x7F-\x9F\n\r\t]/g, '');
|
|
132
|
-
// Truncate to max length
|
|
133
|
-
if (sanitized.length > maxLength) {
|
|
134
|
-
sanitized = sanitized.substring(0, maxLength) + '...';
|
|
135
|
-
}
|
|
136
|
-
return sanitized;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Handle unknown command
|
|
140
|
-
* Emits error event through EventBus
|
|
141
|
-
*
|
|
142
|
-
* HARDENED: No raw echo of full user input in errors
|
|
143
|
-
*/
|
|
144
|
-
function handleUnknown(cmd) {
|
|
145
|
-
// HARDENED: Sanitize user input - don't echo full command
|
|
146
|
-
const sanitizedCmd = sanitizeUserInput(cmd, 50);
|
|
147
|
-
eventBus.emitTag('ERR', `UNKNOWN COMMAND: ${sanitizedCmd} (try: help)`);
|
|
148
|
-
return noOpResult();
|
|
149
|
-
}
|
|
150
|
-
//# sourceMappingURL=router.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../../../src/ui/v3/commands/router.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,YAAY,E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C;QACjC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC;IACxD,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,SAAS,aAAa,CAAC,GAAW;IAChC,0DAA0D;IAC1D,MAAM,YAAY,GAAG,iBAAiB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAChD,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,oBAAoB,YAAY,cAAc,CAAC,CAAC;IACxE,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 6.2: Canonical Gateway Endpoint (FINAL, NON-NEGOTIABLE)
|
|
3
|
-
*
|
|
4
|
-
* Single source of truth for the platform Gateway endpoint.
|
|
5
|
-
* This is the only place the endpoint URL should be defined.
|
|
6
|
-
*
|
|
7
|
-
* Smart resolution based on runtime:
|
|
8
|
-
* - GATEWAY_URL env var (highest priority)
|
|
9
|
-
* - ~/.4runr/config.json (if exists)
|
|
10
|
-
* - Smart default based on runtime:
|
|
11
|
-
* - Linux + EC2-like hostname → http://127.0.0.1:3001
|
|
12
|
-
* - Otherwise → require config or show nextAction
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* The canonical Gateway URL (fallback only - use resolveGatewayUrl() instead)
|
|
16
|
-
*/
|
|
17
|
-
export declare const DEFAULT_GATEWAY_URL: string;
|
|
18
|
-
/**
|
|
19
|
-
* Resolve the Gateway URL with source tracking
|
|
20
|
-
*
|
|
21
|
-
* Priority:
|
|
22
|
-
* 1. GATEWAY_URL environment variable (if set - allows override for development)
|
|
23
|
-
* 2. ~/.4runr/config.json (if exists - written at install/provisioning time)
|
|
24
|
-
* 3. Smart default based on runtime:
|
|
25
|
-
* - Linux + EC2-like hostname → http://127.0.0.1:3001
|
|
26
|
-
* - Windows/Mac → http://127.0.0.1:3001 (expects SSH tunnel)
|
|
27
|
-
* - Otherwise → http://13.222.1.157:3001 (public IP fallback)
|
|
28
|
-
*
|
|
29
|
-
* Returns both the URL and the source for logging/debugging
|
|
30
|
-
*/
|
|
31
|
-
export declare function resolveGatewayUrlWithSource(): {
|
|
32
|
-
url: string;
|
|
33
|
-
source: string;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Resolve the Gateway URL (backward compatibility)
|
|
37
|
-
*/
|
|
38
|
-
export declare function resolveGatewayUrl(): string;
|
|
39
|
-
export declare function getCanonicalGatewayEndpoint(): string;
|
|
40
|
-
//# sourceMappingURL=gateway.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/config/gateway.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAoEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAoB,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,IAAI;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAc7E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAGD,wBAAgB,2BAA2B,IAAI,MAAM,CAEpD"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 6.2: Canonical Gateway Endpoint (FINAL, NON-NEGOTIABLE)
|
|
3
|
-
*
|
|
4
|
-
* Single source of truth for the platform Gateway endpoint.
|
|
5
|
-
* This is the only place the endpoint URL should be defined.
|
|
6
|
-
*
|
|
7
|
-
* Smart resolution based on runtime:
|
|
8
|
-
* - GATEWAY_URL env var (highest priority)
|
|
9
|
-
* - ~/.4runr/config.json (if exists)
|
|
10
|
-
* - Smart default based on runtime:
|
|
11
|
-
* - Linux + EC2-like hostname → http://127.0.0.1:3001
|
|
12
|
-
* - Otherwise → require config or show nextAction
|
|
13
|
-
*/
|
|
14
|
-
import * as os from 'os';
|
|
15
|
-
import * as fs from 'fs';
|
|
16
|
-
import * as path from 'path';
|
|
17
|
-
import { homedir } from 'os';
|
|
18
|
-
/**
|
|
19
|
-
* Get config directory path (~/.4runr)
|
|
20
|
-
*/
|
|
21
|
-
function getConfigDir() {
|
|
22
|
-
const configDir = path.join(homedir(), '.4runr');
|
|
23
|
-
if (!fs.existsSync(configDir)) {
|
|
24
|
-
fs.mkdirSync(configDir, { recursive: true });
|
|
25
|
-
}
|
|
26
|
-
return configDir;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Load saved gateway URL from config file
|
|
30
|
-
* Returns null if not found
|
|
31
|
-
*/
|
|
32
|
-
function loadSavedGatewayUrl() {
|
|
33
|
-
try {
|
|
34
|
-
const configPath = path.join(getConfigDir(), 'config.json');
|
|
35
|
-
if (fs.existsSync(configPath)) {
|
|
36
|
-
const data = fs.readFileSync(configPath, 'utf-8');
|
|
37
|
-
const config = JSON.parse(data);
|
|
38
|
-
if (config.gatewayUrl && typeof config.gatewayUrl === 'string') {
|
|
39
|
-
return config.gatewayUrl;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
catch {
|
|
44
|
-
// File read/parse failed - ignore
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Check if hostname looks like EC2 (ip-*-*-*-* pattern)
|
|
50
|
-
*/
|
|
51
|
-
function isEc2Hostname(hostname) {
|
|
52
|
-
return /^ip-\d+-\d+-\d+-\d+/.test(hostname);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Get smart default Gateway URL based on runtime
|
|
56
|
-
*/
|
|
57
|
-
function getSmartDefault() {
|
|
58
|
-
const platform = process.platform;
|
|
59
|
-
const hostname = os.hostname();
|
|
60
|
-
// If running on Linux with EC2-like hostname, assume localhost
|
|
61
|
-
if (platform === 'linux' && isEc2Hostname(hostname)) {
|
|
62
|
-
return 'http://127.0.0.1:3001';
|
|
63
|
-
}
|
|
64
|
-
// For Windows/remote clients, try localhost first (SSH tunnel or local gateway)
|
|
65
|
-
// If that fails, connect() will auto-fallback to public IP
|
|
66
|
-
if (platform === 'win32' || platform === 'darwin') {
|
|
67
|
-
return 'http://127.0.0.1:3001';
|
|
68
|
-
}
|
|
69
|
-
// Fallback: use public IP (requires security group configuration)
|
|
70
|
-
// This is less secure but works if security group is properly configured
|
|
71
|
-
return 'http://13.222.1.157:3001';
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* The canonical Gateway URL (fallback only - use resolveGatewayUrl() instead)
|
|
75
|
-
*/
|
|
76
|
-
export const DEFAULT_GATEWAY_URL = getSmartDefault();
|
|
77
|
-
/**
|
|
78
|
-
* Resolve the Gateway URL with source tracking
|
|
79
|
-
*
|
|
80
|
-
* Priority:
|
|
81
|
-
* 1. GATEWAY_URL environment variable (if set - allows override for development)
|
|
82
|
-
* 2. ~/.4runr/config.json (if exists - written at install/provisioning time)
|
|
83
|
-
* 3. Smart default based on runtime:
|
|
84
|
-
* - Linux + EC2-like hostname → http://127.0.0.1:3001
|
|
85
|
-
* - Windows/Mac → http://127.0.0.1:3001 (expects SSH tunnel)
|
|
86
|
-
* - Otherwise → http://13.222.1.157:3001 (public IP fallback)
|
|
87
|
-
*
|
|
88
|
-
* Returns both the URL and the source for logging/debugging
|
|
89
|
-
*/
|
|
90
|
-
export function resolveGatewayUrlWithSource() {
|
|
91
|
-
// Priority 1: Environment variable
|
|
92
|
-
if (process.env.GATEWAY_URL) {
|
|
93
|
-
return { url: process.env.GATEWAY_URL, source: 'env:GATEWAY_URL' };
|
|
94
|
-
}
|
|
95
|
-
// Priority 2: Config file
|
|
96
|
-
const savedUrl = loadSavedGatewayUrl();
|
|
97
|
-
if (savedUrl) {
|
|
98
|
-
return { url: savedUrl, source: 'config:~/.4runr/config.json' };
|
|
99
|
-
}
|
|
100
|
-
// Priority 3: Smart default
|
|
101
|
-
return { url: getSmartDefault(), source: 'default:smart' };
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Resolve the Gateway URL (backward compatibility)
|
|
105
|
-
*/
|
|
106
|
-
export function resolveGatewayUrl() {
|
|
107
|
-
return resolveGatewayUrlWithSource().url;
|
|
108
|
-
}
|
|
109
|
-
// Legacy exports for backwards compatibility
|
|
110
|
-
export function getCanonicalGatewayEndpoint() {
|
|
111
|
-
return resolveGatewayUrl();
|
|
112
|
-
}
|
|
113
|
-
//# sourceMappingURL=gateway.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateway.js","sourceRoot":"","sources":["../../../../src/ui/v3/config/gateway.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAE7B;;GAEG;AACH,SAAS,YAAY;IACnB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;IACjD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,SAAS,mBAAmB;IAC1B,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,aAAa,CAAC,CAAC;QAC5D,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAA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BAAmB,EAAE,CAAC;IACvC,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,6BAA6B,EAAE,CAAC;IAClE,CAAC;IAED,4BAA4B;IAC5B,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;AAC7D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,2BAA2B,EAAE,CAAC,GAAG,CAAC;AAC3C,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,2BAA2B;IACzC,OAAO,iBAAiB,EAAE,CAAC;AAC7B,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event Type
|
|
3
|
-
*
|
|
4
|
-
* Minimal event interface for the EventBus system.
|
|
5
|
-
*/
|
|
6
|
-
export type EventTag = 'CMD' | 'SYS' | 'ERR' | 'NET' | 'DB' | 'SEC' | 'RUN';
|
|
7
|
-
export type EventLevel = 'INFO' | 'WARN' | 'ERROR';
|
|
8
|
-
export interface Event {
|
|
9
|
-
id: string;
|
|
10
|
-
ts: number;
|
|
11
|
-
tag: EventTag;
|
|
12
|
-
level: EventLevel;
|
|
13
|
-
message: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Event input (without id and ts - will be assigned)
|
|
17
|
-
*/
|
|
18
|
-
export type EventInput = Omit<Event, 'id' | 'ts'>;
|
|
19
|
-
//# sourceMappingURL=event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/core/event.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,CAAC;AAE5E,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnD,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,QAAQ,CAAC;IACd,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC"}
|
package/dist/ui/v3/core/event.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../../../src/ui/v3/core/event.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 2: EventBus
|
|
3
|
-
*
|
|
4
|
-
* In-memory pub/sub system for Operations Feed.
|
|
5
|
-
* All visible output goes through the EventBus.
|
|
6
|
-
*
|
|
7
|
-
* Rules:
|
|
8
|
-
* - In-memory only (no persistence)
|
|
9
|
-
* - No UI imports inside bus. Bus is pure logic.
|
|
10
|
-
* - Must support multiple subscribers.
|
|
11
|
-
* - Must return an unsubscribe() function.
|
|
12
|
-
*/
|
|
13
|
-
import type { OpEvent } from './opEvent.js';
|
|
14
|
-
export type EventListener = (e: OpEvent) => void;
|
|
15
|
-
declare class EventBus {
|
|
16
|
-
private subscribers;
|
|
17
|
-
private eventCounter;
|
|
18
|
-
/**
|
|
19
|
-
* Emit an event
|
|
20
|
-
* Generates id and ts if missing, then calls all subscribers synchronously
|
|
21
|
-
*/
|
|
22
|
-
emit(e: Omit<OpEvent, "id" | "ts"> & Partial<Pick<OpEvent, "id" | "ts">>): void;
|
|
23
|
-
/**
|
|
24
|
-
* Subscribe to events
|
|
25
|
-
* Returns unsubscribe function
|
|
26
|
-
*/
|
|
27
|
-
subscribe(fn: EventListener): () => void;
|
|
28
|
-
/**
|
|
29
|
-
* Helper: emit with tag and message (for compatibility)
|
|
30
|
-
*/
|
|
31
|
-
emitTag(tag: OpEvent['tag'], msg: string, level?: OpEvent['level']): void;
|
|
32
|
-
/**
|
|
33
|
-
* Get subscriber count (for debugging)
|
|
34
|
-
*/
|
|
35
|
-
getSubscriberCount(): number;
|
|
36
|
-
}
|
|
37
|
-
export declare const eventBus: EventBus;
|
|
38
|
-
export {};
|
|
39
|
-
//# sourceMappingURL=eventBus.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventBus.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/core/eventBus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;AAEjD,cAAM,QAAQ;IACZ,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,YAAY,CAAK;IAEzB;;;OAGG;IACH,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI;IAqC/E;;;OAGG;IACH,SAAS,CAAC,EAAE,EAAE,aAAa,GAAG,MAAM,IAAI;IASxC;;OAEG;IACH,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,OAAO,CAAC,OAAO,CAAU,GAAG,IAAI;IAIjF;;OAEG;IACH,kBAAkB,IAAI,MAAM;CAG7B;AAGD,eAAO,MAAM,QAAQ,UAAiB,CAAC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 2: EventBus
|
|
3
|
-
*
|
|
4
|
-
* In-memory pub/sub system for Operations Feed.
|
|
5
|
-
* All visible output goes through the EventBus.
|
|
6
|
-
*
|
|
7
|
-
* Rules:
|
|
8
|
-
* - In-memory only (no persistence)
|
|
9
|
-
* - No UI imports inside bus. Bus is pure logic.
|
|
10
|
-
* - Must support multiple subscribers.
|
|
11
|
-
* - Must return an unsubscribe() function.
|
|
12
|
-
*/
|
|
13
|
-
class EventBus {
|
|
14
|
-
subscribers = new Set();
|
|
15
|
-
eventCounter = 0; // Monotonic counter for IDs
|
|
16
|
-
/**
|
|
17
|
-
* Emit an event
|
|
18
|
-
* Generates id and ts if missing, then calls all subscribers synchronously
|
|
19
|
-
*/
|
|
20
|
-
emit(e) {
|
|
21
|
-
// Generate id if missing
|
|
22
|
-
const id = e.id || `evt-${++this.eventCounter}`;
|
|
23
|
-
// Set ts = Date.now() if missing
|
|
24
|
-
const ts = e.ts ?? Date.now();
|
|
25
|
-
// Default level to INFO if not provided
|
|
26
|
-
const level = e.level || 'INFO';
|
|
27
|
-
const event = {
|
|
28
|
-
id,
|
|
29
|
-
ts,
|
|
30
|
-
tag: e.tag,
|
|
31
|
-
level,
|
|
32
|
-
msg: e.msg,
|
|
33
|
-
};
|
|
34
|
-
// Call all subscribers synchronously
|
|
35
|
-
// Wrap in try/catch so one bad subscriber doesn't kill updates
|
|
36
|
-
this.subscribers.forEach(subscriber => {
|
|
37
|
-
try {
|
|
38
|
-
subscriber(event);
|
|
39
|
-
}
|
|
40
|
-
catch (error) {
|
|
41
|
-
// Don't let subscriber errors break the bus
|
|
42
|
-
// In TUI mode, we can't log, so we silently continue
|
|
43
|
-
// In debug mode, we could log to stderr
|
|
44
|
-
// Structural Fix A: Only log to stderr if DEBUG_NO_TUI is set (not in TUI mode)
|
|
45
|
-
if (process.env.DEBUG_NO_TUI === '1') {
|
|
46
|
-
// In non-TUI mode, it's safe to use console.error (goes to stderr, not stdout)
|
|
47
|
-
const originalError = console.error;
|
|
48
|
-
originalError('EventBus subscriber error:', error);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Subscribe to events
|
|
55
|
-
* Returns unsubscribe function
|
|
56
|
-
*/
|
|
57
|
-
subscribe(fn) {
|
|
58
|
-
this.subscribers.add(fn);
|
|
59
|
-
// Return unsubscribe function
|
|
60
|
-
return () => {
|
|
61
|
-
this.subscribers.delete(fn);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Helper: emit with tag and message (for compatibility)
|
|
66
|
-
*/
|
|
67
|
-
emitTag(tag, msg, level = 'INFO') {
|
|
68
|
-
this.emit({ tag, msg, level });
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Get subscriber count (for debugging)
|
|
72
|
-
*/
|
|
73
|
-
getSubscriberCount() {
|
|
74
|
-
return this.subscribers.size;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
// Singleton instance
|
|
78
|
-
export const eventBus = new EventBus();
|
|
79
|
-
//# sourceMappingURL=eventBus.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventBus.js","sourceRoot":"","sources":["../../../../src/ui/v3/core/eventBus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,MAAM,QAAQ;IACJ,WAAW,GAAuB,IAAI,GAAG,EAAE,CAAC;IAC5C,YAAY,GAAG,CAAC,CAAC,CAAC,4BAA4B;IAEtD;;;OAGG;IACH,IAAI,CAAC,CAAmE;QACtE,yBAAyB;QACzB,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,IAAI,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC;QAEhD,iCAAiC;QACjC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QAE9B,wCAAwC;QACxC,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC;QAEhC,MAAM,KAAK,GAAY;YACrB,E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|
3
|
-
*
|
|
4
|
-
* Bounded ring buffer for Operations Feed events.
|
|
5
|
-
*
|
|
6
|
-
* Rules:
|
|
7
|
-
* - Stores last N=200 events (configurable constant)
|
|
8
|
-
* - Truncate from the front when over capacity (drop oldest)
|
|
9
|
-
* - No formatting here. Store raw events only.
|
|
10
|
-
*/
|
|
11
|
-
import type { OpEvent } from './opEvent.js';
|
|
12
|
-
declare class FeedStore {
|
|
13
|
-
private events;
|
|
14
|
-
/**
|
|
15
|
-
* Push an event to the store
|
|
16
|
-
* Truncates from the front when over capacity
|
|
17
|
-
*/
|
|
18
|
-
push(e: OpEvent): void;
|
|
19
|
-
/**
|
|
20
|
-
* Clear all events
|
|
21
|
-
*/
|
|
22
|
-
clear(): void;
|
|
23
|
-
/**
|
|
24
|
-
* Get latest N events
|
|
25
|
-
*/
|
|
26
|
-
getLatest(count: number): OpEvent[];
|
|
27
|
-
/**
|
|
28
|
-
* Get current size
|
|
29
|
-
*/
|
|
30
|
-
size(): number;
|
|
31
|
-
}
|
|
32
|
-
export declare const feedStore: FeedStore;
|
|
33
|
-
export {};
|
|
34
|
-
//# sourceMappingURL=feedStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feedStore.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/core/feedStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAI5C,cAAM,SAAS;IACb,OAAO,CAAC,MAAM,CAAiB;IAE/B;;;OAGG;IACH,IAAI,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;IAStB;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE;IAInC;;OAEG;IACH,IAAI,IAAI,MAAM;CAGf;AAGD,eAAO,MAAM,SAAS,WAAkB,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 2: FeedStore
|
|
3
|
-
*
|
|
4
|
-
* Bounded ring buffer for Operations Feed events.
|
|
5
|
-
*
|
|
6
|
-
* Rules:
|
|
7
|
-
* - Stores last N=200 events (configurable constant)
|
|
8
|
-
* - Truncate from the front when over capacity (drop oldest)
|
|
9
|
-
* - No formatting here. Store raw events only.
|
|
10
|
-
*/
|
|
11
|
-
const MAX_EVENTS = 200; // Configurable constant
|
|
12
|
-
class FeedStore {
|
|
13
|
-
events = [];
|
|
14
|
-
/**
|
|
15
|
-
* Push an event to the store
|
|
16
|
-
* Truncates from the front when over capacity
|
|
17
|
-
*/
|
|
18
|
-
push(e) {
|
|
19
|
-
this.events.push(e);
|
|
20
|
-
// Truncate from the front when over capacity (drop oldest)
|
|
21
|
-
if (this.events.length > MAX_EVENTS) {
|
|
22
|
-
this.events = this.events.slice(-MAX_EVENTS);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Clear all events
|
|
27
|
-
*/
|
|
28
|
-
clear() {
|
|
29
|
-
this.events = [];
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Get latest N events
|
|
33
|
-
*/
|
|
34
|
-
getLatest(count) {
|
|
35
|
-
return this.events.slice(-count);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Get current size
|
|
39
|
-
*/
|
|
40
|
-
size() {
|
|
41
|
-
return this.events.length;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
// Singleton instance
|
|
45
|
-
export const feedStore = new FeedStore();
|
|
46
|
-
//# sourceMappingURL=feedStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feedStore.js","sourceRoot":"","sources":["../../../../src/ui/v3/core/feedStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,UAAU,GAAG,GAAG,CAAC,CAAC,wBAAwB;AAEhD,MAAM,SAAS;IACL,MAAM,GAAc,EAAE,CAAC;IAE/B;;;OAGG;IACH,IAAI,CAAC,CAAU;QACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAEpB,2DAA2D;QAC3D,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,KAAa;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,IAAI;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAC5B,CAAC;CACF;AAED,qBAAqB;AACrB,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Structural Fix A: Logger Wrapper
|
|
3
|
-
*
|
|
4
|
-
* Hard enforcement: No console.log/process.stdout.write in TUI mode
|
|
5
|
-
* All output goes through eventBus as [SYS] / [ERR] depending on level
|
|
6
|
-
*
|
|
7
|
-
* Rules:
|
|
8
|
-
* - logger.info() → Operations feed (NOT stdout)
|
|
9
|
-
* - logger.error() → Operations feed AND stderr (optional)
|
|
10
|
-
* - logger.raw() is FORBIDDEN
|
|
11
|
-
* - stdout.write is monkeypatched to throw in TUI mode
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Structural Fix A: Enable TUI mode (suppresses all stdout/console writes)
|
|
15
|
-
*
|
|
16
|
-
* Monkeypatches stdout.write and console methods to throw errors
|
|
17
|
-
* Only the renderer (blessed) is allowed to write to stdout
|
|
18
|
-
*/
|
|
19
|
-
export declare function enableTuiMode(): void;
|
|
20
|
-
/**
|
|
21
|
-
* Disable boot phase (enable strict stdout blocking)
|
|
22
|
-
* Call this after blessed screen is created and first render completes
|
|
23
|
-
*/
|
|
24
|
-
export declare function disableBootPhase(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Disable TUI mode (restores console/stdout)
|
|
27
|
-
*/
|
|
28
|
-
export declare function disableTuiMode(): void;
|
|
29
|
-
/**
|
|
30
|
-
* Structural Fix A: Logger interface
|
|
31
|
-
*
|
|
32
|
-
* All logging goes through Operations feed, NOT stdout
|
|
33
|
-
*/
|
|
34
|
-
export declare const logger: {
|
|
35
|
-
debug: (msg: string) => void;
|
|
36
|
-
info: (msg: string) => void;
|
|
37
|
-
warn: (msg: string) => void;
|
|
38
|
-
error: (msg: string) => void;
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/core/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAmBH;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,IAAI,CA4GpC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAoCrC;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM;iBACJ,MAAM,KAAG,IAAI;gBAId,MAAM,KAAG,IAAI;gBAIb,MAAM,KAAG,IAAI;iBAIZ,MAAM,KAAG,IAAI;CAU3B,CAAC"}
|