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,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Structural Fix B: Enforce One UI Root
|
|
3
|
-
*
|
|
4
|
-
* Centralized TUI boot entry point with singleton guard.
|
|
5
|
-
* This is the ONLY place that should start the TUI.
|
|
6
|
-
*
|
|
7
|
-
* Rules:
|
|
8
|
-
* - Singleton guard prevents multiple UI instances
|
|
9
|
-
* - connect/reconnect updates store state only, never recreates UI
|
|
10
|
-
* - Never calls render() or creates new screen instances after initial boot
|
|
11
|
-
*/
|
|
12
|
-
declare global {
|
|
13
|
-
var __FOURRUNR_TUI_RUNNING__: boolean | undefined;
|
|
14
|
-
var __FOURRUNR_TUI_UNMOUNT__: (() => void) | undefined;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Start the TUI (singleton - only runs once per process)
|
|
18
|
-
*
|
|
19
|
-
* Hard stop: If UI already running, do nothing and return false.
|
|
20
|
-
* Must be placed at entrypoint BEFORE creating screen, before render, before listeners.
|
|
21
|
-
*
|
|
22
|
-
* Returns true if TUI was started, false if already running
|
|
23
|
-
*/
|
|
24
|
-
export declare function startTui(): Promise<boolean>;
|
|
25
|
-
/**
|
|
26
|
-
* Store the unmount function for proper cleanup
|
|
27
|
-
*/
|
|
28
|
-
export declare function setTuiUnmount(unmount: () => void): void;
|
|
29
|
-
/**
|
|
30
|
-
* Reset the singleton guard (for testing or proper shutdown)
|
|
31
|
-
*/
|
|
32
|
-
export declare function resetTuiGuard(): void;
|
|
33
|
-
/**
|
|
34
|
-
* Check if TUI is already started
|
|
35
|
-
*/
|
|
36
|
-
export declare function isTuiStarted(): boolean;
|
|
37
|
-
//# sourceMappingURL=startTui.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startTui.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/tui/startTui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,wBAAwB,EAAE,OAAO,GAAG,SAAS,CAAC;IAElD,IAAI,wBAAwB,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CACxD;AAED;;;;;;;GAOG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,CAqBjD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,IAAI,CAEvD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAGpC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Structural Fix B: Enforce One UI Root
|
|
3
|
-
*
|
|
4
|
-
* Centralized TUI boot entry point with singleton guard.
|
|
5
|
-
* This is the ONLY place that should start the TUI.
|
|
6
|
-
*
|
|
7
|
-
* Rules:
|
|
8
|
-
* - Singleton guard prevents multiple UI instances
|
|
9
|
-
* - connect/reconnect updates store state only, never recreates UI
|
|
10
|
-
* - Never calls render() or creates new screen instances after initial boot
|
|
11
|
-
*/
|
|
12
|
-
import { startPhase1Runtime } from '../ui/phase1RuntimeClean.js';
|
|
13
|
-
/**
|
|
14
|
-
* Start the TUI (singleton - only runs once per process)
|
|
15
|
-
*
|
|
16
|
-
* Hard stop: If UI already running, do nothing and return false.
|
|
17
|
-
* Must be placed at entrypoint BEFORE creating screen, before render, before listeners.
|
|
18
|
-
*
|
|
19
|
-
* Returns true if TUI was started, false if already running
|
|
20
|
-
*/
|
|
21
|
-
export async function startTui() {
|
|
22
|
-
// Structural Fix B: Hard singleton guard - hard stop if already running
|
|
23
|
-
if (globalThis.__FOURRUNR_TUI_RUNNING__) {
|
|
24
|
-
// UI already running - do nothing, return immediately
|
|
25
|
-
// This is a hard stop - no screen creation, no render, no listeners
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
// Mark as running BEFORE any UI code executes
|
|
29
|
-
// This prevents race conditions if startTui is called multiple times
|
|
30
|
-
globalThis.__FOURRUNR_TUI_RUNNING__ = true;
|
|
31
|
-
try {
|
|
32
|
-
await startPhase1Runtime();
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
// If start fails, reset the flag so we can retry
|
|
37
|
-
globalThis.__FOURRUNR_TUI_RUNNING__ = false;
|
|
38
|
-
globalThis.__FOURRUNR_TUI_UNMOUNT__ = undefined;
|
|
39
|
-
throw error;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Store the unmount function for proper cleanup
|
|
44
|
-
*/
|
|
45
|
-
export function setTuiUnmount(unmount) {
|
|
46
|
-
globalThis.__FOURRUNR_TUI_UNMOUNT__ = unmount;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Reset the singleton guard (for testing or proper shutdown)
|
|
50
|
-
*/
|
|
51
|
-
export function resetTuiGuard() {
|
|
52
|
-
globalThis.__FOURRUNR_TUI_RUNNING__ = false;
|
|
53
|
-
globalThis.__FOURRUNR_TUI_UNMOUNT__ = undefined;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Check if TUI is already started
|
|
57
|
-
*/
|
|
58
|
-
export function isTuiStarted() {
|
|
59
|
-
return globalThis.__FOURRUNR_TUI_RUNNING__ === true;
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=startTui.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startTui.js","sourceRoot":"","sources":["../../../../src/ui/v3/tui/startTui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAUjE;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ;IAC5B,wEAAwE;IACxE,IAAK,UAAkB,CAAC,wBAAwB,EAAE,CAAC;QACjD,sDAAsD;QACtD,oEAAoE;QACpE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,8CAA8C;IAC9C,qEAAqE;IACpE,UAAkB,CAAC,wBAAwB,GAAG,IAAI,CAAC;IAEpD,IAAI,CAAC;QACH,MAAM,kBAAkB,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,iDAAiD;QACjD,UAAU,CAAC,wBAAwB,GAAG,KAAK,CAAC;QAC5C,UAAU,CAAC,wBAAwB,GAAG,SAAS,CAAC;QAChD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAAmB;IAC/C,UAAU,CAAC,wBAAwB,GAAG,OAAO,CAAC;AAChD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;IAC1B,UAAkB,CAAC,wBAAwB,GAAG,KAAK,CAAC;IACpD,UAAkB,CAAC,wBAAwB,GAAG,SAAS,CAAC;AAC3D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAQ,UAAkB,CAAC,wBAAwB,KAAK,IAAI,CAAC;AAC/D,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Terminal Mode Detection - Explicit Runtime Environment Detection
|
|
3
|
-
*
|
|
4
|
-
* Determines the terminal runtime mode to handle resize and layout correctly
|
|
5
|
-
* for each environment type.
|
|
6
|
-
*/
|
|
7
|
-
export type TerminalMode = 'native' | 'ssh' | 'browser' | 'unknown';
|
|
8
|
-
/**
|
|
9
|
-
* Detect terminal runtime mode
|
|
10
|
-
*
|
|
11
|
-
* Returns:
|
|
12
|
-
* - "native": Real local terminal (Windows Terminal / iTerm / Linux native)
|
|
13
|
-
* - "ssh": Remote terminal via SSH
|
|
14
|
-
* - "browser": Browser-based terminal (xterm.js / web terminal / CloudShell)
|
|
15
|
-
* - "unknown": Cannot determine (fallback)
|
|
16
|
-
*
|
|
17
|
-
* Detection logic:
|
|
18
|
-
* 1. Browser: Check for websocket client or CloudShell environment variables
|
|
19
|
-
* 2. SSH: Check for SSH environment variables
|
|
20
|
-
* 3. Native: Default for local terminals
|
|
21
|
-
*/
|
|
22
|
-
export declare function detectTerminalMode(): TerminalMode;
|
|
23
|
-
/**
|
|
24
|
-
* Get detection log (for debugging)
|
|
25
|
-
*/
|
|
26
|
-
export declare function getDetectionLog(): string[];
|
|
27
|
-
/**
|
|
28
|
-
* Reset detection (for testing)
|
|
29
|
-
*/
|
|
30
|
-
export declare function resetDetection(): void;
|
|
31
|
-
//# sourceMappingURL=terminalMode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"terminalMode.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/tui/terminalMode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC;AAKpE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,CAiDjD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAE1C;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAGrC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Terminal Mode Detection - Explicit Runtime Environment Detection
|
|
3
|
-
*
|
|
4
|
-
* Determines the terminal runtime mode to handle resize and layout correctly
|
|
5
|
-
* for each environment type.
|
|
6
|
-
*/
|
|
7
|
-
let detectedMode = null;
|
|
8
|
-
let detectionLog = [];
|
|
9
|
-
/**
|
|
10
|
-
* Detect terminal runtime mode
|
|
11
|
-
*
|
|
12
|
-
* Returns:
|
|
13
|
-
* - "native": Real local terminal (Windows Terminal / iTerm / Linux native)
|
|
14
|
-
* - "ssh": Remote terminal via SSH
|
|
15
|
-
* - "browser": Browser-based terminal (xterm.js / web terminal / CloudShell)
|
|
16
|
-
* - "unknown": Cannot determine (fallback)
|
|
17
|
-
*
|
|
18
|
-
* Detection logic:
|
|
19
|
-
* 1. Browser: Check for websocket client or CloudShell environment variables
|
|
20
|
-
* 2. SSH: Check for SSH environment variables
|
|
21
|
-
* 3. Native: Default for local terminals
|
|
22
|
-
*/
|
|
23
|
-
export function detectTerminalMode() {
|
|
24
|
-
if (detectedMode !== null) {
|
|
25
|
-
return detectedMode;
|
|
26
|
-
}
|
|
27
|
-
detectionLog = [];
|
|
28
|
-
detectionLog.push('=== Terminal Mode Detection ===');
|
|
29
|
-
// Check 1: Browser/Web terminal
|
|
30
|
-
// CloudShell sets specific environment variables
|
|
31
|
-
const hasCloudShellEnv = typeof process.env.CLOUDSHELL_SESSION !== 'undefined' ||
|
|
32
|
-
process.env.AWS_EXECUTION_ENV?.includes('CloudShell');
|
|
33
|
-
// Check for websocket/HTTP server indicators (if running in browser context)
|
|
34
|
-
// Note: In Node.js backend, we can't directly detect if frontend is browser,
|
|
35
|
-
// but we can check for CloudShell which is a known browser terminal
|
|
36
|
-
const isBrowser = hasCloudShellEnv;
|
|
37
|
-
if (isBrowser) {
|
|
38
|
-
detectedMode = 'browser';
|
|
39
|
-
detectionLog.push(`Detected: browser (CloudShell environment)`);
|
|
40
|
-
detectionLog.push(` CLOUDSHELL_SESSION: ${process.env.CLOUDSHELL_SESSION ?? 'not set'}`);
|
|
41
|
-
detectionLog.push(` AWS_EXECUTION_ENV: ${process.env.AWS_EXECUTION_ENV ?? 'not set'}`);
|
|
42
|
-
return detectedMode;
|
|
43
|
-
}
|
|
44
|
-
// Check 2: SSH
|
|
45
|
-
// SSH connections set SSH_TTY or SSH_CONNECTION
|
|
46
|
-
const hasSshEnv = typeof process.env.SSH_TTY !== 'undefined' ||
|
|
47
|
-
typeof process.env.SSH_CONNECTION !== 'undefined' ||
|
|
48
|
-
typeof process.env.SSH_CLIENT !== 'undefined';
|
|
49
|
-
if (hasSshEnv) {
|
|
50
|
-
detectedMode = 'ssh';
|
|
51
|
-
detectionLog.push(`Detected: ssh (SSH environment)`);
|
|
52
|
-
detectionLog.push(` SSH_TTY: ${process.env.SSH_TTY ?? 'not set'}`);
|
|
53
|
-
detectionLog.push(` SSH_CONNECTION: ${process.env.SSH_CONNECTION ?? 'not set'}`);
|
|
54
|
-
return detectedMode;
|
|
55
|
-
}
|
|
56
|
-
// Default: Native terminal (Windows Terminal, iTerm, Linux native terminal)
|
|
57
|
-
detectedMode = 'native';
|
|
58
|
-
detectionLog.push(`Detected: native (local terminal)`);
|
|
59
|
-
detectionLog.push(` Platform: ${process.platform}`);
|
|
60
|
-
detectionLog.push(` TERM: ${process.env.TERM ?? 'not set'}`);
|
|
61
|
-
return detectedMode;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Get detection log (for debugging)
|
|
65
|
-
*/
|
|
66
|
-
export function getDetectionLog() {
|
|
67
|
-
return [...detectionLog];
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Reset detection (for testing)
|
|
71
|
-
*/
|
|
72
|
-
export function resetDetection() {
|
|
73
|
-
detectedMode = null;
|
|
74
|
-
detectionLog = [];
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=terminalMode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"terminalMode.js","sourceRoot":"","sources":["../../../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rB,YAAY,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;QACrD,YAAY,CAAC,IAAI,CAAC,cAAc,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC,CAAC;QACpE,YAAY,CAAC,IAAI,CAAC,qBAAqB,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,SAAS,EAAE,CAAC,CAAC;QAClF,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,4EAA4E;IAC5E,YAAY,GAAG,QAAQ,CAAC;IACxB,YAAY,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;IACvD,YAAY,CAAC,IAAI,CAAC,eAAe,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrD,YAAY,CAAC,IAAI,CAAC,WAAW,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,SAAS,EAAE,CAAC,CAAC;IAE9D,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,GAAG,YAAY,CAAC,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,YAAY,GAAG,IAAI,CAAC;IACpB,YAAY,GAAG,EAAE,CAAC;AACpB,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Debug utilities for TUI lifecycle investigation
|
|
3
|
-
*
|
|
4
|
-
* Enable with TUI_DEBUG=1
|
|
5
|
-
* All debug output goes to Operations/eventBus, never stdout
|
|
6
|
-
*/
|
|
7
|
-
import type { Widgets } from 'neo-blessed';
|
|
8
|
-
export declare const BOOT_ID: string;
|
|
9
|
-
export declare const isDebugMode: () => boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Step 1A: Track widget creation
|
|
12
|
-
*/
|
|
13
|
-
export declare function trackWidget(widget: any, type: string): void;
|
|
14
|
-
/**
|
|
15
|
-
* Step 1B: UI inventory dump
|
|
16
|
-
*/
|
|
17
|
-
export declare function dumpUIInventory(screen: Widgets.Screen): void;
|
|
18
|
-
/**
|
|
19
|
-
* Step 2A: Track listener binding
|
|
20
|
-
*/
|
|
21
|
-
export declare function trackListenerBinding(type: string): void;
|
|
22
|
-
/**
|
|
23
|
-
* Step 2B: Dump listener bindings
|
|
24
|
-
*/
|
|
25
|
-
export declare function dumpListenerBindings(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Step 3A: Track blocked stdout/stderr writes
|
|
28
|
-
*
|
|
29
|
-
* Enhanced: Capture full stack trace for corruption detection
|
|
30
|
-
*/
|
|
31
|
-
export declare function trackBlockedWrite(stream: 'stdout' | 'stderr', content: string): void;
|
|
32
|
-
/**
|
|
33
|
-
* Step 3B: Dump blocked writes
|
|
34
|
-
*/
|
|
35
|
-
export declare function dumpBlockedWrites(): void;
|
|
36
|
-
/**
|
|
37
|
-
* Monkeypatch stdout/stderr to catch writes
|
|
38
|
-
*
|
|
39
|
-
* Enhanced: Detect corruption during TUI runtime (captures stack traces)
|
|
40
|
-
*/
|
|
41
|
-
export declare function installStdoutMonkeypatch(): () => void;
|
|
42
|
-
export interface ResizeStats {
|
|
43
|
-
eventCount: number;
|
|
44
|
-
applyCount: number;
|
|
45
|
-
handlerBound: boolean;
|
|
46
|
-
listenerCount: number;
|
|
47
|
-
uiRebuildCount: number;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Update resize stats (called from phase1RuntimeClean)
|
|
51
|
-
*/
|
|
52
|
-
export declare function updateResizeStats(stats: Partial<ResizeStats>): void;
|
|
53
|
-
/**
|
|
54
|
-
* Get resize stats (exported for debug commands)
|
|
55
|
-
*/
|
|
56
|
-
export declare function getResizeStats(): ResizeStats;
|
|
57
|
-
/**
|
|
58
|
-
* Get current statistics
|
|
59
|
-
*/
|
|
60
|
-
export declare function getDebugStats(): {
|
|
61
|
-
bootId: string;
|
|
62
|
-
widgetCount: number;
|
|
63
|
-
listenerCount: number;
|
|
64
|
-
blockedWriteCount: number;
|
|
65
|
-
resizeStats: ResizeStats;
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=debugUtils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debugUtils.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/ui/debugUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,eAAO,MAAM,OAAO,QAAgE,CAAC;AAkCrF,eAAO,MAAM,WAAW,QAAO,OAE9B,CAAC;AAUF;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAsB3D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,IAAI,CAqC5D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAqBvD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CA2B3C;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAyBpF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAcxC;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,IAAI,CAqCrD;AAGD,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB;AAUD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI,CAEnE;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAE5C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,WAAW,CAAC;CAC1B,CAQA"}
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Debug utilities for TUI lifecycle investigation
|
|
3
|
-
*
|
|
4
|
-
* Enable with TUI_DEBUG=1
|
|
5
|
-
* All debug output goes to Operations/eventBus, never stdout
|
|
6
|
-
*/
|
|
7
|
-
import { eventBus } from '../core/eventBus.js';
|
|
8
|
-
// Step 5: Single source of truth boot marker
|
|
9
|
-
export const BOOT_ID = `${Math.random().toString(36).substring(2, 8).toUpperCase()}`;
|
|
10
|
-
const widgetRegistry = new Map();
|
|
11
|
-
const listenerBindings = [];
|
|
12
|
-
let resizeHandlerCount = 0;
|
|
13
|
-
const blockedWrites = [];
|
|
14
|
-
const MAX_BLOCKED_WRITES = 50;
|
|
15
|
-
export const isDebugMode = () => {
|
|
16
|
-
return process.env.TUI_DEBUG === '1';
|
|
17
|
-
};
|
|
18
|
-
const log = (msg, level = 'INFO') => {
|
|
19
|
-
eventBus.emit({
|
|
20
|
-
tag: 'DBG',
|
|
21
|
-
msg: `[boot=${BOOT_ID}] ${msg}`,
|
|
22
|
-
level
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Step 1A: Track widget creation
|
|
27
|
-
*/
|
|
28
|
-
export function trackWidget(widget, type) {
|
|
29
|
-
if (!isDebugMode())
|
|
30
|
-
return;
|
|
31
|
-
const id = Math.random().toString(36).substring(2, 8);
|
|
32
|
-
const stack = new Error().stack || '';
|
|
33
|
-
const createdBy = stack.split('\n').slice(2, 5).join('\n ');
|
|
34
|
-
const meta = {
|
|
35
|
-
__id: id,
|
|
36
|
-
__createdAt: Date.now(),
|
|
37
|
-
__createdBy: createdBy,
|
|
38
|
-
__type: type
|
|
39
|
-
};
|
|
40
|
-
widget.__id = id;
|
|
41
|
-
widget.__createdAt = meta.__createdAt;
|
|
42
|
-
widget.__createdBy = meta.__createdBy;
|
|
43
|
-
widget.__type = type;
|
|
44
|
-
widgetRegistry.set(id, meta);
|
|
45
|
-
log(`created ${type} id=${id}`);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Step 1B: UI inventory dump
|
|
49
|
-
*/
|
|
50
|
-
export function dumpUIInventory(screen) {
|
|
51
|
-
const children = screen.children || [];
|
|
52
|
-
const totalChildren = children.length;
|
|
53
|
-
log(`=== UI INVENTORY ===`);
|
|
54
|
-
log(`Total children: ${totalChildren}`);
|
|
55
|
-
// Count widgets by type
|
|
56
|
-
const typeCounts = new Map();
|
|
57
|
-
for (const child of children) {
|
|
58
|
-
const type = child.__type || 'unknown';
|
|
59
|
-
const id = child.__id || 'no-id';
|
|
60
|
-
const createdAt = child.__createdAt || 0;
|
|
61
|
-
const createdBy = child.__createdBy || 'unknown';
|
|
62
|
-
if (!typeCounts.has(type)) {
|
|
63
|
-
typeCounts.set(type, []);
|
|
64
|
-
}
|
|
65
|
-
typeCounts.get(type).push({ id, createdAt, createdBy });
|
|
66
|
-
}
|
|
67
|
-
// Report counts and duplicates
|
|
68
|
-
for (const [type, instances] of typeCounts.entries()) {
|
|
69
|
-
const count = instances.length;
|
|
70
|
-
log(`${type}: ${count} instance(s)`);
|
|
71
|
-
if (count > 1) {
|
|
72
|
-
log(` ⚠️ DUPLICATE DETECTED for ${type}:`, 'WARN');
|
|
73
|
-
for (const inst of instances) {
|
|
74
|
-
log(` - id=${inst.id} created at ${new Date(inst.createdAt).toISOString()}`);
|
|
75
|
-
log(` stack: ${inst.createdBy}`);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
log(`=== END INVENTORY ===`);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Step 2A: Track listener binding
|
|
83
|
-
*/
|
|
84
|
-
export function trackListenerBinding(type) {
|
|
85
|
-
if (!isDebugMode())
|
|
86
|
-
return;
|
|
87
|
-
if (type === 'resize') {
|
|
88
|
-
resizeHandlerCount++;
|
|
89
|
-
}
|
|
90
|
-
const stack = new Error().stack || '';
|
|
91
|
-
const boundBy = stack.split('\n').slice(2, 5).join('\n ');
|
|
92
|
-
const binding = {
|
|
93
|
-
type,
|
|
94
|
-
handlerNum: type === 'resize' ? resizeHandlerCount : listenerBindings.filter(b => b.type === type).length + 1,
|
|
95
|
-
boundAt: Date.now(),
|
|
96
|
-
stack: boundBy
|
|
97
|
-
};
|
|
98
|
-
listenerBindings.push(binding);
|
|
99
|
-
log(`bound ${type} handler#${binding.handlerNum} at ${new Date(binding.boundAt).toISOString()}`);
|
|
100
|
-
log(` stack: ${boundBy}`);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Step 2B: Dump listener bindings
|
|
104
|
-
*/
|
|
105
|
-
export function dumpListenerBindings() {
|
|
106
|
-
log(`=== LISTENER BINDINGS ===`);
|
|
107
|
-
log(`Total bindings: ${listenerBindings.length}`);
|
|
108
|
-
// Group by type
|
|
109
|
-
const byType = new Map();
|
|
110
|
-
for (const binding of listenerBindings) {
|
|
111
|
-
if (!byType.has(binding.type)) {
|
|
112
|
-
byType.set(binding.type, []);
|
|
113
|
-
}
|
|
114
|
-
byType.get(binding.type).push(binding);
|
|
115
|
-
}
|
|
116
|
-
for (const [type, bindings] of byType.entries()) {
|
|
117
|
-
log(`${type}: ${bindings.length} binding(s)`);
|
|
118
|
-
if (bindings.length > 1) {
|
|
119
|
-
log(` ⚠️ MULTIPLE BINDINGS for ${type}:`, 'WARN');
|
|
120
|
-
}
|
|
121
|
-
for (const binding of bindings) {
|
|
122
|
-
log(` - handler#${binding.handlerNum} at ${new Date(binding.boundAt).toISOString()}`);
|
|
123
|
-
log(` stack: ${binding.stack}`);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
log(`=== END LISTENER BINDINGS ===`);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Step 3A: Track blocked stdout/stderr writes
|
|
130
|
-
*
|
|
131
|
-
* Enhanced: Capture full stack trace for corruption detection
|
|
132
|
-
*/
|
|
133
|
-
export function trackBlockedWrite(stream, content) {
|
|
134
|
-
const stack = new Error().stack || '';
|
|
135
|
-
// Capture full stack trace (first 10 lines for corruption detection)
|
|
136
|
-
const fullStack = stack.split('\n').slice(2, 12).join('\n ');
|
|
137
|
-
const caller = stack.split('\n').slice(2, 5).join('\n ');
|
|
138
|
-
const blocked = {
|
|
139
|
-
ts: Date.now(),
|
|
140
|
-
content: content.substring(0, 200), // Increased to 200 for better visibility
|
|
141
|
-
stack: fullStack, // Full stack for corruption detection
|
|
142
|
-
stream
|
|
143
|
-
};
|
|
144
|
-
blockedWrites.push(blocked);
|
|
145
|
-
// Keep only last MAX_BLOCKED_WRITES
|
|
146
|
-
if (blockedWrites.length > MAX_BLOCKED_WRITES) {
|
|
147
|
-
blockedWrites.shift();
|
|
148
|
-
}
|
|
149
|
-
// Emit to operations (rate limited to prevent spam)
|
|
150
|
-
if (isDebugMode()) {
|
|
151
|
-
log(`[${stream.toUpperCase()} BLOCKED] "${blocked.content.substring(0, 50)}..."`, 'WARN');
|
|
152
|
-
log(` Stack: ${caller}`, 'WARN');
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Step 3B: Dump blocked writes
|
|
157
|
-
*/
|
|
158
|
-
export function dumpBlockedWrites() {
|
|
159
|
-
log(`=== BLOCKED STDOUT/STDERR WRITES ===`);
|
|
160
|
-
log(`Total tracked: ${blockedWrites.length} (showing last 10)`);
|
|
161
|
-
const recent = blockedWrites.slice(-10);
|
|
162
|
-
for (let i = 0; i < recent.length; i++) {
|
|
163
|
-
const write = recent[i];
|
|
164
|
-
log(`${i + 1}. [${write.stream}] at ${new Date(write.ts).toISOString()}`);
|
|
165
|
-
log(` content: "${write.content}"`);
|
|
166
|
-
log(` stack: ${write.stack}`);
|
|
167
|
-
}
|
|
168
|
-
log(`=== END BLOCKED WRITES ===`);
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Monkeypatch stdout/stderr to catch writes
|
|
172
|
-
*
|
|
173
|
-
* Enhanced: Detect corruption during TUI runtime (captures stack traces)
|
|
174
|
-
*/
|
|
175
|
-
export function installStdoutMonkeypatch() {
|
|
176
|
-
const originalStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
177
|
-
const originalStderrWrite = process.stderr.write.bind(process.stderr);
|
|
178
|
-
// Patch stdout
|
|
179
|
-
process.stdout.write = function (chunk, ...args) {
|
|
180
|
-
const content = String(chunk);
|
|
181
|
-
// Allow ANSI escape codes (cursor control) and blessed writes
|
|
182
|
-
const stack = new Error().stack || '';
|
|
183
|
-
const isBlessed = stack.includes('neo-blessed') || stack.includes('Program.prototype') || stack.includes('blessed');
|
|
184
|
-
const isAnsiEscape = /^\x1b\[[\d;]*[A-Za-z]/.test(content);
|
|
185
|
-
const isClearScreen = content === '\x1b[2J\x1b[H' || content.includes('\x1b[2J');
|
|
186
|
-
// Allow blessed, ANSI escapes, and clear screen commands (from our hard clear)
|
|
187
|
-
if (isBlessed || isAnsiEscape || isClearScreen) {
|
|
188
|
-
return originalStdoutWrite(chunk, ...args);
|
|
189
|
-
}
|
|
190
|
-
// Block and track (capture full stack for corruption detection)
|
|
191
|
-
trackBlockedWrite('stdout', content);
|
|
192
|
-
return true; // Pretend success to prevent corruption
|
|
193
|
-
};
|
|
194
|
-
// Patch stderr (track but allow - less strict)
|
|
195
|
-
process.stderr.write = function (chunk, ...args) {
|
|
196
|
-
const content = String(chunk);
|
|
197
|
-
// Track but allow stderr (some libraries use it for errors)
|
|
198
|
-
trackBlockedWrite('stderr', content);
|
|
199
|
-
return originalStderrWrite(chunk, ...args);
|
|
200
|
-
};
|
|
201
|
-
// Return cleanup function
|
|
202
|
-
return () => {
|
|
203
|
-
process.stdout.write = originalStdoutWrite;
|
|
204
|
-
process.stderr.write = originalStderrWrite;
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
let resizeStats = {
|
|
208
|
-
eventCount: 0,
|
|
209
|
-
applyCount: 0,
|
|
210
|
-
handlerBound: false,
|
|
211
|
-
listenerCount: 0,
|
|
212
|
-
uiRebuildCount: 0
|
|
213
|
-
};
|
|
214
|
-
/**
|
|
215
|
-
* Update resize stats (called from phase1RuntimeClean)
|
|
216
|
-
*/
|
|
217
|
-
export function updateResizeStats(stats) {
|
|
218
|
-
resizeStats = { ...resizeStats, ...stats };
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Get resize stats (exported for debug commands)
|
|
222
|
-
*/
|
|
223
|
-
export function getResizeStats() {
|
|
224
|
-
return { ...resizeStats };
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Get current statistics
|
|
228
|
-
*/
|
|
229
|
-
export function getDebugStats() {
|
|
230
|
-
return {
|
|
231
|
-
bootId: BOOT_ID,
|
|
232
|
-
widgetCount: widgetRegistry.size,
|
|
233
|
-
listenerCount: listenerBindings.length,
|
|
234
|
-
blockedWriteCount: blockedWrites.length,
|
|
235
|
-
resizeStats: getResizeStats()
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
//# sourceMappingURL=debugUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debugUtils.js","sourceRoot":"","sources":["../../../../src/ui/v3/ui/debugUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/C,6CAA6C;AAC7C,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;AAUrF,MAAM,cAAc,G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W,EAAE,GAAG,KAAK,EAAE,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,EAAE,GAAG,WAAW,EAAE,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;IAO3B,OAAO;QACL,MAAM,EAAE,OAAO;QACf,WAAW,EAAE,cAAc,CAAC,IAAI;QAChC,aAAa,EAAE,gBAAgB,CAAC,MAAM;QACtC,iBAAiB,EAAE,aAAa,CAAC,MAAM;QACvC,WAAW,EAAE,cAAc,EAAE;KAC9B,CAAC;AACJ,CAAC"}
|
package/dist/ui/v3/ui/focus.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Focus State Machine
|
|
3
|
-
*
|
|
4
|
-
* Single source of truth for input focus.
|
|
5
|
-
* Prevents panels from receiving input.
|
|
6
|
-
*/
|
|
7
|
-
export type FocusMode = "HUB" | "COMMAND" | "PALETTE";
|
|
8
|
-
/**
|
|
9
|
-
* Get current focus mode
|
|
10
|
-
*/
|
|
11
|
-
export declare function getFocusMode(): FocusMode;
|
|
12
|
-
/**
|
|
13
|
-
* Set focus mode
|
|
14
|
-
*/
|
|
15
|
-
export declare function setFocusMode(mode: FocusMode): void;
|
|
16
|
-
/**
|
|
17
|
-
* Check if command line is focused
|
|
18
|
-
*/
|
|
19
|
-
export declare function isCommandFocused(): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Check if palette is focused
|
|
22
|
-
*/
|
|
23
|
-
export declare function isPaletteFocused(): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Check if hub is focused (default state)
|
|
26
|
-
*/
|
|
27
|
-
export declare function isHubFocused(): boolean;
|
|
28
|
-
//# sourceMappingURL=focus.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/ui/focus.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC;AAItD;;GAEG;AACH,wBAAgB,YAAY,IAAI,SAAS,CAExC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAElD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
|
package/dist/ui/v3/ui/focus.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Focus State Machine
|
|
3
|
-
*
|
|
4
|
-
* Single source of truth for input focus.
|
|
5
|
-
* Prevents panels from receiving input.
|
|
6
|
-
*/
|
|
7
|
-
let currentFocus = "HUB";
|
|
8
|
-
/**
|
|
9
|
-
* Get current focus mode
|
|
10
|
-
*/
|
|
11
|
-
export function getFocusMode() {
|
|
12
|
-
return currentFocus;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Set focus mode
|
|
16
|
-
*/
|
|
17
|
-
export function setFocusMode(mode) {
|
|
18
|
-
currentFocus = mode;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Check if command line is focused
|
|
22
|
-
*/
|
|
23
|
-
export function isCommandFocused() {
|
|
24
|
-
return currentFocus === "COMMAND";
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Check if palette is focused
|
|
28
|
-
*/
|
|
29
|
-
export function isPaletteFocused() {
|
|
30
|
-
return currentFocus === "PALETTE";
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Check if hub is focused (default state)
|
|
34
|
-
*/
|
|
35
|
-
export function isHubFocused() {
|
|
36
|
-
return currentFocus === "HUB";
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=focus.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"focus.js","sourceRoot":"","sources":["../../../../src/ui/v3/ui/focus.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,IAAI,YAAY,GAAc,KAAK,CAAC;AAEpC;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,IAAe;IAC1C,YAAY,GAAG,IAAI,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,YAAY,KAAK,SAAS,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,YAAY,KAAK,SAAS,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,YAAY,KAAK,KAAK,CAAC;AAChC,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hub Layout Calculator
|
|
3
|
-
*
|
|
4
|
-
* Pure function to compute panel positions and sizes.
|
|
5
|
-
* NO blessed logic here - just math.
|
|
6
|
-
*/
|
|
7
|
-
export interface BoxRect {
|
|
8
|
-
top: number;
|
|
9
|
-
left: number;
|
|
10
|
-
width: number;
|
|
11
|
-
height: number;
|
|
12
|
-
}
|
|
13
|
-
export interface HubLayout {
|
|
14
|
-
posture: BoxRect;
|
|
15
|
-
resources: BoxRect;
|
|
16
|
-
assets: BoxRect;
|
|
17
|
-
feed: BoxRect;
|
|
18
|
-
network: BoxRect;
|
|
19
|
-
capabilities: BoxRect;
|
|
20
|
-
bottom: BoxRect;
|
|
21
|
-
}
|
|
22
|
-
export interface LayoutResult {
|
|
23
|
-
ok: boolean;
|
|
24
|
-
layout?: HubLayout;
|
|
25
|
-
errorMessage?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Compute hub layout for given terminal dimensions
|
|
29
|
-
*
|
|
30
|
-
* Layout structure:
|
|
31
|
-
* - Left column (3 panels): POSTURE, RESOURCES, ACTIVE ASSETS (~30% width)
|
|
32
|
-
* - Center main (1 panel): OPERATIONS FEED (remaining width)
|
|
33
|
-
* - Right column (2 panels): NETWORK/ORIGIN, CAPABILITY FLAGS (~25% width)
|
|
34
|
-
* - Bottom bar (1 panel): COMMAND SURFACE + STATUS STRIP (fixed 3 lines)
|
|
35
|
-
*
|
|
36
|
-
* Rules:
|
|
37
|
-
* - Minimum size: 120x35
|
|
38
|
-
* - No overlaps
|
|
39
|
-
* - No negative dimensions
|
|
40
|
-
* - No zero-height panels
|
|
41
|
-
*/
|
|
42
|
-
export declare function computeHubLayout(width: number, height: number): LayoutResult;
|
|
43
|
-
//# sourceMappingURL=hubLayout.d.ts.map
|