@jini-ai/devops 0.7.3-next.1 → 0.7.3-next.3

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 (391) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +16 -0
  3. package/dist/backup/site/archive-extensions.d.ts +73 -0
  4. package/dist/backup/site/archive-extensions.js +129 -0
  5. package/dist/backup/site/archive-manifest.d.ts +85 -0
  6. package/dist/backup/site/archive-manifest.js +176 -0
  7. package/dist/backup/site/archive-media.d.ts +121 -0
  8. package/dist/backup/site/archive-media.js +93 -0
  9. package/dist/backup/site/backup-service.credentials.d.ts +31 -0
  10. package/dist/backup/site/backup-service.credentials.js +161 -0
  11. package/dist/backup/site/backup-service.d.ts +331 -0
  12. package/dist/backup/site/backup-service.js +125 -0
  13. package/dist/backup/site/backup-service.plan.d.ts +64 -0
  14. package/dist/backup/site/backup-service.plan.js +207 -0
  15. package/dist/backup/site/backup-service.push.d.ts +29 -0
  16. package/dist/backup/site/backup-service.push.js +82 -0
  17. package/dist/backup/site/backup-service.shared.d.ts +40 -0
  18. package/dist/backup/site/backup-service.shared.js +37 -0
  19. package/dist/backup/site/bundled-export-file-policy.d.ts +38 -0
  20. package/dist/backup/site/bundled-export-file-policy.js +40 -0
  21. package/dist/backup/site/credential-warnings.d.ts +41 -0
  22. package/dist/backup/site/credential-warnings.js +50 -0
  23. package/dist/backup/site/import-backend-steps.d.ts +167 -0
  24. package/dist/backup/site/import-backend-steps.js +170 -0
  25. package/dist/backup/site/import-backend.d.ts +167 -0
  26. package/dist/backup/site/import-backend.js +298 -0
  27. package/dist/backup/site/import-database.d.ts +118 -0
  28. package/dist/backup/site/import-database.js +167 -0
  29. package/dist/backup/site/import-index/admission.d.ts +54 -0
  30. package/dist/backup/site/import-index/admission.js +46 -0
  31. package/dist/backup/site/import-index/backfill.d.ts +106 -0
  32. package/dist/backup/site/import-index/backfill.js +137 -0
  33. package/dist/backup/site/import-index/errors.d.ts +28 -0
  34. package/dist/backup/site/import-index/errors.js +38 -0
  35. package/dist/backup/site/import-index/migrations/checksums.d.ts +4 -0
  36. package/dist/backup/site/import-index/migrations/checksums.js +4 -0
  37. package/dist/backup/site/import-index/migrations/site-imports-v1.d.ts +2 -0
  38. package/dist/backup/site/import-index/migrations/site-imports-v1.js +10 -0
  39. package/dist/backup/site/import-index/mode.d.ts +191 -0
  40. package/dist/backup/site/import-index/mode.js +272 -0
  41. package/dist/backup/site/import-index/open.d.ts +40 -0
  42. package/dist/backup/site/import-index/open.js +87 -0
  43. package/dist/backup/site/import-index/paging.d.ts +28 -0
  44. package/dist/backup/site/import-index/paging.js +66 -0
  45. package/dist/backup/site/import-index/payload-namespace.d.ts +80 -0
  46. package/dist/backup/site/import-index/payload-namespace.js +156 -0
  47. package/dist/backup/site/import-index/rows.d.ts +32 -0
  48. package/dist/backup/site/import-index/rows.js +61 -0
  49. package/dist/backup/site/import-index/schema.d.ts +8 -0
  50. package/dist/backup/site/import-index/schema.js +31 -0
  51. package/dist/backup/site/import-index/store.d.ts +27 -0
  52. package/dist/backup/site/import-index/store.js +33 -0
  53. package/dist/backup/site/import-index/sweep.d.ts +10 -0
  54. package/dist/backup/site/import-index/sweep.js +26 -0
  55. package/dist/backup/site/import-keep-off.d.ts +128 -0
  56. package/dist/backup/site/import-keep-off.js +204 -0
  57. package/dist/backup/site/import-plugin-state.d.ts +74 -0
  58. package/dist/backup/site/import-plugin-state.js +67 -0
  59. package/dist/backup/site/import-registry.d.ts +110 -0
  60. package/dist/backup/site/import-registry.js +205 -0
  61. package/dist/backup/site/import-restore-placement.d.ts +94 -0
  62. package/dist/backup/site/import-restore-placement.js +158 -0
  63. package/dist/backup/site/import-restore.d.ts +111 -0
  64. package/dist/backup/site/import-restore.js +120 -0
  65. package/dist/backup/site/import-verifier-inventory.d.ts +137 -0
  66. package/dist/backup/site/import-verifier-inventory.js +236 -0
  67. package/dist/backup/site/import-verifier-projection.d.ts +78 -0
  68. package/dist/backup/site/import-verifier-projection.js +100 -0
  69. package/dist/backup/site/import-verifier.d.ts +126 -0
  70. package/dist/backup/site/import-verifier.js +53 -0
  71. package/dist/backup/site/owned-temp-root.d.ts +12 -0
  72. package/dist/backup/site/owned-temp-root.js +2 -0
  73. package/dist/backup/site/package-file-inventory.d.ts +63 -0
  74. package/dist/backup/site/package-file-inventory.js +56 -0
  75. package/dist/backup/site/push-content.d.ts +70 -0
  76. package/dist/backup/site/push-content.js +56 -0
  77. package/dist/backup/site/react/ShowMoreImports.d.ts +21 -0
  78. package/dist/backup/site/react/ShowMoreImports.js +8 -0
  79. package/dist/backup/site/saved-keys-port.d.ts +47 -0
  80. package/dist/backup/site/saved-keys-port.js +3 -0
  81. package/dist/backup/site/saved-keys.d.ts +25 -0
  82. package/dist/backup/site/saved-keys.js +38 -0
  83. package/dist/backup/site/share-backend.d.ts +243 -0
  84. package/dist/backup/site/share-backend.js +284 -0
  85. package/dist/backup/site/share-database/projection.d.ts +195 -0
  86. package/dist/backup/site/share-database/projection.js +90 -0
  87. package/dist/backup/site/share-database/projection.media.d.ts +38 -0
  88. package/dist/backup/site/share-database/projection.media.js +179 -0
  89. package/dist/backup/site/share-database/projection.tables.d.ts +46 -0
  90. package/dist/backup/site/share-database/projection.tables.js +193 -0
  91. package/dist/backup/site/share-expiry.d.ts +75 -0
  92. package/dist/backup/site/share-expiry.js +49 -0
  93. package/dist/backup/site/share-export-failure.d.ts +17 -0
  94. package/dist/backup/site/share-export-failure.js +16 -0
  95. package/dist/backup/site/share-file-policy.d.ts +60 -0
  96. package/dist/backup/site/share-file-policy.js +146 -0
  97. package/dist/backup/site/share-hosting.d.ts +107 -0
  98. package/dist/backup/site/share-hosting.js +148 -0
  99. package/dist/backup/site/share-preparation-steps.d.ts +180 -0
  100. package/dist/backup/site/share-preparation-steps.js +109 -0
  101. package/dist/backup/site/share-preparation.d.ts +122 -0
  102. package/dist/backup/site/share-preparation.js +43 -0
  103. package/dist/backup/site/share-refusal.d.ts +21 -0
  104. package/dist/backup/site/share-refusal.js +20 -0
  105. package/dist/backup/site/share-registry.d.ts +124 -0
  106. package/dist/backup/site/share-registry.js +219 -0
  107. package/dist/backup/site/share-retention.d.ts +62 -0
  108. package/dist/backup/site/share-retention.js +126 -0
  109. package/dist/backup/site/share-service.d.ts +128 -0
  110. package/dist/backup/site/share-service.js +194 -0
  111. package/dist/backup/site/share-zip.d.ts +115 -0
  112. package/dist/backup/site/share-zip.js +144 -0
  113. package/dist/backup/site/sources.d.ts +344 -0
  114. package/dist/backup/site/sources.js +595 -0
  115. package/dist/backup/site/static-copy.d.ts +122 -0
  116. package/dist/backup/site/static-copy.js +165 -0
  117. package/dist/backup/site/static-download-html.d.ts +76 -0
  118. package/dist/backup/site/static-download-html.js +149 -0
  119. package/dist/backup/site/static-download-landing.d.ts +52 -0
  120. package/dist/backup/site/static-download-landing.js +95 -0
  121. package/dist/backup/site/static-download-layout.d.ts +96 -0
  122. package/dist/backup/site/static-download-layout.js +325 -0
  123. package/dist/backup/site/static-export-selection.d.ts +50 -0
  124. package/dist/backup/site/static-export-selection.js +76 -0
  125. package/dist/backup/site/static-site-packager.d.ts +42 -0
  126. package/dist/backup/site/static-site-packager.js +32 -0
  127. package/dist/backup/site/tool-registrations.d.ts +74 -0
  128. package/dist/backup/site/tool-registrations.js +201 -0
  129. package/dist/checks/complexity-debt.d.ts +100 -0
  130. package/dist/checks/complexity-debt.js +131 -0
  131. package/dist/checks/coverage/diff.js +5 -1
  132. package/dist/checks/env-access.d.ts +14 -1
  133. package/dist/checks/env-access.js +92 -6
  134. package/dist/checks/live-verify-checks.d.ts +29 -0
  135. package/dist/checks/live-verify-checks.js +30 -0
  136. package/dist/checks/quality-gates.d.ts +137 -0
  137. package/dist/checks/quality-gates.js +209 -0
  138. package/dist/core/deploy-types.d.ts +2 -0
  139. package/dist/deploy/admin-http/site-update-status.d.ts +8 -0
  140. package/dist/deploy/admin-http/site-update-status.js +15 -0
  141. package/dist/deploy/host-kit.d.ts +3 -0
  142. package/dist/deploy/index.d.ts +6 -0
  143. package/dist/deploy/index.js +6 -0
  144. package/dist/deploy/ops-runner.js +7 -0
  145. package/dist/deploy/ops-tool-contracts.d.ts +10 -1
  146. package/dist/deploy/react/Deployment.d.ts +37 -0
  147. package/dist/deploy/react/Deployment.js +94 -0
  148. package/dist/deploy/react/DockerfileTab.d.ts +72 -0
  149. package/dist/deploy/react/DockerfileTab.js +131 -0
  150. package/dist/deploy/react/HistoryTab.d.ts +43 -0
  151. package/dist/deploy/react/HistoryTab.js +12 -0
  152. package/dist/deploy/react/OverviewTab.d.ts +60 -0
  153. package/dist/deploy/react/OverviewTab.js +75 -0
  154. package/dist/deploy/react/PublishRunResult.d.ts +5 -1
  155. package/dist/deploy/react/PublishRunResult.js +4 -4
  156. package/dist/deploy/react/SiteUpdateNotice.d.ts +22 -0
  157. package/dist/deploy/react/SiteUpdateNotice.js +25 -0
  158. package/dist/deploy/react/StaticCredentialFields.d.ts +36 -0
  159. package/dist/deploy/react/StaticCredentialFields.js +63 -0
  160. package/dist/deploy/react/StaticCredentialSteps.d.ts +23 -0
  161. package/dist/deploy/react/StaticCredentialSteps.js +155 -0
  162. package/dist/deploy/react/StaticExportCard.d.ts +11 -0
  163. package/dist/deploy/react/StaticExportCard.js +97 -0
  164. package/dist/deploy/react/StaticPublishCredentials.d.ts +50 -0
  165. package/dist/deploy/react/StaticPublishCredentials.js +77 -0
  166. package/dist/deploy/react/StaticPublishForm.d.ts +12 -0
  167. package/dist/deploy/react/StaticPublishForm.js +91 -0
  168. package/dist/deploy/react/StaticSiteTab.d.ts +207 -0
  169. package/dist/deploy/react/StaticSiteTab.js +117 -0
  170. package/dist/deploy/react/deployment-visuals.d.ts +207 -0
  171. package/dist/deploy/react/deployment-visuals.js +101 -0
  172. package/dist/deploy/react/download-dockerfile.d.ts +14 -0
  173. package/dist/deploy/react/download-dockerfile.js +15 -0
  174. package/dist/deploy/react/hooks/publish-credential-draft.d.ts +33 -0
  175. package/dist/deploy/react/hooks/publish-credential-draft.js +54 -0
  176. package/dist/deploy/react/hooks/publish-credential-selection.d.ts +13 -0
  177. package/dist/deploy/react/hooks/publish-credential-selection.js +34 -0
  178. package/dist/deploy/react/hooks/publish-credential-writes.d.ts +20 -0
  179. package/dist/deploy/react/hooks/publish-credential-writes.js +99 -0
  180. package/dist/deploy/react/hooks/static-publish-actions.d.ts +10 -0
  181. package/dist/deploy/react/hooks/static-publish-actions.js +62 -0
  182. package/dist/deploy/react/hooks/static-publish-form.hooks.d.ts +38 -0
  183. package/dist/deploy/react/hooks/static-publish-form.hooks.js +103 -0
  184. package/dist/deploy/react/hooks/static-publish-run.hooks.d.ts +28 -0
  185. package/dist/deploy/react/hooks/static-publish-run.hooks.js +92 -0
  186. package/dist/deploy/react/hooks/use-dockerfile-source.hooks.d.ts +148 -0
  187. package/dist/deploy/react/hooks/use-dockerfile-source.hooks.js +155 -0
  188. package/dist/deploy/react/hooks/use-publish-credentials.hooks.d.ts +268 -0
  189. package/dist/deploy/react/hooks/use-publish-credentials.hooks.js +52 -0
  190. package/dist/deploy/react/hooks/use-static-export.hooks.d.ts +128 -0
  191. package/dist/deploy/react/hooks/use-static-export.hooks.js +159 -0
  192. package/dist/deploy/react/hooks/use-static-publish.hooks.d.ts +208 -0
  193. package/dist/deploy/react/hooks/use-static-publish.hooks.js +48 -0
  194. package/dist/deploy/react/index.d.ts +4 -0
  195. package/dist/deploy/react/index.js +2 -0
  196. package/dist/deploy/react/rules.d.ts +363 -0
  197. package/dist/deploy/react/rules.js +314 -0
  198. package/dist/deploy/react/use-deployment-overview.hooks.d.ts +41 -0
  199. package/dist/deploy/react/use-deployment-overview.hooks.js +11 -0
  200. package/dist/deploy/site/agent-tools.d.ts +42 -0
  201. package/dist/deploy/site/agent-tools.js +119 -0
  202. package/dist/deploy/site/deploy-config-registry.d.ts +155 -0
  203. package/dist/deploy/site/deploy-config-registry.js +124 -0
  204. package/dist/deploy/site/deploy-config.d.ts +97 -0
  205. package/dist/deploy/site/deploy-config.js +115 -0
  206. package/dist/deploy/site/deploy-ops/agent-tools.d.ts +22 -0
  207. package/dist/deploy/site/deploy-ops/agent-tools.js +76 -0
  208. package/dist/deploy/site/deploy-ops/registry.d.ts +134 -0
  209. package/dist/deploy/site/deploy-ops/registry.js +106 -0
  210. package/dist/deploy/site/deploy-ops/run-ops.d.ts +66 -0
  211. package/dist/deploy/site/deploy-ops/run-ops.js +34 -0
  212. package/dist/deploy/site/deploy-ops/secret-confirm.d.ts +36 -0
  213. package/dist/deploy/site/deploy-ops/secret-confirm.js +27 -0
  214. package/dist/deploy/site/deploy-targets/host-kit.d.ts +28 -0
  215. package/dist/deploy/site/deploy-targets/host-kit.js +120 -0
  216. package/dist/deploy/site/deploy-targets/registry.d.ts +157 -0
  217. package/dist/deploy/site/deploy-targets/registry.js +132 -0
  218. package/dist/deploy/site/deploy-targets/types.d.ts +27 -0
  219. package/dist/deploy/site/deploy-targets/types.js +2 -0
  220. package/dist/deploy/site/dockerfile.d.ts +137 -0
  221. package/dist/deploy/site/dockerfile.js +101 -0
  222. package/dist/deploy/site/export-run.d.ts +137 -0
  223. package/dist/deploy/site/export-run.js +152 -0
  224. package/dist/deploy/site/ports.d.ts +115 -0
  225. package/dist/deploy/site/ports.js +2 -0
  226. package/dist/deploy/site/publish-agent-tools.d.ts +18 -0
  227. package/dist/deploy/site/publish-agent-tools.js +120 -0
  228. package/dist/deploy/site/publish-candidate.d.ts +26 -0
  229. package/dist/deploy/site/publish-candidate.js +37 -0
  230. package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.d.ts +78 -0
  231. package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.js +88 -0
  232. package/dist/deploy/site/publish-credentials/compatibility-port.d.ts +38 -0
  233. package/dist/deploy/site/publish-credentials/compatibility-port.js +19 -0
  234. package/dist/deploy/site/publish-credentials/execution-mode.d.ts +43 -0
  235. package/dist/deploy/site/publish-credentials/execution-mode.js +19 -0
  236. package/dist/deploy/site/publish-credentials/store-owner.d.ts +11 -0
  237. package/dist/deploy/site/publish-credentials/store-owner.js +9 -0
  238. package/dist/deploy/site/publish-credentials/store-resolution.d.ts +55 -0
  239. package/dist/deploy/site/publish-credentials/store-resolution.js +100 -0
  240. package/dist/deploy/site/publish-credentials/store-validation.d.ts +68 -0
  241. package/dist/deploy/site/publish-credentials/store-validation.js +182 -0
  242. package/dist/deploy/site/publish-credentials/store.d.ts +322 -0
  243. package/dist/deploy/site/publish-credentials/store.js +372 -0
  244. package/dist/deploy/site/publish-credentials/types.d.ts +85 -0
  245. package/dist/deploy/site/publish-credentials/types.js +2 -0
  246. package/dist/deploy/site/publish-tool-capabilities.d.ts +123 -0
  247. package/dist/deploy/site/publish-tool-capabilities.js +175 -0
  248. package/dist/deploy/site/publish-tool-credential.d.ts +48 -0
  249. package/dist/deploy/site/publish-tool-credential.js +284 -0
  250. package/dist/deploy/site/publish-tool-deps.d.ts +205 -0
  251. package/dist/deploy/site/publish-tool-deps.js +15 -0
  252. package/dist/deploy/site/publish-tool-execution.d.ts +78 -0
  253. package/dist/deploy/site/publish-tool-execution.js +313 -0
  254. package/dist/deploy/site/publish-tool-schema.d.ts +29 -0
  255. package/dist/deploy/site/publish-tool-schema.js +38 -0
  256. package/dist/deploy/site/static-publish/adapter-export.d.ts +54 -0
  257. package/dist/deploy/site/static-publish/adapter-export.js +89 -0
  258. package/dist/deploy/site/static-publish/adapter-plan.d.ts +99 -0
  259. package/dist/deploy/site/static-publish/adapter-plan.js +112 -0
  260. package/dist/deploy/site/static-publish/adapter.d.ts +182 -0
  261. package/dist/deploy/site/static-publish/adapter.js +321 -0
  262. package/dist/deploy/site/static-publish/admin-publish-read.d.ts +209 -0
  263. package/dist/deploy/site/static-publish/admin-publish-read.js +116 -0
  264. package/dist/deploy/site/static-publish/credentials.d.ts +110 -0
  265. package/dist/deploy/site/static-publish/credentials.js +290 -0
  266. package/dist/deploy/site/static-publish/domain-publish-rows.d.ts +25 -0
  267. package/dist/deploy/site/static-publish/domain-publish-rows.js +43 -0
  268. package/dist/deploy/site/static-publish/domain-publish-tool.d.ts +19 -0
  269. package/dist/deploy/site/static-publish/domain-publish-tool.js +111 -0
  270. package/dist/deploy/site/static-publish/inspection.d.ts +24 -0
  271. package/dist/deploy/site/static-publish/inspection.js +69 -0
  272. package/dist/deploy/site/static-publish/publish-history.d.ts +197 -0
  273. package/dist/deploy/site/static-publish/publish-history.js +153 -0
  274. package/dist/deploy/site/static-publish/publish-run.d.ts +156 -0
  275. package/dist/deploy/site/static-publish/publish-run.js +186 -0
  276. package/dist/deploy/site/static-publish/types.d.ts +165 -0
  277. package/dist/deploy/site/static-publish/types.js +2 -0
  278. package/dist/deploy/site/static-publish/verify.d.ts +217 -0
  279. package/dist/deploy/site/static-publish/verify.js +248 -0
  280. package/dist/deploy/site/tool-registrations.d.ts +97 -0
  281. package/dist/deploy/site/tool-registrations.js +130 -0
  282. package/dist/deploy/site/types.d.ts +51 -0
  283. package/dist/deploy/site/types.js +2 -0
  284. package/dist/deploy/site-update/check-for-update.d.ts +19 -0
  285. package/dist/deploy/site-update/check-for-update.js +19 -0
  286. package/dist/deploy/site-update/contracts.d.ts +161 -0
  287. package/dist/deploy/site-update/contracts.js +94 -0
  288. package/dist/deploy/site-update/desktop-site-update.d.ts +66 -0
  289. package/dist/deploy/site-update/desktop-site-update.js +43 -0
  290. package/dist/deploy/site-update/fake-site-update.d.ts +39 -0
  291. package/dist/deploy/site-update/fake-site-update.js +52 -0
  292. package/dist/deploy/site-update/run-site-update.d.ts +121 -0
  293. package/dist/deploy/site-update/run-site-update.js +219 -0
  294. package/dist/deploy/site-update/self-hosted-site-update.d.ts +71 -0
  295. package/dist/deploy/site-update/self-hosted-site-update.js +79 -0
  296. package/dist/deploy/target-contracts.d.ts +3 -0
  297. package/dist/deploy/tool.d.ts +5 -8
  298. package/dist/deploy/tool.js +6 -9
  299. package/dist/dns/binding-sweeper.d.ts +72 -0
  300. package/dist/dns/binding-sweeper.js +53 -0
  301. package/dist/dns/index.d.ts +1 -0
  302. package/dist/dns/index.js +1 -0
  303. package/dist/dns/site/binding.repo.d.ts +71 -0
  304. package/dist/dns/site/binding.repo.js +45 -0
  305. package/dist/dns/site/dns-changes.d.ts +90 -0
  306. package/dist/dns/site/dns-changes.js +271 -0
  307. package/dist/dns/site/dns-tools.d.ts +46 -0
  308. package/dist/dns/site/dns-tools.js +204 -0
  309. package/dist/dns/site/mail-dns-status.d.ts +111 -0
  310. package/dist/dns/site/mail-dns-status.js +190 -0
  311. package/dist/dns/site/mail-dns-tools.d.ts +33 -0
  312. package/dist/dns/site/mail-dns-tools.js +62 -0
  313. package/dist/dns/site/mail-requirements.d.ts +30 -0
  314. package/dist/dns/site/mail-requirements.js +78 -0
  315. package/dist/dns/site/tool-deps.d.ts +21 -0
  316. package/dist/dns/site/tool-deps.js +2 -0
  317. package/dist/dns/site/tools.d.ts +74 -0
  318. package/dist/dns/site/tools.js +124 -0
  319. package/dist/local-dev/bind-host.d.ts +80 -0
  320. package/dist/local-dev/bind-host.js +90 -0
  321. package/dist/local-dev/dev-proxy-upstream.d.ts +69 -0
  322. package/dist/local-dev/dev-proxy-upstream.js +63 -0
  323. package/dist/local-dev/index.d.ts +28 -0
  324. package/dist/local-dev/index.js +25 -0
  325. package/dist/packaging/electron/archive.d.ts +2 -9
  326. package/dist/packaging/electron/asar-adapter.d.ts +2 -1
  327. package/dist/packaging/electron/entry.d.ts +2 -0
  328. package/dist/packaging/electron/move-to-applications.d.ts +165 -0
  329. package/dist/packaging/electron/move-to-applications.js +162 -0
  330. package/dist/packaging/electron/policies.d.ts +33 -4
  331. package/dist/packaging/electron/policies.js +29 -10
  332. package/dist/packaging/electron/ports.d.ts +1 -6
  333. package/dist/packaging/electron/staging.d.ts +11 -2
  334. package/dist/packaging/electron/staging.js +15 -5
  335. package/dist/react/site-share-expiry/ShareExpiryControls.d.ts +29 -0
  336. package/dist/react/site-share-expiry/ShareExpiryControls.js +7 -0
  337. package/dist/react/site-share-expiry/index.d.ts +2 -0
  338. package/dist/react/site-share-expiry/index.js +2 -0
  339. package/dist/source-control/react/ProvidersTab.d.ts +98 -0
  340. package/dist/source-control/react/ProvidersTab.js +195 -0
  341. package/dist/source-control/react/SourceControl.d.ts +51 -0
  342. package/dist/source-control/react/SourceControl.js +61 -0
  343. package/dist/source-control/react/hooks/use-source-control-credentials.hooks.d.ts +128 -0
  344. package/dist/source-control/react/hooks/use-source-control-credentials.hooks.js +102 -0
  345. package/dist/source-control/react/rules.d.ts +167 -0
  346. package/dist/source-control/react/rules.js +125 -0
  347. package/dist/source-control/react/source-control-visuals.d.ts +75 -0
  348. package/dist/source-control/react/source-control-visuals.js +48 -0
  349. package/dist/source-control/site/agent-tools.d.ts +5 -0
  350. package/dist/source-control/site/agent-tools.js +30 -0
  351. package/dist/source-control/site/bundled-provider-registry.d.ts +33 -0
  352. package/dist/source-control/site/bundled-provider-registry.js +37 -0
  353. package/dist/source-control/site/commit-schema.d.ts +40 -0
  354. package/dist/source-control/site/commit-schema.js +29 -0
  355. package/dist/source-control/site/commit-target.d.ts +26 -0
  356. package/dist/source-control/site/commit-target.js +58 -0
  357. package/dist/source-control/site/credential-form.d.ts +36 -0
  358. package/dist/source-control/site/credential-form.js +102 -0
  359. package/dist/source-control/site/credential-setup.d.ts +107 -0
  360. package/dist/source-control/site/credential-setup.js +216 -0
  361. package/dist/source-control/site/provider-kit.d.ts +37 -0
  362. package/dist/source-control/site/provider-kit.js +35 -0
  363. package/dist/source-control/site/provider-module.d.ts +251 -0
  364. package/dist/source-control/site/provider-module.js +2 -0
  365. package/dist/source-control/site/saved-key-bindings.d.ts +4 -0
  366. package/dist/source-control/site/saved-key-bindings.js +4 -0
  367. package/dist/source-control/site/static-site-packager-port.d.ts +37 -0
  368. package/dist/source-control/site/static-site-packager-port.js +2 -0
  369. package/dist/source-control/site/store.d.ts +209 -0
  370. package/dist/source-control/site/store.js +374 -0
  371. package/dist/source-control/site/store.validation.d.ts +72 -0
  372. package/dist/source-control/site/store.validation.js +168 -0
  373. package/dist/source-control/site/tool-registrations.d.ts +190 -0
  374. package/dist/source-control/site/tool-registrations.js +379 -0
  375. package/dist/static-export/site/export-preflight.d.ts +48 -0
  376. package/dist/static-export/site/export-preflight.js +82 -0
  377. package/dist/static-export/site/media-original-urls.d.ts +57 -0
  378. package/dist/static-export/site/media-original-urls.js +109 -0
  379. package/dist/static-export/site/ports.d.ts +82 -0
  380. package/dist/static-export/site/ports.js +29 -0
  381. package/dist/static-export/site/public-origin-policy.d.ts +32 -0
  382. package/dist/static-export/site/public-origin-policy.js +68 -0
  383. package/dist/static-export/site/route-manifest.d.ts +65 -0
  384. package/dist/static-export/site/route-manifest.js +139 -0
  385. package/dist/static-export/site/site-exporter.d.ts +158 -0
  386. package/dist/static-export/site/site-exporter.js +112 -0
  387. package/dist/static-export/site/static-security-headers.d.ts +39 -0
  388. package/dist/static-export/site/static-security-headers.js +43 -0
  389. package/dist/static-export/site/theme-preview-manifest.d.ts +35 -0
  390. package/dist/static-export/site/theme-preview-manifest.js +28 -0
  391. package/package.json +912 -8
