@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.
Files changed (690) hide show
  1. package/README.md +48 -93
  2. package/dist/__generated__/command-map.d.ts +247 -2
  3. package/dist/__generated__/command-map.d.ts.map +1 -1
  4. package/dist/__generated__/command-map.js +91 -19
  5. package/dist/__generated__/command-map.js.map +1 -1
  6. package/dist/__generated__/contract.d.ts +3062 -352
  7. package/dist/__generated__/contract.d.ts.map +1 -1
  8. package/dist/__generated__/contract.js +187 -3
  9. package/dist/__generated__/contract.js.map +1 -1
  10. package/dist/__generated__/delay-roles.d.ts +2 -2
  11. package/dist/__generated__/delay-roles.d.ts.map +1 -1
  12. package/dist/__generated__/delay-roles.js +12 -0
  13. package/dist/__generated__/delay-roles.js.map +1 -1
  14. package/dist/__generated__/error-codes.d.ts +11 -11
  15. package/dist/__generated__/error-codes.d.ts.map +1 -1
  16. package/dist/__generated__/error-codes.js +12 -12
  17. package/dist/__generated__/error-codes.js.map +1 -1
  18. package/dist/__generated__/frames.d.ts +40 -4
  19. package/dist/__generated__/frames.d.ts.map +1 -1
  20. package/dist/__generated__/frames.js +20 -4
  21. package/dist/__generated__/frames.js.map +1 -1
  22. package/dist/__generated__/reckonability.d.ts +3 -1
  23. package/dist/__generated__/reckonability.d.ts.map +1 -1
  24. package/dist/__generated__/reckonability.js +1 -1
  25. package/dist/__generated__/reckonability.js.map +1 -1
  26. package/dist/__generated__/sample-kinds.d.ts +18 -2
  27. package/dist/__generated__/sample-kinds.d.ts.map +1 -1
  28. package/dist/__generated__/sample-kinds.js +18 -2
  29. package/dist/__generated__/sample-kinds.js.map +1 -1
  30. package/dist/__generated__/topic-map.d.ts +41 -17
  31. package/dist/__generated__/topic-map.d.ts.map +1 -1
  32. package/dist/__generated__/topic-map.js +16 -3
  33. package/dist/__generated__/topic-map.js.map +1 -1
  34. package/dist/__generated__/units.d.ts +247 -6
  35. package/dist/__generated__/units.d.ts.map +1 -1
  36. package/dist/__generated__/units.js +949 -76
  37. package/dist/__generated__/units.js.map +1 -1
  38. package/dist/api/command-rejection.d.ts +2 -2
  39. package/dist/api/command-rejection.js +1 -1
  40. package/dist/api/contribution-slots.d.ts +122 -21
  41. package/dist/api/contribution-slots.d.ts.map +1 -1
  42. package/dist/api/contribution-slots.js +4 -4
  43. package/dist/api/contribution-slots.js.map +1 -1
  44. package/dist/api/error-codes.d.ts +3 -2
  45. package/dist/api/error-codes.d.ts.map +1 -1
  46. package/dist/api/error-codes.js +3 -2
  47. package/dist/api/error-codes.js.map +1 -1
  48. package/dist/api/framework-reads.d.ts +2 -2
  49. package/dist/api/framework-reads.d.ts.map +1 -1
  50. package/dist/api/framework-reads.js +6 -1
  51. package/dist/api/framework-reads.js.map +1 -1
  52. package/dist/api/host.d.ts +14 -6
  53. package/dist/api/host.d.ts.map +1 -1
  54. package/dist/api/host.js.map +1 -1
  55. package/dist/api/index.d.ts +70 -60
  56. package/dist/api/index.d.ts.map +1 -1
  57. package/dist/api/index.js +66 -54
  58. package/dist/api/index.js.map +1 -1
  59. package/dist/api/logger-contract.d.ts +2 -1
  60. package/dist/api/logger-contract.d.ts.map +1 -1
  61. package/dist/api/logger.d.ts +6 -3
  62. package/dist/api/logger.d.ts.map +1 -1
  63. package/dist/api/logger.js +6 -3
  64. package/dist/api/logger.js.map +1 -1
  65. package/dist/api/part-panels.d.ts +143 -0
  66. package/dist/api/part-panels.d.ts.map +1 -0
  67. package/dist/api/part-panels.js +104 -0
  68. package/dist/api/part-panels.js.map +1 -0
  69. package/dist/api/plot-layers.d.ts +1 -1
  70. package/dist/api/plot-layers.js +1 -1
  71. package/dist/api/registry.d.ts +4 -2
  72. package/dist/api/registry.d.ts.map +1 -1
  73. package/dist/api/registry.js +4 -2
  74. package/dist/api/registry.js.map +1 -1
  75. package/dist/api/settings/store.d.ts +1 -1
  76. package/dist/api/settings/store.d.ts.map +1 -1
  77. package/dist/api/settings/store.js +7 -2
  78. package/dist/api/settings/store.js.map +1 -1
  79. package/dist/api/slots.d.ts +150 -70
  80. package/dist/api/slots.d.ts.map +1 -1
  81. package/dist/api/station-brokers.d.ts +24 -15
  82. package/dist/api/station-brokers.d.ts.map +1 -1
  83. package/dist/api/station-brokers.js +24 -15
  84. package/dist/api/station-brokers.js.map +1 -1
  85. package/dist/api/tiny-size.d.ts +2 -1
  86. package/dist/api/tiny-size.d.ts.map +1 -1
  87. package/dist/api/tiny-size.js +2 -1
  88. package/dist/api/tiny-size.js.map +1 -1
  89. package/dist/api/tone.d.ts +1 -1
  90. package/dist/api/transport.d.ts +9 -0
  91. package/dist/api/transport.d.ts.map +1 -1
  92. package/dist/api/types.d.ts +356 -68
  93. package/dist/api/types.d.ts.map +1 -1
  94. package/dist/api/uplink-banner.d.ts +113 -0
  95. package/dist/api/uplink-banner.d.ts.map +1 -0
  96. package/dist/api/uplink-banner.js +69 -0
  97. package/dist/api/uplink-banner.js.map +1 -0
  98. package/dist/api/uplink-handles.d.ts +2 -12
  99. package/dist/api/uplink-handles.d.ts.map +1 -1
  100. package/dist/api/uplink-handles.js +2 -1
  101. package/dist/api/uplink-handles.js.map +1 -1
  102. package/dist/binary-frame.d.ts +4 -4
  103. package/dist/binary-frame.js +2 -2
  104. package/dist/combine-readings.d.ts +4 -3
  105. package/dist/combine-readings.d.ts.map +1 -1
  106. package/dist/combine-readings.js +4 -3
  107. package/dist/combine-readings.js.map +1 -1
  108. package/dist/command-delay.d.ts +81 -2
  109. package/dist/command-delay.d.ts.map +1 -1
  110. package/dist/command-delay.js +51 -8
  111. package/dist/command-delay.js.map +1 -1
  112. package/dist/command-value.d.ts +98 -0
  113. package/dist/command-value.d.ts.map +1 -0
  114. package/dist/command-value.js +87 -0
  115. package/dist/command-value.js.map +1 -0
  116. package/dist/commands.d.ts +1 -1
  117. package/dist/commands.d.ts.map +1 -1
  118. package/dist/compat-versions.d.ts +1 -1
  119. package/dist/compat-versions.d.ts.map +1 -1
  120. package/dist/compat-versions.js +3 -3
  121. package/dist/compat-versions.js.map +1 -1
  122. package/dist/contract-enum-names.d.ts +2 -2
  123. package/dist/contract-enum-names.js +2 -2
  124. package/dist/contract-tags.d.ts +33 -2
  125. package/dist/contract-tags.d.ts.map +1 -1
  126. package/dist/contract-tags.js +54 -5
  127. package/dist/contract-tags.js.map +1 -1
  128. package/dist/data-rate.d.ts +84 -0
  129. package/dist/data-rate.d.ts.map +1 -0
  130. package/dist/data-rate.js +133 -0
  131. package/dist/data-rate.js.map +1 -0
  132. package/dist/delay-roles.d.ts +14 -1
  133. package/dist/delay-roles.d.ts.map +1 -1
  134. package/dist/delay-roles.js +5 -1
  135. package/dist/delay-roles.js.map +1 -1
  136. package/dist/dock-markers.d.ts +126 -0
  137. package/dist/dock-markers.d.ts.map +1 -0
  138. package/dist/dock-markers.js +100 -0
  139. package/dist/dock-markers.js.map +1 -0
  140. package/dist/envelope.d.ts +2 -2
  141. package/dist/envelope.d.ts.map +1 -1
  142. package/dist/flight/types.d.ts +31 -2
  143. package/dist/flight/types.d.ts.map +1 -1
  144. package/dist/flight/types.js.map +1 -1
  145. package/dist/frames/index.d.ts +1 -4
  146. package/dist/frames/index.d.ts.map +1 -1
  147. package/dist/frames/index.js +0 -3
  148. package/dist/frames/index.js.map +1 -1
  149. package/dist/go-no-go-countdown.d.ts +65 -0
  150. package/dist/go-no-go-countdown.d.ts.map +1 -0
  151. package/dist/go-no-go-countdown.js +71 -0
  152. package/dist/go-no-go-countdown.js.map +1 -0
  153. package/dist/index.d.ts +13 -4
  154. package/dist/index.d.ts.map +1 -1
  155. package/dist/index.js +14 -4
  156. package/dist/index.js.map +1 -1
  157. package/dist/ksp-enum-names.d.ts +35 -4
  158. package/dist/ksp-enum-names.d.ts.map +1 -1
  159. package/dist/ksp-enum-names.js +31 -4
  160. package/dist/ksp-enum-names.js.map +1 -1
  161. package/dist/locked.d.ts +1 -1
  162. package/dist/locked.js +1 -1
  163. package/dist/media/delayed-playout-buffer.d.ts +29 -4
  164. package/dist/media/delayed-playout-buffer.d.ts.map +1 -1
  165. package/dist/media/delayed-playout-buffer.js +12 -5
  166. package/dist/media/delayed-playout-buffer.js.map +1 -1
  167. package/dist/media/encoded-frame-delay.d.ts +21 -16
  168. package/dist/media/encoded-frame-delay.d.ts.map +1 -1
  169. package/dist/media/encoded-frame-delay.js +21 -14
  170. package/dist/media/encoded-frame-delay.js.map +1 -1
  171. package/dist/media/frame-delay.d.ts +119 -5
  172. package/dist/media/frame-delay.d.ts.map +1 -1
  173. package/dist/media/frame-delay.js +201 -15
  174. package/dist/media/frame-delay.js.map +1 -1
  175. package/dist/media/frame-stamp-timeline.d.ts +119 -0
  176. package/dist/media/frame-stamp-timeline.d.ts.map +1 -0
  177. package/dist/media/frame-stamp-timeline.js +194 -0
  178. package/dist/media/frame-stamp-timeline.js.map +1 -0
  179. package/dist/media/index.d.ts +4 -3
  180. package/dist/media/index.d.ts.map +1 -1
  181. package/dist/media/index.js +1 -1
  182. package/dist/media/index.js.map +1 -1
  183. package/dist/media/radio-support.d.ts +8 -7
  184. package/dist/media/radio-support.d.ts.map +1 -1
  185. package/dist/media/radio-support.js +5 -6
  186. package/dist/media/radio-support.js.map +1 -1
  187. package/dist/media/worker/delay-worker-client.d.ts +27 -1
  188. package/dist/media/worker/delay-worker-client.d.ts.map +1 -1
  189. package/dist/media/worker/delay-worker-client.js +53 -5
  190. package/dist/media/worker/delay-worker-client.js.map +1 -1
  191. package/dist/media/worker/delay-worker.d.ts +45 -8
  192. package/dist/media/worker/delay-worker.d.ts.map +1 -1
  193. package/dist/media/worker/delay-worker.js +644 -56
  194. package/dist/media/worker/delay-worker.js.map +4 -4
  195. package/dist/media/worker/frame-delay-report.d.ts +25 -0
  196. package/dist/media/worker/frame-delay-report.d.ts.map +1 -0
  197. package/dist/media/worker/frame-delay-report.js +112 -0
  198. package/dist/media/worker/frame-delay-report.js.map +1 -0
  199. package/dist/media/worker/lead-limit-report.d.ts +13 -0
  200. package/dist/media/worker/lead-limit-report.d.ts.map +1 -0
  201. package/dist/media/worker/lead-limit-report.js +19 -0
  202. package/dist/media/worker/lead-limit-report.js.map +1 -0
  203. package/dist/media/worker/presentation-pacer.d.ts +70 -1
  204. package/dist/media/worker/presentation-pacer.d.ts.map +1 -1
  205. package/dist/media/worker/presentation-pacer.js +167 -9
  206. package/dist/media/worker/presentation-pacer.js.map +1 -1
  207. package/dist/media/worker/worker-delay-clock.d.ts +4 -5
  208. package/dist/media/worker/worker-delay-clock.d.ts.map +1 -1
  209. package/dist/media/worker/worker-delay-clock.js +6 -2
  210. package/dist/media/worker/worker-delay-clock.js.map +1 -1
  211. package/dist/perf/PerfBudget.d.ts +2 -2
  212. package/dist/perf/PerfBudget.js +2 -2
  213. package/dist/rail-tags.d.ts +7 -0
  214. package/dist/rail-tags.d.ts.map +1 -1
  215. package/dist/rail-tags.js.map +1 -1
  216. package/dist/raw-field-split.d.ts +1 -1
  217. package/dist/raw-field-split.js +1 -1
  218. package/dist/reading.d.ts +6 -6
  219. package/dist/reading.js +5 -5
  220. package/dist/reads-index.json +446 -37
  221. package/dist/resource-transfer.d.ts +177 -0
  222. package/dist/resource-transfer.d.ts.map +1 -0
  223. package/dist/resource-transfer.js +190 -0
  224. package/dist/resource-transfer.js.map +1 -0
  225. package/dist/runtime-topic-registry.d.ts +2 -2
  226. package/dist/runtime-topic-registry.d.ts.map +1 -1
  227. package/dist/runtime-topic-registry.js +23 -2
  228. package/dist/runtime-topic-registry.js.map +1 -1
  229. package/dist/sample-step-tracker.d.ts +17 -0
  230. package/dist/sample-step-tracker.d.ts.map +1 -0
  231. package/dist/sample-step-tracker.js +38 -0
  232. package/dist/sample-step-tracker.js.map +1 -0
  233. package/dist/sha256-fallback.d.ts +6 -0
  234. package/dist/sha256-fallback.d.ts.map +1 -0
  235. package/dist/sha256-fallback.js +68 -0
  236. package/dist/sha256-fallback.js.map +1 -0
  237. package/dist/spine/arrival-deadline.d.ts +7 -0
  238. package/dist/spine/arrival-deadline.d.ts.map +1 -1
  239. package/dist/spine/arrival-deadline.js +12 -0
  240. package/dist/spine/arrival-deadline.js.map +1 -1
  241. package/dist/spine/bound-command.d.ts +58 -0
  242. package/dist/spine/bound-command.d.ts.map +1 -0
  243. package/dist/spine/bound-command.js +162 -0
  244. package/dist/spine/bound-command.js.map +1 -0
  245. package/dist/spine/capability-lock.d.ts +6 -1
  246. package/dist/spine/capability-lock.d.ts.map +1 -1
  247. package/dist/spine/capability-lock.js +56 -5
  248. package/dist/spine/capability-lock.js.map +1 -1
  249. package/dist/spine/catalog-fallback.d.ts +28 -0
  250. package/dist/spine/catalog-fallback.d.ts.map +1 -0
  251. package/dist/spine/catalog-fallback.js +120 -0
  252. package/dist/spine/catalog-fallback.js.map +1 -0
  253. package/dist/spine/celestial-facts.d.ts.map +1 -1
  254. package/dist/spine/celestial-facts.js +5 -2
  255. package/dist/spine/celestial-facts.js.map +1 -1
  256. package/dist/spine/centre-commands.d.ts +84 -0
  257. package/dist/spine/centre-commands.d.ts.map +1 -0
  258. package/dist/spine/centre-commands.js +236 -0
  259. package/dist/spine/centre-commands.js.map +1 -0
  260. package/dist/spine/client-reading.js +1 -1
  261. package/dist/spine/client-timeline.d.ts +48 -1
  262. package/dist/spine/client-timeline.d.ts.map +1 -1
  263. package/dist/spine/client-timeline.js +151 -3
  264. package/dist/spine/client-timeline.js.map +1 -1
  265. package/dist/spine/client.d.ts +154 -4
  266. package/dist/spine/client.d.ts.map +1 -1
  267. package/dist/spine/client.js +530 -34
  268. package/dist/spine/client.js.map +1 -1
  269. package/dist/spine/command-gate.d.ts +8 -0
  270. package/dist/spine/command-gate.d.ts.map +1 -1
  271. package/dist/spine/command-gate.js +36 -3
  272. package/dist/spine/command-gate.js.map +1 -1
  273. package/dist/spine/command-outcomes.d.ts +60 -0
  274. package/dist/spine/command-outcomes.d.ts.map +1 -0
  275. package/dist/spine/command-outcomes.js +256 -0
  276. package/dist/spine/command-outcomes.js.map +1 -0
  277. package/dist/spine/connectivity-history.d.ts +5 -3
  278. package/dist/spine/connectivity-history.d.ts.map +1 -1
  279. package/dist/spine/connectivity-history.js.map +1 -1
  280. package/dist/spine/context.d.ts +62 -11
  281. package/dist/spine/context.d.ts.map +1 -1
  282. package/dist/spine/context.js +125 -39
  283. package/dist/spine/context.js.map +1 -1
  284. package/dist/spine/core-reckoners.d.ts.map +1 -1
  285. package/dist/spine/core-reckoners.js +16 -39
  286. package/dist/spine/core-reckoners.js.map +1 -1
  287. package/dist/spine/delay-authority-context.d.ts +5 -0
  288. package/dist/spine/delay-authority-context.d.ts.map +1 -0
  289. package/dist/spine/delay-authority-context.js +7 -0
  290. package/dist/spine/delay-authority-context.js.map +1 -0
  291. package/dist/spine/delay-authority.d.ts +76 -1
  292. package/dist/spine/delay-authority.d.ts.map +1 -1
  293. package/dist/spine/delay-authority.js +217 -3
  294. package/dist/spine/delay-authority.js.map +1 -1
  295. package/dist/spine/delay-estimate.d.ts +41 -0
  296. package/dist/spine/delay-estimate.d.ts.map +1 -0
  297. package/dist/spine/delay-estimate.js +70 -0
  298. package/dist/spine/delay-estimate.js.map +1 -0
  299. package/dist/spine/delta-v-budget.js +2 -2
  300. package/dist/spine/delta-v-budget.js.map +1 -1
  301. package/dist/spine/dv-stage-resources.d.ts +32 -17
  302. package/dist/spine/dv-stage-resources.d.ts.map +1 -1
  303. package/dist/spine/dv-stage-resources.js +44 -37
  304. package/dist/spine/dv-stage-resources.js.map +1 -1
  305. package/dist/spine/index.d.ts +7 -1
  306. package/dist/spine/index.d.ts.map +1 -1
  307. package/dist/spine/index.js +11 -5
  308. package/dist/spine/index.js.map +1 -1
  309. package/dist/spine/kepler-reckoning.d.ts +56 -0
  310. package/dist/spine/kepler-reckoning.d.ts.map +1 -1
  311. package/dist/spine/kepler-reckoning.js +179 -3
  312. package/dist/spine/kepler-reckoning.js.map +1 -1
  313. package/dist/spine/kepler.d.ts +1 -1
  314. package/dist/spine/kepler.js +1 -1
  315. package/dist/spine/known-holds.d.ts +8 -0
  316. package/dist/spine/known-holds.d.ts.map +1 -0
  317. package/dist/spine/known-holds.js +78 -0
  318. package/dist/spine/known-holds.js.map +1 -0
  319. package/dist/spine/lagrange.d.ts +9 -34
  320. package/dist/spine/lagrange.d.ts.map +1 -1
  321. package/dist/spine/lagrange.js +4 -24
  322. package/dist/spine/lagrange.js.map +1 -1
  323. package/dist/spine/lifecycle.d.ts +21 -0
  324. package/dist/spine/lifecycle.d.ts.map +1 -1
  325. package/dist/spine/lifecycle.js.map +1 -1
  326. package/dist/spine/lock-scope.d.ts +2 -2
  327. package/dist/spine/map-topic.d.ts +3 -3
  328. package/dist/spine/map-topic.js +3 -3
  329. package/dist/spine/never-reckonable.js +1 -1
  330. package/dist/spine/never-reckonable.js.map +1 -1
  331. package/dist/spine/orbit-patches.d.ts +6 -4
  332. package/dist/spine/orbit-patches.d.ts.map +1 -1
  333. package/dist/spine/orbit-patches.js +45 -10
  334. package/dist/spine/orbit-patches.js.map +1 -1
  335. package/dist/spine/orbital-solve.d.ts +1 -1
  336. package/dist/spine/orbital-solve.d.ts.map +1 -1
  337. package/dist/spine/orbital-solve.js +35 -0
  338. package/dist/spine/orbital-solve.js.map +1 -1
  339. package/dist/spine/powered-reckoning.d.ts +5 -0
  340. package/dist/spine/powered-reckoning.d.ts.map +1 -1
  341. package/dist/spine/powered-reckoning.js.map +1 -1
  342. package/dist/spine/processorEvaluator.d.ts +29 -0
  343. package/dist/spine/processorEvaluator.d.ts.map +1 -1
  344. package/dist/spine/processorEvaluator.js +94 -71
  345. package/dist/spine/processorEvaluator.js.map +1 -1
  346. package/dist/spine/processors.d.ts +56 -4
  347. package/dist/spine/processors.d.ts.map +1 -1
  348. package/dist/spine/processors.js +110 -0
  349. package/dist/spine/processors.js.map +1 -1
  350. package/dist/spine/rail-registry.d.ts +1 -1
  351. package/dist/spine/rail-registry.d.ts.map +1 -1
  352. package/dist/spine/reckoner-generation.d.ts +5 -0
  353. package/dist/spine/reckoner-generation.d.ts.map +1 -0
  354. package/dist/spine/reckoner-generation.js +10 -0
  355. package/dist/spine/reckoner-generation.js.map +1 -0
  356. package/dist/spine/reckoners.d.ts.map +1 -1
  357. package/dist/spine/reckoners.js +3 -0
  358. package/dist/spine/reckoners.js.map +1 -1
  359. package/dist/spine/replay-session-controller.d.ts +1 -1
  360. package/dist/spine/replay-session-controller.d.ts.map +1 -1
  361. package/dist/spine/replay-session-controller.js +4 -6
  362. package/dist/spine/replay-session-controller.js.map +1 -1
  363. package/dist/spine/resolve-tracked.d.ts +20 -2
  364. package/dist/spine/resolve-tracked.d.ts.map +1 -1
  365. package/dist/spine/resolve-tracked.js +32 -2
  366. package/dist/spine/resolve-tracked.js.map +1 -1
  367. package/dist/spine/send-status.d.ts +2 -0
  368. package/dist/spine/send-status.d.ts.map +1 -1
  369. package/dist/spine/send-status.js.map +1 -1
  370. package/dist/spine/settings-registry.d.ts +7 -0
  371. package/dist/spine/settings-registry.d.ts.map +1 -1
  372. package/dist/spine/settings-registry.js.map +1 -1
  373. package/dist/spine/slot-ids.d.ts +1 -1
  374. package/dist/spine/slot-ids.d.ts.map +1 -1
  375. package/dist/spine/slot-ids.js +6 -3
  376. package/dist/spine/slot-ids.js.map +1 -1
  377. package/dist/spine/space-center-state.d.ts +17 -9
  378. package/dist/spine/space-center-state.d.ts.map +1 -1
  379. package/dist/spine/space-center-state.js +14 -15
  380. package/dist/spine/space-center-state.js.map +1 -1
  381. package/dist/spine/stage-countdown-store.d.ts +38 -0
  382. package/dist/spine/stage-countdown-store.d.ts.map +1 -0
  383. package/dist/spine/stage-countdown-store.js +53 -0
  384. package/dist/spine/stage-countdown-store.js.map +1 -0
  385. package/dist/spine/stream-status.d.ts +3 -3
  386. package/dist/spine/stream-status.js +3 -3
  387. package/dist/spine/subscribe-read.d.ts +1 -1
  388. package/dist/spine/subscribe-read.js +2 -2
  389. package/dist/spine/system-state.d.ts +13 -13
  390. package/dist/spine/system-state.d.ts.map +1 -1
  391. package/dist/spine/system-state.js +18 -18
  392. package/dist/spine/system-state.js.map +1 -1
  393. package/dist/spine/timeline-store.d.ts +304 -113
  394. package/dist/spine/timeline-store.d.ts.map +1 -1
  395. package/dist/spine/timeline-store.js +921 -223
  396. package/dist/spine/timeline-store.js.map +1 -1
  397. package/dist/spine/uplink-clients.d.ts +32 -16
  398. package/dist/spine/uplink-clients.d.ts.map +1 -1
  399. package/dist/spine/uplink-clients.js +8 -4
  400. package/dist/spine/uplink-clients.js.map +1 -1
  401. package/dist/spine/uplink-delays.d.ts +31 -0
  402. package/dist/spine/uplink-delays.d.ts.map +1 -0
  403. package/dist/spine/uplink-delays.js +46 -0
  404. package/dist/spine/uplink-delays.js.map +1 -0
  405. package/dist/spine/uplink-health.d.ts +109 -14
  406. package/dist/spine/uplink-health.d.ts.map +1 -1
  407. package/dist/spine/uplink-health.js +21 -17
  408. package/dist/spine/uplink-health.js.map +1 -1
  409. package/dist/spine/use-action-input.d.ts.map +1 -1
  410. package/dist/spine/use-action-input.js +14 -9
  411. package/dist/spine/use-action-input.js.map +1 -1
  412. package/dist/spine/use-body-states.d.ts.map +1 -1
  413. package/dist/spine/use-body-states.js +3 -3
  414. package/dist/spine/use-body-states.js.map +1 -1
  415. package/dist/spine/use-command.d.ts +94 -31
  416. package/dist/spine/use-command.d.ts.map +1 -1
  417. package/dist/spine/use-command.js +409 -197
  418. package/dist/spine/use-command.js.map +1 -1
  419. package/dist/spine/use-last-known-path.d.ts +36 -0
  420. package/dist/spine/use-last-known-path.d.ts.map +1 -0
  421. package/dist/spine/use-last-known-path.js +46 -0
  422. package/dist/spine/use-last-known-path.js.map +1 -0
  423. package/dist/spine/use-observed-vantage.d.ts +13 -0
  424. package/dist/spine/use-observed-vantage.d.ts.map +1 -0
  425. package/dist/spine/use-observed-vantage.js +20 -0
  426. package/dist/spine/use-observed-vantage.js.map +1 -0
  427. package/dist/spine/use-orbit-trajectory.d.ts +1 -1
  428. package/dist/spine/use-orbit-trajectory.d.ts.map +1 -1
  429. package/dist/spine/use-orbit-trajectory.js +17 -3
  430. package/dist/spine/use-orbit-trajectory.js.map +1 -1
  431. package/dist/spine/use-stream-connected.d.ts +8 -0
  432. package/dist/spine/use-stream-connected.d.ts.map +1 -0
  433. package/dist/spine/use-stream-connected.js +16 -0
  434. package/dist/spine/use-stream-connected.js.map +1 -0
  435. package/dist/spine/use-stream-event.d.ts +6 -1
  436. package/dist/spine/use-stream-event.d.ts.map +1 -1
  437. package/dist/spine/use-stream-event.js +5 -1
  438. package/dist/spine/use-stream-event.js.map +1 -1
  439. package/dist/spine/use-stream.d.ts +5 -2
  440. package/dist/spine/use-stream.d.ts.map +1 -1
  441. package/dist/spine/use-stream.js +7 -4
  442. package/dist/spine/use-stream.js.map +1 -1
  443. package/dist/spine/use-telemetry.d.ts +5 -1
  444. package/dist/spine/use-telemetry.d.ts.map +1 -1
  445. package/dist/spine/use-telemetry.js.map +1 -1
  446. package/dist/spine/use-topic-clock.d.ts +54 -0
  447. package/dist/spine/use-topic-clock.d.ts.map +1 -0
  448. package/dist/spine/use-topic-clock.js +137 -0
  449. package/dist/spine/use-topic-clock.js.map +1 -0
  450. package/dist/spine/use-transmissions.d.ts.map +1 -1
  451. package/dist/spine/use-transmissions.js +9 -4
  452. package/dist/spine/use-transmissions.js.map +1 -1
  453. package/dist/spine/vantage.d.ts +6 -0
  454. package/dist/spine/vantage.d.ts.map +1 -1
  455. package/dist/spine/vantage.js +6 -0
  456. package/dist/spine/vantage.js.map +1 -1
  457. package/dist/spine/view-clock.d.ts +23 -3
  458. package/dist/spine/view-clock.d.ts.map +1 -1
  459. package/dist/spine/view-clock.js +80 -2
  460. package/dist/spine/view-clock.js.map +1 -1
  461. package/dist/testing/fake-command.d.ts +48 -0
  462. package/dist/testing/fake-command.d.ts.map +1 -0
  463. package/dist/testing/fake-command.js +63 -0
  464. package/dist/testing/fake-command.js.map +1 -0
  465. package/dist/testing/index.d.ts +5 -1
  466. package/dist/testing/index.d.ts.map +1 -1
  467. package/dist/testing/index.js +6 -0
  468. package/dist/testing/index.js.map +1 -1
  469. package/dist/testing/install-act-gate-stretch.d.ts +1 -2
  470. package/dist/testing/install-act-gate-stretch.d.ts.map +1 -1
  471. package/dist/testing/install-act-gate-stretch.js +1 -2
  472. package/dist/testing/install-act-gate-stretch.js.map +1 -1
  473. package/dist/testing/install-dom-stubs.d.ts +2 -5
  474. package/dist/testing/install-dom-stubs.d.ts.map +1 -1
  475. package/dist/testing/install-dom-stubs.js +2 -34
  476. package/dist/testing/install-dom-stubs.js.map +1 -1
  477. package/dist/testing/install-real-test-host.d.ts.map +1 -1
  478. package/dist/testing/install-real-test-host.js +7 -6
  479. package/dist/testing/install-real-test-host.js.map +1 -1
  480. package/dist/testing/recorded-uplink-banners.d.ts +49 -0
  481. package/dist/testing/recorded-uplink-banners.d.ts.map +1 -0
  482. package/dist/testing/recorded-uplink-banners.js +45 -0
  483. package/dist/testing/recorded-uplink-banners.js.map +1 -0
  484. package/dist/testing/render.d.ts +16 -3
  485. package/dist/testing/render.d.ts.map +1 -1
  486. package/dist/testing/render.js +16 -3
  487. package/dist/testing/render.js.map +1 -1
  488. package/dist/testing/stream-fixture.js +3 -3
  489. package/dist/testing/stream-fixture.js.map +1 -1
  490. package/dist/testing/stub-transport.d.ts +6 -0
  491. package/dist/testing/stub-transport.d.ts.map +1 -1
  492. package/dist/testing/stub-transport.js +3 -0
  493. package/dist/testing/stub-transport.js.map +1 -1
  494. package/dist/timeline.d.ts +2 -98
  495. package/dist/timeline.d.ts.map +1 -1
  496. package/dist/topics.d.ts +68 -28
  497. package/dist/topics.d.ts.map +1 -1
  498. package/dist/topics.js +21 -18
  499. package/dist/topics.js.map +1 -1
  500. package/dist/unit-system/index.d.ts +1 -1
  501. package/dist/unit-system/index.d.ts.map +1 -1
  502. package/dist/unit-system/index.js +1 -1
  503. package/dist/unit-system/index.js.map +1 -1
  504. package/dist/unit-system/value.d.ts +26 -5
  505. package/dist/unit-system/value.d.ts.map +1 -1
  506. package/dist/unit-system/value.js +41 -21
  507. package/dist/unit-system/value.js.map +1 -1
  508. package/dist/units.d.ts.map +1 -1
  509. package/dist/units.js +2 -1
  510. package/dist/units.js.map +1 -1
  511. package/dist/uplink-externals.d.ts +17 -7
  512. package/dist/uplink-externals.d.ts.map +1 -1
  513. package/dist/uplink-externals.js +17 -7
  514. package/dist/uplink-externals.js.map +1 -1
  515. package/dist/uplink-load.d.ts +3 -2
  516. package/dist/uplink-load.d.ts.map +1 -1
  517. package/dist/uplink-load.js +9 -6
  518. package/dist/uplink-load.js.map +1 -1
  519. package/dist/uplink-manifest.d.ts +8 -3
  520. package/dist/uplink-manifest.d.ts.map +1 -1
  521. package/dist/uplink-manifest.js +5 -1
  522. package/dist/uplink-manifest.js.map +1 -1
  523. package/dist/wrap-units.d.ts.map +1 -1
  524. package/dist/wrap-units.js +3 -2
  525. package/dist/wrap-units.js.map +1 -1
  526. package/package.json +1 -1
  527. package/src/__generated__/command-map.ts +215 -19
  528. package/src/__generated__/contract.ts +3102 -330
  529. package/src/__generated__/delay-roles.ts +12 -0
  530. package/src/__generated__/error-codes.ts +13 -13
  531. package/src/__generated__/frames.ts +20 -4
  532. package/src/__generated__/reckonability.ts +3 -1
  533. package/src/__generated__/sample-kinds.ts +18 -2
  534. package/src/__generated__/topic-map.ts +68 -19
  535. package/src/__generated__/units.json +958 -94
  536. package/src/__generated__/units.ts +949 -76
  537. package/src/api/command-rejection.ts +2 -2
  538. package/src/api/contribution-slots.ts +128 -25
  539. package/src/api/error-codes.ts +3 -2
  540. package/src/api/framework-reads.ts +6 -1
  541. package/src/api/host.ts +14 -6
  542. package/src/api/index.ts +127 -67
  543. package/src/api/logger-contract.ts +2 -1
  544. package/src/api/logger.ts +6 -3
  545. package/src/api/part-panels.ts +221 -0
  546. package/src/api/plot-layers.ts +1 -1
  547. package/src/api/registry.ts +4 -2
  548. package/src/api/settings/store.ts +7 -2
  549. package/src/api/slots.ts +153 -70
  550. package/src/api/station-brokers.ts +24 -15
  551. package/src/api/tiny-size.ts +2 -1
  552. package/src/api/tone.ts +1 -1
  553. package/src/api/transport.ts +13 -0
  554. package/src/api/types.ts +388 -68
  555. package/src/api/uplink-banner.ts +128 -0
  556. package/src/api/uplink-handles.ts +4 -1
  557. package/src/binary-frame.ts +4 -4
  558. package/src/combine-readings.ts +4 -3
  559. package/src/command-delay.ts +144 -11
  560. package/src/command-value.ts +181 -0
  561. package/src/compat-versions.ts +3 -3
  562. package/src/contract-enum-names.ts +2 -2
  563. package/src/contract-tags.ts +67 -5
  564. package/src/data-rate.ts +178 -0
  565. package/src/delay-roles.ts +19 -2
  566. package/src/dock-markers.ts +182 -0
  567. package/src/envelope.ts +4 -0
  568. package/src/flight/types.ts +31 -2
  569. package/src/frames/index.ts +0 -4
  570. package/src/go-no-go-countdown.ts +116 -0
  571. package/src/index.ts +64 -4
  572. package/src/ksp-enum-names.ts +48 -3
  573. package/src/locked.ts +1 -1
  574. package/src/media/__fixtures__/hull-after-revert.json +1506 -0
  575. package/src/media/delayed-playout-buffer.ts +41 -9
  576. package/src/media/encoded-frame-delay.ts +29 -17
  577. package/src/media/frame-delay.ts +328 -22
  578. package/src/media/frame-stamp-timeline.ts +270 -0
  579. package/src/media/index.ts +5 -0
  580. package/src/media/radio-support.ts +8 -7
  581. package/src/media/worker/delay-worker-client.ts +104 -6
  582. package/src/media/worker/delay-worker.ts +228 -27
  583. package/src/media/worker/frame-delay-report.ts +141 -0
  584. package/src/media/worker/lead-limit-report.ts +27 -0
  585. package/src/media/worker/presentation-pacer.ts +216 -9
  586. package/src/media/worker/worker-delay-clock.ts +9 -6
  587. package/src/perf/PerfBudget.ts +2 -2
  588. package/src/rail-tags.ts +8 -0
  589. package/src/raw-field-split.ts +1 -1
  590. package/src/reading.ts +6 -6
  591. package/src/resource-transfer.ts +352 -0
  592. package/src/runtime-topic-registry.ts +23 -2
  593. package/src/sample-step-tracker.ts +38 -0
  594. package/src/sha256-fallback.ts +69 -0
  595. package/src/spine/__fixtures__/crash/crash-eva.json +224 -0
  596. package/src/spine/__fixtures__/crash/crash-separated-pod-pod-root.json +144 -0
  597. package/src/spine/__fixtures__/crash/crash-separated-pod.json +111 -0
  598. package/src/spine/__fixtures__/switch/back-to-craft.jsonl +101 -0
  599. package/src/spine/__fixtures__/switch/late-sent-frame.jsonl +16 -0
  600. package/src/spine/__fixtures__/switch/linked-craft.jsonl +63 -0
  601. package/src/spine/__fixtures__/switch/station-trim.jsonl +229 -0
  602. package/src/spine/__fixtures__/switch/switch-with-scene.jsonl +110 -0
  603. package/src/spine/__fixtures__/switch/unlinked-craft.jsonl +46 -0
  604. package/src/spine/arrival-deadline.ts +15 -0
  605. package/src/spine/bound-command.ts +243 -0
  606. package/src/spine/capability-lock.ts +65 -6
  607. package/src/spine/catalog-fallback.ts +152 -0
  608. package/src/spine/celestial-facts.ts +4 -2
  609. package/src/spine/centre-commands.ts +314 -0
  610. package/src/spine/client-reading.ts +1 -1
  611. package/src/spine/client-timeline.ts +165 -4
  612. package/src/spine/client.ts +615 -32
  613. package/src/spine/command-gate.ts +44 -3
  614. package/src/spine/command-outcomes.ts +303 -0
  615. package/src/spine/connectivity-history.ts +5 -3
  616. package/src/spine/context.tsx +154 -50
  617. package/src/spine/core-reckoners.ts +31 -50
  618. package/src/spine/delay-authority-context.ts +9 -0
  619. package/src/spine/delay-authority.ts +227 -3
  620. package/src/spine/delay-estimate.ts +88 -0
  621. package/src/spine/delta-v-budget.ts +2 -2
  622. package/src/spine/dv-stage-resources.ts +55 -43
  623. package/src/spine/index.ts +11 -5
  624. package/src/spine/kepler-reckoning.ts +245 -3
  625. package/src/spine/kepler.ts +1 -1
  626. package/src/spine/known-holds.ts +96 -0
  627. package/src/spine/lagrange.ts +10 -46
  628. package/src/spine/lifecycle.ts +22 -0
  629. package/src/spine/lock-scope.ts +2 -2
  630. package/src/spine/map-topic.ts +3 -3
  631. package/src/spine/never-reckonable.ts +1 -1
  632. package/src/spine/orbit-patches.ts +54 -10
  633. package/src/spine/orbital-solve.ts +53 -1
  634. package/src/spine/powered-reckoning.ts +5 -1
  635. package/src/spine/processorEvaluator.ts +106 -72
  636. package/src/spine/processors.ts +144 -4
  637. package/src/spine/rail-registry.ts +1 -1
  638. package/src/spine/reckoner-generation.ts +11 -0
  639. package/src/spine/reckoners.ts +3 -0
  640. package/src/spine/replay-session-controller.ts +4 -6
  641. package/src/spine/resolve-tracked.ts +50 -1
  642. package/src/spine/send-status.ts +2 -0
  643. package/src/spine/settings-registry.ts +7 -0
  644. package/src/spine/slot-ids.ts +6 -3
  645. package/src/spine/space-center-state.ts +17 -20
  646. package/src/spine/stage-countdown-store.ts +76 -0
  647. package/src/spine/stream-status.ts +4 -4
  648. package/src/spine/subscribe-read.ts +2 -2
  649. package/src/spine/system-state.ts +19 -21
  650. package/src/spine/timeline-store.ts +1119 -247
  651. package/src/spine/uplink-clients.ts +44 -22
  652. package/src/spine/uplink-delays.ts +57 -0
  653. package/src/spine/uplink-health.ts +59 -27
  654. package/src/spine/use-action-input.ts +13 -9
  655. package/src/spine/use-body-states.ts +5 -4
  656. package/src/spine/use-command.ts +620 -239
  657. package/src/spine/use-last-known-path.ts +75 -0
  658. package/src/spine/use-observed-vantage.ts +24 -0
  659. package/src/spine/use-orbit-trajectory.ts +22 -3
  660. package/src/spine/use-stream-connected.ts +23 -0
  661. package/src/spine/use-stream-event.ts +6 -2
  662. package/src/spine/use-stream.ts +7 -4
  663. package/src/spine/use-telemetry.ts +5 -1
  664. package/src/spine/use-topic-clock.ts +196 -0
  665. package/src/spine/use-transmissions.ts +37 -18
  666. package/src/spine/vantage.ts +7 -0
  667. package/src/spine/view-clock.ts +89 -3
  668. package/src/testing/fake-command.ts +109 -0
  669. package/src/testing/index.ts +12 -1
  670. package/src/testing/install-act-gate-stretch.ts +1 -2
  671. package/src/testing/install-dom-stubs.ts +2 -38
  672. package/src/testing/install-real-test-host.ts +10 -6
  673. package/src/testing/recorded-uplink-banners.ts +71 -0
  674. package/src/testing/render.tsx +16 -3
  675. package/src/testing/stream-fixture.tsx +3 -3
  676. package/src/testing/stub-transport.ts +9 -0
  677. package/src/timeline.ts +2 -103
  678. package/src/topics.ts +87 -26
  679. package/src/unit-system/index.ts +2 -0
  680. package/src/unit-system/value.ts +61 -21
  681. package/src/units.ts +2 -1
  682. package/src/uplink-externals.ts +17 -7
  683. package/src/uplink-load.ts +9 -8
  684. package/src/uplink-manifest.ts +8 -3
  685. package/src/wrap-units.ts +3 -9
  686. package/dist/spine/contributed-channels.d.ts +0 -56
  687. package/dist/spine/contributed-channels.d.ts.map +0 -1
  688. package/dist/spine/contributed-channels.js +0 -108
  689. package/dist/spine/contributed-channels.js.map +0 -1
  690. package/src/spine/contributed-channels.ts +0 -134
