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,576 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* V1 Adapter: Gateway Connection
|
|
3
|
-
*
|
|
4
|
-
* Section 6.2: Gateway Connection Enforcement (FINAL, NON-NEGOTIABLE)
|
|
5
|
-
*
|
|
6
|
-
* Wraps V1 GatewayClient for connection management
|
|
7
|
-
* - No stdout writes
|
|
8
|
-
* - No UI imports
|
|
9
|
-
* - Returns structured { ok, data } or { ok, error }
|
|
10
|
-
* - Always uses canonical gateway endpoint (no user-provided URL)
|
|
11
|
-
* - Enforces 5s timeout with AbortController
|
|
12
|
-
* - Maps failures to clear error codes
|
|
13
|
-
*/
|
|
14
|
-
import { GatewayClient } from '../../../gateway-client.js';
|
|
15
|
-
import { resolveGatewayUrl } from '../config/gateway.js';
|
|
16
|
-
import * as fs from 'fs';
|
|
17
|
-
import * as path from 'path';
|
|
18
|
-
import { homedir } from 'os';
|
|
19
|
-
import * as net from 'net';
|
|
20
|
-
import * as http from 'http';
|
|
21
|
-
import * as https from 'https';
|
|
22
|
-
import { URL } from 'url';
|
|
23
|
-
let cachedClient = null;
|
|
24
|
-
/**
|
|
25
|
-
* Get config directory path (~/.4runr)
|
|
26
|
-
*/
|
|
27
|
-
function getConfigDir() {
|
|
28
|
-
const configDir = path.join(homedir(), '.4runr');
|
|
29
|
-
if (!fs.existsSync(configDir)) {
|
|
30
|
-
fs.mkdirSync(configDir, { recursive: true });
|
|
31
|
-
}
|
|
32
|
-
return configDir;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Load saved gateway URL from config file
|
|
36
|
-
* Returns null if not found
|
|
37
|
-
*/
|
|
38
|
-
function loadSavedGatewayUrl() {
|
|
39
|
-
try {
|
|
40
|
-
const configPath = path.join(getConfigDir(), 'gateway.json');
|
|
41
|
-
if (fs.existsSync(configPath)) {
|
|
42
|
-
const data = fs.readFileSync(configPath, 'utf-8');
|
|
43
|
-
const config = JSON.parse(data);
|
|
44
|
-
if (config.url && typeof config.url === 'string') {
|
|
45
|
-
return config.url;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
catch {
|
|
50
|
-
// File read/parse failed - ignore
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Save gateway URL to config file for next time
|
|
56
|
-
*/
|
|
57
|
-
function saveGatewayUrl(url) {
|
|
58
|
-
try {
|
|
59
|
-
const configPath = path.join(getConfigDir(), 'gateway.json');
|
|
60
|
-
const config = { url };
|
|
61
|
-
fs.writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf-8');
|
|
62
|
-
}
|
|
63
|
-
catch {
|
|
64
|
-
// File write failed - ignore (non-fatal)
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Load auth token from environment or file
|
|
69
|
-
* Returns null if not found (non-fatal for now)
|
|
70
|
-
*/
|
|
71
|
-
function loadAuthToken() {
|
|
72
|
-
// Check environment variable first
|
|
73
|
-
if (process.env.FOURRUNR_TOKEN) {
|
|
74
|
-
return process.env.FOURRUNR_TOKEN;
|
|
75
|
-
}
|
|
76
|
-
// Check file: ~/.4runr/token
|
|
77
|
-
try {
|
|
78
|
-
const tokenPath = path.join(homedir(), '.4runr', 'token');
|
|
79
|
-
if (fs.existsSync(tokenPath)) {
|
|
80
|
-
const token = fs.readFileSync(tokenPath, 'utf-8').trim();
|
|
81
|
-
if (token) {
|
|
82
|
-
return token;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
catch {
|
|
87
|
-
// File read failed - ignore
|
|
88
|
-
}
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Create GatewayClient instance with optional auth token and timeout
|
|
93
|
-
*/
|
|
94
|
-
function createClient(gatewayUrl, token, timeout) {
|
|
95
|
-
const config = { gatewayUrl };
|
|
96
|
-
if (timeout) {
|
|
97
|
-
config.timeout = timeout;
|
|
98
|
-
}
|
|
99
|
-
return new GatewayClient(config);
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Try to connect to a specific gateway URL with hard 5s timeout
|
|
103
|
-
* Section 6.2: Enforces real timeout with AbortController
|
|
104
|
-
* Returns success result or throws error
|
|
105
|
-
*/
|
|
106
|
-
async function tryConnect(gatewayUrl, token, timeoutMs = 5000) {
|
|
107
|
-
// Create AbortController for hard timeout enforcement
|
|
108
|
-
const abortController = new AbortController();
|
|
109
|
-
const timeoutId = setTimeout(() => {
|
|
110
|
-
abortController.abort();
|
|
111
|
-
}, timeoutMs);
|
|
112
|
-
try {
|
|
113
|
-
const client = createClient(gatewayUrl, token, timeoutMs);
|
|
114
|
-
// Note: GatewayClient uses axios which supports timeout, but we also use AbortController as safety net
|
|
115
|
-
const startTime = Date.now();
|
|
116
|
-
const healthData = await client.health();
|
|
117
|
-
const latency = Date.now() - startTime;
|
|
118
|
-
clearTimeout(timeoutId);
|
|
119
|
-
return {
|
|
120
|
-
endpoint: gatewayUrl,
|
|
121
|
-
status: "CONNECTED",
|
|
122
|
-
ts: Date.now(),
|
|
123
|
-
healthData, // Include health data for verification
|
|
124
|
-
latency, // Include latency for display
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
catch (error) {
|
|
128
|
-
clearTimeout(timeoutId);
|
|
129
|
-
// Map AbortController abort to timeout error
|
|
130
|
-
if (error?.name === 'AbortError' || error?.code === 'ECONNABORTED') {
|
|
131
|
-
const timeoutError = new Error('Gateway unreachable (ETIMEDOUT)');
|
|
132
|
-
timeoutError.code = 'ETIMEDOUT';
|
|
133
|
-
throw timeoutError;
|
|
134
|
-
}
|
|
135
|
-
throw error;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* TCP probe: Test raw socket connectivity
|
|
140
|
-
* Returns probe result with timing and error info
|
|
141
|
-
*/
|
|
142
|
-
async function probeTcp(host, port, timeoutMs = 1500) {
|
|
143
|
-
const startTime = Date.now();
|
|
144
|
-
return new Promise((resolve) => {
|
|
145
|
-
const socket = new net.Socket();
|
|
146
|
-
let resolved = false;
|
|
147
|
-
const timeoutId = setTimeout(() => {
|
|
148
|
-
if (!resolved) {
|
|
149
|
-
resolved = true;
|
|
150
|
-
socket.destroy();
|
|
151
|
-
resolve({
|
|
152
|
-
type: 'tcp',
|
|
153
|
-
success: false,
|
|
154
|
-
duration: Date.now() - startTime,
|
|
155
|
-
error: 'ETIMEDOUT',
|
|
156
|
-
details: 'TCP connection timeout'
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}, timeoutMs);
|
|
160
|
-
socket.on('connect', () => {
|
|
161
|
-
if (!resolved) {
|
|
162
|
-
resolved = true;
|
|
163
|
-
clearTimeout(timeoutId);
|
|
164
|
-
const duration = Date.now() - startTime;
|
|
165
|
-
socket.destroy();
|
|
166
|
-
resolve({
|
|
167
|
-
type: 'tcp',
|
|
168
|
-
success: true,
|
|
169
|
-
duration,
|
|
170
|
-
details: `ok in ${duration}ms`
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
socket.on('error', (err) => {
|
|
175
|
-
if (!resolved) {
|
|
176
|
-
resolved = true;
|
|
177
|
-
clearTimeout(timeoutId);
|
|
178
|
-
const duration = Date.now() - startTime;
|
|
179
|
-
const errorCode = err.code || 'UNKNOWN';
|
|
180
|
-
resolve({
|
|
181
|
-
type: 'tcp',
|
|
182
|
-
success: false,
|
|
183
|
-
duration,
|
|
184
|
-
error: errorCode,
|
|
185
|
-
details: `fail ${errorCode}`
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
socket.connect(port, host);
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* HTTP probe: Test HTTP health endpoint
|
|
194
|
-
* Returns probe result with status and timing
|
|
195
|
-
*/
|
|
196
|
-
async function probeHttp(gatewayUrl, timeoutMs = 3000) {
|
|
197
|
-
const startTime = Date.now();
|
|
198
|
-
const url = new URL(gatewayUrl);
|
|
199
|
-
const isHttps = url.protocol === 'https:';
|
|
200
|
-
const client = isHttps ? https : http;
|
|
201
|
-
const port = url.port ? parseInt(url.port, 10) : (isHttps ? 443 : 80);
|
|
202
|
-
return new Promise((resolve) => {
|
|
203
|
-
const options = {
|
|
204
|
-
hostname: url.hostname,
|
|
205
|
-
port: port,
|
|
206
|
-
path: '/health',
|
|
207
|
-
method: 'GET',
|
|
208
|
-
timeout: timeoutMs,
|
|
209
|
-
headers: {
|
|
210
|
-
'Connection': 'close' // No keepAlive
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
|
-
let resolved = false;
|
|
214
|
-
const req = client.request(options, (res) => {
|
|
215
|
-
if (!resolved) {
|
|
216
|
-
resolved = true;
|
|
217
|
-
const duration = Date.now() - startTime;
|
|
218
|
-
let body = '';
|
|
219
|
-
res.on('data', (chunk) => {
|
|
220
|
-
body += chunk.toString();
|
|
221
|
-
});
|
|
222
|
-
res.on('end', () => {
|
|
223
|
-
try {
|
|
224
|
-
const json = JSON.parse(body);
|
|
225
|
-
resolve({
|
|
226
|
-
type: 'http',
|
|
227
|
-
success: res.statusCode === 200,
|
|
228
|
-
duration,
|
|
229
|
-
details: `${res.statusCode} ${JSON.stringify(json).substring(0, 50)}`
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
catch {
|
|
233
|
-
resolve({
|
|
234
|
-
type: 'http',
|
|
235
|
-
success: res.statusCode === 200,
|
|
236
|
-
duration,
|
|
237
|
-
details: `${res.statusCode} ${body.substring(0, 50)}`
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
req.on('error', (err) => {
|
|
244
|
-
if (!resolved) {
|
|
245
|
-
resolved = true;
|
|
246
|
-
const duration = Date.now() - startTime;
|
|
247
|
-
const errorCode = err.code || 'UNKNOWN';
|
|
248
|
-
resolve({
|
|
249
|
-
type: 'http',
|
|
250
|
-
success: false,
|
|
251
|
-
duration,
|
|
252
|
-
error: errorCode,
|
|
253
|
-
details: `fail ${errorCode}`
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
req.on('timeout', () => {
|
|
258
|
-
if (!resolved) {
|
|
259
|
-
resolved = true;
|
|
260
|
-
req.destroy();
|
|
261
|
-
const duration = Date.now() - startTime;
|
|
262
|
-
resolve({
|
|
263
|
-
type: 'http',
|
|
264
|
-
success: false,
|
|
265
|
-
duration,
|
|
266
|
-
error: 'ETIMEDOUT',
|
|
267
|
-
details: 'fail ETIMEDOUT'
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
req.end();
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Run connection probes and return results
|
|
276
|
-
* This is called by the command handler to emit [SYS] events
|
|
277
|
-
*/
|
|
278
|
-
export async function runConnectionProbes(gatewayUrl) {
|
|
279
|
-
const results = [];
|
|
280
|
-
try {
|
|
281
|
-
const url = new URL(gatewayUrl);
|
|
282
|
-
const host = url.hostname;
|
|
283
|
-
const port = url.port ? parseInt(url.port, 10) : (url.protocol === 'https:' ? 443 : 80);
|
|
284
|
-
// Probe A: DNS/Host parsing (synchronous - just emit what we're trying)
|
|
285
|
-
// This is handled by the command handler
|
|
286
|
-
// Probe B: TCP reachability
|
|
287
|
-
try {
|
|
288
|
-
const tcpResult = await probeTcp(host, port, 1500);
|
|
289
|
-
results.push(tcpResult);
|
|
290
|
-
// Probe C: HTTP fetch (only if TCP succeeded)
|
|
291
|
-
if (tcpResult.success) {
|
|
292
|
-
try {
|
|
293
|
-
const httpResult = await probeHttp(gatewayUrl, 3000);
|
|
294
|
-
results.push(httpResult);
|
|
295
|
-
}
|
|
296
|
-
catch (httpError) {
|
|
297
|
-
// HTTP probe failed
|
|
298
|
-
results.push({
|
|
299
|
-
type: 'http',
|
|
300
|
-
success: false,
|
|
301
|
-
duration: 0,
|
|
302
|
-
error: httpError?.code || 'HTTP_ERROR',
|
|
303
|
-
details: `fail ${httpError?.message || 'unknown error'}`
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
else {
|
|
308
|
-
// TCP failed, skip HTTP
|
|
309
|
-
results.push({
|
|
310
|
-
type: 'http',
|
|
311
|
-
success: false,
|
|
312
|
-
duration: 0,
|
|
313
|
-
error: 'TCP_FAILED',
|
|
314
|
-
details: 'skip (TCP probe failed)'
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
catch (tcpError) {
|
|
319
|
-
// TCP probe failed
|
|
320
|
-
results.push({
|
|
321
|
-
type: 'tcp',
|
|
322
|
-
success: false,
|
|
323
|
-
duration: 0,
|
|
324
|
-
error: tcpError?.code || 'TCP_ERROR',
|
|
325
|
-
details: `fail ${tcpError?.message || 'unknown error'}`
|
|
326
|
-
});
|
|
327
|
-
// Also add HTTP as skipped
|
|
328
|
-
results.push({
|
|
329
|
-
type: 'http',
|
|
330
|
-
success: false,
|
|
331
|
-
duration: 0,
|
|
332
|
-
error: 'TCP_FAILED',
|
|
333
|
-
details: 'skip (TCP probe failed)'
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
catch (urlError) {
|
|
338
|
-
// URL parsing failed
|
|
339
|
-
results.push({
|
|
340
|
-
type: 'tcp',
|
|
341
|
-
success: false,
|
|
342
|
-
duration: 0,
|
|
343
|
-
error: 'URL_PARSE_ERROR',
|
|
344
|
-
details: `fail ${urlError?.message || 'invalid URL'}`
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
return results;
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* Connect to gateway with automatic fallback
|
|
351
|
-
*
|
|
352
|
-
* Section 6.2: Gateway Connection Enforcement (FINAL, NON-NEGOTIABLE)
|
|
353
|
-
*
|
|
354
|
-
* Always uses canonical Gateway endpoint (no user-provided URL).
|
|
355
|
-
* If primary endpoint fails on Windows/Mac, automatically tries public IP.
|
|
356
|
-
* This makes it "just work" without manual SSH tunnel setup.
|
|
357
|
-
*
|
|
358
|
-
* @param endpointUrl Ignored - always uses resolveGatewayUrl() (kept for backward compatibility)
|
|
359
|
-
*/
|
|
360
|
-
export async function connect(endpointUrl) {
|
|
361
|
-
// Section 6.2: Always use canonical endpoint (ignore endpointUrl parameter)
|
|
362
|
-
const canonicalEndpoint = resolveGatewayUrl();
|
|
363
|
-
// Load auth token once
|
|
364
|
-
const token = loadAuthToken();
|
|
365
|
-
// Try canonical endpoint with 5s hard timeout
|
|
366
|
-
try {
|
|
367
|
-
const result = await tryConnect(canonicalEndpoint, token, 5000);
|
|
368
|
-
cachedClient = createClient(canonicalEndpoint, token);
|
|
369
|
-
// Save successful URL for next time
|
|
370
|
-
saveGatewayUrl(canonicalEndpoint);
|
|
371
|
-
return { ok: true, data: result };
|
|
372
|
-
}
|
|
373
|
-
catch (error) {
|
|
374
|
-
// If localhost failed and we're on Windows/Mac, try public IP automatically
|
|
375
|
-
const isLocalhost = canonicalEndpoint.includes('127.0.0.1') || canonicalEndpoint.includes('localhost');
|
|
376
|
-
const isWindowsOrMac = process.platform === 'win32' || process.platform === 'darwin';
|
|
377
|
-
const isConnectionRefused = error?.code === 'ECONNREFUSED';
|
|
378
|
-
if (isLocalhost && isWindowsOrMac && isConnectionRefused) {
|
|
379
|
-
// Auto-fallback to public IP - makes it "just work"
|
|
380
|
-
const publicIpEndpoint = 'http://13.222.1.157:3001';
|
|
381
|
-
try {
|
|
382
|
-
// Note: This fallback happens silently - the command handler will show the final result
|
|
383
|
-
const result = await tryConnect(publicIpEndpoint, token, 5000);
|
|
384
|
-
cachedClient = createClient(publicIpEndpoint, token);
|
|
385
|
-
// Save successful URL for next time (so next connect uses public IP directly)
|
|
386
|
-
saveGatewayUrl(publicIpEndpoint);
|
|
387
|
-
// Return success with the endpoint that actually worked
|
|
388
|
-
return {
|
|
389
|
-
ok: true,
|
|
390
|
-
data: {
|
|
391
|
-
...result,
|
|
392
|
-
endpoint: publicIpEndpoint, // Override to show which endpoint worked
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
catch (fallbackError) {
|
|
397
|
-
// Both failed - return error with helpful message
|
|
398
|
-
return handleConnectionError(fallbackError, publicIpEndpoint);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
// Single endpoint failed - return structured error
|
|
402
|
-
return handleConnectionError(error, canonicalEndpoint);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
/**
|
|
406
|
-
* Handle connection errors and normalize to structured format
|
|
407
|
-
*/
|
|
408
|
-
function handleConnectionError(error, attemptedUrl) {
|
|
409
|
-
// Extract error message (handle various error formats)
|
|
410
|
-
let errorMessage = 'Unknown error';
|
|
411
|
-
if (error?.message) {
|
|
412
|
-
errorMessage = String(error.message);
|
|
413
|
-
}
|
|
414
|
-
else if (typeof error === 'string') {
|
|
415
|
-
errorMessage = error;
|
|
416
|
-
}
|
|
417
|
-
else if (error?.toString) {
|
|
418
|
-
errorMessage = error.toString();
|
|
419
|
-
}
|
|
420
|
-
// Normalize error message (remove stack traces, etc.)
|
|
421
|
-
errorMessage = errorMessage.split('\n')[0].trim();
|
|
422
|
-
if (!errorMessage || errorMessage === 'Error' || errorMessage === '[object Object]') {
|
|
423
|
-
errorMessage = 'Connection failed';
|
|
424
|
-
}
|
|
425
|
-
// Check for auth-related errors (HTTP status codes)
|
|
426
|
-
if (error?.status === 401 || error?.status === 403 || error?.response?.status === 401 || error?.response?.status === 403) {
|
|
427
|
-
return {
|
|
428
|
-
ok: false,
|
|
429
|
-
error: {
|
|
430
|
-
code: 'AUTH_DENIED',
|
|
431
|
-
message: 'Authentication failed',
|
|
432
|
-
nextAction: 'Refresh credentials or set FOURRUNR_TOKEN'
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
// Extract specific error code for detailed messaging
|
|
437
|
-
const errorCode = error?.code || error?.response?.status || 'UNKNOWN';
|
|
438
|
-
// Check for HTTP status errors (404, 500, etc.)
|
|
439
|
-
if (error?.response?.status) {
|
|
440
|
-
const status = error.response.status;
|
|
441
|
-
if (status === 404) {
|
|
442
|
-
return {
|
|
443
|
-
ok: false,
|
|
444
|
-
error: {
|
|
445
|
-
code: 'GATEWAY_NOT_FOUND',
|
|
446
|
-
message: `Gateway unreachable (404 /health)`,
|
|
447
|
-
nextAction: 'Verify Gateway is running and health endpoint exists'
|
|
448
|
-
}
|
|
449
|
-
};
|
|
450
|
-
}
|
|
451
|
-
if (status >= 500) {
|
|
452
|
-
return {
|
|
453
|
-
ok: false,
|
|
454
|
-
error: {
|
|
455
|
-
code: 'GATEWAY_ERROR',
|
|
456
|
-
message: `Gateway error (${status})`,
|
|
457
|
-
nextAction: 'Check Gateway logs and retry "connect"'
|
|
458
|
-
}
|
|
459
|
-
};
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
// Section 6.2: Map timeout errors to clear error codes
|
|
463
|
-
const errorStr = errorMessage.toLowerCase();
|
|
464
|
-
if (error?.code === 'ECONNABORTED' ||
|
|
465
|
-
error?.code === 'ETIMEDOUT' ||
|
|
466
|
-
errorStr.includes('timeout') ||
|
|
467
|
-
errorStr.includes('timed out') ||
|
|
468
|
-
errorStr.includes('econnaborted')) {
|
|
469
|
-
// Check if trying to connect to public IP (might need security group config)
|
|
470
|
-
const isPublicIp = attemptedUrl.includes('13.222.1.157');
|
|
471
|
-
const isLocalhost = attemptedUrl.includes('127.0.0.1') || attemptedUrl.includes('localhost');
|
|
472
|
-
let nextAction = 'Start Gateway service and run "connect"';
|
|
473
|
-
if (isPublicIp) {
|
|
474
|
-
nextAction = 'Check EC2 security group allows port 3001 from your IP, or use SSH tunnel';
|
|
475
|
-
}
|
|
476
|
-
else if (isLocalhost) {
|
|
477
|
-
nextAction = 'Set up SSH tunnel: ssh -L 3001:127.0.0.1:3001 ubuntu@13.222.1.157';
|
|
478
|
-
}
|
|
479
|
-
return {
|
|
480
|
-
ok: false,
|
|
481
|
-
error: {
|
|
482
|
-
code: 'ETIMEDOUT',
|
|
483
|
-
message: 'Gateway unreachable (ECONNREFUSED | ETIMEDOUT | ECONNABORTED)',
|
|
484
|
-
nextAction
|
|
485
|
-
}
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
// Section 6.2: Map connection refused to clear error code
|
|
489
|
-
if (error?.code === 'ECONNREFUSED' ||
|
|
490
|
-
errorStr.includes('econnrefused') ||
|
|
491
|
-
errorStr.includes('refused')) {
|
|
492
|
-
// Check if trying to connect to localhost (SSH tunnel might not be active)
|
|
493
|
-
const isLocalhost = attemptedUrl.includes('127.0.0.1') || attemptedUrl.includes('localhost');
|
|
494
|
-
const nextAction = isLocalhost
|
|
495
|
-
? 'Set up SSH tunnel: ssh -L 3001:127.0.0.1:3001 ubuntu@13.222.1.157'
|
|
496
|
-
: 'Start Gateway service or set up SSH tunnel';
|
|
497
|
-
return {
|
|
498
|
-
ok: false,
|
|
499
|
-
error: {
|
|
500
|
-
code: 'ECONNREFUSED',
|
|
501
|
-
message: 'Gateway unreachable (ECONNREFUSED | ETIMEDOUT | ECONNABORTED)',
|
|
502
|
-
nextAction
|
|
503
|
-
}
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
// Check for DNS/network errors
|
|
507
|
-
if (error?.code === 'ENOTFOUND' ||
|
|
508
|
-
error?.code === 'ECONNRESET' ||
|
|
509
|
-
errorStr.includes('enotfound') ||
|
|
510
|
-
errorStr.includes('econnreset') ||
|
|
511
|
-
errorStr.includes('network') ||
|
|
512
|
-
errorStr.includes('dns')) {
|
|
513
|
-
return {
|
|
514
|
-
ok: false,
|
|
515
|
-
error: {
|
|
516
|
-
code: 'GATEWAY_UNREACHABLE',
|
|
517
|
-
message: 'Gateway unreachable (ECONNREFUSED | ETIMEDOUT | ECONNABORTED)',
|
|
518
|
-
nextAction: 'Start Gateway service and run "connect"'
|
|
519
|
-
}
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
// Section 6.2: Generic connection failure (normalized message)
|
|
523
|
-
return {
|
|
524
|
-
ok: false,
|
|
525
|
-
error: {
|
|
526
|
-
code: errorCode,
|
|
527
|
-
message: 'Gateway unreachable (ECONNREFUSED | ETIMEDOUT | ECONNABORTED)',
|
|
528
|
-
nextAction: 'Start Gateway service and run "connect"'
|
|
529
|
-
}
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
/**
|
|
533
|
-
* Get current connection state
|
|
534
|
-
*
|
|
535
|
-
* Optional helper - checks health of cached client if available
|
|
536
|
-
*/
|
|
537
|
-
export async function getConnectionState() {
|
|
538
|
-
if (!cachedClient) {
|
|
539
|
-
// No cached client - not connected
|
|
540
|
-
return {
|
|
541
|
-
ok: false,
|
|
542
|
-
error: {
|
|
543
|
-
code: 'NOT_CONNECTED',
|
|
544
|
-
message: 'Not connected to gateway',
|
|
545
|
-
nextAction: 'Run "connect" first'
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
}
|
|
549
|
-
try {
|
|
550
|
-
// Check health of cached client
|
|
551
|
-
await cachedClient.health();
|
|
552
|
-
// Note: We can't know the original endpoint from cached client, so use current config
|
|
553
|
-
// This is fine since getConnectionState is just checking if we're still connected
|
|
554
|
-
return {
|
|
555
|
-
ok: true,
|
|
556
|
-
data: {
|
|
557
|
-
endpoint: resolveGatewayUrl(),
|
|
558
|
-
status: "CONNECTED",
|
|
559
|
-
ts: Date.now()
|
|
560
|
-
}
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
catch (error) {
|
|
564
|
-
// Connection lost, clear cache
|
|
565
|
-
cachedClient = null;
|
|
566
|
-
return {
|
|
567
|
-
ok: false,
|
|
568
|
-
error: {
|
|
569
|
-
code: 'CONNECTION_LOST',
|
|
570
|
-
message: 'Connection lost',
|
|
571
|
-
nextAction: 'Retry "connect"'
|
|
572
|
-
}
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
//# sourceMappingURL=connect.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../../src/ui/v3/v1Adapters/connect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAa1B,IAAI,YAAY,GAAyB,IAAI,CAAC;AAE9C;;GAEG;AACH,SAAS,YAAY;IACnB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;IACjD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,EAAE,CAAC,SAAS,CAAC,S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* HTTP Debug Logger
|
|
3
|
-
*
|
|
4
|
-
* Logs full request/response details when OS_DEBUG_HTTP=1 is set
|
|
5
|
-
* Used for debugging API contract mismatches
|
|
6
|
-
*/
|
|
7
|
-
export interface HttpDebugInfo {
|
|
8
|
-
method: string;
|
|
9
|
-
url: string;
|
|
10
|
-
path: string;
|
|
11
|
-
headers: Record<string, string>;
|
|
12
|
-
body?: any;
|
|
13
|
-
status?: number;
|
|
14
|
-
responseBody?: any;
|
|
15
|
-
elapsedMs?: number;
|
|
16
|
-
error?: any;
|
|
17
|
-
}
|
|
18
|
-
export declare function logHttpRequest(info: HttpDebugInfo): string[];
|
|
19
|
-
//# sourceMappingURL=httpDebug.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"httpDebug.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/v1Adapters/httpDebug.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,EAAE,CAyD5D"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HTTP Debug Logger
|
|
3
|
-
*
|
|
4
|
-
* Logs full request/response details when OS_DEBUG_HTTP=1 is set
|
|
5
|
-
* Used for debugging API contract mismatches
|
|
6
|
-
*/
|
|
7
|
-
const DEBUG_ENABLED = process.env.OS_DEBUG_HTTP === '1';
|
|
8
|
-
export function logHttpRequest(info) {
|
|
9
|
-
if (!DEBUG_ENABLED) {
|
|
10
|
-
return [];
|
|
11
|
-
}
|
|
12
|
-
const lines = [];
|
|
13
|
-
// Request
|
|
14
|
-
lines.push(`[SYS] HTTP ${info.method} ${info.url}${info.path}`);
|
|
15
|
-
// Headers (minus secrets)
|
|
16
|
-
const safeHeaders = {};
|
|
17
|
-
for (const [key, value] of Object.entries(info.headers)) {
|
|
18
|
-
const lowerKey = key.toLowerCase();
|
|
19
|
-
if (lowerKey.includes('auth') || lowerKey.includes('token') || lowerKey.includes('secret') || lowerKey.includes('key')) {
|
|
20
|
-
safeHeaders[key] = '***REDACTED***';
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
safeHeaders[key] = value;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if (Object.keys(safeHeaders).length > 0) {
|
|
27
|
-
lines.push(`[SYS] HEADERS: ${JSON.stringify(safeHeaders, null, 2)}`);
|
|
28
|
-
}
|
|
29
|
-
// Body
|
|
30
|
-
if (info.body !== undefined) {
|
|
31
|
-
try {
|
|
32
|
-
const bodyStr = typeof info.body === 'string' ? info.body : JSON.stringify(info.body, null, 2);
|
|
33
|
-
lines.push(`[SYS] BODY: ${bodyStr}`);
|
|
34
|
-
}
|
|
35
|
-
catch {
|
|
36
|
-
lines.push(`[SYS] BODY: <non-serializable>`);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
// Response
|
|
40
|
-
if (info.status !== undefined) {
|
|
41
|
-
lines.push(`[SYS] RESPONSE: ${info.status}`);
|
|
42
|
-
}
|
|
43
|
-
if (info.responseBody !== undefined) {
|
|
44
|
-
try {
|
|
45
|
-
const responseStr = typeof info.responseBody === 'string' ? info.responseBody : JSON.stringify(info.responseBody, null, 2);
|
|
46
|
-
lines.push(`[SYS] RESPONSE BODY: ${responseStr}`);
|
|
47
|
-
}
|
|
48
|
-
catch {
|
|
49
|
-
lines.push(`[SYS] RESPONSE BODY: <non-serializable>`);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (info.elapsedMs !== undefined) {
|
|
53
|
-
lines.push(`[SYS] ELAPSED: ${info.elapsedMs}ms`);
|
|
54
|
-
}
|
|
55
|
-
if (info.error) {
|
|
56
|
-
lines.push(`[SYS] ERROR: ${info.error.message || String(info.error)}`);
|
|
57
|
-
}
|
|
58
|
-
return lines;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=httpDebug.js.map
|