@jini-ai/devops 0.7.3-next.2 → 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 (390) hide show
  1. package/README.md +16 -0
  2. package/dist/backup/site/archive-extensions.d.ts +73 -0
  3. package/dist/backup/site/archive-extensions.js +129 -0
  4. package/dist/backup/site/archive-manifest.d.ts +85 -0
  5. package/dist/backup/site/archive-manifest.js +176 -0
  6. package/dist/backup/site/archive-media.d.ts +121 -0
  7. package/dist/backup/site/archive-media.js +93 -0
  8. package/dist/backup/site/backup-service.credentials.d.ts +31 -0
  9. package/dist/backup/site/backup-service.credentials.js +161 -0
  10. package/dist/backup/site/backup-service.d.ts +331 -0
  11. package/dist/backup/site/backup-service.js +125 -0
  12. package/dist/backup/site/backup-service.plan.d.ts +64 -0
  13. package/dist/backup/site/backup-service.plan.js +207 -0
  14. package/dist/backup/site/backup-service.push.d.ts +29 -0
  15. package/dist/backup/site/backup-service.push.js +82 -0
  16. package/dist/backup/site/backup-service.shared.d.ts +40 -0
  17. package/dist/backup/site/backup-service.shared.js +37 -0
  18. package/dist/backup/site/bundled-export-file-policy.d.ts +38 -0
  19. package/dist/backup/site/bundled-export-file-policy.js +40 -0
  20. package/dist/backup/site/credential-warnings.d.ts +41 -0
  21. package/dist/backup/site/credential-warnings.js +50 -0
  22. package/dist/backup/site/import-backend-steps.d.ts +167 -0
  23. package/dist/backup/site/import-backend-steps.js +170 -0
  24. package/dist/backup/site/import-backend.d.ts +167 -0
  25. package/dist/backup/site/import-backend.js +298 -0
  26. package/dist/backup/site/import-database.d.ts +118 -0
  27. package/dist/backup/site/import-database.js +167 -0
  28. package/dist/backup/site/import-index/admission.d.ts +54 -0
  29. package/dist/backup/site/import-index/admission.js +46 -0
  30. package/dist/backup/site/import-index/backfill.d.ts +106 -0
  31. package/dist/backup/site/import-index/backfill.js +137 -0
  32. package/dist/backup/site/import-index/errors.d.ts +28 -0
  33. package/dist/backup/site/import-index/errors.js +38 -0
  34. package/dist/backup/site/import-index/migrations/checksums.d.ts +4 -0
  35. package/dist/backup/site/import-index/migrations/checksums.js +4 -0
  36. package/dist/backup/site/import-index/migrations/site-imports-v1.d.ts +2 -0
  37. package/dist/backup/site/import-index/migrations/site-imports-v1.js +10 -0
  38. package/dist/backup/site/import-index/mode.d.ts +191 -0
  39. package/dist/backup/site/import-index/mode.js +272 -0
  40. package/dist/backup/site/import-index/open.d.ts +40 -0
  41. package/dist/backup/site/import-index/open.js +87 -0
  42. package/dist/backup/site/import-index/paging.d.ts +28 -0
  43. package/dist/backup/site/import-index/paging.js +66 -0
  44. package/dist/backup/site/import-index/payload-namespace.d.ts +80 -0
  45. package/dist/backup/site/import-index/payload-namespace.js +156 -0
  46. package/dist/backup/site/import-index/rows.d.ts +32 -0
  47. package/dist/backup/site/import-index/rows.js +61 -0
  48. package/dist/backup/site/import-index/schema.d.ts +8 -0
  49. package/dist/backup/site/import-index/schema.js +31 -0
  50. package/dist/backup/site/import-index/store.d.ts +27 -0
  51. package/dist/backup/site/import-index/store.js +33 -0
  52. package/dist/backup/site/import-index/sweep.d.ts +10 -0
  53. package/dist/backup/site/import-index/sweep.js +26 -0
  54. package/dist/backup/site/import-keep-off.d.ts +128 -0
  55. package/dist/backup/site/import-keep-off.js +204 -0
  56. package/dist/backup/site/import-plugin-state.d.ts +74 -0
  57. package/dist/backup/site/import-plugin-state.js +67 -0
  58. package/dist/backup/site/import-registry.d.ts +110 -0
  59. package/dist/backup/site/import-registry.js +205 -0
  60. package/dist/backup/site/import-restore-placement.d.ts +94 -0
  61. package/dist/backup/site/import-restore-placement.js +158 -0
  62. package/dist/backup/site/import-restore.d.ts +111 -0
  63. package/dist/backup/site/import-restore.js +120 -0
  64. package/dist/backup/site/import-verifier-inventory.d.ts +137 -0
  65. package/dist/backup/site/import-verifier-inventory.js +236 -0
  66. package/dist/backup/site/import-verifier-projection.d.ts +78 -0
  67. package/dist/backup/site/import-verifier-projection.js +100 -0
  68. package/dist/backup/site/import-verifier.d.ts +126 -0
  69. package/dist/backup/site/import-verifier.js +53 -0
  70. package/dist/backup/site/owned-temp-root.d.ts +12 -0
  71. package/dist/backup/site/owned-temp-root.js +2 -0
  72. package/dist/backup/site/package-file-inventory.d.ts +63 -0
  73. package/dist/backup/site/package-file-inventory.js +56 -0
  74. package/dist/backup/site/push-content.d.ts +70 -0
  75. package/dist/backup/site/push-content.js +56 -0
  76. package/dist/backup/site/react/ShowMoreImports.d.ts +21 -0
  77. package/dist/backup/site/react/ShowMoreImports.js +8 -0
  78. package/dist/backup/site/saved-keys-port.d.ts +47 -0
  79. package/dist/backup/site/saved-keys-port.js +3 -0
  80. package/dist/backup/site/saved-keys.d.ts +25 -0
  81. package/dist/backup/site/saved-keys.js +38 -0
  82. package/dist/backup/site/share-backend.d.ts +243 -0
  83. package/dist/backup/site/share-backend.js +284 -0
  84. package/dist/backup/site/share-database/projection.d.ts +195 -0
  85. package/dist/backup/site/share-database/projection.js +90 -0
  86. package/dist/backup/site/share-database/projection.media.d.ts +38 -0
  87. package/dist/backup/site/share-database/projection.media.js +179 -0
  88. package/dist/backup/site/share-database/projection.tables.d.ts +46 -0
  89. package/dist/backup/site/share-database/projection.tables.js +193 -0
  90. package/dist/backup/site/share-expiry.d.ts +75 -0
  91. package/dist/backup/site/share-expiry.js +49 -0
  92. package/dist/backup/site/share-export-failure.d.ts +17 -0
  93. package/dist/backup/site/share-export-failure.js +16 -0
  94. package/dist/backup/site/share-file-policy.d.ts +60 -0
  95. package/dist/backup/site/share-file-policy.js +146 -0
  96. package/dist/backup/site/share-hosting.d.ts +107 -0
  97. package/dist/backup/site/share-hosting.js +148 -0
  98. package/dist/backup/site/share-preparation-steps.d.ts +180 -0
  99. package/dist/backup/site/share-preparation-steps.js +109 -0
  100. package/dist/backup/site/share-preparation.d.ts +122 -0
  101. package/dist/backup/site/share-preparation.js +43 -0
  102. package/dist/backup/site/share-refusal.d.ts +21 -0
  103. package/dist/backup/site/share-refusal.js +20 -0
  104. package/dist/backup/site/share-registry.d.ts +124 -0
  105. package/dist/backup/site/share-registry.js +219 -0
  106. package/dist/backup/site/share-retention.d.ts +62 -0
  107. package/dist/backup/site/share-retention.js +126 -0
  108. package/dist/backup/site/share-service.d.ts +128 -0
  109. package/dist/backup/site/share-service.js +194 -0
  110. package/dist/backup/site/share-zip.d.ts +115 -0
  111. package/dist/backup/site/share-zip.js +144 -0
  112. package/dist/backup/site/sources.d.ts +344 -0
  113. package/dist/backup/site/sources.js +595 -0
  114. package/dist/backup/site/static-copy.d.ts +122 -0
  115. package/dist/backup/site/static-copy.js +165 -0
  116. package/dist/backup/site/static-download-html.d.ts +76 -0
  117. package/dist/backup/site/static-download-html.js +149 -0
  118. package/dist/backup/site/static-download-landing.d.ts +52 -0
  119. package/dist/backup/site/static-download-landing.js +95 -0
  120. package/dist/backup/site/static-download-layout.d.ts +96 -0
  121. package/dist/backup/site/static-download-layout.js +325 -0
  122. package/dist/backup/site/static-export-selection.d.ts +50 -0
  123. package/dist/backup/site/static-export-selection.js +76 -0
  124. package/dist/backup/site/static-site-packager.d.ts +42 -0
  125. package/dist/backup/site/static-site-packager.js +32 -0
  126. package/dist/backup/site/tool-registrations.d.ts +74 -0
  127. package/dist/backup/site/tool-registrations.js +201 -0
  128. package/dist/checks/complexity-debt.d.ts +100 -0
  129. package/dist/checks/complexity-debt.js +131 -0
  130. package/dist/checks/coverage/diff.js +5 -1
  131. package/dist/checks/env-access.d.ts +14 -1
  132. package/dist/checks/env-access.js +92 -6
  133. package/dist/checks/live-verify-checks.d.ts +29 -0
  134. package/dist/checks/live-verify-checks.js +30 -0
  135. package/dist/checks/quality-gates.d.ts +137 -0
  136. package/dist/checks/quality-gates.js +209 -0
  137. package/dist/core/deploy-types.d.ts +2 -0
  138. package/dist/deploy/admin-http/site-update-status.d.ts +8 -0
  139. package/dist/deploy/admin-http/site-update-status.js +15 -0
  140. package/dist/deploy/host-kit.d.ts +3 -0
  141. package/dist/deploy/index.d.ts +6 -0
  142. package/dist/deploy/index.js +6 -0
  143. package/dist/deploy/ops-runner.js +7 -0
  144. package/dist/deploy/ops-tool-contracts.d.ts +10 -1
  145. package/dist/deploy/react/Deployment.d.ts +37 -0
  146. package/dist/deploy/react/Deployment.js +94 -0
  147. package/dist/deploy/react/DockerfileTab.d.ts +72 -0
  148. package/dist/deploy/react/DockerfileTab.js +131 -0
  149. package/dist/deploy/react/HistoryTab.d.ts +43 -0
  150. package/dist/deploy/react/HistoryTab.js +12 -0
  151. package/dist/deploy/react/OverviewTab.d.ts +60 -0
  152. package/dist/deploy/react/OverviewTab.js +75 -0
  153. package/dist/deploy/react/PublishRunResult.d.ts +5 -1
  154. package/dist/deploy/react/PublishRunResult.js +4 -4
  155. package/dist/deploy/react/SiteUpdateNotice.d.ts +22 -0
  156. package/dist/deploy/react/SiteUpdateNotice.js +25 -0
  157. package/dist/deploy/react/StaticCredentialFields.d.ts +36 -0
  158. package/dist/deploy/react/StaticCredentialFields.js +63 -0
  159. package/dist/deploy/react/StaticCredentialSteps.d.ts +23 -0
  160. package/dist/deploy/react/StaticCredentialSteps.js +155 -0
  161. package/dist/deploy/react/StaticExportCard.d.ts +11 -0
  162. package/dist/deploy/react/StaticExportCard.js +97 -0
  163. package/dist/deploy/react/StaticPublishCredentials.d.ts +50 -0
  164. package/dist/deploy/react/StaticPublishCredentials.js +77 -0
  165. package/dist/deploy/react/StaticPublishForm.d.ts +12 -0
  166. package/dist/deploy/react/StaticPublishForm.js +91 -0
  167. package/dist/deploy/react/StaticSiteTab.d.ts +207 -0
  168. package/dist/deploy/react/StaticSiteTab.js +117 -0
  169. package/dist/deploy/react/deployment-visuals.d.ts +207 -0
  170. package/dist/deploy/react/deployment-visuals.js +101 -0
  171. package/dist/deploy/react/download-dockerfile.d.ts +14 -0
  172. package/dist/deploy/react/download-dockerfile.js +15 -0
  173. package/dist/deploy/react/hooks/publish-credential-draft.d.ts +33 -0
  174. package/dist/deploy/react/hooks/publish-credential-draft.js +54 -0
  175. package/dist/deploy/react/hooks/publish-credential-selection.d.ts +13 -0
  176. package/dist/deploy/react/hooks/publish-credential-selection.js +34 -0
  177. package/dist/deploy/react/hooks/publish-credential-writes.d.ts +20 -0
  178. package/dist/deploy/react/hooks/publish-credential-writes.js +99 -0
  179. package/dist/deploy/react/hooks/static-publish-actions.d.ts +10 -0
  180. package/dist/deploy/react/hooks/static-publish-actions.js +62 -0
  181. package/dist/deploy/react/hooks/static-publish-form.hooks.d.ts +38 -0
  182. package/dist/deploy/react/hooks/static-publish-form.hooks.js +103 -0
  183. package/dist/deploy/react/hooks/static-publish-run.hooks.d.ts +28 -0
  184. package/dist/deploy/react/hooks/static-publish-run.hooks.js +92 -0
  185. package/dist/deploy/react/hooks/use-dockerfile-source.hooks.d.ts +148 -0
  186. package/dist/deploy/react/hooks/use-dockerfile-source.hooks.js +155 -0
  187. package/dist/deploy/react/hooks/use-publish-credentials.hooks.d.ts +268 -0
  188. package/dist/deploy/react/hooks/use-publish-credentials.hooks.js +52 -0
  189. package/dist/deploy/react/hooks/use-static-export.hooks.d.ts +128 -0
  190. package/dist/deploy/react/hooks/use-static-export.hooks.js +159 -0
  191. package/dist/deploy/react/hooks/use-static-publish.hooks.d.ts +208 -0
  192. package/dist/deploy/react/hooks/use-static-publish.hooks.js +48 -0
  193. package/dist/deploy/react/index.d.ts +4 -0
  194. package/dist/deploy/react/index.js +2 -0
  195. package/dist/deploy/react/rules.d.ts +363 -0
  196. package/dist/deploy/react/rules.js +314 -0
  197. package/dist/deploy/react/use-deployment-overview.hooks.d.ts +41 -0
  198. package/dist/deploy/react/use-deployment-overview.hooks.js +11 -0
  199. package/dist/deploy/site/agent-tools.d.ts +42 -0
  200. package/dist/deploy/site/agent-tools.js +119 -0
  201. package/dist/deploy/site/deploy-config-registry.d.ts +155 -0
  202. package/dist/deploy/site/deploy-config-registry.js +124 -0
  203. package/dist/deploy/site/deploy-config.d.ts +97 -0
  204. package/dist/deploy/site/deploy-config.js +115 -0
  205. package/dist/deploy/site/deploy-ops/agent-tools.d.ts +22 -0
  206. package/dist/deploy/site/deploy-ops/agent-tools.js +76 -0
  207. package/dist/deploy/site/deploy-ops/registry.d.ts +134 -0
  208. package/dist/deploy/site/deploy-ops/registry.js +106 -0
  209. package/dist/deploy/site/deploy-ops/run-ops.d.ts +66 -0
  210. package/dist/deploy/site/deploy-ops/run-ops.js +34 -0
  211. package/dist/deploy/site/deploy-ops/secret-confirm.d.ts +36 -0
  212. package/dist/deploy/site/deploy-ops/secret-confirm.js +27 -0
  213. package/dist/deploy/site/deploy-targets/host-kit.d.ts +28 -0
  214. package/dist/deploy/site/deploy-targets/host-kit.js +120 -0
  215. package/dist/deploy/site/deploy-targets/registry.d.ts +157 -0
  216. package/dist/deploy/site/deploy-targets/registry.js +132 -0
  217. package/dist/deploy/site/deploy-targets/types.d.ts +27 -0
  218. package/dist/deploy/site/deploy-targets/types.js +2 -0
  219. package/dist/deploy/site/dockerfile.d.ts +137 -0
  220. package/dist/deploy/site/dockerfile.js +101 -0
  221. package/dist/deploy/site/export-run.d.ts +137 -0
  222. package/dist/deploy/site/export-run.js +152 -0
  223. package/dist/deploy/site/ports.d.ts +115 -0
  224. package/dist/deploy/site/ports.js +2 -0
  225. package/dist/deploy/site/publish-agent-tools.d.ts +18 -0
  226. package/dist/deploy/site/publish-agent-tools.js +120 -0
  227. package/dist/deploy/site/publish-candidate.d.ts +26 -0
  228. package/dist/deploy/site/publish-candidate.js +37 -0
  229. package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.d.ts +78 -0
  230. package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.js +88 -0
  231. package/dist/deploy/site/publish-credentials/compatibility-port.d.ts +38 -0
  232. package/dist/deploy/site/publish-credentials/compatibility-port.js +19 -0
  233. package/dist/deploy/site/publish-credentials/execution-mode.d.ts +43 -0
  234. package/dist/deploy/site/publish-credentials/execution-mode.js +19 -0
  235. package/dist/deploy/site/publish-credentials/store-owner.d.ts +11 -0
  236. package/dist/deploy/site/publish-credentials/store-owner.js +9 -0
  237. package/dist/deploy/site/publish-credentials/store-resolution.d.ts +55 -0
  238. package/dist/deploy/site/publish-credentials/store-resolution.js +100 -0
  239. package/dist/deploy/site/publish-credentials/store-validation.d.ts +68 -0
  240. package/dist/deploy/site/publish-credentials/store-validation.js +182 -0
  241. package/dist/deploy/site/publish-credentials/store.d.ts +322 -0
  242. package/dist/deploy/site/publish-credentials/store.js +372 -0
  243. package/dist/deploy/site/publish-credentials/types.d.ts +85 -0
  244. package/dist/deploy/site/publish-credentials/types.js +2 -0
  245. package/dist/deploy/site/publish-tool-capabilities.d.ts +123 -0
  246. package/dist/deploy/site/publish-tool-capabilities.js +175 -0
  247. package/dist/deploy/site/publish-tool-credential.d.ts +48 -0
  248. package/dist/deploy/site/publish-tool-credential.js +284 -0
  249. package/dist/deploy/site/publish-tool-deps.d.ts +205 -0
  250. package/dist/deploy/site/publish-tool-deps.js +15 -0
  251. package/dist/deploy/site/publish-tool-execution.d.ts +78 -0
  252. package/dist/deploy/site/publish-tool-execution.js +313 -0
  253. package/dist/deploy/site/publish-tool-schema.d.ts +29 -0
  254. package/dist/deploy/site/publish-tool-schema.js +38 -0
  255. package/dist/deploy/site/static-publish/adapter-export.d.ts +54 -0
  256. package/dist/deploy/site/static-publish/adapter-export.js +89 -0
  257. package/dist/deploy/site/static-publish/adapter-plan.d.ts +99 -0
  258. package/dist/deploy/site/static-publish/adapter-plan.js +112 -0
  259. package/dist/deploy/site/static-publish/adapter.d.ts +182 -0
  260. package/dist/deploy/site/static-publish/adapter.js +321 -0
  261. package/dist/deploy/site/static-publish/admin-publish-read.d.ts +209 -0
  262. package/dist/deploy/site/static-publish/admin-publish-read.js +116 -0
  263. package/dist/deploy/site/static-publish/credentials.d.ts +110 -0
  264. package/dist/deploy/site/static-publish/credentials.js +290 -0
  265. package/dist/deploy/site/static-publish/domain-publish-rows.d.ts +25 -0
  266. package/dist/deploy/site/static-publish/domain-publish-rows.js +43 -0
  267. package/dist/deploy/site/static-publish/domain-publish-tool.d.ts +19 -0
  268. package/dist/deploy/site/static-publish/domain-publish-tool.js +111 -0
  269. package/dist/deploy/site/static-publish/inspection.d.ts +24 -0
  270. package/dist/deploy/site/static-publish/inspection.js +69 -0
  271. package/dist/deploy/site/static-publish/publish-history.d.ts +197 -0
  272. package/dist/deploy/site/static-publish/publish-history.js +153 -0
  273. package/dist/deploy/site/static-publish/publish-run.d.ts +156 -0
  274. package/dist/deploy/site/static-publish/publish-run.js +186 -0
  275. package/dist/deploy/site/static-publish/types.d.ts +165 -0
  276. package/dist/deploy/site/static-publish/types.js +2 -0
  277. package/dist/deploy/site/static-publish/verify.d.ts +217 -0
  278. package/dist/deploy/site/static-publish/verify.js +248 -0
  279. package/dist/deploy/site/tool-registrations.d.ts +97 -0
  280. package/dist/deploy/site/tool-registrations.js +130 -0
  281. package/dist/deploy/site/types.d.ts +51 -0
  282. package/dist/deploy/site/types.js +2 -0
  283. package/dist/deploy/site-update/check-for-update.d.ts +19 -0
  284. package/dist/deploy/site-update/check-for-update.js +19 -0
  285. package/dist/deploy/site-update/contracts.d.ts +161 -0
  286. package/dist/deploy/site-update/contracts.js +94 -0
  287. package/dist/deploy/site-update/desktop-site-update.d.ts +66 -0
  288. package/dist/deploy/site-update/desktop-site-update.js +43 -0
  289. package/dist/deploy/site-update/fake-site-update.d.ts +39 -0
  290. package/dist/deploy/site-update/fake-site-update.js +52 -0
  291. package/dist/deploy/site-update/run-site-update.d.ts +121 -0
  292. package/dist/deploy/site-update/run-site-update.js +219 -0
  293. package/dist/deploy/site-update/self-hosted-site-update.d.ts +71 -0
  294. package/dist/deploy/site-update/self-hosted-site-update.js +79 -0
  295. package/dist/deploy/target-contracts.d.ts +3 -0
  296. package/dist/deploy/tool.d.ts +5 -8
  297. package/dist/deploy/tool.js +6 -9
  298. package/dist/dns/binding-sweeper.d.ts +72 -0
  299. package/dist/dns/binding-sweeper.js +53 -0
  300. package/dist/dns/index.d.ts +1 -0
  301. package/dist/dns/index.js +1 -0
  302. package/dist/dns/site/binding.repo.d.ts +71 -0
  303. package/dist/dns/site/binding.repo.js +45 -0
  304. package/dist/dns/site/dns-changes.d.ts +90 -0
  305. package/dist/dns/site/dns-changes.js +271 -0
  306. package/dist/dns/site/dns-tools.d.ts +46 -0
  307. package/dist/dns/site/dns-tools.js +204 -0
  308. package/dist/dns/site/mail-dns-status.d.ts +111 -0
  309. package/dist/dns/site/mail-dns-status.js +190 -0
  310. package/dist/dns/site/mail-dns-tools.d.ts +33 -0
  311. package/dist/dns/site/mail-dns-tools.js +62 -0
  312. package/dist/dns/site/mail-requirements.d.ts +30 -0
  313. package/dist/dns/site/mail-requirements.js +78 -0
  314. package/dist/dns/site/tool-deps.d.ts +21 -0
  315. package/dist/dns/site/tool-deps.js +2 -0
  316. package/dist/dns/site/tools.d.ts +74 -0
  317. package/dist/dns/site/tools.js +124 -0
  318. package/dist/local-dev/bind-host.d.ts +80 -0
  319. package/dist/local-dev/bind-host.js +90 -0
  320. package/dist/local-dev/dev-proxy-upstream.d.ts +69 -0
  321. package/dist/local-dev/dev-proxy-upstream.js +63 -0
  322. package/dist/local-dev/index.d.ts +28 -0
  323. package/dist/local-dev/index.js +25 -0
  324. package/dist/packaging/electron/archive.d.ts +2 -9
  325. package/dist/packaging/electron/asar-adapter.d.ts +2 -1
  326. package/dist/packaging/electron/entry.d.ts +2 -0
  327. package/dist/packaging/electron/move-to-applications.d.ts +165 -0
  328. package/dist/packaging/electron/move-to-applications.js +162 -0
  329. package/dist/packaging/electron/policies.d.ts +33 -4
  330. package/dist/packaging/electron/policies.js +29 -10
  331. package/dist/packaging/electron/ports.d.ts +1 -6
  332. package/dist/packaging/electron/staging.d.ts +11 -2
  333. package/dist/packaging/electron/staging.js +15 -5
  334. package/dist/react/site-share-expiry/ShareExpiryControls.d.ts +29 -0
  335. package/dist/react/site-share-expiry/ShareExpiryControls.js +7 -0
  336. package/dist/react/site-share-expiry/index.d.ts +2 -0
  337. package/dist/react/site-share-expiry/index.js +2 -0
  338. package/dist/source-control/react/ProvidersTab.d.ts +98 -0
  339. package/dist/source-control/react/ProvidersTab.js +195 -0
  340. package/dist/source-control/react/SourceControl.d.ts +51 -0
  341. package/dist/source-control/react/SourceControl.js +61 -0
  342. package/dist/source-control/react/hooks/use-source-control-credentials.hooks.d.ts +128 -0
  343. package/dist/source-control/react/hooks/use-source-control-credentials.hooks.js +102 -0
  344. package/dist/source-control/react/rules.d.ts +167 -0
  345. package/dist/source-control/react/rules.js +125 -0
  346. package/dist/source-control/react/source-control-visuals.d.ts +75 -0
  347. package/dist/source-control/react/source-control-visuals.js +48 -0
  348. package/dist/source-control/site/agent-tools.d.ts +5 -0
  349. package/dist/source-control/site/agent-tools.js +30 -0
  350. package/dist/source-control/site/bundled-provider-registry.d.ts +33 -0
  351. package/dist/source-control/site/bundled-provider-registry.js +37 -0
  352. package/dist/source-control/site/commit-schema.d.ts +40 -0
  353. package/dist/source-control/site/commit-schema.js +29 -0
  354. package/dist/source-control/site/commit-target.d.ts +26 -0
  355. package/dist/source-control/site/commit-target.js +58 -0
  356. package/dist/source-control/site/credential-form.d.ts +36 -0
  357. package/dist/source-control/site/credential-form.js +102 -0
  358. package/dist/source-control/site/credential-setup.d.ts +107 -0
  359. package/dist/source-control/site/credential-setup.js +216 -0
  360. package/dist/source-control/site/provider-kit.d.ts +37 -0
  361. package/dist/source-control/site/provider-kit.js +35 -0
  362. package/dist/source-control/site/provider-module.d.ts +251 -0
  363. package/dist/source-control/site/provider-module.js +2 -0
  364. package/dist/source-control/site/saved-key-bindings.d.ts +4 -0
  365. package/dist/source-control/site/saved-key-bindings.js +4 -0
  366. package/dist/source-control/site/static-site-packager-port.d.ts +37 -0
  367. package/dist/source-control/site/static-site-packager-port.js +2 -0
  368. package/dist/source-control/site/store.d.ts +209 -0
  369. package/dist/source-control/site/store.js +374 -0
  370. package/dist/source-control/site/store.validation.d.ts +72 -0
  371. package/dist/source-control/site/store.validation.js +168 -0
  372. package/dist/source-control/site/tool-registrations.d.ts +190 -0
  373. package/dist/source-control/site/tool-registrations.js +379 -0
  374. package/dist/static-export/site/export-preflight.d.ts +48 -0
  375. package/dist/static-export/site/export-preflight.js +82 -0
  376. package/dist/static-export/site/media-original-urls.d.ts +57 -0
  377. package/dist/static-export/site/media-original-urls.js +109 -0
  378. package/dist/static-export/site/ports.d.ts +82 -0
  379. package/dist/static-export/site/ports.js +29 -0
  380. package/dist/static-export/site/public-origin-policy.d.ts +32 -0
  381. package/dist/static-export/site/public-origin-policy.js +68 -0
  382. package/dist/static-export/site/route-manifest.d.ts +65 -0
  383. package/dist/static-export/site/route-manifest.js +139 -0
  384. package/dist/static-export/site/site-exporter.d.ts +158 -0
  385. package/dist/static-export/site/site-exporter.js +112 -0
  386. package/dist/static-export/site/static-security-headers.d.ts +39 -0
  387. package/dist/static-export/site/static-security-headers.js +43 -0
  388. package/dist/static-export/site/theme-preview-manifest.d.ts +35 -0
  389. package/dist/static-export/site/theme-preview-manifest.js +28 -0
  390. package/package.json +911 -7
