@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,102 @@
1
+ import { useEffect, useMemo, useRef, useState } from "react";
2
+ import { SOURCE_CONTROL_CREDENTIAL_ROW_LABEL, buildSourceControlConnectionInput, defaultSourceControlCredentialForProvider, sourceControlCredentialRowReadyToSave, sourceControlProviders, } from "../rules.js";
3
+ import {} from '@jini-ai/core/text';
4
+ import { sourceControlProvidersNotice } from "../rules.js";
5
+ function blankRowFormState() {
6
+ return { token: "", values: {}, saving: false, error: null };
7
+ }
8
+ /** Translates a rejected create/update into the exact string {@link useSourceControlCredentials}'s
9
+ * `save` stores as that row's `error` — pulled out of `save` for the same complexity-budget reason
10
+ * `use-publish-credentials.hooks.ts`'s own `publishCredentialSubmitErrorMessage` documents.
11
+ * @complexity O(1). */
12
+ function sourceControlCredentialSubmitErrorMessage({ err, t, locale, classifyCredentialSubmitError, translateCredentialMessage, describeApiError, sourceControlCredentialSaveErrorMessage }, _optional = {}) {
13
+ const classified = classifyCredentialSubmitError({ error: err });
14
+ if (classified.kind === "duplicate-label")
15
+ return t("This connection was already saved — reload the page and try again.");
16
+ if (classified.kind === "validation")
17
+ return sourceControlCredentialSaveErrorMessage({ locale: locale, error: translateCredentialMessage({ message: classified.detail, locale }) });
18
+ return sourceControlCredentialSaveErrorMessage({ locale: locale, error: describeApiError({ e: err, fallback: t("unknown error") }) });
19
+ }
20
+ export function useSourceControlCredentials({ port, t, locale, useFetchQueryHook, localizeSourceControlProviders, credentialDraftError, translateCredentialMessage, describeApiError, sourceControlCredentialsLoadErrorMessage, sourceControlCredentialSaveErrorMessage, classifyCredentialSubmitError }, _optional = {}) {
21
+ const query = useFetchQueryHook({ key: ["source-control", "credentials"], fetch: () => port.listCredentials() });
22
+ // The hosts come from plugins. A failed load lists none; saved connections still show, unlisted.
23
+ const providersQuery = useFetchQueryHook({ key: ["source-control", "providers"], fetch: () => port.listProviders() });
24
+ const [credentials, setCredentials] = useState(undefined);
25
+ // Seeds local state from the query's first successful load, exactly once — same shape
26
+ // `use-publish-credentials.hooks.ts`'s own `seededRef` uses. Later changes flow through `save`
27
+ // below, not through the query re-resolving.
28
+ const seededRef = useRef(false);
29
+ useEffect(() => {
30
+ if (seededRef.current || query.status === "loading" || !query.data)
31
+ return;
32
+ seededRef.current = true;
33
+ setCredentials(query.data.credentials);
34
+ }, [query.status, query.data]);
35
+ const loadError = query.error ? sourceControlCredentialsLoadErrorMessage({ locale: locale, error: describeApiError({ e: query.error, fallback: t("unknown error") }) }) : null;
36
+ const providers = useMemo(
37
+ // Each host's own text (label, guidance, field labels) in the viewer's locale.
38
+ () => {
39
+ const descriptors = providersQuery.data?.providers;
40
+ return sourceControlProviders({ descriptors: descriptors === undefined ? undefined : localizeSourceControlProviders({ providers: descriptors, locale }), credentials: credentials ?? [] });
41
+ }, [providersQuery.data, credentials, locale, localizeSourceControlProviders]);
42
+ const [formStates, setFormStates] = useState({});
43
+ function patchForm({ providerId, patch }, _optional = {}) {
44
+ setFormStates((prev) => {
45
+ const current = prev[providerId] ?? blankRowFormState();
46
+ return { ...prev, [providerId]: { ...current, ...patch(current) } };
47
+ });
48
+ }
49
+ function setToken({ providerId, value }, _optional = {}) {
50
+ const error = credentialDraftError({ value }, { locale });
51
+ patchForm({ providerId: providerId, patch: () => ({ token: value, error }) });
52
+ }
53
+ function setField({ providerId, name, value }, _optional = {}) {
54
+ patchForm({ providerId: providerId, patch: (current) => ({ values: { ...current.values, [name]: value } }) });
55
+ }
56
+ async function save(providerId) {
57
+ const formState = formStates[providerId] ?? blankRowFormState();
58
+ const info = providers.find((provider) => provider.id === providerId);
59
+ const fields = { providerId, token: formState.token, values: formState.values };
60
+ const error = credentialDraftError({ value: fields.token }, { locale, required: !defaultSourceControlCredentialForProvider({ credentials: credentials ?? [], providerId }) });
61
+ if (error) {
62
+ patchForm({ providerId: providerId, patch: () => ({ error }) });
63
+ return;
64
+ }
65
+ if (info === undefined || !sourceControlCredentialRowReadyToSave({ fields, info }))
66
+ return;
67
+ const existing = defaultSourceControlCredentialForProvider({ credentials: credentials ?? [], providerId });
68
+ patchForm({ providerId: providerId, patch: () => ({ saving: true, error: null }) });
69
+ try {
70
+ const connection = buildSourceControlConnectionInput({ fields, declaredFields: info.fields });
71
+ const result = existing
72
+ ? await port.updateCredential({ id: existing.id, input: { connection } })
73
+ : await port.createCredential({ label: SOURCE_CONTROL_CREDENTIAL_ROW_LABEL, connection });
74
+ setCredentials((prev) => {
75
+ const base = prev ?? [];
76
+ return existing ? base.map((current) => (current.id === result.id ? result : current)) : [...base, result];
77
+ });
78
+ setFormStates((prev) => ({ ...prev, [providerId]: blankRowFormState() }));
79
+ }
80
+ catch (err) {
81
+ patchForm({ providerId: providerId, patch: () => ({ saving: false, error: sourceControlCredentialSubmitErrorMessage({ err: err, t: t, locale: locale, classifyCredentialSubmitError, translateCredentialMessage, describeApiError, sourceControlCredentialSaveErrorMessage }) }) });
82
+ }
83
+ }
84
+ const rows = credentials === undefined || providersQuery.status === "loading"
85
+ ? undefined
86
+ : providers.map((info) => {
87
+ const formState = formStates[info.id] ?? blankRowFormState();
88
+ return {
89
+ providerId: info.id,
90
+ info,
91
+ saved: defaultSourceControlCredentialForProvider({ credentials, providerId: info.id }),
92
+ token: formState.token,
93
+ values: formState.values,
94
+ readyToSave: sourceControlCredentialRowReadyToSave({ fields: { providerId: info.id, token: formState.token, values: formState.values }, info }),
95
+ saving: formState.saving,
96
+ error: formState.error,
97
+ };
98
+ });
99
+ const providersNotice = sourceControlProvidersNotice({ snapshot: providersQuery.data, failed: Boolean(providersQuery.error), t });
100
+ return { rows, loadError, providersNotice, setToken, setField, save, t };
101
+ }
102
+ //# sourceMappingURL=use-source-control-credentials.hooks.js.map
@@ -0,0 +1,167 @@
1
+ import type { CredentialTokenHint } from "@jini-ai/core/contracts/site/secrets-credential-token";
2
+ import type { AdminPublishTargetField, PublishCredentialSubmitFailure } from "../../deploy/react/rules.js";
3
+ export type AdminSourceControlProviderId = string;
4
+ export interface AdminSourceControlProviderDescriptor {
5
+ id: string;
6
+ label: string;
7
+ credential?: {
8
+ help?: string;
9
+ tokenPageUrl?: string;
10
+ tokenField: string;
11
+ fields: AdminPublishTargetField[];
12
+ };
13
+ i18n?: Record<string, Record<string, string>>;
14
+ }
15
+ export interface AdminSourceControlCredentialSummary {
16
+ readonly tokenHint?: CredentialTokenHint | null;
17
+ readonly id: string;
18
+ readonly providerId: string;
19
+ readonly label: string;
20
+ readonly configured: true;
21
+ readonly isDefault: boolean;
22
+ readonly createdAt: string;
23
+ readonly updatedAt: string;
24
+ }
25
+ export type AdminSourceControlConnectionInput = {
26
+ providerId: string;
27
+ token: string;
28
+ } & Record<string, string>;
29
+ export interface AdminSourceControlProvidersSnapshot {
30
+ providers: AdminSourceControlProviderDescriptor[];
31
+ switchedOff: {
32
+ id: string;
33
+ pluginId: string;
34
+ }[];
35
+ refusals: string[];
36
+ }
37
+ /**
38
+ * @file Pure data and computation for the Source Control page — no React, no fetch, no `t()` calls
39
+ * (every function here returns a dictionary key for a caller to translate). Same
40
+ * `rules.ts`-holds-the-logic convention `deployment/rules.ts`/`integrations/rules.ts` follow.
41
+ *
42
+ * This page is a CONNECTION page, not git integration — see `SourceControl.tsx`'s own header for
43
+ * the scope boundary. The hosts are data: each comes from a plugin's `jini-source-control.json`
44
+ * (`GET .../system/source-control/providers`), which also declares its credential form and guidance.
45
+ * This file turns those descriptors into rows and holds the same connect/validate/build trio the
46
+ * publish credential form needs.
47
+ */
48
+ /** One host row this page can render, built from its plugin's descriptor. A saved connection whose
49
+ * host is not listed (its plugin off or missing) gets a bare `listed: false` entry named by its id:
50
+ * it stays visible, but takes no new token here. */
51
+ export interface SourceControlProviderInfo {
52
+ readonly id: AdminSourceControlProviderId;
53
+ /** Proper noun — rendered verbatim, never translated. */
54
+ readonly label: string;
55
+ /** Where to create a token; `""` when the host names none (no link is rendered). */
56
+ readonly tokenPageUrl: string;
57
+ /** The host's own guidance (which token, which scopes), passed through the translator; `""` when none. */
58
+ readonly scopeGuidanceKey: string;
59
+ /** The declared field that holds the token. */
60
+ readonly tokenField: string;
61
+ /** The token input's label from the descriptor; absent means the generic "Access token". */
62
+ readonly tokenLabel?: string;
63
+ /** The host's other declared credential fields; a `required` one gates Save. */
64
+ readonly fields: readonly AdminPublishTargetField[];
65
+ readonly listed: boolean;
66
+ }
67
+ /** One listed host's entry. A descriptor with no credential form takes just a token.
68
+ * @complexity O(f) in its declared field count. */
69
+ export declare function sourceControlProviderInfoFromDescriptor({ descriptor }: {
70
+ descriptor: AdminSourceControlProviderDescriptor;
71
+ }, _optional?: Record<string, never>): SourceControlProviderInfo;
72
+ /**
73
+ * This page's rows: every listed host in the server's order, then one `listed: false` entry per
74
+ * saved connection's unlisted host (IRON RULE: a saved credential never drops off the page).
75
+ * @complexity O(p + c * p) in the host and saved-connection counts (both small).
76
+ */
77
+ export declare function sourceControlProviders({ descriptors, credentials }: {
78
+ descriptors: readonly AdminSourceControlProviderDescriptor[] | undefined;
79
+ credentials: readonly Pick<AdminSourceControlCredentialSummary, "providerId">[];
80
+ }, _optional?: {}): SourceControlProviderInfo[];
81
+ /** One host row's typed fields: the token, plus its other declared fields by name. */
82
+ export interface SourceControlCredentialFormFields {
83
+ readonly providerId: AdminSourceControlProviderId;
84
+ readonly token: string;
85
+ readonly values: Readonly<Record<string, string>>;
86
+ }
87
+ /**
88
+ * Builds the wire {@link AdminSourceControlConnectionInput}: `providerId`, the unchanged token, and
89
+ * each non-blank declared field. Ordinary fields are trimmed; secret fields reach the store
90
+ * unchanged so its admission policy can reject whitespace-only input. Always includes `token`, even when blank —
91
+ * detecting "no new token typed" is {@link sourceControlCredentialRowReadyToSave}'s job.
92
+ * @complexity O(f + c) time, O(f + c) space for f declared fields containing c characters.
93
+ */
94
+ export declare function buildSourceControlConnectionInput({ fields, declaredFields }: {
95
+ fields: SourceControlCredentialFormFields;
96
+ declaredFields: readonly Pick<AdminPublishTargetField, "name" | "secret">[];
97
+ }, _optional?: Record<string, never>): AdminSourceControlConnectionInput;
98
+ /** The single fixed label every connection saved through this page's flat per-provider row list
99
+ * uses — same "there is no picker left to order, every provider gets its own always-visible row,
100
+ * so there is nothing left to name" reasoning `PUBLISH_CREDENTIAL_ROW_LABEL` documents. If the
101
+ * backing table keeps a `(workspace_id, provider_id, label)` UNIQUE constraint the way
102
+ * `publish_credential_sets` does, this satisfies it without ever asking an operator to type one. */
103
+ export declare const SOURCE_CONTROL_CREDENTIAL_ROW_LABEL = "default";
104
+ /**
105
+ * Every saved credential for one provider, in the order the server returned them.
106
+ * @complexity O(n) in this workspace's total saved-credential count (small).
107
+ */
108
+ export declare function sourceControlCredentialsForProvider({ credentials, providerId }: {
109
+ credentials: readonly AdminSourceControlCredentialSummary[];
110
+ providerId: AdminSourceControlProviderId;
111
+ }, _optional?: Record<string, never>): AdminSourceControlCredentialSummary[];
112
+ /** Which saved connection (if any) a provider's flat row should treat as "connected" — the group's
113
+ * DEFAULT row. Falls back to the first saved row only as a defensive read; mirrors
114
+ * `defaultCredentialForProvider`'s exact reasoning in `deployment/rules.ts`.
115
+ * @complexity O(n) in this provider's own (small) saved-connection count. */
116
+ export declare function defaultSourceControlCredentialForProvider({ credentials, providerId }: {
117
+ credentials: readonly AdminSourceControlCredentialSummary[];
118
+ providerId: AdminSourceControlProviderId;
119
+ }, _optional?: Record<string, never>): AdminSourceControlCredentialSummary | undefined;
120
+ /**
121
+ * Whether one host's row has enough typed to save: a token, and every required declared field. A
122
+ * blank token always means "nothing to save", connected or not (leaving it blank on a connected row
123
+ * keeps the stored secret untouched). An unlisted host takes no new token.
124
+ * @complexity O(f) in the declared field count.
125
+ */
126
+ export declare function sourceControlCredentialRowReadyToSave({ fields, info }: {
127
+ fields: SourceControlCredentialFormFields;
128
+ info: SourceControlProviderInfo;
129
+ }, _optional?: Record<string, never>): boolean;
130
+ /** What a rejected credential create/update means for the FORM — a dictionary-key-shaped result to
131
+ * translate and apply, mirroring `PublishCredentialSubmitFailure` exactly. `"generic"` is the
132
+ * catch-all every other kind falls back to. */
133
+ export type SourceControlCredentialSubmitFailure = PublishCredentialSubmitFailure;
134
+ /**
135
+ * Classifies a rejected create/update call. Checks BOTH `e.code` and `e.message` for the two known
136
+ * markers, same reasoning `classifyPublishCredentialSubmitError` documents in `deployment/rules.ts`
137
+ * — this page's own backend slice (not yet built, see this feature's handoff note) is expected to
138
+ * follow the same `409 -> { error: "DUPLICATE_LABEL" }` / `400 -> { error: "VALIDATION", detail }`
139
+ * shape every other admin write route in this app uses.
140
+ * @complexity O(1).
141
+ */
142
+ export declare function classifySourceControlCredentialSubmitError({ e, classifyCredentialSubmitError }: {
143
+ e: unknown;
144
+ classifyCredentialSubmitError(required: {
145
+ error: unknown;
146
+ }): SourceControlCredentialSubmitFailure;
147
+ }, _optional?: {}): SourceControlCredentialSubmitFailure;
148
+ /** Why the Providers tab lists fewer hosts than expected: one sentence plus the server's reasons. */
149
+ export interface SourceControlProvidersNotice {
150
+ readonly message: string;
151
+ readonly reasons: readonly string[];
152
+ }
153
+ /**
154
+ * The Providers tab's read-only explanation (open-bugs pending bug 1 / combine-23 bug 6). Why: the
155
+ * tab showed an empty list with no reason while the GitHub plugin read Enabled — a failed providers
156
+ * load was swallowed and the route's load refusals were never sent — so the owner had nothing to act
157
+ * on. Returns `null` when every installed host loaded; never offers an action of its own, only the
158
+ * next step to take in Agent Plugins.
159
+ *
160
+ * @complexity O(r + s) in refusals and switched-off hosts.
161
+ */
162
+ export declare function sourceControlProvidersNotice({ snapshot, failed, t }: {
163
+ snapshot: AdminSourceControlProvidersSnapshot | undefined;
164
+ failed: boolean;
165
+ t: (key: string) => string;
166
+ }, _optional?: {}): SourceControlProvidersNotice | null;
167
+ //# sourceMappingURL=rules.d.ts.map
@@ -0,0 +1,125 @@
1
+ /** One listed host's entry. A descriptor with no credential form takes just a token.
2
+ * @complexity O(f) in its declared field count. */
3
+ export function sourceControlProviderInfoFromDescriptor({ descriptor }, _optional = {}) {
4
+ const credential = descriptor.credential ?? { tokenField: "token", fields: [], tokenPageUrl: "", help: "" };
5
+ // `tokenField` and `fields` are required on a credential form (`AdminPublishTargetCredentialSpec`);
6
+ // only the form itself may be absent, which the fallback above covers.
7
+ const { tokenField } = credential;
8
+ const token = credential.fields.find((field) => field.name === tokenField);
9
+ return {
10
+ id: descriptor.id,
11
+ label: descriptor.label,
12
+ tokenPageUrl: credential.tokenPageUrl ?? "",
13
+ scopeGuidanceKey: credential.help ?? "",
14
+ tokenField,
15
+ ...(token !== undefined ? { tokenLabel: token.label } : {}),
16
+ fields: credential.fields.filter((field) => field.name !== tokenField),
17
+ listed: true,
18
+ };
19
+ }
20
+ /** The bare entry for a saved connection whose host is not listed. @complexity O(1). */
21
+ function unlistedSourceControlProviderInfo(id) {
22
+ return { id, label: id, tokenPageUrl: "", scopeGuidanceKey: "", tokenField: "token", fields: [], listed: false };
23
+ }
24
+ /**
25
+ * This page's rows: every listed host in the server's order, then one `listed: false` entry per
26
+ * saved connection's unlisted host (IRON RULE: a saved credential never drops off the page).
27
+ * @complexity O(p + c * p) in the host and saved-connection counts (both small).
28
+ */
29
+ export function sourceControlProviders({ descriptors, credentials }, _optional = {}) {
30
+ const providers = (descriptors ?? []).map(descriptor => sourceControlProviderInfoFromDescriptor({ descriptor }));
31
+ for (const credential of credentials) {
32
+ if (!providers.some((provider) => provider.id === credential.providerId))
33
+ providers.push(unlistedSourceControlProviderInfo(credential.providerId));
34
+ }
35
+ return providers;
36
+ }
37
+ /**
38
+ * Builds the wire {@link AdminSourceControlConnectionInput}: `providerId`, the unchanged token, and
39
+ * each non-blank declared field. Ordinary fields are trimmed; secret fields reach the store
40
+ * unchanged so its admission policy can reject whitespace-only input. Always includes `token`, even when blank —
41
+ * detecting "no new token typed" is {@link sourceControlCredentialRowReadyToSave}'s job.
42
+ * @complexity O(f + c) time, O(f + c) space for f declared fields containing c characters.
43
+ */
44
+ export function buildSourceControlConnectionInput({ fields, declaredFields }, _optional = {}) {
45
+ const values = {};
46
+ for (const field of declaredFields) {
47
+ const raw = fields.values[field.name] ?? "";
48
+ const value = field.secret ? raw : raw.trim();
49
+ if (value !== "")
50
+ values[field.name] = value;
51
+ }
52
+ return { ...values, providerId: fields.providerId, token: fields.token };
53
+ }
54
+ /** The single fixed label every connection saved through this page's flat per-provider row list
55
+ * uses — same "there is no picker left to order, every provider gets its own always-visible row,
56
+ * so there is nothing left to name" reasoning `PUBLISH_CREDENTIAL_ROW_LABEL` documents. If the
57
+ * backing table keeps a `(workspace_id, provider_id, label)` UNIQUE constraint the way
58
+ * `publish_credential_sets` does, this satisfies it without ever asking an operator to type one. */
59
+ export const SOURCE_CONTROL_CREDENTIAL_ROW_LABEL = "default";
60
+ /**
61
+ * Every saved credential for one provider, in the order the server returned them.
62
+ * @complexity O(n) in this workspace's total saved-credential count (small).
63
+ */
64
+ export function sourceControlCredentialsForProvider({ credentials, providerId }, _optional = {}) {
65
+ return credentials.filter((credential) => credential.providerId === providerId);
66
+ }
67
+ /** Which saved connection (if any) a provider's flat row should treat as "connected" — the group's
68
+ * DEFAULT row. Falls back to the first saved row only as a defensive read; mirrors
69
+ * `defaultCredentialForProvider`'s exact reasoning in `deployment/rules.ts`.
70
+ * @complexity O(n) in this provider's own (small) saved-connection count. */
71
+ export function defaultSourceControlCredentialForProvider({ credentials, providerId }, _optional = {}) {
72
+ const forProvider = sourceControlCredentialsForProvider({ credentials, providerId });
73
+ return forProvider.find((credential) => credential.isDefault) ?? forProvider[0];
74
+ }
75
+ /**
76
+ * Whether one host's row has enough typed to save: a token, and every required declared field. A
77
+ * blank token always means "nothing to save", connected or not (leaving it blank on a connected row
78
+ * keeps the stored secret untouched). An unlisted host takes no new token.
79
+ * @complexity O(f) in the declared field count.
80
+ */
81
+ export function sourceControlCredentialRowReadyToSave({ fields, info }, _optional = {}) {
82
+ if (!info.listed || fields.token.trim() === "")
83
+ return false;
84
+ return info.fields.every((field) => field.required !== true || (fields.values[field.name] ?? "").trim() !== "");
85
+ }
86
+ /**
87
+ * Classifies a rejected create/update call. Checks BOTH `e.code` and `e.message` for the two known
88
+ * markers, same reasoning `classifyPublishCredentialSubmitError` documents in `deployment/rules.ts`
89
+ * — this page's own backend slice (not yet built, see this feature's handoff note) is expected to
90
+ * follow the same `409 -> { error: "DUPLICATE_LABEL" }` / `400 -> { error: "VALIDATION", detail }`
91
+ * shape every other admin write route in this app uses.
92
+ * @complexity O(1).
93
+ */
94
+ export function classifySourceControlCredentialSubmitError({ e, classifyCredentialSubmitError }, _optional = {}) {
95
+ return classifyCredentialSubmitError({ error: e });
96
+ }
97
+ /**
98
+ * The Providers tab's read-only explanation (open-bugs pending bug 1 / combine-23 bug 6). Why: the
99
+ * tab showed an empty list with no reason while the GitHub plugin read Enabled — a failed providers
100
+ * load was swallowed and the route's load refusals were never sent — so the owner had nothing to act
101
+ * on. Returns `null` when every installed host loaded; never offers an action of its own, only the
102
+ * next step to take in Agent Plugins.
103
+ *
104
+ * @complexity O(r + s) in refusals and switched-off hosts.
105
+ */
106
+ export function sourceControlProvidersNotice({ snapshot, failed, t }, _optional = {}) {
107
+ if (failed)
108
+ return { message: t("The source-control hosts could not be loaded from Agent Plugins. Reload the page to try again."), reasons: [] };
109
+ if (snapshot === undefined)
110
+ return null;
111
+ const empty = snapshot.providers.length === 0;
112
+ // A switched-off plugin beside a working host is a choice, not a fault; it only explains an empty list.
113
+ const switchedOff = empty ? snapshot.switchedOff.map(({ id, pluginId }) => `${id}: ${pluginId} ${t("is turned off")}`) : [];
114
+ const reasons = [...snapshot.refusals, ...switchedOff];
115
+ if (reasons.length === 0) {
116
+ return empty ? { message: t("No enabled Agent Plugin provides a source-control host. Install or turn one on in Agent Plugins."), reasons } : null;
117
+ }
118
+ return {
119
+ message: empty
120
+ ? t("No source-control host was loaded. Reinstall or turn on the plugin in Agent Plugins.")
121
+ : t("Some source-control hosts were not loaded. Reinstall or turn on the plugin in Agent Plugins."),
122
+ reasons,
123
+ };
124
+ }
125
+ //# sourceMappingURL=rules.js.map
@@ -0,0 +1,75 @@
1
+ import type { ComponentType } from "react";
2
+ import type { OverviewIcon } from "../../deploy/react/deployment-visuals.js";
3
+ /**
4
+ * @file This page's own small icon set — three inline SVGs, no icon dependency. Same rationale
5
+ * `deployment/deployment-visuals.tsx`'s header gives for its own set: this app ships no icon
6
+ * component library to `features/`, and importing icons cross-feature (from `deployment/`, which
7
+ * this page deliberately avoids depending on — see `SourceControl.tsx`'s header) would tie this
8
+ * page's rendering to a sibling feature another agent owns. The shared stroke attributes come from `components/line-icon.ts`.
9
+ *
10
+ * No brand marks anywhere in this file, on purpose. This app draws zero brand logos anywhere —
11
+ * every proper noun on screen (`STATIC_HOSTS` in `deployment/rules.ts`, this page's own provider
12
+ * labels) renders as plain `translate="no"` text, never a mark — so GitHub/GitLab/Bitbucket get the
13
+ * same treatment here: their names are text, and the marker beside each row is a generic
14
+ * connection/checkmark glyph, not an octocat, fox, or Atlassian mark.
15
+ *
16
+ * All `aria-hidden` — every icon here sits next to text that already says the same thing, matching
17
+ * `frontend-accessibility`: an icon that duplicates its own visible label is noise to a screen
18
+ * reader, not information.
19
+ */
20
+ /** The card header's own icon — two nodes joined by a line, the generic shape of "a connection,"
21
+ * not any one host's mark. Distinct from `deployment-visuals.tsx`'s `StaticSiteIcon`/`FullSiteIcon`
22
+ * (a document, a server rack) — this page connects an ACCOUNT, not a deploy target. */
23
+ export declare function SourceControlIcon({ size, lineIcon }: {
24
+ size?: number;
25
+ lineIcon: Parameters<typeof OverviewIcon>[0]["lineIcon"];
26
+ }): import("react").JSX.Element;
27
+ /** A connected row's marker glyph — the same check-glyph path `deployment-visuals.tsx`'s
28
+ * `StepDoneIcon` uses, redrawn locally rather than imported (this page owns no dependency on the
29
+ * `deployment` feature — see `SourceControl.tsx`'s header) so the two "this step is done" marks
30
+ * still read as the same symbol meaning the same thing across the admin. Always `aria-hidden`: the
31
+ * row's own summary text already states "connected" in words. */
32
+ export declare function ConnectedMarkIcon({ size, lineIcon, Icon }: {
33
+ size?: number;
34
+ lineIcon: Parameters<typeof OverviewIcon>[0]["lineIcon"];
35
+ Icon: ComponentType<{
36
+ name: "check-long" | "chevron-down";
37
+ size: number;
38
+ focusable: undefined;
39
+ viewBox: string;
40
+ fill: string;
41
+ stroke: string;
42
+ strokeWidth: number;
43
+ strokeLinecap: "round";
44
+ strokeLinejoin: "round";
45
+ "aria-hidden": true | "true";
46
+ }>;
47
+ }): import("react").JSX.Element;
48
+ /**
49
+ * The disclosure chevron beside a connected row's "Replace token" affordance, rotated 180° by CSS
50
+ * when its `<details>` is open. Redrawn locally for the same reason {@link ConnectedMarkIcon} is —
51
+ * same path `deployment-visuals.tsx`'s `DisclosureChevron` uses.
52
+ *
53
+ * Always paired with a VISIBLE text label ("Replace token"), never alone: a bare chevron on a
54
+ * clickable row with no text was the exact defect this page was briefed not to inherit from the
55
+ * Static Site tab's credential rows (owner-reported there: a settled row read as inert with no way
56
+ * to discover it could be reopened). The chevron here is reinforcement of a label that already says
57
+ * what opening does, not the only signifier.
58
+ */
59
+ export declare function DisclosureChevronIcon({ size, lineIcon, Icon }: {
60
+ size?: number;
61
+ lineIcon: Parameters<typeof OverviewIcon>[0]["lineIcon"];
62
+ Icon: ComponentType<{
63
+ name: "check-long" | "chevron-down";
64
+ size: number;
65
+ focusable: undefined;
66
+ viewBox: string;
67
+ fill: string;
68
+ stroke: string;
69
+ strokeWidth: number;
70
+ strokeLinecap: "round";
71
+ strokeLinejoin: "round";
72
+ "aria-hidden": true | "true";
73
+ }>;
74
+ }): import("react").JSX.Element;
75
+ //# sourceMappingURL=source-control-visuals.d.ts.map
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * @file This page's own small icon set — three inline SVGs, no icon dependency. Same rationale
4
+ * `deployment/deployment-visuals.tsx`'s header gives for its own set: this app ships no icon
5
+ * component library to `features/`, and importing icons cross-feature (from `deployment/`, which
6
+ * this page deliberately avoids depending on — see `SourceControl.tsx`'s header) would tie this
7
+ * page's rendering to a sibling feature another agent owns. The shared stroke attributes come from `components/line-icon.ts`.
8
+ *
9
+ * No brand marks anywhere in this file, on purpose. This app draws zero brand logos anywhere —
10
+ * every proper noun on screen (`STATIC_HOSTS` in `deployment/rules.ts`, this page's own provider
11
+ * labels) renders as plain `translate="no"` text, never a mark — so GitHub/GitLab/Bitbucket get the
12
+ * same treatment here: their names are text, and the marker beside each row is a generic
13
+ * connection/checkmark glyph, not an octocat, fox, or Atlassian mark.
14
+ *
15
+ * All `aria-hidden` — every icon here sits next to text that already says the same thing, matching
16
+ * `frontend-accessibility`: an icon that duplicates its own visible label is noise to a screen
17
+ * reader, not information.
18
+ */
19
+ // Line-icon attributes: components/line-icon.ts.
20
+ /** The card header's own icon — two nodes joined by a line, the generic shape of "a connection,"
21
+ * not any one host's mark. Distinct from `deployment-visuals.tsx`'s `StaticSiteIcon`/`FullSiteIcon`
22
+ * (a document, a server rack) — this page connects an ACCOUNT, not a deploy target. */
23
+ export function SourceControlIcon({ size = 20, lineIcon }) {
24
+ return (_jsxs("svg", { ...lineIcon, width: size, height: size, children: [_jsx("circle", { cx: "6", cy: "6", r: "2.5" }), _jsx("circle", { cx: "18", cy: "18", r: "2.5" }), _jsx("path", { d: "M8 7.5 16 16.5" })] }));
25
+ }
26
+ /** A connected row's marker glyph — the same check-glyph path `deployment-visuals.tsx`'s
27
+ * `StepDoneIcon` uses, redrawn locally rather than imported (this page owns no dependency on the
28
+ * `deployment` feature — see `SourceControl.tsx`'s header) so the two "this step is done" marks
29
+ * still read as the same symbol meaning the same thing across the admin. Always `aria-hidden`: the
30
+ * row's own summary text already states "connected" in words. */
31
+ export function ConnectedMarkIcon({ size = 12, lineIcon, Icon }) {
32
+ return (_jsx(Icon, { name: "check-long", size: size, focusable: undefined, ...lineIcon, stroke: "currentColor", strokeWidth: 2.5, "aria-hidden": "true" }));
33
+ }
34
+ /**
35
+ * The disclosure chevron beside a connected row's "Replace token" affordance, rotated 180° by CSS
36
+ * when its `<details>` is open. Redrawn locally for the same reason {@link ConnectedMarkIcon} is —
37
+ * same path `deployment-visuals.tsx`'s `DisclosureChevron` uses.
38
+ *
39
+ * Always paired with a VISIBLE text label ("Replace token"), never alone: a bare chevron on a
40
+ * clickable row with no text was the exact defect this page was briefed not to inherit from the
41
+ * Static Site tab's credential rows (owner-reported there: a settled row read as inert with no way
42
+ * to discover it could be reopened). The chevron here is reinforcement of a label that already says
43
+ * what opening does, not the only signifier.
44
+ */
45
+ export function DisclosureChevronIcon({ size = 14, lineIcon, Icon }) {
46
+ return (_jsx(Icon, { name: "chevron-down", size: size, focusable: undefined, ...lineIcon }));
47
+ }
48
+ //# sourceMappingURL=source-control-visuals.js.map
@@ -0,0 +1,5 @@
1
+ import type { AgentToolDefinition } from "@jini-ai/core";
2
+ export declare function createSourceControlAgentToolCatalog({ credentialSaveToolId }: {
3
+ credentialSaveToolId: string;
4
+ }, _optional?: Record<string, never>): AgentToolDefinition[];
5
+ //# sourceMappingURL=agent-tools.d.ts.map
@@ -0,0 +1,30 @@
1
+ import { executeCommitSchema } from "./commit-schema.js";
2
+ const NO_INPUT_SCHEMA = {
3
+ type: "object",
4
+ additionalProperties: false,
5
+ required: [],
6
+ properties: {},
7
+ };
8
+ export function createSourceControlAgentToolCatalog({ credentialSaveToolId }, _optional = {}) {
9
+ return [
10
+ {
11
+ name: "source_control_get_capabilities",
12
+ description: `Reports the source control hosts for this workspace — every host a turned-on Agent Plugin provides, every host a plugin declares but is switched off, and every host that has a saved connection — WITHOUT decrypting or exposing any credential. For each provider: providerId; label, apiOrigin (the API base URL a saved custom credential for that host points at) and maxFileBytes (the largest single file the host accepts in a push; absent when it declares none), when a plugin declares the host; whether a credential is configured (a source-control connection or provider-declared saved API key exists; credentialSource is saved-api-key for that fallback — this is presence only, NOT a live verification that the token still works; a saved credential that the host has since revoked still reports configured:true here and would only be discovered as invalid by an actual commit attempt), every named credential set saved for it (id, label, isDefault, createdAt, updatedAt — NEVER a token or any part of one), and whether committing to that provider is supported yet (commitSupported: true only when an enabled Agent Plugin provides committing to that host; a saved credential for an unavailable host is reported honestly here, but source_control_execute_commit will refuse it; do not imply to the user that saving such a credential enables committing). Call this before telling a human what committing would do, before calling source_control_execute_commit, or whenever asked something like 'can I commit, and where'. Do NOT ask the user to paste a token into this chat — a value typed into chat is written into the conversation transcript, which is exactly what this workspace's encrypted credential store exists to avoid; call ${credentialSaveToolId} with kind source-control to open a human form, which saves it encrypted server-side and never shows it to you.`,
13
+ sideEffects: "none",
14
+ authorization: { permission: "source-control.read" },
15
+ inputSchema: NO_INPUT_SCHEMA,
16
+ },
17
+ {
18
+ name: "source_control_execute_commit",
19
+ description: "Commits a fresh active-theme static copy to a repository using its saved credential. Use the folder the user named; if the destination is unclear ask 'repository root or which folder?'. Run dryRun:true first to preview packaged files and bytes without contacting the host. Requires human approval with {provider, owner, repo, commitMessage, branch?, folder?}; provider must have commitSupported:true and folder commits require supportsFolder:true. Returns {committed:true, owner, repo, folder, entryPath, branch, branchCreated, commitSha, commitUrl, filesChanged, filesDeleted, divergedPaths}. Report destination, entryPath, deleted-file count and divergedPaths. Only unchanged stale paths previously managed in this destination may be removed; unrelated files, human-edited stale files and files outside the folder are preserved. The entry is a root index.html listing the theme and its pages; existing hosting URLs may need configuration. Static publishing has its own tool. Returns {committed:false, reason, message} when the credential or provider is unavailable, and {committed:false, cancelled:false, code, message} when the commit itself fails. Never accepts or exposes a token. Requires source-control.commit.",
20
+ // Genuinely consequential (pushes a real commit into someone's actual git history using a
21
+ // write-scoped external credential) — classified accordingly, cross-checked against
22
+ // `sourceControlDerivedRisk` below at build time. Deliberately carries NO `actorClassRule` — see
23
+ // this file's header for why the MCP-UI held-open exchange gate needs none.
24
+ sideEffects: "mutates-durable-state",
25
+ authorization: { permission: "source-control.commit" },
26
+ inputSchema: executeCommitSchema,
27
+ },
28
+ ];
29
+ }
30
+ //# sourceMappingURL=agent-tools.js.map
@@ -0,0 +1,33 @@
1
+ type Empty = Record<string, never>;
2
+ export interface BundledProviderRefusalCopy {
3
+ readonly sourceFailure: string;
4
+ readonly packageFailure: (required: {
5
+ pluginId: string;
6
+ }) => string;
7
+ readonly duplicateId: (required: {
8
+ id: string;
9
+ }) => string;
10
+ }
11
+ export declare function collectBundledSourceControlProviders<Source extends {
12
+ pluginId: string;
13
+ }, Provider>(required: {
14
+ sources: () => readonly Source[];
15
+ load: (required: {
16
+ source: Source;
17
+ }) => Promise<{
18
+ providers: readonly Provider[];
19
+ refusals: readonly string[];
20
+ }>;
21
+ providerId: (required: {
22
+ provider: Provider;
23
+ }) => string;
24
+ reportSourceFailure: (required: {
25
+ error: unknown;
26
+ }) => void;
27
+ copy: BundledProviderRefusalCopy;
28
+ }, _optional?: Empty): Promise<{
29
+ providers: readonly Provider[];
30
+ refusals: readonly string[];
31
+ }>;
32
+ export {};
33
+ //# sourceMappingURL=bundled-provider-registry.d.ts.map
@@ -0,0 +1,37 @@
1
+ export async function collectBundledSourceControlProviders(required, _optional = {}) {
2
+ let sources;
3
+ try {
4
+ sources = required.sources();
5
+ }
6
+ catch (error) {
7
+ required.reportSourceFailure({ error });
8
+ return { providers: [], refusals: [required.copy.sourceFailure] };
9
+ }
10
+ const providers = new Map();
11
+ const duplicates = new Set();
12
+ const refusals = [];
13
+ for (const plugin of sources) {
14
+ let registry;
15
+ try {
16
+ registry = await required.load({ source: plugin });
17
+ }
18
+ catch {
19
+ // Import/read errors can contain paths or credentials; report only the product-owned id.
20
+ refusals.push(required.copy.packageFailure({ pluginId: plugin.pluginId }));
21
+ continue;
22
+ }
23
+ refusals.push(...registry.refusals);
24
+ for (const provider of registry.providers) {
25
+ const id = required.providerId({ provider });
26
+ if (providers.has(id))
27
+ duplicates.add(id);
28
+ providers.set(id, provider);
29
+ }
30
+ }
31
+ for (const id of duplicates) {
32
+ providers.delete(id);
33
+ refusals.push(required.copy.duplicateId({ id }));
34
+ }
35
+ return { providers: [...providers.values()], refusals };
36
+ }
37
+ //# sourceMappingURL=bundled-provider-registry.js.map