@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,38 @@
1
+ /** `deployment_preview_static_publish`'s input — the same target-discriminated shape
2
+ * `publish-site.ts`'s trigger route body uses, with optional `projectName` for authenticated provider inspection. A preview never runs a real
3
+ * publish. Reused (spread) by
4
+ * {@link EXECUTE_STATIC_PUBLISH_SCHEMA} below, which adds the one field a real publish needs. */
5
+ const PREVIEW_STATIC_PUBLISH_SCHEMA = {
6
+ type: "object",
7
+ // Each host's own config fields (its `configFields` in deployment_get_static_publish_capabilities),
8
+ // as top-level strings. The handler refuses any key the chosen host does not declare.
9
+ additionalProperties: { type: "string" },
10
+ required: ["target"],
11
+ properties: {
12
+ projectName: { type: "string", title: "Project name", description: "Use the same project label at preview and execute. Required for authenticated provider resource/domain inspection." },
13
+ credentialId: { type: "string", title: "Saved connection", description: "Optional saved connection chosen by the person; preview and execute use this exact connection." },
14
+ target: {
15
+ type: "string",
16
+ title: "Hosting provider",
17
+ description: "Which host to publish to: one of the providerId values deployment_get_static_publish_capabilities lists. Pass that host's configFields as top-level string fields next to target (for example { target, <fieldName>: '<value>' }); a field the host does not declare is refused. The base path is computed from the host and the config, never passed in.",
18
+ },
19
+ },
20
+ };
21
+ /** `deployment_execute_static_publish`'s input — {@link PREVIEW_STATIC_PUBLISH_SCHEMA}'s fields plus
22
+ * `projectName`, the one field a real publish needs that a preview does not. Carries only an optional saved connection ID, never a
23
+ * token or usable credential — see this file's header for why that is structural, not just
24
+ * undocumented. */
25
+ export const EXECUTE_STATIC_PUBLISH_SCHEMA = {
26
+ type: "object",
27
+ additionalProperties: PREVIEW_STATIC_PUBLISH_SCHEMA.additionalProperties,
28
+ required: ["target", "projectName"],
29
+ properties: {
30
+ ...PREVIEW_STATIC_PUBLISH_SCHEMA.properties,
31
+ projectName: {
32
+ type: "string",
33
+ title: "Project name",
34
+ description: "Human-facing label for this publish run: the host uses it as the commit message or the project-name seed. 1-200 characters.",
35
+ },
36
+ },
37
+ };
38
+ //# sourceMappingURL=publish-tool-schema.js.map
@@ -0,0 +1,54 @@
1
+ import type { DeployFile, DeployTarget } from '../../index.js';
2
+ import type { StaticPublishDeps, StaticPublishInput } from './adapter.js';
3
+ import type { StaticPublishOutcome } from './types.js';
4
+ import type { ExportReport as BaseExportReport } from '../../../static-export/contracts.js';
5
+ type ExportReport = BaseExportReport & {
6
+ consentWarning?: string;
7
+ };
8
+ /** Normalizes an `ExportedRoute`/`ExportedAsset`'s `outputFile` (already deploy-relative, per that
9
+ * interface's own doc) to forward slashes — `path.relative` uses the platform separator, and every
10
+ * deploy target in `@jini-ai/devops` treats `DeployFile.file` as a literal repo/deployment path,
11
+ * where a stray backslash on a Windows host would be be a wrong path, not a normalized one.
12
+ *
13
+ * `contentType` also accepts `null` here (as well as the caller simply omitting it): `ExportedRoute`/
14
+ * `ExportedAsset` carry it as `string | null` because a fetched response can genuinely have no
15
+ * `Content-Type` header — see that interface's own doc. `DeployFile.contentType` has no concept of
16
+ * `null`, so both "absent" states collapse to "omit the field" the same way here, at the one place
17
+ * that actually needs the narrower `string | undefined` shape. */
18
+ export declare function toDeployFile(entry: {
19
+ outputFile: string;
20
+ data: string | Buffer;
21
+ contentType?: string | null;
22
+ }): DeployFile;
23
+ /**
24
+ * Runs `input.exportSiteBound` for this one publish run into `outputDir`, translating both a thrown
25
+ * export failure and a report carrying a failed route/asset into {@link publishStaticSite}'s own
26
+ * `{ok:false, code:"EXPORT_FAILED"}` channel. Cleans up the run's output directory in every case
27
+ * (thrown, failed-report, or success) — see {@link cleanupPublishRunDir}'s own doc for why the
28
+ * directory is safe to remove immediately once this call has produced its in-memory `report`.
29
+ *
30
+ * Checks BOTH `routes.failed` and `assets.failed` (HIGH audit finding, 2026-08-19 Codex sol bug/
31
+ * architecture audit) — this used to check only `routes.failed`, so a page could export fine while
32
+ * its own stylesheet or hero image 404s and publishing would still report success. See
33
+ * `firstExportFailure`'s own doc (`site-export/export-failure-summary`) for the shared check both this
34
+ * function and `commit-site.ts`'s `commitSiteToSourceControl` now use.
35
+ */
36
+ export declare function runExportForPublish({ deps, input, outputDir, basePath, target }: {
37
+ deps: StaticPublishDeps;
38
+ input: StaticPublishInput;
39
+ outputDir: string;
40
+ basePath: string | undefined;
41
+ target: DeployTarget;
42
+ }, _options?: {}): Promise<{
43
+ ok: true;
44
+ report: ExportReport;
45
+ } | {
46
+ ok: false;
47
+ outcome: StaticPublishOutcome;
48
+ }>;
49
+ /** Maps a successful export `report` to the `DeployFile[]` a target's `publish()` takes. A host's
50
+ * own extra files (a header config, a marker file) are its module's job, never this one's.
51
+ * @complexity O(n) in the exported route + asset count. */
52
+ export declare function buildDeployFilesForPublish(report: ExportReport): DeployFile[];
53
+ export {};
54
+ //# sourceMappingURL=adapter-export.d.ts.map
@@ -0,0 +1,89 @@
1
+ import path from 'node:path';
2
+ /** Best-effort cleanup of one run's isolated export directory (see {@link publishOutputDir}'s own
3
+ * doc). Safe to call once `exportSiteBound` has returned or thrown: every byte `publishStaticSite`
4
+ * still needs travels through `report.routes.succeeded`/`report.assets.succeeded`'s own `data`
5
+ * fields (captured in memory at write time — `site-exporter.ts`'s own "reachable as DATA" header),
6
+ * never by re-reading this directory, so removing it here cannot affect anything downstream. Never
7
+ * throws: a cleanup failure (a stray permission error, a file another process still holds open)
8
+ * must not turn an otherwise-successful publish into a reported failure — the same best-effort,
9
+ * disclosed-rather-than-silent posture `publish-run.ts`'s `recordHistoryIfPublished` already
10
+ * documents for an analogous non-essential side effect.
11
+ * @complexity O(n) in the (typically small) exported file count — a recursive directory removal. */
12
+ function cleanupPublishRunDir({ deps, outputDir }, _options = {}) {
13
+ try {
14
+ deps.rmSync(outputDir, { recursive: true, force: true });
15
+ }
16
+ catch {
17
+ // Swallowed deliberately — see this function's own doc.
18
+ }
19
+ }
20
+ /** Normalizes an `ExportedRoute`/`ExportedAsset`'s `outputFile` (already deploy-relative, per that
21
+ * interface's own doc) to forward slashes — `path.relative` uses the platform separator, and every
22
+ * deploy target in `@jini-ai/devops` treats `DeployFile.file` as a literal repo/deployment path,
23
+ * where a stray backslash on a Windows host would be be a wrong path, not a normalized one.
24
+ *
25
+ * `contentType` also accepts `null` here (as well as the caller simply omitting it): `ExportedRoute`/
26
+ * `ExportedAsset` carry it as `string | null` because a fetched response can genuinely have no
27
+ * `Content-Type` header — see that interface's own doc. `DeployFile.contentType` has no concept of
28
+ * `null`, so both "absent" states collapse to "omit the field" the same way here, at the one place
29
+ * that actually needs the narrower `string | undefined` shape. */
30
+ export function toDeployFile(entry) {
31
+ return {
32
+ file: entry.outputFile.split(path.sep).join("/"),
33
+ data: entry.data,
34
+ ...(entry.contentType !== undefined && entry.contentType !== null ? { contentType: entry.contentType } : {}),
35
+ };
36
+ }
37
+ /**
38
+ * Runs `input.exportSiteBound` for this one publish run into `outputDir`, translating both a thrown
39
+ * export failure and a report carrying a failed route/asset into {@link publishStaticSite}'s own
40
+ * `{ok:false, code:"EXPORT_FAILED"}` channel. Cleans up the run's output directory in every case
41
+ * (thrown, failed-report, or success) — see {@link cleanupPublishRunDir}'s own doc for why the
42
+ * directory is safe to remove immediately once this call has produced its in-memory `report`.
43
+ *
44
+ * Checks BOTH `routes.failed` and `assets.failed` (HIGH audit finding, 2026-08-19 Codex sol bug/
45
+ * architecture audit) — this used to check only `routes.failed`, so a page could export fine while
46
+ * its own stylesheet or hero image 404s and publishing would still report success. See
47
+ * `firstExportFailure`'s own doc (`site-export/export-failure-summary`) for the shared check both this
48
+ * function and `commit-site.ts`'s `commitSiteToSourceControl` now use.
49
+ */
50
+ export async function runExportForPublish({ deps, input, outputDir, basePath, target }, _options = {}) {
51
+ let report;
52
+ try {
53
+ const publicUrl = await target.resolvePublicUrl?.({ projectName: input.projectName }, {});
54
+ // Render for the destination, never the local site's saved domain. A target that cannot name its
55
+ // URL gets the domainless copy (no canonical, sitemap or feed), the same as a download without one.
56
+ report = await input.exportSiteBound({ outputDir, clean: true, ...(basePath !== undefined ? { basePath } : {}), ...(publicUrl ? { publicUrl } : {}) });
57
+ }
58
+ catch (err) {
59
+ cleanupPublishRunDir({ deps, outputDir });
60
+ return {
61
+ ok: false,
62
+ outcome: {
63
+ ok: false,
64
+ code: "EXPORT_FAILED",
65
+ message: `export failed before publishing could start: ${err instanceof Error ? err.message : String(err)}`,
66
+ },
67
+ };
68
+ }
69
+ cleanupPublishRunDir({ deps, outputDir });
70
+ const failure = deps.firstExportFailure(report);
71
+ if (failure) {
72
+ return {
73
+ ok: false,
74
+ outcome: {
75
+ ok: false,
76
+ code: "EXPORT_FAILED",
77
+ message: `refused to publish: ${failure.count} ${failure.kind}(s) failed to export (first: '${failure.identifier}' — ${failure.reason}). Call deployment_diagnose_static_export for the full list.`,
78
+ },
79
+ };
80
+ }
81
+ return { ok: true, report };
82
+ }
83
+ /** Maps a successful export `report` to the `DeployFile[]` a target's `publish()` takes. A host's
84
+ * own extra files (a header config, a marker file) are its module's job, never this one's.
85
+ * @complexity O(n) in the exported route + asset count. */
86
+ export function buildDeployFilesForPublish(report) {
87
+ return [...report.routes.succeeded.map(toDeployFile), ...report.assets.succeeded.map(toDeployFile)];
88
+ }
89
+ //# sourceMappingURL=adapter-export.js.map
@@ -0,0 +1,99 @@
1
+ import type { DeployTargetRegistry, LoadedDeployTarget } from '../deploy-targets/types.js';
2
+ import type { StaticPublishConfig, StaticPublishTargetId } from './types.js';
3
+ import type { StaticPublishDeps, StaticPublishInput } from './adapter.js';
4
+ /** {@link planStaticPublish}'s answer: the resolved target and the base path it serves from, or a
5
+ * human-readable refusal safe to return over an HTTP/tool boundary. */
6
+ export type StaticPublishPlan = {
7
+ readonly ok: true;
8
+ readonly target: LoadedDeployTarget;
9
+ readonly basePath?: string;
10
+ } | {
11
+ readonly ok: false;
12
+ readonly message: string;
13
+ };
14
+ /**
15
+ * Resolves `config.target` in `registry` and checks `config` against it: every required descriptor
16
+ * field present and non-blank, then the module's own `validateConfig`. Pure given the registry, so
17
+ * the admin preview, the agent tools and a real publish all reach the SAME verdict and base path.
18
+ *
19
+ * @returns The plan, or the first refusal. Messages never echo more than the offending field.
20
+ * @complexity O(f) declared config fields plus the module's own (constant-size) checks.
21
+ */
22
+ export declare function planStaticPublish({ registry, config }: {
23
+ registry: DeployTargetRegistry;
24
+ config: StaticPublishConfig;
25
+ }, _optional?: Record<string, never>): StaticPublishPlan;
26
+ /** The refusal for the first descriptor-required field `config` leaves absent or blank, else `null`.
27
+ * Exported so the admin preview can answer a missing field as a malformed request (400) while a
28
+ * present-but-invalid value stays a 200 `valid:false`. @complexity O(f) declared config fields. */
29
+ export declare function missingRequiredFieldMessage({ target, config }: {
30
+ target: LoadedDeployTarget;
31
+ config: StaticPublishConfig;
32
+ }, _optional?: Record<string, never>): string | null;
33
+ /** The refusal for an id the registry does not know, naming what IS available. @complexity O(t). */
34
+ export declare function unknownTargetMessage({ registry, targetId }: {
35
+ registry: DeployTargetRegistry;
36
+ targetId: string;
37
+ }, _options?: {}): string;
38
+ /**
39
+ * Builds a publish config from loosely-typed input (a JSON body, a query string, a tool input):
40
+ * `target` plus every descriptor-declared field that arrived as a string. Unknown keys are dropped,
41
+ * so nothing a caller invents reaches a module. Whether required fields are present is judged once,
42
+ * by {@link planStaticPublish}.
43
+ *
44
+ * @param required.options.blankAsAbsent - `true` for a query string or tool input, where an empty optional field
45
+ * means "not set"; `false` for a JSON body, which keeps it so the module can refuse it by name.
46
+ * @returns The config, or the refusal for a declared field that arrived as a non-string.
47
+ * @complexity O(f) declared fields.
48
+ */
49
+ export declare function readStaticPublishConfig({ target, raw, options }: {
50
+ target: LoadedDeployTarget;
51
+ raw: Readonly<Record<string, unknown>>;
52
+ options: {
53
+ readonly blankAsAbsent: boolean;
54
+ };
55
+ }, _options?: {}): {
56
+ readonly ok: true;
57
+ readonly config: StaticPublishConfig;
58
+ } | {
59
+ readonly ok: false;
60
+ readonly message: string;
61
+ };
62
+ /**
63
+ * Each publish RUN gets its OWN directory under `infra/` (the Docker-volume-mounted directory every
64
+ * other export/publish artifact already lives under) — `<parent>/<target>/<runId>`, not merely
65
+ * `<parent>/<target>`. Exported (not merely internal) specifically so this per-run isolation is
66
+ * directly testable.
67
+ *
68
+ * MEDIUM audit finding (2026-08-19, Codex sol bug/architecture audit): a fixed `<parent>/<target>`
69
+ * directory meant two publishes overlapping for the SAME target — the admin UI and a confirmed
70
+ * agent tool call, or two OS processes (`publish-run.ts`'s own header discloses its single-flight
71
+ * guard is process-local only, a DELIBERATE, disclosed gap this fix closes as a side effect) — could
72
+ * `clean:true` and rewrite the same directory out from under each other. `runId` (always a fresh
73
+ * `input.idGen.newId()` value, minted once per {@link publishStaticSite} call) makes that
74
+ * collision structurally impossible: no lock is needed because there is no longer anything shared to
75
+ * lock. The directory is disposable once `exportSiteBound` returns — see
76
+ * {@link cleanupPublishRunDir}'s own doc for why nothing downstream re-reads it from disk.
77
+ *
78
+ * `parent` is `RouteDeps.publishOutputRootDir` (the host publish-directory setting, then `infra/publish` —
79
+ * mirroring `export-site.ts`'s own export-directory setting), resolved ONCE by the composition root
80
+ * (`host src/server/runtime/composition/app.ts`/`host src/server/runtime/composition/deps.ts`) and threaded through as {@link StaticPublishInput.publishOutputRootDir}
81
+ * (2026-08-20 RouteDeps-narrowing fix — this used to be `input.routeDeps.publishOutputRootDir`; the
82
+ * field moved, the value and its single-resolution-point discipline did not) — never read from
83
+ * `process.env` in this file. A test overrides it the same way it always did: by setting
84
+ * `publishOutputRootDir` on the fake `StaticPublishInput` it constructs, not by mutating real process
85
+ * env vars.
86
+ * @complexity O(1) — fixed-shape path join, no I/O.
87
+ */
88
+ export declare function publishOutputDir({ parent, target, runId }: {
89
+ parent: string;
90
+ target: StaticPublishTargetId;
91
+ runId: string;
92
+ }, _options?: {}): string;
93
+ /**
94
+ * Loads this workspace's registry and plans the publish against it. Every registry refusal (a plugin
95
+ * or module that did not load) is logged, never returned: the caller's answer is about ITS target.
96
+ * @complexity One registry load (see `loadDeployTargetRegistry`).
97
+ */
98
+ export declare function resolvePublishPlan(deps: StaticPublishDeps, input: StaticPublishInput): Promise<StaticPublishPlan>;
99
+ //# sourceMappingURL=adapter-plan.d.ts.map
@@ -0,0 +1,112 @@
1
+ import path from 'node:path';
2
+ /**
3
+ * Resolves `config.target` in `registry` and checks `config` against it: every required descriptor
4
+ * field present and non-blank, then the module's own `validateConfig`. Pure given the registry, so
5
+ * the admin preview, the agent tools and a real publish all reach the SAME verdict and base path.
6
+ *
7
+ * @returns The plan, or the first refusal. Messages never echo more than the offending field.
8
+ * @complexity O(f) declared config fields plus the module's own (constant-size) checks.
9
+ */
10
+ export function planStaticPublish({ registry, config }, _optional = {}) {
11
+ const target = registry.get(config.target);
12
+ if (target === undefined)
13
+ return { ok: false, message: unknownTargetMessage({ registry, targetId: config.target }) };
14
+ const missing = missingRequiredFieldMessage({ target, config });
15
+ if (missing !== null)
16
+ return { ok: false, message: missing };
17
+ const moduleConfig = config;
18
+ const configError = target.module.validateConfig?.(moduleConfig);
19
+ if (configError)
20
+ return { ok: false, message: configError };
21
+ const basePath = target.module.basePath?.(moduleConfig);
22
+ return { ok: true, target, ...(basePath !== undefined ? { basePath } : {}) };
23
+ }
24
+ /** The refusal for the first descriptor-required field `config` leaves absent or blank, else `null`.
25
+ * Exported so the admin preview can answer a missing field as a malformed request (400) while a
26
+ * present-but-invalid value stays a 200 `valid:false`. @complexity O(f) declared config fields. */
27
+ export function missingRequiredFieldMessage({ target, config }, _optional = {}) {
28
+ for (const field of target.descriptor.configFields) {
29
+ const value = config[field.name];
30
+ if (field.required && (typeof value !== "string" || value.trim() === "")) {
31
+ return `'${field.name}' (non-empty string) is required for target '${config.target}'`;
32
+ }
33
+ }
34
+ return null;
35
+ }
36
+ /** The refusal for an id the registry does not know, naming what IS available. @complexity O(t). */
37
+ export function unknownTargetMessage({ registry, targetId }, _options = {}) {
38
+ const ids = registry.list().map((target) => target.descriptor.id);
39
+ if (ids.length === 0)
40
+ return `publish target '${targetId.slice(0, 64)}' is not available: no publish targets are installed (turn on a hosting plugin under Agent Plugins)`;
41
+ return `publish target '${targetId.slice(0, 64)}' is not available; choose one of: ${ids.join(", ")}`;
42
+ }
43
+ /**
44
+ * Builds a publish config from loosely-typed input (a JSON body, a query string, a tool input):
45
+ * `target` plus every descriptor-declared field that arrived as a string. Unknown keys are dropped,
46
+ * so nothing a caller invents reaches a module. Whether required fields are present is judged once,
47
+ * by {@link planStaticPublish}.
48
+ *
49
+ * @param required.options.blankAsAbsent - `true` for a query string or tool input, where an empty optional field
50
+ * means "not set"; `false` for a JSON body, which keeps it so the module can refuse it by name.
51
+ * @returns The config, or the refusal for a declared field that arrived as a non-string.
52
+ * @complexity O(f) declared fields.
53
+ */
54
+ export function readStaticPublishConfig({ target, raw, options }, _options = {}) {
55
+ const config = { target: target.descriptor.id };
56
+ for (const field of target.descriptor.configFields) {
57
+ const value = raw[field.name];
58
+ if (value === undefined || (options.blankAsAbsent && typeof value === "string" && value.trim() === ""))
59
+ continue;
60
+ if (typeof value !== "string")
61
+ return { ok: false, message: `'${field.name}' must be a string` };
62
+ config[field.name] = value;
63
+ }
64
+ return { ok: true, config: config };
65
+ }
66
+ /**
67
+ * Each publish RUN gets its OWN directory under `infra/` (the Docker-volume-mounted directory every
68
+ * other export/publish artifact already lives under) — `<parent>/<target>/<runId>`, not merely
69
+ * `<parent>/<target>`. Exported (not merely internal) specifically so this per-run isolation is
70
+ * directly testable.
71
+ *
72
+ * MEDIUM audit finding (2026-08-19, Codex sol bug/architecture audit): a fixed `<parent>/<target>`
73
+ * directory meant two publishes overlapping for the SAME target — the admin UI and a confirmed
74
+ * agent tool call, or two OS processes (`publish-run.ts`'s own header discloses its single-flight
75
+ * guard is process-local only, a DELIBERATE, disclosed gap this fix closes as a side effect) — could
76
+ * `clean:true` and rewrite the same directory out from under each other. `runId` (always a fresh
77
+ * `input.idGen.newId()` value, minted once per {@link publishStaticSite} call) makes that
78
+ * collision structurally impossible: no lock is needed because there is no longer anything shared to
79
+ * lock. The directory is disposable once `exportSiteBound` returns — see
80
+ * {@link cleanupPublishRunDir}'s own doc for why nothing downstream re-reads it from disk.
81
+ *
82
+ * `parent` is `RouteDeps.publishOutputRootDir` (the host publish-directory setting, then `infra/publish` —
83
+ * mirroring `export-site.ts`'s own export-directory setting), resolved ONCE by the composition root
84
+ * (`host src/server/runtime/composition/app.ts`/`host src/server/runtime/composition/deps.ts`) and threaded through as {@link StaticPublishInput.publishOutputRootDir}
85
+ * (2026-08-20 RouteDeps-narrowing fix — this used to be `input.routeDeps.publishOutputRootDir`; the
86
+ * field moved, the value and its single-resolution-point discipline did not) — never read from
87
+ * `process.env` in this file. A test overrides it the same way it always did: by setting
88
+ * `publishOutputRootDir` on the fake `StaticPublishInput` it constructs, not by mutating real process
89
+ * env vars.
90
+ * @complexity O(1) — fixed-shape path join, no I/O.
91
+ */
92
+ export function publishOutputDir({ parent, target, runId }, _options = {}) {
93
+ return path.join(parent, target, runId);
94
+ }
95
+ /**
96
+ * Loads this workspace's registry and plans the publish against it. Every registry refusal (a plugin
97
+ * or module that did not load) is logged, never returned: the caller's answer is about ITS target.
98
+ * @complexity One registry load (see `loadDeployTargetRegistry`).
99
+ */
100
+ export async function resolvePublishPlan(deps, input) {
101
+ let registry;
102
+ try {
103
+ registry = await deps.loadDeployTargets({ workspaceId: input.workspaceId });
104
+ }
105
+ catch (err) {
106
+ return { ok: false, message: `publish targets could not be loaded: ${err instanceof Error ? err.message : String(err)}` };
107
+ }
108
+ for (const refusal of registry.refusals)
109
+ deps.warn(`[static-publish] ${refusal}`);
110
+ return planStaticPublish({ registry, config: input.config });
111
+ }
112
+ //# sourceMappingURL=adapter-plan.js.map
@@ -0,0 +1,182 @@
1
+ export { planStaticPublish, missingRequiredFieldMessage, unknownTargetMessage, readStaticPublishConfig, publishOutputDir } from './adapter-plan.js';
2
+ export { toDeployFile } from './adapter-export.js';
3
+ export type { StaticPublishPlan } from './adapter-plan.js';
4
+ import type { ToolFailureDiagnostic } from "@jini-ai/core/contracts/site/daemon-tool-recovery";
5
+ import type { rmSync } from "node:fs";
6
+ import { type DeployFile, type DeployPublishProgress, type DeployTarget } from "@jini-ai/devops/deploy";
7
+ import type { ObservabilityPort } from "@jini-ai/core/contracts/observability";
8
+ import type { Tracker } from "@jini-ai/core/contracts/site/diagnostics-observability";
9
+ import type { DeployTargetRegistry, HostDeployTarget } from "@jini-ai/devops/deploy/site/deploy-targets/types";
10
+ import type { PluginDeployHostKit as DeployHostKit } from "@jini-ai/devops/deploy";
11
+ import type { DeployTargetCredential } from "@jini-ai/core/contracts/site/devops-deploy";
12
+ import type { FormReceiverPort } from "@jini-ai/core/contracts/site/cms-forms";
13
+ import type { ExportReport as BaseExportReport } from '../../../static-export/contracts.js';
14
+ type ExportReport = BaseExportReport & {
15
+ consentWarning?: string;
16
+ };
17
+ /**
18
+ * Imported from the LEAF `export-failure-summary.ts`, not from `site-export/index`.
19
+ *
20
+ * This is a runtime import, and that is the point: it adds exactly ONE module to this file's eager
21
+ * graph. Importing the same function through the barrel would add 65 (`express`, better-sqlite3,
22
+ * drizzle, handlebars, liquidjs and the whole theme/post/db graph, via `site-exporter.ts`), on a
23
+ * module reached from `assistant/tool-registrations.ts`. Avoiding that cost — not a cycle — is why
24
+ * this function was previously resolved by a call-time `require("site-export/index")`.
25
+ *
26
+ * The `require()` is gone because it was corrupting coverage: under `tsx` it loaded the barrel and
27
+ * its whole graph a second time through the CJS hook, and the two images merged into one broken
28
+ * lcov block per file. Measured 2026-09-05 at 45 contaminated first-party blocks, 28 SEVERE, from
29
+ * this one call site. Pinned by `features/source-control/__tests__/commit-site-export-resolution.unit.test.ts`.
30
+ *
31
+ * On the cycle the old comment here described (`adapter.ts -> export/index.ts ->
32
+ * site-exporter.ts -> server/app.ts -> ... -> src/assistant`): that back-edge no longer exists.
33
+ * `site-exporter.ts` dropped its `server/app.ts` import in the 2026-08-16 rework, and its current
34
+ * runtime imports are `node:*`, an `express` TYPE, `core contracts` and
35
+ * `theme/index` — nothing under `server/` or `assistant/`. The leaf module imports
36
+ * nothing at runtime at all, so it cannot participate in a cycle regardless.
37
+ */
38
+ import type { firstExportFailure } from "../../../core/export-failure-summary.js";
39
+ import type { PublishCredentialSource, StaticPublishConfig, StaticPublishOutcome } from "@jini-ai/devops/deploy/site/static-publish/types";
40
+ /** The resolved credential a `DeployTarget` is built from: `token` plus the host's other declared
41
+ * credential fields (see `types.ts`'s `PublishCredentialSource.resolve()` doc). */
42
+ export type ResolvedPublishCredential = DeployTargetCredential;
43
+ export interface StaticPublishDeps {
44
+ readonly publishJobs: ReturnType<typeof import('../../index.js').createPublishJobStore<StaticPublishOutcome>>;
45
+ readonly redactSecretShapes: (required: {
46
+ text: string;
47
+ }) => {
48
+ text: string;
49
+ };
50
+ readonly createNoopTracker: (required: Record<string, never>) => Tracker;
51
+ readonly createDeployHostKit: (required: {
52
+ observability?: ObservabilityPort;
53
+ }) => DeployHostKit;
54
+ readonly defaultPublicPageSecurityHeaders: () => import("@jini-ai/core/contracts/server/security-headers").SecurityHeaderSet;
55
+ readonly firstExportFailure: (report: ExportReport) => ReturnType<typeof firstExportFailure>;
56
+ readonly rmSync: typeof rmSync;
57
+ readonly warn: typeof console.warn;
58
+ readonly rewriteFormActions: (required: {
59
+ files: DeployFile[];
60
+ submitUrl: string;
61
+ }) => DeployFile[];
62
+ readonly issueCredentialSetup: (required: {
63
+ setupToolId: string;
64
+ prefill: Readonly<Record<string, string | number | boolean | null>>;
65
+ }, optional: Record<string, never>) => ToolFailureDiagnostic;
66
+ readonly credentialSource: PublishCredentialSource;
67
+ /** Current public policy supplied by the host; publishing carries it to the target as data. */
68
+ readonly publicPageSecurityHeaders?: () => import("@jini-ai/core/contracts/server/security-headers").SecurityHeaderSet;
69
+ /** External hosts of enabled plugin exports, added to the site-wide header set a static host applies. */
70
+ readonly pluginExportHosts?: () => Promise<import("@jini-ai/core/contracts/server/security-headers").DeclaredPageHosts>;
71
+ /** This workspace's plugin-contributed deploy targets (`deploy-targets/registry.ts`): the only
72
+ * place a target id, its config fields and its host behavior come from. */
73
+ readonly loadDeployTargets: ({ workspaceId }: {
74
+ workspaceId: string;
75
+ }, optional?: Record<string, never>) => Promise<DeployTargetRegistry>;
76
+ /** Test seam: builds the `DeployTarget` in place of the resolved module's `create()`. Config
77
+ * checks and the base path still come from the registry. */
78
+ readonly buildTarget?: (config: StaticPublishConfig, credential: ResolvedPublishCredential) => DeployTarget;
79
+ /** The kit handed to a plugin module. Defaults to {@link createDeployHostKit}; tests inject one. */
80
+ readonly hostKit?: DeployHostKit;
81
+ /** `RouteDeps.observability`: the default kit traces the plugin's egress through it. */
82
+ readonly observability?: ObservabilityPort;
83
+ readonly tracker?: Tracker;
84
+ /** The site's form submissions destination. Absent: publishing carries no forms (the old behavior). */
85
+ readonly formDestination?: StaticPublishFormDestinationPort;
86
+ }
87
+ /** What a publish does with the site's forms (`features/form-destinations/port.ts`): selection,
88
+ * receiver keys and an external receiver's `prepare` all live behind it. The receiver key is
89
+ * created on the first publish with active forms and saved only after that publish reaches the host. */
90
+ export type StaticPublishFormDestinationPort = FormReceiverPort;
91
+ /**
92
+ * The composition-root-bound export call this domain takes instead of `RouteDeps` itself (2026-08-20
93
+ * RouteDeps-narrowing fix, continuing `src/features/source-control/commit-site.ts`'s own
94
+ * `ExportSiteBoundFn` fix onto this sibling domain — see that file's doc for the fuller design
95
+ * rationale, and `server/routes/types.ts`'s `RouteDeps.exportSiteBound` doc for why this shape is
96
+ * deliberately NOT the same as `RouteDeps.runExportSite`/`ExportEngine<RouteDeps>`).
97
+ *
98
+ * Declared locally, never imported from `RouteDeps` or from `commit-site.ts`'s identical copy — same
99
+ * "duplicate the tiny type, never share across features" convention that file's own doc documents,
100
+ * and the same one this file already followed for `OWNER_PATTERN`/`REPO_PATTERN`/`BRANCH_PATTERN`.
101
+ */
102
+ export type ExportSiteBoundFn = (options: {
103
+ outputDir: string;
104
+ clean?: boolean;
105
+ basePath?: string;
106
+ publicUrl?: string;
107
+ }) => Promise<ExportReport>;
108
+ export interface StaticPublishInput {
109
+ /** Initiating tool execution, for scoped recovery after a lost response. */
110
+ readonly requestId?: string;
111
+ /** Job-owned progress, independent of a delegated call lifetime. */
112
+ readonly onProgress?: (required: {
113
+ progress: DeployPublishProgress;
114
+ }, options?: object) => void;
115
+ /** Authenticated caller attribution, supplied by the HTTP/tool adapter, never publish config. */
116
+ readonly productEvent?: {
117
+ readonly userId: string;
118
+ readonly source: "admin" | "assistant";
119
+ };
120
+ /** Server-held approval from the existing human exchange/gateway; never read from JSON input. */
121
+ readonly domainApproval?: {
122
+ readonly credentialBinding: string;
123
+ readonly plan: NonNullable<import("@jini-ai/devops/deploy/site/deploy-targets/types").DeployTargetInspection["domains"]>;
124
+ readonly authorize: (required: {
125
+ readonly fingerprint: string;
126
+ readonly accountId: string;
127
+ }) => Promise<boolean>;
128
+ };
129
+ readonly workspaceId: string;
130
+ /** `RouteDeps.publishOutputRootDir`, threaded down rather than the whole `RouteDeps` bag — see
131
+ * {@link ExportSiteBoundFn}'s own doc immediately above for why. */
132
+ readonly publishOutputRootDir: string;
133
+ readonly idGen: {
134
+ newId(): string;
135
+ };
136
+ /** The pre-bound export call — see {@link ExportSiteBoundFn}'s own doc for what it is and why it
137
+ * replaces the `routeDeps: RouteDeps` field this input used to carry. */
138
+ readonly exportSiteBound: ExportSiteBoundFn;
139
+ readonly config: StaticPublishConfig;
140
+ /** Human-facing label — becomes e.g. a commit message subject or a host project-name seed.
141
+ * Sanitized further by the host's deploy target; validated here only
142
+ * for length and non-blankness. */
143
+ readonly projectName: string;
144
+ /** The saved connection the OPERATOR chose for this publish, when the caller has one (terra review
145
+ * 2026-09-20, finding 1 — Critical). Passed through to `credentialSource.resolve()` VERBATIM and
146
+ * validated there, never here: this module has no repo/sealer and no way to judge an id. Absent
147
+ * means the caller genuinely has no chosen connection (`deployment_execute_static_publish`, and
148
+ * any install whose credentials come from server env vars) and the established default lookup
149
+ * applies — see `./types.ts`'s `PublishCredentialSource.resolve` doc for that contract. */
150
+ readonly credentialId?: string;
151
+ }
152
+ /**
153
+ * Publishes the host's current site content to `input.config.target`. Always runs a fresh, `clean`
154
+ * export with the target-correct base path immediately before publishing (see this file's header)
155
+ * — never reuses a previously-produced export directory.
156
+ *
157
+ * Never throws: every failure (an unknown target or bad config, a registry that will not load, a
158
+ * credential that does not resolve — including a genuine DECRYPT failure, see
159
+ * {@link resolvePublishCredentialForSite} — a failed export, a credential unusable for the target, or
160
+ * a rejected `publish()` call) is returned as `{ok: false, code, message}`. `message` is always built
161
+ * from `err.message`, never a raw `DeployError.details`/response-body object. Every caller
162
+ * (`publish-site.ts`'s HTTP route, `deployment_execute_static_publish`) relies on this.
163
+ *
164
+ * Orchestrates its work as a flat sequence of steps, each translating its own failure mode into this
165
+ * function's `{ok:false, code, message}` channel and returning early: {@link resolvePublishPlan},
166
+ * {@link resolvePublishCredentialForSite}, {@link runExportForPublish}, {@link constructTargetForPublish},
167
+ * then {@link publishAndMapOutcome} for the terminal result.
168
+ *
169
+ * @complexity One registry load, one `exportSite` pass (O(routes + assets) HTTP requests against the
170
+ * in-process app) plus one `DeployTarget.publish()` call (bounded by that target's own poll budget).
171
+ */
172
+ export declare function publishStaticSite(deps: StaticPublishDeps, input: StaticPublishInput): Promise<StaticPublishOutcome>;
173
+ /**
174
+ * Adapts an installed module's target to devops' {@link DeployTarget} port. Installed
175
+ * content-addressed modules keep their ABI: security headers still reach the first object, and
176
+ * `checkReachability` takes the bare URL string, so the port's `{ url }` is unwrapped here.
177
+ * @param installedTarget What the plugin module's `create` returned.
178
+ * @returns The same target behind the devops port.
179
+ * @complexity O(1); each call forwards once.
180
+ */
181
+ export declare function adaptInstalledTarget(installedTarget: HostDeployTarget): DeployTarget;
182
+ //# sourceMappingURL=adapter.d.ts.map