@@ -0,0 +1,37 @@
1
+ import type { SourceControlKitHttpClient, SourceControlProviderKit } from "./provider-module.js";
2
+ /**
3
+ * @file Builds the {@link SourceControlProviderKit} core hands a git-host provider module
4
+ * (`provider-module.ts`). The kit is the module's only way to reach anything but Node builtins.
5
+ */
6
+ /** What the host supplies so the kit can describe and trace its own transport. */
7
+ export interface SourceControlKitHost {
8
+ /** Describes a transport failure: the caller-safe `refusal` text when `error` is the host's egress-policy refusal
9
+ * (else `undefined`), and the redacted `logDetail` the host wants logged. The kit passes the raw error, never formats it. */
10
+ describeTransportError(required: {
11
+ error: unknown;
12
+ }): {
13
+ readonly refusal: string | undefined;
14
+ readonly logDetail: string;
15
+ };
16
+ /** Wraps the raw `fetch` so each `kit.fetch` is recorded as one outbound span (host/status only). Absent: untraced. */
17
+ observeFetch?(required: {
18
+ fetch: typeof fetch;
19
+ }): typeof fetch;
20
+ }
21
+ /**
22
+ * @param required.host - The host's transport-failure describer and optional fetch tracer.
23
+ * The guarded `httpClient` is traced where it is built, not here.
24
+ * @param optional.httpClient - The guarded client for credentialed custom-credential calls, handed
25
+ * to the module as-is (it already speaks the module's positional ABI).
26
+ * @param optional.fetchFn - Replaces global `fetch` (tests); otherwise `fetch` is looked up per call.
27
+ * @param optional.sleep - Replaces the retry timer (tests).
28
+ * @complexity O(1).
29
+ */
30
+ export declare function createSourceControlProviderKit(required: {
31
+ readonly host: SourceControlKitHost;
32
+ }, optional?: {
33
+ readonly httpClient?: SourceControlKitHttpClient;
34
+ readonly fetchFn?: typeof fetch;
35
+ readonly sleep?: (ms: number) => Promise<void>;
36
+ }): SourceControlProviderKit;
37
+ //# sourceMappingURL=provider-kit.d.ts.map
@@ -0,0 +1,35 @@
1
+ import { createSourceControlProviderKit as createKit } from "../kit.js";
2
+ /** Stands in when a caller has no guarded HTTP client (the admin credential form only probes an
3
+ * account name, through `fetch`). A call through it fails as a transport error, never silently. */
4
+ const NO_HTTP_CLIENT = {
5
+ send: () => Promise.reject(new Error("no outbound HTTP client is wired for this call")),
6
+ };
7
+ /**
8
+ * @param required.host - The host's transport-failure describer and optional fetch tracer.
9
+ * The guarded `httpClient` is traced where it is built, not here.
10
+ * @param optional.httpClient - The guarded client for credentialed custom-credential calls, handed
11
+ * to the module as-is (it already speaks the module's positional ABI).
12
+ * @param optional.fetchFn - Replaces global `fetch` (tests); otherwise `fetch` is looked up per call.
13
+ * @param optional.sleep - Replaces the retry timer (tests).
14
+ * @complexity O(1).
15
+ */
16
+ export function createSourceControlProviderKit(required, optional = {}) {
17
+ const { host } = required;
18
+ const send = (url, init) => (optional.fetchFn ?? fetch)(url, init);
19
+ const httpClient = optional.httpClient ?? NO_HTTP_CLIENT;
20
+ const kit = createKit({ httpClient: { send: ({ request }) => httpClient.send(request) },
21
+ fetch: ({ url }, options = {}) => (host.observeFetch ? host.observeFetch({ fetch: send }) : send)(url, options.init ?? {}),
22
+ describeTransportError: ({ error }) => host.describeTransportError({ error }), }, { fetchRedirectPolicy: "caller" });
23
+ return {
24
+ repositoryPaths: kit.repositoryPaths,
25
+ // why: positional on purpose: the plugin module ABI (see SourceControlProviderKit).
26
+ fetch: (url, init) => kit.fetch({ url, init }),
27
+ redirectGuardInit: init => kit.redirectGuardInit({ init }),
28
+ assertNotRedirected: (response, hostName) => kit.assertNotRedirected({ response, hostName }),
29
+ isRedirectRefusal: error => kit.isRedirectRefusal({ error }),
30
+ httpClient,
31
+ describeTransportError: error => kit.describeTransportError({ error }),
32
+ sleep: optional.sleep ?? (ms => new Promise(resolve => setTimeout(resolve, ms))),
33
+ };
34
+ }
35
+ //# sourceMappingURL=provider-kit.js.map
@@ -0,0 +1,251 @@
1
+ import type { HttpRequest, HttpResponse, RequestRedirect } from "@jini-ai/core/primitives";
2
+ import type { BackupRepositoryState } from "../contracts.js";
3
+ /**
4
+ * @file The contract a git-host provider MODULE (shipped inside an Agent Plugin) is written against.
5
+ *
6
+ * Git-host vendors live in plugins, not core (the bundled `github` plugin ships
7
+ * `@jini-ai/agent-plugins/github/source-control/github.mjs` today). Core loads a plugin's module
8
+ * through the host's provider registry, builds it with a
9
+ * {@link SourceControlProviderKit}, and calls the generic operations below: committing the site's
10
+ * static export (`source_control_execute_commit`), reading a token's account name (the admin Source
11
+ * Control page), writing files through a saved custom credential (`custom_credential_write_files`)
12
+ * and pushing a site backup (`site_backup_*`). Saved API-key labels in `saved-key-bindings.ts` are the host's credential
13
+ * bindings; vendor operations remain in the plugin.
14
+ *
15
+ * Every operation reports failure as a value, never a throw. `network-unreachable` always means no
16
+ * response arrived (so says nothing about the credential); `provider-error` means the host answered
17
+ * and refused; `diverged` means the branch moved and nothing was overwritten.
18
+ */
19
+ /** One file of a site export, relative to the selected folder. The provider prefixes it once. */
20
+ export interface CommitFile {
21
+ readonly path: string;
22
+ readonly data: string | Buffer;
23
+ }
24
+ /** One commit of a full site export: the result of {@link SourceControlProvider.commitSite}. */
25
+ export type SourceControlCommitResult = {
26
+ ok: true;
27
+ branch: string;
28
+ branchCreated: boolean;
29
+ commitSha: string;
30
+ commitUrl: string;
31
+ filesChanged: number;
32
+ filesDeleted: number;
33
+ /** Paths a previous export owned that this one dropped but that were NOT deleted, because their
34
+ * live content no longer matches what was written (or was never recorded). Optional so a test
35
+ * double may omit it. */
36
+ divergedPaths?: readonly string[];
37
+ } | {
38
+ ok: false;
39
+ code: "repository-not-found" | "no-changes" | "diverged" | "network-unreachable" | "provider-error";
40
+ message: string;
41
+ };
42
+ export interface CommitSiteInput {
43
+ readonly folder?: string;
44
+ readonly previousManagedManifestPath?: string;
45
+ readonly token: string;
46
+ readonly owner: string;
47
+ readonly repo: string;
48
+ /** The repository's default branch when omitted. */
49
+ readonly branch?: string;
50
+ readonly commitMessage: string;
51
+ readonly files: readonly CommitFile[];
52
+ }
53
+ /** A failure of a credentialed call. `logDetail` is for the server log only, never the model. */
54
+ export type ProviderCallFailure = {
55
+ ok: false;
56
+ code: "provider-error";
57
+ message: string;
58
+ } | {
59
+ ok: false;
60
+ code: "network-unreachable";
61
+ message: string;
62
+ logDetail: string;
63
+ };
64
+ /** Where a custom-credential call goes: the credential's own API base URL plus the ready-made
65
+ * `Authorization` header core built from the saved connection. */
66
+ export interface CredentialedRepositoryTarget {
67
+ readonly baseUrl: string;
68
+ readonly authorization: string;
69
+ readonly owner: string;
70
+ readonly repo: string;
71
+ }
72
+ export interface WriteFile {
73
+ readonly path: string;
74
+ readonly content: string;
75
+ }
76
+ export interface FileWriteState {
77
+ readonly path: string;
78
+ readonly exists: boolean;
79
+ }
80
+ /** The read-only reconnaissance a confirmed write builds on, so the commit lands on exactly the tree
81
+ * the human was shown. */
82
+ export interface FileWritePlan {
83
+ readonly parentCommitSha: string;
84
+ readonly baseTreeSha: string;
85
+ readonly fileStates: readonly FileWriteState[];
86
+ }
87
+ export type FileWritePlanResult = {
88
+ ok: true;
89
+ plan: FileWritePlan;
90
+ } | {
91
+ ok: false;
92
+ code: "branch-not-found";
93
+ message: string;
94
+ } | ProviderCallFailure;
95
+ export type CommitFilesResult = {
96
+ ok: true;
97
+ commitSha: string;
98
+ commitUrl: string;
99
+ } | {
100
+ ok: false;
101
+ code: "diverged";
102
+ message: string;
103
+ } | ProviderCallFailure;
104
+ export type InspectBackupRepositoryFailureCode = "repo-not-found" | "repo-not-private" | "no-push-permission" | "repo-empty" | "branch-not-found" | "folder-is-file";
105
+ export type InspectBackupRepositoryResult = {
106
+ ok: true;
107
+ state: BackupRepositoryState;
108
+ } | {
109
+ ok: false;
110
+ code: InspectBackupRepositoryFailureCode;
111
+ message: string;
112
+ } | ProviderCallFailure;
113
+ export interface UploadedBackupBlob {
114
+ readonly path: string;
115
+ readonly blobSha: string;
116
+ readonly bytes: number;
117
+ readonly sha256: string;
118
+ }
119
+ /** A small UTF-8 file sent inside the tree request instead of as its own blob, for a provider that
120
+ * accepts that ({@link SourceControlProviderOperations.backupInlineTextMaxBytes}). */
121
+ export interface InlineBackupText {
122
+ readonly path: string;
123
+ readonly text: string;
124
+ readonly bytes: number;
125
+ readonly sha256: string;
126
+ }
127
+ export type BackupTreeEntry = UploadedBackupBlob | InlineBackupText;
128
+ export interface CommitBackupTreeInput extends CredentialedRepositoryTarget {
129
+ readonly branch: string;
130
+ readonly folder: string;
131
+ readonly commitMessage: string;
132
+ readonly parentCommitSha: string;
133
+ readonly baseTreeSha: string;
134
+ readonly htmlUrl: string;
135
+ readonly entries: readonly BackupTreeEntry[];
136
+ }
137
+ /** The host facts a plugin DECLARES in `jini-source-control.json` (`provider-registry.ts`), carried
138
+ * on every built provider so core copy and checks can name the host without hard-coding one. */
139
+ export interface SourceControlHostFacts {
140
+ /** The `source_control_credential_sets.provider_id` this host serves. */
141
+ readonly id: string;
142
+ /** The host's display name ("GitHub"). */
143
+ readonly label: string;
144
+ /** The API origin a saved custom credential for this host points at (used to pick one when the
145
+ * caller named none). */
146
+ readonly apiOrigin: string;
147
+ /** The largest single file the host accepts in a push, when it has such a limit. */
148
+ readonly maxFileBytes?: number;
149
+ /** Repository folders the host gives a meaning of its own (GitHub runs whatever is under
150
+ * `.github/workflows`), so a site backup is never written into or under one. Compared
151
+ * case-insensitively. */
152
+ readonly reservedPaths?: readonly string[];
153
+ /** Repository folders whose files the host RUNS automatically (GitHub: `.github/workflows`), so a
154
+ * write confirmation names such a file with an extra warning. Compared exactly and
155
+ * case-sensitively, from the repository root: the host recognizes no other spelling. */
156
+ readonly workflowPaths?: readonly string[];
157
+ }
158
+ /** What a provider module's `create()` returns: the operations only. */
159
+ export interface SourceControlProviderOperations {
160
+ commitSite(input: CommitSiteInput): Promise<SourceControlCommitResult>;
161
+ /** The account name a token belongs to, or `null` when it cannot be learned. Never throws. */
162
+ readAccountLabel(token: string): Promise<string | null>;
163
+ planFileWrite(input: CredentialedRepositoryTarget & {
164
+ readonly branch: string;
165
+ readonly files: readonly WriteFile[];
166
+ }): Promise<FileWritePlanResult>;
167
+ commitFiles(input: CredentialedRepositoryTarget & {
168
+ readonly branch: string;
169
+ readonly commitMessage: string;
170
+ readonly files: readonly WriteFile[];
171
+ }, plan: FileWritePlan): Promise<CommitFilesResult>;
172
+ /** The largest UTF-8 file {@link commitBackupTree} accepts inline as an {@link InlineBackupText}
173
+ * instead of an uploaded blob. Absent: every file is uploaded with {@link uploadBackupBlob}. */
174
+ readonly backupInlineTextMaxBytes?: number;
175
+ inspectBackupRepository(input: CredentialedRepositoryTarget & {
176
+ readonly branch?: string;
177
+ readonly folder: string;
178
+ }): Promise<InspectBackupRepositoryResult>;
179
+ uploadBackupBlob(target: CredentialedRepositoryTarget, file: {
180
+ readonly path: string;
181
+ readonly content: Uint8Array;
182
+ }): Promise<{
183
+ ok: true;
184
+ blob: UploadedBackupBlob;
185
+ } | ProviderCallFailure>;
186
+ commitBackupTree(input: CommitBackupTreeInput): Promise<CommitFilesResult>;
187
+ }
188
+ /** A built provider: the module's operations plus the host facts its plugin declares, and the
189
+ * module's own owner/repo rules when it has them. */
190
+ export type SourceControlProvider = SourceControlProviderOperations & SourceControlHostFacts & {
191
+ readonly supportsFolder?: boolean;
192
+ readonly validateTarget?: RepositoryTargetValidator;
193
+ };
194
+ /** A transport error, described without leaking it: `refusal` is set (caller-safe text) only when the
195
+ * egress policy refused the request; `logDetail` is for the server log. */
196
+ export interface DescribedTransportError {
197
+ readonly refusal: string | undefined;
198
+ readonly logDetail: string;
199
+ }
200
+ /**
201
+ * What a module may call that is not a Node builtin: a plugin ships no npm dependencies.
202
+ * why: this is the plugin module ABI. Shipped provider modules (`@jini-ai/agent-plugins/github`)
203
+ * call `kit.fetch(url, init)` positionally, like the deploy and form-destination kits, so the
204
+ * args rule does not apply here; an object signature would hand them `url === undefined`.
205
+ */
206
+ export interface SourceControlProviderKit {
207
+ readonly repositoryPaths: import("../contracts.js").SourceControlProviderKit["repositoryPaths"];
208
+ /** Plain `fetch`, looked up at call time. */
209
+ fetch(url: string, init: RequestInit): Promise<Response>;
210
+ /** A `RequestInit` that never follows a redirect. */
211
+ redirectGuardInit(init: RequestInit): RequestInit;
212
+ /** Throws when `response` is a redirect, so a token is never sent on to another host. */
213
+ assertNotRedirected(response: Response, hostName: string): void;
214
+ /** True for the error {@link assertNotRedirected} throws. */
215
+ isRedirectRefusal(error: unknown): boolean;
216
+ /** The guarded outbound-HTTP seam (ADR-038) for credentialed custom-credential calls. */
217
+ readonly httpClient: SourceControlKitHttpClient;
218
+ describeTransportError(error: unknown): DescribedTransportError;
219
+ /** Waits before a retry. Optional so a hand-built kit may omit it; a module falls back to a timer. */
220
+ sleep?(ms: number): Promise<void>;
221
+ }
222
+ /**
223
+ * The guarded client as a provider module sees it.
224
+ * why: positional on purpose, like the rest of the kit: shipped modules call
225
+ * `kit.httpClient.send(request, { redirect: "error" })`, so the core object-shaped
226
+ * `HttpClientPort` (`send({ request }, options)`) would hand them `request === undefined`.
227
+ */
228
+ export interface SourceControlKitHttpClient {
229
+ send(request: HttpRequest, options?: {
230
+ redirect?: RequestRedirect;
231
+ }): Promise<HttpResponse>;
232
+ }
233
+ /** A repository named by owner and name, before anything is sent. */
234
+ export interface RepositoryTarget {
235
+ readonly owner: string;
236
+ readonly repo: string;
237
+ }
238
+ /** The host's own owner/repo rules: `null` when valid, else a caller-safe reason naming the field
239
+ * (e.g. "invalid GitHub owner 'x'"). Pure, never throws. */
240
+ export type RepositoryTargetValidator = (target: RepositoryTarget) => string | null;
241
+ /** A provider module's default export. */
242
+ export interface SourceControlProviderModule {
243
+ readonly supportsFolder?: boolean;
244
+ create(context: {
245
+ readonly kit: SourceControlProviderKit;
246
+ }): SourceControlProviderOperations;
247
+ /** Optional, needs no kit, so core can refuse a malformed target before building anything or
248
+ * raising a dialog. Core still applies its own generic one-path-segment rule afterwards. */
249
+ validateTarget?: RepositoryTargetValidator;
250
+ }
251
+ //# sourceMappingURL=provider-module.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=provider-module.js.map
@@ -0,0 +1,4 @@
1
+ /** Provider id -> saved custom API-key label. Only declared bindings may supply a commit fallback;
2
+ * explicit source-control connections always win. */
3
+ export declare const sourceControlSavedApiKeyLabels: ReadonlyMap<string, string>;
4
+ //# sourceMappingURL=saved-key-bindings.d.ts.map
@@ -0,0 +1,4 @@
1
+ /** Provider id -> saved custom API-key label. Only declared bindings may supply a commit fallback;
2
+ * explicit source-control connections always win. */
3
+ export const sourceControlSavedApiKeyLabels = new Map([["github", "github"]]);
4
+ //# sourceMappingURL=saved-key-bindings.js.map
@@ -0,0 +1,37 @@
1
+ import type { ExportReport } from "../../static-export/contracts.js";
2
+ import type { CommitFile } from "./provider-module.js";
3
+ /**
4
+ * @file The port a site commit calls to turn a finished site export into the flat file list a
5
+ * commit publishes. `source-control` owns the interface; the host's backup feature implements it,
6
+ * because the portable static copy a commit publishes is the same one the backup/share download
7
+ * builds, and that packaging code lives there. Owning the port here keeps the dependency pointing
8
+ * one way: the backup feature imports `source-control` (it uses providers as its transport), never
9
+ * the reverse. The composition root binds the implementation. `R` lets a host that extends the
10
+ * export report keep its own fields on the way through.
11
+ */
12
+ /** What `StaticSiteContextFn` resolves to: the identity the packaged copy is labelled with. */
13
+ export interface StaticSiteIdentity {
14
+ readonly name: string;
15
+ readonly slug: string;
16
+ readonly theme: string;
17
+ readonly themeId: string;
18
+ }
19
+ /** Flat commit files, or the one refusal a caller can explain to the owner: two files claiming a path. */
20
+ export type StaticSitePackage = {
21
+ readonly ok: true;
22
+ readonly files: CommitFile[];
23
+ } | {
24
+ readonly ok: false;
25
+ readonly kind: "destination-collision";
26
+ readonly message: string;
27
+ };
28
+ export interface StaticSitePackagerPort<R extends ExportReport = ExportReport> {
29
+ /** The file a visitor opens first in the packaged copy. */
30
+ readonly entryFile: string;
31
+ /** Any failure other than a path collision is thrown unchanged. */
32
+ packageSite(required: {
33
+ report: R;
34
+ site: StaticSiteIdentity;
35
+ }, optional?: Record<string, never>): StaticSitePackage;
36
+ }
37
+ //# sourceMappingURL=static-site-packager-port.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=static-site-packager-port.js.map
@@ -0,0 +1,209 @@
1
+ import type { Clock as ClockPort, UUID } from "@jini-ai/core/primitives";
2
+ import type { KeyringPort } from "@jini-ai/core/contracts/vault";
3
+ import type { SecretSealerPort } from "@jini-ai/core/contracts/vault";
4
+ import type { CredentialScope } from "@jini-ai/core/contracts/site/credential-project-half";
5
+ interface ScopedCredentialDeps<D> {
6
+ readonly deps: D;
7
+ readonly workspaceId: string;
8
+ readonly scope: CredentialScope;
9
+ }
10
+ import type { DescriptorI18n } from "@jini-ai/core/text";
11
+ import type { SourceControlProviderDescriptor as BaseProviderDescriptor } from "../contracts.js";
12
+ import type { SourceControlCredentialForm } from "./credential-form.js";
13
+ import type { SourceControlProvider, SourceControlProviderModule, SourceControlKitHttpClient as HttpClientPort } from "./provider-module.js";
14
+ export type SourceControlProviderDescriptor = Omit<BaseProviderDescriptor, "credential" | "i18n"> & {
15
+ readonly credential?: SourceControlCredentialForm;
16
+ readonly i18n?: DescriptorI18n;
17
+ };
18
+ export interface SourceControlProviderRegistry {
19
+ list(): readonly {
20
+ descriptor: SourceControlProviderDescriptor;
21
+ pluginId: string;
22
+ module: SourceControlProviderModule;
23
+ }[];
24
+ get(required: {
25
+ providerId: string;
26
+ }, optional?: Record<string, never>): {
27
+ descriptor: SourceControlProviderDescriptor;
28
+ pluginId: string;
29
+ module: SourceControlProviderModule;
30
+ } | undefined;
31
+ readonly switchedOff?: ReadonlyMap<string, string>;
32
+ readonly refusals: readonly string[];
33
+ }
34
+ export type LoadSourceControlProviders = (required: {
35
+ workspaceId: string;
36
+ }, optional?: Record<string, never>) => Promise<SourceControlProviderRegistry>;
37
+ import type { SourceControlConnectionInput, SourceControlCredentialSetRecord, SourceControlCredentialSetRepoPort, SourceControlCredentialSummary, SourceControlProviderId } from "@jini-ai/core/contracts/site/source-control-credentials";
38
+ /** Source-control validation and inline identity probes remain feature policy. Jini owns
39
+ * sealing, persistence, hints and defaults. Plain read models require neither keys nor opens.
40
+ * The identity store stays separate from deployments and custom API keys; commit callers may
41
+ * supply the existing custom-key reader through a port when this provider has no identity row. */
42
+ /** A `(workspaceId, providerId, label)` collision — the route maps this to `409 DUPLICATE_LABEL`. */
43
+ export declare class SourceControlCredentialDuplicateLabelError extends Error {
44
+ }
45
+ /** Thrown when `sealer.seal()`/`keyring.activeKey()` fails while writing a connection — the
46
+ * realistic cause is a missing site key (`site key`), same fail-closed
47
+ * contract `PublishCredentialSecretStoreUnconfiguredError` documents for the sibling table. */
48
+ export declare class SourceControlCredentialSecretStoreUnconfiguredError extends Error {
49
+ }
50
+ export declare class SourceControlCredentialNotFoundError extends Error {
51
+ }
52
+ export interface SourceControlCredentialReadDeps {
53
+ deps: {
54
+ CREDENTIAL_MESSAGES: Readonly<Record<"storage", string>>;
55
+ CredentialInputError: abstract new (...args: never[]) => Error;
56
+ normalizeCredentialToken(required: {
57
+ value: unknown;
58
+ field?: string;
59
+ hosted?: boolean;
60
+ }, optional?: Record<string, never>): string;
61
+ credentialScopes<D extends {
62
+ repo: SourceControlCredentialSetRepoPort;
63
+ }>(required: {
64
+ deps: D;
65
+ workspaceId: string;
66
+ }, optional?: Record<string, never>): ScopedCredentialDeps<D>[];
67
+ credentialCreateTarget<D extends {
68
+ repo: SourceControlCredentialSetRepoPort;
69
+ }>(required: {
70
+ deps: D;
71
+ input: {
72
+ workspaceId: string;
73
+ scope?: unknown;
74
+ };
75
+ invalid: (message: string) => Error;
76
+ }, optional?: Record<string, never>): ScopedCredentialDeps<D>;
77
+ };
78
+ repo: SourceControlCredentialSetRepoPort;
79
+ sealer?: SecretSealerPort;
80
+ }
81
+ /**
82
+ * The read model for ONE credential set. Pure DB read — no sealer, no keyring, cannot fail on a
83
+ * misconfigured site key. Returns `null` if no row exists for `(workspaceId, id)` (not an
84
+ * error — the caller decides whether that is a 404).
85
+ *
86
+ * @complexity O(1) — one `findById` lookup.
87
+ */
88
+ export declare function describeCredential(deps: SourceControlCredentialReadDeps, input: {
89
+ workspaceId: UUID;
90
+ id: UUID;
91
+ }): Promise<SourceControlCredentialSummary | null>;
92
+ /**
93
+ * The read model for EVERY credential set a workspace has saved — what
94
+ * `GET .../source-control/credentials` returns. Same "never decrypts" contract as
95
+ * {@link describeCredential}.
96
+ *
97
+ * @complexity O(n) in the workspace's own (small) credential-set count. One repo read, one array
98
+ * map, no per-row I/O.
99
+ */
100
+ export declare function listSourceControlCredentials(deps: SourceControlCredentialReadDeps, input: {
101
+ workspaceId: UUID;
102
+ }): Promise<SourceControlCredentialSummary[]>;
103
+ export interface SourceControlCredentialWriteDeps extends SourceControlCredentialReadDeps {
104
+ assertCredentialFreeField: (required: {
105
+ value: string;
106
+ field: string;
107
+ }, optional?: Record<string, never>) => void;
108
+ isProjectKeyCreateConflictError: (error: unknown) => error is Error;
109
+ buildSourceControlProvider: (required: {
110
+ load: LoadSourceControlProviders;
111
+ httpClient?: HttpClientPort;
112
+ workspaceId: string;
113
+ providerId: string;
114
+ }) => Promise<{
115
+ ok: true;
116
+ provider: Pick<SourceControlProvider, "readAccountLabel">;
117
+ } | {
118
+ ok: false;
119
+ message: string;
120
+ }>;
121
+ sealer: SecretSealerPort;
122
+ keyring: KeyringPort;
123
+ clock: ClockPort;
124
+ idGen: {
125
+ newId(): string;
126
+ };
127
+ /** The guarded client (egress policy, redirects per call) for the save-time identity probe, which
128
+ * carries the saved token. Absent: the provider's request fails as a transport error (no global `fetch`).
129
+ * Its outbound span is recorded where the client is built. */
130
+ httpClient?: HttpClientPort;
131
+ /** Loaded provider declarations govern admission and optional account-label discovery. */
132
+ loadSourceControlProviders?: LoadSourceControlProviders;
133
+ }
134
+ /** True iff `err` is the label's UNIQUE `(workspace_id, provider_id, label)` index rejecting a
135
+ * duplicate, on any database (`isUniqueViolation`, storage kernel: SQLite's code/message, Postgres
136
+ * SQLSTATE 23505). */
137
+ export declare function isUniqueLabelViolation({ err }: {
138
+ err: unknown;
139
+ }, _optional?: {}): boolean;
140
+ export interface CreateSourceControlCredentialInput {
141
+ workspaceId: UUID;
142
+ label: unknown;
143
+ connection: unknown;
144
+ /** `true` makes this the provider's default connection. Omitted auto-defaults the provider's
145
+ * FIRST saved connection; explicit `false` opts out. Jini owns atomic auto-defaulting. */
146
+ isDefault?: unknown;
147
+ /** `"site"` = a site-owned key. Omitted (or `"project"`) = the project store when one is
148
+ * attached, visible to attached sites only; this site's vault otherwise. */
149
+ scope?: unknown;
150
+ }
151
+ /** Validate the loaded declaration, then make the secret durable before identity discovery.
152
+ * @param required Explicit store ports and create input. @returns A summary with no secret fields.
153
+ * @throws {SourceControlCredentialValidationError} Invalid or unavailable provider/fields.
154
+ * Probe failures never undo a save; Jini owns sealing, hints and atomic defaults. */
155
+ export declare function createSourceControlCredential({ deps, input }: {
156
+ deps: SourceControlCredentialWriteDeps;
157
+ input: CreateSourceControlCredentialInput;
158
+ }, _options?: {}): Promise<SourceControlCredentialSummary>;
159
+ export interface UpdateSourceControlCredentialInput {
160
+ workspaceId: UUID;
161
+ id: UUID;
162
+ /** Omitted = leave the label unchanged. */
163
+ label?: unknown;
164
+ /** Omitted = leave the stored connection (and its provider) untouched. */
165
+ connection?: unknown;
166
+ /** `true` selects the destination default. Omitted/`false` preserves a same-provider default;
167
+ * a move uses the destination group's default/first-row rule. */
168
+ isDefault?: unknown;
169
+ }
170
+ /** Omitted/blank tokens keep the envelope; explicit rotations reset and re-probe the label.
171
+ * @param required Explicit store ports and update input. @returns A summary with no secret fields.
172
+ * @throws {SourceControlCredentialValidationError} Invalid or unavailable destination/fields.
173
+ * Metadata updates for an unchanged opaque id need neither a provider nor decryption. */
174
+ export declare function updateSourceControlCredential({ deps, input }: {
175
+ deps: SourceControlCredentialWriteDeps;
176
+ input: UpdateSourceControlCredentialInput;
177
+ }, _options?: {}): Promise<SourceControlCredentialSummary>;
178
+ /**
179
+ * Deletes a credential set. No-op (not an error) if no row exists for `(workspaceId, id)` — matches
180
+ * `SourceControlCredentialSetRepoPort.delete`'s own idempotent contract and this feature's `DELETE`
181
+ * route's documented 204-always behavior. If the deleted row was its provider's default,
182
+ * `SourceControlCredentialSetRepoPort.delete` itself promotes the group's next candidate.
183
+ *
184
+ * @complexity O(1) at this layer (the repo's own promotion work is O(n) in the small provider
185
+ * group).
186
+ */
187
+ export declare function deleteSourceControlCredential(deps: SourceControlCredentialReadDeps, input: {
188
+ workspaceId: UUID;
189
+ id: UUID;
190
+ }): Promise<void>;
191
+ /** The selected credential's metadata for a host, never decrypted: this site's, else the project's. */
192
+ export declare function findDefaultSourceControlCredential(deps: SourceControlCredentialReadDeps, input: {
193
+ workspaceId: UUID;
194
+ providerId: SourceControlProviderId;
195
+ }): Promise<Pick<SourceControlCredentialSetRecord, "id" | "label" | "providerId"> | null>;
196
+ /** Resolve exactly one eligible credential through Jini's context-checked open. Genuine decrypt
197
+ * failures stay typed: this runs in the daemon as well as the HTTP process. */
198
+ export declare function resolveDefaultForSourceControl(deps: SourceControlCredentialReadDeps & {
199
+ sealer: SecretSealerPort;
200
+ }, input: {
201
+ workspaceId: UUID;
202
+ providerId: SourceControlProviderId;
203
+ }): Promise<{
204
+ id: UUID;
205
+ label: string;
206
+ connection: SourceControlConnectionInput;
207
+ } | null>;
208
+ export {};
209
+ //# sourceMappingURL=store.d.ts.map