@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,155 @@
1
+ import { parseDeployConfigsFile, type DeployConfigGeneratorDescriptor, type DeployConfigGeneratorRegistry, type LoadedDeployConfigGenerator } from "../config-descriptors.js";
2
+ import type { DeployConfigGeneratorModule } from "../config-contracts.js";
3
+ /**
4
+ * @file Loads the deploy-config generators behind a host CLI's `deploy config --target <id>` from an
5
+ * Agent Plugin, so core names no hosting vendor. A plugin opts in by shipping the host-named manifest
6
+ * (`ports.filename`, injected) at its root: `{ schemaVersion: 1, generators: [{ id, label, module }] }`,
7
+ * in the order the CLI lists them. Each `module` is a plain-JS `.mjs` file inside the plugin whose
8
+ * default export is a `DeployConfigGeneratorModule`.
9
+ *
10
+ * Only the SOURCE loader exists today: its one caller, the CLI, runs at the repo root and reads the
11
+ * product's own bundled plugin sources, the same trust basis as the hermetic composition root. Module
12
+ * imports still go through the shared containment gate (agent-plugins' `trusted-plugin-files.ts`,
13
+ * reached through the injected `defineExecutableContribution`/`loadFromSource`). A workspace-installed
14
+ * variant (activation + bundled-digest gates) is added when an admin route needs one.
15
+ *
16
+ * Failure isolation: a bad manifest drops the plugin's generators, a bad module only itself; every
17
+ * drop is reported in `refusals`, never thrown. Cross-package duplicate ids are refused for all
18
+ * claimants, never silently overwritten.
19
+ */
20
+ /** Structural slice of agent-plugins' `TrustedPluginPackage`. */
21
+ export interface DeployConfigPluginSource {
22
+ readonly pluginId: string;
23
+ readonly packageRoot: string;
24
+ }
25
+ type ParseResult = ReturnType<typeof parseDeployConfigsFile>;
26
+ /** The executable contribution spec handed to the injected `defineExecutableContribution`. */
27
+ export interface DeployConfigContributionSpec {
28
+ readonly filename: string;
29
+ readonly contribution: string;
30
+ readonly parse: (input: {
31
+ readonly raw: string;
32
+ }) => ParseResult;
33
+ readonly modulePath: (input: {
34
+ readonly descriptor: DeployConfigGeneratorDescriptor;
35
+ }) => string;
36
+ readonly validate: (input: {
37
+ readonly exported: unknown;
38
+ }) => DeployConfigGeneratorModule | string;
39
+ readonly refusal: (input: {
40
+ readonly plugin: {
41
+ readonly pluginId: string;
42
+ };
43
+ readonly descriptor: DeployConfigGeneratorDescriptor;
44
+ readonly reason: string;
45
+ }) => string;
46
+ }
47
+ /** The data-only contribution definition handed to the injected `loadContributions`. */
48
+ export interface DeployWorkflowContributionDefinition {
49
+ readonly filename: string;
50
+ readonly contribution: string;
51
+ readonly kind: "data";
52
+ readonly parse: (input: {
53
+ readonly raw: string;
54
+ }) => ParseResult;
55
+ readonly load: (input: {
56
+ readonly descriptor: DeployConfigGeneratorDescriptor;
57
+ }) => DeployConfigGeneratorDescriptor;
58
+ readonly onReadError: () => readonly string[];
59
+ }
60
+ /** The installed-plugin loader a host binds (agent-plugins' active, trusted lifecycle). */
61
+ export type LoadDeployWorkflowContributions = (input: {
62
+ readonly workspaceId: string;
63
+ readonly definition: DeployWorkflowContributionDefinition;
64
+ }, optional: {
65
+ readonly requireActive: boolean;
66
+ readonly orderByPluginId: boolean;
67
+ }) => Promise<{
68
+ readonly items: readonly DeployConfigGeneratorDescriptor[];
69
+ readonly refusals: readonly string[];
70
+ }>;
71
+ /** Host collaborators (K3/K5): the product-named manifest file and the agent-plugins contribution seam. */
72
+ export interface DeployConfigRegistryPorts<Plugin extends DeployConfigPluginSource, Definition> {
73
+ /** The product-named manifest file a plugin ships at its root (host-owned). */
74
+ readonly filename: string;
75
+ /** The host's bundled plugin sources declaring `filename`, in plugin-id order. */
76
+ readonly contributionSources: (required: {
77
+ readonly sourceRoot: string;
78
+ readonly filename: string;
79
+ }) => readonly Plugin[];
80
+ readonly defineExecutableContribution: (spec: DeployConfigContributionSpec, optional: {
81
+ readonly onReadError: (input: {
82
+ readonly error: unknown;
83
+ }) => readonly string[] | undefined;
84
+ }) => Definition;
85
+ readonly loadFromSource: (input: {
86
+ readonly plugin: Plugin;
87
+ readonly definition: Definition;
88
+ }) => Promise<{
89
+ readonly items: readonly LoadedDeployConfigGenerator[];
90
+ readonly refusals: readonly string[];
91
+ }>;
92
+ /** Where installed-loader refusal lines go (the host's logger). */
93
+ readonly warn: (line: string) => void;
94
+ }
95
+ /** The registry functions bound to one host's ports. */
96
+ export interface DeployConfigGeneratorSource<Plugin extends DeployConfigPluginSource> {
97
+ loadDeployConfigGeneratorsFromSource(plugin: Plugin, _optional?: Record<string, never>): Promise<DeployConfigGeneratorRegistry>;
98
+ readDeployConfigTargetIdsFromSource(plugin: Plugin): readonly string[];
99
+ loadBundledDeployConfigGenerators(required: {
100
+ readonly sourceRoot: string;
101
+ }, _optional?: Record<string, never>): Promise<DeployConfigGeneratorRegistry>;
102
+ readBundledDeployConfigTargetIds(required: {
103
+ readonly sourceRoot: string;
104
+ }, _optional?: Record<string, never>): readonly string[];
105
+ readBundledDeployConfigDescriptors(required: {
106
+ readonly sourceRoot: string;
107
+ }, _optional?: object): readonly DeployConfigGeneratorDescriptor[];
108
+ readBundledDeployConfigCandidatePaths(required: {
109
+ readonly sourceRoot: string;
110
+ }, _optional?: object): readonly string[];
111
+ readBundledDeployWorkflowFile(required: {
112
+ readonly sourceRoot: string;
113
+ }, _optional?: object): string | undefined;
114
+ readBundledDeployWorkflowFiles(required: {
115
+ readonly sourceRoot: string;
116
+ }, _optional?: object): readonly string[];
117
+ loadDeployWorkflowFiles(required: {
118
+ readonly workspaceId: string;
119
+ readonly loadContributions: LoadDeployWorkflowContributions;
120
+ }, _optional?: object): Promise<readonly string[]>;
121
+ }
122
+ /**
123
+ * The generator ids a plugin's SOURCE directory declares, in declared order, read synchronously from
124
+ * its manifest without importing any module. For text built before any async work can run (the CLI's
125
+ * `--target` help). A missing or invalid manifest yields `[]`; the refusal itself is reported when the
126
+ * command actually loads the generators.
127
+ *
128
+ * @complexity O(g) in the declared generator count.
129
+ */
130
+ export declare function readDeployConfigTargetIdsFromSource({ plugin, filename }: {
131
+ readonly plugin: DeployConfigPluginSource;
132
+ readonly filename: string;
133
+ }, _optional?: {}): readonly string[];
134
+ /** Synchronous hints from shipped sources, using the generator parser and duplicate-id policy.
135
+ * @param required Product-owned bundled source root, manifest name and source lister.
136
+ * @returns Unambiguous descriptors, without importing modules. */
137
+ export declare function readBundledDeployConfigDescriptors<Plugin extends DeployConfigPluginSource>(required: {
138
+ readonly sourceRoot: string;
139
+ } & Pick<DeployConfigRegistryPorts<Plugin, unknown>, "filename" | "contributionSources">, _optional?: {}): readonly DeployConfigGeneratorDescriptor[];
140
+ /** Installed workflow hints use the same active, trusted lifecycle as deploy ops, without imports. */
141
+ export declare function loadDeployWorkflowFiles(required: {
142
+ readonly workspaceId: string;
143
+ readonly loadContributions: LoadDeployWorkflowContributions;
144
+ readonly filename: string;
145
+ readonly warn: (line: string) => void;
146
+ }, _options?: {}): Promise<readonly string[]>;
147
+ /**
148
+ * Binds the registry functions to one host's ports (composition happens once, in the host).
149
+ *
150
+ * @complexity O(1) to bind; each returned function documents its own cost (O(g) generators, one
151
+ * contained import each for the loaders).
152
+ */
153
+ export declare function createDeployConfigGeneratorSource<Plugin extends DeployConfigPluginSource, Definition>(ports: DeployConfigRegistryPorts<Plugin, Definition>, _optional?: {}): DeployConfigGeneratorSource<Plugin>;
154
+ export {};
155
+ //# sourceMappingURL=deploy-config-registry.d.ts.map
@@ -0,0 +1,124 @@
1
+ import { readFileSync } from "node:fs";
2
+ import path from "node:path";
3
+ import { orFallbackSync } from "@jini-ai/core/errors/idioms";
4
+ import { asDeployConfigGeneratorModule, parseDeployConfigsFile } from "../config-descriptors.js";
5
+ /** @complexity O(g). */
6
+ function buildRegistry(loaded, refusals) {
7
+ const byId = new Map();
8
+ const duplicates = new Set();
9
+ for (const generator of loaded) {
10
+ if (byId.has(generator.descriptor.id))
11
+ duplicates.add(generator.descriptor.id);
12
+ else
13
+ byId.set(generator.descriptor.id, generator);
14
+ }
15
+ for (const id of duplicates)
16
+ byId.delete(id);
17
+ return {
18
+ get: (id) => byId.get(id),
19
+ list: () => [...byId.values()],
20
+ refusals: [...refusals, ...[...duplicates].map(id => `deploy config '${id}' was not loaded: declared more than once`)],
21
+ };
22
+ }
23
+ function workflowFilesOf({ descriptors }, _options = {}) {
24
+ return [...new Set(descriptors.flatMap(entry => entry.workflowFile === undefined ? [] : [entry.workflowFile]))];
25
+ }
26
+ /**
27
+ * The generator ids a plugin's SOURCE directory declares, in declared order, read synchronously from
28
+ * its manifest without importing any module. For text built before any async work can run (the CLI's
29
+ * `--target` help). A missing or invalid manifest yields `[]`; the refusal itself is reported when the
30
+ * command actually loads the generators.
31
+ *
32
+ * @complexity O(g) in the declared generator count.
33
+ */
34
+ export function readDeployConfigTargetIdsFromSource({ plugin, filename }, _optional = {}) {
35
+ const raw = orFallbackSync({ work: () => readFileSync(path.join(plugin.packageRoot, filename), "utf8"), fallback: undefined, step: "read deploy config manifest" });
36
+ if (raw === undefined)
37
+ return [];
38
+ const parsed = parseDeployConfigsFile({ raw });
39
+ return parsed.ok ? parsed.descriptors.map((descriptor) => descriptor.id) : [];
40
+ }
41
+ /** Synchronous hints from shipped sources, using the generator parser and duplicate-id policy.
42
+ * @param required Product-owned bundled source root, manifest name and source lister.
43
+ * @returns Unambiguous descriptors, without importing modules. */
44
+ export function readBundledDeployConfigDescriptors(required, _optional = {}) {
45
+ const { sourceRoot, filename } = required;
46
+ // Composition roots call this eagerly; a missing bundled root yields no hints rather than a boot failure.
47
+ const sources = orFallbackSync({ work: () => required.contributionSources({ sourceRoot, filename }), fallback: [], step: "list bundled deploy config sources" });
48
+ const descriptors = sources.flatMap(plugin => orFallbackSync({
49
+ work: () => {
50
+ const parsed = parseDeployConfigsFile({ raw: readFileSync(path.join(plugin.packageRoot, filename), "utf8") });
51
+ return parsed.ok ? parsed.descriptors : [];
52
+ },
53
+ fallback: [],
54
+ step: "read bundled deploy config manifest",
55
+ }));
56
+ const counts = new Map();
57
+ for (const entry of descriptors)
58
+ counts.set(entry.id, (counts.get(entry.id) ?? 0) + 1);
59
+ return descriptors.filter(entry => counts.get(entry.id) === 1);
60
+ }
61
+ /** Ordered deploy suggestions; app.json remains the core's neutral convention. */
62
+ function candidatePathsOf({ descriptors }, _options = {}) {
63
+ const entries = descriptors.flatMap(entry => entry.candidatePaths ?? []);
64
+ entries.push({ path: "app.json", order: 4 });
65
+ entries.sort((a, b) => a.order - b.order);
66
+ return [...new Set(entries.map(entry => entry.path))];
67
+ }
68
+ /** Installed workflow hints use the same active, trusted lifecycle as deploy ops, without imports. */
69
+ export async function loadDeployWorkflowFiles(required, _options = {}) {
70
+ const definition = {
71
+ filename: required.filename, contribution: 'deploy workflow declarations', kind: 'data',
72
+ parse: ({ raw }) => parseDeployConfigsFile({ raw }), load: ({ descriptor }) => descriptor,
73
+ onReadError: () => [],
74
+ };
75
+ const result = await required.loadContributions({ workspaceId: required.workspaceId, definition }, { requireActive: true, orderByPluginId: true });
76
+ for (const refusal of result.refusals)
77
+ required.warn(refusal);
78
+ return workflowFilesOf({ descriptors: result.items });
79
+ }
80
+ /**
81
+ * Binds the registry functions to one host's ports (composition happens once, in the host).
82
+ *
83
+ * @complexity O(1) to bind; each returned function documents its own cost (O(g) generators, one
84
+ * contained import each for the loaders).
85
+ */
86
+ export function createDeployConfigGeneratorSource(ports, _optional = {}) {
87
+ const { filename } = ports;
88
+ const definition = ports.defineExecutableContribution({
89
+ filename, contribution: "deploy configs",
90
+ parse: ({ raw }) => parseDeployConfigsFile({ raw }), modulePath: ({ descriptor }) => descriptor.module,
91
+ validate: ({ exported }) => asDeployConfigGeneratorModule({ exported }),
92
+ refusal: ({ plugin, descriptor, reason }) => `deploy config '${descriptor.id}' from '${plugin.pluginId}' was not loaded: ${reason}`,
93
+ }, { onReadError: ({ error }) => error.code === "ENOENT" ? [] : undefined });
94
+ const fromSource = async (plugin) => {
95
+ const load = await ports.loadFromSource({ plugin, definition });
96
+ return buildRegistry(load.items, load.refusals);
97
+ };
98
+ const descriptorsOf = (required) => readBundledDeployConfigDescriptors({ ...required, filename, contributionSources: ports.contributionSources });
99
+ return {
100
+ loadDeployConfigGeneratorsFromSource: (plugin) => fromSource(plugin),
101
+ readDeployConfigTargetIdsFromSource: (plugin) => readDeployConfigTargetIdsFromSource({ plugin, filename }),
102
+ loadBundledDeployConfigGenerators: async (required) => {
103
+ const items = [];
104
+ const refusals = [];
105
+ for (const plugin of ports.contributionSources({ ...required, filename })) {
106
+ const registry = await fromSource(plugin);
107
+ items.push(...registry.list());
108
+ refusals.push(...registry.refusals);
109
+ }
110
+ return buildRegistry(items, refusals);
111
+ },
112
+ readBundledDeployConfigTargetIds: (required) => descriptorsOf(required).map(descriptor => descriptor.id),
113
+ readBundledDeployConfigDescriptors: (required) => descriptorsOf(required),
114
+ readBundledDeployConfigCandidatePaths: (required) => candidatePathsOf({ descriptors: descriptorsOf(required) }),
115
+ readBundledDeployWorkflowFile: (required) => {
116
+ // Host supplies the single declared workflow to an ops adapter; ambiguity never guesses.
117
+ const files = workflowFilesOf({ descriptors: descriptorsOf(required) });
118
+ return files.length === 1 ? files[0] : undefined;
119
+ },
120
+ readBundledDeployWorkflowFiles: (required) => workflowFilesOf({ descriptors: descriptorsOf(required) }),
121
+ loadDeployWorkflowFiles: (required) => loadDeployWorkflowFiles({ ...required, filename, warn: ports.warn }),
122
+ };
123
+ }
124
+ //# sourceMappingURL=deploy-config-registry.js.map
@@ -0,0 +1,97 @@
1
+ import type { DeploymentSecret, DeploymentDescriptor, RenderedDeployConfig, DeployConfigKit } from "../config-contracts.js";
2
+ /**
3
+ * @file The ONE `DeploymentDescriptor` every platform config generator is a thin, pure function over —
4
+ * the host CLI's `deploy config --target <id>` single source of truth. The generators themselves are
5
+ * plugin modules (the bundled hosting plugins' `deploy-configs/*.mjs`, declared in each one's
6
+ * manifest, loaded by `./deploy-config-registry.ts`); this file keeps only the vendor-neutral half:
7
+ * the descriptor derivation, the injection-guard kit and the host deploy-notes overlay. Every
8
+ * product value (the command label in error text, the secrets list, the health-route source and
9
+ * pattern, the migrations note, the host's validation error) is injected by the host binding.
10
+ *
11
+ * Purpose:
12
+ * Every emitted config states the same small set of facts (image built from `./Dockerfile`, the
13
+ * port it listens on, where its one persistent volume mounts, its health-check path, which env
14
+ * vars must be set through the platform's own secret mechanism) — only the SERIALIZATION differs
15
+ * per platform. Four independent generators each hardcoding these facts would mean four copies of
16
+ * the same knowledge, silently rotting three at a time the day one of them changes. This module is
17
+ * the fix: build the descriptor once, here, then hand it to whichever generator the caller asked
18
+ * for. Another platform is one new plugin module plus one manifest line, never a change to this one.
19
+ *
20
+ * Derivation over hardcoding, wherever that's reasonably possible: {@link buildDeploymentDescriptor}
21
+ * reads the repo's own already-committed files (`Dockerfile`, `package.json`, the readiness route's own
22
+ * source) rather than repeating their values as separate literals that could drift out of sync.
23
+ * Each derivation names its exact source below; a field that genuinely can't be derived (which env
24
+ * vars are load-bearing secrets — a semantic judgment call, not a textual pattern) is supplied by the
25
+ * host with a comment citing the code that was read to decide it.
26
+ */
27
+ /** The host's overlay reader seam for {@link appendHostDeployNotes}. */
28
+ export interface HostDeployNotesReadPorts {
29
+ /** Reads a file, or returns `undefined` when it does not exist. */
30
+ readonly readFile?: (required: {
31
+ file: string;
32
+ }, options?: object) => string | undefined;
33
+ }
34
+ /**
35
+ * Appends the host's own notes for a deploy target after its plugin generator rendered: the notes in
36
+ * `<overlays>/<plugin>/deploy-notes.json`, keyed by target id (a plugin may contribute several
37
+ * targets). A note about the host's own Dockerfile (e.g. an opt-in build flag) is the host's note,
38
+ * not the vendor plugin's, so it has to be stated wherever a host's config is generated.
39
+ *
40
+ * A note the generator already printed is not repeated: the bundled generators printed these same
41
+ * notes before the cutover to the Jini packages, so the append is safe on both sides of it.
42
+ *
43
+ * @throws {Error} When the overlay's notes file exists but is not valid JSON of that shape.
44
+ * @complexity O(n · m) for n host notes and m rendered notes (both a handful).
45
+ */
46
+ export declare function appendHostDeployNotes({ pluginId, targetId, rendered, overlaysDir, commandLabel }: {
47
+ readonly pluginId: string;
48
+ readonly targetId: string;
49
+ readonly rendered: RenderedDeployConfig;
50
+ /** The host's overlay root (absolute). */
51
+ readonly overlaysDir: string;
52
+ /** The host CLI command named in error text (e.g. `"<product> deploy config"`). */
53
+ readonly commandLabel: string;
54
+ }, { readFile }?: HostDeployNotesReadPorts): RenderedDeployConfig;
55
+ /**
56
+ * The kit every generator gets. The host binds the injection guard to its own validation error and to
57
+ * the positional `(fieldLabel, value)` the plugins call. Its two sink shapes: the TOML-emitting plugin's
58
+ * quoted sinks, and the unquoted YAML `name:` lines of the YAML-emitting plugin (the app name and its
59
+ * disk's volume name). Quoting those at render time was rejected because the bundled generators'
60
+ * exact-string golden tests pin the CURRENT unquoted rendering for a safe name (`name: acme-app`):
61
+ * quoting would change every already-safe name's output. A per-host region allow-list is each
62
+ * generator's own choice (one host's catalog had no authoritative source to enumerate against; its
63
+ * generator says why). @complexity O(1).
64
+ */
65
+ export declare function createDeployConfigKit({ validationError, migrationsNote }: {
66
+ readonly validationError: (required: {
67
+ message: string;
68
+ }) => Error;
69
+ readonly migrationsNote: string;
70
+ }, _optional?: {}): DeployConfigKit;
71
+ /** Where the readiness check path is read from: a repo-relative source file, the pattern whose first
72
+ * group is the path, and the label error text names it by. */
73
+ export interface HealthCheckSource {
74
+ readonly relPath: string;
75
+ readonly pattern: RegExp;
76
+ readonly sourceFile: string;
77
+ }
78
+ /**
79
+ * Builds the one `DeploymentDescriptor` every renderer works from, deriving each field from the
80
+ * repo's own already-committed files (see each field's own doc on {@link DeploymentDescriptor} for
81
+ * its exact source). Reads three real files from disk on every call rather than caching — this runs
82
+ * once per CLI invocation, not in a hot path, so freshness (never serving a value from a file that
83
+ * has since changed underneath a long-lived process) is worth more than the trivial I/O cost saved.
84
+ *
85
+ * Every path is relative to `repoRoot` — the host passes its repo root (the CLI's cwd).
86
+ *
87
+ * @throws {Error} when a source file's format has drifted far enough that a derivation pattern no
88
+ * longer matches — see {@link extractOrThrow}. Never returns a guessed or partially-stale value.
89
+ * @complexity O(n) in the total source text — three reads and fixed extraction passes.
90
+ */
91
+ export declare function buildDeploymentDescriptor({ repoRoot, commandLabel, healthCheck, secrets }: {
92
+ readonly repoRoot: string;
93
+ readonly commandLabel: string;
94
+ readonly healthCheck: HealthCheckSource;
95
+ readonly secrets: readonly DeploymentSecret[];
96
+ }, _optional?: {}): DeploymentDescriptor;
97
+ //# sourceMappingURL=deploy-config.d.ts.map
@@ -0,0 +1,115 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { assertNoConfigInjection } from "../config-injection.js";
4
+ function readOptionalFile({ file }, _options = {}) {
5
+ try {
6
+ return readFileSync(file, "utf8");
7
+ }
8
+ catch (error) {
9
+ if (error.code === "ENOENT")
10
+ return undefined;
11
+ throw error;
12
+ }
13
+ }
14
+ /** The notes array for `targetId`, or a loud error naming the malformed overlay file. */
15
+ function hostNotesFor({ raw, targetId, file, commandLabel }, _options = {}) {
16
+ const parsed = JSON.parse(raw);
17
+ if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
18
+ throw new Error(`${commandLabel}: ${file} must map each target id to an array of note strings (target "${targetId}")`);
19
+ }
20
+ const entry = Object.hasOwn(parsed, targetId) ? parsed[targetId] : undefined;
21
+ if (entry === undefined)
22
+ return [];
23
+ if (!Array.isArray(entry) || !entry.every((note) => typeof note === "string")) {
24
+ throw new Error(`${commandLabel}: ${file} must map each target id to an array of note strings (target "${targetId}")`);
25
+ }
26
+ return entry;
27
+ }
28
+ /**
29
+ * Appends the host's own notes for a deploy target after its plugin generator rendered: the notes in
30
+ * `<overlays>/<plugin>/deploy-notes.json`, keyed by target id (a plugin may contribute several
31
+ * targets). A note about the host's own Dockerfile (e.g. an opt-in build flag) is the host's note,
32
+ * not the vendor plugin's, so it has to be stated wherever a host's config is generated.
33
+ *
34
+ * A note the generator already printed is not repeated: the bundled generators printed these same
35
+ * notes before the cutover to the Jini packages, so the append is safe on both sides of it.
36
+ *
37
+ * @throws {Error} When the overlay's notes file exists but is not valid JSON of that shape.
38
+ * @complexity O(n · m) for n host notes and m rendered notes (both a handful).
39
+ */
40
+ export function appendHostDeployNotes({ pluginId, targetId, rendered, overlaysDir, commandLabel }, { readFile = readOptionalFile } = {}) {
41
+ // Publisher ids are `<publisher>/<name>`; overlay folders are named by the plugin's own name.
42
+ const pluginName = pluginId.slice(pluginId.lastIndexOf("/") + 1);
43
+ const file = join(overlaysDir, pluginName, "deploy-notes.json");
44
+ const raw = readFile({ file });
45
+ if (raw === undefined)
46
+ return rendered;
47
+ const extra = hostNotesFor({ raw, targetId, file, commandLabel }).filter((note) => !rendered.notes.includes(note));
48
+ return extra.length === 0 ? rendered : { ...rendered, notes: [...rendered.notes, ...extra] };
49
+ }
50
+ /**
51
+ * The kit every generator gets. The host binds the injection guard to its own validation error and to
52
+ * the positional `(fieldLabel, value)` the plugins call. Its two sink shapes: the TOML-emitting plugin's
53
+ * quoted sinks, and the unquoted YAML `name:` lines of the YAML-emitting plugin (the app name and its
54
+ * disk's volume name). Quoting those at render time was rejected because the bundled generators'
55
+ * exact-string golden tests pin the CURRENT unquoted rendering for a safe name (`name: acme-app`):
56
+ * quoting would change every already-safe name's output. A per-host region allow-list is each
57
+ * generator's own choice (one host's catalog had no authoritative source to enumerate against; its
58
+ * generator says why). @complexity O(1).
59
+ */
60
+ export function createDeployConfigKit({ validationError, migrationsNote }, _optional = {}) {
61
+ return {
62
+ assertNoConfigInjection: (fieldLabel, value) => assertNoConfigInjection({ fieldLabel, value, fail: validationError }),
63
+ validationError: (message) => validationError({ message }),
64
+ migrationsNote,
65
+ };
66
+ }
67
+ /**
68
+ * Regex-extracts one derived fact from an already-read repo file's contents, or fails LOUDLY: a
69
+ * silent fallback here would be exactly the kind of drift this module exists to prevent (see this
70
+ * file's own header). `describe`/`sourceFile` name the fact and its origin so the thrown message
71
+ * tells a reader exactly what changed and where to look — never a bare "no match".
72
+ */
73
+ function extractOrThrow({ source, pattern, describe, sourceFile, commandLabel }, _options = {}) {
74
+ const match = source.match(pattern);
75
+ if (!match || match[1] === undefined) {
76
+ throw new Error(`${commandLabel}: could not derive ${describe} from ${sourceFile} — its format changed since ` +
77
+ `deploy-config.ts's extraction pattern was written. Update the pattern in deploy-config.ts to match ` +
78
+ `the new format, or hardcode the value there instead with a comment explaining why it can no longer ` +
79
+ `be derived.`);
80
+ }
81
+ return match[1];
82
+ }
83
+ /**
84
+ * Builds the one `DeploymentDescriptor` every renderer works from, deriving each field from the
85
+ * repo's own already-committed files (see each field's own doc on {@link DeploymentDescriptor} for
86
+ * its exact source). Reads three real files from disk on every call rather than caching — this runs
87
+ * once per CLI invocation, not in a hot path, so freshness (never serving a value from a file that
88
+ * has since changed underneath a long-lived process) is worth more than the trivial I/O cost saved.
89
+ *
90
+ * Every path is relative to `repoRoot` — the host passes its repo root (the CLI's cwd).
91
+ *
92
+ * @throws {Error} when a source file's format has drifted far enough that a derivation pattern no
93
+ * longer matches — see {@link extractOrThrow}. Never returns a guessed or partially-stale value.
94
+ * @complexity O(n) in the total source text — three reads and fixed extraction passes.
95
+ */
96
+ export function buildDeploymentDescriptor({ repoRoot, commandLabel, healthCheck, secrets }, _optional = {}) {
97
+ const read = (relPath) => readFileSync(join(repoRoot, relPath), "utf8");
98
+ const dockerfile = read("Dockerfile");
99
+ const packageJson = read("package.json");
100
+ const healthRouteSource = read(healthCheck.relPath);
101
+ const port = Number(extractOrThrow({ source: dockerfile, pattern: /^EXPOSE\s+(\d+)\s*$/m, describe: "the container port", sourceFile: "Dockerfile (EXPOSE line)", commandLabel }));
102
+ const dockerfilePath = "Dockerfile";
103
+ const appName = extractOrThrow({ source: packageJson, pattern: /^[^\S\r\n\u2028\u2029]*"name"\s*:\s*"([^"]+)"/mu, describe: "the default app name", sourceFile: "package.json (name)", commandLabel });
104
+ const volumeName = `${appName}_sites`;
105
+ const volumeMountPath = extractOrThrow({
106
+ source: dockerfile,
107
+ pattern: /^VOLUME\s+\["([^"]+)"\]\s*$/m,
108
+ describe: "the volume mount path",
109
+ sourceFile: "Dockerfile (VOLUME line)",
110
+ commandLabel,
111
+ });
112
+ const healthCheckPath = extractOrThrow({ source: healthRouteSource, pattern: healthCheck.pattern, describe: "the readiness check path", sourceFile: healthCheck.sourceFile, commandLabel });
113
+ return { appName, port, dockerfilePath, volumeMountPath, volumeName, healthCheckPath, secrets };
114
+ }
115
+ //# sourceMappingURL=deploy-config.js.map
@@ -0,0 +1,22 @@
1
+ import type { AgentToolDefinition as SharedAgentToolDefinition } from "@jini-ai/core";
2
+ import type { DeployOpsDescriptor, DeployOpsRegistry } from "@jini-ai/devops/deploy";
3
+ type AgentToolDefinition = SharedAgentToolDefinition & {
4
+ inputSchema: Readonly<Record<string, unknown>>;
5
+ };
6
+ /** Reads the bundled deploy-ops descriptors from a plugin source root (injectable for tests). */
7
+ export type BundledDescriptorReader = (input: {
8
+ sourceRoot: string;
9
+ }) => readonly DeployOpsDescriptor[];
10
+ /** Build schemas from the loaded registry. O(platforms + eight tools); a missing registry uses bundled data only. */
11
+ export declare function getDeployOpsAgentToolCatalog(required: {
12
+ registry?: DeployOpsRegistry;
13
+ sourceRoot: string;
14
+ readBundledDescriptors: BundledDescriptorReader;
15
+ maxWaitSeconds: number;
16
+ readPermission: string;
17
+ writePermission: string;
18
+ secretNameDescription: string;
19
+ unsetSecretDescription: string;
20
+ }, _optional?: {}): AgentToolDefinition[];
21
+ export {};
22
+ //# sourceMappingURL=agent-tools.d.ts.map
@@ -0,0 +1,76 @@
1
+ /** Data-only source snapshot for hermetic catalog construction; never used to authorize or import modules. */
2
+ function bundledDescriptors(read, sourceRoot) {
3
+ try {
4
+ return read({ sourceRoot });
5
+ }
6
+ catch {
7
+ return [];
8
+ }
9
+ }
10
+ const platformList = (platforms) => {
11
+ const labels = platforms.map(p => `${p.id} (${p.label})`).join(", ");
12
+ return ` Platforms: ${labels || "none available; enable a hosting plugin under Agent Plugins"}.`;
13
+ };
14
+ /** Build schemas from the loaded registry. O(platforms + eight tools); a missing registry uses bundled data only. */
15
+ export function getDeployOpsAgentToolCatalog(required, _optional = {}) {
16
+ const { registry, maxWaitSeconds: MAX_WAIT_SECONDS, readPermission } = required;
17
+ const platforms = registry ? registry.list().map(p => p.descriptor) : bundledDescriptors(required.readBundledDescriptors, required.sourceRoot);
18
+ const ids = platforms.map(p => p.id);
19
+ const listed = platformList(platforms);
20
+ // Secrets are an optional adapter verb set, so their tools advertise only adapters that export it
21
+ // (github-actions has none). Bundled data cannot say which do; the handler refuses the rest.
22
+ const secrets = registry ? registry.list().filter(p => typeof p.module.listSecrets === "function").map(p => p.descriptor) : platforms;
23
+ const secretsListed = registry ? platformList(secrets) : " Platforms: whichever deploy platforms have a secrets adapter.";
24
+ const common = `${listed} Use these instead of custom_credential_make_request for deploy checks on these platforms. They don't deploy or change anything; to start a deploy use deployment_ops_deploy. For a static-site publish use deployment_get_static_publish_capabilities / the publish tools instead. Refuses unknown platforms, ambiguous credentials, saved-host mismatches, and rejected auth (use custom_credential_verify).`;
25
+ const base = { platform: { type: "string", enum: ids }, target: { type: "string", minLength: 1, maxLength: 200, description: "App name or owner/repo, as required by the platform." }, credentialLabel: { type: "string", minLength: 1, maxLength: 200 }, runId: { type: "string", pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$" }, branch: { type: "string", minLength: 1, maxLength: 200 } };
26
+ const definition = ({ name, description, properties, required }, _options = {}) => ({ name, description: description + common, sideEffects: "none", authorization: { permission: readPermission }, inputSchema: { type: "object", additionalProperties: false, properties, required } });
27
+ return [
28
+ definition({ name: "deployment_ops_status", description: "Check whether an app is up, running and healthy or whether a deployment workflow build passed or failed. Returns platform, target, healthy/deploying/failing/stopped/unknown state, summary, machine/job items, optional run URL and checkedAt.", properties: base, required: ["platform", "target"] }),
29
+ definition({ name: "deployment_ops_logs", description: "Read bounded error logs to explain why a hosted app crashed or a deployment workflow build failed. Returns platform, target, lines with message and optional time/source/level, and truncated. Workflow adapters return failed steps and check annotations, not the redirected full log archive.", properties: { ...base, limit: { type: "integer", minimum: 1, maximum: 500, clamp: true, default: 100 } }, required: ["platform", "target"] }),
30
+ definition({ name: "deployment_ops_wait", description: "Wait until an app is healthy or a workflow is finished; poll status every 10 seconds and tell the user when it is done. Returns reached, waitedSeconds, polls and last status; reached:false on timeout. Finished includes failure/stopped; unknown is not finished. Cancellation stops polling.", properties: { ...base, until: { type: "string", enum: ["healthy", "finished"] }, timeoutSeconds: { type: "integer", minimum: 10, maximum: MAX_WAIT_SECONDS, default: 180 } }, required: ["platform", "target", "until"] }),
31
+ definition({ name: "deployment_ops_list_targets", description: "List my apps or other deployment targets on a supported platform before choosing one to inspect. Returns platform and targets with id, name and optional state. Listing may be unsupported by the platform; then supply a target to status.", properties: { platform: base.platform, credentialLabel: base.credentialLabel, org: { type: "string", minLength: 1, maxLength: 200, description: "Optional organization slug." } }, required: ["platform"] }),
32
+ {
33
+ name: "deployment_ops_deploy",
34
+ description: `Deploy, ship or redeploy my server app now through a supported platform, using one saved credential. Returns platform, target, started (false means nothing was dispatched; follow the summary to select or enable a workflow), summary, and when the platform provides them runId, sha, machineIds, image and url. For workflow-based platforms, target identifies the repository holding the deployment workflow; the hosting plugin describes its workflow, ref pinning and required credential permissions. started means the platform accepted the deploy, not that it has landed: next call deployment_ops_wait with the same platform and target (plus runId when returned) until 'finished', then check the live site with fetch_live_url. Never retry a deploy whose connection dropped before checking deployment_ops_status. Refuses platforms without a deploy adapter, unknown platforms, ambiguous credentials, saved-host mismatches and rejected auth (use custom_credential_verify). Does not copy site content to the server; a static-site publish uses deployment_execute_static_publish.${listed}`,
35
+ sideEffects: "mutates-durable-state",
36
+ authorization: { permission: required.writePermission },
37
+ inputSchema: { type: "object", additionalProperties: false, properties: { platform: base.platform, target: base.target, ref: { type: "string", minLength: 1, maxLength: 200, description: "Branch, tag or commit, as the platform supports; the hosting plugin's skill says which." }, workflowFile: { type: "string", description: "Optional workflow filename from an installed, active deployment config. Required when several workflows are declared." }, credentialLabel: base.credentialLabel }, required: ["platform", "target"] },
38
+ },
39
+ ...secretTools({ platforms: secrets.map(p => p.id), target: base.target, credentialLabel: base.credentialLabel, listed: secretsListed, readPermission: required.readPermission, writePermission: required.writePermission, secretNameDescription: required.secretNameDescription, unsetSecretDescription: required.unsetSecretDescription }),
40
+ ];
41
+ }
42
+ /** Generic host-secrets tools; vendors are the bundled deployment plugins' adapters, never per-vendor tools. O(1). */
43
+ function secretTools(required) {
44
+ const { platforms, target, credentialLabel, listed } = required;
45
+ const name = { type: "string", pattern: "^[A-Za-z_][A-Za-z0-9_]{0,127}$", description: required.secretNameDescription };
46
+ const common = ` Works for any platform whose adapter supports secrets; others are refused with the list of platforms that do. Never returns a secret value or accepts one in model input.${listed}`;
47
+ const targetProps = { platform: { type: "string", enum: platforms }, target, credentialLabel };
48
+ return [
49
+ {
50
+ name: "deployment_ops_list_secrets",
51
+ description: `List the secrets (environment variables) set on a hosted app: names, the platform's own digest and update time only, never values. Returns platform, target, secrets [{name, digest?, updatedAt?}], truncated, appliesOn (next-deploy | vendor-restart | immediately), supportsStaging and deployNeeded (true when writes wait for the next deploy).${common}`,
52
+ sideEffects: "none",
53
+ authorization: { permission: required.readPermission },
54
+ inputSchema: { type: "object", additionalProperties: false, properties: targetProps, required: ["platform", "target"] },
55
+ },
56
+ {
57
+ name: "deployment_ops_set_secret",
58
+ description: `Set or copy a secret (environment variable) on a hosted app from a server-side source or a masked secure card; the assistant never sees the value. source {kind:'typed'} opens the masked card for a new key such as API_KEY; the human types the value there. source {kind:'site-key'} copies this site's own site key (needs the site-key permission); source {kind:'secret', name} copies another secret already on the same target (platform side, value never shown). Compares first: if the stored value is identical nothing is written (comparison 'same'). Replacing an existing secret asks the human to confirm on a card; creating a new one does not. dryRun:true only compares. Returns platform, target, name, source, comparison (same | different | absent | unknown), changed, fingerprint and fingerprintKind ('site-key' fingerprints match the admin Security page), appliesOn, supportsStaging, deployNeeded, optional version and dryRun, and summary; a declined card returns changed:false with cancelled/reason/note. Writes are staged where the platform allows: when deployNeeded is true, run deployment_ops_deploy afterwards.${common}`,
59
+ sideEffects: "mutates-durable-state",
60
+ authorization: { permission: required.writePermission },
61
+ inputSchema: { type: "object", additionalProperties: false, properties: {
62
+ ...targetProps, name,
63
+ source: { type: "object", additionalProperties: false, description: "Where the server reads the value. kind 'typed' opens a secure card and takes no value; kind 'site-key' takes no name; kind 'secret' requires name (another secret on the same target).", properties: { kind: { type: "string", enum: ["site-key", "secret", "typed"] }, name }, required: ["kind"] },
64
+ dryRun: { type: "boolean", default: false, description: "Only compare and report; write nothing." },
65
+ }, required: ["platform", "target", "name", "source"] },
66
+ },
67
+ {
68
+ name: "deployment_ops_unset_secret",
69
+ description: required.unsetSecretDescription + common,
70
+ sideEffects: "deletes-durable-state",
71
+ authorization: { permission: required.writePermission },
72
+ inputSchema: { type: "object", additionalProperties: false, properties: { ...targetProps, name }, required: ["platform", "target", "name"] },
73
+ },
74
+ ];
75
+ }
76
+ //# sourceMappingURL=agent-tools.js.map