@ksp-gonogo/sitrep-sdk 0.0.1 → 0.2.0-rc.12
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/LICENSE +2 -2
- package/README.md +48 -8
- package/biome.shared.json +26 -0
- package/dist/__generated__/command-map.d.ts +480 -0
- package/dist/__generated__/command-map.d.ts.map +1 -0
- package/dist/__generated__/command-map.js +265 -0
- package/dist/__generated__/command-map.js.map +1 -0
- package/dist/__generated__/contract.d.ts +10271 -454
- package/dist/__generated__/contract.d.ts.map +1 -1
- package/dist/__generated__/contract.js +1163 -11
- package/dist/__generated__/contract.js.map +1 -1
- package/dist/__generated__/control-channels.d.ts +116 -0
- package/dist/__generated__/control-channels.d.ts.map +1 -0
- package/dist/__generated__/control-channels.js +29 -0
- package/dist/__generated__/control-channels.js.map +1 -0
- package/dist/__generated__/delay-roles.d.ts +17 -0
- package/dist/__generated__/delay-roles.d.ts.map +1 -0
- package/dist/__generated__/delay-roles.js +72 -0
- package/dist/__generated__/delay-roles.js.map +1 -0
- package/dist/__generated__/error-codes.d.ts +376 -0
- package/dist/__generated__/error-codes.d.ts.map +1 -0
- package/dist/__generated__/error-codes.js +688 -0
- package/dist/__generated__/error-codes.js.map +1 -0
- package/dist/__generated__/frames.d.ts +83 -0
- package/dist/__generated__/frames.d.ts.map +1 -0
- package/dist/__generated__/frames.js +44 -0
- package/dist/__generated__/frames.js.map +1 -0
- package/dist/__generated__/reckonability.d.ts +381 -0
- package/dist/__generated__/reckonability.d.ts.map +1 -0
- package/dist/__generated__/reckonability.js +49 -0
- package/dist/__generated__/reckonability.js.map +1 -0
- package/dist/__generated__/test-theme.d.ts +52 -0
- package/dist/__generated__/test-theme.d.ts.map +1 -0
- package/dist/__generated__/test-theme.js +70 -0
- package/dist/__generated__/test-theme.js.map +1 -0
- package/dist/__generated__/topic-map.d.ts +44 -12
- package/dist/__generated__/topic-map.d.ts.map +1 -1
- package/dist/__generated__/topic-map.js +84 -11
- package/dist/__generated__/topic-map.js.map +1 -1
- package/dist/__generated__/units.d.ts +97 -0
- package/dist/__generated__/units.d.ts.map +1 -0
- package/dist/__generated__/units.js +3302 -0
- package/dist/__generated__/units.js.map +1 -0
- package/dist/api/action-dispatch.d.ts +36 -0
- package/dist/api/action-dispatch.d.ts.map +1 -0
- package/dist/api/action-dispatch.js +79 -0
- package/dist/api/action-dispatch.js.map +1 -0
- package/dist/api/alarm-request.d.ts +118 -0
- package/dist/api/alarm-request.d.ts.map +1 -0
- package/dist/api/alarm-request.js +50 -0
- package/dist/api/alarm-request.js.map +1 -0
- package/dist/api/bodies.d.ts +68 -0
- package/dist/api/bodies.d.ts.map +1 -0
- package/dist/api/bodies.js +103 -0
- package/dist/api/bodies.js.map +1 -0
- package/dist/api/command-rejection.d.ts +104 -0
- package/dist/api/command-rejection.d.ts.map +1 -0
- package/dist/api/command-rejection.js +128 -0
- package/dist/api/command-rejection.js.map +1 -0
- package/dist/api/contribution-slots.d.ts +594 -0
- package/dist/api/contribution-slots.d.ts.map +1 -0
- package/dist/api/contribution-slots.js +43 -0
- package/dist/api/contribution-slots.js.map +1 -0
- package/dist/api/coverage/CoverageMaskCache.d.ts +52 -0
- package/dist/api/coverage/CoverageMaskCache.d.ts.map +1 -0
- package/dist/api/coverage/CoverageMaskCache.js +89 -0
- package/dist/api/coverage/CoverageMaskCache.js.map +1 -0
- package/dist/api/coverage/CoverageMaskContext.d.ts +35 -0
- package/dist/api/coverage/CoverageMaskContext.d.ts.map +1 -0
- package/dist/api/coverage/CoverageMaskContext.js +53 -0
- package/dist/api/coverage/CoverageMaskContext.js.map +1 -0
- package/dist/api/coverage-source.d.ts +42 -0
- package/dist/api/coverage-source.d.ts.map +1 -0
- package/dist/api/coverage-source.js +118 -0
- package/dist/api/coverage-source.js.map +1 -0
- package/dist/api/error-codes.d.ts +32 -0
- package/dist/api/error-codes.d.ts.map +1 -0
- package/dist/api/error-codes.js +77 -0
- package/dist/api/error-codes.js.map +1 -0
- package/dist/api/event-reveal.d.ts +56 -0
- package/dist/api/event-reveal.d.ts.map +1 -0
- package/dist/api/event-reveal.js +53 -0
- package/dist/api/event-reveal.js.map +1 -0
- package/dist/api/host.d.ts +130 -0
- package/dist/api/host.d.ts.map +1 -0
- package/dist/api/host.js +57 -0
- package/dist/api/host.js.map +1 -0
- package/dist/api/index.d.ts +604 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +671 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/localStorageStore.d.ts +50 -0
- package/dist/api/localStorageStore.d.ts.map +1 -0
- package/dist/api/localStorageStore.js +151 -0
- package/dist/api/localStorageStore.js.map +1 -0
- package/dist/api/logger-contract.d.ts +37 -0
- package/dist/api/logger-contract.d.ts.map +1 -0
- package/dist/api/logger-contract.js +2 -0
- package/dist/api/logger-contract.js.map +1 -0
- package/dist/api/logger.d.ts +9 -0
- package/dist/api/logger.d.ts.map +1 -0
- package/dist/api/logger.js +16 -0
- package/dist/api/logger.js.map +1 -0
- package/dist/api/map-poi.d.ts +28 -0
- package/dist/api/map-poi.d.ts.map +1 -0
- package/dist/api/map-poi.js +82 -0
- package/dist/api/map-poi.js.map +1 -0
- package/dist/api/plot-layers.d.ts +240 -0
- package/dist/api/plot-layers.d.ts.map +1 -0
- package/dist/api/plot-layers.js +35 -0
- package/dist/api/plot-layers.js.map +1 -0
- package/dist/api/plots.d.ts +127 -0
- package/dist/api/plots.d.ts.map +1 -0
- package/dist/api/plots.js +39 -0
- package/dist/api/plots.js.map +1 -0
- package/dist/api/registry.d.ts +106 -0
- package/dist/api/registry.d.ts.map +1 -0
- package/dist/api/registry.js +267 -0
- package/dist/api/registry.js.map +1 -0
- package/dist/api/root-providers.d.ts +63 -0
- package/dist/api/root-providers.d.ts.map +1 -0
- package/dist/api/root-providers.js +76 -0
- package/dist/api/root-providers.js.map +1 -0
- package/dist/api/safe-random-uuid.d.ts +8 -0
- package/dist/api/safe-random-uuid.d.ts.map +1 -0
- package/dist/api/safe-random-uuid.js +19 -0
- package/dist/api/safe-random-uuid.js.map +1 -0
- package/dist/api/settings/SettingsContext.d.ts +32 -0
- package/dist/api/settings/SettingsContext.d.ts.map +1 -0
- package/dist/api/settings/SettingsContext.js +46 -0
- package/dist/api/settings/SettingsContext.js.map +1 -0
- package/dist/api/settings/SettingsService.d.ts +36 -0
- package/dist/api/settings/SettingsService.d.ts.map +1 -0
- package/dist/api/settings/SettingsService.js +139 -0
- package/dist/api/settings/SettingsService.js.map +1 -0
- package/dist/api/settings/store.d.ts +67 -0
- package/dist/api/settings/store.d.ts.map +1 -0
- package/dist/api/settings/store.js +160 -0
- package/dist/api/settings/store.js.map +1 -0
- package/dist/api/slots.d.ts +870 -0
- package/dist/api/slots.d.ts.map +1 -0
- package/dist/api/slots.js +45 -0
- package/dist/api/slots.js.map +1 -0
- package/dist/api/station-brokers.d.ts +48 -0
- package/dist/api/station-brokers.d.ts.map +1 -0
- package/dist/api/station-brokers.js +74 -0
- package/dist/api/station-brokers.js.map +1 -0
- package/dist/api/stock-bodies.d.ts +20 -0
- package/dist/api/stock-bodies.d.ts.map +1 -0
- package/dist/api/stock-bodies.js +263 -0
- package/dist/api/stock-bodies.js.map +1 -0
- package/dist/api/tiny-size.d.ts +13 -0
- package/dist/api/tiny-size.d.ts.map +1 -0
- package/dist/api/tiny-size.js +10 -0
- package/dist/api/tiny-size.js.map +1 -0
- package/dist/api/tone.d.ts +25 -0
- package/dist/api/tone.d.ts.map +1 -0
- package/dist/api/tone.js +15 -0
- package/dist/api/tone.js.map +1 -0
- package/dist/api/transport.d.ts +83 -0
- package/dist/api/transport.d.ts.map +1 -0
- package/dist/api/transport.js +2 -0
- package/dist/api/transport.js.map +1 -0
- package/dist/api/types.d.ts +1604 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +19 -0
- package/dist/api/types.js.map +1 -0
- package/dist/api/uplink-handles.d.ts +40 -0
- package/dist/api/uplink-handles.d.ts.map +1 -0
- package/dist/api/uplink-handles.js +59 -0
- package/dist/api/uplink-handles.js.map +1 -0
- package/dist/binary-frame.d.ts +116 -0
- package/dist/binary-frame.d.ts.map +1 -0
- package/dist/binary-frame.js +188 -0
- package/dist/binary-frame.js.map +1 -0
- package/dist/burn-clock.d.ts +61 -0
- package/dist/burn-clock.d.ts.map +1 -0
- package/dist/burn-clock.js +82 -0
- package/dist/burn-clock.js.map +1 -0
- package/dist/client.d.ts +8 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +39 -7
- package/dist/client.js.map +1 -1
- package/dist/combine-readings.d.ts +84 -0
- package/dist/combine-readings.d.ts.map +1 -0
- package/dist/combine-readings.js +197 -0
- package/dist/combine-readings.js.map +1 -0
- package/dist/command-delay.d.ts +211 -0
- package/dist/command-delay.d.ts.map +1 -0
- package/dist/command-delay.js +194 -0
- package/dist/command-delay.js.map +1 -0
- package/dist/command-reply-units.d.ts +14 -0
- package/dist/command-reply-units.d.ts.map +1 -0
- package/dist/command-reply-units.js +46 -0
- package/dist/command-reply-units.js.map +1 -0
- package/dist/commands.d.ts +143 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +113 -0
- package/dist/commands.js.map +1 -0
- package/dist/comms-degrade.d.ts +43 -0
- package/dist/comms-degrade.d.ts.map +1 -0
- package/dist/comms-degrade.js +45 -0
- package/dist/comms-degrade.js.map +1 -0
- package/dist/compat-versions.d.ts +42 -0
- package/dist/compat-versions.d.ts.map +1 -0
- package/dist/compat-versions.js +42 -0
- package/dist/compat-versions.js.map +1 -0
- package/dist/contract-enum-names.d.ts +89 -0
- package/dist/contract-enum-names.d.ts.map +1 -0
- package/dist/contract-enum-names.js +90 -0
- package/dist/contract-enum-names.js.map +1 -0
- package/dist/control-channels.d.ts +46 -0
- package/dist/control-channels.d.ts.map +1 -0
- package/dist/control-channels.js +49 -0
- package/dist/control-channels.js.map +1 -0
- package/dist/crew-standing.d.ts +69 -0
- package/dist/crew-standing.d.ts.map +1 -0
- package/dist/crew-standing.js +105 -0
- package/dist/crew-standing.js.map +1 -0
- package/dist/delay-roles.d.ts +96 -0
- package/dist/delay-roles.d.ts.map +1 -0
- package/dist/delay-roles.js +114 -0
- package/dist/delay-roles.js.map +1 -0
- package/dist/descent.d.ts +89 -0
- package/dist/descent.d.ts.map +1 -0
- package/dist/descent.js +96 -0
- package/dist/descent.js.map +1 -0
- package/dist/enum-names.d.ts +18 -0
- package/dist/enum-names.d.ts.map +1 -0
- package/dist/enum-names.js +35 -0
- package/dist/enum-names.js.map +1 -0
- package/dist/envelope.d.ts +15 -3
- package/dist/envelope.d.ts.map +1 -1
- package/dist/envelope.js +1 -0
- package/dist/envelope.js.map +1 -1
- package/dist/event-timeline.d.ts +112 -0
- package/dist/event-timeline.d.ts.map +1 -0
- package/dist/event-timeline.js +120 -0
- package/dist/event-timeline.js.map +1 -0
- package/dist/extensions.d.ts +28 -0
- package/dist/extensions.d.ts.map +1 -0
- package/dist/extensions.js +36 -0
- package/dist/extensions.js.map +1 -0
- package/dist/field-frames.d.ts +32 -0
- package/dist/field-frames.d.ts.map +1 -0
- package/dist/field-frames.js +41 -0
- package/dist/field-frames.js.map +1 -0
- package/dist/flight/BufferedDataSource.d.ts +260 -0
- package/dist/flight/BufferedDataSource.d.ts.map +1 -0
- package/dist/flight/BufferedDataSource.js +790 -0
- package/dist/flight/BufferedDataSource.js.map +1 -0
- package/dist/flight/DataSourceWrapper.d.ts +33 -0
- package/dist/flight/DataSourceWrapper.d.ts.map +1 -0
- package/dist/flight/DataSourceWrapper.js +55 -0
- package/dist/flight/DataSourceWrapper.js.map +1 -0
- package/dist/flight/ListenerSet.d.ts +28 -0
- package/dist/flight/ListenerSet.d.ts.map +1 -0
- package/dist/flight/ListenerSet.js +66 -0
- package/dist/flight/ListenerSet.js.map +1 -0
- package/dist/flight/debugFlight.d.ts +8 -0
- package/dist/flight/debugFlight.d.ts.map +1 -0
- package/dist/flight/debugFlight.js +14 -0
- package/dist/flight/debugFlight.js.map +1 -0
- package/dist/flight/derive.d.ts +45 -0
- package/dist/flight/derive.d.ts.map +1 -0
- package/dist/flight/derive.js +26 -0
- package/dist/flight/derive.js.map +1 -0
- package/dist/flight/fixtureIO.d.ts +103 -0
- package/dist/flight/fixtureIO.d.ts.map +1 -0
- package/dist/flight/fixtureIO.js +120 -0
- package/dist/flight/fixtureIO.js.map +1 -0
- package/dist/flight/flightAutoDelete.d.ts +33 -0
- package/dist/flight/flightAutoDelete.d.ts.map +1 -0
- package/dist/flight/flightAutoDelete.js +43 -0
- package/dist/flight/flightAutoDelete.js.map +1 -0
- package/dist/flight/flightDetector.d.ts +73 -0
- package/dist/flight/flightDetector.d.ts.map +1 -0
- package/dist/flight/flightDetector.js +167 -0
- package/dist/flight/flightDetector.js.map +1 -0
- package/dist/flight/storage/LocalStorageStore.d.ts +52 -0
- package/dist/flight/storage/LocalStorageStore.d.ts.map +1 -0
- package/dist/flight/storage/LocalStorageStore.js +127 -0
- package/dist/flight/storage/LocalStorageStore.js.map +1 -0
- package/dist/flight/storage/MemoryStore.d.ts +24 -0
- package/dist/flight/storage/MemoryStore.d.ts.map +1 -0
- package/dist/flight/storage/MemoryStore.js +90 -0
- package/dist/flight/storage/MemoryStore.js.map +1 -0
- package/dist/flight/storage/Store.d.ts +37 -0
- package/dist/flight/storage/Store.d.ts.map +1 -0
- package/dist/flight/storage/Store.js +8 -0
- package/dist/flight/storage/Store.js.map +1 -0
- package/dist/flight/types.d.ts +358 -0
- package/dist/flight/types.d.ts.map +1 -0
- package/dist/flight/types.js +10 -0
- package/dist/flight/types.js.map +1 -0
- package/dist/frame-qualifier.d.ts +61 -0
- package/dist/frame-qualifier.d.ts.map +1 -0
- package/dist/frame-qualifier.js +122 -0
- package/dist/frame-qualifier.js.map +1 -0
- package/dist/frames/index.d.ts +133 -0
- package/dist/frames/index.d.ts.map +1 -0
- package/dist/frames/index.js +128 -0
- package/dist/frames/index.js.map +1 -0
- package/dist/index.d.ts +76 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +191 -5
- package/dist/index.js.map +1 -1
- package/dist/ksp-enum-names.d.ts +127 -0
- package/dist/ksp-enum-names.d.ts.map +1 -0
- package/dist/ksp-enum-names.js +128 -0
- package/dist/ksp-enum-names.js.map +1 -0
- package/dist/locked.d.ts +20 -0
- package/dist/locked.d.ts.map +1 -0
- package/dist/locked.js +25 -0
- package/dist/locked.js.map +1 -0
- package/dist/magnitude.d.ts +37 -0
- package/dist/magnitude.d.ts.map +1 -0
- package/dist/magnitude.js +39 -0
- package/dist/magnitude.js.map +1 -0
- package/dist/maneuver-basis.d.ts +19 -0
- package/dist/maneuver-basis.d.ts.map +1 -0
- package/dist/maneuver-basis.js +37 -0
- package/dist/maneuver-basis.js.map +1 -0
- package/dist/media/capture-clock.d.ts +35 -0
- package/dist/media/capture-clock.d.ts.map +1 -0
- package/dist/media/capture-clock.js +26 -0
- package/dist/media/capture-clock.js.map +1 -0
- package/dist/media/delayed-playout-buffer.d.ts +169 -0
- package/dist/media/delayed-playout-buffer.d.ts.map +1 -0
- package/dist/media/delayed-playout-buffer.js +166 -0
- package/dist/media/delayed-playout-buffer.js.map +1 -0
- package/dist/media/encoded-frame-delay.d.ts +115 -0
- package/dist/media/encoded-frame-delay.d.ts.map +1 -0
- package/dist/media/encoded-frame-delay.js +85 -0
- package/dist/media/encoded-frame-delay.js.map +1 -0
- package/dist/media/frame-delay.d.ts +204 -0
- package/dist/media/frame-delay.d.ts.map +1 -0
- package/dist/media/frame-delay.js +237 -0
- package/dist/media/frame-delay.js.map +1 -0
- package/dist/media/index.d.ts +17 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +21 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/radio-support.d.ts +98 -0
- package/dist/media/radio-support.d.ts.map +1 -0
- package/dist/media/radio-support.js +99 -0
- package/dist/media/radio-support.js.map +1 -0
- package/dist/media/shared-delayed-streams.d.ts +119 -0
- package/dist/media/shared-delayed-streams.d.ts.map +1 -0
- package/dist/media/shared-delayed-streams.js +167 -0
- package/dist/media/shared-delayed-streams.js.map +1 -0
- package/dist/media/worker/delay-worker-client.d.ts +106 -0
- package/dist/media/worker/delay-worker-client.d.ts.map +1 -0
- package/dist/media/worker/delay-worker-client.js +207 -0
- package/dist/media/worker/delay-worker-client.js.map +1 -0
- package/dist/media/worker/delay-worker.d.ts +107 -0
- package/dist/media/worker/delay-worker.d.ts.map +1 -0
- package/dist/media/worker/delay-worker.js +604 -0
- package/dist/media/worker/delay-worker.js.map +7 -0
- package/dist/media/worker/presentation-pacer.d.ts +156 -0
- package/dist/media/worker/presentation-pacer.d.ts.map +1 -0
- package/dist/media/worker/presentation-pacer.js +200 -0
- package/dist/media/worker/presentation-pacer.js.map +1 -0
- package/dist/media/worker/time-base.d.ts +44 -0
- package/dist/media/worker/time-base.d.ts.map +1 -0
- package/dist/media/worker/time-base.js +48 -0
- package/dist/media/worker/time-base.js.map +1 -0
- package/dist/media/worker/worker-delay-clock.d.ts +59 -0
- package/dist/media/worker/worker-delay-clock.d.ts.map +1 -0
- package/dist/media/worker/worker-delay-clock.js +89 -0
- package/dist/media/worker/worker-delay-clock.js.map +1 -0
- package/dist/perf/PerfBudget.d.ts +116 -0
- package/dist/perf/PerfBudget.d.ts.map +1 -0
- package/dist/perf/PerfBudget.js +221 -0
- package/dist/perf/PerfBudget.js.map +1 -0
- package/dist/rail-tags.d.ts +156 -0
- package/dist/rail-tags.d.ts.map +1 -0
- package/dist/rail-tags.js +131 -0
- package/dist/rail-tags.js.map +1 -0
- package/dist/raw-field-split.d.ts +32 -0
- package/dist/raw-field-split.d.ts.map +1 -0
- package/dist/raw-field-split.js +46 -0
- package/dist/raw-field-split.js.map +1 -0
- package/dist/reading.d.ts +960 -0
- package/dist/reading.d.ts.map +1 -0
- package/dist/reading.js +529 -0
- package/dist/reading.js.map +1 -0
- package/dist/reckonability.d.ts +52 -0
- package/dist/reckonability.d.ts.map +1 -0
- package/dist/reckonability.js +79 -0
- package/dist/reckonability.js.map +1 -0
- package/dist/registry/index.d.ts +7 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +26 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/runtime-topic-registry.d.ts +99 -0
- package/dist/runtime-topic-registry.d.ts.map +1 -0
- package/dist/runtime-topic-registry.js +182 -0
- package/dist/runtime-topic-registry.js.map +1 -0
- package/dist/spine/arrival-deadline.d.ts +19 -0
- package/dist/spine/arrival-deadline.d.ts.map +1 -0
- package/dist/spine/arrival-deadline.js +38 -0
- package/dist/spine/arrival-deadline.js.map +1 -0
- package/dist/spine/atmospheric-reckoning.d.ts +161 -0
- package/dist/spine/atmospheric-reckoning.d.ts.map +1 -0
- package/dist/spine/atmospheric-reckoning.js +421 -0
- package/dist/spine/atmospheric-reckoning.js.map +1 -0
- package/dist/spine/body-derivations.d.ts +28 -0
- package/dist/spine/body-derivations.d.ts.map +1 -0
- package/dist/spine/body-derivations.js +73 -0
- package/dist/spine/body-derivations.js.map +1 -0
- package/dist/spine/capability-lock.d.ts +43 -0
- package/dist/spine/capability-lock.d.ts.map +1 -0
- package/dist/spine/capability-lock.js +153 -0
- package/dist/spine/capability-lock.js.map +1 -0
- package/dist/spine/celestial-facts.d.ts +181 -0
- package/dist/spine/celestial-facts.d.ts.map +1 -0
- package/dist/spine/celestial-facts.js +212 -0
- package/dist/spine/celestial-facts.js.map +1 -0
- package/dist/spine/channel-error-warning.d.ts +24 -0
- package/dist/spine/channel-error-warning.d.ts.map +1 -0
- package/dist/spine/channel-error-warning.js +51 -0
- package/dist/spine/channel-error-warning.js.map +1 -0
- package/dist/spine/client-reading.d.ts +70 -0
- package/dist/spine/client-reading.d.ts.map +1 -0
- package/dist/spine/client-reading.js +123 -0
- package/dist/spine/client-reading.js.map +1 -0
- package/dist/spine/client-timeline.d.ts +130 -0
- package/dist/spine/client-timeline.d.ts.map +1 -0
- package/dist/spine/client-timeline.js +174 -0
- package/dist/spine/client-timeline.js.map +1 -0
- package/dist/spine/client.d.ts +454 -0
- package/dist/spine/client.d.ts.map +1 -0
- package/dist/spine/client.js +1138 -0
- package/dist/spine/client.js.map +1 -0
- package/dist/spine/clock.d.ts +48 -0
- package/dist/spine/clock.d.ts.map +1 -0
- package/dist/spine/clock.js +22 -0
- package/dist/spine/clock.js.map +1 -0
- package/dist/spine/command-gate.d.ts +89 -0
- package/dist/spine/command-gate.d.ts.map +1 -0
- package/dist/spine/command-gate.js +56 -0
- package/dist/spine/command-gate.js.map +1 -0
- package/dist/spine/comms-delay-reckoning.d.ts +123 -0
- package/dist/spine/comms-delay-reckoning.d.ts.map +1 -0
- package/dist/spine/comms-delay-reckoning.js +166 -0
- package/dist/spine/comms-delay-reckoning.js.map +1 -0
- package/dist/spine/comms-journey.d.ts +74 -0
- package/dist/spine/comms-journey.d.ts.map +1 -0
- package/dist/spine/comms-journey.js +180 -0
- package/dist/spine/comms-journey.js.map +1 -0
- package/dist/spine/comms-path-geometry.d.ts +128 -0
- package/dist/spine/comms-path-geometry.d.ts.map +1 -0
- package/dist/spine/comms-path-geometry.js +172 -0
- package/dist/spine/comms-path-geometry.js.map +1 -0
- package/dist/spine/comms-route.d.ts +52 -0
- package/dist/spine/comms-route.d.ts.map +1 -0
- package/dist/spine/comms-route.js +109 -0
- package/dist/spine/comms-route.js.map +1 -0
- package/dist/spine/connection-error-warning.d.ts +28 -0
- package/dist/spine/connection-error-warning.d.ts.map +1 -0
- package/dist/spine/connection-error-warning.js +49 -0
- package/dist/spine/connection-error-warning.js.map +1 -0
- package/dist/spine/connectivity-history.d.ts +35 -0
- package/dist/spine/connectivity-history.d.ts.map +1 -0
- package/dist/spine/connectivity-history.js +54 -0
- package/dist/spine/connectivity-history.js.map +1 -0
- package/dist/spine/context.d.ts +485 -0
- package/dist/spine/context.d.ts.map +1 -0
- package/dist/spine/context.js +1017 -0
- package/dist/spine/context.js.map +1 -0
- package/dist/spine/contributed-channels.d.ts +48 -0
- package/dist/spine/contributed-channels.d.ts.map +1 -0
- package/dist/spine/contributed-channels.js +104 -0
- package/dist/spine/contributed-channels.js.map +1 -0
- package/dist/spine/contribution-scope.d.ts +19 -0
- package/dist/spine/contribution-scope.d.ts.map +1 -0
- package/dist/spine/contribution-scope.js +62 -0
- package/dist/spine/contribution-scope.js.map +1 -0
- package/dist/spine/contributions.d.ts +77 -0
- package/dist/spine/contributions.d.ts.map +1 -0
- package/dist/spine/contributions.js +180 -0
- package/dist/spine/contributions.js.map +1 -0
- package/dist/spine/control-frame-to-read-frame.d.ts +43 -0
- package/dist/spine/control-frame-to-read-frame.d.ts.map +1 -0
- package/dist/spine/control-frame-to-read-frame.js +79 -0
- package/dist/spine/control-frame-to-read-frame.js.map +1 -0
- package/dist/spine/core-reckoners.d.ts +2 -0
- package/dist/spine/core-reckoners.d.ts.map +1 -0
- package/dist/spine/core-reckoners.js +894 -0
- package/dist/spine/core-reckoners.js.map +1 -0
- package/dist/spine/dashboard-item.d.ts +12 -0
- package/dist/spine/dashboard-item.d.ts.map +1 -0
- package/dist/spine/dashboard-item.js +16 -0
- package/dist/spine/dashboard-item.js.map +1 -0
- package/dist/spine/delay-authority.d.ts +204 -0
- package/dist/spine/delay-authority.d.ts.map +1 -0
- package/dist/spine/delay-authority.js +306 -0
- package/dist/spine/delay-authority.js.map +1 -0
- package/dist/spine/delta-v-budget.d.ts +121 -0
- package/dist/spine/delta-v-budget.d.ts.map +1 -0
- package/dist/spine/delta-v-budget.js +141 -0
- package/dist/spine/delta-v-budget.js.map +1 -0
- package/dist/spine/departure-reckoning.d.ts +37 -0
- package/dist/spine/departure-reckoning.d.ts.map +1 -0
- package/dist/spine/departure-reckoning.js +44 -0
- package/dist/spine/departure-reckoning.js.map +1 -0
- package/dist/spine/dv-stage-resources.d.ts +29 -0
- package/dist/spine/dv-stage-resources.d.ts.map +1 -0
- package/dist/spine/dv-stage-resources.js +95 -0
- package/dist/spine/dv-stage-resources.js.map +1 -0
- package/dist/spine/heartbeat-tracker.d.ts +116 -0
- package/dist/spine/heartbeat-tracker.d.ts.map +1 -0
- package/dist/spine/heartbeat-tracker.js +175 -0
- package/dist/spine/heartbeat-tracker.js.map +1 -0
- package/dist/spine/held-command-actions.d.ts +33 -0
- package/dist/spine/held-command-actions.d.ts.map +1 -0
- package/dist/spine/held-command-actions.js +75 -0
- package/dist/spine/held-command-actions.js.map +1 -0
- package/dist/spine/impact-point.d.ts +97 -0
- package/dist/spine/impact-point.d.ts.map +1 -0
- package/dist/spine/impact-point.js +299 -0
- package/dist/spine/impact-point.js.map +1 -0
- package/dist/spine/index.d.ts +84 -0
- package/dist/spine/index.d.ts.map +1 -0
- package/dist/spine/index.js +132 -0
- package/dist/spine/index.js.map +1 -0
- package/dist/spine/kepler-reckoning.d.ts +244 -0
- package/dist/spine/kepler-reckoning.d.ts.map +1 -0
- package/dist/spine/kepler-reckoning.js +377 -0
- package/dist/spine/kepler-reckoning.js.map +1 -0
- package/dist/spine/kepler.d.ts +296 -0
- package/dist/spine/kepler.d.ts.map +1 -0
- package/dist/spine/kepler.js +330 -0
- package/dist/spine/kepler.js.map +1 -0
- package/dist/spine/lagrange.d.ts +247 -0
- package/dist/spine/lagrange.d.ts.map +1 -0
- package/dist/spine/lagrange.js +379 -0
- package/dist/spine/lagrange.js.map +1 -0
- package/dist/spine/lifecycle.d.ts +244 -0
- package/dist/spine/lifecycle.d.ts.map +1 -0
- package/dist/spine/lifecycle.js +37 -0
- package/dist/spine/lifecycle.js.map +1 -0
- package/dist/spine/lock-scope.d.ts +23 -0
- package/dist/spine/lock-scope.d.ts.map +1 -0
- package/dist/spine/lock-scope.js +10 -0
- package/dist/spine/lock-scope.js.map +1 -0
- package/dist/spine/map-command.d.ts +29 -0
- package/dist/spine/map-command.d.ts.map +1 -0
- package/dist/spine/map-command.js +32 -0
- package/dist/spine/map-command.js.map +1 -0
- package/dist/spine/map-topic.d.ts +60 -0
- package/dist/spine/map-topic.d.ts.map +1 -0
- package/dist/spine/map-topic.js +151 -0
- package/dist/spine/map-topic.js.map +1 -0
- package/dist/spine/mod-settings.d.ts +22 -0
- package/dist/spine/mod-settings.d.ts.map +1 -0
- package/dist/spine/mod-settings.js +42 -0
- package/dist/spine/mod-settings.js.map +1 -0
- package/dist/spine/never-reckonable.d.ts +79 -0
- package/dist/spine/never-reckonable.d.ts.map +1 -0
- package/dist/spine/never-reckonable.js +168 -0
- package/dist/spine/never-reckonable.js.map +1 -0
- package/dist/spine/orbit-patches.d.ts +81 -0
- package/dist/spine/orbit-patches.d.ts.map +1 -0
- package/dist/spine/orbit-patches.js +111 -0
- package/dist/spine/orbit-patches.js.map +1 -0
- package/dist/spine/orbit-trajectory.d.ts +276 -0
- package/dist/spine/orbit-trajectory.d.ts.map +1 -0
- package/dist/spine/orbit-trajectory.js +382 -0
- package/dist/spine/orbit-trajectory.js.map +1 -0
- package/dist/spine/orbital-solve.d.ts +164 -0
- package/dist/spine/orbital-solve.d.ts.map +1 -0
- package/dist/spine/orbital-solve.js +239 -0
- package/dist/spine/orbital-solve.js.map +1 -0
- package/dist/spine/own-craft-vantage.d.ts +80 -0
- package/dist/spine/own-craft-vantage.d.ts.map +1 -0
- package/dist/spine/own-craft-vantage.js +136 -0
- package/dist/spine/own-craft-vantage.js.map +1 -0
- package/dist/spine/past-track.d.ts +46 -0
- package/dist/spine/past-track.d.ts.map +1 -0
- package/dist/spine/past-track.js +62 -0
- package/dist/spine/past-track.js.map +1 -0
- package/dist/spine/powered-reckoning.d.ts +164 -0
- package/dist/spine/powered-reckoning.d.ts.map +1 -0
- package/dist/spine/powered-reckoning.js +514 -0
- package/dist/spine/powered-reckoning.js.map +1 -0
- package/dist/spine/processorEvaluator.d.ts +110 -0
- package/dist/spine/processorEvaluator.d.ts.map +1 -0
- package/dist/spine/processorEvaluator.js +608 -0
- package/dist/spine/processorEvaluator.js.map +1 -0
- package/dist/spine/processors.d.ts +242 -0
- package/dist/spine/processors.d.ts.map +1 -0
- package/dist/spine/processors.js +109 -0
- package/dist/spine/processors.js.map +1 -0
- package/dist/spine/propagation.d.ts +17 -0
- package/dist/spine/propagation.d.ts.map +1 -0
- package/dist/spine/propagation.js +22 -0
- package/dist/spine/propagation.js.map +1 -0
- package/dist/spine/rail-registry.d.ts +21 -0
- package/dist/spine/rail-registry.d.ts.map +1 -0
- package/dist/spine/rail-registry.js +7 -0
- package/dist/spine/rail-registry.js.map +1 -0
- package/dist/spine/reckoners.d.ts +133 -0
- package/dist/spine/reckoners.d.ts.map +1 -0
- package/dist/spine/reckoners.js +245 -0
- package/dist/spine/reckoners.js.map +1 -0
- package/dist/spine/reference-frame.d.ts +286 -0
- package/dist/spine/reference-frame.d.ts.map +1 -0
- package/dist/spine/reference-frame.js +605 -0
- package/dist/spine/reference-frame.js.map +1 -0
- package/dist/spine/replay-recorder.d.ts +72 -0
- package/dist/spine/replay-recorder.d.ts.map +1 -0
- package/dist/spine/replay-recorder.js +101 -0
- package/dist/spine/replay-recorder.js.map +1 -0
- package/dist/spine/replay-session-controller.d.ts +65 -0
- package/dist/spine/replay-session-controller.d.ts.map +1 -0
- package/dist/spine/replay-session-controller.js +220 -0
- package/dist/spine/replay-session-controller.js.map +1 -0
- package/dist/spine/replay-session.d.ts +20 -0
- package/dist/spine/replay-session.d.ts.map +1 -0
- package/dist/spine/replay-session.js +31 -0
- package/dist/spine/replay-session.js.map +1 -0
- package/dist/spine/replay-transport.d.ts +83 -0
- package/dist/spine/replay-transport.d.ts.map +1 -0
- package/dist/spine/replay-transport.js +95 -0
- package/dist/spine/replay-transport.js.map +1 -0
- package/dist/spine/screen.d.ts +46 -0
- package/dist/spine/screen.d.ts.map +1 -0
- package/dist/spine/screen.js +41 -0
- package/dist/spine/screen.js.map +1 -0
- package/dist/spine/settings-registry.d.ts +222 -0
- package/dist/spine/settings-registry.d.ts.map +1 -0
- package/dist/spine/settings-registry.js +43 -0
- package/dist/spine/settings-registry.js.map +1 -0
- package/dist/spine/settings-tabs.d.ts +39 -0
- package/dist/spine/settings-tabs.d.ts.map +1 -0
- package/dist/spine/settings-tabs.js +18 -0
- package/dist/spine/settings-tabs.js.map +1 -0
- package/dist/spine/share-equal.d.ts +11 -0
- package/dist/spine/share-equal.d.ts.map +1 -0
- package/dist/spine/share-equal.js +57 -0
- package/dist/spine/share-equal.js.map +1 -0
- package/dist/spine/size-delta.d.ts +9 -0
- package/dist/spine/size-delta.d.ts.map +1 -0
- package/dist/spine/size-delta.js +19 -0
- package/dist/spine/size-delta.js.map +1 -0
- package/dist/spine/space-center-state.d.ts +44 -0
- package/dist/spine/space-center-state.d.ts.map +1 -0
- package/dist/spine/space-center-state.js +51 -0
- package/dist/spine/space-center-state.js.map +1 -0
- package/dist/spine/stream-status.d.ts +21 -0
- package/dist/spine/stream-status.d.ts.map +1 -0
- package/dist/spine/stream-status.js +48 -0
- package/dist/spine/stream-status.js.map +1 -0
- package/dist/spine/subscribe-read.d.ts +51 -0
- package/dist/spine/subscribe-read.d.ts.map +1 -0
- package/dist/spine/subscribe-read.js +66 -0
- package/dist/spine/subscribe-read.js.map +1 -0
- package/dist/spine/subscriber-identity.d.ts +12 -0
- package/dist/spine/subscriber-identity.d.ts.map +1 -0
- package/dist/spine/subscriber-identity.js +33 -0
- package/dist/spine/subscriber-identity.js.map +1 -0
- package/dist/spine/system-state.d.ts +29 -0
- package/dist/spine/system-state.d.ts.map +1 -0
- package/dist/spine/system-state.js +25 -0
- package/dist/spine/system-state.js.map +1 -0
- package/dist/spine/target-range-reckoning.d.ts +33 -0
- package/dist/spine/target-range-reckoning.d.ts.map +1 -0
- package/dist/spine/target-range-reckoning.js +78 -0
- package/dist/spine/target-range-reckoning.js.map +1 -0
- package/dist/spine/timeline-store.d.ts +1336 -0
- package/dist/spine/timeline-store.d.ts.map +1 -0
- package/dist/spine/timeline-store.js +2893 -0
- package/dist/spine/timeline-store.js.map +1 -0
- package/dist/spine/topic-ownership.d.ts +138 -0
- package/dist/spine/topic-ownership.d.ts.map +1 -0
- package/dist/spine/topic-ownership.js +194 -0
- package/dist/spine/topic-ownership.js.map +1 -0
- package/dist/spine/unowned-warning.d.ts +25 -0
- package/dist/spine/unowned-warning.d.ts.map +1 -0
- package/dist/spine/unowned-warning.js +55 -0
- package/dist/spine/unowned-warning.js.map +1 -0
- package/dist/spine/uplink-clients.d.ts +135 -0
- package/dist/spine/uplink-clients.d.ts.map +1 -0
- package/dist/spine/uplink-clients.js +79 -0
- package/dist/spine/uplink-clients.js.map +1 -0
- package/dist/spine/uplink-health.d.ts +123 -0
- package/dist/spine/uplink-health.d.ts.map +1 -0
- package/dist/spine/uplink-health.js +75 -0
- package/dist/spine/uplink-health.js.map +1 -0
- package/dist/spine/use-action-input.d.ts +3 -0
- package/dist/spine/use-action-input.d.ts.map +1 -0
- package/dist/spine/use-action-input.js +76 -0
- package/dist/spine/use-action-input.js.map +1 -0
- package/dist/spine/use-body-states.d.ts +34 -0
- package/dist/spine/use-body-states.d.ts.map +1 -0
- package/dist/spine/use-body-states.js +23 -0
- package/dist/spine/use-body-states.js.map +1 -0
- package/dist/spine/use-command.d.ts +259 -0
- package/dist/spine/use-command.d.ts.map +1 -0
- package/dist/spine/use-command.js +626 -0
- package/dist/spine/use-command.js.map +1 -0
- package/dist/spine/use-data-sources.d.ts +7 -0
- package/dist/spine/use-data-sources.d.ts.map +1 -0
- package/dist/spine/use-data-sources.js +27 -0
- package/dist/spine/use-data-sources.js.map +1 -0
- package/dist/spine/use-late-telemetry-subscribe.d.ts +59 -0
- package/dist/spine/use-late-telemetry-subscribe.d.ts.map +1 -0
- package/dist/spine/use-late-telemetry-subscribe.js +81 -0
- package/dist/spine/use-late-telemetry-subscribe.js.map +1 -0
- package/dist/spine/use-orbit-trajectory.d.ts +25 -0
- package/dist/spine/use-orbit-trajectory.d.ts.map +1 -0
- package/dist/spine/use-orbit-trajectory.js +45 -0
- package/dist/spine/use-orbit-trajectory.js.map +1 -0
- package/dist/spine/use-processor.d.ts +30 -0
- package/dist/spine/use-processor.d.ts.map +1 -0
- package/dist/spine/use-processor.js +36 -0
- package/dist/spine/use-processor.js.map +1 -0
- package/dist/spine/use-route-commands.d.ts +28 -0
- package/dist/spine/use-route-commands.d.ts.map +1 -0
- package/dist/spine/use-route-commands.js +32 -0
- package/dist/spine/use-route-commands.js.map +1 -0
- package/dist/spine/use-selected-vantage.d.ts +12 -0
- package/dist/spine/use-selected-vantage.d.ts.map +1 -0
- package/dist/spine/use-selected-vantage.js +19 -0
- package/dist/spine/use-selected-vantage.js.map +1 -0
- package/dist/spine/use-stream-event.d.ts +28 -0
- package/dist/spine/use-stream-event.d.ts.map +1 -0
- package/dist/spine/use-stream-event.js +52 -0
- package/dist/spine/use-stream-event.js.map +1 -0
- package/dist/spine/use-stream.d.ts +79 -0
- package/dist/spine/use-stream.d.ts.map +1 -0
- package/dist/spine/use-stream.js +124 -0
- package/dist/spine/use-stream.js.map +1 -0
- package/dist/spine/use-telemetry.d.ts +79 -0
- package/dist/spine/use-telemetry.d.ts.map +1 -0
- package/dist/spine/use-telemetry.js +39 -0
- package/dist/spine/use-telemetry.js.map +1 -0
- package/dist/spine/use-transmissions.d.ts +36 -0
- package/dist/spine/use-transmissions.d.ts.map +1 -0
- package/dist/spine/use-transmissions.js +63 -0
- package/dist/spine/use-transmissions.js.map +1 -0
- package/dist/spine/vantage.d.ts +16 -0
- package/dist/spine/vantage.d.ts.map +1 -0
- package/dist/spine/vantage.js +16 -0
- package/dist/spine/vantage.js.map +1 -0
- package/dist/spine/view-clock.d.ts +232 -0
- package/dist/spine/view-clock.d.ts.map +1 -0
- package/dist/spine/view-clock.js +348 -0
- package/dist/spine/view-clock.js.map +1 -0
- package/dist/spine/wire-payloads.d.ts +232 -0
- package/dist/spine/wire-payloads.d.ts.map +1 -0
- package/dist/spine/wire-payloads.js +2 -0
- package/dist/spine/wire-payloads.js.map +1 -0
- package/dist/testing/console-logger.d.ts +10 -0
- package/dist/testing/console-logger.d.ts.map +1 -0
- package/dist/testing/console-logger.js +23 -0
- package/dist/testing/console-logger.js.map +1 -0
- package/dist/testing/create-test-telemetry-client.d.ts +13 -0
- package/dist/testing/create-test-telemetry-client.d.ts.map +1 -0
- package/dist/testing/create-test-telemetry-client.js +14 -0
- package/dist/testing/create-test-telemetry-client.js.map +1 -0
- package/dist/testing/fake-wall-clock.d.ts +19 -0
- package/dist/testing/fake-wall-clock.d.ts.map +1 -0
- package/dist/testing/fake-wall-clock.js +17 -0
- package/dist/testing/fake-wall-clock.js.map +1 -0
- package/dist/testing/index.d.ts +30 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +99 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/install-act-gate-stretch.d.ts +24 -0
- package/dist/testing/install-act-gate-stretch.d.ts.map +1 -0
- package/dist/testing/install-act-gate-stretch.js +67 -0
- package/dist/testing/install-act-gate-stretch.js.map +1 -0
- package/dist/testing/install-dom-stubs.d.ts +9 -0
- package/dist/testing/install-dom-stubs.d.ts.map +1 -0
- package/dist/testing/install-dom-stubs.js +121 -0
- package/dist/testing/install-dom-stubs.js.map +1 -0
- package/dist/testing/install-real-test-host.d.ts +51 -0
- package/dist/testing/install-real-test-host.d.ts.map +1 -0
- package/dist/testing/install-real-test-host.js +111 -0
- package/dist/testing/install-real-test-host.js.map +1 -0
- package/dist/testing/install-test-host.d.ts +18 -0
- package/dist/testing/install-test-host.d.ts.map +1 -0
- package/dist/testing/install-test-host.js +23 -0
- package/dist/testing/install-test-host.js.map +1 -0
- package/dist/testing/memory-storage.d.ts +10 -0
- package/dist/testing/memory-storage.d.ts.map +1 -0
- package/dist/testing/memory-storage.js +26 -0
- package/dist/testing/memory-storage.js.map +1 -0
- package/dist/testing/mock-data-source.d.ts +46 -0
- package/dist/testing/mock-data-source.d.ts.map +1 -0
- package/dist/testing/mock-data-source.js +74 -0
- package/dist/testing/mock-data-source.js.map +1 -0
- package/dist/testing/recorded-alarm-requests.d.ts +28 -0
- package/dist/testing/recorded-alarm-requests.d.ts.map +1 -0
- package/dist/testing/recorded-alarm-requests.js +24 -0
- package/dist/testing/recorded-alarm-requests.js.map +1 -0
- package/dist/testing/render.d.ts +29 -0
- package/dist/testing/render.d.ts.map +1 -0
- package/dist/testing/render.js +52 -0
- package/dist/testing/render.js.map +1 -0
- package/dist/testing/stream-fixture.d.ts +71 -0
- package/dist/testing/stream-fixture.d.ts.map +1 -0
- package/dist/testing/stream-fixture.js +61 -0
- package/dist/testing/stream-fixture.js.map +1 -0
- package/dist/testing/stub-transport.d.ts +124 -0
- package/dist/testing/stub-transport.d.ts.map +1 -0
- package/dist/testing/stub-transport.js +229 -0
- package/dist/testing/stub-transport.js.map +1 -0
- package/dist/testing/theme.d.ts +59 -0
- package/dist/testing/theme.d.ts.map +1 -0
- package/dist/testing/theme.js +11 -0
- package/dist/testing/theme.js.map +1 -0
- package/dist/timeline.d.ts +63 -0
- package/dist/timeline.d.ts.map +1 -0
- package/dist/timeline.js +2 -0
- package/dist/timeline.js.map +1 -0
- package/dist/topic-fields.d.ts +55 -0
- package/dist/topic-fields.d.ts.map +1 -0
- package/dist/topic-fields.js +102 -0
- package/dist/topic-fields.js.map +1 -0
- package/dist/topics.d.ts +335 -30
- package/dist/topics.d.ts.map +1 -1
- package/dist/topics.js +183 -28
- package/dist/topics.js.map +1 -1
- package/dist/unit-system/algebra.d.ts +305 -0
- package/dist/unit-system/algebra.d.ts.map +1 -0
- package/dist/unit-system/algebra.js +2 -0
- package/dist/unit-system/algebra.js.map +1 -0
- package/dist/unit-system/calendar.d.ts +74 -0
- package/dist/unit-system/calendar.d.ts.map +1 -0
- package/dist/unit-system/calendar.js +107 -0
- package/dist/unit-system/calendar.js.map +1 -0
- package/dist/unit-system/declarations.d.ts +87 -0
- package/dist/unit-system/declarations.d.ts.map +1 -0
- package/dist/unit-system/declarations.js +2 -0
- package/dist/unit-system/declarations.js.map +1 -0
- package/dist/unit-system/definitions.d.ts +639 -0
- package/dist/unit-system/definitions.d.ts.map +1 -0
- package/dist/unit-system/definitions.js +326 -0
- package/dist/unit-system/definitions.js.map +1 -0
- package/dist/unit-system/dimension.d.ts +29 -0
- package/dist/unit-system/dimension.d.ts.map +1 -0
- package/dist/unit-system/dimension.js +88 -0
- package/dist/unit-system/dimension.js.map +1 -0
- package/dist/unit-system/guards.d.ts +58 -0
- package/dist/unit-system/guards.d.ts.map +1 -0
- package/dist/unit-system/guards.js +73 -0
- package/dist/unit-system/guards.js.map +1 -0
- package/dist/unit-system/index.d.ts +16 -0
- package/dist/unit-system/index.d.ts.map +1 -0
- package/dist/unit-system/index.js +14 -0
- package/dist/unit-system/index.js.map +1 -0
- package/dist/unit-system/registry.d.ts +160 -0
- package/dist/unit-system/registry.d.ts.map +1 -0
- package/dist/unit-system/registry.js +267 -0
- package/dist/unit-system/registry.js.map +1 -0
- package/dist/unit-system/value.d.ts +437 -0
- package/dist/unit-system/value.d.ts.map +1 -0
- package/dist/unit-system/value.js +387 -0
- package/dist/unit-system/value.js.map +1 -0
- package/dist/units.d.ts +159 -0
- package/dist/units.d.ts.map +1 -0
- package/dist/units.js +385 -0
- package/dist/units.js.map +1 -0
- package/dist/uplink-externals.d.ts +65 -0
- package/dist/uplink-externals.d.ts.map +1 -0
- package/dist/uplink-externals.js +87 -0
- package/dist/uplink-externals.js.map +1 -0
- package/dist/uplink-manifest.d.ts +180 -0
- package/dist/uplink-manifest.d.ts.map +1 -0
- package/dist/uplink-manifest.js +214 -0
- package/dist/uplink-manifest.js.map +1 -0
- package/dist/value.d.ts +13 -0
- package/dist/value.d.ts.map +1 -0
- package/dist/value.js +2 -0
- package/dist/value.js.map +1 -0
- package/dist/version.generated.d.ts +7 -0
- package/dist/version.generated.d.ts.map +1 -0
- package/dist/version.generated.js +11 -0
- package/dist/version.generated.js.map +1 -0
- package/dist/view-clock-formula.d.ts +52 -0
- package/dist/view-clock-formula.d.ts.map +1 -0
- package/dist/view-clock-formula.js +46 -0
- package/dist/view-clock-formula.js.map +1 -0
- package/dist/wrap-units.d.ts +55 -0
- package/dist/wrap-units.d.ts.map +1 -0
- package/dist/wrap-units.js +256 -0
- package/dist/wrap-units.js.map +1 -0
- package/package.json +73 -11
- package/src/__generated__/command-map.ts +465 -0
- package/src/__generated__/contract.ts +10986 -0
- package/src/__generated__/control-channels.ts +41 -0
- package/src/__generated__/delay-roles.ts +82 -0
- package/src/__generated__/error-codes.ts +712 -0
- package/src/__generated__/frames.ts +52 -0
- package/src/__generated__/reckonability.ts +86 -0
- package/src/__generated__/test-theme.ts +70 -0
- package/src/__generated__/topic-map.ts +314 -0
- package/src/__generated__/units.json +2755 -0
- package/src/__generated__/units.ts +3398 -0
- package/src/api/action-dispatch.ts +105 -0
- package/src/api/alarm-request.ts +153 -0
- package/src/api/bodies.ts +116 -0
- package/src/api/command-rejection.ts +194 -0
- package/src/api/contribution-slots.ts +666 -0
- package/src/api/coverage/CoverageMaskCache.ts +112 -0
- package/src/api/coverage/CoverageMaskContext.tsx +79 -0
- package/src/api/coverage-source.ts +137 -0
- package/src/api/error-codes.ts +87 -0
- package/src/api/event-reveal.ts +96 -0
- package/src/api/host.ts +213 -0
- package/src/api/index.ts +1170 -0
- package/src/api/localStorageStore.ts +180 -0
- package/src/api/logger-contract.ts +38 -0
- package/src/api/logger.ts +17 -0
- package/src/api/map-poi.ts +98 -0
- package/src/api/plot-layers.ts +257 -0
- package/src/api/plots.ts +169 -0
- package/src/api/registry.ts +324 -0
- package/src/api/root-providers.tsx +136 -0
- package/src/api/safe-random-uuid.ts +22 -0
- package/src/api/settings/SettingsContext.tsx +79 -0
- package/src/api/settings/SettingsService.ts +142 -0
- package/src/api/settings/store.ts +180 -0
- package/src/api/slots.ts +1041 -0
- package/src/api/station-brokers.ts +94 -0
- package/src/api/stock-bodies.ts +281 -0
- package/src/api/tiny-size.ts +9 -0
- package/src/api/tone.ts +41 -0
- package/src/api/transport.ts +98 -0
- package/src/api/types.ts +1903 -0
- package/src/api/uplink-handles.ts +71 -0
- package/src/binary-frame.ts +250 -0
- package/src/burn-clock.ts +115 -0
- package/src/client.ts +56 -0
- package/src/combine-readings.ts +250 -0
- package/src/command-delay.ts +392 -0
- package/src/command-reply-units.ts +63 -0
- package/src/commands.ts +242 -0
- package/src/comms-degrade.ts +68 -0
- package/src/compat-versions.ts +44 -0
- package/src/contract-enum-names.ts +141 -0
- package/src/control-channels.ts +92 -0
- package/src/crew-standing.ts +131 -0
- package/src/delay-roles.ts +187 -0
- package/src/descent.ts +149 -0
- package/src/enum-names.ts +35 -0
- package/src/envelope.ts +45 -0
- package/src/event-timeline.ts +196 -0
- package/src/extensions.ts +58 -0
- package/src/field-frames.ts +70 -0
- package/src/flight/BufferedDataSource.ts +945 -0
- package/src/flight/DataSourceWrapper.ts +79 -0
- package/src/flight/ListenerSet.ts +73 -0
- package/src/flight/debugFlight.ts +16 -0
- package/src/flight/derive.ts +56 -0
- package/src/flight/fixtureIO.ts +197 -0
- package/src/flight/flightAutoDelete.ts +53 -0
- package/src/flight/flightDetector.ts +213 -0
- package/src/flight/storage/LocalStorageStore.ts +160 -0
- package/src/flight/storage/MemoryStore.ts +113 -0
- package/src/flight/storage/Store.ts +52 -0
- package/src/flight/types.ts +408 -0
- package/src/frame-qualifier.ts +153 -0
- package/src/frames/index.ts +177 -0
- package/src/index.ts +576 -0
- package/src/ksp-enum-names.ts +191 -0
- package/src/locked.ts +29 -0
- package/src/magnitude.ts +52 -0
- package/src/maneuver-basis.ts +49 -0
- package/src/media/capture-clock.ts +43 -0
- package/src/media/delayed-playout-buffer.ts +253 -0
- package/src/media/encoded-frame-delay.ts +153 -0
- package/src/media/frame-delay.ts +402 -0
- package/src/media/index.ts +83 -0
- package/src/media/radio-support.ts +132 -0
- package/src/media/shared-delayed-streams.ts +232 -0
- package/src/media/webcodecs-track-io.d.ts +99 -0
- package/src/media/worker/delay-worker-client.ts +312 -0
- package/src/media/worker/delay-worker.ts +433 -0
- package/src/media/worker/presentation-pacer.ts +249 -0
- package/src/media/worker/time-base.ts +55 -0
- package/src/media/worker/worker-delay-clock.ts +122 -0
- package/src/perf/PerfBudget.ts +267 -0
- package/src/rail-tags.ts +221 -0
- package/src/raw-field-split.ts +72 -0
- package/src/reading.ts +1565 -0
- package/src/reckonability.ts +117 -0
- package/src/registry/index.ts +36 -0
- package/src/runtime-topic-registry.ts +204 -0
- package/src/spine/arrival-deadline.ts +48 -0
- package/src/spine/atmospheric-reckoning.ts +540 -0
- package/src/spine/body-derivations.ts +103 -0
- package/src/spine/capability-lock.ts +210 -0
- package/src/spine/celestial-facts.ts +455 -0
- package/src/spine/channel-error-warning.ts +61 -0
- package/src/spine/client-reading.ts +282 -0
- package/src/spine/client-timeline.ts +234 -0
- package/src/spine/client.ts +1336 -0
- package/src/spine/clock.ts +57 -0
- package/src/spine/command-gate.ts +139 -0
- package/src/spine/comms-delay-reckoning.ts +217 -0
- package/src/spine/comms-journey.ts +256 -0
- package/src/spine/comms-path-geometry.ts +237 -0
- package/src/spine/comms-route.ts +142 -0
- package/src/spine/connection-error-warning.ts +54 -0
- package/src/spine/connectivity-history.ts +68 -0
- package/src/spine/context.tsx +1317 -0
- package/src/spine/contributed-channels.ts +126 -0
- package/src/spine/contribution-scope.ts +87 -0
- package/src/spine/contributions.ts +213 -0
- package/src/spine/control-frame-to-read-frame.ts +91 -0
- package/src/spine/core-reckoners.ts +1112 -0
- package/src/spine/dashboard-item.ts +25 -0
- package/src/spine/delay-authority.ts +337 -0
- package/src/spine/delta-v-budget.ts +311 -0
- package/src/spine/departure-reckoning.ts +69 -0
- package/src/spine/dv-stage-resources.ts +137 -0
- package/src/spine/heartbeat-tracker.ts +208 -0
- package/src/spine/held-command-actions.ts +119 -0
- package/src/spine/impact-point.ts +432 -0
- package/src/spine/index.ts +132 -0
- package/src/spine/kepler-reckoning.ts +572 -0
- package/src/spine/kepler.ts +576 -0
- package/src/spine/lagrange.ts +585 -0
- package/src/spine/lifecycle.ts +251 -0
- package/src/spine/lock-scope.ts +27 -0
- package/src/spine/map-command.ts +33 -0
- package/src/spine/map-topic.ts +163 -0
- package/src/spine/mod-settings.ts +47 -0
- package/src/spine/never-reckonable.ts +183 -0
- package/src/spine/orbit-patches.ts +213 -0
- package/src/spine/orbit-trajectory.ts +636 -0
- package/src/spine/orbital-solve.ts +393 -0
- package/src/spine/own-craft-vantage.tsx +161 -0
- package/src/spine/past-track.ts +93 -0
- package/src/spine/powered-reckoning.ts +866 -0
- package/src/spine/processorEvaluator.ts +688 -0
- package/src/spine/processors.ts +353 -0
- package/src/spine/propagation.ts +25 -0
- package/src/spine/rail-registry.ts +27 -0
- package/src/spine/reckoners.ts +317 -0
- package/src/spine/reference-frame.ts +816 -0
- package/src/spine/replay-recorder.ts +128 -0
- package/src/spine/replay-session-controller.ts +282 -0
- package/src/spine/replay-session.tsx +47 -0
- package/src/spine/replay-transport.ts +167 -0
- package/src/spine/screen.tsx +70 -0
- package/src/spine/settings-registry.ts +286 -0
- package/src/spine/settings-tabs.ts +57 -0
- package/src/spine/share-equal.ts +62 -0
- package/src/spine/size-delta.ts +23 -0
- package/src/spine/space-center-state.ts +101 -0
- package/src/spine/stream-status.ts +62 -0
- package/src/spine/subscribe-read.ts +88 -0
- package/src/spine/subscriber-identity.tsx +44 -0
- package/src/spine/system-state.ts +44 -0
- package/src/spine/target-range-reckoning.ts +127 -0
- package/src/spine/timeline-store.ts +3626 -0
- package/src/spine/topic-ownership.ts +211 -0
- package/src/spine/unowned-warning.ts +63 -0
- package/src/spine/uplink-clients.ts +265 -0
- package/src/spine/uplink-health.ts +256 -0
- package/src/spine/use-action-input.ts +87 -0
- package/src/spine/use-body-states.ts +52 -0
- package/src/spine/use-command.ts +1090 -0
- package/src/spine/use-data-sources.ts +43 -0
- package/src/spine/use-late-telemetry-subscribe.ts +111 -0
- package/src/spine/use-orbit-trajectory.ts +50 -0
- package/src/spine/use-processor.ts +56 -0
- package/src/spine/use-route-commands.ts +57 -0
- package/src/spine/use-selected-vantage.ts +23 -0
- package/src/spine/use-stream-event.ts +54 -0
- package/src/spine/use-stream.ts +137 -0
- package/src/spine/use-telemetry.ts +142 -0
- package/src/spine/use-transmissions.ts +100 -0
- package/src/spine/vantage.ts +15 -0
- package/src/spine/view-clock.ts +404 -0
- package/src/spine/wire-payloads.ts +242 -0
- package/src/testing/console-logger.ts +24 -0
- package/src/testing/create-test-telemetry-client.ts +17 -0
- package/src/testing/fake-wall-clock.ts +27 -0
- package/src/testing/index.ts +141 -0
- package/src/testing/install-act-gate-stretch.ts +83 -0
- package/src/testing/install-dom-stubs.ts +137 -0
- package/src/testing/install-real-test-host.ts +177 -0
- package/src/testing/install-test-host.ts +24 -0
- package/src/testing/memory-storage.ts +25 -0
- package/src/testing/mock-data-source.ts +109 -0
- package/src/testing/recorded-alarm-requests.ts +43 -0
- package/src/testing/render.tsx +78 -0
- package/src/testing/stream-fixture.tsx +130 -0
- package/src/testing/stub-transport.ts +289 -0
- package/src/testing/theme.ts +11 -0
- package/src/timeline.ts +68 -0
- package/src/topic-fields.ts +188 -0
- package/src/topics.ts +553 -0
- package/src/unit-system/algebra.ts +472 -0
- package/src/unit-system/calendar.ts +145 -0
- package/src/unit-system/declarations.ts +96 -0
- package/src/unit-system/definitions.ts +385 -0
- package/src/unit-system/dimension.ts +107 -0
- package/src/unit-system/guards.ts +82 -0
- package/src/unit-system/index.ts +68 -0
- package/src/unit-system/registry.ts +381 -0
- package/src/unit-system/value.ts +959 -0
- package/src/units.ts +462 -0
- package/src/uplink-externals.ts +91 -0
- package/src/uplink-manifest.ts +349 -0
- package/src/value.ts +15 -0
- package/src/version.generated.ts +10 -0
- package/src/view-clock-formula.ts +90 -0
- package/src/wrap-units.ts +361 -0
- package/tsconfig.base.json +16 -0
|
@@ -0,0 +1,790 @@
|
|
|
1
|
+
import { PerfBudget } from "../perf/PerfBudget.js";
|
|
2
|
+
import { DataSourceWrapper } from "./DataSourceWrapper.js";
|
|
3
|
+
import { debugFlight } from "./debugFlight.js";
|
|
4
|
+
import { getDerivedKeys } from "./derive.js";
|
|
5
|
+
import { exportFlightToFixture } from "./fixtureIO.js";
|
|
6
|
+
import { getKeepCount } from "./flightAutoDelete.js";
|
|
7
|
+
import { FlightDetector } from "./flightDetector.js";
|
|
8
|
+
import { KeyedListenerSet, ListenerSet } from "./ListenerSet.js";
|
|
9
|
+
/**
|
|
10
|
+
* Soft cap on samples flowing into the buffered layer. A polling telemetry
|
|
11
|
+
* source runs at 4 Hz across ~170 keys (worst-case 680/sec when every key
|
|
12
|
+
* changes each tick), plus a handful of derived keys and a brief replay burst
|
|
13
|
+
* on subscribe. A mid-flight refresh routinely comes close to 1500, so the cap
|
|
14
|
+
* sits at 3000: still tight enough to catch a true regression (duplicated
|
|
15
|
+
* samples, a runaway WS rate) without false-alarming on normal load.
|
|
16
|
+
*/
|
|
17
|
+
const BUFFERED_SAMPLE_BUDGET = new PerfBudget({
|
|
18
|
+
name: "BufferedDataSource samples in/sec",
|
|
19
|
+
threshold: 3000,
|
|
20
|
+
windowMs: 1000,
|
|
21
|
+
unit: "samples",
|
|
22
|
+
});
|
|
23
|
+
function hasExecuteScript(source) {
|
|
24
|
+
return (!!source &&
|
|
25
|
+
typeof source.executeScript === "function");
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Match a recovery/crash event to a FlightRecord by vessel name, prefer
|
|
29
|
+
* the most-recent (highest `launchedAt`). KSP may auto-name vessels with
|
|
30
|
+
* collisions so we don't trust the first match, we scan and pick the
|
|
31
|
+
* latest. Returns null if no flight in the list bears the given name.
|
|
32
|
+
*/
|
|
33
|
+
function pickMostRecentFlightByName(flights, vesselName) {
|
|
34
|
+
let best = null;
|
|
35
|
+
for (const f of flights) {
|
|
36
|
+
if (f.vesselName !== vesselName)
|
|
37
|
+
continue;
|
|
38
|
+
if (!best || f.launchedAt > best.launchedAt)
|
|
39
|
+
best = f;
|
|
40
|
+
}
|
|
41
|
+
return best;
|
|
42
|
+
}
|
|
43
|
+
function parseCrewNames(raw) {
|
|
44
|
+
if (!Array.isArray(raw))
|
|
45
|
+
return [];
|
|
46
|
+
const entries = raw;
|
|
47
|
+
const names = [];
|
|
48
|
+
for (const entry of entries) {
|
|
49
|
+
if (entry && typeof entry === "object" && !Array.isArray(entry)) {
|
|
50
|
+
const e = entry;
|
|
51
|
+
if (typeof e.name === "string")
|
|
52
|
+
names.push(e.name);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return names;
|
|
56
|
+
}
|
|
57
|
+
function parseStringArray(raw) {
|
|
58
|
+
if (!Array.isArray(raw))
|
|
59
|
+
return [];
|
|
60
|
+
return raw.filter((x) => typeof x === "string");
|
|
61
|
+
}
|
|
62
|
+
const KEY_AS_LABEL = (key) => ({ label: key, group: "Other" });
|
|
63
|
+
/**
|
|
64
|
+
* Wraps a live {@link DataSource}, saves every sample into a {@link FlightStore}
|
|
65
|
+
* under the flight it belongs to, and offers both live subscriptions and range
|
|
66
|
+
* queries over what it has saved.
|
|
67
|
+
*
|
|
68
|
+
* A subscription fires on new samples only, not on subscribing; read history
|
|
69
|
+
* with `queryRange`. After a reload it picks up the flights it saved, rather
|
|
70
|
+
* than starting them again.
|
|
71
|
+
*
|
|
72
|
+
* @category Flight recording
|
|
73
|
+
*/
|
|
74
|
+
export class BufferedDataSource extends DataSourceWrapper {
|
|
75
|
+
store;
|
|
76
|
+
detector = new FlightDetector();
|
|
77
|
+
inMemoryLimit;
|
|
78
|
+
now;
|
|
79
|
+
enrichKey;
|
|
80
|
+
latestName = null;
|
|
81
|
+
/** Latest known sample (t + v) per raw key, used by the derivation engine. */
|
|
82
|
+
lastRawSample = new Map();
|
|
83
|
+
/** Last inputs array passed to each derived fn, for the `previous` argument. */
|
|
84
|
+
derivedPrevious = new Map();
|
|
85
|
+
/**
|
|
86
|
+
* Last emitted value per key (raw + derived). Replayed synchronously on
|
|
87
|
+
* `subscribe()` so late subscribers (e.g. widgets that mount after the
|
|
88
|
+
* upstream WS push has already landed) see the current reading instead of
|
|
89
|
+
* waiting for the next sample.
|
|
90
|
+
*/
|
|
91
|
+
lastEmittedValue = new Map();
|
|
92
|
+
buffers = new Map();
|
|
93
|
+
keySubscribers = new KeyedListenerSet();
|
|
94
|
+
statusSubscribers = new ListenerSet();
|
|
95
|
+
flightSubscribers = new ListenerSet();
|
|
96
|
+
// Fires on every list-shape mutation (add via detection, delete, clear,
|
|
97
|
+
// star toggle, prune, chapter add/update/remove). FlightsManager subscribes
|
|
98
|
+
// to it to auto-refresh, and the peer host re-broadcasts so a mutation
|
|
99
|
+
// initiated on a station bubbles back to the main screen's open modal.
|
|
100
|
+
flightListSubscribers = new ListenerSet();
|
|
101
|
+
upstreamUnsubs = [];
|
|
102
|
+
upstreamStatusUnsub = null;
|
|
103
|
+
lastEmittedCurrent = null;
|
|
104
|
+
/**
|
|
105
|
+
* Keys we've subscribed to upstream because of `connect()`, i.e. every
|
|
106
|
+
* key the wrapped source advertises in `schema()`. Tracked so demand
|
|
107
|
+
* subscribes can skip them.
|
|
108
|
+
*/
|
|
109
|
+
upfrontKeys = new Set();
|
|
110
|
+
/**
|
|
111
|
+
* Schema entries from feeders other than the wrapped source (e.g. a
|
|
112
|
+
* centralised compute fanout). Surfaced through `schema()` so the picker shows them and
|
|
113
|
+
* exports include them. Populated via `registerExternalKeys`.
|
|
114
|
+
*/
|
|
115
|
+
externalSchema = new Map();
|
|
116
|
+
/**
|
|
117
|
+
* Indexed/dynamic keys (e.g. `b.name[1]`) aren't in the upstream
|
|
118
|
+
* schema, so they don't get subscribed at connect-time. When a widget
|
|
119
|
+
* calls subscribe() for one of these, we forward the subscribe to the
|
|
120
|
+
* upstream and ref-count callers so we can tear it down once the last
|
|
121
|
+
* widget leaves. Without this the upstream WS never carries the key
|
|
122
|
+
* and the widget waits forever.
|
|
123
|
+
*/
|
|
124
|
+
demandSubs = new Map();
|
|
125
|
+
/**
|
|
126
|
+
* Trust gate state. Tracks TWO independent signals, telemetry is
|
|
127
|
+
* trusted only when BOTH are good:
|
|
128
|
+
*
|
|
129
|
+
* 1. **The telemetry antenna** via `p.paused`. `0` = active + powered;
|
|
130
|
+
* `1` = game paused (frozen values still real). Anything else
|
|
131
|
+
* (2/3/4/5) means the antenna is gone / unpowered / off and
|
|
132
|
+
* vessel-required keys collapse to the literal value `2`,
|
|
133
|
+
* verified live 2026-05-18.
|
|
134
|
+
* 2. **Vanilla CommNet** via `comm.connected`. Mission-control
|
|
135
|
+
* link; independent of the telemetry antenna. Widgets that drive
|
|
136
|
+
* the vessel need this too, even with a live telemetry link: no
|
|
137
|
+
* CommNet means the operator shouldn't be acting on the data.
|
|
138
|
+
*
|
|
139
|
+
* Each signal has its own "ever confirmed good?" guard so cold-start
|
|
140
|
+
* `false` / non-zero values don't freeze widgets the moment a station
|
|
141
|
+
* connects. The combined gate activates when EITHER signal has been
|
|
142
|
+
* confirmed good and is now bad.
|
|
143
|
+
*
|
|
144
|
+
* Defaults are `true` so sources that aren't signal-affected aren't held
|
|
145
|
+
* back, and so a wrapped source that hasn't reported either key yet
|
|
146
|
+
* doesn't freeze every widget on cold-start.
|
|
147
|
+
*/
|
|
148
|
+
commGate = true;
|
|
149
|
+
hasConfirmedComm = false;
|
|
150
|
+
pPausedGate = true;
|
|
151
|
+
hasConfirmedPPaused = false;
|
|
152
|
+
// Idempotence keys for outcome annotation. The upstream
|
|
153
|
+
// recovery.lastSummary / crash.lastCrash are sticky, they emit the same
|
|
154
|
+
// payload on every WS tick until a fresh capture replaces them. Track
|
|
155
|
+
// the snapshot's capture-time so we only annotate the FlightRecord
|
|
156
|
+
// when a genuinely new outcome arrives.
|
|
157
|
+
lastAppliedRecoveryAtUT = null;
|
|
158
|
+
lastAppliedCrashAtUT = null;
|
|
159
|
+
constructor(opts) {
|
|
160
|
+
super(opts.source, {
|
|
161
|
+
id: opts.id ?? "data",
|
|
162
|
+
name: opts.name ?? `Buffered ${opts.source.name}`,
|
|
163
|
+
});
|
|
164
|
+
this.store = opts.store;
|
|
165
|
+
this.inMemoryLimit = opts.inMemoryLimit ?? 500;
|
|
166
|
+
this.now = opts.now ?? Date.now;
|
|
167
|
+
this.enrichKey = opts.enrichKey ?? KEY_AS_LABEL;
|
|
168
|
+
}
|
|
169
|
+
/** Alias for `this.real` for readability inside this wrapper. */
|
|
170
|
+
get source() {
|
|
171
|
+
return this.real;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Sets up the wrapper's subscriptions to the wrapped source. Does NOT
|
|
175
|
+
* call `source.connect()`: the wrapped source's connection lifecycle
|
|
176
|
+
* belongs to whoever registered it. Typically both sources are
|
|
177
|
+
* registered independently and the caller's "connect all registered
|
|
178
|
+
* sources" loop connects each exactly once.
|
|
179
|
+
*/
|
|
180
|
+
async connect() {
|
|
181
|
+
// Hydrate detector with any flights that already exist in the store so we resume rather than duplicate across reloads.
|
|
182
|
+
const known = await this.store.listFlights();
|
|
183
|
+
this.detector.hydrate(known);
|
|
184
|
+
// Honour the user's auto-delete preference at startup. Silent, the
|
|
185
|
+
// pref opts the user in to this behaviour; surfacing a toast each time
|
|
186
|
+
// would become noise.
|
|
187
|
+
const keepCount = getKeepCount();
|
|
188
|
+
if (keepCount > 0) {
|
|
189
|
+
await this.pruneFlightsKeepLatest({ keepCount });
|
|
190
|
+
}
|
|
191
|
+
// Subscribe to every key the upstream exposes. We don't filter, the
|
|
192
|
+
// graph widget may want any of them. The upstream schema is static so
|
|
193
|
+
// this is a fixed cost at connect time. Indexed keys (e.g.
|
|
194
|
+
// `b.name[1]`) live outside the schema; they're picked up via demand
|
|
195
|
+
// subscribes from `subscribe()` below.
|
|
196
|
+
for (const { key } of this.source.schema()) {
|
|
197
|
+
this.upfrontKeys.add(key);
|
|
198
|
+
const unsub = this.source.subscribe(key, (value) => {
|
|
199
|
+
this.handleSample(key, value);
|
|
200
|
+
});
|
|
201
|
+
this.upstreamUnsubs.push(unsub);
|
|
202
|
+
}
|
|
203
|
+
this.upstreamStatusUnsub = this.source.onStatusChange((status) => {
|
|
204
|
+
this.statusSubscribers.fire(status);
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Tears down the wrapper's subscriptions. The wrapped source is NOT
|
|
209
|
+
* disconnected here: same reasoning as `connect`.
|
|
210
|
+
*/
|
|
211
|
+
disconnect() {
|
|
212
|
+
for (const u of this.upstreamUnsubs)
|
|
213
|
+
u();
|
|
214
|
+
this.upstreamUnsubs = [];
|
|
215
|
+
for (const d of this.demandSubs.values())
|
|
216
|
+
d.unsub();
|
|
217
|
+
this.demandSubs.clear();
|
|
218
|
+
this.upfrontKeys.clear();
|
|
219
|
+
this.upstreamStatusUnsub?.();
|
|
220
|
+
this.upstreamStatusUnsub = null;
|
|
221
|
+
}
|
|
222
|
+
schema() {
|
|
223
|
+
const raw = this.source.schema().map((dk) => ({
|
|
224
|
+
...dk,
|
|
225
|
+
...this.enrichKey(dk.key),
|
|
226
|
+
}));
|
|
227
|
+
const derived = getDerivedKeys().map((def) => ({
|
|
228
|
+
key: def.id,
|
|
229
|
+
...def.meta,
|
|
230
|
+
}));
|
|
231
|
+
const external = [...this.externalSchema.values()];
|
|
232
|
+
return [...raw, ...derived, ...external];
|
|
233
|
+
}
|
|
234
|
+
subscribe(key, cb) {
|
|
235
|
+
const removeLocal = this.keySubscribers.add(key, cb);
|
|
236
|
+
// For keys NOT covered by the upfront schema sub (indexed keys like
|
|
237
|
+
// `b.name[1]`), demand-subscribe upstream so values actually flow.
|
|
238
|
+
// Reference-counted so multiple widgets share a single upstream sub.
|
|
239
|
+
//
|
|
240
|
+
// Schema-aware guard: a key that's part of the upstream's static
|
|
241
|
+
// schema will be subscribed by `connect()` regardless of whether
|
|
242
|
+
// that has happened yet. If a subscriber arrives BEFORE `connect`
|
|
243
|
+
// (e.g. PeerBroadcastingDataSource wraps us at module load and
|
|
244
|
+
// subscribes to every schema key in its constructor), we must NOT
|
|
245
|
+
// also create a demand-sub here: when `connect` runs, both the
|
|
246
|
+
// demand-sub AND the upfront-sub would deliver each upstream sample,
|
|
247
|
+
// doubling every fanout. The check against `source.schema()` covers
|
|
248
|
+
// the pre-connect window; `upfrontKeys.has(key)` covers post-connect.
|
|
249
|
+
const isSchemaKey = this.upfrontKeys.has(key) ||
|
|
250
|
+
this.source.schema().some((k) => k.key === key);
|
|
251
|
+
if (!isSchemaKey) {
|
|
252
|
+
const existing = this.demandSubs.get(key);
|
|
253
|
+
if (existing) {
|
|
254
|
+
existing.count += 1;
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
const unsub = this.source.subscribe(key, (value) => {
|
|
258
|
+
this.handleSample(key, value);
|
|
259
|
+
});
|
|
260
|
+
this.demandSubs.set(key, { count: 1, unsub });
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
// Replay the last-known value so late subscribers aren't stuck on `undefined` until the next sample arrives.
|
|
264
|
+
if (this.lastEmittedValue.has(key)) {
|
|
265
|
+
cb(this.lastEmittedValue.get(key));
|
|
266
|
+
}
|
|
267
|
+
return () => {
|
|
268
|
+
removeLocal();
|
|
269
|
+
const demand = this.demandSubs.get(key);
|
|
270
|
+
if (demand) {
|
|
271
|
+
demand.count -= 1;
|
|
272
|
+
if (demand.count <= 0) {
|
|
273
|
+
demand.unsub();
|
|
274
|
+
this.demandSubs.delete(key);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
onStatusChange(cb) {
|
|
280
|
+
return this.statusSubscribers.add(cb);
|
|
281
|
+
}
|
|
282
|
+
// Conditional getter so `hasExecuteScript(buffered)` reflects whether the wrapped source actually supports executeScript, matching the PeerBroadcastingDataSource pattern.
|
|
283
|
+
get executeScript() {
|
|
284
|
+
if (!hasExecuteScript(this.source))
|
|
285
|
+
return undefined;
|
|
286
|
+
return this.source.executeScript.bind(this.source);
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Columnar range query. Always hits the store, so pending writes are
|
|
290
|
+
* flushed first. Defaults `flightId` to the current flight when omitted.
|
|
291
|
+
*/
|
|
292
|
+
async queryRange(key, tStart, tEnd, flightId) {
|
|
293
|
+
const id = flightId ?? this.detector.getCurrent()?.id;
|
|
294
|
+
if (!id)
|
|
295
|
+
return { t: [], v: [] };
|
|
296
|
+
return this.store.queryRange(id, key, tStart, tEnd);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Latest single emitted value for a key, or undefined if none seen yet.
|
|
300
|
+
* Synchronous: used where widgets need a snapshot without subscribing
|
|
301
|
+
* (e.g. resolving telemetry args at script dispatch time).
|
|
302
|
+
*/
|
|
303
|
+
getLatestValue(key) {
|
|
304
|
+
return this.lastEmittedValue.get(key);
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Latest N samples for a key from the in-memory ring buffer. Synchronous,
|
|
308
|
+
* useful for the graph widget's first paint before any async query
|
|
309
|
+
* completes. May return fewer samples than requested, including zero.
|
|
310
|
+
*/
|
|
311
|
+
getLatest(key, n = this.inMemoryLimit) {
|
|
312
|
+
const buf = this.buffers.get(key);
|
|
313
|
+
if (!buf || buf.length === 0)
|
|
314
|
+
return { t: [], v: [] };
|
|
315
|
+
const start = Math.max(0, buf.length - n);
|
|
316
|
+
const slice = buf.slice(start);
|
|
317
|
+
return {
|
|
318
|
+
t: slice.map((r) => r.t),
|
|
319
|
+
v: slice.map((r) => r.v),
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Subscribe to a fixed set of keys and receive a single callback with an
|
|
324
|
+
* array of all current values whenever any of them changes. Keeps the
|
|
325
|
+
* coalescing and relabelling inside the data layer, consumers treat a
|
|
326
|
+
* group of related keys (e.g. per-stage fuel masses) as one value with
|
|
327
|
+
* one hook call.
|
|
328
|
+
*
|
|
329
|
+
* `values[i]` is `undefined` until `keys[i]` has emitted at least once.
|
|
330
|
+
* On subscribe, the last-known value for each key is replayed via
|
|
331
|
+
* `subscribe()`, so the callback typically fires once per already-seen
|
|
332
|
+
* key during setup and then once per change afterwards.
|
|
333
|
+
*/
|
|
334
|
+
subscribeCollection(keys, cb) {
|
|
335
|
+
const snapshot = new Array(keys.length).fill(undefined);
|
|
336
|
+
const unsubs = [];
|
|
337
|
+
keys.forEach((key, i) => {
|
|
338
|
+
unsubs.push(this.subscribe(key, (value) => {
|
|
339
|
+
snapshot[i] = value;
|
|
340
|
+
cb(snapshot.slice());
|
|
341
|
+
}));
|
|
342
|
+
});
|
|
343
|
+
return () => {
|
|
344
|
+
unsubs.forEach((u) => {
|
|
345
|
+
u();
|
|
346
|
+
});
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
// ── External-source ingestion ────────────────────────────────────────────
|
|
350
|
+
//
|
|
351
|
+
// The wrapped source drives FlightDetector + signal-loss gating and is the
|
|
352
|
+
// canonical sample feed. But we also want samples from other feeders (a
|
|
353
|
+
// centralised compute fanout, say) to land in the same flight record so they
|
|
354
|
+
// replay alongside it. These methods are the public seam for that: they
|
|
355
|
+
// bypass the gate + detector but feed the store + buffer + subscriber fanout
|
|
356
|
+
// exactly like a sample from the wrapped source.
|
|
357
|
+
//
|
|
358
|
+
// Keys must be globally unique across all feeders. A feeder that namespaces
|
|
359
|
+
// its keys under its own prefix cannot collide by construction.
|
|
360
|
+
/**
|
|
361
|
+
* Schema entries from other feeders, surfaced through `schema()` so the
|
|
362
|
+
* data picker shows them and `exportFlight` captures their samples.
|
|
363
|
+
* Caller (typically the app shell, after wiring that feeder) calls this
|
|
364
|
+
* once per known schema; calling again for the same key replaces.
|
|
365
|
+
*/
|
|
366
|
+
registerExternalKeys(keys) {
|
|
367
|
+
for (const k of keys)
|
|
368
|
+
this.externalSchema.set(k.key, k);
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Append a sample from another feeder. Same fanout chain as samples from
|
|
372
|
+
* the wrapped source (store, in-memory buffer, live subscribers,
|
|
373
|
+
* derived keys), minus the FlightDetector tick (driven by `v.missionTime`
|
|
374
|
+
* exclusively) and the signal-loss gate (a feeder running aboard the vessel
|
|
375
|
+
* isn't comm-affected).
|
|
376
|
+
*
|
|
377
|
+
* If no flight is established yet (the wrapped source's warmup hasn't
|
|
378
|
+
* completed), the sample is fanned out live but NOT persisted, same shape
|
|
379
|
+
* as pre-flight samples from the wrapped source.
|
|
380
|
+
*/
|
|
381
|
+
appendExternalSample(key, value) {
|
|
382
|
+
const t = this.now();
|
|
383
|
+
this.lastRawSample.set(key, { t, v: value });
|
|
384
|
+
const current = this.detector.getCurrent();
|
|
385
|
+
if (current) {
|
|
386
|
+
void this.store.appendSample(current.id, key, t, value);
|
|
387
|
+
this.pushToBuffer(key, t, value);
|
|
388
|
+
}
|
|
389
|
+
this.lastEmittedValue.set(key, value);
|
|
390
|
+
this.keySubscribers.fire(key, value);
|
|
391
|
+
// Derived keys can opt in by listing an external key as one of their inputs: same machinery as derivations driven by the wrapped source.
|
|
392
|
+
this.runDerivedKeys(key, current?.id ?? null);
|
|
393
|
+
}
|
|
394
|
+
onFlightChange(cb) {
|
|
395
|
+
return this.flightSubscribers.add(cb);
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Fires whenever the persisted flight list could have changed shape,
|
|
399
|
+
* a flight is added, deleted, starred, pruned, or its chapters changed.
|
|
400
|
+
* Sample-driven updates to the *current* flight are not signalled here;
|
|
401
|
+
* those go through `onFlightChange`.
|
|
402
|
+
*/
|
|
403
|
+
onFlightListChange(cb) {
|
|
404
|
+
return this.flightListSubscribers.add(cb);
|
|
405
|
+
}
|
|
406
|
+
listFlights() {
|
|
407
|
+
return this.store.listFlights();
|
|
408
|
+
}
|
|
409
|
+
getFlight(id) {
|
|
410
|
+
return this.store.getFlight(id);
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Export a recorded flight as a portable `FlightFixture`, every sample
|
|
414
|
+
* across every schema-known key, packaged with the flight metadata.
|
|
415
|
+
* Suitable for `JSON.stringify()` and round-tripping through the replay
|
|
416
|
+
* pipeline (or out to a `.json` file on disk). Persisted chapters on
|
|
417
|
+
* the FlightRecord are carried into the fixture's `chapters` array.
|
|
418
|
+
*/
|
|
419
|
+
async exportFlight(id) {
|
|
420
|
+
const schema = this.schema();
|
|
421
|
+
const fixture = await exportFlightToFixture(this.store, id, {
|
|
422
|
+
keys: schema.map((k) => k.key),
|
|
423
|
+
schema,
|
|
424
|
+
});
|
|
425
|
+
if (!fixture.flight.chapters || fixture.flight.chapters.length === 0) {
|
|
426
|
+
return fixture;
|
|
427
|
+
}
|
|
428
|
+
return { ...fixture, chapters: fixture.flight.chapters };
|
|
429
|
+
}
|
|
430
|
+
// ── Chapters (markers on a recorded flight) ──────────────────────────────
|
|
431
|
+
/**
|
|
432
|
+
* Add a new chapter to the flight and persist. Returns the upserted
|
|
433
|
+
* FlightRecord so callers can refresh their view immediately.
|
|
434
|
+
*/
|
|
435
|
+
async addChapter(flightId, chapter) {
|
|
436
|
+
const flight = await this.store.getFlight(flightId);
|
|
437
|
+
if (!flight)
|
|
438
|
+
return null;
|
|
439
|
+
const id = chapter.id ??
|
|
440
|
+
(typeof crypto !== "undefined" && crypto.randomUUID
|
|
441
|
+
? crypto.randomUUID()
|
|
442
|
+
: `ch-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`);
|
|
443
|
+
const next = {
|
|
444
|
+
id,
|
|
445
|
+
label: chapter.label,
|
|
446
|
+
startMs: chapter.startMs,
|
|
447
|
+
endMs: chapter.endMs,
|
|
448
|
+
};
|
|
449
|
+
const updated = {
|
|
450
|
+
...flight,
|
|
451
|
+
chapters: [...(flight.chapters ?? []), next],
|
|
452
|
+
};
|
|
453
|
+
await this.store.upsertFlight(updated);
|
|
454
|
+
if (this.detector.getCurrent()?.id === flightId)
|
|
455
|
+
this.emitFlightChange();
|
|
456
|
+
this.flightListSubscribers.fire();
|
|
457
|
+
return updated;
|
|
458
|
+
}
|
|
459
|
+
async updateChapter(flightId, chapterId, patch) {
|
|
460
|
+
const flight = await this.store.getFlight(flightId);
|
|
461
|
+
if (!flight)
|
|
462
|
+
return null;
|
|
463
|
+
const chapters = (flight.chapters ?? []).map((c) => c.id === chapterId ? { ...c, ...patch } : c);
|
|
464
|
+
const updated = { ...flight, chapters };
|
|
465
|
+
await this.store.upsertFlight(updated);
|
|
466
|
+
if (this.detector.getCurrent()?.id === flightId)
|
|
467
|
+
this.emitFlightChange();
|
|
468
|
+
this.flightListSubscribers.fire();
|
|
469
|
+
return updated;
|
|
470
|
+
}
|
|
471
|
+
async removeChapter(flightId, chapterId) {
|
|
472
|
+
const flight = await this.store.getFlight(flightId);
|
|
473
|
+
if (!flight)
|
|
474
|
+
return null;
|
|
475
|
+
const chapters = (flight.chapters ?? []).filter((c) => c.id !== chapterId);
|
|
476
|
+
const updated = { ...flight, chapters };
|
|
477
|
+
await this.store.upsertFlight(updated);
|
|
478
|
+
if (this.detector.getCurrent()?.id === flightId)
|
|
479
|
+
this.emitFlightChange();
|
|
480
|
+
this.flightListSubscribers.fire();
|
|
481
|
+
return updated;
|
|
482
|
+
}
|
|
483
|
+
getCurrentFlight() {
|
|
484
|
+
return this.detector.getCurrent();
|
|
485
|
+
}
|
|
486
|
+
async deleteFlight(id) {
|
|
487
|
+
const wasCurrent = this.detector.getCurrent()?.id === id;
|
|
488
|
+
this.detector.forget(id);
|
|
489
|
+
await this.store.deleteFlight(id);
|
|
490
|
+
if (wasCurrent)
|
|
491
|
+
this.emitFlightChange();
|
|
492
|
+
this.flightListSubscribers.fire();
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Pin a flight so it's exempt from the auto-delete cleanup. Per-row delete
|
|
496
|
+
* and "Clear all" still remove starred flights, this only protects against
|
|
497
|
+
* the silent age-based prune.
|
|
498
|
+
*/
|
|
499
|
+
async setFlightStarred(id, starred) {
|
|
500
|
+
const flight = await this.store.getFlight(id);
|
|
501
|
+
if (!flight)
|
|
502
|
+
return;
|
|
503
|
+
if (Boolean(flight.starred) === starred)
|
|
504
|
+
return;
|
|
505
|
+
const updated = { ...flight, starred };
|
|
506
|
+
await this.store.upsertFlight(updated);
|
|
507
|
+
if (this.detector.getCurrent()?.id === id)
|
|
508
|
+
this.emitFlightChange();
|
|
509
|
+
this.flightListSubscribers.fire();
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Keep the `keepCount` most recently launched flights (by `launchedAt`),
|
|
513
|
+
* deleting the rest. Starred flights and the current flight are exempt:
|
|
514
|
+
* they are never evicted and they don't count toward the cap. Returns the
|
|
515
|
+
* ids that were actually removed.
|
|
516
|
+
*/
|
|
517
|
+
async pruneFlightsKeepLatest(opts) {
|
|
518
|
+
if (opts.keepCount <= 0)
|
|
519
|
+
return [];
|
|
520
|
+
const all = await this.store.listFlights();
|
|
521
|
+
const sorted = [...all].sort((a, b) => b.launchedAt - a.launchedAt);
|
|
522
|
+
const currentId = this.detector.getCurrent()?.id ?? null;
|
|
523
|
+
const victims = [];
|
|
524
|
+
let kept = 0;
|
|
525
|
+
for (const f of sorted) {
|
|
526
|
+
if (f.starred || f.id === currentId)
|
|
527
|
+
continue;
|
|
528
|
+
kept += 1;
|
|
529
|
+
if (kept > opts.keepCount)
|
|
530
|
+
victims.push(f);
|
|
531
|
+
}
|
|
532
|
+
for (const f of victims) {
|
|
533
|
+
await this.deleteFlight(f.id);
|
|
534
|
+
}
|
|
535
|
+
return victims.map((f) => f.id);
|
|
536
|
+
}
|
|
537
|
+
async clearAllFlights() {
|
|
538
|
+
this.detector.forgetAll();
|
|
539
|
+
await this.store.clearAllFlights();
|
|
540
|
+
this.buffers.clear();
|
|
541
|
+
this.lastRawSample.clear();
|
|
542
|
+
this.derivedPrevious.clear();
|
|
543
|
+
this.lastEmittedValue.clear();
|
|
544
|
+
this.emitFlightChange();
|
|
545
|
+
this.flightListSubscribers.fire();
|
|
546
|
+
}
|
|
547
|
+
handleSample(key, value) {
|
|
548
|
+
BUFFERED_SAMPLE_BUDGET.record();
|
|
549
|
+
// Trust-gate trackers: BOTH `comm.connected` (vanilla CommNet) and
|
|
550
|
+
// `p.paused` (the telemetry antenna) must be good for the source to
|
|
551
|
+
// be trusted. Cold-start guards on each: only a confirmed-good
|
|
552
|
+
// then bad transition activates that signal's half of the gate.
|
|
553
|
+
if (key === "comm.connected") {
|
|
554
|
+
if (value === true) {
|
|
555
|
+
this.commGate = true;
|
|
556
|
+
this.hasConfirmedComm = true;
|
|
557
|
+
}
|
|
558
|
+
if (value === false && this.hasConfirmedComm) {
|
|
559
|
+
this.commGate = false;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
if (key === "p.paused") {
|
|
563
|
+
if (value === 0 || value === 1) {
|
|
564
|
+
this.pPausedGate = true;
|
|
565
|
+
this.hasConfirmedPPaused = true;
|
|
566
|
+
}
|
|
567
|
+
if (typeof value === "number" &&
|
|
568
|
+
this.hasConfirmedPPaused &&
|
|
569
|
+
value !== 0 &&
|
|
570
|
+
value !== 1) {
|
|
571
|
+
this.pPausedGate = false;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
// Antenna-down gate. When the wrapped source is
|
|
575
|
+
// signal-affected and we've confirmed a prior live
|
|
576
|
+
// link that has since dropped, drop ONLY the specific keys that
|
|
577
|
+
// collapse to the literal value `2` in this state. Everything
|
|
578
|
+
// else stays: tracking-station-observable (vessel position +
|
|
579
|
+
// basic orbital elements + resource quantities + crew + atmosphere
|
|
580
|
+
// readings) and KSC-global state remain trustworthy whether or
|
|
581
|
+
// not the telemetry antenna is up.
|
|
582
|
+
//
|
|
583
|
+
// Rather than try to enumerate the honest set (a moving target), we enumerate the broken set.
|
|
584
|
+
//
|
|
585
|
+
// Special-cases handled outside the blocklist:
|
|
586
|
+
// - `p.paused` itself: returns the literal `2` here (it IS the
|
|
587
|
+
// "no power" status code), but must always flow so we can
|
|
588
|
+
// detect the gate-lift event. Excluded from the blocklist.
|
|
589
|
+
// - `comm.controlState`: returns `2` here but legitimately:
|
|
590
|
+
// `2` means "full control" in the vanilla CommNet enum and
|
|
591
|
+
// CommNet is independent of the telemetry antenna. Flows.
|
|
592
|
+
const isAntennaOnlyKey = key.startsWith("land.") ||
|
|
593
|
+
key.startsWith("therm.") ||
|
|
594
|
+
(key.startsWith("v.") && key.endsWith("Value")) ||
|
|
595
|
+
key === "f.throttle" ||
|
|
596
|
+
key === "v.currentStage" ||
|
|
597
|
+
key === "dv.stageCount";
|
|
598
|
+
const signalConnected = this.commGate && this.pPausedGate;
|
|
599
|
+
const hasConfirmedConnection = this.hasConfirmedComm || this.hasConfirmedPPaused;
|
|
600
|
+
if (this.source.affectedBySignalLoss &&
|
|
601
|
+
hasConfirmedConnection &&
|
|
602
|
+
!signalConnected &&
|
|
603
|
+
isAntennaOnlyKey) {
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
// Cache the identity inputs regardless: the detector needs both, and they
|
|
607
|
+
// may arrive in separate callbacks within the same WS message. Only the
|
|
608
|
+
// name is cached, since `v.missionTime` drives the detector directly.
|
|
609
|
+
if (key === "v.name" && typeof value === "string") {
|
|
610
|
+
this.latestName = value;
|
|
611
|
+
}
|
|
612
|
+
// Recovery / crash snapshots from the GonogoTelemetry plugin,
|
|
613
|
+
// annotate the matching flight record with the final outcome. Idempotent
|
|
614
|
+
// per snapshot ut (the snapshots are sticky upstream; we
|
|
615
|
+
// don't want to overwrite an outcome with the same outcome every tick).
|
|
616
|
+
if (key === "recovery.lastSummary" && value && typeof value === "object") {
|
|
617
|
+
this.applyRecoveryOutcome(value);
|
|
618
|
+
}
|
|
619
|
+
if (key === "crash.lastCrash" && value && typeof value === "object") {
|
|
620
|
+
this.applyCrashOutcome(value);
|
|
621
|
+
}
|
|
622
|
+
const t = this.now();
|
|
623
|
+
// Track latest raw sample for the derivation engine.
|
|
624
|
+
this.lastRawSample.set(key, { t, v: value });
|
|
625
|
+
// Run the detector off v.missionTime as the driver. It ticks every frame
|
|
626
|
+
// with a numeric value, and by the time it arrives in a given WS message
|
|
627
|
+
// v.name has already been processed.
|
|
628
|
+
if (key === "v.missionTime" &&
|
|
629
|
+
this.latestName !== null &&
|
|
630
|
+
typeof value === "number") {
|
|
631
|
+
const before = this.detector.getCurrent();
|
|
632
|
+
const decision = this.detector.observe({
|
|
633
|
+
vesselName: this.latestName,
|
|
634
|
+
missionTime: value,
|
|
635
|
+
now: t,
|
|
636
|
+
});
|
|
637
|
+
void this.store.upsertFlight(decision.flight);
|
|
638
|
+
if (!before || before.id !== decision.flight.id) {
|
|
639
|
+
this.emitFlightChange();
|
|
640
|
+
}
|
|
641
|
+
// Newly minted flight grows the persisted list; let any open
|
|
642
|
+
// FlightsManager refresh without waiting for a manual reload.
|
|
643
|
+
// Resumes and appends don't change shape (the record was already
|
|
644
|
+
// there or was already current).
|
|
645
|
+
if (decision.kind === "new") {
|
|
646
|
+
this.flightListSubscribers.fire();
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
const current = this.detector.getCurrent();
|
|
650
|
+
// Append to store + in-memory buffer only if we've identified a flight.
|
|
651
|
+
// Samples arriving before v.name/v.missionTime have landed are dropped,
|
|
652
|
+
// a short warmup on first connect.
|
|
653
|
+
if (current) {
|
|
654
|
+
void this.store.appendSample(current.id, key, t, value);
|
|
655
|
+
this.pushToBuffer(key, t, value);
|
|
656
|
+
}
|
|
657
|
+
else {
|
|
658
|
+
debugFlight("drop-pre-flight", { key });
|
|
659
|
+
}
|
|
660
|
+
// Fan out to live subscribers regardless of whether we have a flight, so they get live values during warmup.
|
|
661
|
+
this.lastEmittedValue.set(key, value);
|
|
662
|
+
this.keySubscribers.fire(key, value);
|
|
663
|
+
// Run derived keys that depend on this raw key.
|
|
664
|
+
this.runDerivedKeys(key, current?.id ?? null);
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Annotate the FlightRecord matching the recovered vessel with a
|
|
668
|
+
* recovery outcome. Matches by `vesselName` against listFlights ordered
|
|
669
|
+
* by most-recent: the recovered vessel is almost always the most
|
|
670
|
+
* recent flight, but if names collide (rare; KSP auto-assigns names),
|
|
671
|
+
* the most-recent match wins.
|
|
672
|
+
*
|
|
673
|
+
* Idempotent per `capturedAtUT`: a sticky `recovery.lastSummary`
|
|
674
|
+
* snapshot keeps emitting until replaced, but the FlightRecord is
|
|
675
|
+
* only updated once per snapshot.
|
|
676
|
+
*/
|
|
677
|
+
applyRecoveryOutcome(payload) {
|
|
678
|
+
const capturedAt = typeof payload.capturedAtUT === "number" ? payload.capturedAtUT : 0;
|
|
679
|
+
if (capturedAt === this.lastAppliedRecoveryAtUT)
|
|
680
|
+
return;
|
|
681
|
+
const vesselName = typeof payload.vesselName === "string" ? payload.vesselName : "";
|
|
682
|
+
if (!vesselName)
|
|
683
|
+
return;
|
|
684
|
+
this.lastAppliedRecoveryAtUT = capturedAt;
|
|
685
|
+
void this.store.listFlights().then((flights) => {
|
|
686
|
+
const match = pickMostRecentFlightByName(flights, vesselName);
|
|
687
|
+
if (!match)
|
|
688
|
+
return;
|
|
689
|
+
const outcome = {
|
|
690
|
+
kind: "recovered",
|
|
691
|
+
recordedAt: this.now(),
|
|
692
|
+
recoveryLocation: typeof payload.recoveryLocation === "string"
|
|
693
|
+
? payload.recoveryLocation
|
|
694
|
+
: "",
|
|
695
|
+
recoveryFactor: typeof payload.recoveryFactor === "string"
|
|
696
|
+
? payload.recoveryFactor
|
|
697
|
+
: "",
|
|
698
|
+
fundsEarned: typeof payload.fundsEarned === "number" ? payload.fundsEarned : 0,
|
|
699
|
+
scienceEarned: typeof payload.scienceEarned === "number" ? payload.scienceEarned : 0,
|
|
700
|
+
reputationEarned: typeof payload.reputationEarned === "number"
|
|
701
|
+
? payload.reputationEarned
|
|
702
|
+
: 0,
|
|
703
|
+
crew: parseCrewNames(payload.crewBreakdown),
|
|
704
|
+
};
|
|
705
|
+
void this.store.upsertFlight({ ...match, outcome });
|
|
706
|
+
this.flightListSubscribers.fire();
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
applyCrashOutcome(payload) {
|
|
710
|
+
const ut = typeof payload.ut === "number" ? payload.ut : 0;
|
|
711
|
+
if (ut === this.lastAppliedCrashAtUT)
|
|
712
|
+
return;
|
|
713
|
+
const vesselName = typeof payload.vesselName === "string" ? payload.vesselName : "";
|
|
714
|
+
if (!vesselName)
|
|
715
|
+
return;
|
|
716
|
+
this.lastAppliedCrashAtUT = ut;
|
|
717
|
+
void this.store.listFlights().then((flights) => {
|
|
718
|
+
const match = pickMostRecentFlightByName(flights, vesselName);
|
|
719
|
+
if (!match)
|
|
720
|
+
return;
|
|
721
|
+
const partsLost = Array.isArray(payload.partsLost)
|
|
722
|
+
? payload.partsLost.length
|
|
723
|
+
: 0;
|
|
724
|
+
const outcome = {
|
|
725
|
+
kind: "crashed",
|
|
726
|
+
recordedAt: this.now(),
|
|
727
|
+
body: typeof payload.body === "string" ? payload.body : "",
|
|
728
|
+
situation: typeof payload.situation === "string" ? payload.situation : "",
|
|
729
|
+
what: typeof payload.what === "string" ? payload.what : "",
|
|
730
|
+
partsLostCount: partsLost,
|
|
731
|
+
kerbalsKilled: parseStringArray(payload.kerbalsKilled),
|
|
732
|
+
};
|
|
733
|
+
void this.store.upsertFlight({ ...match, outcome });
|
|
734
|
+
this.flightListSubscribers.fire();
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
runDerivedKeys(changedKey, flightId) {
|
|
738
|
+
for (const def of getDerivedKeys()) {
|
|
739
|
+
if (!def.inputs.includes(changedKey))
|
|
740
|
+
continue;
|
|
741
|
+
// All inputs must have been seen at least once before we fire.
|
|
742
|
+
const inputSamples = [];
|
|
743
|
+
let allSeen = true;
|
|
744
|
+
for (const inputKey of def.inputs) {
|
|
745
|
+
const s = this.lastRawSample.get(inputKey);
|
|
746
|
+
if (!s) {
|
|
747
|
+
allSeen = false;
|
|
748
|
+
break;
|
|
749
|
+
}
|
|
750
|
+
inputSamples.push(s);
|
|
751
|
+
}
|
|
752
|
+
if (!allSeen)
|
|
753
|
+
continue;
|
|
754
|
+
const previous = this.derivedPrevious.get(def.id) ?? null;
|
|
755
|
+
const result = def.fn(inputSamples, previous);
|
|
756
|
+
this.derivedPrevious.set(def.id, inputSamples);
|
|
757
|
+
if (result === undefined)
|
|
758
|
+
continue;
|
|
759
|
+
const derivedT = this.now();
|
|
760
|
+
if (flightId) {
|
|
761
|
+
void this.store.appendSample(flightId, def.id, derivedT, result);
|
|
762
|
+
this.pushToBuffer(def.id, derivedT, result);
|
|
763
|
+
}
|
|
764
|
+
this.lastEmittedValue.set(def.id, result);
|
|
765
|
+
this.keySubscribers.fire(def.id, result);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
pushToBuffer(key, t, v) {
|
|
769
|
+
let buf = this.buffers.get(key);
|
|
770
|
+
if (!buf) {
|
|
771
|
+
buf = [];
|
|
772
|
+
this.buffers.set(key, buf);
|
|
773
|
+
}
|
|
774
|
+
buf.push({ t, v });
|
|
775
|
+
if (buf.length > this.inMemoryLimit) {
|
|
776
|
+
// Trim from the front in chunks of 1, cheap enough at 4Hz; move to a circular buffer if this ever shows up in profiling.
|
|
777
|
+
buf.shift();
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
emitFlightChange() {
|
|
781
|
+
const next = this.detector.getCurrent();
|
|
782
|
+
if (next === this.lastEmittedCurrent)
|
|
783
|
+
return;
|
|
784
|
+
this.lastEmittedCurrent = next;
|
|
785
|
+
// Reset derivation state across flight boundaries so rates don't straddle two flights.
|
|
786
|
+
this.derivedPrevious.clear();
|
|
787
|
+
this.flightSubscribers.fire(next);
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
//# sourceMappingURL=BufferedDataSource.js.map
|