4runr-os 2.1.2 → 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,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 1 - Command Line Input System
|
|
3
|
-
*
|
|
4
|
-
* Clean implementation with:
|
|
5
|
-
* - 3 widgets: Label box, Input textbox, Status strip
|
|
6
|
-
* - Only textbox is focusable
|
|
7
|
-
* - Deduplicated handler registration
|
|
8
|
-
* - Proper cursor alignment
|
|
9
|
-
* - Focus lock
|
|
10
|
-
*/
|
|
11
|
-
import type { Widgets } from 'neo-blessed';
|
|
12
|
-
export interface CommandLineWidgets {
|
|
13
|
-
labelBox: Widgets.Box;
|
|
14
|
-
inputTextbox: Widgets.Textbox;
|
|
15
|
-
statusStrip: Widgets.Box;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Create the three command line widgets
|
|
19
|
-
*
|
|
20
|
-
* Layout:
|
|
21
|
-
* [Label Box: "4runr> "] [Input Textbox] [Status Strip]
|
|
22
|
-
*/
|
|
23
|
-
export declare function createCommandLineWidgets(screen: Widgets.Screen, top: number, left: number, width: number, height: number): CommandLineWidgets;
|
|
24
|
-
/**
|
|
25
|
-
* Focus command input (without creating refocus loops)
|
|
26
|
-
*
|
|
27
|
-
* Rules:
|
|
28
|
-
* - Call only: once on startup, after submit, after command handling
|
|
29
|
-
* - Do NOT call inside: screen.on("render"), periodic loops, panel renders
|
|
30
|
-
*/
|
|
31
|
-
export declare function focusCommandInput(widgets: CommandLineWidgets, reason?: string): void;
|
|
32
|
-
/**
|
|
33
|
-
* Attach command line handlers (deduplicated)
|
|
34
|
-
*
|
|
35
|
-
* Rules:
|
|
36
|
-
* - Attach exactly once (guarded)
|
|
37
|
-
* - Use textbox events only for typing + Enter submission
|
|
38
|
-
* - Use screen keys only for global exit shortcuts (q, Ctrl+C)
|
|
39
|
-
*/
|
|
40
|
-
export declare function attachCommandLineHandlers(screen: Widgets.Screen, widgets: CommandLineWidgets, onSubmit: (value: string) => void, onCancel?: () => void, forceReattach?: boolean): void;
|
|
41
|
-
/**
|
|
42
|
-
* Update status strip content
|
|
43
|
-
*/
|
|
44
|
-
export declare function updateStatusStrip(widgets: CommandLineWidgets, content: string): void;
|
|
45
|
-
/**
|
|
46
|
-
* Reset handler attachment guard (for testing or re-attachment)
|
|
47
|
-
*/
|
|
48
|
-
export declare function resetCommandLineHandlers(): void;
|
|
49
|
-
//# sourceMappingURL=commandLine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commandLine.d.ts","sourceRoot":"","sources":["../../../../../src/ui/v3/section1/runtime/commandLine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAI3C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC,OAAO,CAAC;IAC9B,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC;CAC1B;AASD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,kBAAkB,CAmEpB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,kBAAkB,EAC3B,MAAM,CAAC,EAAE,MAAM,GACd,IAAI,CASN;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,EACjC,QAAQ,CAAC,EAAE,MAAM,IAAI,EACrB,aAAa,GAAE,OAAe,GAC7B,IAAI,CAuEN;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,MAAM,GACd,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 1 - Command Line Input System
|
|
3
|
-
*
|
|
4
|
-
* Clean implementation with:
|
|
5
|
-
* - 3 widgets: Label box, Input textbox, Status strip
|
|
6
|
-
* - Only textbox is focusable
|
|
7
|
-
* - Deduplicated handler registration
|
|
8
|
-
* - Proper cursor alignment
|
|
9
|
-
* - Focus lock
|
|
10
|
-
*/
|
|
11
|
-
import blessed from 'neo-blessed';
|
|
12
|
-
const blessedLib = blessed;
|
|
13
|
-
const PROMPT = '4runr> ';
|
|
14
|
-
const PROMPT_WIDTH = PROMPT.length;
|
|
15
|
-
const GAP = 1; // Gap between label and input
|
|
16
|
-
// Track which textbox has handlers attached (to allow re-attachment after resize)
|
|
17
|
-
let lastTextboxWithHandlers = null;
|
|
18
|
-
/**
|
|
19
|
-
* Create the three command line widgets
|
|
20
|
-
*
|
|
21
|
-
* Layout:
|
|
22
|
-
* [Label Box: "4runr> "] [Input Textbox] [Status Strip]
|
|
23
|
-
*/
|
|
24
|
-
export function createCommandLineWidgets(screen, top, left, width, height) {
|
|
25
|
-
// Calculate widths
|
|
26
|
-
const statusWidth = 40; // Fixed width for status strip
|
|
27
|
-
const inputWidth = width - PROMPT_WIDTH - GAP - statusWidth - GAP;
|
|
28
|
-
// 1. Label box (read-only, non-focusable)
|
|
29
|
-
const labelBox = blessedLib.box({
|
|
30
|
-
top,
|
|
31
|
-
left,
|
|
32
|
-
width: PROMPT_WIDTH,
|
|
33
|
-
height: 1,
|
|
34
|
-
content: PROMPT,
|
|
35
|
-
tags: false, // No tags to avoid width issues
|
|
36
|
-
mouse: false,
|
|
37
|
-
keys: false,
|
|
38
|
-
focusable: false,
|
|
39
|
-
clickable: false,
|
|
40
|
-
});
|
|
41
|
-
// 2. Input textbox (only focusable + only writable)
|
|
42
|
-
const inputTextbox = blessedLib.textbox({
|
|
43
|
-
top,
|
|
44
|
-
left: left + PROMPT_WIDTH + GAP,
|
|
45
|
-
width: inputWidth,
|
|
46
|
-
height: 1,
|
|
47
|
-
inputOnFocus: true,
|
|
48
|
-
keys: true,
|
|
49
|
-
mouse: true,
|
|
50
|
-
censor: false,
|
|
51
|
-
padding: {
|
|
52
|
-
left: 0,
|
|
53
|
-
right: 0,
|
|
54
|
-
top: 0,
|
|
55
|
-
bottom: 0,
|
|
56
|
-
},
|
|
57
|
-
style: {
|
|
58
|
-
fg: 'white',
|
|
59
|
-
focus: {
|
|
60
|
-
fg: 'white',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
// 3. Status strip (read-only, non-focusable)
|
|
65
|
-
const statusStrip = blessedLib.box({
|
|
66
|
-
top,
|
|
67
|
-
left: left + PROMPT_WIDTH + GAP + inputWidth + GAP,
|
|
68
|
-
width: statusWidth,
|
|
69
|
-
height: 1,
|
|
70
|
-
content: 'MODE: LOCAL | CONNECT: ... | POSTURE: ...',
|
|
71
|
-
tags: false,
|
|
72
|
-
mouse: false,
|
|
73
|
-
keys: false,
|
|
74
|
-
focusable: false,
|
|
75
|
-
clickable: false,
|
|
76
|
-
});
|
|
77
|
-
// Append to screen
|
|
78
|
-
screen.append(labelBox);
|
|
79
|
-
screen.append(inputTextbox);
|
|
80
|
-
screen.append(statusStrip);
|
|
81
|
-
return {
|
|
82
|
-
labelBox,
|
|
83
|
-
inputTextbox,
|
|
84
|
-
statusStrip,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Focus command input (without creating refocus loops)
|
|
89
|
-
*
|
|
90
|
-
* Rules:
|
|
91
|
-
* - Call only: once on startup, after submit, after command handling
|
|
92
|
-
* - Do NOT call inside: screen.on("render"), periodic loops, panel renders
|
|
93
|
-
*/
|
|
94
|
-
export function focusCommandInput(widgets, reason) {
|
|
95
|
-
// Use setImmediate to ensure focus happens after current render cycle
|
|
96
|
-
setImmediate(() => {
|
|
97
|
-
try {
|
|
98
|
-
widgets.inputTextbox.focus();
|
|
99
|
-
}
|
|
100
|
-
catch (e) {
|
|
101
|
-
// Ignore focus errors (widget might be destroyed)
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Attach command line handlers (deduplicated)
|
|
107
|
-
*
|
|
108
|
-
* Rules:
|
|
109
|
-
* - Attach exactly once (guarded)
|
|
110
|
-
* - Use textbox events only for typing + Enter submission
|
|
111
|
-
* - Use screen keys only for global exit shortcuts (q, Ctrl+C)
|
|
112
|
-
*/
|
|
113
|
-
export function attachCommandLineHandlers(screen, widgets, onSubmit, onCancel, forceReattach = false) {
|
|
114
|
-
const { inputTextbox } = widgets;
|
|
115
|
-
// If handlers already attached to this textbox and not forcing re-attach, skip
|
|
116
|
-
if (!forceReattach && lastTextboxWithHandlers === inputTextbox) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
// Remove old handlers if switching textboxes (shouldn't happen, but safety)
|
|
120
|
-
if (lastTextboxWithHandlers && lastTextboxWithHandlers !== inputTextbox) {
|
|
121
|
-
// Handlers are bound to the widget, so old widget will be destroyed
|
|
122
|
-
// No need to manually remove
|
|
123
|
-
}
|
|
124
|
-
// If forcing re-attach on same textbox, remove all listeners first
|
|
125
|
-
if (forceReattach && lastTextboxWithHandlers === inputTextbox) {
|
|
126
|
-
// Remove all event listeners (blessed doesn't expose removeAllListeners, so we'll just re-attach)
|
|
127
|
-
// The new handlers will override the old ones
|
|
128
|
-
}
|
|
129
|
-
lastTextboxWithHandlers = inputTextbox;
|
|
130
|
-
// Handle Enter key explicitly (blessed textbox needs this)
|
|
131
|
-
inputTextbox.key('enter', () => {
|
|
132
|
-
// Get value from textbox (blessed textbox uses .value property)
|
|
133
|
-
const value = inputTextbox.value || '';
|
|
134
|
-
const trimmed = value.trim();
|
|
135
|
-
if (trimmed) {
|
|
136
|
-
onSubmit(trimmed);
|
|
137
|
-
}
|
|
138
|
-
// Clear input
|
|
139
|
-
inputTextbox.clearValue();
|
|
140
|
-
// Refocus (after submit)
|
|
141
|
-
focusCommandInput(widgets, 'submit');
|
|
142
|
-
});
|
|
143
|
-
// Also handle submit event (in case blessed emits it)
|
|
144
|
-
inputTextbox.on('submit', (value) => {
|
|
145
|
-
const trimmed = value.trim();
|
|
146
|
-
if (trimmed) {
|
|
147
|
-
onSubmit(trimmed);
|
|
148
|
-
}
|
|
149
|
-
// Clear input
|
|
150
|
-
inputTextbox.clearValue();
|
|
151
|
-
// Refocus (after submit)
|
|
152
|
-
focusCommandInput(widgets, 'submit');
|
|
153
|
-
});
|
|
154
|
-
// Optional cancel handler
|
|
155
|
-
if (onCancel) {
|
|
156
|
-
inputTextbox.on('cancel', () => {
|
|
157
|
-
inputTextbox.clearValue();
|
|
158
|
-
onCancel();
|
|
159
|
-
focusCommandInput(widgets, 'cancel');
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
// Handle Escape key to clear input
|
|
163
|
-
inputTextbox.key('escape', () => {
|
|
164
|
-
inputTextbox.clearValue();
|
|
165
|
-
focusCommandInput(widgets, 'escape');
|
|
166
|
-
});
|
|
167
|
-
// Do NOT attach screen-level keypress handlers for typing
|
|
168
|
-
// The textbox handles all typing automatically
|
|
169
|
-
// Only use screen keys for global shortcuts (already handled in Section 0)
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Update status strip content
|
|
173
|
-
*/
|
|
174
|
-
export function updateStatusStrip(widgets, content) {
|
|
175
|
-
widgets.statusStrip.setContent(content);
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Reset handler attachment guard (for testing or re-attachment)
|
|
179
|
-
*/
|
|
180
|
-
export function resetCommandLineHandlers() {
|
|
181
|
-
lastTextboxWithHandlers = null;
|
|
182
|
-
}
|
|
183
|
-
//# sourceMappingURL=commandLine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commandLine.js","sourceRoot":"","sources":["../../../../../src/ui/v3/section1/runtime/commandLine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,OAAO,MAAM,aAAa,CAAC;AAGlC,MAAM,UAAU,GAAG,OAAc,CAAC;AAQlC,MAAM,MAAM,GAAG,SAAS,CAAC;AACzB,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC;AACnC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,8BAA8B;AAE7C,kFAAkF;AAClF,IAAI,uBAAuB,GAA2B,IAAI,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAAsB,EACtB,GAAW,EACX,IAAY,EACZ,KAAa,EACb,MAAc;IAEd,mBAAmB;IACnB,MAAM,WAAW,GAAG,EAAE,CAAC,CAAC,+BAA+B;IACvD,MAAM,UAAU,GAAG,KAAK,GAAG,YAAY,GAAG,GAAG,GAAG,WAAW,GAAG,GAAG,CAAC;IAElE,0CAA0C;IAC1C,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC;QAC9B,GAAG;QACH,IAAI;QACJ,KAAK,EAAE,YAAY;QACnB,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,KAAK,EAAE,gCAAgC;QAC7C,KAAK,EAAE,KAAK;QACZ,IAA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,EAAE;QAC1C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAC7B,IAAI,OAAO,EAAE,CAAC;YACZ,QAAQ,CAAC,OAAO,CAAC,CAAC;QACpB,CAAC;QAED,cAAc;QACd,YAAY,CAAC,UAAU,EAAE,CAAC;QAE1B,yBAAyB;QACzB,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,0BAA0B;IAC1B,IAAI,QAAQ,EAAE,CAAC;QACb,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;YAC7B,YAAY,CAAC,UAAU,EAAE,CAAC;YAC1B,QAAQ,EAAE,CAAC;YACX,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,mCAAmC;IACnC,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE;QAC9B,YAAY,CAAC,UAAU,EAAE,CAAC;QAC1B,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,0DAA0D;IAC1D,+CAA+C;IAC/C,2EAA2E;AAC7E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,OAA2B,EAC3B,OAAe;IAEf,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB;IACtC,uBAAuB,GAAG,IAAI,CAAC;AACjC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 1 - Focus Lock
|
|
3
|
-
*
|
|
4
|
-
* Ensures focus never leaves the command input
|
|
5
|
-
* - Panels are non-focusable
|
|
6
|
-
* - Clicking panels refocuses input
|
|
7
|
-
* - Tab navigation is disabled or overridden
|
|
8
|
-
*/
|
|
9
|
-
import type { Widgets } from 'neo-blessed';
|
|
10
|
-
/**
|
|
11
|
-
* Apply focus lock to a panel widget
|
|
12
|
-
*
|
|
13
|
-
* Makes the panel non-focusable and redirects clicks to command input
|
|
14
|
-
*/
|
|
15
|
-
export declare function lockPanelFocus(panel: Widgets.Box, refocusInput: () => void): void;
|
|
16
|
-
/**
|
|
17
|
-
* Lock focus on all panels
|
|
18
|
-
*/
|
|
19
|
-
export declare function lockAllPanelsFocus(panels: Widgets.Box[], refocusInput: () => void): void;
|
|
20
|
-
/**
|
|
21
|
-
* Override Tab key to refocus input instead of moving focus
|
|
22
|
-
*/
|
|
23
|
-
export declare function overrideTabNavigation(screen: Widgets.Screen, refocusInput: () => void): void;
|
|
24
|
-
//# sourceMappingURL=focusLock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"focusLock.d.ts","sourceRoot":"","sources":["../../../../../src/ui/v3/section1/runtime/focusLock.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,CAAC,GAAG,EAClB,YAAY,EAAE,MAAM,IAAI,GACvB,IAAI,CAcN;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,EACrB,YAAY,EAAE,MAAM,IAAI,GACvB,IAAI,CAIN;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,YAAY,EAAE,MAAM,IAAI,GACvB,IAAI,CAIN"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 1 - Focus Lock
|
|
3
|
-
*
|
|
4
|
-
* Ensures focus never leaves the command input
|
|
5
|
-
* - Panels are non-focusable
|
|
6
|
-
* - Clicking panels refocuses input
|
|
7
|
-
* - Tab navigation is disabled or overridden
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Apply focus lock to a panel widget
|
|
11
|
-
*
|
|
12
|
-
* Makes the panel non-focusable and redirects clicks to command input
|
|
13
|
-
*/
|
|
14
|
-
export function lockPanelFocus(panel, refocusInput) {
|
|
15
|
-
// Make panel non-focusable
|
|
16
|
-
panel.focusable = false;
|
|
17
|
-
panel.keyable = false;
|
|
18
|
-
panel.mouse = false;
|
|
19
|
-
panel.clickable = false;
|
|
20
|
-
panel.keys = false;
|
|
21
|
-
panel.input = false;
|
|
22
|
-
panel.inputOnFocus = false;
|
|
23
|
-
// If mouse is needed for future drilldowns, redirect clicks to refocus input
|
|
24
|
-
panel.on('click', () => {
|
|
25
|
-
refocusInput();
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Lock focus on all panels
|
|
30
|
-
*/
|
|
31
|
-
export function lockAllPanelsFocus(panels, refocusInput) {
|
|
32
|
-
for (const panel of panels) {
|
|
33
|
-
lockPanelFocus(panel, refocusInput);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Override Tab key to refocus input instead of moving focus
|
|
38
|
-
*/
|
|
39
|
-
export function overrideTabNavigation(screen, refocusInput) {
|
|
40
|
-
screen.key('tab', () => {
|
|
41
|
-
refocusInput();
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=focusLock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"focusLock.js","sourceRoot":"","sources":["../../../../../src/ui/v3/section1/runtime/focusLock.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAkB,EAClB,YAAwB;IAExB,2BAA2B;IAC1B,KAAa,CAAC,SAAS,GAAG,KAAK,CAAC;IAChC,KAAa,CAAC,OAAO,GAAG,KAAK,CAAC;IAC9B,KAAa,CAAC,KAAK,GAAG,KAAK,CAAC;IAC5B,KAAa,CAAC,SAAS,GAAG,KAAK,CAAC;IAChC,KAAa,CAAC,IAAI,GAAG,KAAK,CAAC;IAC3B,KAAa,CAAC,KAAK,GAAG,KAAK,CAAC;IAC5B,KAAa,CAAC,YAAY,GAAG,KAAK,CAAC;IAEpC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;QACrB,YAAY,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAqB,EACrB,YAAwB;IAExB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,cAAc,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IACtC,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAsB,EACtB,YAAwB;IAExB,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE;QACrB,YAAY,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 4: UiState Validation (Runtime Contract)
|
|
3
|
-
*
|
|
4
|
-
* Catches illegal state mutations at runtime.
|
|
5
|
-
* Provides immediate, deterministic failure (no silent broken UI).
|
|
6
|
-
*
|
|
7
|
-
* Validation rules:
|
|
8
|
-
* - State must be an object
|
|
9
|
-
* - Must include all keys exactly
|
|
10
|
-
* - For each key:
|
|
11
|
-
* - Must have availability in allowed set
|
|
12
|
-
* - If AVAILABLE → must have value
|
|
13
|
-
* - If UNAVAILABLE/UNKNOWN → must not have value
|
|
14
|
-
*/
|
|
15
|
-
import type { UiState } from './uiState.js';
|
|
16
|
-
/**
|
|
17
|
-
* Assert that state is a valid UiState
|
|
18
|
-
*
|
|
19
|
-
* Throws concise errors like:
|
|
20
|
-
* - UISTATE_INVALID: assets missing
|
|
21
|
-
* - UISTATE_INVALID: resources AVAILABLE missing value
|
|
22
|
-
*
|
|
23
|
-
* No stack dumps into the Operations Feed (this is internal).
|
|
24
|
-
* If you surface it, wrap it as a single [ERR] event with capped details.
|
|
25
|
-
*/
|
|
26
|
-
export declare function assertUiState(state: any): asserts state is UiState;
|
|
27
|
-
//# sourceMappingURL=assertUiState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assertUiState.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/assertUiState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAmD5C;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAuBlE"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 4: UiState Validation (Runtime Contract)
|
|
3
|
-
*
|
|
4
|
-
* Catches illegal state mutations at runtime.
|
|
5
|
-
* Provides immediate, deterministic failure (no silent broken UI).
|
|
6
|
-
*
|
|
7
|
-
* Validation rules:
|
|
8
|
-
* - State must be an object
|
|
9
|
-
* - Must include all keys exactly
|
|
10
|
-
* - For each key:
|
|
11
|
-
* - Must have availability in allowed set
|
|
12
|
-
* - If AVAILABLE → must have value
|
|
13
|
-
* - If UNAVAILABLE/UNKNOWN → must not have value
|
|
14
|
-
*/
|
|
15
|
-
const REQUIRED_KEYS = [
|
|
16
|
-
'posture',
|
|
17
|
-
'resources',
|
|
18
|
-
'assets',
|
|
19
|
-
'network',
|
|
20
|
-
'capabilities',
|
|
21
|
-
'statusStrip',
|
|
22
|
-
];
|
|
23
|
-
const VALID_AVAILABILITY = ["AVAILABLE", "UNAVAILABLE", "UNKNOWN", "LOADING"];
|
|
24
|
-
/**
|
|
25
|
-
* Assert that a value has valid structure
|
|
26
|
-
*/
|
|
27
|
-
function assertValue(key, value) {
|
|
28
|
-
if (!value || typeof value !== 'object') {
|
|
29
|
-
throw new Error(`UISTATE_INVALID: ${key} is not an object`);
|
|
30
|
-
}
|
|
31
|
-
if (!('availability' in value)) {
|
|
32
|
-
throw new Error(`UISTATE_INVALID: ${key} missing availability`);
|
|
33
|
-
}
|
|
34
|
-
const availability = value.availability;
|
|
35
|
-
if (!VALID_AVAILABILITY.includes(availability)) {
|
|
36
|
-
throw new Error(`UISTATE_INVALID: ${key} has invalid availability: ${availability}`);
|
|
37
|
-
}
|
|
38
|
-
if (availability === "AVAILABLE") {
|
|
39
|
-
if (!('value' in value)) {
|
|
40
|
-
throw new Error(`UISTATE_INVALID: ${key} AVAILABLE missing value`);
|
|
41
|
-
}
|
|
42
|
-
// AVAILABLE must not have reason/nextAction (they're for UNAVAILABLE/UNKNOWN)
|
|
43
|
-
if ('reason' in value || 'nextAction' in value) {
|
|
44
|
-
throw new Error(`UISTATE_INVALID: ${key} AVAILABLE should not have reason/nextAction`);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
else if (availability === "LOADING") {
|
|
48
|
-
// LOADING is transient - no value required, but can have reason and meta
|
|
49
|
-
// Don't validate value presence for LOADING
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
// UNAVAILABLE or UNKNOWN must not have value
|
|
53
|
-
if ('value' in value) {
|
|
54
|
-
throw new Error(`UISTATE_INVALID: ${key} ${availability} should not have value`);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Assert that state is a valid UiState
|
|
60
|
-
*
|
|
61
|
-
* Throws concise errors like:
|
|
62
|
-
* - UISTATE_INVALID: assets missing
|
|
63
|
-
* - UISTATE_INVALID: resources AVAILABLE missing value
|
|
64
|
-
*
|
|
65
|
-
* No stack dumps into the Operations Feed (this is internal).
|
|
66
|
-
* If you surface it, wrap it as a single [ERR] event with capped details.
|
|
67
|
-
*/
|
|
68
|
-
export function assertUiState(state) {
|
|
69
|
-
if (!state || typeof state !== 'object') {
|
|
70
|
-
throw new Error('UISTATE_INVALID: state is not an object');
|
|
71
|
-
}
|
|
72
|
-
// Check all required keys are present
|
|
73
|
-
for (const key of REQUIRED_KEYS) {
|
|
74
|
-
if (!(key in state)) {
|
|
75
|
-
throw new Error(`UISTATE_INVALID: ${key} missing`);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
// Check no extra keys (strict contract)
|
|
79
|
-
const stateKeys = Object.keys(state);
|
|
80
|
-
const extraKeys = stateKeys.filter(k => !REQUIRED_KEYS.includes(k));
|
|
81
|
-
if (extraKeys.length > 0) {
|
|
82
|
-
throw new Error(`UISTATE_INVALID: extra keys found: ${extraKeys.join(', ')}`);
|
|
83
|
-
}
|
|
84
|
-
// Validate each key's value structure
|
|
85
|
-
for (const key of REQUIRED_KEYS) {
|
|
86
|
-
assertValue(key, state[key]);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=assertUiState.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assertUiState.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/assertUiState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,MAAM,aAAa,GAAsB;IACvC,SAAS;IACT,WAAW;IACX,QAAQ;IACR,SAAS;IACT,cAAc;IACd,aAAa;CACd,CAAC;AAEF,MAAM,kBAAkB,GAAmB,CAAC,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAE9F;;GAEG;AACH,SAAS,WAAW,CAAI,GAAW,EAAE,KAAU;IAC7C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,mBAAmB,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI,CAAC,CAAC,cAAc,IAAI,KAAK,CAAC,EAAE,CAAC;QAC/B,MA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,GAAG,UAAU,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IAED,wCAAwC;IACxC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,MAAM,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAkB,CAAC,CAAC,CAAC;IACrF,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,sCAAsC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChF,CAAC;IAED,sCAAsC;IACtC,KAAK,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;QAChC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Capabilities Store - Single Source of Truth
|
|
3
|
-
*
|
|
4
|
-
* Stores capabilities fetched from Gateway
|
|
5
|
-
*/
|
|
6
|
-
export type CapabilitiesState = {
|
|
7
|
-
status: "unloaded";
|
|
8
|
-
} | {
|
|
9
|
-
status: "loading";
|
|
10
|
-
} | {
|
|
11
|
-
status: "loaded";
|
|
12
|
-
items: string[];
|
|
13
|
-
} | {
|
|
14
|
-
status: "error";
|
|
15
|
-
message: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Capabilities store (singleton)
|
|
19
|
-
*/
|
|
20
|
-
declare class CapabilitiesStore {
|
|
21
|
-
private state;
|
|
22
|
-
private listeners;
|
|
23
|
-
/**
|
|
24
|
-
* Get current capabilities state
|
|
25
|
-
*/
|
|
26
|
-
getState(): CapabilitiesState;
|
|
27
|
-
/**
|
|
28
|
-
* Subscribe to state changes
|
|
29
|
-
*/
|
|
30
|
-
subscribe(listener: (state: CapabilitiesState) => void): () => void;
|
|
31
|
-
/**
|
|
32
|
-
* Update capabilities state (internal)
|
|
33
|
-
*/
|
|
34
|
-
private setState;
|
|
35
|
-
/**
|
|
36
|
-
* Set loading state
|
|
37
|
-
*/
|
|
38
|
-
setLoading(): void;
|
|
39
|
-
/**
|
|
40
|
-
* Set loaded state
|
|
41
|
-
*/
|
|
42
|
-
setLoaded(items: string[]): void;
|
|
43
|
-
/**
|
|
44
|
-
* Set error state
|
|
45
|
-
*/
|
|
46
|
-
setError(message: string): void;
|
|
47
|
-
/**
|
|
48
|
-
* Reset to unloaded
|
|
49
|
-
*/
|
|
50
|
-
reset(): void;
|
|
51
|
-
}
|
|
52
|
-
export declare const capabilitiesStore: CapabilitiesStore;
|
|
53
|
-
export {};
|
|
54
|
-
//# sourceMappingURL=capabilitiesStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilitiesStore.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/capabilitiesStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,iBAAiB,GACzB;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GACtB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GACrC;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC;;GAEG;AACH,cAAM,iBAAiB;IACrB,OAAO,CAAC,KAAK,CAEX;IAEF,OAAO,CAAC,SAAS,CAAsD;IAEvE;;OAEG;IACH,QAAQ,IAAI,iBAAiB;IAI7B;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,MAAM,IAAI;IAOnE;;OAEG;IACH,OAAO,CAAC,QAAQ;IAiBhB;;OAEG;IACH,UAAU,IAAI,IAAI;IAIlB;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAIhC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI/B;;OAEG;IACH,KAAK,IAAI,IAAI;CAGd;AAGD,eAAO,MAAM,iBAAiB,mBAA0B,CAAC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Capabilities Store - Single Source of Truth
|
|
3
|
-
*
|
|
4
|
-
* Stores capabilities fetched from Gateway
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Capabilities store (singleton)
|
|
8
|
-
*/
|
|
9
|
-
class CapabilitiesStore {
|
|
10
|
-
state = {
|
|
11
|
-
status: "unloaded"
|
|
12
|
-
};
|
|
13
|
-
listeners = new Set();
|
|
14
|
-
/**
|
|
15
|
-
* Get current capabilities state
|
|
16
|
-
*/
|
|
17
|
-
getState() {
|
|
18
|
-
return this.state;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Subscribe to state changes
|
|
22
|
-
*/
|
|
23
|
-
subscribe(listener) {
|
|
24
|
-
this.listeners.add(listener);
|
|
25
|
-
return () => {
|
|
26
|
-
this.listeners.delete(listener);
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Update capabilities state (internal)
|
|
31
|
-
*/
|
|
32
|
-
setState(newState) {
|
|
33
|
-
this.state = newState;
|
|
34
|
-
this.listeners.forEach(listener => {
|
|
35
|
-
try {
|
|
36
|
-
listener(newState);
|
|
37
|
-
}
|
|
38
|
-
catch (error) {
|
|
39
|
-
// Structural Fix A: Use logger
|
|
40
|
-
// Use dynamic import without await to avoid async issues
|
|
41
|
-
import('../core/logger.js').then(({ logger }) => {
|
|
42
|
-
logger.error(`CapabilitiesStore listener error: ${error instanceof Error ? error.message : String(error)}`);
|
|
43
|
-
}).catch(() => {
|
|
44
|
-
// Logger not available - ignore
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Set loading state
|
|
51
|
-
*/
|
|
52
|
-
setLoading() {
|
|
53
|
-
this.setState({ status: "loading" });
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Set loaded state
|
|
57
|
-
*/
|
|
58
|
-
setLoaded(items) {
|
|
59
|
-
this.setState({ status: "loaded", items });
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Set error state
|
|
63
|
-
*/
|
|
64
|
-
setError(message) {
|
|
65
|
-
this.setState({ status: "error", message });
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Reset to unloaded
|
|
69
|
-
*/
|
|
70
|
-
reset() {
|
|
71
|
-
this.setState({ status: "unloaded" });
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
// Singleton instance
|
|
75
|
-
export const capabilitiesStore = new CapabilitiesStore();
|
|
76
|
-
//# sourceMappingURL=capabilitiesStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilitiesStore.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/capabilitiesStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH;;GAEG;AACH,MAAM,iBAAiB;IACb,KAAK,GAAsB;QACjC,MAAM,EAAE,UAAU;KACnB,CAAC;IAEM,SAAS,GAA4C,IAAI,GAAG,EAAE,CAAC;IAEvE;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,QAA4C;QACpD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7B,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,QAAQ,CAAC,QAA2B;QAC1C,IAAI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: Default UiState (Cold Boot State)
|
|
3
|
-
*
|
|
4
|
-
* Initial state before collectors run.
|
|
5
|
-
* All fields start as UNAVAILABLE with:
|
|
6
|
-
* - reason stating why
|
|
7
|
-
* - nextAction telling operator what to do next
|
|
8
|
-
*
|
|
9
|
-
* Hard requirements:
|
|
10
|
-
* - No key may be AVAILABLE in the default state
|
|
11
|
-
* - No key may be missing
|
|
12
|
-
* - All panels must have meaningful reason + nextAction (do not leave empty)
|
|
13
|
-
*
|
|
14
|
-
* NOTE: Posture state is initialized synchronously at boot via initializePostureState()
|
|
15
|
-
* to prevent flicker. This default is only used as a fallback.
|
|
16
|
-
*/
|
|
17
|
-
import type { UiState } from './uiState.js';
|
|
18
|
-
export declare const defaultUiState: UiState;
|
|
19
|
-
//# sourceMappingURL=defaultState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultState.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/defaultState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAK5C,eAAO,MAAM,cAAc,EAAE,OAwB5B,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section 4: Default UiState (Cold Boot State)
|
|
3
|
-
*
|
|
4
|
-
* Initial state before collectors run.
|
|
5
|
-
* All fields start as UNAVAILABLE with:
|
|
6
|
-
* - reason stating why
|
|
7
|
-
* - nextAction telling operator what to do next
|
|
8
|
-
*
|
|
9
|
-
* Hard requirements:
|
|
10
|
-
* - No key may be AVAILABLE in the default state
|
|
11
|
-
* - No key may be missing
|
|
12
|
-
* - All panels must have meaningful reason + nextAction (do not leave empty)
|
|
13
|
-
*
|
|
14
|
-
* NOTE: Posture state is initialized synchronously at boot via initializePostureState()
|
|
15
|
-
* to prevent flicker. This default is only used as a fallback.
|
|
16
|
-
*/
|
|
17
|
-
import { unavailable, unknown } from './value.js';
|
|
18
|
-
export const defaultUiState = {
|
|
19
|
-
// Posture starts as UNKNOWN (neutral) to prevent flicker
|
|
20
|
-
// Will be immediately replaced by initializePostureState() before first render
|
|
21
|
-
posture: unknown('Posture configuration not probed yet'),
|
|
22
|
-
resources: unavailable('Resources not collected', 'Waiting for first collection cycle'),
|
|
23
|
-
assets: unavailable('Asset registry not initialized', 'Start agent registry'),
|
|
24
|
-
network: unavailable('Network state unknown', 'Start Gateway service and run "connect"'),
|
|
25
|
-
capabilities: unavailable('Capabilities not loaded', 'Run "status" after connecting'),
|
|
26
|
-
statusStrip: unavailable('Status not initialized', 'System starting up'),
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=defaultState.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultState.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/defaultState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAmC,MAAM,YAAY,CAAC;AAGnF,MAAM,CAAC,MAAM,cAAc,GAAY;IACrC,yDAAyD;IACzD,+EAA+E;IAC/E,OAAO,EAAE,OAAO,CAAC,sCAAsC,CAAC;IACxD,SAAS,EAAE,WAAW,CACpB,yBAAyB,EACzB,oCAAoC,CACrC;IACD,MAAM,EAAE,WAAW,CACjB,gCAAgC,EAChC,sBAAsB,CACvB;IACD,OAAO,EAAE,WAAW,CAClB,uBAAuB,EACvB,yCAAyC,CAC1C;IACD,YAAY,EAAE,WAAW,CACvB,yBAAyB,EACzB,+BAA+B,CAChC;IACD,WAAW,EAAE,WAAW,CACtB,wBAAwB,EACxB,oBAAoB,CACrB;CACF,CAAC"}
|