@@ -1,11 +1,21 @@
1
- export const ENV_ACCESS_RULES = ['HW9-env-access', 'HW12-env-import-time'];
1
+ export const ENV_ACCESS_RULES = ['HW9-env-access', 'HW12-env-import-time', 'HW13-env-undeclared-entry'];
2
2
  const ACCESS_REASON = 'Only a declared process entry may touch process.env or import.meta.env; take the value or an environment map from the host.';
3
3
  const IMPORT_TIME_REASON = 'This environment read runs while the module is being imported, before a host can supply configuration; move it into the process entry.';
4
- /** Bind the installed compiler and the hardwiring inspector whose helpers these rules reuse.
5
- * Inspection is one O(n) walk over the file's AST nodes; no I/O, no module state.
6
- * Only the env name (or the ambient object's own name) is hashed for debt identity.
4
+ const UNDECLARED_REASON = 'This process entry reads an environment name that is not declared for it; declare the name for this entry or take the value from the host.';
5
+ const DYNAMIC_REASON = 'This process entry reads the environment with a computed key or an unbounded rest; read declared names, and use readDeclaredEnvKey for a computed key.';
6
+ /** Debt identity of a computed key or rest read: the runtime key is never known, nor reported. */
7
+ const DYNAMIC_IDENTITY = 'dynamic-key';
8
+ const UNDECLARED_KEY_MESSAGE = 'The requested environment name is not declared for this process entry.';
9
+ /** The checked accessor for a computed key: the entry's declared set decides before the map is indexed.
10
+ * Fails with a fixed message that never names the requested key or any value.
7
11
  */
