@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,134 @@
1
+ import type { readFileSync } from "node:fs";
2
+ import type { DeployOpsDescriptor, DeployOpsRegistry, LoadedDeployOps } from "@jini-ai/devops/deploy";
3
+ /** Installed modules use the same activation, bundled digest and disk containment gates as deploy targets. */
4
+ export declare const DEPLOY_OPS_FILENAME = "jini-deploy-ops.json";
5
+ declare const opsContribution: {
6
+ filename: string;
7
+ contribution: string;
8
+ parse: ({ raw }: {
9
+ raw: string;
10
+ }) => {
11
+ ok: true;
12
+ descriptors: DeployOpsDescriptor[];
13
+ } | {
14
+ ok: false;
15
+ reason: string;
16
+ };
17
+ modulePath: ({ descriptor }: {
18
+ descriptor: DeployOpsDescriptor;
19
+ }) => string;
20
+ validate: ({ exported }: {
21
+ exported: unknown;
22
+ }) => string | import("@jini-ai/devops/deploy").DeployOpsModule;
23
+ refusal: ({ descriptor, reason }: {
24
+ descriptor: DeployOpsDescriptor;
25
+ reason: string;
26
+ }) => string;
27
+ };
28
+ /**
29
+ * Import contained modules; isolate unreadable manifests, invalid exports and missing modules as refusals.
30
+ * @param plugin - Trusted source directory. The caller owns activation/digest gates; this seam is for tests.
31
+ * @returns Loaded modules and refusal messages; never throws for a malformed package.
32
+ * @complexity Time and space: O(platforms), bounded to 32 entries.
33
+ * @example await loadDeployOpsRegistryFromSource({ pluginId: "my-host", packageRoot: bundledRoot });
34
+ */
35
+ export declare function loadDeployOpsRegistryFromSource(required: {
36
+ plugin: {
37
+ pluginId: string;
38
+ packageRoot: string;
39
+ };
40
+ loadPluginContributionsFromSource(input: {
41
+ plugin: {
42
+ pluginId: string;
43
+ packageRoot: string;
44
+ };
45
+ definition: typeof opsContribution;
46
+ onReadError(input: {
47
+ plugin: {
48
+ pluginId: string;
49
+ };
50
+ }): string[];
51
+ importRefusalReason: string;
52
+ importErrorReason: string;
53
+ }): Promise<{
54
+ items: readonly LoadedDeployOps[];
55
+ refusals: readonly string[];
56
+ }>;
57
+ }, _optional?: Record<string, never>): Promise<DeployOpsRegistry>;
58
+ /** All bundled ops sources; category parsing and duplicate refusal stay with this registry.
59
+ * @complexity O(p + platforms), one contained import per contribution. */
60
+ export declare function loadBundledDeployOpsRegistry(required: {
61
+ readonly sourceRoot: string;
62
+ bundledContributionSources(input: {
63
+ sourceRoot: string;
64
+ filename: string;
65
+ }): readonly {
66
+ pluginId: string;
67
+ packageRoot: string;
68
+ }[];
69
+ loadPluginContributionsFromSource: Parameters<typeof loadDeployOpsRegistryFromSource>[0]['loadPluginContributionsFromSource'];
70
+ }, _optional?: Record<string, never>): Promise<DeployOpsRegistry>;
71
+ /** Data-only enum discovery for hermetic tool catalogs, never authorization or module loading.
72
+ * Ambiguous ids are omitted, as in the executable registry. @complexity O(p + platforms). */
73
+ export declare function readBundledDeployOpsDescriptors(required: {
74
+ readonly sourceRoot: string;
75
+ bundledContributionSources(input: {
76
+ sourceRoot: string;
77
+ filename: string;
78
+ }): readonly {
79
+ pluginId: string;
80
+ packageRoot: string;
81
+ }[];
82
+ readFileSync: typeof readFileSync;
83
+ }, _optional?: Record<string, never>): readonly DeployOpsDescriptor[];
84
+ /**
85
+ * Load only active, bundled-digest-trusted installed deployment packages; never fall back to source.
86
+ * @param ctx - Workspace whose installed packages and activation records are checked fresh.
87
+ * @returns Loaded modules and refusals, including filesystem faults; no expected failure escapes.
88
+ * @param required - Contribution loader from this boot's lifecycle; no site-dependent module default.
89
+ * @complexity Time: O(bundled sources + installed packages + platforms). Space: O(packages + platforms + refusals).
90
+ * @example await loadDeployOpsRegistry({ workspaceId }, { loadContributions: lifecycle.loadPluginContributions });
91
+ */
92
+ export declare function loadDeployOpsRegistry(required: {
93
+ workspaceId: string;
94
+ sourceRoot: string;
95
+ bundledContributionSources: Parameters<typeof loadBundledDeployOpsRegistry>[0]['bundledContributionSources'];
96
+ readTrustedPluginFile(input: {
97
+ plugin: {
98
+ pluginId: string;
99
+ packageRoot: string;
100
+ };
101
+ filename: string;
102
+ }): Promise<string>;
103
+ loadContributions(input: {
104
+ workspaceId: string;
105
+ definition: typeof opsContribution;
106
+ onReadError(input: {
107
+ plugin: {
108
+ pluginId: string;
109
+ };
110
+ }): string[];
111
+ importRefusalReason: string;
112
+ importErrorReason: string;
113
+ }, options: {
114
+ packageRefusal(input: {
115
+ plugin: {
116
+ pluginId: string;
117
+ packageRoot: string;
118
+ };
119
+ }): string | undefined;
120
+ /** Only `plugin` is read; the loader may pass its full contribution input. */
121
+ onInactive(input: {
122
+ plugin: {
123
+ pluginId: string;
124
+ packageRoot: string;
125
+ };
126
+ }): Promise<void>;
127
+ }): Promise<{
128
+ items: readonly LoadedDeployOps[];
129
+ refusals: readonly string[];
130
+ }>;
131
+ warn(error: unknown): void;
132
+ }, _optional?: {}): Promise<DeployOpsRegistry>;
133
+ export {};
134
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1,106 @@
1
+ import { orFallback, orFallbackSync } from '@jini-ai/core/errors/idioms';
2
+ import path from "node:path";
3
+ import { asDeployOpsModule, parseDeployOpsFile as parseDeployOpsDescriptors } from "@jini-ai/devops/deploy";
4
+ /** Installed modules use the same activation, bundled digest and disk containment gates as deploy targets. */
5
+ export const DEPLOY_OPS_FILENAME = "jini-deploy-ops.json";
6
+ const opsContribution = {
7
+ filename: DEPLOY_OPS_FILENAME, contribution: "deploy ops",
8
+ parse: ({ raw }) => parseDeployOpsDescriptors({ raw }), modulePath: ({ descriptor }) => descriptor.module,
9
+ validate: ({ exported }) => asDeployOpsModule({ exported }),
10
+ refusal: ({ descriptor, reason }) => `deploy ops platform '${descriptor.id}' was not loaded: ${reason}`,
11
+ };
12
+ /**
13
+ * Import contained modules; isolate unreadable manifests, invalid exports and missing modules as refusals.
14
+ * @param plugin - Trusted source directory. The caller owns activation/digest gates; this seam is for tests.
15
+ * @returns Loaded modules and refusal messages; never throws for a malformed package.
16
+ * @complexity Time and space: O(platforms), bounded to 32 entries.
17
+ * @example await loadDeployOpsRegistryFromSource({ pluginId: "my-host", packageRoot: bundledRoot });
18
+ */
19
+ export async function loadDeployOpsRegistryFromSource(required, _optional = {}) {
20
+ const load = await required.loadPluginContributionsFromSource({ plugin: required.plugin, definition: opsContribution,
21
+ onReadError: ({ plugin }) => [`deploy ops from '${plugin.pluginId}' were not loaded: ${DEPLOY_OPS_FILENAME} could not be read`],
22
+ importRefusalReason: "module could not be imported", importErrorReason: "module could not be read or imported" });
23
+ return buildRegistry({ loaded: load.items, inputRefusals: load.refusals });
24
+ }
25
+ /** All bundled ops sources; category parsing and duplicate refusal stay with this registry.
26
+ * @complexity O(p + platforms), one contained import per contribution. */
27
+ export async function loadBundledDeployOpsRegistry(required, _optional = {}) {
28
+ const items = [];
29
+ const refusals = [];
30
+ for (const plugin of required.bundledContributionSources({ sourceRoot: required.sourceRoot, filename: DEPLOY_OPS_FILENAME })) {
31
+ const registry = await loadDeployOpsRegistryFromSource({ plugin, loadPluginContributionsFromSource: required.loadPluginContributionsFromSource });
32
+ items.push(...registry.list());
33
+ refusals.push(...registry.refusals);
34
+ }
35
+ return buildRegistry({ loaded: items, inputRefusals: refusals });
36
+ }
37
+ /** Data-only enum discovery for hermetic tool catalogs, never authorization or module loading.
38
+ * Ambiguous ids are omitted, as in the executable registry. @complexity O(p + platforms). */
39
+ export function readBundledDeployOpsDescriptors(required, _optional = {}) {
40
+ const descriptors = required.bundledContributionSources({ sourceRoot: required.sourceRoot, filename: DEPLOY_OPS_FILENAME }).flatMap(plugin => {
41
+ return orFallbackSync({ work: () => {
42
+ const parsed = parseDeployOpsDescriptors({ raw: required.readFileSync(path.join(plugin.packageRoot, DEPLOY_OPS_FILENAME), "utf8") });
43
+ return parsed.ok ? parsed.descriptors : [];
44
+ }, fallback: [], step: 'Read bundled deployment operations' });
45
+ });
46
+ const counts = new Map();
47
+ for (const descriptor of descriptors)
48
+ counts.set(descriptor.id, (counts.get(descriptor.id) ?? 0) + 1);
49
+ return descriptors.filter(descriptor => counts.get(descriptor.id) === 1);
50
+ }
51
+ /**
52
+ * Load only active, bundled-digest-trusted installed deployment packages; never fall back to source.
53
+ * @param ctx - Workspace whose installed packages and activation records are checked fresh.
54
+ * @returns Loaded modules and refusals, including filesystem faults; no expected failure escapes.
55
+ * @param required - Contribution loader from this boot's lifecycle; no site-dependent module default.
56
+ * @complexity Time: O(bundled sources + installed packages + platforms). Space: O(packages + platforms + refusals).
57
+ * @example await loadDeployOpsRegistry({ workspaceId }, { loadContributions: lifecycle.loadPluginContributions });
58
+ */
59
+ export async function loadDeployOpsRegistry(required, _optional = {}) {
60
+ try {
61
+ // Only packages that ship this category in this build own it. The shared source selector
62
+ // excludes retired packages: an old package retained until its successors are usable must
63
+ // not contribute duplicate ids (duplicates are dropped). Installed activation and digest
64
+ // checks still run in the lifecycle loader; this source list never authorizes an import.
65
+ const owners = new Set(required.bundledContributionSources({
66
+ sourceRoot: required.sourceRoot, filename: DEPLOY_OPS_FILENAME,
67
+ }).map(plugin => plugin.pluginId));
68
+ const switchedOff = new Map();
69
+ const load = await required.loadContributions({ workspaceId: required.workspaceId, definition: opsContribution,
70
+ onReadError: ({ plugin }) => [`deploy ops from '${plugin.pluginId}' were not loaded: ${DEPLOY_OPS_FILENAME} could not be read`],
71
+ importRefusalReason: "module could not be imported", importErrorReason: "module could not be read or imported" }, {
72
+ packageRefusal: ({ plugin }) => owners.has(plugin.pluginId) ? undefined : `deploy ops from '${plugin.pluginId}' were not loaded: only bundled plugins shipping ${DEPLOY_OPS_FILENAME} may contribute`,
73
+ // A switched-off plugin's manifest is read as data (no module imported) so a refusal can name it.
74
+ onInactive: async ({ plugin }) => {
75
+ // An unreadable manifest only loses the name; it must not refuse every active platform.
76
+ const parsed = parseDeployOpsDescriptors({ raw: await orFallback({ work: () => required.readTrustedPluginFile({ plugin, filename: DEPLOY_OPS_FILENAME }), fallback: "", step: 'Read inactive deployment operations' }) });
77
+ for (const descriptor of parsed.ok ? parsed.descriptors : [])
78
+ if (!switchedOff.has(descriptor.id))
79
+ switchedOff.set(descriptor.id, plugin.pluginId);
80
+ },
81
+ });
82
+ return buildRegistry({ loaded: load.items, inputRefusals: load.refusals }, { switchedOff });
83
+ }
84
+ catch (error) {
85
+ required.warn(error);
86
+ return buildRegistry({ loaded: [], inputRefusals: ["deploy ops were not loaded: installed plugin packages could not be read"] });
87
+ }
88
+ }
89
+ /** Index uniquely claimed ids. Ambiguous ids are refused for all claimants. O(platforms). */
90
+ function buildRegistry({ loaded, inputRefusals }, { switchedOff } = {}) {
91
+ const map = new Map();
92
+ const duplicates = new Set();
93
+ const refusals = [...inputRefusals];
94
+ for (const platform of loaded) {
95
+ if (map.has(platform.descriptor.id))
96
+ duplicates.add(platform.descriptor.id);
97
+ else
98
+ map.set(platform.descriptor.id, platform);
99
+ }
100
+ for (const id of duplicates) {
101
+ map.delete(id);
102
+ refusals.push(`deploy ops platform '${id}' was not loaded: declared more than once`);
103
+ }
104
+ return { get: id => map.get(id), list: () => [...map.values()], refusals, ...(switchedOff ? { switchedOff } : {}) };
105
+ }
106
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1,66 @@
1
+ import type { Clock, HttpRequest, HttpResponse } from '@jini-ai/core/primitives';
2
+ import type { CredentialedRequestRequired, CredentialedRequestOptional, CredentialedRequestResult, CredentialSetRepoPort } from '@jini-ai/core/contracts/credentials';
3
+ import type { CustomCredentialCategoryId } from '@jini-ai/core/contracts/site/core-custom-credential-categories';
4
+ import type { SecretSealerPort } from '@jini-ai/core/contracts/vault';
5
+ import type { CredentialSchemeRule } from '@jini-ai/core/contracts/site/integrations-credentialed-http';
6
+ import type { DeployOpsRuntime } from '../../ops-tool-contracts.js';
7
+ interface CredentialedRequestDeps {
8
+ readonly repo: CredentialSetRepoPort<CustomCredentialCategoryId>;
9
+ readonly sealer: SecretSealerPort;
10
+ readonly httpClient: {
11
+ send(request: HttpRequest, options?: {
12
+ redirect?: 'follow' | 'error' | 'manual';
13
+ }): Promise<HttpResponse>;
14
+ };
15
+ readonly clock: Clock;
16
+ readonly audit?: {
17
+ record(entry: {
18
+ readonly label: string;
19
+ readonly host: string;
20
+ readonly method: string;
21
+ readonly status: number;
22
+ readonly bodyBytes: number;
23
+ readonly at: string;
24
+ readonly egressRefusal?: string;
25
+ }): void;
26
+ };
27
+ readonly loadAuthSchemes: (ctx: {
28
+ readonly workspaceId: string;
29
+ }) => Promise<readonly CredentialSchemeRule[]>;
30
+ }
31
+ /** A site-key-shaped value gets the Security page's own fingerprint, so the two can be compared by eye. O(n). */
32
+ export declare function secretFingerprint({ value, deps }: {
33
+ value: string;
34
+ deps: {
35
+ parseSiteKeyHex(input: {
36
+ raw: string;
37
+ }): {
38
+ ok: true;
39
+ hex: string;
40
+ } | {
41
+ ok: false;
42
+ };
43
+ fingerprintSiteKeyHex(input: {
44
+ hex: string;
45
+ }): string;
46
+ };
47
+ }, _options?: {}): {
48
+ fingerprint: string;
49
+ fingerprintKind: "site-key" | "sha256";
50
+ };
51
+ export declare function bindDeployOpsRuntime({ runtime, deps, makeCredentialedRequest }: {
52
+ runtime: Omit<DeployOpsRuntime, 'credentials'> & {
53
+ credentials: Omit<DeployOpsRuntime['credentials'], 'request'>;
54
+ };
55
+ deps: {
56
+ customCredentialSetRepo: CredentialedRequestDeps['repo'];
57
+ siteAssistantSecretSealer: CredentialedRequestDeps['sealer'];
58
+ deployOpsHttpClient?: CredentialedRequestDeps['httpClient'];
59
+ clock: Clock;
60
+ customCredentialsAudit?: CredentialedRequestDeps['audit'];
61
+ loadAuthSchemes: CredentialedRequestDeps['loadAuthSchemes'];
62
+ };
63
+ makeCredentialedRequest(deps: CredentialedRequestDeps, input: CredentialedRequestRequired & CredentialedRequestOptional): Promise<CredentialedRequestResult>;
64
+ }, _optional?: {}): DeployOpsRuntime;
65
+ export {};
66
+ //# sourceMappingURL=run-ops.d.ts.map
@@ -0,0 +1,34 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { aborted } from '../../ops-runner.js';
3
+ const sha256 = ({ value }, _options = {}) => createHash('sha256').update(value, 'utf8').digest();
4
+ /** A site-key-shaped value gets the Security page's own fingerprint, so the two can be compared by eye. O(n). */
5
+ export function secretFingerprint({ value, deps }, _options = {}) {
6
+ const { parseSiteKeyHex, fingerprintSiteKeyHex } = deps;
7
+ const parsed = parseSiteKeyHex({ raw: value });
8
+ return parsed.ok ? { fingerprint: fingerprintSiteKeyHex({ hex: parsed.hex }), fingerprintKind: "site-key" } : { fingerprint: sha256({ value }).toString("hex").slice(0, 12), fingerprintKind: "sha256" };
9
+ }
10
+ export function bindDeployOpsRuntime({ runtime, deps, makeCredentialedRequest }, _optional = {}) {
11
+ return { ...runtime, credentials: { ...runtime.credentials,
12
+ request: async (required, optional) => {
13
+ const { signal } = optional;
14
+ const httpClient = deps.deployOpsHttpClient;
15
+ if (httpClient === undefined)
16
+ throw new Error('Deployment operations have no HTTP client');
17
+ const requestDeps = { repo: deps.customCredentialSetRepo, sealer: deps.siteAssistantSecretSealer, httpClient, clock: deps.clock, ...(deps.customCredentialsAudit ? { audit: deps.customCredentialsAudit } : {}), loadAuthSchemes: deps.loadAuthSchemes };
18
+ let transportTruncated = false;
19
+ // Preserve the text clipping flag the credential API does not expose in its returned shape.
20
+ const boundedDeps = { ...requestDeps, httpClient: { send: async (request, _optional = {}) => {
21
+ // Auth scheme loading can yield after the earlier abort check. Recheck at the I/O boundary.
22
+ if (signal?.aborted)
23
+ throw aborted();
24
+ const result = await requestDeps.httpClient.send({ ...request, ...(signal ? { signal } : {}), maxResponseBytes: required.maxResponseBytes });
25
+ transportTruncated = result.bodyTruncated === true;
26
+ return result;
27
+ } } };
28
+ const { maxResponseBytes: _limit, ...request } = required;
29
+ const result = await makeCredentialedRequest(boundedDeps, { ...request, headers: optional.headers, body: optional.body });
30
+ return { ...result, bodyTruncated: transportTruncated };
31
+ },
32
+ } };
33
+ }
34
+ //# sourceMappingURL=run-ops.js.map
@@ -0,0 +1,36 @@
1
+ import type { ToolExecutionContext, ToolExecutionOptions, ToolHandler } from '@jini-ai/core';
2
+ import type { ChatDeleteSurfaceDeps } from '@jini-ai/core/contracts/site/daemon-surface-exchanges';
3
+ import type { HumanConfirmSpec } from '@jini-ai/core/contracts/site/human-confirm';
4
+ import type { SecretConfirm, SecretConfirmRequest, SecretNotConfirmed } from '../../ops-tool-contracts.js';
5
+ type Permit = (permission: string) => Promise<void>;
6
+ /** The card names exactly what runs; the permission is re-checked after the human answers. Literal tool ids keep the MCP-UI allowlist scan exact. */
7
+ export declare function secretConfirm({ ctx, surfaces, options, permit, deps }: {
8
+ ctx: ToolExecutionContext;
9
+ surfaces: ChatDeleteSurfaceDeps | undefined;
10
+ options: ToolExecutionOptions | undefined;
11
+ permit: Permit;
12
+ deps: {
13
+ removeDescription: string;
14
+ replaceDescription: string;
15
+ notConfirmedResult(input: {
16
+ confirmed: false;
17
+ reason: string;
18
+ }): SecretNotConfirmed;
19
+ approvalToolHandler(steps: {
20
+ surfaces: ChatDeleteSurfaceDeps;
21
+ prepare(): Promise<SecretConfirmRequest>;
22
+ describe(input: {
23
+ prepared: SecretConfirmRequest;
24
+ }): HumanConfirmSpec;
25
+ run(input: {
26
+ ctx: ToolExecutionContext;
27
+ }): ReturnType<SecretConfirm>;
28
+ }, optional: {
29
+ declined(input: {
30
+ reason: string;
31
+ }): Awaited<ReturnType<SecretConfirm>>;
32
+ }): ToolHandler;
33
+ };
34
+ }, _options?: {}): SecretConfirm | undefined;
35
+ export {};
36
+ //# sourceMappingURL=secret-confirm.d.ts.map
@@ -0,0 +1,27 @@
1
+ const TAKES_EFFECT = { "next-deploy": "on the next deploy", "vendor-restart": "after the platform restarts the app", immediately: "immediately" };
2
+ /** The card names exactly what runs; the permission is re-checked after the human answers. Literal tool ids keep the MCP-UI allowlist scan exact. */
3
+ export function secretConfirm({ ctx, surfaces, options, permit, deps }, _options = {}) {
4
+ if (!surfaces)
5
+ return undefined;
6
+ const { approvalToolHandler, notConfirmedResult } = deps;
7
+ const details = (request) => [
8
+ { label: "Count", value: "1" }, { label: "Platform", value: request.platform }, { label: "Target", value: request.target }, { label: "Secret", value: request.name },
9
+ ...(request.source ? [{ label: "New value from", value: request.source }, { label: "Current value", value: request.comparison === "different" ? "different from the new value" : "could not be read to compare" }] : []),
10
+ { label: "Takes effect", value: TAKES_EFFECT[request.appliesOn] },
11
+ ];
12
+ return async (request) => {
13
+ // Only public target/name/source metadata enters the generic description. Values remain
14
+ // inside the secret-card/provider engine; a create still needs no replacement approval.
15
+ return approvalToolHandler({ surfaces,
16
+ prepare: async () => request,
17
+ describe: ({ prepared }) => prepared.action === "remove"
18
+ ? { toolId: "deployment_ops_unset_secret", errorCode: "DEPLOY_OPS", title: `Remove secret ${prepared.name} from ${prepared.target}?`, description: deps.removeDescription, details: details(prepared), warning: "An app that still reads this variable may fail to boot after the next deploy.", danger: true, confirmLabel: "Remove secret" }
19
+ : { toolId: "deployment_ops_set_secret", errorCode: "DEPLOY_OPS", title: `Replace secret ${prepared.name} on ${prepared.target}?`, description: deps.replaceDescription, details: details(prepared), danger: true, confirmLabel: "Replace secret" },
20
+ run: async ({ ctx: snapshot }) => {
21
+ await permit("custom-credentials.write");
22
+ return snapshot.signal.aborted ? { confirmed: false, result: notConfirmedResult({ confirmed: false, reason: "abandoned" }) } : { confirmed: true };
23
+ },
24
+ }, { declined: ({ reason }) => ({ confirmed: false, result: notConfirmedResult({ confirmed: false, reason }) }) })(ctx, options);
25
+ };
26
+ }
27
+ //# sourceMappingURL=secret-confirm.js.map
@@ -0,0 +1,28 @@
1
+ import type { createNodeReachabilityPorts } from "../../node.js";
2
+ import type { DeployFetchTimeouts, SigV4Client } from "./types.js";
3
+ import type { PluginDeployHostKit as DeployHostKit } from "../../index.js";
4
+ /**
5
+ * @file Builds the {@link DeployHostKit} this app injects into every plugin deploy module. Generic:
6
+ * devops' vendor-neutral helpers (reachability, naming, redirect guard), a timeout-bounded `fetch`,
7
+ * and a SigV4 request signer (the protocol S3-compatible stores share), nothing host-specific.
8
+ */
9
+ export declare const DEPLOY_FETCH_TIMEOUTS: DeployFetchTimeouts;
10
+ /**
11
+ * The kit handed to a deploy module.
12
+ *
13
+ * @complexity O(1).
14
+ */
15
+ export declare function createDeployHostKit({ fetchFn, createReachability, now, sleep, createSigV4Client }: {
16
+ fetchFn: typeof fetch;
17
+ createReachability: () => ReturnType<typeof createNodeReachabilityPorts>;
18
+ now: () => number;
19
+ sleep: (required: {
20
+ ms: number;
21
+ }) => Promise<void>;
22
+ createSigV4Client: (required: {
23
+ options: Parameters<DeployHostKit["createSigV4Client"]>[0];
24
+ }) => SigV4Client;
25
+ }, { timeouts }?: {
26
+ timeouts?: DeployFetchTimeouts;
27
+ }): DeployHostKit;
28
+ //# sourceMappingURL=host-kit.d.ts.map
@@ -0,0 +1,120 @@
1
+ import { DeployError as DevopsDeployError, assertNotRedirected, checkDeploymentUrl, normalizeDeploymentUrl, redirectGuardInit, safeDnsLabel, safeProjectLabel, waitForReachableDeploymentUrl, } from "../../index.js";
2
+ /**
3
+ * @file Builds the {@link DeployHostKit} this app injects into every plugin deploy module. Generic:
4
+ * devops' vendor-neutral helpers (reachability, naming, redirect guard), a timeout-bounded `fetch`,
5
+ * and a SigV4 request signer (the protocol S3-compatible stores share), nothing host-specific.
6
+ */
7
+ // Values match the platform fetch timeouts.
8
+ export const DEPLOY_FETCH_TIMEOUTS = Object.freeze({ QUICK: 15_000, DEPLOY: 30_000, UPLOAD: 120_000 });
9
+ /**
10
+ * `fetch`, aborted after `timeoutMs`. A caller's own `init.signal` still works: the request aborts on
11
+ * whichever fires first, and only OUR timeout is reported as a timeout.
12
+ *
13
+ * @throws {Error} `fetch timed out after <ms>ms: <origin>` when the timeout fired; otherwise whatever
14
+ * `fetch` rejected with (the caller's abort reason, a network error).
15
+ * @complexity One request.
16
+ */
17
+ async function fetchWithTimeout({ fetchFn, url, init, options }, _options = {}) {
18
+ const timeoutSignal = AbortSignal.timeout(options.timeoutMs);
19
+ const signal = init.signal ? AbortSignal.any([init.signal, timeoutSignal]) : timeoutSignal;
20
+ try {
21
+ return await fetchFn(url, { ...init, signal });
22
+ }
23
+ catch (error) {
24
+ if (timeoutSignal.aborted && !init.signal?.aborted)
25
+ throw new Error(`fetch timed out after ${options.timeoutMs}ms: ${URL.canParse(url) ? new URL(url).origin : "the requested server"}`, { cause: error });
26
+ throw error;
27
+ }
28
+ }
29
+ /** Preserve the installed plugin constructor ABI, including status/details and instanceof. */
30
+ class PluginDeployError extends DevopsDeployError {
31
+ // Shared helpers throw the library class; plugins must recognize those refusals too.
32
+ static [Symbol.hasInstance](value) { return value instanceof DevopsDeployError; }
33
+ constructor(message, status = 400, details) {
34
+ super({ message }, { status, details });
35
+ }
36
+ }
37
+ /** A plugin's response detector is positional; the Jini response port is an object. */
38
+ function reachabilityOptions(options = {}) {
39
+ const { detectProtected, ...rest } = options;
40
+ return { ...rest, ...(detectProtected ? { detectProtected: ({ resp, body }) => detectProtected(resp, body) } : {}) };
41
+ }
42
+ /** At most 4 KiB is needed for the content digest; cancel oversized or stalled responses. */
43
+ async function matchesContentProof({ response, expected }, _options = {}) {
44
+ if (!response.ok || !response.body)
45
+ return false;
46
+ const reader = response.body.getReader();
47
+ try {
48
+ const body = await readProofBody({ reader });
49
+ return body !== undefined && body.toString("utf8") === expected;
50
+ }
51
+ finally {
52
+ await reader.cancel();
53
+ }
54
+ }
55
+ async function readProofBody({ reader }, _options = {}) {
56
+ let bytes = 0;
57
+ const chunks = [];
58
+ while (true) {
59
+ const chunk = await reader.read();
60
+ if (chunk.done)
61
+ return Buffer.concat(chunks);
62
+ bytes += chunk.value.length;
63
+ if (bytes > 4096)
64
+ return undefined;
65
+ chunks.push(chunk.value);
66
+ }
67
+ }
68
+ /** Guard and transport come from one Jini binding, enforcing policy at connection time. */
69
+ async function probeDeploymentContent({ ports, url, expected }, _options = {}) {
70
+ try {
71
+ ports.guard.assertSafeUrl({ raw: url, label: "deployment content proof" });
72
+ const response = await ports.fetch({ url }, { init: { signal: AbortSignal.timeout(DEPLOY_FETCH_TIMEOUTS.QUICK), redirect: "error" } });
73
+ return await matchesContentProof({ response, expected });
74
+ }
75
+ catch {
76
+ return false;
77
+ }
78
+ }
79
+ /**
80
+ * The kit handed to a deploy module.
81
+ *
82
+ * @complexity O(1).
83
+ */
84
+ export function createDeployHostKit({ fetchFn, createReachability, now, sleep, createSigV4Client }, { timeouts } = {}) {
85
+ // Each probe operation owns its dispatcher; polling shares it until the operation settles.
86
+ // Per-publish kits have no shutdown hook, so release connections on success and refusal alike.
87
+ async function withReachability({ run }, _options = {}) {
88
+ const reachability = createReachability();
89
+ try {
90
+ return await run(reachability);
91
+ }
92
+ finally {
93
+ await reachability.close();
94
+ }
95
+ }
96
+ return {
97
+ now: () => now(),
98
+ // The paired Jini transport enforces policy at connection time, including every redirect.
99
+ // A 200 alone cannot distinguish a previous site from the content just deployed.
100
+ probeContent: ({ url, expected }) => withReachability({ run: ports => probeDeploymentContent({ ports, url, expected }) }),
101
+ fetch: (url, init, fetchOptions) => fetchWithTimeout({ fetchFn, url, init, options: fetchOptions }),
102
+ timeouts: timeouts ?? DEPLOY_FETCH_TIMEOUTS,
103
+ sleep: (ms) => sleep({ ms }),
104
+ // Standalone installed plugins keep their ABI. Every shared helper receives
105
+ // object args and explicit host ports, including native fetch and polling time.
106
+ checkDeploymentUrl: (url, options) => withReachability({ run: reachability => checkDeploymentUrl({ url, ...reachability }, reachabilityOptions(options)) }),
107
+ waitForReachableDeploymentUrl: (urls, options) => withReachability({ run: reachability => waitForReachableDeploymentUrl({
108
+ urls, ...reachability, now: () => now(),
109
+ sleep: ({ ms }) => sleep({ ms }),
110
+ }, reachabilityOptions(options)) }),
111
+ normalizeDeploymentUrl: (url) => normalizeDeploymentUrl({ url }),
112
+ safeDnsLabel: (raw) => safeDnsLabel({ raw }),
113
+ safeProjectLabel: (raw, maxLength) => safeProjectLabel({ raw, maxLength }),
114
+ redirectGuardInit: (init) => redirectGuardInit({ init }),
115
+ assertNotRedirected: (resp, providerLabel) => assertNotRedirected({ resp, providerLabel }),
116
+ createSigV4Client: (clientOptions) => createSigV4Client({ options: clientOptions }),
117
+ DeployError: PluginDeployError,
118
+ };
119
+ }
120
+ //# sourceMappingURL=host-kit.js.map