@omnitron-dev/omnitron 0.3.0 → 0.3.2

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 (1786) hide show
  1. package/README.md +579 -0
  2. package/data/operations/managed-kernel.mjs +302 -0
  3. package/data/operations/stage-kernel.mjs +125 -0
  4. package/dist/BUILD.json +4 -3
  5. package/dist/cli/exit-after-output.d.ts +3 -0
  6. package/dist/cli/exit-after-output.d.ts.map +1 -0
  7. package/dist/cli/exit-after-output.js +11 -0
  8. package/dist/cli/exit-after-output.js.map +1 -0
  9. package/dist/cli/installed.d.ts +3 -0
  10. package/dist/cli/installed.d.ts.map +1 -0
  11. package/dist/cli/installed.js +17 -0
  12. package/dist/cli/installed.js.map +1 -0
  13. package/dist/cli/omnitron.js +455 -99
  14. package/dist/cli/omnitron.js.map +1 -1
  15. package/dist/cli/output-command.d.ts +13 -0
  16. package/dist/cli/output-command.d.ts.map +1 -0
  17. package/dist/cli/output-command.js +48 -0
  18. package/dist/cli/output-command.js.map +1 -0
  19. package/dist/cluster/cluster.rpc-service.d.ts +9 -77
  20. package/dist/cluster/cluster.rpc-service.d.ts.map +1 -1
  21. package/dist/cluster/cluster.rpc-service.js +20 -107
  22. package/dist/cluster/cluster.rpc-service.js.map +1 -1
  23. package/dist/cluster/enrollment.d.ts +9 -0
  24. package/dist/cluster/enrollment.d.ts.map +1 -0
  25. package/dist/cluster/enrollment.js +49 -0
  26. package/dist/cluster/enrollment.js.map +1 -0
  27. package/dist/cluster/index.d.ts +1 -1
  28. package/dist/cluster/index.d.ts.map +1 -1
  29. package/dist/cluster/leader-election.d.ts +39 -211
  30. package/dist/cluster/leader-election.d.ts.map +1 -1
  31. package/dist/cluster/leader-election.js +235 -512
  32. package/dist/cluster/leader-election.js.map +1 -1
  33. package/dist/cluster/mesh-link.d.ts +18 -51
  34. package/dist/cluster/mesh-link.d.ts.map +1 -1
  35. package/dist/cluster/mesh-link.js +66 -78
  36. package/dist/cluster/mesh-link.js.map +1 -1
  37. package/dist/cluster/mesh.d.ts +3 -1
  38. package/dist/cluster/mesh.d.ts.map +1 -1
  39. package/dist/cluster/mesh.js +76 -60
  40. package/dist/cluster/mesh.js.map +1 -1
  41. package/dist/cluster/slave-connector.d.ts +42 -6
  42. package/dist/cluster/slave-connector.d.ts.map +1 -1
  43. package/dist/cluster/slave-connector.js +349 -196
  44. package/dist/cluster/slave-connector.js.map +1 -1
  45. package/dist/cluster/standalone-infrastructure.d.ts +3 -0
  46. package/dist/cluster/standalone-infrastructure.d.ts.map +1 -0
  47. package/dist/cluster/standalone-infrastructure.js +25 -0
  48. package/dist/cluster/standalone-infrastructure.js.map +1 -0
  49. package/dist/cluster/stop-authority.d.ts +45 -0
  50. package/dist/cluster/stop-authority.d.ts.map +1 -0
  51. package/dist/cluster/stop-authority.js +112 -0
  52. package/dist/cluster/stop-authority.js.map +1 -0
  53. package/dist/commands/access.d.ts +9 -0
  54. package/dist/commands/access.d.ts.map +1 -0
  55. package/dist/commands/access.js +45 -0
  56. package/dist/commands/access.js.map +1 -0
  57. package/dist/commands/audit.d.ts +2 -0
  58. package/dist/commands/audit.d.ts.map +1 -1
  59. package/dist/commands/audit.js +9 -4
  60. package/dist/commands/audit.js.map +1 -1
  61. package/dist/commands/backend.d.ts +17 -0
  62. package/dist/commands/backend.d.ts.map +1 -0
  63. package/dist/commands/backend.js +264 -0
  64. package/dist/commands/backend.js.map +1 -0
  65. package/dist/commands/backup.d.ts +5 -0
  66. package/dist/commands/backup.d.ts.map +1 -1
  67. package/dist/commands/backup.js +17 -2
  68. package/dist/commands/backup.js.map +1 -1
  69. package/dist/commands/cluster.d.ts.map +1 -1
  70. package/dist/commands/cluster.js +33 -42
  71. package/dist/commands/cluster.js.map +1 -1
  72. package/dist/commands/daemon-cmd.d.ts.map +1 -1
  73. package/dist/commands/daemon-cmd.js +14 -3
  74. package/dist/commands/daemon-cmd.js.map +1 -1
  75. package/dist/commands/deploy.d.ts +4 -4
  76. package/dist/commands/deploy.js +4 -4
  77. package/dist/commands/discover.d.ts +2 -2
  78. package/dist/commands/discover.js +2 -2
  79. package/dist/commands/doctor.d.ts +11 -29
  80. package/dist/commands/doctor.d.ts.map +1 -1
  81. package/dist/commands/doctor.js +47 -45
  82. package/dist/commands/doctor.js.map +1 -1
  83. package/dist/commands/files.d.ts +19 -0
  84. package/dist/commands/files.d.ts.map +1 -0
  85. package/dist/commands/files.js +226 -0
  86. package/dist/commands/files.js.map +1 -0
  87. package/dist/commands/fleet-asking.d.ts +2 -2
  88. package/dist/commands/fleet-asking.js +2 -2
  89. package/dist/commands/fleet-recover.d.ts +2 -0
  90. package/dist/commands/fleet-recover.d.ts.map +1 -0
  91. package/dist/commands/fleet-recover.js +30 -0
  92. package/dist/commands/fleet-recover.js.map +1 -0
  93. package/dist/commands/fleet-rollout.d.ts +25 -0
  94. package/dist/commands/fleet-rollout.d.ts.map +1 -0
  95. package/dist/commands/fleet-rollout.js +155 -0
  96. package/dist/commands/fleet-rollout.js.map +1 -0
  97. package/dist/commands/fleet.d.ts.map +1 -1
  98. package/dist/commands/fleet.js +1 -0
  99. package/dist/commands/fleet.js.map +1 -1
  100. package/dist/commands/health-check.d.ts.map +1 -1
  101. package/dist/commands/health-check.js +13 -6
  102. package/dist/commands/health-check.js.map +1 -1
  103. package/dist/commands/host-ingress.d.ts +3 -0
  104. package/dist/commands/host-ingress.d.ts.map +1 -0
  105. package/dist/commands/host-ingress.js +31 -0
  106. package/dist/commands/host-ingress.js.map +1 -0
  107. package/dist/commands/infra.d.ts +7 -4
  108. package/dist/commands/infra.d.ts.map +1 -1
  109. package/dist/commands/infra.js +152 -60
  110. package/dist/commands/infra.js.map +1 -1
  111. package/dist/commands/logs.d.ts +7 -24
  112. package/dist/commands/logs.d.ts.map +1 -1
  113. package/dist/commands/logs.js +117 -41
  114. package/dist/commands/logs.js.map +1 -1
  115. package/dist/commands/metrics.d.ts.map +1 -1
  116. package/dist/commands/metrics.js +7 -1
  117. package/dist/commands/metrics.js.map +1 -1
  118. package/dist/commands/migrate.d.ts +8 -0
  119. package/dist/commands/migrate.d.ts.map +1 -0
  120. package/dist/commands/migrate.js +64 -0
  121. package/dist/commands/migrate.js.map +1 -0
  122. package/dist/commands/node-reconcile.d.ts +8 -0
  123. package/dist/commands/node-reconcile.d.ts.map +1 -0
  124. package/dist/commands/node-reconcile.js +49 -0
  125. package/dist/commands/node-reconcile.js.map +1 -0
  126. package/dist/commands/node.d.ts +1 -21
  127. package/dist/commands/node.d.ts.map +1 -1
  128. package/dist/commands/node.js +35 -27
  129. package/dist/commands/node.js.map +1 -1
  130. package/dist/commands/output.d.ts +3 -9
  131. package/dist/commands/output.d.ts.map +1 -1
  132. package/dist/commands/output.js +34 -25
  133. package/dist/commands/output.js.map +1 -1
  134. package/dist/commands/pipeline.d.ts +11 -2
  135. package/dist/commands/pipeline.d.ts.map +1 -1
  136. package/dist/commands/pipeline.js +82 -15
  137. package/dist/commands/pipeline.js.map +1 -1
  138. package/dist/commands/project.d.ts +10 -2
  139. package/dist/commands/project.d.ts.map +1 -1
  140. package/dist/commands/project.js +69 -3
  141. package/dist/commands/project.js.map +1 -1
  142. package/dist/commands/release-store.js +1 -1
  143. package/dist/commands/release-store.js.map +1 -1
  144. package/dist/commands/release.d.ts +5 -12
  145. package/dist/commands/release.d.ts.map +1 -1
  146. package/dist/commands/release.js +144 -36
  147. package/dist/commands/release.js.map +1 -1
  148. package/dist/commands/remote.d.ts +3 -3
  149. package/dist/commands/remote.js +3 -3
  150. package/dist/commands/scale.d.ts +1 -4
  151. package/dist/commands/scale.d.ts.map +1 -1
  152. package/dist/commands/scale.js +39 -19
  153. package/dist/commands/scale.js.map +1 -1
  154. package/dist/commands/secret-input.d.ts +3 -0
  155. package/dist/commands/secret-input.d.ts.map +1 -0
  156. package/dist/commands/secret-input.js +36 -0
  157. package/dist/commands/secret-input.js.map +1 -0
  158. package/dist/commands/secret.d.ts +4 -2
  159. package/dist/commands/secret.d.ts.map +1 -1
  160. package/dist/commands/secret.js +12 -2
  161. package/dist/commands/secret.js.map +1 -1
  162. package/dist/commands/service-resident.d.ts +25 -0
  163. package/dist/commands/service-resident.d.ts.map +1 -0
  164. package/dist/commands/service-resident.js +236 -0
  165. package/dist/commands/service-resident.js.map +1 -0
  166. package/dist/commands/service-units.d.ts +13 -1
  167. package/dist/commands/service-units.d.ts.map +1 -1
  168. package/dist/commands/service-units.js +38 -16
  169. package/dist/commands/service-units.js.map +1 -1
  170. package/dist/commands/service.d.ts +2 -24
  171. package/dist/commands/service.d.ts.map +1 -1
  172. package/dist/commands/service.js +89 -7
  173. package/dist/commands/service.js.map +1 -1
  174. package/dist/commands/stack.d.ts +11 -6
  175. package/dist/commands/stack.d.ts.map +1 -1
  176. package/dist/commands/stack.js +212 -38
  177. package/dist/commands/stack.js.map +1 -1
  178. package/dist/commands/start.d.ts +0 -21
  179. package/dist/commands/start.d.ts.map +1 -1
  180. package/dist/commands/start.js +33 -43
  181. package/dist/commands/start.js.map +1 -1
  182. package/dist/commands/status.d.ts +1 -5
  183. package/dist/commands/status.d.ts.map +1 -1
  184. package/dist/commands/status.js +5 -1
  185. package/dist/commands/status.js.map +1 -1
  186. package/dist/commands/stop.d.ts +0 -22
  187. package/dist/commands/stop.d.ts.map +1 -1
  188. package/dist/commands/stop.js +26 -86
  189. package/dist/commands/stop.js.map +1 -1
  190. package/dist/commands/system.d.ts +4 -0
  191. package/dist/commands/system.d.ts.map +1 -0
  192. package/dist/commands/system.js +41 -0
  193. package/dist/commands/system.js.map +1 -0
  194. package/dist/commands/terminal.d.ts +7 -0
  195. package/dist/commands/terminal.d.ts.map +1 -0
  196. package/dist/commands/terminal.js +184 -0
  197. package/dist/commands/terminal.js.map +1 -0
  198. package/dist/commands/topology.d.ts +3 -0
  199. package/dist/commands/topology.d.ts.map +1 -0
  200. package/dist/commands/topology.js +107 -0
  201. package/dist/commands/topology.js.map +1 -0
  202. package/dist/commands/tor.d.ts +1 -1
  203. package/dist/commands/tor.js +2 -2
  204. package/dist/commands/up.d.ts +4 -54
  205. package/dist/commands/up.d.ts.map +1 -1
  206. package/dist/commands/up.js +41 -98
  207. package/dist/commands/up.js.map +1 -1
  208. package/dist/commands/webapp.d.ts +0 -9
  209. package/dist/commands/webapp.d.ts.map +1 -1
  210. package/dist/commands/webapp.js +116 -69
  211. package/dist/commands/webapp.js.map +1 -1
  212. package/dist/config/app-path.d.ts +4 -0
  213. package/dist/config/app-path.d.ts.map +1 -0
  214. package/dist/config/app-path.js +6 -0
  215. package/dist/config/app-path.js.map +1 -0
  216. package/dist/config/defaults.d.ts.map +1 -1
  217. package/dist/config/defaults.js +9 -3
  218. package/dist/config/defaults.js.map +1 -1
  219. package/dist/config/define-ecosystem.d.ts.map +1 -1
  220. package/dist/config/define-ecosystem.js +12 -0
  221. package/dist/config/define-ecosystem.js.map +1 -1
  222. package/dist/config/index.d.ts +3 -1
  223. package/dist/config/index.d.ts.map +1 -1
  224. package/dist/config/index.js +1 -1
  225. package/dist/config/index.js.map +1 -1
  226. package/dist/config/loader-child.d.ts +2 -0
  227. package/dist/config/loader-child.d.ts.map +1 -0
  228. package/dist/config/loader-child.js +56 -0
  229. package/dist/config/loader-child.js.map +1 -0
  230. package/dist/config/loader.d.ts +7 -2
  231. package/dist/config/loader.d.ts.map +1 -1
  232. package/dist/config/loader.js +14 -27
  233. package/dist/config/loader.js.map +1 -1
  234. package/dist/config/saved.d.ts +67 -0
  235. package/dist/config/saved.d.ts.map +1 -0
  236. package/dist/config/saved.js +81 -0
  237. package/dist/config/saved.js.map +1 -0
  238. package/dist/config/types.d.ts +105 -58
  239. package/dist/config/types.d.ts.map +1 -1
  240. package/dist/daemon/backend-candidate.d.ts +32 -0
  241. package/dist/daemon/backend-candidate.d.ts.map +1 -0
  242. package/dist/daemon/backend-candidate.js +129 -0
  243. package/dist/daemon/backend-candidate.js.map +1 -0
  244. package/dist/daemon/backend-child.d.ts +5 -0
  245. package/dist/daemon/backend-child.d.ts.map +1 -0
  246. package/dist/daemon/backend-child.js +13 -0
  247. package/dist/daemon/backend-child.js.map +1 -0
  248. package/dist/daemon/backend-control.d.ts +43 -0
  249. package/dist/daemon/backend-control.d.ts.map +1 -0
  250. package/dist/daemon/backend-control.js +155 -0
  251. package/dist/daemon/backend-control.js.map +1 -0
  252. package/dist/daemon/backend-crash-recovery.d.ts +4 -0
  253. package/dist/daemon/backend-crash-recovery.d.ts.map +1 -0
  254. package/dist/daemon/backend-crash-recovery.js +136 -0
  255. package/dist/daemon/backend-crash-recovery.js.map +1 -0
  256. package/dist/daemon/backend-handoff-types.d.ts +27 -0
  257. package/dist/daemon/backend-handoff-types.d.ts.map +1 -0
  258. package/dist/daemon/backend-handoff-types.js +33 -0
  259. package/dist/daemon/backend-handoff-types.js.map +1 -0
  260. package/dist/daemon/backend-recovery-journal.d.ts +30 -0
  261. package/dist/daemon/backend-recovery-journal.d.ts.map +1 -0
  262. package/dist/daemon/backend-recovery-journal.js +67 -0
  263. package/dist/daemon/backend-recovery-journal.js.map +1 -0
  264. package/dist/daemon/backend-recovery-monitor.d.ts +35 -0
  265. package/dist/daemon/backend-recovery-monitor.d.ts.map +1 -0
  266. package/dist/daemon/backend-recovery-monitor.js +113 -0
  267. package/dist/daemon/backend-recovery-monitor.js.map +1 -0
  268. package/dist/daemon/backend-supervisor-entry.d.ts +2 -0
  269. package/dist/daemon/backend-supervisor-entry.d.ts.map +1 -0
  270. package/dist/daemon/backend-supervisor-entry.js +3 -0
  271. package/dist/daemon/backend-supervisor-entry.js.map +1 -0
  272. package/dist/daemon/backend-supervisor-main.d.ts +2 -0
  273. package/dist/daemon/backend-supervisor-main.d.ts.map +1 -0
  274. package/dist/daemon/backend-supervisor-main.js +45 -0
  275. package/dist/daemon/backend-supervisor-main.js.map +1 -0
  276. package/dist/daemon/backend-supervisor.d.ts +61 -0
  277. package/dist/daemon/backend-supervisor.d.ts.map +1 -0
  278. package/dist/daemon/backend-supervisor.js +339 -0
  279. package/dist/daemon/backend-supervisor.js.map +1 -0
  280. package/dist/daemon/backend-upgrade.d.ts +41 -0
  281. package/dist/daemon/backend-upgrade.d.ts.map +1 -0
  282. package/dist/daemon/backend-upgrade.js +444 -0
  283. package/dist/daemon/backend-upgrade.js.map +1 -0
  284. package/dist/daemon/backend.rpc-service.d.ts +11 -0
  285. package/dist/daemon/backend.rpc-service.d.ts.map +1 -0
  286. package/dist/daemon/backend.rpc-service.js +44 -0
  287. package/dist/daemon/backend.rpc-service.js.map +1 -0
  288. package/dist/daemon/daemon-client.d.ts +12 -79
  289. package/dist/daemon/daemon-client.d.ts.map +1 -1
  290. package/dist/daemon/daemon-client.js +28 -270
  291. package/dist/daemon/daemon-client.js.map +1 -1
  292. package/dist/daemon/daemon-entry.d.ts +0 -7
  293. package/dist/daemon/daemon-entry.d.ts.map +1 -1
  294. package/dist/daemon/daemon-entry.js +2 -115
  295. package/dist/daemon/daemon-entry.js.map +1 -1
  296. package/dist/daemon/daemon-main.d.ts +9 -0
  297. package/dist/daemon/daemon-main.d.ts.map +1 -0
  298. package/dist/daemon/daemon-main.js +105 -0
  299. package/dist/daemon/daemon-main.js.map +1 -0
  300. package/dist/daemon/daemon-scheduler.d.ts +8 -5
  301. package/dist/daemon/daemon-scheduler.d.ts.map +1 -1
  302. package/dist/daemon/daemon-scheduler.js +45 -73
  303. package/dist/daemon/daemon-scheduler.js.map +1 -1
  304. package/dist/daemon/daemon-state-store.service.d.ts +5 -39
  305. package/dist/daemon/daemon-state-store.service.d.ts.map +1 -1
  306. package/dist/daemon/daemon-state-store.service.js +30 -17
  307. package/dist/daemon/daemon-state-store.service.js.map +1 -1
  308. package/dist/daemon/daemon.d.ts +50 -79
  309. package/dist/daemon/daemon.d.ts.map +1 -1
  310. package/dist/daemon/daemon.js +769 -442
  311. package/dist/daemon/daemon.js.map +1 -1
  312. package/dist/daemon/daemon.module.d.ts +13 -11
  313. package/dist/daemon/daemon.module.d.ts.map +1 -1
  314. package/dist/daemon/daemon.module.js +139 -106
  315. package/dist/daemon/daemon.module.js.map +1 -1
  316. package/dist/daemon/daemon.rpc-service.d.ts +11 -19
  317. package/dist/daemon/daemon.rpc-service.d.ts.map +1 -1
  318. package/dist/daemon/daemon.rpc-service.js +89 -28
  319. package/dist/daemon/daemon.rpc-service.js.map +1 -1
  320. package/dist/daemon/darwin-owner-evidence.d.ts +57 -0
  321. package/dist/daemon/darwin-owner-evidence.d.ts.map +1 -0
  322. package/dist/daemon/darwin-owner-evidence.js +131 -0
  323. package/dist/daemon/darwin-owner-evidence.js.map +1 -0
  324. package/dist/daemon/database-startup.d.ts +7 -0
  325. package/dist/daemon/database-startup.d.ts.map +1 -0
  326. package/dist/daemon/database-startup.js +40 -0
  327. package/dist/daemon/database-startup.js.map +1 -0
  328. package/dist/daemon/entry-guard.d.ts +2 -0
  329. package/dist/daemon/entry-guard.d.ts.map +1 -0
  330. package/dist/daemon/entry-guard.js +34 -0
  331. package/dist/daemon/entry-guard.js.map +1 -0
  332. package/dist/daemon/execution-capabilities.d.ts +7 -0
  333. package/dist/daemon/execution-capabilities.d.ts.map +1 -0
  334. package/dist/daemon/execution-capabilities.js +23 -0
  335. package/dist/daemon/execution-capabilities.js.map +1 -0
  336. package/dist/daemon/execution-client.d.ts +88 -0
  337. package/dist/daemon/execution-client.d.ts.map +1 -0
  338. package/dist/daemon/execution-client.js +433 -0
  339. package/dist/daemon/execution-client.js.map +1 -0
  340. package/dist/daemon/execution-config.d.ts +7 -0
  341. package/dist/daemon/execution-config.d.ts.map +1 -0
  342. package/dist/daemon/execution-config.js +61 -0
  343. package/dist/daemon/execution-config.js.map +1 -0
  344. package/dist/daemon/execution-entry.d.ts +2 -0
  345. package/dist/daemon/execution-entry.d.ts.map +1 -0
  346. package/dist/daemon/execution-entry.js +3 -0
  347. package/dist/daemon/execution-entry.js.map +1 -0
  348. package/dist/daemon/execution-host.d.ts +133 -0
  349. package/dist/daemon/execution-host.d.ts.map +1 -0
  350. package/dist/daemon/execution-host.js +308 -0
  351. package/dist/daemon/execution-host.js.map +1 -0
  352. package/dist/daemon/execution-journal.d.ts +17 -0
  353. package/dist/daemon/execution-journal.d.ts.map +1 -0
  354. package/dist/daemon/execution-journal.js +75 -0
  355. package/dist/daemon/execution-journal.js.map +1 -0
  356. package/dist/daemon/execution-launcher.d.ts +12 -0
  357. package/dist/daemon/execution-launcher.d.ts.map +1 -0
  358. package/dist/daemon/execution-launcher.js +110 -0
  359. package/dist/daemon/execution-launcher.js.map +1 -0
  360. package/dist/daemon/execution-main.d.ts +2 -0
  361. package/dist/daemon/execution-main.d.ts.map +1 -0
  362. package/dist/daemon/execution-main.js +48 -0
  363. package/dist/daemon/execution-main.js.map +1 -0
  364. package/dist/daemon/execution-owner.d.ts +16 -0
  365. package/dist/daemon/execution-owner.d.ts.map +1 -0
  366. package/dist/daemon/execution-owner.js +97 -0
  367. package/dist/daemon/execution-owner.js.map +1 -0
  368. package/dist/daemon/execution-platform.d.ts +3 -0
  369. package/dist/daemon/execution-platform.d.ts.map +1 -0
  370. package/dist/daemon/execution-platform.js +23 -0
  371. package/dist/daemon/execution-platform.js.map +1 -0
  372. package/dist/daemon/execution-shutdown.d.ts +13 -0
  373. package/dist/daemon/execution-shutdown.d.ts.map +1 -0
  374. package/dist/daemon/execution-shutdown.js +30 -0
  375. package/dist/daemon/execution-shutdown.js.map +1 -0
  376. package/dist/daemon/managed-entry.d.ts +2 -0
  377. package/dist/daemon/managed-entry.d.ts.map +1 -0
  378. package/dist/daemon/managed-entry.js +3 -0
  379. package/dist/daemon/managed-entry.js.map +1 -0
  380. package/dist/daemon/managed-main.d.ts +2 -0
  381. package/dist/daemon/managed-main.d.ts.map +1 -0
  382. package/dist/daemon/managed-main.js +29 -0
  383. package/dist/daemon/managed-main.js.map +1 -0
  384. package/dist/daemon/managed-owner-build.d.ts +17 -0
  385. package/dist/daemon/managed-owner-build.d.ts.map +1 -0
  386. package/dist/daemon/managed-owner-build.js +108 -0
  387. package/dist/daemon/managed-owner-build.js.map +1 -0
  388. package/dist/daemon/managed-owner-entry.d.ts +2 -0
  389. package/dist/daemon/managed-owner-entry.d.ts.map +1 -0
  390. package/dist/daemon/managed-owner-entry.js +3 -0
  391. package/dist/daemon/managed-owner-entry.js.map +1 -0
  392. package/dist/daemon/managed-owner-main.d.ts +2 -0
  393. package/dist/daemon/managed-owner-main.d.ts.map +1 -0
  394. package/dist/daemon/managed-owner-main.js +53 -0
  395. package/dist/daemon/managed-owner-main.js.map +1 -0
  396. package/dist/daemon/managed-runtime.d.ts +39 -0
  397. package/dist/daemon/managed-runtime.d.ts.map +1 -0
  398. package/dist/daemon/managed-runtime.js +137 -0
  399. package/dist/daemon/managed-runtime.js.map +1 -0
  400. package/dist/daemon/network-publication.d.ts +5 -0
  401. package/dist/daemon/network-publication.d.ts.map +1 -0
  402. package/dist/daemon/network-publication.js +25 -0
  403. package/dist/daemon/network-publication.js.map +1 -0
  404. package/dist/daemon/owner-reconciliation.d.ts +58 -0
  405. package/dist/daemon/owner-reconciliation.d.ts.map +1 -0
  406. package/dist/daemon/owner-reconciliation.js +265 -0
  407. package/dist/daemon/owner-reconciliation.js.map +1 -0
  408. package/dist/daemon/pid-manager.d.ts +2 -0
  409. package/dist/daemon/pid-manager.d.ts.map +1 -1
  410. package/dist/daemon/pid-manager.js +5 -0
  411. package/dist/daemon/pid-manager.js.map +1 -1
  412. package/dist/daemon/private-control-client.d.ts +8 -0
  413. package/dist/daemon/private-control-client.d.ts.map +1 -0
  414. package/dist/daemon/private-control-client.js +41 -0
  415. package/dist/daemon/private-control-client.js.map +1 -0
  416. package/dist/daemon/recovery-state.d.ts +20 -0
  417. package/dist/daemon/recovery-state.d.ts.map +1 -0
  418. package/dist/daemon/recovery-state.js +53 -0
  419. package/dist/daemon/recovery-state.js.map +1 -0
  420. package/dist/daemon/rpc-connection.d.ts +29 -0
  421. package/dist/daemon/rpc-connection.d.ts.map +1 -0
  422. package/dist/daemon/rpc-connection.js +137 -0
  423. package/dist/daemon/rpc-connection.js.map +1 -0
  424. package/dist/daemon/runtime-installation.d.ts +58 -0
  425. package/dist/daemon/runtime-installation.d.ts.map +1 -0
  426. package/dist/daemon/runtime-installation.js +346 -0
  427. package/dist/daemon/runtime-installation.js.map +1 -0
  428. package/dist/daemon/runtime-launcher.d.ts +6 -0
  429. package/dist/daemon/runtime-launcher.d.ts.map +1 -0
  430. package/dist/daemon/runtime-launcher.js +45 -0
  431. package/dist/daemon/runtime-launcher.js.map +1 -0
  432. package/dist/daemon/schema-transition.d.ts +43 -0
  433. package/dist/daemon/schema-transition.d.ts.map +1 -0
  434. package/dist/daemon/schema-transition.js +239 -0
  435. package/dist/daemon/schema-transition.js.map +1 -0
  436. package/dist/daemon/spawn-daemon.d.ts +2 -0
  437. package/dist/daemon/spawn-daemon.d.ts.map +1 -1
  438. package/dist/daemon/spawn-daemon.js +4 -0
  439. package/dist/daemon/spawn-daemon.js.map +1 -1
  440. package/dist/daemon/startup-config.d.ts +77 -0
  441. package/dist/daemon/startup-config.d.ts.map +1 -0
  442. package/dist/daemon/startup-config.js +31 -0
  443. package/dist/daemon/startup-config.js.map +1 -0
  444. package/dist/daemon/startup-failure-journal.d.ts +3 -0
  445. package/dist/daemon/startup-failure-journal.d.ts.map +1 -0
  446. package/dist/daemon/startup-failure-journal.js +29 -0
  447. package/dist/daemon/startup-failure-journal.js.map +1 -0
  448. package/dist/daemon/state-store.d.ts +16 -24
  449. package/dist/daemon/state-store.d.ts.map +1 -1
  450. package/dist/daemon/state-store.js +51 -9
  451. package/dist/daemon/state-store.js.map +1 -1
  452. package/dist/daemon/supervisor-transition.d.ts +101 -0
  453. package/dist/daemon/supervisor-transition.d.ts.map +1 -0
  454. package/dist/daemon/supervisor-transition.js +503 -0
  455. package/dist/daemon/supervisor-transition.js.map +1 -0
  456. package/dist/daemon/system-guardian-cgroup.d.ts +16 -0
  457. package/dist/daemon/system-guardian-cgroup.d.ts.map +1 -0
  458. package/dist/daemon/system-guardian-cgroup.js +202 -0
  459. package/dist/daemon/system-guardian-cgroup.js.map +1 -0
  460. package/dist/daemon/system-guardian-unit.d.ts +9 -0
  461. package/dist/daemon/system-guardian-unit.d.ts.map +1 -0
  462. package/dist/daemon/system-guardian-unit.js +41 -0
  463. package/dist/daemon/system-guardian-unit.js.map +1 -0
  464. package/dist/database/connection.d.ts.map +1 -1
  465. package/dist/database/connection.js +2 -6
  466. package/dist/database/connection.js.map +1 -1
  467. package/dist/database/log-durability.d.ts +5 -0
  468. package/dist/database/log-durability.d.ts.map +1 -0
  469. package/dist/database/log-durability.js +28 -0
  470. package/dist/database/log-durability.js.map +1 -0
  471. package/dist/database/migrate.js +2 -15
  472. package/dist/database/migrate.js.map +1 -1
  473. package/dist/database/migration-registry-compatibility.d.ts +13 -0
  474. package/dist/database/migration-registry-compatibility.d.ts.map +1 -0
  475. package/dist/database/migration-registry-compatibility.js +108 -0
  476. package/dist/database/migration-registry-compatibility.js.map +1 -0
  477. package/dist/database/migration-runner.d.ts +8 -42
  478. package/dist/database/migration-runner.d.ts.map +1 -1
  479. package/dist/database/migration-runner.js +114 -123
  480. package/dist/database/migration-runner.js.map +1 -1
  481. package/dist/database/migrations/014_replication_receipts.d.ts +5 -0
  482. package/dist/database/migrations/014_replication_receipts.d.ts.map +1 -0
  483. package/dist/database/migrations/014_replication_receipts.js +6 -0
  484. package/dist/database/migrations/014_replication_receipts.js.map +1 -0
  485. package/dist/database/migrations/015_persistent_metrics.d.ts +5 -0
  486. package/dist/database/migrations/015_persistent_metrics.d.ts.map +1 -0
  487. package/dist/database/migrations/015_persistent_metrics.js +7 -0
  488. package/dist/database/migrations/015_persistent_metrics.js.map +1 -0
  489. package/dist/database/migrations/016_cluster_lease.d.ts +4 -0
  490. package/dist/database/migrations/016_cluster_lease.d.ts.map +1 -0
  491. package/dist/database/migrations/016_cluster_lease.js +6 -0
  492. package/dist/database/migrations/016_cluster_lease.js.map +1 -0
  493. package/dist/database/migrations/index.d.ts +1 -1
  494. package/dist/database/migrations/index.d.ts.map +1 -1
  495. package/dist/database/migrations/index.js +22 -13
  496. package/dist/database/migrations/index.js.map +1 -1
  497. package/dist/database/schema-compatibility.d.ts +34 -0
  498. package/dist/database/schema-compatibility.d.ts.map +1 -0
  499. package/dist/database/schema-compatibility.js +109 -0
  500. package/dist/database/schema-compatibility.js.map +1 -0
  501. package/dist/database/schema-expansion-policy.d.ts +10 -0
  502. package/dist/database/schema-expansion-policy.d.ts.map +1 -0
  503. package/dist/database/schema-expansion-policy.js +21 -0
  504. package/dist/database/schema-expansion-policy.js.map +1 -0
  505. package/dist/database/schema-transition-plan.d.ts +53 -0
  506. package/dist/database/schema-transition-plan.d.ts.map +1 -0
  507. package/dist/database/schema-transition-plan.js +102 -0
  508. package/dist/database/schema-transition-plan.js.map +1 -0
  509. package/dist/database/schema-worker.d.ts +2 -0
  510. package/dist/database/schema-worker.d.ts.map +1 -0
  511. package/dist/database/schema-worker.js +55 -0
  512. package/dist/database/schema-worker.js.map +1 -0
  513. package/dist/database/schema.d.ts +6 -1
  514. package/dist/database/schema.d.ts.map +1 -1
  515. package/dist/database/slave-migrations/001_replication_evidence.d.ts +4 -0
  516. package/dist/database/slave-migrations/001_replication_evidence.d.ts.map +1 -0
  517. package/dist/database/slave-migrations/001_replication_evidence.js +89 -0
  518. package/dist/database/slave-migrations/001_replication_evidence.js.map +1 -0
  519. package/dist/database/slave-migrations/index.d.ts +6 -0
  520. package/dist/database/slave-migrations/index.d.ts.map +1 -0
  521. package/dist/database/slave-migrations/index.js +10 -0
  522. package/dist/database/slave-migrations/index.js.map +1 -0
  523. package/dist/diagnostics/index.d.ts +16 -0
  524. package/dist/diagnostics/index.d.ts.map +1 -0
  525. package/dist/diagnostics/index.js +22 -0
  526. package/dist/diagnostics/index.js.map +1 -0
  527. package/dist/execution/command-failure.d.ts +7 -0
  528. package/dist/execution/command-failure.d.ts.map +1 -0
  529. package/dist/execution/command-failure.js +29 -0
  530. package/dist/execution/command-failure.js.map +1 -0
  531. package/dist/execution/data-channel.d.ts +1 -1
  532. package/dist/execution/data-channel.js +1 -1
  533. package/dist/execution/execution.service.d.ts +16 -4
  534. package/dist/execution/execution.service.d.ts.map +1 -1
  535. package/dist/execution/execution.service.js +133 -74
  536. package/dist/execution/execution.service.js.map +1 -1
  537. package/dist/files/archive-codec.d.ts +57 -0
  538. package/dist/files/archive-codec.d.ts.map +1 -0
  539. package/dist/files/archive-codec.js +454 -0
  540. package/dist/files/archive-codec.js.map +1 -0
  541. package/dist/files/archive-node.d.ts +27 -0
  542. package/dist/files/archive-node.d.ts.map +1 -0
  543. package/dist/files/archive-node.js +379 -0
  544. package/dist/files/archive-node.js.map +1 -0
  545. package/dist/files/archive-publication.d.ts +26 -0
  546. package/dist/files/archive-publication.d.ts.map +1 -0
  547. package/dist/files/archive-publication.js +224 -0
  548. package/dist/files/archive-publication.js.map +1 -0
  549. package/dist/files/file-config.d.ts +7 -0
  550. package/dist/files/file-config.d.ts.map +1 -0
  551. package/dist/files/file-config.js +11 -0
  552. package/dist/files/file-config.js.map +1 -0
  553. package/dist/files/file-node.d.ts +65 -0
  554. package/dist/files/file-node.d.ts.map +1 -0
  555. package/dist/files/file-node.js +863 -0
  556. package/dist/files/file-node.js.map +1 -0
  557. package/dist/files/file-node.rpc-service.d.ts +12 -0
  558. package/dist/files/file-node.rpc-service.d.ts.map +1 -0
  559. package/dist/files/file-node.rpc-service.js +42 -0
  560. package/dist/files/file-node.rpc-service.js.map +1 -0
  561. package/dist/files/files.rpc-service.d.ts +107 -0
  562. package/dist/files/files.rpc-service.d.ts.map +1 -0
  563. package/dist/files/files.rpc-service.js +769 -0
  564. package/dist/files/files.rpc-service.js.map +1 -0
  565. package/dist/files/structural-policy.d.ts +3 -0
  566. package/dist/files/structural-policy.d.ts.map +1 -0
  567. package/dist/files/structural-policy.js +27 -0
  568. package/dist/files/structural-policy.js.map +1 -0
  569. package/dist/health/contracts.d.ts +30 -0
  570. package/dist/health/contracts.d.ts.map +1 -0
  571. package/dist/health/contracts.js +58 -0
  572. package/dist/health/contracts.js.map +1 -0
  573. package/dist/health/heartbeat.d.ts +11 -0
  574. package/dist/health/heartbeat.d.ts.map +1 -0
  575. package/dist/health/heartbeat.js +32 -0
  576. package/dist/health/heartbeat.js.map +1 -0
  577. package/dist/health/index.d.ts +4 -0
  578. package/dist/health/index.d.ts.map +1 -0
  579. package/dist/health/index.js +2 -0
  580. package/dist/health/index.js.map +1 -0
  581. package/dist/health/readiness.d.ts +15 -0
  582. package/dist/health/readiness.d.ts.map +1 -0
  583. package/dist/health/readiness.js +170 -0
  584. package/dist/health/readiness.js.map +1 -0
  585. package/dist/index.d.ts +1 -0
  586. package/dist/index.d.ts.map +1 -1
  587. package/dist/infrastructure/apt-packages.d.ts +34 -0
  588. package/dist/infrastructure/apt-packages.d.ts.map +1 -0
  589. package/dist/infrastructure/apt-packages.js +232 -0
  590. package/dist/infrastructure/apt-packages.js.map +1 -0
  591. package/dist/infrastructure/bare-metal-plan.d.ts +10 -1
  592. package/dist/infrastructure/bare-metal-plan.d.ts.map +1 -1
  593. package/dist/infrastructure/bare-metal-plan.js +22 -1
  594. package/dist/infrastructure/bare-metal-plan.js.map +1 -1
  595. package/dist/infrastructure/bare-metal-runner.d.ts.map +1 -1
  596. package/dist/infrastructure/bare-metal-runner.js +13 -2
  597. package/dist/infrastructure/bare-metal-runner.js.map +1 -1
  598. package/dist/infrastructure/config-normalizer.d.ts +4 -3
  599. package/dist/infrastructure/config-normalizer.d.ts.map +1 -1
  600. package/dist/infrastructure/config-normalizer.js +11 -3
  601. package/dist/infrastructure/config-normalizer.js.map +1 -1
  602. package/dist/infrastructure/config-payload.d.ts +4 -4
  603. package/dist/infrastructure/config-payload.js +4 -4
  604. package/dist/infrastructure/container-runtime.d.ts +39 -13
  605. package/dist/infrastructure/container-runtime.d.ts.map +1 -1
  606. package/dist/infrastructure/container-runtime.js +276 -84
  607. package/dist/infrastructure/container-runtime.js.map +1 -1
  608. package/dist/infrastructure/gateway-redis-db.d.ts +2 -2
  609. package/dist/infrastructure/gateway-redis-db.js +2 -2
  610. package/dist/infrastructure/health-recovery.d.ts +19 -0
  611. package/dist/infrastructure/health-recovery.d.ts.map +1 -0
  612. package/dist/infrastructure/health-recovery.js +39 -0
  613. package/dist/infrastructure/health-recovery.js.map +1 -0
  614. package/dist/infrastructure/host-ingress-config.d.ts +12 -0
  615. package/dist/infrastructure/host-ingress-config.d.ts.map +1 -0
  616. package/dist/infrastructure/host-ingress-config.js +200 -0
  617. package/dist/infrastructure/host-ingress-config.js.map +1 -0
  618. package/dist/infrastructure/host-ingress-lock.d.ts +3 -0
  619. package/dist/infrastructure/host-ingress-lock.d.ts.map +1 -0
  620. package/dist/infrastructure/host-ingress-lock.js +2 -0
  621. package/dist/infrastructure/host-ingress-lock.js.map +1 -0
  622. package/dist/infrastructure/host-ingress-runtime.d.ts +25 -0
  623. package/dist/infrastructure/host-ingress-runtime.d.ts.map +1 -0
  624. package/dist/infrastructure/host-ingress-runtime.js +114 -0
  625. package/dist/infrastructure/host-ingress-runtime.js.map +1 -0
  626. package/dist/infrastructure/host-ingress-takeover.d.ts +18 -0
  627. package/dist/infrastructure/host-ingress-takeover.d.ts.map +1 -0
  628. package/dist/infrastructure/host-ingress-takeover.js +142 -0
  629. package/dist/infrastructure/host-ingress-takeover.js.map +1 -0
  630. package/dist/infrastructure/host-ingress-types.d.ts +175 -0
  631. package/dist/infrastructure/host-ingress-types.d.ts.map +1 -0
  632. package/dist/infrastructure/host-ingress-types.js +2 -0
  633. package/dist/infrastructure/host-ingress-types.js.map +1 -0
  634. package/dist/infrastructure/host-ingress.service.d.ts +47 -0
  635. package/dist/infrastructure/host-ingress.service.d.ts.map +1 -0
  636. package/dist/infrastructure/host-ingress.service.js +514 -0
  637. package/dist/infrastructure/host-ingress.service.js.map +1 -0
  638. package/dist/infrastructure/host-inspection.d.ts +1 -0
  639. package/dist/infrastructure/host-inspection.d.ts.map +1 -1
  640. package/dist/infrastructure/host-inspection.js +3 -2
  641. package/dist/infrastructure/host-inspection.js.map +1 -1
  642. package/dist/infrastructure/infrastructure.service.d.ts +101 -34
  643. package/dist/infrastructure/infrastructure.service.d.ts.map +1 -1
  644. package/dist/infrastructure/infrastructure.service.js +631 -205
  645. package/dist/infrastructure/infrastructure.service.js.map +1 -1
  646. package/dist/infrastructure/merge-config.d.ts +10 -0
  647. package/dist/infrastructure/merge-config.d.ts.map +1 -0
  648. package/dist/infrastructure/merge-config.js +27 -0
  649. package/dist/infrastructure/merge-config.js.map +1 -0
  650. package/dist/infrastructure/orphan-containers.d.ts +8 -7
  651. package/dist/infrastructure/orphan-containers.d.ts.map +1 -1
  652. package/dist/infrastructure/orphan-containers.js +7 -7
  653. package/dist/infrastructure/orphan-containers.js.map +1 -1
  654. package/dist/infrastructure/owned-container.d.ts +4 -0
  655. package/dist/infrastructure/owned-container.d.ts.map +1 -0
  656. package/dist/infrastructure/owned-container.js +13 -0
  657. package/dist/infrastructure/owned-container.js.map +1 -0
  658. package/dist/infrastructure/phantom-endpoint-janitor.d.ts +4 -1
  659. package/dist/infrastructure/phantom-endpoint-janitor.d.ts.map +1 -1
  660. package/dist/infrastructure/phantom-endpoint-janitor.js +11 -2
  661. package/dist/infrastructure/phantom-endpoint-janitor.js.map +1 -1
  662. package/dist/infrastructure/presets/minio.d.ts.map +1 -1
  663. package/dist/infrastructure/presets/minio.js +15 -25
  664. package/dist/infrastructure/presets/minio.js.map +1 -1
  665. package/dist/infrastructure/presets/postgres.d.ts.map +1 -1
  666. package/dist/infrastructure/presets/postgres.js +35 -31
  667. package/dist/infrastructure/presets/postgres.js.map +1 -1
  668. package/dist/infrastructure/presets/tor.d.ts +1 -2
  669. package/dist/infrastructure/presets/tor.d.ts.map +1 -1
  670. package/dist/infrastructure/presets/tor.js +7 -13
  671. package/dist/infrastructure/presets/tor.js.map +1 -1
  672. package/dist/infrastructure/provisioning-outcome.d.ts +8 -1
  673. package/dist/infrastructure/provisioning-outcome.d.ts.map +1 -1
  674. package/dist/infrastructure/provisioning-outcome.js +42 -9
  675. package/dist/infrastructure/provisioning-outcome.js.map +1 -1
  676. package/dist/infrastructure/service-binding.js +1 -1
  677. package/dist/infrastructure/service-resolver.d.ts +11 -5
  678. package/dist/infrastructure/service-resolver.d.ts.map +1 -1
  679. package/dist/infrastructure/service-resolver.js +109 -54
  680. package/dist/infrastructure/service-resolver.js.map +1 -1
  681. package/dist/infrastructure/shipped-config.js +4 -4
  682. package/dist/infrastructure/stack-infra-manager.d.ts +35 -5
  683. package/dist/infrastructure/stack-infra-manager.d.ts.map +1 -1
  684. package/dist/infrastructure/stack-infra-manager.js +227 -57
  685. package/dist/infrastructure/stack-infra-manager.js.map +1 -1
  686. package/dist/infrastructure/types.d.ts +68 -9
  687. package/dist/infrastructure/types.d.ts.map +1 -1
  688. package/dist/mcp/mcp-bridge.js +1 -1
  689. package/dist/mcp/mcp-bridge.js.map +1 -1
  690. package/dist/mcp/monitoring-reading.d.ts +18 -0
  691. package/dist/mcp/monitoring-reading.d.ts.map +1 -0
  692. package/dist/mcp/monitoring-reading.js +84 -0
  693. package/dist/mcp/monitoring-reading.js.map +1 -0
  694. package/dist/mcp/tool-groups/apps.tools.d.ts.map +1 -1
  695. package/dist/mcp/tool-groups/apps.tools.js +6 -4
  696. package/dist/mcp/tool-groups/apps.tools.js.map +1 -1
  697. package/dist/mcp/tool-groups/management.tools.d.ts +2 -0
  698. package/dist/mcp/tool-groups/management.tools.d.ts.map +1 -1
  699. package/dist/mcp/tool-groups/management.tools.js +17 -38
  700. package/dist/mcp/tool-groups/management.tools.js.map +1 -1
  701. package/dist/mcp/tool-groups/monitoring.tools.d.ts.map +1 -1
  702. package/dist/mcp/tool-groups/monitoring.tools.js +45 -2
  703. package/dist/mcp/tool-groups/monitoring.tools.js.map +1 -1
  704. package/dist/mcp/unavailable-tools.js +2 -2
  705. package/dist/mcp/unavailable-tools.js.map +1 -1
  706. package/dist/migration/configuration.d.ts +8 -0
  707. package/dist/migration/configuration.d.ts.map +1 -0
  708. package/dist/migration/configuration.js +16 -0
  709. package/dist/migration/configuration.js.map +1 -0
  710. package/dist/migration/index.d.ts +25 -0
  711. package/dist/migration/index.d.ts.map +1 -0
  712. package/dist/migration/index.js +27 -0
  713. package/dist/migration/index.js.map +1 -0
  714. package/dist/migration/operation.d.ts +31 -0
  715. package/dist/migration/operation.d.ts.map +1 -0
  716. package/dist/migration/operation.js +67 -0
  717. package/dist/migration/operation.js.map +1 -0
  718. package/dist/migration/workspace.d.ts +28 -0
  719. package/dist/migration/workspace.d.ts.map +1 -0
  720. package/dist/migration/workspace.js +91 -0
  721. package/dist/migration/workspace.js.map +1 -0
  722. package/dist/monitoring/app-health.indicator.d.ts +1 -1
  723. package/dist/monitoring/app-health.indicator.d.ts.map +1 -1
  724. package/dist/monitoring/docker-health.indicator.d.ts +4 -2
  725. package/dist/monitoring/docker-health.indicator.d.ts.map +1 -1
  726. package/dist/monitoring/docker-health.indicator.js +66 -5
  727. package/dist/monitoring/docker-health.indicator.js.map +1 -1
  728. package/dist/monitoring/event-loop-watch.d.ts.map +1 -1
  729. package/dist/monitoring/event-loop-watch.js.map +1 -1
  730. package/dist/monitoring/infrastructure-health.d.ts +15 -0
  731. package/dist/monitoring/infrastructure-health.d.ts.map +1 -0
  732. package/dist/monitoring/infrastructure-health.js +2 -0
  733. package/dist/monitoring/infrastructure-health.js.map +1 -0
  734. package/dist/monitoring/log-entry.d.ts +7 -0
  735. package/dist/monitoring/log-entry.d.ts.map +1 -0
  736. package/dist/monitoring/log-entry.js +16 -0
  737. package/dist/monitoring/log-entry.js.map +1 -0
  738. package/dist/monitoring/log-journal.d.ts +40 -0
  739. package/dist/monitoring/log-journal.d.ts.map +1 -0
  740. package/dist/monitoring/log-journal.js +158 -0
  741. package/dist/monitoring/log-journal.js.map +1 -0
  742. package/dist/monitoring/log-line.d.ts +22 -17
  743. package/dist/monitoring/log-line.d.ts.map +1 -1
  744. package/dist/monitoring/log-line.js +73 -62
  745. package/dist/monitoring/log-line.js.map +1 -1
  746. package/dist/monitoring/log-manager.d.ts +37 -40
  747. package/dist/monitoring/log-manager.d.ts.map +1 -1
  748. package/dist/monitoring/log-manager.js +167 -66
  749. package/dist/monitoring/log-manager.js.map +1 -1
  750. package/dist/monitoring/log-sink-health.indicator.d.ts +10 -0
  751. package/dist/monitoring/log-sink-health.indicator.d.ts.map +1 -0
  752. package/dist/monitoring/log-sink-health.indicator.js +21 -0
  753. package/dist/monitoring/log-sink-health.indicator.js.map +1 -0
  754. package/dist/monitoring/metrics-storage.indicator.d.ts +9 -0
  755. package/dist/monitoring/metrics-storage.indicator.d.ts.map +1 -0
  756. package/dist/monitoring/metrics-storage.indicator.js +18 -0
  757. package/dist/monitoring/metrics-storage.indicator.js.map +1 -0
  758. package/dist/monitoring/process-lifetime.d.ts +11 -0
  759. package/dist/monitoring/process-lifetime.d.ts.map +1 -0
  760. package/dist/monitoring/process-lifetime.js +45 -0
  761. package/dist/monitoring/process-lifetime.js.map +1 -0
  762. package/dist/monitoring/runtime-diagnostics.d.ts +47 -0
  763. package/dist/monitoring/runtime-diagnostics.d.ts.map +1 -0
  764. package/dist/monitoring/runtime-diagnostics.js +88 -0
  765. package/dist/monitoring/runtime-diagnostics.js.map +1 -0
  766. package/dist/observability/metrics-bridge.d.ts +5 -1
  767. package/dist/observability/metrics-bridge.d.ts.map +1 -1
  768. package/dist/observability/metrics-bridge.js +11 -0
  769. package/dist/observability/metrics-bridge.js.map +1 -1
  770. package/dist/operations.d.ts +17 -0
  771. package/dist/operations.d.ts.map +1 -0
  772. package/dist/operations.js +13 -0
  773. package/dist/operations.js.map +1 -0
  774. package/dist/orchestrator/app-handle.d.ts +27 -9
  775. package/dist/orchestrator/app-handle.d.ts.map +1 -1
  776. package/dist/orchestrator/app-handle.js +42 -11
  777. package/dist/orchestrator/app-handle.js.map +1 -1
  778. package/dist/orchestrator/application-runtime-child.d.ts +2 -0
  779. package/dist/orchestrator/application-runtime-child.d.ts.map +1 -0
  780. package/dist/orchestrator/application-runtime-child.js +15 -0
  781. package/dist/orchestrator/application-runtime-child.js.map +1 -0
  782. package/dist/orchestrator/application-runtime-resolution.d.ts +4 -0
  783. package/dist/orchestrator/application-runtime-resolution.d.ts.map +1 -0
  784. package/dist/orchestrator/application-runtime-resolution.js +62 -0
  785. package/dist/orchestrator/application-runtime-resolution.js.map +1 -0
  786. package/dist/orchestrator/application-runtime.d.ts +3 -0
  787. package/dist/orchestrator/application-runtime.d.ts.map +1 -0
  788. package/dist/orchestrator/application-runtime.js +20 -0
  789. package/dist/orchestrator/application-runtime.js.map +1 -0
  790. package/dist/orchestrator/application-topology.d.ts +20 -0
  791. package/dist/orchestrator/application-topology.d.ts.map +1 -0
  792. package/dist/orchestrator/application-topology.js +90 -0
  793. package/dist/orchestrator/application-topology.js.map +1 -0
  794. package/dist/orchestrator/bootstrap-loader-child.d.ts +1 -1
  795. package/dist/orchestrator/bootstrap-loader-child.js +7 -16
  796. package/dist/orchestrator/bootstrap-loader-child.js.map +1 -1
  797. package/dist/orchestrator/bootstrap-loader.d.ts +10 -20
  798. package/dist/orchestrator/bootstrap-loader.d.ts.map +1 -1
  799. package/dist/orchestrator/bootstrap-loader.js +24 -207
  800. package/dist/orchestrator/bootstrap-loader.js.map +1 -1
  801. package/dist/orchestrator/bootstrap-process.d.ts +6 -6
  802. package/dist/orchestrator/bootstrap-process.d.ts.map +1 -1
  803. package/dist/orchestrator/bootstrap-process.js +40 -40
  804. package/dist/orchestrator/bootstrap-process.js.map +1 -1
  805. package/dist/orchestrator/build-service.d.ts +8 -14
  806. package/dist/orchestrator/build-service.d.ts.map +1 -1
  807. package/dist/orchestrator/build-service.js +144 -158
  808. package/dist/orchestrator/build-service.js.map +1 -1
  809. package/dist/orchestrator/call-exposed-service.d.ts +8 -0
  810. package/dist/orchestrator/call-exposed-service.d.ts.map +1 -1
  811. package/dist/orchestrator/call-exposed-service.js +1 -1
  812. package/dist/orchestrator/classic-launcher.d.ts +3 -2
  813. package/dist/orchestrator/classic-launcher.d.ts.map +1 -1
  814. package/dist/orchestrator/classic-launcher.js +32 -23
  815. package/dist/orchestrator/classic-launcher.js.map +1 -1
  816. package/dist/orchestrator/dependency-resolver.d.ts.map +1 -1
  817. package/dist/orchestrator/dependency-resolver.js +7 -38
  818. package/dist/orchestrator/dependency-resolver.js.map +1 -1
  819. package/dist/orchestrator/execution-contract.d.ts +67 -0
  820. package/dist/orchestrator/execution-contract.d.ts.map +1 -0
  821. package/dist/orchestrator/execution-contract.js +2 -0
  822. package/dist/orchestrator/execution-contract.js.map +1 -0
  823. package/dist/orchestrator/file-watcher.d.ts +2 -1
  824. package/dist/orchestrator/file-watcher.d.ts.map +1 -1
  825. package/dist/orchestrator/file-watcher.js +23 -5
  826. package/dist/orchestrator/file-watcher.js.map +1 -1
  827. package/dist/orchestrator/http-routes.d.ts +4 -0
  828. package/dist/orchestrator/http-routes.d.ts.map +1 -0
  829. package/dist/orchestrator/http-routes.js +19 -0
  830. package/dist/orchestrator/http-routes.js.map +1 -0
  831. package/dist/orchestrator/installed-execution.d.ts +7 -0
  832. package/dist/orchestrator/installed-execution.d.ts.map +1 -0
  833. package/dist/orchestrator/installed-execution.js +25 -0
  834. package/dist/orchestrator/installed-execution.js.map +1 -0
  835. package/dist/orchestrator/module-worker-process.d.ts.map +1 -1
  836. package/dist/orchestrator/module-worker-process.js +2 -1
  837. package/dist/orchestrator/module-worker-process.js.map +1 -1
  838. package/dist/orchestrator/orchestrator.service.d.ts +105 -80
  839. package/dist/orchestrator/orchestrator.service.d.ts.map +1 -1
  840. package/dist/orchestrator/orchestrator.service.js +1084 -571
  841. package/dist/orchestrator/orchestrator.service.js.map +1 -1
  842. package/dist/orchestrator/process-janitor.d.ts +3 -0
  843. package/dist/orchestrator/process-janitor.d.ts.map +1 -1
  844. package/dist/orchestrator/process-janitor.js +5 -1
  845. package/dist/orchestrator/process-janitor.js.map +1 -1
  846. package/dist/orchestrator/runtime-package-resolution.d.ts +8 -0
  847. package/dist/orchestrator/runtime-package-resolution.d.ts.map +1 -0
  848. package/dist/orchestrator/runtime-package-resolution.js +56 -0
  849. package/dist/orchestrator/runtime-package-resolution.js.map +1 -0
  850. package/dist/orchestrator/service-router.d.ts +4 -108
  851. package/dist/orchestrator/service-router.d.ts.map +1 -1
  852. package/dist/orchestrator/service-router.js +51 -237
  853. package/dist/orchestrator/service-router.js.map +1 -1
  854. package/dist/orchestrator/topology-query.d.ts +1 -1
  855. package/dist/orchestrator/topology-query.js +1 -1
  856. package/dist/orchestrator/ts-compiler.d.ts.map +1 -1
  857. package/dist/orchestrator/ts-compiler.js +9 -17
  858. package/dist/orchestrator/ts-compiler.js.map +1 -1
  859. package/dist/project/artifact-builder.d.ts +17 -7
  860. package/dist/project/artifact-builder.d.ts.map +1 -1
  861. package/dist/project/artifact-builder.js +91 -58
  862. package/dist/project/artifact-builder.js.map +1 -1
  863. package/dist/project/bootstrap-metadata.d.ts +42 -0
  864. package/dist/project/bootstrap-metadata.d.ts.map +1 -0
  865. package/dist/project/bootstrap-metadata.js +76 -0
  866. package/dist/project/bootstrap-metadata.js.map +1 -0
  867. package/dist/project/build-decision.d.ts +1 -1
  868. package/dist/project/build-decision.js +1 -1
  869. package/dist/project/config-resolver.js +4 -4
  870. package/dist/project/config-resolver.js.map +1 -1
  871. package/dist/project/configuration-catalog.d.ts +8 -0
  872. package/dist/project/configuration-catalog.d.ts.map +1 -0
  873. package/dist/project/configuration-catalog.js +29 -0
  874. package/dist/project/configuration-catalog.js.map +1 -0
  875. package/dist/project/declared-config.d.ts +4 -2
  876. package/dist/project/declared-config.d.ts.map +1 -1
  877. package/dist/project/declared-config.js +10 -7
  878. package/dist/project/declared-config.js.map +1 -1
  879. package/dist/project/dependency-topology.d.ts +10 -0
  880. package/dist/project/dependency-topology.d.ts.map +1 -0
  881. package/dist/project/dependency-topology.js +55 -0
  882. package/dist/project/dependency-topology.js.map +1 -0
  883. package/dist/project/deploy-phases.d.ts +1 -1
  884. package/dist/project/deploy-phases.js +1 -1
  885. package/dist/project/exec-in-group.d.ts +1 -1
  886. package/dist/project/exec-in-group.js +1 -1
  887. package/dist/project/infrastructure-ownership.d.ts +5 -0
  888. package/dist/project/infrastructure-ownership.d.ts.map +1 -0
  889. package/dist/project/infrastructure-ownership.js +26 -0
  890. package/dist/project/infrastructure-ownership.js.map +1 -0
  891. package/dist/project/installed-stack-resume.d.ts +62 -0
  892. package/dist/project/installed-stack-resume.d.ts.map +1 -0
  893. package/dist/project/installed-stack-resume.js +261 -0
  894. package/dist/project/installed-stack-resume.js.map +1 -0
  895. package/dist/project/launch-failure.d.ts +3 -0
  896. package/dist/project/launch-failure.d.ts.map +1 -0
  897. package/dist/project/launch-failure.js +32 -0
  898. package/dist/project/launch-failure.js.map +1 -0
  899. package/dist/project/local-release-selection.d.ts +18 -0
  900. package/dist/project/local-release-selection.d.ts.map +1 -0
  901. package/dist/project/local-release-selection.js +36 -0
  902. package/dist/project/local-release-selection.js.map +1 -0
  903. package/dist/project/node-app-config.d.ts +10 -3
  904. package/dist/project/node-app-config.d.ts.map +1 -1
  905. package/dist/project/node-app-config.js +22 -30
  906. package/dist/project/node-app-config.js.map +1 -1
  907. package/dist/project/node-app-health.d.ts +1 -1
  908. package/dist/project/node-app-health.js +1 -1
  909. package/dist/project/node-stack-stop.d.ts +83 -0
  910. package/dist/project/node-stack-stop.d.ts.map +1 -0
  911. package/dist/project/node-stack-stop.js +219 -0
  912. package/dist/project/node-stack-stop.js.map +1 -0
  913. package/dist/project/operator-account.d.ts +9 -3
  914. package/dist/project/operator-account.d.ts.map +1 -1
  915. package/dist/project/operator-account.js +9 -9
  916. package/dist/project/operator-account.js.map +1 -1
  917. package/dist/project/public-stack.d.ts +4 -0
  918. package/dist/project/public-stack.d.ts.map +1 -0
  919. package/dist/project/public-stack.js +29 -0
  920. package/dist/project/public-stack.js.map +1 -0
  921. package/dist/project/registry.d.ts +18 -27
  922. package/dist/project/registry.d.ts.map +1 -1
  923. package/dist/project/registry.js +248 -77
  924. package/dist/project/registry.js.map +1 -1
  925. package/dist/project/requirements-scanner.d.ts +4 -8
  926. package/dist/project/requirements-scanner.d.ts.map +1 -1
  927. package/dist/project/requirements-scanner.js +39 -146
  928. package/dist/project/requirements-scanner.js.map +1 -1
  929. package/dist/project/stack-diagnosis.d.ts +18 -0
  930. package/dist/project/stack-diagnosis.d.ts.map +1 -0
  931. package/dist/project/stack-diagnosis.js +94 -0
  932. package/dist/project/stack-diagnosis.js.map +1 -0
  933. package/dist/project/stack-env.d.ts +1 -1
  934. package/dist/project/stack-env.js +1 -1
  935. package/dist/project/stack-health.d.ts +12 -0
  936. package/dist/project/stack-health.d.ts.map +1 -0
  937. package/dist/project/stack-health.js +27 -0
  938. package/dist/project/stack-health.js.map +1 -0
  939. package/dist/project/stack-observation.d.ts +8 -0
  940. package/dist/project/stack-observation.d.ts.map +1 -0
  941. package/dist/project/stack-observation.js +126 -0
  942. package/dist/project/stack-observation.js.map +1 -0
  943. package/dist/project/stack-placement.d.ts +11 -0
  944. package/dist/project/stack-placement.d.ts.map +1 -0
  945. package/dist/project/stack-placement.js +57 -0
  946. package/dist/project/stack-placement.js.map +1 -0
  947. package/dist/project/stack-stop-review.d.ts +14 -0
  948. package/dist/project/stack-stop-review.d.ts.map +1 -0
  949. package/dist/project/stack-stop-review.js +22 -0
  950. package/dist/project/stack-stop-review.js.map +1 -0
  951. package/dist/project/stack-targets.d.ts +24 -0
  952. package/dist/project/stack-targets.d.ts.map +1 -0
  953. package/dist/project/stack-targets.js +67 -0
  954. package/dist/project/stack-targets.js.map +1 -0
  955. package/dist/project/stand-containers.d.ts +9 -2
  956. package/dist/project/stand-containers.d.ts.map +1 -1
  957. package/dist/project/stand-containers.js +17 -17
  958. package/dist/project/stand-containers.js.map +1 -1
  959. package/dist/project/topology-control.d.ts +41 -0
  960. package/dist/project/topology-control.d.ts.map +1 -0
  961. package/dist/project/topology-control.js +133 -0
  962. package/dist/project/topology-control.js.map +1 -0
  963. package/dist/project/topology-plan.d.ts +11 -0
  964. package/dist/project/topology-plan.d.ts.map +1 -0
  965. package/dist/project/topology-plan.js +154 -0
  966. package/dist/project/topology-plan.js.map +1 -0
  967. package/dist/project/topology-services.d.ts +7 -0
  968. package/dist/project/topology-services.d.ts.map +1 -0
  969. package/dist/project/topology-services.js +36 -0
  970. package/dist/project/topology-services.js.map +1 -0
  971. package/dist/project/topology-state.d.ts +27 -0
  972. package/dist/project/topology-state.d.ts.map +1 -0
  973. package/dist/project/topology-state.js +71 -0
  974. package/dist/project/topology-state.js.map +1 -0
  975. package/dist/project/workspace-kind.d.ts +3 -0
  976. package/dist/project/workspace-kind.d.ts.map +1 -0
  977. package/dist/project/workspace-kind.js +13 -0
  978. package/dist/project/workspace-kind.js.map +1 -0
  979. package/dist/readiness.d.ts +4 -0
  980. package/dist/readiness.d.ts.map +1 -0
  981. package/dist/readiness.js +3 -0
  982. package/dist/readiness.js.map +1 -0
  983. package/dist/release/application-closure.d.ts +4 -0
  984. package/dist/release/application-closure.d.ts.map +1 -0
  985. package/dist/release/application-closure.js +61 -0
  986. package/dist/release/application-closure.js.map +1 -0
  987. package/dist/release/archive.d.ts +3 -0
  988. package/dist/release/archive.d.ts.map +1 -0
  989. package/dist/release/archive.js +3 -0
  990. package/dist/release/archive.js.map +1 -0
  991. package/dist/release/artifact-inspection.d.ts +50 -0
  992. package/dist/release/artifact-inspection.d.ts.map +1 -0
  993. package/dist/release/artifact-inspection.js +169 -0
  994. package/dist/release/artifact-inspection.js.map +1 -0
  995. package/dist/release/artifact-store.d.ts +1 -1
  996. package/dist/release/artifact-store.d.ts.map +1 -1
  997. package/dist/release/artifact-store.js +1 -1
  998. package/dist/release/artifact-store.js.map +1 -1
  999. package/dist/release/artifact-volumes.d.ts +10 -0
  1000. package/dist/release/artifact-volumes.d.ts.map +1 -0
  1001. package/dist/release/artifact-volumes.js +112 -0
  1002. package/dist/release/artifact-volumes.js.map +1 -0
  1003. package/dist/release/attest-on-node.d.ts +3 -2
  1004. package/dist/release/attest-on-node.d.ts.map +1 -1
  1005. package/dist/release/attest-on-node.js +6 -6
  1006. package/dist/release/attest-on-node.js.map +1 -1
  1007. package/dist/release/attest.d.ts +3 -3
  1008. package/dist/release/attest.js +1 -1
  1009. package/dist/release/build-run.d.ts +14 -17
  1010. package/dist/release/build-run.d.ts.map +1 -1
  1011. package/dist/release/build-run.js +264 -77
  1012. package/dist/release/build-run.js.map +1 -1
  1013. package/dist/release/builder.d.ts +9 -3
  1014. package/dist/release/builder.d.ts.map +1 -1
  1015. package/dist/release/builder.js +19 -5
  1016. package/dist/release/builder.js.map +1 -1
  1017. package/dist/release/closure-library-path.d.ts +26 -0
  1018. package/dist/release/closure-library-path.d.ts.map +1 -0
  1019. package/dist/release/closure-library-path.js +160 -0
  1020. package/dist/release/closure-library-path.js.map +1 -0
  1021. package/dist/release/definition-inputs.d.ts +7 -4
  1022. package/dist/release/definition-inputs.d.ts.map +1 -1
  1023. package/dist/release/definition-inputs.js +146 -15
  1024. package/dist/release/definition-inputs.js.map +1 -1
  1025. package/dist/release/framework-source.d.ts +22 -0
  1026. package/dist/release/framework-source.d.ts.map +1 -0
  1027. package/dist/release/framework-source.js +54 -0
  1028. package/dist/release/framework-source.js.map +1 -0
  1029. package/dist/release/frozen-installation.d.ts +23 -0
  1030. package/dist/release/frozen-installation.d.ts.map +1 -0
  1031. package/dist/release/frozen-installation.js +159 -0
  1032. package/dist/release/frozen-installation.js.map +1 -0
  1033. package/dist/release/import-artifacts.d.ts +9 -0
  1034. package/dist/release/import-artifacts.d.ts.map +1 -0
  1035. package/dist/release/import-artifacts.js +60 -0
  1036. package/dist/release/import-artifacts.js.map +1 -0
  1037. package/dist/release/infrastructure.d.ts +6 -0
  1038. package/dist/release/infrastructure.d.ts.map +1 -0
  1039. package/dist/release/infrastructure.js +74 -0
  1040. package/dist/release/infrastructure.js.map +1 -0
  1041. package/dist/release/installed-artifacts.d.ts +12 -0
  1042. package/dist/release/installed-artifacts.d.ts.map +1 -0
  1043. package/dist/release/installed-artifacts.js +199 -0
  1044. package/dist/release/installed-artifacts.js.map +1 -0
  1045. package/dist/release/installed-graph.d.ts +28 -0
  1046. package/dist/release/installed-graph.d.ts.map +1 -0
  1047. package/dist/release/installed-graph.js +138 -0
  1048. package/dist/release/installed-graph.js.map +1 -0
  1049. package/dist/release/installed-origin.d.ts +42 -0
  1050. package/dist/release/installed-origin.d.ts.map +1 -0
  1051. package/dist/release/installed-origin.js +130 -0
  1052. package/dist/release/installed-origin.js.map +1 -0
  1053. package/dist/release/installed-release.d.ts +23 -0
  1054. package/dist/release/installed-release.d.ts.map +1 -0
  1055. package/dist/release/installed-release.js +141 -0
  1056. package/dist/release/installed-release.js.map +1 -0
  1057. package/dist/release/layout.d.ts +29 -34
  1058. package/dist/release/layout.d.ts.map +1 -1
  1059. package/dist/release/layout.js +164 -53
  1060. package/dist/release/layout.js.map +1 -1
  1061. package/dist/release/load.d.ts +3 -0
  1062. package/dist/release/load.d.ts.map +1 -1
  1063. package/dist/release/load.js +50 -8
  1064. package/dist/release/load.js.map +1 -1
  1065. package/dist/release/local-installation.d.ts +20 -0
  1066. package/dist/release/local-installation.d.ts.map +1 -0
  1067. package/dist/release/local-installation.js +298 -0
  1068. package/dist/release/local-installation.js.map +1 -0
  1069. package/dist/release/manifest.d.ts +87 -12
  1070. package/dist/release/manifest.d.ts.map +1 -1
  1071. package/dist/release/manifest.js +31 -7
  1072. package/dist/release/manifest.js.map +1 -1
  1073. package/dist/release/migration-programs.d.ts +12 -0
  1074. package/dist/release/migration-programs.d.ts.map +1 -0
  1075. package/dist/release/migration-programs.js +45 -0
  1076. package/dist/release/migration-programs.js.map +1 -0
  1077. package/dist/release/migrations.d.ts +12 -1
  1078. package/dist/release/migrations.d.ts.map +1 -1
  1079. package/dist/release/migrations.js +124 -9
  1080. package/dist/release/migrations.js.map +1 -1
  1081. package/dist/release/origin.d.ts +33 -0
  1082. package/dist/release/origin.d.ts.map +1 -0
  1083. package/dist/release/origin.js +253 -0
  1084. package/dist/release/origin.js.map +1 -0
  1085. package/dist/release/owner-admission.d.ts +15 -0
  1086. package/dist/release/owner-admission.d.ts.map +1 -0
  1087. package/dist/release/owner-admission.js +37 -0
  1088. package/dist/release/owner-admission.js.map +1 -0
  1089. package/dist/release/owner-executable.d.ts +3 -0
  1090. package/dist/release/owner-executable.d.ts.map +1 -0
  1091. package/dist/release/owner-executable.js +40 -0
  1092. package/dist/release/owner-executable.js.map +1 -0
  1093. package/dist/release/package-gates.d.ts +9 -0
  1094. package/dist/release/package-gates.d.ts.map +1 -0
  1095. package/dist/release/package-gates.js +42 -0
  1096. package/dist/release/package-gates.js.map +1 -0
  1097. package/dist/release/package-resolution.d.ts +4 -0
  1098. package/dist/release/package-resolution.d.ts.map +1 -0
  1099. package/dist/release/package-resolution.js +28 -0
  1100. package/dist/release/package-resolution.js.map +1 -0
  1101. package/dist/release/portable-archive.d.ts +12 -0
  1102. package/dist/release/portable-archive.d.ts.map +1 -0
  1103. package/dist/release/portable-archive.js +96 -0
  1104. package/dist/release/portable-archive.js.map +1 -0
  1105. package/dist/release/publish.d.ts +1 -1
  1106. package/dist/release/publish.js +1 -1
  1107. package/dist/release/registry-download.d.ts +2 -0
  1108. package/dist/release/registry-download.d.ts.map +1 -0
  1109. package/dist/release/registry-download.js +157 -0
  1110. package/dist/release/registry-download.js.map +1 -0
  1111. package/dist/release/registry-framework.d.ts +39 -0
  1112. package/dist/release/registry-framework.d.ts.map +1 -0
  1113. package/dist/release/registry-framework.js +279 -0
  1114. package/dist/release/registry-framework.js.map +1 -0
  1115. package/dist/release/registry-transport.d.ts +27 -0
  1116. package/dist/release/registry-transport.d.ts.map +1 -0
  1117. package/dist/release/registry-transport.js +96 -0
  1118. package/dist/release/registry-transport.js.map +1 -0
  1119. package/dist/release/repository-identity.d.ts +12 -0
  1120. package/dist/release/repository-identity.d.ts.map +1 -0
  1121. package/dist/release/repository-identity.js +62 -0
  1122. package/dist/release/repository-identity.js.map +1 -0
  1123. package/dist/release/runtime-extractor.d.ts +4 -0
  1124. package/dist/release/runtime-extractor.d.ts.map +1 -0
  1125. package/dist/release/runtime-extractor.js +15 -0
  1126. package/dist/release/runtime-extractor.js.map +1 -0
  1127. package/dist/release/runtime-provenance.d.ts +40 -0
  1128. package/dist/release/runtime-provenance.d.ts.map +1 -0
  1129. package/dist/release/runtime-provenance.js +229 -0
  1130. package/dist/release/runtime-provenance.js.map +1 -0
  1131. package/dist/release/source.d.ts +12 -0
  1132. package/dist/release/source.d.ts.map +1 -0
  1133. package/dist/release/source.js +168 -0
  1134. package/dist/release/source.js.map +1 -0
  1135. package/dist/release/store.d.ts +14 -5
  1136. package/dist/release/store.d.ts.map +1 -1
  1137. package/dist/release/store.js +73 -17
  1138. package/dist/release/store.js.map +1 -1
  1139. package/dist/release/target-runtime.d.ts +19 -0
  1140. package/dist/release/target-runtime.d.ts.map +1 -0
  1141. package/dist/release/target-runtime.js +41 -0
  1142. package/dist/release/target-runtime.js.map +1 -0
  1143. package/dist/release/vendored-framework.d.ts +28 -0
  1144. package/dist/release/vendored-framework.d.ts.map +1 -0
  1145. package/dist/release/vendored-framework.js +98 -0
  1146. package/dist/release/vendored-framework.js.map +1 -0
  1147. package/dist/release/workspace-source.d.ts +3 -0
  1148. package/dist/release/workspace-source.d.ts.map +1 -0
  1149. package/dist/release/workspace-source.js +33 -0
  1150. package/dist/release/workspace-source.js.map +1 -0
  1151. package/dist/runtime/context.d.ts +29 -0
  1152. package/dist/runtime/context.d.ts.map +1 -0
  1153. package/dist/runtime/context.js +111 -0
  1154. package/dist/runtime/context.js.map +1 -0
  1155. package/dist/runtime/identity.d.ts +15 -0
  1156. package/dist/runtime/identity.d.ts.map +1 -0
  1157. package/dist/runtime/identity.js +33 -0
  1158. package/dist/runtime/identity.js.map +1 -0
  1159. package/dist/runtime/index.d.ts +3 -0
  1160. package/dist/runtime/index.d.ts.map +1 -0
  1161. package/dist/runtime/index.js +3 -0
  1162. package/dist/runtime/index.js.map +1 -0
  1163. package/dist/services/access.rpc-service.d.ts +41 -0
  1164. package/dist/services/access.rpc-service.d.ts.map +1 -0
  1165. package/dist/services/access.rpc-service.js +248 -0
  1166. package/dist/services/access.rpc-service.js.map +1 -0
  1167. package/dist/services/alert.service.d.ts +3 -3
  1168. package/dist/services/alert.service.d.ts.map +1 -1
  1169. package/dist/services/alert.service.js +3 -3
  1170. package/dist/services/anonymous-input.d.ts +0 -21
  1171. package/dist/services/anonymous-input.d.ts.map +1 -1
  1172. package/dist/services/anonymous-input.js +1 -27
  1173. package/dist/services/anonymous-input.js.map +1 -1
  1174. package/dist/services/audit.service.d.ts +10 -30
  1175. package/dist/services/audit.service.d.ts.map +1 -1
  1176. package/dist/services/audit.service.js +72 -18
  1177. package/dist/services/audit.service.js.map +1 -1
  1178. package/dist/services/auth-context.d.ts +2 -0
  1179. package/dist/services/auth-context.d.ts.map +1 -1
  1180. package/dist/services/auth-context.js +4 -1
  1181. package/dist/services/auth-context.js.map +1 -1
  1182. package/dist/services/auth.rpc-service.d.ts +3 -1
  1183. package/dist/services/auth.rpc-service.d.ts.map +1 -1
  1184. package/dist/services/auth.rpc-service.js +13 -3
  1185. package/dist/services/auth.rpc-service.js.map +1 -1
  1186. package/dist/services/auth.service.d.ts +11 -21
  1187. package/dist/services/auth.service.d.ts.map +1 -1
  1188. package/dist/services/auth.service.js +125 -139
  1189. package/dist/services/auth.service.js.map +1 -1
  1190. package/dist/services/backup-pipeline.d.ts +1 -1
  1191. package/dist/services/backup-pipeline.js +1 -1
  1192. package/dist/services/backup-storage.d.ts +14 -0
  1193. package/dist/services/backup-storage.d.ts.map +1 -0
  1194. package/dist/services/backup-storage.js +195 -0
  1195. package/dist/services/backup-storage.js.map +1 -0
  1196. package/dist/services/backup.rpc-service.d.ts +2 -0
  1197. package/dist/services/backup.rpc-service.d.ts.map +1 -1
  1198. package/dist/services/backup.rpc-service.js +9 -0
  1199. package/dist/services/backup.rpc-service.js.map +1 -1
  1200. package/dist/services/backup.service.d.ts +36 -129
  1201. package/dist/services/backup.service.d.ts.map +1 -1
  1202. package/dist/services/backup.service.js +177 -156
  1203. package/dist/services/backup.service.js.map +1 -1
  1204. package/dist/services/bundle-builder.d.ts +27 -12
  1205. package/dist/services/bundle-builder.d.ts.map +1 -1
  1206. package/dist/services/bundle-builder.js +192 -101
  1207. package/dist/services/bundle-builder.js.map +1 -1
  1208. package/dist/services/bundle-overrides.d.ts +25 -0
  1209. package/dist/services/bundle-overrides.d.ts.map +1 -0
  1210. package/dist/services/bundle-overrides.js +96 -0
  1211. package/dist/services/bundle-overrides.js.map +1 -0
  1212. package/dist/services/daemon-authority.d.ts +16 -0
  1213. package/dist/services/daemon-authority.d.ts.map +1 -0
  1214. package/dist/services/daemon-authority.js +54 -0
  1215. package/dist/services/daemon-authority.js.map +1 -0
  1216. package/dist/services/daemon-principal.d.ts +31 -0
  1217. package/dist/services/daemon-principal.d.ts.map +1 -0
  1218. package/dist/services/daemon-principal.js +37 -0
  1219. package/dist/services/daemon-principal.js.map +1 -0
  1220. package/dist/services/deploy.service.d.ts +13 -57
  1221. package/dist/services/deploy.service.d.ts.map +1 -1
  1222. package/dist/services/deploy.service.js +15 -263
  1223. package/dist/services/deploy.service.js.map +1 -1
  1224. package/dist/services/discovery.service.d.ts +1 -1
  1225. package/dist/services/discovery.service.js +1 -1
  1226. package/dist/services/event-broadcaster.rpc-service.d.ts +7 -1
  1227. package/dist/services/event-broadcaster.rpc-service.d.ts.map +1 -1
  1228. package/dist/services/event-broadcaster.rpc-service.js +89 -11
  1229. package/dist/services/event-broadcaster.rpc-service.js.map +1 -1
  1230. package/dist/services/fleet.rpc-service.d.ts +0 -6
  1231. package/dist/services/fleet.rpc-service.d.ts.map +1 -1
  1232. package/dist/services/fleet.rpc-service.js +0 -13
  1233. package/dist/services/fleet.rpc-service.js.map +1 -1
  1234. package/dist/services/health-check.service.d.ts +1 -1
  1235. package/dist/services/health-check.service.d.ts.map +1 -1
  1236. package/dist/services/health-check.service.js +30 -5
  1237. package/dist/services/health-check.service.js.map +1 -1
  1238. package/dist/services/host-operation-barrier.d.ts +8 -0
  1239. package/dist/services/host-operation-barrier.d.ts.map +1 -0
  1240. package/dist/services/host-operation-barrier.js +44 -0
  1241. package/dist/services/host-operation-barrier.js.map +1 -0
  1242. package/dist/services/host-upgrade.d.ts +181 -0
  1243. package/dist/services/host-upgrade.d.ts.map +1 -0
  1244. package/dist/services/host-upgrade.js +503 -0
  1245. package/dist/services/host-upgrade.js.map +1 -0
  1246. package/dist/services/infrastructure.rpc-service.d.ts +24 -2
  1247. package/dist/services/infrastructure.rpc-service.d.ts.map +1 -1
  1248. package/dist/services/infrastructure.rpc-service.js +178 -36
  1249. package/dist/services/infrastructure.rpc-service.js.map +1 -1
  1250. package/dist/services/kernel-catalog.d.ts +14 -0
  1251. package/dist/services/kernel-catalog.d.ts.map +1 -0
  1252. package/dist/services/kernel-catalog.js +172 -0
  1253. package/dist/services/kernel-catalog.js.map +1 -0
  1254. package/dist/services/kernel-distribution.d.ts +5 -0
  1255. package/dist/services/kernel-distribution.d.ts.map +1 -0
  1256. package/dist/services/kernel-distribution.js +49 -0
  1257. package/dist/services/kernel-distribution.js.map +1 -0
  1258. package/dist/services/kernel-rollout.service.d.ts +55 -0
  1259. package/dist/services/kernel-rollout.service.d.ts.map +1 -0
  1260. package/dist/services/kernel-rollout.service.js +394 -0
  1261. package/dist/services/kernel-rollout.service.js.map +1 -0
  1262. package/dist/services/local-bundle.d.ts +9 -0
  1263. package/dist/services/local-bundle.d.ts.map +1 -1
  1264. package/dist/services/local-bundle.js +14 -3
  1265. package/dist/services/local-bundle.js.map +1 -1
  1266. package/dist/services/log-collector.rpc-service.d.ts +5 -11
  1267. package/dist/services/log-collector.rpc-service.d.ts.map +1 -1
  1268. package/dist/services/log-collector.rpc-service.js +6 -6
  1269. package/dist/services/log-collector.rpc-service.js.map +1 -1
  1270. package/dist/services/log-collector.service.d.ts +39 -109
  1271. package/dist/services/log-collector.service.d.ts.map +1 -1
  1272. package/dist/services/log-collector.service.js +286 -261
  1273. package/dist/services/log-collector.service.js.map +1 -1
  1274. package/dist/services/log-query.d.ts +6 -0
  1275. package/dist/services/log-query.d.ts.map +1 -0
  1276. package/dist/services/log-query.js +46 -0
  1277. package/dist/services/log-query.js.map +1 -0
  1278. package/dist/services/maintenance-lock.d.ts +2 -2
  1279. package/dist/services/maintenance-lock.d.ts.map +1 -1
  1280. package/dist/services/maintenance-lock.js +1 -1
  1281. package/dist/services/managed-rollout.d.ts +54 -0
  1282. package/dist/services/managed-rollout.d.ts.map +1 -0
  1283. package/dist/services/managed-rollout.js +124 -0
  1284. package/dist/services/managed-rollout.js.map +1 -0
  1285. package/dist/services/metrics.rpc-service.d.ts +23 -0
  1286. package/dist/services/metrics.rpc-service.d.ts.map +1 -0
  1287. package/dist/services/metrics.rpc-service.js +73 -0
  1288. package/dist/services/metrics.rpc-service.js.map +1 -0
  1289. package/dist/services/migration-output.d.ts +2 -2
  1290. package/dist/services/migration-output.js +2 -2
  1291. package/dist/services/migration-process.d.ts +32 -0
  1292. package/dist/services/migration-process.d.ts.map +1 -0
  1293. package/dist/services/migration-process.js +71 -0
  1294. package/dist/services/migration-process.js.map +1 -0
  1295. package/dist/services/migration-target.d.ts +57 -0
  1296. package/dist/services/migration-target.d.ts.map +1 -0
  1297. package/dist/services/migration-target.js +221 -0
  1298. package/dist/services/migration-target.js.map +1 -0
  1299. package/dist/services/node-deploy-lease.d.ts +19 -2
  1300. package/dist/services/node-deploy-lease.d.ts.map +1 -1
  1301. package/dist/services/node-deploy-lease.js +84 -10
  1302. package/dist/services/node-deploy-lease.js.map +1 -1
  1303. package/dist/services/node-health.repository.d.ts +2 -59
  1304. package/dist/services/node-health.repository.d.ts.map +1 -1
  1305. package/dist/services/node-health.repository.js.map +1 -1
  1306. package/dist/services/node-host-key.d.ts +9 -0
  1307. package/dist/services/node-host-key.d.ts.map +1 -0
  1308. package/dist/services/node-host-key.js +17 -0
  1309. package/dist/services/node-host-key.js.map +1 -0
  1310. package/dist/services/node-manager.rpc-service.d.ts +50 -38
  1311. package/dist/services/node-manager.rpc-service.d.ts.map +1 -1
  1312. package/dist/services/node-manager.rpc-service.js +233 -38
  1313. package/dist/services/node-manager.rpc-service.js.map +1 -1
  1314. package/dist/services/node-manager.service.d.ts +4 -1
  1315. package/dist/services/node-manager.service.d.ts.map +1 -1
  1316. package/dist/services/node-manager.service.js +79 -28
  1317. package/dist/services/node-manager.service.js.map +1 -1
  1318. package/dist/services/node-registration.d.ts +17 -0
  1319. package/dist/services/node-registration.d.ts.map +1 -0
  1320. package/dist/services/node-registration.js +73 -0
  1321. package/dist/services/node-registration.js.map +1 -0
  1322. package/dist/services/node-upgrade.d.ts +1 -1
  1323. package/dist/services/node-upgrade.service.d.ts +2 -28
  1324. package/dist/services/node-upgrade.service.d.ts.map +1 -1
  1325. package/dist/services/node-upgrade.service.js +2 -3
  1326. package/dist/services/node-upgrade.service.js.map +1 -1
  1327. package/dist/services/pipeline-definition.d.ts +14 -0
  1328. package/dist/services/pipeline-definition.d.ts.map +1 -0
  1329. package/dist/services/pipeline-definition.js +77 -0
  1330. package/dist/services/pipeline-definition.js.map +1 -0
  1331. package/dist/services/pipeline.rpc-service.d.ts +14 -3
  1332. package/dist/services/pipeline.rpc-service.d.ts.map +1 -1
  1333. package/dist/services/pipeline.rpc-service.js +45 -12
  1334. package/dist/services/pipeline.rpc-service.js.map +1 -1
  1335. package/dist/services/pipeline.service.d.ts +30 -44
  1336. package/dist/services/pipeline.service.d.ts.map +1 -1
  1337. package/dist/services/pipeline.service.js +402 -333
  1338. package/dist/services/pipeline.service.js.map +1 -1
  1339. package/dist/services/project.rpc-service.d.ts +219 -14
  1340. package/dist/services/project.rpc-service.d.ts.map +1 -1
  1341. package/dist/services/project.rpc-service.js +314 -31
  1342. package/dist/services/project.rpc-service.js.map +1 -1
  1343. package/dist/services/project.service.d.ts +195 -67
  1344. package/dist/services/project.service.d.ts.map +1 -1
  1345. package/dist/services/project.service.js +2029 -705
  1346. package/dist/services/project.service.js.map +1 -1
  1347. package/dist/services/redeploy-decision.d.ts +2 -2
  1348. package/dist/services/redeploy-decision.js +1 -1
  1349. package/dist/services/release.rpc-service.d.ts +6 -19
  1350. package/dist/services/release.rpc-service.d.ts.map +1 -1
  1351. package/dist/services/release.rpc-service.js +35 -12
  1352. package/dist/services/release.rpc-service.js.map +1 -1
  1353. package/dist/services/release.service.d.ts +2 -47
  1354. package/dist/services/release.service.d.ts.map +1 -1
  1355. package/dist/services/release.service.js +26 -2
  1356. package/dist/services/release.service.js.map +1 -1
  1357. package/dist/services/remote-deployer.service.d.ts +65 -126
  1358. package/dist/services/remote-deployer.service.d.ts.map +1 -1
  1359. package/dist/services/remote-deployer.service.js +671 -466
  1360. package/dist/services/remote-deployer.service.js.map +1 -1
  1361. package/dist/services/remote-provisioner.d.ts +3 -1
  1362. package/dist/services/remote-provisioner.d.ts.map +1 -1
  1363. package/dist/services/remote-provisioner.js +2 -2
  1364. package/dist/services/remote-provisioner.js.map +1 -1
  1365. package/dist/services/replication-evidence.d.ts +24 -0
  1366. package/dist/services/replication-evidence.d.ts.map +1 -0
  1367. package/dist/services/replication-evidence.js +61 -0
  1368. package/dist/services/replication-evidence.js.map +1 -0
  1369. package/dist/services/replication-history.d.ts +80 -0
  1370. package/dist/services/replication-history.d.ts.map +1 -0
  1371. package/dist/services/replication-history.js +279 -0
  1372. package/dist/services/replication-history.js.map +1 -0
  1373. package/dist/services/replication-reconciliation.d.ts +74 -0
  1374. package/dist/services/replication-reconciliation.d.ts.map +1 -0
  1375. package/dist/services/replication-reconciliation.js +351 -0
  1376. package/dist/services/replication-reconciliation.js.map +1 -0
  1377. package/dist/services/slave-storage.service.d.ts +2 -19
  1378. package/dist/services/slave-storage.service.d.ts.map +1 -1
  1379. package/dist/services/slave-storage.service.js +19 -6
  1380. package/dist/services/slave-storage.service.js.map +1 -1
  1381. package/dist/services/static-carry-forward.d.ts +28 -3
  1382. package/dist/services/static-carry-forward.d.ts.map +1 -1
  1383. package/dist/services/static-carry-forward.js +285 -4
  1384. package/dist/services/static-carry-forward.js.map +1 -1
  1385. package/dist/services/sync-summary.d.ts.map +1 -1
  1386. package/dist/services/sync-summary.js +1 -18
  1387. package/dist/services/sync-summary.js.map +1 -1
  1388. package/dist/services/sync.rpc-service.d.ts +17 -20
  1389. package/dist/services/sync.rpc-service.d.ts.map +1 -1
  1390. package/dist/services/sync.rpc-service.js +23 -37
  1391. package/dist/services/sync.rpc-service.js.map +1 -1
  1392. package/dist/services/sync.service.d.ts +53 -157
  1393. package/dist/services/sync.service.d.ts.map +1 -1
  1394. package/dist/services/sync.service.js +239 -337
  1395. package/dist/services/sync.service.js.map +1 -1
  1396. package/dist/services/system-info.rpc-service.d.ts +3 -1
  1397. package/dist/services/system-info.rpc-service.d.ts.map +1 -1
  1398. package/dist/services/system-info.rpc-service.js +5 -5
  1399. package/dist/services/system-info.rpc-service.js.map +1 -1
  1400. package/dist/services/system-info.service.d.ts +3 -1
  1401. package/dist/services/system-info.service.d.ts.map +1 -1
  1402. package/dist/services/system-info.service.js +17 -9
  1403. package/dist/services/system-info.service.js.map +1 -1
  1404. package/dist/services/telemetry.rpc-service.d.ts +4 -23
  1405. package/dist/services/telemetry.rpc-service.d.ts.map +1 -1
  1406. package/dist/services/telemetry.rpc-service.js +4 -32
  1407. package/dist/services/telemetry.rpc-service.js.map +1 -1
  1408. package/dist/services/telemetry.service.d.ts +2 -30
  1409. package/dist/services/telemetry.service.d.ts.map +1 -1
  1410. package/dist/services/telemetry.service.js +25 -131
  1411. package/dist/services/telemetry.service.js.map +1 -1
  1412. package/dist/services/terminal-ssh.d.ts +16 -0
  1413. package/dist/services/terminal-ssh.d.ts.map +1 -0
  1414. package/dist/services/terminal-ssh.js +101 -0
  1415. package/dist/services/terminal-ssh.js.map +1 -0
  1416. package/dist/services/terminal.rpc-service.d.ts +84 -0
  1417. package/dist/services/terminal.rpc-service.d.ts.map +1 -0
  1418. package/dist/services/terminal.rpc-service.js +508 -0
  1419. package/dist/services/terminal.rpc-service.js.map +1 -0
  1420. package/dist/services/trace-collector.rpc-service.js +3 -3
  1421. package/dist/services/trace-collector.rpc-service.js.map +1 -1
  1422. package/dist/services/wait-for-postgres.d.ts +1 -1
  1423. package/dist/services/wait-for-postgres.d.ts.map +1 -1
  1424. package/dist/services/wait-for-postgres.js +13 -28
  1425. package/dist/services/wait-for-postgres.js.map +1 -1
  1426. package/dist/shared/build-stamp.d.ts +4 -1
  1427. package/dist/shared/build-stamp.d.ts.map +1 -1
  1428. package/dist/shared/build-stamp.js +14 -6
  1429. package/dist/shared/build-stamp.js.map +1 -1
  1430. package/dist/shared/describe-error.d.ts +1 -21
  1431. package/dist/shared/describe-error.d.ts.map +1 -1
  1432. package/dist/shared/describe-error.js +1 -38
  1433. package/dist/shared/describe-error.js.map +1 -1
  1434. package/dist/shared/dto/access.d.ts +55 -0
  1435. package/dist/shared/dto/access.d.ts.map +1 -0
  1436. package/dist/shared/dto/access.js +2 -0
  1437. package/dist/shared/dto/access.js.map +1 -0
  1438. package/dist/shared/dto/audit.d.ts +32 -0
  1439. package/dist/shared/dto/audit.d.ts.map +1 -0
  1440. package/dist/shared/dto/audit.js +3 -0
  1441. package/dist/shared/dto/audit.js.map +1 -0
  1442. package/dist/shared/dto/auth.d.ts +2 -0
  1443. package/dist/shared/dto/auth.d.ts.map +1 -1
  1444. package/dist/shared/dto/auth.js +5 -1
  1445. package/dist/shared/dto/auth.js.map +1 -1
  1446. package/dist/shared/dto/backend.d.ts +50 -0
  1447. package/dist/shared/dto/backend.d.ts.map +1 -0
  1448. package/dist/shared/dto/backend.js +3 -0
  1449. package/dist/shared/dto/backend.js.map +1 -0
  1450. package/dist/shared/dto/backups.d.ts +99 -0
  1451. package/dist/shared/dto/backups.d.ts.map +1 -1
  1452. package/dist/shared/dto/cluster.d.ts +44 -0
  1453. package/dist/shared/dto/cluster.d.ts.map +1 -0
  1454. package/dist/shared/dto/cluster.js +3 -0
  1455. package/dist/shared/dto/cluster.js.map +1 -0
  1456. package/dist/shared/dto/files.d.ts +328 -0
  1457. package/dist/shared/dto/files.d.ts.map +1 -0
  1458. package/dist/shared/dto/files.js +2 -0
  1459. package/dist/shared/dto/files.js.map +1 -0
  1460. package/dist/shared/dto/health.d.ts +59 -0
  1461. package/dist/shared/dto/health.d.ts.map +1 -1
  1462. package/dist/shared/dto/installed-release.d.ts +40 -0
  1463. package/dist/shared/dto/installed-release.d.ts.map +1 -0
  1464. package/dist/shared/dto/installed-release.js +2 -0
  1465. package/dist/shared/dto/installed-release.js.map +1 -0
  1466. package/dist/shared/dto/kernel-catalog.d.ts +11 -0
  1467. package/dist/shared/dto/kernel-catalog.d.ts.map +1 -0
  1468. package/dist/shared/dto/kernel-catalog.js +2 -0
  1469. package/dist/shared/dto/kernel-catalog.js.map +1 -0
  1470. package/dist/shared/dto/logs.d.ts +21 -0
  1471. package/dist/shared/dto/logs.d.ts.map +1 -1
  1472. package/dist/shared/dto/metrics.d.ts +4 -64
  1473. package/dist/shared/dto/metrics.d.ts.map +1 -1
  1474. package/dist/shared/dto/metrics.js +0 -15
  1475. package/dist/shared/dto/metrics.js.map +1 -1
  1476. package/dist/shared/dto/nodes.d.ts +98 -24
  1477. package/dist/shared/dto/nodes.d.ts.map +1 -1
  1478. package/dist/shared/dto/pipelines.d.ts +22 -1
  1479. package/dist/shared/dto/pipelines.d.ts.map +1 -1
  1480. package/dist/shared/dto/project.d.ts +289 -30
  1481. package/dist/shared/dto/project.d.ts.map +1 -1
  1482. package/dist/shared/dto/releases.d.ts +59 -0
  1483. package/dist/shared/dto/releases.d.ts.map +1 -0
  1484. package/dist/shared/dto/releases.js +2 -0
  1485. package/dist/shared/dto/releases.js.map +1 -0
  1486. package/dist/shared/dto/services.d.ts +201 -37
  1487. package/dist/shared/dto/services.d.ts.map +1 -1
  1488. package/dist/shared/dto/services.js +15 -6
  1489. package/dist/shared/dto/services.js.map +1 -1
  1490. package/dist/shared/dto/stack-diagnosis.d.ts +20 -0
  1491. package/dist/shared/dto/stack-diagnosis.d.ts.map +1 -0
  1492. package/dist/shared/dto/stack-diagnosis.js +8 -0
  1493. package/dist/shared/dto/stack-diagnosis.js.map +1 -0
  1494. package/dist/shared/dto/stack-execution.d.ts +65 -0
  1495. package/dist/shared/dto/stack-execution.d.ts.map +1 -0
  1496. package/dist/shared/dto/stack-execution.js +33 -0
  1497. package/dist/shared/dto/stack-execution.js.map +1 -0
  1498. package/dist/shared/dto/system-info.d.ts +11 -0
  1499. package/dist/shared/dto/system-info.d.ts.map +1 -1
  1500. package/dist/shared/dto/system-info.js +7 -1
  1501. package/dist/shared/dto/system-info.js.map +1 -1
  1502. package/dist/shared/dto/terminal.d.ts +40 -0
  1503. package/dist/shared/dto/terminal.d.ts.map +1 -0
  1504. package/dist/shared/dto/terminal.js +2 -0
  1505. package/dist/shared/dto/terminal.js.map +1 -0
  1506. package/dist/shared/dto/topology.d.ts +96 -0
  1507. package/dist/shared/dto/topology.d.ts.map +1 -0
  1508. package/dist/shared/dto/topology.js +2 -0
  1509. package/dist/shared/dto/topology.js.map +1 -0
  1510. package/dist/shared/emergency-output.d.ts +3 -0
  1511. package/dist/shared/emergency-output.d.ts.map +1 -0
  1512. package/dist/shared/emergency-output.js +22 -0
  1513. package/dist/shared/emergency-output.js.map +1 -0
  1514. package/dist/shared/env-config.d.ts +2 -0
  1515. package/dist/shared/env-config.d.ts.map +1 -1
  1516. package/dist/shared/env-config.js +1 -0
  1517. package/dist/shared/env-config.js.map +1 -1
  1518. package/dist/shared/events.d.ts +2 -0
  1519. package/dist/shared/events.d.ts.map +1 -1
  1520. package/dist/shared/events.js.map +1 -1
  1521. package/dist/shared/execution-identity.d.ts +39 -0
  1522. package/dist/shared/execution-identity.d.ts.map +1 -0
  1523. package/dist/shared/execution-identity.js +160 -0
  1524. package/dist/shared/execution-identity.js.map +1 -0
  1525. package/dist/shared/file-policy.d.ts +5 -0
  1526. package/dist/shared/file-policy.d.ts.map +1 -0
  1527. package/dist/shared/file-policy.js +18 -0
  1528. package/dist/shared/file-policy.js.map +1 -0
  1529. package/dist/shared/framework-source.d.ts +11 -0
  1530. package/dist/shared/framework-source.d.ts.map +1 -0
  1531. package/dist/shared/framework-source.js +31 -0
  1532. package/dist/shared/framework-source.js.map +1 -0
  1533. package/dist/shared/fresh-module-reader.d.ts +40 -0
  1534. package/dist/shared/fresh-module-reader.d.ts.map +1 -0
  1535. package/dist/shared/fresh-module-reader.js +257 -0
  1536. package/dist/shared/fresh-module-reader.js.map +1 -0
  1537. package/dist/shared/host-boot-identity.d.ts +12 -0
  1538. package/dist/shared/host-boot-identity.d.ts.map +1 -0
  1539. package/dist/shared/host-boot-identity.js +89 -0
  1540. package/dist/shared/host-boot-identity.js.map +1 -0
  1541. package/dist/shared/kernel-file-lock.d.ts +3 -0
  1542. package/dist/shared/kernel-file-lock.d.ts.map +1 -0
  1543. package/dist/shared/kernel-file-lock.js +53 -0
  1544. package/dist/shared/kernel-file-lock.js.map +1 -0
  1545. package/dist/shared/linux-file-lock.d.ts +4 -0
  1546. package/dist/shared/linux-file-lock.d.ts.map +1 -0
  1547. package/dist/shared/linux-file-lock.js +36 -0
  1548. package/dist/shared/linux-file-lock.js.map +1 -0
  1549. package/dist/shared/local-infra-host.d.ts +2 -2
  1550. package/dist/shared/local-infra-host.js +2 -2
  1551. package/dist/shared/log-ingestion-reading.d.ts +9 -0
  1552. package/dist/shared/log-ingestion-reading.d.ts.map +1 -0
  1553. package/dist/shared/log-ingestion-reading.js +32 -0
  1554. package/dist/shared/log-ingestion-reading.js.map +1 -0
  1555. package/dist/shared/log-levels.d.ts +19 -0
  1556. package/dist/shared/log-levels.d.ts.map +1 -0
  1557. package/dist/shared/log-levels.js +23 -0
  1558. package/dist/shared/log-levels.js.map +1 -0
  1559. package/dist/shared/metrics-storage-reading.d.ts +8 -0
  1560. package/dist/shared/metrics-storage-reading.d.ts.map +1 -0
  1561. package/dist/shared/metrics-storage-reading.js +27 -0
  1562. package/dist/shared/metrics-storage-reading.js.map +1 -0
  1563. package/dist/shared/pnpm.d.ts.map +1 -1
  1564. package/dist/shared/pnpm.js +7 -0
  1565. package/dist/shared/pnpm.js.map +1 -1
  1566. package/dist/shared/pool-scale.d.ts +10 -0
  1567. package/dist/shared/pool-scale.d.ts.map +1 -0
  1568. package/dist/shared/pool-scale.js +25 -0
  1569. package/dist/shared/pool-scale.js.map +1 -0
  1570. package/dist/shared/private-files.d.ts +10 -22
  1571. package/dist/shared/private-files.d.ts.map +1 -1
  1572. package/dist/shared/private-files.js +95 -82
  1573. package/dist/shared/private-files.js.map +1 -1
  1574. package/dist/shared/relay-reading.d.ts +19 -0
  1575. package/dist/shared/relay-reading.d.ts.map +1 -0
  1576. package/dist/shared/relay-reading.js +22 -0
  1577. package/dist/shared/relay-reading.js.map +1 -0
  1578. package/dist/shared/release-reading.d.ts +124 -32
  1579. package/dist/shared/release-reading.d.ts.map +1 -1
  1580. package/dist/shared/release-reading.js +208 -28
  1581. package/dist/shared/release-reading.js.map +1 -1
  1582. package/dist/shared/roles.d.ts +19 -18
  1583. package/dist/shared/roles.d.ts.map +1 -1
  1584. package/dist/shared/roles.js +21 -26
  1585. package/dist/shared/roles.js.map +1 -1
  1586. package/dist/shared/runtime-artifact.d.ts +20 -0
  1587. package/dist/shared/runtime-artifact.d.ts.map +1 -0
  1588. package/dist/shared/runtime-artifact.js +83 -0
  1589. package/dist/shared/runtime-artifact.js.map +1 -0
  1590. package/dist/shared/stack-reading.d.ts +18 -0
  1591. package/dist/shared/stack-reading.d.ts.map +1 -0
  1592. package/dist/shared/stack-reading.js +15 -0
  1593. package/dist/shared/stack-reading.js.map +1 -0
  1594. package/dist/shared/sync-reading.d.ts +30 -38
  1595. package/dist/shared/sync-reading.d.ts.map +1 -1
  1596. package/dist/shared/sync-reading.js +90 -29
  1597. package/dist/shared/sync-reading.js.map +1 -1
  1598. package/dist/shared/tokens.d.ts +3 -1
  1599. package/dist/shared/tokens.d.ts.map +1 -1
  1600. package/dist/shared/tokens.js +1 -0
  1601. package/dist/shared/tokens.js.map +1 -1
  1602. package/dist/supervisor/restart-policy.d.ts.map +1 -1
  1603. package/dist/supervisor/restart-policy.js +7 -5
  1604. package/dist/supervisor/restart-policy.js.map +1 -1
  1605. package/dist/webapp/console-container.d.ts +7 -0
  1606. package/dist/webapp/console-container.d.ts.map +1 -0
  1607. package/dist/webapp/console-container.js +23 -0
  1608. package/dist/webapp/console-container.js.map +1 -0
  1609. package/dist/webapp/webapp.service.d.ts.map +1 -1
  1610. package/dist/webapp/webapp.service.js +71 -24
  1611. package/dist/webapp/webapp.service.js.map +1 -1
  1612. package/dist/workers/health-monitor.service.d.ts.map +1 -1
  1613. package/dist/workers/health-monitor.service.js +8 -1
  1614. package/dist/workers/health-monitor.service.js.map +1 -1
  1615. package/dist/workers/types.d.ts +2 -0
  1616. package/dist/workers/types.d.ts.map +1 -1
  1617. package/package.json +109 -43
  1618. package/webapp/dist/BUILD.json +4 -3
  1619. package/webapp/dist/assets/access-48hkC2-P.js +1 -0
  1620. package/webapp/dist/assets/access-jWkHxGc7.js +1 -0
  1621. package/webapp/dist/assets/admin-data-table-BKSDI8sU.js +1 -0
  1622. package/webapp/dist/assets/alert-expression-CSblScoa.js +1 -0
  1623. package/webapp/dist/assets/alert-notify-settings-C_CHZrFm.js +1 -0
  1624. package/webapp/dist/assets/alert-uBG6r9NW.js +1 -0
  1625. package/webapp/dist/assets/alerts-CuPQ9YQJ.js +1 -0
  1626. package/webapp/dist/assets/app-address-BCXfN59F.js +1 -0
  1627. package/webapp/dist/assets/apps-Drio028B.js +1 -0
  1628. package/webapp/dist/assets/audit-npSFJECe.js +1 -0
  1629. package/webapp/dist/assets/auth-CcgjP7hR.js +1 -0
  1630. package/webapp/dist/assets/card-DkH32gMY.js +1 -0
  1631. package/webapp/dist/assets/chart-BpGXlCJc.js +2 -0
  1632. package/webapp/dist/assets/charts-BY7qI6s2.js +41 -0
  1633. package/webapp/dist/assets/charts-CpBdHU_A.js +56 -0
  1634. package/webapp/dist/assets/client-DFnuv2z3.js +3 -0
  1635. package/webapp/dist/assets/code-editor-DK6Tmmxv.js +4 -0
  1636. package/webapp/dist/assets/comparison-bars-BtC0dHjF.js +1 -0
  1637. package/webapp/dist/assets/confirm-dialog-BbGsAz7_.js +1 -0
  1638. package/webapp/dist/assets/console-keyboard-D3YCA0yU.js +1 -0
  1639. package/webapp/dist/assets/constants-CyhngVXh.js +1 -0
  1640. package/webapp/dist/assets/containers-Bl8gAyZX.js +3 -0
  1641. package/webapp/dist/assets/context-FIuwpd9_.js +1 -0
  1642. package/webapp/dist/assets/controls-C5W8gHU4.js +1 -0
  1643. package/webapp/dist/assets/daemon-memory-BiEtr9jr.js +1 -0
  1644. package/webapp/dist/assets/dashboard-UHlet3H9.js +1 -0
  1645. package/webapp/dist/assets/dashboard-builder-67PZFqhE.js +1 -0
  1646. package/webapp/dist/assets/dayjs.min-DHwAvH5f.js +1 -0
  1647. package/webapp/dist/assets/deploy-release-dialog-BOXcD5Wo.js +1 -0
  1648. package/webapp/dist/assets/deployments-qV20Ak0P.js +1 -0
  1649. package/webapp/dist/assets/detail-B4TiBfxU.js +8 -0
  1650. package/webapp/dist/assets/detail-B85-Wees.js +2 -0
  1651. package/webapp/dist/assets/detail-CYS81K6Y.js +1 -0
  1652. package/webapp/dist/assets/dist-BUDn8hLh.js +11 -0
  1653. package/webapp/dist/assets/dist-Ci5pYRbx.js +1 -0
  1654. package/webapp/dist/assets/dist-DQmjHv4-.js +1 -0
  1655. package/webapp/dist/assets/dist-De9Fty7a.js +1 -0
  1656. package/webapp/dist/assets/dist-DsGmKwmk.js +23 -0
  1657. package/webapp/dist/assets/empty-content-7jOFhG4C.js +1 -0
  1658. package/webapp/dist/assets/error-boundary-CLLI8PWw.js +3 -0
  1659. package/webapp/dist/assets/event-fields-CiyqrRO8.js +1 -0
  1660. package/webapp/dist/assets/files-DigwXndm.js +2 -0
  1661. package/webapp/dist/assets/formatters-RnRy4bXm.js +1 -0
  1662. package/webapp/dist/assets/icons-OboZgWSt.js +1 -0
  1663. package/webapp/dist/assets/index-uq8Dkk4c.js +1 -0
  1664. package/webapp/dist/assets/label-B1SF0RTL.js +1 -0
  1665. package/webapp/dist/assets/log-level-filter-Bcn31D1F.js +1 -0
  1666. package/webapp/dist/assets/log-location-DuBjh6HQ.js +1 -0
  1667. package/webapp/dist/assets/logs-BqHOufk8.js +4 -0
  1668. package/webapp/dist/assets/metric-chart-M-kI-XOt.js +1 -0
  1669. package/webapp/dist/assets/metric-series-WxePniyw.js +1 -0
  1670. package/webapp/dist/assets/metrics-QIQaF7iS.js +1 -0
  1671. package/webapp/dist/assets/model-ZEXEHm0l.js +2 -0
  1672. package/webapp/dist/assets/mui-6ssfcZcz.js +1 -0
  1673. package/webapp/dist/assets/mui-AnEgAVjz.js +52 -0
  1674. package/webapp/dist/assets/mui-B1jrje6Z.js +1 -0
  1675. package/webapp/dist/assets/mui-BIz4LSVs.js +1 -0
  1676. package/webapp/dist/assets/mui-BTN91yBK.js +28 -0
  1677. package/webapp/dist/assets/mui-BXSXx9c9.js +124 -0
  1678. package/webapp/dist/assets/mui-BwsIrivo.js +37 -0
  1679. package/webapp/dist/assets/mui-C_hromOc.js +1 -0
  1680. package/webapp/dist/assets/mui-Cd711nOk.js +4 -0
  1681. package/webapp/dist/assets/mui-CdB_p2lt.js +10 -0
  1682. package/webapp/dist/assets/mui-DyT2n1lx.js +1 -0
  1683. package/webapp/dist/assets/mui-agG5dued.js +1 -0
  1684. package/webapp/dist/assets/mui-y44PQOfG.js +1 -0
  1685. package/webapp/dist/assets/nodes-BJPk02vv.js +7 -0
  1686. package/webapp/dist/assets/omnitron-logo-koMCbsCv.js +1 -0
  1687. package/webapp/dist/assets/operation-status-Bm1x1wTz.js +1 -0
  1688. package/webapp/dist/assets/page-breadcrumbs-fR7Jmpp4.js +1 -0
  1689. package/webapp/dist/assets/pipelines-T6Ch9LTw.js +3 -0
  1690. package/webapp/dist/assets/popper-m_9b0JRf.js +1 -0
  1691. package/webapp/dist/assets/preload-helper-DzCYNvzR.js +1 -0
  1692. package/webapp/dist/assets/project.store--G5pIF-J.js +1 -0
  1693. package/webapp/dist/assets/projects-YoBzcQ24.js +1 -0
  1694. package/webapp/dist/assets/react-BN8qLIAi.js +9 -0
  1695. package/webapp/dist/assets/react-CEuifcaQ.js +1 -0
  1696. package/webapp/dist/assets/react-apexcharts.esm-DoOt-pu4.js +1 -0
  1697. package/webapp/dist/assets/realtime.store-CBDO4Abj.js +1 -0
  1698. package/webapp/dist/assets/release-bits-B2a_wbft.js +1 -0
  1699. package/webapp/dist/assets/release-build-panel-BQmIdKW9.js +1 -0
  1700. package/webapp/dist/assets/release-deployment-state-DRrEI2pP.js +1 -0
  1701. package/webapp/dist/assets/release-wire-f2VuBoBF.js +1 -0
  1702. package/webapp/dist/assets/releases-Bp3CDgmo.js +2 -0
  1703. package/webapp/dist/assets/rolldown-runtime-CNOWq4Kh.js +1 -0
  1704. package/webapp/dist/assets/search-input-C0MHI8vO.js +1 -0
  1705. package/webapp/dist/assets/services-BddvcFi8.js +1 -0
  1706. package/webapp/dist/assets/settings-B3egRvbI.js +1 -0
  1707. package/webapp/dist/assets/settled-pair-B-wgSZl6.js +1 -0
  1708. package/webapp/dist/assets/shared-styles-C0vN3I7_.js +1 -0
  1709. package/webapp/dist/assets/shell-command-C3pXf1vi.js +1 -0
  1710. package/webapp/dist/assets/sign-in-9q-Nfy83.js +1 -0
  1711. package/webapp/dist/assets/skeleton-BmWDJWF9.js +1 -0
  1712. package/webapp/dist/assets/snackbar-DSPmjMyi.js +1 -0
  1713. package/webapp/dist/assets/stack-health-status-BIv2C10x.js +1 -0
  1714. package/webapp/dist/assets/stack-start-notice-BVnMOwRQ.js +1 -0
  1715. package/webapp/dist/assets/stacks-IZ1mfizi.js +1 -0
  1716. package/webapp/dist/assets/storage-CKXnhqkt.js +1 -0
  1717. package/webapp/dist/assets/store-bqUBn2A4.js +1 -0
  1718. package/webapp/dist/assets/sync-reading-CN0jPKAg.js +1 -0
  1719. package/webapp/dist/assets/system-info-BFKNM-hf.js +1 -0
  1720. package/webapp/dist/assets/table-BOWT6Y9d.js +1 -0
  1721. package/webapp/dist/assets/table-viewport-Bp4pq-c_.js +1 -0
  1722. package/webapp/dist/assets/tabs-k5NPGLnJ.js +1 -0
  1723. package/webapp/dist/assets/terminal-BrP-ENHg.css +1 -0
  1724. package/webapp/dist/assets/terminal-QWBau-Us.js +62 -0
  1725. package/webapp/dist/assets/terminal-input-b7f2VoE_.js +2 -0
  1726. package/webapp/dist/assets/topology-CPey5dP6.js +8 -0
  1727. package/webapp/dist/assets/topology-metadata-dialog-BivuU2y6.js +2 -0
  1728. package/webapp/dist/assets/topology-routes.worker-BoYrIzAH.js +1 -0
  1729. package/webapp/dist/assets/traces-By0rdfDC.js +1 -0
  1730. package/webapp/dist/assets/use-copy-to-clipboard-BWYpToS3.js +1 -0
  1731. package/webapp/dist/assets/use-polled-resource-B22hhr5L.js +1 -0
  1732. package/webapp/dist/assets/use-stack-context-UkBsF-l7.js +1 -0
  1733. package/webapp/dist/assets/webapp-BnxOVfrc.css +1 -0
  1734. package/webapp/dist/assets/webapp-D-UhjFhS.js +35 -0
  1735. package/webapp/dist/console-version.json +1 -0
  1736. package/webapp/dist/index.html +54 -7
  1737. package/dist/release/daemon-omni.d.ts +0 -41
  1738. package/dist/release/daemon-omni.d.ts.map +0 -1
  1739. package/dist/release/daemon-omni.js +0 -59
  1740. package/dist/release/daemon-omni.js.map +0 -1
  1741. package/dist/services/netron-telemetry-transport.d.ts +0 -42
  1742. package/dist/services/netron-telemetry-transport.d.ts.map +0 -1
  1743. package/dist/services/netron-telemetry-transport.js +0 -93
  1744. package/dist/services/netron-telemetry-transport.js.map +0 -1
  1745. package/webapp/dist/assets/FormControlLabel-BrH2diyl.js +0 -1
  1746. package/webapp/dist/assets/Grid-BZ7xhoHQ.js +0 -1
  1747. package/webapp/dist/assets/Switch-DGSAxQPM.js +0 -1
  1748. package/webapp/dist/assets/alerts-sXqHJbsa.js +0 -1
  1749. package/webapp/dist/assets/apps-B_Ah8Flh.js +0 -1
  1750. package/webapp/dist/assets/audit-YXihwyui.js +0 -1
  1751. package/webapp/dist/assets/client-CGbBvy9k.js +0 -1
  1752. package/webapp/dist/assets/constants-veKGFkC6.js +0 -1
  1753. package/webapp/dist/assets/containers-Di4NOTLf.js +0 -2
  1754. package/webapp/dist/assets/daemon-memory-CCPZ4cV_.js +0 -1
  1755. package/webapp/dist/assets/dashboard-Cfuf95N3.js +0 -1
  1756. package/webapp/dist/assets/dashboard-builder-CowaYb-M.js +0 -1
  1757. package/webapp/dist/assets/deploy-release-dialog-D6C-XcKY.js +0 -1
  1758. package/webapp/dist/assets/deployments-ChTq5kCw.js +0 -1
  1759. package/webapp/dist/assets/detail-BsGWv7Dj.js +0 -1
  1760. package/webapp/dist/assets/detail-CyVf_cw5.js +0 -2
  1761. package/webapp/dist/assets/detail-D027j6aO.js +0 -8
  1762. package/webapp/dist/assets/formatters-BqjL73N3.js +0 -1
  1763. package/webapp/dist/assets/fs-Ccl3sAcp.js +0 -1
  1764. package/webapp/dist/assets/index-B8AHIPc-.css +0 -1
  1765. package/webapp/dist/assets/index-DiZbrwxT.js +0 -414
  1766. package/webapp/dist/assets/logs-L2b8Oqmo.js +0 -12
  1767. package/webapp/dist/assets/maplibre-gl-MlmG2kbn.js +0 -801
  1768. package/webapp/dist/assets/metrics-CQgjz2Lz.js +0 -2
  1769. package/webapp/dist/assets/nodes-Nwia2Ty6.js +0 -7
  1770. package/webapp/dist/assets/pipelines-DCu_rXOr.js +0 -4
  1771. package/webapp/dist/assets/projects-Bb4aV76h.js +0 -1
  1772. package/webapp/dist/assets/react-CwJFpaho.js +0 -1
  1773. package/webapp/dist/assets/react-apexcharts.esm-Dy0Fez42.js +0 -1956
  1774. package/webapp/dist/assets/release-bits-Dj4EOhhb.js +0 -1
  1775. package/webapp/dist/assets/release-build-panel-D6OCVlhT.js +0 -1
  1776. package/webapp/dist/assets/releases-CnAt3yO6.js +0 -2
  1777. package/webapp/dist/assets/rolldown-runtime-hePW80VL.js +0 -1
  1778. package/webapp/dist/assets/settings-DU-mjiwb.js +0 -1
  1779. package/webapp/dist/assets/settled-pair-C7SjZuns.js +0 -1
  1780. package/webapp/dist/assets/sign-in-Bcvjrr4C.js +0 -1
  1781. package/webapp/dist/assets/stacks-B-e8p50I.js +0 -1
  1782. package/webapp/dist/assets/sync-reading-C3PnJ7AX.js +0 -1
  1783. package/webapp/dist/assets/system-info-BtE3dgfw.js +0 -1
  1784. package/webapp/dist/assets/topology-Cwch-uF1.js +0 -12
  1785. package/webapp/dist/assets/traces-BbShR-4P.js +0 -1
  1786. package/webapp/dist/assets/use-stack-context-CZUgPq88.js +0 -1