@@ -2,6 +2,31 @@ import { Value, Vec3Of } from '../value.js';
2
2
  import { ProviderExtensions } from '../extensions.js';
3
3
  import { CommandErrorCode, FaultCode } from './error-codes.js';
4
4
  /**
5
+ * Which vessel the game is flying right now: its id and name, and nothing of
6
+ * where it is or how it is doing. Changing the active vessel is a change of
7
+ * scene that every command centre can see whatever the radio link to the new
8
+ * vessel, so this is read with no signal delay and does not depend on a link.
9
+ * Useful for naming the craft the operator is flying while its telemetry has
10
+ * not arrived. Used by the dashboard header.
11
+ *
12
+ * The payload is `null` (no key emitted) outside the flight scene. It carries
13
+ * no per-payload `Meta` of its own (the envelope's applies). Position,
14
+ * situation, distance and link state of the vessel are not here and reach a
15
+ * centre only through `vessel.identity` and the other `vessel.*` Topics,
16
+ * delayed.
17
+ *
18
+ * @category Flights
19
+ */
20
+ export interface ActiveVessel {
21
+ /**
22
+ * The vessel's stable guid, the same id `vessel.identity` carries once its
23
+ * telemetry arrives.
24
+ */
25
+ vesselId: string;
26
+ /** The vessel's display name. */
27
+ name: string;
28
+ }
29
+ /**
5
30
  * The JSON header of a binary frame: everything about the delivery except the
6
31
  * bytes themselves.
7
32
  *
@@ -121,15 +146,16 @@ export interface BodyStatesReply {
121
146
  Refused(why: string): BodyStatesReply;
122
147
  }
123
148
  /**
124
- * One body's position and velocity at one instant, relative to the request's
125
- * centre body, in a non-rotating, Z-up inertial frame centred on that body.
149
+ * One object's position and velocity at one instant, relative to a centre body
150
+ * the enclosing reply names, in a non-rotating, Z-up inertial frame centred on
151
+ * that body.
126
152
  *
127
153
  * Flat keys rather than nested vectors, because these arrive in bulk.
128
154
  *
129
155
  * @category Orbits and trajectories
130
156
  */
131
157
  export interface BodyState {
132
- /** The instant this state is at, echoing the request. */
158
+ /** The instant this state is at. */
133
159
  ut: Value<"ut">;
134
160
  /** Position along the frame's X axis, metres from the centre body. */
135
161
  x: Value<"m">;
@@ -355,6 +381,13 @@ export interface CareerStatus {
355
381
  */
356
382
  tech?: CareerTech | null;
357
383
  /**
384
+ * The latest contract objective changes the home command has acted on, oldest
385
+ * first: each either took effect or was dropped. A `CareerObjectivePending`
386
+ * row with the same `Key` is settled once it appears here. `null` outside a
387
+ * career, and empty while nothing has crossed the delay.
388
+ */
389
+ objectivesSettled?: CareerObjectiveSettled[] | null;
390
+ /**
358
391
  * Provenance, and always `"game"`: a career belongs to the save, not to
359
392
  * anything flying, so switching vessels cannot change which one is being read.
360
393
  *
@@ -494,6 +527,106 @@ export interface CareerContracts {
494
527
  failedRecent: CareerContract[];
495
528
  }
496
529
  /**
530
+ * One contract that has just finished: completed or failed. Each finish is its
531
+ * own event, separate from what the contract board holds in
532
+ * `CareerContracts.completedRecent`. Useful for announcing a finish the moment
533
+ * it reaches the operator. The event is stamped with the game time the
534
+ * contract finished, and reaches an observer later, at the time that observer
535
+ * would learn of it.
536
+ *
537
+ * A contract is decided at the home command, so the event reaches each
538
+ * observer after its own delay from home: at once at home, later at a crewed
539
+ * vessel or a distant command centre.
540
+ *
541
+ * @category Career
542
+ */
543
+ export interface CareerContractEvent {
544
+ /**
545
+ * The contract's id, `Contract.ContractID` as a decimal string, the same id
546
+ * `CareerContract.id` carries.
547
+ */
548
+ id?: string | null;
549
+ /** The contract's display title. */
550
+ title?: string | null;
551
+ /**
552
+ * The name of the agency that offered the contract. `null` when it has no
553
+ * agent.
554
+ */
555
+ agent?: string | null;
556
+ /** How it finished: `"Completed"` or `"Failed"`. */
557
+ outcome?: string | null;
558
+ }
559
+ /**
560
+ * One contract objective a vessel has met, lost or failed, while word of it is
561
+ * still on its way to the home command. The contract, and its rewards, move
562
+ * only when that word arrives. Useful for showing an operator nearer the
563
+ * vessel than home what home has yet to hear.
564
+ *
565
+ * Carried on `career.objectives.<guid>.pending` as a delayed, reliable,
566
+ * ordered event stamped at the vessel's own time. An observer keeps the row
567
+ * until `CareerStatus.objectivesSettled` names its
568
+ * `CareerObjectivePending.key`. At the home command the row arrives no earlier
569
+ * than the change itself, so a client shows none there.
570
+ *
571
+ * @category Career
572
+ */
573
+ export interface CareerObjectivePending {
574
+ /**
575
+ * Names this change; the same key appears in `CareerStatus.objectivesSettled`
576
+ * when home acts on it.
577
+ */
578
+ key: string;
579
+ /**
580
+ * The contract's id, the same id `CareerContract.id` carries, or `null` when
581
+ * the contract could not be read.
582
+ */
583
+ contractId?: string | null;
584
+ /** The contract's display title, or `null` when it could not be read. */
585
+ contractTitle?: string | null;
586
+ /** The objective's display title. */
587
+ objective: string;
588
+ /**
589
+ * Where the objective sits in its contract's tree, as the child index at each
590
+ * level joined by `/`: `"1/0"` is the first child of the contract's second
591
+ * objective, in the order `CareerContract.parameters` and
592
+ * `CareerContractParameter.children` list them.
593
+ */
594
+ objectivePath: string;
595
+ /** What the objective became at the vessel: `"Met"`, `"Unmet"` or `"Failed"`. */
596
+ target: string;
597
+ /** The vessel that made the change (`Vessel.id` as a string). */
598
+ vesselId: string;
599
+ /**
600
+ * The vessel's display name when the change was taken, or `null` when it could
601
+ * not be read.
602
+ */
603
+ vesselName?: string | null;
604
+ /** Universal Time the change happened at, in the vessel's own time. */
605
+ ut: Value<"ut">;
606
+ /**
607
+ * Universal Time word of the change is due at the home command, or `null`
608
+ * while the vessel has no route home and home cannot hear of it yet.
609
+ */
610
+ homeArrivesUt?: Value<"ut"> | null;
611
+ }
612
+ /**
613
+ * One entry in `CareerStatus.objectivesSettled`: a contract objective change
614
+ * the home command has acted on.
615
+ *
616
+ * @category Career
617
+ */
618
+ export interface CareerObjectiveSettled {
619
+ /** The `CareerObjectivePending.key` of the change. */
620
+ key: string;
621
+ /**
622
+ * `"Applied"` when the change took effect, `"Dropped"` when the contract could
623
+ * no longer take it or its vessel was lost without word of it.
624
+ */
625
+ outcome: string;
626
+ /** Universal Time home acted on it. */
627
+ ut: Value<"ut">;
628
+ }
629
+ /**
497
630
  * One contract in `CareerContracts.active`, `CareerContracts.offered`,
498
631
  * `CareerContracts.completedRecent` or `CareerContracts.failedRecent`.
499
632
  *
@@ -518,6 +651,31 @@ export interface CareerContract {
518
651
  * `"Completed"`.
519
652
  */
520
653
  state?: string | null;
654
+ /**
655
+ * The one-line statement of what the contract asks for, KSP's
656
+ * `Contract.Synopsys`. Useful as the line under the title on a contract card.
657
+ */
658
+ synopsis?: string | null;
659
+ /**
660
+ * The contract's briefing, KSP's `Contract.Description`: the full text the
661
+ * agency writes to explain the work.
662
+ */
663
+ briefing?: string | null;
664
+ /**
665
+ * The contract's notes, KSP's `Contract.Notes`: the extra conditions and hints
666
+ * the game lists under the briefing. `null` when it has none.
667
+ */
668
+ notes?: string | null;
669
+ /**
670
+ * `Contract.Prestige`'s enum name (`Trivial`, `Significant`, `Exceptional`): a
671
+ * display label. `CareerContract.prestigeOrdinal` is the field to branch on.
672
+ */
673
+ prestige?: string | null;
674
+ /**
675
+ * `CareerContract.prestige`'s KSP ordinal, typed to `KspContractPrestige`.
676
+ * `null` when the capture carried none, which is not a trivial contract.
677
+ */
678
+ prestigeOrdinal?: KspContractPrestige | null;
521
679
  /** Funds paid when the contract is accepted. */
522
680
  fundsAdvance?: Value<"funds"> | null;
523
681
  /** Funds paid when the contract is completed. */
@@ -547,8 +705,9 @@ export interface CareerContract {
547
705
  */
548
706
  dateExpire?: Value<"ut"> | null;
549
707
  /**
550
- * The contract's top-level objectives, in KSP's order. Nested sub-parameters
551
- * are not listed. Always present, empty when the contract has none.
708
+ * The contract's top-level objectives, in KSP's order, each carrying its own
709
+ * nested objectives in `CareerContractParameter.children`. Always present,
710
+ * empty when the contract has none.
552
711
  */
553
712
  parameters: CareerContractParameter[];
554
713
  }
@@ -578,6 +737,23 @@ export interface CareerContractParameter {
578
737
  */
579
738
  stateOrdinal?: KspParameterState | null;
580
739
  /**
740
+ * Whether the contract can be completed without this objective, KSP's optional
741
+ * flag on a contract parameter. Useful for telling the operator which
742
+ * objectives are bonuses.
743
+ */
744
+ optional?: boolean | null;
745
+ /**
746
+ * The objective's notes, KSP's notes on a contract parameter. `null` when it
747
+ * has none.
748
+ */
749
+ notes?: string | null;
750
+ /**
751
+ * The objectives nested directly under this one, in KSP's order, each with its
752
+ * own live state. Always present, empty for an objective that has no
753
+ * sub-objectives.
754
+ */
755
+ children: CareerContractParameter[];
756
+ /**
581
757
  * Lower bound of the altitude band this objective requires, from the stock
582
758
  * `ReachAltitudeEnvelope` it is or contains (a part test nests its envelope
583
759
  * under itself). `null` when it carries none.
@@ -588,6 +764,24 @@ export interface CareerContractParameter {
588
764
  * `CareerContractParameter.minAltitude` is.
589
765
  */
590
766
  maxAltitude?: Value<"m"> | null;
767
+ /**
768
+ * The progress milestone this objective asks the player to reach, by the
769
+ * game's own name for it (`REACHSPACE`, `ORBIT`, `LANDING` and so on). `null`
770
+ * when the objective is not a progress milestone.
771
+ */
772
+ milestone?: string | null;
773
+ /**
774
+ * The body the `CareerContractParameter.milestone` is reached at, by name.
775
+ * `null` when the objective is not a milestone or the game names no body for
776
+ * it.
777
+ */
778
+ milestoneBody?: string | null;
779
+ /**
780
+ * The altitude above sea level the `CareerContractParameter.milestone` is
781
+ * reached at, where it has one: the top of the atmosphere for reaching space.
782
+ * `null` when the milestone has no altitude, never 0.
783
+ */
784
+ targetAltitude?: Value<"m"> | null;
591
785
  }
592
786
  /**
593
787
  * Strategies sub-group of `CareerStatus`. Both lists are always present
@@ -766,15 +960,14 @@ export interface CareerStrategy {
766
960
  * because the Administration Building was shut, or when the strategy is
767
961
  * already active, and `"none"` when there is no verdict to carry.
768
962
  *
769
- * `"derived"` always accompanies a refusal and never a yes. The game stops at
770
- * its first refusal, so a rule that refuses off-screen would have refused on
771
- * it; but one rule counts the career's running strategies on that screen and
772
- * cannot be checked anywhere else, and permission needs every rule to pass. A
773
- * strategy no rule refused therefore arrives with no verdict and `"none"`
774
- * rather than as allowed.
963
+ * `"derived"` accompanies a refusal, or a yes on a career where nothing
964
+ * changes how a strategy activates: there the career's running strategies are
965
+ * counted against its limit alongside every other rule. On a career where
966
+ * another mod changes activation (a career mod that replaces the limit), that
967
+ * one rule cannot be checked, so a strategy no other rule refused arrives with
968
+ * no verdict and `"none"` rather than as allowed.
775
969
  *
776
- * Never enable an activation control from a `"derived"` verdict: it can only
777
- * refuse. Whether a strategy without a verdict may be committed is decided by
970
+ * Whether a strategy without a verdict may be committed is decided by
778
971
  * `career.strategy.activate` itself, which runs every check again at the
779
972
  * moment it executes and refuses in the game's words or as unreadable rather
780
973
  * than guessing.
@@ -808,10 +1001,8 @@ export interface CareerTech {
808
1001
  */
809
1002
  unlockedCount: Value<"count">;
810
1003
  /**
811
- * The ids of the unlocked tech nodes, in no particular order. Derived from the
812
- * loaded parts (each part's `TechRequired` whose tech is available), so a node
813
- * that unlocks no part never appears here even when it is researched;
814
- * `CareerTechNode.unlocked` is the per-node reading.
1004
+ * The ids of the unlocked tech nodes, in no particular order: exactly the
1005
+ * nodes of `CareerTech.nodes` whose `CareerTechNode.unlocked` is true.
815
1006
  */
816
1007
  unlockedIds: string[];
817
1008
  /**
@@ -853,6 +1044,33 @@ export interface CareerTechNode {
853
1044
  * client, from these edges and each parent's `CareerTechNode.unlocked`.
854
1045
  */
855
1046
  parents: string[];
1047
+ /**
1048
+ * The parts researching the node unlocks, in the order the game loads them.
1049
+ * Empty for a node that unlocks no part.
1050
+ */
1051
+ parts: CareerTechPart[];
1052
+ }
1053
+ /**
1054
+ * One part in `CareerTechNode.parts`.
1055
+ *
1056
+ * @category Career
1057
+ */
1058
+ export interface CareerTechPart {
1059
+ /** The part's internal name, KSP's `AvailablePart.name`. */
1060
+ name?: string | null;
1061
+ /** The part's display title. */
1062
+ title?: string | null;
1063
+ /** The part's manufacturer, as the part's config names it. */
1064
+ manufacturer?: string | null;
1065
+ /** The part's category (e.g. `"Propulsion"`, `"Pods"`). */
1066
+ category?: string | null;
1067
+ /** The funds it costs to purchase the part once its node is researched. */
1068
+ entryCost?: Value<"funds"> | null;
1069
+ /**
1070
+ * Whether the save has purchased the part, which is what makes it placeable
1071
+ * once its node is researched.
1072
+ */
1073
+ purchased?: boolean | null;
856
1074
  }
857
1075
  /**
858
1076
  * One declared channel's emission counters, plus the four facts about the
@@ -997,7 +1215,12 @@ export interface CommandCentreEntry {
997
1215
  * Stable centre id, the one `SetVantage.centreId` takes: `"ground:<name>"` or
998
1216
  * `"vessel:<guid>"`. Every ground station is `"ground:<name>"`, the home one
999
1217
  * included: which centre is home is `CommandCentreEntry.isHome`, never a
1000
- * special id. Ground stations that share a name are told apart as
1218
+ * special id. The `<name>` is the home node name as the active comms provider
1219
+ * names it, so the same station has a different id under a different provider.
1220
+ * The space centre is `"ground:Kerbin: KSC"` with stock CommNet and
1221
+ * `"ground:Kerbal Space Center"` with a provider that names its home nodes by
1222
+ * display name. Read the id from the `commandCentre.roster` entry and never
1223
+ * hard-code or build it. Ground stations that share a name are told apart as
1001
1224
  * `"ground:<name>#2"`, `"#3"` and so on.
1002
1225
  */
1003
1226
  id?: string | null;
@@ -1068,6 +1291,14 @@ export interface CommandCentreEntry {
1068
1291
  * no delay to quote.
1069
1292
  */
1070
1293
  delayQuality?: string | null;
1294
+ /**
1295
+ * Whether commands can be sent from this centre: absent or true for every
1296
+ * centre that can, false for a craft with a kerbal aboard that is listed only
1297
+ * so a message can be addressed to it. Such an entry is never a vantage to
1298
+ * choose, is not active, and has no command rights; what is said to it waits
1299
+ * in its ledger until a screen sits aboard.
1300
+ */
1301
+ commandable?: boolean | null;
1071
1302
  }
1072
1303
  /**
1073
1304
  * One command centre that was on `commandCentre.roster` earlier in this
@@ -1200,8 +1431,10 @@ export interface CentreDelayEntry {
1200
1431
  * **Sparse.** A centre is listed only when it has a delay of its own. The home
1201
1432
  * centre is never listed: its delay is `comms.delay`, which also carries the
1202
1433
  * hold through a loss of signal. A centre other than home that is not listed
1203
- * has no route to the craft. Neither absence is a zero, so a client must not
1204
- * quote a delay for a centre that is missing from the list.
1434
+ * has either no route to the craft or has not yet heard it, and
1435
+ * `CommandCentreActiveVesselDelay.noRoute` says which for the receiving
1436
+ * centre. Neither absence is a zero, so a client must not quote a delay for a
1437
+ * centre that is missing from the list.
1205
1438
  *
1206
1439
  * A crewed centre that is the active craft is listed at an explicit zero: a
1207
1440
  * craft is no distance from itself.
@@ -1216,6 +1449,15 @@ export interface CentreDelayEntry {
1216
1449
  export interface CommandCentreActiveVesselDelay {
1217
1450
  /** Every centre with a delay of its own to the active craft. */
1218
1451
  centres: CentreDelayEntry[];
1452
+ /**
1453
+ * Whether the command centre this payload is sent to has no route to the
1454
+ * active craft, so nothing the craft sends will ever reach it. False while the
1455
+ * centre has a route, including the first signal delay after a switch to it,
1456
+ * when the craft's first report is still on its way. A screen at a centre with
1457
+ * this set has no link to report on and should say so rather than wait for a
1458
+ * first signal.
1459
+ */
1460
+ noRoute: boolean;
1219
1461
  }
1220
1462
  /**
1221
1463
  * One gated command and what its gate says right now, evaluated with no
@@ -1604,7 +1846,7 @@ export interface CommcastMessageSendArgs {
1604
1846
  /**
1605
1847
  * What `commcast.message.send` (args `CommcastMessageSendArgs`) did with a
1606
1848
  * message: which command centres it left for, and which it could not leave
1607
- * for. `commcast.message.send` is the command, of the core mod's Commcast
1849
+ * for. `commcast.message.send` is the command, of Commcast, the Gonogo mod's
1608
1850
  * group messaging and radio, that sends a text message to a group of command
1609
1851
  * centres. A centre is a `commandCentre.roster` entry, a place commands are
1610
1852
  * sent from. It says nothing of arrival: a listener is a centre that receives
@@ -1624,11 +1866,21 @@ export interface CommcastSendReceipt {
1624
1866
  addressed: string[];
1625
1867
  /**
1626
1868
  * Every member it was meant for that no signal from the speaker could reach
1627
- * when it was said, sorted by id. The message was never sent to these centres,
1628
- * so none of them will ever acknowledge it; to reach them, send it again later
1629
- * naming them in `to`.
1869
+ * when it was said, sorted by id, and that the host cannot keep the message
1870
+ * for either. The message was never sent to these centres, so none of them
1871
+ * will ever acknowledge it; to reach them, send it again later naming them in
1872
+ * `to`. Empty on a host that keeps messages for centres it cannot reach yet,
1873
+ * which lists those in `CommcastSendReceipt.queued` instead.
1630
1874
  */
1631
1875
  unreached: string[];
1876
+ /**
1877
+ * Every member it was meant for that no signal from the speaker could reach
1878
+ * when it was said, and that the host is keeping the message for, sorted by
1879
+ * id. It is carried to each as soon as a path opens, kept with the game until
1880
+ * then, and the member acknowledges it when a screen at its centre reads it.
1881
+ * Absent from a host that keeps nothing.
1882
+ */
1883
+ queued?: string[] | null;
1632
1884
  }
1633
1885
  /**
1634
1886
  * Tell a message's author it arrived. The acknowledgement travels back to the
@@ -1673,34 +1925,49 @@ export interface CommcastRadioTransmitArgs {
1673
1925
  author: CommcastAuthor;
1674
1926
  }
1675
1927
  /**
1676
- * One item of `commcast.traffic`: something said to a group this vantage
1677
- * belongs to, delivered one signal delay after it was said from where it was
1678
- * said.
1928
+ * One command centre's ledger of messages: what it said, and what reached it,
1929
+ * as the state `commcast.ledger` carries.
1930
+ *
1931
+ * **State, read like telemetry.** A message is a command from one centre to
1932
+ * another. It travels like any command, waiting for a path and cancellable
1933
+ * from the sender's uplink queue, and what it does on arrival is write this
1934
+ * ledger at the recipient. A screen reads the ledger as the latest value of a
1935
+ * state, and a screen that opens at a centre later is told the whole ledger on
1936
+ * connecting.
1679
1937
  *
1680
- * **Addressed, never broadcast.** A connection receives only the items
1681
- * addressed to its own vantage. A group's members are addressed as the speaker
1682
- * could see them when it spoke, so a centre added far away starts receiving
1683
- * once word of it has reached the speaker, and a member with no path from the
1684
- * speaker misses what was said.
1938
+ * **Addressed, never broadcast.** A connection receives only the ledger of its
1939
+ * own vantage.
1685
1940
  *
1686
- * **A stream, not state.** Nothing is replayed to a connection that subscribes
1687
- * after an item reached it, as with anything heard on a radio.
1941
+ * @category Comms
1942
+ */
1943
+ export interface CommcastLedger {
1944
+ /**
1945
+ * Every entry the ledger keeps, oldest first: what this centre said and what
1946
+ * reached it.
1947
+ */
1948
+ items: CommcastLedgerItem[];
1949
+ }
1950
+ /**
1951
+ * One entry of a centre's ledger.
1688
1952
  *
1689
- * Three kinds, by `CommcastTraffic.kind`:
1953
+ * Two kinds, by `CommcastLedgerItem.kind`:
1690
1954
  *
1691
- * - `"members"`: a group opened or grew. `CommcastTraffic.members` is its
1692
- * whole membership after the change, `CommcastTraffic.added` who came in
1693
- * - `"text"`: a message, `CommcastTraffic.id` and `CommcastTraffic.body`
1694
- * - `"ack"`: a member acknowledging `CommcastTraffic.messageId`, addressed to
1695
- * that message's author alone
1955
+ * - `"members"`: a group opened or grew. `CommcastLedgerItem.members` is its
1956
+ * whole membership after the change, `CommcastLedgerItem.added` who came in
1957
+ * - `"text"`: a message, `CommcastLedgerItem.id` and `CommcastLedgerItem.body`
1958
+ *
1959
+ * An entry this centre said has no `CommcastLedgerItem.arrivedUt` and carries
1960
+ * how each recipient stands: `CommcastLedgerItem.delivered`,
1961
+ * `CommcastLedgerItem.ended` and `CommcastLedgerItem.read`. An entry that
1962
+ * reached this centre has `CommcastLedgerItem.arrivedUt` and none of those.
1696
1963
  *
1697
1964
  * @category Comms
1698
1965
  */
