@omnitron-dev/omnitron 0.3.3 → 0.4.6

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 (358) hide show
  1. package/README.md +296 -6
  2. package/bin/{pnpmfile-sdk.mjs → pnpmfile-sdk.js} +19 -1
  3. package/bin/sdk.d.ts +19 -0
  4. package/bin/sdk.js +932 -0
  5. package/dist/BUILD.json +2 -2
  6. package/dist/cli/omnitron.js +68 -20
  7. package/dist/cli/omnitron.js.map +1 -1
  8. package/dist/commands/infra.d.ts +8 -2
  9. package/dist/commands/infra.d.ts.map +1 -1
  10. package/dist/commands/infra.js +52 -59
  11. package/dist/commands/infra.js.map +1 -1
  12. package/dist/commands/node.d.ts.map +1 -1
  13. package/dist/commands/node.js +8 -1
  14. package/dist/commands/node.js.map +1 -1
  15. package/dist/commands/release-store.d.ts.map +1 -1
  16. package/dist/commands/release-store.js +6 -9
  17. package/dist/commands/release-store.js.map +1 -1
  18. package/dist/commands/release.d.ts +4 -1
  19. package/dist/commands/release.d.ts.map +1 -1
  20. package/dist/commands/release.js +125 -5
  21. package/dist/commands/release.js.map +1 -1
  22. package/dist/commands/stack.d.ts +3 -6
  23. package/dist/commands/stack.d.ts.map +1 -1
  24. package/dist/commands/stack.js +51 -9
  25. package/dist/commands/stack.js.map +1 -1
  26. package/dist/commands/status.d.ts.map +1 -1
  27. package/dist/commands/status.js +1 -0
  28. package/dist/commands/status.js.map +1 -1
  29. package/dist/config/saved.d.ts +3 -0
  30. package/dist/config/saved.d.ts.map +1 -1
  31. package/dist/config/saved.js +1 -0
  32. package/dist/config/saved.js.map +1 -1
  33. package/dist/config/types.d.ts +4 -0
  34. package/dist/config/types.d.ts.map +1 -1
  35. package/dist/daemon/daemon-client.d.ts +3 -15
  36. package/dist/daemon/daemon-client.d.ts.map +1 -1
  37. package/dist/daemon/daemon-client.js +4 -0
  38. package/dist/daemon/daemon-client.js.map +1 -1
  39. package/dist/daemon/daemon.d.ts +5 -11
  40. package/dist/daemon/daemon.d.ts.map +1 -1
  41. package/dist/daemon/daemon.js +58 -48
  42. package/dist/daemon/daemon.js.map +1 -1
  43. package/dist/daemon/daemon.rpc-service.d.ts +3 -41
  44. package/dist/daemon/daemon.rpc-service.d.ts.map +1 -1
  45. package/dist/daemon/daemon.rpc-service.js +50 -117
  46. package/dist/daemon/daemon.rpc-service.js.map +1 -1
  47. package/dist/daemon/darwin-owner-evidence.js +1 -1
  48. package/dist/daemon/darwin-owner-evidence.js.map +1 -1
  49. package/dist/daemon/execution-capabilities.d.ts +1 -1
  50. package/dist/daemon/execution-capabilities.d.ts.map +1 -1
  51. package/dist/daemon/execution-capabilities.js +3 -3
  52. package/dist/daemon/execution-capabilities.js.map +1 -1
  53. package/dist/daemon/execution-client.d.ts +5 -1
  54. package/dist/daemon/execution-client.d.ts.map +1 -1
  55. package/dist/daemon/execution-client.js +45 -19
  56. package/dist/daemon/execution-client.js.map +1 -1
  57. package/dist/daemon/execution-host.d.ts +4 -11
  58. package/dist/daemon/execution-host.d.ts.map +1 -1
  59. package/dist/daemon/execution-host.js +3 -9
  60. package/dist/daemon/execution-host.js.map +1 -1
  61. package/dist/daemon/execution-owner.d.ts.map +1 -1
  62. package/dist/daemon/execution-owner.js +2 -16
  63. package/dist/daemon/execution-owner.js.map +1 -1
  64. package/dist/daemon/execution-shutdown.d.ts +1 -1
  65. package/dist/daemon/execution-shutdown.d.ts.map +1 -1
  66. package/dist/daemon/managed-owner-build.d.ts +4 -0
  67. package/dist/daemon/managed-owner-build.d.ts.map +1 -1
  68. package/dist/daemon/managed-owner-build.js +14 -2
  69. package/dist/daemon/managed-owner-build.js.map +1 -1
  70. package/dist/daemon/managed-runtime.js +1 -1
  71. package/dist/daemon/managed-runtime.js.map +1 -1
  72. package/dist/daemon/owner-reconciliation.d.ts.map +1 -1
  73. package/dist/daemon/owner-reconciliation.js +1 -2
  74. package/dist/daemon/owner-reconciliation.js.map +1 -1
  75. package/dist/daemon/startup-config.d.ts +1 -0
  76. package/dist/daemon/startup-config.d.ts.map +1 -1
  77. package/dist/daemon/system-guardian-cgroup.js +1 -1
  78. package/dist/daemon/system-guardian-cgroup.js.map +1 -1
  79. package/dist/infrastructure/container-runtime.d.ts +8 -0
  80. package/dist/infrastructure/container-runtime.d.ts.map +1 -1
  81. package/dist/infrastructure/container-runtime.js +5 -0
  82. package/dist/infrastructure/container-runtime.js.map +1 -1
  83. package/dist/infrastructure/existing-containers.d.ts +25 -0
  84. package/dist/infrastructure/existing-containers.d.ts.map +1 -0
  85. package/dist/infrastructure/existing-containers.js +183 -0
  86. package/dist/infrastructure/existing-containers.js.map +1 -0
  87. package/dist/infrastructure/infrastructure.service.d.ts +19 -1
  88. package/dist/infrastructure/infrastructure.service.d.ts.map +1 -1
  89. package/dist/infrastructure/infrastructure.service.js +136 -17
  90. package/dist/infrastructure/infrastructure.service.js.map +1 -1
  91. package/dist/infrastructure/presets/postgres.js +1 -1
  92. package/dist/infrastructure/presets/postgres.js.map +1 -1
  93. package/dist/infrastructure/presets/registry.d.ts.map +1 -1
  94. package/dist/infrastructure/presets/registry.js +11 -19
  95. package/dist/infrastructure/presets/registry.js.map +1 -1
  96. package/dist/infrastructure/stack-infra-manager.d.ts +11 -1
  97. package/dist/infrastructure/stack-infra-manager.d.ts.map +1 -1
  98. package/dist/infrastructure/stack-infra-manager.js +79 -8
  99. package/dist/infrastructure/stack-infra-manager.js.map +1 -1
  100. package/dist/mcp/tool-groups/infra.tools.d.ts.map +1 -1
  101. package/dist/mcp/tool-groups/infra.tools.js +4 -1
  102. package/dist/mcp/tool-groups/infra.tools.js.map +1 -1
  103. package/dist/monitoring/log-journal.d.ts.map +1 -1
  104. package/dist/monitoring/log-journal.js +1 -2
  105. package/dist/monitoring/log-journal.js.map +1 -1
  106. package/dist/operations.d.ts +1 -0
  107. package/dist/operations.d.ts.map +1 -1
  108. package/dist/operations.js +1 -0
  109. package/dist/operations.js.map +1 -1
  110. package/dist/orchestrator/app-name.d.ts +33 -0
  111. package/dist/orchestrator/app-name.d.ts.map +1 -0
  112. package/dist/orchestrator/app-name.js +68 -0
  113. package/dist/orchestrator/app-name.js.map +1 -0
  114. package/dist/orchestrator/bootstrap-loader.d.ts +2 -0
  115. package/dist/orchestrator/bootstrap-loader.d.ts.map +1 -1
  116. package/dist/orchestrator/bootstrap-loader.js +2 -1
  117. package/dist/orchestrator/bootstrap-loader.js.map +1 -1
  118. package/dist/orchestrator/classic-launcher.d.ts.map +1 -1
  119. package/dist/orchestrator/classic-launcher.js +2 -1
  120. package/dist/orchestrator/classic-launcher.js.map +1 -1
  121. package/dist/orchestrator/execution-contract.d.ts +2 -3
  122. package/dist/orchestrator/execution-contract.d.ts.map +1 -1
  123. package/dist/orchestrator/file-watcher.d.ts +11 -23
  124. package/dist/orchestrator/file-watcher.d.ts.map +1 -1
  125. package/dist/orchestrator/file-watcher.js +57 -42
  126. package/dist/orchestrator/file-watcher.js.map +1 -1
  127. package/dist/orchestrator/orchestrator.service.d.ts +11 -31
  128. package/dist/orchestrator/orchestrator.service.d.ts.map +1 -1
  129. package/dist/orchestrator/orchestrator.service.js +127 -109
  130. package/dist/orchestrator/orchestrator.service.js.map +1 -1
  131. package/dist/project/bootstrap-metadata.d.ts +1 -1
  132. package/dist/project/bootstrap-metadata.d.ts.map +1 -1
  133. package/dist/project/bootstrap-metadata.js +3 -2
  134. package/dist/project/bootstrap-metadata.js.map +1 -1
  135. package/dist/project/node-stack-stop.d.ts +2 -1
  136. package/dist/project/node-stack-stop.d.ts.map +1 -1
  137. package/dist/project/node-stack-stop.js +5 -1
  138. package/dist/project/node-stack-stop.js.map +1 -1
  139. package/dist/project/stack-diagnosis.d.ts.map +1 -1
  140. package/dist/project/stack-diagnosis.js +2 -3
  141. package/dist/project/stack-diagnosis.js.map +1 -1
  142. package/dist/release/artifact-store.d.ts +42 -7
  143. package/dist/release/artifact-store.d.ts.map +1 -1
  144. package/dist/release/artifact-store.js +176 -62
  145. package/dist/release/artifact-store.js.map +1 -1
  146. package/dist/release/closure-library-path.d.ts +8 -2
  147. package/dist/release/closure-library-path.d.ts.map +1 -1
  148. package/dist/release/closure-library-path.js +72 -28
  149. package/dist/release/closure-library-path.js.map +1 -1
  150. package/dist/release/configured-store.d.ts +6 -0
  151. package/dist/release/configured-store.d.ts.map +1 -0
  152. package/dist/release/configured-store.js +54 -0
  153. package/dist/release/configured-store.js.map +1 -0
  154. package/dist/release/load.d.ts +3 -0
  155. package/dist/release/load.d.ts.map +1 -1
  156. package/dist/release/load.js +8 -2
  157. package/dist/release/load.js.map +1 -1
  158. package/dist/release/local-installation.d.ts +2 -0
  159. package/dist/release/local-installation.d.ts.map +1 -1
  160. package/dist/release/local-installation.js +1 -1
  161. package/dist/release/local-installation.js.map +1 -1
  162. package/dist/release/portable-archive.d.ts +3 -0
  163. package/dist/release/portable-archive.d.ts.map +1 -1
  164. package/dist/release/portable-archive.js +13 -7
  165. package/dist/release/portable-archive.js.map +1 -1
  166. package/dist/release/registry-framework.d.ts +25 -0
  167. package/dist/release/registry-framework.d.ts.map +1 -1
  168. package/dist/release/registry-framework.js +51 -3
  169. package/dist/release/registry-framework.js.map +1 -1
  170. package/dist/release/target-runtime.d.ts +4 -0
  171. package/dist/release/target-runtime.d.ts.map +1 -1
  172. package/dist/release/target-runtime.js +9 -0
  173. package/dist/release/target-runtime.js.map +1 -1
  174. package/dist/services/host-upgrade.d.ts +2 -0
  175. package/dist/services/host-upgrade.d.ts.map +1 -1
  176. package/dist/services/host-upgrade.js +6 -2
  177. package/dist/services/host-upgrade.js.map +1 -1
  178. package/dist/services/infrastructure.rpc-service.d.ts +14 -2
  179. package/dist/services/infrastructure.rpc-service.d.ts.map +1 -1
  180. package/dist/services/infrastructure.rpc-service.js +128 -17
  181. package/dist/services/infrastructure.rpc-service.js.map +1 -1
  182. package/dist/services/kernel-rollout.service.d.ts.map +1 -1
  183. package/dist/services/kernel-rollout.service.js +1 -2
  184. package/dist/services/kernel-rollout.service.js.map +1 -1
  185. package/dist/services/migration-process.d.ts +1 -0
  186. package/dist/services/migration-process.d.ts.map +1 -1
  187. package/dist/services/migration-process.js +4 -2
  188. package/dist/services/migration-process.js.map +1 -1
  189. package/dist/services/node-deploy-lease.d.ts +4 -1
  190. package/dist/services/node-deploy-lease.d.ts.map +1 -1
  191. package/dist/services/node-deploy-lease.js +29 -4
  192. package/dist/services/node-deploy-lease.js.map +1 -1
  193. package/dist/services/node-manager.service.d.ts +5 -25
  194. package/dist/services/node-manager.service.d.ts.map +1 -1
  195. package/dist/services/node-manager.service.js +150 -139
  196. package/dist/services/node-manager.service.js.map +1 -1
  197. package/dist/services/pipeline-definition.d.ts.map +1 -1
  198. package/dist/services/pipeline-definition.js +32 -6
  199. package/dist/services/pipeline-definition.js.map +1 -1
  200. package/dist/services/pipeline.service.d.ts +7 -1
  201. package/dist/services/pipeline.service.d.ts.map +1 -1
  202. package/dist/services/pipeline.service.js +106 -13
  203. package/dist/services/pipeline.service.js.map +1 -1
  204. package/dist/services/project.rpc-service.d.ts +6 -5
  205. package/dist/services/project.rpc-service.d.ts.map +1 -1
  206. package/dist/services/project.rpc-service.js +13 -0
  207. package/dist/services/project.rpc-service.js.map +1 -1
  208. package/dist/services/project.service.d.ts +30 -6
  209. package/dist/services/project.service.d.ts.map +1 -1
  210. package/dist/services/project.service.js +414 -66
  211. package/dist/services/project.service.js.map +1 -1
  212. package/dist/services/release.rpc-service.d.ts +2 -1
  213. package/dist/services/release.rpc-service.d.ts.map +1 -1
  214. package/dist/services/release.rpc-service.js +19 -3
  215. package/dist/services/release.rpc-service.js.map +1 -1
  216. package/dist/services/release.service.d.ts +24 -11
  217. package/dist/services/release.service.d.ts.map +1 -1
  218. package/dist/services/release.service.js +162 -39
  219. package/dist/services/release.service.js.map +1 -1
  220. package/dist/services/remote-deployer.service.d.ts +1 -1
  221. package/dist/services/remote-deployer.service.d.ts.map +1 -1
  222. package/dist/services/remote-deployer.service.js +3 -0
  223. package/dist/services/remote-deployer.service.js.map +1 -1
  224. package/dist/services/secrets.service.d.ts +6 -0
  225. package/dist/services/secrets.service.d.ts.map +1 -1
  226. package/dist/services/secrets.service.js +95 -51
  227. package/dist/services/secrets.service.js.map +1 -1
  228. package/dist/shared/dto/backend.d.ts +3 -0
  229. package/dist/shared/dto/backend.d.ts.map +1 -1
  230. package/dist/shared/dto/backend.js.map +1 -1
  231. package/dist/shared/dto/nodes.d.ts +2 -0
  232. package/dist/shared/dto/nodes.d.ts.map +1 -1
  233. package/dist/shared/dto/pipelines.d.ts +54 -5
  234. package/dist/shared/dto/pipelines.d.ts.map +1 -1
  235. package/dist/shared/dto/pipelines.js +0 -7
  236. package/dist/shared/dto/pipelines.js.map +1 -1
  237. package/dist/shared/dto/project.d.ts +61 -1
  238. package/dist/shared/dto/project.d.ts.map +1 -1
  239. package/dist/shared/dto/releases.d.ts +8 -1
  240. package/dist/shared/dto/releases.d.ts.map +1 -1
  241. package/dist/shared/dto/services.d.ts +44 -18
  242. package/dist/shared/dto/services.d.ts.map +1 -1
  243. package/dist/shared/dto/services.js.map +1 -1
  244. package/dist/shared/release-reading.d.ts +6 -0
  245. package/dist/shared/release-reading.d.ts.map +1 -1
  246. package/dist/shared/release-reading.js +42 -0
  247. package/dist/shared/release-reading.js.map +1 -1
  248. package/dist/workers/system-worker-manager.d.ts +1 -2
  249. package/dist/workers/system-worker-manager.d.ts.map +1 -1
  250. package/dist/workers/system-worker-manager.js +5 -3
  251. package/dist/workers/system-worker-manager.js.map +1 -1
  252. package/package.json +20 -19
  253. package/webapp/dist/BUILD.json +2 -2
  254. package/webapp/dist/assets/{access-jWkHxGc7.js → access-B2gXuoMG.js} +1 -1
  255. package/webapp/dist/assets/{access-48hkC2-P.js → access-I0f72P9m.js} +1 -1
  256. package/webapp/dist/assets/{admin-data-table-BKSDI8sU.js → admin-data-table-CAEL2f-m.js} +1 -1
  257. package/webapp/dist/assets/{alert-uBG6r9NW.js → alert-BdJ2uaY0.js} +1 -1
  258. package/webapp/dist/assets/{alerts-CuPQ9YQJ.js → alerts-DeVkMXWo.js} +1 -1
  259. package/webapp/dist/assets/{apps-Drio028B.js → apps-9SuDvyGQ.js} +1 -1
  260. package/webapp/dist/assets/{audit-npSFJECe.js → audit-DT8cY7Ys.js} +1 -1
  261. package/webapp/dist/assets/backend-status.store-BbBE9cn8.js +4 -0
  262. package/webapp/dist/assets/{card-DkH32gMY.js → card-DaUEmUI5.js} +1 -1
  263. package/webapp/dist/assets/{chart-BpGXlCJc.js → chart-BKXP2ter.js} +1 -1
  264. package/webapp/dist/assets/{client-DFnuv2z3.js → client-CgyTwq9g.js} +1 -1
  265. package/webapp/dist/assets/{code-editor-DK6Tmmxv.js → code-editor-JVuQ4m-z.js} +1 -1
  266. package/webapp/dist/assets/{comparison-bars-BtC0dHjF.js → comparison-bars-Ds5Dt1oj.js} +1 -1
  267. package/webapp/dist/assets/{confirm-dialog-BbGsAz7_.js → confirm-dialog-BayExVbF.js} +1 -1
  268. package/webapp/dist/assets/{console-keyboard-D3YCA0yU.js → console-keyboard-uSLt92dB.js} +1 -1
  269. package/webapp/dist/assets/{containers-Bl8gAyZX.js → containers-DkXTgcrY.js} +1 -1
  270. package/webapp/dist/assets/{controls-C5W8gHU4.js → controls-CqeGPnaF.js} +1 -1
  271. package/webapp/dist/assets/{dashboard-UHlet3H9.js → dashboard-By5yPuOf.js} +1 -1
  272. package/webapp/dist/assets/{dashboard-builder-67PZFqhE.js → dashboard-builder-C0hvBwkd.js} +1 -1
  273. package/webapp/dist/assets/deploy-progress-B39cvvCE.js +1 -0
  274. package/webapp/dist/assets/deploy-release-dialog-CnzaO_xL.js +1 -0
  275. package/webapp/dist/assets/deployments-BXP943hA.js +1 -0
  276. package/webapp/dist/assets/{detail-B4TiBfxU.js → detail-B84RgiOb.js} +1 -1
  277. package/webapp/dist/assets/{detail-CYS81K6Y.js → detail-CVXDks9-.js} +1 -1
  278. package/webapp/dist/assets/detail-D9DixtaK.js +2 -0
  279. package/webapp/dist/assets/{empty-content-7jOFhG4C.js → empty-content-eyDOuOVp.js} +1 -1
  280. package/webapp/dist/assets/{error-boundary-CLLI8PWw.js → error-boundary-CQmDr_HS.js} +1 -1
  281. package/webapp/dist/assets/{event-fields-CiyqrRO8.js → event-fields-C7p2a2HY.js} +1 -1
  282. package/webapp/dist/assets/{files-DigwXndm.js → files-BsfGT3t6.js} +2 -2
  283. package/webapp/dist/assets/{icons-OboZgWSt.js → icons-B9Ct8PJ9.js} +1 -1
  284. package/webapp/dist/assets/index-BEfv96EF.js +1 -0
  285. package/webapp/dist/assets/{label-B1SF0RTL.js → label-avMhe08g.js} +1 -1
  286. package/webapp/dist/assets/{log-level-filter-Bcn31D1F.js → log-level-filter-oaUGdbpk.js} +1 -1
  287. package/webapp/dist/assets/{logs-BqHOufk8.js → logs-iC1OEDv3.js} +1 -1
  288. package/webapp/dist/assets/{metric-chart-M-kI-XOt.js → metric-chart-CSa_qv4F.js} +1 -1
  289. package/webapp/dist/assets/{metrics-QIQaF7iS.js → metrics-CKCmcGKw.js} +1 -1
  290. package/webapp/dist/assets/{mui-Cd711nOk.js → mui-B3fJdIMc.js} +1 -1
  291. package/webapp/dist/assets/{mui-CdB_p2lt.js → mui-Bdr6Ks5j.js} +1 -1
  292. package/webapp/dist/assets/{mui-BIz4LSVs.js → mui-CADnFGCx.js} +1 -1
  293. package/webapp/dist/assets/{mui-AnEgAVjz.js → mui-CMWGTMXv.js} +1 -1
  294. package/webapp/dist/assets/{mui-DyT2n1lx.js → mui-CN3dT7bb.js} +1 -1
  295. package/webapp/dist/assets/{mui-BwsIrivo.js → mui-CPEkFAPo.js} +1 -1
  296. package/webapp/dist/assets/{mui-B1jrje6Z.js → mui-D3qAWvfZ.js} +1 -1
  297. package/webapp/dist/assets/{mui-C_hromOc.js → mui-D7tBU80e.js} +1 -1
  298. package/webapp/dist/assets/{mui-y44PQOfG.js → mui-DaJavAoc.js} +1 -1
  299. package/webapp/dist/assets/{mui-BXSXx9c9.js → mui-SNRRJ_vi.js} +1 -1
  300. package/webapp/dist/assets/{nodes-BJPk02vv.js → nodes-DtLyXH0V.js} +1 -1
  301. package/webapp/dist/assets/{operation-status-Bm1x1wTz.js → operation-status-DHyYOT7G.js} +1 -1
  302. package/webapp/dist/assets/{page-breadcrumbs-fR7Jmpp4.js → page-breadcrumbs-3R8RZ3nA.js} +1 -1
  303. package/webapp/dist/assets/pipelines-Do2NAAqK.js +3 -0
  304. package/webapp/dist/assets/project.store-D5IR3fo9.js +1 -0
  305. package/webapp/dist/assets/{projects-YoBzcQ24.js → projects-BqlGbzeG.js} +1 -1
  306. package/webapp/dist/assets/{realtime.store-CBDO4Abj.js → realtime.store-C8D235-B.js} +1 -1
  307. package/webapp/dist/assets/release-bits-IehuBssK.js +1 -0
  308. package/webapp/dist/assets/release-build-panel-C48hP_9w.js +1 -0
  309. package/webapp/dist/assets/release-deployment-state-BfmxZP4Y.js +1 -0
  310. package/webapp/dist/assets/releases-Cm0RV5Xu.js +2 -0
  311. package/webapp/dist/assets/{search-input-C0MHI8vO.js → search-input-SWD1dXxD.js} +1 -1
  312. package/webapp/dist/assets/settings-DwuEPQGg.js +1 -0
  313. package/webapp/dist/assets/sign-in-CQ-WeS5A.js +1 -0
  314. package/webapp/dist/assets/{skeleton-BmWDJWF9.js → skeleton-BnVxAoeX.js} +1 -1
  315. package/webapp/dist/assets/{snackbar-DSPmjMyi.js → snackbar-CRX6eqRT.js} +1 -1
  316. package/webapp/dist/assets/{stack-health-status-BIv2C10x.js → stack-health-status-DfErRNb1.js} +1 -1
  317. package/webapp/dist/assets/{stack-start-notice-BVnMOwRQ.js → stack-start-notice-NkYDjR-f.js} +1 -1
  318. package/webapp/dist/assets/{stacks-IZ1mfizi.js → stacks-BOGCfW90.js} +1 -1
  319. package/webapp/dist/assets/{store-bqUBn2A4.js → store-DtTtbc9H.js} +1 -1
  320. package/webapp/dist/assets/{system-info-BFKNM-hf.js → system-info-Cw-xywgI.js} +1 -1
  321. package/webapp/dist/assets/{table-BOWT6Y9d.js → table-D-so_B1p.js} +1 -1
  322. package/webapp/dist/assets/{table-viewport-Bp4pq-c_.js → table-viewport-DdZ1yAKm.js} +1 -1
  323. package/webapp/dist/assets/{tabs-k5NPGLnJ.js → tabs-DGqBkXh_.js} +1 -1
  324. package/webapp/dist/assets/{terminal-QWBau-Us.js → terminal-Bbl0XNeB.js} +1 -1
  325. package/webapp/dist/assets/{topology-CPey5dP6.js → topology-DmrRy7nN.js} +1 -1
  326. package/webapp/dist/assets/{topology-metadata-dialog-BivuU2y6.js → topology-metadata-dialog-Dpfp4YF1.js} +1 -1
  327. package/webapp/dist/assets/{traces-By0rdfDC.js → traces-CKHsOabJ.js} +1 -1
  328. package/webapp/dist/assets/{use-stack-context-UkBsF-l7.js → use-stack-context-BuraYaeY.js} +1 -1
  329. package/webapp/dist/assets/webapp-D8h_eabt.js +35 -0
  330. package/webapp/dist/console-version.json +1 -1
  331. package/webapp/dist/index.html +34 -34
  332. package/webapp/dist/logo.svg +1 -80
  333. package/bin/sdk.d.mts +0 -8
  334. package/bin/sdk.mjs +0 -576
  335. package/dist/monitoring/process-lifetime.d.ts +0 -11
  336. package/dist/monitoring/process-lifetime.d.ts.map +0 -1
  337. package/dist/monitoring/process-lifetime.js +0 -45
  338. package/dist/monitoring/process-lifetime.js.map +0 -1
  339. package/dist/shared/host-boot-identity.d.ts +0 -12
  340. package/dist/shared/host-boot-identity.d.ts.map +0 -1
  341. package/dist/shared/host-boot-identity.js +0 -89
  342. package/dist/shared/host-boot-identity.js.map +0 -1
  343. package/webapp/dist/assets/deploy-release-dialog-BOXcD5Wo.js +0 -1
  344. package/webapp/dist/assets/deployments-qV20Ak0P.js +0 -1
  345. package/webapp/dist/assets/detail-B85-Wees.js +0 -2
  346. package/webapp/dist/assets/index-uq8Dkk4c.js +0 -1
  347. package/webapp/dist/assets/omnitron-logo-koMCbsCv.js +0 -1
  348. package/webapp/dist/assets/pipelines-T6Ch9LTw.js +0 -3
  349. package/webapp/dist/assets/project.store--G5pIF-J.js +0 -1
  350. package/webapp/dist/assets/release-bits-B2a_wbft.js +0 -1
  351. package/webapp/dist/assets/release-build-panel-BQmIdKW9.js +0 -1
  352. package/webapp/dist/assets/release-deployment-state-DRrEI2pP.js +0 -1
  353. package/webapp/dist/assets/release-wire-f2VuBoBF.js +0 -1
  354. package/webapp/dist/assets/releases-Bp3CDgmo.js +0 -2
  355. package/webapp/dist/assets/settings-B3egRvbI.js +0 -1
  356. package/webapp/dist/assets/sign-in-9q-Nfy83.js +0 -1
  357. package/webapp/dist/assets/webapp-D-UhjFhS.js +0 -35
  358. package/webapp/dist/favicon.png +0 -0
