@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
@@ -0,0 +1,110 @@
1
+ import type { UUID } from "@jini-ai/core/primitives";
2
+ import type { SecretSealerPort } from "@jini-ai/core/contracts/vault";
3
+ import type { describeCredential, PublishCredentialReadDeps } from '../publish-credentials/store.js';
4
+ import type { hasDefaultForPublish, resolveDefaultForPublish, resolveForPublish } from '../publish-credentials/store-resolution.js';
5
+ import type { PublishConnectionInput } from "@jini-ai/devops/deploy/site/publish-credentials/types";
6
+ type VendorCredentialSetRepoPort = PublishCredentialReadDeps['repo'];
7
+ import type { PublishExecutionMode } from "@jini-ai/devops/deploy/site/publish-credentials/execution-mode";
8
+ import type { DeployTargetCredentialSpec, DeployTargetRegistry, LoadedDeployTarget } from "@jini-ai/devops/deploy/site/deploy-targets/types";
9
+ import type { DeployTargetCredential } from "@jini-ai/core/contracts/site/devops-deploy";
10
+ import type { PublishCredentialSource, PublishVerificationBasis, ResolvedPublishCredentialSuccess } from "@jini-ai/devops/deploy/site/static-publish/types";
11
+ /** Readiness accepts the same optional saved-connection choice as resolution, without opening it. */
12
+ interface PublishCredentialSourceWithChoice extends PublishCredentialSource {
13
+ isConfigured(input: Parameters<PublishCredentialSource["resolve"]>[0], options?: object): ReturnType<PublishCredentialSource["isConfigured"]>;
14
+ }
15
+ /** Keep provider explanations useful without exposing any declared credential secret.
16
+ * Uses Jini's redactor for both publish and preview responses; does not mutate the credential.
17
+ * @complexity O(fields + message bytes × secrets), delegated to the shared redactor. */
18
+ export declare function redactDeployTargetMessage({ message, credential, target }: {
19
+ message: string;
20
+ credential: ResolvedPublishCredentialSuccess;
21
+ target: LoadedDeployTarget;
22
+ }, _options?: {}): string;
23
+ /**
24
+ * Builds a `PublishCredentialSource` that resolves a target's token (and any extra credential fields)
25
+ * from the env vars its deploy-plugin descriptor names, bound to exactly one workspace at construction
26
+ * time.
27
+ *
28
+ * @param required.workspaceId - The ONLY workspace this instance will ever answer for. A `resolve()`/
29
+ * `isConfigured()` call for any other `workspaceId` is refused, not silently served — see this
30
+ * file's header for why this changed from "accepted but ignored".
31
+ * @param required.loadDeployTargets - This workspace's deploy registry (which env vars each target reads).
32
+ * @param options.env - Defaults to `process.env`; overridable for tests so no test needs to mutate real
33
+ * process env vars (which would leak across parallel test files in the same process).
34
+ * @complexity One registry load per call, then O(v) env reads for the target's declared vars.
35
+ */
36
+ export declare function createEnvPublishCredentialSource({ workspaceId, loadDeployTargets, env }: {
37
+ env: NodeJS.ProcessEnv;
38
+ workspaceId: UUID;
39
+ loadDeployTargets: ({ workspaceId }: {
40
+ workspaceId: string;
41
+ }, optional?: Record<string, never>) => Promise<DeployTargetRegistry>;
42
+ }, _optional?: {}): PublishCredentialSourceWithChoice;
43
+ /**
44
+ * The credential a deploy module is handed: string fields without the `ok` discriminant or saved
45
+ * row identity. Identity is bookkeeping metadata, never a provider credential field.
46
+ *
47
+ * @complexity O(f) fields, no I/O.
48
+ */
49
+ export declare function toDeployTargetCredential(resolved: Pick<ResolvedPublishCredentialSuccess, "ok" | "token"> & Readonly<Record<string, string | true | PublishVerificationBasis | undefined>>): DeployTargetCredential;
50
+ /**
51
+ * Projects a decrypted connection onto {@link PublishCredentialSource.resolve}'s success shape — the
52
+ * one place that mapping lives, shared by the default-row lookup and the operator's chosen-row
53
+ * lookup so the two can never drift into projecting a credential differently. The field the host's
54
+ * descriptor names as `tokenField` becomes `token` (for an access-key pair, the secret half); every
55
+ * other declared field passes through under its own name.
56
+ *
57
+ * @complexity O(f) declared credential fields, no I/O.
58
+ */
59
+ export declare function projectConnectionForPublish(connection: PublishConnectionInput, spec: DeployTargetCredentialSpec): (Pick<ResolvedPublishCredentialSuccess, "ok" | "token"> & Readonly<Record<string, string | true | undefined>>) | {
60
+ readonly ok: false;
61
+ readonly reason: string;
62
+ };
63
+ export interface DbPublishCredentialSourceDeps {
64
+ describeCredential(deps: Pick<DbPublishCredentialSourceDeps, "repo" | "sealer" | "loadDeployTargets">, input: Parameters<typeof describeCredential>[1]): ReturnType<typeof describeCredential>;
65
+ hasDefaultForPublish(deps: Pick<DbPublishCredentialSourceDeps, "repo" | "sealer" | "loadDeployTargets">, input: Parameters<typeof hasDefaultForPublish>[1]): ReturnType<typeof hasDefaultForPublish>;
66
+ resolveForPublish(deps: Pick<DbPublishCredentialSourceDeps, "repo" | "sealer" | "loadDeployTargets">, input: Parameters<typeof resolveForPublish>[1]): ReturnType<typeof resolveForPublish>;
67
+ resolveDefaultForPublish(deps: Pick<DbPublishCredentialSourceDeps, "repo" | "sealer" | "loadDeployTargets">, input: Parameters<typeof resolveDefaultForPublish>[1]): ReturnType<typeof resolveDefaultForPublish>;
68
+ /** `vendor_credential_sets`, where saved publish credentials live (`publish-credentials/store.ts`). */
69
+ repo: VendorCredentialSetRepoPort;
70
+ sealer: SecretSealerPort;
71
+ /** This workspace's deploy registry: which field of a saved connection is the token. */
72
+ loadDeployTargets({ workspaceId }: {
73
+ workspaceId: string;
74
+ }, optional?: Record<string, never>): Promise<DeployTargetRegistry>;
75
+ }
76
+ /**
77
+ * Builds a `PublishCredentialSource` backed by the encrypted publish-credential store,
78
+ * resolving each `(workspaceId, target)`'s DEFAULT saved connection (Contract v2 Correction B — see
79
+ * this file's header), or the explicitly chosen compatible connection. `resolve()` decrypts via
80
+ * the store; `isConfigured()` uses the same metadata-only selection policy and never decrypts.
81
+ *
82
+ * @complexity Metadata selection scans rows and host compatibility; `resolve` additionally opens
83
+ * and parses one selected payload. Readiness never opens a secret.
84
+ */
85
+ export declare function createDbPublishCredentialSource(deps: DbPublishCredentialSourceDeps): PublishCredentialSourceWithChoice;
86
+ export interface ComposePublishCredentialSourceInput {
87
+ workspaceId: UUID;
88
+ executionMode: PublishExecutionMode;
89
+ dbDeps: DbPublishCredentialSourceDeps;
90
+ /** Overridable for tests; defaults to `process.env` — same reasoning
91
+ * `createEnvPublishCredentialSource`'s own `env` parameter documents. Only read when
92
+ * `executionMode` is `"self-hosted-cli"` — see this function's own doc for why. */
93
+ env: NodeJS.ProcessEnv;
94
+ }
95
+ /**
96
+ * The ONE place this feature decides which `PublishCredentialSource`(s) a real publish attempt may
97
+ * draw from, per this dispatch's brief: DB-backed always tried first (a saved connection always wins
98
+ * over an operator env var when both exist), env-var fallback ONLY when `executionMode` is
99
+ * `"self-hosted-cli"`. In `"hosted-api-only"` mode, `createEnvPublishCredentialSource` is never even
100
+ * CALLED, not merely consulted-and-ignored — the brief's explicit instruction: it must never be a
101
+ * hosted fallback, so a hosted process is structurally unable to hand out a process-wide operator
102
+ * token no matter what is set in its environment.
103
+ *
104
+ * @complexity O(1) composition; the returned source's own cost is `createDbPublishCredentialSource`'s
105
+ * (plus, in self-hosted mode, one more O(1) env read on a DB miss).
106
+ * @overallScore 100
107
+ */
108
+ export declare function composePublishCredentialSource(input: ComposePublishCredentialSourceInput): PublishCredentialSourceWithChoice;
109
+ export {};
110
+ //# sourceMappingURL=credentials.d.ts.map
@@ -0,0 +1,290 @@
1
+ import { redactSecrets } from "@jini-ai/core";
2
+ /** Keep provider explanations useful without exposing any declared credential secret.
3
+ * Uses Jini's redactor for both publish and preview responses; does not mutate the credential.
4
+ * @complexity O(fields + message bytes × secrets), delegated to the shared redactor. */
5
+ export function redactDeployTargetMessage({ message, credential, target }, _options = {}) {
6
+ // A plugin can echo secondary secrets as well as its primary token in an error.
7
+ const exactSecrets = [credential.token, ...(target.descriptor.credential?.fields ?? [])
8
+ .filter(field => field.secret)
9
+ .map(field => {
10
+ const value = credential[field.name];
11
+ return typeof value === "string" ? value : undefined;
12
+ })];
13
+ return redactSecrets({ input: message }, { exactSecrets });
14
+ }
15
+ /**
16
+ * @file `PublishCredentialSource` implementations + composition — env-var (self-hosted operator
17
+ * fallback), DB-backed (the encrypted publish-credential store, 2026-08-15; `vendor_credential_sets` since 2026-09-29), and the function
18
+ * that combines them per the install's `PublishExecutionMode`.
19
+ *
20
+ * Purpose:
21
+ * `createEnvPublishCredentialSource` was, until 2026-08-15, the ONLY credential source this feature
22
+ * wired up — see this file's git history for the original single-workspace-process reasoning
23
+ * (source-control and hosting tokens supplied as env vars are plain operator-supplied values, the same category as
24
+ * the host’s export directory and admin-password settings). `createDbPublishCredentialSource` is the follow-up that
25
+ * header predicted: backed by `publish-credentials/store.ts`'s `resolveDefaultForPublish` (the
26
+ * provider-scoped decrypting read — see its own header), honouring `workspaceId` for real instead of
27
+ * ignoring it.
28
+ *
29
+ * `createEnvPublishCredentialSource` now ALSO honours `workspaceId` for real (2026-08-15 fix,
30
+ * Terra's finding — it used to accept the parameter per the port's shape but never consult it, which
31
+ * meant a hosted multi-tenant process would silently hand every workspace the same process-wide
32
+ * token). It is constructed BOUND to one workspace at call time — matching every other per-request
33
+ * source this file builds — and `resolve()`/`isConfigured()` refuse (`ok:false`/`configured:false`)
34
+ * any call for a different workspace, rather than silently answering for it.
35
+ *
36
+ * `createDbPublishCredentialSource` resolves a provider's DEFAULT saved connection (Contract v2
37
+ * Correction B) instead of the earlier "reject with 'ambiguous' when 2+ credentials are saved for one
38
+ * provider" design — that design broke the whole point of named connections (saving a second one for
39
+ * a provider) the first time someone actually used the feature as built. `is_default` is a real
40
+ * server-owned invariant maintained by `publish-credentials/store.ts`'s write path. Project keys may
41
+ * explicitly opt out: readiness must honor a chosen id even when implicit selection is ambiguous.
42
+ *
43
+ * `composePublishCredentialSource` is what `publish-site.ts`'s route and `publish-agent-tools.ts`'s
44
+ * tool wiring actually construct: DB-backed always tried first (a workspace's own saved connection
45
+ * wins), env-var fallback ONLY in `"self-hosted-cli"` mode — in `"hosted-api-only"` mode the env
46
+ * source is never even constructed, per this dispatch's brief ("must never be a hosted fallback").
47
+ */
48
+ /**
49
+ * Env var names come from each target's deploy-plugin descriptor (`DeployTargetDescriptor.env`):
50
+ * `tokenVars` in preference order (the first set, non-blank one wins; several because hosts' own CLIs
51
+ * and CI docs have used more than one name, and an operator should not have to rename one they
52
+ * already set), plus `fields`, one env var per extra credential field, all required. A target whose
53
+ * descriptor declares no `env` has no env fallback at all.
54
+ */
55
+ function noEnvFallbackReason(target) {
56
+ return `${target} has no server-environment-variable fallback — its credential can only be configured through a saved connection, never through env vars`;
57
+ }
58
+ /** Refusal text for a target this workspace's deploy registry does not know. */
59
+ function unknownTargetReason(target) {
60
+ return `'${target}' is not a deploy target this workspace knows — turn on a hosting plugin under Agent Plugins`;
61
+ }
62
+ /**
63
+ * The ONE refusal text every "the chosen connection cannot be used" path shares (terra review
64
+ * 2026-09-20, finding 1). Deliberately IDENTICAL for a credential id that does not exist and for one
65
+ * that belongs to another workspace: `VendorCredentialSetRepoPort.findById` is workspace-scoped, so
66
+ * both are the same `null` here, and keeping one message means a caller cannot use this endpoint to
67
+ * learn whether some other workspace's id exists. Never echoes the caller-supplied id back — the
68
+ * operator's next step is to reload and pick again, not to read their own input.
69
+ */
70
+ const CHOSEN_CREDENTIAL_UNAVAILABLE_REASON = "the selected publish credential is not available in this workspace — reload the Static Site tab and choose a connection again";
71
+ /** Refusal text for a saved connection that exists in this workspace but is saved for a DIFFERENT
72
+ * provider than the publish target. Both values are safe to name: `providerId` comes from the row
73
+ * itself and `target` from an already-validated closed union, and neither is a secret. */
74
+ function chosenCredentialWrongProviderReason(providerId, target) {
75
+ return `the selected publish credential is saved for '${providerId}', not '${target}' — choose a '${target}' connection`;
76
+ }
77
+ /** Refusal text for an id-bound resolve against the env-var source — see `readCredential`'s own
78
+ * branch for why an env var can never be the connection the operator picked. */
79
+ function chosenConnectionUnavailableFromEnvReason(target) {
80
+ return `a saved connection was chosen for this publish, but this install resolves '${target}' credentials from server environment variables, which have no saved connections to choose from`;
81
+ }
82
+ /** The first set, non-blank var of `tokenVars` (blank counts as unset). The failure reason names
83
+ * every var the operator could have set, not just the first. */
84
+ function readToken(env, target, tokenVars) {
85
+ for (const envVar of tokenVars) {
86
+ const token = env[envVar]?.trim();
87
+ if (token)
88
+ return { token };
89
+ }
90
+ const reason = tokenVars.length === 1
91
+ ? `${tokenVars[0]} is not set — publishing to ${target} requires a token with write access configured in the server environment`
92
+ : `none of ${tokenVars.join(", ")} is set — publishing to ${target} requires a token with write access configured in the server environment (any one of these env vars)`;
93
+ return { reason };
94
+ }
95
+ /** Every declared extra field's env var, or the first one missing. */
96
+ function readFields(env, target, fallback) {
97
+ const fields = {};
98
+ for (const [field, envVar] of Object.entries(fallback.fields ?? {})) {
99
+ const value = env[envVar]?.trim();
100
+ if (!value)
101
+ return { reason: `${envVar} is not set — publishing to ${target} requires both a token (${fallback.tokenVars.join(" or ")}) and ${envVar}` };
102
+ fields[field] = value;
103
+ }
104
+ return { fields };
105
+ }
106
+ /**
107
+ * Builds a `PublishCredentialSource` that resolves a target's token (and any extra credential fields)
108
+ * from the env vars its deploy-plugin descriptor names, bound to exactly one workspace at construction
109
+ * time.
110
+ *
111
+ * @param required.workspaceId - The ONLY workspace this instance will ever answer for. A `resolve()`/
112
+ * `isConfigured()` call for any other `workspaceId` is refused, not silently served — see this
113
+ * file's header for why this changed from "accepted but ignored".
114
+ * @param required.loadDeployTargets - This workspace's deploy registry (which env vars each target reads).
115
+ * @param options.env - Defaults to `process.env`; overridable for tests so no test needs to mutate real
116
+ * process env vars (which would leak across parallel test files in the same process).
117
+ * @complexity One registry load per call, then O(v) env reads for the target's declared vars.
118
+ */
119
+ export function createEnvPublishCredentialSource({ workspaceId, loadDeployTargets, env }, _optional = {}) {
120
+ async function readCredential({ target, requestedWorkspaceId }, { credentialId } = {}) {
121
+ // An env var is never "the saved connection the operator chose" — a chosen id must resolve to
122
+ // THAT row or refuse (see `PublishCredentialSource.resolve`'s `credentialId` doc).
123
+ if (credentialId !== undefined) {
124
+ return { reason: chosenConnectionUnavailableFromEnvReason(target) };
125
+ }
126
+ if (requestedWorkspaceId !== workspaceId) {
127
+ return {
128
+ reason: `this credential source is bound to workspace '${workspaceId}' and refuses to resolve a token for workspace '${requestedWorkspaceId}'`,
129
+ };
130
+ }
131
+ const descriptor = (await loadDeployTargets({ workspaceId })).get(target)?.descriptor;
132
+ if (descriptor === undefined)
133
+ return { reason: unknownTargetReason(target) };
134
+ if (descriptor.env === undefined)
135
+ return { reason: noEnvFallbackReason(target) };
136
+ const tokenResult = readToken(env, target, descriptor.env.tokenVars);
137
+ if ("reason" in tokenResult)
138
+ return tokenResult;
139
+ const fieldsResult = readFields(env, target, descriptor.env);
140
+ if ("reason" in fieldsResult)
141
+ return fieldsResult;
142
+ return { token: tokenResult.token, fields: fieldsResult.fields };
143
+ }
144
+ return {
145
+ async resolve(input) {
146
+ const result = await readCredential({ target: input.target, requestedWorkspaceId: input.workspaceId }, input.credentialId === undefined ? {} : { credentialId: input.credentialId });
147
+ return "token" in result ? { ok: true, token: result.token, ...result.fields, basis: { kind: "env" } } : { ok: false, reason: result.reason };
148
+ },
149
+ async isConfigured(input, _options = {}) {
150
+ const result = await readCredential({ target: input.target, requestedWorkspaceId: input.workspaceId }, input.credentialId === undefined ? {} : { credentialId: input.credentialId });
151
+ return "token" in result ? { configured: true, basis: { kind: "env" } } : { configured: false, reason: result.reason };
152
+ },
153
+ };
154
+ }
155
+ /**
156
+ * The credential a deploy module is handed: string fields without the `ok` discriminant or saved
157
+ * row identity. Identity is bookkeeping metadata, never a provider credential field.
158
+ *
159
+ * @complexity O(f) fields, no I/O.
160
+ */
161
+ export function toDeployTargetCredential(resolved) {
162
+ const fields = {};
163
+ for (const [name, value] of Object.entries(resolved))
164
+ if (name !== "credentialId" && typeof value === "string")
165
+ fields[name] = value;
166
+ return { ...fields, token: resolved.token };
167
+ }
168
+ /**
169
+ * Projects a decrypted connection onto {@link PublishCredentialSource.resolve}'s success shape — the
170
+ * one place that mapping lives, shared by the default-row lookup and the operator's chosen-row
171
+ * lookup so the two can never drift into projecting a credential differently. The field the host's
172
+ * descriptor names as `tokenField` becomes `token` (for an access-key pair, the secret half); every
173
+ * other declared field passes through under its own name.
174
+ *
175
+ * @complexity O(f) declared credential fields, no I/O.
176
+ */
177
+ export function projectConnectionForPublish(connection, spec) {
178
+ const token = connection[spec.tokenField];
179
+ if (token === undefined)
180
+ return { ok: false, reason: `the saved '${connection.providerId}' credential has no ${spec.tokenField} — save the connection again` };
181
+ const fields = {};
182
+ for (const field of spec.fields) {
183
+ const value = connection[field.name];
184
+ if (field.name !== spec.tokenField && value !== undefined)
185
+ fields[field.name] = value;
186
+ }
187
+ return { ok: true, token, ...fields };
188
+ }
189
+ /**
190
+ * Builds a `PublishCredentialSource` backed by the encrypted publish-credential store,
191
+ * resolving each `(workspaceId, target)`'s DEFAULT saved connection (Contract v2 Correction B — see
192
+ * this file's header), or the explicitly chosen compatible connection. `resolve()` decrypts via
193
+ * the store; `isConfigured()` uses the same metadata-only selection policy and never decrypts.
194
+ *
195
+ * @complexity Metadata selection scans rows and host compatibility; `resolve` additionally opens
196
+ * and parses one selected payload. Readiness never opens a secret.
197
+ */
198
+ export function createDbPublishCredentialSource(deps) {
199
+ const notConfiguredReason = (target) => `no default '${target}' credential is saved for this workspace yet — add one in the Static Site tab`;
200
+ /** Projects through the target's declared credential spec, refusing a target the registry cannot describe. */
201
+ async function project(workspaceId, connection) {
202
+ const spec = (await deps.loadDeployTargets({ workspaceId })).get(connection.providerId)?.descriptor.credential;
203
+ return spec === undefined ? { ok: false, reason: unknownTargetReason(connection.providerId) } : projectConnectionForPublish(connection, spec);
204
+ }
205
+ /**
206
+ * Resolves the ONE saved connection the operator chose, or refuses — never the provider's default
207
+ * (terra review 2026-09-20, finding 1). `credentialId` is UNTRUSTED (an HTTP body field), so both
208
+ * checks below are load-bearing: `resolveForPublish` reads through the workspace-scoped
209
+ * `findById`, so another workspace's id is a `null` here and can never decrypt, and the row's own
210
+ * explicit compatibility must include the target this publish is actually going to.
211
+ *
212
+ * @complexity O(1) — one repo read plus, only on a full match, one decrypt (`resolveForPublish`).
213
+ */
214
+ async function resolveChosenCredential(input) {
215
+ const summary = await deps.describeCredential(deps, { workspaceId: input.workspaceId, id: input.credentialId });
216
+ if (summary && !summary.publishHosts.includes(input.target)) {
217
+ return { ok: false, reason: chosenCredentialWrongProviderReason(summary.providerId, input.target) };
218
+ }
219
+ const resolved = await deps.resolveForPublish(deps, { workspaceId: input.workspaceId, id: input.credentialId, providerId: input.target });
220
+ if (!resolved) {
221
+ return { ok: false, reason: CHOSEN_CREDENTIAL_UNAVAILABLE_REASON };
222
+ }
223
+ const projected = await project(input.workspaceId, { ...resolved.connection, providerId: input.target });
224
+ return projected.ok ? { ...projected, credentialId: input.credentialId, basis: { id: input.credentialId, revision: resolved.revision } } : projected;
225
+ }
226
+ return {
227
+ async resolve(input) {
228
+ // The chosen-connection path and the default path produce the SAME success shape (both end in
229
+ // `projectConnectionForPublish`) — only WHICH row is read differs.
230
+ if (input.credentialId !== undefined) {
231
+ return resolveChosenCredential({ workspaceId: input.workspaceId, target: input.target, credentialId: input.credentialId });
232
+ }
233
+ const resolved = await deps.resolveDefaultForPublish(deps, { workspaceId: input.workspaceId, providerId: input.target });
234
+ if (!resolved) {
235
+ return { ok: false, reason: notConfiguredReason(input.target) };
236
+ }
237
+ const projected = await project(input.workspaceId, resolved.connection);
238
+ return projected.ok ? { ...projected, credentialId: resolved.id, basis: { id: resolved.id, revision: resolved.revision } } : projected;
239
+ },
240
+ async isConfigured(input, _options = {}) {
241
+ const basis = await deps.hasDefaultForPublish(deps, { workspaceId: input.workspaceId, providerId: input.target, ...(input.credentialId === undefined ? {} : { id: input.credentialId }) });
242
+ const reason = input.credentialId === undefined ? notConfiguredReason(input.target) : CHOSEN_CREDENTIAL_UNAVAILABLE_REASON;
243
+ return basis ? { configured: true, basis } : { configured: false, reason };
244
+ },
245
+ };
246
+ }
247
+ /**
248
+ * The ONE place this feature decides which `PublishCredentialSource`(s) a real publish attempt may
249
+ * draw from, per this dispatch's brief: DB-backed always tried first (a saved connection always wins
250
+ * over an operator env var when both exist), env-var fallback ONLY when `executionMode` is
251
+ * `"self-hosted-cli"`. In `"hosted-api-only"` mode, `createEnvPublishCredentialSource` is never even
252
+ * CALLED, not merely consulted-and-ignored — the brief's explicit instruction: it must never be a
253
+ * hosted fallback, so a hosted process is structurally unable to hand out a process-wide operator
254
+ * token no matter what is set in its environment.
255
+ *
256
+ * @complexity O(1) composition; the returned source's own cost is `createDbPublishCredentialSource`'s
257
+ * (plus, in self-hosted mode, one more O(1) env read on a DB miss).
258
+ * @overallScore 100
259
+ */
260
+ export function composePublishCredentialSource(input) {
261
+ const dbSource = createDbPublishCredentialSource(input.dbDeps);
262
+ if (input.executionMode === "hosted-api-only") {
263
+ return dbSource;
264
+ }
265
+ const envSource = createEnvPublishCredentialSource({ workspaceId: input.workspaceId, loadDeployTargets: input.dbDeps.loadDeployTargets, env: input.env });
266
+ return {
267
+ async resolve(req) {
268
+ const fromDb = await dbSource.resolve(req);
269
+ if (fromDb.ok)
270
+ return fromDb;
271
+ // A publish BOUND to a chosen saved connection never falls through to the env var (terra
272
+ // review 2026-09-20, finding 1): the operator picked a specific account, and quietly
273
+ // publishing with a different credential because that one did not resolve is the exact
274
+ // failure this binding exists to prevent. The DB source's own refusal is the answer.
275
+ if (req.credentialId !== undefined)
276
+ return fromDb;
277
+ return envSource.resolve(req);
278
+ },
279
+ async isConfigured(req, _options = {}) {
280
+ const fromDb = await dbSource.isConfigured(req);
281
+ if (fromDb.configured)
282
+ return fromDb;
283
+ // Readiness preserves the same chosen-account binding as resolve: env vars have no saved id.
284
+ if (req.credentialId !== undefined)
285
+ return fromDb;
286
+ return envSource.isConfigured(req);
287
+ },
288
+ };
289
+ }
290
+ //# sourceMappingURL=credentials.js.map
@@ -0,0 +1,25 @@
1
+ import type { DeployTargetInspection } from '../deploy-targets/types.js';
2
+ type DetailRow = {
3
+ readonly label: string;
4
+ readonly value: string;
5
+ };
6
+ /**
7
+ * Projects a plugin's opaque inspection onto the domain confirmation card as short readable rows:
8
+ * what is published where, the current state of every hostname, then each change, one per row.
9
+ * Changes come from `domains.changes` — the exact list that will run, already de-duplicated (a
10
+ * wildcard route seen from both hostnames is removed once) — not from the per-hostname views.
11
+ * Vendor interpretation stays in the plugin: a change's own `reason` (or a host's `summary`) is
12
+ * shown as written; anything without one falls back to its plain fields — never a JSON dump, and
13
+ * never silently dropped, because the card is the person's consent to exactly these changes.
14
+ * @param required - Inspected plan plus the site's project and target labels.
15
+ * @param _options - Reserved options.
16
+ * @returns Plain text rows in card order.
17
+ * @complexity O(n) time/space in the inspection's size.
18
+ */
19
+ export declare function domainPublishRows(required: {
20
+ inspection: DeployTargetInspection;
21
+ projectName: string;
22
+ target: string;
23
+ }, _options?: {}): DetailRow[];
24
+ export {};
25
+ //# sourceMappingURL=domain-publish-rows.d.ts.map
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Projects a plugin's opaque inspection onto the domain confirmation card as short readable rows:
3
+ * what is published where, the current state of every hostname, then each change, one per row.
4
+ * Changes come from `domains.changes` — the exact list that will run, already de-duplicated (a
5
+ * wildcard route seen from both hostnames is removed once) — not from the per-hostname views.
6
+ * Vendor interpretation stays in the plugin: a change's own `reason` (or a host's `summary`) is
7
+ * shown as written; anything without one falls back to its plain fields — never a JSON dump, and
8
+ * never silently dropped, because the card is the person's consent to exactly these changes.
9
+ * @param required - Inspected plan plus the site's project and target labels.
10
+ * @param _options - Reserved options.
11
+ * @returns Plain text rows in card order.
12
+ * @complexity O(n) time/space in the inspection's size.
13
+ */
14
+ export function domainPublishRows(required, _options = {}) {
15
+ const { inspection, projectName, target } = required;
16
+ const changes = inspection.domains?.changes ?? [];
17
+ return [
18
+ { label: 'Project', value: projectName }, { label: 'Target', value: target },
19
+ ...inspection.hostingChanges.map(change => ({ label: 'Hosting', value: describe({ value: change }) })),
20
+ ...(inspection.domains?.hostnames ?? []).map(host => hostnameRow({ host })),
21
+ ...(changes.length ? changes.map(change => ({ label: 'Will change', value: describe({ value: change }) })) : [{ label: 'Will change', value: 'No domain changes.' }]),
22
+ ...(inspection.formSubmissions ? [{ label: 'Form submissions', value: inspection.formSubmissions.message }] : []),
23
+ ];
24
+ }
25
+ /** One hostname's current state: the plugin's own summary when it gives one, else its status. */
26
+ function hostnameRow({ host }, _options = {}) {
27
+ const hostname = typeof host.hostname === 'string' ? host.hostname : 'hostname';
28
+ const status = typeof host.status === 'string' ? host.status.replaceAll('-', ' ') : 'unknown';
29
+ const now = typeof host.summary === 'string' && host.summary.trim() ? host.summary : status;
30
+ return { label: `Now on ${hostname}`, value: now };
31
+ }
32
+ /** A plugin-written `reason` when present; otherwise the value's own fields as `key: value` text. */
33
+ function describe({ value }, _options = {}) {
34
+ if (value === null || typeof value !== 'object')
35
+ return String(value);
36
+ if (Array.isArray(value))
37
+ return value.map(item => describe({ value: item })).join('; ');
38
+ const record = value;
39
+ if (typeof record.reason === 'string' && record.reason.trim())
40
+ return record.reason;
41
+ return Object.entries(record).map(([key, item]) => item !== null && typeof item === 'object' ? `${key}: (${describe({ value: item })})` : `${key}: ${String(item)}`).join(', ');
42
+ }
43
+ //# sourceMappingURL=domain-publish-rows.js.map
@@ -0,0 +1,19 @@
1
+ import { type ToolHandler } from "@jini-ai/core";
2
+ import type { AssistantSurfaceDeps } from "@jini-ai/core/contracts/site/daemon-surface-exchanges";
3
+ import type { StaticPublishToolDeps } from "../publish-tool-deps.js";
4
+ import type { StaticPublishConfig, PublishCredentialSource } from "@jini-ai/devops/deploy/site/static-publish/types";
5
+ import type { PublishHistoryStore } from "./publish-history.js";
6
+ /** CMS wiring only: the existing gateway owns authorization/token/hash/single-use semantics;
7
+ * the existing human exchange owns consent. Nothing in a model request can create this capability.
8
+ * No new approval store, domain ledger, journal or automatic rollback is introduced. */
9
+ export declare function domainPublishTool(required: {
10
+ deps: StaticPublishToolDeps;
11
+ surfaces: AssistantSurfaceDeps;
12
+ credentialSource: PublishCredentialSource;
13
+ historyStore: PublishHistoryStore;
14
+ config: StaticPublishConfig;
15
+ projectName: string;
16
+ credentialId?: string;
17
+ onSettled?: () => void;
18
+ }, _options?: {}): ToolHandler;
19
+ //# sourceMappingURL=domain-publish-tool.d.ts.map
@@ -0,0 +1,111 @@
1
+ import { TokenExpiredError, TokenAlreadyRedeemedError } from "@jini-ai/core/gated-mutations";
2
+ import { optionalPublishPorts } from "../publish-tool-deps.js";
3
+ import { ToolInputError } from "@jini-ai/core";
4
+ import { nowIso } from "@jini-ai/core/primitives";
5
+ import { adaptLegacyAuthorize } from "@jini-ai/core";
6
+ import { PlanStaleError, ForbiddenError } from "@jini-ai/core/gated-mutations";
7
+ import { inspectStaticPublish } from "./inspection.js";
8
+ import { getPublishRunSnapshot, startPublishRun } from "./publish-run.js";
9
+ import { domainPublishRows } from "@jini-ai/devops/deploy/site/static-publish/domain-publish-rows";
10
+ /** CMS wiring only: the existing gateway owns authorization/token/hash/single-use semantics;
11
+ * the existing human exchange owns consent. Nothing in a model request can create this capability.
12
+ * No new approval store, domain ledger, journal or automatic rollback is introduced. */
13
+ export function domainPublishTool(required, _options = {}) {
14
+ const { deps, surfaces, config, projectName } = required;
15
+ const gateway = deps.gatedMutations?.gatewayDeps;
16
+ if (!gateway)
17
+ throw new ToolInputError({ message: 'DOMAIN_APPROVAL_UNAVAILABLE: The shared mutation gateway is not configured. Contact the installation owner; no domain changes were made.' });
18
+ return deps.approvalToolHandler({
19
+ surfaces,
20
+ prepare: async ({ ctx }, _options = {}) => {
21
+ const hooks = makeHooks({ ...required, gateway, actorId: ctx.principal.id, signal: ctx.signal, requestId: ctx.executionId });
22
+ const planned = await deps.gatewayPlan({ deps: gateway, principalId: ctx.principal.id, principalKind: 'agent', hooks });
23
+ const details = planned.details;
24
+ return { hooks, planned, details };
25
+ },
26
+ describe: ({ prepared: { details } }, _options = {}) => {
27
+ if (!details.inspection)
28
+ throw new Error('Domain publish plan has no inspection');
29
+ return {
30
+ toolId: 'deployment_execute_static_publish', errorCode: 'DOMAIN_PUBLISH', title: 'Publish and change these domain bindings?',
31
+ details: domainPublishRows({ inspection: details.inspection, projectName, target: config.target }),
32
+ warning: 'The listed records, bindings and whole overlapping routes will be changed. This can interrupt the existing site and other hosts covered by wildcard routes. Mail, TXT and CAA stay unchanged. There is no automatic rollback. Cancel to keep everything as it is.',
33
+ danger: true, confirmLabel: 'Publish and apply these changes',
34
+ };
35
+ },
36
+ run: async ({ ctx, prepared: { hooks, planned }, confirmer }, _options = {}) => {
37
+ const consent = await deps.checkToolPublishConsent({ deps, principalId: ctx.principal.id });
38
+ if (consent) {
39
+ void deps.tracker?.capture({ name: 'site_publish_blocked', userId: ctx.principal.id }, { properties: { target: config.target, reasonClass: 'consent', source: 'assistant' } });
40
+ return { published: false, cancelled: false, ...consent };
41
+ }
42
+ const token = await deps.gatewayConfirm({ deps: gateway, principalId: confirmer.id, principalKind: confirmer.kind, hooks, planId: planned.planId, planHash: planned.planHash });
43
+ const result = await executeDomainPublish({ deps, gateway, principalId: ctx.principal.id, hooks, confirmationToken: token.confirmationToken });
44
+ return { accepted: true, published: false, jobId: result.jobId, status: result.status, progress: result.progress,
45
+ message: 'Publish started after domain approval. Call deployment_get_static_publish_status with this jobId in 5 seconds for progress and the final result. Do not publish again while it is running.' };
46
+ },
47
+ }, { flag: 'published' });
48
+ }
49
+ /** Preserve typed gateway refusals through the tool transport's caller-safe error channel. */
50
+ async function executeDomainPublish(required, _options = {}) {
51
+ try {
52
+ return await required.deps.gatewayExecute({ deps: required.gateway, principalId: required.principalId, principalKind: 'agent', hooks: required.hooks, confirmationToken: required.confirmationToken });
53
+ }
54
+ catch (error) {
55
+ if (error instanceof PlanStaleError)
56
+ throw new ToolInputError({ message: 'DOMAIN_PLAN_STALE: Infrastructure or the connection changed after review. Preview and confirm the current state; no publish or domain changes were started.' });
57
+ if (error instanceof TokenExpiredError)
58
+ throw new ToolInputError({ message: 'DOMAIN_APPROVAL_EXPIRED: The domain approval expired. Preview and confirm again.' });
59
+ if (error instanceof TokenAlreadyRedeemedError)
60
+ throw new ToolInputError({ message: 'DOMAIN_APPROVAL_ALREADY_USED: This approval was already used. Inspect the last publish and preview again.' });
61
+ if (error instanceof ForbiddenError)
62
+ throw new ToolInputError({ message: 'DOMAIN_APPROVAL_FORBIDDEN: Permission or the approving person changed. Ask the installation owner to restore access, then preview again.' });
63
+ throw error;
64
+ }
65
+ }
66
+ function makeHooks(required, _options = {}) {
67
+ const { deps, credentialSource, historyStore, config, projectName, actorId, signal } = required;
68
+ const expiresAt = Date.parse(nowIso({ clock: deps.clock })) + 600_000;
69
+ return {
70
+ domain: 'deployment.static-publish-domain', scopeId: deps.workspaceId, readPermission: 'deployments.read', mutatePermission: 'deployments.publish',
71
+ resolveActorClassIdentity: deps.resolveActorClassIdentity,
72
+ computePlan: async () => {
73
+ const inspected = await inspectStaticPublish({ deps: { ...deps.staticPublishPorts, credentialSource, loadDeployTargets: deps.loadDeployTargets, ...optionalPublishPorts({ deps }) },
74
+ input: { workspaceId: deps.workspaceId, config, projectName, ...(required.credentialId ? { credentialId: required.credentialId } : {}) } });
75
+ if (inspected.inspection?.domains?.inventoryStatus !== 'complete')
76
+ throw new ToolInputError({ message: `DOMAIN_INVENTORY_UNKNOWN: ${inspected.inspection?.domains?.message ?? 'Complete authenticated domain inspection is required. Preview again.'}` });
77
+ const details = { ...inspected, workspaceId: deps.workspaceId, actorId, config, projectName };
78
+ return { details, planHash: inspectionPlanHash({ details, deps }) };
79
+ },
80
+ executeMutation: async ({ details }) => {
81
+ signal.throwIfAborted();
82
+ if (getPublishRunSnapshot(deps.staticPublishPorts).status === 'running')
83
+ throw new ToolInputError({ message: 'ALREADY_RUNNING: A publish is running. Wait for it to finish, then preview again.' });
84
+ const domainPlan = details.inspection?.domains;
85
+ if (!domainPlan)
86
+ throw new Error('Domain publish plan has no domain inspection');
87
+ if (!details.credentialBinding)
88
+ throw new Error('Domain publish plan has no credential binding');
89
+ return startPublishRun({ deps: { ...deps.staticPublishPorts, credentialSource, loadDeployTargets: deps.loadDeployTargets, ...optionalPublishPorts({ deps }) }, input: {
90
+ requestId: required.requestId, productEvent: { userId: actorId, source: "assistant" }, workspaceId: deps.workspaceId, publishOutputRootDir: deps.publishOutputRootDir, idGen: deps.idGen, exportSiteBound: deps.exportSiteBound,
91
+ config, projectName, ...(details.credentialId ? { credentialId: details.credentialId } : {}),
92
+ domainApproval: { plan: domainPlan, credentialBinding: details.credentialBinding, authorize: async ({ fingerprint }) => {
93
+ // The approved background job outlives the initiating call. Recheck permission and
94
+ // approval expiry here; cancelling that call after enqueue does not revoke this job.
95
+ await deps.requireToolPermission({ authorize: adaptLegacyAuthorize({ authorize: deps.authorize }), workspaceId: deps.workspaceId, principalId: actorId, permission: 'deployments.publish' });
96
+ return fingerprint === domainPlan.fingerprint && Date.parse(nowIso({ clock: deps.clock })) <= expiresAt;
97
+ } },
98
+ }, clock: { nowIso: () => nowIso({ clock: deps.clock }) }, historyStore }, { triggeredBy: "agent_tool", ...(required.onSettled ? { onSettled: required.onSettled } : {}) });
99
+ },
100
+ };
101
+ }
102
+ /** The plugin fingerprint binds exact inventory and operations canonically. Preserve that contract:
103
+ * response ordering alone must not invalidate a human's consent at the shared gateway. */
104
+ function inspectionPlanHash({ details, deps }, _options = {}) {
105
+ const inspected = details.inspection;
106
+ if (!inspected?.domains)
107
+ throw new Error('Domain publish plan has no domain inspection');
108
+ return deps.planHashOf({ details: { ...details, inspection: { resourceName: inspected.resourceName, targetId: inspected.targetId,
109
+ hostingChanges: inspected.hostingChanges, domainFingerprint: inspected.domains.fingerprint } } });
110
+ }
111
+ //# sourceMappingURL=domain-publish-tool.js.map
@@ -0,0 +1,24 @@
1
+ import type { DeployTargetInspection } from '@jini-ai/devops/deploy/site/deploy-targets/types';
2
+ import { type StaticPublishDeps } from './adapter.js';
3
+ import type { StaticPublishConfig } from '@jini-ai/devops/deploy/site/static-publish/types';
4
+ export interface StaticPublishInspectionInput {
5
+ readonly workspaceId: string;
6
+ readonly config: StaticPublishConfig;
7
+ readonly projectName: string;
8
+ readonly credentialId?: string;
9
+ }
10
+ export interface StaticPublishInspection {
11
+ readonly inspection?: DeployTargetInspection;
12
+ readonly credentialId?: string;
13
+ /** Internal binding only; never returned to a model or browser. */
14
+ readonly credentialBinding?: string;
15
+ }
16
+ /** Provider inspection is an explicit authenticated READ, unlike the local readiness check.
17
+ * Reuses the exact workspace/worksFor-aware credential resolver used by execution. Secrets remain
18
+ * server-side; providers without inspection retain their existing non-decrypting preview behavior.
19
+ * @complexity One registry/credential read plus the plugin's bounded inventory reads. */
20
+ export declare function inspectStaticPublish({ deps, input }: {
21
+ deps: StaticPublishDeps;
22
+ input: StaticPublishInspectionInput;
23
+ }, _options?: {}): Promise<StaticPublishInspection>;
24
+ //# sourceMappingURL=inspection.d.ts.map