1699
- export interface CommcastTraffic {
1700
- /** `"members"`, `"text"` or `"ack"`. */
1966
+ export interface CommcastLedgerItem {
1967
+ /** `"members"` or `"text"`. */
1701
1968
  kind: string;
1702
- /** A text message's own id, or a membership change's. Absent from an ack. */
1703
- id?: string | null;
1969
+ /** A text message's own id, or a membership change's. */
1970
+ id: string;
1704
1971
  /** The group, by the id it was opened with. */
1705
1972
  groupId: string;
1706
1973
  /**
@@ -1710,7 +1977,7 @@ export interface CommcastTraffic {
1710
1977
  from: string;
1711
1978
  /** How the speaker describes itself, for display only. */
1712
1979
  author: CommcastAuthor;
1713
- /** The UT it was said at, which is also this delivery's `meta.validAt`. */
1980
+ /** The UT it was said at. */
1714
1981
  sentUt: Value<"ut">;
1715
1982
  /**
1716
1983
  * Everyone it was addressed to, the speaker included, as the speaker could see
@@ -1723,15 +1990,53 @@ export interface CommcastTraffic {
1723
1990
  added?: string[] | null;
1724
1991
  /** A `"text"` message's words. Absent otherwise. */
1725
1992
  body?: string | null;
1726
- /** The message an `"ack"` acknowledges. Absent otherwise. */
1727
- messageId?: string | null;
1993
+ /** The UT it reached this centre. Absent from an entry this centre said. */
1994
+ arrivedUt?: Value<"ut"> | null;
1995
+ /**
1996
+ * For an entry this centre said: the UT each recipient's copy ran, keyed by
1997
+ * recipient, as the reply reached here. A recipient with no key has not been
1998
+ * heard from.
1999
+ */
2000
+ delivered?: {
2001
+ [key: string]: Value<"ut">;
2002
+ } | null;
2003
+ /**
2004
+ * For an entry this centre said: how a recipient's copy ended without running,
2005
+ * `"cancelled"` or `"expired"`, keyed by recipient.
2006
+ */
2007
+ ended?: {
2008
+ [key: string]: string;
2009
+ } | null;
2010
+ /**
2011
+ * For an entry this centre said: when a screen at each recipient read it,
2012
+ * keyed by recipient, as the notice reached here.
2013
+ */
2014
+ read?: {
2015
+ [key: string]: CommcastRead;
2016
+ } | null;
2017
+ }
2018
+ /**
2019
+ * A recipient's screen reading a message: when, and who read it.
2020
+ *
2021
+ * @category Comms
2022
+ */
2023
+ export interface CommcastRead {
2024
+ /** The UT a screen at the recipient read it. */
2025
+ at: Value<"ut">;
2026
+ /** The reading device's own stable key. */
2027
+ stationKey: string;
2028
+ /**
2029
+ * Which end of the light-path the screen that read it sits at, in the client's
2030
+ * own vocabulary.
2031
+ */
2032
+ seat: string;
1728
2033
  }
1729
2034
  /**
1730
2035
  * The first segment of every `commcast.radio` frame, as UTF-8 JSON. The
1731
2036
  * segments after it are that batch's raw Opus packets, 20 ms each, in order.
1732
2037
  *
1733
2038
  * `commcast.radio` is carried in BinaryLane frames and is addressed exactly as
1734
- * `CommcastTraffic` is: a connection hears only transmissions to groups its
2039
+ * CommcastTraffic is: a connection hears only transmissions to groups its
1735
2040
  * vantage belongs to, one signal delay after each batch was spoken. Every
1736
2041
  * frame carries this whole description, so a listener that starts hearing
1737
2042
  * partway through a keying places it from the first frame it gets.
@@ -1839,9 +2144,12 @@ export declare enum CommsControlSource {
1839
2144
  /**
1840
2145
  * Whether the active vessel has a control link home right now, and the degree
1841
2146
  * of control it has. Read from the comms mod in force: ground-side truth, with
1842
- * all three fields describing the same tick. Nothing is published while no
1843
- * craft is on screen (an editor, the space centre, the tracking station): a
1844
- * link report is about a craft.
2147
+ * all three fields describing the same tick. While no craft is on screen (an
2148
+ * editor, the space centre, the tracking station), and for the moment the game
2149
+ * takes to solve a craft's link after it comes on screen, nothing is reported:
2150
+ * `CommsConnectivity.connected` is `null`, `CommsConnectivity.controlSource`
2151
+ * is `CommsControlSource.Unknown` and `CommsConnectivity.hasLocalControl` is
2152
+ * false and says nothing.
1845
2153
  *
1846
2154
  * @category Comms
1847
2155
  * @categoryDescription Comms
@@ -1855,9 +2163,11 @@ export interface CommsConnectivity {
1855
2163
  /**
1856
2164
  * True when the backend resolved a control path home for the active vessel.
1857
2165
  * False when it has none, and also when no link state could be read (then
1858
- * `CommsConnectivity.controlSource` is `CommsControlSource.None`).
2166
+ * `CommsConnectivity.controlSource` is `CommsControlSource.None`). `null` when
2167
+ * nothing is reported yet, which is not a lost link: no craft is on screen, or
2168
+ * the game has not yet solved the link of one that just came on screen.
1859
2169
  */
1860
- connected: boolean;
2170
+ connected?: boolean | null;
1861
2171
  /** The degree of control the vessel has. */
1862
2172
  controlSource: CommsControlSource;
1863
2173
  /**
@@ -2021,7 +2331,9 @@ export declare enum CommsControlStateKind {
2021
2331
  export interface CommsControl {
2022
2332
  /**
2023
2333
  * The vessel's control level. `CommsControlStateKind.None` when no link state
2024
- * could be read.
2334
+ * could be read, and `CommsControlStateKind.Unknown` while the active craft
2335
+ * has not been read yet, such as just after a switch to another craft or with
2336
+ * none on screen.
2025
2337
  */
2026
2338
  level: CommsControlStateKind;
2027
2339
  /**
@@ -2200,6 +2512,19 @@ export interface CommsNetworkEdge {
2200
2512
  * sent, so every edge is true.
2201
2513
  */
2202
2514
  active: boolean;
2515
+ /**
2516
+ * What this edge's link is worth at the distance it crosses, from 0 to 1, in
2517
+ * the comms backend's own terms: the same figure the matching
2518
+ * `CommsHop.strength` carries, for any client that draws the graph without the
2519
+ * path. Null when the backend states no strength for the edge, or the centre
2520
+ * has not heard enough to work one out.
2521
+ */
2522
+ strength?: Value<"ratio"> | null;
2523
+ /**
2524
+ * Which quantity `CommsNetworkEdge.strength` is, as the comms backend stated
2525
+ * it for this edge. Null exactly when `CommsNetworkEdge.strength` is.
2526
+ */
2527
+ quantity?: SignalQuantity | null;
2203
2528
  }
2204
2529
  /**
2205
2530
  * The `comms.network` payload: the nodes and edges of the active route as it
@@ -2247,17 +2572,21 @@ export declare enum CommsDelaySource {
2247
2572
  }
2248
2573
  /**
2249
2574
  * The `comms.delay` payload: the one-way signal delay to the active vessel,
2250
- * gated by the `comms.signalDelay.enabled` setting. `CommsDelay.oneWaySeconds`
2575
+ * gated by the `SIGNAL_DELAY/enabled` setting. `CommsDelay.oneWaySeconds`
2251
2576
  * tells two different "no delay" cases apart by value:
2252
2577
  *
2253
2578
  * - **null**: no measurable `CommsPath` (no path home, or incomplete hop
2254
2579
  * geometry). There is nothing to measure, so nothing is reported.
2255
- * `CommsDelay.source` is `CommsDelaySource.None`.
2256
- * - **0**: the delay feature is disabled (`comms.signalDelay.enabled =
2257
- * false`). A genuine "zero delay applied", not an absence.
2258
- * `CommsDelay.source` is also `CommsDelaySource.None` here: the two cases
2259
- * share the same `Source` and are told apart only by whether the value is
2260
- * null.
2580
+ * `CommsDelay.source` is `CommsDelaySource.None`. A ground centre is sent
2581
+ * null from the moment it learns the game's route from the vessel is gone
2582
+ * until it learns of a new one, unless the newest radio reading to reach it
2583
+ * says the vessel is connected; the last figure before that is the one to
2584
+ * hold. A route its plan still holds through that stretch is offered as a
2585
+ * prediction on `comms.route`, never as this delay.
2586
+ * - **0**: the delay feature is disabled (`SIGNAL_DELAY/enabled` is false). A
2587
+ * genuine "zero delay applied", not an absence. `CommsDelay.source` is also
2588
+ * `CommsDelaySource.None` here: the two cases share the same `Source` and
2589
+ * are told apart only by whether the value is null.
2261
2590
  * - a real number: `CommsDelay.source` is `CommsDelaySource.SignalDelay`, a
2262
2591
  * signal delay computed over the hop geometry of the comms model in use.
2263
2592
  *
@@ -2273,10 +2602,11 @@ export declare enum CommsDelaySource {
2273
2602
  * the two always agree. Where the game routes the vessel's samples to the
2274
2603
  * centre (at home, the vessel's own path to the ground), that path is the
2275
2604
  * game's route and this is the delay the samples arrive by. Wherever the game
2276
- * states no route, it is the path the centre's own plan has, worked out from
2277
- * what the centre has heard of each craft, so the figure moves only once the
2278
- * news that moves it has reached the centre. A zero that is a setting (delay
2279
- * switched off, or a save with no comms network) is sent at once.
2605
+ * states no route, it is the path the centre's own plan has (save for the lost
2606
+ * route above, which reports null), worked out from what the centre has heard
2607
+ * of each craft, so the figure moves only once the news that moves it has
2608
+ * reached the centre. A zero that is a setting (delay switched off, or a save
2609
+ * with no comms network) is sent at once.
2280
2610
  *
2281
2611
  * @category Comms
2282
2612
  */
@@ -2328,9 +2658,19 @@ export interface CommsDelay {
2328
2658
  export interface CommsLink {
2329
2659
  /**
2330
2660
  * True while the active vessel has a control link home, as of one signal delay
2331
- * ago; false through a blackout.
2661
+ * ago; false through a blackout. `null` when nothing is reported yet, which is
2662
+ * not a lost link: no craft is on screen, or the game has not yet solved the
2663
+ * link of one that just came on screen.
2332
2664
  */
2333
- connected: boolean;
2665
+ connected?: boolean | null;
2666
+ /**
2667
+ * Whether the craft has a route to a command centre, sent only to a pilot
2668
+ * aboard the craft, whose `CommsLink.connected` always reads true because the
2669
+ * crew are never cut off from their own craft. False while the craft is out of
2670
+ * contact with mission control. `null` at every other vantage and whenever the
2671
+ * craft is in contact, where `CommsLink.connected` already says it.
2672
+ */
2673
+ routeHome?: boolean | null;
2334
2674
  /** The payload's provenance (`"vessel:<guid>"` or `"game"`). */
2335
2675
  meta: PayloadMeta;
2336
2676
  }
@@ -2427,6 +2767,13 @@ export interface CommsContactPair {
2427
2767
  */
2428
2768
  retargetWindows: CommsRetargetWindow[];
2429
2769
  /**
2770
+ * Why this pair has no reach and so no windows, from CommsNoReachReasons:
2771
+ * `"unpowered"` when either craft has no electric charge aboard. Absent when
2772
+ * the pair has reach or no reason is known. Useful for telling the operator a
2773
+ * missing window is the craft's power, not its orbit.
2774
+ */
2775
+ noReachReason?: string;
2776
+ /**
2430
2777
  * True while either end was last heard of with its orbit still changing. It is
2431
2778
  * reckoned on the orbit it reported mid-burn, which it has since left, so
2432
2779
  * these windows are a rough guide until its next report.
@@ -2516,6 +2863,58 @@ export interface CommsDegrade {
2516
2863
  level?: Value<"ratio"> | null;
2517
2864
  }
2518
2865
  /**
2866
+ * One ground station of the comms network: where it stands on its body, under
2867
+ * the name the route and the network use for it.
2868
+ *
2869
+ * @category Comms
2870
+ */
2871
+ export interface CommsGroundStation {
2872
+ /**
2873
+ * The station's join key in the same id space as `CommsNetworkNode.id` and
2874
+ * `CommsHop.from`, so a marker can be matched to the station a route ends at.
2875
+ */
2876
+ id: string;
2877
+ /** The station's name as the player reads it in game. */
2878
+ name: string;
2879
+ /**
2880
+ * The `bodyName` of the body the station stands on, or null when the body
2881
+ * could not be read. Null together with `CommsGroundStation.latitude`.
2882
+ */
2883
+ bodyName?: string | null;
2884
+ /**
2885
+ * Body-fixed latitude of the station in degrees. Null exactly when
2886
+ * `CommsGroundStation.bodyName` is.
2887
+ */
2888
+ latitude?: Value<"°"> | null;
2889
+ /**
2890
+ * Body-fixed longitude of the station in degrees, wrapped to (-180, 180]. Null
2891
+ * exactly when `CommsGroundStation.latitude` is.
2892
+ */
2893
+ longitude?: Value<"°"> | null;
2894
+ /**
2895
+ * Per-station facts the comms mod in use reports beyond this shape, keyed by
2896
+ * that mod's name. A comms mod that knows more about its stations, such as
2897
+ * their radio equipment, fills its own namespace here, typed by that mod's
2898
+ * client.
2899
+ */
2900
+ extensions?: ProviderExtensions;
2901
+ }
2902
+ /**
2903
+ * The `comms.groundStations` payload: every ground station the game has, as
2904
+ * the comms mod in use reads them, with the body each stands on and its
2905
+ * latitude and longitude. Present with or without a craft on screen, and the
2906
+ * same for every command centre.
2907
+ *
2908
+ * Not delayed by signal delay: the stations are fixed places the universe
2909
+ * holds, not an observation of any vessel. An unchanged list is not re-sent.
2910
+ *
2911
+ * @category Comms
2912
+ */
2913
+ export interface CommsGroundStations {
2914
+ /** Every ground station. Empty when the backend reads none, never null. */
2915
+ stations: CommsGroundStation[];
2916
+ }
2917
+ /**
2519
2918
  * What one journey report says happened to a command, or to a cancel.
2520
2919
  *
2521
2920
  * @category Comms
@@ -2769,6 +3168,13 @@ export interface CommsNextLoss {
2769
3168
  */
2770
3169
  basis: string;
2771
3170
  /**
3171
+ * With `out-of-contact`, the universal time the plan next has an open route
3172
+ * between the centre and the active craft: the instant the link closes up,
3173
+ * before any signal delay. Null when the plan holds none, and always null for
3174
+ * every other `CommsNextLoss.basis`.
3175
+ */
3176
+ nextAcquisitionUt?: Value<"ut"> | null;
3177
+ /**
2772
3178
  * The last universal time the plan reaches. A null `CommsNextLoss.ut` with
2773
3179
  * `no-loss-in-window` means no loss before it.
2774
3180
  */
@@ -3060,6 +3466,38 @@ export interface SetControlFrameArgs {
3060
3466
  targetFrameSelected?: boolean;
3061
3467
  }
3062
3468
  /**
3469
+ * Switch a converter on a part on or off (`vessel.converter.start` and
3470
+ * `vessel.converter.stop`). Reaches every converter the game runs as a
3471
+ * resource process: an ISRU unit, a fuel cell, a drill.
3472
+ *
3473
+ * The part is named by `ConverterSwitchArgs.partId`, the part's flight id as a
3474
+ * string, the same id `isru.converters` and `isru.drills` carry on each entry.
3475
+ * An empty or unknown `ConverterSwitchArgs.partId` fails with
3476
+ * `CommandErrorCode.NotFound`.
3477
+ *
3478
+ * Start and stop are idempotent: a converter already in the requested state
3479
+ * answers success with `RunStateChange.changed` false. A start the game would
3480
+ * refuse, such as a drill whose head is not deployed, fails with
3481
+ * `CommandErrorCode.WrongState`.
3482
+ *
3483
+ * @category Command arguments
3484
+ */
3485
+ export interface ConverterSwitchArgs {
3486
+ /**
3487
+ * The converter's part, as its flight id in a string: the id the
3488
+ * `isru.converters` and `isru.drills` entries are keyed by.
3489
+ */
3490
+ partId: string;
3491
+ /**
3492
+ * Which converter on the part is meant, as the `converterName` of its
3493
+ * `isru.converters` or `isru.drills` entry. Optional: an empty value means the
3494
+ * part's only converter. A part can carry several, so an empty value on such a
3495
+ * part is refused with `CommandErrorCode.NotFound`, as is a name the part does
3496
+ * not carry.
3497
+ */
3498
+ converterName?: string;
3499
+ }
3500
+ /**
3063
3501
  * The last notable crash of the current save. A subscriber that joins late
3064
3502
  * still receives the most recent record, since every value is delivered, in
3065
3503
  * order. Every field is captured from the crashed vessel at the moment of the
@@ -3106,7 +3544,11 @@ export interface CrashReport {
3106
3544
  * most the 200 most recent lines.
3107
3545
  */
3108
3546
  events: string[];
3109
- /** Names of the kerbals lost in this crash: everyone aboard at the crash. */
3547
+ /**
3548
+ * Names of the kerbals the game reported killed in this crash. A kerbal the
3549
+ * game reports after the crash was first published is added and the crash is
3550
+ * published again.
3551
+ */
3110
3552
  kerbalsKilled: string[];
3111
3553
  /**
3112
3554
  * The vessel's flight situation at the crash (`Vessel.Situations` name, e.g.
@@ -3266,6 +3708,40 @@ export declare enum CrewStanding {
3266
3708
  Missing = 6
3267
3709
  }
3268
3710
  /**
3711
+ * Move a kerbal to another part of the active vessel (`vessel.crew.transfer`).
3712
+ * Docked craft are one vessel, so this also moves a kerbal between them. Parts
3713
+ * are named by flight id, the id `vessel.parts` carries.
3714
+ *
3715
+ * A kerbal no longer in `CrewTransferArgs.fromPartId` is refused with
3716
+ * `CommandErrorCode.WrongState`. A full destination is refused with
3717
+ * `CommandErrorCode.LimitReached`. A part crew cannot use is refused with
3718
+ * `CommandErrorCode.CapabilityMismatch`, and a move a mod keeps out with
3719
+ * `CommandErrorCode.NotClearToProceed`.
3720
+ *
3721
+ * @category Command arguments
3722
+ */
3723
+ export interface CrewTransferArgs {
3724
+ /** The kerbal's name, as `vessel.crew` gives it. */
3725
+ kerbalName: string;
3726
+ /** The part the kerbal was last seen in. */
3727
+ fromPartId: string;
3728
+ /** The part to move the kerbal into. */
3729
+ toPartId: string;
3730
+ }
3731
+ /**
3732
+ * A part's seats, on `vessel.parts`.
3733
+ *
3734
+ * @category Parts
3735
+ */
3736
+ export interface PartSeats {
3737
+ /** How many kerbals the part can hold now. Some habitats change this in flight. */
3738
+ capacity: Value<"count">;
3739
+ /** False for a part the game keeps crew from moving into or out of. */
3740
+ transferAvailable: boolean;
3741
+ /** True for an external command seat, which is never a source or destination. */
3742
+ isExternalSeat: boolean;
3743
+ }
3744
+ /**
3269
3745
  * One science credit, attributed to the vessel that earned it.
3270
3746
  *
3271
3747
  * Stock credits science in a lump the moment a transmit stream finishes;
@@ -3375,6 +3851,47 @@ export interface ReputationLossEvent {
3375
3851
  ut: Value<"ut">;
3376
3852
  }
3377
3853
  /**
3854
+ * One rate tier and the samples a game second it stands for now.
3855
+ *
3856
+ * @category Stream messages
3857
+ */
3858
+ export interface DataRateTierEntry {
3859
+ /** The tier: `"base"` or `"fast"`. */
3860
+ tier: "base" | "fast";
3861
+ /** Samples a game second at this tier. */
3862
+ samplesPerSecond: Value<"1">;
3863
+ }
3864
+ /**
3865
+ * One Topic sent above the base rate, and the rate it is sent at.
3866
+ *
3867
+ * @category Stream messages
3868
+ */
3869
+ export interface TopicDataRate {
3870
+ /** The Topic id. */
3871
+ topic: string;
3872
+ /** The fastest tier any connection asks for on this Topic. */
3873
+ tier: "base" | "fast";
3874
+ /** Samples a game second this Topic is sent at. */
3875
+ samplesPerSecond: Value<"1">;
3876
+ }
3877
+ /**
3878
+ * Wire wrapper for `system.dataRates`: what each rate tier is in samples a
3879
+ * game second, and every Topic sent above the base tier now. A Topic not
3880
+ * listed is sent at the base tier's rate.
3881
+ *
3882
+ * A rate is in game time. Under time warp the mod sends at most ten samples a
3883
+ * real second, so a Topic can arrive with more game time between samples than
3884
+ * its rate gives.
3885
+ *
3886
+ * @category Stream messages
3887
+ */
3888
+ export interface DataRateReport {
3889
+ /** Every tier, slowest first. Never null. */
3890
+ tiers: DataRateTierEntry[];
3891
+ /** Every Topic sent above the base tier, sorted by Topic id. Never null. */
3892
+ topics: TopicDataRate[];
3893
+ }
3894
+ /**
3378
3895
  * One Topic sample as the mod sends it: the Topic id, its payload, and the
3379
3896
  * envelope `StreamData.meta` saying when the payload was true and when it
3380
3897
  * arrived.
@@ -3390,6 +3907,14 @@ export interface StreamData<Payload> {
3390
3907
  payload: Payload;
3391
3908
  /** When the sample was true, when it arrived, and where it was observed from. */
3392
3909
  meta: Meta;
3910
+ /**
3911
+ * The payload fields left out of this sample because they hold the same value
3912
+ * as in the last sample of this Topic sent on this connection, such as the
3913
+ * terrain grid on `vessel.landing` between the times it is retaken. A client
3914
+ * keeps each one from that sample. Absent when nothing was left out; a field
3915
+ * the sample holds as `null` is sent, never listed.
3916
+ */
3917
+ unchanged?: string[];
3393
3918
  }
3394
3919
  /**
3395
3920
  * Something that happened to a subscription, sent on the Topic it happened to.
@@ -3426,6 +3951,14 @@ export interface EventMsg {
3426
3951
  * keyframe cadence, and on `timeline-reset`; absent means unknown, never zero.
3427
3952
  */
3428
3953
  keyframeIntervalUt?: number;
3954
+ /**
3955
+ * On `timeline-reset`, the latest game time from before the load that the new
3956
+ * timeline still includes: a reading validated at or before it stands,
3957
+ * anything after it is gone. Absent on a `timeline-reset` means the load kept
3958
+ * no history at all (a different game was loaded). Always absent on
3959
+ * `subscribed`.
3960
+ */
3961
+ keptThroughUt?: number;
3429
3962
  }
3430
3963
  /**
3431
3964
  * A command the client sends: the command id, its arguments, and a request id
@@ -3459,8 +3992,10 @@ export interface CommandRequest<Args> {
3459
3992
  * program rather than a craft (tech, strategy, contract) sends `"meta"`, which
3460
3993
  * carries no delay whichever centre the operator has selected; sent from a
3461
3994
  * centre instead, it rides that centre's delay to the home command, which is
3462
- * none for a ground station. A centre that is not active is refused with an
3463
- * `unknownVantage` error.
3995
+ * none for a ground station. `"active-craft"` dispatches from wherever the
3996
+ * active craft stands at that moment, at no delay, and is refused with an
3997
+ * `unknownVantage` error while there is no active craft. A centre that is not
3998
+ * active is refused with an `unknownVantage` error.
3464
3999
  */
3465
4000
  vantage?: string;
3466
4001
  /**
@@ -3474,6 +4009,21 @@ export interface CommandRequest<Args> {
3474
4009
  * active vessel ignore it.
3475
4010
  */
3476
4011
  seenVesselId?: string;
4012
+ /**
4013
+ * The run of the mod the sending screen last heard from: the `Hello.bootId` it
4014
+ * holds. Required. A delayed command or a scene change sent from another run,
4015
+ * or with this empty, is refused with `undoneByLoad`; a command that is about
4016
+ * the game rather than the flight, such as a pause, ignores it. A station
4017
+ * forwarded through a host sends its own, not the host's.
4018
+ */
4019
+ seenBootId: string;
4020
+ /**
4021
+ * The raw `Meta.timelineEpoch` the sending screen last received from the mod.
4022
+ * A delayed command or a scene change sent from any other epoch is refused
4023
+ * with `undoneByLoad`, because a game load replaced the timeline it was aimed
4024
+ * at. Commands that ignore `CommandRequest.seenBootId` ignore this too.
4025
+ */
4026
+ seenEpoch: number;
3477
4027
  /** The command's arguments, in the command's own argument type. */
3478
4028
  args: Args;
3479
4029
  /**
@@ -3673,6 +4223,53 @@ export interface Unsubscribe {
3673
4223
  topic: string;
3674
4224
  }
3675
4225
  /**
4226
+ * Asks the mod to send a subscribed Topic to this connection at a rate tier.
4227
+ * The mod sends each Topic at the fastest tier any connection asks for, and at
4228
+ * `"base"` while none asks for more; `system.dataRates` says what each tier is
4229
+ * in samples a second and which Topics are above base now.
4230
+ *
4231
+ * The request lasts until the connection asks again, unsubscribes the Topic or
4232
+ * closes. Asking `"base"` withdraws it. A request for a Topic this connection
4233
+ * has not subscribed changes nothing, and a tier the mod does not know is read
4234
+ * as `"base"`. A Topic an Uplink publishes when it has news, rather than one
4235
+ * the mod samples on its own clock, arrives as it did.
4236
+ *
4237
+ * @category Stream messages
4238
+ */
4239
+ export interface SetRate {
4240
+ /** The frame type, always `"set-rate"`. */
4241
+ type: "set-rate";
4242
+ /** The subscribed Topic id the tier is for. */
4243
+ topic: string;
4244
+ /** The rate tier: `"base"` or `"fast"`. */
4245
+ tier: "base" | "fast";
4246
+ }
4247
+ /**
4248
+ * Asks the mod to send a rate tier no faster than a given rate while this
4249
+ * connection holds the request, for a client that cannot keep up with the tier
4250
+ * as it stands. The mod sends the tier at the lowest rate any connection asks
4251
+ * for in this way, never below the base tier's rate, and `system.dataRates`
4252
+ * reports the rate it sends.
4253
+ *
4254
+ * The request lasts until the connection sends another for the same tier or
4255
+ * closes. A `null` `CapRate.samplesPerSecond` withdraws it. The base tier
4256
+ * cannot be lowered, and a request for it or for a tier the mod does not know
4257
+ * changes nothing.
4258
+ *
4259
+ * @category Stream messages
4260
+ */
4261
+ export interface CapRate {
4262
+ /** The frame type, always `"cap-rate"`. */
4263
+ type: "cap-rate";
4264
+ /** The rate tier to send no faster: `"fast"`. */
4265
+ tier: "base" | "fast";
4266
+ /**
4267
+ * The most samples a game second this connection asks the tier to carry, or
4268
+ * `null` to withdraw the request.
4269
+ */
4270
+ samplesPerSecond?: number;
4271
+ }
4272
+ /**
3676
4273
  * Selects the command centre this connection commands from and observes at. It
3677
4274
  * sets both where the connection's telemetry is observed from and where its
3678
4275
  * commands are sent from. The id must name a currently-active command centre,
@@ -3686,12 +4283,24 @@ export interface Unsubscribe {
3686
4283
  * menu) at none, stamping its frames with an empty `vantage`. Every frame's
3687
4284
  * `meta.vantage` says which of these is in force.
3688
4285
  *
4286
+ * The reserved id `"active-craft"` is always accepted and names no centre: it
4287
+ * asks the host to keep the connection at the active craft, crewed or not, and
4288
+ * to move it whenever the game changes craft, with no further message. The
4289
+ * active craft is read and commanded at no delay, and frames say which craft
4290
+ * in `meta.vantage` as `"vessel:<guid>"`. While there is no active craft (the
4291
+ * Space Center, the Tracking Station, the main menu) the connection stays at
4292
+ * the vantage a fresh one starts at. Choosing a centre afterwards ends the
4293
+ * following.
4294
+ *
3689
4295
  * @category Stream messages
3690
4296
  */
3691
4297
  export interface SetVantage {
3692
4298
  /** The frame type, always `"set-vantage"`. */
3693
4299
  type: "set-vantage";
3694
- /** The command centre Id to adopt as this connection's vantage. */
4300
+ /**
4301
+ * The command centre Id to adopt as this connection's vantage, or
4302
+ * `"active-craft"` to follow the active craft.
4303
+ */
3695
4304
  centreId: string;
3696
4305
  }
3697
4306
  /**
@@ -3722,6 +4331,12 @@ export interface Hello {
3722
4331
  */
3723
4332
  bootId: string;
3724
4333
  /**
4334
+ * The timeline the game is on as this connection opens: the
4335
+ * `Meta.timelineEpoch` a client sends back on a command as
4336
+ * `CommandRequest.seenEpoch`.
4337
+ */
4338
+ timelineEpoch: number;
4339
+ /**
3725
4340
  * The mod's release label: `v1.4.0` for a release, `rc-<sha>` for a release
3726
4341
  * candidate. Absent from the frame for a build that carries no label, such as
3727
4342
  * one built from source.
@@ -3773,6 +4388,18 @@ export interface GameState {
3773
4388
  * `"SPACECENTER"`, `"TRACKSTATION"`, `"EDITOR"` or `"MAINMENU"`.
3774
4389
  */
3775
4390
  scene: string;
4391
+ /**
4392
+ * The run of the mod this frame is from, the same value as `Hello.bootId`. A
4393
+ * station relayed through a host hears this frame and not the mod's `hello`.
4394
+ */
4395
+ bootId: string;
4396
+ /**
4397
+ * The timeline the game is on: the `Meta.timelineEpoch` a client sends back on
4398
+ * a command as `CommandRequest.seenEpoch`. Sent again whenever a game load
4399
+ * starts a new timeline, so a connection that is subscribed to nothing still
4400
+ * learns it.
4401
+ */
4402
+ timelineEpoch: number;
3776
4403
  }
3777
4404
  /**
3778
4405
  * Asks for a `Pong`, to tell a connection that is quiet from one that is dead.
@@ -3805,7 +4432,39 @@ export interface Pong {
3805
4432
  nonce: string;
3806
4433
  }
3807
4434
  /**
3808
- * One kerbal currently outside a craft, on the `eva.crew` channel.
4435
+ * Switch the headlamp of one kerbal outside a craft on or off, the
4436
+ * remote-control equivalent of the player pressing the lamp key while flying
4437
+ * that kerbal.
4438
+ *
4439
+ * It acts on a kerbal in the group of the craft being reported, so it waits on
4440
+ * that craft's signal delay, like `vessel.control.*`. It sets an absolute
4441
+ * state, never a toggle, so a repeated command is safe. Read the result back
4442
+ * from `EvaKerbal.lampOn` on the kerbal's own Topic, one signal delay later.
4443
+ *
4444
+ * KSP switches a lamp only for the kerbal it is flying, so a command for any
4445
+ * other kerbal is refused with `CommandErrorCode.WrongState` and says why. An
4446
+ * id that is not a kerbal outside is `CommandErrorCode.NotFound`.
4447
+ *
4448
+ * @category Command arguments
4449
+ */
4450
+ export interface SetEvaLampArgs {
4451
+ /**
4452
+ * The kerbal's own vessel id, the same id `eva.crew` lists as
4453
+ * `EvaCrewMember.kerbalVesselId`.
4454
+ */
4455
+ kerbalVesselId: string;
4456
+ /** `true` to switch the lamp on, `false` to switch it off. */
4457
+ enabled: boolean;
4458
+ }
4459
+ /**
4460
+ * One kerbal currently outside a craft, on that kerbal's own
4461
+ * `eva.kerbal.<vessel id>.state` Topic.
4462
+ *
4463
+ * The Topic reaches a command centre by the link and signal delay of the craft
4464
+ * being reported, the same as the rest of that craft's readings. A kerbal that
4465
+ * is not loaded (beyond physics range) cannot be read, so its Topic goes on
4466
+ * holding what the command centre last heard of it, and has no reading when
4467
+ * nothing was heard before it unloaded.
3809
4468
  *
3810
4469
  * A kerbal on EVA is a vessel in KSP's model, with its own id, so it already
3811
4470
  * appears on `trackingStation.catalog` and on its own per-craft Topics
@@ -3882,12 +4541,90 @@ export interface EvaKerbal {
3882
4541
  * from `KerbalEVA.HelmetUnsafeReason`, or `null` when it can.
3883
4542
  */