@@ -1,67 +1,32 @@
1
- /**
2
- * RemoteDeployer — SSH-based artifact deployment to remote/cluster nodes
3
- *
4
- * Deployment pipeline for a single node:
5
- * 1. Connect via SSH (xec SSHAdapter or child_process ssh)
6
- * 2. Check if omnitron daemon is installed on remote
7
- * 3. Transfer app artifact (tarball) via SFTP/SCP
8
- * 4. Extract artifact on remote node
9
- * 5. Signal remote omnitron daemon to reload/restart apps
10
- * 6. Verify health on remote
11
- *
12
- * For cluster stacks, this runs in parallel across all nodes.
13
- *
14
- * Artifact path on remote: /opt/omnitron/artifacts/<project>/<app>/<version>/
15
- * Remote daemon config: /etc/omnitron/omnitron.config.ts
16
- *
17
- * NEVER EXECUTED, as of 2026-09-14. Measured rather than assumed: no log in
18
- * `~/.omnitron/logs` carries a single line this class emits ("Starting
19
- * deployment to node", "Slave provisioned", "Deployment successful"), no
20
- * artifact directory exists, and — decisively — no project config declares
21
- * `stacks.nodes`, which `startRemoteStack` requires before it can reach here.
22
- * So both entry points are unreachable in every current configuration.
23
- *
24
- * This matters to anyone reading the code below and taking it for a working
25
- * path. It is careful code — arguments are quoted, path segments validated,
26
- * heredocs replaced with base64 — and none of that has ever met a real host.
27
- * Its first run will be its first test. Treat a green read of this file as
28
- * evidence about intent, not about behaviour.
29
- *
30
- * The first thing that first run found, 2026-09-14: **it could not log in.**
31
- * Every command here went through `ssh -o BatchMode=yes` with an optional
32
- * `-i <keyfile>`, and `BatchMode=yes` disables every interactive method —
33
- * password and key passphrase both. The console's Add Node dialog collects
34
- * exactly those, encrypts them in the daemon's vault, and the health monitor
35
- * uses them through `ExecutionService.ssh()` on every check round. So the
36
- * product had two SSH implementations: one that can present what the operator
37
- * gave it, and one — this — that cannot, on the path where it matters most.
38
- *
39
- * Measured against the test host, whose SSH answers a password in 311 ms:
40
- *
41
- * ssh -o BatchMode=yes root@<host> 'echo ok'
42
- * → root@<host>: Permission denied (publickey,password).
43
- *
44
- * That is the answer to "why can a machine added in the console not be
45
- * deployed to": not policy, not a missing feature — the deployer could not
46
- * authenticate as the operator had arranged. It goes through the same
47
- * `ExecutionService` as the checks now, and takes a `DeployTarget` carrying
48
- * the credentials rather than an `IStackNode` whose `ISSHConfig` has nowhere
49
- * to put them.
50
- */
1
+ import path from 'node:path';
2
+ import { stackExecutionKey } from '../shared/dto/stack-execution.js';
3
+ import { deploymentProgressKey } from '../shared/release-reading.js';
4
+ import { redactDiagnosticText } from '@omnitron-dev/titan/diagnostics';
5
+ import { assertFrozenLaunch, installFrozenApplicationCommand } from '../release/frozen-installation.js';
6
+ import { releaseOptionsForEnv } from '../release/target-runtime.js';
7
+ import { installedReleaseCheckCommand, validOrigin } from '../release/runtime-provenance.js';
51
8
  import { PLATFORM_PROBE, parsePlatformProbe, planProvisioning, describePlan, } from './remote-provisioner.js';