@@ -1,89 +0,0 @@
1
- import fs from 'node:fs';
2
- import { execFileSync } from 'node:child_process';
3
- const uuid = /^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/i;
4
- const weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
5
- const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
6
- function isNativeBirthDate(value) {
7
- const match = /^(Sun|Mon|Tue|Wed|Thu|Fri|Sat) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) {1,2}(\d{1,2}) (\d{2}):(\d{2}):(\d{2}) ([1-9]\d{3})$/.exec(value);
8
- if (!match)
9
- return false;
10
- const [, day, month, date, hours, minutes, seconds, year] = match;
11
- const instant = new Date(Date.UTC(Number(year), months.indexOf(month), Number(date), Number(hours), Number(minutes), Number(seconds)));
12
- return instant.getUTCFullYear() === Number(year) && instant.getUTCMonth() === months.indexOf(month) &&
13
- instant.getUTCDate() === Number(date) && instant.getUTCHours() === Number(hours) && instant.getUTCMinutes() === Number(minutes) &&
14
- instant.getUTCSeconds() === Number(seconds) && weekdays[instant.getUTCDay()] === day;
15
- }
16
- export const isStableDarwinBootIdentity = (value) => typeof value === 'string' && value.startsWith('darwin:') && uuid.test(value.slice(7));
17
- /** Callers must collect native lstart with LC_ALL=C and TZ=UTC. */
18
- export function formatDarwinProcessLifetime(boot, start) {
19
- if (!isStableDarwinBootIdentity(boot) || !isNativeBirthDate(start))
20
- throw new Error('Cannot verify the macOS process birth');
21
- return `${boot.toLowerCase()}:utc:${start.replace(/ +/g, ' ')}`;
22
- }
23
- export function isLegacyDarwinBootIdentity(value) {
24
- if (typeof value !== 'string')
25
- return false;
26
- const match = /^\{ *sec *= *(\d+), *usec *= *(\d+) *\} (.+)$/.exec(value);
27
- return !!match && Number.isSafeInteger(Number(match[1])) && Number(match[1]) > 0 &&
28
- Number.isSafeInteger(Number(match[2])) && Number(match[2]) < 1_000_000 && isNativeBirthDate(match[3]);
29
- }
30
- export const isStableHostBootIdentity = (value) => typeof value === 'string' && (isStableDarwinBootIdentity(value) || uuid.test(value));
31
- /** kern.boottime can change after clock adjustments; it is never a boot fence. */
32
- export function readHostBootIdentity() {
33
- if (process.platform === 'linux') {
34
- const value = fs.readFileSync('/proc/sys/kernel/random/boot_id', 'utf8').trim().toLowerCase();
35
- if (!uuid.test(value))
36
- throw new Error('Cannot verify the Linux boot identity');
37
- return value;
38
- }
39
- if (process.platform === 'darwin') {
40
- const value = execFileSync('/usr/sbin/sysctl', ['-n', 'kern.bootsessionuuid'], {
41
- encoding: 'utf8', timeout: 1000, maxBuffer: 1024,
42
- stdio: ['ignore', 'pipe', 'pipe'], env: { ...process.env, LC_ALL: 'C' },
43
- }).trim().toLowerCase();
44
- if (!uuid.test(value))
45
- throw new Error('Cannot verify the macOS boot session');
46
- return 'darwin:' + value;
47
- }
48
- throw new Error('Cannot verify this host boot identity');
49
- }
50
- /** Only comparable stable IDs can prove a reboot; legacy wall-clock text cannot. */
51
- export function provesDifferentHostBoot(previous, current) {
52
- return isStableHostBootIdentity(previous) && isStableHostBootIdentity(current) &&
53
- isStableDarwinBootIdentity(previous) === isStableDarwinBootIdentity(current) && previous.toLowerCase() !== current.toLowerCase();
54
- }
55
- /** A different wall-clock rendering is not proof that a Darwin writer died. */
56
- export function compareProcessLifetimes(previous, current) {
57
- const format = (value) => {
58
- if (value.startsWith('darwin:')) {
59
- if (!isStableDarwinBootIdentity(value.slice(0, 43)) || value[43] !== ':')
60
- return null;
61
- const utc = value.slice(44).startsWith('utc:');
62
- if (!isNativeBirthDate(value.slice(utc ? 48 : 44)))
63
- return null;
64
- return utc ? 'darwin-utc' : 'darwin';
65
- }
66
- // The former rollout reader used '/' between the same Linux boot UUID and ticks.
67
- const ticks = value.slice(37);
68
- return uuid.test(value.slice(0, 36)) && [':', '/'].includes(value[36]) &&
69
- /^\d{1,20}$/.test(ticks) && BigInt(ticks) <= 18446744073709551615n ? 'linux' : null;
70
- };
71
- const before = format(previous), after = format(current);
72
- if (!before || !after || (before === 'linux') !== (after === 'linux'))
73
- return 'unknown';
74
- if (before !== 'linux') {
75
- if (previous.slice(0, 43).toLowerCase() !== current.slice(0, 43).toLowerCase())
76
- return 'different';
77
- if (before !== after)
78
- return 'unknown';
79
- const offset = before === 'darwin-utc' ? 48 : 44;
80
- if (previous.slice(offset).replace(/ +/g, ' ') === current.slice(offset).replace(/ +/g, ' '))
81
- return 'same';
82
- // Legacy records did not retain TZ. Even two valid native dates can describe
83
- // one live process, so keep its unfinished messages until death is observed.
84
- return before === 'darwin-utc' ? 'different' : 'unknown';
85
- }
86
- const normalize = (value) => value.slice(0, 36).toLowerCase() + ':' + BigInt(value.slice(37)).toString();
87
- return normalize(previous) === normalize(current) ? 'same' : 'different';
88
- }
89
- //# sourceMappingURL=host-boot-identity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"host-boot-identity.js","sourceRoot":"","sources":["../../src/shared/host-boot-identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,IAAI,GAAG,gDAAgD,CAAC;AAC9D,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACnE,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACpG,SAAS,iBAAiB,CAAC,KAAa;IACtC,MAAM,KAAK,GAAG,uIAAuI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClK,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC;IAClE,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,KAAM,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACxI,OAAO,OAAO,CAAC,cAAc,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,OAAO,CAAC,KAAM,CAAC;QAClG,OAAO,CAAC,UAAU,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,aAAa,EAAE,KAAK,MAAM,CAAC,OAAO,CAAC;QAC/H,OAAO,CAAC,aAAa,EAAE,KAAK,MAAM,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,KAAK,GAAG,CAAC;AACzF,CAAC;AACD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAc,EAAmB,EAAE,CAC5E,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAExF,mEAAmE;AACnE,MAAM,UAAU,2BAA2B,CAAC,IAAY,EAAE,KAAa;IACrE,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC;QAChE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,QAAQ,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;AAClE,CAAC;AACD,MAAM,UAAU,0BAA0B,CAAC,KAAc;IACvD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,MAAM,KAAK,GAAG,+CAA+C,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1E,OAAO,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC9E,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC;AAC3G,CAAC;AACD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAc,EAAmB,EAAE,CAC1E,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAEvF,kFAAkF;AAClF,MAAM,UAAU,oBAAoB;IAClC,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,EAAE,CAAC,YAAY,CAAC,iCAAiC,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC9F,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAChF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,YAAY,CAAC,kBAAkB,EAAE,CAAC,IAAI,EAAE,sBAAsB,CAAC,EAAE;YAC7E,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI;YAChD,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;SACxE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC/E,OAAO,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;AAC3D,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,uBAAuB,CAAC,QAAgB,EAAE,OAAe;IACvE,OAAO,wBAAwB,CAAC,QAAQ,CAAC,IAAI,wBAAwB,CAAC,OAAO,CAAC;QAC5E,0BAA0B,CAAC,QAAQ,CAAC,KAAK,0BAA0B,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC;AACrI,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,uBAAuB,CAAC,QAAgB,EAAE,OAAe;IACvE,MAAM,MAAM,GAAG,CAAC,KAAa,EAA4C,EAAE;QACzE,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAChC,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG;gBAAE,OAAO,IAAI,CAAC;YACtF,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YAC/C,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBAAE,OAAO,IAAI,CAAC;YAChE,OAAO,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC;QACvC,CAAC;QACD,iFAAiF;QACjF,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAE,CAAC;YACrE,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IACxF,CAAC,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IACzD,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,OAAO,CAAC;QAAE,OAAO,SAAS,CAAC;IACxF,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QACvB,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE;YAAE,OAAO,WAAW,CAAC;QACnG,IAAI,MAAM,KAAK,KAAK;YAAE,OAAO,SAAS,CAAC;QACvC,MAAM,MAAM,GAAG,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;YAAE,OAAO,MAAM,CAAC;QAC5G,6EAA6E;QAC7E,6EAA6E;QAC7E,OAAO,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3D,CAAC;IACD,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IACjH,OAAO,SAAS,CAAC,QAAQ,CAAC,KAAK,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC;AAC3E,CAAC"}
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{i as t,t as n}from"./react-BN8qLIAi.js";import{B as r,V as ee,g as i,h as a,z as o}from"./client-DFnuv2z3.js";import{F as s,H as c,I as l,Q as u,V as d,Z as f,at as p,c as m,ct as h,d as te,f as g,g as _,h as ne,m as v,ot as y,p as re,s as b,st as x}from"./mui-BXSXx9c9.js";import{B as S,a as C,o as w,z as T}from"./mui-Cd711nOk.js";import{l as E,u as D}from"./mui-AnEgAVjz.js";import{_ as O,v as k}from"./mui-BwsIrivo.js";import{i as A,t as j}from"./project.store--G5pIF-J.js";import{G as M,m as N}from"./icons-OboZgWSt.js";import{n as P,t as F}from"./release-wire-f2VuBoBF.js";import{a as ie,l as ae,o as oe,r as I,u as L}from"./release-bits-B2a_wbft.js";function R({open:e,onClose:t,project:n,release:a,stack:o}){let c=ee(),l=r(),u=e=>{let r=A.getState();r.activeProject!==n&&r.selectProject(n,l.pathname),t(),c(`/stacks/${encodeURIComponent(e)}`)},m=A(e=>e.stacksByProject),h=A(e=>e.fetchStacks),g=A(e=>e.startStack),_=m[n]??[],v=A(e=>e.stackReadErrors[n]),[y,S]=(0,z.useState)(!1),[w,D]=(0,z.useState)([]),[k,j]=(0,z.useState)(``),[M,F]=(0,z.useState)(o??``),[L,R]=(0,z.useState)(null),[V,H]=(0,z.useState)(!1),[U,W]=(0,z.useState)(!1),[G,K]=(0,z.useState)(!1),[q,J]=(0,z.useState)(null);(0,z.useEffect)(()=>{e&&_.length===0&&h(n)},[e,n,_.length,h]),(0,z.useEffect)(()=>{if(!e||a)return;let t=!0;return S(!0),D([]),j(``),P.list().then(({releases:e})=>{if(!t)return;let r=e.filter(e=>e.project===n&&e.complete);D(r),j(r[0]?.id??``)}).catch(e=>{t&&J(`The release store could not be read: ${e.message}`)}).finally(()=>{t&&S(!1)}),()=>{t=!1}},[e,a,n]);let Y=a??w.find(e=>e.id===k)??null,X=Y?.id??``,Z=JSON.stringify([n,M,X]),Q=L?.key===Z?L:null;(0,z.useEffect)(()=>{e&&(F(o??``),R(null),J(null))},[e,o,a?.id]),(0,z.useEffect)(()=>{if(R(null),K(!1),J(null),H(!1),!e||!X||!M)return;let t=!0;return H(!0),i(`checkRelease`,{project:n,stack:M,release:X}).then(e=>{t&&R({...e,key:Z})}).catch(e=>{t&&R({key:Z,ok:!1,because:`The daemon could not answer: ${e.message}`})}).finally(()=>{t&&H(!1)}),()=>{t=!1}},[e,n,M,X,Z]);let se=async()=>{H(!0);try{R({...await i(`checkRelease`,{project:n,stack:M,release:X,prepare:!0}),key:Z})}catch(e){J(e.message)}finally{H(!1)}},ce=async()=>{if(Y&&M&&Q?.ok){W(!0),J(null);try{let e=await g(n,M,{release:Y.id});if(e.state!==`confirmed`){J(e.message),K(e.state!==`failed`);return}u(M)}catch(e){J(e.message)}finally{W(!1)}}},$=_.find(e=>e.name===M),le=$?.config?.release?.mode===`required`;return(0,B.jsxs)(ne,{open:e,onClose:U?void 0:t,maxWidth:`sm`,fullWidth:!0,children:[(0,B.jsx)(b,{children:`Deploy a release`}),(0,B.jsx)(te,{children:(0,B.jsxs)(O,{spacing:2.5,sx:{mt:1},children:[!a&&(0,B.jsxs)(C,{select:!0,label:`Release`,value:k,onChange:e=>j(e.target.value),size:`small`,fullWidth:!0,disabled:U,children:[w.length===0&&(0,B.jsx)(E,{disabled:!0,value:``,children:y?`Reading releases…`:`No completed releases available`}),w.map(e=>(0,B.jsx)(E,{value:e.id,children:(0,B.jsxs)(O,{direction:`row`,spacing:1,sx:{width:`100%`,alignItems:`center`},children:[(0,B.jsx)(T,{variant:`body2`,sx:{fontFamily:`monospace`},children:e.id}),(0,B.jsx)(d,{sx:{flex:1}}),(0,B.jsx)(ie,{release:e,variant:`caption`}),e.statics&&(0,B.jsx)(f,{label:e.statics.stack,size:`small`,variant:`outlined`,sx:{height:18,fontSize:10}})]})},e.id))]}),Y?(0,B.jsxs)(d,{children:[(0,B.jsx)(T,{variant:`body2`,sx:{fontFamily:`monospace`,fontWeight:600},children:Y.id}),(0,B.jsxs)(O,{direction:`row`,spacing:1.5,sx:{alignItems:`center`,mt:.75},children:[(0,B.jsx)(I,{projectCommit:Y.projectCommit,omniCommit:Y.omniCommit,onRemote:Y.onRemote,project:Y.project}),(0,B.jsx)(f,{size:`small`,variant:`outlined`,label:`${Y.artifacts.count} app${Y.artifacts.count===1?``:`s`}`,sx:{height:20,fontSize:11}}),Y.statics&&(0,B.jsx)(f,{size:`small`,variant:`outlined`,label:`statics: ${Y.statics.stack}`,sx:{height:20,fontSize:11}})]})]}):(0,B.jsx)(p,{severity:`warning`,children:`No release chosen.`}),(0,B.jsxs)(C,{select:!0,label:`Stack`,value:M,onChange:e=>F(e.target.value),size:`small`,fullWidth:!0,disabled:U,helperText:$?.type===`local`?`Local stacks keep the selected release across restarts. Stop their applications before changing it.`:void 0,children:[_.length===0&&(0,B.jsx)(E,{disabled:!0,value:``,children:v?`Stack inventory unavailable`:m[n]?`This project has no stacks`:`Reading stack inventory…`}),_.map(e=>(0,B.jsx)(E,{value:e.name,disabled:!!e.config?.managedOrigin,children:(0,B.jsxs)(O,{direction:`row`,spacing:1,sx:{alignItems:`center`,width:`100%`},children:[(0,B.jsx)(T,{variant:`body2`,children:e.name}),(0,B.jsx)(f,{label:e.type,size:`small`,variant:`outlined`,sx:{height:18,fontSize:10}}),e.config?.release?.mode===`required`&&(0,B.jsx)(f,{label:`releases only`,size:`small`,color:`info`,variant:`outlined`,sx:{height:18,fontSize:10}}),(0,B.jsx)(d,{sx:{flex:1}}),(0,B.jsx)(T,{variant:`caption`,sx:{color:`text.secondary`},children:e.status})]})},e.name))]}),Y&&Y.gates.total>0&&(0,B.jsxs)(d,{children:[(0,B.jsx)(T,{variant:`caption`,sx:{color:`text.secondary`},children:ae(Y.gateList)}),(0,B.jsx)(d,{sx:{mt:.5},children:(0,B.jsx)(oe,{gates:Y.gateList})})]}),V&&(0,B.jsxs)(O,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,B.jsx)(x,{size:16}),(0,B.jsx)(T,{variant:`body2`,sx:{color:`text.secondary`},children:`Asking the daemon whether it would take this release…`})]}),Q&&(0,B.jsx)(p,{severity:Q.ok?`success`:Q.state?`info`:`error`,children:(0,B.jsx)(T,{variant:`body2`,sx:{whiteSpace:`pre-wrap`},children:Q.because})}),v&&(0,B.jsxs)(p,{severity:`warning`,children:[`Stack inventory unavailable · `,v]}),le&&(0,B.jsxs)(T,{variant:`caption`,sx:{color:`text.secondary`},children:[M,` requires an immutable release.`]}),q&&(0,B.jsx)(p,{severity:G?`warning`:`error`,children:(0,B.jsx)(T,{variant:`body2`,sx:{whiteSpace:`pre-wrap`},children:q})})]})}),(0,B.jsxs)(re,{children:[(0,B.jsx)(s,{onClick:t,size:`small`,disabled:U,children:`Cancel`}),(0,B.jsx)(s,{variant:`contained`,size:`small`,startIcon:U?(0,B.jsx)(x,{size:14,color:`inherit`}):(0,B.jsx)(N,{}),disabled:!Y||!M||U||V||!G&&Q?.state!==`unprepared`&&Q?.ok!==!0,onClick:G?()=>u(M):Q?.state===`unprepared`?se:ce,children:U?`Deploying…`:G?`Inspect stack`:Q?.state===`unprepared`?`Prepare release`:`Deploy`})]})]})}var z,B;function V(){return(V=e((()=>{z=t(),o(),y(),c(),l(),u(),h(),_(),v(),g(),m(),D(),k(),w(),S(),a(),F(),j(),M(),L(),B=n()})))()}export{V as n,R as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{i as t,t as n}from"./react-BN8qLIAi.js";import{P as r,h as i,u as a,x as ee,z as o}from"./client-DFnuv2z3.js";import{F as s,H as c,I as l,Q as u,St as d,V as f,Z as p,xt as te}from"./mui-BXSXx9c9.js";import{B as m,z as h}from"./mui-Cd711nOk.js";import{C as g,E as _,T as v,it as y,rt as b,w as x}from"./mui-AnEgAVjz.js";import{_ as S,v as C}from"./mui-BwsIrivo.js";import{r as w,t as ne}from"./alert-uBG6r9NW.js";import{c as T,s as E}from"./access-48hkC2-P.js";import{n as D,t as O}from"./use-polled-resource-B22hhr5L.js";import{d as k,h as re,i as ie,m as A,t as j}from"./project.store--G5pIF-J.js";import{G as M,M as ae}from"./icons-OboZgWSt.js";import{n as N,t as P}from"./page-breadcrumbs-fR7Jmpp4.js";import{n as F,t as I}from"./admin-data-table-BKSDI8sU.js";import{r as oe,t as L}from"./formatters-RnRy4bXm.js";import{n as R,t as z}from"./use-stack-context-UkBsF-l7.js";import{n as se,r as B}from"./tabs-k5NPGLnJ.js";import{n as ce,t as V}from"./release-wire-f2VuBoBF.js";function H(e){return e!==`success`&&e!==`failed`}function U(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return`time not reported`;let r=Math.max(0,Math.round((t-n)/1e3));if(r<10)return`just now`;if(r<60)return`${r}s ago`;let i=Math.round(r/60);return i<60?`${i}m ago`:`${Math.round(i/60)}h ago`}function W(e,t,n){return H(e.status)&&(n||!Number.isFinite(Date.parse(e.at))||t-Date.parse(e.at)>9e4)}function G({record:e,now:t,unavailable:n}){let r=J[e.status]??{label:e.status,tone:`default`},i=W(e,t,n),a=H(e.status)&&!i;return(0,q.jsxs)(f,{sx:{py:1},children:[(0,q.jsxs)(S,{direction:`row`,spacing:1,sx:{mb:.5,alignItems:`center`,flexWrap:`wrap`,rowGap:.5},children:[(0,q.jsx)(h,{variant:`body2`,sx:{fontWeight:600,minWidth:0,overflowWrap:`anywhere`},children:e.app===`*`?`Node provisioning`:e.app}),(0,q.jsx)(h,{variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`,overflowWrap:`anywhere`},children:e.node}),(0,q.jsx)(f,{sx:{flex:1}}),(0,q.jsx)(p,{size:`small`,variant:`outlined`,color:r.tone,label:r.label,sx:{maxWidth:`100%`,fontWeight:600}}),(0,q.jsx)(h,{variant:`caption`,sx:{color:`text.secondary`},children:U(e.at,t)})]}),(0,q.jsx)(v,{"aria-label":`${e.app===`*`?`Node provisioning`:e.app} on ${e.node}`,variant:a?`indeterminate`:`determinate`,value:e.status===`success`?100:e.progress,color:i?`warning`:r.tone==="default"?`inherit`:r.tone,sx:{height:4,borderRadius:2}}),i&&(0,q.jsx)(h,{role:`status`,variant:`caption`,color:`warning.main`,children:`Awaiting an updated report; completion is unknown. A long phase may still be running.`}),e.message?(0,q.jsx)(h,{variant:`caption`,sx:{display:`block`,mt:.5,color:e.status===`failed`?`error.main`:`text.secondary`,wordBreak:`break-word`},children:e.message}):null,e.operationId&&(0,q.jsxs)(f,{component:`details`,sx:{mt:.5,typography:`caption`,color:`text.secondary`,overflowWrap:`anywhere`,"& summary":{cursor:`pointer`,width:`fit-content`}},children:[(0,q.jsx)(`summary`,{children:`Transfer details`}),(0,q.jsxs)(`div`,{children:[e.project,`/`,e.stack,` · `,e.at]}),(0,q.jsxs)(`div`,{children:[`Operation `,(0,q.jsx)(`code`,{children:e.operationId})]}),e.releaseId&&(0,q.jsxs)(`div`,{children:[`Release `,(0,q.jsx)(`code`,{children:e.releaseId})]})]})]})}function K({records:e,now:t=Date.now(),unavailable:n=!1}){if(e.length===0)return null;let r=e.filter(e=>H(e.status)&&!W(e,t,n)).length;return(0,q.jsxs)(f,{sx:{mb:3},children:[(0,q.jsxs)(S,{direction:`row`,spacing:1,sx:{mb:1,alignItems:`center`},children:[(0,q.jsx)(h,{variant:`subtitle2`,sx:{fontWeight:700},children:`Deployment progress`}),r>0?(0,q.jsx)(p,{size:`small`,color:`info`,variant:`filled`,label:`${r} in flight`,sx:{fontWeight:600}}):null]}),(0,q.jsx)(f,{sx:{border:1,borderColor:`divider`,borderRadius:1,px:2,py:.5},children:e.map(e=>(0,q.jsx)(G,{record:e,now:t,unavailable:n},k(e)))})]})}var q,J;function Y(){return(Y=e((()=>{c(),u(),_(),C(),m(),A(),q=n(),J={pending:{label:`Connecting`,tone:`default`},transferring:{label:`Transferring artifact`,tone:`info`},extracting:{label:`Unpacking`,tone:`info`},installing:{label:`Installing dependencies on the node`,tone:`info`},restarting:{label:`Starting`,tone:`info`},verifying:{label:`Verifying`,tone:`info`},success:{label:`Deployed`,tone:`success`},failed:{label:`Failed`,tone:`error`}}})))()}function le(){let{activeProject:e,activeStack:t}=R();return(0,Z.jsx)(ue,{},JSON.stringify([e,t]))}function ue(){let{activeProject:e,activeStack:t,matchesNamespace:n,extractStack:i}=R(),o=ie(t=>t.projects.find(t=>t.name===e)),{can:c}=T(),l=c(`OmnitronRelease.deployments`),u=c(`OmnitronDeploy.getHistory`),d=c(`OmnitronProject.getDeployProgress`),[f,m]=(0,X.useState)(`stacks`),_=l&&(f===`stacks`||!u)?`stacks`:u?`legacy`:null,[v,y]=(0,X.useState)(!1),[x,C]=(0,X.useState)(!1),[w,E]=(0,X.useState)(0),[O,k]=(0,X.useState)(25),A=D(async()=>{if(!c(`OmnitronAudit.available`))throw Error(`Checking recorded stack starts requires access to audit availability.`);let e=await ce.deployments();if(!e.known)throw Error(e.why);return e},{intervalMs:15e3,enabled:_===`stacks`}),j=D(()=>a.getHistory({limit:Q}),{intervalMs:15e3,enabled:_===`legacy`}),M=D(()=>ee.getDeployProgress(e?{project:e,...t&&{stack:t}}:void 0),{intervalMs:3e3,enabled:d,resourceKey:JSON.stringify([e,t,d])}),N=(A.data?.known?A.data.deployments:[]).filter(e=>n(`${e.project}/${e.stack}/_`)).sort((e,t)=>t.at.localeCompare(e.at)),F=(j.data??[]).filter(e=>n(e.app)),z=d?M.data??[]:[],{transfers:B,unscoped:V}=e?re(z,o??{name:e},t):{transfers:z,unscoped:[]},H=_===`stacks`?N.length:F.length,U=Math.min(w,Math.max(0,Math.ceil(H/O)-1)),W=A.error,G=async()=>{C(!0);try{await Promise.all([_===`stacks`&&A.refresh(),_===`legacy`&&j.refresh(),d&&M.refresh()])}finally{C(!1)}},q=e=>{k(e),E(0)};return(0,Z.jsxs)(S,{spacing:2,sx:{minWidth:0},children:[(0,Z.jsx)(P,{links:[{name:`Deployments`}],action:(0,Z.jsxs)(S,{direction:`row`,spacing:1,useFlexGap:!0,sx:{flexWrap:`wrap`,alignItems:`center`},children:[(0,Z.jsx)(b,{"data-console-command":`refresh`,"aria-label":`Refresh deployments`,size:`small`,onClick:G,disabled:x,"aria-busy":x,children:(0,Z.jsx)(ae,{})}),c(`OmnitronProject.listStacks`)&&(0,Z.jsx)(s,{component:r,to:`/stacks`,size:`small`,children:`Stacks`}),c(`OmnitronRelease.list`)&&(0,Z.jsx)(s,{component:r,to:`/releases`,size:`small`,variant:`outlined`,children:c(`OmnitronProject.startStack`)?`Deploy a release`:`Releases`})]})}),d&&M.error&&(0,Z.jsxs)(ne,{severity:`warning`,variant:`outlined`,children:[`Transfer observations unavailable: `,M.error,`. Retained observations may be stale.`]}),d&&M.loading&&(0,Z.jsx)(h,{role:`status`,variant:`caption`,children:`Reading transfer observations…`}),d&&!M.loading&&!M.error&&B.length===0&&(0,Z.jsx)(h,{role:`status`,variant:`caption`,color:`text.secondary`,children:`No attributed transfer observations for this workspace.`}),(0,Z.jsx)(K,{records:B,unavailable:!!M.error}),V.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(s,{size:`small`,onClick:()=>y(e=>!e),"aria-expanded":v,"aria-controls":`unscoped-transfers`,sx:{alignSelf:`flex-start`},children:[v?`Hide`:`Show`,` unscoped observations · `,V.length]}),(0,Z.jsxs)(te,{id:`unscoped-transfers`,in:v,unmountOnExit:!0,children:[(0,Z.jsx)(h,{variant:`caption`,color:`text.secondary`,children:`These controller reports have no recorded project or stack.`}),(0,Z.jsx)(K,{records:V,unavailable:!!M.error})]})]}),l&&u&&(0,Z.jsx)(se,{value:_??`stacks`,onChange:e=>{m(e),E(0)},"aria-label":`Deployment records`,tabs:[{value:`stacks`,label:A.data&&!A.error?`Stack starts · ${N.length}`:`Stack starts`},{value:`legacy`,label:j.data&&!j.error?`App history · ${F.length}`:`App history`}]}),_===`stacks`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(h,{variant:`caption`,color:`text.secondary`,children:[`Latest recorded start per stack namespace. `,c(`OmnitronAudit.list`)&&(0,Z.jsxs)(Z.Fragment,{children:[`Full event history is in `,(0,Z.jsx)(g,{component:r,to:`/audit`,children:`Audit`}),`.`]})]}),(0,Z.jsx)(I,{minWidth:600,scrollLabel:`Recorded stack starts`,columns:[{key:`stack`,header:`Stack`,render:t=>{let n=i(`${t.project}/${t.stack}/_`)??t.stack;return e&&c(`OmnitronProject.getStack`)?(0,Z.jsxs)(S,{children:[(0,Z.jsx)(g,{component:r,to:`/stacks/${encodeURIComponent(n)}`,children:n}),(t.project!==e||t.stack!==n)&&(0,Z.jsxs)(h,{variant:`caption`,color:`text.secondary`,children:[t.project,`/`,t.stack]})]}):(0,Z.jsxs)(h,{variant:`body2`,children:[t.project,`/`,t.stack]})}},{key:`release`,header:`Recorded source`,render:e=>e.release?c(`OmnitronRelease.get`)?(0,Z.jsx)(g,{component:r,to:`/releases/${encodeURIComponent(e.release)}`,sx:{overflowWrap:`anywhere`},children:e.release}):e.release:(0,Z.jsx)(h,{variant:`body2`,children:e.releaseUnnamed?`Release identity missing from record`:`Working tree / source not recorded`})},{key:`at`,header:`Recorded at`,render:e=>L(e.at)},{key:`source`,header:`Trigger`,render:e=>e.source??`Not recorded`},{key:`actorId`,header:`Actor`,render:e=>(0,Z.jsx)(h,{variant:`caption`,sx:{overflowWrap:`anywhere`},children:e.actorId??`Not recorded`})}],data:N.slice(U*O,(U+1)*O),total:N.length,loading:A.loading,loadError:W,emptyMessage:`No stack start recorded for this workspace`,rowKey:e=>`${e.project}/${e.stack}`,page:U,pageSize:O,onPageChange:E,onPageSizeChange:q,dense:!0})]}):_===`legacy`&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(h,{variant:`caption`,color:`text.secondary`,children:[`Retained records from the retired per-app path. Its version labels and success statuses do not prove an artifact was installed. The latest `,Q,` controller records are filtered to this workspace.`]}),(0,Z.jsx)(I,{minWidth:680,scrollLabel:`Legacy application operation records`,columns:[{key:`app`,header:`Application`,render:e=>(0,Z.jsx)(h,{variant:`body2`,sx:{overflowWrap:`anywhere`},children:e.app})},{key:`version`,header:`Requested label`,render:e=>(0,Z.jsx)(h,{variant:`caption`,sx:{fontFamily:`monospace`,overflowWrap:`anywhere`},children:e.version})},{key:`strategy`,header:`Requested strategy`,render:e=>e.strategy},{key:`status`,header:`Recorded outcome`,render:e=>(0,Z.jsx)(p,{size:`small`,variant:`outlined`,label:e.status})},{key:`startedAt`,header:`Started`,render:e=>L(e.startedAt)},{key:`duration`,header:`Duration`,render:e=>{let t=e.completedAt?Date.parse(e.completedAt)-Date.parse(e.startedAt):NaN;return Number.isFinite(t)&&t>=0?oe(t):`Not recorded`}},{key:`deployedBy`,header:`Recorded actor`,render:e=>e.deployedBy??`Not recorded`}],data:F.slice(U*O,(U+1)*O),total:F.length,loading:j.loading,loadError:j.error,emptyMessage:`No legacy app operation in this history window`,rowKey:e=>e.id,page:U,pageSize:O,onPageChange:E,onPageSizeChange:q,dense:!0})]})]})}var X,Z,Q;function $(){return($=e((()=>{X=t(),o(),x(),m(),C(),u(),l(),y(),d(),M(),F(),w(),B(),N(),i(),V(),Y(),O(),z(),E(),j(),A(),Z=n(),Q=200})))()}$();export{le as default};
@@ -1,2 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{i as t,t as n}from"./react-BN8qLIAi.js";import{H as r,O as i,S as a,h as o,l as s,z as c}from"./client-DFnuv2z3.js";import{Vt as l,Yt as u}from"./mui-BTN91yBK.js";import{D as d,F as f,H as p,I as m,M as h,O as g,Q as _,V as v,Z as y,at as b,ct as x,i as S,j as C,ot as w,r as T,st as E}from"./mui-BXSXx9c9.js";import{A as D,B as O,C as k,D as A,F as j,I as M,O as ee,S as te,a as ne,b as re,d as N,f as ie,k as ae,o as oe,w as se,x as ce,y as le,z as P}from"./mui-Cd711nOk.js";import{B as ue,it as de,l as fe,rt as pe,u as me,z as F}from"./mui-AnEgAVjz.js";import{_ as I,v as L}from"./mui-BwsIrivo.js";import{r as he,t as R}from"./alert-uBG6r9NW.js";import{c as z,l as ge,n as B,s as V,u as _e}from"./access-48hkC2-P.js";import{n as ve,t as ye}from"./use-polled-resource-B22hhr5L.js";import{b as H,i as U,m as W,p as be,t as xe,y as Se}from"./project.store--G5pIF-J.js";import{G as Ce,M as we,m as Te}from"./icons-OboZgWSt.js";import{n as Ee,t as De}from"./operation-status-Bm1x1wTz.js";import{n as Oe,t as ke}from"./page-breadcrumbs-fR7Jmpp4.js";import{n as Ae,t as je}from"./release-wire-f2VuBoBF.js";import{c as Me,d as Ne,f as Pe,i as G,o as Fe,p as Ie,s as K,u as Le}from"./release-bits-B2a_wbft.js";import{n as Re,t as ze}from"./deploy-release-dialog-BOXcD5Wo.js";import{n as Be,t as Ve}from"./release-build-panel-BQmIdKW9.js";import{n as He,t as Ue}from"./release-deployment-state-DRrEI2pP.js";function We(e,t){return s.invoke(`daemon`,`OmnitronRelease`,`attestOnNode`,[{release:e,stack:t}],{timeout:6e5})}function Ge({output:e}){let[t,n]=(0,q.useState)(!1);return(0,J.jsxs)(v,{sx:{pl:2,mb:.5},children:[(0,J.jsx)(f,{size:`small`,onClick:()=>n(e=>!e),sx:{minWidth:0,p:0,fontSize:11,textTransform:`none`},children:t?`hide what it printed`:`what it printed`}),t&&(0,J.jsx)(v,{component:`pre`,sx:{m:0,mt:.5,p:1,maxHeight:240,overflow:`auto`,borderRadius:1,bgcolor:`action.hover`,fontFamily:`monospace`,fontSize:11,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:e})]})}function Ke({attestation:e}){let t=e.cleanup;if(!t&&!e.legalTextsUnread)return null;let n=Object.entries(t?.removed??{}).filter(([,e])=>e>0).map(([e,t])=>`${t} ${e}`),r=Object.entries(t?.retired??{}).filter(([,e])=>e>0).map(([e,t])=>`${t} ${e}`);return(0,J.jsxs)(v,{sx:{mt:.75,pl:1},"data-testid":`cleanup-${e.stack}`,children:[t&&(0,J.jsx)(P,{variant:`caption`,sx:{display:`block`,color:t.failed||t.run===null?`warning.main`:`text.secondary`},children:t.run===null?`cleanup not run — ${t.notRun??`the run had no name to remove by`}`:`cleanup: run ${t.run} removed ${n.length?n.join(`, `):`nothing — it had made nothing to remove`}`+(t.failed?` — FAILED: ${t.failed}`:``)}),r.length>0&&(0,J.jsxs)(P,{variant:`caption`,sx:{display:`block`,color:`text.secondary`},children:[`retired: `,r.join(`, `),` — blocked in place, their real-chain addresses still watched`]}),(t?.leftBehind??[]).map(e=>(0,J.jsxs)(P,{variant:`caption`,sx:{display:`block`,color:`warning.main`},children:[`left behind: `,e.what,` — `,e.why.join(`; `)||`no reason given`]},e.what)),e.legalTextsUnread&&(0,J.jsxs)(P,{variant:`caption`,sx:{display:`block`,color:`warning.main`},children:[`legal texts could not be read — `,e.legalTextsUnread]})]})}function qe({releaseId:e,project:t,attestations:n,onChanged:r}){let{can:a}=z(),o=a(`OmnitronRelease.attestOnNode`),s=a(`OmnitronProject.listStacks`),c=U(e=>e.stacksByProject),l=U(e=>e.fetchStacks),u=(0,q.useMemo)(()=>(c[t]??[]).filter(e=>e.type!==`local`),[c,t]),[p,m]=(0,q.useState)(``),[h,g]=(0,q.useState)(!1),[_,x]=(0,q.useState)(null),[S,w]=(0,q.useState)(null),[T,D]=(0,q.useState)(null),[O,k]=(0,q.useState)(!1);(0,q.useEffect)(()=>{o&&s&&!c[t]&&l(t)},[o,s,t,c,l]),(0,q.useEffect)(()=>{!p&&u.length>0&&m(u[0].name)},[u,p]);let A=!!(T&&n.some(e=>e.stack===T.stack&&e.storedAt!==T.previous));(0,q.useEffect)(()=>{if(!T)return;if(A){D(null);return}let e=setInterval(r,5e3),t=setTimeout(()=>{k(!0),D(null)},6e5);return()=>{clearInterval(e),clearTimeout(t)}},[T,A,r]);let M=(0,q.useCallback)(async()=>{if(!p)return;let t=n.find(e=>e.stack===p)?.storedAt;k(!1),g(!0),w(null),x(null);try{x(await We(e,p)),r()}catch(e){let n=e.message;i(e)?D({stack:p,previous:t}):w(n)}finally{g(!1)}},[e,p,n,r]);return(0,J.jsx)(C,{variant:`outlined`,children:(0,J.jsxs)(d,{children:[(0,J.jsxs)(I,{direction:`row`,spacing:1.5,sx:{alignItems:`center`,mb:1.5},children:[(0,J.jsx)(P,{variant:`subtitle2`,children:`Verified on stacks`}),(0,J.jsx)(P,{variant:`caption`,sx:{color:`text.secondary`},children:`probes a running stack measured against this release`}),(0,J.jsx)(v,{sx:{flex:1}}),o&&s&&u.length>0&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(ne,{select:!0,size:`small`,value:p,onChange:e=>m(e.target.value),disabled:h||T!==null,sx:{minWidth:120},children:u.map(e=>(0,J.jsx)(fe,{value:e.name,children:e.name},e.name))}),(0,J.jsx)(j,{title:`Uploads this release's own scripts to the stack's node and runs the probes there, under the node's deploy lease. The stack should be carrying this release — an attestation older than the last deployment is refused.`,arrow:!0,children:(0,J.jsx)(`span`,{children:(0,J.jsx)(f,{size:`small`,variant:`outlined`,onClick:()=>void M(),disabled:h||T!==null||!p,startIcon:h||T!==null?(0,J.jsx)(E,{size:14}):void 0,children:h?`Running on the node…`:T===null?`Run the probes`:`Awaiting result…`})})})]})]}),T!==null&&(0,J.jsxs)(b,{severity:`info`,sx:{mb:1.5},children:[`The gateway did not return a result. Checking for a new attestation on `,T.stack,` before another run.`]}),O&&(0,J.jsx)(b,{severity:`warning`,sx:{mb:1.5},children:`No new attestation was recorded within ten minutes. Inspect the node logs before retrying.`}),_&&(0,J.jsxs)(b,{severity:_.passed===_.gates?`success`:`warning`,sx:{mb:1.5},children:[_.passed,` of `,_.gates,` probes passed on `,_.node,` — probes from`,` `,_.scriptsFrom===`release`?`the release itself`:`the release's commit`,typeof _.sourceFiles==`number`&&(_.sourceFiles>0?`, with ${_.sourceFiles} application source files from that commit`:`, with no application sources — probes that read code said NOT RUN`),`.`,_.accounts?Je[_.accounts]:``]}),S&&(0,J.jsx)(b,{severity:`error`,sx:{mb:1.5},children:(0,J.jsx)(P,{variant:`body2`,sx:{whiteSpace:`pre-wrap`},children:S})}),n.length===0?(0,J.jsxs)(P,{variant:`body2`,sx:{color:`text.secondary`},children:[`No stack has attested this release. A stack whose policy declares `,(0,J.jsx)(`code`,{children:`verifiedOn`}),` refuses it until one does.`]}):(0,J.jsx)(I,{spacing:2,children:n.map(e=>{let t=e.gates.filter(e=>e.status===`passed`).length;return(0,J.jsxs)(v,{children:[(0,J.jsxs)(I,{direction:`row`,spacing:1,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,J.jsx)(y,{label:e.stack,size:`small`,variant:`outlined`,sx:{height:20,fontSize:11}}),(0,J.jsxs)(P,{variant:`body2`,sx:{fontWeight:600,fontFamily:`monospace`,color:t===e.gates.length?`success.main`:`error.main`},children:[t,`/`,e.gates.length]}),(0,J.jsx)(Fe,{gates:e.gates,size:9}),(0,J.jsx)(v,{sx:{flex:1}}),(0,J.jsxs)(P,{variant:`caption`,sx:{color:`text.secondary`},children:[`measured `,Ie(e.at),e.onNode.hosts.length>0?` on ${e.onNode.hosts.join(`, `)}`:``]}),e.onNode.claimed&&(0,J.jsx)(j,{title:e.onNode.matched===!0?`The producer confirmed it ran on one of the stack's nodes.`:`The producer could not confirm the machine it ran on.`,arrow:!0,children:(0,J.jsx)(y,{label:e.onNode.matched===!0?`on the node`:`node unconfirmed`,size:`small`,color:e.onNode.matched===!0?`success`:`warning`,variant:`outlined`,sx:{height:18,fontSize:10}})})]}),e.gates.some(e=>e.status!==`passed`)&&(0,J.jsx)(v,{sx:{mt:.75,pl:1},children:e.gates.filter(e=>e.status!==`passed`).map(e=>(0,J.jsxs)(v,{children:[(0,J.jsxs)(P,{variant:`caption`,sx:{display:`block`,color:`text.secondary`},children:[(0,J.jsx)(v,{component:`span`,sx:{color:G[e.status].color,fontWeight:600},children:G[e.status].label}),` `,(0,J.jsx)(v,{component:`span`,sx:{fontFamily:`monospace`},children:e.name}),e.detail?` — ${e.detail}`:``]}),e.output&&(0,J.jsx)(Ge,{output:e.output})]},e.name))}),(0,J.jsx)(Ke,{attestation:e})]},e.stack)})})]})})}var q,J,Je;function Y(){return(Y=e((()=>{V(),q=t(),w(),p(),m(),h(),g(),_(),x(),me(),L(),oe(),M(),O(),o(),xe(),Le(),J=n(),Je={provisioned:` Accounts were created by the run and removed at its end.`,"not-declared":` No accounts were provisioned — the stack does not declare release.attest.provision, so probes that sign in said NOT RUN.`,"producer-cannot":` No accounts were provisioned — the stack allows it, but this release's producer predates --provision.`}})))()}function Ye({source:e}){return!e||e.state===`invalid`?(0,X.jsx)(P,{variant:`caption`,color:`warning.main`,sx:{overflowWrap:`anywhere`},children:e?.reason??`Per-application provenance unavailable from this daemon`}):(0,X.jsxs)(v,{component:`details`,sx:{minWidth:0,overflowWrap:`anywhere`,"& > summary":{cursor:`pointer`,fontSize:12,color:`text.secondary`,borderRadius:.5,"&:focus-visible":{outline:`2px solid`,outlineColor:`primary.main`,outlineOffset:2}}},children:[(0,X.jsx)(v,{component:`summary`,children:e.via.length?`Imported · ${e.producerApp}`:`Built in this release`}),(0,X.jsxs)(I,{spacing:.75,sx:{mt:1},children:[(0,X.jsx)(P,{variant:`caption`,children:e.releaseId}),(0,X.jsxs)(P,{variant:`caption`,children:[`Project · `,e.project.repo,(0,X.jsx)(`br`,{}),e.project.commit]}),e.packageDirectory&&(0,X.jsxs)(P,{variant:`caption`,children:[`Package · `,e.packageDirectory]}),(0,X.jsxs)(P,{variant:`caption`,children:[`SDK · `,e.framework.repo,(0,X.jsx)(`br`,{}),e.framework.commit]}),(0,X.jsx)(P,{variant:`caption`,children:H(e.target)}),e.via.map((e,t)=>(0,X.jsxs)(P,{variant:`caption`,children:[`Via `,e.release,`/`,e.app,(0,X.jsx)(`br`,{}),`Manifest · `,e.manifestSha256]},`${t}:${e.manifestSha256}:${e.app}`)),(0,X.jsx)(P,{variant:`caption`,color:`text.secondary`,children:`Recorded build inputs; current execution is shown in Deployment state.`})]})]})}var X;function Xe(){return(Xe=e((()=>{p(),L(),O(),W(),X=n()})))()}function Ze(){let{id:e=``}=r();return(0,Q.jsx)(Qe,{id:e},e)}function Qe({id:e}){let{can:t}=z(),n=t(`OmnitronRelease.builds`),r=t(`OmnitronRelease.getLog`),i=(0,Z.useRef)(0),[o,s]=(0,Z.useState)(null),[c,u]=(0,Z.useState)(!1),[p,m]=(0,Z.useState)(null),[h,g]=(0,Z.useState)(null),{data:_,loading:b,error:x,refresh:S}=ve(async()=>{let[t,r]=await Promise.all([Ae.get(e),n?Ae.builds().then(e=>({records:e,error:null})).catch(e=>({records:[],error:e.message})):{records:[],error:null}]);return{detail:t,builds:r}},{intervalMs:15e3,enabled:!!e,resourceKey:JSON.stringify([e,n])}),w=(0,Z.useCallback)(async t=>{let n=++i.current;s(t),m(null),g(null);try{let r=await a.getLog({id:e,name:t,lines:400});n===i.current&&m({name:r.name,tail:r.tail})}catch(e){n===i.current&&g(e.message)}finally{n===i.current&&s(null)}},[e]);if(b&&!_)return(0,Q.jsx)(ge,{});if(x&&!_)return(0,Q.jsxs)(I,{spacing:3,children:[(0,Q.jsx)(ke,{links:[{name:`Releases`,href:`/releases`},{name:e}]}),(0,Q.jsx)(R,{severity:`error`,variant:`outlined`,children:x})]});let E=_.detail,D=E.manifest,O=_.builds.records.find(t=>t.releaseId===e)??null;return(0,Q.jsxs)(I,{spacing:3,children:[(0,Q.jsx)(ke,{links:[{name:`Releases`,href:`/releases`},{name:e}],action:(0,Q.jsxs)(I,{direction:`row`,spacing:1,children:[(0,Q.jsx)(pe,{"data-console-command":`refresh`,size:`small`,onClick:()=>void S(),title:`Refresh`,children:(0,Q.jsx)(we,{})}),(0,Q.jsx)(B,{permission:`OmnitronProject.startStack`,children:(0,Q.jsx)(f,{variant:`contained`,size:`small`,startIcon:(0,Q.jsx)(Te,{}),disabled:!E.complete,onClick:()=>u(!0),children:`Deploy…`})})]})}),x&&(0,Q.jsxs)(R,{severity:`warning`,children:[`Last confirmed manifest · `,x]}),_?.builds.error&&(0,Q.jsxs)(R,{severity:`warning`,children:[`Build activity unavailable · `,_.builds.error]}),!E.complete&&(0,Q.jsx)(R,{severity:E.manifestError?`error`:`warning`,variant:`outlined`,children:E.manifestError??`This directory holds no manifest: the build did not finish, and what is here is its logs. Nothing can be deployed from it.`}),O&&(0,Q.jsx)(Ve,{record:O,compact:O.state!==`running`}),(0,Q.jsx)(Ue,{project:E.project},E.project),(0,Q.jsxs)(F,{container:!0,spacing:2,children:[(0,Q.jsx)(F,{size:{xs:12,md:6},children:(0,Q.jsx)(C,{variant:`outlined`,sx:{height:`100%`},children:(0,Q.jsxs)(d,{children:[(0,Q.jsx)(P,{variant:`subtitle2`,sx:{mb:1.5},children:`Built from`}),(0,Q.jsx)(I,{spacing:1.5,children:[[`project`,E.projectCommit,E.projectRepo,E.onRemote.project],[`omni`,E.omniCommit,E.omniRepo,E.onRemote.omni]].map(([e,t,n,r])=>(0,Q.jsxs)(v,{children:[(0,Q.jsxs)(I,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,Q.jsx)(P,{variant:`body2`,sx:{fontWeight:600,minWidth:56},children:e===`project`?E.project:`omni`}),(0,Q.jsx)(P,{variant:`body2`,sx:{fontFamily:`monospace`},children:t?.slice(0,12)??`—`}),r===!1&&(0,Q.jsx)(j,{title:Se({project:r,omni:!0},e===`project`?E.project:`omni`).detail,children:(0,Q.jsx)(y,{label:`Git: unpublished source`,size:`small`,color:`warning`,variant:`outlined`})}),r===null&&(0,Q.jsx)(j,{title:Se({project:r,omni:!0},e===`project`?E.project:`omni`).detail,children:(0,Q.jsx)(y,{label:`Git: unverified`,size:`small`,variant:`outlined`})})]}),(0,Q.jsx)(P,{variant:`caption`,sx:{color:`text.secondary`},children:n??`—`}),E.manifest?.[e]?.ref&&(0,Q.jsxs)(P,{component:`div`,variant:`caption`,sx:{color:`text.secondary`,overflowWrap:`anywhere`},children:[`Required ref: `,E.manifest[e].ref]})]},e))})]})})}),(0,Q.jsx)(F,{size:{xs:12,md:6},children:(0,Q.jsx)(C,{variant:`outlined`,sx:{height:`100%`},children:(0,Q.jsxs)(d,{children:[(0,Q.jsx)(P,{variant:`subtitle2`,sx:{mb:1.5},children:`Built with`}),(0,Q.jsxs)(I,{spacing:.75,children:[E.manifestSha256&&(0,Q.jsxs)(v,{component:`details`,sx:{overflowWrap:`anywhere`},children:[(0,Q.jsx)(P,{component:`summary`,variant:`caption`,sx:{cursor:`pointer`,color:`text.secondary`},children:`Manifest SHA-256`}),(0,Q.jsx)(P,{component:`code`,variant:`caption`,sx:{userSelect:`all`},children:E.manifestSha256})]}),(0,Q.jsxs)(P,{variant:`body2`,children:[Ie(E.builtAt),` · `,E.builtBy??`—`]}),(0,Q.jsxs)(P,{variant:`body2`,sx:{fontFamily:`monospace`,fontSize:13},children:[`omnitron `,E.builtWith??`—`]}),(0,Q.jsx)(P,{variant:`caption`,sx:{color:`text.secondary`},children:H(D?.builtWith?.target)}),(0,Q.jsxs)(P,{variant:`caption`,sx:{color:`text.secondary`},children:[D&&(0,Q.jsxs)(Q.Fragment,{children:[be(D),` · `]}),K(E.bytes),` on disk at `,E.root]}),E.statics&&(0,Q.jsxs)(P,{variant:`caption`,sx:{color:`text.secondary`},children:[`statics for `,(0,Q.jsx)(`strong`,{children:E.statics.stack}),` — `,E.statics.files,` files,`,` `,K(E.statics.bytes),` from `,D?.statics?.dir]}),E.machine&&(0,Q.jsxs)(P,{variant:`caption`,sx:{color:Pe(E.machine)?`warning.main`:`text.secondary`},children:[`machine while the gates ran: `,Ne(E.machine),Pe(E.machine)?` — load exceeded core count; inspect the gate logs for failure causes`:``]})]})]})})})]}),(0,Q.jsx)(C,{variant:`outlined`,children:(0,Q.jsxs)(d,{children:[(0,Q.jsxs)(I,{direction:`row`,spacing:1.5,sx:{alignItems:`center`,mb:1.5},children:[(0,Q.jsx)(P,{variant:`subtitle2`,children:`Gates`}),(0,Q.jsx)(P,{variant:`caption`,sx:{color:`text.secondary`},children:E.gates.total===0?`none recorded — a stack that requires any refuses this release`:`${E.gates.passed} of ${E.gates.total} passed`}),(0,Q.jsx)(v,{sx:{flex:1}}),(0,Q.jsx)(Fe,{gates:E.gateList})]}),E.gateList.length>0&&(0,Q.jsx)(ce,{children:(0,Q.jsxs)(ae,{size:`small`,children:[(0,Q.jsx)(le,{children:(0,Q.jsxs)(N,{children:[(0,Q.jsx)(k,{children:`Gate`}),(0,Q.jsx)(k,{children:`Outcome`}),(0,Q.jsx)(k,{align:`right`,children:`Took`}),(0,Q.jsx)(k,{children:`Detail`})]})}),(0,Q.jsx)(A,{children:E.gateList.map((e,t)=>(0,Q.jsxs)(N,{children:[(0,Q.jsxs)(k,{sx:{fontFamily:`monospace`,fontSize:13},children:[e.name,e.checks!=null&&(0,Q.jsxs)(P,{component:`span`,variant:`caption`,sx:{color:`text.secondary`,ml:1},children:[e.checks,` checks`]})]}),(0,Q.jsx)(k,{children:(0,Q.jsx)(P,{variant:`caption`,sx:{color:G[e.status].color,fontWeight:600},children:G[e.status].label})}),(0,Q.jsx)(k,{align:`right`,children:(0,Q.jsx)(P,{variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`},children:e.durationMs?Me(e.durationMs):`—`})}),(0,Q.jsx)(k,{children:(0,Q.jsx)(P,{variant:`caption`,sx:{color:`text.secondary`,whiteSpace:`pre-wrap`},children:e.detail??``})})]},`${e.name}-${t}`))})]})})]})}),E.complete&&(0,Q.jsx)(qe,{releaseId:E.id,project:E.project,attestations:E.attestations,onChanged:S}),(0,Q.jsx)(C,{variant:`outlined`,children:(0,Q.jsxs)(d,{children:[(0,Q.jsx)(P,{variant:`subtitle2`,sx:{mb:1.5},children:`Artifacts`}),(D?.artifacts??[]).length===0?(0,Q.jsx)(P,{variant:`body2`,sx:{color:`text.secondary`},children:`None.`}):(0,Q.jsx)(ce,{children:(0,Q.jsxs)(ae,{size:`small`,sx:{minWidth:540},children:[(0,Q.jsx)(le,{children:(0,Q.jsxs)(N,{children:[(0,Q.jsx)(k,{children:`App`}),(0,Q.jsx)(k,{children:`Source`}),(0,Q.jsx)(k,{align:`right`,children:`Size`}),(0,Q.jsx)(k,{children:`sha256`})]})}),(0,Q.jsx)(A,{children:(D?.artifacts??[]).map(e=>(0,Q.jsxs)(N,{children:[(0,Q.jsxs)(k,{sx:{verticalAlign:`top`,maxWidth:200,overflowWrap:`anywhere`},children:[(0,Q.jsx)(P,{variant:`body2`,sx:{fontWeight:600},children:e.app}),(0,Q.jsx)(P,{variant:`caption`,color:`text.secondary`,sx:{fontFamily:`monospace`},children:e.version})]}),(0,Q.jsx)(k,{sx:{verticalAlign:`top`,maxWidth:360},children:(0,Q.jsx)(Ye,{source:E.artifactSources?.find(t=>t.app===e.app)})}),(0,Q.jsx)(k,{align:`right`,sx:{fontFamily:`monospace`,fontSize:13},children:K(e.bytes)}),(0,Q.jsx)(k,{children:(0,Q.jsx)(j,{title:e.sha256||`none recorded`,arrow:!0,children:(0,Q.jsx)(P,{variant:`caption`,sx:{fontFamily:`monospace`,color:`text.secondary`},children:e.sha256?`${e.sha256.slice(0,16)}…`:`—`})})})]},`${e.app}-${e.version}`))})]})}),(D?.artifactFailures??[]).map(e=>(0,Q.jsx)(R,{severity:`error`,variant:`outlined`,sx:{mt:1},children:(0,Q.jsxs)(P,{variant:`body2`,sx:{whiteSpace:`pre-wrap`},children:[(0,Q.jsx)(`strong`,{children:e.app}),` did not build — `,e.error.split(`
2
- `)[0]]})},e.app))]})}),(0,Q.jsx)(C,{variant:`outlined`,children:(0,Q.jsxs)(d,{children:[(0,Q.jsx)(P,{variant:`subtitle2`,sx:{mb:1.5},children:`Build logs`}),E.logs.length===0?(0,Q.jsx)(P,{variant:`body2`,sx:{color:`text.secondary`},children:`This build wrote no logs.`}):(0,Q.jsx)(I,{direction:`row`,spacing:1,sx:{flexWrap:`wrap`},children:E.logs.map(e=>(0,Q.jsx)(y,{label:`${e.name} · ${K(e.bytes)}`,size:`small`,variant:p?.name===e.name?`filled`:`outlined`,disabled:!r,onClick:()=>void w(e.name),sx:{fontFamily:`monospace`,fontSize:11}},e.name))}),(0,Q.jsx)(De,{active:r&&!!o,label:`Reading ${o??``}`}),r&&h&&(0,Q.jsx)(R,{severity:`warning`,variant:`outlined`,sx:{mt:1.5},children:h}),r&&p&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(T,{sx:{my:1.5}}),(0,Q.jsx)(v,{sx:{maxHeight:420,overflow:`auto`,p:1.5,borderRadius:1,bgcolor:e=>l(e.palette.text.primary,.04)},children:(0,Q.jsx)(P,{variant:`caption`,sx:{fontFamily:`monospace`,whiteSpace:`pre`,display:`block`},children:p.tail})})]})]})}),(0,Q.jsx)(B,{permission:`OmnitronProject.startStack`,children:(0,Q.jsx)(ze,{open:c,onClose:()=>u(!1),project:E.project,release:E})})]})}var Z,Q;function $(){return($=e((()=>{Z=t(),c(),p(),m(),h(),g(),_(),S(),ue(),de(),L(),D(),ee(),se(),te(),re(),ie(),M(),O(),u(),he(),Oe(),_e(),Ce(),Re(),Y(),Be(),He(),Xe(),W(),Le(),ye(),V(),Ee(),o(),je(),Q=n()})))()}$();export{Ze as default};
@@ -1 +0,0 @@
1
- import{t as e}from"./webapp-D-UhjFhS.js";e();
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{t}from"./react-BN8qLIAi.js";import{H as n,V as r}from"./mui-BXSXx9c9.js";import{n as i,t as a}from"./react-CEuifcaQ.js";function o(e,t,n){return e===502||e===503?`down`:(t??``).includes(`text/html`)||e<200||e>=300||n===null?`unreachable`:n.status===`online`?`up`:`down`}function s(e,t){return e===`up`?{status:`online`,consecutiveUnreachable:0}:e===`down`?{status:`offline`,consecutiveUnreachable:0}:{status:`degraded`,consecutiveUnreachable:t+1}}async function c(){try{let e=new AbortController,t=setTimeout(()=>e.abort(),d),n=await fetch(`/api/health`,{signal:e.signal,cache:`no-store`});clearTimeout(t);let r=n.headers.get(`content-type`),i=n.ok?await n.json().catch(()=>null):null;return o(n.status,r,i)}catch{return`unreachable`}}async function l(e,t){let n=s(await c(),t().consecutiveUnreachable);e({status:n.status,consecutiveUnreachable:n.consecutiveUnreachable,lastChecked:Date.now()})}var u,d,f,p,m;function h(){return(h=e((()=>{i(),u=3e4,d=15e3,f=a((e,t)=>({status:`unknown`,lastChecked:null,consecutiveUnreachable:0,probe:async()=>{await l(e,t)},startPolling:()=>{l(e,t);let n=setInterval(()=>void l(e,t),u);return()=>clearInterval(n)}})),p=()=>f(e=>e.status!==`offline`),m=()=>f(e=>e.status)})))()}function g({size:e=32,sx:t}){return(0,_.jsxs)(r,{component:`svg`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 210 210`,sx:{width:e,height:e,flexShrink:0,...t},children:[(0,_.jsx)(`defs`,{children:(0,_.jsxs)(`linearGradient`,{id:`omni-logo-grad`,x1:`105`,y1:`165.47`,x2:`105`,y2:`52.73`,gradientUnits:`userSpaceOnUse`,children:[(0,_.jsx)(`stop`,{offset:`0`,stopColor:`#ff4fff`}),(0,_.jsx)(`stop`,{offset:`0.01`,stopColor:`#ff51fb`}),(0,_.jsx)(`stop`,{offset:`0.29`,stopColor:`#ff75af`}),(0,_.jsx)(`stop`,{offset:`0.53`,stopColor:`#ff9272`}),(0,_.jsx)(`stop`,{offset:`0.73`,stopColor:`#ffa747`}),(0,_.jsx)(`stop`,{offset:`0.89`,stopColor:`#ffb32c`}),(0,_.jsx)(`stop`,{offset:`0.98`,stopColor:`#ffb822`})]})}),(0,_.jsx)(`path`,{fill:`url(#omni-logo-grad)`,d:`M66.92,144.68l-27,15.59L102,52.73V83.92Zm3,5.2-27,15.59H167.09l-27-15.59Zm100.17,10.39L108,52.73V83.92l35.08,60.76Zm-34.4-16.39L105,90.72,74.31,143.88Z`})]})}var _;function v(){return(v=e((()=>{n(),_=t()})))()}export{m as a,p as i,v as n,f as o,h as r,g as t};
@@ -1,3 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{i as t,t as n}from"./react-BN8qLIAi.js";import{b as r,h as i,y as a}from"./client-DFnuv2z3.js";import{F as o,H as s,I as c,Q as l,V as u,Z as d,c as f,d as p,f as m,g as h,h as ee,m as g,n as _,p as te,s as ne,t as v}from"./mui-BXSXx9c9.js";import{B as y,a as b,o as x,z as S}from"./mui-Cd711nOk.js";import{E as C,T as w,it as T,l as E,rt as D,u as O}from"./mui-AnEgAVjz.js";import{_ as k,v as A}from"./mui-BwsIrivo.js";import{r as j,t as M}from"./alert-uBG6r9NW.js";import{n as N,s as P}from"./access-48hkC2-P.js";import{n as F,t as I}from"./use-polled-resource-B22hhr5L.js";import{A as L,G as R,M as re,k as ie,l as ae}from"./icons-OboZgWSt.js";import{n as z,t as B}from"./operation-status-Bm1x1wTz.js";import{n as V,t as oe}from"./page-breadcrumbs-fR7Jmpp4.js";import{n as H,t as se}from"./admin-data-table-BKSDI8sU.js";import{n as U,t as ce}from"./confirm-dialog-BbGsAz7_.js";import{r as le,t as ue}from"./formatters-RnRy4bXm.js";import{n as de,t as W}from"./settled-pair-B-wgSZl6.js";import{n as fe,r as G}from"./tabs-k5NPGLnJ.js";function pe({definition:e,onClose:t,onSaved:n}){let[i,s]=(0,K.useState)(e?.name??``),[c,l]=(0,K.useState)(e?.description??``),[d,f]=(0,K.useState)(e?.steps??[{name:`inspect`,kind:`xec`,run:J}]),[m,h]=(0,K.useState)(`0`),[g,_]=(0,K.useState)(!1),[v,y]=(0,K.useState)(``),[x,C]=(0,K.useState)(null),[w,T]=(0,K.useState)(!1),[D,O]=(0,K.useState)(!1),[A,j]=(0,K.useState)(!1),N=F(()=>a.listNodes(),{intervalMs:3e4}),P=Number(m),I=d[P],L=e=>{f(t=>t.map((t,n)=>n===P?{...t,...e}:t)),O(!0)},R=()=>{w||(D?j(!0):t())};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(ee,{open:!0,onClose:R,maxWidth:`lg`,fullWidth:!0,slotProps:{paper:{sx:{maxHeight:`calc(100dvh - 32px)`,m:2,width:`calc(100% - 32px)`}}},children:[(0,q.jsx)(ne,{children:e?`Edit automation`:`New automation`}),(0,q.jsxs)(p,{dividers:!0,sx:{minWidth:0},children:[(0,q.jsx)(B,{active:w,label:`Saving automation definition`}),(0,q.jsxs)(k,{spacing:2,children:[x&&(0,q.jsx)(M,{severity:`error`,variant:`outlined`,children:x}),(0,q.jsxs)(k,{direction:{xs:`column`,sm:`row`},spacing:2,children:[(0,q.jsx)(b,{autoFocus:!0,label:`Name`,size:`small`,value:i,fullWidth:!0,onChange:e=>{s(e.target.value),O(!0)}}),(0,q.jsx)(b,{label:`Description`,size:`small`,value:c,fullWidth:!0,onChange:e=>{l(e.target.value),O(!0)}})]}),(0,q.jsxs)(k,{direction:`row`,sx:{justifyContent:`space-between`,alignItems:`center`,flexWrap:`wrap`,gap:1},children:[(0,q.jsx)(S,{variant:`caption`,color:`text.secondary`,children:`Save a definition, then review its target before running.`}),(0,q.jsx)(o,{size:`small`,onClick:()=>{if(!g)y(JSON.stringify(d,null,2)),_(!0);else try{let e=JSON.parse(v);if(!Array.isArray(e)||!e.length||e.some(e=>typeof e?.name!=`string`||typeof e?.run!=`string`))throw Error(`A non-empty array of named steps is required`);f(e),h(`0`),_(!1),C(null)}catch(e){C(String(e))}},children:g?`Step editor`:`Advanced JSON`})]}),g?(0,q.jsx)(b,{label:`Steps JSON`,multiline:!0,minRows:14,maxRows:28,fullWidth:!0,value:v,onChange:e=>{y(e.target.value),O(!0)},slotProps:{input:{sx:{fontFamily:`monospace`,fontSize:13}},htmlInput:{spellCheck:!1}}}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(fe,{value:m,onChange:h,variant:`scrollable`,scrollButtons:`auto`,"aria-label":`Automation steps`,tabs:d.map((e,t)=>({value:String(t),label:e.name||`Step ${t+1}`,closable:d.length>1})),onClose:e=>{let t=Number(e);f(e=>e.filter((e,n)=>n!==t)),h(String(Math.max(0,Math.min(P-+(t<P),d.length-2)))),O(!0)},action:(0,q.jsx)(o,{size:`small`,disabled:d.length>=32,onClick:()=>{f(e=>[...e,{name:`step-${e.length+1}`,kind:`xec`,run:J}]),h(String(d.length)),O(!0)},children:`Add step`})}),(0,q.jsxs)(u,{sx:{display:`grid`,gap:2,gridTemplateColumns:{xs:`1fr`,md:`minmax(0, 1fr) 260px`},minWidth:0},children:[(0,q.jsx)(b,{label:I.kind===`xec`?`Xec · TypeScript`:`Shell command`,multiline:!0,minRows:13,maxRows:26,fullWidth:!0,value:I.run,onChange:e=>L({run:e.target.value}),helperText:I.kind===`xec`?`$ runs locally · $target uses the selected node · params contains run input`:`Parameters are JSON in OMNITRON_PARAMS; shell interpolation is disabled`,slotProps:{input:{sx:{fontFamily:`monospace`,fontSize:13,lineHeight:1.7}},htmlInput:{spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`}}}),(0,q.jsxs)(k,{spacing:2,children:[(0,q.jsx)(b,{label:`Step name`,size:`small`,value:I.name,onChange:e=>L({name:e.target.value})}),(0,q.jsxs)(b,{select:!0,label:`Executor`,size:`small`,value:I.kind??`shell`,onChange:e=>L({kind:e.target.value}),children:[(0,q.jsx)(E,{value:`xec`,children:`Xec · TypeScript`}),(0,q.jsx)(E,{value:`shell`,children:`Shell`})]}),(0,q.jsxs)(b,{select:!0,label:`Target`,size:`small`,value:I.nodeId??`local`,onChange:e=>L({nodeId:e.target.value}),children:[(0,q.jsx)(E,{value:`local`,children:`Local daemon host`}),(N.data??[]).filter(e=>!e.isLocal).map(e=>(0,q.jsx)(E,{value:e.id,children:e.name},e.id)),I.nodeId&&I.nodeId!==`local`&&!N.data?.some(e=>e.id===I.nodeId)&&(0,q.jsxs)(E,{value:I.nodeId,children:[`Unavailable · `,I.nodeId]})]}),N.error&&(0,q.jsxs)(M,{severity:`warning`,variant:`outlined`,children:[`Node list unavailable: `,N.error]}),(0,q.jsx)(b,{label:`Working directory`,size:`small`,value:I.cwd??``,placeholder:`Daemon working directory`,onChange:e=>L({cwd:e.target.value||void 0})}),(0,q.jsx)(b,{label:`Timeout (seconds)`,type:`number`,size:`small`,value:(I.timeout??3e5)/1e3,onChange:e=>L({timeout:Number(e.target.value)*1e3})}),(0,q.jsx)(b,{label:`Depends on`,size:`small`,value:(I.dependsOn??[]).join(`, `),helperText:`Step names, separated by commas`,onChange:e=>L({dependsOn:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)})})]})]}),(0,q.jsx)(S,{variant:`caption`,color:`text.secondary`,children:`Scripts run with the daemon host's OS permissions. Remote targets require a trusted SSH host key. Use only reviewed code.`})]})]})]}),(0,q.jsxs)(te,{children:[(0,q.jsx)(o,{onClick:R,disabled:w,children:`Cancel`}),(0,q.jsx)(o,{variant:`contained`,loading:w,onClick:async()=>{T(!0),C(null);try{let a={name:i,description:c,steps:g?JSON.parse(v):d,triggers:e?.triggers??[]};if(e){if(!e.conditionalUpdates)throw Error(`Update the daemon to support conditional pipeline edits`);await r.updatePipeline({id:e.id,definition:a,expectedRevision:e.revision})}else await r.createPipeline(a);n(),t()}catch(e){C(e instanceof Error?e.message:`Could not save the pipeline`)}finally{T(!1)}},disabled:w||!i.trim(),children:w?`Saving…`:`Save definition`})]})]}),(0,q.jsx)(ce,{open:A,onClose:()=>j(!1),onConfirm:t,title:`Discard edits?`,content:`Your unsaved automation changes will be lost.`,confirmLabel:`Discard`,confirmColor:`error`})]})}var K,q,J;function me(){return(me=e((()=>{z(),K=t(),s(),c(),h(),g(),m(),f(),O(),A(),x(),y(),G(),j(),U(),i(),I(),q=n(),J=`const result = await $target\`uname -s\`;
2
- console.log(result.stdout);
3
- `})))()}function he({run:e,targetLabel:t=e=>e??`Local daemon host`}){return(0,X.jsxs)(k,{spacing:2,sx:{minWidth:0},children:[(0,X.jsxs)(k,{direction:`row`,sx:{flexWrap:`wrap`,gap:1,alignItems:`center`},children:[(0,X.jsx)(d,{size:`small`,label:e.status,color:Z[e.status]??`default`}),(0,X.jsxs)(S,{variant:`caption`,children:[ue(e.startedAt),` · `,e.triggeredBy]})]}),(0,X.jsx)(S,{variant:`caption`,sx:{fontFamily:`monospace`,overflowWrap:`anywhere`},children:e.id}),Q(e)&&(0,X.jsx)(w,{"aria-label":`Automation in progress`}),e.status===`interrupted`&&(0,X.jsx)(M,{severity:`warning`,variant:`outlined`,children:`The executor stopped before recording completion. Inspect effects before starting another run.`}),e.steps.map(e=>(0,X.jsxs)(u,{sx:{border:1,borderColor:`divider`,borderRadius:1,p:1.5,minWidth:0},children:[(0,X.jsxs)(k,{direction:`row`,sx:{flexWrap:`wrap`,alignItems:`center`,gap:1,mb:1},children:[(0,X.jsx)(S,{variant:`subtitle2`,sx:{flex:1,overflowWrap:`anywhere`},children:e.name}),(0,X.jsx)(d,{size:`small`,label:e.status,color:Z[e.status]??`default`}),(0,X.jsxs)(S,{variant:`caption`,color:`text.secondary`,children:[le(e.duration),e.attempts?` · attempt ${e.attempts}`:``,e.exitCode!==void 0&&` · exit ${e.exitCode}`]})]}),(0,X.jsxs)(S,{variant:`caption`,color:`text.secondary`,sx:{display:`block`,mb:1,overflowWrap:`anywhere`},children:[e.kind??`shell`,` · `,t(e.nodeId)]}),e.error&&(0,X.jsx)(M,{severity:`error`,variant:`outlined`,sx:{mb:1,overflowWrap:`anywhere`},children:e.error}),e.output&&(0,X.jsx)(u,{component:`pre`,"aria-label":`${e.name} stdout`,tabIndex:0,sx:$,children:e.output}),e.stderr&&(0,X.jsx)(u,{component:`pre`,"aria-label":`${e.name} stderr`,tabIndex:0,sx:{...$,mt:1},children:e.stderr}),e.outputTruncated&&(0,X.jsx)(S,{variant:`caption`,color:`warning.main`,children:`Output retention limit reached; earlier content was omitted.`}),e.sourceHash&&(0,X.jsxs)(S,{variant:`caption`,color:`text.secondary`,sx:{display:`block`,mt:1,overflowWrap:`anywhere`,fontFamily:`monospace`},children:[`SHA-256 `,e.sourceHash]})]},e.name))]})}function ge(){let[e,t]=(0,Y.useState)(null),[n,i]=(0,Y.useState)(`definitions`),[s,c]=(0,Y.useState)(null),[l,f]=(0,Y.useState)(null),[m,h]=(0,Y.useState)(`{}`),[g,_]=(0,Y.useState)(null),[y,x]=(0,Y.useState)(!1),[C,w]=(0,Y.useState)(null),[T,E]=(0,Y.useState)(0),[O,A]=(0,Y.useState)(25),j=F(()=>a.listNodes(),{intervalMs:3e4,enabled:!!(l||s)}),P=e=>!e||e===`local`?`Local daemon host`:j.data?.find(t=>t.id===e)?.name??e,{data:I,loading:R,error:z,refresh:B}=F(async()=>{let e=await de([r.listPipelines(),r.listRuns({limit:100})],[[],[]]);return{definitions:e.first,runs:e.second,partialFailure:e.partialFailure}},{intervalMs:3e3}),V=I?.definitions??[],H=I?.runs??[],U=F(()=>r.getRunStatus({runId:s}),{intervalMs:3e3,enabled:!!s,resourceKey:s}),W=U.data?.id===s?U.data:null,G=async e=>{x(!0),_(null);try{await e(),await B()}catch(e){_(_e(e))}finally{x(!1)}};return(0,X.jsxs)(k,{spacing:2,sx:{minWidth:0},children:[(0,X.jsx)(oe,{links:[{name:`Pipelines`}],action:(0,X.jsxs)(k,{direction:`row`,spacing:1,children:[(0,X.jsx)(D,{"data-console-command":`refresh`,size:`small`,title:`Refresh pipelines`,onClick:B,children:(0,X.jsx)(re,{})}),(0,X.jsx)(N,{permission:`OmnitronPipelines.createPipeline`,children:(0,X.jsx)(o,{size:`small`,variant:`contained`,startIcon:(0,X.jsx)(L,{}),onClick:()=>t(`new`),children:`New automation`})})]})}),(z||I?.partialFailure||g)&&(0,X.jsxs)(M,{severity:`warning`,variant:`outlined`,children:[g??z??I?.partialFailure,` · Displayed run state may be stale.`]}),(0,X.jsx)(fe,{value:n,onChange:e=>{i(e),E(0)},"aria-label":`Pipeline views`,tabs:[{value:`definitions`,label:`Automations · ${V.length}`},{value:`runs`,label:`Runs · ${H.length}`}]}),n===`definitions`?(0,X.jsx)(se,{data:V.slice(T*O,(T+1)*O),columns:[{key:`name`,header:`Automation`,render:e=>(0,X.jsx)(o,{size:`small`,onClick:()=>t(e),sx:{textAlign:`left`},children:e.name})},{key:`description`,header:`Description`,render:e=>e.description||`—`},{key:`steps`,header:`Steps`,render:e=>e.steps.length},{key:`actions`,header:``,align:`right`,render:e=>(0,X.jsxs)(k,{direction:`row`,sx:{justifyContent:`flex-end`,gap:1},children:[(0,X.jsx)(N,{permission:`OmnitronPipelines.executePipeline`,children:(0,X.jsx)(o,{size:`small`,startIcon:(0,X.jsx)(ie,{}),disabled:y,onClick:()=>{f(e),h(`{}`),_(null)},children:`Run`})}),(0,X.jsx)(N,{permission:`OmnitronPipelines.deletePipeline`,children:(0,X.jsx)(D,{size:`small`,title:`Delete ${e.name}`,disabled:y,onClick:()=>w(e),children:(0,X.jsx)(ae,{})})})]})}],rowKey:e=>e.id,total:V.length,page:T,pageSize:O,onPageChange:E,onPageSizeChange:e=>{A(e),E(0)},loading:R,loadError:z??I?.partialFailure,emptyMessage:`Create an automation to run Xec scripts and shell steps.`,minWidth:560,scrollLabel:`Automation definitions`,dense:!0}):(0,X.jsx)(se,{data:H.slice(T*O,(T+1)*O),columns:[{key:`name`,header:`Automation`,render:e=>(0,X.jsx)(o,{size:`small`,onClick:()=>c(e.id),children:V.find(t=>t.id===e.pipelineId)?.name??e.pipelineId.slice(0,8)})},{key:`status`,header:`Status`,render:e=>(0,X.jsx)(d,{size:`small`,label:e.status,color:Z[e.status]??`default`})},{key:`startedAt`,header:`Started`,render:e=>ue(e.startedAt)},{key:`duration`,header:`Duration`,render:e=>le(Date.parse(e.completedAt??new Date().toISOString())-Date.parse(e.startedAt))},{key:`triggeredBy`,header:`Actor`,render:e=>e.triggeredBy}],rowKey:e=>e.id,total:H.length,page:T,pageSize:O,onPageChange:E,onPageSizeChange:e=>{A(e),E(0)},loading:R,loadError:z??I?.partialFailure,emptyMessage:`No automation runs yet.`,minWidth:620,scrollLabel:`Automation run history`,dense:!0}),e&&(0,X.jsx)(pe,{...e===`new`?{}:{definition:e},onClose:()=>t(null),onSaved:()=>{B()}}),(0,X.jsxs)(ee,{open:!!l,onClose:()=>{y||f(null)},maxWidth:`md`,fullWidth:!0,children:[(0,X.jsxs)(ne,{children:[`Run `,l?.name]}),(0,X.jsx)(p,{dividers:!0,children:(0,X.jsxs)(k,{spacing:2,children:[g&&(0,X.jsx)(M,{severity:`error`,variant:`outlined`,children:g}),j.error&&(0,X.jsx)(M,{severity:`warning`,variant:`outlined`,children:`Node names unavailable; verify target IDs below.`}),l?.steps.map(e=>(0,X.jsxs)(u,{component:`details`,children:[(0,X.jsxs)(u,{component:`summary`,sx:{cursor:`pointer`,fontSize:13},children:[e.name,` · `,e.kind??`shell`,` · `,P(e.nodeId),` · `,(e.timeout??3e5)/1e3,`s`]}),(0,X.jsx)(u,{component:`pre`,sx:{...$,mt:1},children:e.run}),(0,X.jsx)(u,{component:`pre`,"aria-label":`${e.name} execution settings`,sx:{...$,mt:1},children:JSON.stringify({targetId:e.nodeId??`local`,cwd:e.cwd??`Daemon working directory`,dependsOn:e.dependsOn??[],retries:e.retries??0,condition:e.condition??null,env:e.env??{}},null,2)})]},e.name)),(0,X.jsx)(b,{label:`Parameters (JSON)`,value:m,onChange:e=>h(e.target.value),multiline:!0,minRows:3,fullWidth:!0,helperText:`Values are passed as data and are not stored in run history.`,slotProps:{input:{sx:{fontFamily:`monospace`,fontSize:13}}}})]})}),(0,X.jsxs)(te,{children:[(0,X.jsx)(o,{disabled:y,onClick:()=>f(null),children:`Cancel`}),(0,X.jsx)(o,{disabled:y,variant:`contained`,onClick:()=>G(async()=>{let e=await r.executePipeline({id:l.id,expectedRevision:l.revision,params:JSON.parse(m)});c(e.id),i(`runs`),E(0),f(null)}),children:y?`Starting…`:`Run automation`})]})]}),(0,X.jsxs)(v,{anchor:`right`,open:!!s,onClose:()=>c(null),slotProps:{paper:{sx:{width:{xs:`100%`,sm:640},maxWidth:`100vw`,p:2,boxSizing:`border-box`}}},children:[(0,X.jsxs)(k,{direction:`row`,sx:{alignItems:`center`,justifyContent:`space-between`,mb:2},children:[(0,X.jsx)(S,{variant:`subtitle2`,children:`Run details`}),(0,X.jsx)(D,{title:`Close run details`,onClick:()=>c(null),children:(0,X.jsx)(ae,{})})]}),U.error&&(0,X.jsx)(M,{severity:`warning`,variant:`outlined`,children:`Updates unavailable. The displayed state may be stale.`}),g&&(0,X.jsx)(M,{severity:`error`,variant:`outlined`,sx:{mb:2},children:g}),W?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(he,{run:W,targetLabel:P}),(0,X.jsx)(N,{permission:`OmnitronPipelines.cancelRun`,children:Q(W)&&(0,X.jsx)(o,{sx:{mt:2},color:`warning`,variant:`outlined`,disabled:y||W.status===`cancelling`,onClick:()=>G(async()=>{await r.cancelRun({runId:W.id}),await U.refresh()}),children:`Cancel run`})})]}):(0,X.jsx)(M,{severity:`info`,variant:`outlined`,children:U.loading?`Loading run state…`:`Run state is unavailable.`})]}),(0,X.jsx)(ce,{open:!!C,onClose:()=>{y||w(null)},onConfirm:()=>G(async()=>{await r.deletePipeline({id:C.id}),w(null)}),title:`Delete automation?`,content:`${C?.name??``} and its run history will be removed. Active runs must be stopped first.`,confirmLabel:`Delete`,confirmColor:`error`})]})}var Y,X,Z,Q,_e,$;function ve(){return(ve=e((()=>{Y=t(),s(),c(),l(),h(),g(),m(),f(),_(),T(),C(),A(),x(),y(),G(),H(),j(),U(),P(),R(),V(),me(),i(),I(),W(),X=n(),Z={success:`success`,failed:`error`,running:`info`,pending:`default`,cancelling:`warning`,interrupted:`warning`,cancelled:`default`},Q=e=>[`pending`,`running`,`cancelling`].includes(e.status),_e=e=>e instanceof Error?e.message:String(e),$={m:0,p:1.5,borderRadius:1,bgcolor:`action.hover`,fontFamily:`monospace`,fontSize:12,whiteSpace:`pre-wrap`,overflowWrap:`anywhere`,maxHeight:320,overflow:`auto`,minWidth:0}})))()}ve();export{he as PipelineRunDetail,ge as default};
@@ -1 +0,0 @@
1
- import{i as e,n as t}from"./rolldown-runtime-CNOWq4Kh.js";import{i as n}from"./react-BN8qLIAi.js";import{O as r,g as i,h as a,x as o}from"./client-DFnuv2z3.js";import{n as s,r as c}from"./services-BddvcFi8.js";import{n as l,t as u}from"./react-CEuifcaQ.js";import{a as d,i as f,n as p,o as m,r as h}from"./storage-CKXnhqkt.js";function g(e){let t=/^(.*)-\d{12}-([0-9a-f]{8})-([0-9a-f]{8})(?:-[A-Za-z0-9]{6})?$/.exec(e);return{project:t?.[1]??e,projectCommit:t?.[2]??null,omniCommit:t?.[3]??null}}function ee(e){let t=e.apps.filter(e=>e.status!==`online`).map(e=>`${e.name} (${e.status})`),n=e.apps.length,r=n-t.length,i=e.notUp??[],a=[...new Set([...i,...t.filter(e=>!i.some(t=>t.startsWith(e+`: `)))])];e.status!==`running`&&a.push(`stack state: ${e.status}`);let o=a.length===0?`confirmed`:e.status===`error`?`failed`:`partial`;return{confirmed:o===`confirmed`,outcome:o,online:r,total:n,issues:a}}function te(e){return JSON.stringify([e.project,e.stack,e.node,e.app])}function ne(e,t,n){let r=[],i=[];for(let a of e){if(!a.project||!a.stack){i.push(a);continue}let e=(t.configurations?.find(e=>e.runtimeProject===a.project))?.stacks[a.stack]??(a.project===t.name?a.stack:void 0);e&&(!n||e===n)&&r.push(a.project===t.name&&a.stack===e?a:{...a,project:t.name,stack:e})}return{transfers:r,unscoped:i}}function re(e){return e?`${e.platform}/${e.arch} · Node ${e.node} · ABI ${e.abi}`:`Target not recorded`}function _(e){let t=e.omni.reproduced,n=t?.packages??e.omni.registry?.packages,r=n?.length??e.builtWith?.packages?.length;return r===void 0?`Framework source not recorded`:`${t?`Reproduced archives`:n?`npm registry`:`Linked checkout`} · ${r} framework package${r===1?``:`s`}`}function v(e){let t=e.length===1?e[0]:null;return t&&t.name===`gates`&&t.status===`not-run`?t:null}function y(e){if(e.manifestError)return{text:`invalid manifest`,tone:`failed`};if(!e.complete)return{text:`no manifest`,tone:`none`};let t=v(e.gateList);if(t)return{text:/--skip-gates/.test(t.detail??``)?`skipped`:`not run`,tone:`unfinished`};let{total:n,passed:r,failed:i}=e.gates;return n===0?{text:`—`,tone:`none`}:{text:`${r}/${n}`,tone:i>0?`failed`:r<n?`unfinished`:`passed`}}function b(e,t){return e?{known:!0,deployments:t}:{known:!1,why:C}}function ie(e){let t=new Map;for(let n of e)n.release&&t.set(n.release,[...t.get(n.release)??[],n]);return t}function x(e,t){let n=[e.project===!1?t:null,e.omni===!1?`omni`:null].filter(Boolean),r=[e.project==null?t:null,e.omni==null?`omni`:null].filter(Boolean);return{state:n.length?`missing`:r.length?`unknown`:`recorded`,label:n.length?`Git: unpublished source`:r.length?`Git: unverified`:`Git: publication recorded`,detail:n.length?`This release records unpublished source for ${n.join(` and `)}. Source publication is separate from where applications are deployed or running.`:r.length?`Git publication could not be verified for ${r.join(` and `)} when this release was built. This does not establish that the source is unpublished.`:`This release records both source commits as published at build time. This saved observation does not check current availability or identify running deployments.`}}function ae(e,t,n){if(!n.known)return n;let r=t.runtimeScope??{project:e,stack:t.name},i=n.deployments.filter(n=>n.project===e&&n.stack===t.name||n.project===r.project&&n.stack===r.stack);if(i.length===0)return{known:!0,last:null};if(i.some(e=>!Number.isFinite(Date.parse(e.at))))return{known:!1,why:`Deployment history contains an invalid timestamp`};let a=Math.max(...i.map(e=>Date.parse(e.at))),o=i.filter(e=>Date.parse(e.at)===a);return new Set(o.map(e=>JSON.stringify([e.release,e.releaseUnnamed,e.projectCommit,e.omniCommit]))).size>1?{known:!1,why:`Conflicting deployment records have the same timestamp`}:{known:!0,last:o[0]}}function S(e){let t=[],n=new Map,r=new Map,i=(e,i,a=!0)=>{if(a&&e.status===`stopped`)return;let o={app:e.name,node:i,pid:e.pid??null,...typeof e.generation==`string`&&{generation:e.generation}};if(!a||e.status===`unknown`){t.push({...o,state:`unavailable`,reason:`Application inventory unavailable; launch identity is unknown`});return}let s=e.release,c=e.generation!==void 0,l=typeof e.generation==`string`&&e.generation.length>0&&s?.state===`confirmed`&&e.generation===s.launchId,u=Number.isSafeInteger(e.pid)&&e.pid>0,d=c?l&&(e.pid==null||u):u,f=s?.state===`confirmed`?s.consumer:void 0,p=f===void 0||f&&typeof f==`object`&&!Array.isArray(f)&&Object.keys(f).sort().join(`,`)===`app,manifestSha256,releaseId`&&typeof f.releaseId==`string`&&/^[A-Za-z0-9][A-Za-z0-9._-]{0,255}$/.test(f.releaseId)&&!f.releaseId.includes(`..`)&&/^[a-f0-9]{64}$/.test(f.manifestSha256)&&f.app===e.name.split(`/`).at(-1);if(s?.state===`confirmed`&&e.status===`online`&&d&&s.basis===`verified-launch`&&typeof s.releaseId==`string`&&s.releaseId.length>0&&/^[a-f0-9]{64}$/.test(s.manifestSha256)&&/^[a-f0-9]{64}$/.test(s.artifactSha256)&&typeof s.launchId==`string`&&s.launchId.length>0&&Number.isFinite(Date.parse(s.observedAt))&&p){t.push({...o,state:`confirmed`,releaseId:s.releaseId,observedAt:s.observedAt,launchId:s.launchId,...f&&{consumer:{...f}}});let e=f??s;n.set(`${e.releaseId}:${e.manifestSha256}`,{releaseId:e.releaseId,manifestSha256:e.manifestSha256});let i=r.get(s.releaseId)??new Set;i.add(s.manifestSha256),r.set(s.releaseId,i)}else s?.state===`modified`?t.push({...o,state:`modified`,...s.releaseId&&{releaseId:s.releaseId},reason:s.reason}):t.push({...o,state:`unreported`,reason:e.status===`online`?s?.state===`confirmed`&&c&&!l?`Application generation is invalid or differs from its launch receipt; request a fresh owner observation`:s?.state===`confirmed`&&!d?`Application is online but its process identity is unavailable; the launch receipt cannot be bound to this instance`:p?s?.state===`unreported`?s.reason:s?`Runtime launch evidence is incomplete or invalid`:`Runtime does not report a verified launch receipt`:`Runtime launch consumer does not match this application or has invalid identity`:`Application is ${e.status}; no active launch is confirmed`})};if(e.type!==`local`&&e.placements?.length)for(let t of e.placements){for(let e of t.apps)i(e.process??{name:e.name,status:t.appsObserved?`stopped`:`unknown`},t.nodeKey,t.appsObserved);!t.appsObserved&&t.apps.length===0&&i({name:`inventory`,status:`unknown`},t.nodeKey,!1)}else{for(let t of e.apps)i(t,null);if(e.type!==`local`)for(let t of e.nodes.filter(e=>!e.connected))i({name:`inventory`,status:`unknown`},`${t.host}:${t.port}`,!1)}let a={verified:t.filter(e=>e.state===`confirmed`).length,total:t.length,releases:[...n.values()],observations:t},o=new Set(a.releases.map(e=>e.releaseId)).size!==n.size||[...r.values()].some(e=>e.size>1);return{runningRelease:t.length===0&&e.status===`stopped`?`not-running`:o||t.some(e=>e.state===`modified`)?`modified`:t.length===0||t.some(e=>e.state!==`confirmed`)?`unreported`:n.size>1?`mixed`:`confirmed`,releaseEvidence:a}}function oe(e){switch(e.runningRelease){case`not-running`:return`No applications running`;case`confirmed`:return`Launch release verified`;case`mixed`:return`Different releases are running`;case`modified`:return`Runtime differs from its release evidence`;default:return`Current release not reported`}}async function se(e,t){let[n,r]=await Promise.allSettled([t.stacks(),t.deployments()]),i=r.status===`fulfilled`?r.value:{known:!1,why:`Deployment history could not be read`},a=n.status===`fulfilled`?n.value.flatMap(e=>e.runtimeScope?[e.runtimeScope]:[]):[],o=i.known?{known:!0,deployments:i.deployments.filter(t=>t.project===e||a.some(e=>t.project===e.project&&t.stack===e.stack))}:i;return{project:e,observedAt:new Date().toISOString(),history:o,inventory:n.status===`fulfilled`?{known:!0}:{known:!1,why:`Stack inventory could not be read; execution state is unknown`},stacks:n.status===`fulfilled`?n.value.map(t=>({project:e,stack:t.name,type:t.type,status:t.status,apps:{online:t.apps.filter(e=>e.status===`online`).length,total:t.apps.length,unknown:t.apps.filter(e=>e.status===`unknown`).length},nodes:t.nodes.map(({host:e,port:t,label:n,connected:r})=>({host:e,port:t,label:n,connected:r,endpoint:`${e.includes(`:`)&&!e.startsWith(`[`)?`[${e}]`:e}:${t}`})),history:ae(e,t,o),...S(t)})):[]}}var C;function w(){return(w=t((()=>{C=`the daemon cannot read the deployment audit history; current execution is a separate observation`})))()}function T(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:E(e)&&E(t)?D(e)&&D(t)?O(e,t):k(e,t):O({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}var E,D,O,k;function A(){return(A=t((()=>{E=e=>Symbol.iterator in e,D=e=>`entries`in e,O=(e,t)=>{let n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(let[e,t]of n)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0},k=(e,t)=>{let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(!Object.is(i.value,a.value))return!1;i=n.next(),a=r.next()}return!!i.done&&!!a.done}})))()}function j(e){let t=M.useRef(void 0);return n=>{let r=e(n);return T(t.current,r)?t.current:t.current=r}}var M;function N(){return(N=t((()=>{M=e(n(),1),A()})))()}function P(e){return{runningStacks:e.filter(e=>e.status===`running`).length,totalStacks:e.length,unknownStacks:e.filter(e=>e.status===`unknown`).length}}function F(e){return e.flatMap(e=>e.apps.map(t=>({...t,stack:e.name,stackType:e.type})))}function I(){return(I=t((()=>{})))()}function L(e,t,n){if(!t)return[];let r=e?.configurations??[];if(n){let e=new Set;for(let t of r)for(let[r,i]of Object.entries(t.stacks))i===n&&e.add(`${t.runtimeProject}/${r}/`);return e.add(`${t}/${n}/`),[...e]}return[...new Set([t,...r.map(e=>e.runtimeProject)])].map(e=>`${e}/`)}function R(e,t){let[n,r]=t.split(`/`);return!n||!r||t.split(`/`).length<3?null:e?.configurations?.find(e=>e.runtimeProject===n)?.stacks[r]??r}function z(e,t,n){let r=e.find(e=>e.name===t||e.configurations?.some(e=>e.runtimeProject===t));if(!r)return null;let i=r.configurations?.find(e=>e.runtimeProject===t),a=Object.values(i?.stacks??{});return{project:r.name,stack:r.name===t?n:n?i?.stacks[n]??null:a.length===1?a[0]:null}}function B(){return(B=t((()=>{})))()}function V(e,t){e?d(K,e):f(K),t?d(q,t):f(q)}function H(){let e=p(K);return{project:e,stack:e?p(q):null,routes:h(J,{})}}function U(e){m(J,e)}function W(e,t,n,r){let i=e[t];return i?{...e,[t]:i.map(e=>e.name===n?{...e,status:r}:e)}:e}function G(){return X(j(e=>(e.activeProject?e.stacksByProject[e.activeProject]:void 0)??Q))}var K,q,J,Y,X,Z,Q;function $(){return($=t((()=>{s(),w(),l(),N(),a(),K=`omnitron_active_project`,q=`omnitron_active_stack`,J=`omnitron_workspace_routes`,Y=`__omnitron__`,X=u((e,t)=>{let n=H(),a=new Map,s=null,l=null,u=0,d=0,f=(t,n)=>e(e=>{let r={...e.stackNotices};return n?r[t]=n:delete r[t],{stackNotices:r}}),p=async(n,r)=>{try{await a.get(r),await t().fetchStacks(r)}finally{e(e=>{let t={...e.pendingOps};return delete t[n],{pendingOps:t}})}};return{projects:[],stacksByProject:{},stackReadErrors:{},stackNotices:{},clearStackNotice:e=>f(e),stackRuntimes:{},pendingOps:{},activeProject:n.project,activeStack:n.stack,workspaceRoutes:n.routes,loading:!1,error:null,fetchProjects:async n=>{if(!l)return;let r=u;try{e({loading:!0,error:null});let i=await o.listProjects();if(r!==u)return;e(e=>({projects:i.map(t=>e.stacksByProject[t.name]?{...t,...P(e.stacksByProject[t.name])}:t),loading:!1}));let a=t().activeProject;if(a){let r=z(i,a,t().activeStack);if(r){let i=t().activeStack;if(r.project!==a){let o=e=>i&&r.stack&&e===`/stacks/${i}`?`/stacks/${r.stack}`:e,s={...t().workspaceRoutes};if(s[a]&&!s[r.project]&&(s[r.project]=o(s[a])),e({activeProject:r.project,activeStack:r.stack,workspaceRoutes:s}),V(r.project,r.stack),U(s),t().fetchStacks(r.project),n&&o(n)!==n)return o(n)}else t().fetchStacks(a)}else e({activeProject:null,activeStack:null}),V(null,null)}else if(i.length===1){let n=i[0].name;e({activeProject:n}),V(n,null),t().fetchStacks(n)}}catch(t){r===u&&e({error:t.message,loading:!1})}},setInventoryReaders:(t,n)=>{l!==t&&(l=t,u++,e({projects:[],loading:!1,error:null})),s!==n&&(s=n,d++,a.clear(),e({stacksByProject:{},stackReadErrors:{}}))},fetchStacks:async n=>{if(!s)return null;let r=d,i=a.get(n);if(i)return i;let c=(async()=>{try{let i=await o.listStacks({project:n});return r===d?(e(e=>({stacksByProject:{...e.stacksByProject,[n]:i},stackReadErrors:{...e.stackReadErrors,[n]:null},projects:e.projects.map(e=>e.name===n?{...e,...P(i)}:e)})),t().activeProject===n&&t().activeStack&&!i.some(e=>e.name===t().activeStack)&&(e({activeStack:null}),V(n,null)),i):null}catch(t){return r===d&&e(e=>({stackReadErrors:{...e.stackReadErrors,[n]:t.message}})),null}})();a.set(n,c);try{return await c}finally{a.get(n)===c&&a.delete(n)}},fetchStackStatus:async(t,n)=>{try{let r=await o.getStackStatus({project:t,stack:n});return e(e=>({stackRuntimes:{...e.stackRuntimes,[`${t}/${n}`]:r}})),r}catch(t){return e({error:t.message}),null}},selectProject:(n,r)=>{let i=t(),a={...i.workspaceRoutes};if(r){let e=i.activeProject??Y;a[e]=r}let o=a[n]??`/`;return e({activeProject:n,activeStack:null,workspaceRoutes:a}),V(n,null),U(a),t().fetchStacks(n),o},deselectProject:n=>{let r=t(),i={...r.workspaceRoutes};n&&r.activeProject&&(i[r.activeProject]=n);let a=i[Y]??`/`;return e({activeProject:null,activeStack:null,workspaceRoutes:i}),V(null,null),U(i),a},saveCurrentRoute:n=>{let r=t(),i=r.activeProject??Y,a={...r.workspaceRoutes,[i]:n};e({workspaceRoutes:a}),U(a)},selectStack:n=>{let{activeProject:r,stacksByProject:i}=t();(!n||r&&i[r]?.some(e=>e.name===n))&&(e({activeStack:n}),V(r,n))},addProject:async(n,r)=>{try{e({loading:!0,error:null}),await o.addProject({name:n,path:r}),await t().fetchProjects()}catch(t){throw e({error:t.message,loading:!1}),t}},updateProject:async(n,r)=>{try{e({loading:!0,error:null});let i=await o.updateProject({name:n,...r});i.name!==n&&t().activeProject===n&&(e({activeProject:i.name,activeStack:null}),V(i.name,null)),await t().fetchProjects()}catch(t){throw e({error:t.message,loading:!1}),t}},removeProject:async n=>{try{e({loading:!0,error:null}),await o.removeProject({name:n}),t().activeProject===n&&(e({activeProject:null,activeStack:null}),V(null,null)),await t().fetchProjects()}catch(t){throw e({error:t.message,loading:!1}),t}},startStack:async(n,a,o)=>{let s=`${n}/${a}`;if(t().pendingOps[s])return{state:`busy`,message:`An operation is already pending for ${s}.`};f(s),e(e=>({pendingOps:{...e.pendingOps,[s]:`starting`},stacksByProject:W(e.stacksByProject,n,a,`starting`)}));try{let{outcome:e,issues:t,online:r,total:c}=ee(await i(`startStack`,{project:n,stack:a,...o?.release?{release:o.release}:{},...o?.workingTree?{workingTree:!0}:{},...o?.allowDirty?{allowDirty:!0}:{}}));if(e===`confirmed`)return{state:e};let l=`${s}: ${r}/${c} apps online. ${t.join(`; `)}.`;return f(s,l),{state:e,message:l}}catch(e){let t=r(e)||c(e),n=t?`No start acknowledgement for ${s}. Inspect the stack and deployment history before retrying.`:e instanceof Error?e.message:String(e);return f(s,n),{state:t?`unconfirmed`:`failed`,message:n}}finally{await p(s,n)}},resumeInstalledStack:async(n,a)=>{let o=`${n}/${a}`;if(!t().pendingOps[o]){f(o),e(e=>({pendingOps:{...e.pendingOps,[o]:`resuming`}}));try{let e=await i(`resumeInstalledStack`,{project:n,stack:a});if(e.outcome!==`running`){let t=e.nodes.filter(e=>e.outcome!==`running`).map(e=>[e.node,e.outcome,e.reason].filter(Boolean).join(` · `));f(o,[`Resume ${e.outcome}`,...t,e.operationId].join(` · `))}}catch(e){f(o,r(e)||c(e)?`Resume acknowledgement unavailable. Check the stack and each recipient before another recovery.`:e instanceof Error?e.message:String(e))}finally{await p(o,n)}}},stopStack:async(n,a,o,s=!1)=>{let l=`${n}/${a}`;if(!t().pendingOps[l]){f(l),e(e=>({pendingOps:{...e.pendingOps,[l]:`stopping`},stacksByProject:W(e.stacksByProject,n,a,`stopping`)}));try{let e=await i(`stopStack`,{project:n,stack:a,review:o,...s&&{keepInfrastructure:!0}});if(e.status!==`stopped`||e.stopOperation?.phase!==`stopped`)throw Error(`Daemon did not confirm the complete stack stop`);if(s&&e.stopOperation.keepInfrastructure!==!0)throw Error(`Daemon did not confirm infrastructure preservation. Inspect the stop operation before retrying.`)}catch(e){f(l,r(e)||c(e)?`Stop acknowledgement has not arrived. Check the stack operation before retrying; applications may still be running.`:e.message)}finally{await p(l,n)}}},createStack:async(n,r)=>{try{e({error:null});let i=await o.createStack({project:n,...r});return await t().fetchStacks(n),i}catch(t){throw e({error:t.message}),t}},deleteStack:async(e,n)=>{try{f(`${e}/${n}`),await o.deleteStack({project:e,stack:n}),await t().fetchStacks(e)}catch(t){throw f(`${e}/${n}`,t.message),t}},getStackPendingOp:(e,n)=>t().pendingOps[`${e}/${n}`]??null,clearError:()=>e({error:null})}}),Z=()=>X(e=>e.activeProject),Q=[]})))()}export{ie as S,se as _,B as a,re as b,I as c,te as d,b as f,y as g,ne as h,X as i,F as l,w as m,Z as n,L as o,_ as p,G as r,R as s,$ as t,P as u,g as v,oe as x,x as y};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{t}from"./react-BN8qLIAi.js";import{Vt as n,Yt as r}from"./mui-BTN91yBK.js";import{H as i,Q as a,V as o,Z as s}from"./mui-BXSXx9c9.js";import{B as c,F as l,I as u,z as d}from"./mui-Cd711nOk.js";import{E as f,T as p}from"./mui-AnEgAVjz.js";import{_ as m,v as h}from"./mui-BwsIrivo.js";import{g,m as _,y as v}from"./project.store--G5pIF-J.js";function y(e){return e==null?`—`:e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:e<1073741824?`${(e/1024/1024).toFixed(1)} MB`:`${(e/1024/1024/1024).toFixed(2)} GB`}function b(e){let t=Math.max(0,Math.round(e/1e3));if(t<60)return`${t} s`;let n=Math.floor(t/60);return n<60?`${n} m ${String(t%60).padStart(2,`0`)} s`:`${Math.floor(n/60)} h ${String(n%60).padStart(2,`0`)} m`}function x(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{day:`2-digit`,month:`short`,hour:`2-digit`,minute:`2-digit`})}function S(e){if(e.length===0)return`No gates recorded — a stack that requires any will refuse this release.`;let t=e.filter(e=>e.status!==`passed`);return t.length===0?`All ${e.length} gates passed.`:`${t.length} of ${e.length} gates did not pass: ${t.map(e=>`${e.name} ${A[e.status].label}`).join(`, `)}.`}function C(e){return e!=null&&e.loadAtGateEnd[1]>e.cpus}function w(e){let t=e=>e.map(e=>e.toFixed(1)).join(` / `);return`${t(e.loadAtGateStart)} → ${t(e.loadAtGateEnd)} on ${e.cpus} cores`}function T({gates:e,size:t=10,columns:n}){if(e.length===0)return(0,k.jsx)(d,{variant:`caption`,sx:{color:`text.disabled`},children:`no gates`});let r=Math.max(2,Math.round(t*.35));return(0,k.jsx)(o,{sx:n?{display:`grid`,gridTemplateColumns:`repeat(${n}, ${t}px)`,gap:`${r}px`}:{display:`flex`,flexWrap:`wrap`,gap:`${r}px`},children:e.map((e,n)=>(0,k.jsx)(l,{title:`${e.name} — ${A[e.status].label}${e.durationMs?` (${Math.round(e.durationMs/1e3)} s)`:``}${e.detail?` — ${e.detail}`:``}`,arrow:!0,children:(0,k.jsx)(o,{sx:{width:t,height:t,borderRadius:`2px`,bgcolor:A[e.status].color,...e.status===`not-run`&&{bgcolor:`transparent`,border:e=>`1px solid ${e.palette.text.disabled}`}}})},`${e.name}-${n}`))})}function E({release:e,variant:t=`body2`}){let n=g(e);return(0,k.jsx)(d,{variant:t,sx:{fontWeight:600,color:j[n.tone],fontFamily:`monospace`},children:n.text})}function D({projectCommit:e,omniCommit:t,onRemote:n,project:r}){let i=v(n,r);return(0,k.jsxs)(m,{direction:`row`,useFlexGap:!0,spacing:.75,sx:{alignItems:`center`,flexWrap:`wrap`,minWidth:0},children:[(0,k.jsx)(l,{title:`${r} ${e??`unknown`}`,arrow:!0,children:(0,k.jsx)(d,{variant:`caption`,sx:{fontFamily:`monospace`},children:e?.slice(0,8)??`—`})}),(0,k.jsx)(d,{variant:`caption`,sx:{color:`text.disabled`},children:`+`}),(0,k.jsx)(l,{title:`omni ${t??`unknown`}`,arrow:!0,children:(0,k.jsx)(d,{variant:`caption`,sx:{fontFamily:`monospace`},children:t?.slice(0,8)??`—`})}),i.state!==`recorded`&&(0,k.jsx)(l,{title:i.detail,arrow:!0,children:(0,k.jsx)(s,{label:i.label,size:`small`,color:i.state===`missing`?`warning`:`default`,variant:`outlined`})})]})}function O({percent:e,state:t}){return(0,k.jsx)(p,{variant:`determinate`,value:Math.min(100,Math.max(0,e)),color:t===`failed`?`error`:t===`stopped`?`warning`:t===`done`?`success`:`primary`,sx:{height:6,borderRadius:3,bgcolor:e=>n(e.palette.text.primary,.08)}})}var k,A,j,M;function N(){return(N=e((()=>{i(),a(),f(),h(),u(),c(),r(),_(),k=t(),A={passed:{color:`success.main`,label:`passed`},failed:{color:`error.main`,label:`failed`},"timed-out":{color:`warning.main`,label:`timed out`},killed:{color:`warning.dark`,label:`killed`},"not-run":{color:`text.disabled`,label:`did not run`}},j={passed:`success.main`,failed:`error.main`,unfinished:`warning.main`,none:`text.disabled`},M={running:{label:`Building`,color:`info`},done:{label:`Built`,color:`success`},failed:{label:`Failed`,color:`error`},stopped:{label:`Stopped`,color:`warning`}}})))()}export{E as a,b as c,w as d,C as f,A as i,S as l,O as n,T as o,x as p,D as r,y as s,M as t,N as u};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{t}from"./react-BN8qLIAi.js";import{P as n,z as r}from"./client-DFnuv2z3.js";import{Vt as i,Yt as a}from"./mui-BTN91yBK.js";import{D as o,F as s,H as c,I as l,M as u,O as d,Q as f,V as p,Z as m,i as h,j as g,r as _}from"./mui-BXSXx9c9.js";import{B as v,z as y}from"./mui-Cd711nOk.js";import{_ as b,v as x}from"./mui-BwsIrivo.js";import{n as S,s as C}from"./access-48hkC2-P.js";import{G as w,z as T}from"./icons-OboZgWSt.js";import{c as E,l as D,n as O,o as k,t as A,u as j}from"./release-bits-B2a_wbft.js";function M({record:e,onStop:t,onDeploy:r,compact:a}){let c=A[e.state]??{label:e.state,color:`info`},l=e.state===`running`,u=e.history.slice(-60),d=e.request;return(0,N.jsx)(g,{variant:`outlined`,sx:{borderColor:l?`primary.main`:void 0},children:(0,N.jsxs)(o,{sx:{pb:2},children:[(0,N.jsxs)(b,{direction:`row`,spacing:1.5,sx:{alignItems:`center`,flexWrap:`wrap`,mb:1},children:[(0,N.jsx)(m,{label:c.label,size:`small`,color:c.color,sx:{fontWeight:600}}),(0,N.jsx)(y,{variant:`subtitle2`,children:d.project}),e.releaseId&&(0,N.jsx)(y,{component:n,to:`/releases/${e.releaseId}`,variant:`caption`,sx:{fontFamily:`monospace`,color:`text.secondary`,textDecoration:`none`,"&:hover":{textDecoration:`underline`}},children:e.releaseId}),(0,N.jsx)(p,{sx:{flex:1}}),(0,N.jsxs)(y,{variant:`caption`,sx:{color:`text.secondary`},children:[E(e.durationMs),e.requestedBy?` · ${e.requestedBy}`:``]}),l&&t&&(0,N.jsx)(S,{permission:`OmnitronRelease.stopBuild`,children:(0,N.jsx)(s,{size:`small`,color:`warning`,startIcon:(0,N.jsx)(T,{}),onClick:()=>t(e.buildId),children:`Stop`})}),e.state===`done`&&e.releaseId&&r&&(0,N.jsx)(S,{permission:`OmnitronProject.startStack`,children:(0,N.jsx)(s,{size:`small`,variant:`contained`,onClick:()=>r(e.releaseId),children:`Deploy…`})})]}),(0,N.jsx)(O,{percent:e.percent,state:e.state}),(0,N.jsxs)(b,{direction:`row`,spacing:1,sx:{alignItems:`baseline`,flexWrap:`wrap`,mt:1},children:[(0,N.jsx)(y,{variant:`body2`,sx:{fontWeight:500,minWidth:0,overflowWrap:`anywhere`},children:e.phase}),(0,N.jsxs)(y,{variant:`caption`,sx:{color:`text.secondary`},children:[e.percent,`%`]})]}),(0,N.jsxs)(b,{direction:`row`,spacing:.75,sx:{mt:.5,flexWrap:`wrap`},children:[d.forStack&&(0,N.jsx)(m,{size:`small`,variant:`outlined`,label:`statics: ${d.forStack}`,sx:{height:20,fontSize:11}}),d.projectCommit&&(0,N.jsx)(m,{size:`small`,variant:`outlined`,label:`project ${d.projectCommit}`,sx:{height:20,fontSize:11}}),d.omniCommit&&(0,N.jsx)(m,{size:`small`,variant:`outlined`,label:`omni ${d.omniCommit}`,sx:{height:20,fontSize:11}}),d.skipGates&&(0,N.jsx)(m,{size:`small`,color:`warning`,variant:`outlined`,label:`gates skipped`,sx:{height:20,fontSize:11}}),(d.envKeys??[]).map(e=>(0,N.jsx)(m,{size:`small`,variant:`outlined`,label:e,sx:{height:20,fontSize:11,fontFamily:`monospace`}},e))]}),d.frameworkSource&&(0,N.jsxs)(y,{variant:`caption`,component:`div`,sx:{mt:.75,color:`text.secondary`,overflowWrap:`anywhere`},children:[`SDK source: `,d.frameworkSource.repository,d.frameworkSource.ref?` · ${d.frameworkSource.ref}`:``]}),e.gates.length>0&&(0,N.jsxs)(p,{sx:{mt:1.5},children:[(0,N.jsx)(y,{variant:`caption`,sx:{color:`text.secondary`},children:D(e.gates)}),(0,N.jsx)(p,{sx:{mt:.5},children:(0,N.jsx)(k,{gates:e.gates})})]}),e.error&&(0,N.jsx)(p,{sx:{mt:1.5,p:1.25,borderRadius:1,bgcolor:e=>i(e.palette.error.main,.08)},children:(0,N.jsx)(y,{variant:`caption`,sx:{whiteSpace:`pre-wrap`,overflowWrap:`anywhere`,fontFamily:`monospace`,color:`error.main`},children:e.error})}),!a&&u.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(_,{sx:{my:1.5}}),(0,N.jsx)(p,{sx:{maxHeight:220,overflowY:`auto`,fontFamily:`monospace`,fontSize:12,lineHeight:1.7},children:u.map((e,t)=>(0,N.jsxs)(p,{sx:{display:`flex`,gap:1.5},children:[(0,N.jsx)(y,{component:`span`,variant:`caption`,sx:{color:`text.disabled`,fontFamily:`monospace`,flexShrink:0},children:e.at.slice(11,19)}),(0,N.jsxs)(y,{component:`span`,variant:`caption`,sx:{color:`text.disabled`,fontFamily:`monospace`,width:34,flexShrink:0,textAlign:`right`},children:[e.percent,`%`]}),(0,N.jsx)(y,{component:`span`,variant:`caption`,sx:{fontFamily:`monospace`,minWidth:0,overflowWrap:`anywhere`},children:e.phase})]},`${e.at}-${t}`))})]})]})})}var N;function P(){return(P=e((()=>{C(),c(),l(),u(),d(),f(),h(),x(),v(),a(),r(),w(),j(),N=t()})))()}export{P as n,M as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{i as t,t as n}from"./react-BN8qLIAi.js";import{B as r,P as i,h as a,l as o,z as s}from"./client-DFnuv2z3.js";import{F as c,H as l,I as u,Q as d,V as f,Z as p}from"./mui-BXSXx9c9.js";import{B as m,F as h,I as g,z as _}from"./mui-Cd711nOk.js";import{it as v,rt as y}from"./mui-AnEgAVjz.js";import{_ as b,v as x}from"./mui-BwsIrivo.js";import{r as S,t as C}from"./alert-uBG6r9NW.js";import{n as w,t as T}from"./use-polled-resource-B22hhr5L.js";import{_ as E,i as D,m as O,t as k,x as A}from"./project.store--G5pIF-J.js";import{G as j,M}from"./icons-OboZgWSt.js";import{n as N,t as P}from"./operation-status-Bm1x1wTz.js";import{n as F,t as I}from"./release-wire-f2VuBoBF.js";import{p as L,u as R}from"./release-bits-B2a_wbft.js";function z({project:e,stack:t}){let[n,r]=(0,B.useState)(null),[a,s]=(0,B.useState)(!1),[l,u]=(0,B.useState)(!1),d=async()=>{s(!0),u(!1);try{r(await o.invoke(`daemon`,`OmnitronProject`,`inspectInstalledArtifacts`,[{project:e,stack:t}],{timeout:9e4}))}catch{u(!0)}finally{s(!1)}};return(0,V.jsxs)(f,{sx:{minWidth:0,width:1},children:[(0,V.jsx)(c,{size:`small`,variant:`text`,disabled:a,onClick:()=>void d(),sx:{px:0,justifyContent:`flex-start`},children:n?`Inspect installed files again`:`Inspect installed files`}),(0,V.jsx)(P,{active:a,label:`Comparing installed files and retained release archives…`,detail:`Read-only inspection; applications keep running.`}),l&&(0,V.jsx)(C,{severity:`warning`,children:`Inspection is unavailable. The backend may need an update; any results below are the previous observation.`}),n&&(0,V.jsxs)(b,{spacing:.75,children:[(0,V.jsxs)(_,{variant:`caption`,color:`text.secondary`,children:[`Installed files · `,L(n.observedAt)]}),!n.catalogComplete&&(0,V.jsxs)(C,{severity:`warning`,children:[`Release catalog is incomplete. `,n.catalogReasons.join(` `)]}),n.nodes.map((e,t)=>(0,V.jsxs)(_,{variant:`caption`,color:`warning.main`,children:[e.node,`: `,e.error]},`${e.node}:${t}`)),n.apps.map((e,t)=>(0,V.jsxs)(f,{component:`details`,sx:{minWidth:0,overflowWrap:`anywhere`},children:[(0,V.jsxs)(_,{component:`summary`,variant:`caption`,sx:{cursor:`pointer`,color:e.candidates.some(e=>e.state===`modified`)||e.state!==`observed`?`warning.main`:`text.secondary`},children:[e.node,` / `,e.app.split(`/`).at(-1),` · `,e.state===`observed`?e.candidates.length>1?`Ambiguous base (${e.candidates.length} matches)`:e.candidates.length?e.candidates[0].state===`modified`?`Installed files modified`:e.candidates[0].state===`entry-matches`?`Entry matches (partial check)`:`Comparison incomplete`:`No catalog match`:e.state.replaceAll(`-`,` `)]}),(0,V.jsxs)(b,{spacing:.5,sx:{py:.5},children:[(0,V.jsxs)(_,{variant:`caption`,color:`text.secondary`,children:[`Observed PID `,e.pid??`none`,` · `,L(e.observedAt)]}),e.reasons.map(e=>(0,V.jsx)(_,{variant:`caption`,color:`warning.main`,children:e},e)),e.candidates.map(e=>(0,V.jsxs)(f,{children:[(0,V.jsxs)(_,{variant:`caption`,component:`div`,children:[`Retained archive matches `,(0,V.jsx)(_,{component:i,variant:`caption`,to:`/releases/${encodeURIComponent(e.releaseId)}`,sx:{color:`primary.main`,textDecoration:`none`,fontFamily:`monospace`},children:e.releaseId})]}),e.reasons.map(e=>(0,V.jsx)(_,{variant:`caption`,component:`div`,color:`warning.main`,children:e},e))]},e.releaseId))]})]},`${e.node}:${e.app}:${t}`)),n.apps.length===0&&n.nodes.length===0&&(0,V.jsx)(_,{variant:`caption`,color:`text.secondary`,children:`No application installation handles were reported.`}),n.limitations.map(e=>(0,V.jsx)(_,{variant:`caption`,color:`text.secondary`,children:e},e))]})]})}var B,V;function H(){return(H=e((()=>{B=t(),s(),l(),u(),x(),m(),S(),a(),N(),R(),V=n()})))()}function U({project:e,stack:t}){let n=r(),{data:a,loading:o,error:s,refresh:c}=w(()=>E(e,{stacks:async()=>{let t=await D.getState().fetchStacks(e);if(!t)throw Error(`Stack inventory unavailable`);return t},deployments:()=>F.deployments()}),{intervalMs:2e4,resourceKey:e}),l=a?.stacks.filter(e=>!t||e.stack===t)??[];return(0,W.jsxs)(f,{component:`section`,"aria-label":`Deployment state`,sx:{minWidth:0},children:[(0,W.jsxs)(b,{direction:`row`,spacing:1,sx:{alignItems:`center`,mb:.5},children:[(0,W.jsx)(_,{variant:`subtitle2`,sx:{flex:1},children:`Deployment state`}),a&&(0,W.jsxs)(_,{variant:`caption`,color:`text.secondary`,children:[`Observed `,L(a.observedAt)]}),(0,W.jsx)(h,{title:`Refresh deployment state`,children:(0,W.jsx)(`span`,{children:(0,W.jsx)(y,{size:`small`,"aria-label":`Refresh deployment state`,disabled:o,onClick:()=>void c(),children:(0,W.jsx)(M,{})})})})]}),(0,W.jsx)(P,{active:o&&!a,label:`Reading stack state and deployment history…`}),s&&(0,W.jsx)(C,{severity:`warning`,children:`Cannot refresh deployment state. Any values below are the last observation.`}),a&&!a.inventory.known&&(0,W.jsx)(C,{severity:`warning`,children:a.inventory.why}),a?.inventory.known&&l.length===0&&(0,W.jsx)(_,{variant:`body2`,color:`text.secondary`,children:t?`This stack is no longer in the project inventory.`:`No stacks configured for this project.`}),l.map(t=>(0,W.jsxs)(f,{sx:{display:`grid`,gridTemplateColumns:{xs:`minmax(0, 1fr)`,md:`minmax(140px, .7fr) minmax(180px, 1fr) minmax(0, 1.3fr)`},gap:{xs:1,md:2},py:1.5,borderBottom:1,borderColor:`divider`,overflowWrap:`anywhere`},children:[(0,W.jsxs)(b,{spacing:.5,sx:{minWidth:0},children:[(0,W.jsx)(_,{component:i,to:`/stacks/${encodeURIComponent(t.stack)}`,variant:`body2`,onClick:t=>{if(t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let r=D.getState();r.activeProject!==e&&r.selectProject(e,n.pathname)},sx:{color:`primary.main`,textDecoration:`none`,fontWeight:600},children:t.stack}),(0,W.jsx)(_,{variant:`caption`,color:`text.secondary`,children:t.type===`local`?`Controller node`:t.type===`cluster`?`Distributed stack`:`Remote stack`}),t.type!==`local`&&t.nodes.map(e=>(0,W.jsxs)(_,{variant:`caption`,color:e.connected&&!s?`text.secondary`:`warning.main`,children:[e.label?`${e.label} · `:``,e.endpoint,` · `,s?`last observed`:e.connected?`inventory observed`:`inventory unavailable`]},`${e.host}:${e.port}`))]}),(0,W.jsxs)(b,{spacing:.5,sx:{minWidth:0,alignItems:`flex-start`},children:[(0,W.jsxs)(b,{direction:`row`,useFlexGap:!0,spacing:1,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,W.jsx)(p,{size:`small`,variant:`outlined`,label:t.status,color:!s&&t.status===`running`?`success`:t.status===`stopped`?`default`:`warning`}),(0,W.jsxs)(_,{variant:`body2`,children:[`Apps `,t.apps.online,`/`,t.apps.total,t.apps.unknown?` · ${t.apps.unknown} unknown`:``]})]}),(0,W.jsx)(_,{variant:`caption`,color:t.runningRelease===`confirmed`||t.runningRelease===`not-running`?`text.secondary`:`warning.main`,children:A(t)}),t.releaseEvidence.releases.map(e=>(0,W.jsx)(h,{describeChild:!0,title:`Manifest SHA-256: ${e.manifestSha256}`,children:(0,W.jsx)(_,{component:i,to:`/releases/${encodeURIComponent(e.releaseId)}`,variant:`body2`,sx:{color:`primary.main`,textDecoration:`none`,fontFamily:`monospace`},children:e.releaseId})},`${e.releaseId}:${e.manifestSha256}`)),t.releaseEvidence.total>0&&(0,W.jsxs)(f,{component:`details`,sx:{minWidth:0,width:1},children:[(0,W.jsxs)(_,{component:`summary`,variant:`caption`,sx:{cursor:`pointer`,color:`text.secondary`},children:[t.releaseEvidence.verified,`/`,t.releaseEvidence.total,` launch identities verified`]}),(0,W.jsx)(b,{spacing:.75,sx:{pt:.75},children:t.releaseEvidence.observations.map((e,t)=>(0,W.jsxs)(f,{children:[(0,W.jsxs)(_,{variant:`caption`,component:`div`,children:[e.node?`${e.node} / `:``,e.app,` · `,e.state,e.releaseId?` · ${e.releaseId}`:``]}),e.consumer&&e.consumer.releaseId!==e.releaseId&&(0,W.jsxs)(_,{variant:`caption`,color:`text.secondary`,component:`div`,sx:{overflowWrap:`anywhere`},children:[`Producer `,e.releaseId,` · selected consumer `,e.consumer.releaseId]}),e.reason&&(0,W.jsx)(_,{variant:`caption`,color:`warning.main`,component:`div`,children:e.reason}),e.observedAt&&(0,W.jsxs)(_,{variant:`caption`,color:`text.secondary`,component:`div`,children:[`Launch verified `,L(e.observedAt)]})]},`${e.node}:${e.app}:${t}`))})]}),(0,W.jsx)(z,{project:e,stack:t.stack},`${e}:${t.stack}`)]}),(0,W.jsxs)(b,{spacing:.5,sx:{minWidth:0},children:[(0,W.jsx)(_,{variant:`caption`,color:`text.secondary`,children:`Last recorded deployment`}),t.history.known?t.history.last?(0,W.jsxs)(W.Fragment,{children:[t.history.last.release?(0,W.jsx)(_,{component:i,to:`/releases/${encodeURIComponent(t.history.last.release)}`,variant:`body2`,sx:{color:`text.primary`,textDecoration:`none`,fontFamily:`monospace`,overflowWrap:`anywhere`},children:t.history.last.release}):(0,W.jsx)(_,{variant:`body2`,children:t.history.last.releaseUnnamed?`Release name not recorded`:`Working tree`}),(0,W.jsxs)(_,{variant:`caption`,color:`text.secondary`,children:[L(t.history.last.at),` · `,t.history.last.source??`source not recorded`]})]}):(0,W.jsx)(_,{variant:`body2`,color:`text.secondary`,children:`No deployment record`}):(0,W.jsx)(_,{variant:`body2`,color:`warning.main`,children:t.history.why})]})]},t.stack)),l.length>0&&(0,W.jsx)(_,{variant:`caption`,color:`text.secondary`,sx:{display:`block`,pt:1},children:`Verified launch receipts identify the admitted release, not continuous in-memory code integrity. Deployment history is a separate record.`})]})}var W;function G(){return(G=e((()=>{s(),l(),d(),v(),x(),g(),m(),S(),O(),j(),T(),I(),k(),N(),R(),H(),W=n()})))()}export{G as n,U as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{S as t,h as n,r}from"./client-DFnuv2z3.js";import{f as i,m as a,v as o}from"./project.store--G5pIF-J.js";function s(e){let t=o(e.id);return{id:e.id,project:e.project??t.project,complete:e.complete??!1,...e.manifestError&&{manifestError:e.manifestError},builtAt:e.builtAt??null,builtBy:e.builtBy??null,builtWith:e.builtWith??null,projectCommit:e.projectCommit??t.projectCommit,omniCommit:e.omniCommit??t.omniCommit,projectRepo:e.projectRepo??null,omniRepo:e.omniRepo??null,onRemote:{project:e.onRemote?.project??null,omni:e.onRemote?.omni??null},gates:e.gates??{total:0,passed:0,failed:0,notRun:0},gateList:e.gateList??[],artifacts:e.artifacts??{count:0,bytes:0,apps:[],failed:[]},statics:e.statics??null,bytes:e.bytes??0,keptSource:e.keptSource??!1,machine:e.machine??null,verified:e.verified??[]}}function c(e){return{...e,history:e.history??[],gates:e.gates??[],request:e.request??{project:`(unknown)`}}}var l,u;function d(){return(d=e((()=>{a(),n(),l=new Map,u={async list(){let e=await t.list();return{root:e?.root??``,releases:(e?.releases??[]).map(s)}},async get(e){let n=await t.get({id:e});return{...s(n),manifest:n.manifest??null,manifestSha256:n.manifestSha256??null,artifactSources:n.artifactSources??null,logs:n.logs??[],root:n.root??``,attestations:n.attestations??[]}},async builds(){return(await t.builds()??[]).map(c)},async preflight(){let e=await t.preflight();return{...e.frameworkSource===1?{frameworkSource:1}:{},root:e.root,canBuild:e.canBuild,missingTools:e.missingTools??[],path:e.path??[],load:Array.isArray(e.load)&&e.load.length===3?e.load:null,cpus:typeof e.cpus==`number`&&e.cpus>0?e.cpus:null}},async deployments(e=200){let n=l.get(e);if(n)return n;let a=Promise.all([r.available().catch(()=>null),t.deployments({limit:e})]).then(([e,t])=>{let n=(t??[]).map(e=>({...e,releaseUnnamed:e.releaseUnnamed??!1}));return i(e?.available===!0,n)}).finally(()=>{l.get(e)===a&&l.delete(e)});return l.set(e,a),a}}})))()}export{u as n,d as t};
@@ -1,2 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{i as t,t as n}from"./react-BN8qLIAi.js";import{P as r,S as i,h as a,z as o}from"./client-DFnuv2z3.js";import{F as s,H as c,I as l,Q as u,V as d,Z as f,_t as ee,at as p,c as m,ct as h,d as te,f as g,g as _,gt as v,h as ne,ht as y,lt as re,m as ie,ot as b,p as ae,s as x,st as S,ut as oe,vt as C}from"./mui-BXSXx9c9.js";import{B as w,F as T,I as E,a as D,o as O,z as k}from"./mui-Cd711nOk.js";import{U as A,W as j,it as M,l as N,rt as se,u as ce}from"./mui-AnEgAVjz.js";import{_ as P,n as le,t as ue,v as F}from"./mui-BwsIrivo.js";import{r as de,t as I}from"./alert-uBG6r9NW.js";import{c as fe,n as L,s as R}from"./access-48hkC2-P.js";import{n as z,t as B}from"./use-polled-resource-B22hhr5L.js";import{S as V,i as pe,m as H,n as U,t as W}from"./project.store--G5pIF-J.js";import{A as G,G as me,M as he,m as ge,o as _e,p as ve}from"./icons-OboZgWSt.js";import{n as ye,t as be}from"./operation-status-Bm1x1wTz.js";import{n as xe,t as Se}from"./page-breadcrumbs-fR7Jmpp4.js";import{n as Ce,t as we}from"./admin-data-table-BKSDI8sU.js";import{n as K,t as Te}from"./release-wire-f2VuBoBF.js";import{a as Ee,d as De,f as Oe,o as ke,p as Ae,r as je,s as q,u as Me}from"./release-bits-B2a_wbft.js";import{n as Ne,t as Pe}from"./deploy-release-dialog-BOXcD5Wo.js";import{n as Fe,t as Ie}from"./release-build-panel-BQmIdKW9.js";import{n as Le,t as Re}from"./release-deployment-state-DRrEI2pP.js";function ze(e){if(typeof e!=`string`||!e||e.length>4096||e.trim()!==e||/\p{Cc}/u.test(e))return!1;if(/^(?:\/|\.\.?\/|~\/|[A-Za-z]:[\\/])/.test(e))return!0;if(/^[A-Za-z][A-Za-z0-9+.-]*:\/\//.test(e))try{let t=new URL(e);if(![`https:`,`http:`,`ssh:`,`git:`,`git+ssh:`,`git+https:`,`git+http:`,`file:`].includes(t.protocol)||/[?#\\]/.test(e)||t.password)return!1;let n=e.slice(e.indexOf(`://`)+3).split(`/`)[0];return(n.includes(`@`)?n.slice(0,n.lastIndexOf(`@`)):``).includes(`:`)||t.username&&![`ssh:`,`git+ssh:`].includes(t.protocol)?!1:t.protocol===`file:`?!t.username:!!t.hostname}catch{return!1}return e.includes(`://`)||/^(?:https?|ssh|git|file):/i.test(e)||/^[A-Za-z][A-Za-z0-9+.-]*::/.test(e)?!1:e.includes(`/`)&&e.indexOf(`/`)<e.indexOf(`:`)?!0:e.includes(`:`)?/[?#\\]/.test(e)||/^[^/:]+:[^/]*@[^/:]+:/.test(e)?!1:/^(?:[^/@:\s]+@)?(?:\[[0-9A-Fa-f:]+\]|[^/@:\s]+):.+$/.test(e):!0}function Be(e){if(!ze(e))throw new He}var Ve,He;function Ue(){return(Ue=e((()=>{Ve=`Release repository identity is unsafe or invalid; use a credential-free Git remote without query or fragment parameters`,He=class extends Error{constructor(){super(Ve),this.name=`RepositoryIdentityError`}}})))()}function We(e){return typeof e==`string`&&e.length<=1024&&/^refs\/(?:heads|tags)\/.+/.test(e)&&!/[\s~^:?*[\\]|\p{Cc}/u.test(e)&&!e.includes(`..`)&&!e.includes(`@{`)&&!e.endsWith(`.`)&&e.split(`/`).every(e=>e&&!e.startsWith(`.`)&&!e.endsWith(`.lock`))}function Ge(e){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(`Framework source must contain a repository and an optional full Git ref`);let t=e;if(Object.keys(t).some(e=>e!==`repository`&&e!==`ref`))throw Error(`Unknown framework source option`);if(Be(t.repository),t.repository===`(no origin)`)throw Error(`Framework source requires a repository`);if(t.repository.startsWith(`-`))throw Error(`Framework repository cannot start with an option; use ./ for a local path`);if(t.ref!==void 0&&!We(t.ref))throw Error(`Framework ref must be a full refs/heads/ or refs/tags/ name`);return Object.freeze({repository:t.repository,...t.ref===void 0?{}:{ref:t.ref}})}function Ke(){return(Ke=e((()=>{Ue()})))()}function qe(e){let t={},n=[];for(let r of e.split(`
2
- `)){let e=r.trim();if(!e||e.startsWith(`#`))continue;let i=e.indexOf(`=`);if(i<=0){n.push(e);continue}let a=e.slice(0,i).trim();/^[A-Z][A-Z0-9_]*$/.test(a)?t[a]=e.slice(i+1):n.push(e)}return{env:t,bad:n}}function Je({open:e,onClose:t,defaultProject:n,onStarted:r,preflight:a}){let{snapshot:o}=fe(),c=pe(e=>e.projects),l=pe(e=>e.stacksByProject),u=pe(e=>e.fetchStacks),[m,h]=(0,J.useState)(n??``),[g,_]=(0,J.useState)(``),[v,ie]=(0,J.useState)(``),[b,oe]=(0,J.useState)(``),[C,w]=(0,J.useState)(``),[T,E]=(0,J.useState)(``),[O,j]=(0,J.useState)(``),[M,se]=(0,J.useState)(!1),[ce,le]=(0,J.useState)(!1),[F,de]=(0,J.useState)(!1),[I,L]=(0,J.useState)(null),R=(0,J.useMemo)(()=>l[m]??[],[l,m]);(0,J.useEffect)(()=>{e&&(h(n??``),L(null),w(``),E(``),j(``))},[e,n]),(0,J.useEffect)(()=>{e&&m&&!l[m]&&u(m)},[e,m,l,u]),(0,J.useEffect)(()=>{if(!e||g)return;let t=R.find(e=>e.config?.release?.mode===`required`);t&&_(t.name)},[e,R,g]);let{env:z,bad:B}=(0,J.useMemo)(()=>qe(O),[O]),V=a?.frameworkSource===1,H=o?.role===`admin`,U=V&&H,W=Object.keys(z).length>0,G=(0,J.useMemo)(()=>{if(!C.trim()&&!T.trim())return{source:void 0,error:null};try{return{source:Ge({repository:C.trim(),...T.trim()?{ref:T.trim()}:{}}),error:null}}catch(e){return{source:void 0,error:e.message}}},[C,T]);return(0,Y.jsxs)(ne,{open:e,onClose:F?void 0:t,maxWidth:`sm`,fullWidth:!0,children:[(0,Y.jsx)(x,{children:`Build a release`}),(0,Y.jsx)(te,{children:(0,Y.jsxs)(P,{spacing:2.5,sx:{mt:1},children:[(0,Y.jsx)(k,{variant:`body2`,sx:{color:`text.secondary`},children:`The controller builds the selected project commit with its locked framework packages or linked Omnitron revision. Gate results and artifact checksums are saved with the release.`}),a?.load&&a.cpus!==null&&a.load[0]>a.cpus&&(0,Y.jsxs)(p,{severity:`warning`,children:[`This machine is carrying more than its cores right now — load`,` `,(0,Y.jsx)(`strong`,{children:a.load.map(e=>e.toFixed(1)).join(` / `)}),` on `,a.cpus,` cores. The gates time out on a machine like this: tests that pass alone fail on connection deadlines, and a different set each run. A release built now records the machine as much as the code.`]}),(0,Y.jsxs)(D,{select:!0,label:`Project`,value:m,onChange:e=>{h(e.target.value),_(``),w(``),E(``)},size:`small`,fullWidth:!0,disabled:F,children:[c.length===0&&(0,Y.jsx)(N,{disabled:!0,value:``,children:`No projects registered`}),c.map(e=>(0,Y.jsx)(N,{value:e.name,children:e.name},e.name))]}),(0,Y.jsxs)(D,{select:!0,label:`Static bundle for`,value:g,onChange:e=>_(e.target.value),size:`small`,fullWidth:!0,disabled:F,helperText:`A frontend bakes its environment in, so the bundle belongs to one stack. A stack whose gateway serves one refuses a release built without it.`,children:[(0,Y.jsx)(N,{value:``,children:(0,Y.jsx)(`em`,{children:`none — backends only`})}),R.map(e=>(0,Y.jsx)(N,{value:e.name,children:(0,Y.jsxs)(P,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,Y.jsx)(k,{variant:`body2`,children:e.name}),e.config?.release?.mode===`required`&&(0,Y.jsx)(f,{label:`releases only`,size:`small`,color:`info`,variant:`outlined`,sx:{height:18,fontSize:10}})]})},e.name))]}),(0,Y.jsxs)(P,{direction:{xs:`column`,sm:`row`},spacing:1.5,children:[(0,Y.jsx)(D,{label:`Project commit`,placeholder:`HEAD`,value:v,onChange:e=>ie(e.target.value),size:`small`,fullWidth:!0,disabled:F}),(0,Y.jsx)(D,{label:`Framework commit`,placeholder:`From project lockfile or linked checkout`,value:b,onChange:e=>oe(e.target.value),size:`small`,fullWidth:!0,disabled:F})]}),(0,Y.jsxs)(ee,{disableGutters:!0,variant:`outlined`,disabled:F,children:[(0,Y.jsx)(re,{expandIcon:(0,Y.jsx)(_e,{sx:{transform:`rotate(90deg)`}}),"aria-controls":`release-source-options`,id:`release-source-toggle`,children:(0,Y.jsxs)(k,{variant:`body2`,children:[`SDK source`,G.source?` · overridden for this build`:V?` · project defaults`:` · controller defaults`]})}),(0,Y.jsx)(y,{id:`release-source-options`,children:(0,Y.jsxs)(P,{spacing:1.5,children:[(0,Y.jsx)(k,{variant:`caption`,sx:{color:`text.secondary`},children:V?U?`Project settings and package metadata choose the source. An override runs code from another SDK repository and requires administrator access.`:`Builds use project settings and package metadata. Selecting another SDK source requires administrator access.`:`This controller has not reported support for SDK source configuration. Update it to use committed omnitron.framework settings or a build override. Ordinary builds use its existing source selection.`}),(0,Y.jsx)(D,{label:`SDK repository`,value:C,onChange:e=>w(e.target.value),placeholder:`https://git.example.org/platform/omni.git`,size:`small`,fullWidth:!0,disabled:F||!U,helperText:`HTTPS, SSH or a local path on the build controller. Keep credentials in its Git configuration.`}),(0,Y.jsx)(D,{label:`Required source ref (optional)`,value:T,onChange:e=>E(e.target.value),placeholder:`refs/heads/stable or refs/tags/v1.0.0`,size:`small`,fullWidth:!0,disabled:F||!U,helperText:`The exact framework commit must belong to this branch or match this tag.`}),G.error&&(0,Y.jsx)(p,{severity:`error`,children:G.error})]})})]}),(0,Y.jsx)(D,{label:`Environment for the gates`,placeholder:`TEST_DATABASE__PORT=5432`,value:O,onChange:e=>j(e.target.value),size:`small`,fullWidth:!0,multiline:!0,minRows:2,disabled:F||!H,helperText:H?B.length>0?`Not a NAME=value line: ${B.slice(0,2).join(` · `)}`:`One NAME=value per line. The daemon has the system environment, not your shell’s.`:`Environment overrides require administrator access. Ordinary builds use the project and controller environment.`,error:B.length>0}),(0,Y.jsxs)(d,{children:[(0,Y.jsx)(A,{control:(0,Y.jsx)(ue,{checked:M,onChange:e=>se(e.target.checked),size:`small`,disabled:F}),label:(0,Y.jsx)(k,{variant:`body2`,children:`Skip the gates`})}),M&&(0,Y.jsxs)(p,{severity:`warning`,sx:{mt:.5},children:[`Every gate is recorded as `,(0,Y.jsx)(`strong`,{children:`not-run`}),`, and a stack that requires any will refuse the release. For a look at what would be built, never for a deployment.`]}),(0,Y.jsx)(A,{control:(0,Y.jsx)(ue,{checked:ce,onChange:e=>le(e.target.checked),size:`small`,disabled:F}),label:(0,Y.jsx)(k,{variant:`body2`,children:`Keep the clones (about 2 GB)`})})]}),I&&(0,Y.jsx)(p,{severity:`error`,children:(0,Y.jsx)(k,{variant:`body2`,sx:{whiteSpace:`pre-wrap`},children:I})})]})}),(0,Y.jsxs)(ae,{children:[(0,Y.jsx)(s,{onClick:t,size:`small`,disabled:F,children:`Cancel`}),(0,Y.jsx)(s,{variant:`contained`,size:`small`,disabled:!m||F||B.length>0||G.error!==null||!!G.source&&!U||W&&!H,startIcon:F?(0,Y.jsx)(S,{size:14,color:`inherit`}):void 0,onClick:async()=>{if(G.error)L(G.error);else if(G.source&&!U)L(V?`An administrator must select an SDK source override. Build with project defaults or sign in with administrator access.`:`This controller does not support SDK source overrides. Update it before using an override.`);else if(W&&!H)L(`Environment overrides require administrator access. Reopen the dialog to build with project defaults.`);else{de(!0),L(null);try{r(await i.build({project:m,...v.trim()?{projectCommit:v.trim()}:{},...b.trim()?{omniCommit:b.trim()}:{},...G.source?{frameworkSource:G.source}:{},...g?{forStack:g}:{},...M?{skipGates:!0}:{},...ce?{keepSource:!0}:{},...Object.keys(z).length?{env:z}:{}})),t()}catch(e){L(e.message)}finally{de(!1)}}},children:F?`Starting…`:`Build`})]})]})}var J,Y;function Ye(){return(Ye=e((()=>{J=t(),b(),C(),v(),oe(),c(),l(),u(),h(),_(),ie(),g(),m(),j(),ce(),F(),le(),O(),w(),Ke(),a(),W(),me(),R(),Y=n()})))()}function Xe({open:e,onClose:t,onPruned:n}){let[r,a]=(0,X.useState)(5),[o,c]=(0,X.useState)(null),[l,u]=(0,X.useState)(null),f=l!==null,[ee,m]=(0,X.useState)(null),[h,g]=(0,X.useState)(null),_=(0,X.useCallback)(async()=>{u(`measuring`),m(null);try{c(await i.prune({keep:r}))}catch(e){m(e.message),c(null)}finally{u(null)}},[r]);return(0,X.useEffect)(()=>{e&&(g(null),_())},[e,_]),(0,Z.jsxs)(ne,{open:e,onClose:f?void 0:t,maxWidth:`sm`,fullWidth:!0,children:[(0,Z.jsx)(x,{children:`Prune releases`}),(0,Z.jsx)(te,{children:(0,Z.jsxs)(P,{spacing:2.5,sx:{mt:1},children:[(0,Z.jsx)(D,{label:`Keep the newest`,type:`number`,size:`small`,value:r,onChange:e=>a(Math.max(0,Number(e.target.value)||0)),onBlur:()=>void _(),disabled:f,sx:{width:180}}),o?.unknown&&(0,Z.jsxs)(p,{severity:`warning`,children:[`Which of these a stack is running cannot be told — `,o.unknown,`. The daemon will not remove anything until it can; `,(0,Z.jsx)(`code`,{children:`omnitron release prune --yes --allow-unprotected`}),` removes them without knowing.`]}),o&&o.protectedByDeployment.length>0&&(0,Z.jsxs)(k,{variant:`caption`,sx:{color:`text.secondary`},children:[`Kept whatever their age, because a stack runs them: `,o.protectedByDeployment.join(`, `),`.`]}),(0,Z.jsx)(be,{active:f,label:l===`removing`?`Removing reviewed releases`:`Measuring release storage`}),h&&(0,Z.jsxs)(p,{severity:`success`,children:[`Removed `,h.removed.length,` release`,h.removed.length===1?``:`s`,`, `,q(h.freedBytes),` freed;`,` `,h.kept,` kept.`]}),!h&&o&&(o.doomed.length===0?(0,Z.jsxs)(p,{severity:`info`,children:[`Nothing to remove — `,o.kept,` release(s) and all of them are kept.`]}):(0,Z.jsxs)(d,{children:[(0,Z.jsxs)(k,{variant:`body2`,sx:{mb:1},children:[o.doomed.length,` release`,o.doomed.length===1?``:`s`,` would go, freeing `,q(o.freedBytes),`:`]}),(0,Z.jsx)(d,{sx:{maxHeight:220,overflowY:`auto`},children:o.doomed.map(e=>(0,Z.jsxs)(P,{direction:`row`,spacing:1.5,sx:{py:.25},children:[(0,Z.jsx)(k,{variant:`caption`,sx:{fontFamily:`monospace`,flex:1},children:e.id}),(0,Z.jsx)(k,{variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`},children:q(e.bytes)})]},e.id))})]})),ee&&(0,Z.jsx)(p,{severity:`error`,children:(0,Z.jsx)(k,{variant:`body2`,sx:{whiteSpace:`pre-wrap`},children:ee})})]})}),(0,Z.jsxs)(ae,{children:[(0,Z.jsx)(s,{onClick:t,size:`small`,disabled:f,children:h?`Close`:`Cancel`}),!h&&(0,Z.jsxs)(s,{variant:`contained`,color:`error`,loading:l===`removing`,size:`small`,disabled:f||!o||o.doomed.length===0||o.unknown!==null,onClick:async()=>{u(`removing`),m(null);try{let e=await i.prune({keep:r,apply:!0});g(e),n()}catch(e){m(e.message)}finally{u(null)}},children:[`Remove `,o?.doomed.length??0]})]})]})}var X,Z;function Ze(){return(Ze=e((()=>{X=t(),b(),c(),l(),ye(),_(),ie(),g(),m(),F(),O(),w(),a(),Me(),Z=n()})))()}async function Qe(){let[e,t,n,r]=await Promise.allSettled([K.list(),K.builds(),K.preflight(),K.deployments(200)]),i=[];if(e.status===`rejected`&&i.push(`releases: ${e.reason?.message??`unavailable`}`),t.status===`rejected`&&i.push(`builds: ${t.reason?.message??`unavailable`}`),n.status===`rejected`&&i.push(`preflight: ${n.reason?.message??`unavailable`}`),r.status===`rejected`&&i.push(`deployments: ${r.reason?.message??`unavailable`}`),e.status===`rejected`)throw e.reason;return{releases:e.value.releases,root:e.value.root,builds:t.status===`fulfilled`?t.value:[],preflight:n.status===`fulfilled`?n.value:null,deployments:r.status===`fulfilled`?r.value:{known:!1,why:`Deployment history could not be read`},partial:i.length>0?i.join(` · `):null}}function $e(){let e=U(),[t,n]=(0,Q.useState)(!1),[a,o]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(null),[u,ee]=(0,Q.useState)(null),[p,m]=(0,Q.useState)(null),[h,te]=(0,Q.useState)(0),[g,_]=(0,Q.useState)(25),[v,ne]=(0,Q.useState)(!0),{data:y,loading:re,error:ie,refresh:b}=z(Qe,{intervalMs:2e4}),ae=(y?.builds??[]).some(e=>e.state===`running`)||u!==null,x=z(async()=>K.builds(),{intervalMs:3e3,enabled:ae}),S=x.data??y?.builds??[],oe=u&&!S.some(e=>e.buildId===u.buildId)?[u,...S]:S,C=(0,Q.useMemo)(()=>y?.releases??[],[y?.releases]),w=(0,Q.useMemo)(()=>v&&e?C.filter(t=>t.project===e):C,[C,v,e]),E=(0,Q.useMemo)(()=>y?.deployments.known?V(y.deployments.deployments):new Map,[y?.deployments]),D=(0,Q.useCallback)(async e=>{try{await i.stopBuild({buildId:e}),await x.refresh()}catch(e){m(e.message)}},[x]),O=[{key:`id`,header:`Release`,render:e=>{let t=E.get(e.id)??[];return(0,$.jsxs)(P,{spacing:.5,children:[(0,$.jsx)(k,{component:r,to:`/releases/${e.id}`,variant:`body2`,sx:{fontFamily:`monospace`,fontWeight:600,textDecoration:`none`,color:`text.primary`,wordBreak:`break-all`,"&:hover":{color:`primary.main`}},children:e.id}),(0,$.jsxs)(P,{direction:`row`,spacing:1,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,$.jsx)(je,{projectCommit:e.projectCommit,omniCommit:e.omniCommit,onRemote:e.onRemote,project:e.project}),!e.complete&&(0,$.jsx)(T,{title:e.manifestError??`This directory holds no manifest: the build did not finish. Its logs are still there.`,arrow:!0,children:(0,$.jsx)(f,{label:e.manifestError?`invalid manifest`:`unfinished`,size:`small`,color:e.manifestError?`error`:`warning`,variant:`outlined`,sx:{height:18,fontSize:10}})}),t.map(e=>(0,$.jsx)(T,{title:`Last recorded deployment to ${e.project}/${e.stack}: ${Ae(e.at)} · ${e.source??`unknown`}. Current runtime identity is not verified by this record.`,arrow:!0,children:(0,$.jsx)(f,{label:`History: ${e.stack}`,size:`small`,variant:`outlined`})},`${e.project}/${e.stack}`))]})]})}},{key:`built`,header:`Built`,render:e=>(0,$.jsxs)(P,{spacing:.25,sx:{maxWidth:170},children:[(0,$.jsx)(k,{variant:`body2`,sx:{whiteSpace:`nowrap`},children:Ae(e.builtAt)}),(0,$.jsx)(T,{title:e.builtBy??``,arrow:!0,children:(0,$.jsx)(k,{variant:`caption`,noWrap:!0,sx:{color:`text.secondary`,display:`block`},children:e.builtBy??`—`})})]})},{key:`gates`,header:`Gates`,render:e=>(0,$.jsxs)(P,{spacing:.5,children:[(0,$.jsxs)(P,{direction:`row`,spacing:.75,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,$.jsx)(Ee,{release:e}),e.machine&&Oe(e.machine)&&(0,$.jsx)(T,{title:`Recorded during this build: the host's five-minute load average exceeded its core count when gates finished — ${De(e.machine)}. Gate outcomes are shown separately.`,arrow:!0,children:(0,$.jsx)(f,{label:`High host load`,size:`small`,color:`warning`,variant:`outlined`,sx:{height:18,fontSize:10}})})]}),(0,$.jsx)(ke,{gates:e.gateList,size:8,columns:7}),e.verified.map(e=>(0,$.jsx)(T,{title:`Recorded probe result on ${e.stack} at ${Ae(e.at)}. This is historical evidence, not current process identity.`,arrow:!0,children:(0,$.jsxs)(k,{variant:`caption`,sx:{color:e.passed===e.total?`text.secondary`:`warning.main`,fontFamily:`monospace`,whiteSpace:`nowrap`},children:[`Probed `,e.stack,`: `,e.passed,`/`,e.total]})},e.stack))]})},{key:`carries`,header:`Carries`,render:e=>(0,$.jsxs)(P,{spacing:.5,sx:{alignItems:`flex-start`},children:[(0,$.jsx)(T,{title:e.artifacts.apps.join(`, `)||`none`,arrow:!0,children:(0,$.jsxs)(k,{variant:`body2`,sx:{whiteSpace:`nowrap`,color:e.complete?`text.primary`:`text.disabled`},children:[e.complete?`${e.artifacts.count} app${e.artifacts.count===1?``:`s`}`:`—`,e.artifacts.failed.length>0&&(0,$.jsxs)(k,{component:`span`,variant:`caption`,sx:{color:`error.main`,ml:.75},children:[e.artifacts.failed.length,` did not build`]})]})}),e.statics&&(0,$.jsx)(T,{title:`Static bundle built with ${e.statics.stack}'s environment — ${e.statics.files} files, ${q(e.statics.bytes)}`,arrow:!0,children:(0,$.jsx)(f,{label:`statics: ${e.statics.stack}`,size:`small`,variant:`outlined`,sx:{height:18,fontSize:10}})}),(0,$.jsxs)(k,{variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`,whiteSpace:`nowrap`},children:[q(e.bytes),e.keptSource&&(0,$.jsx)(T,{title:`The build's two clones are still on disk — kept on purpose, or left by a build that failed. They are not counted in this size.`,arrow:!0,children:(0,$.jsx)(d,{component:`span`,sx:{color:`warning.main`,ml:.75},children:`+ clones`})})]})]})},{key:`actions`,header:``,render:e=>(0,$.jsx)(P,{direction:`row`,sx:{justifyContent:`flex-end`},children:(0,$.jsx)(L,{permission:`OmnitronProject.startStack`,children:(0,$.jsx)(s,{size:`small`,variant:`outlined`,startIcon:(0,$.jsx)(ge,{}),disabled:!e.complete,onClick:()=>l(e),sx:{whiteSpace:`nowrap`},children:`Deploy…`})})})}],A=Math.min(h,Math.max(0,Math.ceil(w.length/g)-1)),j=w.slice(A*g,A*g+g),M=y?.preflight?.canBuild!==!1,N=w.reduce((e,t)=>e+t.bytes,0);return(0,$.jsxs)(P,{spacing:3,children:[(0,$.jsx)(Se,{links:[{name:`Releases`}],action:(0,$.jsxs)(P,{direction:`row`,spacing:1,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,$.jsx)(se,{"data-console-command":`refresh`,size:`small`,onClick:()=>void b(),title:`Refresh`,children:(0,$.jsx)(he,{})}),(0,$.jsx)(L,{permission:`OmnitronRelease.prune`,children:(0,$.jsx)(s,{size:`small`,startIcon:(0,$.jsx)(ve,{}),onClick:()=>o(!0),children:`Prune…`})}),(0,$.jsx)(T,{title:M?``:`This master cannot run a build — see the banner`,arrow:!0,children:(0,$.jsx)(`span`,{children:(0,$.jsx)(L,{permission:`OmnitronRelease.build`,children:(0,$.jsx)(s,{variant:`contained`,size:`small`,startIcon:(0,$.jsx)(G,{}),disabled:!M,onClick:()=>n(!0),children:`Build`})})})})]})}),y?.preflight&&!y.preflight.canBuild&&(0,$.jsxs)(I,{severity:`error`,variant:`outlined`,children:[`This master cannot run a release build: `,(0,$.jsx)(`strong`,{children:y.preflight.missingTools.join(`, `)}),` `,y.preflight.missingTools.length===1?`is`:`are`,` not on the daemon's PATH. A daemon started by launchd has the system PATH, not a shell's. It looked in: `,y.preflight.path.slice(0,6).join(`, `),y.preflight.path.length>6?`, …`:``]}),p&&(0,$.jsx)(I,{closable:!0,severity:`warning`,variant:`outlined`,onClose:()=>m(null),children:p}),y?.partial&&(0,$.jsxs)(I,{severity:`warning`,variant:`outlined`,children:[`Part of this page could not be read — `,y.partial]}),y&&!y.deployments.known&&(0,$.jsxs)(I,{severity:`warning`,variant:`outlined`,children:[`Deployment history is unavailable — `,y.deployments.why,`. Pruning is refused while deployment protection cannot be determined.`]}),oe.length>0&&(0,$.jsx)(P,{spacing:1.5,children:oe.slice(0,3).map(e=>(0,$.jsx)(Ie,{record:e,onStop:D,onDeploy:e=>{let t=C.find(t=>t.id===e);t?l(t):b()}},e.buildId))}),e&&(0,$.jsx)(Re,{project:e},e),(0,$.jsxs)(P,{direction:`row`,spacing:1.5,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,$.jsx)(k,{variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`,overflowWrap:`anywhere`},children:y?.root??``}),(0,$.jsxs)(k,{variant:`caption`,sx:{color:`text.secondary`},children:[w.length,` release`,w.length===1?``:`s`,` · `,q(N),` · controller storage`]}),(0,$.jsx)(d,{sx:{flex:1}}),e&&(0,$.jsx)(f,{size:`small`,variant:v?`filled`:`outlined`,label:v?`only ${e}`:`all projects`,onClick:()=>ne(e=>!e),sx:{height:22,fontSize:11}})]}),(0,$.jsx)(we,{minWidth:640,scrollLabel:`Releases`,columns:O,data:j,total:w.length,loading:re,loadError:ie??null,emptyMessage:`Nothing has been built on this master yet`,rowKey:e=>e.id,page:A,pageSize:g,onPageChange:te,onPageSizeChange:e=>{_(e),te(0)},dense:!0}),(0,$.jsx)(L,{permission:`OmnitronRelease.build`,children:(0,$.jsx)(Je,{open:t,onClose:()=>n(!1),defaultProject:e,preflight:y?.preflight??null,onStarted:e=>{ee(e),x.refresh().then(()=>b())}})}),(0,$.jsx)(L,{permission:`OmnitronRelease.prune`,children:(0,$.jsx)(Xe,{open:a,onClose:()=>o(!1),onPruned:()=>void b()})}),(0,$.jsx)(L,{permission:`OmnitronProject.startStack`,children:(0,$.jsx)(Pe,{open:c!==null,onClose:()=>l(null),project:c?.project??e??``,release:c})})]})}var Q,$;function et(){return(et=e((()=>{R(),Q=t(),o(),c(),l(),u(),M(),F(),E(),w(),de(),Ce(),xe(),H(),me(),Ne(),Fe(),Le(),Me(),B(),a(),Te(),W(),Ye(),Ze(),$=n()})))()}et();export{$e as default};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{i as t,t as n}from"./react-BN8qLIAi.js";import{h as r,i,o as a}from"./client-DFnuv2z3.js";import{n as o}from"./services-BddvcFi8.js";import{D as s,E as c,F as l,H as u,I as d,M as f,O as p,Q as m,T as h,V as g,Z as _,ct as v,i as y,j as b,r as x,st as S}from"./mui-BXSXx9c9.js";import{B as C,a as w,o as T,z as E}from"./mui-Cd711nOk.js";import{A as ee,G as D,K as te,U as O,W as ne,it as re,k,l as ie,rt as A,u as ae}from"./mui-AnEgAVjz.js";import{C as oe,_ as j,n as se,t as M,v as N,w as ce}from"./mui-BwsIrivo.js";import{n as P,r as F,t as I}from"./alert-uBG6r9NW.js";import{t as le}from"./auth-CcgjP7hR.js";import{n as L,t as ue}from"./store-bqUBn2A4.js";import{n as de,t as fe}from"./use-polled-resource-B22hhr5L.js";import{a as pe}from"./storage-CKXnhqkt.js";import{G as me,g as R,p as z}from"./icons-OboZgWSt.js";import{n as he,r as ge}from"./alert-expression-CSblScoa.js";import{a as _e,c as ve,l as B,n as V,r as H,s as U,t as ye}from"./alert-notify-settings-C_CHZrFm.js";import{n as be,t as xe}from"./table-BOWT6Y9d.js";import{n as Se,t as Ce}from"./page-breadcrumbs-fR7Jmpp4.js";import{l as we,n as W}from"./formatters-RnRy4bXm.js";import{n as Te,r as Ee,t as G}from"./tabs-k5NPGLnJ.js";function De(){let{data:e,error:t}=de(()=>a.status(),{intervalMs:5e3}),n=e?.connection;return(0,K.jsx)(b,{variant:`outlined`,sx:{minWidth:0,maxWidth:480},children:(0,K.jsx)(s,{sx:{p:2,"&:last-child":{pb:2}},children:(0,K.jsxs)(j,{spacing:1.5,children:[(0,K.jsx)(E,{variant:`subtitle2`,children:`Execution control`}),t&&(0,K.jsxs)(I,{severity:`warning`,children:[`Cannot refresh execution control: `,t,`. Any values below are the last observation.`]}),!e&&!t&&(0,K.jsx)(E,{variant:`body2`,color:`text.secondary`,children:`Waiting for the backend.`}),e&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(j,{direction:`row`,useFlexGap:!0,spacing:1,sx:{flexWrap:`wrap`},children:[(0,K.jsx)(_,{size:`small`,variant:`outlined`,label:e.mode===`resident`?`Resident owner`:`Coupled execution`}),n&&(0,K.jsx)(_,{size:`small`,variant:`outlined`,color:t?`default`:n.status===`connected`?`success`:`warning`,label:t?`Last observed`:n.status===`connected`?`Owner connected`:n.status===`owner-changed`?`Owner identity changed`:`Owner unavailable`})]}),e.owner&&(0,K.jsxs)(E,{variant:`body2`,sx:{fontVariantNumeric:`tabular-nums`,overflowWrap:`anywhere`},children:[`Owner PID `,e.owner.pid,` · epoch `,e.epoch,` · `,e.phase]}),e.supervision&&(0,K.jsxs)(E,{variant:`body2`,color:`text.secondary`,sx:{overflowWrap:`anywhere`},children:[`Independent OS supervision · guardian PID `,e.supervision.guardianPid]}),n?.observedAt&&(0,K.jsxs)(E,{variant:`caption`,color:`text.secondary`,children:[`Last owner observation: `,W(n.observedAt)]}),!t&&n?.error&&(0,K.jsxs)(I,{severity:`warning`,children:[n.error,`. Application state is unknown; a lost control channel does not establish that applications stopped.`]}),e.reason&&(0,K.jsx)(E,{variant:`body2`,color:`text.secondary`,children:e.reason}),e.mode===`resident`&&!n&&(0,K.jsx)(E,{variant:`body2`,color:`text.secondary`,children:`This backend does not report owner connection freshness.`}),e.recovery&&(0,K.jsxs)(E,{variant:`body2`,color:`text.secondary`,sx:{overflowWrap:`anywhere`},children:[`Recovery checkpoint: `,e.recovery.status,e.recovery.reason?` · ${e.recovery.reason}`:``]})]})]})})})}var K;function q(){return(q=e((()=>{f(),p(),m(),N(),C(),F(),r(),fe(),K=n()})))()}function J({label:e,value:t,mono:n}){return(0,X.jsxs)(j,{direction:`row`,sx:{justifyContent:`space-between`,alignItems:`center`,gap:2,minWidth:0,py:.5},children:[(0,X.jsx)(E,{variant:`body2`,sx:{color:`text.secondary`},children:e}),(0,X.jsx)(E,{component:`div`,variant:`body2`,sx:{fontWeight:600,minWidth:0,overflowWrap:`anywhere`,textAlign:`right`,...n&&{fontFamily:`monospace`,fontSize:`0.8rem`}},children:t})]})}function Oe(){let e=L(e=>e.user);return e?(0,X.jsxs)(j,{spacing:2,children:[(0,X.jsxs)(b,{variant:`outlined`,sx:{...Z,maxWidth:480},children:[(0,X.jsx)(h,{title:`Profile`,subheader:`Account information`}),(0,X.jsx)(s,{sx:{...Q,pt:0},children:(0,X.jsxs)(j,{spacing:.5,children:[(0,X.jsx)(J,{label:`Username`,value:e.username,mono:!0}),(0,X.jsx)(J,{label:`Display Name`,value:e.displayName}),(0,X.jsx)(J,{label:`Role`,value:(0,X.jsx)(_,{label:e.role,size:`small`,variant:`outlined`,sx:{height:22,fontSize:`0.7rem`,fontWeight:600}})}),(0,X.jsx)(J,{label:`User ID`,value:e.id,mono:!0})]})})]}),(0,X.jsx)(De,{})]}):null}function ke(){let[e,t]=(0,Y.useState)(``),[n,r]=(0,Y.useState)(``),[a,o]=(0,Y.useState)(``),[c,u]=(0,Y.useState)(!1),[d,f]=(0,Y.useState)(!1),[p,m]=(0,Y.useState)(!1),[g,_]=(0,Y.useState)(!1),[v,y]=(0,Y.useState)(null),x=async s=>{if(s.preventDefault(),y(null),_(!1),!e||!n){y(`All fields are required.`);return}if(n!==a){y(`New passwords do not match.`);return}let c=le(n);if(c)y(c);else{m(!0);try{await i.changePassword({oldPassword:e,newPassword:n}),_(!0),t(``),r(``),o(``)}catch(e){y(e?.message??`Failed to change password`)}finally{m(!1)}}};return(0,X.jsxs)(b,{variant:`outlined`,sx:{...Z,maxWidth:480},children:[(0,X.jsx)(h,{slotProps:{title:{variant:`subtitle1`,fontWeight:700},subheader:{variant:`caption`}},title:`Change Password`,subheader:`Update your account credentials`}),(0,X.jsxs)(s,{sx:{...Q,pt:0},children:[g&&(0,X.jsx)(I,{closable:!0,severity:`success`,variant:`outlined`,sx:{mb:2},onClose:()=>_(!1),children:`Password changed successfully.`}),v&&(0,X.jsx)(P,{sx:{mb:2},onClose:()=>y(null),children:v}),(0,X.jsx)(`form`,{onSubmit:x,noValidate:!0,children:(0,X.jsxs)(j,{spacing:2,children:[(0,X.jsx)(w,{size:`small`,label:`Current Password`,type:c?`text`:`password`,value:e,onChange:e=>t(e.target.value),autoComplete:`current-password`,fullWidth:!0,slotProps:{input:{endAdornment:(0,X.jsx)(k,{position:`end`,children:(0,X.jsx)(A,{size:`small`,onClick:()=>u(!c),edge:`end`,children:(0,X.jsx)(R,{open:c,sx:{fontSize:18}})})})}}}),(0,X.jsx)(w,{size:`small`,label:`New Password`,type:d?`text`:`password`,value:n,onChange:e=>r(e.target.value),autoComplete:`new-password`,fullWidth:!0,slotProps:{input:{endAdornment:(0,X.jsx)(k,{position:`end`,children:(0,X.jsx)(A,{size:`small`,onClick:()=>f(!d),edge:`end`,children:(0,X.jsx)(R,{open:d,sx:{fontSize:18}})})})}}}),(0,X.jsx)(w,{size:`small`,label:`Confirm New Password`,type:d?`text`:`password`,value:a,onChange:e=>o(e.target.value),autoComplete:`new-password`,fullWidth:!0}),(0,X.jsx)(l,{type:`submit`,variant:`contained`,size:`small`,disabled:p,startIcon:p?(0,X.jsx)(S,{size:16,color:`inherit`}):void 0,sx:{alignSelf:`flex-start`},children:p?`Changing...`:`Change Password`})]})})]})]})}function Ae(){let e=L(e=>e.user),[t,n]=(0,Y.useState)([]),[r,a]=(0,Y.useState)(!0),[o,s]=(0,Y.useState)(null),[c,u]=(0,Y.useState)(null),d=(0,Y.useCallback)(async()=>{if(e)try{let e=await i.getActiveSessions();n(Array.isArray(e)?e:[]),s(null)}catch(e){s(e?.message??`Failed to fetch sessions`)}finally{a(!1)}},[e]);(0,Y.useEffect)(()=>{d()},[d]);let f=async e=>{u(e);try{await i.signOut({sessionId:e}),n(t=>t.filter(t=>t.id!==e))}catch(e){s(`Failed to revoke: ${e?.message??`Unknown error`}`)}finally{u(null)}};return(0,X.jsxs)(b,{variant:`outlined`,sx:Z,children:[(0,X.jsx)(h,{slotProps:{subheader:{variant:`caption`},title:{variant:`subtitle1`,fontWeight:700}},title:`Active Sessions`,subheader:r?`Loading...`:`${t.length} active session${t.length===1?``:`s`}`,action:t.filter(e=>!e.current).length>1?(0,X.jsx)(l,{size:`small`,color:`error`,variant:`text`,onClick:async()=>{for(let e of t.filter(e=>!e.current))try{await i.signOut({sessionId:e.id})}catch{}await d()},sx:{fontSize:`0.7rem`},children:`Revoke All Others`}):void 0}),o&&(0,X.jsx)(P,{sx:{mx:2,mb:1},onClose:()=>s(null),children:o}),(0,X.jsx)(xe,{scrollLabel:`Active sessions`,sx:{minWidth:560},columns:[{id:`id`,label:`Session`,render:e=>(0,X.jsxs)(j,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,X.jsxs)(E,{variant:`body2`,sx:{fontFamily:`monospace`,fontSize:12},children:[e.id.slice(0,8),`...`]}),e.current&&(0,X.jsx)(_,{label:`current`,size:`small`,color:`primary`,variant:`outlined`,sx:{height:20,fontSize:10}})]})},{id:`ipAddress`,label:`IP Address`,render:e=>(0,X.jsx)(E,{variant:`body2`,sx:{fontFamily:`monospace`,fontSize:12},children:e.ipAddress??`--`})},{id:`createdAt`,label:`Created`,render:e=>(0,X.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`},children:we(e.createdAt)})},{id:`expiresAt`,label:`Expires`,render:e=>(0,X.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`},children:W(e.expiresAt)})},{id:`actions`,label:`Actions`,align:`center`,render:e=>e.current?null:(0,X.jsx)(A,{size:`small`,color:`error`,disabled:c===e.id,onClick:()=>f(e.id),title:`Revoke session`,children:c===e.id?(0,X.jsx)(S,{size:16,color:`inherit`}):(0,X.jsx)(z,{sx:{fontSize:18}})})}],data:t,rowKey:e=>e.id,loading:r,loadingRows:2,dense:!0,containerSx:{border:`none`,borderRadius:0},emptyContent:(0,X.jsx)(E,{variant:`body2`,sx:{color:`text.secondary`},children:`No active sessions found.`})})]})}function je(){let[e,t]=(0,Y.useState)(()=>U(V,!1)),[n,r]=(0,Y.useState)(()=>U(H,!0)),[i,a]=(0,Y.useState)(()=>ve()),[o,c]=(0,Y.useState)(()=>typeof Notification<`u`?Notification.permission:`unsupported`),l=async(e,n)=>{if(n&&typeof Notification<`u`&&Notification.permission==="default"){let e=await Notification.requestPermission();if(c(e),e!==`granted`){t(!1),B(V,!1);return}}t(n),B(V,n)};return(0,X.jsxs)(b,{variant:`outlined`,sx:{...Z,maxWidth:480},children:[(0,X.jsx)(h,{slotProps:{subheader:{variant:`caption`},title:{variant:`subtitle1`,fontWeight:700}},title:`Notifications`,subheader:`Configure alert delivery preferences`}),(0,X.jsx)(s,{sx:{...Q,pt:0},children:(0,X.jsxs)(j,{spacing:3,children:[(0,X.jsx)(O,{control:(0,X.jsx)(M,{size:`small`,checked:e,onChange:l,disabled:o===`denied`}),label:(0,X.jsxs)(g,{children:[(0,X.jsx)(E,{variant:`body2`,sx:{fontWeight:600},children:`Desktop notifications`}),(0,X.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`},children:o===`denied`?`Blocked by browser — enable in site settings`:o===`unsupported`?`Not supported`:`Show browser notifications for alerts`})]}),sx:{alignItems:`flex-start`,ml:0}}),(0,X.jsx)(O,{control:(0,X.jsx)(M,{size:`small`,checked:n,onChange:(e,t)=>{r(t),B(H,t)}}),label:(0,X.jsxs)(g,{children:[(0,X.jsx)(E,{variant:`body2`,sx:{fontWeight:600},children:`Sound alerts`}),(0,X.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`},children:`Play a tone when an alert fires at or above the minimum severity`})]}),sx:{alignItems:`flex-start`,ml:0}}),(0,X.jsx)(x,{}),(0,X.jsxs)(g,{children:[(0,X.jsx)(E,{variant:`body2`,sx:{fontWeight:600,mb:1},children:`Minimum alert severity`}),(0,X.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`,mb:1.5,display:`block`},children:`Only receive notifications at or above this level`}),(0,X.jsx)(D,{size:`small`,fullWidth:!0,children:(0,X.jsx)(oe,{inputProps:{"aria-label":`Minimum alert severity`},value:i,onChange:e=>{a(e.target.value),pe(ye,e.target.value)},children:he.map(e=>(0,X.jsx)(ie,{value:e,sx:{textTransform:`capitalize`},children:e},e))})})]})]})})]})}function Me(){return(0,X.jsxs)(j,{spacing:2,children:[(0,X.jsx)(Ce,{heading:`Settings`,links:[{name:`System`},{name:`Settings`}]}),(0,X.jsxs)(Te,{defaultValue:`general`,keepMounted:!0,children:[(0,X.jsx)(G,{value:`general`,label:`General`,children:(0,X.jsx)(Oe,{})}),(0,X.jsx)(G,{value:`security`,label:`Security`,children:(0,X.jsx)(ke,{})}),(0,X.jsx)(G,{value:`sessions`,label:`Sessions`,children:(0,X.jsx)(Ae,{})}),(0,X.jsx)(G,{value:`notifications`,label:`Notifications`,children:(0,X.jsx)(je,{})})]})]})}var Y,X,Z,Q;function $(){return($=e((()=>{Se(),q(),Y=t(),f(),p(),c(),C(),N(),T(),d(),re(),m(),ee(),v(),se(),ne(),ae(),ce(),te(),y(),u(),me(),F(),Ee(),be(),ue(),r(),o(),ge(),_e(),X=n(),Z={borderRadius:2},Q={p:3,"&:last-child":{pb:3}}})))()}$();export{Me as default};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{i as t,t as n}from"./react-BN8qLIAi.js";import{U as r,V as i,z as a}from"./client-DFnuv2z3.js";import{F as o,I as s,ct as c,st as l}from"./mui-BXSXx9c9.js";import{B as u,a as d,o as f,z as p}from"./mui-Cd711nOk.js";import{A as m,it as h,k as g,rt as _}from"./mui-AnEgAVjz.js";import{_ as v,v as y}from"./mui-BwsIrivo.js";import{n as b,r as x}from"./alert-uBG6r9NW.js";import{a as S,n as C,r as w,t as T}from"./store-bqUBn2A4.js";import{i as E,n as D,r as O,t as k}from"./omnitron-logo-koMCbsCv.js";import{G as A,g as j}from"./icons-OboZgWSt.js";function M(){let e=i(),[t]=r(),n=C(e=>e.signIn),a=C(e=>e.initError),s=C(e=>e.clearInitError),c=E(),[u,f]=(0,N.useState)(``),[m,h]=(0,N.useState)(``),[y,x]=(0,N.useState)(!1),[T,D]=(0,N.useState)(``),[O,A]=(0,N.useState)(!1),M=S(t.get(`returnTo`));return(0,P.jsxs)(v,{spacing:3,sx:{maxWidth:420,mx:`auto`,width:1},children:[(0,P.jsxs)(v,{spacing:1.5,sx:{alignItems:`center`,textAlign:`center`},children:[(0,P.jsx)(k,{size:48}),(0,P.jsx)(p,{variant:`h4`,children:`Omnitron Console`}),(0,P.jsx)(p,{variant:`body2`,sx:{color:`text.secondary`},children:`Sign in to manage your infrastructure`})]}),a&&!T&&(0,P.jsx)(b,{severity:`warning`,onClose:s,children:a}),T&&(0,P.jsx)(b,{onClose:()=>D(``),children:T}),(0,P.jsx)(`form`,{onSubmit:async t=>{if(t.preventDefault(),u.trim()&&m.trim()){D(``),A(!0);try{await n(u,m),e(M,{replace:!0})}catch(e){h(``),D(w(e))}finally{A(!1)}}},noValidate:!0,children:(0,P.jsxs)(v,{spacing:2.5,children:[(0,P.jsx)(d,{fullWidth:!0,label:`Username`,autoComplete:`username`,autoFocus:!0,value:u,onChange:e=>f(e.target.value)}),(0,P.jsx)(d,{fullWidth:!0,label:`Password`,type:y?`text`:`password`,autoComplete:`current-password`,value:m,onChange:e=>h(e.target.value),slotProps:{input:{endAdornment:(0,P.jsx)(g,{position:`end`,children:(0,P.jsx)(_,{onClick:()=>x(!y),edge:`end`,children:(0,P.jsx)(j,{open:y})})})}}}),(0,P.jsx)(o,{fullWidth:!0,size:`large`,type:`submit`,variant:`contained`,disabled:O||!c,startIcon:O?(0,P.jsx)(l,{size:20,color:`inherit`}):void 0,children:O?`Signing in...`:c?`Sign In`:`Daemon offline`})]})})]})}var N,P;function F(){return(F=e((()=>{N=t(),x(),a(),y(),f(),u(),s(),m(),h(),c(),A(),T(),D(),O(),P=n()})))()}F();export{M as default};