3884
4543
  helmetUnsafeReason?: string | null;
3885
- }
3886
- /**
3887
- * Every kerbal currently outside a craft.
4544
+ /**
4545
+ * The science results this kerbal is holding, such as a surface sample or an
4546
+ * EVA report, which are on no other Topic: `science.experiments` lists the
4547
+ * active vessel's results and a kerbal outside is not that vessel. Empty when
4548
+ * the kerbal holds none, and `null` when it could not be read. For a kerbal
4549
+ * that is not loaded these are the results the command centre last heard it
4550
+ * held.
4551
+ */
4552
+ heldData?: EvaHeldData[] | null;
4553
+ /**
4554
+ * Whether the kerbal has the helmet on, from the crew member's own record
4555
+ * (`ProtoCrewMember.hasHelmetOn`). `null` when it could not be read.
4556
+ */
4557
+ helmetOn?: boolean | null;
4558
+ /**
4559
+ * What the kerbal is carrying, from the kerbal's own inventory. Empty when the
4560
+ * kerbal carries nothing, and `null` when the inventory could not be read: a
4561
+ * kerbal whose pack could not be read is not one with an empty pack.
4562
+ */
4563
+ carrying?: InventoryItem[] | null;
4564
+ /**
4565
+ * How many slots the kerbal's inventory has, or `null` when it could not be
4566
+ * read.
4567
+ */
4568
+ slots?: Value<"count"> | null;
4569
+ /** How many of those slots hold something, or `null` when it could not be read. */
4570
+ slotsUsed?: Value<"count"> | null;
4571
+ /**
4572
+ * Whether this kerbal is the vessel the game is flying. KSP switches a
4573
+ * kerbal's lamp only while it is, so a command centre offers the lamp only for
4574
+ * the kerbal this is true for. `null` when it could not be read.
4575
+ */
4576
+ focused?: boolean | null;
4577
+ }
4578
+ /**
4579
+ * One science result a kerbal on EVA is holding, in `EvaKerbal.heldData`.
4580
+ *
4581
+ * @category Crew
4582
+ */
4583
+ export interface EvaHeldData {
4584
+ /**
4585
+ * The research subject's id (`ScienceSubject.id`), the same key
4586
+ * `science.archive` lists it under.
4587
+ */
4588
+ subjectId?: string | null;
4589
+ /** The result's title, for example "Surface Sample from The Mun's Midlands". */
4590
+ title?: string | null;
4591
+ /** The size of the result. */
4592
+ dataAmount?: Value<"Mit"> | null;
4593
+ }
4594
+ /**
4595
+ * One kerbal listed on `eva.crew`: who is outside, loaded or not, and which
4596
+ * craft they left, enough to find the kerbal's own `eva.kerbal.<vessel
4597
+ * id>.state` Topic.
4598
+ *
4599
+ * @category Crew
4600
+ */
4601
+ export interface EvaCrewMember {
4602
+ /**
4603
+ * The kerbal's own vessel id, the key of its `eva.kerbal.<vessel id>.state`
4604
+ * Topic and the guid `trackingStation.catalog` carries for it.
4605
+ */
4606
+ kerbalVesselId?: string | null;
4607
+ /**
4608
+ * The vessel id of the craft this kerbal stepped out of, or `null` when that
4609
+ * is not known (the step-out was not recorded, or the craft has since gone).
4610
+ */
4611
+ parentVesselId?: string | null;
4612
+ /** The kerbal's name, from the EVA vessel's `GetName()`. */
4613
+ name?: string | null;
4614
+ /**
4615
+ * Whether the game has this kerbal loaded, which is true within physics range
4616
+ * of the vessel in focus. A kerbal that is not loaded is orbiting or standing
4617
+ * elsewhere and has no suit state of its own to read.
4618
+ */
4619
+ loaded: boolean;
4620
+ }
4621
+ /**
4622
+ * The roster of kerbals currently outside a craft, loaded or not, so a client
4623
+ * can find each one's own `eva.kerbal.<vessel id>.state` Topic. The suit state
4624
+ * is on those Topics, not here.
3888
4625
  *
3889
- * The vessel Topics stay with the craft the kerbal left; this Topic carries
3890
- * what is true of the kerbal.
4626
+ * The roster is a fact the home command holds, so it is not held by the link
4627
+ * of the craft a kerbal left or of any kerbal.
3891
4628
  *
3892
4629
  * An empty list is a real reading: nobody is outside. The Topic has no reading
3893
4630
  * only until its first sample arrives.
@@ -3901,7 +4638,7 @@ export interface EvaCrew {
3901
4638
  */
3902
4639
  count: Value<"count">;
3903
4640
  /** One entry per kerbal on EVA. Never null; empty when nobody is outside. */
3904
- kerbals: EvaKerbal[];
4641
+ kerbals: EvaCrewMember[];
3905
4642
  }
3906
4643
  /**
3907
4644
  * Why a flight ended, carried on `FlightEnded`. The detail of a crash or a
@@ -3919,7 +4656,7 @@ export declare enum FlightEndReason {
3919
4656
  * The game rewound (a revert or a quickload) to before the flight's end, or
3920
4657
  * the flight was still open when the rewind happened. Also sent for a flight
3921
4658
  * that had already ended by crash or recovery on the timeline the rewind
3922
- * discarded.
4659
+ * discarded, in case its first end never reached the client.
3923
4660
  */
3924
4661
  Reverted = 2,
3925
4662
  /**
@@ -3931,7 +4668,13 @@ export declare enum FlightEndReason {
3931
4668
  * The player ended the vessel from the Tracking Station. It was neither lost
3932
4669
  * nor recovered.
3933
4670
  */
3934
- Terminated = 4
4671
+ Terminated = 4,
4672
+ /**
4673
+ * The vessel docked with, or was grabbed by, another craft, and the game kept
4674
+ * the other craft as the one vessel. The craft it joined is named on
4675
+ * `FlightEnded.joinedVesselId` and `FlightEnded.joinedVesselName`.
4676
+ */
4677
+ Docked = 5
3935
4678
  }
3936
4679
  /**
3937
4680
  * Which flight is active and what phase it is in, for the vessel gonogo is
@@ -3952,14 +4695,14 @@ export declare enum FlightEndReason {
3952
4695
  */
3953
4696
  export interface FlightCurrent {
3954
4697
  /**
3955
- * The stable flight id: KSP's `Vessel.id` GUID as a string, the same value as
3956
- * `FlightCurrent.vesselId` and as `VesselIdentity.VesselId` and
3957
- * `CrashReport.VesselId`, so it joins against those directly.
4698
+ * The id of the flight the active vessel is flying, an opaque string the mod
4699
+ * makes up when the flight starts. A revert to launch starts a new flight for
4700
+ * the same vessel, so this changes while `FlightCurrent.vesselId` does not.
3958
4701
  */
3959
4702
  flightId: string;
3960
4703
  /**
3961
- * KSP's `Vessel.id` GUID of the active vessel, as a string. Always equal to
3962
- * `FlightCurrent.flightId`.
4704
+ * KSP's `Vessel.id` GUID of the active vessel, as a string. Joins against
4705
+ * `VesselIdentity.VesselId` and `CrashReport.VesselId`.
3963
4706
  */
3964
4707
  vesselId: string;
3965
4708
  /** The active vessel's display name. */
@@ -3969,27 +4712,35 @@ export interface FlightCurrent {
3969
4712
  * Landed and so on).
3970
4713
  */
3971
4714
  phase: Situation;
4715
+ /**
4716
+ * True while a kerbal is on EVA from this vessel. The rest of this reading,
4717
+ * and every other `vessel.*` Topic, goes on describing the vessel the kerbal
4718
+ * left.
4719
+ */
4720
+ onEva: boolean;
4721
+ /** The name of the kerbal on EVA from this vessel, or null when nobody is. */
4722
+ evaKerbalName?: string | null;
3972
4723
  }
3973
4724
  /**
3974
4725
  * An event that is always delivered, in the order it happened, and held back
3975
4726
  * by the signal delay like any value about a craft, sent when a new flight
3976
4727
  * begins. A flight is new when its vessel id has not been started before in
3977
4728
  * this game session (a launch, or a first switch onto a vessel), and every
3978
- * vessel active just after a revert or a quickload starts a new flight, even
3979
- * one with the same id.
4729
+ * vessel active just after a revert or a quickload starts a new flight with an
4730
+ * id of its own, even one with the same vessel id.
3980
4731
  *
3981
4732
  * A client that subscribes while a flight is already open receives that
3982
4733
  * flight's `flight.started`, carrying its original start `FlightStarted.ut`. A
3983
- * repeat with an unchanged `FlightStarted.ut` is the same flight announced
3984
- * again; a new `FlightStarted.ut` for the same vessel id is a new flight after
3985
- * a rewind.
4734
+ * repeat with an unchanged `FlightStarted.flightId` is the same flight
4735
+ * announced again; a new `FlightStarted.flightId` for the same vessel id is a
4736
+ * new flight after a rewind.
3986
4737
  *
3987
4738
  * @category Flights
3988
4739
  */
