@jini-ai/devops 0.7.3-next.1 → 0.7.3-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +16 -0
- package/dist/backup/site/archive-extensions.d.ts +73 -0
- package/dist/backup/site/archive-extensions.js +129 -0
- package/dist/backup/site/archive-manifest.d.ts +85 -0
- package/dist/backup/site/archive-manifest.js +176 -0
- package/dist/backup/site/archive-media.d.ts +121 -0
- package/dist/backup/site/archive-media.js +93 -0
- package/dist/backup/site/backup-service.credentials.d.ts +31 -0
- package/dist/backup/site/backup-service.credentials.js +161 -0
- package/dist/backup/site/backup-service.d.ts +331 -0
- package/dist/backup/site/backup-service.js +125 -0
- package/dist/backup/site/backup-service.plan.d.ts +64 -0
- package/dist/backup/site/backup-service.plan.js +207 -0
- package/dist/backup/site/backup-service.push.d.ts +29 -0
- package/dist/backup/site/backup-service.push.js +82 -0
- package/dist/backup/site/backup-service.shared.d.ts +40 -0
- package/dist/backup/site/backup-service.shared.js +37 -0
- package/dist/backup/site/bundled-export-file-policy.d.ts +38 -0
- package/dist/backup/site/bundled-export-file-policy.js +40 -0
- package/dist/backup/site/credential-warnings.d.ts +41 -0
- package/dist/backup/site/credential-warnings.js +50 -0
- package/dist/backup/site/import-backend-steps.d.ts +167 -0
- package/dist/backup/site/import-backend-steps.js +170 -0
- package/dist/backup/site/import-backend.d.ts +167 -0
- package/dist/backup/site/import-backend.js +298 -0
- package/dist/backup/site/import-database.d.ts +118 -0
- package/dist/backup/site/import-database.js +167 -0
- package/dist/backup/site/import-index/admission.d.ts +54 -0
- package/dist/backup/site/import-index/admission.js +46 -0
- package/dist/backup/site/import-index/backfill.d.ts +106 -0
- package/dist/backup/site/import-index/backfill.js +137 -0
- package/dist/backup/site/import-index/errors.d.ts +28 -0
- package/dist/backup/site/import-index/errors.js +38 -0
- package/dist/backup/site/import-index/migrations/checksums.d.ts +4 -0
- package/dist/backup/site/import-index/migrations/checksums.js +4 -0
- package/dist/backup/site/import-index/migrations/site-imports-v1.d.ts +2 -0
- package/dist/backup/site/import-index/migrations/site-imports-v1.js +10 -0
- package/dist/backup/site/import-index/mode.d.ts +191 -0
- package/dist/backup/site/import-index/mode.js +272 -0
- package/dist/backup/site/import-index/open.d.ts +40 -0
- package/dist/backup/site/import-index/open.js +87 -0
- package/dist/backup/site/import-index/paging.d.ts +28 -0
- package/dist/backup/site/import-index/paging.js +66 -0
- package/dist/backup/site/import-index/payload-namespace.d.ts +80 -0
- package/dist/backup/site/import-index/payload-namespace.js +156 -0
- package/dist/backup/site/import-index/rows.d.ts +32 -0
- package/dist/backup/site/import-index/rows.js +61 -0
- package/dist/backup/site/import-index/schema.d.ts +8 -0
- package/dist/backup/site/import-index/schema.js +31 -0
- package/dist/backup/site/import-index/store.d.ts +27 -0
- package/dist/backup/site/import-index/store.js +33 -0
- package/dist/backup/site/import-index/sweep.d.ts +10 -0
- package/dist/backup/site/import-index/sweep.js +26 -0
- package/dist/backup/site/import-keep-off.d.ts +128 -0
- package/dist/backup/site/import-keep-off.js +204 -0
- package/dist/backup/site/import-plugin-state.d.ts +74 -0
- package/dist/backup/site/import-plugin-state.js +67 -0
- package/dist/backup/site/import-registry.d.ts +110 -0
- package/dist/backup/site/import-registry.js +205 -0
- package/dist/backup/site/import-restore-placement.d.ts +94 -0
- package/dist/backup/site/import-restore-placement.js +158 -0
- package/dist/backup/site/import-restore.d.ts +111 -0
- package/dist/backup/site/import-restore.js +120 -0
- package/dist/backup/site/import-verifier-inventory.d.ts +137 -0
- package/dist/backup/site/import-verifier-inventory.js +236 -0
- package/dist/backup/site/import-verifier-projection.d.ts +78 -0
- package/dist/backup/site/import-verifier-projection.js +100 -0
- package/dist/backup/site/import-verifier.d.ts +126 -0
- package/dist/backup/site/import-verifier.js +53 -0
- package/dist/backup/site/owned-temp-root.d.ts +12 -0
- package/dist/backup/site/owned-temp-root.js +2 -0
- package/dist/backup/site/package-file-inventory.d.ts +63 -0
- package/dist/backup/site/package-file-inventory.js +56 -0
- package/dist/backup/site/push-content.d.ts +70 -0
- package/dist/backup/site/push-content.js +56 -0
- package/dist/backup/site/react/ShowMoreImports.d.ts +21 -0
- package/dist/backup/site/react/ShowMoreImports.js +8 -0
- package/dist/backup/site/saved-keys-port.d.ts +47 -0
- package/dist/backup/site/saved-keys-port.js +3 -0
- package/dist/backup/site/saved-keys.d.ts +25 -0
- package/dist/backup/site/saved-keys.js +38 -0
- package/dist/backup/site/share-backend.d.ts +243 -0
- package/dist/backup/site/share-backend.js +284 -0
- package/dist/backup/site/share-database/projection.d.ts +195 -0
- package/dist/backup/site/share-database/projection.js +90 -0
- package/dist/backup/site/share-database/projection.media.d.ts +38 -0
- package/dist/backup/site/share-database/projection.media.js +179 -0
- package/dist/backup/site/share-database/projection.tables.d.ts +46 -0
- package/dist/backup/site/share-database/projection.tables.js +193 -0
- package/dist/backup/site/share-expiry.d.ts +75 -0
- package/dist/backup/site/share-expiry.js +49 -0
- package/dist/backup/site/share-export-failure.d.ts +17 -0
- package/dist/backup/site/share-export-failure.js +16 -0
- package/dist/backup/site/share-file-policy.d.ts +60 -0
- package/dist/backup/site/share-file-policy.js +146 -0
- package/dist/backup/site/share-hosting.d.ts +107 -0
- package/dist/backup/site/share-hosting.js +148 -0
- package/dist/backup/site/share-preparation-steps.d.ts +180 -0
- package/dist/backup/site/share-preparation-steps.js +109 -0
- package/dist/backup/site/share-preparation.d.ts +122 -0
- package/dist/backup/site/share-preparation.js +43 -0
- package/dist/backup/site/share-refusal.d.ts +21 -0
- package/dist/backup/site/share-refusal.js +20 -0
- package/dist/backup/site/share-registry.d.ts +124 -0
- package/dist/backup/site/share-registry.js +219 -0
- package/dist/backup/site/share-retention.d.ts +62 -0
- package/dist/backup/site/share-retention.js +126 -0
- package/dist/backup/site/share-service.d.ts +128 -0
- package/dist/backup/site/share-service.js +194 -0
- package/dist/backup/site/share-zip.d.ts +115 -0
- package/dist/backup/site/share-zip.js +144 -0
- package/dist/backup/site/sources.d.ts +344 -0
- package/dist/backup/site/sources.js +595 -0
- package/dist/backup/site/static-copy.d.ts +122 -0
- package/dist/backup/site/static-copy.js +165 -0
- package/dist/backup/site/static-download-html.d.ts +76 -0
- package/dist/backup/site/static-download-html.js +149 -0
- package/dist/backup/site/static-download-landing.d.ts +52 -0
- package/dist/backup/site/static-download-landing.js +95 -0
- package/dist/backup/site/static-download-layout.d.ts +96 -0
- package/dist/backup/site/static-download-layout.js +325 -0
- package/dist/backup/site/static-export-selection.d.ts +50 -0
- package/dist/backup/site/static-export-selection.js +76 -0
- package/dist/backup/site/static-site-packager.d.ts +42 -0
- package/dist/backup/site/static-site-packager.js +32 -0
- package/dist/backup/site/tool-registrations.d.ts +74 -0
- package/dist/backup/site/tool-registrations.js +201 -0
- package/dist/checks/complexity-debt.d.ts +100 -0
- package/dist/checks/complexity-debt.js +131 -0
- package/dist/checks/coverage/diff.js +5 -1
- package/dist/checks/env-access.d.ts +14 -1
- package/dist/checks/env-access.js +92 -6
- package/dist/checks/live-verify-checks.d.ts +29 -0
- package/dist/checks/live-verify-checks.js +30 -0
- package/dist/checks/quality-gates.d.ts +137 -0
- package/dist/checks/quality-gates.js +209 -0
- package/dist/core/deploy-types.d.ts +2 -0
- package/dist/deploy/admin-http/site-update-status.d.ts +8 -0
- package/dist/deploy/admin-http/site-update-status.js +15 -0
- package/dist/deploy/host-kit.d.ts +3 -0
- package/dist/deploy/index.d.ts +6 -0
- package/dist/deploy/index.js +6 -0
- package/dist/deploy/ops-runner.js +7 -0
- package/dist/deploy/ops-tool-contracts.d.ts +10 -1
- package/dist/deploy/react/Deployment.d.ts +37 -0
- package/dist/deploy/react/Deployment.js +94 -0
- package/dist/deploy/react/DockerfileTab.d.ts +72 -0
- package/dist/deploy/react/DockerfileTab.js +131 -0
- package/dist/deploy/react/HistoryTab.d.ts +43 -0
- package/dist/deploy/react/HistoryTab.js +12 -0
- package/dist/deploy/react/OverviewTab.d.ts +60 -0
- package/dist/deploy/react/OverviewTab.js +75 -0
- package/dist/deploy/react/PublishRunResult.d.ts +5 -1
- package/dist/deploy/react/PublishRunResult.js +4 -4
- package/dist/deploy/react/SiteUpdateNotice.d.ts +22 -0
- package/dist/deploy/react/SiteUpdateNotice.js +25 -0
- package/dist/deploy/react/StaticCredentialFields.d.ts +36 -0
- package/dist/deploy/react/StaticCredentialFields.js +63 -0
- package/dist/deploy/react/StaticCredentialSteps.d.ts +23 -0
- package/dist/deploy/react/StaticCredentialSteps.js +155 -0
- package/dist/deploy/react/StaticExportCard.d.ts +11 -0
- package/dist/deploy/react/StaticExportCard.js +97 -0
- package/dist/deploy/react/StaticPublishCredentials.d.ts +50 -0
- package/dist/deploy/react/StaticPublishCredentials.js +77 -0
- package/dist/deploy/react/StaticPublishForm.d.ts +12 -0
- package/dist/deploy/react/StaticPublishForm.js +91 -0
- package/dist/deploy/react/StaticSiteTab.d.ts +207 -0
- package/dist/deploy/react/StaticSiteTab.js +117 -0
- package/dist/deploy/react/deployment-visuals.d.ts +207 -0
- package/dist/deploy/react/deployment-visuals.js +101 -0
- package/dist/deploy/react/download-dockerfile.d.ts +14 -0
- package/dist/deploy/react/download-dockerfile.js +15 -0
- package/dist/deploy/react/hooks/publish-credential-draft.d.ts +33 -0
- package/dist/deploy/react/hooks/publish-credential-draft.js +54 -0
- package/dist/deploy/react/hooks/publish-credential-selection.d.ts +13 -0
- package/dist/deploy/react/hooks/publish-credential-selection.js +34 -0
- package/dist/deploy/react/hooks/publish-credential-writes.d.ts +20 -0
- package/dist/deploy/react/hooks/publish-credential-writes.js +99 -0
- package/dist/deploy/react/hooks/static-publish-actions.d.ts +10 -0
- package/dist/deploy/react/hooks/static-publish-actions.js +62 -0
- package/dist/deploy/react/hooks/static-publish-form.hooks.d.ts +38 -0
- package/dist/deploy/react/hooks/static-publish-form.hooks.js +103 -0
- package/dist/deploy/react/hooks/static-publish-run.hooks.d.ts +28 -0
- package/dist/deploy/react/hooks/static-publish-run.hooks.js +92 -0
- package/dist/deploy/react/hooks/use-dockerfile-source.hooks.d.ts +148 -0
- package/dist/deploy/react/hooks/use-dockerfile-source.hooks.js +155 -0
- package/dist/deploy/react/hooks/use-publish-credentials.hooks.d.ts +268 -0
- package/dist/deploy/react/hooks/use-publish-credentials.hooks.js +52 -0
- package/dist/deploy/react/hooks/use-static-export.hooks.d.ts +128 -0
- package/dist/deploy/react/hooks/use-static-export.hooks.js +159 -0
- package/dist/deploy/react/hooks/use-static-publish.hooks.d.ts +208 -0
- package/dist/deploy/react/hooks/use-static-publish.hooks.js +48 -0
- package/dist/deploy/react/index.d.ts +4 -0
- package/dist/deploy/react/index.js +2 -0
- package/dist/deploy/react/rules.d.ts +363 -0
- package/dist/deploy/react/rules.js +314 -0
- package/dist/deploy/react/use-deployment-overview.hooks.d.ts +41 -0
- package/dist/deploy/react/use-deployment-overview.hooks.js +11 -0
- package/dist/deploy/site/agent-tools.d.ts +42 -0
- package/dist/deploy/site/agent-tools.js +119 -0
- package/dist/deploy/site/deploy-config-registry.d.ts +155 -0
- package/dist/deploy/site/deploy-config-registry.js +124 -0
- package/dist/deploy/site/deploy-config.d.ts +97 -0
- package/dist/deploy/site/deploy-config.js +115 -0
- package/dist/deploy/site/deploy-ops/agent-tools.d.ts +22 -0
- package/dist/deploy/site/deploy-ops/agent-tools.js +76 -0
- package/dist/deploy/site/deploy-ops/registry.d.ts +134 -0
- package/dist/deploy/site/deploy-ops/registry.js +106 -0
- package/dist/deploy/site/deploy-ops/run-ops.d.ts +66 -0
- package/dist/deploy/site/deploy-ops/run-ops.js +34 -0
- package/dist/deploy/site/deploy-ops/secret-confirm.d.ts +36 -0
- package/dist/deploy/site/deploy-ops/secret-confirm.js +27 -0
- package/dist/deploy/site/deploy-targets/host-kit.d.ts +28 -0
- package/dist/deploy/site/deploy-targets/host-kit.js +120 -0
- package/dist/deploy/site/deploy-targets/registry.d.ts +157 -0
- package/dist/deploy/site/deploy-targets/registry.js +132 -0
- package/dist/deploy/site/deploy-targets/types.d.ts +27 -0
- package/dist/deploy/site/deploy-targets/types.js +2 -0
- package/dist/deploy/site/dockerfile.d.ts +137 -0
- package/dist/deploy/site/dockerfile.js +101 -0
- package/dist/deploy/site/export-run.d.ts +137 -0
- package/dist/deploy/site/export-run.js +152 -0
- package/dist/deploy/site/ports.d.ts +115 -0
- package/dist/deploy/site/ports.js +2 -0
- package/dist/deploy/site/publish-agent-tools.d.ts +18 -0
- package/dist/deploy/site/publish-agent-tools.js +120 -0
- package/dist/deploy/site/publish-candidate.d.ts +26 -0
- package/dist/deploy/site/publish-candidate.js +37 -0
- package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.d.ts +78 -0
- package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.js +88 -0
- package/dist/deploy/site/publish-credentials/compatibility-port.d.ts +38 -0
- package/dist/deploy/site/publish-credentials/compatibility-port.js +19 -0
- package/dist/deploy/site/publish-credentials/execution-mode.d.ts +43 -0
- package/dist/deploy/site/publish-credentials/execution-mode.js +19 -0
- package/dist/deploy/site/publish-credentials/store-owner.d.ts +11 -0
- package/dist/deploy/site/publish-credentials/store-owner.js +9 -0
- package/dist/deploy/site/publish-credentials/store-resolution.d.ts +55 -0
- package/dist/deploy/site/publish-credentials/store-resolution.js +100 -0
- package/dist/deploy/site/publish-credentials/store-validation.d.ts +68 -0
- package/dist/deploy/site/publish-credentials/store-validation.js +182 -0
- package/dist/deploy/site/publish-credentials/store.d.ts +322 -0
- package/dist/deploy/site/publish-credentials/store.js +372 -0
- package/dist/deploy/site/publish-credentials/types.d.ts +85 -0
- package/dist/deploy/site/publish-credentials/types.js +2 -0
- package/dist/deploy/site/publish-tool-capabilities.d.ts +123 -0
- package/dist/deploy/site/publish-tool-capabilities.js +175 -0
- package/dist/deploy/site/publish-tool-credential.d.ts +48 -0
- package/dist/deploy/site/publish-tool-credential.js +284 -0
- package/dist/deploy/site/publish-tool-deps.d.ts +205 -0
- package/dist/deploy/site/publish-tool-deps.js +15 -0
- package/dist/deploy/site/publish-tool-execution.d.ts +78 -0
- package/dist/deploy/site/publish-tool-execution.js +313 -0
- package/dist/deploy/site/publish-tool-schema.d.ts +29 -0
- package/dist/deploy/site/publish-tool-schema.js +38 -0
- package/dist/deploy/site/static-publish/adapter-export.d.ts +54 -0
- package/dist/deploy/site/static-publish/adapter-export.js +89 -0
- package/dist/deploy/site/static-publish/adapter-plan.d.ts +99 -0
- package/dist/deploy/site/static-publish/adapter-plan.js +112 -0
- package/dist/deploy/site/static-publish/adapter.d.ts +182 -0
- package/dist/deploy/site/static-publish/adapter.js +321 -0
- package/dist/deploy/site/static-publish/admin-publish-read.d.ts +209 -0
- package/dist/deploy/site/static-publish/admin-publish-read.js +116 -0
- package/dist/deploy/site/static-publish/credentials.d.ts +110 -0
- package/dist/deploy/site/static-publish/credentials.js +290 -0
- package/dist/deploy/site/static-publish/domain-publish-rows.d.ts +25 -0
- package/dist/deploy/site/static-publish/domain-publish-rows.js +43 -0
- package/dist/deploy/site/static-publish/domain-publish-tool.d.ts +19 -0
- package/dist/deploy/site/static-publish/domain-publish-tool.js +111 -0
- package/dist/deploy/site/static-publish/inspection.d.ts +24 -0
- package/dist/deploy/site/static-publish/inspection.js +69 -0
- package/dist/deploy/site/static-publish/publish-history.d.ts +197 -0
- package/dist/deploy/site/static-publish/publish-history.js +153 -0
- package/dist/deploy/site/static-publish/publish-run.d.ts +156 -0
- package/dist/deploy/site/static-publish/publish-run.js +186 -0
- package/dist/deploy/site/static-publish/types.d.ts +165 -0
- package/dist/deploy/site/static-publish/types.js +2 -0
- package/dist/deploy/site/static-publish/verify.d.ts +217 -0
- package/dist/deploy/site/static-publish/verify.js +248 -0
- package/dist/deploy/site/tool-registrations.d.ts +97 -0
- package/dist/deploy/site/tool-registrations.js +130 -0
- package/dist/deploy/site/types.d.ts +51 -0
- package/dist/deploy/site/types.js +2 -0
- package/dist/deploy/site-update/check-for-update.d.ts +19 -0
- package/dist/deploy/site-update/check-for-update.js +19 -0
- package/dist/deploy/site-update/contracts.d.ts +161 -0
- package/dist/deploy/site-update/contracts.js +94 -0
- package/dist/deploy/site-update/desktop-site-update.d.ts +66 -0
- package/dist/deploy/site-update/desktop-site-update.js +43 -0
- package/dist/deploy/site-update/fake-site-update.d.ts +39 -0
- package/dist/deploy/site-update/fake-site-update.js +52 -0
- package/dist/deploy/site-update/run-site-update.d.ts +121 -0
- package/dist/deploy/site-update/run-site-update.js +219 -0
- package/dist/deploy/site-update/self-hosted-site-update.d.ts +71 -0
- package/dist/deploy/site-update/self-hosted-site-update.js +79 -0
- package/dist/deploy/target-contracts.d.ts +3 -0
- package/dist/deploy/tool.d.ts +5 -8
- package/dist/deploy/tool.js +6 -9
- package/dist/dns/binding-sweeper.d.ts +72 -0
- package/dist/dns/binding-sweeper.js +53 -0
- package/dist/dns/index.d.ts +1 -0
- package/dist/dns/index.js +1 -0
- package/dist/dns/site/binding.repo.d.ts +71 -0
- package/dist/dns/site/binding.repo.js +45 -0
- package/dist/dns/site/dns-changes.d.ts +90 -0
- package/dist/dns/site/dns-changes.js +271 -0
- package/dist/dns/site/dns-tools.d.ts +46 -0
- package/dist/dns/site/dns-tools.js +204 -0
- package/dist/dns/site/mail-dns-status.d.ts +111 -0
- package/dist/dns/site/mail-dns-status.js +190 -0
- package/dist/dns/site/mail-dns-tools.d.ts +33 -0
- package/dist/dns/site/mail-dns-tools.js +62 -0
- package/dist/dns/site/mail-requirements.d.ts +30 -0
- package/dist/dns/site/mail-requirements.js +78 -0
- package/dist/dns/site/tool-deps.d.ts +21 -0
- package/dist/dns/site/tool-deps.js +2 -0
- package/dist/dns/site/tools.d.ts +74 -0
- package/dist/dns/site/tools.js +124 -0
- package/dist/local-dev/bind-host.d.ts +80 -0
- package/dist/local-dev/bind-host.js +90 -0
- package/dist/local-dev/dev-proxy-upstream.d.ts +69 -0
- package/dist/local-dev/dev-proxy-upstream.js +63 -0
- package/dist/local-dev/index.d.ts +28 -0
- package/dist/local-dev/index.js +25 -0
- package/dist/packaging/electron/archive.d.ts +2 -9
- package/dist/packaging/electron/asar-adapter.d.ts +2 -1
- package/dist/packaging/electron/entry.d.ts +2 -0
- package/dist/packaging/electron/move-to-applications.d.ts +165 -0
- package/dist/packaging/electron/move-to-applications.js +162 -0
- package/dist/packaging/electron/policies.d.ts +33 -4
- package/dist/packaging/electron/policies.js +29 -10
- package/dist/packaging/electron/ports.d.ts +1 -6
- package/dist/packaging/electron/staging.d.ts +11 -2
- package/dist/packaging/electron/staging.js +15 -5
- package/dist/react/site-share-expiry/ShareExpiryControls.d.ts +29 -0
- package/dist/react/site-share-expiry/ShareExpiryControls.js +7 -0
- package/dist/react/site-share-expiry/index.d.ts +2 -0
- package/dist/react/site-share-expiry/index.js +2 -0
- package/dist/source-control/react/ProvidersTab.d.ts +98 -0
- package/dist/source-control/react/ProvidersTab.js +195 -0
- package/dist/source-control/react/SourceControl.d.ts +51 -0
- package/dist/source-control/react/SourceControl.js +61 -0
- package/dist/source-control/react/hooks/use-source-control-credentials.hooks.d.ts +128 -0
- package/dist/source-control/react/hooks/use-source-control-credentials.hooks.js +102 -0
- package/dist/source-control/react/rules.d.ts +167 -0
- package/dist/source-control/react/rules.js +125 -0
- package/dist/source-control/react/source-control-visuals.d.ts +75 -0
- package/dist/source-control/react/source-control-visuals.js +48 -0
- package/dist/source-control/site/agent-tools.d.ts +5 -0
- package/dist/source-control/site/agent-tools.js +30 -0
- package/dist/source-control/site/bundled-provider-registry.d.ts +33 -0
- package/dist/source-control/site/bundled-provider-registry.js +37 -0
- package/dist/source-control/site/commit-schema.d.ts +40 -0
- package/dist/source-control/site/commit-schema.js +29 -0
- package/dist/source-control/site/commit-target.d.ts +26 -0
- package/dist/source-control/site/commit-target.js +58 -0
- package/dist/source-control/site/credential-form.d.ts +36 -0
- package/dist/source-control/site/credential-form.js +102 -0
- package/dist/source-control/site/credential-setup.d.ts +107 -0
- package/dist/source-control/site/credential-setup.js +216 -0
- package/dist/source-control/site/provider-kit.d.ts +37 -0
- package/dist/source-control/site/provider-kit.js +35 -0
- package/dist/source-control/site/provider-module.d.ts +251 -0
- package/dist/source-control/site/provider-module.js +2 -0
- package/dist/source-control/site/saved-key-bindings.d.ts +4 -0
- package/dist/source-control/site/saved-key-bindings.js +4 -0
- package/dist/source-control/site/static-site-packager-port.d.ts +37 -0
- package/dist/source-control/site/static-site-packager-port.js +2 -0
- package/dist/source-control/site/store.d.ts +209 -0
- package/dist/source-control/site/store.js +374 -0
- package/dist/source-control/site/store.validation.d.ts +72 -0
- package/dist/source-control/site/store.validation.js +168 -0
- package/dist/source-control/site/tool-registrations.d.ts +190 -0
- package/dist/source-control/site/tool-registrations.js +379 -0
- package/dist/static-export/site/export-preflight.d.ts +48 -0
- package/dist/static-export/site/export-preflight.js +82 -0
- package/dist/static-export/site/media-original-urls.d.ts +57 -0
- package/dist/static-export/site/media-original-urls.js +109 -0
- package/dist/static-export/site/ports.d.ts +82 -0
- package/dist/static-export/site/ports.js +29 -0
- package/dist/static-export/site/public-origin-policy.d.ts +32 -0
- package/dist/static-export/site/public-origin-policy.js +68 -0
- package/dist/static-export/site/route-manifest.d.ts +65 -0
- package/dist/static-export/site/route-manifest.js +139 -0
- package/dist/static-export/site/site-exporter.d.ts +158 -0
- package/dist/static-export/site/site-exporter.js +112 -0
- package/dist/static-export/site/static-security-headers.d.ts +39 -0
- package/dist/static-export/site/static-security-headers.js +43 -0
- package/dist/static-export/site/theme-preview-manifest.d.ts +35 -0
- package/dist/static-export/site/theme-preview-manifest.js +28 -0
- package/package.json +912 -8
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Which installed-package files a share may treat as public plugin content: exactly the files
|
|
3
|
+
* THIS build ships. Each bundled source folder is packed with the seeder's own deterministic packer
|
|
4
|
+
* (`packAgentPluginDirectory`), so its digest is the `package/sha256/<digest>/` folder the seeder
|
|
5
|
+
* installs it under, and the packed entries are the package's file inventory. Nothing here reads the
|
|
6
|
+
* site folder: a package-shaped path, `bundled-digests.json` and `activations.json` can all be written
|
|
7
|
+
* by anyone who can write there, the product's bundled sources cannot.
|
|
8
|
+
*/
|
|
9
|
+
/** Digest -> (package-relative path -> SHA-256) for every bundled source folder. */
|
|
10
|
+
export type BundledPackageInventory = ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
11
|
+
/** The seeder's deterministic packer: one source folder -> its archive bytes and digest. */
|
|
12
|
+
export type PackBundledSourceDirectory = (required: {
|
|
13
|
+
sourceDir: string;
|
|
14
|
+
}) => Promise<{
|
|
15
|
+
sha256: string;
|
|
16
|
+
bytes: Uint8Array;
|
|
17
|
+
}>;
|
|
18
|
+
/** One entry of the installer's archive reader; only files are hashed. */
|
|
19
|
+
export type BundledSourceArchiveEntry = {
|
|
20
|
+
readonly kind: "file";
|
|
21
|
+
readonly entryPath: string;
|
|
22
|
+
openReadStream(): AsyncIterable<Uint8Array>;
|
|
23
|
+
} | {
|
|
24
|
+
readonly kind: "directory" | "symlink" | "hardlink" | "device" | "fifo";
|
|
25
|
+
readonly entryPath: string;
|
|
26
|
+
};
|
|
27
|
+
/** The installer's own archive reader, so the inventory is read back exactly as the installer reads it. */
|
|
28
|
+
export type CreateBundledSourceArchiveReader = () => {
|
|
29
|
+
entries(required: {
|
|
30
|
+
archive: Uint8Array;
|
|
31
|
+
}): AsyncIterable<BundledSourceArchiveEntry>;
|
|
32
|
+
};
|
|
33
|
+
/** The host's bundled catalog reader; only the plugin ids are used. */
|
|
34
|
+
export type ListBundledAgentPluginServers = (required: {
|
|
35
|
+
bundledSourceRoot: string;
|
|
36
|
+
}) => Promise<readonly {
|
|
37
|
+
pluginId: string;
|
|
38
|
+
}[]>;
|
|
39
|
+
/** Host values for {@link readBundledPackageFiles}: where the sources live and how they pack/read. */
|
|
40
|
+
export interface BundledPackageFilesDeps {
|
|
41
|
+
/** Folder holding one source folder per bundled package. */
|
|
42
|
+
sourceRoot: string;
|
|
43
|
+
packAgentPluginDirectory: PackBundledSourceDirectory;
|
|
44
|
+
createBundledSourceArchiveReader: CreateBundledSourceArchiveReader;
|
|
45
|
+
}
|
|
46
|
+
/** Host values for {@link readBundledImportPluginIds}. */
|
|
47
|
+
export interface BundledImportPluginIdsDeps {
|
|
48
|
+
sourceRoot: string;
|
|
49
|
+
listBundledAgentPluginServers: ListBundledAgentPluginServers;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Digest -> (package-relative path -> SHA-256) for every bundled source folder. A missing source root,
|
|
53
|
+
* or a folder that does not pack, verifies nothing: its installed files then get the ordinary rules.
|
|
54
|
+
* @complexity O(bundled source bytes): one pack and one hash per file.
|
|
55
|
+
*/
|
|
56
|
+
export declare function readBundledPackageFiles(required: BundledPackageFilesDeps, _optional?: Record<string, never>): Promise<BundledPackageInventory>;
|
|
57
|
+
/** Import scan classification comes from this build's catalog, never the archive's `shipped` flag.
|
|
58
|
+
* This grants no execution trust: restore seeds local code and quarantines the imported package.
|
|
59
|
+
* @returns Known bundled ids; an absent/unreadable source root recognises none.
|
|
60
|
+
* @complexity O(bundled plugin manifests and MCP declarations), via the existing catalog reader.
|
|
61
|
+
*/
|
|
62
|
+
export declare function readBundledImportPluginIds(required: BundledImportPluginIdsDeps, _optional?: Record<string, never>): Promise<ReadonlySet<string>>;
|
|
63
|
+
//# sourceMappingURL=package-file-inventory.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { describeErrorForLog } from "@jini-ai/core/model-facing-tool-errors";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { readdir } from "node:fs/promises";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
/**
|
|
6
|
+
* Digest -> (package-relative path -> SHA-256) for every bundled source folder. A missing source root,
|
|
7
|
+
* or a folder that does not pack, verifies nothing: its installed files then get the ordinary rules.
|
|
8
|
+
* @complexity O(bundled source bytes): one pack and one hash per file.
|
|
9
|
+
*/
|
|
10
|
+
export async function readBundledPackageFiles(required, _optional = {}) {
|
|
11
|
+
const { sourceRoot } = required;
|
|
12
|
+
const inventory = new Map();
|
|
13
|
+
const folders = await readdir(sourceRoot, { withFileTypes: true }).catch((error) => {
|
|
14
|
+
// An absent bundled source root is a normal installation without bundled identities.
|
|
15
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT"))
|
|
16
|
+
console.warn("[site-backup] Could not read bundled packages", describeErrorForLog({ err: error }));
|
|
17
|
+
return [];
|
|
18
|
+
});
|
|
19
|
+
for (const folder of folders) {
|
|
20
|
+
if (!folder.isDirectory())
|
|
21
|
+
continue;
|
|
22
|
+
// An invalid bundled folder has no trusted package identity and gets ordinary file rules.
|
|
23
|
+
const packed = await required.packAgentPluginDirectory({ sourceDir: path.join(sourceRoot, folder.name) }).catch((error) => {
|
|
24
|
+
// A folder removed during the scan simply cannot establish trusted package identity.
|
|
25
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT"))
|
|
26
|
+
console.warn("[site-backup] Could not inspect a bundled package", describeErrorForLog({ err: error }));
|
|
27
|
+
return null;
|
|
28
|
+
});
|
|
29
|
+
if (packed)
|
|
30
|
+
inventory.set(packed.sha256, await packedFileHashes({ bytes: packed.bytes, createReader: required.createBundledSourceArchiveReader }));
|
|
31
|
+
}
|
|
32
|
+
return inventory;
|
|
33
|
+
}
|
|
34
|
+
/** Import scan classification comes from this build's catalog, never the archive's `shipped` flag.
|
|
35
|
+
* This grants no execution trust: restore seeds local code and quarantines the imported package.
|
|
36
|
+
* @returns Known bundled ids; an absent/unreadable source root recognises none.
|
|
37
|
+
* @complexity O(bundled plugin manifests and MCP declarations), via the existing catalog reader.
|
|
38
|
+
*/
|
|
39
|
+
export async function readBundledImportPluginIds(required, _optional = {}) {
|
|
40
|
+
const plugins = await required.listBundledAgentPluginServers({ bundledSourceRoot: required.sourceRoot });
|
|
41
|
+
return new Set(plugins.map(plugin => plugin.pluginId));
|
|
42
|
+
}
|
|
43
|
+
/** The packed archive read back with the installer's own reader. O(archive bytes). */
|
|
44
|
+
async function packedFileHashes(required) {
|
|
45
|
+
const files = new Map();
|
|
46
|
+
for await (const entry of required.createReader().entries({ archive: required.bytes })) {
|
|
47
|
+
if (entry.kind !== "file")
|
|
48
|
+
continue;
|
|
49
|
+
const hash = createHash("sha256");
|
|
50
|
+
for await (const chunk of entry.openReadStream())
|
|
51
|
+
hash.update(chunk);
|
|
52
|
+
files.set(entry.entryPath, hash.digest("hex"));
|
|
53
|
+
}
|
|
54
|
+
return files;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=package-file-inventory.js.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { uploadPlannedContent, type UploadPlannedContentInput } from "../upload.node.js";
|
|
2
|
+
import type { SiteBackupPushProgress } from "../push-jobs.js";
|
|
3
|
+
import type { CommitBackupTreeInput, CredentialedRepositoryTarget, SourceControlProvider } from "../../source-control/site/provider-module.js";
|
|
4
|
+
import type { BackupRepositoryState } from "../../source-control/contracts.js";
|
|
5
|
+
import type { CredentialWarning } from "./credential-warnings.js";
|
|
6
|
+
import type { PlannedDiskFile } from "./sources.js";
|
|
7
|
+
export interface BackupUploadPlan {
|
|
8
|
+
readonly files: readonly PlannedDiskFile[];
|
|
9
|
+
readonly database: {
|
|
10
|
+
readonly bytes: Uint8Array;
|
|
11
|
+
} | null;
|
|
12
|
+
readonly totalBytes: number;
|
|
13
|
+
}
|
|
14
|
+
export interface BackupPushResult {
|
|
15
|
+
pushed: true;
|
|
16
|
+
commitSha: string;
|
|
17
|
+
commitUrl: string;
|
|
18
|
+
repository: string;
|
|
19
|
+
branch: string;
|
|
20
|
+
folder: string;
|
|
21
|
+
credentialWarnings: readonly CredentialWarning[];
|
|
22
|
+
filesWritten: number;
|
|
23
|
+
totalBytes: number;
|
|
24
|
+
}
|
|
25
|
+
/** The progress a plan starts from. @complexity O(1). */
|
|
26
|
+
export declare function initialPushProgress({ plan }: {
|
|
27
|
+
plan: BackupUploadPlan;
|
|
28
|
+
}, _optional?: Record<string, never>): SiteBackupPushProgress;
|
|
29
|
+
/** Upload the database and deferred disk files, then the repository-format manifest.
|
|
30
|
+
* @complexity O(total bytes); bounded uploads are owned by the shared engine. */
|
|
31
|
+
export declare function uploadBackupPlan({ plan, uploadBlob, signal, progress, databasePath, readPlannedFile, buildManifest, cancelled }: {
|
|
32
|
+
plan: BackupUploadPlan;
|
|
33
|
+
uploadBlob: UploadPlannedContentInput["uploadBlob"];
|
|
34
|
+
signal: AbortSignal;
|
|
35
|
+
progress: SiteBackupPushProgress;
|
|
36
|
+
databasePath: string;
|
|
37
|
+
readPlannedFile: (required: {
|
|
38
|
+
file: PlannedDiskFile;
|
|
39
|
+
}, optional?: Record<string, never>) => Promise<{
|
|
40
|
+
ok: true;
|
|
41
|
+
bytes: Uint8Array;
|
|
42
|
+
} | {
|
|
43
|
+
ok: false;
|
|
44
|
+
message: string;
|
|
45
|
+
}>;
|
|
46
|
+
buildManifest: UploadPlannedContentInput["buildManifest"];
|
|
47
|
+
cancelled: UploadPlannedContentInput["cancelled"];
|
|
48
|
+
}, optional?: {
|
|
49
|
+
inlineTextMaxBytes?: number;
|
|
50
|
+
concurrency?: number;
|
|
51
|
+
}): ReturnType<typeof uploadPlannedContent>;
|
|
52
|
+
export declare function commitBackupPlan({ provider, target, plan, entries }: {
|
|
53
|
+
provider: Pick<SourceControlProvider, "commitBackupTree">;
|
|
54
|
+
target: CredentialedRepositoryTarget;
|
|
55
|
+
plan: {
|
|
56
|
+
owner: string;
|
|
57
|
+
repo: string;
|
|
58
|
+
folder: string;
|
|
59
|
+
commitMessage: string;
|
|
60
|
+
repository: BackupRepositoryState;
|
|
61
|
+
credentialWarnings?: readonly CredentialWarning[];
|
|
62
|
+
};
|
|
63
|
+
entries: CommitBackupTreeInput["entries"];
|
|
64
|
+
}, _optional?: Record<string, never>): Promise<{
|
|
65
|
+
ok: true;
|
|
66
|
+
result: BackupPushResult;
|
|
67
|
+
} | Exclude<Awaited<ReturnType<SourceControlProvider["commitBackupTree"]>>, {
|
|
68
|
+
ok: true;
|
|
69
|
+
}>>;
|
|
70
|
+
//# sourceMappingURL=push-content.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { uploadPlannedContent } from "../upload.node.js";
|
|
2
|
+
/** The progress a plan starts from. @complexity O(1). */
|
|
3
|
+
export function initialPushProgress({ plan }, _optional = {}) {
|
|
4
|
+
return { filesDone: 0, filesTotal: plan.files.length + (plan.database ? 1 : 0), bytesDone: 0, bytesTotal: plan.totalBytes };
|
|
5
|
+
}
|
|
6
|
+
/** The plan's files in order: the database snapshot first, then each disk file, re-read at upload. */
|
|
7
|
+
function pendingFiles({ plan, databasePath, readPlannedFile }, _optional = {}) {
|
|
8
|
+
const database = plan.database;
|
|
9
|
+
const fromDisk = plan.files.map((file) => ({
|
|
10
|
+
path: file.path,
|
|
11
|
+
load: async (_required = {}, _optional = {}) => {
|
|
12
|
+
const read = await readPlannedFile({ file });
|
|
13
|
+
return read.ok ? { ok: true, bytes: read.bytes } : { ok: false, code: "PLAN_STALE", message: read.message };
|
|
14
|
+
},
|
|
15
|
+
}));
|
|
16
|
+
if (!database)
|
|
17
|
+
return fromDisk;
|
|
18
|
+
return [{ path: databasePath, load: async (_required = {}, _optional = {}) => ({ ok: true, bytes: database.bytes }) }, ...fromDisk];
|
|
19
|
+
}
|
|
20
|
+
/** Upload the database and deferred disk files, then the repository-format manifest.
|
|
21
|
+
* @complexity O(total bytes); bounded uploads are owned by the shared engine. */
|
|
22
|
+
export function uploadBackupPlan({ plan, uploadBlob, signal, progress, databasePath, readPlannedFile, buildManifest, cancelled }, optional = {}) {
|
|
23
|
+
return uploadPlannedContent({
|
|
24
|
+
files: pendingFiles({ plan, databasePath, readPlannedFile }), signal, progress, cancelled, uploadBlob,
|
|
25
|
+
buildManifest,
|
|
26
|
+
}, optional);
|
|
27
|
+
}
|
|
28
|
+
export async function commitBackupPlan({ provider, target, plan, entries }, _optional = {}) {
|
|
29
|
+
const committed = await provider.commitBackupTree({
|
|
30
|
+
...target,
|
|
31
|
+
branch: plan.repository.branch,
|
|
32
|
+
folder: plan.folder,
|
|
33
|
+
commitMessage: plan.commitMessage,
|
|
34
|
+
parentCommitSha: plan.repository.parentCommitSha,
|
|
35
|
+
baseTreeSha: plan.repository.baseTreeSha,
|
|
36
|
+
htmlUrl: plan.repository.htmlUrl,
|
|
37
|
+
entries: entries,
|
|
38
|
+
});
|
|
39
|
+
if (!committed.ok)
|
|
40
|
+
return committed;
|
|
41
|
+
return {
|
|
42
|
+
ok: true,
|
|
43
|
+
result: {
|
|
44
|
+
pushed: true,
|
|
45
|
+
commitSha: committed.commitSha,
|
|
46
|
+
commitUrl: committed.commitUrl,
|
|
47
|
+
repository: `${plan.owner}/${plan.repo}`,
|
|
48
|
+
branch: plan.repository.branch,
|
|
49
|
+
folder: plan.folder,
|
|
50
|
+
credentialWarnings: plan.credentialWarnings ?? [],
|
|
51
|
+
filesWritten: entries.length,
|
|
52
|
+
totalBytes: entries.reduce((sum, entry) => sum + entry.bytes, 0),
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=push-content.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The host's button slot. `onPress` uses the two-object action shape every admin kit button
|
|
4
|
+
* already takes, so a host passes its kit `Button` unchanged; a zero-argument handler type would
|
|
5
|
+
* reject a kit whose `defaultProps.onPress` declares those arguments. The props are optional and
|
|
6
|
+
* readonly for the same reason: kit buttons declare them that way.
|
|
7
|
+
*/
|
|
8
|
+
export type ShowMoreImportsButton = ComponentType<{
|
|
9
|
+
readonly children?: ReactNode;
|
|
10
|
+
readonly onPress?: (required: Record<string, never>, optional?: Record<string, never>) => void;
|
|
11
|
+
readonly disabled?: boolean;
|
|
12
|
+
readonly pending?: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function ShowMoreImports({ nextCursor, loading, onLoadMore, Button, label }: {
|
|
15
|
+
nextCursor?: string;
|
|
16
|
+
loading: boolean;
|
|
17
|
+
onLoadMore: (required: Record<string, never>, optional?: Record<string, never>) => void | Promise<void>;
|
|
18
|
+
Button: ShowMoreImportsButton;
|
|
19
|
+
label: string;
|
|
20
|
+
}, _optional?: Record<string, never>): import("react").JSX.Element | null;
|
|
21
|
+
//# sourceMappingURL=ShowMoreImports.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function ShowMoreImports({ nextCursor, loading, onLoadMore, Button, label }, _optional = {}) {
|
|
3
|
+
if (!nextCursor)
|
|
4
|
+
return null;
|
|
5
|
+
// The injected slot keeps domain UI outside Admin.
|
|
6
|
+
return _jsx(Button, { onPress: () => { void onLoadMore({}, {}); }, disabled: loading, pending: loading, children: label });
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=ShowMoreImports.js.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { SealedSecret } from "@jini-ai/core/contracts/vault";
|
|
2
|
+
/** Job 2 owns encryption, vault capture, recipient re-sealing and password AAD.
|
|
3
|
+
* The archive orchestrator supplies the SAME snapshot used for content projection.
|
|
4
|
+
* Passwords never enter a plan, archive, job result or registry in plaintext.
|
|
5
|
+
*/
|
|
6
|
+
export interface SiteSavedKeysPort {
|
|
7
|
+
capture(required: {
|
|
8
|
+
snapshot: Buffer;
|
|
9
|
+
shareId: string;
|
|
10
|
+
workspaceId: string;
|
|
11
|
+
}, optional?: {
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
}): Promise<{
|
|
14
|
+
encryptedKeys: Buffer;
|
|
15
|
+
sealedPassword: SealedSecret;
|
|
16
|
+
notices: readonly string[];
|
|
17
|
+
}>;
|
|
18
|
+
reveal(required: {
|
|
19
|
+
sealedPassword: SealedSecret;
|
|
20
|
+
shareId: string;
|
|
21
|
+
workspaceId: string;
|
|
22
|
+
}, optional?: Record<string, never>): Promise<{
|
|
23
|
+
password: string;
|
|
24
|
+
}>;
|
|
25
|
+
/** siteId is the lifecycle's allocated identity. Restore runs BEFORE its final metadata commit;
|
|
26
|
+
* recipient key setup must use this id without minting a replacement site identity/commit marker.
|
|
27
|
+
* Missing/wrong passwords and invalid optional payloads return safe notices, with no partial keys.
|
|
28
|
+
*/
|
|
29
|
+
restore(required: {
|
|
30
|
+
encryptedKeys: Buffer;
|
|
31
|
+
password?: string;
|
|
32
|
+
siteId: string;
|
|
33
|
+
dir: string;
|
|
34
|
+
dbPath: string;
|
|
35
|
+
}, optional?: {
|
|
36
|
+
signal?: AbortSignal;
|
|
37
|
+
}): Promise<{
|
|
38
|
+
notices: readonly string[];
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
41
|
+
export declare const SAVED_KEYS_PATH = "secrets/saved-keys.json";
|
|
42
|
+
export declare const ENCRYPTED_KEYS_DESCRIPTOR: {
|
|
43
|
+
readonly version: 1;
|
|
44
|
+
readonly path: "secrets/saved-keys.json";
|
|
45
|
+
readonly format: "jini-passphrase-envelope";
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=saved-keys-port.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type SecretSealerPort } from "@jini-ai/core/contracts/vault";
|
|
2
|
+
import type { SiteSavedKeysPort } from "./saved-keys-port.js";
|
|
3
|
+
export interface SiteSavedKeysDeps {
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
sealer: SecretSealerPort;
|
|
6
|
+
/** Host-owned AAD domain. It is persisted inside every sealed share password, so the host must keep
|
|
7
|
+
* passing the exact string its existing exports were sealed with. */
|
|
8
|
+
passwordAadDomain: string;
|
|
9
|
+
}
|
|
10
|
+
/** An imported site never inherits authority from a portable key payload or reference. No sealer
|
|
11
|
+
* involved, so a host with no site of its own (a local-import CLI) reports the same notice.
|
|
12
|
+
* @complexity O(1), no I/O.
|
|
13
|
+
*/
|
|
14
|
+
export declare const leaveSavedKeysOut: SiteSavedKeysPort["restore"];
|
|
15
|
+
/** The retired transport validated the complete bounded payload before opening a recipient,
|
|
16
|
+
* used host-owned definitions instead of archive-supplied schemas, and committed settings/keys
|
|
17
|
+
* together. Even that cannot authorize a new site: both capture and automatic restore are closed.
|
|
18
|
+
*/
|
|
19
|
+
/** CMS compatibility boundary for historical exports, which used 24 random password bytes and
|
|
20
|
+
* a site-sealed password. New exports cannot capture credentials; imports require fresh grants.
|
|
21
|
+
* @returns Refusal/notice for retired operations and owner-only reveal for historical exports.
|
|
22
|
+
* @complexity O(1), except opening one historical sealed password.
|
|
23
|
+
*/
|
|
24
|
+
export declare function createSiteSavedKeys(deps: SiteSavedKeysDeps, _options?: Record<string, never>): SiteSavedKeysPort;
|
|
25
|
+
//# sourceMappingURL=saved-keys.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {} from "@jini-ai/core/contracts/vault";
|
|
2
|
+
import { SiteShareRefusal } from "./share-refusal.js";
|
|
3
|
+
/** Authenticate both registry identity dimensions so rows cannot be swapped between exports. */
|
|
4
|
+
function passwordAad({ shareId, workspaceId, domain }) {
|
|
5
|
+
// Tuple encoding cannot alias IDs containing separators, and the domain prevents vault reuse.
|
|
6
|
+
return JSON.stringify([domain, 1, workspaceId, shareId]);
|
|
7
|
+
}
|
|
8
|
+
/** An imported site never inherits authority from a portable key payload or reference. No sealer
|
|
9
|
+
* involved, so a host with no site of its own (a local-import CLI) reports the same notice.
|
|
10
|
+
* @complexity O(1), no I/O.
|
|
11
|
+
*/
|
|
12
|
+
export const leaveSavedKeysOut = async (_input, options = {}) => {
|
|
13
|
+
options.signal?.throwIfAborted();
|
|
14
|
+
return { notices: ["Saved keys were left out. Use a saved key to approve fresh access on the imported site."] };
|
|
15
|
+
};
|
|
16
|
+
/** The retired transport validated the complete bounded payload before opening a recipient,
|
|
17
|
+
* used host-owned definitions instead of archive-supplied schemas, and committed settings/keys
|
|
18
|
+
* together. Even that cannot authorize a new site: both capture and automatic restore are closed.
|
|
19
|
+
*/
|
|
20
|
+
/** CMS compatibility boundary for historical exports, which used 24 random password bytes and
|
|
21
|
+
* a site-sealed password. New exports cannot capture credentials; imports require fresh grants.
|
|
22
|
+
* @returns Refusal/notice for retired operations and owner-only reveal for historical exports.
|
|
23
|
+
* @complexity O(1), except opening one historical sealed password.
|
|
24
|
+
*/
|
|
25
|
+
export function createSiteSavedKeys(deps, _options = {}) {
|
|
26
|
+
return {
|
|
27
|
+
async capture() {
|
|
28
|
+
throw new SiteShareRefusal({ code: "INVALID_INPUT", message: "Exports no longer include saved keys. Grant saved keys separately on the imported site. Details: P25_SAVED_KEYS_EXPORT_REMOVED; secret values omitted." });
|
|
29
|
+
},
|
|
30
|
+
async reveal(input) {
|
|
31
|
+
if (input.workspaceId !== deps.workspaceId)
|
|
32
|
+
throw new Error("Saved keys workspace mismatch");
|
|
33
|
+
return { password: await deps.sealer.open({ sealed: input.sealedPassword }, { aad: passwordAad({ shareId: input.shareId, workspaceId: input.workspaceId, domain: deps.passwordAadDomain }) }) };
|
|
34
|
+
},
|
|
35
|
+
restore: leaveSavedKeysOut,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=saved-keys.js.map
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import type { SealedSecret } from "@jini-ai/core/contracts/vault";
|
|
2
|
+
import type { CredentialWarning } from "./credential-warnings.js";
|
|
3
|
+
import { type SiteBackupPushProgress } from "../push-jobs.js";
|
|
4
|
+
import type { StaticSitePorts, StaticSiteCopy } from "./static-copy.js";
|
|
5
|
+
import { type ShareExpiryHost } from "./share-expiry.js";
|
|
6
|
+
import type { StaticExportOptions } from "./static-export-selection.js";
|
|
7
|
+
import { type SiteSavedKeysPort } from "./saved-keys-port.js";
|
|
8
|
+
/** One share row as the host's private registry stores it. */
|
|
9
|
+
export interface SiteShareRecord {
|
|
10
|
+
readonly shareId: string;
|
|
11
|
+
readonly token: string;
|
|
12
|
+
readonly site: string;
|
|
13
|
+
readonly file: string;
|
|
14
|
+
readonly bytes: number;
|
|
15
|
+
readonly sha256: string;
|
|
16
|
+
readonly url: string | null;
|
|
17
|
+
readonly status: "active" | "revoked" | "failed" | "expired";
|
|
18
|
+
readonly createdAt: string;
|
|
19
|
+
readonly revokedAt: string | null;
|
|
20
|
+
readonly hasEncryptedKeys?: boolean;
|
|
21
|
+
readonly sealedPassword?: SealedSecret;
|
|
22
|
+
readonly notices?: readonly string[];
|
|
23
|
+
readonly credentialWarnings?: readonly CredentialWarning[];
|
|
24
|
+
readonly needsAcknowledgement?: boolean;
|
|
25
|
+
readonly notes?: readonly string[];
|
|
26
|
+
readonly storage?: {
|
|
27
|
+
readonly provider: string;
|
|
28
|
+
readonly key: string;
|
|
29
|
+
readonly url?: string;
|
|
30
|
+
readonly binding?: string;
|
|
31
|
+
};
|
|
32
|
+
readonly expiresAt?: string | null;
|
|
33
|
+
}
|
|
34
|
+
/** The registry reads the backend performs itself; writes happen inside the host's share service. */
|
|
35
|
+
export interface SiteShareRegistryLike {
|
|
36
|
+
get(required: {
|
|
37
|
+
site: string;
|
|
38
|
+
shareId: string;
|
|
39
|
+
}): Promise<SiteShareRecord | null>;
|
|
40
|
+
list(required: {
|
|
41
|
+
site: string;
|
|
42
|
+
}): Promise<readonly SiteShareRecord[]>;
|
|
43
|
+
}
|
|
44
|
+
/** The prepared backup fields the backend reads; the host's plan type carries more and is passed through. */
|
|
45
|
+
export interface SiteShareContent {
|
|
46
|
+
readonly files: readonly unknown[];
|
|
47
|
+
readonly bufferedFiles?: readonly {
|
|
48
|
+
readonly path: string;
|
|
49
|
+
}[];
|
|
50
|
+
readonly encryptedKeys?: unknown;
|
|
51
|
+
readonly sealedPassword?: unknown;
|
|
52
|
+
readonly notices?: readonly string[];
|
|
53
|
+
readonly credentialWarnings?: readonly CredentialWarning[];
|
|
54
|
+
readonly scopeNotes: Readonly<Record<string, string>>;
|
|
55
|
+
readonly totalBytes: number;
|
|
56
|
+
readonly site: {
|
|
57
|
+
readonly folderName: string;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
type CapturedCopy = Exclude<StaticSiteCopy, {
|
|
61
|
+
reason: string;
|
|
62
|
+
}>;
|
|
63
|
+
type ZipProgressOptions = {
|
|
64
|
+
signal?: AbortSignal;
|
|
65
|
+
progress?: SiteBackupPushProgress;
|
|
66
|
+
notices?: string[];
|
|
67
|
+
credentialWarnings?: CredentialWarning[];
|
|
68
|
+
};
|
|
69
|
+
type ShareOptions = {
|
|
70
|
+
delivery?: unknown;
|
|
71
|
+
expiresAt?: string | null;
|
|
72
|
+
signal?: AbortSignal;
|
|
73
|
+
filename?: string;
|
|
74
|
+
identity?: {
|
|
75
|
+
shareId: string;
|
|
76
|
+
token: string;
|
|
77
|
+
};
|
|
78
|
+
sealedPassword?: unknown;
|
|
79
|
+
notices?: readonly string[];
|
|
80
|
+
notes?: readonly string[];
|
|
81
|
+
credentialWarnings?: readonly CredentialWarning[];
|
|
82
|
+
};
|
|
83
|
+
/** Host collaborators, policy and copy. Every member is REQUIRED: the engine carries no host defaults.
|
|
84
|
+
* Archive, delivery and zip values are opaque here; they only travel between host collaborators.
|
|
85
|
+
*/
|
|
86
|
+
export interface SiteShareHost {
|
|
87
|
+
/** Redacts secret shapes from exporter-facing text (scope notes). */
|
|
88
|
+
redact(required: {
|
|
89
|
+
text: string;
|
|
90
|
+
}): {
|
|
91
|
+
text: string;
|
|
92
|
+
};
|
|
93
|
+
/** Host failures that already carry a closed status contract and must pass through unwrapped. */
|
|
94
|
+
isClosedFailure(required: {
|
|
95
|
+
cause: unknown;
|
|
96
|
+
}): boolean;
|
|
97
|
+
/** The theme id meaning "theme off". */
|
|
98
|
+
readonly noThemeId: string;
|
|
99
|
+
/** Message for a ZIP-only share (no delivery target configured). */
|
|
100
|
+
readonly zipOnlyMessage: string;
|
|
101
|
+
downloadUrl(required: {
|
|
102
|
+
site: string;
|
|
103
|
+
shareId: string;
|
|
104
|
+
}): string;
|
|
105
|
+
appVersionOf(required: {
|
|
106
|
+
content: SiteShareContent;
|
|
107
|
+
}): string | undefined;
|
|
108
|
+
checkShareLimits(required: {
|
|
109
|
+
files: readonly {
|
|
110
|
+
path: string;
|
|
111
|
+
bytes: number;
|
|
112
|
+
}[];
|
|
113
|
+
}): void;
|
|
114
|
+
newShareIdentity(required: Record<string, never>): {
|
|
115
|
+
shareId: string;
|
|
116
|
+
token: string;
|
|
117
|
+
};
|
|
118
|
+
allocateStaticExportThemes(required: {
|
|
119
|
+
themeIds: readonly string[];
|
|
120
|
+
siteSlug: string;
|
|
121
|
+
}): readonly unknown[];
|
|
122
|
+
parseStaticExportInput(required: {
|
|
123
|
+
input: unknown;
|
|
124
|
+
}): {
|
|
125
|
+
themeIds?: readonly string[];
|
|
126
|
+
publicUrl?: string;
|
|
127
|
+
};
|
|
128
|
+
captureStaticSite(ports: StaticSitePorts, optional: {
|
|
129
|
+
themeId?: string | undefined;
|
|
130
|
+
publicUrl?: string | undefined;
|
|
131
|
+
}): Promise<StaticSiteCopy>;
|
|
132
|
+
buildShareZip(required: {
|
|
133
|
+
plan: SiteShareContent;
|
|
134
|
+
zip: unknown;
|
|
135
|
+
}, optional: ZipProgressOptions): Promise<Buffer>;
|
|
136
|
+
buildStaticSiteZip(required: {
|
|
137
|
+
copy: CapturedCopy;
|
|
138
|
+
copies: readonly CapturedCopy[];
|
|
139
|
+
activeThemeId: string;
|
|
140
|
+
themes: readonly unknown[];
|
|
141
|
+
zip: unknown;
|
|
142
|
+
}, optional: ZipProgressOptions): Promise<Buffer>;
|
|
143
|
+
createSiteShare(required: {
|
|
144
|
+
registry: SiteShareRegistryLike;
|
|
145
|
+
site: string;
|
|
146
|
+
name: string;
|
|
147
|
+
archive: Buffer;
|
|
148
|
+
}, optional: ShareOptions): Promise<SiteShareRecord>;
|
|
149
|
+
acknowledgeSiteShare(required: {
|
|
150
|
+
registry: SiteShareRegistryLike;
|
|
151
|
+
site: string;
|
|
152
|
+
shareId: string;
|
|
153
|
+
}, optional: {
|
|
154
|
+
delivery?: unknown;
|
|
155
|
+
}): Promise<SiteShareRecord>;
|
|
156
|
+
revokeSiteShare(required: {
|
|
157
|
+
registry: SiteShareRegistryLike;
|
|
158
|
+
site: string;
|
|
159
|
+
shareId: string;
|
|
160
|
+
}, optional: {
|
|
161
|
+
delivery?: unknown;
|
|
162
|
+
}): Promise<SiteShareRecord>;
|
|
163
|
+
isOwnShareFolder(required: {
|
|
164
|
+
storage: {
|
|
165
|
+
provider: string;
|
|
166
|
+
binding?: string;
|
|
167
|
+
};
|
|
168
|
+
}): boolean;
|
|
169
|
+
/** The delivery provider id meaning "this server's own share folder". */
|
|
170
|
+
readonly ownFolderProvider: string;
|
|
171
|
+
/** Expiry choices, refusal copy and the expired-link message (owner policy and wording stay host-side). */
|
|
172
|
+
readonly expiry: ShareExpiryHost;
|
|
173
|
+
}
|
|
174
|
+
export interface SiteShareBackend {
|
|
175
|
+
readonly registry: SiteShareRegistryLike;
|
|
176
|
+
/** Current export/upload lifecycle, independent of polling and retained finished job records. */
|
|
177
|
+
hasWork?(required: Record<string, never>, optional?: Record<string, never>): boolean;
|
|
178
|
+
staticOptions(required: Record<string, never>, optional?: Record<string, never>): Promise<StaticExportOptions>;
|
|
179
|
+
create(required: {
|
|
180
|
+
principalId: string;
|
|
181
|
+
jobId?: string;
|
|
182
|
+
signal: AbortSignal;
|
|
183
|
+
includeSavedKeys?: boolean;
|
|
184
|
+
expiresInDays?: number | null;
|
|
185
|
+
format?: "static";
|
|
186
|
+
themeIds?: readonly string[];
|
|
187
|
+
publicUrl?: string;
|
|
188
|
+
}, optional?: {
|
|
189
|
+
waitMs?: number;
|
|
190
|
+
}): Promise<unknown>;
|
|
191
|
+
acknowledge(required: {
|
|
192
|
+
shareId: string;
|
|
193
|
+
}, optional?: Record<string, never>): Promise<SiteShareView>;
|
|
194
|
+
revealPassword(required: {
|
|
195
|
+
principalId: string;
|
|
196
|
+
shareId: string;
|
|
197
|
+
}, optional?: Record<string, never>): Promise<{
|
|
198
|
+
password: string;
|
|
199
|
+
}>;
|
|
200
|
+
list(required: Record<string, never>, optional?: Record<string, never>): Promise<readonly SiteShareView[]>;
|
|
201
|
+
revoke(required: {
|
|
202
|
+
shareId: string;
|
|
203
|
+
}, optional?: Record<string, never>): Promise<SiteShareView>;
|
|
204
|
+
/** Day choices a new export may ask for besides Never; empty unless new exports land in the own share folder. */
|
|
205
|
+
expiryChoices(required: Record<string, never>, optional?: Record<string, never>): Promise<readonly number[]>;
|
|
206
|
+
}
|
|
207
|
+
export type SiteShareView = Omit<SiteShareRecord, "token" | "storage" | "sealedPassword"> & {
|
|
208
|
+
downloadUrl: string;
|
|
209
|
+
credentialWarnings: readonly CredentialWarning[];
|
|
210
|
+
needsAcknowledgement: boolean;
|
|
211
|
+
};
|
|
212
|
+
/** What the factory needs: the site's ports plus the REQUIRED host collaborators/policy/copy. */
|
|
213
|
+
export type SiteShareBackendRequired = {
|
|
214
|
+
registry: SiteShareRegistryLike;
|
|
215
|
+
site: string;
|
|
216
|
+
prepare: (required: {
|
|
217
|
+
signal: AbortSignal;
|
|
218
|
+
includeSavedKeys?: boolean;
|
|
219
|
+
shareId: string;
|
|
220
|
+
workspaceId: string;
|
|
221
|
+
}) => Promise<SiteShareContent>;
|
|
222
|
+
zip: unknown;
|
|
223
|
+
delivery: (required: {
|
|
224
|
+
provider?: string | undefined;
|
|
225
|
+
binding?: string | undefined;
|
|
226
|
+
}) => Promise<unknown>;
|
|
227
|
+
ownerPrincipalId?: PromiseLike<string> | string;
|
|
228
|
+
savedKeys?: Pick<SiteSavedKeysPort, "reveal">;
|
|
229
|
+
staticSite?: StaticSitePorts;
|
|
230
|
+
host: SiteShareHost;
|
|
231
|
+
};
|
|
232
|
+
export type SiteShareBackendOptional = {
|
|
233
|
+
now?: () => number;
|
|
234
|
+
appVersion?: string;
|
|
235
|
+
jiniVersion?: string;
|
|
236
|
+
};
|
|
237
|
+
/** Reuses backup jobs and the common backup plan content. Only one bounded, buffered preparation runs per site at a time.
|
|
238
|
+
* Optional host clock/build versions stamp failures when they occur, before a later poll collects them.
|
|
239
|
+
* @complexity The existing bounded export work; diagnostics add only job-local metadata, with no I/O.
|
|
240
|
+
*/
|
|
241
|
+
export declare function createSiteShareBackend(required: SiteShareBackendRequired, { now, appVersion: boundaryVersion, jiniVersion }?: SiteShareBackendOptional): SiteShareBackend;
|
|
242
|
+
export {};
|
|
243
|
+
//# sourceMappingURL=share-backend.d.ts.map
|