@ksp-gonogo/sitrep-sdk 1.0.0-rc.45 → 1.0.0
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/README.md +48 -93
- package/dist/__generated__/command-map.d.ts +247 -2
- package/dist/__generated__/command-map.d.ts.map +1 -1
- package/dist/__generated__/command-map.js +91 -19
- package/dist/__generated__/command-map.js.map +1 -1
- package/dist/__generated__/contract.d.ts +3062 -352
- package/dist/__generated__/contract.d.ts.map +1 -1
- package/dist/__generated__/contract.js +187 -3
- package/dist/__generated__/contract.js.map +1 -1
- package/dist/__generated__/delay-roles.d.ts +2 -2
- package/dist/__generated__/delay-roles.d.ts.map +1 -1
- package/dist/__generated__/delay-roles.js +12 -0
- package/dist/__generated__/delay-roles.js.map +1 -1
- package/dist/__generated__/error-codes.d.ts +11 -11
- package/dist/__generated__/error-codes.d.ts.map +1 -1
- package/dist/__generated__/error-codes.js +12 -12
- package/dist/__generated__/error-codes.js.map +1 -1
- package/dist/__generated__/frames.d.ts +40 -4
- package/dist/__generated__/frames.d.ts.map +1 -1
- package/dist/__generated__/frames.js +20 -4
- package/dist/__generated__/frames.js.map +1 -1
- package/dist/__generated__/reckonability.d.ts +3 -1
- package/dist/__generated__/reckonability.d.ts.map +1 -1
- package/dist/__generated__/reckonability.js +1 -1
- package/dist/__generated__/reckonability.js.map +1 -1
- package/dist/__generated__/sample-kinds.d.ts +18 -2
- package/dist/__generated__/sample-kinds.d.ts.map +1 -1
- package/dist/__generated__/sample-kinds.js +18 -2
- package/dist/__generated__/sample-kinds.js.map +1 -1
- package/dist/__generated__/topic-map.d.ts +41 -17
- package/dist/__generated__/topic-map.d.ts.map +1 -1
- package/dist/__generated__/topic-map.js +16 -3
- package/dist/__generated__/topic-map.js.map +1 -1
- package/dist/__generated__/units.d.ts +247 -6
- package/dist/__generated__/units.d.ts.map +1 -1
- package/dist/__generated__/units.js +949 -76
- package/dist/__generated__/units.js.map +1 -1
- package/dist/api/command-rejection.d.ts +2 -2
- package/dist/api/command-rejection.js +1 -1
- package/dist/api/contribution-slots.d.ts +122 -21
- package/dist/api/contribution-slots.d.ts.map +1 -1
- package/dist/api/contribution-slots.js +4 -4
- package/dist/api/contribution-slots.js.map +1 -1
- package/dist/api/error-codes.d.ts +3 -2
- package/dist/api/error-codes.d.ts.map +1 -1
- package/dist/api/error-codes.js +3 -2
- package/dist/api/error-codes.js.map +1 -1
- package/dist/api/framework-reads.d.ts +2 -2
- package/dist/api/framework-reads.d.ts.map +1 -1
- package/dist/api/framework-reads.js +6 -1
- package/dist/api/framework-reads.js.map +1 -1
- package/dist/api/host.d.ts +14 -6
- package/dist/api/host.d.ts.map +1 -1
- package/dist/api/host.js.map +1 -1
- package/dist/api/index.d.ts +70 -60
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +66 -54
- package/dist/api/index.js.map +1 -1
- package/dist/api/logger-contract.d.ts +2 -1
- package/dist/api/logger-contract.d.ts.map +1 -1
- package/dist/api/logger.d.ts +6 -3
- package/dist/api/logger.d.ts.map +1 -1
- package/dist/api/logger.js +6 -3
- package/dist/api/logger.js.map +1 -1
- package/dist/api/part-panels.d.ts +143 -0
- package/dist/api/part-panels.d.ts.map +1 -0
- package/dist/api/part-panels.js +104 -0
- package/dist/api/part-panels.js.map +1 -0
- package/dist/api/plot-layers.d.ts +1 -1
- package/dist/api/plot-layers.js +1 -1
- package/dist/api/registry.d.ts +4 -2
- package/dist/api/registry.d.ts.map +1 -1
- package/dist/api/registry.js +4 -2
- package/dist/api/registry.js.map +1 -1
- package/dist/api/settings/store.d.ts +1 -1
- package/dist/api/settings/store.d.ts.map +1 -1
- package/dist/api/settings/store.js +7 -2
- package/dist/api/settings/store.js.map +1 -1
- package/dist/api/slots.d.ts +150 -70
- package/dist/api/slots.d.ts.map +1 -1
- package/dist/api/station-brokers.d.ts +24 -15
- package/dist/api/station-brokers.d.ts.map +1 -1
- package/dist/api/station-brokers.js +24 -15
- package/dist/api/station-brokers.js.map +1 -1
- package/dist/api/tiny-size.d.ts +2 -1
- package/dist/api/tiny-size.d.ts.map +1 -1
- package/dist/api/tiny-size.js +2 -1
- package/dist/api/tiny-size.js.map +1 -1
- package/dist/api/tone.d.ts +1 -1
- package/dist/api/transport.d.ts +9 -0
- package/dist/api/transport.d.ts.map +1 -1
- package/dist/api/types.d.ts +356 -68
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/uplink-banner.d.ts +113 -0
- package/dist/api/uplink-banner.d.ts.map +1 -0
- package/dist/api/uplink-banner.js +69 -0
- package/dist/api/uplink-banner.js.map +1 -0
- package/dist/api/uplink-handles.d.ts +2 -12
- package/dist/api/uplink-handles.d.ts.map +1 -1
- package/dist/api/uplink-handles.js +2 -1
- package/dist/api/uplink-handles.js.map +1 -1
- package/dist/binary-frame.d.ts +4 -4
- package/dist/binary-frame.js +2 -2
- package/dist/combine-readings.d.ts +4 -3
- package/dist/combine-readings.d.ts.map +1 -1
- package/dist/combine-readings.js +4 -3
- package/dist/combine-readings.js.map +1 -1
- package/dist/command-delay.d.ts +81 -2
- package/dist/command-delay.d.ts.map +1 -1
- package/dist/command-delay.js +51 -8
- package/dist/command-delay.js.map +1 -1
- package/dist/command-value.d.ts +98 -0
- package/dist/command-value.d.ts.map +1 -0
- package/dist/command-value.js +87 -0
- package/dist/command-value.js.map +1 -0
- package/dist/commands.d.ts +1 -1
- package/dist/commands.d.ts.map +1 -1
- package/dist/compat-versions.d.ts +1 -1
- package/dist/compat-versions.d.ts.map +1 -1
- package/dist/compat-versions.js +3 -3
- package/dist/compat-versions.js.map +1 -1
- package/dist/contract-enum-names.d.ts +2 -2
- package/dist/contract-enum-names.js +2 -2
- package/dist/contract-tags.d.ts +33 -2
- package/dist/contract-tags.d.ts.map +1 -1
- package/dist/contract-tags.js +54 -5
- package/dist/contract-tags.js.map +1 -1
- package/dist/data-rate.d.ts +84 -0
- package/dist/data-rate.d.ts.map +1 -0
- package/dist/data-rate.js +133 -0
- package/dist/data-rate.js.map +1 -0
- package/dist/delay-roles.d.ts +14 -1
- package/dist/delay-roles.d.ts.map +1 -1
- package/dist/delay-roles.js +5 -1
- package/dist/delay-roles.js.map +1 -1
- package/dist/dock-markers.d.ts +126 -0
- package/dist/dock-markers.d.ts.map +1 -0
- package/dist/dock-markers.js +100 -0
- package/dist/dock-markers.js.map +1 -0
- package/dist/envelope.d.ts +2 -2
- package/dist/envelope.d.ts.map +1 -1
- package/dist/flight/types.d.ts +31 -2
- package/dist/flight/types.d.ts.map +1 -1
- package/dist/flight/types.js.map +1 -1
- package/dist/frames/index.d.ts +1 -4
- package/dist/frames/index.d.ts.map +1 -1
- package/dist/frames/index.js +0 -3
- package/dist/frames/index.js.map +1 -1
- package/dist/go-no-go-countdown.d.ts +65 -0
- package/dist/go-no-go-countdown.d.ts.map +1 -0
- package/dist/go-no-go-countdown.js +71 -0
- package/dist/go-no-go-countdown.js.map +1 -0
- package/dist/index.d.ts +13 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/ksp-enum-names.d.ts +35 -4
- package/dist/ksp-enum-names.d.ts.map +1 -1
- package/dist/ksp-enum-names.js +31 -4
- package/dist/ksp-enum-names.js.map +1 -1
- package/dist/locked.d.ts +1 -1
- package/dist/locked.js +1 -1
- package/dist/media/delayed-playout-buffer.d.ts +29 -4
- package/dist/media/delayed-playout-buffer.d.ts.map +1 -1
- package/dist/media/delayed-playout-buffer.js +12 -5
- package/dist/media/delayed-playout-buffer.js.map +1 -1
- package/dist/media/encoded-frame-delay.d.ts +21 -16
- package/dist/media/encoded-frame-delay.d.ts.map +1 -1
- package/dist/media/encoded-frame-delay.js +21 -14
- package/dist/media/encoded-frame-delay.js.map +1 -1
- package/dist/media/frame-delay.d.ts +119 -5
- package/dist/media/frame-delay.d.ts.map +1 -1
- package/dist/media/frame-delay.js +201 -15
- package/dist/media/frame-delay.js.map +1 -1
- package/dist/media/frame-stamp-timeline.d.ts +119 -0
- package/dist/media/frame-stamp-timeline.d.ts.map +1 -0
- package/dist/media/frame-stamp-timeline.js +194 -0
- package/dist/media/frame-stamp-timeline.js.map +1 -0
- package/dist/media/index.d.ts +4 -3
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +1 -1
- package/dist/media/index.js.map +1 -1
- package/dist/media/radio-support.d.ts +8 -7
- package/dist/media/radio-support.d.ts.map +1 -1
- package/dist/media/radio-support.js +5 -6
- package/dist/media/radio-support.js.map +1 -1
- package/dist/media/worker/delay-worker-client.d.ts +27 -1
- package/dist/media/worker/delay-worker-client.d.ts.map +1 -1
- package/dist/media/worker/delay-worker-client.js +53 -5
- package/dist/media/worker/delay-worker-client.js.map +1 -1
- package/dist/media/worker/delay-worker.d.ts +45 -8
- package/dist/media/worker/delay-worker.d.ts.map +1 -1
- package/dist/media/worker/delay-worker.js +644 -56
- package/dist/media/worker/delay-worker.js.map +4 -4
- package/dist/media/worker/frame-delay-report.d.ts +25 -0
- package/dist/media/worker/frame-delay-report.d.ts.map +1 -0
- package/dist/media/worker/frame-delay-report.js +112 -0
- package/dist/media/worker/frame-delay-report.js.map +1 -0
- package/dist/media/worker/lead-limit-report.d.ts +13 -0
- package/dist/media/worker/lead-limit-report.d.ts.map +1 -0
- package/dist/media/worker/lead-limit-report.js +19 -0
- package/dist/media/worker/lead-limit-report.js.map +1 -0
- package/dist/media/worker/presentation-pacer.d.ts +70 -1
- package/dist/media/worker/presentation-pacer.d.ts.map +1 -1
- package/dist/media/worker/presentation-pacer.js +167 -9
- package/dist/media/worker/presentation-pacer.js.map +1 -1
- package/dist/media/worker/worker-delay-clock.d.ts +4 -5
- package/dist/media/worker/worker-delay-clock.d.ts.map +1 -1
- package/dist/media/worker/worker-delay-clock.js +6 -2
- package/dist/media/worker/worker-delay-clock.js.map +1 -1
- package/dist/perf/PerfBudget.d.ts +2 -2
- package/dist/perf/PerfBudget.js +2 -2
- package/dist/rail-tags.d.ts +7 -0
- package/dist/rail-tags.d.ts.map +1 -1
- package/dist/rail-tags.js.map +1 -1
- package/dist/raw-field-split.d.ts +1 -1
- package/dist/raw-field-split.js +1 -1
- package/dist/reading.d.ts +6 -6
- package/dist/reading.js +5 -5
- package/dist/reads-index.json +446 -37
- package/dist/resource-transfer.d.ts +177 -0
- package/dist/resource-transfer.d.ts.map +1 -0
- package/dist/resource-transfer.js +190 -0
- package/dist/resource-transfer.js.map +1 -0
- package/dist/runtime-topic-registry.d.ts +2 -2
- package/dist/runtime-topic-registry.d.ts.map +1 -1
- package/dist/runtime-topic-registry.js +23 -2
- package/dist/runtime-topic-registry.js.map +1 -1
- package/dist/sample-step-tracker.d.ts +17 -0
- package/dist/sample-step-tracker.d.ts.map +1 -0
- package/dist/sample-step-tracker.js +38 -0
- package/dist/sample-step-tracker.js.map +1 -0
- package/dist/sha256-fallback.d.ts +6 -0
- package/dist/sha256-fallback.d.ts.map +1 -0
- package/dist/sha256-fallback.js +68 -0
- package/dist/sha256-fallback.js.map +1 -0
- package/dist/spine/arrival-deadline.d.ts +7 -0
- package/dist/spine/arrival-deadline.d.ts.map +1 -1
- package/dist/spine/arrival-deadline.js +12 -0
- package/dist/spine/arrival-deadline.js.map +1 -1
- package/dist/spine/bound-command.d.ts +58 -0
- package/dist/spine/bound-command.d.ts.map +1 -0
- package/dist/spine/bound-command.js +162 -0
- package/dist/spine/bound-command.js.map +1 -0
- package/dist/spine/capability-lock.d.ts +6 -1
- package/dist/spine/capability-lock.d.ts.map +1 -1
- package/dist/spine/capability-lock.js +56 -5
- package/dist/spine/capability-lock.js.map +1 -1
- package/dist/spine/catalog-fallback.d.ts +28 -0
- package/dist/spine/catalog-fallback.d.ts.map +1 -0
- package/dist/spine/catalog-fallback.js +120 -0
- package/dist/spine/catalog-fallback.js.map +1 -0
- package/dist/spine/celestial-facts.d.ts.map +1 -1
- package/dist/spine/celestial-facts.js +5 -2
- package/dist/spine/celestial-facts.js.map +1 -1
- package/dist/spine/centre-commands.d.ts +84 -0
- package/dist/spine/centre-commands.d.ts.map +1 -0
- package/dist/spine/centre-commands.js +236 -0
- package/dist/spine/centre-commands.js.map +1 -0
- package/dist/spine/client-reading.js +1 -1
- package/dist/spine/client-timeline.d.ts +48 -1
- package/dist/spine/client-timeline.d.ts.map +1 -1
- package/dist/spine/client-timeline.js +151 -3
- package/dist/spine/client-timeline.js.map +1 -1
- package/dist/spine/client.d.ts +154 -4
- package/dist/spine/client.d.ts.map +1 -1
- package/dist/spine/client.js +530 -34
- package/dist/spine/client.js.map +1 -1
- package/dist/spine/command-gate.d.ts +8 -0
- package/dist/spine/command-gate.d.ts.map +1 -1
- package/dist/spine/command-gate.js +36 -3
- package/dist/spine/command-gate.js.map +1 -1
- package/dist/spine/command-outcomes.d.ts +60 -0
- package/dist/spine/command-outcomes.d.ts.map +1 -0
- package/dist/spine/command-outcomes.js +256 -0
- package/dist/spine/command-outcomes.js.map +1 -0
- package/dist/spine/connectivity-history.d.ts +5 -3
- package/dist/spine/connectivity-history.d.ts.map +1 -1
- package/dist/spine/connectivity-history.js.map +1 -1
- package/dist/spine/context.d.ts +62 -11
- package/dist/spine/context.d.ts.map +1 -1
- package/dist/spine/context.js +125 -39
- package/dist/spine/context.js.map +1 -1
- package/dist/spine/core-reckoners.d.ts.map +1 -1
- package/dist/spine/core-reckoners.js +16 -39
- package/dist/spine/core-reckoners.js.map +1 -1
- package/dist/spine/delay-authority-context.d.ts +5 -0
- package/dist/spine/delay-authority-context.d.ts.map +1 -0
- package/dist/spine/delay-authority-context.js +7 -0
- package/dist/spine/delay-authority-context.js.map +1 -0
- package/dist/spine/delay-authority.d.ts +76 -1
- package/dist/spine/delay-authority.d.ts.map +1 -1
- package/dist/spine/delay-authority.js +217 -3
- package/dist/spine/delay-authority.js.map +1 -1
- package/dist/spine/delay-estimate.d.ts +41 -0
- package/dist/spine/delay-estimate.d.ts.map +1 -0
- package/dist/spine/delay-estimate.js +70 -0
- package/dist/spine/delay-estimate.js.map +1 -0
- package/dist/spine/delta-v-budget.js +2 -2
- package/dist/spine/delta-v-budget.js.map +1 -1
- package/dist/spine/dv-stage-resources.d.ts +32 -17
- package/dist/spine/dv-stage-resources.d.ts.map +1 -1
- package/dist/spine/dv-stage-resources.js +44 -37
- package/dist/spine/dv-stage-resources.js.map +1 -1
- package/dist/spine/index.d.ts +7 -1
- package/dist/spine/index.d.ts.map +1 -1
- package/dist/spine/index.js +11 -5
- package/dist/spine/index.js.map +1 -1
- package/dist/spine/kepler-reckoning.d.ts +56 -0
- package/dist/spine/kepler-reckoning.d.ts.map +1 -1
- package/dist/spine/kepler-reckoning.js +179 -3
- package/dist/spine/kepler-reckoning.js.map +1 -1
- package/dist/spine/kepler.d.ts +1 -1
- package/dist/spine/kepler.js +1 -1
- package/dist/spine/known-holds.d.ts +8 -0
- package/dist/spine/known-holds.d.ts.map +1 -0
- package/dist/spine/known-holds.js +78 -0
- package/dist/spine/known-holds.js.map +1 -0
- package/dist/spine/lagrange.d.ts +9 -34
- package/dist/spine/lagrange.d.ts.map +1 -1
- package/dist/spine/lagrange.js +4 -24
- package/dist/spine/lagrange.js.map +1 -1
- package/dist/spine/lifecycle.d.ts +21 -0
- package/dist/spine/lifecycle.d.ts.map +1 -1
- package/dist/spine/lifecycle.js.map +1 -1
- package/dist/spine/lock-scope.d.ts +2 -2
- package/dist/spine/map-topic.d.ts +3 -3
- package/dist/spine/map-topic.js +3 -3
- package/dist/spine/never-reckonable.js +1 -1
- package/dist/spine/never-reckonable.js.map +1 -1
- package/dist/spine/orbit-patches.d.ts +6 -4
- package/dist/spine/orbit-patches.d.ts.map +1 -1
- package/dist/spine/orbit-patches.js +45 -10
- package/dist/spine/orbit-patches.js.map +1 -1
- package/dist/spine/orbital-solve.d.ts +1 -1
- package/dist/spine/orbital-solve.d.ts.map +1 -1
- package/dist/spine/orbital-solve.js +35 -0
- package/dist/spine/orbital-solve.js.map +1 -1
- package/dist/spine/powered-reckoning.d.ts +5 -0
- package/dist/spine/powered-reckoning.d.ts.map +1 -1
- package/dist/spine/powered-reckoning.js.map +1 -1
- package/dist/spine/processorEvaluator.d.ts +29 -0
- package/dist/spine/processorEvaluator.d.ts.map +1 -1
- package/dist/spine/processorEvaluator.js +94 -71
- package/dist/spine/processorEvaluator.js.map +1 -1
- package/dist/spine/processors.d.ts +56 -4
- package/dist/spine/processors.d.ts.map +1 -1
- package/dist/spine/processors.js +110 -0
- package/dist/spine/processors.js.map +1 -1
- package/dist/spine/rail-registry.d.ts +1 -1
- package/dist/spine/rail-registry.d.ts.map +1 -1
- package/dist/spine/reckoner-generation.d.ts +5 -0
- package/dist/spine/reckoner-generation.d.ts.map +1 -0
- package/dist/spine/reckoner-generation.js +10 -0
- package/dist/spine/reckoner-generation.js.map +1 -0
- package/dist/spine/reckoners.d.ts.map +1 -1
- package/dist/spine/reckoners.js +3 -0
- package/dist/spine/reckoners.js.map +1 -1
- package/dist/spine/replay-session-controller.d.ts +1 -1
- package/dist/spine/replay-session-controller.d.ts.map +1 -1
- package/dist/spine/replay-session-controller.js +4 -6
- package/dist/spine/replay-session-controller.js.map +1 -1
- package/dist/spine/resolve-tracked.d.ts +20 -2
- package/dist/spine/resolve-tracked.d.ts.map +1 -1
- package/dist/spine/resolve-tracked.js +32 -2
- package/dist/spine/resolve-tracked.js.map +1 -1
- package/dist/spine/send-status.d.ts +2 -0
- package/dist/spine/send-status.d.ts.map +1 -1
- package/dist/spine/send-status.js.map +1 -1
- package/dist/spine/settings-registry.d.ts +7 -0
- package/dist/spine/settings-registry.d.ts.map +1 -1
- package/dist/spine/settings-registry.js.map +1 -1
- package/dist/spine/slot-ids.d.ts +1 -1
- package/dist/spine/slot-ids.d.ts.map +1 -1
- package/dist/spine/slot-ids.js +6 -3
- package/dist/spine/slot-ids.js.map +1 -1
- package/dist/spine/space-center-state.d.ts +17 -9
- package/dist/spine/space-center-state.d.ts.map +1 -1
- package/dist/spine/space-center-state.js +14 -15
- package/dist/spine/space-center-state.js.map +1 -1
- package/dist/spine/stage-countdown-store.d.ts +38 -0
- package/dist/spine/stage-countdown-store.d.ts.map +1 -0
- package/dist/spine/stage-countdown-store.js +53 -0
- package/dist/spine/stage-countdown-store.js.map +1 -0
- package/dist/spine/stream-status.d.ts +3 -3
- package/dist/spine/stream-status.js +3 -3
- package/dist/spine/subscribe-read.d.ts +1 -1
- package/dist/spine/subscribe-read.js +2 -2
- package/dist/spine/system-state.d.ts +13 -13
- package/dist/spine/system-state.d.ts.map +1 -1
- package/dist/spine/system-state.js +18 -18
- package/dist/spine/system-state.js.map +1 -1
- package/dist/spine/timeline-store.d.ts +304 -113
- package/dist/spine/timeline-store.d.ts.map +1 -1
- package/dist/spine/timeline-store.js +921 -223
- package/dist/spine/timeline-store.js.map +1 -1
- package/dist/spine/uplink-clients.d.ts +32 -16
- package/dist/spine/uplink-clients.d.ts.map +1 -1
- package/dist/spine/uplink-clients.js +8 -4
- package/dist/spine/uplink-clients.js.map +1 -1
- package/dist/spine/uplink-delays.d.ts +31 -0
- package/dist/spine/uplink-delays.d.ts.map +1 -0
- package/dist/spine/uplink-delays.js +46 -0
- package/dist/spine/uplink-delays.js.map +1 -0
- package/dist/spine/uplink-health.d.ts +109 -14
- package/dist/spine/uplink-health.d.ts.map +1 -1
- package/dist/spine/uplink-health.js +21 -17
- package/dist/spine/uplink-health.js.map +1 -1
- package/dist/spine/use-action-input.d.ts.map +1 -1
- package/dist/spine/use-action-input.js +14 -9
- package/dist/spine/use-action-input.js.map +1 -1
- package/dist/spine/use-body-states.d.ts.map +1 -1
- package/dist/spine/use-body-states.js +3 -3
- package/dist/spine/use-body-states.js.map +1 -1
- package/dist/spine/use-command.d.ts +94 -31
- package/dist/spine/use-command.d.ts.map +1 -1
- package/dist/spine/use-command.js +409 -197
- package/dist/spine/use-command.js.map +1 -1
- package/dist/spine/use-last-known-path.d.ts +36 -0
- package/dist/spine/use-last-known-path.d.ts.map +1 -0
- package/dist/spine/use-last-known-path.js +46 -0
- package/dist/spine/use-last-known-path.js.map +1 -0
- package/dist/spine/use-observed-vantage.d.ts +13 -0
- package/dist/spine/use-observed-vantage.d.ts.map +1 -0
- package/dist/spine/use-observed-vantage.js +20 -0
- package/dist/spine/use-observed-vantage.js.map +1 -0
- package/dist/spine/use-orbit-trajectory.d.ts +1 -1
- package/dist/spine/use-orbit-trajectory.d.ts.map +1 -1
- package/dist/spine/use-orbit-trajectory.js +17 -3
- package/dist/spine/use-orbit-trajectory.js.map +1 -1
- package/dist/spine/use-stream-connected.d.ts +8 -0
- package/dist/spine/use-stream-connected.d.ts.map +1 -0
- package/dist/spine/use-stream-connected.js +16 -0
- package/dist/spine/use-stream-connected.js.map +1 -0
- package/dist/spine/use-stream-event.d.ts +6 -1
- package/dist/spine/use-stream-event.d.ts.map +1 -1
- package/dist/spine/use-stream-event.js +5 -1
- package/dist/spine/use-stream-event.js.map +1 -1
- package/dist/spine/use-stream.d.ts +5 -2
- package/dist/spine/use-stream.d.ts.map +1 -1
- package/dist/spine/use-stream.js +7 -4
- package/dist/spine/use-stream.js.map +1 -1
- package/dist/spine/use-telemetry.d.ts +5 -1
- package/dist/spine/use-telemetry.d.ts.map +1 -1
- package/dist/spine/use-telemetry.js.map +1 -1
- package/dist/spine/use-topic-clock.d.ts +54 -0
- package/dist/spine/use-topic-clock.d.ts.map +1 -0
- package/dist/spine/use-topic-clock.js +137 -0
- package/dist/spine/use-topic-clock.js.map +1 -0
- package/dist/spine/use-transmissions.d.ts.map +1 -1
- package/dist/spine/use-transmissions.js +9 -4
- package/dist/spine/use-transmissions.js.map +1 -1
- package/dist/spine/vantage.d.ts +6 -0
- package/dist/spine/vantage.d.ts.map +1 -1
- package/dist/spine/vantage.js +6 -0
- package/dist/spine/vantage.js.map +1 -1
- package/dist/spine/view-clock.d.ts +23 -3
- package/dist/spine/view-clock.d.ts.map +1 -1
- package/dist/spine/view-clock.js +80 -2
- package/dist/spine/view-clock.js.map +1 -1
- package/dist/testing/fake-command.d.ts +48 -0
- package/dist/testing/fake-command.d.ts.map +1 -0
- package/dist/testing/fake-command.js +63 -0
- package/dist/testing/fake-command.js.map +1 -0
- package/dist/testing/index.d.ts +5 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +6 -0
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/install-act-gate-stretch.d.ts +1 -2
- package/dist/testing/install-act-gate-stretch.d.ts.map +1 -1
- package/dist/testing/install-act-gate-stretch.js +1 -2
- package/dist/testing/install-act-gate-stretch.js.map +1 -1
- package/dist/testing/install-dom-stubs.d.ts +2 -5
- package/dist/testing/install-dom-stubs.d.ts.map +1 -1
- package/dist/testing/install-dom-stubs.js +2 -34
- package/dist/testing/install-dom-stubs.js.map +1 -1
- package/dist/testing/install-real-test-host.d.ts.map +1 -1
- package/dist/testing/install-real-test-host.js +7 -6
- package/dist/testing/install-real-test-host.js.map +1 -1
- package/dist/testing/recorded-uplink-banners.d.ts +49 -0
- package/dist/testing/recorded-uplink-banners.d.ts.map +1 -0
- package/dist/testing/recorded-uplink-banners.js +45 -0
- package/dist/testing/recorded-uplink-banners.js.map +1 -0
- package/dist/testing/render.d.ts +16 -3
- package/dist/testing/render.d.ts.map +1 -1
- package/dist/testing/render.js +16 -3
- package/dist/testing/render.js.map +1 -1
- package/dist/testing/stream-fixture.js +3 -3
- package/dist/testing/stream-fixture.js.map +1 -1
- package/dist/testing/stub-transport.d.ts +6 -0
- package/dist/testing/stub-transport.d.ts.map +1 -1
- package/dist/testing/stub-transport.js +3 -0
- package/dist/testing/stub-transport.js.map +1 -1
- package/dist/timeline.d.ts +2 -98
- package/dist/timeline.d.ts.map +1 -1
- package/dist/topics.d.ts +68 -28
- package/dist/topics.d.ts.map +1 -1
- package/dist/topics.js +21 -18
- package/dist/topics.js.map +1 -1
- package/dist/unit-system/index.d.ts +1 -1
- package/dist/unit-system/index.d.ts.map +1 -1
- package/dist/unit-system/index.js +1 -1
- package/dist/unit-system/index.js.map +1 -1
- package/dist/unit-system/value.d.ts +26 -5
- package/dist/unit-system/value.d.ts.map +1 -1
- package/dist/unit-system/value.js +41 -21
- package/dist/unit-system/value.js.map +1 -1
- package/dist/units.d.ts.map +1 -1
- package/dist/units.js +2 -1
- package/dist/units.js.map +1 -1
- package/dist/uplink-externals.d.ts +17 -7
- package/dist/uplink-externals.d.ts.map +1 -1
- package/dist/uplink-externals.js +17 -7
- package/dist/uplink-externals.js.map +1 -1
- package/dist/uplink-load.d.ts +3 -2
- package/dist/uplink-load.d.ts.map +1 -1
- package/dist/uplink-load.js +9 -6
- package/dist/uplink-load.js.map +1 -1
- package/dist/uplink-manifest.d.ts +8 -3
- package/dist/uplink-manifest.d.ts.map +1 -1
- package/dist/uplink-manifest.js +5 -1
- package/dist/uplink-manifest.js.map +1 -1
- package/dist/wrap-units.d.ts.map +1 -1
- package/dist/wrap-units.js +3 -2
- package/dist/wrap-units.js.map +1 -1
- package/package.json +1 -1
- package/src/__generated__/command-map.ts +215 -19
- package/src/__generated__/contract.ts +3102 -330
- package/src/__generated__/delay-roles.ts +12 -0
- package/src/__generated__/error-codes.ts +13 -13
- package/src/__generated__/frames.ts +20 -4
- package/src/__generated__/reckonability.ts +3 -1
- package/src/__generated__/sample-kinds.ts +18 -2
- package/src/__generated__/topic-map.ts +68 -19
- package/src/__generated__/units.json +958 -94
- package/src/__generated__/units.ts +949 -76
- package/src/api/command-rejection.ts +2 -2
- package/src/api/contribution-slots.ts +128 -25
- package/src/api/error-codes.ts +3 -2
- package/src/api/framework-reads.ts +6 -1
- package/src/api/host.ts +14 -6
- package/src/api/index.ts +127 -67
- package/src/api/logger-contract.ts +2 -1
- package/src/api/logger.ts +6 -3
- package/src/api/part-panels.ts +221 -0
- package/src/api/plot-layers.ts +1 -1
- package/src/api/registry.ts +4 -2
- package/src/api/settings/store.ts +7 -2
- package/src/api/slots.ts +153 -70
- package/src/api/station-brokers.ts +24 -15
- package/src/api/tiny-size.ts +2 -1
- package/src/api/tone.ts +1 -1
- package/src/api/transport.ts +13 -0
- package/src/api/types.ts +388 -68
- package/src/api/uplink-banner.ts +128 -0
- package/src/api/uplink-handles.ts +4 -1
- package/src/binary-frame.ts +4 -4
- package/src/combine-readings.ts +4 -3
- package/src/command-delay.ts +144 -11
- package/src/command-value.ts +181 -0
- package/src/compat-versions.ts +3 -3
- package/src/contract-enum-names.ts +2 -2
- package/src/contract-tags.ts +67 -5
- package/src/data-rate.ts +178 -0
- package/src/delay-roles.ts +19 -2
- package/src/dock-markers.ts +182 -0
- package/src/envelope.ts +4 -0
- package/src/flight/types.ts +31 -2
- package/src/frames/index.ts +0 -4
- package/src/go-no-go-countdown.ts +116 -0
- package/src/index.ts +64 -4
- package/src/ksp-enum-names.ts +48 -3
- package/src/locked.ts +1 -1
- package/src/media/__fixtures__/hull-after-revert.json +1506 -0
- package/src/media/delayed-playout-buffer.ts +41 -9
- package/src/media/encoded-frame-delay.ts +29 -17
- package/src/media/frame-delay.ts +328 -22
- package/src/media/frame-stamp-timeline.ts +270 -0
- package/src/media/index.ts +5 -0
- package/src/media/radio-support.ts +8 -7
- package/src/media/worker/delay-worker-client.ts +104 -6
- package/src/media/worker/delay-worker.ts +228 -27
- package/src/media/worker/frame-delay-report.ts +141 -0
- package/src/media/worker/lead-limit-report.ts +27 -0
- package/src/media/worker/presentation-pacer.ts +216 -9
- package/src/media/worker/worker-delay-clock.ts +9 -6
- package/src/perf/PerfBudget.ts +2 -2
- package/src/rail-tags.ts +8 -0
- package/src/raw-field-split.ts +1 -1
- package/src/reading.ts +6 -6
- package/src/resource-transfer.ts +352 -0
- package/src/runtime-topic-registry.ts +23 -2
- package/src/sample-step-tracker.ts +38 -0
- package/src/sha256-fallback.ts +69 -0
- package/src/spine/__fixtures__/crash/crash-eva.json +224 -0
- package/src/spine/__fixtures__/crash/crash-separated-pod-pod-root.json +144 -0
- package/src/spine/__fixtures__/crash/crash-separated-pod.json +111 -0
- package/src/spine/__fixtures__/switch/back-to-craft.jsonl +101 -0
- package/src/spine/__fixtures__/switch/late-sent-frame.jsonl +16 -0
- package/src/spine/__fixtures__/switch/linked-craft.jsonl +63 -0
- package/src/spine/__fixtures__/switch/station-trim.jsonl +229 -0
- package/src/spine/__fixtures__/switch/switch-with-scene.jsonl +110 -0
- package/src/spine/__fixtures__/switch/unlinked-craft.jsonl +46 -0
- package/src/spine/arrival-deadline.ts +15 -0
- package/src/spine/bound-command.ts +243 -0
- package/src/spine/capability-lock.ts +65 -6
- package/src/spine/catalog-fallback.ts +152 -0
- package/src/spine/celestial-facts.ts +4 -2
- package/src/spine/centre-commands.ts +314 -0
- package/src/spine/client-reading.ts +1 -1
- package/src/spine/client-timeline.ts +165 -4
- package/src/spine/client.ts +615 -32
- package/src/spine/command-gate.ts +44 -3
- package/src/spine/command-outcomes.ts +303 -0
- package/src/spine/connectivity-history.ts +5 -3
- package/src/spine/context.tsx +154 -50
- package/src/spine/core-reckoners.ts +31 -50
- package/src/spine/delay-authority-context.ts +9 -0
- package/src/spine/delay-authority.ts +227 -3
- package/src/spine/delay-estimate.ts +88 -0
- package/src/spine/delta-v-budget.ts +2 -2
- package/src/spine/dv-stage-resources.ts +55 -43
- package/src/spine/index.ts +11 -5
- package/src/spine/kepler-reckoning.ts +245 -3
- package/src/spine/kepler.ts +1 -1
- package/src/spine/known-holds.ts +96 -0
- package/src/spine/lagrange.ts +10 -46
- package/src/spine/lifecycle.ts +22 -0
- package/src/spine/lock-scope.ts +2 -2
- package/src/spine/map-topic.ts +3 -3
- package/src/spine/never-reckonable.ts +1 -1
- package/src/spine/orbit-patches.ts +54 -10
- package/src/spine/orbital-solve.ts +53 -1
- package/src/spine/powered-reckoning.ts +5 -1
- package/src/spine/processorEvaluator.ts +106 -72
- package/src/spine/processors.ts +144 -4
- package/src/spine/rail-registry.ts +1 -1
- package/src/spine/reckoner-generation.ts +11 -0
- package/src/spine/reckoners.ts +3 -0
- package/src/spine/replay-session-controller.ts +4 -6
- package/src/spine/resolve-tracked.ts +50 -1
- package/src/spine/send-status.ts +2 -0
- package/src/spine/settings-registry.ts +7 -0
- package/src/spine/slot-ids.ts +6 -3
- package/src/spine/space-center-state.ts +17 -20
- package/src/spine/stage-countdown-store.ts +76 -0
- package/src/spine/stream-status.ts +4 -4
- package/src/spine/subscribe-read.ts +2 -2
- package/src/spine/system-state.ts +19 -21
- package/src/spine/timeline-store.ts +1119 -247
- package/src/spine/uplink-clients.ts +44 -22
- package/src/spine/uplink-delays.ts +57 -0
- package/src/spine/uplink-health.ts +59 -27
- package/src/spine/use-action-input.ts +13 -9
- package/src/spine/use-body-states.ts +5 -4
- package/src/spine/use-command.ts +620 -239
- package/src/spine/use-last-known-path.ts +75 -0
- package/src/spine/use-observed-vantage.ts +24 -0
- package/src/spine/use-orbit-trajectory.ts +22 -3
- package/src/spine/use-stream-connected.ts +23 -0
- package/src/spine/use-stream-event.ts +6 -2
- package/src/spine/use-stream.ts +7 -4
- package/src/spine/use-telemetry.ts +5 -1
- package/src/spine/use-topic-clock.ts +196 -0
- package/src/spine/use-transmissions.ts +37 -18
- package/src/spine/vantage.ts +7 -0
- package/src/spine/view-clock.ts +89 -3
- package/src/testing/fake-command.ts +109 -0
- package/src/testing/index.ts +12 -1
- package/src/testing/install-act-gate-stretch.ts +1 -2
- package/src/testing/install-dom-stubs.ts +2 -38
- package/src/testing/install-real-test-host.ts +10 -6
- package/src/testing/recorded-uplink-banners.ts +71 -0
- package/src/testing/render.tsx +16 -3
- package/src/testing/stream-fixture.tsx +3 -3
- package/src/testing/stub-transport.ts +9 -0
- package/src/timeline.ts +2 -103
- package/src/topics.ts +87 -26
- package/src/unit-system/index.ts +2 -0
- package/src/unit-system/value.ts +61 -21
- package/src/units.ts +2 -1
- package/src/uplink-externals.ts +17 -7
- package/src/uplink-load.ts +9 -8
- package/src/uplink-manifest.ts +8 -3
- package/src/wrap-units.ts +3 -9
- package/dist/spine/contributed-channels.d.ts +0 -56
- package/dist/spine/contributed-channels.d.ts.map +0 -1
- package/dist/spine/contributed-channels.js +0 -108
- package/dist/spine/contributed-channels.js.map +0 -1
- package/src/spine/contributed-channels.ts +0 -134
|
@@ -367,9 +367,61 @@ export function solveSelfOrbit(
|
|
|
367
367
|
);
|
|
368
368
|
return { ...solve, timeToAp, timeToPe, ...nextApsis(timeToAp, timeToPe) };
|
|
369
369
|
}
|
|
370
|
+
/*
|
|
371
|
+
* Past the end of the patch these elements describe, on a current reading. The
|
|
372
|
+
* predicted end of a patch can fall a fraction of a second before the wire
|
|
373
|
+
* moves the craft to the next one, and the model declines from that instant,
|
|
374
|
+
* which blanked the figures for the gap. Until the wire says otherwise the
|
|
375
|
+
* craft is still on this patch's orbit: its apsides, period and shape are the
|
|
376
|
+
* patch's own, solved at the instant the patch ends, with the countdowns run
|
|
377
|
+
* on from there by the time since.
|
|
378
|
+
*/
|
|
379
|
+
const patchEnd = patchEndOf(elements);
|
|
380
|
+
if (
|
|
381
|
+
observedAtUt != null &&
|
|
382
|
+
patchEnd !== undefined &&
|
|
383
|
+
mag(viewUt) >= patchEnd &&
|
|
384
|
+
declinedAtPatchEnd(reckoning)
|
|
385
|
+
) {
|
|
386
|
+
const solve = solveOrbitAt(elements, patchEnd, radius);
|
|
387
|
+
const past = mag(viewUt) - patchEnd;
|
|
388
|
+
const timeToAp = countdownAt(
|
|
389
|
+
solve.timeToAp ?? Number.NaN,
|
|
390
|
+
past,
|
|
391
|
+
solve.period,
|
|
392
|
+
);
|
|
393
|
+
const timeToPe = countdownAt(
|
|
394
|
+
solve.timeToPe ?? Number.NaN,
|
|
395
|
+
past,
|
|
396
|
+
solve.period,
|
|
397
|
+
);
|
|
398
|
+
return { ...solve, timeToAp, timeToPe, ...nextApsis(timeToAp, timeToPe) };
|
|
399
|
+
}
|
|
370
400
|
return null;
|
|
371
401
|
}
|
|
372
402
|
|
|
403
|
+
/** The instant the elements' own patch ends, or `undefined` when no end is predicted. */
|
|
404
|
+
function patchEndOf(elements: SelfOrbitElements): number | undefined {
|
|
405
|
+
// Read off the wire object rather than typed, so the published element type is the one it was.
|
|
406
|
+
const encounter: unknown = Reflect.get(elements, "encounter");
|
|
407
|
+
if (typeof encounter !== "object" || encounter === null) return undefined;
|
|
408
|
+
const at = mag(Reflect.get(encounter, "transitionUt"));
|
|
409
|
+
return Number.isFinite(at) ? at : undefined;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
function declinedAtPatchEnd(
|
|
413
|
+
reckoning:
|
|
414
|
+
| { readonly status: "declined"; readonly declined: ReckoningDecline }
|
|
415
|
+
| { readonly status: string },
|
|
416
|
+
): boolean {
|
|
417
|
+
return (
|
|
418
|
+
reckoning.status === "declined" &&
|
|
419
|
+
"declined" in reckoning &&
|
|
420
|
+
reckoning.declined.reason === "beyond-horizon" &&
|
|
421
|
+
reckoning.declined.input === "@vessel.orbit"
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
|
|
373
425
|
/**
|
|
374
426
|
* A countdown observed `atSample` seconds out, as it stands `elapsed` seconds
|
|
375
427
|
* later.
|
|
@@ -412,7 +464,7 @@ function declinedUnderPhysics(
|
|
|
412
464
|
*
|
|
413
465
|
* `radius` is `Quantityish` because the same field has two shapes in this tree.
|
|
414
466
|
* The store wraps every declared quantity on decode, so a topic read hands back a
|
|
415
|
-
* `Value<"m">`; the client-side `SystemBodiesPayload` the
|
|
467
|
+
* `Value<"m">`; the client-side `SystemBodiesPayload` the published processor is typed
|
|
416
468
|
* against declares a plain `number`. `magnitudeOf` is the one place that decides
|
|
417
469
|
* what an absent or non-finite magnitude means.
|
|
418
470
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Quality } from "../__generated__/contract";
|
|
1
|
+
import { Quality, type VesselOrbit } from "../__generated__/contract";
|
|
2
2
|
import type { Quantityish } from "../magnitude";
|
|
3
3
|
import type {
|
|
4
4
|
ModelledField,
|
|
@@ -465,6 +465,10 @@ export interface PoweredOrbitProjection {
|
|
|
465
465
|
meanAnomalyAtEpoch: Value<"rad">;
|
|
466
466
|
/** The instant the elements are given for. */
|
|
467
467
|
epoch: Value<"ut">;
|
|
468
|
+
/** Index into `trackingStation.bodies` of the body the orbit is around. Present only on a projection onto another body's patch. */
|
|
469
|
+
referenceBodyIndex?: number;
|
|
470
|
+
/** The reference body's gravitational parameter. Present only on a projection onto another body's patch. */
|
|
471
|
+
mu?: VesselOrbit["mu"];
|
|
468
472
|
}
|
|
469
473
|
|
|
470
474
|
/** Every path the powered model moves, in the order they are banded. */
|
|
@@ -8,8 +8,10 @@ import {
|
|
|
8
8
|
type AnyProcessorDefinition,
|
|
9
9
|
type Dep,
|
|
10
10
|
getProcessor,
|
|
11
|
+
isProcessorDep,
|
|
12
|
+
isPublishedProcessor,
|
|
13
|
+
isReadingDep,
|
|
11
14
|
isSubjectDep,
|
|
12
|
-
type ReadingDep,
|
|
13
15
|
} from "./processors";
|
|
14
16
|
import { subscribeTopicRead } from "./subscribe-read";
|
|
15
17
|
import type { TimelineStore } from "./timeline-store";
|
|
@@ -43,6 +45,11 @@ export function setProcessorEvaluationRecorder(fn: () => void): void {
|
|
|
43
45
|
recordEvaluation = fn;
|
|
44
46
|
}
|
|
45
47
|
|
|
48
|
+
/** Counts one evaluation of a published processor, which the store runs rather than the runtime. */
|
|
49
|
+
export function recordPublishedEvaluation(): void {
|
|
50
|
+
recordEvaluation();
|
|
51
|
+
}
|
|
52
|
+
|
|
46
53
|
// The fan-out counterpart, and the number a dashboard actually pays: an
|
|
47
54
|
// evaluation is one `compute` call however many consumers a processor has, a
|
|
48
55
|
// notification is one consumer woken. They are counted SEPARATELY because an
|
|
@@ -137,11 +144,6 @@ export function setProcessorUncomparableRecorder(
|
|
|
137
144
|
recordUncomparable = fn ?? (() => {});
|
|
138
145
|
}
|
|
139
146
|
|
|
140
|
-
/** True for a ProcessorHandle dep (has an `id`), false for a raw TopicId string. */
|
|
141
|
-
function isHandle(dep: Dep): dep is { id: string } {
|
|
142
|
-
return typeof dep === "object" && dep !== null && "id" in dep;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
147
|
/** DFS collects `id` + every transitive Processor dep, id-deduped, deps-before-dependents. */
|
|
146
148
|
function topoOrder(
|
|
147
149
|
id: string,
|
|
@@ -153,35 +155,44 @@ function topoOrder(
|
|
|
153
155
|
const def: AnyProcessorDefinition | undefined = getProcessor(id);
|
|
154
156
|
if (!def) return out;
|
|
155
157
|
for (const dep of def.deps) {
|
|
156
|
-
if (
|
|
158
|
+
if (isProcessorDep(dep)) topoOrder(dep.id, seen, out);
|
|
157
159
|
}
|
|
158
160
|
out.push(id);
|
|
159
161
|
return out;
|
|
160
162
|
}
|
|
161
163
|
|
|
162
|
-
/**
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
164
|
+
/**
|
|
165
|
+
* The Topics `def` reads, through every processor it depends on. Useful for
|
|
166
|
+
* knowing what a processor needs subscribed and which delay lane its inputs sit
|
|
167
|
+
* in.
|
|
168
|
+
*/
|
|
169
|
+
export function processorInputTopics(
|
|
170
|
+
def: AnyProcessorDefinition,
|
|
171
|
+
seen = new Set<string>(),
|
|
172
|
+
out = new Set<string>(),
|
|
173
|
+
): Set<string> {
|
|
174
|
+
seen.add(def.id);
|
|
175
|
+
for (const dep of def.deps) {
|
|
176
|
+
// A reading dep names the same wire topic a bare id does; only what the
|
|
177
|
+
// processor is HANDED differs. Missing this would add the dep object
|
|
178
|
+
// itself as a topic and silently starve the subscription, which is the
|
|
179
|
+
// failure mode `stub-transport`'s subscribed-only delivery exists to
|
|
180
|
+
// surface.
|
|
181
|
+
if (isReadingDep(dep)) {
|
|
182
|
+
out.add(dep.reading);
|
|
183
|
+
continue;
|
|
182
184
|
}
|
|
185
|
+
if (isProcessorDep(dep)) {
|
|
186
|
+
const nested = seen.has(dep.id) ? undefined : getProcessor(dep.id);
|
|
187
|
+
if (nested) processorInputTopics(nested, seen, out);
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
// A subject dep names no topic until a reckon resolves its subject, and a
|
|
191
|
+
// processor never will: `resolveDep` throws on one. Skipped here so the
|
|
192
|
+
// refusal is that throw rather than a dep object landing in a topic set.
|
|
193
|
+
if (!isSubjectDep(dep)) out.add(dep);
|
|
183
194
|
}
|
|
184
|
-
return
|
|
195
|
+
return out;
|
|
185
196
|
}
|
|
186
197
|
|
|
187
198
|
/**
|
|
@@ -193,10 +204,6 @@ function isCurrency(value: unknown): value is TopicCurrency<unknown> {
|
|
|
193
204
|
return typeof value === "object" && value !== null && "state" in value;
|
|
194
205
|
}
|
|
195
206
|
|
|
196
|
-
function isReadingDep(dep: Dep): dep is ReadingDep {
|
|
197
|
-
return typeof dep === "object" && dep !== null && "reading" in dep;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
207
|
/**
|
|
201
208
|
* Ceiling on the nodes one comparison may visit. Reaching it is an
|
|
202
209
|
* `uncomparable` answer, not a quiet "different": the result still goes out
|
|
@@ -433,6 +440,54 @@ function compareResults(previous: unknown, next: unknown): Comparison {
|
|
|
433
440
|
return verdict;
|
|
434
441
|
}
|
|
435
442
|
|
|
443
|
+
/**
|
|
444
|
+
* One `compute` of `def` over already-resolved `values`, with its answer dated
|
|
445
|
+
* by whichever of them are readings.
|
|
446
|
+
*
|
|
447
|
+
* `computed` is what `compute` returned; `result` is that answer as a reader of
|
|
448
|
+
* the handle receives it. A derivation whose inputs carry currency answers with
|
|
449
|
+
* it, and one whose inputs do not answers the bare value it always did. The
|
|
450
|
+
* opt-in is the dep list rather than a flag: a processor reading only raw topic
|
|
451
|
+
* ids has nothing to date its answer by, and inventing an instant for it would
|
|
452
|
+
* be a claim nothing supports.
|
|
453
|
+
*
|
|
454
|
+
* `compute` runs either way and runs first. It was handed the readings and has
|
|
455
|
+
* already decided what a missing one means, so the dating is laid over the
|
|
456
|
+
* answer rather than deciding whether there is one. See `datedFrom` for what the
|
|
457
|
+
* resulting state does and does not say.
|
|
458
|
+
*/
|
|
459
|
+
export function runProcessorCompute(
|
|
460
|
+
def: AnyProcessorDefinition,
|
|
461
|
+
values: readonly unknown[],
|
|
462
|
+
viewUt: number,
|
|
463
|
+
): { computed: unknown; result: unknown } {
|
|
464
|
+
const computed = runOutsideContributionScope(() =>
|
|
465
|
+
def.compute(values as never, { viewUt }),
|
|
466
|
+
);
|
|
467
|
+
const carried = def.deps.flatMap((dep, i) => {
|
|
468
|
+
if (!isReadingDep(dep)) return [];
|
|
469
|
+
/*
|
|
470
|
+
* Through `observedAt` rather than reaching `.asOfUt ?? .atUt` by hand. A
|
|
471
|
+
* reading dep resolves to a WHOLE-TOPIC reading, which maps member access
|
|
472
|
+
* into field readings, so reaching the instant directly answers a reading
|
|
473
|
+
* OF the instant instead of the instant.
|
|
474
|
+
*/
|
|
475
|
+
const reading = values[i];
|
|
476
|
+
if (!isCurrency(reading)) return [];
|
|
477
|
+
return [
|
|
478
|
+
{
|
|
479
|
+
state: reading.state,
|
|
480
|
+
instant: observedAt(reading),
|
|
481
|
+
grade: reading.state === "held" ? reading.grade : undefined,
|
|
482
|
+
},
|
|
483
|
+
];
|
|
484
|
+
});
|
|
485
|
+
return {
|
|
486
|
+
computed,
|
|
487
|
+
result: carried.length === 0 ? computed : datedFrom(carried, computed),
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
|
|
436
491
|
interface ProcessorRuntimeEntry {
|
|
437
492
|
refCount: number;
|
|
438
493
|
lastFrameGeneration: number | undefined;
|
|
@@ -571,7 +626,9 @@ export class ProcessorRuntime {
|
|
|
571
626
|
const subscribe = this.subscribeInputTopic;
|
|
572
627
|
if (entry.refCount === 0 || entry.topicUnsubs || !subscribe) return;
|
|
573
628
|
const subscriber = { subscribe: (topic: string) => subscribe(topic) };
|
|
574
|
-
|
|
629
|
+
const def = getProcessor(id);
|
|
630
|
+
if (!def) return;
|
|
631
|
+
entry.topicUnsubs = [...processorInputTopics(def)].map((depTopic) =>
|
|
575
632
|
subscribeTopicRead(subscriber, this.store, depTopic),
|
|
576
633
|
);
|
|
577
634
|
}
|
|
@@ -589,7 +646,7 @@ export class ProcessorRuntime {
|
|
|
589
646
|
}
|
|
590
647
|
|
|
591
648
|
private resolveDep(dep: Dep, token: { generation: number }): unknown {
|
|
592
|
-
if (
|
|
649
|
+
if (isProcessorDep(dep)) {
|
|
593
650
|
this.evaluate(dep.id, token);
|
|
594
651
|
return this.entryFor(dep.id).value;
|
|
595
652
|
}
|
|
@@ -623,46 +680,23 @@ export class ProcessorRuntime {
|
|
|
623
680
|
if (entry.lastFrameGeneration === token.generation) return; // already fresh this frame
|
|
624
681
|
const def = getProcessor(id);
|
|
625
682
|
if (!def) return;
|
|
626
|
-
const values = def.deps.map((dep) => this.resolveDep(dep, token));
|
|
627
|
-
// The frame's own frozen view time, so a processor deriving a remaining duration from an instant on the wire has a clock without reaching for a wall clock.
|
|
628
|
-
const frame = this.store.currentFrame();
|
|
629
|
-
const computed = runOutsideContributionScope(() =>
|
|
630
|
-
def.compute(values as never, {
|
|
631
|
-
viewUt: frame.viewUt,
|
|
632
|
-
}),
|
|
633
|
-
);
|
|
634
683
|
/*
|
|
635
|
-
* A
|
|
636
|
-
*
|
|
637
|
-
* list rather than a flag: a processor reading only raw topic ids has nothing
|
|
638
|
-
* to date its answer by, and inventing an instant for it would be a claim
|
|
639
|
-
* nothing supports.
|
|
640
|
-
*
|
|
641
|
-
* `compute` runs either way and runs FIRST. It was handed the readings and
|
|
642
|
-
* has already decided what a missing one means, so the dating is laid over
|
|
643
|
-
* the answer rather than deciding whether there is one. See `datedFrom` for
|
|
644
|
-
* what the resulting state does and does not say.
|
|
684
|
+
* A published processor is evaluated by the store, so a handle read and a
|
|
685
|
+
* Topic read of it in one frame are one evaluation and cannot disagree.
|
|
645
686
|
*/
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
instant: observedAt(reading),
|
|
660
|
-
grade: reading.state === "held" ? reading.grade : undefined,
|
|
661
|
-
},
|
|
662
|
-
];
|
|
663
|
-
});
|
|
664
|
-
const next = carried.length === 0 ? computed : datedFrom(carried, computed);
|
|
665
|
-
recordEvaluation();
|
|
687
|
+
let next: unknown;
|
|
688
|
+
if (isPublishedProcessor(def)) {
|
|
689
|
+
next = this.store.evaluateProcessor(
|
|
690
|
+
def,
|
|
691
|
+
this.store.currentFrame(),
|
|
692
|
+
).result;
|
|
693
|
+
} else {
|
|
694
|
+
const values = def.deps.map((dep) => this.resolveDep(dep, token));
|
|
695
|
+
// The frame's own frozen view time, so a processor deriving a remaining duration from an instant on the wire has a clock without reaching for a wall clock.
|
|
696
|
+
const frame = this.store.currentFrame();
|
|
697
|
+
next = runProcessorCompute(def, values, frame.viewUt).result;
|
|
698
|
+
recordEvaluation();
|
|
699
|
+
}
|
|
666
700
|
entry.lastFrameGeneration = token.generation;
|
|
667
701
|
// Gated on the RESULT, and on equality rather than identity. Evaluation
|
|
668
702
|
// semantics are untouched (memoised within a frame, re-run across frames);
|
package/src/spine/processors.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CORE_CONTRACT_OWNER } from "../contract-tags";
|
|
1
2
|
import type { TopicId, TopicPayload } from "../index";
|
|
2
3
|
import type { Reading } from "../reading";
|
|
3
4
|
import type { TimelinePoint } from "../timeline";
|
|
@@ -151,11 +152,21 @@ export function isSubjectDep(dep: Dep): dep is SubjectDep<unknown> {
|
|
|
151
152
|
return typeof dep === "object" && dep !== null && "forSubject" in dep;
|
|
152
153
|
}
|
|
153
154
|
|
|
155
|
+
/** Whether this dep is a processor's handle. */
|
|
156
|
+
export function isProcessorDep(dep: Dep): dep is ProcessorHandle<unknown> {
|
|
157
|
+
return typeof dep === "object" && dep !== null && "id" in dep;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** Whether this dep asks for a Topic's reading. */
|
|
161
|
+
export function isReadingDep(dep: Dep): dep is ReadingDep {
|
|
162
|
+
return typeof dep === "object" && dep !== null && "reading" in dep;
|
|
163
|
+
}
|
|
164
|
+
|
|
154
165
|
/**
|
|
155
166
|
* The resolved value for one dependency: a nested processor resolves to its
|
|
156
167
|
* result type R; a reading dep resolves to the Topic's `Reading`; a Topic id
|
|
157
|
-
* resolves to its payload
|
|
158
|
-
* yet
|
|
168
|
+
* resolves to its payload, `null` when the game confirmed there is none, or
|
|
169
|
+
* `undefined` when that Topic has produced no frame yet.
|
|
159
170
|
*/
|
|
160
171
|
type ResolvedDep<Dependency extends Dep> =
|
|
161
172
|
Dependency extends ProcessorHandle<infer Result, string, true>
|
|
@@ -165,7 +176,7 @@ type ResolvedDep<Dependency extends Dep> =
|
|
|
165
176
|
: Dependency extends ReadingDep<infer Topic>
|
|
166
177
|
? TopicReading<TopicPayload<Topic>>
|
|
167
178
|
: Dependency extends TopicId
|
|
168
|
-
? TopicPayload<Dependency> | undefined
|
|
179
|
+
? TopicPayload<Dependency> | null | undefined
|
|
169
180
|
: never;
|
|
170
181
|
|
|
171
182
|
/**
|
|
@@ -194,7 +205,7 @@ export type ResolvedDeps<Deps extends readonly Dep[]> = {
|
|
|
194
205
|
* @category Processors
|
|
195
206
|
*/
|
|
196
207
|
export interface ProcessorFrame {
|
|
197
|
-
/** The frame's frozen view time. Every read in this frame shares it. */
|
|
208
|
+
/** The frame's frozen view time, in game seconds as a plain number (where {@link useViewUt} gives a `Value<"ut">`). Every read in this frame shares it. */
|
|
198
209
|
viewUt: number;
|
|
199
210
|
}
|
|
200
211
|
|
|
@@ -206,6 +217,10 @@ export interface ProcessorDefinition<
|
|
|
206
217
|
owner: string;
|
|
207
218
|
deps: Deps;
|
|
208
219
|
compute: (values: ResolvedDeps<Deps>, frame: ProcessorFrame) => Result;
|
|
220
|
+
/** The Topic this processor is also published under. See {@link UplinkClientHandle.registerProcessor}. */
|
|
221
|
+
topic?: string;
|
|
222
|
+
/** Whether each field of the result can also be read as its own Topic. Only meaningful with `topic`. */
|
|
223
|
+
fields?: boolean;
|
|
209
224
|
}
|
|
210
225
|
|
|
211
226
|
export type AnyProcessorDefinition = ProcessorDefinition<
|
|
@@ -213,6 +228,18 @@ export type AnyProcessorDefinition = ProcessorDefinition<
|
|
|
213
228
|
unknown
|
|
214
229
|
>;
|
|
215
230
|
|
|
231
|
+
/** A processor that is also published as a Topic. */
|
|
232
|
+
export type PublishedProcessorDefinition = AnyProcessorDefinition & {
|
|
233
|
+
topic: string;
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
/** Whether `def` is also published as a Topic. */
|
|
237
|
+
export function isPublishedProcessor(
|
|
238
|
+
def: AnyProcessorDefinition,
|
|
239
|
+
): def is PublishedProcessorDefinition {
|
|
240
|
+
return def.topic !== undefined;
|
|
241
|
+
}
|
|
242
|
+
|
|
216
243
|
const processors = new Map<string, AnyProcessorDefinition>();
|
|
217
244
|
|
|
218
245
|
/**
|
|
@@ -232,6 +259,8 @@ export function defineProcessor<
|
|
|
232
259
|
owner: string;
|
|
233
260
|
deps: Deps;
|
|
234
261
|
compute: (values: ResolvedDeps<Deps>, frame: ProcessorFrame) => Result;
|
|
262
|
+
topic?: string;
|
|
263
|
+
fields?: boolean;
|
|
235
264
|
}): ProcessorHandle<Result, `${string}:${ProcessorId}`, CarriesCurrency<Deps>> {
|
|
236
265
|
/* Typed rather than inferred: a template expression widens to `string`, and
|
|
237
266
|
the stamped id is what a contribution keys this processor's result by, so
|
|
@@ -246,6 +275,9 @@ export function defineProcessor<
|
|
|
246
275
|
values: ResolvedDeps<readonly Dep[]>,
|
|
247
276
|
frame: ProcessorFrame,
|
|
248
277
|
) => unknown,
|
|
278
|
+
...(def.topic === undefined
|
|
279
|
+
? {}
|
|
280
|
+
: { topic: def.topic, fields: def.fields === true }),
|
|
249
281
|
};
|
|
250
282
|
if (existing !== undefined) {
|
|
251
283
|
if (existing.compute === stamped.compute) return { id: stampedId };
|
|
@@ -256,6 +288,7 @@ export function defineProcessor<
|
|
|
256
288
|
);
|
|
257
289
|
}
|
|
258
290
|
processors.set(stampedId, stamped);
|
|
291
|
+
if (isPublishedProcessor(stamped)) notifyPublishedChange();
|
|
259
292
|
return { id: stampedId };
|
|
260
293
|
}
|
|
261
294
|
|
|
@@ -334,11 +367,118 @@ export function getProcessor(id: string): AnyProcessorDefinition | undefined {
|
|
|
334
367
|
return processors.get(id);
|
|
335
368
|
}
|
|
336
369
|
|
|
370
|
+
/** The definition behind `handle`, which must be a published processor. Useful for putting it on a store directly. */
|
|
371
|
+
export function publishedDefinitionOf(
|
|
372
|
+
handle: ProcessorHandle<unknown>,
|
|
373
|
+
): PublishedProcessorDefinition {
|
|
374
|
+
const def = processors.get(handle.id);
|
|
375
|
+
if (!def || !isPublishedProcessor(def)) {
|
|
376
|
+
throw new Error(`Processor "${handle.id}" is not published as a Topic.`);
|
|
377
|
+
}
|
|
378
|
+
return def;
|
|
379
|
+
}
|
|
380
|
+
|
|
337
381
|
export function getAllProcessors(): AnyProcessorDefinition[] {
|
|
338
382
|
return Array.from(processors.values());
|
|
339
383
|
}
|
|
340
384
|
|
|
385
|
+
/**
|
|
386
|
+
* Every processor published under each Topic, in registration order.
|
|
387
|
+
*
|
|
388
|
+
* A Topic is keyed by topic and owner the way `reckoners.ts` keys a model: a
|
|
389
|
+
* Topic silently overwritten by import order is worse than an absent one, because
|
|
390
|
+
* a widget goes on reading it and gets another Uplink's answer to a question it
|
|
391
|
+
* never asked.
|
|
392
|
+
*/
|
|
393
|
+
function claimsByTopic(): Map<string, PublishedProcessorDefinition[]> {
|
|
394
|
+
const claims = new Map<string, PublishedProcessorDefinition[]>();
|
|
395
|
+
for (const def of processors.values()) {
|
|
396
|
+
if (!isPublishedProcessor(def)) continue;
|
|
397
|
+
const list = claims.get(def.topic) ?? [];
|
|
398
|
+
list.push(def);
|
|
399
|
+
claims.set(def.topic, list);
|
|
400
|
+
}
|
|
401
|
+
return claims;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* The processors to publish on a store: Gonogo's own, and every Uplink's whose
|
|
406
|
+
* Topic no other Uplink also claims. Gonogo's own wins a Topic it publishes, and a
|
|
407
|
+
* Topic two Uplinks claim is published by neither, so reads of it stay `pending`.
|
|
408
|
+
* Useful for building the store a `TelemetryProvider` reads from.
|
|
409
|
+
*/
|
|
410
|
+
export function getPublishedProcessors(): PublishedProcessorDefinition[] {
|
|
411
|
+
const out: PublishedProcessorDefinition[] = [];
|
|
412
|
+
for (const claims of claimsByTopic().values()) {
|
|
413
|
+
const core = claims.find((def) => def.owner === CORE_CONTRACT_OWNER);
|
|
414
|
+
if (core) {
|
|
415
|
+
out.push(core);
|
|
416
|
+
continue;
|
|
417
|
+
}
|
|
418
|
+
if (claims.length === 1) out.push(...claims);
|
|
419
|
+
}
|
|
420
|
+
return out;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/** A Topic that two or more Uplinks both publish a processor under. Returned by {@link getPublishedTopicConflicts}. */
|
|
424
|
+
export interface PublishedTopicConflict {
|
|
425
|
+
topic: string;
|
|
426
|
+
/** The competing owners, sorted, all of them withheld. */
|
|
427
|
+
owners: string[];
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Every Topic more than one Uplink publishes a processor under. Useful for telling
|
|
432
|
+
* the operator which Uplinks conflict.
|
|
433
|
+
*/
|
|
434
|
+
export function getPublishedTopicConflicts(): PublishedTopicConflict[] {
|
|
435
|
+
const conflicts: PublishedTopicConflict[] = [];
|
|
436
|
+
for (const [topic, claims] of claimsByTopic()) {
|
|
437
|
+
if (
|
|
438
|
+
claims.length < 2 ||
|
|
439
|
+
claims.some((def) => def.owner === CORE_CONTRACT_OWNER)
|
|
440
|
+
) {
|
|
441
|
+
continue;
|
|
442
|
+
}
|
|
443
|
+
conflicts.push({ topic, owners: claims.map((def) => def.owner).sort() });
|
|
444
|
+
}
|
|
445
|
+
return conflicts;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Every Topic a processor is published under, with its owners, including the
|
|
450
|
+
* contested ones {@link getPublishedProcessors} withholds. Useful for listing what
|
|
451
|
+
* an Uplink adds, as its generated page does.
|
|
452
|
+
*/
|
|
453
|
+
export function getPublishedTopics(): { topic: string; owners: string[] }[] {
|
|
454
|
+
return [...claimsByTopic().entries()]
|
|
455
|
+
.map(([topic, claims]) => ({
|
|
456
|
+
topic,
|
|
457
|
+
owners: claims.map((def) => def.owner).sort(),
|
|
458
|
+
}))
|
|
459
|
+
.sort((a, b) => a.topic.localeCompare(b.topic));
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
const publishedListeners = new Set<() => void>();
|
|
463
|
+
|
|
464
|
+
function notifyPublishedChange(): void {
|
|
465
|
+
for (const listener of publishedListeners) listener();
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Calls `listener` whenever the set of published processors changes, and returns a
|
|
470
|
+
* function that stops it. Useful for a screen whose Uplink bundles load after its
|
|
471
|
+
* store exists, as on a station, so the Topics they add appear once loaded. Used by
|
|
472
|
+
* the telemetry provider and the hook that lists a Topic's fields.
|
|
473
|
+
*/
|
|
474
|
+
export function onPublishedProcessorsChange(listener: () => void): () => void {
|
|
475
|
+
publishedListeners.add(listener);
|
|
476
|
+
return () => publishedListeners.delete(listener);
|
|
477
|
+
}
|
|
478
|
+
|
|
341
479
|
/** Test-only: reset the processor registry to empty. */
|
|
342
480
|
export function clearProcessors(): void {
|
|
481
|
+
const hadPublished = getPublishedTopics().length > 0;
|
|
343
482
|
processors.clear();
|
|
483
|
+
if (hadPublished) notifyPublishedChange();
|
|
344
484
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
let generation = 0;
|
|
2
|
+
|
|
3
|
+
/** Counts a model being registered, so a read cached against the store's data knows a model may now answer differently. */
|
|
4
|
+
export function bumpReckonerGeneration(): void {
|
|
5
|
+
generation++;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/** How many models have been registered since the page loaded. */
|
|
9
|
+
export function reckonerGeneration(): number {
|
|
10
|
+
return generation;
|
|
11
|
+
}
|
package/src/spine/reckoners.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type {
|
|
|
9
9
|
import { reckonableValuesOf } from "../reckonability";
|
|
10
10
|
import type { TopicId, TopicPayload } from "../topics";
|
|
11
11
|
import type { Dep } from "./processors";
|
|
12
|
+
import { bumpReckonerGeneration } from "./reckoner-generation";
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Per-topic forward models, registered at module load the same way components
|
|
@@ -172,6 +173,7 @@ export function registerReckoner<
|
|
|
172
173
|
reckoners.get(topic) ?? new Map<string, AnyReckonerDefinition>();
|
|
173
174
|
byOwner.set(owner, reckoner);
|
|
174
175
|
reckoners.set(topic, byOwner);
|
|
176
|
+
bumpReckonerGeneration();
|
|
175
177
|
}
|
|
176
178
|
|
|
177
179
|
/**
|
|
@@ -326,4 +328,5 @@ export function getReckonedTopics(): { topic: string; owners: string[] }[] {
|
|
|
326
328
|
/** Test-only: reset the registry to empty. */
|
|
327
329
|
export function clearReckoners(): void {
|
|
328
330
|
reckoners.clear();
|
|
331
|
+
bumpReckonerGeneration();
|
|
329
332
|
}
|
|
@@ -2,7 +2,7 @@ import type { ServerMessage } from "../envelope";
|
|
|
2
2
|
import type { MissionMeta } from "../flight/types";
|
|
3
3
|
import { TelemetryClient } from "./client";
|
|
4
4
|
import type { Clock } from "./clock";
|
|
5
|
-
import {
|
|
5
|
+
import { publishProcessorsOn } from "./context";
|
|
6
6
|
import { type ReplayFixture, ReplayTransport } from "./replay-transport";
|
|
7
7
|
import { TimelineStore } from "./timeline-store";
|
|
8
8
|
import { ViewClock } from "./view-clock";
|
|
@@ -52,7 +52,7 @@ function isDataOrEventFrame(message: unknown): message is DataOrEventMessage {
|
|
|
52
52
|
* `meta.deliveredAt` is rewritten to `targetDeliveredAt` (so they all
|
|
53
53
|
* schedule at offset zero, arriving together, near-instantly, instead of
|
|
54
54
|
* spread across however many real seconds separated their original arrival
|
|
55
|
-
* times); `validAt` is left untouched, since that's what
|
|
55
|
+
* times); `validAt` is left untouched, since that's what published processors
|
|
56
56
|
* (e.g. `system.state`) reason about, not scheduling.
|
|
57
57
|
*
|
|
58
58
|
* This is what makes seeking forward correct for slow-changing/keyframed
|
|
@@ -139,7 +139,7 @@ type Listener = () => void;
|
|
|
139
139
|
* banner.
|
|
140
140
|
*
|
|
141
141
|
* It builds a fresh `TelemetryClient` and `TimelineStore` (registering the same
|
|
142
|
-
*
|
|
142
|
+
* published processors the live stream does) from a mission's `ReplayFixture`, and
|
|
143
143
|
* renders through the ordinary `TelemetryProvider` surface
|
|
144
144
|
* (`ReplaySessionProvider`): a replayed widget is the same component reading the
|
|
145
145
|
* same `useTelemetry` hook a live one does, fed from a different client.
|
|
@@ -275,9 +275,7 @@ export class ReplaySessionController {
|
|
|
275
275
|
|
|
276
276
|
const clock = new ViewClock({ delaySeconds: () => 0, warpRate: () => 1 });
|
|
277
277
|
const store = new TimelineStore(clock);
|
|
278
|
-
|
|
279
|
-
store.registerDerivedChannel(channel);
|
|
280
|
-
}
|
|
278
|
+
publishProcessorsOn(store);
|
|
281
279
|
|
|
282
280
|
const transportClock = new ScaledRealTimeClock(Math.max(rate, 0.01));
|
|
283
281
|
const transport = new ReplayTransport(fixture, { clock: transportClock });
|