3989
4740
  export interface FlightStarted {
3990
4741
  /**
3991
- * The stable flight id: KSP's `Vessel.id` GUID as a string. Always equal to
3992
- * `FlightStarted.vesselId`.
4742
+ * The id of the flight that began, an opaque string the mod makes up. A flight
4743
+ * begun by a revert has an id of its own, never the reverted flight's.
3993
4744
  */
3994
4745
  flightId: string;
3995
4746
  /** KSP's `Vessel.id` GUID of the vessel flying this flight, as a string. */
@@ -4001,6 +4752,14 @@ export interface FlightStarted {
4001
4752
  * or the revert-target UT for a flight started by a rewind.
4002
4753
  */
4003
4754
  ut: Value<"ut">;
4755
+ /**
4756
+ * True when this is a flight that ended `FlightEndReason.Docked` and is now
4757
+ * flying again, because the craft that came off an undock or a Claw release is
4758
+ * the one that docked: `FlightStarted.flightId` and `FlightStarted.ut` are the
4759
+ * original flight's, and `FlightStarted.vesselId` is the new vessel's. Its
4760
+ * earlier Docked end no longer stands.
4761
+ */
4762
+ resumesAfterDock: boolean;
4004
4763
  }
4005
4764
  /**
4006
4765
  * An event that is always delivered, in the order it happened, and held back
@@ -4016,15 +4775,19 @@ export interface FlightStarted {
4016
4775
  * it is sent nothing. A centre that saw the craft go has the end in its
4017
4776
  * `trackingStation.catalog`.
4018
4777
  *
4019
- * Debris, flags and vessels of unknown type never end a flight.
4778
+ * Debris, flags and vessels of unknown type never end a flight. Leaving the
4779
+ * flight scene or switching to another vessel does not end one either: the
4780
+ * flight stays open, and `flight.current` names it again when its vessel is
4781
+ * flown again.
4782
+ *
4783
+ * A revert sends one end for every flight still open, and an end for the last
4784
+ * flight that ended by a crash or a recovery after the revert target. A client
4785
+ * that already holds an end for a flight keeps it.
4020
4786
  *
4021
4787
  * @category Flights
4022
4788
  */
4023
4789
  export interface FlightEnded {
4024
- /**
4025
- * The id of the flight that ended: KSP's `Vessel.id` GUID as a string. Always
4026
- * equal to `FlightEnded.vesselId`.
4027
- */
4790
+ /** The id of the flight that ended, as `FlightStarted.flightId` carried it. */
4028
4791
  flightId: string;
4029
4792
  /** KSP's `Vessel.id` GUID of the vessel whose flight ended, as a string. */
4030
4793
  vesselId: string;
@@ -4040,6 +4803,16 @@ export interface FlightEnded {
4040
4803
  * revert-target UT, not the moment the player chose to revert.
4041
4804
  */
4042
4805
  ut: Value<"ut">;
4806
+ /**
4807
+ * KSP's `Vessel.id` GUID of the craft the vessel joined, as a string. Null
4808
+ * unless `FlightEnded.reason` is `FlightEndReason.Docked`.
4809
+ */
4810
+ joinedVesselId?: string | null;
4811
+ /**
4812
+ * The display name of the craft the vessel joined. Null unless
4813
+ * `FlightEnded.reason` is `FlightEndReason.Docked`.
4814
+ */
4815
+ joinedVesselName?: string | null;
4043
4816
  }
4044
4817
  /**
4045
4818
  * An event that is always delivered, in the order it happened, and held back
@@ -4054,10 +4827,7 @@ export interface FlightEnded {
4054
4827
  * @category Flights
4055
4828
  */
4056
4829
  export interface FlightVesselChanged {
4057
- /**
4058
- * The flight now active: KSP's `Vessel.id` GUID as a string. Always equal to
4059
- * `FlightVesselChanged.vesselId`.
4060
- */
4830
+ /** The id of the flight now active, as `FlightStarted.flightId` carried it. */
4061
4831
  flightId: string;
4062
4832
  /** KSP's `Vessel.id` GUID of the vessel focus moved to, as a string. */
4063
4833
  vesselId: string;
@@ -4110,6 +4880,46 @@ export interface SwitchVesselArgs {
4110
4880
  vesselId: string;
4111
4881
  }
4112
4882
  /**
4883
+ * Quickload a save: the quicksave slot or the save it replaced. It runs after
4884
+ * a short hold, once, against the save the operator confirmed, and takes the
4885
+ * whole game back to that save. What became of it arrives on `ksp.gameLoaded`;
4886
+ * the reply only says it was scheduled.
4887
+ *
4888
+ * @category Command arguments
4889
+ */
4890
+ export interface QuickloadArgs {
4891
+ /**
4892
+ * The `SaveSummary.saveId` the operator confirmed. A file rewritten since then
4893
+ * is refused with `CommandErrorCode.WrongState`.
4894
+ */
4895
+ saveId: string;
4896
+ /**
4897
+ * The name of the screen asking, shown on `GameLoaded.requestedBy`. A
4898
+ * station's host fills it in; send `""` otherwise.
4899
+ */
4900
+ requestedBy: string;
4901
+ }
4902
+ /**
4903
+ * Recover a vessel standing at the Space Center by id, the way the Space
4904
+ * Center's own Recover button does: the game books the recovery refund, the
4905
+ * science and the crew's return exactly as it does for a flight recovery. A
4906
+ * vessel on a launch site is one of these. Fails with
4907
+ * `CommandErrorCode.WrongScene` outside the Space Center,
4908
+ * `CommandErrorCode.NotFound` for an id that matches no vessel, and
4909
+ * `CommandErrorCode.NotClearToProceed` for a vessel that is not landed on the
4910
+ * home world, is not tracked as ours, or in a game that does not permit
4911
+ * recovery.
4912
+ *
4913
+ * @category Command arguments
4914
+ */
4915
+ export interface RecoverVesselArgs {
4916
+ /**
4917
+ * The vessel to recover: KSP's `Vessel.id` guid as a string, as
4918
+ * `trackingStation.catalog` and a launch site's `padVesselId` carry it.
4919
+ */
4920
+ vesselId: string;
4921
+ }
4922
+ /**
4113
4923
  * Load a saved craft onto a launch site. The craft is identified by
4114
4924
  * `LaunchArgs.shipName` plus the `LaunchArgs.facility` it was saved from
4115
4925
  * (`"VAB"` or `"SPH"`, case-insensitive); Gonogo finds the `.craft` file
@@ -4155,6 +4965,13 @@ export interface LaunchArgs {
4155
4965
  * on fails when there is no active vessel or the vessel cannot currently be
4156
4966
  * controlled; turning it off is never refused for control reasons.
4157
4967
  *
4968
+ * The override lapses on its own: it stays on for 5 seconds after the last arm
4969
+ * or `vessel.control.holdFlyByWire` reaches the vessel, and is then turned off
4970
+ * as if disarmed. A console that has it armed sends
4971
+ * `vessel.control.holdFlyByWire` regularly. A console that crashes, closes or
4972
+ * loses its connection stops sending, so the vessel does not keep holding the
4973
+ * stick, and a loss of contact lapses it the same way.
4974
+ *
4158
4975
  * @category Command arguments
4159
4976
  */
4160
4977
  export interface SetFlyByWireArgs {
@@ -4214,6 +5031,112 @@ export interface SetControlAxesArgs {
4214
5031
  rollTrim?: number;
4215
5032
  }
4216
5033
  /**
5034
+ * What kind of event the game's alarm clock computes an alarm's time from.
5035
+ *
5036
+ * @category Alarms
5037
+ */
5038
+ export declare enum GameAlarmKind {
5039
+ /** A universal time the player chose, with or without a craft named on it. */
5040
+ Time = 0,
5041
+ /** A transfer window between two bodies, from their orbits alone. */
5042
+ TransferWindow = 1,
5043
+ /** A craft leaving or entering a sphere of influence on its current trajectory. */
5044
+ SoiChange = 2,
5045
+ /** A craft's next apoapsis. */
5046
+ Apoapsis = 3,
5047
+ /** A craft's next periapsis. */
5048
+ Periapsis = 4,
5049
+ /** A craft's next maneuver node. */
5050
+ Maneuver = 5,
5051
+ /** A kind this version of Gonogo does not know, such as one another mod adds. */
5052
+ Other = 6
5053
+ }
5054
+ /**
5055
+ * What the game does to time warp when one of its alarms comes due.
5056
+ *
5057
+ * @category Alarms
5058
+ */
5059
+ export declare enum GameAlarmWarp {
5060
+ /** Leaves time warp alone. */
5061
+ Nothing = 0,
5062
+ /** Stops time warp. */
5063
+ StopWarp = 1,
5064
+ /** Stops time warp and pauses the game. */
5065
+ Pause = 2
5066
+ }
5067
+ /**
5068
+ * One alarm in the game's own alarm clock, as Gonogo shows it.
5069
+ *
5070
+ * An alarm whose time the game works out from a craft's live state (a sphere
5071
+ * of influence change, an apsis, a maneuver node) is a prediction made from
5072
+ * that craft, so it travels like that craft's telemetry: it is on
5073
+ * `alarm.game.craft.<guid>.list`, reaches each command centre one signal delay
5074
+ * after the craft, and stays at its last known state while the craft is out of
5075
+ * contact. Every other alarm is on `alarm.game.list` and reaches every command
5076
+ * centre at once.
5077
+ *
5078
+ * @category Alarms
5079
+ */
5080
+ export interface GameAlarm {
5081
+ /** The game's own id for the alarm, which `alarm.game.delete` takes. */
5082
+ id: number;
5083
+ /** What kind of event the game computes the alarm's time from. */
5084
+ kind: GameAlarmKind;
5085
+ /** The alarm's title as the game shows it. */
5086
+ title: string;
5087
+ /** The universal time the alarm is due. */
5088
+ ut: Value<"ut">;
5089
+ /**
5090
+ * The craft the alarm belongs to, as `"vessel:<guid>"`, or null for an alarm
5091
+ * on no craft.
5092
+ */
5093
+ vessel?: string | null;
5094
+ /**
5095
+ * What the game does to time warp when the alarm comes due. Gonogo does not
5096
+ * act on it.
5097
+ */
5098
+ warp: GameAlarmWarp;
5099
+ /** Whether the alarm has come due. */
5100
+ triggered: boolean;
5101
+ /**
5102
+ * The `ScetAlarm.id` of the Gonogo alarm this game alarm was made for, or null
5103
+ * for an alarm the player made in the game. A row with an id here is the same
5104
+ * alarm as that Gonogo alarm, so show it once.
5105
+ */
5106
+ gonogoId?: string | null;
5107
+ }
5108
+ /**
5109
+ * The game's alarm clock as every command centre sees it at once: the
5110
+ * `alarm.game.list` Topic.
5111
+ *
5112
+ * Holds only the alarms whose time is not worked out from a craft (see
5113
+ * `GameAlarm`).
5114
+ *
5115
+ * @category Alarms
5116
+ */
5117
+ export interface GameAlarmList {
5118
+ /**
5119
+ * Whether the game is running an alarm clock in the current scene. While
5120
+ * false, `GameAlarmList.alarms` is empty and Gonogo's own alarms are not
5121
+ * copied into the game.
5122
+ */
5123
+ available: boolean;
5124
+ /** The alarms, in order of the time they are due. */
5125
+ alarms: GameAlarm[];
5126
+ }
5127
+ /**
5128
+ * Removes one alarm from the game's alarm clock, addressed by `GameAlarm.id`.
5129
+ *
5130
+ * Never delayed: it edits the player's clock and nothing aboard a craft.
5131
+ * Removing an alarm made for a Gonogo alarm removes that Gonogo alarm too.
5132
+ *
5133
+ * @category Command arguments
5134
+ */
5135
+ export interface GameAlarmDeleteArgs {
5136
+ /** The `GameAlarm.id` of the alarm to remove. */
5137
+ id: number;
5138
+ }
5139
+ /**
4217
5140
  * Which KSP expansions ("DLC") are installed. A fact about the install,
4218
5141
  * independent of scene, so a widget can tell "the player has no DLC" from "the
4219
5142
  * DLC is present but nothing is deployed yet" (deployed science, for instance,
@@ -4240,6 +5163,334 @@ export interface GameDlc {
4240
5163
  makingHistory: boolean;
4241
5164
  }
4242
5165
  /**
5166
+ * The windows that a part's menu has opened on the game's screen, each read as
5167
+ * a tree of controls. A window is listed from the moment it is seen open until
5168
+ * it closes.
5169
+ *
5170
+ * @category Parts
5171
+ */
5172
+ export interface GameWindows {
5173
+ /** Every window currently open. Empty when none is. */
5174
+ windows: GameWindow[];
5175
+ }
5176
+ /**
5177
+ * One window a part's menu opened on the game's screen.
5178
+ *
5179
+ * @category Parts
5180
+ */
5181
+ export interface GameWindow {
5182
+ /**
5183
+ * The window's id, passed back as `PressGameWindowControlArgs.windowId`. Valid
5184
+ * only while the window stays open.
5185
+ */
5186
+ id: string;
5187
+ /**
5188
+ * How the game draws the window: `imgui` for an immediate-mode window, `ugui`
5189
+ * for a retained dialog.
5190
+ */
5191
+ technology: string;
5192
+ /** The window's own title, or a dialog's first label. */
5193
+ title: string;
5194
+ /** The part menu button that opened the window. */
5195
+ openedBy: GameWindowOpener;
5196
+ /** The window's controls, as a tree whose root is a group. */
5197
+ root: GameWindowNode;
5198
+ }
5199
+ /**
5200
+ * The part menu button that opened a `GameWindow`.
5201
+ *
5202
+ * @category Parts
5203
+ */
5204
+ export interface GameWindowOpener {
5205
+ /** The part's flight id, as a string. */
5206
+ partId: string;
5207
+ /** The module that owns the button, or `null` for a button on the part itself. */
5208
+ module?: string | null;
5209
+ /** The button's event name. */
5210
+ event: string;
5211
+ /** The button's label as the game shows it. */
5212
+ label: string;
5213
+ /**
5214
+ * The correlation id the sender gave the press that opened the window, or
5215
+ * empty when it gave none.
5216
+ */
5217
+ pressId: string;
5218
+ }
5219
+ /**
5220
+ * One element of a `GameWindow`. `GameWindowNode.kind` says which of the other
5221
+ * fields apply: `group` and `scroll` hold `GameWindowNode.children`, laid out
5222
+ * as `GameWindowNode.dir` says; `label` and `box` show `GameWindowNode.text`;
5223
+ * `button` shows `GameWindowNode.text`; `toggle` and `radio` hold
5224
+ * `GameWindowNode.bool`; `textfield` and `textarea` hold
5225
+ * `GameWindowNode.text`; `slider` holds `GameWindowNode.num` between
5226
+ * `GameWindowNode.min` and `GameWindowNode.max`; `grid` holds the selected
5227
+ * index in `GameWindowNode.num` and its `GameWindowNode.options`.
5228
+ *
5229
+ * @category Parts
5230
+ */
5231
+ export interface GameWindowNode {
5232
+ /**
5233
+ * The element's id within its window, passed back as
5234
+ * `PressGameWindowControlArgs.controlId`.
5235
+ */
5236
+ id: string;
5237
+ /**
5238
+ * What the element is: `group`, `scroll`, `label`, `box`, `button`, `toggle`,
5239
+ * `radio`, `textfield`, `textarea`, `slider` or `grid`.
5240
+ */
5241
+ kind: string;
5242
+ /** The element's text, or `null` where it has none. */
5243
+ text?: string | null;
5244
+ /** Whether a `toggle` is on. */
5245
+ bool?: boolean | null;
5246
+ /** A `slider`'s value, or a `grid`'s selected index. */
5247
+ num?: number | null;
5248
+ /** A `slider`'s lowest value. */
5249
+ min?: number | null;
5250
+ /** A `slider`'s highest value. */
5251
+ max?: number | null;
5252
+ /** How a group lays out its children: `h` or `v`. */
5253
+ dir?: string | null;
5254
+ /**
5255
+ * `false` when the game shows the control greyed out and will not take a
5256
+ * press. Omitted otherwise.
5257
+ */
5258
+ enabled?: boolean | null;
5259
+ /** The element's tooltip in the game, or `null` where it has none. */
5260
+ tooltip?: string | null;
5261
+ /**
5262
+ * The state the game's colouring gives the element: `go`, `nogo` or `warn`.
5263
+ * Omitted when the game draws it uncoloured.
5264
+ */
5265
+ tone?: string | null;
5266
+ /**
5267
+ * How a `toggle` is drawn: `button` when the game draws it as a button.
5268
+ * Omitted for a plain toggle.
5269
+ */
5270
+ variant?: string | null;
5271
+ /**
5272
+ * How many columns a `grid` or a grid-laid `group` draws, or `null` for a
5273
+ * group that is not a grid.
5274
+ */
5275
+ columns?: number | null;
5276
+ /**
5277
+ * The name of the picture a `button`, `toggle` or `label` shows, or `null`
5278
+ * where it has none.
5279
+ */
5280
+ image?: string | null;
5281
+ /** A `grid`'s choices. */
5282
+ options?: string[] | null;
5283
+ /** A group's elements, in the order the window draws them. */
5284
+ children?: GameWindowNode[] | null;
5285
+ }
5286
+ /**
5287
+ * Presses one control of a `GameWindow`. A press rides the signal delay as any
5288
+ * command does, and acts on the window as it is when the press arrives. It
5289
+ * fails with `CommandErrorCode.NotFound`, naming the reason in its detail,
5290
+ * when the window has closed, the control is no longer in it, or the game has
5291
+ * the control greyed out.
5292
+ *
5293
+ * @category Command arguments
5294
+ */
5295
+ export interface PressGameWindowControlArgs {
5296
+ /** The `GameWindow.id` of the window. */
5297
+ windowId: string;
5298
+ /** The `GameWindowNode.id` of the control. */
5299
+ controlId: string;
5300
+ /** The state to set a `toggle` to. */
5301
+ bool?: boolean;
5302
+ /** The value for a `slider`, or the index for a `grid`. */
5303
+ num?: number;
5304
+ /** The text for a `textfield`. */
5305
+ text?: string;
5306
+ }
5307
+ /**
5308
+ * Which screen hosts this game, the code a remote station joins with, and the
5309
+ * remote stations the host has approved. One screen per game hosts: the others
5310
+ * join it, and the game mod is the referee because every local screen on every
5311
+ * machine reaches it.
5312
+ *
5313
+ * A screen asks for the role with `host.claim` and keeps it by sending
5314
+ * `host.heartbeat`. Whether the screen reading this holds the role is not on
5315
+ * this Topic, since every screen reads the same value: a screen compares
5316
+ * `HostRecordModel.holderId` with the `HostRoleReply.holderId` its own claim
5317
+ * was answered with.
5318
+ *
5319
+ * Never delayed by signal delay: it describes the screens in front of the
5320
+ * operator, not a craft. Neither a screen's token nor a station's credential
5321
+ * is ever on it, only ids that name them.
5322
+ *
5323
+ * @category Hosting
5324
+ * @categoryDescription Hosting
5325
+ * The record of which screen hosts a game, with the commands that claim, keep
5326
+ * and give up the role and the ones that manage the join code and the approved
5327
+ * remote stations.
5328
+ */
5329
+ export interface HostRecordModel {
5330
+ /**
5331
+ * Whether a screen holds the role now, including one whose connection has
5332
+ * closed and whose grace has not run out.
5333
+ */
5334
+ held: boolean;
5335
+ /**
5336
+ * True while the holder's connection is closed and the role is kept for it to
5337
+ * come back, as a page reload does. A screen that claims the role in this time
5338
+ * is granted it. The role is freed when the grace ends.
5339
+ */
5340
+ holderAway: boolean;
5341
+ /**
5342
+ * The id of the screen that holds the role, or an empty string when nobody
5343
+ * does.
5344
+ */
5345
+ holderId: string;
5346
+ /**
5347
+ * The code a remote station enters to join the host: six characters from the
5348
+ * letters and digits that cannot be mistaken for one another. It stays the
5349
+ * same until `host.code.regenerate` changes it, whichever screen hosts.
5350
+ */
5351
+ code: string;
5352
+ /** The remote stations the host has approved, oldest first. */
5353
+ stations: ApprovedStationState[];
5354
+ }
5355
+ /**
5356
+ * One remote station the host has approved.
5357
+ *
5358
+ * @category Hosting
5359
+ */
5360
+ export interface ApprovedStationState {
5361
+ /**
5362
+ * An id that names the station without revealing its credential. It is what
5363
+ * `host.station.revoke` takes.
5364
+ */
5365
+ id: string;
5366
+ /** The name the station reported when it was approved. */
5367
+ name: string;
5368
+ /** When the station was first approved, in Unix milliseconds. */
5369
+ approvedAt: Value<"count">;
5370
+ }
5371
+ /**
5372
+ * The answer to `host.claim` and `host.heartbeat`: whether the screen that
5373
+ * sent it holds the role, and who does. A refused claim is an ordinary answer
5374
+ * with `HostRoleReply.holds` false, not a failed command.
5375
+ *
5376
+ * A screen that sent a heartbeat and reads `HostRoleReply.holds` false has
5377
+ * lost the role, having been cut off for longer than the grace while another
5378
+ * screen took over, and stops hosting at once.
5379
+ *
5380
+ * @category Command results
5381
+ */
5382
+ export interface HostRoleReply {
5383
+ /** Whether the screen that sent the command holds the role now. */
5384
+ holds: boolean;
5385
+ /**
5386
+ * The id of the screen that holds the role, or an empty string when nobody
5387
+ * does. Matches `HostRecordModel.holderId`.
5388
+ */
5389
+ holderId: string;
5390
+ /** How often the holder is asked to send a heartbeat. */
5391
+ heartbeatSeconds: Value<"s">;
5392
+ /**
5393
+ * How long after its last heartbeat or the close of its connection a holder
5394
+ * keeps the role before it is freed.
5395
+ */
5396
+ graceSeconds: Value<"s">;
5397
+ /**
5398
+ * How many times the role has been granted, counting the grant this answer
5399
+ * reports when `HostRoleReply.holds` is true. It rises by one on each
5400
+ * `host.claim` that grants the role, including to the holder returning after a
5401
+ * reload, never on a heartbeat, and keeps rising across a game restart. A
5402
+ * screen hosting a remote station reads it to tell the newest host from an
5403
+ * older one that is still answering.
5404
+ */
5405
+ generation: Value<"count">;
5406
+ }
5407
+ /**
5408
+ * The answer to `host.station.check`: whether a station's credential is one
5409
+ * the host approved.
5410
+ *
5411
+ * @category Command results
5412
+ */
5413
+ export interface HostStationCheckReply {
5414
+ /** Whether the credential belongs to an approved station. */
5415
+ approved: boolean;
5416
+ /** The station's id, or an empty string when it is not approved. */
5417
+ stationId: string;
5418
+ /**
5419
+ * The name the station was approved under, or an empty string when it is not
5420
+ * approved.
5421
+ */
5422
+ name: string;
5423
+ }
5424
+ /**
5425
+ * Take or keep the host role, keep it, give it up, or mint a new join code.
5426
+ * Arguments to `host.claim`, `host.heartbeat`, `host.release` and
5427
+ * `host.code.regenerate`: the token the screen keeps for itself.
5428
+ *
5429
+ * The token is one per browser tab. It survives a reload and is not copied by
5430
+ * a duplicated tab, so the mod can tell a reload, which takes the role
5431
+ * straight back inside the grace, from a second tab, which is refused. It is a
5432
+ * secret between the tab and the mod and is never published.
5433
+ *
5434
+ * `host.claim` and `host.heartbeat` answer with a `HostRoleReply`.
5435
+ * `host.release` frees the role at once and `host.code.regenerate` replaces
5436
+ * the join code; both are refused for a token that does not hold the role.
5437
+ * Never delayed by signal delay.
5438
+ *
5439
+ * @category Command arguments
5440
+ */
5441
+ export interface HostTokenArgs {
5442
+ /** The token the screen keeps for itself. */
5443
+ token: string;
5444
+ }
5445
+ /**
5446
+ * Approve a remote station by the credential it presents. Arguments to
5447
+ * `host.station.approve`: the holder's token, and the station's credential and
5448
+ * name. Approving a credential already approved renames the station. Refused
5449
+ * for a token that does not hold the role. Never delayed by signal delay.
5450
+ *
5451
+ * @category Command arguments
5452
+ */
5453
+ export interface HostApproveStationArgs {
5454
+ /** The token of the screen that holds the role. */
5455
+ token: string;
5456
+ /**
5457
+ * The secret the station presents to the host. It is stored by the mod and
5458
+ * never published.
5459
+ */
5460
+ credential: string;
5461
+ /** The name to show for the station. */
5462
+ name: string;
5463
+ }
5464
+ /**
5465
+ * Revoke an approved remote station. Arguments to `host.station.revoke`: the
5466
+ * holder's token and the id of the station, from `ApprovedStationState.id`.
5467
+ * Refused for a token that does not hold the role. Never delayed by signal
5468
+ * delay.
5469
+ *
5470
+ * @category Command arguments
5471
+ */
5472
+ export interface HostRevokeStationArgs {
5473
+ /** The token of the screen that holds the role. */
5474
+ token: string;
5475
+ /** The station's id from `ApprovedStationState.id`. */
5476
+ stationId: string;
5477
+ }
5478
+ /**
5479
+ * Ask whether a credential is one the host approved. Arguments to
5480
+ * `host.station.check`, answered with a `HostStationCheckReply`: the holder's
5481
+ * token and the credential a station presented. The host calls it when a
5482
+ * remote station connects, since the credentials are not published. Refused
5483
+ * for a token that does not hold the role. Never delayed by signal delay.
5484
+ *
5485
+ * @category Command arguments
5486
+ */
5487
+ export interface HostCheckStationArgs {
5488
+ /** The token of the screen that holds the role. */
5489
+ token: string;
5490
+ /** The credential the station presented. */
5491
+ credential: string;
5492
+ }
5493
+ /**
4243
5494
  * One drill (resource harvester) on the active vessel. The field set is what
4244
5495
  * every ISRU model shares, which is exactly what stock ISRU has: resource,
4245
5496
  * abundance, rate, deploy and running, plus the two identification fields.
@@ -4260,6 +5511,26 @@ export interface IsruDrillEntry {
4260
5511
  /** Part.partInfo.title, for display without a vessel.parts join. */
4261
5512
  partTitle?: string | null;
4262
5513
  /**
5514
+ * The drill's own name on its part, which tells two on one part apart: the
5515
+ * `converterName` a `vessel.converter.start` or `vessel.converter.stop`
5516
+ * command names. Empty when the part's module carries no name.
5517
+ */
5518
+ converterName?: string | null;
5519
+ /**
5520
+ * The share of its recipe this drill achieved on its last tick, 0..1, as the
5521
+ * game's own efficiency figure reports it. Zero means it is switched on and
5522
+ * cannot run, for example because an input is missing; the nominal rates
5523
+ * alongside are then not being produced or consumed. Null when it is not
5524
+ * running, or when the backend does not report it.
5525
+ */
5526
+ throughput?: Value<"ratio"> | null;
5527
+ /**
5528
+ * The game's own words for why a running drill achieved nothing (for example
5529
+ * "missing Liquid Fuel"). Null whenever `IsruDrillEntry.throughput` is not
5530
+ * zero, and when the backend has no wording for it.
5531
+ */
5532
+ shortfall?: string | null;
5533
+ /**
4263
5534
  * Resource this drill extracts (e.g. "Ore"). Free text, not a closed enum:
4264
5535
  * whatever the running install's configs and profiles name, as with every
4265
5536
  * resource name in this contract.
@@ -4334,6 +5605,27 @@ export interface IsruConverterEntry {
4334
5605
  partId?: string | null;
4335
5606
  /** Part.partInfo.title, for display without a vessel.parts join. */
4336
5607
  partTitle?: string | null;
5608
+ /**
5609
+ * The converter's own name on its part, which tells two on one part apart: the
5610
+ * `converterName` a `vessel.converter.start` or `vessel.converter.stop`
5611
+ * command names. Empty when the part's module carries no name.
5612
+ */
5613
+ converterName?: string | null;
5614
+ /**
5615
+ * The share of its recipe this converter achieved on its last tick, 0..1, as
5616
+ * the game's own efficiency figure reports it. Zero means it is switched on
5617
+ * and cannot run, for example because an input is missing; the nominal rates
5618
+ * alongside are then not being produced or consumed. Null when it is not
5619
+ * running, or when the backend does not report it.
5620
+ */
5621
+ throughput?: Value<"ratio"> | null;
5622
+ /**
5623
+ * The game's own words for why a running converter achieved nothing (for
5624
+ * example "missing Liquid Fuel"). Null whenever
5625
+ * `IsruConverterEntry.throughput` is not zero, and when the backend has no
5626
+ * wording for it.
5627
+ */
5628
+ shortfall?: string | null;
4337
5629
  /** Actively converting this tick. */
4338
5630
  running?: boolean | null;
4339
5631
  /**
@@ -4392,6 +5684,21 @@ export declare enum KspParameterState {
4392
5684
  Failed = 2
4393
5685
  }
4394
5686
  /**
5687
+ * KSP's contract prestige tier: how demanding a contract is, which the game
5688
+ * shows as the difficulty of an offer. Carried as the prestige ordinal of each
5689
+ * contract on the career status, beside the prestige name.
5690
+ *
5691
+ * @category Career
5692
+ */
5693
+ export declare enum KspContractPrestige {
5694
+ /** An easy contract, the first tier of difficulty. */
5695
+ Trivial = 0,
5696
+ /** A contract of middling difficulty. */
5697
+ Significant = 1,
5698
+ /** The hardest contract tier. */
5699
+ Exceptional = 2
5700
+ }
5701
+ /**
4395
5702
  * KSP's `PartCategories`: the editor category a part filters into. Behind
4396
5703
  * `vessel.parts[].categoryOrdinal`, beside the name in `VesselPart.category`.
4397
5704
  *
@@ -4577,6 +5884,22 @@ export declare enum KspResourceFlowMode {
4577
5884
  NULL = 8
4578
5885
  }
4579
5886
  /**
5887
+ * KSP's `PartResource.FlowMode`: which way a single tank lets a resource move.
5888
+ * Behind `vessel.parts` tank rows.
5889
+ *
5890
+ * @category Parts
5891
+ */
5892
+ export declare enum KspTankFlowMode {
5893
+ /** The tank neither gives nor takes. */
5894
+ None = 0,
5895
+ /** The tank only gives. */
5896
+ Out = 1,
5897
+ /** The tank only takes. */
5898
+ In = 2,
5899
+ /** The tank gives and takes. */
5900
+ Both = 3
5901
+ }
5902
+ /**
4580
5903
  * Ask for the mod's most recent log lines. Args for `system.log.recent`: how
4581
5904
  * many of the newest `[Gonogo]` lines the game logged to `KSP.log` to return,
4582
5905
  * so a bug report can carry them. Lines are returned with file paths, IP
@@ -4846,8 +6169,8 @@ export interface MissionObjectiveEntry {
4846
6169
  *
4847
6170
  * @category Missions
4848
6171
  * @categoryDescription Missions
4849
- * A Making History mission in the current game: whether one is running and how
4850
- * far each of its objectives has got.
6172
+ * A mission of KSP's Making History expansion in the current game: whether one
6173
+ * is running and how far each of its objectives has got.
4851
6174
  */
4852
6175
  export interface MissionStatus {
4853
6176
  /** The mission's title, localised. */
@@ -4951,6 +6274,23 @@ export interface ModSettingRow {
4951
6274
  value?: string | null;
4952
6275
  /** Why the value cannot be read right now, or null when it was. */
4953
6276
  unavailable?: string | null;
6277
+ /**
6278
+ * The tags the Uplink gave the setting, such as `setup` for one offered among
6279
+ * the first-run setup's recommended settings. Empty for none; a client ignores
6280
+ * a tag it does not know.
6281
+ */
6282
+ tags: string[];
6283
+ /**
6284
+ * The name of the Uplink holding the value where it is, or null when nothing
6285
+ * locks it. A locked setting cannot be changed, and `settings.mod.write`
6286
+ * refuses it.
6287
+ */
6288
+ lockedBy?: string | null;
6289
+ /**
6290
+ * Why `ModSettingRow.lockedBy` holds the value, for the operator. Null when
6291
+ * nothing locks it.
6292
+ */
6293
+ lockReason?: string | null;
4954
6294
  }
4955
6295
  /**
4956
6296
  * Arguments to `settings.mod.write`: change one of a host mod's own settings
@@ -4975,11 +6315,12 @@ export interface WriteModSettingArgs {
4975
6315
  value: string;
4976
6316
  }
4977
6317
  /**
4978
- * Take no args: stage, clear the target, recover, revert to launch, or go to
4979
- * the Tracking Station or Space Center. The empty args shape, for the core
4980
- * commands that operate on the current flight or the active vessel and so take
4981
- * nothing: `vessel.control.stage`, `vessel.target.clear`, `ksp.recover`,
4982
- * `ksp.revertToLaunch`, `ksp.toTrackingStation` and `ksp.toSpaceCenter`.
6318
+ * Take no args: stage, clear the target, hold fly-by-wire, recover, revert to
6319
+ * launch, or go to the Tracking Station or Space Center. The empty args shape,
6320
+ * for the core commands that operate on the current flight or the active
6321
+ * vessel and so take nothing: `vessel.control.stage`, `vessel.target.clear`,
6322
+ * `vessel.control.holdFlyByWire`, `ksp.recover`, `ksp.revertToLaunch`,
6323
+ * `ksp.toTrackingStation` and `ksp.toSpaceCenter`.
4983
6324
  *
4984
6325
  * Takes no arguments: send `args: {}`. Anything sent in `args` is ignored.
4985
6326
  *
@@ -5228,6 +6569,11 @@ export interface PartActionEntry {
5228
6569
  * partially crewed or probe-limited state) to fire.
5229
6570
  */
5230
6571
  requireFullControl: boolean;
6572
+ /**
6573
+ * The button can be pressed from a console but opens a window on the game's
6574
+ * own screen, without locking the craft.
6575
+ */
6576
+ opensGameWindow: boolean;
5231
6577
  }
5232
6578
  /**
5233
6579
  * The payload of one `vessel.partActions.<flightId>` channel: the PAW buttons
@@ -5264,12 +6610,120 @@ export interface PartActions {
5264
6610
  */
5265
6611
  actions: PartActionEntry[];
5266
6612
  /**
6613
+ * The part's buttons that only someone at the game's own screen can finish.
6614
+ * They cannot be pressed from a console and `vessel.invokePartAction` refuses
6615
+ * them, so draw them disabled. Always present, possibly empty.
6616
+ */
6617
+ gameWindows: PartActionEntry[];
6618
+ /**
5267
6619
  * Payload provenance. `Source` is `"vessel:<guid>"` for the active vessel, or
5268
6620
  * `""` when no vessel id was known.
5269
6621
  */
5270
6622
  meta: PayloadMeta;
5271
6623
  }
5272
6624
  /**
6625
+ * The 3D shape of one kind of part on `parts.shape.<key>`: its model's meshes,
6626
+ * each reduced to a few hundred triangles, in the part's own frame. The key is
6627
+ * a part row's `VesselPart.shape`, so a diagram of a craft subscribes once per
6628
+ * kind of part it holds rather than once per part. The meshes are those of the
6629
+ * part as built, at rest, with the meshes its variant leaves out already gone;
6630
+ * `VesselPart.shapePoses` says where a moving mesh stands now and which meshes
6631
+ * a part is not drawing.
6632
+ *
6633
+ * Every mesh keeps its loose pieces apart, so a gap in the real model is a gap
6634
+ * in the shape, and an outline drawn from any side follows the model's own.
6635
+ * Published while something subscribes to the key's topic, and the same for
6636
+ * every craft in the game, so it never changes while the game runs and arrives
6637
+ * at once with no signal delay.
6638
+ *
6639
+ * @category Parts
6640
+ */
6641
+ export interface PartShape {
6642
+ /** `AvailablePart.name`, the part's config id, as on `VesselPart.name`. */
6643
+ name: string;
6644
+ /**
6645
+ * The part variant this shape is drawn for, or `null` for a part with no
6646
+ * variants.
6647
+ */
6648
+ variant?: string | null;
6649
+ /**
6650
+ * Every mesh of the part's model, in model order. Empty for a part whose model
6651
+ * has no mesh.
6652
+ */
6653
+ meshes: PartShapeMesh[];
6654
+ }
6655
+ /**
6656
+ * One mesh of a `PartShape` as a small indexed triangle list in the part's own
6657
+ * frame.
6658
+ *
6659
+ * To read the points: decode `PartShapeMesh.positions` from base64 into
6660
+ * unsigned 16-bit little-endian integers, three per point (x, y, z); each
6661
+ * value `q` stands for `min + q / 65535 × (max − min)` on its axis, with
6662
+ * `PartShapeMesh.min` and `PartShapeMesh.max`. Decode `PartShapeMesh.indices`
6663
+ * the same way into unsigned 16-bit integers, three per triangle, each an
6664
+ * index into those points.
6665
+ *
6666
+ * @category Parts
6667
+ */
6668
+ export interface PartShapeMesh {
6669
+ /**
6670
+ * The mesh's name within its part: the path of transform names from the part's
6671
+ * model down to the mesh, joined by `/`, with `#2`, `#3` and so on after a
6672
+ * name that an earlier sibling already has. The same mesh on every part of
6673
+ * this kind has the same key, and `PartShapePose.mesh` names a mesh by it.
6674
+ */
6675
+ key: string;
6676
+ /**
6677
+ * Whether the part as built draws this mesh. A mesh it hides, such as an
6678
+ * engine's shroud with nothing mounted below, is still here, so a part that
6679
+ * later shows it can draw it.
6680
+ */
6681
+ shown: boolean;
6682
+ /** The low corner of the box the points are packed into (metres, part-local). */
6683
+ min: Vec3Of<"m">;
6684
+ /**
6685
+ * The high corner of the box the points are packed into (metres, part-local).
6686
+ * Equal to `PartShapeMesh.min` on an axis the mesh is flat along.
6687
+ */
6688
+ max: Vec3Of<"m">;
6689
+ /**
6690
+ * The points, base64 of unsigned 16-bit little-endian integers, three per
6691
+ * point, packed into the box from `PartShapeMesh.min` to `PartShapeMesh.max`.
6692
+ */
6693
+ positions: string;
6694
+ /**
6695
+ * The triangles, base64 of unsigned 16-bit little-endian point indices, three
6696
+ * per triangle. Empty for a mesh with no triangles.
6697
+ */
6698
+ indices: string;
6699
+ /**
6700
+ * How many triangles the mesh has in the game, before it was reduced for the
6701
+ * wire.
6702
+ */
6703
+ sourceTriangles: Value<"count">;
6704
+ }
6705
+ /**
6706
+ * Where one mesh of a part stands now, when it is not as its `PartShape` has
6707
+ * it: a landing leg folded out, a bay door open, a gimballing nozzle turned,
6708
+ * or a mesh the part has switched off or on.
6709
+ *
6710
+ * @category Parts
6711
+ */
6712
+ export interface PartShapePose {
6713
+ /** The mesh, by its `PartShapeMesh.key`. */
6714
+ mesh: string;
6715
+ /** Whether the part draws the mesh now. */
6716
+ shown: boolean;
6717
+ /**
6718
+ * The 3 by 4 matrix, row by row (twelve numbers), that carries the mesh's
6719
+ * points from where `PartShape` has them to where they stand now, both in the
6720
+ * part's own frame: a point `p` moves to `(m0·x + m1·y + m2·z + m3, m4·x +
6721
+ * m5·y + m6·z + m7, m8·x + m9·y + m10·z + m11)`. `null` when the mesh has not
6722
+ * moved.
6723
+ */
6724
+ transform?: Value<"1">[] | null;
6725
+ }
6726
+ /**
5273
6727
  * The active vessel's rolled-up electric-charge production. A single object,
5274
6728
  * or `null` when there is no active vessel or it carries no solar panel,
5275
6729
  * battery, electric-charge converter or alternator. The parts themselves are
@@ -5284,6 +6738,29 @@ export interface PartsPower {
5284
6738
  * are not included. Null when no finite total could be read.
5285
6739
  */
5286
6740
  totalProductionEc?: Value<"units/s"> | null;
6741
+ /**
6742
+ * How fast the vessel's stored electric charge is changing, in EC per second:
6743
+ * negative while the batteries drain, positive while they charge. Measured
6744
+ * from the stored amount over the last ten seconds of game time, so it
6745
+ * includes every draw and every source whatever reports it. Null while it
6746
+ * cannot be known: with the batteries full or empty the stored amount does not
6747
+ * move, and for ten seconds after leaving either, after a change of vessel, a
6748
+ * staging or docking, or a revert. Null is not zero.
6749
+ */
6750
+ netChargeRateEc?: Value<"units/s"> | null;
6751
+ /**
6752
+ * The vessel's total electric-charge draw in EC per second, as a positive
6753
+ * figure: what the itemised producers on `vessel.parts` add, less
6754
+ * `PartsPower.netChargeRateEc`. It counts draw the parts do not itemise. Null
6755
+ * whenever `PartsPower.netChargeRateEc` is null.
6756
+ */
6757
+ totalConsumptionEc?: Value<"units/s"> | null;
6758
+ /**
6759
+ * The part of `PartsPower.totalConsumptionEc` that no part on `vessel.parts`
6760
+ * reports a draw for, in EC per second: the total less the itemised consumers,
6761
+ * never below zero. Null whenever `PartsPower.netChargeRateEc` is null.
6762
+ */
6763
+ unattributedConsumptionEc?: Value<"units/s"> | null;
5287
6764
  }
5288
6765
  /**
5289
6766
  * One entry in the `robotics.servos` Topic payload, a single Breaking Ground
@@ -5384,34 +6861,185 @@ export interface ServoEntry {
5384
6861
  * kN is the unit KSP's editor shows for it, although the value acts as a
5385
6862
  * torque on the rotor's joint.
5386
6863
  */
5387
- maxTorque?: Value<"kN"> | null;
6864
+ maxTorque?: Value<"kN"> | null;
6865
+ }
6866
+ /**
6867
+ * A single object (or `null` when there is no active vessel) whose one field
6868
+ * states whether the active vessel carries any Breaking Ground robotic servo.
6869
+ * It is its own Topic because the `robotics.servos` array is `null` both when
6870
+ * the vessel has no robotic parts and when there is no vessel, and a widget
6871
+ * needs to tell "no robotics on this craft" from "nothing to show".
6872
+ *
6873
+ * Not the same as the Breaking Ground DLC-presence fact
6874
+ * (`deployed.available`): this reflects parts on this vessel, so it is delayed
6875
+ * by signal delay, whereas DLC presence is known on the ground at once.
6876
+ *
6877
+ * `RoboticsAvailability.available` is three-state. `null` means the craft
6878
+ * could not be surveyed: a recording that does not carry this field, or a live
6879
+ * read where one part could not be read, since "no robotic parts" is a claim
6880
+ * about every part. `false` is the definite "this craft carries none". A
6881
+ * client that treats null as false tells the operator there are no robotic
6882
+ * parts on a craft that may be full of them.
6883
+ *
6884
+ * @category Parts
6885
+ */
6886
+ export interface RoboticsAvailability {
6887
+ /**
6888
+ * True when the vessel carries at least one robotic servo, false when it
6889
+ * definitely carries none, null when it could not be surveyed.
6890
+ */
6891
+ available?: boolean | null;
6892
+ }
6893
+ /**
6894
+ * One planted flag, on the `surface.sites` Topic: the named site a kerbal has
6895
+ * claimed on the surface of a body. The payload is a bare array with one entry
6896
+ * per flag in the save, empty when none is planted, and it is delayed like the
6897
+ * vessel it is recorded from, so a flag appears at a command centre only once
6898
+ * the word of it has had time to reach it.
6899
+ *
6900
+ * A flag has no radio and is not on `trackingStation.catalog`.
6901
+ *
6902
+ * @category Surface
6903
+ */
6904
+ export interface PlantedFlag {
6905
+ /** The flag's own vessel id. */
6906
+ siteId?: string | null;
6907
+ /** The name the kerbal gave the site. */
6908
+ name?: string | null;
6909
+ /** The name of the body the flag stands on. */
6910
+ body?: string | null;
6911
+ /** Body-fixed latitude of the flag in degrees. */
6912
+ latitude?: Value<"°"> | null;
6913
+ /** Body-fixed longitude of the flag in degrees, wrapped to (-180, 180]. */
6914
+ longitude?: Value<"°"> | null;
6915
+ /** Universal Time the flag was planted. Null when it could not be read. */
6916
+ plantedAt?: Value<"ut"> | null;
6917
+ /**
6918
+ * The name of the kerbal who planted it. Null when the flag's module could not
6919
+ * be read, live or saved.
6920
+ */
6921
+ plantedBy?: string | null;
6922
+ /**
6923
+ * The text on the site's plaque. Null when the flag's module could not be
6924
+ * read, live or saved, and empty when it has none.
6925
+ */
6926
+ plaque?: string | null;
6927
+ }
6928
+ /**
6929
+ * The path a craft follows from a given state, or why there is none. Useful
6930
+ * for drawing where a craft is going from what a command centre last heard.
6931
+ *
6932
+ * Branch on `PropagatedPath.solved`. `PropagatedPath.kind` says whether the
6933
+ * points are a conic or an integrated path, and `PropagatedPath.reachedUt`
6934
+ * says how far they go, which can be short of the instant asked for.
6935
+ *
6936
+ * @category Orbits and trajectories
6937
+ */
6938
+ export interface PropagatedPath {
6939
+ /**
6940
+ * True when `PropagatedPath.states` holds a path; false when
6941
+ * `PropagatedPath.refusal` says why it does not.
6942
+ */
6943
+ solved: boolean;
6944
+ /**
6945
+ * What the points are: `TrajectoryKind.Analytic` for a conic,
6946
+ * `TrajectoryKind.Integrated` for an integrated path.
6947
+ * `TrajectoryKind.Unspecified` on a refusal.
6948
+ */
6949
+ kind: TrajectoryKind;
6950
+ /** The body the points are relative to, by its propagation index. */
6951
+ centreBodyIndex: number;
6952
+ /**
6953
+ * The points in ascending time, first at the seed's instant. Empty on a
6954
+ * refusal.
6955
+ */
6956
+ states: BodyState[];
6957
+ /** The instant the last point is at. Null on a refusal. */
6958
+ reachedUt?: Value<"ut"> | null;
6959
+ /** Why there is no path, as a sentence. Null when there is one. */
6960
+ refusal?: string | null;
6961
+ /**
6962
+ * True when there is no path yet but asking again shortly will find one,
6963
+ * because the provider is still working on it. Keep drawing what you have.
6964
+ * False on every other refusal and on a path.
6965
+ */
6966
+ stillWorking: boolean;
6967
+ /**
6968
+ * A path carrying no points.
6969
+ *
6970
+ * @param why Why there is none, as a sentence.
6971
+ */
6972
+ Refused(why: string): PropagatedPath;
6973
+ /**
6974
+ * No path yet, and asking again shortly will find one.
6975
+ *
6976
+ * @param why What it is waiting on, as a sentence.
6977
+ */
6978
+ Working(why: string): PropagatedPath;
6979
+ }
6980
+ /**
6981
+ * Args for `vessel.trajectory.fromLastKnown`: where the active craft goes from
6982
+ * the state this command centre last heard.
6983
+ *
6984
+ * There is no field for the seed or the command centre: both come from the
6985
+ * connection the command arrives on, so a client cannot start a path from
6986
+ * anything that centre has not been told.
6987
+ *
6988
+ * @category Command arguments
6989
+ */
6990
+ export interface LastKnownPathRequest {
6991
+ /**
6992
+ * Where to stop. May be past the centre's own view of the craft, which is what
6993
+ * a prediction is for.
6994
+ */
6995
+ toUt: Value<"ut">;
6996
+ /** The most points to return. Zero takes the default. */
6997
+ maxPoints: Value<"count">;
6998
+ /**
6999
+ * Whether the analytic answer will do: only
7000
+ * `PropagationCertification.Unbounded` accepts it. Every other value, the
7001
+ * default `PropagationCertification.Unspecified` included, asks for the
7002
+ * accurate answer, which a provider that integrates gives by integrating, or
7003
+ * refuses.
7004
+ */
7005
+ certification: PropagationCertification;
5388
7006
  }
5389
7007
  /**
5390
- * A single object (or `null` when there is no active vessel) whose one field
5391
- * states whether the active vessel carries any Breaking Ground robotic servo.
5392
- * It is its own Topic because the `robotics.servos` array is `null` both when
5393
- * the vessel has no robotic parts and when there is no vessel, and a widget
5394
- * needs to tell "no robotics on this craft" from "nothing to show".
5395
- *
5396
- * Not the same as the Breaking Ground DLC-presence fact
5397
- * (`deployed.available`): this reflects parts on this vessel, so it is delayed
5398
- * by signal delay, whereas DLC presence is known on the ground at once.
5399
- *
5400
- * `RoboticsAvailability.available` is three-state. `null` means the craft
5401
- * could not be surveyed: a recording that does not carry this field, or a live
5402
- * read where one part could not be read, since "no robotic parts" is a claim
5403
- * about every part. `false` is the definite "this craft carries none". A
5404
- * client that treats null as false tells the operator there are no robotic
5405
- * parts on a craft that may be full of them.
7008
+ * The `vessel.trajectory.fromLastKnown` result: the path from what the asking
7009
+ * command centre last heard, or why there is none. Read
7010
+ * `LastKnownPathReply.seededAtUt` with the path: it is only as current as the
7011
+ * state it started from.
5406
7012
  *
5407
- * @category Parts
7013
+ * @category Orbits and trajectories
5408
7014
  */
5409
- export interface RoboticsAvailability {
7015
+ export interface LastKnownPathReply {
5410
7016
  /**
5411
- * True when the vessel carries at least one robotic servo, false when it
5412
- * definitely carries none, null when it could not be surveyed.
7017
+ * True when `LastKnownPathReply.path` holds a path; false when
7018
+ * `LastKnownPathReply.refusal` says why it does not.
5413
7019
  */
5414
- available?: boolean | null;
7020
+ solved: boolean;
7021
+ /** The path. Null on a refusal. */
7022
+ path?: PropagatedPath | null;
7023
+ /** The instant the starting state was true. Null on a refusal. */
7024
+ seededAtUt?: Value<"ut"> | null;
7025
+ /**
7026
+ * The command centre whose view this came from, so a client that switched
7027
+ * centre can tell whose answer it holds. Null on a refusal.
7028
+ */
7029
+ vantage?: string | null;
7030
+ /** Why there is no path, as a sentence. Null when there is one. */
7031
+ refusal?: string | null;
7032
+ /**
7033
+ * True when there is no path yet but asking again shortly will find one. Keep
7034
+ * drawing what you have. False on every other refusal and on a path.
7035
+ */
7036
+ stillWorking: boolean;
7037
+ /**
7038
+ * A reply carrying no path.
7039
+ *
7040
+ * @param why Why there is none, as a sentence.
7041
+ */
7042
+ Refused(why: string): LastKnownPathReply;
5415
7043
  }
5416
7044
  /**
5417
7045
  * The payload for the `recovery.lastSummary` channel: the most recent vessel
@@ -5503,6 +7131,35 @@ export interface RecoveryReport {
5503
7131
  * the dialog could not be read.
5504
7132
  */
5505
7133
  crewBreakdown: RecoveryCrewEntry[];
7134
+ /**
7135
+ * What else the recovery paid, by name: each progress milestone or contract
7136
+ * reward the game awarded while the recovery was being processed. Not part of
7137
+ * `RecoveryReport.fundsEarned`, `RecoveryReport.reputationEarned` or
7138
+ * `RecoveryReport.scienceEarned`, which are the dialog's own figures for the
7139
+ * recovered craft, so a balance rises by those plus these. Empty when nothing
7140
+ * else paid.
7141
+ */
7142
+ awards: RecoveryAward[];
7143
+ }
7144
+ /**
7145
+ * One award paid while a recovery was processed: an entry of
7146
+ * `RecoveryReport.awards`. Each figure is null when this award paid none of
7147
+ * that currency.
7148
+ *
7149
+ * @category Flights
7150
+ */
7151
+ export interface RecoveryAward {
7152
+ /**
7153
+ * What paid: the progress milestone the game reached (e.g. `"Recovery"`), or
7154
+ * `"Contract reward"`.
7155
+ */
7156
+ title: string;
7157
+ /** Funds this award paid. */
7158
+ fundsEarned?: Value<"funds"> | null;
7159
+ /** Reputation this award paid. */
7160
+ reputationEarned?: Value<"rep"> | null;
7161
+ /** Science this award paid. */
7162
+ scienceEarned?: Value<"science"> | null;
5506
7163
  }
5507
7164
  /**
5508
7165
  * One science subject recovered: an entry of
@@ -5517,8 +7174,12 @@ export interface RecoveryScienceEntry {
5517
7174
  subjectTitle: string;
5518
7175
  /** How much data was recovered for this subject. */
5519
7176
  dataGathered: Value<"Mit">;
5520
- /** Science earned for this subject by this recovery. */
5521
- scienceAmount: Value<"science">;
7177
+ /**
7178
+ * Science earned for this subject by this recovery. Null in a save with no
7179
+ * science (Sandbox), where the subject is still listed with its
7180
+ * `RecoveryScienceEntry.dataGathered`.
7181
+ */
7182
+ scienceAmount?: Value<"science"> | null;
5522
7183
  }
