@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,157 @@
|
|
|
1
|
+
import { parseDeployTargetsFile as parseDeployTargetsDescriptors } from "@jini-ai/devops/deploy";
|
|
2
|
+
import type { FormDestinationForm, FormSubmissionsInspection } from '@jini-ai/core/contracts/site/cms-forms';
|
|
3
|
+
import type { InstalledDeployTarget, InstalledDeployTargetInventory, DeployTargetDescriptor, DeployTargetRegistry, LoadedDeployTarget } from "@jini-ai/devops/deploy/site/deploy-targets/types";
|
|
4
|
+
/**
|
|
5
|
+
* @file Loads deploy targets that Agent Plugins contribute — the generic seam that lets each hosting
|
|
6
|
+
* plugin (and only plugins the host itself ships) add a hosting vendor without core naming one.
|
|
7
|
+
*
|
|
8
|
+
* A plugin opts in by shipping {@link DEPLOY_TARGETS_FILENAME} at its root: a data-only list of
|
|
9
|
+
* `{ id, label, module }`. Each `module` is a plain-JS `.mjs` file inside the plugin whose default
|
|
10
|
+
* export is a `DeployTargetModule` (`types.ts`).
|
|
11
|
+
*
|
|
12
|
+
* TRUST RULE (fail closed). Importing a module runs its code in this process, so a module is loaded
|
|
13
|
+
* only when all of these hold (enforced by the shared gate, `features/agent-plugins/trusted-plugin-files.ts`):
|
|
14
|
+
* 1. the plugin is ACTIVE by the fail-closed reader (`resolveAgentPluginActivation`) — an unreadable
|
|
15
|
+
* activation record refuses rather than reading as consent;
|
|
16
|
+
* 2. its installed digest is the one `bundled-digests.json` records for it — the build's own seed,
|
|
17
|
+
* so an operator-installed package (or a tampered copy under a bundled id) never runs here
|
|
18
|
+
* (owner decision 2026-09-29: third-party hosts come later);
|
|
19
|
+
* 3. the module path resolves inside the plugin root on disk (`assertContainedOnDisk`) and ends in
|
|
20
|
+
* `.mjs`, so no `package.json` above the install directory can make Node read it as CommonJS.
|
|
21
|
+
*
|
|
22
|
+
* Failure isolation: a bad plugin drops only its own targets, a bad module only itself, and a target
|
|
23
|
+
* id two plugins both declare is dropped for both ("refusing to guess", as in
|
|
24
|
+
* `resolve-agent-plugin-refs.ts`). Every drop is reported in `refusals`, never thrown.
|
|
25
|
+
*
|
|
26
|
+
* Architectural role: `features/deployments` capability, read by the static-publish adapter. Depends
|
|
27
|
+
* on `features/agent-plugins` for installed-package discovery and trust; nothing depends back.
|
|
28
|
+
*/
|
|
29
|
+
/** The file a plugin ships at its root to contribute deploy targets. */
|
|
30
|
+
export declare const DEPLOY_TARGETS_FILENAME = "jini-deploy-targets.json";
|
|
31
|
+
/** Every trust gate is the installed CALLER's job, or the hermetic source registry's trust basis. */
|
|
32
|
+
declare const targetContribution: {
|
|
33
|
+
filename: string;
|
|
34
|
+
contribution: string;
|
|
35
|
+
parse: ({ raw }: {
|
|
36
|
+
raw: string;
|
|
37
|
+
}) => {
|
|
38
|
+
readonly ok: true;
|
|
39
|
+
readonly descriptors: readonly DeployTargetDescriptor[];
|
|
40
|
+
} | {
|
|
41
|
+
readonly ok: false;
|
|
42
|
+
readonly reason: string;
|
|
43
|
+
};
|
|
44
|
+
modulePath: ({ descriptor }: {
|
|
45
|
+
descriptor: DeployTargetDescriptor;
|
|
46
|
+
}) => string;
|
|
47
|
+
validate: ({ exported }: {
|
|
48
|
+
exported: unknown;
|
|
49
|
+
}) => string | import("@jini-ai/devops/deploy").PluginDeployTargetModule<FormDestinationForm, FormSubmissionsInspection>;
|
|
50
|
+
refusal: ({ plugin, descriptor, reason }: {
|
|
51
|
+
plugin: TargetPackage;
|
|
52
|
+
descriptor: DeployTargetDescriptor;
|
|
53
|
+
reason: string;
|
|
54
|
+
}) => string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Builds this workspace's deploy-target registry from its installed Agent Plugins.
|
|
58
|
+
*
|
|
59
|
+
* Read fresh on every call (publishing is rare and human-triggered); a module import itself is cached
|
|
60
|
+
* by Node per file URL, and installed digest directories never change.
|
|
61
|
+
*
|
|
62
|
+
* @throws Nothing for a plugin-level fault (see this file's header); only a filesystem fault listing
|
|
63
|
+
* the workspace's package directory itself propagates.
|
|
64
|
+
* @param required - Contribution loader from this boot's lifecycle; no site-dependent module default.
|
|
65
|
+
* @complexity O(p) installed plugins, each one small file read plus one import per declared target.
|
|
66
|
+
*/
|
|
67
|
+
export declare function loadDeployTargetRegistry(required: {
|
|
68
|
+
workspaceId: string;
|
|
69
|
+
loadContributions(input: {
|
|
70
|
+
workspaceId: string;
|
|
71
|
+
definition: typeof targetContribution;
|
|
72
|
+
}, options: {
|
|
73
|
+
orderByPluginId: boolean;
|
|
74
|
+
}): Promise<{
|
|
75
|
+
items: readonly LoadedDeployTarget[];
|
|
76
|
+
refusals: readonly string[];
|
|
77
|
+
}>;
|
|
78
|
+
}, _optional?: {}): Promise<DeployTargetRegistry>;
|
|
79
|
+
/** Discover installed host descriptors through the existing data loader, including disabled hosts.
|
|
80
|
+
* No module is imported. Digest, containment, parser and ambiguous-id refusals retain their owners.
|
|
81
|
+
* @returns Installed metadata and every refusal; activation read failures are represented as unknown.
|
|
82
|
+
* @complexity O(p + t) installed packages and targets, with one activation read per target.
|
|
83
|
+
*/
|
|
84
|
+
export declare function loadInstalledDeployTargets(required: {
|
|
85
|
+
readonly workspaceId: string;
|
|
86
|
+
readonly loadContributions: (input: {
|
|
87
|
+
workspaceId: string;
|
|
88
|
+
definition: {
|
|
89
|
+
filename: string;
|
|
90
|
+
contribution: string;
|
|
91
|
+
kind: 'data';
|
|
92
|
+
parse: typeof parseDeployTargetsDescriptors;
|
|
93
|
+
load(input: {
|
|
94
|
+
plugin: TargetPackage;
|
|
95
|
+
descriptor: DeployTargetDescriptor;
|
|
96
|
+
}): Promise<InstalledDeployTarget>;
|
|
97
|
+
};
|
|
98
|
+
}, options: {
|
|
99
|
+
requireActive: boolean;
|
|
100
|
+
orderByPluginId: boolean;
|
|
101
|
+
}) => Promise<{
|
|
102
|
+
items: readonly InstalledDeployTarget[];
|
|
103
|
+
refusals: readonly string[];
|
|
104
|
+
}>;
|
|
105
|
+
readonly readEnabled: (input: {
|
|
106
|
+
workspaceId: string;
|
|
107
|
+
pluginId: string;
|
|
108
|
+
}) => Promise<boolean | null>;
|
|
109
|
+
}, _optional?: Record<string, never>): Promise<InstalledDeployTargetInventory>;
|
|
110
|
+
/** The two facts the source loader needs about a package: whose it is and where it lives. */
|
|
111
|
+
type TargetPackage = {
|
|
112
|
+
readonly pluginId: string;
|
|
113
|
+
readonly packageRoot: string;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* A registry read straight from a plugin's SOURCE directory, with no install, activation or digest
|
|
117
|
+
* gate. For the hermetic composition root (`server/runtime/composition/app.ts`) and tests only,
|
|
118
|
+
* where the directory is this product's own `content/agent-plugins/<id>/`: never point it at
|
|
119
|
+
* anything an operator or a third party can write.
|
|
120
|
+
*
|
|
121
|
+
* @complexity O(t) targets, one import each.
|
|
122
|
+
*/
|
|
123
|
+
export declare function loadDeployTargetRegistryFromSource(required: {
|
|
124
|
+
plugin: TargetPackage;
|
|
125
|
+
loadPluginContributionsFromSource(input: {
|
|
126
|
+
plugin: TargetPackage;
|
|
127
|
+
definition: typeof targetContribution;
|
|
128
|
+
}): Promise<{
|
|
129
|
+
items: readonly LoadedDeployTarget[];
|
|
130
|
+
refusals: readonly string[];
|
|
131
|
+
}>;
|
|
132
|
+
}, _optional?: Record<string, never>): Promise<DeployTargetRegistry>;
|
|
133
|
+
/**
|
|
134
|
+
* The hermetic registry for EVERY bundled plugin at once: each directory under `sourceRoot` (the
|
|
135
|
+
* product's bundled root, `bundledAgentPluginsDir()`: `content/agent-plugins/` or the composed root
|
|
136
|
+
* the host's bundled-source override names. Callers once passed the raw `content/agent-plugins` so a
|
|
137
|
+
* fixture-pointed env still saw the real hosts; since the hosts moved to `@jini-ai/agent-plugins`
|
|
138
|
+
* they exist only in the composed root, so the raw path loses them in dev) that holds both
|
|
139
|
+
* `plugin.json` and {@link DEPLOY_TARGETS_FILENAME}, minus retired ids, in plugin-id order (the
|
|
140
|
+
* installed loader's `orderByPluginId`). A directory without the file is skipped, as the installed
|
|
141
|
+
* path skips a package that does not ship it; a target id two directories both declare is dropped
|
|
142
|
+
* for both by {@link buildRegistry}. Same trust basis and same caveat as
|
|
143
|
+
* {@link loadDeployTargetRegistryFromSource}: never point it at anything an operator can write.
|
|
144
|
+
*
|
|
145
|
+
* @throws Only a filesystem fault listing `sourceRoot` itself.
|
|
146
|
+
* @complexity O(p + t): one listing, two existence checks per plugin dir, one import per target.
|
|
147
|
+
*/
|
|
148
|
+
export declare function loadBundledDeployTargetRegistry(required: {
|
|
149
|
+
readonly sourceRoot: string;
|
|
150
|
+
bundledContributionSources(input: {
|
|
151
|
+
sourceRoot: string;
|
|
152
|
+
filename: string;
|
|
153
|
+
}): readonly TargetPackage[];
|
|
154
|
+
loadPluginContributionsFromSource: Parameters<typeof loadDeployTargetRegistryFromSource>[0]['loadPluginContributionsFromSource'];
|
|
155
|
+
}, _optional?: Record<string, never>): Promise<DeployTargetRegistry>;
|
|
156
|
+
export {};
|
|
157
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { asDeployTargetModule, parseDeployTargetsFile as parseDeployTargetsDescriptors } from "@jini-ai/devops/deploy";
|
|
2
|
+
/**
|
|
3
|
+
* @file Loads deploy targets that Agent Plugins contribute — the generic seam that lets each hosting
|
|
4
|
+
* plugin (and only plugins the host itself ships) add a hosting vendor without core naming one.
|
|
5
|
+
*
|
|
6
|
+
* A plugin opts in by shipping {@link DEPLOY_TARGETS_FILENAME} at its root: a data-only list of
|
|
7
|
+
* `{ id, label, module }`. Each `module` is a plain-JS `.mjs` file inside the plugin whose default
|
|
8
|
+
* export is a `DeployTargetModule` (`types.ts`).
|
|
9
|
+
*
|
|
10
|
+
* TRUST RULE (fail closed). Importing a module runs its code in this process, so a module is loaded
|
|
11
|
+
* only when all of these hold (enforced by the shared gate, `features/agent-plugins/trusted-plugin-files.ts`):
|
|
12
|
+
* 1. the plugin is ACTIVE by the fail-closed reader (`resolveAgentPluginActivation`) — an unreadable
|
|
13
|
+
* activation record refuses rather than reading as consent;
|
|
14
|
+
* 2. its installed digest is the one `bundled-digests.json` records for it — the build's own seed,
|
|
15
|
+
* so an operator-installed package (or a tampered copy under a bundled id) never runs here
|
|
16
|
+
* (owner decision 2026-09-29: third-party hosts come later);
|
|
17
|
+
* 3. the module path resolves inside the plugin root on disk (`assertContainedOnDisk`) and ends in
|
|
18
|
+
* `.mjs`, so no `package.json` above the install directory can make Node read it as CommonJS.
|
|
19
|
+
*
|
|
20
|
+
* Failure isolation: a bad plugin drops only its own targets, a bad module only itself, and a target
|
|
21
|
+
* id two plugins both declare is dropped for both ("refusing to guess", as in
|
|
22
|
+
* `resolve-agent-plugin-refs.ts`). Every drop is reported in `refusals`, never thrown.
|
|
23
|
+
*
|
|
24
|
+
* Architectural role: `features/deployments` capability, read by the static-publish adapter. Depends
|
|
25
|
+
* on `features/agent-plugins` for installed-package discovery and trust; nothing depends back.
|
|
26
|
+
*/
|
|
27
|
+
/** The file a plugin ships at its root to contribute deploy targets. */
|
|
28
|
+
export const DEPLOY_TARGETS_FILENAME = "jini-deploy-targets.json";
|
|
29
|
+
/** Every trust gate is the installed CALLER's job, or the hermetic source registry's trust basis. */
|
|
30
|
+
const targetContribution = {
|
|
31
|
+
filename: DEPLOY_TARGETS_FILENAME, contribution: "deploy targets",
|
|
32
|
+
parse: ({ raw }) => parseDeployTargetsDescriptors({ raw }), modulePath: ({ descriptor }) => descriptor.module,
|
|
33
|
+
validate: ({ exported }) => asDeployTargetModule({ exported }),
|
|
34
|
+
refusal: ({ plugin, descriptor, reason }) => `deploy target '${descriptor.id}' from '${plugin.pluginId}' was not loaded: ${reason}`,
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Builds this workspace's deploy-target registry from its installed Agent Plugins.
|
|
38
|
+
*
|
|
39
|
+
* Read fresh on every call (publishing is rare and human-triggered); a module import itself is cached
|
|
40
|
+
* by Node per file URL, and installed digest directories never change.
|
|
41
|
+
*
|
|
42
|
+
* @throws Nothing for a plugin-level fault (see this file's header); only a filesystem fault listing
|
|
43
|
+
* the workspace's package directory itself propagates.
|
|
44
|
+
* @param required - Contribution loader from this boot's lifecycle; no site-dependent module default.
|
|
45
|
+
* @complexity O(p) installed plugins, each one small file read plus one import per declared target.
|
|
46
|
+
*/
|
|
47
|
+
export async function loadDeployTargetRegistry(required, _optional = {}) {
|
|
48
|
+
// Plugin-id order, not installed order: each host is its own plugin, so the Static site tab
|
|
49
|
+
// lists them the same way on every site, and the same way as the hermetic bundled registry below.
|
|
50
|
+
const load = await required.loadContributions({ workspaceId: required.workspaceId, definition: targetContribution }, { orderByPluginId: true });
|
|
51
|
+
return buildRegistry({ loaded: load.items, refusals: load.refusals });
|
|
52
|
+
}
|
|
53
|
+
/** Discover installed host descriptors through the existing data loader, including disabled hosts.
|
|
54
|
+
* No module is imported. Digest, containment, parser and ambiguous-id refusals retain their owners.
|
|
55
|
+
* @returns Installed metadata and every refusal; activation read failures are represented as unknown.
|
|
56
|
+
* @complexity O(p + t) installed packages and targets, with one activation read per target.
|
|
57
|
+
*/
|
|
58
|
+
export async function loadInstalledDeployTargets(required, _optional = {}) {
|
|
59
|
+
const definition = {
|
|
60
|
+
filename: DEPLOY_TARGETS_FILENAME, contribution: "deploy targets", kind: "data",
|
|
61
|
+
parse: ({ raw }) => parseDeployTargetsDescriptors({ raw }),
|
|
62
|
+
load: async ({ plugin, descriptor }) => ({ descriptor, pluginId: plugin.pluginId,
|
|
63
|
+
enabled: await required.readEnabled({ workspaceId: required.workspaceId, pluginId: plugin.pluginId }) }),
|
|
64
|
+
};
|
|
65
|
+
const load = await required.loadContributions({ workspaceId: required.workspaceId, definition }, { requireActive: false, orderByPluginId: true });
|
|
66
|
+
const registry = buildRegistry({ loaded: load.items, refusals: load.refusals });
|
|
67
|
+
return { items: registry.list(), refusals: registry.refusals };
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* A registry read straight from a plugin's SOURCE directory, with no install, activation or digest
|
|
71
|
+
* gate. For the hermetic composition root (`server/runtime/composition/app.ts`) and tests only,
|
|
72
|
+
* where the directory is this product's own `content/agent-plugins/<id>/`: never point it at
|
|
73
|
+
* anything an operator or a third party can write.
|
|
74
|
+
*
|
|
75
|
+
* @complexity O(t) targets, one import each.
|
|
76
|
+
*/
|
|
77
|
+
export async function loadDeployTargetRegistryFromSource(required, _optional = {}) {
|
|
78
|
+
const load = await required.loadPluginContributionsFromSource({ plugin: required.plugin, definition: targetContribution });
|
|
79
|
+
return buildRegistry({ loaded: load.items, refusals: load.refusals });
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The hermetic registry for EVERY bundled plugin at once: each directory under `sourceRoot` (the
|
|
83
|
+
* product's bundled root, `bundledAgentPluginsDir()`: `content/agent-plugins/` or the composed root
|
|
84
|
+
* the host's bundled-source override names. Callers once passed the raw `content/agent-plugins` so a
|
|
85
|
+
* fixture-pointed env still saw the real hosts; since the hosts moved to `@jini-ai/agent-plugins`
|
|
86
|
+
* they exist only in the composed root, so the raw path loses them in dev) that holds both
|
|
87
|
+
* `plugin.json` and {@link DEPLOY_TARGETS_FILENAME}, minus retired ids, in plugin-id order (the
|
|
88
|
+
* installed loader's `orderByPluginId`). A directory without the file is skipped, as the installed
|
|
89
|
+
* path skips a package that does not ship it; a target id two directories both declare is dropped
|
|
90
|
+
* for both by {@link buildRegistry}. Same trust basis and same caveat as
|
|
91
|
+
* {@link loadDeployTargetRegistryFromSource}: never point it at anything an operator can write.
|
|
92
|
+
*
|
|
93
|
+
* @throws Only a filesystem fault listing `sourceRoot` itself.
|
|
94
|
+
* @complexity O(p + t): one listing, two existence checks per plugin dir, one import per target.
|
|
95
|
+
*/
|
|
96
|
+
export async function loadBundledDeployTargetRegistry(required, _optional = {}) {
|
|
97
|
+
const items = [];
|
|
98
|
+
const refusals = [];
|
|
99
|
+
for (const plugin of required.bundledContributionSources({ sourceRoot: required.sourceRoot, filename: DEPLOY_TARGETS_FILENAME })) {
|
|
100
|
+
const load = await required.loadPluginContributionsFromSource({ plugin, definition: targetContribution });
|
|
101
|
+
items.push(...load.items);
|
|
102
|
+
refusals.push(...load.refusals);
|
|
103
|
+
}
|
|
104
|
+
return buildRegistry({ loaded: items, refusals });
|
|
105
|
+
}
|
|
106
|
+
/** Indexes loaded targets by id, dropping every id more than one plugin declares.
|
|
107
|
+
* @complexity O(n) in the loaded target count. */
|
|
108
|
+
function buildRegistry({ loaded, refusals }, _optional = {}) {
|
|
109
|
+
const byId = new Map();
|
|
110
|
+
for (const target of loaded)
|
|
111
|
+
byId.set(target.descriptor.id, [...(byId.get(target.descriptor.id) ?? []), target]);
|
|
112
|
+
const unique = new Map();
|
|
113
|
+
const allRefusals = [...refusals];
|
|
114
|
+
for (const [id, claimants] of byId) {
|
|
115
|
+
if (claimants.length === 1) {
|
|
116
|
+
const claimant = claimants[0];
|
|
117
|
+
if (claimant === undefined)
|
|
118
|
+
throw new Error(`Deploy target ${id} has no claimant`);
|
|
119
|
+
unique.set(id, claimant);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
const owners = claimants.map((target) => `'${target.pluginId}'`).sort().join(", ");
|
|
123
|
+
allRefusals.push(`deploy target '${id}' was not loaded: more than one plugin declares it (${owners})`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
get: (targetId) => unique.get(targetId),
|
|
128
|
+
list: () => [...unique.values()],
|
|
129
|
+
refusals: allRefusals,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { FormDestinationForm, FormSubmissionsInspection } from "@jini-ai/core/contracts/site/cms-forms";
|
|
2
|
+
import type { DeployTargetInspection as PluginDeployTargetInspection, DeployTargetRegistry as PluginDeployTargetRegistry, LoadedDeployTarget as PluginLoadedDeployTarget, PluginDeployTargetModule } from "../../index.js";
|
|
3
|
+
/**
|
|
4
|
+
* @file The host contract a deploy-target MODULE (shipped inside an Agent Plugin) is written against.
|
|
5
|
+
*
|
|
6
|
+
* Owner decision 2026-09-29: vendor host code lives in the host's `deploy` agent plugin, and
|
|
7
|
+
* `@jini-ai/devops` keeps only the generic port. Hosts are dependency-injected: this app loads a
|
|
8
|
+
* plugin's module (`registry.ts`), hands it a {@link DeployHostKit}, and gets back a plain devops
|
|
9
|
+
* `DeployTarget`. Nothing in this file names a vendor.
|
|
10
|
+
*
|
|
11
|
+
* The injection contract itself (the kit, the credential, the create/check contexts, the response
|
|
12
|
+
* header set) comes from `@jini-ai/devops/deploy` since 0.4.0, and so do the module extras
|
|
13
|
+
* ({@link DeployTargetModule}'s `summarize`/`hostingSetup`) and the plugin descriptor shapes. Only
|
|
14
|
+
* the form types the preview passes are bound here. The installed plugin ABI remains positional;
|
|
15
|
+
* the host kit adapts its helper calls to devops' object APIs so content-addressed installed
|
|
16
|
+
* packages need no rewrite when the library is rebuilt.
|
|
17
|
+
*/
|
|
18
|
+
export type { DeployCredentialCheck, DeployFetchTimeouts, ResponseHeaderSet, SigV4ClientOptions, } from "../../index.js";
|
|
19
|
+
/** The installed plugin ABI and descriptor shapes live in `@jini-ai/devops/deploy`; the colliding
|
|
20
|
+
* ABI names carry a `Plugin` prefix there and keep their host names here. */
|
|
21
|
+
export type { PluginSigV4Client as SigV4Client, PluginDeployTargetCreateContext as DeployTargetCreateContext, PluginDeployCredentialCheckContext as DeployCredentialCheckContext, HostDeployPublishInput, HostDeployTarget, DeployHostingSetup, DeployTargetDescriptor, DeployTargetCredentialSpec, DeployTargetProjectNameCopy, DeployTargetFieldSpec, DeployTargetEnvFallback, InstalledDeployTarget, InstalledDeployTargetInventory, LoadInstalledDeployTargets, } from "../../index.js";
|
|
22
|
+
/** This host binds the preview's form types to its own form-destination model. */
|
|
23
|
+
export type DeployTargetModule = PluginDeployTargetModule<FormDestinationForm, FormSubmissionsInspection>;
|
|
24
|
+
export type DeployTargetInspection = PluginDeployTargetInspection<FormSubmissionsInspection>;
|
|
25
|
+
export type LoadedDeployTarget = PluginLoadedDeployTarget<FormDestinationForm, FormSubmissionsInspection>;
|
|
26
|
+
export type DeployTargetRegistry = PluginDeployTargetRegistry<FormDestinationForm, FormSubmissionsInspection>;
|
|
27
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The repo-root `Dockerfile`'s read/write access, extracted out of
|
|
3
|
+
* `server/routes/admin/system/dockerfile-source.ts` (2026-08-15) so the new
|
|
4
|
+
* `deployment_get_dockerfile`/`deployment_set_dockerfile` agent tools (`tool-registrations.ts` in
|
|
5
|
+
* this directory) can read and write the exact same file the admin UI's Dockerfile tab does,
|
|
6
|
+
* without either duplicating the path-resolution rule or creating a `features/deployments ->
|
|
7
|
+
* server/routes/*` back-edge (see `export-run.ts`'s file header for the fuller argument — the same
|
|
8
|
+
* reasoning applies here).
|
|
9
|
+
*
|
|
10
|
+
* Path safety is the entire risk surface of the write half: {@link dockerfilePath} is a fixed,
|
|
11
|
+
* hardcoded path with NO parameter anywhere in this module that could steer it. Neither read/write
|
|
12
|
+
* function below accepts a path argument at all. There is therefore no path-traversal input to
|
|
13
|
+
* sanitize because there is no path input in the first place; every caller (the HTTP route and the
|
|
14
|
+
* agent tool) can only ever affect the file's CONTENTS, never its LOCATION.
|
|
15
|
+
*
|
|
16
|
+
* `process.cwd()` is the resolution root, matching the original route's own rationale: `deps.ts`'s
|
|
17
|
+
* `mediaUploadsDir()` fallback and `defaultContentDbPath()` both already assume the process runs
|
|
18
|
+
* with its cwd at the host repo root (true in dev and in the shipped image's `WORKDIR
|
|
19
|
+
* /workspace/<repo>`), so this inherits an already-established convention rather than introducing a
|
|
20
|
+
* new one.
|
|
21
|
+
*
|
|
22
|
+
* ## 2026-08-15 — optimistic concurrency (Terra audit finding C5)
|
|
23
|
+
*
|
|
24
|
+
* Two independent writers can hold this file open at once: a human editing it in the admin UI's
|
|
25
|
+
* Dockerfile tab, and the `deployment_set_dockerfile` agent tool acting on the assistant's behalf.
|
|
26
|
+
* Before this pass, `writeDockerfileSource` overwrote unconditionally — whichever writer's `PUT`
|
|
27
|
+
* landed last won, silently, with no record that the other writer's edit ever existed. Every
|
|
28
|
+
* snapshot this module returns now carries an `etag` (a content hash, or a fixed sentinel for "no
|
|
29
|
+
* file yet"), and {@link writeDockerfileSourceWithIfMatch} is the strict, checked write path both
|
|
30
|
+
* callers now go through — see that function's own doc for the full decision record, the rejected
|
|
31
|
+
* alternative, and the residual race window it does NOT close.
|
|
32
|
+
*
|
|
33
|
+
* `writeDockerfileSource` (unconditional) stays exported and unchanged for the one caller that must
|
|
34
|
+
* remain unconditional on purpose: this module's own tests (and the route/tool tests) restore the
|
|
35
|
+
* repo's real Dockerfile to its pre-test contents in `t.after()`, and that restore is test cleanup,
|
|
36
|
+
* not a concurrent-editor's write — it has nothing to compare against and nothing to lose by
|
|
37
|
+
* skipping the check.
|
|
38
|
+
*/
|
|
39
|
+
export interface DockerfileSourceSnapshot {
|
|
40
|
+
exists: boolean;
|
|
41
|
+
/** `null` when `exists` is false — never an empty string standing in for "missing". */
|
|
42
|
+
contents: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* A content-derived optimistic-concurrency token: `"<sha256 of contents>"` (RFC 9110 strong
|
|
45
|
+
* validator quoting) when the file exists, or {@link MISSING_DOCKERFILE_ETAG} when it does not.
|
|
46
|
+
* Always recomputed from whatever is actually on disk at read time — never persisted, never
|
|
47
|
+
* cached across calls. Pass the value observed here back as `ifMatch` to
|
|
48
|
+
* {@link writeDockerfileSourceWithIfMatch} to prove a write is based on the CURRENT contents.
|
|
49
|
+
*/
|
|
50
|
+
etag: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Reads the repo-root `Dockerfile`, or reports its absence.
|
|
54
|
+
*
|
|
55
|
+
* @complexity O(f) in the Dockerfile's own byte size — one existence check, one whole-file read,
|
|
56
|
+
* one hash pass over what was just read.
|
|
57
|
+
*/
|
|
58
|
+
export declare function readDockerfileSource(): DockerfileSourceSnapshot;
|
|
59
|
+
/**
|
|
60
|
+
* Overwrites the repo-root `Dockerfile` with `contents` UNCONDITIONALLY, creating it if it does not
|
|
61
|
+
* exist yet. No concurrency check — see this file's header for the one legitimate remaining caller
|
|
62
|
+
* (test cleanup/restore). Production callers (the HTTP route, the agent tool) must go through
|
|
63
|
+
* {@link writeDockerfileSourceWithIfMatch} instead.
|
|
64
|
+
*
|
|
65
|
+
* This ONLY writes bytes to disk — it does not build, validate as a Dockerfile, or trigger any
|
|
66
|
+
* rebuild/redeploy of anything. A syntactically invalid Dockerfile is written as-is; no prior
|
|
67
|
+
* contents are backed up by this function (callers who need the previous contents should read them
|
|
68
|
+
* first via {@link readDockerfileSource}).
|
|
69
|
+
*
|
|
70
|
+
* @param required.contents - The full replacement contents. Not validated as Dockerfile syntax — this is a
|
|
71
|
+
* raw file write, the same trust level a human editing the file directly already has.
|
|
72
|
+
* @returns The snapshot the file now has, for a caller to echo back without a second read.
|
|
73
|
+
* @complexity O(c) in `contents`' own byte size — one whole-file write, one hash pass.
|
|
74
|
+
*/
|
|
75
|
+
export declare function writeDockerfileSource({ contents }: {
|
|
76
|
+
contents: string;
|
|
77
|
+
}, _options?: {}): DockerfileSourceSnapshot;
|
|
78
|
+
/** {@link writeDockerfileSourceWithIfMatch}'s result: a discriminated union rather than a thrown
|
|
79
|
+
* error, matching this file's `{exists, contents}`-shaped-return style and this codebase's existing
|
|
80
|
+
* `{ok:false, error}` convention (e.g. `dockerfile-source.ts`'s own `parseWriteRequestBody`) — a
|
|
81
|
+
* version mismatch is an expected, name-able outcome for this function's callers, not an
|
|
82
|
+
* exceptional one, so neither the HTTP route nor the agent tool needs a try/catch just to turn it
|
|
83
|
+
* into their own 412/conflict-message shape. */
|
|
84
|
+
export type DockerfileWriteResult = {
|
|
85
|
+
ok: true;
|
|
86
|
+
snapshot: DockerfileSourceSnapshot;
|
|
87
|
+
} | {
|
|
88
|
+
ok: false;
|
|
89
|
+
reason: "conflict";
|
|
90
|
+
current: DockerfileSourceSnapshot;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Optimistic-concurrency write: overwrites the repo-root Dockerfile with `contents` ONLY if
|
|
94
|
+
* `ifMatch` still names the file's CURRENT etag. This is the fix for Terra audit finding C5 — the
|
|
95
|
+
* lost-update race where a human in the admin UI and the `deployment_set_dockerfile` agent tool
|
|
96
|
+
* could both save with `writeFileSync`'s unconditional overwrite, and whichever wrote last won with
|
|
97
|
+
* no warning to either party.
|
|
98
|
+
*
|
|
99
|
+
* **Decision record (2026-08-15, owner-approved — do not re-litigate without a fresh decision):**
|
|
100
|
+
* strict. A caller with no `ifMatch` at all is refused with a `400` by the two callers of this
|
|
101
|
+
* function (the HTTP route, the agent tool) BEFORE they ever reach here — this function's own
|
|
102
|
+
* signature requires a string, so "missing" is entirely their concern, not this function's. The
|
|
103
|
+
* rejected alternative was PERMISSIVE: treat a missing `If-Match` as an unconditional write, same as
|
|
104
|
+
* plain {@link writeDockerfileSource}. Rejected because permissive keeps unpatched callers working
|
|
105
|
+
* but leaves the race open through exactly the path that matters most — the agent tool, which is
|
|
106
|
+
* also the one caller that could plausibly retry an unconditional write in a fast loop — and gives
|
|
107
|
+
* the agent no signal it could act on at all.
|
|
108
|
+
*
|
|
109
|
+
* **Residual TOCTOU window (honest, not fully closed by this change):** the freshness read below and
|
|
110
|
+
* the `writeFileSync` inside {@link writeDockerfileSource} are two separate syscalls with no
|
|
111
|
+
* OS-level lock spanning them, and nothing in Node's single-threaded event loop guarantees they run
|
|
112
|
+
* back-to-back with no other macrotask in between. A second writer's own write landing in that gap
|
|
113
|
+
* would still be silently lost. What this DOES close is the much wider window the bug report
|
|
114
|
+
* described: the whole read-edit-save round trip (seconds to minutes of a human typing, or an
|
|
115
|
+
* agent's own multi-step reasoning) collapses to the gap between one synchronous read and one
|
|
116
|
+
* synchronous write in the same function call, with no `await` between them — narrowed by orders of
|
|
117
|
+
* magnitude, not eliminated. Fully closing it needs real file locking (e.g. an OS advisory lock or a
|
|
118
|
+
* library like `proper-lockfile`), deliberately out of scope for this change: a single low-frequency
|
|
119
|
+
* admin-editor file is not worth that dependency today. If an actual collision is ever observed
|
|
120
|
+
* inside this narrowed window, THAT is the trigger to revisit — not a hypothetical.
|
|
121
|
+
*
|
|
122
|
+
* @param required.contents - The full replacement contents, same contract as {@link writeDockerfileSource}.
|
|
123
|
+
* @param required.ifMatch - The etag the caller most recently observed (from a prior
|
|
124
|
+
* `readDockerfileSource`/`writeDockerfileSource*` call). Compared against a FRESH read of disk taken
|
|
125
|
+
* inside this call, never a cached or request-scoped value — comparing against anything else would
|
|
126
|
+
* reintroduce the exact race this function exists to close.
|
|
127
|
+
* @returns `{ok:true, snapshot}` on a successful write, or `{ok:false, reason:"conflict", current}`
|
|
128
|
+
* carrying the disk's actual current contents so the caller can diff and reconcile rather than
|
|
129
|
+
* retry blind.
|
|
130
|
+
* @complexity O(f) — one fresh read (existence check, whole-file read, one hash pass) plus, only on
|
|
131
|
+
* a match, one whole-file write (another hash pass, inside {@link writeDockerfileSource}).
|
|
132
|
+
*/
|
|
133
|
+
export declare function writeDockerfileSourceWithIfMatch({ contents, ifMatch }: {
|
|
134
|
+
contents: string;
|
|
135
|
+
ifMatch: string;
|
|
136
|
+
}, _options?: {}): DockerfileWriteResult;
|
|
137
|
+
//# sourceMappingURL=dockerfile.d.ts.map
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
/** The one path either read/write function in this module ever touches — never derived from
|
|
5
|
+
* caller input. */
|
|
6
|
+
function dockerfilePath() {
|
|
7
|
+
return join(process.cwd(), "Dockerfile");
|
|
8
|
+
}
|
|
9
|
+
/** Weak validator (`W/` prefix per RFC 9110) for "no Dockerfile exists yet" — a STATE, not a byte
|
|
10
|
+
* sequence, so it is deliberately not shaped like a real sha256 hex digest (64 lowercase hex
|
|
11
|
+
* chars): nothing a real file's contents could hash to would ever collide with this string. */
|
|
12
|
+
const MISSING_DOCKERFILE_ETAG = 'W/"missing"';
|
|
13
|
+
/** @complexity O(c) in `contents`' byte size — one hash pass. Only existing contents are hashed:
|
|
14
|
+
* both callers handle absence first (`readDockerfileSource` returns {@link MISSING_DOCKERFILE_ETAG}
|
|
15
|
+
* before reading), so this takes a string, never null. */
|
|
16
|
+
function computeDockerfileEtag({ contents }, _options = {}) {
|
|
17
|
+
return `"${createHash("sha256").update(contents, "utf8").digest("hex")}"`;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Reads the repo-root `Dockerfile`, or reports its absence.
|
|
21
|
+
*
|
|
22
|
+
* @complexity O(f) in the Dockerfile's own byte size — one existence check, one whole-file read,
|
|
23
|
+
* one hash pass over what was just read.
|
|
24
|
+
*/
|
|
25
|
+
export function readDockerfileSource() {
|
|
26
|
+
const path = dockerfilePath();
|
|
27
|
+
if (!existsSync(path))
|
|
28
|
+
return { exists: false, contents: null, etag: MISSING_DOCKERFILE_ETAG };
|
|
29
|
+
const contents = readFileSync(path, "utf8");
|
|
30
|
+
return { exists: true, contents, etag: computeDockerfileEtag({ contents }) };
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Overwrites the repo-root `Dockerfile` with `contents` UNCONDITIONALLY, creating it if it does not
|
|
34
|
+
* exist yet. No concurrency check — see this file's header for the one legitimate remaining caller
|
|
35
|
+
* (test cleanup/restore). Production callers (the HTTP route, the agent tool) must go through
|
|
36
|
+
* {@link writeDockerfileSourceWithIfMatch} instead.
|
|
37
|
+
*
|
|
38
|
+
* This ONLY writes bytes to disk — it does not build, validate as a Dockerfile, or trigger any
|
|
39
|
+
* rebuild/redeploy of anything. A syntactically invalid Dockerfile is written as-is; no prior
|
|
40
|
+
* contents are backed up by this function (callers who need the previous contents should read them
|
|
41
|
+
* first via {@link readDockerfileSource}).
|
|
42
|
+
*
|
|
43
|
+
* @param required.contents - The full replacement contents. Not validated as Dockerfile syntax — this is a
|
|
44
|
+
* raw file write, the same trust level a human editing the file directly already has.
|
|
45
|
+
* @returns The snapshot the file now has, for a caller to echo back without a second read.
|
|
46
|
+
* @complexity O(c) in `contents`' own byte size — one whole-file write, one hash pass.
|
|
47
|
+
*/
|
|
48
|
+
export function writeDockerfileSource({ contents }, _options = {}) {
|
|
49
|
+
writeFileSync(dockerfilePath(), contents, "utf8");
|
|
50
|
+
return { exists: true, contents, etag: computeDockerfileEtag({ contents }) };
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Optimistic-concurrency write: overwrites the repo-root Dockerfile with `contents` ONLY if
|
|
54
|
+
* `ifMatch` still names the file's CURRENT etag. This is the fix for Terra audit finding C5 — the
|
|
55
|
+
* lost-update race where a human in the admin UI and the `deployment_set_dockerfile` agent tool
|
|
56
|
+
* could both save with `writeFileSync`'s unconditional overwrite, and whichever wrote last won with
|
|
57
|
+
* no warning to either party.
|
|
58
|
+
*
|
|
59
|
+
* **Decision record (2026-08-15, owner-approved — do not re-litigate without a fresh decision):**
|
|
60
|
+
* strict. A caller with no `ifMatch` at all is refused with a `400` by the two callers of this
|
|
61
|
+
* function (the HTTP route, the agent tool) BEFORE they ever reach here — this function's own
|
|
62
|
+
* signature requires a string, so "missing" is entirely their concern, not this function's. The
|
|
63
|
+
* rejected alternative was PERMISSIVE: treat a missing `If-Match` as an unconditional write, same as
|
|
64
|
+
* plain {@link writeDockerfileSource}. Rejected because permissive keeps unpatched callers working
|
|
65
|
+
* but leaves the race open through exactly the path that matters most — the agent tool, which is
|
|
66
|
+
* also the one caller that could plausibly retry an unconditional write in a fast loop — and gives
|
|
67
|
+
* the agent no signal it could act on at all.
|
|
68
|
+
*
|
|
69
|
+
* **Residual TOCTOU window (honest, not fully closed by this change):** the freshness read below and
|
|
70
|
+
* the `writeFileSync` inside {@link writeDockerfileSource} are two separate syscalls with no
|
|
71
|
+
* OS-level lock spanning them, and nothing in Node's single-threaded event loop guarantees they run
|
|
72
|
+
* back-to-back with no other macrotask in between. A second writer's own write landing in that gap
|
|
73
|
+
* would still be silently lost. What this DOES close is the much wider window the bug report
|
|
74
|
+
* described: the whole read-edit-save round trip (seconds to minutes of a human typing, or an
|
|
75
|
+
* agent's own multi-step reasoning) collapses to the gap between one synchronous read and one
|
|
76
|
+
* synchronous write in the same function call, with no `await` between them — narrowed by orders of
|
|
77
|
+
* magnitude, not eliminated. Fully closing it needs real file locking (e.g. an OS advisory lock or a
|
|
78
|
+
* library like `proper-lockfile`), deliberately out of scope for this change: a single low-frequency
|
|
79
|
+
* admin-editor file is not worth that dependency today. If an actual collision is ever observed
|
|
80
|
+
* inside this narrowed window, THAT is the trigger to revisit — not a hypothetical.
|
|
81
|
+
*
|
|
82
|
+
* @param required.contents - The full replacement contents, same contract as {@link writeDockerfileSource}.
|
|
83
|
+
* @param required.ifMatch - The etag the caller most recently observed (from a prior
|
|
84
|
+
* `readDockerfileSource`/`writeDockerfileSource*` call). Compared against a FRESH read of disk taken
|
|
85
|
+
* inside this call, never a cached or request-scoped value — comparing against anything else would
|
|
86
|
+
* reintroduce the exact race this function exists to close.
|
|
87
|
+
* @returns `{ok:true, snapshot}` on a successful write, or `{ok:false, reason:"conflict", current}`
|
|
88
|
+
* carrying the disk's actual current contents so the caller can diff and reconcile rather than
|
|
89
|
+
* retry blind.
|
|
90
|
+
* @complexity O(f) — one fresh read (existence check, whole-file read, one hash pass) plus, only on
|
|
91
|
+
* a match, one whole-file write (another hash pass, inside {@link writeDockerfileSource}).
|
|
92
|
+
*/
|
|
93
|
+
export function writeDockerfileSourceWithIfMatch({ contents, ifMatch }, _options = {}) {
|
|
94
|
+
// Fresh read, immediately before the write below — see this function's own doc for why a cached
|
|
95
|
+
// or earlier-observed etag must never stand in for this.
|
|
96
|
+
const current = readDockerfileSource();
|
|
97
|
+
if (current.etag !== ifMatch)
|
|
98
|
+
return { ok: false, reason: "conflict", current };
|
|
99
|
+
return { ok: true, snapshot: writeDockerfileSource({ contents }) };
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=dockerfile.js.map
|