@jini-ai/devops 0.7.3-next.2 → 0.7.4

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 (402) hide show
  1. package/CHANGELOG.md +7 -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 +158 -0
  11. package/dist/backup/site/backup-service.d.ts +336 -0
  12. package/dist/backup/site/backup-service.js +127 -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 +94 -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 +39 -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 +197 -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 +210 -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 +107 -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 +75 -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 +204 -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/coverage/lcov.js +1 -1
  133. package/dist/checks/env-access.d.ts +14 -1
  134. package/dist/checks/env-access.js +92 -6
  135. package/dist/checks/live-verify-checks.d.ts +29 -0
  136. package/dist/checks/live-verify-checks.js +30 -0
  137. package/dist/checks/quality-gates.d.ts +137 -0
  138. package/dist/checks/quality-gates.js +209 -0
  139. package/dist/core/deploy-types.d.ts +2 -0
  140. package/dist/deploy/admin-http/site-update-status.d.ts +8 -0
  141. package/dist/deploy/admin-http/site-update-status.js +15 -0
  142. package/dist/deploy/host-kit.d.ts +3 -0
  143. package/dist/deploy/index.d.ts +6 -0
  144. package/dist/deploy/index.js +6 -0
  145. package/dist/deploy/ops-runner.js +7 -0
  146. package/dist/deploy/ops-tool-contracts.d.ts +10 -1
  147. package/dist/deploy/react/Deployment.d.ts +37 -0
  148. package/dist/deploy/react/Deployment.js +94 -0
  149. package/dist/deploy/react/DockerfileTab.d.ts +72 -0
  150. package/dist/deploy/react/DockerfileTab.js +131 -0
  151. package/dist/deploy/react/HistoryTab.d.ts +43 -0
  152. package/dist/deploy/react/HistoryTab.js +12 -0
  153. package/dist/deploy/react/OverviewTab.d.ts +60 -0
  154. package/dist/deploy/react/OverviewTab.js +75 -0
  155. package/dist/deploy/react/PublishRunResult.d.ts +5 -1
  156. package/dist/deploy/react/PublishRunResult.js +4 -4
  157. package/dist/deploy/react/SiteUpdateNotice.d.ts +22 -0
  158. package/dist/deploy/react/SiteUpdateNotice.js +25 -0
  159. package/dist/deploy/react/StaticCredentialFields.d.ts +36 -0
  160. package/dist/deploy/react/StaticCredentialFields.js +63 -0
  161. package/dist/deploy/react/StaticCredentialSteps.d.ts +23 -0
  162. package/dist/deploy/react/StaticCredentialSteps.js +152 -0
  163. package/dist/deploy/react/StaticExportCard.d.ts +11 -0
  164. package/dist/deploy/react/StaticExportCard.js +97 -0
  165. package/dist/deploy/react/StaticPublishCredentials.d.ts +50 -0
  166. package/dist/deploy/react/StaticPublishCredentials.js +77 -0
  167. package/dist/deploy/react/StaticPublishForm.d.ts +12 -0
  168. package/dist/deploy/react/StaticPublishForm.js +91 -0
  169. package/dist/deploy/react/StaticSiteTab.d.ts +207 -0
  170. package/dist/deploy/react/StaticSiteTab.js +117 -0
  171. package/dist/deploy/react/deployment-visuals.d.ts +207 -0
  172. package/dist/deploy/react/deployment-visuals.js +101 -0
  173. package/dist/deploy/react/download-dockerfile.d.ts +14 -0
  174. package/dist/deploy/react/download-dockerfile.js +15 -0
  175. package/dist/deploy/react/hooks/publish-credential-draft.d.ts +33 -0
  176. package/dist/deploy/react/hooks/publish-credential-draft.js +54 -0
  177. package/dist/deploy/react/hooks/publish-credential-selection.d.ts +13 -0
  178. package/dist/deploy/react/hooks/publish-credential-selection.js +34 -0
  179. package/dist/deploy/react/hooks/publish-credential-writes.d.ts +20 -0
  180. package/dist/deploy/react/hooks/publish-credential-writes.js +99 -0
  181. package/dist/deploy/react/hooks/static-publish-actions.d.ts +10 -0
  182. package/dist/deploy/react/hooks/static-publish-actions.js +62 -0
  183. package/dist/deploy/react/hooks/static-publish-form.hooks.d.ts +38 -0
  184. package/dist/deploy/react/hooks/static-publish-form.hooks.js +103 -0
  185. package/dist/deploy/react/hooks/static-publish-run.hooks.d.ts +28 -0
  186. package/dist/deploy/react/hooks/static-publish-run.hooks.js +92 -0
  187. package/dist/deploy/react/hooks/use-dockerfile-source.hooks.d.ts +148 -0
  188. package/dist/deploy/react/hooks/use-dockerfile-source.hooks.js +155 -0
  189. package/dist/deploy/react/hooks/use-publish-credentials.hooks.d.ts +268 -0
  190. package/dist/deploy/react/hooks/use-publish-credentials.hooks.js +52 -0
  191. package/dist/deploy/react/hooks/use-static-export.hooks.d.ts +128 -0
  192. package/dist/deploy/react/hooks/use-static-export.hooks.js +159 -0
  193. package/dist/deploy/react/hooks/use-static-publish.hooks.d.ts +208 -0
  194. package/dist/deploy/react/hooks/use-static-publish.hooks.js +48 -0
  195. package/dist/deploy/react/index.d.ts +4 -0
  196. package/dist/deploy/react/index.js +2 -0
  197. package/dist/deploy/react/rules.d.ts +363 -0
  198. package/dist/deploy/react/rules.js +314 -0
  199. package/dist/deploy/react/use-deployment-overview.hooks.d.ts +41 -0
  200. package/dist/deploy/react/use-deployment-overview.hooks.js +11 -0
  201. package/dist/deploy/site/agent-tools.d.ts +42 -0
  202. package/dist/deploy/site/agent-tools.js +119 -0
  203. package/dist/deploy/site/deploy-config-registry.d.ts +155 -0
  204. package/dist/deploy/site/deploy-config-registry.js +124 -0
  205. package/dist/deploy/site/deploy-config.d.ts +97 -0
  206. package/dist/deploy/site/deploy-config.js +115 -0
  207. package/dist/deploy/site/deploy-ops/agent-tools.d.ts +22 -0
  208. package/dist/deploy/site/deploy-ops/agent-tools.js +76 -0
  209. package/dist/deploy/site/deploy-ops/registry.d.ts +134 -0
  210. package/dist/deploy/site/deploy-ops/registry.js +106 -0
  211. package/dist/deploy/site/deploy-ops/run-ops.d.ts +66 -0
  212. package/dist/deploy/site/deploy-ops/run-ops.js +34 -0
  213. package/dist/deploy/site/deploy-ops/secret-confirm.d.ts +36 -0
  214. package/dist/deploy/site/deploy-ops/secret-confirm.js +27 -0
  215. package/dist/deploy/site/deploy-targets/host-kit.d.ts +28 -0
  216. package/dist/deploy/site/deploy-targets/host-kit.js +120 -0
  217. package/dist/deploy/site/deploy-targets/registry.d.ts +157 -0
  218. package/dist/deploy/site/deploy-targets/registry.js +130 -0
  219. package/dist/deploy/site/deploy-targets/types.d.ts +27 -0
  220. package/dist/deploy/site/deploy-targets/types.js +2 -0
  221. package/dist/deploy/site/dockerfile.d.ts +137 -0
  222. package/dist/deploy/site/dockerfile.js +101 -0
  223. package/dist/deploy/site/export-run.d.ts +137 -0
  224. package/dist/deploy/site/export-run.js +152 -0
  225. package/dist/deploy/site/ports.d.ts +115 -0
  226. package/dist/deploy/site/ports.js +2 -0
  227. package/dist/deploy/site/publish-agent-tools.d.ts +18 -0
  228. package/dist/deploy/site/publish-agent-tools.js +120 -0
  229. package/dist/deploy/site/publish-candidate.d.ts +26 -0
  230. package/dist/deploy/site/publish-candidate.js +37 -0
  231. package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.d.ts +78 -0
  232. package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.js +88 -0
  233. package/dist/deploy/site/publish-credentials/compatibility-port.d.ts +38 -0
  234. package/dist/deploy/site/publish-credentials/compatibility-port.js +19 -0
  235. package/dist/deploy/site/publish-credentials/execution-mode.d.ts +43 -0
  236. package/dist/deploy/site/publish-credentials/execution-mode.js +19 -0
  237. package/dist/deploy/site/publish-credentials/store-owner.d.ts +11 -0
  238. package/dist/deploy/site/publish-credentials/store-owner.js +9 -0
  239. package/dist/deploy/site/publish-credentials/store-resolution.d.ts +55 -0
  240. package/dist/deploy/site/publish-credentials/store-resolution.js +100 -0
  241. package/dist/deploy/site/publish-credentials/store-validation.d.ts +68 -0
  242. package/dist/deploy/site/publish-credentials/store-validation.js +182 -0
  243. package/dist/deploy/site/publish-credentials/store.d.ts +321 -0
  244. package/dist/deploy/site/publish-credentials/store.js +367 -0
  245. package/dist/deploy/site/publish-credentials/types.d.ts +85 -0
  246. package/dist/deploy/site/publish-credentials/types.js +2 -0
  247. package/dist/deploy/site/publish-tool-capabilities.d.ts +123 -0
  248. package/dist/deploy/site/publish-tool-capabilities.js +175 -0
  249. package/dist/deploy/site/publish-tool-credential.d.ts +48 -0
  250. package/dist/deploy/site/publish-tool-credential.js +284 -0
  251. package/dist/deploy/site/publish-tool-deps.d.ts +205 -0
  252. package/dist/deploy/site/publish-tool-deps.js +15 -0
  253. package/dist/deploy/site/publish-tool-execution.d.ts +78 -0
  254. package/dist/deploy/site/publish-tool-execution.js +313 -0
  255. package/dist/deploy/site/publish-tool-schema.d.ts +29 -0
  256. package/dist/deploy/site/publish-tool-schema.js +38 -0
  257. package/dist/deploy/site/static-publish/adapter-export.d.ts +54 -0
  258. package/dist/deploy/site/static-publish/adapter-export.js +89 -0
  259. package/dist/deploy/site/static-publish/adapter-plan.d.ts +99 -0
  260. package/dist/deploy/site/static-publish/adapter-plan.js +112 -0
  261. package/dist/deploy/site/static-publish/adapter.d.ts +182 -0
  262. package/dist/deploy/site/static-publish/adapter.js +321 -0
  263. package/dist/deploy/site/static-publish/admin-publish-read.d.ts +209 -0
  264. package/dist/deploy/site/static-publish/admin-publish-read.js +118 -0
  265. package/dist/deploy/site/static-publish/credentials.d.ts +114 -0
  266. package/dist/deploy/site/static-publish/credentials.js +298 -0
  267. package/dist/deploy/site/static-publish/domain-publish-rows.d.ts +25 -0
  268. package/dist/deploy/site/static-publish/domain-publish-rows.js +43 -0
  269. package/dist/deploy/site/static-publish/domain-publish-tool.d.ts +19 -0
  270. package/dist/deploy/site/static-publish/domain-publish-tool.js +111 -0
  271. package/dist/deploy/site/static-publish/inspection.d.ts +24 -0
  272. package/dist/deploy/site/static-publish/inspection.js +69 -0
  273. package/dist/deploy/site/static-publish/publish-history.d.ts +197 -0
  274. package/dist/deploy/site/static-publish/publish-history.js +153 -0
  275. package/dist/deploy/site/static-publish/publish-run.d.ts +156 -0
  276. package/dist/deploy/site/static-publish/publish-run.js +186 -0
  277. package/dist/deploy/site/static-publish/types.d.ts +168 -0
  278. package/dist/deploy/site/static-publish/types.js +2 -0
  279. package/dist/deploy/site/static-publish/verify.d.ts +237 -0
  280. package/dist/deploy/site/static-publish/verify.js +284 -0
  281. package/dist/deploy/site/tool-registrations.d.ts +97 -0
  282. package/dist/deploy/site/tool-registrations.js +130 -0
  283. package/dist/deploy/site/types.d.ts +51 -0
  284. package/dist/deploy/site/types.js +2 -0
  285. package/dist/deploy/site-update/check-for-update.d.ts +19 -0
  286. package/dist/deploy/site-update/check-for-update.js +19 -0
  287. package/dist/deploy/site-update/contracts.d.ts +161 -0
  288. package/dist/deploy/site-update/contracts.js +94 -0
  289. package/dist/deploy/site-update/desktop-site-update.d.ts +66 -0
  290. package/dist/deploy/site-update/desktop-site-update.js +43 -0
  291. package/dist/deploy/site-update/fake-site-update.d.ts +39 -0
  292. package/dist/deploy/site-update/fake-site-update.js +52 -0
  293. package/dist/deploy/site-update/run-site-update.d.ts +121 -0
  294. package/dist/deploy/site-update/run-site-update.js +219 -0
  295. package/dist/deploy/site-update/self-hosted-site-update.d.ts +71 -0
  296. package/dist/deploy/site-update/self-hosted-site-update.js +79 -0
  297. package/dist/deploy/target-contracts.d.ts +3 -0
  298. package/dist/deploy/tool.d.ts +5 -8
  299. package/dist/deploy/tool.js +6 -9
  300. package/dist/dns/binding-sweeper.d.ts +72 -0
  301. package/dist/dns/binding-sweeper.js +53 -0
  302. package/dist/dns/index.d.ts +1 -0
  303. package/dist/dns/index.js +1 -0
  304. package/dist/dns/site/binding.repo.d.ts +71 -0
  305. package/dist/dns/site/binding.repo.js +45 -0
  306. package/dist/dns/site/dns-changes.d.ts +90 -0
  307. package/dist/dns/site/dns-changes.js +271 -0
  308. package/dist/dns/site/dns-tools.d.ts +46 -0
  309. package/dist/dns/site/dns-tools.js +204 -0
  310. package/dist/dns/site/mail-dns-status.d.ts +111 -0
  311. package/dist/dns/site/mail-dns-status.js +190 -0
  312. package/dist/dns/site/mail-dns-tools.d.ts +33 -0
  313. package/dist/dns/site/mail-dns-tools.js +62 -0
  314. package/dist/dns/site/mail-requirements.d.ts +30 -0
  315. package/dist/dns/site/mail-requirements.js +78 -0
  316. package/dist/dns/site/tool-deps.d.ts +21 -0
  317. package/dist/dns/site/tool-deps.js +2 -0
  318. package/dist/dns/site/tools.d.ts +74 -0
  319. package/dist/dns/site/tools.js +124 -0
  320. package/dist/local-dev/bind-host.d.ts +80 -0
  321. package/dist/local-dev/bind-host.js +90 -0
  322. package/dist/local-dev/dev-proxy-upstream.d.ts +69 -0
  323. package/dist/local-dev/dev-proxy-upstream.js +63 -0
  324. package/dist/local-dev/index.d.ts +28 -0
  325. package/dist/local-dev/index.js +25 -0
  326. package/dist/packaging/electron/archive.d.ts +2 -9
  327. package/dist/packaging/electron/asar-adapter.d.ts +2 -1
  328. package/dist/packaging/electron/entry.d.ts +2 -0
  329. package/dist/packaging/electron/move-to-applications.d.ts +165 -0
  330. package/dist/packaging/electron/move-to-applications.js +162 -0
  331. package/dist/packaging/electron/policies.d.ts +33 -4
  332. package/dist/packaging/electron/policies.js +29 -10
  333. package/dist/packaging/electron/ports.d.ts +1 -6
  334. package/dist/packaging/electron/staging.d.ts +11 -2
  335. package/dist/packaging/electron/staging.js +15 -5
  336. package/dist/packaging/electron/update-manifest-merge.js +0 -2
  337. package/dist/react/site-share-expiry/ShareExpiryControls.d.ts +29 -0
  338. package/dist/react/site-share-expiry/ShareExpiryControls.js +7 -0
  339. package/dist/react/site-share-expiry/index.d.ts +2 -0
  340. package/dist/react/site-share-expiry/index.js +2 -0
  341. package/dist/source-control/react/ProvidersTab.d.ts +98 -0
  342. package/dist/source-control/react/ProvidersTab.js +195 -0
  343. package/dist/source-control/react/SourceControl.d.ts +51 -0
  344. package/dist/source-control/react/SourceControl.js +61 -0
  345. package/dist/source-control/react/hooks/use-source-control-credentials.hooks.d.ts +128 -0
  346. package/dist/source-control/react/hooks/use-source-control-credentials.hooks.js +102 -0
  347. package/dist/source-control/react/rules.d.ts +167 -0
  348. package/dist/source-control/react/rules.js +125 -0
  349. package/dist/source-control/react/source-control-visuals.d.ts +75 -0
  350. package/dist/source-control/react/source-control-visuals.js +48 -0
  351. package/dist/source-control/site/agent-tools.d.ts +5 -0
  352. package/dist/source-control/site/agent-tools.js +30 -0
  353. package/dist/source-control/site/bundled-provider-registry.d.ts +33 -0
  354. package/dist/source-control/site/bundled-provider-registry.js +37 -0
  355. package/dist/source-control/site/commit-schema.d.ts +40 -0
  356. package/dist/source-control/site/commit-schema.js +29 -0
  357. package/dist/source-control/site/commit-target.d.ts +26 -0
  358. package/dist/source-control/site/commit-target.js +58 -0
  359. package/dist/source-control/site/credential-form.d.ts +36 -0
  360. package/dist/source-control/site/credential-form.js +102 -0
  361. package/dist/source-control/site/credential-setup.d.ts +107 -0
  362. package/dist/source-control/site/credential-setup.js +216 -0
  363. package/dist/source-control/site/provider-kit.d.ts +37 -0
  364. package/dist/source-control/site/provider-kit.js +35 -0
  365. package/dist/source-control/site/provider-module.d.ts +251 -0
  366. package/dist/source-control/site/provider-module.js +2 -0
  367. package/dist/source-control/site/saved-key-bindings.d.ts +4 -0
  368. package/dist/source-control/site/saved-key-bindings.js +4 -0
  369. package/dist/source-control/site/static-site-packager-port.d.ts +37 -0
  370. package/dist/source-control/site/static-site-packager-port.js +2 -0
  371. package/dist/source-control/site/store.d.ts +209 -0
  372. package/dist/source-control/site/store.js +374 -0
  373. package/dist/source-control/site/store.validation.d.ts +72 -0
  374. package/dist/source-control/site/store.validation.js +168 -0
  375. package/dist/source-control/site/tool-registrations.d.ts +190 -0
  376. package/dist/source-control/site/tool-registrations.js +379 -0
  377. package/dist/static-export/asset-crawl.d.ts +30 -0
  378. package/dist/static-export/asset-crawl.js +71 -0
  379. package/dist/static-export/dynamic-asset-locations.d.ts +23 -0
  380. package/dist/static-export/dynamic-asset-locations.js +34 -0
  381. package/dist/static-export/html-url-locations.d.ts +3 -1
  382. package/dist/static-export/html-url-locations.js +43 -9
  383. package/dist/static-export/runner.js +26 -27
  384. package/dist/static-export/site/export-preflight.d.ts +48 -0
  385. package/dist/static-export/site/export-preflight.js +82 -0
  386. package/dist/static-export/site/media-original-urls.d.ts +57 -0
  387. package/dist/static-export/site/media-original-urls.js +109 -0
  388. package/dist/static-export/site/ports.d.ts +82 -0
  389. package/dist/static-export/site/ports.js +29 -0
  390. package/dist/static-export/site/public-origin-policy.d.ts +32 -0
  391. package/dist/static-export/site/public-origin-policy.js +68 -0
  392. package/dist/static-export/site/route-manifest.d.ts +65 -0
  393. package/dist/static-export/site/route-manifest.js +139 -0
  394. package/dist/static-export/site/site-exporter.d.ts +158 -0
  395. package/dist/static-export/site/site-exporter.js +112 -0
  396. package/dist/static-export/site/static-security-headers.d.ts +39 -0
  397. package/dist/static-export/site/static-security-headers.js +43 -0
  398. package/dist/static-export/site/theme-preview-manifest.d.ts +35 -0
  399. package/dist/static-export/site/theme-preview-manifest.js +28 -0
  400. package/dist/static-export/transforms.d.ts +1 -1
  401. package/dist/static-export/transforms.js +3 -3
  402. package/package.json +911 -7