5523
7184
  /**
5524
7185
  * One recovered-part group: an entry of `RecoveryReport.partBreakdown`. Parts
@@ -5616,6 +7277,191 @@ export interface RecoveryRecent {
5616
7277
  recent: boolean;
5617
7278
  }
5618
7279
  /**
7280
+ * Start moving one resource between tanks of the active vessel
7281
+ * (`vessel.resource.transfer.start`), at the pace of the game's own transfer:
7282
+ * each destination fills at a twentieth of its capacity per second of game
7283
+ * time. Tanks are named by part flight id, the same id `vessel.parts` carries.
7284
+ *
7285
+ * Set exactly one of `ResourceTransferStartArgs.untilFull` or
7286
+ * `ResourceTransferStartArgs.amount`. `ResourceTransferStartArgs.fromPartIds`
7287
+ * and `ResourceTransferStartArgs.toPartIds` must both be non-empty and share
7288
+ * no part, or the command fails with `CommandErrorCode.Range`. A tank that
7289
+ * cannot take part, out of `vessel.transferReach` for example, fails with
7290
+ * `CommandErrorCode.CapabilityMismatch`; a tank already in a running transfer
7291
+ * of the resource fails with `CommandErrorCode.WrongState`.
7292
+ *
7293
+ * @category Command arguments
7294
+ */
7295
+ export interface ResourceTransferStartArgs {
7296
+ /** The resource's name, as the keys of `vessel.parts` resources give it. */
7297
+ resource: string;
7298
+ /** The tanks to draw from, as part flight ids. */
7299
+ fromPartIds: string[];
7300
+ /** The tanks to fill, as part flight ids. */
7301
+ toPartIds: string[];
7302
+ /** Run until the destinations are full or the sources are empty. */
7303
+ untilFull: boolean;
7304
+ /**
7305
+ * The amount to move. Required when `ResourceTransferStartArgs.untilFull` is
7306
+ * false, refused when it is true.
7307
+ */
7308
+ amount?: number;
7309
+ }
7310
+ /**
7311
+ * What `vessel.resource.transfer.start` answers with.
7312
+ *
7313
+ * @category Command arguments
7314
+ */
7315
+ export interface ResourceTransferStarted {
7316
+ /** The new transfer's `ResourceTransferJob.id`. */
7317
+ transferId: string;
7318
+ }
7319
+ /**
7320
+ * Stop one resource transfer, or every one on the vessel
7321
+ * (`vessel.resource.transfer.stop`). A transfer that has already ended answers
7322
+ * success with no change. An id that was never issued fails with
7323
+ * `CommandErrorCode.NotFound`.
7324
+ *
7325
+ * @category Command arguments
7326
+ */
7327
+ export interface ResourceTransferStopArgs {
7328
+ /**
7329
+ * Stop every running transfer. `ResourceTransferStopArgs.transferId` must then
7330
+ * be absent.
7331
+ */
7332
+ all: boolean;
7333
+ /** The transfer to stop. Required when `ResourceTransferStopArgs.all` is false. */
7334
+ transferId?: string;
7335
+ }
7336
+ /**
7337
+ * Whether a `ResourceTransferJob` is still moving.
7338
+ *
7339
+ * @category Parts
7340
+ */
7341
+ export declare enum TransferJobState {
7342
+ /** Moving now. */
7343
+ Running = 0,
7344
+ /** Finished; `ResourceTransferJob.endReason` says why. */
7345
+ Ended = 1
7346
+ }
7347
+ /**
7348
+ * Why a `ResourceTransferJob` ended.
7349
+ *
7350
+ * @category Parts
7351
+ */
7352
+ export declare enum TransferEndReason {
7353
+ /** The requested amount has moved. */
7354
+ AmountMoved = 0,
7355
+ /** Every destination is full. */
7356
+ DestinationsFull = 1,
7357
+ /** Every source is empty. */
7358
+ SourcesEmpty = 2,
7359
+ /** A stop command arrived. */
7360
+ Stopped = 3,
7361
+ /** No source or no destination remains on the vessel. */
7362
+ PartsLeft = 4,
7363
+ /** The active vessel no longer holds the transfer's tanks. */
7364
+ VesselLeft = 5,
7365
+ /** The game left the flight scene. */
7366
+ SceneLeft = 6
7367
+ }
7368
+ /**
7369
+ * One resource transfer, running or recently ended.
7370
+ *
7371
+ * @category Parts
7372
+ */
7373
+ export interface ResourceTransferJob {
7374
+ /** Identifies this transfer to `vessel.resource.transfer.stop`. */
7375
+ id: string;
7376
+ /** The resource's name. */
7377
+ resource: string;
7378
+ /** The tanks drawn from, as part flight ids. */
7379
+ fromPartIds: string[];
7380
+ /** The tanks being filled, as part flight ids. */
7381
+ toPartIds: string[];
7382
+ /** True when it runs until the destinations are full or the sources empty. */
7383
+ untilFull: boolean;
7384
+ /**
7385
+ * The amount asked for. Null exactly when `ResourceTransferJob.untilFull` is
7386
+ * true.
7387
+ */
7388
+ requested?: Value<"units"> | null;
7389
+ /** The amount the destinations have taken so far. */
7390
+ moved: Value<"units">;
7391
+ /**
7392
+ * Total into all destinations per second of game time at the last step. Null
7393
+ * once ended.
7394
+ */
7395
+ rate?: Value<"units/s"> | null;
7396
+ /** Whether it is still moving. */
7397
+ state: TransferJobState;
7398
+ /** Why it ended. Null while running. */
7399
+ endReason?: TransferEndReason | null;
7400
+ /** The universal time it started. */
7401
+ startedUt: Value<"ut">;
7402
+ /** The universal time it ended. Null while running. */
7403
+ endedUt?: Value<"ut"> | null;
7404
+ }
7405
+ /**
7406
+ * The active vessel's resource transfers: running ones, then the last eight
7407
+ * ended, newest first. Empty when there are none.
7408
+ *
7409
+ * @category Parts
7410
+ */
7411
+ export interface ResourceTransfers {
7412
+ /** Running transfers, then recently ended ones. */
7413
+ transfers: ResourceTransferJob[];
7414
+ /** Provenance. */
7415
+ meta: PayloadMeta;
7416
+ }
7417
+ /**
7418
+ * One group of parts that can draw from each other by crossfeed.
7419
+ *
7420
+ * @category Parts
7421
+ */
7422
+ export interface CrossfeedSet {
7423
+ /** Identifies this set within `TransferReach.sets`. */
7424
+ id: number;
7425
+ /** The parts in this set, as flight ids. */
7426
+ partIds: string[];
7427
+ }
7428
+ /**
7429
+ * Which set one tank can draw from.
7430
+ *
7431
+ * @category Parts
7432
+ */
7433
+ export interface TankReach {
7434
+ /** The tank's part, as a flight id. */
7435
+ partId: string;
7436
+ /**
7437
+ * The `CrossfeedSet.id` this tank can draw from. Null when it can draw only
7438
+ * from itself.
7439
+ */
7440
+ drawsFromSet?: number | null;
7441
+ }
7442
+ /**
7443
+ * Which tanks of the active vessel can exchange each resource. When
7444
+ * `TransferReach.obeysCrossfeed` is false any two transferable tanks of a
7445
+ * resource can exchange. When it is true, a resource absent from
7446
+ * `TransferReach.resources` is vessel-wide; otherwise a destination can take
7447
+ * from a source only when the set the destination draws from contains the
7448
+ * source. Sets are directional, so the rule is not symmetric.
7449
+ *
7450
+ * @category Parts
7451
+ */
7452
+ export interface TransferReach {
7453
+ /** Whether this save makes a transfer obey crossfeed. */
7454
+ obeysCrossfeed: boolean;
7455
+ /** Each distinct crossfeed set once. */
7456
+ sets: CrossfeedSet[];
7457
+ /** By resource name, for resources whose flow limits reach. */
7458
+ resources: {
7459
+ [key: string]: TankReach[];
7460
+ };
7461
+ /** Provenance. */
7462
+ meta: PayloadMeta;
7463
+ }
7464
+ /**
5619
7465
  * Whether the two stock in-flight revert actions are available right now, so a
5620
7466
  * widget can enable its Revert to Launch and Revert to Editor controls exactly
5621
7467
  * when KSP's own pause menu shows them.
@@ -5768,6 +7614,95 @@ export interface RotorReverseArgs {
5768
7614
  partId: string;
5769
7615
  }
5770
7616
  /**
7617
+ * What a quicksave wrote: the save it made and the universal time it holds.
7618
+ * The reply to `ksp.quicksave`.
7619
+ *
7620
+ * @category Flights
7621
+ */
7622
+ export interface SaveWritten {
7623
+ /** Identifies the save, the value `SaveSummary.saveId` carries. */
7624
+ saveId: string;
7625
+ /** The universal time the save holds. */
7626
+ ut: Value<"ut">;
7627
+ }
7628
+ /**
7629
+ * A quickload the game has accepted and will carry out after a short hold. The
7630
+ * reply to `ksp.quickload`; what became of it arrives on `ksp.gameLoaded`
7631
+ * under the same `LoadScheduled.loadId`.
7632
+ *
7633
+ * @category Flights
7634
+ */
7635
+ export interface LoadScheduled {
7636
+ /** Identifies the save, the value `SaveSummary.saveId` carries. */
7637
+ saveId: string;
7638
+ /** The universal time the save holds. */
7639
+ saveUt: Value<"ut">;
7640
+ /** Matches this load to its `GameLoaded.loadId`. */
7641
+ loadId: string;
7642
+ }
7643
+ /**
7644
+ * One save on disk, as file facts only: nothing about the craft it holds.
7645
+ *
7646
+ * @category Flights
7647
+ */
7648
+ export interface SaveSummary {
7649
+ /**
7650
+ * Identifies this file on disk at this moment. A file that has been rewritten
7651
+ * since has another id.
7652
+ */
7653
+ saveId: string;
7654
+ /** The universal time the save holds. */
7655
+ ut: Value<"ut">;
7656
+ }
7657
+ /**
7658
+ * The quicksave slot of the loaded game and the save it replaced. Null when no
7659
+ * game is loaded. Useful for showing the operator what a quickload would
7660
+ * return to and for offering the previous save after a stray quicksave. Sent
7661
+ * only when it changes, and at no delay at any command centre: a save is a
7662
+ * file outside the universe.
7663
+ *
7664
+ * @category Flights
7665
+ */
7666
+ export interface SaveSlots {
7667
+ /** The quicksave slot, or null when this game has none. */
7668
+ quicksave?: SaveSummary | null;
7669
+ /**
7670
+ * The slot as it stood before the last quicksave from mission control, or null
7671
+ * when there has been none.
7672
+ */
7673
+ previousQuicksave?: SaveSummary | null;
7674
+ }
7675
+ /**
7676
+ * A quickload ending, one way or the other. Useful for telling every screen
7677
+ * what just happened to the game and who asked for it. Delivered at no delay,
7678
+ * on every connection subscribed when it happens.
7679
+ *
7680
+ * @category Flights
7681
+ */
7682
+ export interface GameLoaded {
7683
+ /** The `LoadScheduled.loadId` this answers. */
7684
+ loadId: string;
7685
+ /**
7686
+ * GameLoaded.Loaded, GameLoaded.Failed or GameLoaded.Cancelled. Treat a value
7687
+ * you do not know as a load that did not happen.
7688
+ */
7689
+ outcome: string;
7690
+ /** Why a load failed. Null unless `GameLoaded.outcome` is GameLoaded.Failed. */
7691
+ failReason?: string | null;
7692
+ /** The universal time the save holds. */
7693
+ saveUt: Value<"ut">;
7694
+ /**
7695
+ * The universal time the game had reached when the load was asked for, which a
7696
+ * screen compares with `GameLoaded.saveUt` to say how far it moved.
7697
+ */
7698
+ fromUt: Value<"ut">;
7699
+ /**
7700
+ * The screen that asked for it, as `QuickloadArgs.requestedBy` said. Empty
7701
+ * when the main screen asked.
7702
+ */
7703
+ requestedBy: string;
7704
+ }
7705
+ /**
5771
7706
  * Which kind of condition a SCET alarm watches for.
5772
7707
  *
5773
7708
  * Every alarm has a vantage (see `ScetAlarm.vantage`), so a kind says only
@@ -5879,7 +7814,14 @@ export declare enum ScetAlarmState {
5879
7814
  * whatever its condition reads, and a switch ends every alarm still watching.
5880
7815
  * A kerbal on EVA counts as the craft they stepped out of.
5881
7816
  */
5882
- Cancelled = 3
7817
+ Cancelled = 3,
7818
+ /**
7819
+ * The copy of this alarm in the game's own alarm clock (see
7820
+ * `ScetAlarm.gameAlarmId`) was deleted in the game, so the alarm is deleted
7821
+ * too. Remove the row. Arming the same id again is refused while the game
7822
+ * holds this row.
7823
+ */
7824
+ DeletedInGame = 4
5883
7825
  }
5884
7826
  /**
5885
7827
  * What a SCET alarm watches for, on the craft's own clock.
@@ -6040,11 +7982,11 @@ export interface ScetAlarmAction {
6040
7982
  * the game holds it: the `alarm.activeList` Topic is a bare array of these.
6041
7983
  *
6042
7984
  * The roster exists so an operator can see which alarms are still set after a
6043
- * reconnect, and so a client can remove an entry it no longer remembers. The
6044
- * roster is held in memory for the game session and is not written to the
6045
- * save: when the session ends it is gone, and a client sets its alarms again.
6046
- * It is a list of what somebody asked for, not a reading of any craft, so the
6047
- * channel is not delayed by signal delay.
7985
+ * reconnect, and so a client can remove an entry it no longer remembers. Every
7986
+ * alarm still armed is written to the save, so loading a save puts back the
7987
+ * alarms it held when it was made, as it does the game's own. It is a list of
7988
+ * what somebody asked for, not a reading of any craft, so the channel is not
7989
+ * delayed by signal delay.
6048
7990
  *
6049
7991
  * @category Alarms
6050
7992
  * @categoryDescription Alarms
@@ -6159,6 +8101,37 @@ export interface ScetAlarm {
6159
8101
  * otherwise land on whatever happened to be active.
6160
8102
  */
6161
8103
  actsOn: string;
8104
+ /**
8105
+ * The `GameAlarm.id` of this alarm's copy in the game's own alarm clock, or
8106
+ * null when it has none.
8107
+ *
8108
+ * Only an alarm on a universal time is copied into the game, and only while
8109
+ * the game runs an alarm clock. The copy leaves time warp to this alarm.
8110
+ * Deleting either one deletes the other.
8111
+ */
8112
+ gameAlarmId?: number | null;
8113
+ /**
8114
+ * How many times the player has edited this alarm's copy in the game's own
8115
+ * alarm clock (see `ScetAlarm.gameAlarmId`). Each edit moves this alarm's
8116
+ * `ScetAlarm.name` and `ScetAlarmCondition.ut` to the copy's title and time,
8117
+ * so a client that has not yet taken the count it last saw can tell the new
8118
+ * name and time are the player's and take them, instead of arming its own over
8119
+ * them.
8120
+ */
8121
+ gameEdits: Value<"count">;
8122
+ /**
8123
+ * Whether this alarm came back from a save and no client has armed it since. A
8124
+ * client that holds the alarm arms it again, so its own name and time, or the
8125
+ * player's edit in the game, replace what the save held.
8126
+ */
8127
+ restored: boolean;
8128
+ /**
8129
+ * The save the alarm was armed in, as the game names its folder. Empty when
8130
+ * the game had not named a save yet. A client keeps it with the alarm and
8131
+ * sends it back in `ScetAlarmArmArgs.save`, so an alarm made in one save is
8132
+ * never armed into another.
8133
+ */
8134
+ save: string;
6162
8135
  }
6163
8136
  /**
6164
8137
  * The notice that an alarm judged on the craft's own clock (a SCET alarm, for
@@ -6231,6 +8204,14 @@ export interface ScetAlarmArmArgs {
6231
8204
  vantage: string;
6232
8205
  /** See `ScetAlarm.subject`. Empty is read as `"game"`. */
6233
8206
  subject: string;
8207
+ /**
8208
+ * The save the client made the alarm in, as read off `ScetAlarm.save`. Empty
8209
+ * for an alarm whose save the client has not been told yet, which is accepted
8210
+ * and stamped with the loaded save. An arm naming a save other than the loaded
8211
+ * one is refused with `CommandErrorCode.WrongState`, and the detail names the
8212
+ * loaded save.
8213
+ */
8214
+ save: string;
6234
8215
  /** What the alarm watches for. See `ScetAlarmCondition`. */
6235
8216
  condition: ScetAlarmCondition;
6236
8217
  /**
@@ -6279,13 +8260,16 @@ export interface ScetAddressableTopic {
6279
8260
  topic: string;
6280
8261
  }
6281
8262
  /**
6282
- * Deploy or transmit a science experiment on a part. Args shared by every
6283
- * science-experiment actuation command (`science.experiment.deploy` and
6284
- * `science.experiment.transmit`): the experiment is named by
6285
- * `ExperimentActionArgs.partId`, the part's flight id as a string, the same id
6286
- * `science.instruments` carries on each experiment entry. It is looked up
6287
- * among the active vessel's parts, never by array index. An empty or unknown
6288
- * `ExperimentActionArgs.partId` fails with `CommandErrorCode.NotFound`.
8263
+ * Act on a science experiment or lab on a part. Args shared by every science
8264
+ * actuation command (`science.experiment.deploy`,
8265
+ * `science.experiment.transmit`, `science.experiment.start`,
8266
+ * `science.experiment.stop`, `science.lab.start` and `science.lab.stop`): the
8267
+ * part is named by `ExperimentActionArgs.partId`, the part's flight id as a
8268
+ * string, the same id `science.instruments` carries on each experiment entry.
8269
+ * It is looked up among the active vessel's parts, never by array index. An
8270
+ * empty or unknown `ExperimentActionArgs.partId` fails with
8271
+ * `CommandErrorCode.NotFound`. The lab commands act on the lab on the part and
8272
+ * ignore `ExperimentActionArgs.experimentId`.
6289
8273
  *
6290
8274
  * @category Command arguments
6291
8275
  */
@@ -6296,6 +8280,37 @@ export interface ExperimentActionArgs {
6296
8280
  * vessel's parts; empty or unknown yields `CommandErrorCode.NotFound`.
6297
8281
  */
6298
8282
  partId: string;
8283
+ /**
8284
+ * Which experiment on the part is meant, as the `experimentId` of its
8285
+ * `science.instruments` entry. Optional: an empty value means the part's only
8286
+ * candidate. A part can carry several experiments, so
8287
+ * `science.experiment.start` and `science.experiment.stop` are refused with
8288
+ * `CommandErrorCode.NotFound` when this is empty and the part holds more than
8289
+ * one continuous experiment. Deploy and transmit take the first eligible
8290
+ * experiment when it is empty. An id the part does not carry fails with
8291
+ * `CommandErrorCode.NotFound`.
8292
+ */
8293
+ experimentId?: string;
8294
+ }
8295
+ /**
8296
+ * What `science.experiment.start`, `science.experiment.stop`,
8297
+ * `science.lab.start` and `science.lab.stop` answer with: whether the press
8298
+ * changed anything. Start and stop are idempotent, so a press on something
8299
+ * already in the requested state succeeds with `RunStateChange.changed` false
8300
+ * rather than refusing, and a command that reaches the craft after the state
8301
+ * changed on its own tells the operator so instead of reporting a start that
8302
+ * did nothing.
8303
+ *
8304
+ * @category Science
8305
+ */
8306
+ export interface RunStateChange {
8307
+ /**
8308
+ * Whether the command switched the instrument or lab. False when it was
8309
+ * already in the requested state ("already running", "already stopped").
8310
+ */
8311
+ changed: boolean;
8312
+ /** Whether the instrument or lab is switched on after the command. */
8313
+ running: boolean;
6299
8314
  }
6300
8315
  /**
6301
8316
  * A science result the craft has started sending home, as
@@ -6480,8 +8495,11 @@ export interface InstrumentEntry {
6480
8495
  */
6481
8496
  experimentId?: string | null;
6482
8497
  /**
6483
- * The experiment's display title (KSP's `ScienceExperiment.experimentTitle`).
6484
- * `null` when the module's experiment definition has not resolved.
8498
+ * The experiment's own display title (KSP's
8499
+ * `ScienceExperiment.experimentTitle`, or the providing mod's title for the
8500
+ * experiment). Never the part's title: several experiments on one part have
8501
+ * different titles. `null` when the experiment definition has not resolved,
8502
+ * and a client then names the experiment by `experimentId`.
6485
8503
  */
6486
8504
  title?: string | null;
6487
8505
  /**
@@ -6496,7 +8514,9 @@ export interface InstrumentEntry {
6496
8514
  inoperable?: boolean | null;
6497
8515
  /**
6498
8516
  * Whether the experiment can be run more than once without a reset (KSP's
6499
- * `ModuleScienceExperiment.rerunnable`).
8517
+ * `ModuleScienceExperiment.rerunnable`). `null` when the providing mod has no
8518
+ * such notion, which is neither answer: a client does not present it as a
8519
+ * one-shot experiment.
6500
8520
  */
6501
8521
  rerunnable?: boolean | null;
6502
8522
  /**
@@ -6505,11 +8525,73 @@ export interface InstrumentEntry {
6505
8525
  */
6506
8526
  resettable?: boolean | null;
6507
8527
  /**
6508
- * Whether a kerbal on EVA can collect the experiment's data (KSP's
6509
- * `ModuleScienceExperiment.dataIsCollectable`).
8528
+ * Whether a kerbal on EVA can take the experiment's data out of the part
8529
+ * (KSP's `ModuleScienceExperiment.dataIsCollectable`). A part-config setting
8530
+ * that says nothing about whether data is stored now: see
8531
+ * `InstrumentEntry.holdsData`.
6510
8532
  */
6511
8533
  dataIsCollectable?: boolean | null;
6512
8534
  /**
8535
+ * Whether the experiment module stores data right now, from at least one
8536
+ * result being held (KSP's `ModuleScienceExperiment.GetData()` is not empty).
8537
+ * This, not `InstrumentEntry.dataIsCollectable`, is what a client branches on
8538
+ * to offer transmitting the data. `null` where the module's store could not be
8539
+ * read.
8540
+ */
8541
+ holdsData?: boolean | null;
8542
+ /**
8543
+ * Whether the instrument runs over time once switched on, rather than being
8544
+ * deployed once. A continuous instrument has no deploy or transmit: it is
8545
+ * started and stopped with `science.experiment.start` and
8546
+ * `science.experiment.stop`, and its `InstrumentEntry.deployed` is `null`.
8547
+ * Stock writes `false` for every experiment. `null` is the one-shot model, so
8548
+ * a provider that never sets it changes nothing.
8549
+ */
8550
+ continuous?: boolean | null;
8551
+ /**
8552
+ * Whether a continuous instrument is switched on, whether or not it is
8553
+ * producing right now. `null` on an instrument that is not continuous or whose
8554
+ * state is unknown, which is neither answer: a client then offers neither
8555
+ * Start nor Stop.
8556
+ */
8557
+ running?: boolean | null;
8558
+ /**
8559
+ * Whether a continuous instrument is generating science right now. An
8560
+ * instrument can be `InstrumentEntry.running` and not producing, for example
8561
+ * with no electric charge or with its subject exhausted, so this is the field
8562
+ * a client branches on to tell a working instrument from an idle one. `null`
8563
+ * where the provider cannot say.
8564
+ */
8565
+ producing?: boolean | null;
8566
+ /**
8567
+ * Why a switched-on instrument is not producing, in the provider's own words,
8568
+ * for display. `null` when nothing is in the way. Prose in the game's
8569
+ * language, so never branch on it, and never a signal or return fact: it
8570
+ * answers why nothing is being generated, not why nothing is arriving home.
8571
+ */
8572
+ runIssue?: string | null;
8573
+ /**
8574
+ * The science subject this instrument would record against if run now, from
8575
+ * its experiment and the vessel's current situation, body and biome (the id
8576
+ * `ArchiveEntry.subjectId` lists it under). `null` where the experiment cannot
8577
+ * run in the vessel's current situation, where the save has no R&D (Sandbox),
8578
+ * or where the experiment definition has not resolved.
8579
+ */
8580
+ subjectId?: string | null;
8581
+ /**
8582
+ * Science banked for `InstrumentEntry.subjectId` so far. `0` when the career
8583
+ * has not yet recovered or transmitted that subject. `null` whenever
8584
+ * `InstrumentEntry.subjectId` is.
8585
+ */
8586
+ science?: Value<"science"> | null;
8587
+ /**
8588
+ * The most science `InstrumentEntry.subjectId` can ever yield.
8589
+ * `InstrumentEntry.science` over this is how much of what the instrument can
8590
+ * give here has been collected. `null` whenever `InstrumentEntry.subjectId`
8591
+ * is.
8592
+ */
8593
+ scienceCap?: Value<"science"> | null;
8594
+ /**
6513
8595
  * The provider-namespaced extension bag, instrument half. Same mechanism and
6514
8596
  * same rule as `ExperimentEntry.extensions`. This payload carries no number
6515
8597
  * whose meaning depends on the value model (it is pure operability), so it has
@@ -6594,6 +8676,25 @@ export interface LabEntry {
6594
8676
  */
6595
8677
  isOperational?: boolean | null;
6596
8678
  /**
8679
+ * Whether the lab's research is switched on (KSP's `BaseConverter.IsActivated`
8680
+ * on the lab's converter), whether or not it is producing.
8681
+ * `LabEntry.processingData` is not this: it means a data transfer into the lab
8682
+ * is in progress. `null` when the lab has no converter or it could not be
8683
+ * read. Switched with `science.lab.start` and `science.lab.stop`.
8684
+ */
8685
+ running?: boolean | null;
8686
+ /**
8687
+ * Whether the lab is turning stored data into science right now: switched on,
8688
+ * operational, holding data and below its science cap. `null` where it could
8689
+ * not be read.
8690
+ */
8691
+ producing?: boolean | null;
8692
+ /**
8693
+ * Why a switched-on lab is not producing, in the game's own words, for
8694
+ * display. `null` when nothing is in the way. Never branch on it.
8695
+ */
8696
+ runIssue?: string | null;
8697
+ /**
6597
8698
  * Which value model produced `LabEntry.scienceRate` and
6598
8699
  * `LabEntry.storedScience`, and which unit `LabEntry.dataStored` and
6599
8700
  * `LabEntry.dataStorage` are really in. See ScienceValueModels.
@@ -6608,145 +8709,202 @@ export interface LabEntry {
6608
8709
  */
6609
8710
  valueModel?: string | null;
6610
8711
  /**
6611
- * The provider-namespaced extension bag, lab half. Same mechanism and same
6612
- * rule as `ExperimentEntry.extensions`.
8712
+ * The provider-namespaced extension bag, lab half. Same mechanism and same
8713
+ * rule as `ExperimentEntry.extensions`.
8714
+ */
8715
+ extensions?: ProviderExtensions;
8716
+ }
8717
+ /**
8718
+ * One Breaking Ground deployed-science station on
8719
+ * `deployed.station.<controllerVesselId>.report`: the cluster a control unit
8720
+ * runs, its power, whether its science has a path home, and each experiment it
8721
+ * carries. The key is the id of the cluster's controller vessel, the same guid
8722
+ * its `trackingStation.catalog` entry carries (type
8723
+ * `DeployedScienceController`), so a client finds every station by listing
8724
+ * that catalog.
8725
+ *
8726
+ * Delayed and frozen on the station's own link, not the active craft's: the
8727
+ * controller is its own vessel with its own path home, so a station out of
8728
+ * contact holds its last-known reading while the others, and the craft being
8729
+ * flown, carry on. The reading's own age says when the station was last heard.
8730
+ * A station whose controller vessel cannot be placed has no topic.
8731
+ *
8732
+ * Every field is nullable, and is `null` whenever the raw value is absent or
8733
+ * could not be read. A backlog is each experiment's
8734
+ * `DeployedStationExperiment.storedData`; whether it can get home is
8735
+ * `DeployedStation.sendPathHome`.
8736
+ *
8737
+ * @category Science
8738
+ */
8739
+ export interface DeployedStation {
8740
+ /** Name of the controller vessel (KSP's `Vessel.vesselName`). */
8741
+ stationName?: string | null;
8742
+ /**
8743
+ * Name of the body the cluster is deployed on
8744
+ * (`DeployedScienceCluster.DeployedBody`), or of the controller's orbit's
8745
+ * reference body when the cluster does not name one.
8746
+ */
8747
+ body?: string | null;
8748
+ /**
8749
+ * The controller vessel's situation, KSP's `Vessel.situation` enum name (for
8750
+ * example `LANDED`).
8751
+ */
8752
+ situation?: string | null;
8753
+ /**
8754
+ * Biome at the controller vessel's position on `DeployedStation.body`. `null`
8755
+ * when the body has no biome map.
8756
+ */
8757
+ biome?: string | null;
8758
+ /**
8759
+ * The cluster's power state, derived from the facts the game's own readout
8760
+ * branches on rather than from its localised sentence.
8761
+ *
8762
+ * `null` when the cluster could not be read at all, which is a third state and
8763
+ * must not be read as either powered or unpowered.
8764
+ */
8765
+ power?: DeployedPowerState | null;
8766
+ /**
8767
+ * Power units the cluster's parts produce
8768
+ * (`DeployedScienceCluster.PowerAvailable`), against
8769
+ * `DeployedStation.powerRequired`. Breaking Ground's own integral power scale
8770
+ * summed over the cluster's parts: not electric charge, and not a rate.
8771
+ * Available at or above required is what makes the cluster powered.
8772
+ *
8773
+ * `null` when the cluster could not be read. Zero is a real reading a live
8774
+ * cluster holds while its panels are dark, so it must not stand in for
8775
+ * absence.
8776
+ */
8777
+ powerAvailable?: Value<"count"> | null;
8778
+ /**
8779
+ * Power units the cluster's parts require
8780
+ * (`DeployedScienceCluster.PowerRequired`). Same scale and same null rule as
8781
+ * `DeployedStation.powerAvailable`.
8782
+ */
8783
+ powerRequired?: Value<"count"> | null;
8784
+ /**
8785
+ * Whether the controller has a path home that can carry science, by the rule
8786
+ * the game applies when an experiment sends: a connection with signal and a
8787
+ * last hop to a home command centre. Always `true` in a save with no CommNet.
8788
+ * `null` when the controller's link could not be read.
8789
+ *
8790
+ * This is the figure at the sample's own time. A station that has since lost
8791
+ * its path stops updating, so read how old the reading is before trusting a
8792
+ * `true`.
8793
+ */
8794
+ sendPathHome?: boolean | null;
8795
+ /**
8796
+ * Whether the cluster's last attempt to send its science home failed
8797
+ * (`DeployedScienceCluster.DataSendFailed`). `null` when it could not be read.
8798
+ */
8799
+ dataSendFailed?: boolean | null;
8800
+ /**
8801
+ * Every experiment in the cluster, in the cluster's part order. Never null on
8802
+ * a published station; an empty list is a cluster with no experiment attached.
6613
8803
  */
6614
- extensions?: ProviderExtensions;
8804
+ experiments: DeployedStationExperiment[];
6615
8805
  }
6616
8806
  /**
6617
- * One entry in the `deployed.bases` Topic payload: a Breaking Ground
6618
- * deployed-science experiment, a science instrument set down on the surface.
6619
- * The Topic payload is a bare array (`DeployedEntry[]`) or `null` when
6620
- * Breaking Ground is not installed and no loaded vessel carries a deployed
6621
- * experiment.
6622
- *
6623
- * Unlike the `science.*` channels, `deployed.bases` covers the whole save, not
6624
- * just the active vessel: a deployed cluster is its own ground vessel, so an
6625
- * entry normally describes a vessel other than the active one, named by
6626
- * `DeployedEntry.vesselName`. An experiment on a vessel that is not loaded is
6627
- * read from Breaking Ground's cluster registry and carries no power or
6628
- * connection sentence. One that belongs to no cluster is listed only while its
6629
- * vessel is loaded.
6630
- *
6631
- * Every field is nullable, and is `null` whenever the raw value is absent or
6632
- * could not be read.
8807
+ * One experiment of a `DeployedStation`: a science instrument set down on the
8808
+ * surface, with how far it has progressed and how much data it is holding that
8809
+ * has not yet been sent home.
6633
8810
  *
6634
8811
  * @category Science
6635
8812
  */