52
- import { installSteps, activateSteps, pruneSteps } from './bundle-builder.js';
9
+ import { installSteps, installPreflightCommand, versionDir, activateSteps, pruneSteps } from './bundle-builder.js';
53
10
  import { reachabilityRule, reachabilityCommand } from '../infrastructure/gateway-reachability.js';
54
11
  import { readNodeHealth, readNodeStatus } from '../project/node-app-health.js';
55
- import { decideRedeploy, decideNodeStackStart, decideSlaveDaemonRestart, artifactChanged, readChecksumCommand, parseRecordedChecksum, ARTIFACT_CHECKSUM_FILE, NODE_CONFIG_HASH_FILE, } from './redeploy-decision.js';
12
+ import { decideRedeploy, decideNodeStackStart, decideSlaveDaemonRestart, artifactChanged, readChecksumCommand, parseRecordedChecksum, ARTIFACT_CHECKSUM_FILE, } from './redeploy-decision.js';
56
13
  import { deliveredProbeCommand, parseDeliveredProbe, checkDelivered, } from '../release/delivered.js';
57
14
  import crypto from 'node:crypto';
15
+ import { AsyncLocalStorage } from 'node:async_hooks';
16
+ import { assertControlledDaemonPort, assertServingBundle, bundleProbeCommand, contractPreflightCommand, executeHostUpgrade, hookCommand, inventoryCommand, planHostUpgrade, receiptCommand, verifyRestoredInventory, updateContractBindingsCommand, runtimeProbeCommand, runtimeStartCommand, runtimeStopCommand, appHealthCommand, pendingReceiptsCommand, recoverHostUpgrade, stoppedDaemonCommand, bootstrapPreflightCommand, HOST_BOOTSTRAP_PREFLIGHT_TIMEOUT_MS, assertResidentApplicationRuntime, assertSameApplicationRuntime, } from './host-upgrade.js';
58
17
  import { gunzipSync } from 'node:zlib';