@@ -0,0 +1,78 @@
1
+ import type { PublishCredentialSummary, PublishProviderId } from "./types.js";
2
+ /**
3
+ * @file A tiny fire-and-forget scheduler for "heal this row's account label in the background,
4
+ * without ever blocking or breaking the caller's own read." Built for exactly one kind of caller — the
5
+ * host's human-gated publish-credentials list handler — but kept free of any domain knowledge (no
6
+ * provider vocabulary, no verify/decrypt concept) so it never has to import the host's provider-verify
7
+ * module. That module already imports FROM this feature (`types.ts` is the lower, canonical module;
8
+ * the static-publish side borrows its provider union, not the other way round), so a reverse import
9
+ * here would open a module cycle. The caller decides WHICH ids need healing
10
+ * ({@link idsNeedingAccountLabelHeal}, using a `canYieldAccountLabel` predicate it supplies), WHAT
11
+ * healing an id means (its own `heal` callback, `verifyAfterSave`-shaped) and HOW a failure is
12
+ * reported (its own `onHealError`); this module only decides WHEN to call `heal`, and never more than
13
+ * once per id at a time.
14
+ *
15
+ * Why this exists — the mechanism it fixes:
16
+ * a stored credential's account label starts `null` on every row and is only ever populated by a
17
+ * human-gated verify-then-heal pass. That pass already runs automatically on every save — so a NEWLY
18
+ * saved credential heals itself immediately — but a row whose very first auto-verify failed (provider
19
+ * unreachable at save time, or a row saved before that wiring existed) stays `null` forever unless a
20
+ * human clicks a per-row "Verify" action. This scheduler closes that gap: the host's list read calls
21
+ * {@link AccountLabelHealScheduler.triggerFor} with every currently-null, healable row id on every
22
+ * list request, and this module guarantees at most one heal attempt per id is ever in flight, and that
23
+ * a failed or slow attempt can never surface as an error on the READ that triggered it.
24
+ *
25
+ * Deliberately NOT reachable from anywhere agent-facing: only a human-gated host surface (a provider
26
+ * probe is never an agent tool) is expected to hold a reference to a scheduler instance. This module
27
+ * cannot enforce that itself — it has no way to — so the boundary is a wiring discipline the CALLER
28
+ * owns, exactly like the host's own `verifyAfterSave` already is for the identical reason.
29
+ *
30
+ * Architecture ADR: `ADS-memory/reports/jini-port/extraction-plan.md`.
31
+ */
32
+ /**
33
+ * Every id in `credentials` whose `accountLabel` is still unknown AND whose provider can ever produce
34
+ * one — probing a provider `canYieldAccountLabel` already says "no" for would be a wasted network call
35
+ * on a read path for a result that can never arrive, so those rows are excluded here rather than left
36
+ * for the scheduler to attempt and silently no-op.
37
+ * @complexity O(n) in `credentials.length` — one filter pass, no per-row I/O.
38
+ */
39
+ export declare function idsNeedingAccountLabelHeal({ credentials, canYieldAccountLabel }: {
40
+ credentials: readonly PublishCredentialSummary[];
41
+ canYieldAccountLabel: (providerId: PublishProviderId) => boolean;
42
+ }, _options?: {}): string[];
43
+ export interface AccountLabelHealSchedulerDeps {
44
+ /** Attempts to heal exactly one row — expected to be `verifyAfterSave`-shaped (probe the real
45
+ * provider, then persist the label if one came back). May reject; a rejection is caught and
46
+ * reported via `onHealError`, never re-thrown into whatever triggered this heal. */
47
+ heal(required: {
48
+ id: string;
49
+ }, optional?: Record<string, never>): Promise<unknown>;
50
+ /** Called when `heal` rejects (or throws synchronously, despite the documented contract — see
51
+ * {@link createAccountLabelHealScheduler}'s own doc), and once more under id `"*"` if reporting
52
+ * itself throws. Required: this package never logs, so the host binds its own reporter (typically
53
+ * the same fallback logging its route errors already use, so a background heal failure shows up in
54
+ * the same place an unexpected route error does). */
55
+ onHealError(required: {
56
+ id: string;
57
+ err: unknown;
58
+ }, options?: object): void;
59
+ }
60
+ export interface AccountLabelHealScheduler {
61
+ /**
62
+ * Fires `deps.heal({ id })` for every id in `ids` not ALREADY in flight from a previous call — never
63
+ * awaited, never throws, never returns a rejected (or any) Promise to the caller. Safe to call on
64
+ * every single request: an id already healing is simply skipped; an id whose previous attempt already
65
+ * settled (success OR failure) is eligible again, so a transient failure is not a permanent
66
+ * blacklist.
67
+ * @complexity O(n) in `ids.length` — one Set membership check and, for a new id, one fire-and-forget
68
+ * call per entry.
69
+ */
70
+ triggerFor(ids: readonly string[]): void;
71
+ }
72
+ /**
73
+ * Builds one scheduler instance. Call ONCE per route registration (like `verifyAfterSave` itself) and
74
+ * reuse it across every request — the in-flight tracking is only useful if it survives between calls.
75
+ * @complexity O(1) to construct.
76
+ */
77
+ export declare function createAccountLabelHealScheduler(deps: AccountLabelHealSchedulerDeps): AccountLabelHealScheduler;
78
+ //# sourceMappingURL=account-label-heal-scheduler.d.ts.map
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @file A tiny fire-and-forget scheduler for "heal this row's account label in the background,
3
+ * without ever blocking or breaking the caller's own read." Built for exactly one kind of caller — the
4
+ * host's human-gated publish-credentials list handler — but kept free of any domain knowledge (no
5
+ * provider vocabulary, no verify/decrypt concept) so it never has to import the host's provider-verify
6
+ * module. That module already imports FROM this feature (`types.ts` is the lower, canonical module;
7
+ * the static-publish side borrows its provider union, not the other way round), so a reverse import
8
+ * here would open a module cycle. The caller decides WHICH ids need healing
9
+ * ({@link idsNeedingAccountLabelHeal}, using a `canYieldAccountLabel` predicate it supplies), WHAT
10
+ * healing an id means (its own `heal` callback, `verifyAfterSave`-shaped) and HOW a failure is
11
+ * reported (its own `onHealError`); this module only decides WHEN to call `heal`, and never more than
12
+ * once per id at a time.
13
+ *
14
+ * Why this exists — the mechanism it fixes:
15
+ * a stored credential's account label starts `null` on every row and is only ever populated by a
16
+ * human-gated verify-then-heal pass. That pass already runs automatically on every save — so a NEWLY
17
+ * saved credential heals itself immediately — but a row whose very first auto-verify failed (provider
18
+ * unreachable at save time, or a row saved before that wiring existed) stays `null` forever unless a
19
+ * human clicks a per-row "Verify" action. This scheduler closes that gap: the host's list read calls
20
+ * {@link AccountLabelHealScheduler.triggerFor} with every currently-null, healable row id on every
21
+ * list request, and this module guarantees at most one heal attempt per id is ever in flight, and that
22
+ * a failed or slow attempt can never surface as an error on the READ that triggered it.
23
+ *
24
+ * Deliberately NOT reachable from anywhere agent-facing: only a human-gated host surface (a provider
25
+ * probe is never an agent tool) is expected to hold a reference to a scheduler instance. This module
26
+ * cannot enforce that itself — it has no way to — so the boundary is a wiring discipline the CALLER
27
+ * owns, exactly like the host's own `verifyAfterSave` already is for the identical reason.
28
+ *
29
+ * Architecture ADR: `ADS-memory/reports/jini-port/extraction-plan.md`.
30
+ */
31
+ /**
32
+ * Every id in `credentials` whose `accountLabel` is still unknown AND whose provider can ever produce
33
+ * one — probing a provider `canYieldAccountLabel` already says "no" for would be a wasted network call
34
+ * on a read path for a result that can never arrive, so those rows are excluded here rather than left
35
+ * for the scheduler to attempt and silently no-op.
36
+ * @complexity O(n) in `credentials.length` — one filter pass, no per-row I/O.
37
+ */
38
+ export function idsNeedingAccountLabelHeal({ credentials, canYieldAccountLabel }, _options = {}) {
39
+ return credentials.filter((c) => c.accountLabel === null && canYieldAccountLabel(c.providerId)).map((c) => c.id);
40
+ }
41
+ /** Starts exactly one heal attempt for `id` — the one place this module calls `deps.heal`. Wrapped in
42
+ * its own `try`/`catch` around the CALL itself, not just a `.catch()` on its return value: `heal` is
43
+ * documented to always return a Promise (never throw synchronously), but this module must not depend
44
+ * on every caller honoring that — a synchronous throw here, left unguarded, would escape `triggerFor`
45
+ * and, at the expected call site (a route handler that already sent its response), turn into exactly
46
+ * the unhandled-async-rejection bug class that can take down a whole server process. */
47
+ function startHeal({ id, deps, inFlight }, _options = {}) {
48
+ inFlight.add(id);
49
+ let result;
50
+ try {
51
+ result = deps.heal({ id });
52
+ }
53
+ catch (err) {
54
+ inFlight.delete(id);
55
+ deps.onHealError({ id, err });
56
+ return;
57
+ }
58
+ result
59
+ .catch((err) => deps.onHealError({ id, err }))
60
+ .finally(() => {
61
+ inFlight.delete(id);
62
+ });
63
+ }
64
+ /**
65
+ * Builds one scheduler instance. Call ONCE per route registration (like `verifyAfterSave` itself) and
66
+ * reuse it across every request — the in-flight tracking is only useful if it survives between calls.
67
+ * @complexity O(1) to construct.
68
+ */
69
+ export function createAccountLabelHealScheduler(deps) {
70
+ const inFlight = new Set();
71
+ return {
72
+ triggerFor(ids) {
73
+ // Defense in depth, matching `startHeal`'s own reasoning: the expected caller is a route handler
74
+ // that has already sent its response by the time this runs, so NOTHING here may ever throw back
75
+ // into it — not even a bug in this loop itself.
76
+ try {
77
+ for (const id of ids) {
78
+ if (!inFlight.has(id))
79
+ startHeal({ id, deps, inFlight });
80
+ }
81
+ }
82
+ catch (err) {
83
+ deps.onHealError({ id: "*", err });
84
+ }
85
+ },
86
+ };
87
+ }
88
+ //# sourceMappingURL=account-label-heal-scheduler.js.map
@@ -0,0 +1,38 @@
1
+ import type { CredentialSetSummary } from "@jini-ai/core/contracts/credentials";
2
+ import type { DeployTargetRegistry } from "@jini-ai/devops/deploy/site/deploy-targets/types";
3
+ /** The two optional host values the invalidation has always read. Read at call time, never at bind time. */
4
+ export interface PublishCompatibilitySource {
5
+ readonly loadDeployTargets?: (required: {
6
+ workspaceId: string;
7
+ }, optional?: Record<string, never>) => Promise<DeployTargetRegistry>;
8
+ readonly publishCredentialVerificationCache?: {
9
+ delete(input: {
10
+ workspaceId: string;
11
+ target: string;
12
+ }): void;
13
+ } | undefined;
14
+ }
15
+ /**
16
+ * Binds `custom-credentials`' `PublishCompatibilityPort` over the invalidation this feature owns. The return type is inferred, not
17
+ * annotated with that port, so `deployments` takes no import from `custom-credentials`; the host's assignment to
18
+ * `RouteDeps.publishCompatibility` and `extract-s8-c2p1-ports.type-pin.ts` hold the two shapes together. `required.source` is read inside
19
+ * `prepareInvalidation`, never when the port is bound: the composition roots bind from inside the literal that builds the
20
+ * source, which is not readable yet. No `catch`: a rejected registry load propagates to the save, as before.
21
+ * @complexity O(1) to bind; one registry load per credential write when both values are present.
22
+ */
23
+ export declare function bindPublishCompatibility(required: {
24
+ readonly source: PublishCompatibilitySource;
25
+ invalidatePublishCredentialCompatibility(input: {
26
+ workspaceId: string;
27
+ registry: DeployTargetRegistry;
28
+ cache: NonNullable<PublishCompatibilitySource['publishCredentialVerificationCache']>;
29
+ after: CredentialSetSummary;
30
+ }): void;
31
+ }, _optional?: Record<string, never>): {
32
+ prepareInvalidation: ({ workspaceId }: {
33
+ workspaceId: string;
34
+ }, _optional?: Record<string, never>) => Promise<({ after }: {
35
+ after: CredentialSetSummary;
36
+ }) => void>;
37
+ };
38
+ //# sourceMappingURL=compatibility-port.d.ts.map
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Binds `custom-credentials`' `PublishCompatibilityPort` over the invalidation this feature owns. The return type is inferred, not
3
+ * annotated with that port, so `deployments` takes no import from `custom-credentials`; the host's assignment to
4
+ * `RouteDeps.publishCompatibility` and `extract-s8-c2p1-ports.type-pin.ts` hold the two shapes together. `required.source` is read inside
5
+ * `prepareInvalidation`, never when the port is bound: the composition roots bind from inside the literal that builds the
6
+ * source, which is not readable yet. No `catch`: a rejected registry load propagates to the save, as before.
7
+ * @complexity O(1) to bind; one registry load per credential write when both values are present.
8
+ */
9
+ export function bindPublishCompatibility(required, _optional = {}) {
10
+ return { prepareInvalidation: async ({ workspaceId }, _optional = {}) => {
11
+ const source = required.source;
12
+ const registry = source.loadDeployTargets && source.publishCredentialVerificationCache ? await source.loadDeployTargets({ workspaceId }) : undefined;
13
+ return ({ after }) => {
14
+ if (registry && source.publishCredentialVerificationCache)
15
+ required.invalidatePublishCredentialCompatibility({ workspaceId, registry, cache: source.publishCredentialVerificationCache, after });
16
+ };
17
+ } };
18
+ }
19
+ //# sourceMappingURL=compatibility-port.js.map
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @file The install's publish execution mode — `"self-hosted-cli"` (a human has a real terminal on
3
+ * this machine, and the assistant/CLI publish route from the Static Site tab's own header applies) or
4
+ * `"hosted-api-only"` (no terminal exists for this install; only saved provider connections in
5
+ * `publish_credential_sets` can ever publish).
6
+ *
7
+ * Purpose:
8
+ * Explicit and server-provided ONLY — this dispatch's brief is emphatic that this must NEVER be
9
+ * derived from `NODE_ENV` or by sniffing `PATH` for a CLI binary. Both would silently misclassify a
10
+ * real install: `NODE_ENV=production` is set on plenty of self-hosted machines with a real terminal
11
+ * and a signed-in `gh`, and PATH-sniffing only proves a binary exists, not that this process is
12
+ * actually running somewhere a human can reach a terminal for it (a container with `gh` baked into
13
+ * its image but no interactive shell would falsely read as self-hosted-capable).
14
+ *
15
+ * How it relates to the project:
16
+ * A plain env var (the host names it and passes it as `envVarName`) is the same category of
17
+ * operator-supplied config the host already reads directly from its environment for things that
18
+ * aren't (yet) in the encrypted settings store — see the host's static-publish credential source for
19
+ * the precedent this follows (its export-directory and admin-password env vars are the same shape).
20
+ * Defaults to `"self-hosted-cli"` (today's only real mode — Docker/hosted installs are the new case
21
+ * this dispatch adds a path for), so an operator who has not set the var at all keeps today's
22
+ * behavior unchanged.
23
+ */
24
+ export type PublishExecutionMode = "self-hosted-cli" | "hosted-api-only";
25
+ /**
26
+ * Reads the execution mode from `env[envVarName]`. Any value other than the literal string
27
+ * `"hosted-api-only"` (including unset, blank, or a typo) resolves to the safe default
28
+ * `"self-hosted-cli"` — an unrecognized value must never silently disable the self-hosted CLI path an
29
+ * operator is actually relying on.
30
+ *
31
+ * @param required.env - The environment to read; the host passes its process environment, and a test
32
+ * passes a plain object so no test needs to mutate real process env vars (which would leak across
33
+ * parallel test files in the same process — same reasoning the host's env publish-credential
34
+ * source documents for its own `env` parameter).
35
+ * @param required.envVarName - The host-owned variable name (the package never names one).
36
+ * @complexity O(1).
37
+ * @overallScore 100
38
+ */
39
+ export declare function executionModeFromEnv({ env, envVarName }: {
40
+ env: Readonly<Record<string, string | undefined>>;
41
+ envVarName: string;
42
+ }, _optional?: Record<string, never>): PublishExecutionMode;
43
+ //# sourceMappingURL=execution-mode.d.ts.map
@@ -0,0 +1,19 @@
1
+ const DEFAULT_MODE = "self-hosted-cli";
2
+ /**
3
+ * Reads the execution mode from `env[envVarName]`. Any value other than the literal string
4
+ * `"hosted-api-only"` (including unset, blank, or a typo) resolves to the safe default
5
+ * `"self-hosted-cli"` — an unrecognized value must never silently disable the self-hosted CLI path an
6
+ * operator is actually relying on.
7
+ *
8
+ * @param required.env - The environment to read; the host passes its process environment, and a test
9
+ * passes a plain object so no test needs to mutate real process env vars (which would leak across
10
+ * parallel test files in the same process — same reasoning the host's env publish-credential
11
+ * source documents for its own `env` parameter).
12
+ * @param required.envVarName - The host-owned variable name (the package never names one).
13
+ * @complexity O(1).
14
+ * @overallScore 100
15
+ */
16
+ export function executionModeFromEnv({ env, envVarName }, _optional = {}) {
17
+ return env[envVarName] === "hosted-api-only" ? "hosted-api-only" : DEFAULT_MODE;
18
+ }
19
+ //# sourceMappingURL=execution-mode.js.map
@@ -0,0 +1,11 @@
1
+ import type { VendorCredentialSetRepoPort } from './store.js';
2
+ /** The store holding vendor row `id`: this site's, else the project's when one is attached (ids are
3
+ * unique across both). Never opens a row. @complexity At most one lookup. */
4
+ export declare function ownerOf<R extends Pick<VendorCredentialSetRepoPort, "findById" | "project">>(repo: R, input: {
5
+ workspaceId: string;
6
+ id: string;
7
+ }): Promise<{
8
+ repo: R | VendorCredentialSetRepoPort;
9
+ workspaceId: string;
10
+ }>;
11
+ //# sourceMappingURL=store-owner.d.ts.map
@@ -0,0 +1,9 @@
1
+ /** The store holding vendor row `id`: this site's, else the project's when one is attached (ids are
2
+ * unique across both). Never opens a row. @complexity At most one lookup. */
3
+ export async function ownerOf(repo, input) {
4
+ const project = repo.project;
5
+ if (!project || await repo.findById(input))
6
+ return { repo, workspaceId: input.workspaceId };
7
+ return { repo: project.repo, workspaceId: project.workspaceId };
8
+ }
9
+ //# sourceMappingURL=store-owner.js.map
@@ -0,0 +1,55 @@
1
+ import type { UUID } from '@jini-ai/core/primitives';
2
+ import type { SecretSealerPort } from '@jini-ai/core/contracts/vault';
3
+ import type { PublishConnectionInput, PublishProviderId } from './types.js';
4
+ import { type PublishCredentialReadDeps, type VendorCredentialSetRecord, type VendorCredentialSetRepoPort } from './store.js';
5
+ /** The vendor row with this id from whichever store holds it — this site's or the project's. */
6
+ export declare function findPublishCredentialRecord(deps: {
7
+ repo: Pick<VendorCredentialSetRepoPort, "findById" | "project">;
8
+ }, input: {
9
+ workspaceId: UUID;
10
+ id: UUID;
11
+ }): Promise<VendorCredentialSetRecord | null>;
12
+ export interface PublishCredentialResolveDeps extends PublishCredentialReadDeps {
13
+ sealer: SecretSealerPort;
14
+ }
15
+ /** Resolve exactly one compatible row. Recheck metadata from the same read as its payload so
16
+ * concurrent compatibility edits cannot pair an ineligible secret with an old selection.
17
+ * @throws PublishCredentialSecretStoreUnconfiguredError on crypto or payload failure.
18
+ * @complexity O(rows × hosts + payload), one metadata inventory and one selected open.
19
+ */
20
+ export declare function resolveForPublish(deps: PublishCredentialResolveDeps, input: {
21
+ workspaceId: UUID;
22
+ id: UUID;
23
+ providerId?: PublishProviderId;
24
+ }): Promise<{
25
+ providerId: PublishProviderId;
26
+ vendorId: string;
27
+ label: string;
28
+ isDefault: boolean;
29
+ revision: number;
30
+ connection: PublishConnectionInput;
31
+ } | null>;
32
+ /** The same selection policy serves implicit publishing, readiness and explicit-ID resolution.
33
+ * @complexity O(rows × compatibility IDs + payload); one two-kind inventory and one selected open.
34
+ */
35
+ export declare function resolveDefaultForPublish(deps: PublishCredentialResolveDeps, input: {
36
+ workspaceId: UUID;
37
+ providerId: PublishProviderId;
38
+ }): Promise<{
39
+ id: UUID;
40
+ revision: number;
41
+ label: string;
42
+ connection: PublishConnectionInput;
43
+ } | null>;
44
+ /** Configuration requires a compatible selected candidate, not merely a provider-group default.
45
+ * An explicit id must select that authorized row; no secret is opened.
46
+ * @complexity O(rows × compatibility IDs), one metadata inventory per store and one catalog load. */
47
+ export declare function hasDefaultForPublish(deps: PublishCredentialReadDeps, input: {
48
+ workspaceId: UUID;
49
+ providerId: PublishProviderId;
50
+ id?: UUID;
51
+ }): Promise<{
52
+ id: UUID;
53
+ revision: number;
54
+ } | null>;
55
+ //# sourceMappingURL=store-resolution.d.ts.map
@@ -0,0 +1,100 @@
1
+ import { ownerOf } from './store-owner.js';
2
+ import { PublishCredentialSecretStoreUnconfiguredError, bound, vault, inventory, scopeOfRow, providerContract, publishHostsForCredential, selectPublishCredential } from './store.js';
3
+ /** The vendor row with this id from whichever store holds it — this site's or the project's. */
4
+ export async function findPublishCredentialRecord(deps, input) {
5
+ const owner = await ownerOf(deps.repo, input);
6
+ return owner.repo.findById({ workspaceId: owner.workspaceId, id: input.id });
7
+ }
8
+ /** Resolve exactly one compatible row. Recheck metadata from the same read as its payload so
9
+ * concurrent compatibility edits cannot pair an ineligible secret with an old selection.
10
+ * @throws PublishCredentialSecretStoreUnconfiguredError on crypto or payload failure.
11
+ * @complexity O(rows × hosts + payload), one metadata inventory and one selected open.
12
+ */
13
+ export async function resolveForPublish(deps, input) {
14
+ const registry = await deps.loadDeployTargets({ workspaceId: input.workspaceId });
15
+ const rows = await inventory({ deps, workspaceId: input.workspaceId });
16
+ return resolveFromInventory({ deps, input, registry, rows });
17
+ }
18
+ /** Open the selected credential through Jini using one already-authorized inventory.
19
+ * Both resolution entrypoints share compatibility rechecks and connection projection.
20
+ * @throws PublishCredentialSecretStoreUnconfiguredError on crypto or payload failure.
21
+ * @complexity O(rows × compatibility IDs + payload); one selected row read/open, no list reads.
22
+ */
23
+ async function resolveFromInventory({ deps, input, registry, rows }, _options = {}) {
24
+ const candidate = rows.find(row => row.id === input.id);
25
+ const providerId = selectedCandidateProviderId({ deps, explicitId: input.providerId, candidate, registry });
26
+ if (!candidate || !providerId)
27
+ return null;
28
+ const provider = providerContract({ registry, providerId });
29
+ if (!provider || !selectPublishCredential({ deps, registry, credentials: rows, provider, id: input.id }))
30
+ return null;
31
+ return resolveSelectedPublishCredential({ deps, input, registry, rows, candidate, providerId, provider });
32
+ }
33
+ async function resolveSelectedPublishCredential({ deps, input, registry, rows, candidate, providerId, provider }) {
34
+ const resolved = await openPublishVaultRecord({ deps, input, candidate });
35
+ if (!resolved || !selectPublishCredential({ deps, registry, credentials: [resolved.summary], provider, id: input.id }))
36
+ return null;
37
+ const spec = registry.get(providerId)?.descriptor.credential;
38
+ if (!spec)
39
+ return null;
40
+ const connection = publishConnectionFromPayload({ deps, providerId, spec,
41
+ summary: resolved.summary, payload: resolved.payload });
42
+ return { providerId, vendorId: provider.vendorId, label: resolved.summary.label, revision: resolved.summary.revision,
43
+ isDefault: selectPublishCredential({ deps, registry, credentials: rows, provider })?.id === input.id, connection };
44
+ }
45
+ function selectedCandidateProviderId({ deps, explicitId, candidate, registry }, _options = {}) {
46
+ if (explicitId !== undefined)
47
+ return explicitId;
48
+ if (!candidate)
49
+ return undefined;
50
+ return publishHostsForCredential({ deps, credential: candidate, registry })[0];
51
+ }
52
+ /** Crypto faults retain the established typed refusal and never echo payloads. */
53
+ async function openPublishVaultRecord({ deps, input, candidate }, _options = {}) {
54
+ // Opened with the store that sealed it: this site's, or the project's (`credentialScopes`).
55
+ const scoped = scopeOfRow(deps, { workspaceId: input.workspaceId, row: candidate });
56
+ try {
57
+ return await vault(scoped.deps).get({ ...bound(scoped.deps).scope({ workspaceId: scoped.workspaceId, kind: candidate.kind === "custom" ? "custom" : "vendor" }), id: input.id });
58
+ }
59
+ catch {
60
+ throw new PublishCredentialSecretStoreUnconfiguredError(deps.storageMessage);
61
+ }
62
+ }
63
+ function publishConnectionFromPayload({ deps, providerId, spec, summary, payload }, _options = {}) {
64
+ if (!payload)
65
+ throw new PublishCredentialSecretStoreUnconfiguredError(deps.storageMessage);
66
+ const { vendorId: _vendorId, ...fields } = payload;
67
+ // A custom payload with no token becomes the blank token the check below refuses.
68
+ const connection = summary.meta.credentialType === "custom" ? { providerId, [spec.tokenField]: fields.token ?? "" } : { ...fields, providerId };
69
+ const token = connection[spec.tokenField];
70
+ if (typeof token !== "string" || !token.trim())
71
+ throw new PublishCredentialSecretStoreUnconfiguredError(deps.storageMessage);
72
+ return connection;
73
+ }
74
+ /** The same selection policy serves implicit publishing, readiness and explicit-ID resolution.
75
+ * @complexity O(rows × compatibility IDs + payload); one two-kind inventory and one selected open.
76
+ */
77
+ export async function resolveDefaultForPublish(deps, input) {
78
+ const registry = await deps.loadDeployTargets({ workspaceId: input.workspaceId });
79
+ const provider = providerContract({ registry, providerId: input.providerId });
80
+ if (!provider)
81
+ return null;
82
+ const rows = await inventory({ deps, workspaceId: input.workspaceId });
83
+ const selected = selectPublishCredential({ deps, registry, credentials: rows, provider });
84
+ if (!selected)
85
+ return null;
86
+ const resolved = await resolveFromInventory({ deps, input: { ...input, id: selected.id }, registry, rows });
87
+ return resolved ? { id: selected.id, revision: resolved.revision, label: resolved.label, connection: resolved.connection } : null;
88
+ }
89
+ /** Configuration requires a compatible selected candidate, not merely a provider-group default.
90
+ * An explicit id must select that authorized row; no secret is opened.
91
+ * @complexity O(rows × compatibility IDs), one metadata inventory per store and one catalog load. */
92
+ export async function hasDefaultForPublish(deps, input) {
93
+ const registry = await deps.loadDeployTargets({ workspaceId: input.workspaceId });
94
+ const provider = providerContract({ registry, providerId: input.providerId });
95
+ if (provider === null)
96
+ return null;
97
+ const selected = selectPublishCredential({ deps, registry, credentials: await inventory({ deps, workspaceId: input.workspaceId }), provider, id: input.id });
98
+ return selected ? { id: selected.id, revision: selected.revision } : null;
99
+ }
100
+ //# sourceMappingURL=store-resolution.js.map
@@ -0,0 +1,68 @@
1
+ import { type VaultSummary } from '@jini-ai/core/contracts/vault';
2
+ import type { DeployTargetRegistry, DeployTargetCredentialSpec, DeployTargetFieldSpec } from '../deploy-targets/types.js';
3
+ import type { PublishConnectionInput, PublishProviderId } from './types.js';
4
+ import type { PublishCredentialReadDeps } from './store.js';
5
+ /** Thrown for any caller-supplied value that fails shape validation — the route maps this to `400`. */
6
+ export declare class PublishCredentialValidationError extends Error {
7
+ }
8
+ export declare function validatedWorksFor({ deps, value }: {
9
+ deps: PublishCredentialReadDeps;
10
+ value: unknown;
11
+ }, _options?: {}): string[];
12
+ /** A provider move retargets the old host/vendor compatibility, preserving unrelated IDs.
13
+ * Explicit compatibility edits win, including an empty list. No I/O; O(compatibility IDs).
14
+ */
15
+ export declare function updatedWorksFor({ deps, value, row, provider, host }: {
16
+ deps: PublishCredentialReadDeps;
17
+ value: unknown;
18
+ row: Pick<VaultSummary, "provider" | "meta">;
19
+ provider: string;
20
+ host: string;
21
+ }, _options?: {}): string[];
22
+ /** Narrows and validates a caller-supplied `label`. Never throws a raw `TypeError` — every rejection
23
+ * is a {@link PublishCredentialValidationError} the route/tool layer can map to its own `400`. */
24
+ export declare function validateLabel({ deps, raw }: {
25
+ deps: PublishCredentialReadDeps;
26
+ raw: unknown;
27
+ }, _options?: {}): string;
28
+ /** Narrows a caller-supplied `isDefault`. `undefined` means "no default change requested" (the same
29
+ * omitted-means-unchanged convention `label`/`connection` already use); any other non-boolean value
30
+ * is rejected rather than coerced, so a stray string/number in the request body cannot silently be
31
+ * read as truthy. */
32
+ export declare function optionalBoolean({ raw, field }: {
33
+ raw: unknown;
34
+ field: string;
35
+ }, _options?: {}): boolean | undefined;
36
+ /** A validated connection plus the host credential spec it was validated against. */
37
+ export interface ValidatedConnection {
38
+ readonly connection: PublishConnectionInput;
39
+ readonly spec: DeployTargetCredentialSpec;
40
+ }
41
+ export declare function validateConnection({ deps, raw, registry }: {
42
+ deps: PublishCredentialReadDeps;
43
+ raw: unknown;
44
+ registry: DeployTargetRegistry;
45
+ }, _options?: {}): ValidatedConnection;
46
+ export declare function connectionCredentialSpec({ value, registry }: {
47
+ value: Record<string, unknown>;
48
+ registry: DeployTargetRegistry;
49
+ }, _options?: {}): {
50
+ providerId: string;
51
+ spec: DeployTargetCredentialSpec;
52
+ };
53
+ export declare function isSecretField({ field, spec }: {
54
+ field: DeployTargetFieldSpec;
55
+ spec: DeployTargetCredentialSpec;
56
+ }, _options?: {}): boolean;
57
+ /** Preserve only a provider change between compatible token-only contracts. Companion-field
58
+ * changes and different secret schemas still require the validated replacement path.
59
+ * @complexity O(k) time/space for k supplied keys; fixed schema checks, no I/O. */
60
+ export declare function preservedMove({ raw, registry, host }: {
61
+ raw: unknown;
62
+ registry: DeployTargetRegistry;
63
+ host: PublishProviderId;
64
+ }, _options?: {}): {
65
+ providerId: string;
66
+ spec: DeployTargetCredentialSpec;
67
+ } | undefined;
68
+ //# sourceMappingURL=store-validation.d.ts.map