6636
- export interface DeployedEntry {
6637
- /**
6638
- * Name of the vessel carrying the experiment (KSP's `Vessel.vesselName`). A
6639
- * deployed cluster is its own vessel, so this is normally not the active
6640
- * vessel's name.
6641
- */
6642
- vesselName?: string | null;
8813
+ export interface DeployedStationExperiment {
6643
8814
  /**
6644
8815
  * Display title of the experiment part (the part's `partInfo.title`, or its
6645
8816
  * internal name when that is missing).
6646
8817
  */
6647
8818
  partName?: string | null;
6648
- /**
6649
- * Name of the body the carrying vessel orbits or sits on (its orbit's
6650
- * reference body). `null` when the vessel has no orbit.
6651
- */
6652
- body?: string | null;
6653
- /**
6654
- * The carrying vessel's situation, KSP's `Vessel.situation` enum name (for
6655
- * example `LANDED`).
6656
- */
6657
- situation?: string | null;
6658
- /**
6659
- * Biome at the carrying vessel's current position on `DeployedEntry.body`.
6660
- * `null` when the body has no biome map.
6661
- */
6662
- biome?: string | null;
6663
- /** The experiment's id (KSP's `ModuleGroundExperiment.experimentId`). */
8819
+ /** The experiment's id (`DeployedScienceExperiment.ExperimentId`). */
6664
8820
  experimentId?: string | null;
6665
- /**
6666
- * How far the experiment has progressed, in percent (KSP's
6667
- * `ModuleGroundExperiment.ScienceCompletedPercentage`).
6668
- */
8821
+ /** How far the experiment has progressed, in percent of its science limit. */
6669
8822
  scienceCompletedPercentage?: Value<"%"> | null;
6670
8823
  /**
6671
- * How much of the experiment's science has been transmitted, in percent (KSP's
6672
- * `ModuleGroundExperiment.ScienceTransmittedPercentage`).
8824
+ * How much of the experiment's science has been transmitted, in percent of its
8825
+ * science limit.
6673
8826
  */
6674
8827
  scienceTransmittedPercentage?: Value<"%"> | null;
6675
8828
  /**
6676
- * The science value KSP reports for the experiment
6677
- * (`ModuleGroundExperiment.ScienceValue`).
8829
+ * The science value the experiment reports
8830
+ * (`DeployedScienceExperiment.ScienceValue`).
6678
8831
  */
6679
8832
  scienceValue?: Value<"science"> | null;
6680
8833
  /**
6681
- * The experiment's science limit as KSP reports it
6682
- * (`ModuleGroundExperiment.ScienceLimit`). Compare against
6683
- * `DeployedEntry.scienceValue`.
8834
+ * The experiment's science limit. Compare against
8835
+ * `DeployedStationExperiment.scienceValue`.
6684
8836
  */
6685
8837
  scienceLimit?: Value<"science"> | null;
6686
8838
  /**
6687
- * `ModuleGroundSciencePart.PowerState` verbatim: KSP's own words for the power
6688
- * state, for display. Do not branch on this.
6689
- *
6690
- * It is not an enum name, it is localised prose. The module assigns it from
6691
- * `Localizer` in `UpdateModuleUI()`, so the value is in whatever language the
6692
- * player runs KSP in, and it is only written when the part action window
6693
- * refreshes, so it can be a held value. `DeployedEntry.power` is the field to
6694
- * read.
8839
+ * Data the experiment holds that has not been transmitted
8840
+ * (`DeployedScienceExperiment.StoredScienceData`): the backlog waiting for a
8841
+ * path home. `null` when it could not be read, and zero is a real empty store.
6695
8842
  */
6696
- powerState?: string | null;
8843
+ storedData?: Value<"Mit"> | null;
6697
8844
  /**
6698
- * `ModuleGroundSciencePart.ConnectionState` verbatim, for display. Localised
6699
- * prose on the same terms as `DeployedEntry.powerState`; read
6700
- * `DeployedEntry.controllerConnected` instead.
8845
+ * Whether the experiment has reached its science limit with data still stored.
8846
+ * An experiment switches itself off at its limit and never sends again, so
8847
+ * what it still holds then stays until a kerbal retrieves it, whether or not
8848
+ * the station has a path home. `false` while the experiment is still
8849
+ * collecting, or when its store is empty. `null` when its completion or its
8850
+ * store could not be read.
6701
8851
  */
6702
- connectionState?: string | null;
8852
+ stranded?: boolean | null;
6703
8853
  /**
6704
- * The cluster's power state, derived from the same facts `UpdateModuleUI()`
6705
- * itself branches on (`DeployedScienceCluster.IsPowered` and
6706
- * `.ControllerPartEnabled`, the module's `Enabled` and `DeployedOnGround`)
6707
- * rather than parsed out of the sentence that method writes. This is the field
6708
- * to branch on, not `DeployedEntry.powerState`.
6709
- *
6710
- * `null` when the cluster could not be read at all, which is a third state and
6711
- * must not be read as either powered or unpowered.
8854
+ * Whether the experiment part is deployed on the ground
8855
+ * (`DeployedSciencePart.DeployedOnGround`).
6712
8856
  */
6713
- power?: DeployedPowerState | null;
8857
+ deployedOnGround?: boolean | null;
6714
8858
  /**
6715
- * Whether the experiment is attached to a controller cluster at all, the fact
6716
- * behind `DeployedEntry.connectionState`'s "Connected"/"Not Connected". `null`
6717
- * when it could not be determined.
8859
+ * Whether the experiment is switched on (`DeployedSciencePart.Enabled`). An
8860
+ * experiment that is off collects and sends nothing. Off is not always
8861
+ * somebody's switch: the game also turns an experiment off by itself, see
8862
+ * `DeployedStationExperiment.offReason`.
8863
+ *
8864
+ * Read for a cluster whether or not its vessel is loaded. `null` when it could
8865
+ * not be read, which is a third state and must not be shown as off.
6718
8866
  */
6719
- controllerConnected?: boolean | null;
8867
+ enabled?: boolean | null;
6720
8868
  /**
6721
- * Power units the cluster's parts produce
6722
- * (`DeployedScienceCluster.PowerAvailable`), against
6723
- * `DeployedEntry.powerRequired`. Breaking Ground's own integral power scale
6724
- * summed over the cluster's parts: not electric charge, and not a rate.
6725
- * Available at or above required is what makes the cluster powered.
6726
- *
6727
- * `null` when the cluster could not be read, on the same terms as
6728
- * `DeployedEntry.power`. Zero is a real reading a live cluster holds while its
6729
- * panels are dark, so it must not stand in for absence.
8869
+ * Why the experiment is off, where the game's own state says. `null` whenever
8870
+ * the experiment is on, or `DeployedStationExperiment.enabled` could not be
8871
+ * read. `DeployedOffReason.Unknown` is an experiment that is off with no
8872
+ * automatic cause to be found, and it does not say who or what turned it off.
6730
8873
  */
6731
- powerAvailable?: Value<"count"> | null;
8874
+ offReason?: DeployedOffReason | null;
8875
+ }
8876
+ /**
8877
+ * Why a deployed experiment is switched off, defined by this contract rather
8878
+ * than by KSP.
8879
+ *
8880
+ * KSP stores only the off state. The two automatic shut-offs are told apart
8881
+ * from the facts each one tests: an experiment switches itself off when its
8882
+ * situation is no longer valid for the experiment, and when it has generated
8883
+ * all the science it can. It is an ordinal on the wire and a closed union on
8884
+ * the client like every other enum in this contract.
8885
+ *
8886
+ * @category Science
8887
+ */
8888
+ export declare enum DeployedOffReason {
6732
8889
  /**
6733
- * Power units the cluster's parts require
6734
- * (`DeployedScienceCluster.PowerRequired`). Same scale and same null rule as
6735
- * `DeployedEntry.powerAvailable`, the demand side of the balance.
8890
+ * The experiment has generated all the science it can and the game switched it
8891
+ * off.
6736
8892
  */
6737
- powerRequired?: Value<"count"> | null;
8893
+ Completed = 0,
6738
8894
  /**
6739
- * Whether the experiment part is deployed on the ground (KSP's
6740
- * `ModuleGroundSciencePart.DeployedOnGround`).
8895
+ * The experiment's situation is not one it can run in and the game switched it
8896
+ * off.
6741
8897
  */
6742
- deployedOnGround?: boolean | null;
8898
+ InvalidSituation = 1,
8899
+ /** Off, with neither automatic cause present. */
8900
+ Unknown = 2
6743
8901
  }
6744
8902
  /**
6745
8903
  * A deployed-science cluster's power state, defined by this contract rather
6746
8904
  * than by KSP.
6747
8905
  *
6748
8906
  * KSP has no enum for this. `ModuleGroundSciencePart` carries the state as a
6749
- * localised sentence, so this reproduces the five outcomes `UpdateModuleUI()`
8907
+ * localised sentence, so this reproduces the six outcomes `UpdateModuleUI()`
6750
8908
  * distinguishes, derived from the booleans it reads rather than from the
6751
8909
  * sentence it writes. It is an ordinal on the wire and a closed union on the
6752
8910
  * client like every other enum in this contract.
@@ -6760,13 +8918,21 @@ export declare enum DeployedPowerState {
6760
8918
  Unpowered = 1,
6761
8919
  /** The cluster's controller is switched off, so nothing is powered. */
6762
8920
  ControllerDisabled = 2,
6763
- /** This experiment is switched off, or is not deployed on the ground. */
8921
+ /**
8922
+ * This experiment is switched off. It is deployed on the ground; see
8923
+ * `DeployedPowerState.NotDeployed` for one that is not.
8924
+ */
6764
8925
  Disabled = 3,
6765
8926
  /**
6766
8927
  * Attached to no cluster at all. Distinct from `DeployedPowerState.Unpowered`:
6767
8928
  * there is nothing to supply power, rather than a supply that is empty.
6768
8929
  */
6769
- NotConnected = 4
8930
+ NotConnected = 4,
8931
+ /**
8932
+ * This experiment is not deployed on the ground. Distinct from
8933
+ * `DeployedPowerState.Disabled`: the switch is not what holds it back.
8934
+ */
8935
+ NotDeployed = 5
6770
8936
  }
6771
8937
  /**
6772
8938
  * One entry in the `science.sensors` Topic payload: a single
@@ -6883,9 +9049,9 @@ export interface ExperimentBreakdownEntry {
6883
9049
  }
6884
9050
  /**
6885
9051
  * One entry in the `science.archive` Topic payload: a single subject out of
6886
- * the whole-career R&D archive (`ResearchAndDevelopment.GetSubjects()`). That
6887
- * is every subject the career has ever collected or recovered, across every
6888
- * mission and every body, not scoped to the active vessel.
9052
+ * the whole-career R&D archive. That is every subject the career has ever
9053
+ * collected or recovered, across every mission and every body, not scoped to
9054
+ * the active vessel.
6889
9055
  *
6890
9056
  * The Topic payload is a bare array (`ArchiveEntry[]`), or `null` when the
6891
9057
  * save has no R&D to walk (Sandbox mode). A save with R&D but nothing
@@ -6941,6 +9107,45 @@ export interface ArchiveEntry {
6941
9107
  subjectValue?: Value<"1"> | null;
6942
9108
  }
6943
9109
  /**
9110
+ * One entry of the `science.transmissions` Topic payload: a science result
9111
+ * that has finished leaving the vessel's transmitter. The payload is a bare
9112
+ * array of the most recent entries, oldest first, and is delayed like the
9113
+ * vessel it comes from: an entry reaches each command centre one signal delay
9114
+ * after `ScienceArrival.completedAt`, never earlier, so its presence is the
9115
+ * result having arrived at that centre.
9116
+ *
9117
+ * An entry exists only once its transmission is complete. A transmission still
9118
+ * being sent has no entry, and a centre that did not start it learns of it on
9119
+ * arrival.
9120
+ *
9121
+ * @category Science
9122
+ */
9123
+ export interface ScienceArrival {
9124
+ /**
9125
+ * The research subject's id (`ScienceSubject.id`), the same key
9126
+ * `science.archive` lists it under.
9127
+ */
9128
+ subjectId?: string | null;
9129
+ /**
9130
+ * The result's title, for example "Crew Report from Kerbin's Shores". Null
9131
+ * when the transmitter's data could not be read.
9132
+ */
9133
+ title?: string | null;
9134
+ /** The amount of data sent. */
9135
+ dataAmount?: Value<"Mit"> | null;
9136
+ /**
9137
+ * Universal Time at the vessel when the transmitter was handed the result.
9138
+ * Null when the transmission was not started by a command and the start was
9139
+ * not seen.
9140
+ */
9141
+ startedAt?: Value<"ut"> | null;
9142
+ /**
9143
+ * Universal Time at the vessel when the last packet left it. The entry reaches
9144
+ * a command centre one signal delay after this.
9145
+ */
9146
+ completedAt: Value<"ut">;
9147
+ }
9148
+ /**
6944
9149
  * Every setting the mod and its Uplinks declared, what each holds now, and
6945
9150
  * whether the settings file on the KSP machine holds the same.
6946
9151
  *
@@ -6959,8 +9164,9 @@ export interface ArchiveEntry {
6959
9164
  *
6960
9165
  * @category Mod settings
6961
9166
  * @categoryDescription Mod settings
6962
- * Settings as the stream carries them, of three kinds that a client reads
6963
- * differently. Gonogo's own settings and its Uplinks' are one Topic, read with
9167
+ * Reading the operator's settings from a client. There are three kinds:
9168
+ * Gonogo's own with its Uplinks', a host mod's, and those that live only in
9169
+ * the browser. Gonogo's own settings and its Uplinks' are one Topic, read with
6964
9170
  * `useTelemetry("settings.gonogo")`. A host mod's own settings, those of the
6965
9171
  * KSP mod an Uplink wraps, are read through that Uplink with
6966
9172
  * `useModSettings(uplinkId)`. A setting that lives only in the browser has no
@@ -7200,6 +9406,13 @@ export interface LaunchSiteEntry {
7200
9406
  * occupancy is unknown.
7201
9407
  */
7202
9408
  padVesselTitle?: string | null;
9409
+ /**
9410
+ * Id of the vessel holding this site (`LaunchSiteEntry.padOccupied` true):
9411
+ * KSP's `Vessel.id` guid as a string, as `trackingStation.catalog` carries it,
9412
+ * the id `ksp.recoverVessel` takes. Null when the site is clear or occupancy
9413
+ * is unknown.
9414
+ */
9415
+ padVesselId?: string | null;
7203
9416
  }
7204
9417
  /**
7205
9418
  * The single current KSP game scene. `SpaceCenterScene.scene` carries exactly
@@ -7394,8 +9607,7 @@ export interface CrewRosterEntry {
7394
9607
  }
7395
9608
  /**
7396
9609
  * One craft file in the `spaceCenter.savedShips` channel, a saved VAB or SPH
7397
- * design the player can launch, read from the save's craft folders via the
7398
- * stock `CraftProfileInfo` metadata loader.
9610
+ * design the player can launch, read from the save's craft folders.
7399
9611
  *
7400
9612
  * The channel is a bare array of these entries, one per `.craft` file keyed by
7401
9613
  * `SavedShipEntry.file`. The whole payload is `null` (not an empty array) when
@@ -7446,6 +9658,83 @@ export interface SavedShipEntry {
7446
9658
  * buildable as-is.
7447
9659
  */
7448
9660
  missingParts?: string[] | null;
9661
+ /**
9662
+ * How many kerbals the craft seats in all, summed over its parts. Absent when
9663
+ * a part of the craft is not installed, since the total cannot be read; absent
9664
+ * is not zero seats.
9665
+ */
9666
+ crewSeats?: Value<"count"> | null;
9667
+ /**
9668
+ * Whether a command module on the craft needs no crew, as a probe core does,
9669
+ * so the craft can launch with nobody aboard. `false` means it cannot launch
9670
+ * unmanned, for want of a command module or because every one needs crew (see
9671
+ * `SavedShipEntry.minimumCrew`). Absent when a part of the craft is not
9672
+ * installed.
9673
+ */
9674
+ canFlyUnmanned?: boolean | null;
9675
+ /**
9676
+ * The fewest kerbals any command module on the craft needs to fly it, `0` for
9677
+ * a probe core. Absent when the craft has no command module, which no crew can
9678
+ * fix, and when a part of the craft is not installed.
9679
+ */
9680
+ minimumCrew?: Value<"count"> | null;
9681
+ /**
9682
+ * Universal time of the most recent launch from this craft file. KSP keeps no
9683
+ * launch date on a craft file, so Gonogo records one each time a launch is
9684
+ * made from it, by the console or by the editor's own Launch button. For a
9685
+ * craft launched before Gonogo kept that record, the launch time of the newest
9686
+ * vessel in the save whose name matches the craft name, and
9687
+ * `SavedShipEntry.lastLaunchedByName` is `true`. Absent when the craft has
9688
+ * never been launched.
9689
+ */
9690
+ lastLaunchedUt?: Value<"ut"> | null;
9691
+ /**
9692
+ * Whether `SavedShipEntry.lastLaunchedUt` was found by matching the craft name
9693
+ * against the vessels in the save rather than from a recorded launch, so a
9694
+ * vessel the player renamed or a different craft sharing the name can stand in
9695
+ * for it. Absent when `SavedShipEntry.lastLaunchedUt` is absent.
9696
+ */
9697
+ lastLaunchedByName?: boolean | null;
9698
+ }
9699
+ /**
9700
+ * One saved craft file's part tree on
9701
+ * `spaceCenter.craft.<facility>.<file>.parts`: each part's position, axes and
9702
+ * box in the craft's own frame, the same `VesselPart` rows `vessel.parts`
9703
+ * carries for the active craft. `<facility>` is `VAB` or `SPH` and `<file>` is
9704
+ * the file name without its extension, the one `spaceCenter.savedShips`
9705
+ * reports as `file`, with every character other than a letter, digit, `_` or
9706
+ * `-` written as `%` and the two hexadecimal digits of each of its UTF-8
9707
+ * bytes, so a name holding a dot or a space is still one topic segment. The
9708
+ * facility is part of the topic because a VAB file and an SPH file can share a
9709
+ * name. Published only while something subscribes to that craft's topic.
9710
+ *
9711
+ * Read from the craft file's saved parts, not from loaded ones: each part's
9712
+ * position and orientation are the saved ones and exact, but its box is
9713
+ * measured on the part's stock model with its saved variant's meshes. The rows
9714
+ * carry stored resource amounts and module names, and no temperatures, flow
9715
+ * rates, module states, action-group bindings or fuel-line targets.
9716
+ *
9717
+ * A record in the save, held at the home command like
9718
+ * `spaceCenter.savedShips`: each command centre reads it after its own delay
9719
+ * home, and a blackout of the active vessel never withholds it. It changes
9720
+ * only when the file is saved over.
9721
+ *
9722
+ * @category Space center
9723
+ */
9724
+ export interface CraftFileParts {
9725
+ /**
9726
+ * Every part in the craft file, in file order. Never null. Empty only when the
9727
+ * file could not be turned into a part tree, in which case
9728
+ * `CraftFileParts.failure` says why. A craft file that has not been read yet
9729
+ * has no sample on its topic at all.
9730
+ */
9731
+ parts: VesselPart[];
9732
+ /**
9733
+ * Why `CraftFileParts.parts` is empty: the file could not be read, it has no
9734
+ * parts, or this install has none of its parts (naming a few). `null` when the
9735
+ * file read cleanly.
9736
+ */
9737
+ failure?: string | null;
7449
9738
  }
7450
9739
  /**
7451
9740
  * A wrapper carrying the count of parts the player can place right now
@@ -7519,7 +9808,7 @@ export interface AstronautComplexInfo {
7519
9808
  * launch site (`ksc`/`launchSite` kinds, the same sites as `LaunchSiteEntry`,
7520
9809
  * limited to sites with a set spawn-point coordinate) and every surface
7521
9810
  * contract waypoint whose contract is Active or Offered (`contractTarget`
7522
- * kind, from `FinePrint.WaypointManager`).
9811
+ * kind).
7523
9812
  *
7524
9813
  * The channel is a bare array of these entries, one per POI keyed by
7525
9814
  * `SpaceCenterPoiEntry.id`. The whole payload is `null` (not an empty array)
@@ -7643,13 +9932,12 @@ export interface StageDeltaVEntry {
7643
9932
  } | null;
7644
9933
  }
7645
9934
  /**
7646
- * The whole-vessel ΔV rollup the game's own ΔV simulation (`VesselDeltaV`)
7647
- * exposes alongside the per-stage `StageDeltaVEntry` list: the ΔV-producing
7648
- * stage count plus the vacuum, sea-level and current totals and total burn
7649
- * time. A single object, or `null` when the stock simulation is not ready or
7650
- * there is no active vessel. Every field is `null` when its raw value is
7651
- * absent or non-finite. Carries no `meta` of its own: provenance rides the
7652
- * envelope.
9935
+ * The whole-vessel ΔV rollup the game's own ΔV simulation exposes alongside
9936
+ * the per-stage `StageDeltaVEntry` list: the ΔV-producing stage count plus the
9937
+ * vacuum, sea-level and current totals and total burn time. A single object,
9938
+ * or `null` when the stock simulation is not ready or there is no active
9939
+ * vessel. Every field is `null` when its raw value is absent or non-finite.
9940
+ * Carries no `meta` of its own: provenance rides the envelope.
7653
9941
  *
7654
9942
  * @category Vessel
7655
9943
  */
@@ -7672,6 +9960,42 @@ export interface StageDeltaVSummary {
7672
9960
  totalBurnTime?: Value<"s"> | null;
7673
9961
  }
7674
9962
  /**
9963
+ * One vessel of the save the operator can switch to: who it is, and nothing of
9964
+ * where it is or how it is doing.
9965
+ *
9966
+ * @category Flights
9967
+ */
9968
+ export interface SwitchableVessel {
9969
+ /** The vessel's stable guid, the id `ksp.switchVessel` takes. */
9970
+ vesselId: string;
9971
+ /** The vessel's display name. */
9972
+ name: string;
9973
+ /** The vessel's type. */
9974
+ vesselType?: VesselType | null;
9975
+ }
9976
+ /**
9977
+ * The other vessels in the save that the game's own vessel switching offers,
9978
+ * as `{ "entries": [ ... ] }`. Switching to a vessel is a change of scene,
9979
+ * which every command centre can do whatever the radio link to that vessel, so
9980
+ * this list does not depend on one: a vessel with no link to any centre is on
9981
+ * it. It names vessels and carries no position, distance, situation or any
9982
+ * other state of one, which a centre may learn only through delayed telemetry.
9983
+ *
9984
+ * The active vessel is not on the list. The payload is `null` (no key emitted)
9985
+ * outside the flight scene, where there is no vessel to switch from. Not
9986
+ * delayed by signal delay: it is a fact about the save, and carries no
9987
+ * per-payload `Meta` of its own (the envelope's applies).
9988
+ *
9989
+ * @category Flights
9990
+ */
9991
+ export interface SwitchableVessels {
9992
+ /**
9993
+ * Every other vessel of the save the game offers to switch to, in id order.
9994
+ * Empty, never null, when there is none.
9995
+ */
9996
+ entries: SwitchableVessel[];
9997
+ }
9998
+ /**
7675
9999
  * Every celestial body in the game, as a tree, wrapped as `{ "bodies": [ ... ]
7676
10000
  * }`. The whole payload is `null`, not an empty list, when no sample has been
7677
10001
  * taken yet, so "no data yet" and "zero bodies" stay distinct.
@@ -7823,6 +10147,14 @@ export interface BodyEntry {
7823
10147
  * never by index.
7824
10148
  */
7825
10149
  isHome?: boolean | null;
10150
+ /**
10151
+ * Whether the save has reached this body's sphere of influence (the stock
10152
+ * progress record's flyby node for the body), so false means the career has
10153
+ * never been there. True on the home body always; null in a save with no
10154
+ * progress record (sandbox) or when it could not be read, which a client
10155
+ * treats as visited rather than as never reached.
10156
+ */
10157
+ visited?: boolean | null;
7826
10158
  }
7827
10159
  /**
7828
10160
  * A body's atmosphere, present on a `BodyEntry` only when the body actually
@@ -8127,22 +10459,26 @@ export interface CatalogEntry {
8127
10459
  * Whether this vessel has a live control link home, as the receiving centre
8128
10460
  * has heard it: an outage shows one of the centre's signal delays after the
8129
10461
  * vessel's last light, and its return when its light arrives again. Read for
8130
- * every roster vessel, loaded or not. This is stock CommNet's reading
8131
- * (`Vessel.connection.IsConnected`), not the active vessel's `comms.*`
8132
- * channels, which a comms mod may provide.
10462
+ * every roster vessel, loaded or not. For the loaded vessel it is the game's
10463
+ * own live connection; for any other vessel it is whether the active comms
10464
+ * backend finds a route from the vessel to a ground station on the network as
10465
+ * it stands now.
8133
10466
  *
8134
10467
  * Null means unknown, not "no link". Three causes: the vessel's own link
8135
10468
  * report has not reached this centre yet; rarely, a scene transition; and
8136
10469
  * always, for the `Debris`, `SpaceObject` (asteroids and comets) and `Unknown`
8137
10470
  * vessel types, which CommNet never gives a connection
8138
10471
  * (`CommNet.CommNetVessel.OnStart`). A debris or asteroid entry carries null
8139
- * here on every sample.
10472
+ * here on every sample. A vessel that is not loaded also reads null when no
10473
+ * comms backend is active yet or its route could not be asked for.
8140
10474
  */
8141
10475
  commsConnected?: boolean | null;
8142
10476
  /**
8143
10477
  * The same connection's control level. Null under the same condition as
8144
10478
  * `CatalogEntry.commsConnected`, including the permanent Debris, SpaceObject
8145
- * and Unknown vessel-type case described there.
10479
+ * and Unknown vessel-type case described there, and for every vessel that is
10480
+ * not loaded, since the game recomputes the level only while the vessel is
10481
+ * loaded.
8146
10482
  */
8147
10483
  commsControlSource?: RosterCommsControlSource | null;
8148
10484
  /**
@@ -8580,6 +10916,37 @@ export interface TrackingStationVesselResources {
8580
10916
  };
8581
10917
  }
8582
10918
  /**
10919
+ * One craft's part tree on `trackingStation.vessel.<guid>.parts`, as the
10920
+ * command centre last heard it: each part's position, axes and box in the
10921
+ * craft's own frame, the same `VesselPart` rows `vessel.parts` carries for the
10922
+ * active craft, for any craft in the save. Published only while something
10923
+ * subscribes to that craft's topic.
10924
+ *
10925
+ * How exact it is depends on whether the craft is loaded. A loaded craft (the
10926
+ * active one, or one within physics range of it) is read from its live parts,
10927
+ * exactly as `vessel.parts` reads it. An unloaded craft is read from its saved
10928
+ * part snapshots: positions and orientations are the saved ones and exact, but
10929
+ * each part's box is measured on the part's stock model with its saved
10930
+ * variant's meshes, and the craft carries no temperatures, no flow rates, no
10931
+ * action-group bindings and no fuel-line targets. Its module states are
10932
+ * limited to the deploy state of solar panels, radiators and antennas; gear,
10933
+ * cargo bays, engines, parachutes and drills carry none.
10934
+ *
10935
+ * Delayed by that craft's own signal delay. While the craft is out of contact
10936
+ * the reading is held at its last-known value, and a craft never heard from
10937
+ * since the topic was opened has none.
10938
+ *
10939
+ * @category Solar system and fleet
10940
+ */
10941
+ export interface TrackingStationVesselParts {
10942
+ /**
10943
+ * Every part on the craft, in the craft's part-list order. Never null; a
10944
+ * reading that cannot be taken publishes nothing rather than an empty or
10945
+ * partial list.
10946
+ */
10947
+ parts: VesselPart[];
10948
+ }
10949
+ /**
8583
10950
  * What a command gate concluded about one precondition: passed, failed, could
8584
10951
  * not be decided from the arguments supplied, or could not be decided from the
8585
10952
  * game's state.
@@ -8713,6 +11080,55 @@ export interface GateVerdict {
8713
11080
  missing?: MissingUnlock[];
8714
11081
  }
8715
11082
  /**
11083
+ * The one-way delay a delayed command takes from a command centre to the
11084
+ * target it addresses, for a command whose target is not the active craft: a
11085
+ * career order to the home command, an aim to a lens, an order to another
11086
+ * craft. One entry in `UplinkDelayReport.elsewhere`.
11087
+ *
11088
+ * @category Comms
11089
+ */
11090
+ export interface UplinkDelay {
11091
+ /** The command, e.g. `career.tech.unlock`. */
11092
+ command: string;
11093
+ /** The command centre the delay is from, as a `commandCentre.roster` id. */
11094
+ centre: string;
11095
+ /**
11096
+ * The one-way delay from `UplinkDelay.centre` to the command's target, as the
11097
+ * centre knows it: the figure that held one such delay before now, since news
11098
+ * of a delay takes that delay to arrive. Null while the centre knows no delay
11099
+ * to the target, which includes a target that depends on the command's
11100
+ * arguments and a centre with no route to it. Never a zero for either.
11101
+ */
11102
+ oneWaySeconds?: Value<"s"> | null;
11103
+ }
11104
+ /**
11105
+ * The `system.uplink.delays` payload: which delayed commands address the
11106
+ * active craft, and the delay each of the others takes from the receiving
11107
+ * session's command centre. Useful for showing the operator how long a command
11108
+ * takes to arrive when it is sent somewhere other than the craft being flown.
11109
+ *
11110
+ * A delayed command in neither list has no known target. Every command is
11111
+ * listed as it is with no arguments, so a command whose target is named by an
11112
+ * argument is listed in `UplinkDelayReport.elsewhere` with no figure.
11113
+ *
11114
+ * Each session is sent the entries for its own command centre.
11115
+ *
11116
+ * @category Comms
11117
+ */
11118
+ export interface UplinkDelayReport {
11119
+ /**
11120
+ * Every delayed command whose target is the active craft, which takes that
11121
+ * craft's own delay (`comms.delay`, or the centre's row on
11122
+ * `commandCentre.activeVesselDelay`).
11123
+ */
11124
+ activeVessel: string[];
11125
+ /**
11126
+ * Every other delayed command, with its delay from the session's command
11127
+ * centre.
11128
+ */
11129
+ elsewhere: UplinkDelay[];
11130
+ }
11131
+ /**
8716
11132
  * One command sent and believed still in flight, an entry on
8717
11133
  * `system.uplink.pending`.
8718
11134
  *
@@ -8774,11 +11190,11 @@ export interface PendingUplink {
8774
11190
  oneWaySeconds?: Value<"s"> | null;
8775
11191
  /**
8776
11192
  * The scalar this command asked for, when its command is one half of a
8777
- * declared SitrepControlChannelAttribute channel: a throttle setting, a switch
8778
- * as 1 or 0, an SAS mode as its ordinal. Absent (the key is left out, never
8779
- * written as null) for every other command, and for a channel command whose
8780
- * args did not carry the value, so a zero throttle and an unknown value never
8781
- * look the same.
11193
+ * declared SitrepControlChannelAttribute channel (a throttle setting, a switch
11194
+ * as 1 or 0, an SAS mode as its ordinal), or is a command that sets one value,
11195
+ * such as a rotor's RPM cap. Absent (the key is left out, never written as
11196
+ * null) for every other command, and for a command whose args did not carry
11197
+ * the value, so a zero throttle and an unknown value never look the same.
8782
11198
  *
8783
11199
  * It is what the centre sent, not anything the craft did. Use it to show which
8784
11200
  * SAS mode is in flight rather than only that something is, or to mark one
@@ -8820,9 +11236,26 @@ export interface PendingUplink {
8820
11236
  * null when it is predicted to go straight through, or no route was predicted.
8821
11237
  */
8822
11238
  predictedHeldAt?: string | null;
11239
+ /**
11240
+ * What the centre told the sender when it accepted this command, as a sentence
11241
+ * to show the operator: a continuous input that its plan says would have to
11242
+ * wait at `PendingUplink.predictedHeldAt`, where it is lost. The same text the
11243
+ * sender's `command-accepted` carries, here so every screen at the centre can
11244
+ * show it. Null when the centre had nothing to say.
11245
+ */
11246
+ warning?: string | null;
8823
11247
  /** When it is predicted to leave `PendingUplink.predictedHeldAt`. Null with it. */
8824
11248
  predictedHeldUntilUt?: Value<"ut"> | null;
8825
11249
  /**
11250
+ * When it is predicted to reach `PendingUplink.predictedHeldAt`, where it
11251
+ * waits until `PendingUplink.predictedHeldUntilUt`. With
11252
+ * `PendingUplink.dispatchedAt` and `PendingUplink.predictedArrivalUt` it
11253
+ * places the wait along the way to the craft. Null with
11254
+ * `PendingUplink.predictedHeldAt`, and when the prediction was not read from a
11255
+ * plan.
11256
+ */
11257
+ predictedHeldFromUt?: Value<"ut"> | null;
11258
+ /**
8826
11259
  * The last moment a cancel sent from this centre is predicted to stop it: at a
8827
11260
  * node holding it or at the craft before it runs. Null when nothing is
8828
11261
  * predicted to stop it.
@@ -8833,8 +11266,9 @@ export interface PendingUplink {
8833
11266
  * home by now, no wait for a window was predicted, and nothing has come. The
8834
11267
  * command may have run and its answer be unable to come home, so this is news
8835
11268
  * of silence, not of failure, and the entry stays until its reply, a report or
8836
- * its expiry settles it. Null while the reply is not yet due, or is predicted
8837
- * to wait.
11269
+ * its expiry settles it; one sent straight to the craft stays until its reply
11270
+ * lands or the link to the craft is down. Null while the reply is not yet due,
11271
+ * or is predicted to wait.
8838
11272
  */
8839
11273
  replyOverdueUt?: Value<"ut"> | null;
8840
11274
  /**
@@ -8851,6 +11285,74 @@ export interface PendingUplink {
8851
11285
  * members' labels.
8852
11286
  */
8853
11287
  members: string[];
11288
+ /**
11289
+ * Every command this entry carries, by wire command name. A command sent alone
11290
+ * lists its own `PendingUplink.command`. A group, whose
11291
+ * `PendingUplink.command` is the group's own, lists each member's command in
11292
+ * the order they run, the same order as `PendingUplink.members`. Null or empty
11293
+ * means the entry carries `PendingUplink.command` alone.
11294
+ */
11295
+ memberCommands?: string[] | null;
11296
+ }
11297
+ /**
11298
+ * One command that was on `system.uplink.pending` and came back refused by the
11299
+ * game, failed, or answered after the centre had found its reply overdue, an
11300
+ * entry of `PendingUplinkQueue.settled`. Every screen at the sending command
11301
+ * centre reads it, so each can say what became of a command another screen
11302
+ * sent. A command answered on time leaves no entry here: its leaving the queue
11303
+ * says so, and its effect shows in the readings.
11304
+ *
11305
+ * @category Comms
11306
+ */
11307
+ export interface SettledUplink {
11308
+ /**
11309
+ * Gonogo's own id for the dispatch, the `PendingUplink.id` it had on the
11310
+ * queue.
11311
+ */
11312
+ id: string;
11313
+ /**
11314
+ * The `requestId` the dispatching client put on its `command-request`, as on
11315
+ * `PendingUplink.clientRequestId`.
11316
+ */
11317
+ clientRequestId: string;
11318
+ /** Wire command name (e.g. `vessel.control.setRcs`). */
11319
+ command: string;
11320
+ /** Caller-supplied envelope label, carried verbatim; empty when none was given. */
11321
+ label: string;
11322
+ /**
11323
+ * The part or terminal the command was addressed to, as on
11324
+ * `PendingUplink.topic`; empty when none.
11325
+ */
11326
+ topic: string;
11327
+ /**
11328
+ * The id of the command centre that sent the command, as on
11329
+ * `commandCentre.roster`.
11330
+ */
11331
+ vantage: string;
11332
+ /** When the outcome reached the sending command centre. */
11333
+ settledAt: Value<"ut">;
11334
+ /**
11335
+ * What became of the command: `refused` when the game refused it, with
11336
+ * `SettledUplink.code` a refusal code; `failed` when the mod answered with a
11337
+ * fault, with `SettledUplink.code` a fault code; or `answered` when it ran and
11338
+ * its reply came after the centre had found it overdue, with
11339
+ * `SettledUplink.code` empty.
11340
+ */
11341
+ outcome: string;
11342
+ /**
11343
+ * The refusal's root code, or the fault's code, as the command's own reply
11344
+ * carries it; empty for `answered`.
11345
+ */
11346
+ code: string;
11347
+ /**
11348
+ * The refinement's id when a refusal was more specific than
11349
+ * `SettledUplink.code`; null otherwise.
11350
+ */
11351
+ reason?: string | null;
11352
+ /** A refusal in the game's own words, when the game gave any; null otherwise. */
11353
+ detail?: string | null;
11354
+ /** What the mod said of a fault, as a sentence to show; null otherwise. */
11355
+ message?: string | null;
8854
11356
  }