59
18
  import { shellEscape } from '../shared/shell-escape.js';
60
19
  import { fromDataChannel, throughDataChannel } from '../execution/data-channel.js';
20
+ import { commandFailure } from '../execution/command-failure.js';
21
+ import { activateManagedTarget, managedHostCommand, planManagedRollout, reconcileManagedTarget } from './managed-rollout.js';
61
22
  /** A node that could not be asked at all — the SSH call itself failed. */
62
23
  const UNREADABLE = -3;
63
24
  import { withNodeLeases } from './node-deploy-lease.js';
25
+ import { hostOperationBarrierCommand } from './host-operation-barrier.js';
64
26
  import { migrationOutput } from './migration-output.js';
27
+ import { prepareRemoteMigration } from './migration-process.js';
28
+ import { migrationDatabaseEnvironment, validateMigrationDestinations, validateMigrationOwners, orderMigrationPlacements } from './migration-target.js';
29
+ import { prepareNodeConfigPublication, restoreNodeConfigCommand } from './node-registration.js';
65
30
  /**
66
31
  * A name that is safe to place in a remote filesystem path.
67
32
  *
@@ -100,6 +65,8 @@ function sshTargetOf(target) {
100
65
  const ssh = { host: target.host };
101
66
  if (target.sshPort != null)
102
67
  ssh.port = target.sshPort;
68
+ if (target.expectedHostFingerprint)
69
+ ssh.expectedHostFingerprint = target.expectedHostFingerprint;
103
70
  if (target.username)
104
71
  ssh.username = target.username;
105
72
  if (target.privateKey)
@@ -161,6 +128,12 @@ export function withNodeCredentials(target, registered) {
161
128
  merged.sshPort = registered.port;
162
129
  if (!merged.username && registered.username)
163
130
  merged.username = registered.username;
131
+ // Vault credentials and approval belong to one registered SSH account and port.
132
+ if (target.host !== registered.host || (merged.sshPort ?? 22) !== (registered.port ?? 22)
133
+ || (merged.username ?? 'root') !== (registered.username ?? 'root'))
134
+ return merged;
135
+ if (registered.expectedHostFingerprint)
136
+ merged.expectedHostFingerprint = registered.expectedHostFingerprint;
164
137
  if (!merged.privateKey && registered.privateKey)
165
138
  merged.privateKey = registered.privateKey;
166
139
  if (!merged.passphrase && registered.passphrase)
@@ -179,33 +152,13 @@ export function withNodeCredentials(target, registered) {
179
152
  const SLAVE_START_TIMEOUT_MS = 120_000;
180
153
  /** How often it is asked, while it is starting. */