8
- export function createEnvAccessInspector({ compiler: c, inspector }, _options = {}) {
12
+ export function readDeclaredEnvKey({ env, declaredNames, key }, _optional = {}) {
13
+ if (!declaredNames.has(key))
14
+ throw new Error(UNDECLARED_KEY_MESSAGE);
15
+ // A declared name missing from the map must not fall through to an inherited property.
16
+ return Object.hasOwn(env, key) ? env[key] : undefined;
17
+ }
18
+ function createEnvAccessSyntax({ compiler: c, inspector }) {
9
19
  function isImportMetaEnv({ node }) {
10
20
  return c.isPropertyAccessExpression(node) && node.name.text === 'env' &&
11
21
  c.isMetaProperty(node.expression) && node.expression.keywordToken === c.SyntaxKind.ImportKeyword;
@@ -24,10 +34,85 @@ export function createEnvAccessInspector({ compiler: c, inspector }, _options =
24
34
  return parent.argumentExpression.text;
25
35
  return undefined;
26
36
  }
37
+ /** A literal property name (`A`, `'A'`, `['A']`); a computed expression has no static key. */
38
+ function propertyNameKey({ name }) {
39
+ if (c.isIdentifier(name) || c.isStringLiteralLike(name) || c.isNumericLiteral(name))
40
+ return name.text;
41
+ if (c.isComputedPropertyName(name) && c.isStringLiteralLike(name.expression))
42
+ return name.expression.text;
43
+ return undefined;
44
+ }
45
+ return { ambientEnv, staticKey, entryReads: createEnvBindingReads({ compiler: c, staticKey, propertyNameKey }) };
46
+ }
47
+ function createEnvBindingReads({ compiler: c, staticKey, propertyNameKey }) {
48
+ /** `process.env.A`, `process.env['A']`, or a computed `process.env[name]`; undefined when the object is not indexed. */
49
+ function memberReads({ node }) {
50
+ const parent = node.parent;
51
+ if (c.isPropertyAccessExpression(parent) && parent.expression === node)
52
+ return [{ node: parent, key: parent.name.text }];
53
+ if (c.isElementAccessExpression(parent) && parent.expression === node)
54
+ return [{ node: parent, key: staticKey({ node }) }];
55
+ return undefined;
56
+ }
57
+ /** The source key of `A` or `A: local`; a nested pattern always carries its source key as `propertyName`. */
58
+ function bindingElementKey({ element }) {
59
+ if (element.propertyName)
60
+ return propertyNameKey({ name: element.propertyName });
61
+ return c.isIdentifier(element.name) ? element.name.text : undefined;
62
+ }
63
+ /** `const { A, B: b, ...rest } = process.env`, also as a parameter or binding default: one read per source key. */
64
+ function bindingReads({ node }) {
65
+ const parent = node.parent;
66
+ const bound = c.isVariableDeclaration(parent) || c.isParameter(parent) || c.isBindingElement(parent);
67
+ if (!bound || parent.initializer !== node || !c.isObjectBindingPattern(parent.name))
68
+ return [];
69
+ return parent.name.elements.map(element => ({ node: element,
70
+ key: element.dotDotDotToken ? undefined : bindingElementKey({ element }) }));
71
+ }
72
+ /** `({ A, B: b, ...rest } = process.env)`: the assignment form of destructuring. */
73
+ function assignmentReads({ node }) {
74
+ const parent = node.parent;
75
+ if (!c.isBinaryExpression(parent) || parent.right !== node || parent.operatorToken.kind !== c.SyntaxKind.EqualsToken)
76
+ return [];
77
+ if (!c.isObjectLiteralExpression(parent.left))
78
+ return [];
79
+ return parent.left.properties.map(property => ({ node: property,
80
+ key: c.isSpreadAssignment(property) || !property.name ? undefined : propertyNameKey({ name: property.name }) }));
81
+ }
82
+ /** Forwarding the whole map (`{ env: process.env }`, `{ ...process.env }`) reads no key here; the
83
+ * names its helpers read are inventoried in the entry's declaration instead. */
84
+ return function entryReads({ node }) {
85
+ return memberReads({ node }) ?? [...bindingReads({ node }), ...assignmentReads({ node })];
86
+ };
87
+ }
88
+ /** Bind the installed compiler and the hardwiring inspector whose helpers these rules reuse.
89
+ * Inspection is one O(n) walk over the file's AST nodes; no I/O, no module state.
90
+ * Only the env name (or the ambient object's own name) is hashed for debt identity.
91
+ */
92
+ export function createEnvAccessInspector({ compiler: c, inspector }, _options = {}) {
93
+ const { ambientEnv, staticKey, entryReads } = createEnvAccessSyntax({ compiler: c, inspector });
27
94
  /** Only the exact expression is a define: `process.env`, `process.env[name]` and other keys stay reads. */
28
95
  function isBuildDefine({ input, owner, key }) {
29
96
  return input.buildDefine && owner === 'process.env' && key === 'NODE_ENV';
30
97
  }
98
+ /** HW13: every key a process entry takes from the ambient object must be declared for that entry. */
99
+ function entryViolations({ tree, input }) {
100
+ const declared = input.declaredEnvNames ?? new Set();
101
+ const found = [];
102
+ function visit(node) {
103
+ const owner = ambientEnv({ node });
104
+ if (owner)
105
+ for (const { node: at, key } of entryReads({ node })) {
106
+ if (key !== undefined && (declared.has(key) || isBuildDefine({ input, owner, key })))
107
+ continue;
108
+ found.push(inspector.violation({ tree, node: at, rule: 'HW13-env-undeclared-entry',
109
+ reason: key === undefined ? DYNAMIC_REASON : UNDECLARED_REASON, identity: key ?? DYNAMIC_IDENTITY }));
110
+ }
111
+ c.forEachChild(node, visit);
112
+ }
113
+ visit(tree);
114
+ return found;
115
+ }
31
116
  /** Report every reference to the ambient environment outside a process entry.
32
117
  * A module-scope reference is reported under both rules: it is an access, and it runs at import.
33
118
  * Reads reached through a call made at module scope are invisible to a syntax rule; an
@@ -35,8 +120,9 @@ export function createEnvAccessInspector({ compiler: c, inspector }, _options =
35
120
  */
36
121
  function inspect(input, _options = {}) {
37
122
  const tree = inspector.parse(input);
123
+ // Handing a map into an entry does not grant its readers access to every ambient name.
38
124
  if (input.envRoot)
39
- return [];
125
+ return entryViolations({ tree, input });
40
126
  const found = [];
41
127
  function visit(node) {
42
128
  const owner = ambientEnv({ node });
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @file The PASS/FAIL ledger shared by the opt-in live Playwright verifiers
3
+ * (`scripts/verify-find-in-page.ts`, `scripts/verify-site-power.ts`). Each check prints one
4
+ * `PASS::`/`FAIL::` line as it is decided; the final report lists every failure and yields the exit
5
+ * code. The log sink is injected, so the ledger's format and verdict are unit-tested here while the
6
+ * verifiers themselves need a real Electron app (they are not part of `npm test`).
7
+ */
8
+ /** One verifier run's ledger. */
9
+ interface CheckLog {
10
+ /** Record one check, printing `PASS:: <name> — <detail>` or `FAIL:: <name> — <detail>`. */
11
+ check(required: {
12
+ name: string;
13
+ ok: boolean;
14
+ detail: string;
15
+ }, optional?: {}): void;
16
+ /** Print the verdict: every failure (exit 1) or `VERIFY_OK` (exit 0). */
17
+ report(): 0 | 1;
18
+ }
19
+ /**
20
+ * @param input.log where each line goes — `console.log` at the composition edge.
21
+ * @returns a fresh ledger with no recorded failures.
22
+ */
23
+ export declare function createCheckLog({ log }: {
24
+ log: (input: {
25
+ line: string;
26
+ }, options?: Record<string, never>) => void;
27
+ }): CheckLog;
28
+ export type { CheckLog };
29
+ //# sourceMappingURL=live-verify-checks.d.ts.map
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @file The PASS/FAIL ledger shared by the opt-in live Playwright verifiers
3
+ * (`scripts/verify-find-in-page.ts`, `scripts/verify-site-power.ts`). Each check prints one
4
+ * `PASS::`/`FAIL::` line as it is decided; the final report lists every failure and yields the exit
5
+ * code. The log sink is injected, so the ledger's format and verdict are unit-tested here while the
6
+ * verifiers themselves need a real Electron app (they are not part of `npm test`).
7
+ */
8
+ /**
9
+ * @param input.log where each line goes — `console.log` at the composition edge.
10
+ * @returns a fresh ledger with no recorded failures.
11
+ */
12
+ export function createCheckLog({ log }) {
13
+ const failures = [];
14
+ return {
15
+ check({ name, ok, detail }, _optional = {}) {
16
+ log({ line: `${ok ? "PASS" : "FAIL"}:: ${name} — ${detail}` });
17
+ if (!ok)
18
+ failures.push(`${name}: ${detail}`);
19
+ },
20
+ report() {
21
+ if (failures.length > 0) {
22
+ log({ line: `\nVERIFY_FAILED:: ${failures.length} check(s)\n- ${failures.join("\n- ")}` });
23
+ return 1;
24
+ }
25
+ log({ line: "\nVERIFY_OK:: every check passed" });
26
+ return 0;
27
+ },
28
+ };
29
+ }
30
+ //# sourceMappingURL=live-verify-checks.js.map
@@ -0,0 +1,137 @@
1
+ /**
2
+ * @file The rules that keep the host desktop app's quality gates from going quiet. Pure functions only —
3
+ * no spawning, no filesystem — so the whole policy is testable under plain `node --test`. The CLI
4
+ * that actually runs the gates is `scripts/check-gates.ts`.
5
+ *
6
+ * **The defect this exists for.** A 2026-09-12 survey of this repo's existing harness found 11 of
7
+ * 22 `check:*` npm scripts invoked from nowhere at all, and one gate
8
+ * (`development/scripts/check-area-coverage-floor.ts`) fully written, documented, and shipped with
9
+ * its required config file never created — so it had never run once and nothing said so. The
10
+ * host admin app's complexity ratchet was 11 violations behind for the same reason: it exists, it is
11
+ * correct, and no CI step or local runner calls it.
12
+ *
13
+ * None of that was a decision anybody made. It is what happens when "this gate is off" is
14
+ * representable as *absence* — a line nobody added, a file nobody created, a script nobody calls.
15
+ * The whole design here is to make "off" a positive, loud, dated assertion instead:
16
+ *
17
+ * 1. {@link formatSummary} prints EVERY gate on every run, including the disabled ones. "Off"
18
+ * appears in the output of every run rather than in a diff nobody reads.
19
+ * 2. {@link validateManifest} makes `enabled: false` without a reason and a date a hard failure OF
20
+ * THE RUNNER. Turning a gate off costs a sentence; turning it off invisibly is impossible.
21
+ * 3. {@link detectGateDrift} fails when a gate script exists on disk that the manifest does not
22
+ * list. This is the one that `check-area-coverage-floor.ts` could not have survived.
23
+ * 4. {@link validateManifest} also ages disablements out: a gate off longer than `maxDisabledDays`
24
+ * fails until someone re-confirms the date. Debt is allowed; INVISIBLE debt is not.
25
+ *
26
+ * Note the asymmetry in what counts as failure here: a *disabled* gate never fails the run (that is
27
+ * the point of being able to turn one off), but a disabled gate that is undocumented, undated, or
28
+ * stale DOES. The thing being enforced is not "all gates are on" — it is "no gate is off by
29
+ * accident".
30
+ */
31
+ /** One entry of `quality-gates.json`'s `gates`, as parsed and NOT yet validated: every field is
32
+ * optional because {@link validateManifest} is what reports a missing one. */
33
+ export interface GateEntry {
34
+ id?: string;
35
+ run?: string;
36
+ enabled?: boolean;
37
+ disabledReason?: string;
38
+ disabledOn?: string;
39
+ }
40
+ /** The parsed `quality-gates.json`. `gates` is `unknown` until {@link validateManifest} has checked
41
+ * that it is an array at all. */
42
+ export interface GateManifest {
43
+ gates?: unknown;
44
+ maxDisabledDays?: number;
45
+ }
46
+ /** A gate command's exit status: `null` when it was killed by a signal or never spawned. */
47
+ export type GateExitCode = number | null;
48
+ /**
49
+ * Narrows `value` into `GateEntry[]`, replacing the blind `gates as GateEntry[]` cast this file and
50
+ * `scripts/check-gates.ts` used to do at their JSON-parsing boundary. Non-array input is left to each
51
+ * caller's own "no gates array" problem reporting (returns `[]`, same as the old cast's `?? []`
52
+ * fallback) — but a `null` or non-object array ELEMENT is valid JSON that used to pass that cast
53
+ * silently and then crash deep inside property access ({@link gateProblems}'s `gate.id`,
54
+ * {@link detectGateDrift}'s `gate.run`) as an unhelpful "Cannot read properties of null". That is a
55
+ * genuinely malformed gate entry, so it throws a clear error naming the index and value instead.
56
+ *
57
+ * @param required.value typically `manifest.gates`, fresh out of `JSON.parse` and not yet trustworthy.
58
+ * @returns `value` narrowed to `GateEntry[]`, or `[]` when `value` is not an array at all.
59
+ * @throws {Error} naming the array index and JSON value of the first `null`/non-object element.
60
+ * @complexity O(n) in entries.
61
+ */
62
+ export declare function asGateEntryArray({ value }: {
63
+ value: unknown;
64
+ }, _options?: {}): GateEntry[];
65
+ /** How long a gate may stay disabled before the runner demands the date be re-confirmed. */
66
+ declare const DEFAULT_MAX_DISABLED_DAYS = 30;
67
+ /**
68
+ * Whole days between two ISO `YYYY-MM-DD` dates. Deliberately date-only arithmetic rather than
69
+ * `Date.now()` deltas: a disablement recorded "today" must read as 0 days regardless of the clock
70
+ * time either side, or a gate disabled at 23:00 would age a day at midnight.
71
+ *
72
+ * @param required.fromIso the `disabledOn` date.
73
+ * @param required.toIso today, as `YYYY-MM-DD`.
74
+ * @returns whole days elapsed, or `null` if either date is unparseable.
75
+ * @complexity O(1).
76
+ */
77
+ declare function daysBetween({ fromIso, toIso }: {
78
+ fromIso: string;
79
+ toIso: string;
80
+ }, _options?: {}): number | null;
81
+ /**
82
+ * Every reason this manifest is not a legitimate description of the harness. An empty array means
83
+ * the manifest itself is sound — it says nothing about whether the gates pass.
84
+ *
85
+ * @param required.manifest the parsed `quality-gates.json`.
86
+ * @param required.today `YYYY-MM-DD`, injected rather than read from the clock so the ratchet is testable.
87
+ * @returns human-readable problems, one per line, ready to print.
88
+ * @complexity O(n) in gates.
89
+ */
90
+ export declare function validateManifest({ manifest, today }: {
91
+ manifest: GateManifest | null | undefined;
92
+ today: string;
93
+ }, _options?: {}): string[];
94
+ /**
95
+ * Gate scripts present on disk that no manifest entry runs — the check that makes a written-but-
96
+ * unwired gate impossible to leave lying around. Matching is by substring of the `run` command
97
+ * rather than by exact path, because a `run` legitimately carries flags and a wrapper
98
+ * (`node scripts/check-coverage.ts --areas ...`).
99
+ *
100
+ * @param required.gates the manifest's gate list (disabled ones count as registered — being off is a
101
+ * decision, being absent is not).
102
+ * @param required.scriptNames basenames of the gate scripts found on disk, e.g. `["check-coverage.ts"]`.
103
+ * @returns the basenames nothing references.
104
+ * @complexity O(gates x scripts); both are single digits here.
105
+ */
106
+ export declare function detectGateDrift({ gates, scriptNames }: {
107
+ gates: readonly GateEntry[] | null | undefined;
108
+ scriptNames: readonly string[];
109
+ }, _options?: {}): string[];
110
+ /**
111
+ * The whole run, rendered. Every gate appears — that is property 1 and the reason this function
112
+ * takes the full manifest rather than only the results.
113
+ *
114
+ * @param gates the manifest's gate list.
115
+ * @param outcomes `Map<gateId, exitCode>` for the gates that actually ran. Keyed by `string |
116
+ * undefined` because `gates` is unvalidated: a gate with no `id` looks up `undefined`, finds no
117
+ * outcome, and counts as a failure.
118
+ * @returns the printable summary block.
119
+ * @complexity O(n) in gates.
120
+ */
121
+ export declare function formatSummary({ gates, outcomes }: {
122
+ gates: readonly GateEntry[];
123
+ outcomes: ReadonlyMap<string | undefined, GateExitCode>;
124
+ }, _options?: {}): string;
125
+ /**
126
+ * True when a gate's result should fail the run. A gate that never produced a numeric exit code —
127
+ * killed by a signal, or a command that could not be spawned at all — is a FAILURE, never a pass.
128
+ * That asymmetry is deliberate: this repo has already shipped a packaged app off a step that
129
+ * "succeeded" without doing anything, and an absent exit code is the same shape of evidence.
130
+ *
131
+ * @complexity O(1).
132
+ */
133
+ export declare function isFailure({ exitCode }: {
134
+ exitCode: GateExitCode | undefined;
135
+ }, _options?: {}): boolean;
136
+ export { DEFAULT_MAX_DISABLED_DAYS, daysBetween };
137
+ //# sourceMappingURL=quality-gates.d.ts.map
@@ -0,0 +1,209 @@
1
+ /**
2
+ * @file The rules that keep the host desktop app's quality gates from going quiet. Pure functions only —
3
+ * no spawning, no filesystem — so the whole policy is testable under plain `node --test`. The CLI
4
+ * that actually runs the gates is `scripts/check-gates.ts`.
5
+ *
6
+ * **The defect this exists for.** A 2026-09-12 survey of this repo's existing harness found 11 of
7
+ * 22 `check:*` npm scripts invoked from nowhere at all, and one gate
8
+ * (`development/scripts/check-area-coverage-floor.ts`) fully written, documented, and shipped with
9
+ * its required config file never created — so it had never run once and nothing said so. The
10
+ * host admin app's complexity ratchet was 11 violations behind for the same reason: it exists, it is
11
+ * correct, and no CI step or local runner calls it.
12
+ *
13
+ * None of that was a decision anybody made. It is what happens when "this gate is off" is
14
+ * representable as *absence* — a line nobody added, a file nobody created, a script nobody calls.
15
+ * The whole design here is to make "off" a positive, loud, dated assertion instead:
16
+ *
17
+ * 1. {@link formatSummary} prints EVERY gate on every run, including the disabled ones. "Off"
18
+ * appears in the output of every run rather than in a diff nobody reads.
19
+ * 2. {@link validateManifest} makes `enabled: false` without a reason and a date a hard failure OF
20
+ * THE RUNNER. Turning a gate off costs a sentence; turning it off invisibly is impossible.
21
+ * 3. {@link detectGateDrift} fails when a gate script exists on disk that the manifest does not
22
+ * list. This is the one that `check-area-coverage-floor.ts` could not have survived.
23
+ * 4. {@link validateManifest} also ages disablements out: a gate off longer than `maxDisabledDays`
24
+ * fails until someone re-confirms the date. Debt is allowed; INVISIBLE debt is not.
25
+ *
26
+ * Note the asymmetry in what counts as failure here: a *disabled* gate never fails the run (that is
27
+ * the point of being able to turn one off), but a disabled gate that is undocumented, undated, or
28
+ * stale DOES. The thing being enforced is not "all gates are on" — it is "no gate is off by
29
+ * accident".
30
+ */
31
+ /**
32
+ * Narrows `value` into `GateEntry[]`, replacing the blind `gates as GateEntry[]` cast this file and
33
+ * `scripts/check-gates.ts` used to do at their JSON-parsing boundary. Non-array input is left to each
34
+ * caller's own "no gates array" problem reporting (returns `[]`, same as the old cast's `?? []`
35
+ * fallback) — but a `null` or non-object array ELEMENT is valid JSON that used to pass that cast
36
+ * silently and then crash deep inside property access ({@link gateProblems}'s `gate.id`,
37
+ * {@link detectGateDrift}'s `gate.run`) as an unhelpful "Cannot read properties of null". That is a
38
+ * genuinely malformed gate entry, so it throws a clear error naming the index and value instead.
39
+ *
40
+ * @param required.value typically `manifest.gates`, fresh out of `JSON.parse` and not yet trustworthy.
41
+ * @returns `value` narrowed to `GateEntry[]`, or `[]` when `value` is not an array at all.
42
+ * @throws {Error} naming the array index and JSON value of the first `null`/non-object element.
43
+ * @complexity O(n) in entries.
44
+ */
45
+ export function asGateEntryArray({ value }, _options = {}) {
46
+ if (!Array.isArray(value))
47
+ return [];
48
+ value.forEach((entry, index) => {
49
+ if (entry === null || typeof entry !== "object") {
50
+ throw new Error(`quality-gates.json: gates[${index}] must be an object; found ${JSON.stringify(entry)}.`);
51
+ }
52
+ });
53
+ return value;
54
+ }
55
+ /** How long a gate may stay disabled before the runner demands the date be re-confirmed. */
56
+ const DEFAULT_MAX_DISABLED_DAYS = 30;
57
+ const MS_PER_DAY = 86_400_000;
58
+ /**
59
+ * Whole days between two ISO `YYYY-MM-DD` dates. Deliberately date-only arithmetic rather than
60
+ * `Date.now()` deltas: a disablement recorded "today" must read as 0 days regardless of the clock
61
+ * time either side, or a gate disabled at 23:00 would age a day at midnight.
62
+ *
63
+ * @param required.fromIso the `disabledOn` date.
64
+ * @param required.toIso today, as `YYYY-MM-DD`.
65
+ * @returns whole days elapsed, or `null` if either date is unparseable.
66
+ * @complexity O(1).
67
+ */
68
+ function daysBetween({ fromIso, toIso }, _options = {}) {
69
+ const from = Date.parse(`${fromIso}T00:00:00Z`);
70
+ const to = Date.parse(`${toIso}T00:00:00Z`);
71
+ if (Number.isNaN(from) || Number.isNaN(to))
72
+ return null;
73
+ return Math.round((to - from) / MS_PER_DAY);
74
+ }
75
+ /**
76
+ * Problems with ONE disabled gate's paperwork. Split out of {@link validateManifest} so that
77
+ * function stays under this repo's own complexity ceiling of 9 — the same ceiling this harness
78
+ * enforces on everything else, which it would be absurd to exempt itself from.
79
+ *
80
+ * @complexity O(1).
81
+ */
82
+ function disabledGateProblems({ gate, today, maxDisabledDays }, _options = {}) {
83
+ const problems = [];
84
+ const where = `gate "${gate.id}"`;
85
+ if (!gate.disabledReason) {
86
+ problems.push(`${where} is disabled with no "disabledReason". A gate may be turned off, but not silently.`);
87
+ }
88
+ if (!gate.disabledOn) {
89
+ problems.push(`${where} is disabled with no "disabledOn" date, so nothing can tell how long it has been off.`);
90
+ return problems;
91
+ }
92
+ const age = daysBetween({ fromIso: gate.disabledOn, toIso: today });
93
+ if (age === null) {
94
+ problems.push(`${where} has an unparseable "disabledOn" (${gate.disabledOn}); expected YYYY-MM-DD.`);
95
+ return problems;
96
+ }
97
+ if (age > maxDisabledDays) {
98
+ problems.push(`${where} has been disabled ${age} days (since ${gate.disabledOn}, limit ${maxDisabledDays}). ` +
99
+ `Re-enable it, or re-confirm the decision by updating "disabledOn" and "disabledReason".`);
100
+ }
101
+ return problems;
102
+ }
103
+ /** Problems with ONE gate entry: shape, uniqueness, and (when off) its paperwork. Split out so
104
+ * {@link validateManifest} stays under the 9/9 ceiling this harness enforces on everything else —
105
+ * which it would be absurd to exempt itself from.
106
+ * @complexity O(1). */
107
+ function gateProblems({ gate, seen, today, maxDisabledDays }, _options = {}) {
108
+ if (!gate.id || !gate.run) {
109
+ return [`every gate needs an "id" and a "run"; found ${JSON.stringify(gate)}.`];
110
+ }
111
+ const problems = seen.has(gate.id) ? [`duplicate gate id "${gate.id}".`] : [];
112
+ seen.add(gate.id);
113
+ if (gate.enabled === false)
114
+ problems.push(...disabledGateProblems({ gate, today, maxDisabledDays }));
115
+ return problems;
116
+ }
117
+ /**
118
+ * Every reason this manifest is not a legitimate description of the harness. An empty array means
119
+ * the manifest itself is sound — it says nothing about whether the gates pass.
120
+ *
121
+ * @param required.manifest the parsed `quality-gates.json`.
122
+ * @param required.today `YYYY-MM-DD`, injected rather than read from the clock so the ratchet is testable.
123
+ * @returns human-readable problems, one per line, ready to print.
124
+ * @complexity O(n) in gates.
125
+ */
126
+ export function validateManifest({ manifest, today }, _options = {}) {
127
+ if (!manifest || !Array.isArray(manifest.gates))
128
+ return ['quality-gates.json has no "gates" array.'];
129
+ const gates = manifest.gates;
130
+ if (gates.length === 0)
131
+ return ['quality-gates.json lists zero gates — the harness would pass by measuring nothing.'];
132
+ // An array of gates means the manifest was present.
133
+ const maxDisabledDays = manifest.maxDisabledDays ?? DEFAULT_MAX_DISABLED_DAYS;
134
+ const problems = [];
135
+ const seen = new Set();
136
+ for (const gate of asGateEntryArray({ value: gates }))
137
+ problems.push(...gateProblems({ gate, seen, today, maxDisabledDays }));
138
+ return problems;
139
+ }
140
+ /**
141
+ * Gate scripts present on disk that no manifest entry runs — the check that makes a written-but-
142
+ * unwired gate impossible to leave lying around. Matching is by substring of the `run` command
143
+ * rather than by exact path, because a `run` legitimately carries flags and a wrapper
144
+ * (`node scripts/check-coverage.ts --areas ...`).
145
+ *
146
+ * @param required.gates the manifest's gate list (disabled ones count as registered — being off is a
147
+ * decision, being absent is not).
148
+ * @param required.scriptNames basenames of the gate scripts found on disk, e.g. `["check-coverage.ts"]`.
149
+ * @returns the basenames nothing references.
150
+ * @complexity O(gates x scripts); both are single digits here.
151
+ */
152
+ export function detectGateDrift({ gates, scriptNames }, _options = {}) {
153
+ const commands = asGateEntryArray({ value: gates }).map((gate) => String(gate.run ?? ""));
154
+ return scriptNames.filter((name) => !commands.some((command) => command.includes(name)));
155
+ }
156
+ /** One line per gate, in manifest order. `PASS`/`FAIL` for what ran, `DISABLED` for what did not —
157
+ * the disabled ones carry their reason and date so the summary is self-explaining.
158
+ * @complexity O(1). */
159
+ function summaryLine({ gate, outcome }, _options = {}) {
160
+ if (gate.enabled === false) {
161
+ return ` DISABLED ${gate.id} — ${gate.disabledReason ?? "(no reason given)"} [since ${gate.disabledOn ?? "?"}]`;
162
+ }
163
+ return ` ${outcome === 0 ? "PASS " : "FAIL "} ${gate.id}`;
164
+ }
165
+ /**
166
+ * The whole run, rendered. Every gate appears — that is property 1 and the reason this function
167
+ * takes the full manifest rather than only the results.
168
+ *
169
+ * @param gates the manifest's gate list.
170
+ * @param outcomes `Map<gateId, exitCode>` for the gates that actually ran. Keyed by `string |
171
+ * undefined` because `gates` is unvalidated: a gate with no `id` looks up `undefined`, finds no
172
+ * outcome, and counts as a failure.
173
+ * @returns the printable summary block.
174
+ * @complexity O(n) in gates.
175
+ */
176
+ export function formatSummary({ gates, outcomes }, _options = {}) {
177
+ const lines = ["", "=".repeat(66), "DESKTOP GATE SUMMARY", "=".repeat(66)];
178
+ let passed = 0;
179
+ let failed = 0;
180
+ let disabled = 0;
181
+ for (const gate of gates) {
182
+ if (gate.enabled === false) {
183
+ disabled += 1;
184
+ }
185
+ else if (outcomes.get(gate.id) === 0) {
186
+ passed += 1;
187
+ }
188
+ else {
189
+ failed += 1;
190
+ }
191
+ lines.push(summaryLine({ gate, outcome: outcomes.get(gate.id) }));
192
+ }
193
+ lines.push("-".repeat(66));
194
+ lines.push(` ${gates.length} gates: ${passed} pass, ${failed} fail, ${disabled} DISABLED`);
195
+ return lines.join("\n");
196
+ }
197
+ /**
198
+ * True when a gate's result should fail the run. A gate that never produced a numeric exit code —
199
+ * killed by a signal, or a command that could not be spawned at all — is a FAILURE, never a pass.
200
+ * That asymmetry is deliberate: this repo has already shipped a packaged app off a step that
201
+ * "succeeded" without doing anything, and an absent exit code is the same shape of evidence.
202
+ *
203
+ * @complexity O(1).
204
+ */
205
+ export function isFailure({ exitCode }, _options = {}) {
206
+ return exitCode !== 0;
207
+ }
208
+ export { DEFAULT_MAX_DISABLED_DAYS, daysBetween };
209
+ //# sourceMappingURL=quality-gates.js.map
@@ -72,6 +72,8 @@ export interface DeployPublishOptions {
72
72
  onProgress?: (progress: DeployPublishProgress) => void;
73
73
  metadata?: UnknownRecord;
74
74
  responseHeaders?: ResponseHeaderSet;
75
+ /** The caller's cancellation; a target checks it before each irreversible step (upload, promote). */
76
+ signal?: AbortSignal;
75
77
  }
76
78
  /** HTTP response headers by name, as a caller asks a target to serve them. */
77
79
  export type ResponseHeaderSet = Readonly<Record<string, string>>;
@@ -0,0 +1,8 @@
1
+ import type { SiteUpdateStatusReply } from '@jini-ai/core/contracts/site/devops-deploy';
2
+ export interface SiteUpdateStatusRouteDeps {
3
+ getStatus(required: Record<string, never>, optional?: {
4
+ signal?: AbortSignal | undefined;
5
+ }): Promise<SiteUpdateStatusReply>;
6
+ }
7
+ export declare const siteUpdateStatusRoute: import("@jini-ai/core/contracts/server").JsonRouteSpec<Record<string, never>, SiteUpdateStatusReply, SiteUpdateStatusRouteDeps, undefined>;
8
+ //# sourceMappingURL=site-update-status.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { defineJsonRoute, ok } from '@jini-ai/core/contracts/server';
2
+ export const siteUpdateStatusRoute = defineJsonRoute({
3
+ method: 'get',
4
+ path: '/api/admin/v1/workspaces/:workspaceId/system/site-update/status',
5
+ parse: () => ok({ value: {} }),
6
+ handle: async ({ deps, authorize }, _optional = {}) => {
7
+ if (authorize === undefined)
8
+ throw new Error('JSON route authorizer is required');
9
+ // Authorization precedes the feed read because denial must cause no outbound request.
10
+ await authorize({ permission: 'system.read', entityType: 'site-update' });
11
+ const value = await deps.getStatus({}, { signal: _optional.signal });
12
+ return ok({ value });
13
+ },
14
+ });
15
+ //# sourceMappingURL=site-update-status.js.map
@@ -62,6 +62,9 @@ export interface SigV4Client {
62
62
  }
63
63
  /** Everything a module may call that is not a runtime builtin. The host builds it and passes it in. */
64
64
  export interface DeployHostKit {
65
+ readonly isShareArtifactKey?: (required: {
66
+ readonly key: string;
67
+ }, optional?: Record<string, never>) => boolean;
65
68
  /** `fetch`, aborted after `requiredArgs.timeoutMs`. */
66
69
  fetch(requiredArgs: {
67
70
  url: string;
@@ -20,4 +20,10 @@ export * from './ops-secrets.js';
20
20
  export * from './ops-secret-card.js';
21
21
  export * from './ops-tools.js';
22
22
  export * from './ops-registry.js';
23
+ export * from './site-update/contracts.js';
24
+ export * from './site-update/check-for-update.js';
25
+ export * from './site-update/run-site-update.js';
26
+ export * from './site-update/fake-site-update.js';
27
+ export * from './site-update/desktop-site-update.js';
28
+ export * from './site-update/self-hosted-site-update.js';
23
29
  //# sourceMappingURL=index.d.ts.map
@@ -19,4 +19,10 @@ export * from './ops-secrets.js';
19
19
  export * from './ops-secret-card.js';
20
20
  export * from './ops-tools.js';
21
21
  export * from './ops-registry.js';
22
+ export * from './site-update/contracts.js';
23
+ export * from './site-update/check-for-update.js';
24
+ export * from './site-update/run-site-update.js';
25
+ export * from './site-update/fake-site-update.js';
26
+ export * from './site-update/desktop-site-update.js';
27
+ export * from './site-update/self-hosted-site-update.js';
22
28
  //# sourceMappingURL=index.js.map
@@ -209,6 +209,13 @@ function normalizeDeployResult(input, result) {
209
209
  * @example await runDeploy({ deps, input: { platform: "my-host", target: "owner/repo", ref: "main" } }, { signal });
210
210
  */
211
211
  export async function runDeploy(required, optional = {}) {
212
+ const { deps, input } = required;
213
+ const work = () => executeDeploy(required, optional);
214
+ // The observation covers dispatch acceptance (or its refusal), not remote deployment completion: landing is
215
+ // only knowable later through status/wait, so a started:true result is "accepted", never "deployed".
216
+ return deps.observeDeploy ? deps.observeDeploy({ providerId: input.platform, work }, {}) : work();
217
+ }
218
+ async function executeDeploy(required, optional = {}) {
212
219
  const { deps, input } = required;
213
220
  const { signal } = optional;
214
221
  if (signal?.aborted)
@@ -2,7 +2,7 @@ import type { AgentToolDefinition, DerivedRiskByToolId, ToolMetadataById, ToolEx
2
2
  import type { Clock, Logger } from '@jini-ai/core/primitives';
3
3
  import type { SurfaceCardsPort, SurfaceCardSecretForm } from '@jini-ai/core/contracts/cards';
4
4
  import type { CredentialedRequestRequired, CredentialedRequestOptional, CredentialedRequestResult, CredentialedRequestPort } from '@jini-ai/core/contracts/credentials';
5
- import type { DeployOpsRegistry, DeployOpsSecretAppliesOn } from './ops-contracts.js';
5
+ import type { DeployOpsDeployResult, DeployOpsRegistry, DeployOpsSecretAppliesOn } from './ops-contracts.js';
6
6
  export type SecretValueSource = {
7
7
  kind: "site-key";
8
8
  } | {
@@ -114,6 +114,15 @@ export interface DeployOpsRuntime {
114
114
  loadDeployOps(input: {
115
115
  workspaceId: string;
116
116
  }): Promise<DeployOpsRegistry>;
117
+ /**
118
+ * Optional host observation around one whole deploy request, including pre-abort and observe-only refusals.
119
+ * It must return or rethrow exactly what `work` did and must call `work` once. `providerId` is the raw, user-supplied
120
+ * platform text, not a telemetry label: the host maps it to a recognized id before exporting anything.
121
+ */
122
+ observeDeploy?: ((required: {
123
+ providerId?: string;
124
+ work: () => Promise<DeployOpsDeployResult>;
125
+ }, optional?: Record<string, never>) => Promise<DeployOpsDeployResult>) | undefined;
117
126
  loadDeployWorkflowFiles?: ((input: {
118
127
  workspaceId: string;
119
128
  }) => Promise<readonly string[]>) | undefined;