8855
11357
  /**
8856
11358
  * The `system.uplink.pending` payload: the whole queue, sent in full each
@@ -8866,6 +11368,13 @@ export interface PendingUplinkQueue {
8866
11368
  * is pending.
8867
11369
  */
8868
11370
  pending: PendingUplink[];
11371
+ /**
11372
+ * The commands this session may know of that left `PendingUplinkQueue.pending`
11373
+ * refused, failed or answered late lately, oldest first, by the same rule as
11374
+ * `PendingUplinkQueue.pending`. Each stays for a few minutes of game time, and
11375
+ * only the latest few are kept. Empty, never null, when there are none.
11376
+ */
11377
+ settled: SettledUplink[];
8869
11378
  }
8870
11379
  /**
8871
11380
  * What a setting may hold, the mod's own or an Uplink's.
@@ -9312,6 +11821,15 @@ export interface VesselControl {
9312
11821
  sasUnavailableReason?: string | null;
9313
11822
  /** The SAS hold mode. Changed with `vessel.control.setSasMode`. */
9314
11823
  sasMode?: SasMode | null;
11824
+ /**
11825
+ * The SAS hold modes the vessel can be put in right now, by KSP's own per-mode
11826
+ * check: the Pilot's skill or the probe core's SAS tier, a target for the
11827
+ * target modes, a maneuver node for `Maneuver`. A mode left out is refused by
11828
+ * `vessel.control.setSasMode` as a capability mismatch, so a client can show
11829
+ * it unavailable before it is pressed. Null when the vessel has no autopilot
11830
+ * to ask, in which case no mode is known to be unavailable.
11831
+ */
11832
+ sasModesAvailable?: SasMode[] | null;
9315
11833
  /** Whether RCS is on. Changed with `vessel.control.setRcs`. */
9316
11834
  rcs?: boolean | null;
9317
11835
  /**
@@ -9434,6 +11952,23 @@ export interface CrewMember {
9434
11952
  */
9435
11953
  rosterStatus?: string | null;
9436
11954
  /**
11955
+ * The `flightID` of the part this kerbal is seated in, as a string, the same
11956
+ * id `vessel.parts` carries. Null when the seat could not be read.
11957
+ */
11958
+ partId?: string | null;
11959
+ /**
11960
+ * Parts this kerbal could move into that would leave the craft with no
11961
+ * control. The move is still allowed, since moving back restores control.
11962
+ * Empty when no move costs control. Null when it could not be worked out.
11963
+ */
11964
+ movesLeavingNoControl?: string[] | null;
11965
+ /**
11966
+ * The title of the part this kerbal is seated in, such as `"Mk1-3 Command
11967
+ * Pod"`, so a transfer between two pods shows as a move. Null when the seat
11968
+ * could not be read.
11969
+ */
11970
+ partTitle?: string | null;
11971
+ /**
9437
11972
  * What this kerbal is personally carrying, from their own
9438
11973
  * `ModuleInventoryPart`.
9439
11974
  *
@@ -9476,11 +12011,40 @@ export interface VesselCrew {
9476
12011
  meta: PayloadMeta;
9477
12012
  }
9478
12013
  /**
12014
+ * What a docking port is doing, in KSP's own stages of a dock, as
12015
+ * `DockAlignment.ownPortState` and `DockAlignment.targetPortState` report it.
12016
+ * The variants a docked port reports for which side it is, and the one for a
12017
+ * port docked to its own vessel, all read as `DockingPortState.Docked`.
12018
+ *
12019
+ * @category Vessel
12020
+ */
12021
+ export declare enum DockingPortState {
12022
+ /** Free and not yet drawn to another port. */
12023
+ Ready = 0,
12024
+ /**
12025
+ * The port's capture field has taken hold of another port and is pulling the
12026
+ * two together.
12027
+ */
12028
+ Acquire = 1,
12029
+ /** The ports are joined and the two craft are about to become one. */
12030
+ PreAttached = 2,
12031
+ /** The ports are docked. */
12032
+ Docked = 3,
12033
+ /** The ports are letting go of each other after an undock. */
12034
+ Disengage = 4,
12035
+ /** The port is shut off and will not dock. */
12036
+ Disabled = 5
12037
+ }
12038
+ /**
9479
12039
  * The relative position, velocity and coarse orientation between the active
9480
- * vessel's nearest free (undocked) docking port and the targeted docking port,
9481
- * for docking-alignment widgets. The whole payload is absent when docking is
9482
- * not relevant right now: nothing is targeted, the target is not a docking
9483
- * port, or the active vessel has no free port. It is never an old or
12040
+ * vessel's nearest docking port (one that is not shut off) and the targeted
12041
+ * docking port, for docking-alignment widgets, with each port's
12042
+ * `DockingPortState` so a widget can tell a free approach from a capture and a
12043
+ * dock. The whole payload is absent when docking is not relevant right now:
12044
+ * nothing is targeted, the target is not a docking port, or the active vessel
12045
+ * has no port that is not disabled. It stays through the capture, the join and
12046
+ * the release of the pair last targeted, after the game clears the target, and
12047
+ * is absent again once the own port is back at rest. It is never an old or
9484
12048
  * zero-distance placeholder record, the same convention as `VesselTarget`.
9485
12049
  *
9486
12050
  * `DockAlignment.forwardDot` is the dot product of the two ports' forward
@@ -9494,10 +12058,15 @@ export interface VesselCrew {
9494
12058
  export interface DockAlignment {
9495
12059
  /**
9496
12060
  * The target port's position relative to the own port (target minus own),
9497
- * metres.
12061
+ * metres, in the own port's axes: `z` is along the docking axis, `x` and `y`
12062
+ * are the sideways and vertical offsets, so the line-of-sight angles off the
12063
+ * port's boresight are `atan(x / z)` and `atan(y / z)`.
9498
12064
  */
9499
12065
  relativePosition: Vec3Of<"m">;
9500
- /** The target port's velocity relative to the own port, m/s. */
12066
+ /**
12067
+ * The target port's velocity relative to the own port, m/s, in the own port's
12068
+ * axes like `DockAlignment.relativePosition`.
12069
+ */
9501
12070
  relativeVelocity: Vec3Of<"m/s">;
9502
12071
  /**
9503
12072
  * Metres: `DockAlignment.relativePosition`'s magnitude, provided directly so a
@@ -9510,6 +12079,29 @@ export interface DockAlignment {
9510
12079
  * transform was unavailable this tick.
9511
12080
  */
9512
12081
  forwardDot?: Value<"1"> | null;
12082
+ /**
12083
+ * The active vessel's own docking port the alignment is measured from: the one
12084
+ * nearest the target that is not `DockingPortState.Disabled`. Null only when
12085
+ * the game did not report its state this tick.
12086
+ */
12087
+ ownPortState?: DockingPortState | null;
12088
+ /**
12089
+ * The targeted port's state. Null only when the game did not report it this
12090
+ * tick.
12091
+ */
12092
+ targetPortState?: DockingPortState | null;
12093
+ /**
12094
+ * The targeted port's owning vessel's KSP `Vessel.persistentId`, the id a
12095
+ * camera marker names the vessel by. Null only when the game did not report it
12096
+ * this tick.
12097
+ */
12098
+ targetVesselPersistentId?: number | null;
12099
+ /**
12100
+ * The targeted port's KSP `Part.persistentId`, the id a camera marker names
12101
+ * the part by. Not `Part.flightID`, the id `vessel.target` carries. Null only
12102
+ * when the game did not report it this tick.
12103
+ */
12104
+ targetPortPersistentId?: number | null;
9513
12105
  /** The payload's provenance (`"vessel:<guid>"`). */
9514
12106
  meta: PayloadMeta;
9515
12107
  }
@@ -9590,7 +12182,14 @@ export declare enum VesselType {
9590
12182
  /** A part dropped from a vessel, such as a piece of ground equipment. */
9591
12183
  DroppedPart = 13,
9592
12184
  /** KSP's own unknown type, or a type this contract does not recognise. */
9593
- Unknown = 14
12185
+ Unknown = 14,
12186
+ /** A spaceplane or aircraft. */
12187
+ Plane = 15,
12188
+ /**
12189
+ * A part deployed on the ground by Breaking Ground that is neither a
12190
+ * controller nor a science part.
12191
+ */
12192
+ DeployedGroundPart = 16
9594
12193
  }
9595
12194
  /**
9596
12195
  * How an orbit patch begins or ends, KSP's `Orbit.PatchTransitionType` (read
@@ -10293,7 +12892,12 @@ export interface VesselManeuver {
10293
12892
  * trajectory can be trusted.
10294
12893
  */
10295
12894
  export interface VesselOrbit {
10296
- /** Index into `trackingStation.bodies` of the body this orbit is around. */
12895
+ /**
12896
+ * Index into `trackingStation.bodies` of the body this orbit is around.
12897
+ * Reckonable past the sphere-of-influence change that ends this patch: a
12898
+ * client carries it, with the elements and `VesselOrbit.mu`, onto the next
12899
+ * patch of `VesselOrbit.patches`.
12900
+ */
10297
12901
  referenceBodyIndex: number;
10298
12902
  /** Semi-major axis, in metres. */
10299
12903
  sma: Value<"m">;
@@ -10528,27 +13132,23 @@ export interface OrbitEncounter {
10528
13132
  bodyIndex?: number | null;
10529
13133
  }
10530
13134
  /**
10531
- * KSP's own maintained state vector for the active vessel (`Orbit.pos` and
10532
- * `Orbit.vel`), relative to the body it orbits. Read `vessel.orbit` for
10533
- * altitude and velocity.
13135
+ * KSP's own maintained state vector for the active vessel, relative to the
13136
+ * body it orbits, in the fixed frame. Read `vessel.orbit` for altitude and
13137
+ * velocity.
10534
13138
  *
10535
13139
  * Absent when the state vector or the frame flag could not be read.
10536
13140
  *
10537
- * `VesselOrbitTruth.frameRotating` says which frame the vectors are in, and a
10538
- * comparison must gate on it. When it is false they are in the fixed,
10539
- * non-rotating frame the orbital elements are defined against, and are
10540
- * directly comparable to a Kepler propagation of those elements. When it is
10541
- * true (KSP switches to this below a body's `inverseRotThresholdAltitude`: low
10542
- * orbit, atmospheric flight, landed) they are in a frame co-rotating with the
10543
- * body's spin, and differ from a fixed-frame propagation by a rotation about
10544
- * the polar axis that grows with time.
13141
+ * The vectors are always in the fixed, non-rotating frame the orbital elements
13142
+ * are defined against, whatever the vessel's altitude, so they are directly
13143
+ * comparable to a Kepler propagation of those elements.
13144
+ * `VesselOrbitTruth.frameRotating` is always false.
10545
13145
  *
10546
13146
  * @category Orbits and trajectories
10547
13147
  */
10548
13148
  export interface VesselOrbitTruth {
10549
13149
  /**
10550
- * Position in metres relative to the body the vessel orbits, KSP's
10551
- * `Orbit.pos`, in the frame `VesselOrbitTruth.frameRotating` names.
13150
+ * Position in metres relative to the body the vessel orbits, KSP's `Orbit.pos`
13151
+ * taken into the fixed frame.
10552
13152
  *
10553
13153
  * To check element-to-position math, compare against the reported value, never
10554
13154
  * a reckoned one: reckoning applies the same Kepler propagator being checked,
@@ -10556,14 +13156,13 @@ export interface VesselOrbitTruth {
10556
13156
  */
10557
13157
  position: Vec3Of<"m">;
10558
13158
  /**
10559
- * Velocity in m/s relative to the body the vessel orbits, KSP's `Orbit.vel`,
10560
- * in the frame `VesselOrbitTruth.frameRotating` names.
13159
+ * Velocity in m/s relative to the body the vessel orbits, KSP's `Orbit.vel`
13160
+ * taken into the fixed frame.
10561
13161
  */
10562
13162
  velocity: Vec3Of<"m/s">;
10563
13163
  /**
10564
- * The reference body's `CelestialBody.inverseRotation`: true when
10565
- * `VesselOrbitTruth.position` and `VesselOrbitTruth.velocity` are in a frame
10566
- * co-rotating with the body, false when they are in the fixed inertial frame.
13164
+ * Always false: `VesselOrbitTruth.position` and `VesselOrbitTruth.velocity`
13165
+ * are in the fixed inertial frame, never one co-rotating with the body.
10567
13166
  */
10568
13167
  frameRotating: boolean;
10569
13168
  /** The payload's provenance (`"vessel:<guid>"`). */
@@ -10600,9 +13199,9 @@ export interface VesselParts {
10600
13199
  * One part in the `VesselParts.parts` tree. `VesselPart.id`,
10601
13200
  * `VesselPart.name`, `VesselPart.position`, `VesselPart.dryMass`,
10602
13201
  * `VesselPart.inverseStage` and `VesselPart.maxTemp` are always present;
10603
- * `VesselPart.parentId` (null for the root), `VesselPart.up`, the current and
10604
- * skin temperatures (unset before physics runs) and
10605
- * `VesselPart.fuelLineTargetId` are nullable.
13202
+ * `VesselPart.parentId` (null for the root), `VesselPart.up`,
13203
+ * `VesselPart.forward`, the current and skin temperatures (unset before
13204
+ * physics runs) and `VesselPart.fuelLineTargetId` are nullable.
10606
13205
  *
10607
13206
  * **Join key.** `VesselPart.id` is `Part.flightID` as a string, the same form
10608
13207
  * the `partId` of `parts.power` and `parts.robotics` uses, so a part can be
@@ -10641,8 +13240,38 @@ export interface VesselPart {
10641
13240
  * thrust glyphs, as a unit vector in the vessel's frame. `null` when absent.
10642
13241
  */
10643
13242
  up?: Vec3Of<"1"> | null;
13243
+ /**
13244
+ * The part's local forward axis (`Part.orgRot * Vector3.forward`) as a unit
13245
+ * vector in the vessel's frame. With `VesselPart.up` it fixes the part's whole
13246
+ * rotation, including the turn about its up axis that sets which way a fin or
13247
+ * a radial part faces. `null` when absent.
13248
+ */
13249
+ forward?: Vec3Of<"1"> | null;
10644
13250
  /** The part's bounding box, in the part's own frame. Always present. */
10645
13251
  bounds: PartBounds;
13252
+ /**
13253
+ * The key of this part's 3D shape: subscribe to `parts.shape.` followed by
13254
+ * this key for its `PartShape`. Parts of the same kind and variant share a
13255
+ * key. `null` when the part's kind could not be read.
13256
+ */
13257
+ shape?: string | null;
13258
+ /**
13259
+ * The meshes of this part that do not stand as its `PartShape` has them, each
13260
+ * with where it stands now and whether it is drawn: a deployed leg, an open
13261
+ * bay door, a turned nozzle, a shroud switched off. A mesh not listed is drawn
13262
+ * as the shape has it. `null` when every mesh does. A part read from a saved
13263
+ * craft or an unloaded craft stands as built, so its only rows are the
13264
+ * structures it shows or hides by what is attached to it, such as a fairing's
13265
+ * interstage truss.
13266
+ */
13267
+ shapePoses?: PartShapePose[] | null;
13268
+ /**
13269
+ * The shell of a procedural fairing, as rings stacked along its axis. `null`
13270
+ * on every part that is not a procedural fairing. On a fairing,
13271
+ * `FairingShell.rings` is empty when no shell stands: never built, or
13272
+ * jettisoned.
13273
+ */
13274
+ fairing?: FairingShell | null;
10646
13275
  /** `Part.mass`: dry mass (tonnes). Null when it could not be read. */
10647
13276
  dryMass?: Value<"t"> | null;
10648
13277
  /**
@@ -10729,6 +13358,11 @@ export interface VesselPart {
10729
13358
  * action group's human-readable caption from this.
10730
13359
  */
10731
13360
  actionBindings: ActionBinding[];
13361
+ /**
13362
+ * The part's seats. Null for a part with no seats, and on topics that do not
13363
+ * report them.
13364
+ */
13365
+ seats?: PartSeats | null;
10732
13366
  }
10733
13367
  /**
10734
13368
  * One action-group binding in `VesselPart.actionBindings`: a single part
@@ -10806,6 +13440,24 @@ export interface PartResourceFlow {
10806
13440
  * nor for storage alone. Absent otherwise.
10807
13441
  */
10808
13442
  unratedProcess?: boolean | null;
13443
+ /**
13444
+ * Whether a resource transfer can move this resource in this tank: the
13445
+ * resource allows transfer, and the tank is visible and has capacity. Null on
13446
+ * topics that do not report it.
13447
+ */
13448
+ transferable?: boolean | null;
13449
+ /**
13450
+ * The tank's direction limit. A tank set to `Out` cannot be filled by a
13451
+ * transfer and one set to `In` cannot be drawn from. Null on topics that do
13452
+ * not report it.
13453
+ */
13454
+ flowMode?: KspTankFlowMode | null;
13455
+ /**
13456
+ * The player's flow lock on this tank. It stops engines and consumers drawing
13457
+ * from the tank, and does not stop a transfer. Null on topics that do not
13458
+ * report it.
13459
+ */
13460
+ locked?: boolean | null;
10809
13461
  }
10810
13462
  /**
10811
13463
  * One module's behavioural state in `VesselPart.moduleStates`.
@@ -10818,8 +13470,7 @@ export interface PartResourceFlow {
10818
13470
  export interface PartModuleState {
10819
13471
  /**
10820
13472
  * Discriminator: `solarPanel` / `radiator` / `antenna` / `parachute` /
10821
- * `engine` / `drill` / `landingGear`. `cargoBay` is a defined vocabulary value
10822
- * that no module currently produces.
13473
+ * `engine` / `drill` / `landingGear` / `cargoBay`.
10823
13474
  */
10824
13475
  type: string;
10825
13476
  /**
@@ -10827,7 +13478,8 @@ export interface PartModuleState {
10827
13478
  * `PartModuleState.type` rather than each module's own enum spelling.
10828
13479
  *
10829
13480
  * - `extended` / `retracted` / `deploying` / `retracting`, for anything that
10830
- * animates: solar panels, radiators, antennas, landing gear.
13481
+ * animates: solar panels, radiators, antennas, landing gear, cargo bay doors
13482
+ * (`retracted` is closed, `extended` is open).
10831
13483
  * - `stowed` / `armed` / `extended` / `broken`, the parachute lifecycle.
10832
13484
  * `armed` means staged and waiting for its atmospheric trigger, which is not
10833
13485
  * the same as deployed.
@@ -10846,36 +13498,57 @@ export interface PartModuleState {
10846
13498
  flameout?: boolean | null;
10847
13499
  }
10848
13500
  /**
10849
- * A `VesselPart`'s local bounding box: `PartBounds.size` is the part's
10850
- * `prefabSize` (a per-part-type constant approximating its rendered bounds),
10851
- * `PartBounds.center` the mesh-centre offset from the part's own origin
10852
- * (`Part.boundsCentroidOffset`). A fuel-line part reports bounds wrapping the
10853
- * whole conduit, as KSP does.
13501
+ * A `VesselPart`'s box: the union of the bounds of every mesh in the part's
13502
+ * own model, whatever its deploy or animation state, so an engine's hidden
13503
+ * shroud still counts. Parts attached to this one are not included.
10854
13504
  *
10855
- * Both are in the part's own frame (`part-local`), never the vessel's: they
10856
- * are authored fields of the part's config node, so one value has to serve
10857
- * every instance of that part however it was assembled. A consumer placing the
10858
- * box on a ship rotates both by that part's `orgRot` before adding
13505
+ * Its size and centre are in the part's own frame (`part-local`), never the
13506
+ * vessel's. A consumer placing the box on a ship rotates both by the part's
13507
+ * rotation (`VesselPart.up` and `VesselPart.forward`) before adding
10859
13508
  * `VesselPart.position`, which is `vessel-local`.
10860
13509
  *
10861
13510
  * @category Parts
10862
13511
  */
10863
13512
  export interface PartBounds {
10864
- /** `Part.prefabSize`: the part's untransformed bounding-box extents (metres). */
13513
+ /**
13514
+ * The box's extent along the part's own axes (metres). Zero when the part's
13515
+ * model has no mesh.
13516
+ */
10865
13517
  size: Vec3Of<"m">;
10866
13518
  /**
10867
- * `Part.boundsCentroidOffset`: mesh-centre offset from the part's own origin
10868
- * (metres, part-local); `null` when absent.
10869
- *
10870
- * Part-local, not vessel-local: an authored per-part-type constant like
10871
- * `PartBounds.size` beside it, so one value serves every instance of the part
10872
- * at whatever attitude it was assembled at. `VesselPart.position` is
10873
- * `vessel-local`, so adding the two raw mixes frames and lands the box
10874
- * somewhere the part is not; rotate this one by the part's `orgRot` first.
13519
+ * The box's centre as an offset from the part's own origin (metres,
13520
+ * part-local); `null` when the part's model has no mesh. Turn it by the part's
13521
+ * rotation before adding it to `VesselPart.position`.
10875
13522
  */
10876
13523
  center?: Vec3Of<"m"> | null;
10877
13524
  }
10878
13525
  /**
13526
+ * A procedural fairing's shell: rings stacked along `FairingShell.axis` from
13527
+ * `FairingShell.pivot`, joined by straight panels. The shell is not part of
13528
+ * the fairing's `PartShape`, which holds its base alone, so a drawing of the
13529
+ * fairing draws its shell from these rings.
13530
+ *
13531
+ * @category Parts
13532
+ */
13533
+ export interface FairingShell {
13534
+ /** The point the rings are measured from, in the part's own frame (metres). */
13535
+ pivot: Vec3Of<"m">;
13536
+ /**
13537
+ * The direction the rings stack along, as a unit vector in the part's own
13538
+ * frame.
13539
+ */
13540
+ axis: Vec3Of<"1">;
13541
+ /**
13542
+ * The rings from the base up, as pairs: each ring's height along
13543
+ * `FairingShell.axis` from `FairingShell.pivot`, then its radius, both in
13544
+ * metres (`h0, r0, h1, r1, ...`). Heights rise from one ring to the next. A
13545
+ * closed shell ends in a ring of radius 0, its nose tip; a shell open at the
13546
+ * top ends in a ring with a radius. Always an even count, and empty when no
13547
+ * shell stands.
13548
+ */
13549
+ rings: Value<"m">[];
13550
+ }
13551
+ /**
10879
13552
  * The active vessel's physics-simulation regime, derived from KSP's own
10880
13553
  * `Vessel.loaded` and `Vessel.packed` flags. It is a discrete enum in its own
10881
13554
  * right, not a quality band on `OrbitPayloadMeta.quality`. A widget that
@@ -11020,15 +13693,17 @@ export interface VesselPropulsion {
11020
13693
  */
11021
13694
  export interface ResourceAmount {
11022
13695
  /**
11023
- * How much of the resource the vessel holds now, the amount
11024
- * `Vessel.GetConnectedResourceTotals` reports. `0` with a positive
13696
+ * How much of the resource the vessel holds now, the amount the game reports
13697
+ * for the parts connected to each other, plus every part's own amount of a
13698
+ * resource that never flows between parts. `0` with a positive
11025
13699
  * `ResourceAmount.max` is a real reading: carried and empty.
11026
13700
  */
11027
13701
  current: Value<"units">;
11028
13702
  /**
11029
- * The vessel's capacity for the resource, the maximum
11030
- * `Vessel.GetConnectedResourceTotals` reports. Always greater than zero: a
11031
- * resource with no capacity is left out of the map.
13703
+ * The vessel's capacity for the resource, the capacity of the connected parts,
13704
+ * plus every part's own capacity for a resource that never flows between
13705
+ * parts. Always greater than zero: a resource with no capacity is left out of
13706
+ * the map.
11032
13707
  */
11033
13708
  max: Value<"units">;
11034
13709
  /**
@@ -11045,9 +13720,10 @@ export interface ResourceAmount {
11045
13720
  * current amount and capacity. Every message holds the whole map. No value is
11046
13721
  * ever a sentinel such as `-1`.
11047
13722
  *
11048
- * Only these stock resources are reported: `LiquidFuel`, `Oxidizer`,
11049
- * `SolidFuel`, `MonoPropellant`, `ElectricCharge`, `XenonGas`, `Ore` and
11050
- * `Ablator`.
13723
+ * Every resource the game defines is reported when the vessel has capacity for
13724
+ * it: the stock fuels (`LiquidFuel`, `Oxidizer`, `SolidFuel`,
13725
+ * `MonoPropellant`, `ElectricCharge`, `XenonGas`, `Ore`, `Ablator`) and any a
13726
+ * mod adds, such as life support supplies.
11051
13727
  *
11052
13728
  * **Absence.**
11053
13729
  *
@@ -11083,8 +13759,8 @@ export interface VesselResources {
11083
13759
  meta: PayloadMeta;
11084
13760
  }
11085
13761
  /**
11086
- * The active vessel's stage and part counts. Absent when there is no active
11087
- * vessel.
13762
+ * The active vessel's current stage and part count. Absent when there is no
13763
+ * active vessel.
11088
13764
  *
11089
13765
  * `VesselStructure.currentStage` uses KSP's own staging numbering unchanged,
11090
13766
  * which runs inverted relative to the staging list as drawn: this contract
@@ -11099,11 +13775,6 @@ export interface VesselStructure {
11099
13775
  */
11100
13776
  currentStage: number;
11101
13777
  /**
11102
- * Number of stages: the highest `Part.inverseStage` on the vessel plus one.
11103
- * Null when the vessel has no parts this tick.
11104
- */
11105
- stageCount?: Value<"count"> | null;
11106
- /**
11107
13778
  * Number of parts on the vessel. Null when the vessel's part list could not be
11108
13779
  * read this tick.
11109
13780
  */
@@ -11193,7 +13864,10 @@ export declare enum TargetKind {
11193
13864
  * Because it comes from the same provider as the trajectory, the encounter and
11194
13865
  * the trajectory it lies on are always the same physics. Null on
11195
13866
  * `VesselTarget` when there is no target, no frame the provider can reach both
11196
- * objects in, or no encounter inside the window it was asked about.
13867
+ * objects in, no encounter inside the window it was asked about, or an
13868
+ * encounter later than the orbit model stands behind for either object. The
13869
+ * next encounter is the one reported: when the model cannot stand behind it,
13870
+ * the field is null and no later encounter is given in its place.
11197
13871
  *
11198
13872
  * @category Orbits and trajectories
11199
13873
  */
@@ -11205,11 +13879,20 @@ export interface ClosestApproach {
11205
13879
  time: Value<"ut">;
11206
13880
  /** Separation (metres) at `ClosestApproach.time`. */
11207
13881
  distance: Value<"m">;
13882
+ /**
13883
+ * What computed this approach: `TrajectoryKind.Analytic` for a two-body
13884
+ * solution of both objects' conics, or `TrajectoryKind.Integrated` for one
13885
+ * taken from integrated trajectories. `TrajectoryKind.Unspecified` when the
13886
+ * provider did not say. Read it beside the vessel orbit's own
13887
+ * `PropagationHorizon.trajectoryKind`: an analytic approach on an integrated
13888
+ * trajectory is a two-body estimate the craft will drift from.
13889
+ */
13890
+ trajectoryKind: TrajectoryKind;
11208
13891
  }
11209
13892
  /**
11210
- * The active vessel's current target only.
11211
- * `VesselTarget.relativePosition`/`VesselTarget.relativeVelocity` both use the
11212
- * one `Vec3` shape.
13893
+ * The active vessel's current target, with nothing about any other vessel's
13894
+ * target. `VesselTarget.relativePosition`/`VesselTarget.relativeVelocity` both
13895
+ * use the one `Vec3` shape.
11213
13896
  *
11214
13897
  * `VesselTarget.orbit` reuses `VesselOrbit` itself (not a separate "target
11215
13898
  * orbit" shape), so a client propagates a target the same way as the active
@@ -11268,6 +13951,23 @@ export interface VesselTarget {
11268
13951
  */
11269
13952
  relativeVelocity?: Vec3Of<"m/s"> | null;
11270
13953
  /**
13954
+ * The target's position relative to the active vessel, in metres, in the
13955
+ * active vessel's orbit frame: `x` radial, `y` along-track, `z` normal (see
13956
+ * Frames.OrbitRelative). A target above the vessel reads positive `x`, one
13957
+ * ahead of it along its orbit positive `y`. Null when
13958
+ * `VesselTarget.relativePosition` is null or the vessel's position and
13959
+ * velocity define no orbit plane this tick.
13960
+ */
13961
+ orbitRelativePosition?: Vec3Of<"m"> | null;
13962
+ /**
13963
+ * The rate of change of `VesselTarget.orbitRelativePosition` in m/s, in the
13964
+ * same orbit frame: the target's velocity relative to the active vessel with
13965
+ * the frame's own turn removed, so two craft in the same orbit holding a fixed
13966
+ * range read about zero. Null exactly when
13967
+ * `VesselTarget.orbitRelativePosition` is.
13968
+ */
13969
+ orbitRelativeVelocity?: Vec3Of<"m/s"> | null;
13970
+ /**
11271
13971
  * The target's orbit. Null when the target has no orbit (it is landed, say, or
11272
13972
  * its orbit could not be resolved this tick).
11273
13973
  */
@@ -11436,6 +14136,15 @@ export interface WarpState {
11436
14136
  */
11437
14137
  warpRateIndex: number;
11438
14138
  /**
14139
+ * The highest rung of the warp rate table the game lets the craft use right
14140
+ * now, for the rung table of the mode in force. Near a body the game limits
14141
+ * warp by altitude, so this falls as the craft descends and rises as it
14142
+ * climbs; a `WarpState.warpRateIndex` above it is a rung the game is bringing
14143
+ * down. Null when the game has no warp controller or no active craft to read a
14144
+ * limit for.
14145
+ */
14146
+ maxWarpRateIndex?: number | null;
14147
+ /**
11439
14148
  * Which warp mode is in force, on-rails or physics (KSP's
11440
14149
  * `TimeWarp.WarpMode`).
11441
14150
  */
@@ -11449,9 +14158,10 @@ export interface WarpState {
11449
14158
  * when the game has no warp controller to read it off (no scene that can
11450
14159
  * warp).
11451
14160
  *
11452
- * The table is configuration, not a constant: Kopernicus and RealSolarSystem
11453
- * both republish it, so a rung stock runs at 100x may run at 10000x on another
11454
- * install. Read the rate here rather than assuming stock's table.
14161
+ * The table is configuration, not a constant: planet-pack mods such as
14162
+ * Kopernicus and RealSolarSystem republish it, so a rung stock runs at 100x
14163
+ * may run at 10000x on another install. Read the rate here rather than
14164
+ * assuming stock's table.
11455
14165
  */
11456
14166
  warpRates?: Value<"1">[] | null;
11457
14167
  /**
@@ -11489,10 +14199,10 @@ export interface WarpState {
11489
14199
  * finest spacing the record ever has, and `WarpState.observationQuantumUt` at
11490
14200
  * 1x. Constant for the life of the mod.
11491
14201
  *
11492
- * The chord between two samples this far apart is the resolution every channel
11493
- * is sampled at, and a chart can draw it. Where the quantum is wider, the span
11494
- * beyond this is one the sampling skipped because of warp, and a line across
11495
- * it that no model of the value carries asserts a path nothing observed.
14202
+ * A straight line between two samples this far apart is as fine as the record
14203
+ * gets, so a chart can draw it. Where the quantum is wider, the span beyond
14204
+ * this is one the sampling skipped because of warp, and a line across it that
14205
+ * no model of the value carries asserts a path nothing observed.
11496
14206
  */
11497
14207
  sampleIntervalUt: Value<"s">;
11498
14208
  /** The payload's provenance (always `"game"`). */