181
154
  const DAEMON_POLL_MS = 3_000;
155
+ const transferScope = new AsyncLocalStorage();
156
+ export function withDeploymentProgress(scope, work) {
157
+ return transferScope.run(scope, work);
158
+ }
182
159
  // =============================================================================
183
160
  // RemoteDeployer
184
161
  // =============================================================================
185
- /**
186
- * The parts of a postgres URL, for the environment a migrator expects.
187
- *
188
- * Returns null rather than guessing at a URL it cannot read: a migration run
189
- * against half-parsed connection details is worse than one that does not run,
190
- * because it can succeed somewhere nobody meant.
191
- */
192
- function parseDatabaseUrl(url) {
193
- try {
194
- const u = new URL(url);
195
- if (!u.protocol.startsWith('postgres'))
196
- return null;
197
- return {
198
- host: u.hostname,
199
- port: u.port || '5432',
200
- database: decodeURIComponent(u.pathname.replace(/^\//, '')),
201
- user: decodeURIComponent(u.username),
202
- password: decodeURIComponent(u.password),
203
- };
204
- }
205
- catch {
206
- return null;
207
- }
208
- }
209
162
  /**
210
163
  * Is this a gzip stream of a COMPLETE tar archive?
211
164
  *
@@ -231,6 +184,7 @@ export function wholeTarGz(archive) {
231
184
  export class RemoteDeployer {
232
185
  logger;
233
186
  execution;
187
+ deploymentLeases = new AsyncLocalStorage();
234
188
  /** Active deployment progress handlers */
235
189
  progressHandlers = [];
236
190
  /**
@@ -243,9 +197,7 @@ export class RemoteDeployer {
243
197
  * transferring, installing, the message naming the failing step — reached a
244
198
  * handler that re-emitted it to nobody.
245
199
  *
246
- * Keyed by node and app, so this is bounded by the fleet rather than by how
247
- * often anyone deploys, and the entry for an app is always its current
248
- * state rather than a scroll an operator has to read to the end of.
200
+ * Each project, stack, node and app retains its latest observation across retries.
249
201
  */
250
202
  lastProgress = new Map();
251
203
  constructor(logger, execution) {
@@ -271,12 +223,22 @@ export class RemoteDeployer {
271
223
  const nodeKey = `${target.host}:${target.daemonPort ?? 9700}`;
272
224
  this.logger.info({ node: nodeKey, app: artifact.app, version: artifact.version }, 'Starting deployment to node');
273
225
  try {
226
+ if (artifact.release && (!validOrigin(artifact.release) || artifact.release.app !== artifact.app ||
227
+ artifact.release.artifactSha256 !== artifact.tarballSha256 || artifact.release.artifactBytes !== artifact.size))
228
+ throw new Error('Release origin does not identify the supplied artifact');
229
+ const nodeOptions = artifact.release ? releaseOptionsForEnv(options?.launchEnv) : '';
230
+ let inspected;
274
231
  // 1. Verify SSH connectivity
275
232
  this.emitProgress(nodeKey, artifact.app, 'pending', 0, 'Connecting via SSH...');
276
233
  await this.verifySSH(target);
234
+ if (artifact.release) {
235
+ assertFrozenLaunch(artifact.launch, artifact.release);
236
+ inspected = await this.inspectInstalledBundle(target);
237
+ assertResidentApplicationRuntime(inspected.applicationRuntime);
238
+ }
277
239
  // 2. Ensure remote directory structure
278
- const remotePath = artifactDirOnNode(project, artifact.app, artifact.version);
279
- await this.sshExec(target, `mkdir -p ${shellEscape(remotePath)}`);
240
+ let directory = `${artifact.version}-${artifact.tarballSha256 ?? crypto.randomUUID()}`;
241
+ let remotePath = artifactDirOnNode(project, artifact.app, directory);
280
242
  // 2a. What the node already has.
281
243
  //
282
244
  // A master's boot-time autostart deploys every remote stack again, so
@@ -292,7 +254,10 @@ export class RemoteDeployer {
292
254
  // could pass: the escape hatch this comment named had no door.
293
255
  if (options?.force !== true) {
294
256
  const recorded = parseRecordedChecksum(await this.sshExec(target, readChecksumCommand(shellEscape(remotePath))));
295
- if (artifactChanged(recorded, artifact.checksum) === false) {
257
+ const sameInputs = artifactChanged(recorded, artifact.checksum) === false;
258
+ const binding = inspected?.applicationRuntime;
259
+ if (sameInputs && (!artifact.release || (binding &&
260
+ (await this.sshExec(target, installedReleaseCheckCommand(remotePath, artifact.release, binding, nodeOptions), 120_000)).trim() === 'verified'))) {
296
261
  const duration = Date.now() - startTime;
297
262
  this.emitProgress(nodeKey, artifact.app, 'success', 75, 'Already installed — unchanged');
298
263
  this.logger.info({ node: nodeKey, app: artifact.app, version: artifact.version, sha: recorded.slice(0, 12) }, 'The node already has this artifact — not transferring it again');
@@ -303,9 +268,20 @@ export class RemoteDeployer {
303
268
  status: 'success',
304
269
  duration,
305
270
  unchanged: true,
271
+ directory,
272
+ ...(artifact.release && binding ? { migrationNode: binding.executable } : {}),
306
273
  };
307
274
  }
308
275
  }
276
+ // Never clear a version directory: a running process can still load files from it.
277
+ // A failed attempt, or an explicit reinstall, gets another private directory.
278
+ const occupied = await this.sshExec(target, `test -e ${shellEscape(remotePath)} && echo occupied || echo absent`);
279
+ if (options?.force === true || occupied.trim() !== 'absent') {
280
+ directory += `-${crypto.randomUUID()}`;
281
+ remotePath = artifactDirOnNode(project, artifact.app, directory);
282
+ }
283
+ const parent = artifactDirOnNode(project, artifact.app, artifact.version).replace(/\/[^/]+$/, '');
284
+ await this.sshExec(target, `umask 077; mkdir -p ${shellEscape(parent)} && mkdir ${shellEscape(remotePath)}`);
309
285
  // 3. Transfer artifact
310
286
  this.emitProgress(nodeKey, artifact.app, 'transferring', 20, 'Transferring artifact...');
311
287
  const remoteFile = `${remotePath}/${artifact.app}-${artifact.version}.tar.gz`;
@@ -345,116 +321,112 @@ export class RemoteDeployer {
345
321
  else {
346
322
  this.logger.warn({ node: nodeKey, app: artifact.app }, 'Artifact carries no tarball hash — the transfer was not verified');
347
323
  }
348
- // 4. Extract on remote, into an empty directory.
349
- //
350
- // `tar -xzf` over whatever was there before leaves everything the new
351
- // archive does not name — and what was there before is a `node_modules`
352
- // of a different SHAPE. The first deployment after this builder changed
353
- // put an npm manifest beside a pnpm tree and `npm install` answered
354
- //
355
- // npm error Cannot read properties of null (reading 'edgesOut')
356
- //
357
- // which is npm walking a dependency graph through symlinks it did not
358
- // create. The same reasoning as `installSteps`, which removes the
359
- // version directory before unpacking for exactly this: an install
360
- // reconciling against a tree from another tool is not this version.
361
- //
362
- // Everything except the archive just uploaded, and only inside the
363
- // artifact's own version directory — every segment of which was checked
364
- // by `assertRemotePathSegment` above.
365
- this.emitProgress(nodeKey, artifact.app, 'extracting', 50, 'Extracting artifact...');
324
+ // This newly reserved directory is not referenced by any registered application.
325
+ this.emitProgress(nodeKey, artifact.app, 'extracting', 50, 'Extracting candidate artifact...');
366
326
  const archiveName = `${artifact.app}-${artifact.version}.tar.gz`;
367
- await this.sshExec(target, `cd ${shellEscape(remotePath)} && ` +
368
- `find . -mindepth 1 -maxdepth 1 ! -name ${shellEscape(archiveName)} -exec rm -rf {} + && ` +
369
- `tar -xzf ${shellEscape(archiveName)}`);
370
- // 5. Install the dependencies ON THE NODE.
371
- //
372
- // Three shapes of this step, and the two that were wrong are worth
373
- // keeping written down because each looked finished.
374
- //
375
- // It first ran `npm install --production --ignore-scripts 2>/dev/null
376
- // || true`. That could not work even once — the manifests use pnpm's
377
- // `workspace:` protocol, npm answers `EUNSUPPORTEDPROTOCOL` — and the
378
- // `|| true` meant nobody found out.
379
- //
380
- // It then trusted the artifact to arrive complete, from `pnpm deploy`,
381
- // and checked `test -d node_modules`. The artifact was NOT complete:
382
- // every `@omnitron-dev/*` package was a symlink into a home directory
383
- // on the master, twenty-three of them, and a directory of dangling
384
- // symlinks passes `test -d`. A symlink to `/opt/omnitron/current`
385
- // patched the one the first import happened to name; the other
386
- // twenty-two were waiting behind it.
387
- //
388
- // Now the artifact carries `vendor/*.tgz` and a manifest that installs
389
- // them, exactly like the daemon's own bundle, and the install runs
390
- // here. That is not a cost to be minimised — it is the only step that
391
- // happens on a machine that knows it is Linux, which is what decides
392
- // between `@esbuild/darwin-arm64` and `@esbuild/linux-x64`.
393
- this.emitProgress(nodeKey, artifact.app, 'installing', 60, 'Installing dependencies on the node...');
394
- try {
395
- await this.sshExec(target, `cd ${shellEscape(remotePath)} && npm install --omit=dev --no-audit --no-fund`, 900_000);
327
+ if (!artifact.release)
328
+ await this.sshExec(target, `cd ${shellEscape(remotePath)} && tar -xzf ${shellEscape(archiveName)}`);
329
+ const daemonBundle = inspected ?? await this.inspectInstalledBundle(target);
330
+ const runtime = daemonBundle.applicationRuntime;
331
+ if (artifact.release) {
332
+ assertResidentApplicationRuntime(runtime);
333
+ assertFrozenLaunch(artifact.launch, artifact.release);
334
+ assertSameApplicationRuntime(runtime, (await this.inspectInstalledBundle(target)).applicationRuntime);
335
+ this.emitProgress(nodeKey, artifact.app, 'extracting', 65, 'Verifying the unchanged application SDK and execution target');
336
+ const result = await this.sshExec(target, installFrozenApplicationCommand(remotePath, archiveName, artifact.launch, artifact.release, runtime, nodeOptions, daemonBundle.root), 240_000);
337
+ if (JSON.parse(result.trim()) !== nodeOptions)
338
+ throw new Error('Release Node options differ from the effective application definition');
396
339
  }
397
- catch (err) {
398
- const duration = Date.now() - startTime;
399
- const detail = `dependency install failed on the node: ${err.message.slice(0, 400)}`;
400
- this.emitProgress(nodeKey, artifact.app, 'failed', 60, detail);
401
- this.logger.error({ node: nodeKey, app: artifact.app, path: remotePath }, detail);
402
- return { node: nodeKey, app: artifact.app, version: artifact.version, status: 'failed', duration, error: detail };
340
+ else {
341
+ // 5. Install the dependencies ON THE NODE.
342
+ //
343
+ // Three shapes of this step, and the two that were wrong are worth
344
+ // keeping written down because each looked finished.
345
+ //
346
+ // It first ran `npm install --production --ignore-scripts 2>/dev/null
347
+ // || true`. That could not work even once — the manifests use pnpm's
348
+ // `workspace:` protocol, npm answers `EUNSUPPORTEDPROTOCOL` — and the
349
+ // `|| true` meant nobody found out.
350
+ //
351
+ // It then trusted the artifact to arrive complete, from `pnpm deploy`,
352
+ // and checked `test -d node_modules`. The artifact was NOT complete:
353
+ // every `@omnitron-dev/*` package was a symlink into a home directory
354
+ // on the master, twenty-three of them, and a directory of dangling
355
+ // symlinks passes `test -d`. A symlink to `/opt/omnitron/current`
356
+ // patched the one the first import happened to name; the other
357
+ // twenty-two were waiting behind it.
358
+ //
359
+ // Now the artifact carries `vendor/*.tgz` and a manifest that installs
360
+ // them, exactly like the daemon's own bundle, and the install runs
361
+ // here. That is not a cost to be minimised — it is the only step that
362
+ // happens on a machine that knows it is Linux, which is what decides
363
+ // between `@esbuild/darwin-arm64` and `@esbuild/linux-x64`.
364
+ this.emitProgress(nodeKey, artifact.app, 'installing', 60, 'Installing dependencies on the node...');
365
+ try {
366
+ await this.sshExec(target, `cd ${shellEscape(remotePath)} && npm install --omit=dev --engine-strict --no-audit --no-fund`, 900_000);
367
+ }
368
+ catch (err) {
369
+ const duration = Date.now() - startTime;
370
+ const detail = `dependency install failed on the node: ${err.message.slice(0, 400)}`;
371
+ this.emitProgress(nodeKey, artifact.app, 'failed', 60, detail);
372
+ this.logger.error({ node: nodeKey, app: artifact.app, path: remotePath }, detail);
373
+ return { node: nodeKey, app: artifact.app, version: artifact.version, status: 'failed', duration, error: detail };
374
+ }
375
+ // 5a. One physical copy of every package the daemon shares with the app.
376
+ //
377
+ // A supervised app does not run alone in its process: omnitron's own
378
+ // `bootstrap-process.js` is the entry point, and the app's modules are
379
+ // loaded into it. Titan keeps identities at module scope — the
380
+ // `Container` class among them — so two physical installations of
381
+ // `@omnitron-dev/titan` in one process means `@Inject(Container)`
382
+ // resolves against a class that is not the one the daemon registered,
383
+ // and the failure reads `Dependency 'Container' not found`.
384
+ //
385
+ // `bootstrap-process.ts` checks for exactly this and refuses to start,
386
+ // which is how a freshly installed artifact answered:
387
+ //
388
+ // Titan package identity mismatch detected between omnitron daemon
389
+ // and app 'geo'. Daemon resolves @omnitron-dev/titan from
390
+ // /opt/omnitron/versions/…; App resolves … from /opt/omnitron/
391
+ // artifacts/sample/geo/0.0.1/node_modules/@omnitron-dev/titan
392
+ //
393
+ // That is the correct refusal, and the answer is not to install less:
394
+ // the vendored copies are what let `npm install` resolve a coherent
395
+ // tree in the first place. They are replaced afterwards by links to
396
+ // the daemon's own, computed ON THE NODE from what the daemon actually
397
+ // has, so the set stays right as the daemon's closure changes rather
398
+ // than being a list here that drifts from it.
399
+ //
400
+ // `@omnitron-dev/omnitron` is deliberately NOT one of them, and this is
401
+ // the second time that lesson has been paid for. The daemon IS that
402
+ // package, so it is not inside its own `node_modules`, and linking to
403
+ // the install root instead gives node a directory whose package.json
404
+ // carries `name`, `version`, `type` and `dependencies` and NO `main`
405
+ // and NO `exports` — `bundleRootManifest` writes an install manifest,
406
+ // not a library manifest. Resolution then falls back to `index.js`,
407
+ // which is not there:
408
+ //
409
+ // Cannot find package
410
+ // '.../node_modules/@omnitron-dev/omnitron/index.js'
411
+ //
412
+ // — the exact error this whole line of work started from. The vendored
413
+ // copy that `pnpm pack` produces from `apps/omnitron` has the real
414
+ // manifest, so it is left alone. Its identity is not shared across the
415
+ // process boundary the way titan's is: `defineSystem` returns data that
416
+ // the daemon's bootstrap reads, not a class anything does `instanceof`
417
+ // against.
418
+ //
419
+ // `rm -rf` before each `ln -sfn`: linking onto an existing DIRECTORY
420
+ // puts the link INSIDE it, leaving a directory with no package.json
421
+ // that node reports as a missing `index.js` — a message about a file
422
+ // that was never the problem.
423
+ const daemonRoot = runtime?.root ?? daemonBundle.root;
424
+ await this.sshExec(target, `set -e; APP=${shellEscape(`${remotePath}/node_modules/@omnitron-dev`)}; ` +
425
+ `mkdir -p "$APP"; ` +
426
+ `for p in ${shellEscape(daemonRoot)}/node_modules/@omnitron-dev/*; do ` +
427
+ `[ -e "$p" ] || continue; n=$(basename "$p"); ` +
428
+ `rm -rf "$APP/$n"; ln -sfn "$p" "$APP/$n"; done`);
403
429
  }
404
- // 5a. One physical copy of every package the daemon shares with the app.
405
- //
406
- // A supervised app does not run alone in its process: omnitron's own
407
- // `bootstrap-process.js` is the entry point, and the app's modules are
408
- // loaded into it. Titan keeps identities at module scope — the
409
- // `Container` class among them — so two physical installations of
410
- // `@omnitron-dev/titan` in one process means `@Inject(Container)`
411
- // resolves against a class that is not the one the daemon registered,
412
- // and the failure reads `Dependency 'Container' not found`.
413
- //
414
- // `bootstrap-process.ts` checks for exactly this and refuses to start,
415
- // which is how a freshly installed artifact answered:
416
- //
417
- // Titan package identity mismatch detected between omnitron daemon
418
- // and app 'geo'. Daemon resolves @omnitron-dev/titan from
419
- // /opt/omnitron/versions/…; App resolves … from /opt/omnitron/
420
- // artifacts/daos/geo/0.0.1/node_modules/@omnitron-dev/titan
421
- //
422
- // That is the correct refusal, and the answer is not to install less:
423
- // the vendored copies are what let `npm install` resolve a coherent
424
- // tree in the first place. They are replaced afterwards by links to
425
- // the daemon's own, computed ON THE NODE from what the daemon actually
426
- // has, so the set stays right as the daemon's closure changes rather
427
- // than being a list here that drifts from it.
428
- //
429
- // `@omnitron-dev/omnitron` is deliberately NOT one of them, and this is
430
- // the second time that lesson has been paid for. The daemon IS that
431
- // package, so it is not inside its own `node_modules`, and linking to
432
- // the install root instead gives node a directory whose package.json
433
- // carries `name`, `version`, `type` and `dependencies` and NO `main`
434
- // and NO `exports` — `bundleRootManifest` writes an install manifest,
435
- // not a library manifest. Resolution then falls back to `index.js`,
436
- // which is not there:
437
- //
438
- // Cannot find package
439
- // '.../node_modules/@omnitron-dev/omnitron/index.js'
440
- //
441
- // — the exact error this whole line of work started from. The vendored
442
- // copy that `pnpm pack` produces from `apps/omnitron` has the real
443
- // manifest, so it is left alone. Its identity is not shared across the
444
- // process boundary the way titan's is: `defineSystem` returns data that
445
- // the daemon's bootstrap reads, not a class anything does `instanceof`
446
- // against.
447
- //
448
- // `rm -rf` before each `ln -sfn`: linking onto an existing DIRECTORY
449
- // puts the link INSIDE it, leaving a directory with no package.json
450
- // that node reports as a missing `index.js` — a message about a file
451
- // that was never the problem.
452
- const daemonRoot = '/opt/omnitron/current';
453
- await this.sshExec(target, `set -e; APP=${shellEscape(`${remotePath}/node_modules/@omnitron-dev`)}; ` +
454
- `mkdir -p "$APP"; ` +
455
- `for p in ${shellEscape(daemonRoot)}/node_modules/@omnitron-dev/*; do ` +
456
- `[ -e "$p" ] || continue; n=$(basename "$p"); ` +
457
- `rm -rf "$APP/$n"; ln -sfn "$p" "$APP/$n"; done`);
458
430
  // The install either produced a tree that resolves or it did not, and
459
431
  // `test -d node_modules` cannot tell those apart — it was true for the
460
432
  // whole time nothing worked. Asking node to RESOLVE the package the
@@ -466,21 +438,22 @@ export class RemoteDeployer {
466
438
  // map publishes what it lists and nothing else. A probe that fails on
467
439
  // a healthy tree is worse than none — it would have failed every
468
440
  // deployment from here on, for the one reason that is not a fault.
469
- this.emitProgress(nodeKey, artifact.app, 'extracting', 70, 'Checking dependencies...');
470
- const resolved = await this.sshExec(target, `cd ${shellEscape(remotePath)} && node -e ${shellEscape("const r=require('module').createRequire(process.cwd()+'/package.json');" +
471
- "r.resolve('@omnitron-dev/omnitron');r.resolve('@omnitron-dev/titan')")} >/dev/null 2>&1 && echo resolves || echo broken`).catch(() => 'broken');
472
- if (resolved.trim() !== 'resolves') {
473
- const duration = Date.now() - startTime;
474
- const detail = 'the installed tree cannot resolve @omnitron-dev/omnitron or @omnitron-dev/titan, ' +
475
- 'so the app will fail at its first import';
476
- this.emitProgress(nodeKey, artifact.app, 'failed', 70, detail);
477
- this.logger.error({ node: nodeKey, app: artifact.app, path: remotePath }, detail);
478
- return { node: nodeKey, app: artifact.app, version: artifact.version, status: 'failed', duration, error: detail };
441
+ if (!artifact.release) {
442
+ this.emitProgress(nodeKey, artifact.app, 'extracting', 70, 'Checking dependencies...');
443
+ const resolved = await this.sshExec(target, `cd ${shellEscape(remotePath)} && node -e ${shellEscape("const r=require('module').createRequire(process.cwd()+'/package.json');" +
444
+ "r.resolve('@omnitron-dev/omnitron');r.resolve('@omnitron-dev/titan')")} >/dev/null 2>&1 && echo resolves || echo broken`).catch(() => 'broken');
445
+ if (resolved.trim() !== 'resolves') {
446
+ const duration = Date.now() - startTime;
447
+ const detail = 'The installed tree cannot resolve @omnitron-dev/omnitron or @omnitron-dev/titan';
448
+ this.emitProgress(nodeKey, artifact.app, 'failed', 70, detail);
449
+ this.logger.error({ node: nodeKey, app: artifact.app, path: remotePath }, detail);
450
+ return { node: nodeKey, app: artifact.app, version: artifact.version, status: 'failed', duration, error: detail };
451
+ }
479
452
  }
480
453
  // 5b. No record yet. The next deployment reads `.artifact-sha256` as
481
454
  // «the app runs this», and at this point it does not: the files are
482
455
  // unpacked, the process still runs what it started with. The record
483
- // used to be written here, and on daos/test (2026-09-24) a deployment
456
+ // used to be written here, and on sample/test (2026-09-24) a deployment
484
457
  // that stalled after installing three artifacts left them recorded;
485
458
  // the retry read «installed, running» and left all three on the code
486
459
  // they had started with an hour earlier. It is written once the app
@@ -500,35 +473,12 @@ export class RemoteDeployer {
500
473
  version: artifact.version,
501
474
  status: 'success',
502
475
  duration,
476
+ directory,
503
477
  ...(artifact.checksum ? { checksum: artifact.checksum } : {}),
478
+ ...(artifact.release && runtime ? { migrationNode: runtime.executable } : {}),
504
479
  };
505
480
  }
506
- this.emitProgress(nodeKey, artifact.app, 'restarting', 80, 'Restarting app on remote...');
507
- const started = await this.signalRemoteDaemon(target, artifact.app);
508
- // 7. Verify health
509
- this.emitProgress(nodeKey, artifact.app, 'verifying', 90, 'Verifying health...');
510
- const health = await this.verifyHealth(target, artifact.app, project);
511
- const duration = Date.now() - startTime;
512
- // An artifact on disk is not a running application. Reporting success
513
- // for the transfer alone is what let a fleet show six deployed apps and
514
- // run none of them.
515
- if (!started.ok || !health.online) {
516
- const why = !started.ok ? started.detail : health.detail;
517
- this.emitProgress(nodeKey, artifact.app, 'failed', 90, `artifact installed, app not running: ${why}`);
518
- this.logger.error({ node: nodeKey, app: artifact.app, version: artifact.version, duration, detail: why }, 'Artifact installed, but the app is not running on the node');
519
- return {
520
- node: nodeKey,
521
- app: artifact.app,
522
- version: artifact.version,
523
- status: 'failed',
524
- duration,
525
- error: `artifact installed, app not running: ${why}`,
526
- };
527
- }
528
- await this.recordRunningArtifact(target, remotePath, artifact.app, artifact.checksum);
529
- this.emitProgress(nodeKey, artifact.app, 'success', 100, `Deployed in ${Math.round(duration / 1000)}s`);
530
- this.logger.info({ node: nodeKey, app: artifact.app, version: artifact.version, duration }, 'Deployment successful');
531
- return { node: nodeKey, app: artifact.app, version: artifact.version, status: 'success', duration };
481
+ throw new Error('Artifact installed in a new directory; activate it through deployToStack with application definitions');
532
482
  }
533
483
  catch (err) {
534
484
  const duration = Date.now() - startTime;
@@ -542,6 +492,29 @@ export class RemoteDeployer {
542
492
  * Deploy artifacts to all nodes in a stack (parallel).
543
493
  */
544
494
  async deployToStack(targets, artifacts, project, options) {
495
+ if (options?.apps?.length) {
496
+ if (!options.stack)
497
+ throw new Error('Application deployment requires an explicit source stack before transferring artifacts');
498
+ stackExecutionKey({ project, stack: options.stack });
499
+ }
500
+ const migrations = options?.migrations ?? [];
501
+ validateMigrationOwners(migrations, options?.apps ?? []);
502
+ targets = orderMigrationPlacements(migrations, targets.map(target => ({ target,
503
+ apps: (options?.apps ?? []).filter(app => !target.apps || target.apps.includes(app.name)),
504
+ }))).map(placement => placement.target);
505
+ const destinations = migrations.map(request => {
506
+ if (!artifacts.some(artifact => artifact.app === request.app))
507
+ throw Error(`No artifact for migration owner ${request.app}`);
508
+ const app = options?.apps?.find(entry => entry.name === request.app);
509
+ if (!app)
510
+ throw Error(`Missing migration owner ${request.app}`);
511
+ const env = { ...app.env, ...options?.appEnv?.[request.app] };
512
+ const database = migrationDatabaseEnvironment(request.app, env['DATABASE_URL'] ?? '', request.database, request.mode);
513
+ if (request.mode === 'config' && !artifacts.find(artifact => artifact.app === request.app)?.release)
514
+ throw Error(`Explicit migration config for ${request.app} requires a verified release artifact`);
515
+ return { app: request.app, database };
516
+ });
517
+ validateMigrationDestinations(destinations);
545
518
  const concurrency = options?.concurrency ?? 3;
546
519
  const results = [];
547
520
  // Build deployment matrix: each app to each node (or node-specific apps)
@@ -554,6 +527,13 @@ export class RemoteDeployer {
554
527
  tasks.push({ target, artifact });
555
528
  }
556
529
  }
530
+ const owners = new Map();
531
+ for (const { target, artifact } of tasks)
532
+ if (artifact.release && !owners.has(target)) {
533
+ const runtime = (await this.inspectInstalledBundle(target)).applicationRuntime;
534
+ assertResidentApplicationRuntime(runtime);
535
+ owners.set(target, runtime);
536
+ }
557
537
  // Execute with concurrency limit
558
538
  const executing = new Set();
559
539
  for (const task of tasks) {
@@ -562,6 +542,10 @@ export class RemoteDeployer {
562
542
  // started before the node knows it exists.
563
543
  const result = await this.deployToNode(task.target, task.artifact, project, {
564
544
  startAfterInstall: !options?.apps?.length,
545
+ ...(task.artifact.release ? { launchEnv: {
546
+ ...options?.apps?.find(app => app.name === task.artifact.app)?.env,
547
+ ...options?.appEnv?.[task.artifact.app],
548
+ } } : {}),
565
549
  ...(options?.force === true ? { force: true } : {}),
566
550
  });
567
551
  results.push(result);
@@ -586,11 +570,38 @@ export class RemoteDeployer {
586
570
  const nodeKey = `${target.host}:${target.daemonPort ?? 9700}`;
587
571
  const landed = results
588
572
  .filter((r) => r.node === nodeKey && r.status === 'success')
589
- .map((r) => ({ app: r.app, version: r.version }));
590
- const registration = await this.registerNodeApps(target, project, options.apps, landed, options.appEnv, options.alertSink);
591
- // Schema before the apps that read it — and an app whose schema did
592
- // not arrive does not get its new code started on the old one.
593
- const migrationFailed = await this.migrateNodeApps(target, project, landed, options.appEnv);
573
+ .map((r) => ({ app: r.app, version: r.version, ...(artifacts.find(a => a.app === r.app)?.launch ? { launch: artifacts.find(a => a.app === r.app).launch } : {}), ...(r.migrationNode ? { migrationNode: r.migrationNode } : {}), ...(r.directory ? { directory: r.directory } : {}) }));
574
+ const expected = tasks.filter(task => task.target === target).length;
575
+ if (landed.length !== expected) {
576
+ for (const result of results.filter(r => r.node === nodeKey && r.status === 'success')) {
577
+ result.status = 'failed';
578
+ result.error = 'Another artifact failed installation; existing node configuration and processes were retained';
579
+ this.emitProgress(nodeKey, result.app, 'failed', 75, result.error);
580
+ }
581
+ continue;
582
+ }
583
+ // Do not publish a new boot configuration until every candidate is installed and migrated.
584
+ const migrationFailed = await this.migrateNodeApps(target, project, landed, migrations.filter(request => landed.some(entry => entry.app === request.app)), artifacts, Object.fromEntries(options.apps.map(app => [app.name, { ...app.env, ...options.appEnv?.[app.name] }])));
585
+ if (migrationFailed.size) {
586
+ for (const result of results.filter(r => r.node === nodeKey && r.status === 'success')) {
587
+ result.status = 'failed';
588
+ result.error = `database migrations failed; existing code retained: ${migrationFailed.get(result.app) ?? 'another application failed'}`;
589
+ this.emitProgress(nodeKey, result.app, 'failed', 80, result.error);
590
+ }
591
+ continue;
592
+ }
593
+ let registration;
594
+ try {
595
+ registration = await this.registerNodeApps(target, project, options.apps, landed, options.appEnv, options.alertSink, options.stack, owners.get(target));
596
+ }
597
+ catch (error) {
598
+ for (const result of results.filter(r => r.node === nodeKey && r.status === 'success')) {
599
+ result.status = 'failed';
600
+ result.error = `Node registration failed: ${error.message}`;
601
+ this.emitProgress(nodeKey, result.app, 'failed', 85, result.error);
602
+ }
603
+ continue;
604
+ }
594
605
  // And the path from the gateway to them, which is the one crossing
595
606
  // no configuration can open by itself. See `gateway-reachability`.
596
607
  if (options.stack)
@@ -633,12 +644,24 @@ export class RemoteDeployer {
633
644
  this.logger.info({ node: result.node, app: entry.app, version: entry.version, because: decision.because }, 'Left running — this deployment changes nothing for this app');
634
645
  continue;
635
646
  }
647
+ const expectedOwner = owners.get(target);
648
+ if (expectedOwner) {
649
+ try {
650
+ assertSameApplicationRuntime(expectedOwner, (await this.inspectInstalledBundle(target)).applicationRuntime);
651
+ }
652
+ catch (error) {
653
+ result.status = 'failed';
654
+ result.error = error.message;
655
+ this.emitProgress(result.node, entry.app, 'failed', 90, result.error);
656
+ continue;
657
+ }
658
+ }
636
659
  const started = await this.signalRemoteDaemon(target, entry.app);
637
660
  const health = started.ok
638
661
  ? await this.verifyHealth(target, entry.app, project)
639
662
  : { online: false, detail: started.detail };
640
663
  if (health.online) {
641
- await this.recordRunningArtifact(target, artifactDirOnNode(project, entry.app, entry.version), entry.app, result.checksum);
664
+ await this.recordRunningArtifact(target, artifactDirOnNode(project, entry.app, entry.directory ?? entry.version), entry.app, result.checksum);
642
665
  this.emitProgress(result.node, entry.app, 'success', 100, 'Running');
643
666
  // Said, because its opposite is. «Left running» above logs when
644
667
  // this deployment leaves an application alone; restarting one
@@ -735,129 +758,80 @@ export class RemoteDeployer {
735
758
  this.logger.warn({ node: target.host, network, error: err.message.slice(0, 200) }, 'Could not check the gateway’s path to the applications');
736
759
  }
737
760
  }
738
- /**
739
- * Run each app's migrations, on the node, against the node's database.
740
- *
741
- * They had never run there. `ProjectService` migrates by executing
742
- * `apps/<name>/src/database/migrate.ts` from the PROJECT PATH against
743
- * `localhost` — both of which name the machine the master is on. A node has
744
- * no project sources and a different localhost, so a remote stack's
745
- * databases were created and left empty.
746
- *
747
- * Measured on the test node after six apps installed and five started:
748
- * every one of the six databases existed and held ZERO tables. Five apps
749
- * came up anyway, because they touch no table at boot; `paysys` does, and
750
- * said so —
751
- *
752
- * Failed to call @PostConstruct 'bootstrap' on 'PlatformRevenueService':
753
- * relation "accounts" does not exist
754
- *
755
- * — which is the only reason anyone found out. A platform with no schema
756
- * that reports five of six apps healthy is a worse state than one that
757
- * refuses to start.
758
- *
759
- * The artifact already carries what is needed: `dist/database/migrate.js`
760
- * beside `dist/database/migrations/` — 160 compiled files for paysys. The
761
- * same build the app itself runs from, so there is no second copy of the
762
- * schema to drift.
763
- *
764
- * Returns the apps whose migrations failed, with the reason, and the
765
- * caller does not start their new code.
766
- *
767
- * This used to say: «Failure is reported and does not stop the deployment:
768
- * an app whose migrations fail will fail its own start with a message
769
- * about the table it wanted, which is more specific than anything this
770
- * step could say.» True for one of the two ways it goes. An app that
771
- * fails to START is caught by `verifyHealth` and marked failed — that
772
- * branch was covered, and the sentence is right about it. An app that
773
- * starts fine and fails on the first REQUEST that touches the missing
774
- * table passes `verifyHealth`, the stack reports `started`, and the only
775
- * trace is one ERROR line in the master's log. The justification covered
776
- * the branch that was already safe.
777
- *
778
- * Idempotence is what makes refusing cheap: the migrator records each
779
- * migration it applied, in a transaction with the migration itself, so
780
- * running the batch again after the cause is fixed applies exactly what
781
- * is missing. That holds because `HardenedMigrationRunner` defaults
782
- * `useTransactions` to true (`titan-database/src/migration/
783
- * hardened-runner.ts:171`) and no daos `migrate.ts` overrides it — it is
784
- * conditional in the runner (`:502`), so a migrator that turned it off
785
- * would make a refused deployment leave a half-applied migration behind.
786
- */
787
- async migrateNodeApps(target, project, landed, appEnv) {
761
+ /** Explicit owners only. Preflight every program and destination before the first
762
+ * migration; recheck sealed origin immediately before execution. No discovery,
763
+ * source fallback or retry after an ambiguous database outcome. */
764
+ async migrateNodeApps(target, project, landed, requests, artifacts, appEnv) {
788
765
  const failed = new Map();
789
- for (const entry of landed) {
790
- const databaseUrl = appEnv?.[entry.app]?.['DATABASE_URL'];
791
- if (!databaseUrl)
792
- continue;
793
- const dir = `/opt/omnitron/artifacts/${assertRemotePathSegment('project name', project)}` +
794
- `/${assertRemotePathSegment('app name', entry.app)}` +
795
- `/${assertRemotePathSegment('version', entry.version)}`;
796
- const script = `${dir}/dist/database/migrate.js`;
797
- // A node that could not be asked is not an app without a migrator.
798
- // This command exits 0 either way, so `sshExec` throws only when the
799
- // question never arrived — and that was answered `'no'`: migrations
800
- // skipped, new code started on the old schema. The worst case of the
801
- // docblock above, reached through a dropped SSH connection instead of
802
- // a failed migration, and refused the same way.
803
- let present;
766
+ const planned = [];
767
+ let runtime;
768
+ for (const request of requests) {
804
769
  try {
805
- present = await this.sshExec(target, `test -f ${shellEscape(script)} && echo yes || echo no`);
770
+ const entry = landed.find(candidate => candidate.app === request.app);
771
+ if (!entry)
772
+ throw Error(`Migration owner ${request.app} did not install`);
773
+ const directory = artifactDirOnNode(project, entry.app, entry.directory ?? entry.version);
774
+ const script = `${directory}/${request.release}`;
775
+ const artifact = artifacts.find(candidate => candidate.app === entry.app);
776
+ let verify;
777
+ let nodeOptions = '', environmentApp = request.app;
778
+ if (artifact?.release) {
779
+ runtime ??= (await this.inspectInstalledBundle(target)).applicationRuntime;
780
+ if (!runtime || runtime.executable !== entry.migrationNode)
781
+ throw Error('Migration execution runtime changed');
782
+ const binding = runtime, origin = artifact.release;
783
+ nodeOptions = releaseOptionsForEnv(appEnv[request.app]);
784
+ environmentApp = origin.runtimeOrigin?.producerApp ?? request.app;
785
+ verify = async () => {
786
+ if ((await this.sshExec(target, installedReleaseCheckCommand(directory, origin, binding, nodeOptions), 120_000)).trim() !== 'verified')
787
+ throw Error(`Migration release origin changed for ${request.app}`);
788
+ };
789
+ await verify();
790
+ }
791
+ else if (request.mode === 'config')
792
+ throw Error('Explicit migration config requires a verified release artifact');
793
+ const database = migrationDatabaseEnvironment(environmentApp, appEnv[request.app]?.['DATABASE_URL'] ?? '', request.database, request.mode);
794
+ // test -f alone accepts escaping parent symlinks. Every path component must
795
+ // identify the physical program inside the selected artifact directory.
796
+ const check = `const fs=require('node:fs');if(fs.realpathSync(${JSON.stringify(directory)})!==${JSON.stringify(directory)}||fs.realpathSync(${JSON.stringify(script)})!==${JSON.stringify(script)})process.exit(1)`;
797
+ const executable = entry.migrationNode ? `env -u NODE_OPTIONS -u NODE_PATH ${shellEscape(entry.migrationNode)}` : 'node';
798
+ const present = await this.sshExec(target, `test -f ${shellEscape(script)} && ${executable} -e ${shellEscape(check)} && echo yes || echo no`);
799
+ if (present.trim() !== 'yes')
800
+ throw Error(`Declared migration program is unavailable: ${request.app}/${request.release}`);
801
+ const env = { ...appEnv[request.app], ...database.env, ...(artifact?.release ? { NODE_OPTIONS: nodeOptions, NODE_PATH: '' } : {}) };
802
+ if (request.mode === 'config') {
803
+ const preflight = prepareRemoteMigration({ cwd: directory, script, mode: 'config', validate: true,
804
+ ...(entry.migrationNode ? { node: entry.migrationNode } : {}) }, env);
805
+ await this.sshExec(target, preflight.command, 60_000, preflight.stdin);
806
+ }
807
+ planned.push({ request, directory, script, ...(entry.migrationNode ? { node: entry.migrationNode } : {}),
808
+ env, ...(verify ? { verify } : {}) });
806
809
  }
807
- catch (err) {
808
- const message = `the node could not be asked whether there are any to apply — ${err.message}`;
809
- this.logger.error({ node: target.host, app: entry.app, error: message.slice(0, 400) }, 'Could not ask the node for the app\'s migrations — its new code will not be started');
810
- failed.set(entry.app, message.slice(0, 300));
811
- continue;
810
+ catch (error) {
811
+ const message = redactDiagnosticText(error.message);
812
+ failed.set(request.app, message);
813
+ this.logger.error({ node: target.host, app: request.app, database: request.database, error: message }, 'Migration preparation failed — no database migrations were executed');
812
814
  }
813
- if (present.trim() !== 'yes')
814
- continue;
815
- this.emitProgress(`${target.host}:${target.daemonPort ?? 9700}`, entry.app, 'installing', 75, 'Applying database migrations...');
816
- // Both spellings, because the migrators read the second one.
817
- //
818
- // `apps/paysys/src/database/migrate.ts` declares
819
- // `envPrefix: 'PAYSYS__DATABASE'` and builds its connection from
820
- // `PAYSYS__DATABASE__HOST` / `__PORT` / `__USER` / `__PASSWORD` /
821
- // `__DATABASE`. Given only `DATABASE_URL` it falls back to its own
822
- // defaults and reports `password authentication failed for user
823
- // "postgres"` — against a password that is correct and that it never
824
- // read. All six apps failed that way, which is what a convention
825
- // nobody wrote down costs when a second caller appears.
826
- //
827
- // `ProjectService` passes both, with the comment "App-specific env
828
- // vars (various naming conventions)". This is the second caller.
829
- const parsed = parseDatabaseUrl(databaseUrl);
830
- const prefix = entry.app.toUpperCase().replace(/-/g, '_');
831
- const dbEnv = parsed
832
- ? {
833
- [`${prefix}__DATABASE__HOST`]: parsed.host,
834
- [`${prefix}__DATABASE__PORT`]: parsed.port,
835
- [`${prefix}__DATABASE__DATABASE`]: parsed.database,
836
- [`${prefix}__DATABASE__USER`]: parsed.user,
837
- [`${prefix}__DATABASE__PASSWORD`]: parsed.password,
838
- }
839
- : {};
815
+ }
816
+ if (failed.size)
817
+ return failed;
818
+ for (const item of planned) {
819
+ const { request } = item;
820
+ this.emitProgress(`${target.host}:${target.daemonPort ?? 9700}`, request.app, 'installing', 75, `Applying ${request.service}/${request.database} migrations...`);
840
821
  try {
841
- // `cd` into the artifact so the script resolves its own imports, and
842
- // every value in the environment rather than the command line, where
843
- // it would be in every process listing on the host.
844
- const assignments = Object.entries({ DATABASE_URL: databaseUrl, ...dbEnv })
845
- .map(([k, v]) => `${k}=${shellEscape(v)}`)
846
- .join(' ');
847
- // What the migrations said, in order, before the verdict (see
848
- // `migration-output.ts`). The masked channel on purpose: these lines
849
- // are for reading, not parsing, and a migrator that ever printed a
850
- // credential must not put it in the master's log.
851
- const said = await this.sshExec(target, `cd ${shellEscape(dir)} && ${assignments} node ${shellEscape(script)}`, 600_000);
852
- for (const line of migrationOutput(said)) {
853
- this.logger.info({ node: target.host, app: entry.app, line }, 'Migration said');
854
- }
855
- this.logger.info({ node: target.host, app: entry.app }, 'Database migrations applied on the node');
822
+ await item.verify?.();
823
+ const migration = prepareRemoteMigration({ cwd: item.directory, script: item.script, mode: request.mode,
824
+ ...(item.node ? { node: item.node } : {}) }, item.env);
825
+ const said = await this.sshExec(target, migration.command, 600_000, migration.stdin);
826
+ for (const line of migrationOutput(said).map(redactDiagnosticText))
827
+ this.logger.info({ node: target.host, app: request.app, database: request.database, line }, 'Migration said');
828
+ this.logger.info({ node: target.host, app: request.app, database: request.database }, 'Database migrations applied on the node');
856
829
  }
857
- catch (err) {
858
- const message = err.message;
859
- this.logger.error({ node: target.host, app: entry.app, error: message.slice(0, 400) }, 'Database migrations failed on the node — its new code will not be started');
860
- failed.set(entry.app, message.slice(0, 300));
830
+ catch (error) {
831
+ const message = redactDiagnosticText(error.message);
832
+ failed.set(request.app, message);
833
+ this.logger.error({ node: target.host, app: request.app, database: request.database, error: message }, 'Database migrations failed on the node — candidate applications will not be started');
834
+ break;
861
835
  }
862
836
  }
863
837
  return failed;
@@ -872,39 +846,34 @@ export class RemoteDeployer {
872
846
  * the file back: the body holds every generated credential on the node,
873
847
  * and it should cross the wire once, in the direction it has to.
874
848
  */
875
- async registerNodeApps(target, project, apps, landed, appEnv, alertSink) {
849
+ async registerNodeApps(target, project, apps, landed, appEnv, alertSink, sourceStack, expectedOwner) {
876
850
  if (landed.length === 0) {
877
851
  this.logger.warn({ host: target.host, project }, 'No artifact reached this node — nothing to register');
878
852
  return { changed: false };
879
853
  }
854
+ if (!sourceStack)
855
+ throw new Error('Node registration requires an explicit source stack');
880
856
  const { renderNodeAppConfig } = await import('../project/node-app-config.js');
881
857
  const dir = `/opt/omnitron/projects/${assertRemotePathSegment('project name', project)}`;
882
858
  const body = renderNodeAppConfig({
883
859
  project,
884
860
  artifactRoot: '/opt/omnitron/artifacts',
861
+ sourceStack,
885
862
  apps,
886
863
  artifacts: landed,
887
864
  appEnv,
888
865
  alertSink,
889
866
  });
890
- const bodyHash = crypto.createHash('sha256').update(body).digest('hex');
867
+ const operation = crypto.randomUUID();
868
+ let published = false, publicationAttempted = false;
891
869
  try {
892
- await this.sshExec(target, `mkdir -p ${shellEscape(dir)}`);
893
- const previous = parseRecordedChecksum(await this.sshExec(target, readChecksumCommand(shellEscape(dir), NODE_CONFIG_HASH_FILE)));
894
- const changed = previous !== bodyHash;
895
- // Through a here-document: the config carries braces, quotes and
896
- // newlines, and a single-quoted argument would need every quote in it
897
- // escaped by hand — which is how a generated file acquires a syntax
898
- // error nobody can see in the source that generated it.
899
- const configPath = `${dir}/omnitron.config.mjs`;
900
- // `umask 077` around the write, not a `chmod` after it: the file exists
901
- // with its contents between the two, and what it contains is the
902
- // generated password of every service on this node. It was written 0644
903
- // for as long as it has existed — measured on the test node — which was
904
- // harmless only because it held no credentials to leak.
905
- await this.sshExec(target, `umask 077 && cat > ${shellEscape(configPath)} <<'OMNITRON_EOF'\n${body}\nOMNITRON_EOF`);
906
- await this.sshExec(target, `chmod 600 ${shellEscape(configPath)}`);
907
- await this.sshExec(target, `printf %s ${shellEscape(bodyHash)} > ${shellEscape(`${dir}/${NODE_CONFIG_HASH_FILE}`)}`);
870
+ if (expectedOwner)
871
+ assertSameApplicationRuntime(expectedOwner, (await this.inspectInstalledBundle(target)).applicationRuntime);
872
+ const publication = prepareNodeConfigPublication({ directory: dir, project, body, operation, artifacts: landed });
873
+ publicationAttempted = true;
874
+ const result = await this.sshExec(target, publication.command, 60_000, publication.stdin);
875
+ published = true;
876
+ const { changed } = JSON.parse(result.trim());
908
877
  const added = await this.sshExec(target, `omnitron project add ${shellEscape(project)} ${shellEscape(dir)} 2>&1`);
909
878
  // Registering the project is not starting it. The node reads the
910
879
  // definitions and waits: measured, `omnitron status` answered
@@ -924,6 +893,8 @@ export class RemoteDeployer {
924
893
  apps: landed.map((l) => l.app),
925
894
  online: await this.appsOnline(target, project),
926
895
  });
896
+ if (expectedOwner)
897
+ assertSameApplicationRuntime(expectedOwner, (await this.inspectInstalledBundle(target)).applicationRuntime);
927
898
  const out = start.action === 'start'
928
899
  ? await this.sshExec(target, `omnitron stack start ${shellEscape(project)} ${shellEscape(NODE_STACK)} 2>&1`, 300_000)
929
900
  : '';
@@ -936,7 +907,7 @@ export class RemoteDeployer {
936
907
  const refused = /\bno .*found\b|\bfailed\b|\berror\b|not found|cannot/i.test(`${added}\n${out}`);
937
908
  if (refused) {
938
909
  this.logger.error({ host: target.host, project, dir, detail: `${added}\n${out}`.trim().slice(0, 300) }, 'The node refused the apps it was given — its artifacts are installed and it will run none of them');
939
- return { changed };
910
+ throw new Error('Node CLI refused project registration or stack start');
940
911
  }
941
912
  this.logger.info({
942
913
  host: target.host,
@@ -954,9 +925,18 @@ export class RemoteDeployer {
954
925
  }
955
926
  catch (err) {
956
927
  this.logger.error({ host: target.host, project, dir, error: err.message }, 'Could not tell the node what to run — its artifacts are installed and its daemon does not know the apps');
957
- // Unknown, and unknown must not read as "nothing moved": an app whose
958
- // config may have changed is an app to restart.
959
- return { changed: true };
928
+ // Restore durable boot definitions if publication or registration was interrupted.
929
+ // Do not claim process rollback: some applications may already have started.
930
+ try {
931
+ if (publicationAttempted)
932
+ await this.sshExec(target, restoreNodeConfigCommand(dir, operation));
933
+ if (published)
934
+ await this.sshExec(target, `omnitron project add ${shellEscape(project)} ${shellEscape(dir)} 2>&1`);
935
+ }
936
+ catch (restoreError) {
937
+ throw new Error(`Registration and configuration recovery failed; inspect ${dir}/.registration-${operation}`, { cause: restoreError });
938
+ }
939
+ throw err;
960
940
  }
961
941
  }
962
942
  /**
@@ -1194,17 +1174,20 @@ export class RemoteDeployer {
1194
1174
  async installBundle(target, archivePath, version, prefix = '/opt/omnitron') {
1195
1175
  const nodeKey = `${target.host}:${target.daemonPort ?? 9700}`;
1196
1176
  const layout = { prefix, version };
1197
- // Under the prefix, not `/tmp`: a bundle is tens of megabytes and `/tmp`
1198
- // is a tmpfs on many hosts, where a large transfer competes with memory.
1199
- const remoteArchive = `${prefix}/releases/${version}.tar.gz`;
1200
1177
  try {
1178
+ // Reject path traversal before any connection, upload or filesystem mutation.
1179
+ versionDir(layout);
1180
+ const fs = await import('node:fs/promises');
1181
+ const archiveSha256 = crypto.createHash('sha256').update(await fs.readFile(archivePath)).digest('hex');
1182
+ // Content-addressed transfer cannot replace an earlier archive with different bytes.
1183
+ const remoteArchive = `${prefix}/releases/${version}.${archiveSha256}.tar.gz`;
1201
1184
  this.emitProgress(nodeKey, '*', 'pending', 0, 'Connecting via SSH...');
1202
1185
  await this.verifySSH(target);
1203
1186
  this.emitProgress(nodeKey, '*', 'transferring', 10, `Transferring ${version}...`);
1204
- await this.sshExec(target, `mkdir -p ${shellEscape(`${prefix}/releases`)}`);
1187
+ await this.sshExec(target, installPreflightCommand(layout));
1205
1188
  await this.scpTransfer(target, archivePath, remoteArchive);
1206
1189
  let progress = 30;
1207
- for (const step of installSteps(layout, remoteArchive)) {
1190
+ for (const step of installSteps(layout, remoteArchive, archiveSha256)) {
1208
1191
  this.emitProgress(nodeKey, '*', 'extracting', progress, step.what);
1209
1192
  const output = await this.sshExec(target, step.command, step.timeoutMs);
1210
1193
  if (step.what.includes('runs')) {
@@ -1238,83 +1221,231 @@ export class RemoteDeployer {
1238
1221
  * left to expire by itself. A node with no gateway activates as before.
1239
1222
  */
1240
1223
  async activateBundleHeld(target, version, prefix = '/opt/omnitron', keepVersions = 3) {
1241
- const { runningGatewaySites, MaintenanceLock, DEFAULT_MAINTENANCE_TIMING } = await import('./maintenance-lock.js');
1242
- const run = this.leaseRunner(target);
1243
- const locks = [];
1244
- for (const site of await runningGatewaySites(run, `omnitron ${version}`)) {
1245
- const lock = await MaintenanceLock.open(site, this.logger, { ...DEFAULT_MAINTENANCE_TIMING, probeWithinMs: 180_000 });
1246
- if (lock)
1247
- locks.push(lock);
1248
- }
1249
- try {
1250
- const activated = await this.activateBundle(target, version, prefix, keepVersions);
1251
- while (locks.length > 0) {
1252
- const lifted = await locks.shift().liftWhenAnswering(['/', '/api/main/health']);
1253
- if (!lifted.lifted) {
1254
- this.logger.error({ host: target.host, version, failed: lifted.failed }, 'After the upgrade the platform does not answer through its gateway — maintenance expires by itself');
1224
+ assertControlledDaemonPort(target.daemonPort);
1225
+ return this.underLease(target, `held host upgrade to ${version}`, async () => {
1226
+ await this.assertNoPendingHostOperations(target, prefix);
1227
+ const { runningGatewaySites, MaintenanceLock, DEFAULT_MAINTENANCE_TIMING } = await import('./maintenance-lock.js');
1228
+ const run = (script) => this.sshExecData(target, script, 30_000);
1229
+ const locks = [];
1230
+ for (const site of await runningGatewaySites(run, `omnitron ${version}`)) {
1231
+ const lock = await MaintenanceLock.open(site, this.logger, { ...DEFAULT_MAINTENANCE_TIMING, probeWithinMs: 180_000 });
1232
+ if (lock)
1233
+ locks.push(lock);
1234
+ }
1235
+ try {
1236
+ let activated = await this.activateBundle(target, version, prefix, keepVersions, async () => {
1237
+ for (const lock of locks) {
1238
+ const failed = await lock.probe(['/', '/api/main/health']);
1239
+ if (failed.length)
1240
+ throw new Error(`Gateway verification failed: ${failed.join(', ')}`);
1241
+ }
1242
+ });
1243
+ while (locks.length > 0) {
1244
+ const lifted = await locks.shift().liftWhenAnswering(['/', '/api/main/health']);
1245
+ if (!lifted.lifted) {
1246
+ activated = false;
1247
+ this.logger.error({ host: target.host, version, failed: lifted.failed }, 'After the upgrade the platform does not answer through its gateway — maintenance expires by itself');
1248
+ }
1255
1249
  }
1250
+ return activated;
1256
1251
  }
1257
- return activated;
1258
- }
1259
- finally {
1260
- for (const lock of locks)
1261
- await lock.lift('failed').catch(() => undefined);
1252
+ finally {
1253
+ for (const lock of locks)
1254
+ await lock.lift('failed').catch(() => undefined);
1255
+ }
1256
+ });
1257
+ }
1258
+ /** Check all durable operator workflows; a recovery can allow only its exact active journal. */
1259
+ async assertNoPendingHostOperations(target, prefix = '/opt/omnitron', allowance) {
1260
+ await this.sshExecData(target, hostOperationBarrierCommand(prefix, allowance));
1261
+ }
1262
+ async readManagedHost(target, request) {
1263
+ return JSON.parse(await this.sshExecData(target, managedHostCommand(request), 480_000));
1264
+ }
1265
+ assertManagedTarget(target) {
1266
+ assertControlledDaemonPort(target.daemonPort);
1267
+ if (!target.expectedHostFingerprint)
1268
+ throw Error('Managed kernel rollout requires a pinned SSH host key');
1269
+ }
1270
+ async checkManagedTarget(target) {
1271
+ await this.assertNoPendingHostOperations(target, '/opt/omnitron');
1272
+ const pending = JSON.parse(await this.sshExecData(target, pendingReceiptsCommand('/opt/omnitron')));
1273
+ if (pending.length)
1274
+ throw Error('An unfinished host upgrade must be reconciled before kernel rollout');
1275
+ }
1276
+ async inspectManagedRollout(target, commit, options = {}) {
1277
+ this.assertManagedTarget(target);
1278
+ if (!/^[0-9a-f]{40}$/.test(commit))
1279
+ throw Error('A full lowercase Git commit is required');
1280
+ const inspect = () => planManagedRollout(request => this.readManagedHost(target, request), commit);
1281
+ if (!options.stage) {
1282
+ await this.checkManagedTarget(target);
1283
+ return inspect();
1262
1284
  }
1285
+ return this.underLease(target, 'stage managed kernel', async () => {
1286
+ await this.checkManagedTarget(target);
1287
+ const { stageCatalogRuntime } = await import('./kernel-distribution.js');
1288
+ const expected = await stageCatalogRuntime(this, target, commit, options.excludeOwnerId);
1289
+ const plan = await inspect();
1290
+ if (plan.candidate !== expected)
1291
+ throw Error('Installed runtime differs from the qualified catalog artifact');
1292
+ return plan;
1293
+ });
1263
1294
  }
1264
- /**
1265
- * Make an installed version the one the node runs, and restart into it.
1266
- *
1267
- * Separate from `installBundle` for the reason the layout exists: this is
1268
- * the only step that changes what runs.
1269
- */
1270
- async activateBundle(target, version, prefix = '/opt/omnitron', keepVersions = 3) {
1271
- const nodeKey = `${target.host}:${target.daemonPort ?? 9700}`;
1272
- const layout = { prefix, version };
1273
- try {
1274
- for (const step of activateSteps(layout)) {
1275
- this.emitProgress(nodeKey, '*', 'restarting', 40, step.what);
1276
- await this.sshExec(target, step.command, step.timeoutMs);
1295
+ async activateManagedRollout(target, plan, beforeDispatch) {
1296
+ this.assertManagedTarget(target);
1297
+ return this.underLease(target, 'managed kernel handoff', async () => {
1298
+ await this.checkManagedTarget(target);
1299
+ await activateManagedTarget(request => this.readManagedHost(target, request), plan, beforeDispatch);
1300
+ });
1301
+ }
1302
+ async reconcileManagedRollout(target, plan, options) {
1303
+ this.assertManagedTarget(target);
1304
+ return this.underLease(target, 'reconcile managed kernel handoff', async () => {
1305
+ await this.checkManagedTarget(target);
1306
+ const selection = await reconcileManagedTarget(request => this.readManagedHost(target, request), plan);
1307
+ return options?.detailed || selection === 'candidate' ? selection : 'previous';
1308
+ });
1309
+ }
1310
+ /** Require a settled host and the actual serving immutable daemon build. */
1311
+ async inspectInstalledBundle(target, prefix = '/opt/omnitron', allowance) {
1312
+ assertControlledDaemonPort(target.daemonPort);
1313
+ await this.assertNoPendingHostOperations(target, prefix, allowance);
1314
+ const pending = JSON.parse(await this.sshExecData(target, pendingReceiptsCommand(prefix)));
1315
+ if (pending.length)
1316
+ throw new Error(`Unfinished host upgrade ${pending.map(r => r.id).join(', ')}; recover it before deploying an app`);
1317
+ const managed = await this.readManagedHost(target, { operation: 'inspect' });
1318
+ if (managed)
1319
+ return managed.bundle;
1320
+ const bundle = JSON.parse(await this.sshExecData(target, bundleProbeCommand(prefix)));
1321
+ const status = JSON.parse(await this.sshExecData(target, inventoryCommand(bundle, false)));
1322
+ assertServingBundle(bundle, status);
1323
+ const host = JSON.parse(await this.sshExecData(target, runtimeProbeCommand(bundle, status.pid)));
1324
+ const execution = host.applicationRuntime ?? (host.kind !== 'managed' && host.executable ? {
1325
+ root: bundle.root, executable: host.executable, commit: bundle.commit,
1326
+ } : undefined);
1327
+ if (execution && (!path.isAbsolute(execution.root) || !path.isAbsolute(execution.executable) || !/^[a-f0-9]{40}$/.test(execution.commit)))
1328
+ throw new Error('Invalid execution owner identity');
1329
+ return { ...bundle, ...(execution ? { applicationRuntime: execution } : {}) };
1330
+ }
1331
+ async activateBundle(target, version, prefix = '/opt/omnitron', keepVersions = 3, verifyPlatform, allowance) {
1332
+ assertControlledDaemonPort(target.daemonPort);
1333
+ if (!/^[A-Za-z0-9][A-Za-z0-9._+-]*$/.test(version) || version.includes('..'))
1334
+ throw new Error('Invalid installed bundle version');
1335
+ if (!Number.isSafeInteger(keepVersions) || keepVersions < 1)
1336
+ throw new Error('keepVersions must be a positive integer');
1337
+ return this.underLease(target, `host upgrade to ${version}`, async () => {
1338
+ const nodeKey = `${target.host}:${target.daemonPort ?? 9700}`;
1339
+ try {
1340
+ await this.assertNoPendingHostOperations(target, prefix, allowance);
1341
+ const pending = JSON.parse(await this.sshExecData(target, pendingReceiptsCommand(prefix)));
1342
+ if (pending.length) {
1343
+ if (pending.length !== 1)
1344
+ throw new Error('Multiple unfinished host upgrades; recover an explicit receipt ID first');
1345
+ const recovered = await this.recoverBundleUpgrade(target, pending[0].id, prefix, verifyPlatform, allowance);
1346
+ this.logger.warn({ receipt: pending[0].id, recovered }, 'Recovered the unfinished host upgrade; retry the requested upgrade separately');
1347
+ return false;
1348
+ }
1349
+ const previous = await this.inspectInstalledBundle(target, prefix, allowance);
1350
+ if (previous.managed)
1351
+ throw Error('Independent owner detected. Use a sealed managed kernel rollout for this node');
1352
+ const candidate = JSON.parse(await this.sshExecData(target, bundleProbeCommand(prefix, version)));
1353
+ await this.sshExec(target, `${shellEscape(`${candidate.root}/dist/cli/omnitron.js`)} --version`, 120_000);
1354
+ const inventory = JSON.parse(await this.sshExecData(target, inventoryCommand(previous, true)));
1355
+ inventory.runtime = JSON.parse(await this.sshExecData(target, runtimeProbeCommand(previous, inventory.status.pid)));
1356
+ const plan = planHostUpgrade(previous, candidate, inventory);
1357
+ await this.sshExec(target, contractPreflightCommand(plan.apps));
1358
+ for (const app of plan.apps) {
1359
+ await this.sshExec(target, hookCommand(app, previous, 'verify'), 330_000);
1360
+ if (plan.online.includes(app.name))
1361
+ await this.sshExec(target, appHealthCommand(app, previous), 330_000);
1362
+ }
1363
+ this.emitProgress(nodeKey, '*', 'verifying', 0, 'Checking candidate bootstrap readers before stopping applications');
1364
+ await this.sshExecData(target, bootstrapPreflightCommand(plan), HOST_BOOTSTRAP_PREFLIGHT_TIMEOUT_MS + 10_000);
1365
+ const id = `${new Date().toISOString().replace(/[:.]/g, '-')}-${crypto.randomUUID()}`;
1366
+ const receiptPath = `${prefix}/upgrade-receipts/${id}.json`;
1367
+ const receipt = await executeHostUpgrade(plan, id, this.hostUpgradeActions(target, prefix, keepVersions, plan, verifyPlatform));
1368
+ const ok = receipt.outcome === 'upgraded';
1369
+ this.emitProgress(nodeKey, '*', ok ? 'success' : 'failed', 100, `${receipt.outcome}; recovery receipt: ${receiptPath}`);
1370
+ this.logger[ok ? 'info' : 'error']({ host: target.host, version, receipt: receiptPath, outcome: receipt.outcome }, 'Controlled host upgrade finished');
1371
+ return ok;
1277
1372
  }
1278
- this.emitProgress(nodeKey, '*', 'restarting', 60, 'Restarting the daemon into the new version');
1279
- // By absolute path into `current`, not by name. A bare `omnitron` is
1280
- // whatever the node's PATH resolves — which, until the step above ran,
1281
- // was a different installation entirely. Naming the copy we just
1282
- // activated is the difference between restarting the new version and
1283
- // restarting whatever was there.
1284
- const cli = shellEscape(`${prefix}/current/dist/cli/omnitron.js`);
1285
- await this.sshExec(target, `${cli} down 2>/dev/null; ${cli} up --no-infra`, 180_000).catch((err) => {
1286
- this.logger.warn({ host: target.host, error: err.message }, 'Restart command did not return cleanly — verifying anyway');
1287
- });
1288
- this.emitProgress(nodeKey, '*', 'verifying', 80, 'Verifying the daemon answers');
1289
- const started = await this.awaitDaemon(target, 120_000);
1290
- if (!started.ok) {
1291
- // Reported, and NOT rolled back automatically. A daemon that will not
1292
- // start is a decision for whoever is watching: the previous version
1293
- // is still on disk and one `ln -sfn` away, and guessing that a
1294
- // rollback is wanted can be as wrong as guessing it is not.
1295
- this.logger.error({ host: target.host, version, detail: started.detail }, 'The new version did not answer — the previous one is still installed');
1296
- this.emitProgress(nodeKey, '*', 'failed', 80, `${version} did not answer: ${started.detail}. Roll back with ` +
1297
- `\`ln -sfn ${prefix}/versions/<previous> ${prefix}/current\` and restart.`);
1373
+ catch (error) {
1374
+ const message = error.message;
1375
+ this.emitProgress(nodeKey, '*', 'failed', 0, message);
1376
+ this.logger.error({ host: target.host, version, error: message }, 'Host upgrade refused or preparation failed');
1298
1377
  return false;
1299
1378
  }
1300
- // Only once the new version is serving. Pruning before this could
1301
- // remove the version a rollback needs.
1302
- for (const step of pruneSteps(layout, keepVersions)) {
1303
- await this.sshExec(target, step.command, step.timeoutMs).catch((err) => {
1304
- // Retention failing is not the upgrade failing.
1305
- this.logger.warn({ host: target.host, error: err.message }, 'Version retention failed');
1306
- });
1307
- }
1308
- this.emitProgress(nodeKey, '*', 'success', 100, `Running ${version} — ${started.detail}`);
1309
- this.logger.info({ host: target.host, version, daemon: started.detail }, 'Node upgraded');
1310
- return true;
1311
- }
1312
- catch (err) {
1313
- const message = err.message;
1314
- this.emitProgress(nodeKey, '*', 'failed', 0, message);
1315
- this.logger.error({ host: target.host, version, error: message }, 'Activation failed');
1316
- return false;
1317
- }
1379
+ });
1380
+ }
1381
+ /** Recover a recorded interrupted upgrade under the same node lease; never prunes or changes app release versions. */
1382
+ async recoverBundleUpgrade(target, id, prefix = '/opt/omnitron', verifyPlatform, allowance) {
1383
+ assertControlledDaemonPort(target.daemonPort);
1384
+ return this.underLease(target, `recover host upgrade ${id}`, async () => {
1385
+ await this.assertNoPendingHostOperations(target, prefix, allowance);
1386
+ const records = JSON.parse(await this.sshExecData(target, pendingReceiptsCommand(prefix, id)));
1387
+ if (records.length !== 1 || records[0].id !== id)
1388
+ throw new Error('No unfinished host upgrade with that receipt ID');
1389
+ const receipt = records[0];
1390
+ const plan = planHostUpgrade(receipt.plan.previous, receipt.plan.candidate, receipt.plan.inventory);
1391
+ const installed = JSON.parse(await this.sshExecData(target, bundleProbeCommand(prefix, plan.previous.version)));
1392
+ if (JSON.stringify(installed) !== JSON.stringify(plan.previous))
1393
+ throw new Error('Recorded previous bundle changed; recovery refused');
1394
+ await this.sshExec(target, contractPreflightCommand(plan.apps));
1395
+ const result = await recoverHostUpgrade(receipt, this.hostUpgradeActions(target, prefix, 3, plan, verifyPlatform));
1396
+ this.logger[result.outcome === 'rolled-back' ? 'info' : 'error']({ receipt: `${prefix}/upgrade-receipts/${id}.json`, outcome: result.outcome }, 'Host upgrade recovery finished');
1397
+ return result.outcome === 'rolled-back';
1398
+ });
1399
+ }
1400
+ hostUpgradeActions(target, prefix, keepVersions, plan, verifyPlatform) {
1401
+ return {
1402
+ save: async (receipt) => { await this.sshExec(target, receiptCommand(prefix, receipt)); },
1403
+ stop: async (bundle) => {
1404
+ await this.sshExec(target, runtimeStopCommand(plan.inventory.runtime, bundle), 180_000);
1405
+ await this.sshExec(target, stoppedDaemonCommand(bundle), 30_000);
1406
+ },
1407
+ activate: async (bundle) => {
1408
+ for (const step of activateSteps({ prefix, version: bundle.version }))
1409
+ await this.sshExec(target, step.command, step.timeoutMs);
1410
+ },
1411
+ rebind: async (app, bundle) => { await this.sshExec(target, hookCommand(app, bundle, 'rebind'), 330_000); },
1412
+ start: async (bundle) => {
1413
+ await this.sshExec(target, runtimeStartCommand(plan.inventory.runtime, plan.previous, bundle, [plan.previous.root, plan.candidate.root]), 180_000);
1414
+ },
1415
+ verify: async (bundle) => {
1416
+ const deadline = Date.now() + 180_000;
1417
+ let lastError;
1418
+ do {
1419
+ try {
1420
+ const status = JSON.parse(await this.sshExecData(target, inventoryCommand(bundle, false), 30_000));
1421
+ verifyRestoredInventory(plan, bundle, status);
1422
+ const runtime = JSON.parse(await this.sshExecData(target, runtimeProbeCommand(bundle, status.pid)));
1423
+ if (runtime.kind !== plan.inventory.runtime.kind || (runtime.kind === 'systemd' && plan.inventory.runtime.kind === 'systemd' &&
1424
+ (runtime.scope !== plan.inventory.runtime.scope || runtime.enabled !== plan.inventory.runtime.enabled)))
1425
+ throw new Error('Supervisor state was not restored');
1426
+ for (const app of plan.apps) {
1427
+ await this.sshExec(target, hookCommand(app, bundle, 'verify'), 330_000);
1428
+ if (plan.online.includes(app.name))
1429
+ await this.sshExec(target, appHealthCommand(app, bundle), 330_000);
1430
+ }
1431
+ if (verifyPlatform)
1432
+ await verifyPlatform();
1433
+ await this.sshExec(target, updateContractBindingsCommand(plan, bundle));
1434
+ return;
1435
+ }
1436
+ catch (error) {
1437
+ lastError = error;
1438
+ }
1439
+ if (Date.now() < deadline)
1440
+ await new Promise(resolve => setTimeout(resolve, 2_000));
1441
+ } while (Date.now() < deadline);
1442
+ throw new Error(`Host and application verification failed: ${String(lastError)}`);
1443
+ },
1444
+ prune: async (protectedRoots) => {
1445
+ for (const step of pruneSteps({ prefix, version: plan.candidate.version }, keepVersions, protectedRoots))
1446
+ await this.sshExec(target, step.command, step.timeoutMs);
1447
+ },
1448
+ };
1318
1449
  }
1319
1450
  async verifySSH(target) {
1320
1451
  await this.sshExec(target, 'echo ok', 10_000);
@@ -1338,7 +1469,14 @@ export class RemoteDeployer {
1338
1469
  // Through the data channel: a lease answer carries the holder's record,
1339
1470
  // `{"token":…}`, which the masker rewrote into `"token": [REDACTED]` on
1340
1471
  // every read — a refusal could never say who held the node.
1341
- return (script) => this.sshExecData(target, script, 30_000);
1472
+ return async (script) => {
1473
+ // Confirmation itself must use the raw channel, never recursively ask
1474
+ // for another confirmation of the lease being acquired or renewed.
1475
+ const result = await this.readFromNodeRaw(target, script, 30_000);
1476
+ if (result.code !== 0)
1477
+ throw new Error(`Lease transport failed: ${result.stderr || result.stdout}`);
1478
+ return result.stdout.trim();
1479
+ };
1342
1480
  }
1343
1481
  /**
1344
1482
  * Run `work` holding the machine's deploy lease — for what changes a node
@@ -1348,15 +1486,32 @@ export class RemoteDeployer {
1348
1486
  */
1349
1487
  async underLease(target, purpose, work) {
1350
1488
  const machine = `${target.host}:${target.sshPort ?? 22}`;
1489
+ const held = this.deploymentLeases.getStore();
1490
+ if (held?.has(machine))
1491
+ return work();
1351
1492
  return withNodeLeases([{ node: machine, machine, run: this.leaseRunner(target) }], purpose, this.logger, async (leases) => {
1352
1493
  if (!leases.has(machine)) {
1353
1494
  throw new Error(`Could not reach ${machine} to lease it for ${purpose}: ${leases.unreachable.get(machine) ?? 'no answer'}`);
1354
1495
  }
1355
- return work();
1496
+ const context = new Map(held);
1497
+ context.set(machine, { confirm: step => leases.confirm(machine, step), guard: (command, timeoutMs) => leases.guard(machine, command, timeoutMs) });
1498
+ return this.deploymentLeases.run(context, work);
1356
1499
  });
1357
1500
  }
1358
- async sshExec(target, command, timeout = 60_000) {
1359
- const result = await this.execution.ssh(sshTargetOf(target), command, { timeout });
1501
+ /** Confirm a held lease before the next node operation; outside a lease this is a no-op. */
1502
+ async confirmLease(target, step) {
1503
+ const machine = `${target.host}:${target.sshPort ?? 22}`;
1504
+ await this.deploymentLeases.getStore()?.get(machine)?.confirm(step);
1505
+ }
1506
+ /** The node holds its execution fence for the command lifetime, beyond a lost controller. */
1507
+ guardedCommand(target, command, timeout) {
1508
+ const lease = this.deploymentLeases.getStore()?.get(`${target.host}:${target.sshPort ?? 22}`);
1509
+ return lease ? { command: lease.guard(command, timeout), timeout: timeout + 45_000 } : { command, timeout };
1510
+ }
1511
+ async sshExec(target, command, timeout = 60_000, stdin) {
1512
+ await this.confirmLease(target, 'remote command');
1513
+ const guarded = this.guardedCommand(target, command, timeout);
1514
+ const result = await this.execution.ssh(sshTargetOf(target), guarded.command, { timeout: guarded.timeout, ...(stdin !== undefined && { stdin }) });
1360
1515
  if (result.exitCode !== 0) {
1361
1516
  const detail = result.stderr || result.stdout || `exit ${result.exitCode}`;
1362
1517
  throw new Error(`ssh ${target.username ?? 'root'}@${target.host}: ${detail}`);
@@ -1367,7 +1522,8 @@ export class RemoteDeployer {
1367
1522
  async sshExecData(target, command, timeout = 60_000) {
1368
1523
  const result = await this.readFromNode(target, command, timeout);
1369
1524
  if (result.code !== 0) {
1370
- throw new Error(`ssh ${target.username ?? 'root'}@${target.host}: ${result.stderr || result.stdout || `exit ${result.code}`}`);
1525
+ const reason = redactDiagnosticText(commandFailure(result.stderr, `exit ${result.code}`));
1526
+ throw new Error(`ssh ${target.username ?? 'root'}@${target.host}: ${reason}`);
1371
1527
  }
1372
1528
  return result.stdout.trim();
1373
1529
  }
@@ -1381,7 +1537,9 @@ export class RemoteDeployer {
1381
1537
  * keep), and a throw would flatten the two into one.
1382
1538
  */
1383
1539
  async runOnNode(target, command, timeoutMs = 600_000) {
1384
- const result = await this.execution.ssh(sshTargetOf(target), command, { timeout: timeoutMs });
1540
+ await this.confirmLease(target, 'remote command');
1541
+ const guarded = this.guardedCommand(target, command, timeoutMs);
1542
+ const result = await this.execution.ssh(sshTargetOf(target), guarded.command, { timeout: guarded.timeout });
1385
1543
  return { stdout: result.stdout, stderr: result.stderr, code: result.exitCode ?? -1 };
1386
1544
  }
1387
1545
  /**
@@ -1396,6 +1554,11 @@ export class RemoteDeployer {
1396
1554
  * failure with its own code, -2, and its words on stderr — never data.
1397
1555
  */
1398
1556
  async readFromNode(target, command, timeoutMs = 600_000) {
1557
+ await this.confirmLease(target, 'remote data command');
1558
+ const guarded = this.guardedCommand(target, command, timeoutMs);
1559
+ return this.readFromNodeRaw(target, guarded.command, guarded.timeout);
1560
+ }
1561
+ async readFromNodeRaw(target, command, timeoutMs) {
1399
1562
  const result = await this.execution.ssh(sshTargetOf(target), throughDataChannel(command), { timeout: timeoutMs });
1400
1563
  const data = fromDataChannel(result.stdout);
1401
1564
  if (!data.ok) {
@@ -1403,8 +1566,23 @@ export class RemoteDeployer {
1403
1566
  }
1404
1567
  return { stdout: data.text, stderr: result.stderr, code: result.exitCode ?? -1 };
1405
1568
  }
1569
+ /** Use this inside underLease so uploads share the command confirmation boundary. */
1570
+ async uploadToNode(target, localPath, remotePath) {
1571
+ await this.confirmLease(target, 'file upload');
1572
+ const lease = this.deploymentLeases.getStore()?.get(`${target.host}:${target.sshPort ?? 22}`);
1573
+ if (!lease) {
1574
+ await this.execution.uploadFile(sshTargetOf(target), localPath, remotePath);
1575
+ return;
1576
+ }
1577
+ await this.execution.uploadFile(sshTargetOf(target), localPath, remotePath, {
1578
+ runControl: async (command, timeout) => {
1579
+ const result = await this.runOnNode(target, command, timeout);
1580
+ return { stdout: result.stdout, stderr: result.stderr, exitCode: result.code };
1581
+ },
1582
+ });
1583
+ }
1406
1584
  async scpTransfer(target, localPath, remotePath) {
1407
- await this.execution.uploadFile(sshTargetOf(target), localPath, remotePath);
1585
+ await this.uploadToNode(target, localPath, remotePath);
1408
1586
  }
1409
1587
  /**
1410
1588
  * Ask the node's daemon to run the app whose artifact just landed.
@@ -1455,7 +1633,6 @@ export class RemoteDeployer {
1455
1633
  const { createHash } = await import('node:crypto');
1456
1634
  const fsp = await import('node:fs/promises');
1457
1635
  const os = await import('node:os');
1458
- const path = await import('node:path');
1459
1636
  const stat = await fsp.stat(localDir).catch(() => null);
1460
1637
  if (!stat?.isDirectory())
1461
1638
  throw new Error(`No such directory to serve: ${localDir}`);
@@ -1499,7 +1676,7 @@ export class RemoteDeployer {
1499
1676
  // this pipeline's status is gzip's alone, so a `tar` that stopped
1500
1677
  // halfway left a short archive that was then summed, sent, checked
1501
1678
  // against its own short sum — and failed only on the node: «gzip:
1502
- // stdin: unexpected end of file» (daos-202609221949-23dce2f6 to test,
1679
+ // stdin: unexpected end of file» (sample-202609221949-23dce2f6 to test,
1503
1680
  // 2026-09-22). The sum proves the file ARRIVED as it left; nothing
1504
1681
  // proved it left whole.
1505
1682
  const content = await fsp.readFile(archive).catch(() => null);
@@ -1560,7 +1737,7 @@ export class RemoteDeployer {
1560
1737
  if (!alreadyThere) {
1561
1738
  await this.sshExec(target, `rm -rf ${shellEscape(remoteDir)} ${shellEscape(marker)}`).catch(() => undefined);
1562
1739
  await this.sshExec(target, `mkdir -p ${shellEscape(remoteDir)}`);
1563
- await this.execution.uploadFile(sshTargetOf(target), archive, remoteFile);
1740
+ await this.uploadToNode(target, archive, remoteFile);
1564
1741
  // `uploadFile` already refuses a file that landed SHORT. That catches
1565
1742
  // the likely failure and not the other one: a transfer that completes
1566
1743
  // and corrupts in the middle has the right length and the wrong
@@ -1625,14 +1802,41 @@ export class RemoteDeployer {
1625
1802
  await this.sshExec(target, `ln -s ${shellEscape(digest)} ${shellEscape(tmp)} && mv -T ${shellEscape(tmp)} ${shellEscape(`${root}/${link}`)}`);
1626
1803
  this.logger.info({ host: target.host, link, digest }, 'The gateway now serves this build through its link');
1627
1804
  }
1628
- /**
1629
- * Hard-link the assets of the build the running gateways serve into the
1630
- * one just unpacked, and remove builds nobody serves
1631
- * (`static-carry-forward.ts`). Never fails the delivery: without it an open
1632
- * tab reloads onto the new build instead of continuing, which the portal
1633
- * handles; with a failed delivery nobody gets a portal at all.
1634
- */
1635
- async carryPreviousBuildForward(target, root, fresh) {
1805
+ async carryPreviousBuildForward(target, input, fresh) {
1806
+ if (typeof input !== 'string') {
1807
+ const { immutableAssetsRoot, immutableAssetsScript } = await import('./static-carry-forward.js');
1808
+ const expectedRoot = immutableAssetsRoot(input.owner);
1809
+ // The native execution fence serializes every publisher, including reentrant calls.
1810
+ return this.underLease(target, 'retain immutable public assets', async () => {
1811
+ await this.assertNoPendingHostOperations(target);
1812
+ const fs = await import('node:fs/promises');
1813
+ const { tmpdir } = await import('node:os');
1814
+ const { join } = await import('node:path');
1815
+ const { randomUUID } = await import('node:crypto');
1816
+ const temporary = await fs.mkdtemp(join(tmpdir(), 'omnitron-static-assets-'));
1817
+ const local = join(temporary, 'request.json');
1818
+ const remote = '/tmp/omnitron-static-assets-' + randomUUID() + '.json';
1819
+ try {
1820
+ await fs.writeFile(local, JSON.stringify(input), { mode: 0o600, flag: 'wx' });
1821
+ await this.uploadToNode(target, local, remote);
1822
+ const output = await this.sshExec(target, immutableAssetsScript(remote), 300_000);
1823
+ const receipt = JSON.parse(output);
1824
+ if (receipt.assetsRoot !== expectedRoot || !/^[a-f0-9]{64}$/.test(receipt.manifestSha256) ||
1825
+ ![receipt.files, receipt.added, receipt.reused, receipt.bytes].every((n) => Number.isSafeInteger(n) && n >= 0)) {
1826
+ throw new Error('Invalid immutable asset publication receipt');
1827
+ }
1828
+ this.logger.info({ host: target.host, owner: input.owner, ...receipt }, 'Immutable public asset bytes retained');
1829
+ return receipt;
1830
+ }
1831
+ finally {
1832
+ await fs.rm(temporary, { recursive: true, force: true });
1833
+ await this.sshExec(target, 'rm -f -- ' + shellEscape(remote)).catch(() => undefined);
1834
+ }
1835
+ });
1836
+ }
1837
+ const root = input;
1838
+ if (!fresh)
1839
+ throw new Error('Missing legacy static build');
1636
1840
  try {
1637
1841
  const { GATEWAY_MOUNTS_COMMAND, readGatewayMounts, carryForwardScript } = await import('./static-carry-forward.js');
1638
1842
  const mounts = readGatewayMounts(await this.sshExec(target, GATEWAY_MOUNTS_COMMAND).catch(() => ''));
@@ -1643,6 +1847,7 @@ export class RemoteDeployer {
1643
1847
  catch (err) {
1644
1848
  this.logger.warn({ host: target.host, fresh, error: err.message.slice(0, 400) }, 'Could not carry the previous build forward — open tabs will reload onto the new one');
1645
1849
  }
1850
+ return undefined;
1646
1851
  }
1647
1852
  async signalRemoteDaemon(target, appName) {
1648
1853
  try {
@@ -1756,8 +1961,8 @@ export class RemoteDeployer {
1756
1961
  // Private — Progress
1757
1962
  // ===========================================================================
1758
1963
  emitProgress(node, app, status, progress, message) {
1759
- const event = { node, app, status, progress, message };
1760
- this.lastProgress.set(`${node}\u0000${app}`, { ...event, at: new Date().toISOString() });
1964
+ const event = { ...transferScope.getStore(), node, app, status, progress, message: redactDiagnosticText(message), at: new Date().toISOString() };
1965
+ this.lastProgress.set(deploymentProgressKey(event), event);
1761
1966
  for (const handler of this.progressHandlers) {
1762
1967
  try {
1763
1968
  handler(event);