@wildo-ai/wildo-cli 1.1.12 → 1.1.14
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/dist/src/commands/build/approve.command.d.ts +4 -0
- package/dist/src/commands/build/approve.command.d.ts.map +1 -1
- package/dist/src/commands/build/approve.command.js +14 -3
- package/dist/src/commands/build/approve.command.js.map +1 -1
- package/dist/src/commands/build/close.command.d.ts +4 -0
- package/dist/src/commands/build/close.command.d.ts.map +1 -1
- package/dist/src/commands/build/close.command.js +17 -3
- package/dist/src/commands/build/close.command.js.map +1 -1
- package/dist/src/commands/config/sync.command.d.ts.map +1 -1
- package/dist/src/commands/config/sync.command.js +22 -1
- package/dist/src/commands/config/sync.command.js.map +1 -1
- package/dist/src/commands/context/journey.command.d.ts.map +1 -1
- package/dist/src/commands/context/journey.command.js +8 -0
- package/dist/src/commands/context/journey.command.js.map +1 -1
- package/dist/src/commands/creation/drive.command.d.ts.map +1 -1
- package/dist/src/commands/creation/drive.command.js +2 -0
- package/dist/src/commands/creation/drive.command.js.map +1 -1
- package/dist/src/commands/creation/feed.command.d.ts.map +1 -1
- package/dist/src/commands/creation/feed.command.js +6 -3
- package/dist/src/commands/creation/feed.command.js.map +1 -1
- package/dist/src/commands/fwk/publish-all.command.d.ts +13 -0
- package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/publish-all.command.js +64 -2
- package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
- package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/publish-docker.command.js +16 -1
- package/dist/src/commands/fwk/publish-docker.command.js.map +1 -1
- package/dist/src/commands/fwk/registry-host.command.d.ts +19 -1
- package/dist/src/commands/fwk/registry-host.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/registry-host.command.js +78 -3
- package/dist/src/commands/fwk/registry-host.command.js.map +1 -1
- package/dist/src/commands/init.command.d.ts +14 -0
- package/dist/src/commands/init.command.d.ts.map +1 -1
- package/dist/src/commands/init.command.js +29 -3
- package/dist/src/commands/init.command.js.map +1 -1
- package/dist/src/commands/local/dev.command.d.ts +68 -0
- package/dist/src/commands/local/dev.command.d.ts.map +1 -1
- package/dist/src/commands/local/dev.command.js +216 -8
- package/dist/src/commands/local/dev.command.js.map +1 -1
- package/dist/src/commands/local/doctor.command.d.ts +22 -9
- package/dist/src/commands/local/doctor.command.d.ts.map +1 -1
- package/dist/src/commands/local/doctor.command.js +45 -42
- package/dist/src/commands/local/doctor.command.js.map +1 -1
- package/dist/src/commands/providers/connect.command.d.ts.map +1 -1
- package/dist/src/commands/providers/connect.command.js +11 -1
- package/dist/src/commands/providers/connect.command.js.map +1 -1
- package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
- package/dist/src/commands/registry/repair-lockfile.command.js +1 -0
- package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
- package/dist/src/commands/registry/update.command.d.ts.map +1 -1
- package/dist/src/commands/registry/update.command.js +1 -0
- package/dist/src/commands/registry/update.command.js.map +1 -1
- package/dist/src/commands/seal/currency.command.d.ts +13 -0
- package/dist/src/commands/seal/currency.command.d.ts.map +1 -0
- package/dist/src/commands/seal/currency.command.js +52 -0
- package/dist/src/commands/seal/currency.command.js.map +1 -0
- package/dist/src/commands/seal/seal-admin-door.utils.d.ts.map +1 -1
- package/dist/src/commands/seal/seal-admin-door.utils.js +2 -0
- package/dist/src/commands/seal/seal-admin-door.utils.js.map +1 -1
- package/dist/src/commands/seal/verify.command.d.ts +23 -0
- package/dist/src/commands/seal/verify.command.d.ts.map +1 -1
- package/dist/src/commands/seal/verify.command.js +88 -3
- package/dist/src/commands/seal/verify.command.js.map +1 -1
- package/dist/src/services/application/content-guardrail-classifier.service.d.ts +19 -0
- package/dist/src/services/application/content-guardrail-classifier.service.d.ts.map +1 -1
- package/dist/src/services/application/content-guardrail-classifier.service.js +75 -11
- package/dist/src/services/application/content-guardrail-classifier.service.js.map +1 -1
- package/dist/src/services/application/local-provider-doubles.service.d.ts +98 -0
- package/dist/src/services/application/local-provider-doubles.service.d.ts.map +1 -0
- package/dist/src/services/application/local-provider-doubles.service.js +214 -0
- package/dist/src/services/application/local-provider-doubles.service.js.map +1 -0
- package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
- package/dist/src/services/application/provider-runtime-sync.service.js +26 -1
- package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
- package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
- package/dist/src/services/application/saas-skeleton.service.js +24 -2
- package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
- package/dist/src/services/application/system-of-record-simulators.service.d.ts +21 -2
- package/dist/src/services/application/system-of-record-simulators.service.d.ts.map +1 -1
- package/dist/src/services/application/system-of-record-simulators.service.js +21 -12
- package/dist/src/services/application/system-of-record-simulators.service.js.map +1 -1
- package/dist/src/services/companion/build-console.service.d.ts +39 -2
- package/dist/src/services/companion/build-console.service.d.ts.map +1 -1
- package/dist/src/services/companion/build-console.service.js +54 -4
- package/dist/src/services/companion/build-console.service.js.map +1 -1
- package/dist/src/services/companion/creation-console.service.d.ts +6 -1
- package/dist/src/services/companion/creation-console.service.d.ts.map +1 -1
- package/dist/src/services/companion/creation-console.service.js +14 -2
- package/dist/src/services/companion/creation-console.service.js.map +1 -1
- package/dist/src/services/companion/creation-drive.service.d.ts +32 -2
- package/dist/src/services/companion/creation-drive.service.d.ts.map +1 -1
- package/dist/src/services/companion/creation-drive.service.js +66 -6
- package/dist/src/services/companion/creation-drive.service.js.map +1 -1
- package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
- package/dist/src/services/credentials/composed-provider-catalogue.js +14 -2
- package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
- package/dist/src/services/credentials/credentials.schemas.d.ts +6 -0
- package/dist/src/services/credentials/credentials.schemas.d.ts.map +1 -1
- package/dist/src/services/credentials/credentials.schemas.js +7 -1
- package/dist/src/services/credentials/credentials.schemas.js.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.js +11 -3
- package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
- package/dist/src/services/credentials/secret-requirements.service.d.ts +2 -1
- package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secret-requirements.service.js +17 -1
- package/dist/src/services/credentials/secret-requirements.service.js.map +1 -1
- package/dist/src/services/data-services/data-services.schemas.d.ts +9 -0
- package/dist/src/services/data-services/data-services.schemas.d.ts.map +1 -1
- package/dist/src/services/data-services/data-services.schemas.js +9 -0
- package/dist/src/services/data-services/data-services.schemas.js.map +1 -1
- package/dist/src/services/deployment/application-runtime-environment.d.ts.map +1 -1
- package/dist/src/services/deployment/application-runtime-environment.js +3 -13
- package/dist/src/services/deployment/application-runtime-environment.js.map +1 -1
- package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/docker-compose-generator.service.js +15 -4
- package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
- package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts +1 -1
- package/dist/src/services/deployment/host-toolchain-readiness.service.js +1 -1
- package/dist/src/services/deployment/host-toolchain-readiness.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js +3 -1
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
- package/dist/src/services/deployment/local-dev-session-lease.service.d.ts.map +1 -1
- package/dist/src/services/deployment/local-dev-session-lease.service.js +22 -1
- package/dist/src/services/deployment/local-dev-session-lease.service.js.map +1 -1
- package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
- package/dist/src/services/deployment/local-precondition-checks.service.js +4 -2
- package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
- package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
- package/dist/src/services/environment/authored-infra-config.utils.js +1 -0
- package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
- package/dist/src/services/environment/authored-infra-member-authority.d.ts.map +1 -1
- package/dist/src/services/environment/authored-infra-member-authority.js +5 -0
- package/dist/src/services/environment/authored-infra-member-authority.js.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.js +14 -6
- package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.d.ts +6 -0
- package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.js +24 -1
- package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
- package/dist/src/services/environment/environment-hydration.utils.d.ts.map +1 -1
- package/dist/src/services/environment/environment-hydration.utils.js +1 -0
- package/dist/src/services/environment/environment-hydration.utils.js.map +1 -1
- package/dist/src/services/environment/environment-service-profile.utils.d.ts +8 -1
- package/dist/src/services/environment/environment-service-profile.utils.d.ts.map +1 -1
- package/dist/src/services/environment/environment-service-profile.utils.js +14 -1
- package/dist/src/services/environment/environment-service-profile.utils.js.map +1 -1
- package/dist/src/services/environment/environment.schemas.d.ts +7 -1
- package/dist/src/services/environment/environment.schemas.d.ts.map +1 -1
- package/dist/src/services/environment/environment.schemas.js.map +1 -1
- package/dist/src/services/environment/runtime-bootstrap.service.d.ts +2 -0
- package/dist/src/services/environment/runtime-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/environment/runtime-bootstrap.service.js +4 -0
- package/dist/src/services/environment/runtime-bootstrap.service.js.map +1 -1
- package/dist/src/services/framework/framework-docker-publish.service.d.ts +102 -0
- package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-docker-publish.service.js +204 -25
- package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
- package/dist/src/services/framework/github-actions-annotation.d.ts +19 -0
- package/dist/src/services/framework/github-actions-annotation.d.ts.map +1 -0
- package/dist/src/services/framework/github-actions-annotation.js +25 -0
- package/dist/src/services/framework/github-actions-annotation.js.map +1 -0
- package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts +43 -0
- package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts.map +1 -0
- package/dist/src/services/framework/registry-host/registry-host-upgrade.js +117 -0
- package/dist/src/services/framework/registry-host/registry-host-upgrade.js.map +1 -0
- package/dist/src/services/framework/registry-host/registry-host.service.d.ts +1 -1
- package/dist/src/services/framework/registry-host/registry-host.service.d.ts.map +1 -1
- package/dist/src/services/framework/registry-host/registry-host.service.js +2 -0
- package/dist/src/services/framework/registry-host/registry-host.service.js.map +1 -1
- package/dist/src/services/registry/installed-file-state.utils.d.ts +8 -0
- package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -1
- package/dist/src/services/registry/installed-file-state.utils.js +9 -1
- package/dist/src/services/registry/installed-file-state.utils.js.map +1 -1
- package/dist/src/services/registry/module-install.service.d.ts.map +1 -1
- package/dist/src/services/registry/module-install.service.js +1 -0
- package/dist/src/services/registry/module-install.service.js.map +1 -1
- package/dist/src/services/registry/provider-connect.service.d.ts +57 -1
- package/dist/src/services/registry/provider-connect.service.d.ts.map +1 -1
- package/dist/src/services/registry/provider-connect.service.js +63 -2
- package/dist/src/services/registry/provider-connect.service.js.map +1 -1
- package/dist/src/services/registry/provider-module-scaffold.service.d.ts.map +1 -1
- package/dist/src/services/registry/provider-module-scaffold.service.js +4 -0
- package/dist/src/services/registry/provider-module-scaffold.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/framework-root-package.json +3 -3
- package/package.json +22 -22
- package/scripts/app-dependency-alignment/propagated-engine-overrides.json +2 -2
- package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +17 -2
- package/templates/infra/registry-host/docker-compose.yml +9 -2
- package/templates/infra/registry-host/upgrade-image.sh +108 -0
- package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_ready/labels.fr.ts +22 -0
- package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_received/labels.fr.ts +23 -0
- package/templates/saas/i18n/email/resources/dataSubjectRequests/update.users-custom_extended/labels.fr.ts +23 -0
- package/templates/saas/i18n/email/resources/organizationSsoConfig/repairUnreadableConfiguration.organization-users/labels.fr.ts +23 -0
- package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.ts +28 -0
- package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.ts +28 -0
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.en.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.ts +6 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.ts +6 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.en.ts +40 -0
- package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.fr.ts +40 -0
- package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.en.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.ts +2 -1
- package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.en.ts +3 -1
- package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.fr.ts +3 -1
- package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.en.ts +2 -1
- package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.en.ts +3 -1
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.fr.ts +4 -2
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.en.ts +18 -1
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.fr.ts +18 -1
- package/templates/saas/i18n/engine/resources/actorSystemExecutions.en.ts +10 -82
- package/templates/saas/i18n/engine/resources/actorSystemExecutions.fr.ts +0 -72
- package/templates/saas/i18n/engine/resources/actorTasks.en.ts +0 -33
- package/templates/saas/i18n/engine/resources/actorTasks.fr.ts +0 -33
- package/templates/saas/i18n/engine/resources/agentBehaviorReports.en.ts +0 -108
- package/templates/saas/i18n/engine/resources/agentBehaviorReports.fr.ts +0 -108
- package/templates/saas/i18n/engine/resources/agentOperationRecords.en.ts +8 -24
- package/templates/saas/i18n/engine/resources/agentOperationRecords.fr.ts +10 -26
- package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.en.ts +0 -12
- package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.fr.ts +0 -12
- package/templates/saas/i18n/engine/resources/anonymous_users.en.ts +8 -74
- package/templates/saas/i18n/engine/resources/anonymous_users.fr.ts +0 -66
- package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.en.ts +3 -21
- package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.en.ts +3 -33
- package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/applicationAccessGrants.en.ts +13 -55
- package/templates/saas/i18n/engine/resources/applicationAccessGrants.fr.ts +0 -42
- package/templates/saas/i18n/engine/resources/applicationAgentPolicies.en.ts +8 -24
- package/templates/saas/i18n/engine/resources/applicationAgentPolicies.fr.ts +8 -24
- package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.en.ts +13 -43
- package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/applicationApiKeys.en.ts +2 -70
- package/templates/saas/i18n/engine/resources/applicationApiKeys.fr.ts +2 -70
- package/templates/saas/i18n/engine/resources/applicationAuditLogs.en.ts +41 -94
- package/templates/saas/i18n/engine/resources/applicationAuditLogs.fr.ts +41 -94
- package/templates/saas/i18n/engine/resources/applicationDataKeys.en.ts +2 -22
- package/templates/saas/i18n/engine/resources/applicationDataKeys.fr.ts +2 -22
- package/templates/saas/i18n/engine/resources/applicationFeatures.en.ts +0 -24
- package/templates/saas/i18n/engine/resources/applicationFeatures.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.en.ts +25 -160
- package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.fr.ts +25 -160
- package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.en.ts +6 -28
- package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.fr.ts +8 -30
- package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.en.ts +92 -23
- package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.fr.ts +95 -26
- package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.en.ts +1 -25
- package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.fr.ts +4 -28
- package/templates/saas/i18n/engine/resources/applicationMetadata.en.ts +0 -18
- package/templates/saas/i18n/engine/resources/applicationMetadata.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/applicationOAuthClients.en.ts +2 -58
- package/templates/saas/i18n/engine/resources/applicationOAuthClients.fr.ts +2 -58
- package/templates/saas/i18n/engine/resources/applicationProviderCredentials.en.ts +168 -0
- package/templates/saas/i18n/engine/resources/applicationProviderCredentials.fr.ts +168 -0
- package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.en.ts +0 -30
- package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.en.ts +3 -42
- package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.fr.ts +5 -44
- package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.en.ts +3 -30
- package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.en.ts +0 -24
- package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/applicationSsoConfig.en.ts +113 -61
- package/templates/saas/i18n/engine/resources/applicationSsoConfig.fr.ts +113 -61
- package/templates/saas/i18n/engine/resources/applicationSsoConnections.en.ts +0 -138
- package/templates/saas/i18n/engine/resources/applicationSsoConnections.fr.ts +0 -138
- package/templates/saas/i18n/engine/resources/applicationVersions.en.ts +3 -27
- package/templates/saas/i18n/engine/resources/applicationVersions.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/applicationWebhookConfig.en.ts +5 -54
- package/templates/saas/i18n/engine/resources/applicationWebhookConfig.fr.ts +5 -54
- package/templates/saas/i18n/engine/resources/applications.en.ts +39 -2177
- package/templates/saas/i18n/engine/resources/applications.fr.ts +39 -2177
- package/templates/saas/i18n/engine/resources/approvalSeals.en.ts +38 -31
- package/templates/saas/i18n/engine/resources/approvalSeals.fr.ts +38 -31
- package/templates/saas/i18n/engine/resources/auditLogs.en.ts +78 -111
- package/templates/saas/i18n/engine/resources/auditLogs.fr.ts +78 -111
- package/templates/saas/i18n/engine/resources/billingEffectOutbox.en.ts +2 -4
- package/templates/saas/i18n/engine/resources/billingEffectOutbox.fr.ts +2 -4
- package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.en.ts +8 -6
- package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.fr.ts +8 -6
- package/templates/saas/i18n/engine/resources/chatConversations.en.ts +0 -18
- package/templates/saas/i18n/engine/resources/chatConversations.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/chatIdentityLinks.en.ts +0 -44
- package/templates/saas/i18n/engine/resources/chatIdentityLinks.fr.ts +0 -44
- package/templates/saas/i18n/engine/resources/consumableTokens.en.ts +4 -43
- package/templates/saas/i18n/engine/resources/consumableTokens.fr.ts +4 -43
- package/templates/saas/i18n/engine/resources/conversationMessages.en.ts +16 -27
- package/templates/saas/i18n/engine/resources/conversationMessages.fr.ts +16 -27
- package/templates/saas/i18n/engine/resources/conversationReplyTokens.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/conversationReplyTokens.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/conversationThreads.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/conversationThreads.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/dataSeedRuns.en.ts +22 -17
- package/templates/saas/i18n/engine/resources/dataSeedRuns.fr.ts +22 -17
- package/templates/saas/i18n/engine/resources/dataSubjectRequests.en.ts +410 -0
- package/templates/saas/i18n/engine/resources/dataSubjectRequests.fr.ts +410 -0
- package/templates/saas/i18n/engine/resources/etlPipelineStates.en.ts +128 -146
- package/templates/saas/i18n/engine/resources/etlPipelineStates.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/evaluationDatasetExports.en.ts +13 -43
- package/templates/saas/i18n/engine/resources/evaluationDatasetExports.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.en.ts +0 -12
- package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.fr.ts +0 -12
- package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.en.ts +0 -21
- package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.fr.ts +0 -21
- package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.en.ts +24 -45
- package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.fr.ts +0 -21
- package/templates/saas/i18n/engine/resources/externalDataPendingReferences.en.ts +0 -24
- package/templates/saas/i18n/engine/resources/externalDataPendingReferences.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.en.ts +0 -21
- package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.fr.ts +0 -21
- package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.en.ts +8 -14
- package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.fr.ts +0 -6
- package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.en.ts +0 -24
- package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.en.ts +150 -174
- package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.en.ts +12 -33
- package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.fr.ts +0 -21
- package/templates/saas/i18n/engine/resources/externalEffectReservations.en.ts +147 -0
- package/templates/saas/i18n/engine/resources/externalEffectReservations.fr.ts +147 -0
- package/templates/saas/i18n/engine/resources/files.en.ts +0 -39
- package/templates/saas/i18n/engine/resources/files.fr.ts +0 -39
- package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.en.ts +0 -18
- package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.en.ts +115 -0
- package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.fr.ts +115 -0
- package/templates/saas/i18n/engine/resources/inboundAddressTombstones.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/inboundAddressTombstones.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/inboundContacts.en.ts +3 -30
- package/templates/saas/i18n/engine/resources/inboundContacts.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/inboundEmails.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/inboundEmails.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/jobExecutions.en.ts +11 -25
- package/templates/saas/i18n/engine/resources/jobExecutions.fr.ts +11 -25
- package/templates/saas/i18n/engine/resources/jobPayloadStorage.en.ts +3 -30
- package/templates/saas/i18n/engine/resources/jobPayloadStorage.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/legalHolds.en.ts +0 -88
- package/templates/saas/i18n/engine/resources/legalHolds.fr.ts +0 -88
- package/templates/saas/i18n/engine/resources/modelCallAttributions.en.ts +16 -40
- package/templates/saas/i18n/engine/resources/modelCallAttributions.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.en.ts +13 -37
- package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/oauthConsentGrants.en.ts +10 -40
- package/templates/saas/i18n/engine/resources/oauthConsentGrants.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/operationApprovalRequests.en.ts +120 -60
- package/templates/saas/i18n/engine/resources/operationApprovalRequests.fr.ts +120 -60
- package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.en.ts +3 -21
- package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.en.ts +3 -33
- package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/organizationAgentPolicies.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationAgentPolicies.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.en.ts +13 -43
- package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/organizationApiKeys.en.ts +2 -79
- package/templates/saas/i18n/engine/resources/organizationApiKeys.fr.ts +2 -79
- package/templates/saas/i18n/engine/resources/organizationBillingAccounts.en.ts +0 -549
- package/templates/saas/i18n/engine/resources/organizationBillingAccounts.fr.ts +0 -549
- package/templates/saas/i18n/engine/resources/organizationChatSettings.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationChatSettings.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationCreditPools.en.ts +13 -18
- package/templates/saas/i18n/engine/resources/organizationCreditPools.fr.ts +13 -18
- package/templates/saas/i18n/engine/resources/organizationCustomDomains.en.ts +195 -0
- package/templates/saas/i18n/engine/resources/organizationCustomDomains.fr.ts +195 -0
- package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.en.ts +153 -0
- package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.fr.ts +153 -0
- package/templates/saas/i18n/engine/resources/organizationEmailDomains.en.ts +0 -39
- package/templates/saas/i18n/engine/resources/organizationEmailDomains.fr.ts +0 -39
- package/templates/saas/i18n/engine/resources/organizationFeatures.en.ts +0 -34
- package/templates/saas/i18n/engine/resources/organizationFeatures.fr.ts +0 -34
- package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.en.ts +25 -160
- package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.fr.ts +25 -160
- package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.en.ts +6 -28
- package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.fr.ts +8 -30
- package/templates/saas/i18n/engine/resources/organizationGuidanceState.en.ts +3 -18
- package/templates/saas/i18n/engine/resources/organizationGuidanceState.fr.ts +0 -15
- package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.en.ts +95 -26
- package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.fr.ts +95 -26
- package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.en.ts +14 -45
- package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.fr.ts +14 -45
- package/templates/saas/i18n/engine/resources/organizationLifecycleState.en.ts +1 -17
- package/templates/saas/i18n/engine/resources/organizationLifecycleState.fr.ts +1 -17
- package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.en.ts +2 -26
- package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.fr.ts +4 -28
- package/templates/saas/i18n/engine/resources/organizationMembers.en.ts +2 -95
- package/templates/saas/i18n/engine/resources/organizationMembers.fr.ts +2 -95
- package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationNotificationBadges.en.ts +3 -36
- package/templates/saas/i18n/engine/resources/organizationNotificationBadges.fr.ts +0 -33
- package/templates/saas/i18n/engine/resources/organizationNotifications.en.ts +0 -12
- package/templates/saas/i18n/engine/resources/organizationNotifications.fr.ts +0 -12
- package/templates/saas/i18n/engine/resources/organizationOAuthClients.en.ts +2 -67
- package/templates/saas/i18n/engine/resources/organizationOAuthClients.fr.ts +2 -67
- package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.en.ts +0 -9
- package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.fr.ts +0 -9
- package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationPreferences.en.ts +0 -37
- package/templates/saas/i18n/engine/resources/organizationPreferences.fr.ts +0 -37
- package/templates/saas/i18n/engine/resources/organizationProfiles.en.ts +0 -37
- package/templates/saas/i18n/engine/resources/organizationProfiles.fr.ts +0 -37
- package/templates/saas/i18n/engine/resources/organizationProgressionState.en.ts +1 -17
- package/templates/saas/i18n/engine/resources/organizationProgressionState.fr.ts +1 -17
- package/templates/saas/i18n/engine/resources/organizationProviderCredentials.en.ts +0 -58
- package/templates/saas/i18n/engine/resources/organizationProviderCredentials.fr.ts +0 -58
- package/templates/saas/i18n/engine/resources/organizationRelationships.en.ts +0 -128
- package/templates/saas/i18n/engine/resources/organizationRelationships.fr.ts +0 -128
- package/templates/saas/i18n/engine/resources/organizationRepresentations.en.ts +0 -83
- package/templates/saas/i18n/engine/resources/organizationRepresentations.fr.ts +0 -83
- package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.en.ts +0 -43
- package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.fr.ts +0 -43
- package/templates/saas/i18n/engine/resources/organizationScimTokens.en.ts +5 -76
- package/templates/saas/i18n/engine/resources/organizationScimTokens.fr.ts +5 -76
- package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.en.ts +4 -43
- package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.fr.ts +6 -45
- package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.en.ts +3 -30
- package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.en.ts +0 -37
- package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.fr.ts +0 -37
- package/templates/saas/i18n/engine/resources/organizationSsoConfig.en.ts +113 -74
- package/templates/saas/i18n/engine/resources/organizationSsoConfig.fr.ts +113 -74
- package/templates/saas/i18n/engine/resources/organizationSsoConnections.en.ts +0 -148
- package/templates/saas/i18n/engine/resources/organizationSsoConnections.fr.ts +0 -148
- package/templates/saas/i18n/engine/resources/organizationSubscriptions.en.ts +40 -78
- package/templates/saas/i18n/engine/resources/organizationSubscriptions.fr.ts +42 -80
- package/templates/saas/i18n/engine/resources/organizationUnitMembers.en.ts +2 -50
- package/templates/saas/i18n/engine/resources/organizationUnitMembers.fr.ts +2 -50
- package/templates/saas/i18n/engine/resources/organizationUnits.en.ts +0 -49
- package/templates/saas/i18n/engine/resources/organizationUnits.fr.ts +0 -49
- package/templates/saas/i18n/engine/resources/organizationUsageRecords.en.ts +13 -37
- package/templates/saas/i18n/engine/resources/organizationUsageRecords.fr.ts +13 -37
- package/templates/saas/i18n/engine/resources/organizationWebhookConfig.en.ts +5 -67
- package/templates/saas/i18n/engine/resources/organizationWebhookConfig.fr.ts +5 -67
- package/templates/saas/i18n/engine/resources/organizations.en.ts +34 -637
- package/templates/saas/i18n/engine/resources/organizations.fr.ts +32 -635
- package/templates/saas/i18n/engine/resources/platformAccessGrants.en.ts +0 -91
- package/templates/saas/i18n/engine/resources/platformAccessGrants.fr.ts +0 -91
- package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.en.ts +0 -24
- package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/prices.en.ts +47 -108
- package/templates/saas/i18n/engine/resources/prices.fr.ts +48 -109
- package/templates/saas/i18n/engine/resources/products.en.ts +24 -68
- package/templates/saas/i18n/engine/resources/products.fr.ts +24 -68
- package/templates/saas/i18n/engine/resources/professionalQualifications.en.ts +0 -87
- package/templates/saas/i18n/engine/resources/professionalQualifications.fr.ts +0 -87
- package/templates/saas/i18n/engine/resources/promotions.en.ts +4 -56
- package/templates/saas/i18n/engine/resources/promotions.fr.ts +6 -58
- package/templates/saas/i18n/engine/resources/providerCallRecords.en.ts +77 -101
- package/templates/saas/i18n/engine/resources/providerCallRecords.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/publishedVerificationKeys.en.ts +2 -25
- package/templates/saas/i18n/engine/resources/publishedVerificationKeys.fr.ts +2 -25
- package/templates/saas/i18n/engine/resources/referrals.en.ts +21 -18
- package/templates/saas/i18n/engine/resources/referrals.fr.ts +21 -18
- package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.en.ts +0 -80
- package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.fr.ts +0 -80
- package/templates/saas/i18n/engine/resources/relationshipInvitations.en.ts +0 -89
- package/templates/saas/i18n/engine/resources/relationshipInvitations.fr.ts +0 -89
- package/templates/saas/i18n/engine/resources/relationshipMailboxes.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/relationshipMailboxes.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/representativeAssignments.en.ts +108 -112
- package/templates/saas/i18n/engine/resources/representativeAssignments.fr.ts +108 -112
- package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.en.ts +8 -21
- package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.fr.ts +8 -21
- package/templates/saas/i18n/engine/resources/signatureRequestSigners.en.ts +141 -0
- package/templates/saas/i18n/engine/resources/signatureRequestSigners.fr.ts +141 -0
- package/templates/saas/i18n/engine/resources/signatureRequests.en.ts +205 -0
- package/templates/saas/i18n/engine/resources/signatureRequests.fr.ts +205 -0
- package/templates/saas/i18n/engine/resources/smsNumberAssignments.en.ts +101 -0
- package/templates/saas/i18n/engine/resources/smsNumberAssignments.fr.ts +101 -0
- package/templates/saas/i18n/engine/resources/smsOptOuts.en.ts +166 -0
- package/templates/saas/i18n/engine/resources/smsOptOuts.fr.ts +166 -0
- package/templates/saas/i18n/engine/resources/smsProviderEvents.en.ts +195 -0
- package/templates/saas/i18n/engine/resources/smsProviderEvents.fr.ts +195 -0
- package/templates/saas/i18n/engine/resources/ssoDomainReservations.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/ssoDomainReservations.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.en.ts +3 -39
- package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.fr.ts +0 -36
- package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.en.ts +0 -3
- package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.fr.ts +0 -3
- package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.en.ts +0 -6
- package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.fr.ts +0 -6
- package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.en.ts +3 -21
- package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.en.ts +3 -33
- package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.en.ts +13 -43
- package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/userCredentials.en.ts +3 -87
- package/templates/saas/i18n/engine/resources/userCredentials.fr.ts +0 -84
- package/templates/saas/i18n/engine/resources/userFeatures.en.ts +0 -12
- package/templates/saas/i18n/engine/resources/userFeatures.fr.ts +0 -12
- package/templates/saas/i18n/engine/resources/userFlowActorExecutions.en.ts +25 -160
- package/templates/saas/i18n/engine/resources/userFlowActorExecutions.fr.ts +25 -160
- package/templates/saas/i18n/engine/resources/userFlowActorTasks.en.ts +6 -28
- package/templates/saas/i18n/engine/resources/userFlowActorTasks.fr.ts +8 -30
- package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.en.ts +13 -18
- package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.fr.ts +13 -18
- package/templates/saas/i18n/engine/resources/userGuidanceState.en.ts +3 -18
- package/templates/saas/i18n/engine/resources/userGuidanceState.fr.ts +0 -15
- package/templates/saas/i18n/engine/resources/userIdentityLinks.en.ts +13 -40
- package/templates/saas/i18n/engine/resources/userIdentityLinks.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/userLifecycleState.en.ts +0 -15
- package/templates/saas/i18n/engine/resources/userLifecycleState.fr.ts +0 -15
- package/templates/saas/i18n/engine/resources/userNotificationBadges.en.ts +3 -36
- package/templates/saas/i18n/engine/resources/userNotificationBadges.fr.ts +0 -33
- package/templates/saas/i18n/engine/resources/userPreferences.en.ts +8 -60
- package/templates/saas/i18n/engine/resources/userPreferences.fr.ts +8 -60
- package/templates/saas/i18n/engine/resources/userProfiles.en.ts +5 -56
- package/templates/saas/i18n/engine/resources/userProfiles.fr.ts +0 -51
- package/templates/saas/i18n/engine/resources/userProgressionState.en.ts +1 -17
- package/templates/saas/i18n/engine/resources/userProgressionState.fr.ts +1 -17
- package/templates/saas/i18n/engine/resources/userProviderCredentials.en.ts +0 -52
- package/templates/saas/i18n/engine/resources/userProviderCredentials.fr.ts +0 -52
- package/templates/saas/i18n/engine/resources/userSelfPreferences.en.ts +8 -56
- package/templates/saas/i18n/engine/resources/userSelfPreferences.fr.ts +8 -56
- package/templates/saas/i18n/engine/resources/userSelfProfiles.en.ts +5 -61
- package/templates/saas/i18n/engine/resources/userSelfProfiles.fr.ts +0 -56
- package/templates/saas/i18n/engine/resources/user_self.en.ts +37 -214
- package/templates/saas/i18n/engine/resources/user_self.fr.ts +37 -214
- package/templates/saas/i18n/engine/resources/users.en.ts +53 -180
- package/templates/saas/i18n/engine/resources/users.fr.ts +53 -180
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/Dockerfile +4 -1
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/plugins/api-reference-pages.ts +9 -1
- package/templates/saas/scenarios/add-website/files/website/Dockerfile +4 -1
- package/templates/saas/scenarios/add-website/files/website/astro.config.ts.hbs +4 -0
- package/templates/saas/scenarios/add-website/files/website/package.json.hbs +1 -1
- package/templates/saas/scenarios/add-worker-node/files/workers/__workerDir__/Dockerfile.hbs +3 -1
- package/templates/saas/skeleton/backend-api/Dockerfile +5 -2
- package/templates/saas/skeleton/frontend/Dockerfile +4 -1
- package/templates/saas/skeleton/frontend/vite-engine-dependency-prebundle.ts +10 -1
- package/templates/saas/skeleton/frontend/vite.config.ts.hbs +14 -3
- package/wildo-framework.info.json +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { ApprovalSealsAdminEndpointPath } from '@wildo-ai/saas-backend-lib';
|
|
3
|
+
import { ApprovalSealSubjectCurrency, HttpMethod, HumanDecision_PresentedFieldCurrency } from '@wildo-ai/saas-models';
|
|
4
|
+
import { BaseCommand } from '../../kernel/base-command.js';
|
|
5
|
+
import { JsonDocumentLayout, writeJsonDocument } from '../../kernel/json-document-output.js';
|
|
6
|
+
import { CommandCategory } from '../../kernel/types.js';
|
|
7
|
+
import { callApprovalSealDoor } from './seal-admin-door.utils.js';
|
|
8
|
+
/**
|
|
9
|
+
* `wildo seal currency <sealId>` — whether one approval is still CURRENT over the record it is about (#2914), asked of the
|
|
10
|
+
* locally-running application: the values of the fields the approval covers (its tool's `sealedRecordFields`), as the
|
|
11
|
+
* seal's presentation carries them, against the record as it is now. Exits 0 only when CURRENT, so a script can gate on
|
|
12
|
+
* it. Names which fields moved, never a value.
|
|
13
|
+
*/
|
|
14
|
+
export default class SealCurrencyCommand extends BaseCommand {
|
|
15
|
+
meta = {
|
|
16
|
+
name: 'seal currency',
|
|
17
|
+
description: 'Whether one approval seal of the locally-running application is still current over the record it is about (exit 0 only when current).',
|
|
18
|
+
category: CommandCategory.Local,
|
|
19
|
+
args: [{ name: 'sealId', description: 'The seal\'s id (a record that stores its approval names it, e.g. a close\'s signOffApprovalSealId).', required: true }],
|
|
20
|
+
flags: {
|
|
21
|
+
json: { type: 'boolean', description: 'Print the answer as JSON.' },
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
async run(ctx) {
|
|
25
|
+
const sealId = ctx.args.sealId;
|
|
26
|
+
if (!sealId) {
|
|
27
|
+
ctx.log.error('Missing required <sealId> argument.');
|
|
28
|
+
return { success: false };
|
|
29
|
+
}
|
|
30
|
+
const body = await callApprovalSealDoor(ctx, 'currency', { method: HttpMethod.POST, path: ApprovalSealsAdminEndpointPath.CURRENCY, body: { sealId } });
|
|
31
|
+
if (!body)
|
|
32
|
+
return { success: false };
|
|
33
|
+
const result = body;
|
|
34
|
+
const current = result.standing === ApprovalSealSubjectCurrency.CURRENT;
|
|
35
|
+
if (ctx.flags.json === true) {
|
|
36
|
+
writeJsonDocument(result, JsonDocumentLayout.INDENTED);
|
|
37
|
+
return { success: current };
|
|
38
|
+
}
|
|
39
|
+
const record = result.subject ? `${result.subject.resourceType}/${result.subject.resourceId}` : 'its record';
|
|
40
|
+
const moved = (result.fields ?? []).filter((field) => field.currency !== HumanDecision_PresentedFieldCurrency.CURRENT).map((field) => `${field.key} ${field.currency}`);
|
|
41
|
+
if (current)
|
|
42
|
+
ctx.log.info(`${chalk.green('CURRENT')} — every value ${result.sealId} approved still holds on ${record}.`);
|
|
43
|
+
else if (result.standing === ApprovalSealSubjectCurrency.NO_LONGER_CURRENT)
|
|
44
|
+
ctx.log.info(`${chalk.yellow('NO LONGER CURRENT')} — ${record} changed since ${result.sealId}: ${moved.join(', ')}.`);
|
|
45
|
+
else if (result.standing === ApprovalSealSubjectCurrency.SUBJECT_GONE)
|
|
46
|
+
ctx.log.info(`${chalk.yellow('SUBJECT GONE')} — ${record}, which ${result.sealId} approved, cannot be found.`);
|
|
47
|
+
else
|
|
48
|
+
ctx.log.info(`${chalk.dim('NO SEALED FIELD SET')} — ${result.sealId} covers no record field: its tool declares no sealedRecordFields, or its presentation is not available.`);
|
|
49
|
+
return { success: current };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=currency.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currency.command.js","sourceRoot":"","sources":["../../../../src/commands/seal/currency.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAA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AC7L,IAAI,MAAM,CAAC,QAAQ,KAAK,2BAA2B,CAAC,YAAY;YAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,MAAM,WAAW,MAAM,CAAC,MAAM,6BAA6B,CAAC,CAAC;;YACjL,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,qBAAqB,CAAC,MAAM,MAAM,CAAC,MAAM,yGAAyG,CAAC,CAAC;QACnL,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC9B,CAAC;CACF","sourcesContent":["import chalk from 'chalk';\nimport { ApprovalSealsAdminEndpointPath, type ApprovalSealCurrencyResult } from '@wildo-ai/saas-backend-lib';\nimport { ApprovalSealSubjectCurrency, HttpMethod, HumanDecision_PresentedFieldCurrency } from '@wildo-ai/saas-models';\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { JsonDocumentLayout, writeJsonDocument } from '~wildo-cli/kernel/json-document-output';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { callApprovalSealDoor } from './seal-admin-door.utils';\n\n/**\n * `wildo seal currency <sealId>` — whether one approval is still CURRENT over the record it is about (#2914), asked of the\n * locally-running application: the values of the fields the approval covers (its tool's `sealedRecordFields`), as the\n * seal's presentation carries them, against the record as it is now. Exits 0 only when CURRENT, so a script can gate on\n * it. Names which fields moved, never a value.\n */\nexport default class SealCurrencyCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'seal currency',\n description: 'Whether one approval seal of the locally-running application is still current over the record it is about (exit 0 only when current).',\n category: CommandCategory.Local,\n args: [{ name: 'sealId', description: 'The seal\\'s id (a record that stores its approval names it, e.g. a close\\'s signOffApprovalSealId).', required: true }],\n flags: {\n json: { type: 'boolean', description: 'Print the answer as JSON.' },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const sealId = ctx.args.sealId;\n if (!sealId) {\n ctx.log.error('Missing required <sealId> argument.');\n return { success: false };\n }\n const body = await callApprovalSealDoor(ctx, 'currency', { method: HttpMethod.POST, path: ApprovalSealsAdminEndpointPath.CURRENCY, body: { sealId } });\n if (!body) return { success: false };\n const result = body as unknown as ApprovalSealCurrencyResult;\n const current = result.standing === ApprovalSealSubjectCurrency.CURRENT;\n if (ctx.flags.json === true) {\n writeJsonDocument(result, JsonDocumentLayout.INDENTED);\n return { success: current };\n }\n const record = result.subject ? `${result.subject.resourceType}/${result.subject.resourceId}` : 'its record';\n const moved = (result.fields ?? []).filter((field) => field.currency !== HumanDecision_PresentedFieldCurrency.CURRENT).map((field) => `${field.key} ${field.currency}`);\n if (current) ctx.log.info(`${chalk.green('CURRENT')} — every value ${result.sealId} approved still holds on ${record}.`);\n else if (result.standing === ApprovalSealSubjectCurrency.NO_LONGER_CURRENT) ctx.log.info(`${chalk.yellow('NO LONGER CURRENT')} — ${record} changed since ${result.sealId}: ${moved.join(', ')}.`);\n else if (result.standing === ApprovalSealSubjectCurrency.SUBJECT_GONE) ctx.log.info(`${chalk.yellow('SUBJECT GONE')} — ${record}, which ${result.sealId} approved, cannot be found.`);\n else ctx.log.info(`${chalk.dim('NO SEALED FIELD SET')} — ${result.sealId} covers no record field: its tool declares no sealedRecordFields, or its presentation is not available.`);\n return { success: current };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seal-admin-door.utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/seal/seal-admin-door.utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"seal-admin-door.utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/seal/seal-admin-door.utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AA4B9D;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAC7H,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CA8CzC"}
|
|
@@ -21,6 +21,8 @@ function describeRefusal(status, verb) {
|
|
|
21
21
|
return 'the admin secret was refused: the stored secret and the running backend\'s differ — restart the backend after `wildo config sync`.';
|
|
22
22
|
if (status === 404)
|
|
23
23
|
return 'no approval seal has that id.';
|
|
24
|
+
if (status === 409 && verb === 'currency')
|
|
25
|
+
return 'the seal\'s presentation file is unreadable or not the one its row recorded (see the body).';
|
|
24
26
|
if (status === 409) {
|
|
25
27
|
return verb === 'export'
|
|
26
28
|
? 'that seal cannot be exported: it is not SEALED yet, its key record is not held, or its presentation file is missing or not the one its row recorded (see the body).'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seal-admin-door.utils.js","sourceRoot":"","sources":["../../../../src/commands/seal/seal-admin-door.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,mCAAmC,EAAE,uCAAuC,EAAE,MAAM,4BAA4B,CAAC;AAG1H,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE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saas-models';\nimport { ApprovalSealsAdminEndpointHeaderKey, ApprovalSealsAdminEndpointMountBasePath } from '@wildo-ai/saas-backend-lib';\n\nimport type { CommandContext } from '~wildo-cli/kernel/types';\nimport { ensureSaasAppScope } from '~wildo-cli/kernel/command-scope-utils';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { resolveBackendBaseUrl } from '../context/pipelines.command';\n\n/** A seal door call is one small read or one re-drive; a backend slower than this is not answering. */\nconst SEAL_DOOR_TIMEOUT_MS = 30_000;\n\n/** What a refusal of the approval-seal door means. */\nfunction describeRefusal(status: number, verb: string): string {\n if (verb === 'log-export') {\n if (status === 503) return 'the backend has no admin secret configured (APPLICATION_ADMIN_SECRET), or the custodian cannot sign yet (see the code in the body); ask again later.';\n if (status === 409) return 'the custodian refused the export (see the code in the body: an unpinned export key, a range past the head), or the application does not hold the export key\\'s record yet.';\n }\n if (status === 503) return 'the backend has no admin secret configured (APPLICATION_ADMIN_SECRET): run `wildo config sync` and restart it.';\n if (status === 401) return 'the admin secret was refused: the stored secret and the running backend\\'s differ — restart the backend after `wildo config sync`.';\n if (status === 404) return 'no approval seal has that id.';\n if (status === 409) {\n return verb === 'export'\n ? 'that seal cannot be exported: it is not SEALED yet, its key record is not held, or its presentation file is missing or not the one its row recorded (see the body).'\n : 'that seal is not DEAD: only a DEAD seal is re-driven (a PENDING one is the relay\\'s, a SEALED one is final).';\n }\n if (status === 400) return 'the request was refused as invalid (see the body).';\n return 'the backend answered with an error (see the body).';\n}\n\n/**\n * Call the running application backend's approval-seal operator door (#2903) with the active LOCAL environment's admin\n * secret, the one the backend receives as `APPLICATION_ADMIN_SECRET`. Answers the JSON body, or null after logging why\n * nothing was read, never an empty answer standing for a failure.\n */\nexport async function callApprovalSealDoor(\n ctx: CommandContext,\n verb: string,\n request: { readonly method: HttpMethod.GET | HttpMethod.POST; readonly path: string; readonly body?: Record<string, unknown> },\n): Promise<Record<string, unknown> | null> {\n if (!ensureSaasAppScope(ctx)) return null;\n const env = ctx.activeEnv;\n if (!env) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return null;\n }\n if (env.locationType === WildoLocationType.REMOTE) {\n ctx.log.error(`\\`wildo seal ${verb}\\` calls the LOCALLY-running backend; the active environment is remote.`);\n return null;\n }\n const secret = EnvironmentUtils.loadSecretsJson(env.name)?.application?.adminSecret;\n if (!secret) {\n ctx.log.error(`No application admin secret is stored for '${env.name}'. Run \\`wildo config sync\\`, then restart the application.`);\n return null;\n }\n const baseUrl = await resolveBackendBaseUrl(ctx.cliContext.resolvedHomes.app.declarationRoot!);\n if (!baseUrl) {\n ctx.log.error('Could not resolve the application backend\\'s local address: no backend service declares a port.');\n return null;\n }\n const url = `${baseUrl.replace(/\\/$/, '')}${ApprovalSealsAdminEndpointMountBasePath}${request.path}`;\n let response: Response;\n try {\n response = await fetch(url, {\n method: request.method,\n headers: { [ApprovalSealsAdminEndpointHeaderKey]: secret, ...(request.body ? { 'content-type': 'application/json' } : {}) },\n ...(request.body ? { body: JSON.stringify(request.body) } : {}),\n signal: AbortSignal.timeout(SEAL_DOOR_TIMEOUT_MS),\n });\n } catch (error) {\n ctx.log.error(`${chalk.red('unreachable')} — application backend at ${baseUrl}: ${ErrorUtils.extractErrorMessage(error)}`);\n ctx.log.error('Start the stack with `wildo local dev` from the application root. Nothing was done.');\n return null;\n }\n const body = await response.json().catch(() => null) as Record<string, unknown> | null;\n if (!response.ok) {\n ctx.log.error(`${chalk.yellow(`HTTP ${response.status}`)} — ${request.path}: ${describeRefusal(response.status, verb)}`);\n if (body) ctx.log.error(JSON.stringify(body, null, 2));\n return null;\n }\n if (body === null) {\n ctx.log.error(`${chalk.yellow('unexpected answer')} — ${url} answered ${response.status} without a JSON body: is that the application backend?`);\n return null;\n }\n return body;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"seal-admin-door.utils.js","sourceRoot":"","sources":["../../../../src/commands/seal/seal-admin-door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AAC;IACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,mBAAmB,CAAC,MAAM,GAAG,aAAa,QAAQ,CAAC,MAAM,wDAAwD,CAAC,CAAC;QACjJ,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import chalk from 'chalk';\nimport { WildoLocationType } from '@wildo-ai/platform-config-lib';\nimport { HttpMethod } from '@wildo-ai/saas-models';\nimport { ApprovalSealsAdminEndpointHeaderKey, ApprovalSealsAdminEndpointMountBasePath } from '@wildo-ai/saas-backend-lib';\n\nimport type { CommandContext } from '~wildo-cli/kernel/types';\nimport { ensureSaasAppScope } from '~wildo-cli/kernel/command-scope-utils';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { resolveBackendBaseUrl } from '../context/pipelines.command';\n\n/** A seal door call is one small read or one re-drive; a backend slower than this is not answering. */\nconst SEAL_DOOR_TIMEOUT_MS = 30_000;\n\n/** What a refusal of the approval-seal door means. */\nfunction describeRefusal(status: number, verb: string): string {\n if (verb === 'log-export') {\n if (status === 503) return 'the backend has no admin secret configured (APPLICATION_ADMIN_SECRET), or the custodian cannot sign yet (see the code in the body); ask again later.';\n if (status === 409) return 'the custodian refused the export (see the code in the body: an unpinned export key, a range past the head), or the application does not hold the export key\\'s record yet.';\n }\n if (status === 503) return 'the backend has no admin secret configured (APPLICATION_ADMIN_SECRET): run `wildo config sync` and restart it.';\n if (status === 401) return 'the admin secret was refused: the stored secret and the running backend\\'s differ — restart the backend after `wildo config sync`.';\n if (status === 404) return 'no approval seal has that id.';\n if (status === 409 && verb === 'currency') return 'the seal\\'s presentation file is unreadable or not the one its row recorded (see the body).';\n if (status === 409) {\n return verb === 'export'\n ? 'that seal cannot be exported: it is not SEALED yet, its key record is not held, or its presentation file is missing or not the one its row recorded (see the body).'\n : 'that seal is not DEAD: only a DEAD seal is re-driven (a PENDING one is the relay\\'s, a SEALED one is final).';\n }\n if (status === 400) return 'the request was refused as invalid (see the body).';\n return 'the backend answered with an error (see the body).';\n}\n\n/**\n * Call the running application backend's approval-seal operator door (#2903) with the active LOCAL environment's admin\n * secret, the one the backend receives as `APPLICATION_ADMIN_SECRET`. Answers the JSON body, or null after logging why\n * nothing was read, never an empty answer standing for a failure.\n */\nexport async function callApprovalSealDoor(\n ctx: CommandContext,\n verb: string,\n request: { readonly method: HttpMethod.GET | HttpMethod.POST; readonly path: string; readonly body?: Record<string, unknown> },\n): Promise<Record<string, unknown> | null> {\n if (!ensureSaasAppScope(ctx)) return null;\n const env = ctx.activeEnv;\n if (!env) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return null;\n }\n if (env.locationType === WildoLocationType.REMOTE) {\n ctx.log.error(`\\`wildo seal ${verb}\\` calls the LOCALLY-running backend; the active environment is remote.`);\n return null;\n }\n const secret = EnvironmentUtils.loadSecretsJson(env.name)?.application?.adminSecret;\n if (!secret) {\n ctx.log.error(`No application admin secret is stored for '${env.name}'. Run \\`wildo config sync\\`, then restart the application.`);\n return null;\n }\n const baseUrl = await resolveBackendBaseUrl(ctx.cliContext.resolvedHomes.app.declarationRoot!);\n if (!baseUrl) {\n ctx.log.error('Could not resolve the application backend\\'s local address: no backend service declares a port.');\n return null;\n }\n const url = `${baseUrl.replace(/\\/$/, '')}${ApprovalSealsAdminEndpointMountBasePath}${request.path}`;\n let response: Response;\n try {\n response = await fetch(url, {\n method: request.method,\n headers: { [ApprovalSealsAdminEndpointHeaderKey]: secret, ...(request.body ? { 'content-type': 'application/json' } : {}) },\n ...(request.body ? { body: JSON.stringify(request.body) } : {}),\n signal: AbortSignal.timeout(SEAL_DOOR_TIMEOUT_MS),\n });\n } catch (error) {\n ctx.log.error(`${chalk.red('unreachable')} — application backend at ${baseUrl}: ${ErrorUtils.extractErrorMessage(error)}`);\n ctx.log.error('Start the stack with `wildo local dev` from the application root. Nothing was done.');\n return null;\n }\n const body = await response.json().catch(() => null) as Record<string, unknown> | null;\n if (!response.ok) {\n ctx.log.error(`${chalk.yellow(`HTTP ${response.status}`)} — ${request.path}: ${describeRefusal(response.status, verb)}`);\n if (body) ctx.log.error(JSON.stringify(body, null, 2));\n return null;\n }\n if (body === null) {\n ctx.log.error(`${chalk.yellow('unexpected answer')} — ${url} answered ${response.status} without a JSON body: is that the application backend?`);\n return null;\n }\n return body;\n}\n"]}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
import { type ApprovalSealVerificationBundle, type ApprovalSealVerificationInput } from '@wildo-ai/platform-config-lib';
|
|
1
2
|
import { BaseCommand } from '../../kernel/base-command';
|
|
2
3
|
import type { CommandMeta, CommandContext, CommandResult } from '../../kernel/types';
|
|
4
|
+
/**
|
|
5
|
+
* The vendor-signed copies to verify (#2907): each given file paired with the bundle entry whose recorded hash it has,
|
|
6
|
+
* so the entry's stated lineage is checked with it and the verifier can say the host records that exact copy. A host
|
|
7
|
+
* whose file row for a copy is gone names it with no hash: when exactly one such entry and exactly one unpaired file
|
|
8
|
+
* remain, they are paired, so the entry's lineage is still checked (the copy is then reported not recorded, since no
|
|
9
|
+
* hash ties those bytes to the row). Any other given file is checked from its bytes alone and reported with no file id
|
|
10
|
+
* and not recorded. Every named entry no file was paired with is passed as it is, and reported not given.
|
|
11
|
+
*/
|
|
12
|
+
export declare function vendorSignedCopyInputsOf(named: NonNullable<ApprovalSealVerificationBundle['vendorSignedCopies']>, given: readonly Buffer[]): NonNullable<ApprovalSealVerificationInput['vendorSignedCopies']>;
|
|
3
13
|
/**
|
|
4
14
|
* `wildo seal verify <bundle.json>` — verify one approval seal OFFLINE (#2903): the bundle carries the compact JWS, the
|
|
5
15
|
* stored records of the keys that may have signed it (scope and issuer included, as an export carries them), and
|
|
@@ -19,6 +29,19 @@ import type { CommandMeta, CommandContext, CommandResult } from '../../kernel/ty
|
|
|
19
29
|
* JWS attached. `--manifested-copy <path>` checks it: rebuilt from its own prefix, the JWS and the disclosed approver's
|
|
20
30
|
* name, then its prefix opened against the seal's commitment. One changed byte in the approval page and the seal does
|
|
21
31
|
* not verify. A copy the approver's erasure deleted is reported as erased content, never as missing.
|
|
32
|
+
*
|
|
33
|
+
* The same original may also have VENDOR-SIGNED COPIES (#2907's document chain, #2293): the bundle names each with the
|
|
34
|
+
* file its row says it derives from. `--vendor-signed-copy <path>` (repeatable) checks one: its first revision, ending at
|
|
35
|
+
* a `%%EOF`, must be the approved file, and the command reports which original it derives from. A copy whose row names
|
|
36
|
+
* another original, whose bytes are not the ones its row hashed, or that does not start with the approved file, fails
|
|
37
|
+
* the seal. Only a copy the host RECORDS (named, with these exact bytes) is reported as the signed copy whose vendor
|
|
38
|
+
* signature was validated at receipt (that evidence is the signature request's, not the seal's); a copy the host does
|
|
39
|
+
* not record is reported as starting with the approved file, and nothing more.
|
|
40
|
+
*
|
|
41
|
+
* Whether the approval is still CURRENT over its record (#2914): `--subject-record <record.json>` gives the record as it
|
|
42
|
+
* is now (its fields, as an export of the record states them; `null` for a record that is gone). The values of the
|
|
43
|
+
* fields the approval covers, as the disclosed presentation carries them, are compared with it. A record changed since
|
|
44
|
+
* is reported NO LONGER CURRENT and is not a failure: the seal still proves what was approved.
|
|
22
45
|
*/
|
|
23
46
|
export default class SealVerifyCommand extends BaseCommand {
|
|
24
47
|
readonly meta: CommandMeta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/seal/verify.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/seal/verify.command.ts"],"names":[],"mappings":"AAKA,OAAO,EAOL,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,EACnC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAG7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAK1F;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,WAAW,CAAC,8BAA8B,CAAC,oBAAoB,CAAC,CAAC,EACxE,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,WAAW,CAAC,6BAA6B,CAAC,oBAAoB,CAAC,CAAC,CAgBlE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAexB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAoKvD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
1
2
|
import { readFileSync } from 'node:fs';
|
|
2
3
|
import { resolve } from 'node:path';
|
|
3
4
|
import chalk from 'chalk';
|
|
4
|
-
import { CryptoKey_Purpose } from '@wildo-ai/saas-models';
|
|
5
|
+
import { ApprovalSealSubjectCurrency, CryptoKey_Purpose, HumanDecision_PresentedFieldCurrency } from '@wildo-ai/saas-models';
|
|
5
6
|
import { ApprovalSealCorroborationSchema, ApprovalSealCorroborationSource, ApprovalSealDeliverableFileStanding, ApprovalSealDisclosureStanding, ApprovalSealVerificationBundleSchema, verifyApprovalSeal, } from '@wildo-ai/platform-config-lib';
|
|
6
7
|
import { BaseCommand } from '../../kernel/base-command.js';
|
|
7
8
|
import { JsonDocumentLayout, writeJsonDocument } from '../../kernel/json-document-output.js';
|
|
@@ -9,6 +10,32 @@ import { CommandCategory } from '../../kernel/types.js';
|
|
|
9
10
|
import { ErrorUtils } from '../../infrastructure/errors/error.utils.js';
|
|
10
11
|
import { parseCsvFlag } from '../../kernel/flag-utils.js';
|
|
11
12
|
import { readPinSetsFile, readSigningLogExportFile } from './signing-log-files.utils.js';
|
|
13
|
+
/**
|
|
14
|
+
* The vendor-signed copies to verify (#2907): each given file paired with the bundle entry whose recorded hash it has,
|
|
15
|
+
* so the entry's stated lineage is checked with it and the verifier can say the host records that exact copy. A host
|
|
16
|
+
* whose file row for a copy is gone names it with no hash: when exactly one such entry and exactly one unpaired file
|
|
17
|
+
* remain, they are paired, so the entry's lineage is still checked (the copy is then reported not recorded, since no
|
|
18
|
+
* hash ties those bytes to the row). Any other given file is checked from its bytes alone and reported with no file id
|
|
19
|
+
* and not recorded. Every named entry no file was paired with is passed as it is, and reported not given.
|
|
20
|
+
*/
|
|
21
|
+
export function vendorSignedCopyInputsOf(named, given) {
|
|
22
|
+
const used = new Set();
|
|
23
|
+
const pairedWith = given.map((bytes) => {
|
|
24
|
+
const hash = createHash('sha256').update(bytes).digest('hex');
|
|
25
|
+
const index = named.findIndex((entry, at) => !used.has(at) && entry.contentSha256 === hash);
|
|
26
|
+
if (index >= 0)
|
|
27
|
+
used.add(index);
|
|
28
|
+
return index;
|
|
29
|
+
});
|
|
30
|
+
const unpairedFiles = pairedWith.flatMap((index, at) => (index < 0 ? [at] : []));
|
|
31
|
+
const hashlessEntries = named.flatMap((entry, at) => (!used.has(at) && entry.contentSha256 === undefined ? [at] : []));
|
|
32
|
+
if (unpairedFiles.length === 1 && hashlessEntries.length === 1) {
|
|
33
|
+
pairedWith[unpairedFiles[0]] = hashlessEntries[0];
|
|
34
|
+
used.add(hashlessEntries[0]);
|
|
35
|
+
}
|
|
36
|
+
const inputs = given.map((bytes, at) => (pairedWith[at] >= 0 ? { ...named[pairedWith[at]], bytes } : { bytes }));
|
|
37
|
+
return [...inputs, ...named.filter((_, at) => !used.has(at))];
|
|
38
|
+
}
|
|
12
39
|
/**
|
|
13
40
|
* `wildo seal verify <bundle.json>` — verify one approval seal OFFLINE (#2903): the bundle carries the compact JWS, the
|
|
14
41
|
* stored records of the keys that may have signed it (scope and issuer included, as an export carries them), and
|
|
@@ -28,11 +55,24 @@ import { readPinSetsFile, readSigningLogExportFile } from './signing-log-files.u
|
|
|
28
55
|
* JWS attached. `--manifested-copy <path>` checks it: rebuilt from its own prefix, the JWS and the disclosed approver's
|
|
29
56
|
* name, then its prefix opened against the seal's commitment. One changed byte in the approval page and the seal does
|
|
30
57
|
* not verify. A copy the approver's erasure deleted is reported as erased content, never as missing.
|
|
58
|
+
*
|
|
59
|
+
* The same original may also have VENDOR-SIGNED COPIES (#2907's document chain, #2293): the bundle names each with the
|
|
60
|
+
* file its row says it derives from. `--vendor-signed-copy <path>` (repeatable) checks one: its first revision, ending at
|
|
61
|
+
* a `%%EOF`, must be the approved file, and the command reports which original it derives from. A copy whose row names
|
|
62
|
+
* another original, whose bytes are not the ones its row hashed, or that does not start with the approved file, fails
|
|
63
|
+
* the seal. Only a copy the host RECORDS (named, with these exact bytes) is reported as the signed copy whose vendor
|
|
64
|
+
* signature was validated at receipt (that evidence is the signature request's, not the seal's); a copy the host does
|
|
65
|
+
* not record is reported as starting with the approved file, and nothing more.
|
|
66
|
+
*
|
|
67
|
+
* Whether the approval is still CURRENT over its record (#2914): `--subject-record <record.json>` gives the record as it
|
|
68
|
+
* is now (its fields, as an export of the record states them; `null` for a record that is gone). The values of the
|
|
69
|
+
* fields the approval covers, as the disclosed presentation carries them, are compared with it. A record changed since
|
|
70
|
+
* is reported NO LONGER CURRENT and is not a failure: the seal still proves what was approved.
|
|
31
71
|
*/
|
|
32
72
|
export default class SealVerifyCommand extends BaseCommand {
|
|
33
73
|
meta = {
|
|
34
74
|
name: 'seal verify',
|
|
35
|
-
description: 'Verify one approval seal offline from a bundle file ({ jws, keys, expectedIssuer?, disclosures?, erasedClaims?, deliverableFile?, manifestedCopy? }), with your own pins, kept exports, corroboration, the approved file and its
|
|
75
|
+
description: 'Verify one approval seal offline from a bundle file ({ jws, keys, expectedIssuer?, disclosures?, erasedClaims?, deliverableFile?, manifestedCopy?, vendorSignedCopies? }), with your own pins, kept exports, corroboration, the approved file, its manifested copy and its vendor-signed copies.',
|
|
36
76
|
category: CommandCategory.Core,
|
|
37
77
|
args: [{ name: 'bundle', description: 'Path to the JSON bundle.', required: true }],
|
|
38
78
|
flags: {
|
|
@@ -42,6 +82,8 @@ export default class SealVerifyCommand extends BaseCommand {
|
|
|
42
82
|
'signing-log-exports': { type: 'string[]', description: 'Signing-log exports the operator kept (`wildo seal log-export`), to corroborate a seal under a compromised key.' },
|
|
43
83
|
deliverable: { type: 'string', description: 'The file the seal attests as the approved deliverable (#2904): its bytes are checked against the seal\'s commitment.' },
|
|
44
84
|
'manifested-copy': { type: 'string', description: 'The approved deliverable\'s manifested copy (#2907): its approval page and attached seal are rebuilt and compared, and what precedes them checked against the seal\'s commitment.' },
|
|
85
|
+
'vendor-signed-copy': { type: 'string[]', description: 'Copies of the approved deliverable an electronic-signature vendor signed (#2907): each one\'s first revision is checked against the seal\'s commitment, and the original it derives from is reported.' },
|
|
86
|
+
'subject-record': { type: 'string', description: 'The record the approval is about, as it is now (a JSON object of its fields, or null when gone) (#2914): reports whether the approval is still current over it.' },
|
|
45
87
|
},
|
|
46
88
|
};
|
|
47
89
|
async run(ctx) {
|
|
@@ -93,6 +135,22 @@ export default class SealVerifyCommand extends BaseCommand {
|
|
|
93
135
|
}
|
|
94
136
|
input = { ...input, manifestedCopy: { ...(bundle.manifestedCopy ?? {}), bytes: readFileSync(resolve(process.cwd(), ctx.flags['manifested-copy'])) } };
|
|
95
137
|
}
|
|
138
|
+
const vendorCopyPaths = parseCsvFlag(ctx.flags['vendor-signed-copy']);
|
|
139
|
+
if (vendorCopyPaths) {
|
|
140
|
+
if (!bundle.deliverableFile) {
|
|
141
|
+
ctx.log.error('The bundle names no file deliverable: this seal attests no file a vendor could have signed a copy of.');
|
|
142
|
+
return { success: false };
|
|
143
|
+
}
|
|
144
|
+
input = { ...input, vendorSignedCopies: vendorSignedCopyInputsOf(bundle.vendorSignedCopies ?? [], vendorCopyPaths.map((copyPath) => readFileSync(resolve(process.cwd(), copyPath)))) };
|
|
145
|
+
}
|
|
146
|
+
if (typeof ctx.flags['subject-record'] === 'string') {
|
|
147
|
+
const record = JSON.parse(readFileSync(resolve(process.cwd(), ctx.flags['subject-record']), 'utf8'));
|
|
148
|
+
if (record !== null && (typeof record !== 'object' || Array.isArray(record))) {
|
|
149
|
+
ctx.log.error('The subject record must be a JSON object of the record\'s fields, or null for a record that is gone.');
|
|
150
|
+
return { success: false };
|
|
151
|
+
}
|
|
152
|
+
input = { ...input, subjectRecord: record };
|
|
153
|
+
}
|
|
96
154
|
if (exportPaths) {
|
|
97
155
|
const files = exportPaths.map(readSigningLogExportFile);
|
|
98
156
|
const exportPins = pinSets?.[CryptoKey_Purpose.SIGNING_LOG_EXPORT];
|
|
@@ -100,7 +158,7 @@ export default class SealVerifyCommand extends BaseCommand {
|
|
|
100
158
|
}
|
|
101
159
|
}
|
|
102
160
|
catch (error) {
|
|
103
|
-
ctx.log.error(`Cannot read the pin sets, the corroboration, the deliverable, the manifested copy or the signing-log exports: ${ErrorUtils.extractErrorMessage(error)}`);
|
|
161
|
+
ctx.log.error(`Cannot read the pin sets, the corroboration, the deliverable, the manifested copy, the subject record or the signing-log exports: ${ErrorUtils.extractErrorMessage(error)}`);
|
|
104
162
|
return { success: false };
|
|
105
163
|
}
|
|
106
164
|
const result = verifyApprovalSeal(input);
|
|
@@ -116,6 +174,14 @@ export default class SealVerifyCommand extends BaseCommand {
|
|
|
116
174
|
if (result.manifestedCopy?.standing === ApprovalSealDeliverableFileStanding.CHANGED) {
|
|
117
175
|
ctx.log.error(' manifested copy: the given file is NOT this seal\'s copy of the approved file (its approval page, attached seal or original differs)');
|
|
118
176
|
}
|
|
177
|
+
for (const copy of result.vendorSignedCopies ?? []) {
|
|
178
|
+
if (copy.standing === ApprovalSealDeliverableFileStanding.DERIVED_FROM_ANOTHER_FILE) {
|
|
179
|
+
ctx.log.error(` vendor-signed copy${copy.fileId ? ` ${copy.fileId}` : ''}: derived from ${copy.statedDerivedFromFileId}, NOT from the file this seal approved`);
|
|
180
|
+
}
|
|
181
|
+
else if (copy.standing === ApprovalSealDeliverableFileStanding.CHANGED) {
|
|
182
|
+
ctx.log.error(` vendor-signed copy${copy.fileId ? ` ${copy.fileId}` : ''}: does NOT start with the approved file (or is not the file its record names)`);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
119
185
|
return { success: false };
|
|
120
186
|
}
|
|
121
187
|
const claims = result.claims;
|
|
@@ -155,6 +221,25 @@ export default class SealVerifyCommand extends BaseCommand {
|
|
|
155
221
|
: chalk.dim('nothing to compare with: the approver, the presentation or the deliverable\'s salt is not disclosed');
|
|
156
222
|
ctx.log.info(` manifested copy${result.manifestedCopy.fileId ? ` ${result.manifestedCopy.fileId}` : ''}: ${described}`);
|
|
157
223
|
}
|
|
224
|
+
for (const copy of result.vendorSignedCopies ?? []) {
|
|
225
|
+
const described = copy.standing === ApprovalSealDeliverableFileStanding.MATCHES
|
|
226
|
+
? copy.recordedByHost
|
|
227
|
+
? chalk.green(`derived from the approved file ${copy.derivesFromFileId}: its first ${copy.originalLength} bytes are that file, and it is the signed copy the host recorded (the vendor's signature was validated at receipt; see the signature request's validation evidence)`)
|
|
228
|
+
: chalk.yellow(`starts with the approved file ${copy.derivesFromFileId} (its first ${copy.originalLength} bytes), but the host records no such copy: nothing here says what follows is a vendor's signature`)
|
|
229
|
+
: copy.standing === ApprovalSealDeliverableFileStanding.NOT_GIVEN ? chalk.yellow('not given (pass --vendor-signed-copy <file>)')
|
|
230
|
+
: chalk.dim('nothing to compare with: the presentation or the deliverable\'s salt is not disclosed');
|
|
231
|
+
ctx.log.info(` vendor-signed copy${copy.fileId ? ` ${copy.fileId}` : ''}: ${described}`);
|
|
232
|
+
}
|
|
233
|
+
if (result.subjectRecordCurrency) {
|
|
234
|
+
const currency = result.subjectRecordCurrency;
|
|
235
|
+
const record = currency.subject ? ` ${currency.subject.resourceType}/${currency.subject.resourceId}` : '';
|
|
236
|
+
const moved = (currency.fields ?? []).filter((field) => field.currency !== HumanDecision_PresentedFieldCurrency.CURRENT).map((field) => `${field.key} ${field.currency}`);
|
|
237
|
+
const described = currency.standing === ApprovalSealSubjectCurrency.CURRENT ? chalk.green('CURRENT — every value the approval covers still holds')
|
|
238
|
+
: currency.standing === ApprovalSealSubjectCurrency.NO_LONGER_CURRENT ? chalk.yellow(`NO LONGER CURRENT — ${moved.join(', ')}`)
|
|
239
|
+
: currency.standing === ApprovalSealSubjectCurrency.SUBJECT_GONE ? chalk.yellow('the record is gone')
|
|
240
|
+
: chalk.dim('nothing to compare with: the presentation is not disclosed, or the approval covers no record field');
|
|
241
|
+
ctx.log.info(` currency over the record${record}: ${described}`);
|
|
242
|
+
}
|
|
158
243
|
if (claims.statementDigest) {
|
|
159
244
|
ctx.log.info(` statement: ${result.statement?.standing === ApprovalSealDisclosureStanding.DISCLOSED ? JSON.stringify(result.statement.value) : undisclosed(result.statement?.standing, 'UNDISCLOSED (erased)')}`);
|
|
160
245
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.command.js","sourceRoot":"","sources":["../../../../src/commands/seal/verify.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,EAC/B,mCAAmC,EACnC,8BAA8B,EAC9B,oCAAoC,EACpC,kBAAkB,GAEnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAA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cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC,CAAC;QAC3H,CAAC;QACD,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;YAC3B,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,MAAM,CAAC,SAAS,EAAE,QAAQ,KAAK,8BAA8B,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE,QAAQ,EAAE,sBAAsB,CAAC,EAAE,CAAC,CAAC;QACrN,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,yHAAyH,CAAC,CAAC,CAAC;YACtJ,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,iFAAiF,CAAC,CAAC,CAAC;QAChH,CAAC;QACD,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YAC1B,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,sBAAsB,MAAM,CAAC,cAAc,KAAK,+BAA+B,CAAC,kBAAkB,CAAC,CAAC,CAAC,mDAAmD,CAAC,CAAC,CAAC,yCAAyC,EAAE,CAAC,CAAC;QACvN,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,8BAA8B,MAAM,CAAC,qBAAqB,EAAE,CAAC,CAAC;QAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;CACF","sourcesContent":["import { readFileSync } from 'node:fs';\nimport { resolve } from 'node:path';\nimport chalk from 'chalk';\nimport { CryptoKey_Purpose } from '@wildo-ai/saas-models';\nimport {\n ApprovalSealCorroborationSchema,\n ApprovalSealCorroborationSource,\n ApprovalSealDeliverableFileStanding,\n ApprovalSealDisclosureStanding,\n ApprovalSealVerificationBundleSchema,\n verifyApprovalSeal,\n type ApprovalSealVerificationInput,\n} from '@wildo-ai/platform-config-lib';\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { JsonDocumentLayout, writeJsonDocument } from '~wildo-cli/kernel/json-document-output';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { parseCsvFlag } from '~wildo-cli/kernel/flag-utils';\nimport { readPinSetsFile, readSigningLogExportFile } from './signing-log-files.utils';\n\n/**\n * `wildo seal verify <bundle.json>` — verify one approval seal OFFLINE (#2903): the bundle carries the compact JWS, the\n * stored records of the keys that may have signed it (scope and issuer included, as an export carries them), and\n * optionally the disclosures. Nothing is called: it verifies after the application is gone. Exits non-zero on a seal\n * that does not verify, or one that is valid and not provable.\n *\n * The bundle is the host's file, so the operator adds what the host cannot vouch for itself (#2932): `--pins`, its pin\n * sets file (the seal key is trusted only when pinned, and its state is the pin's); `--signing-log-exports`, the exports\n * it kept, which corroborate a seal under a key compromised after an export that lists it; and `--corroboration`, a\n * decision digest recorded elsewhere before the compromise (an exported audit row, an immutable sink).\n *\n * A seal that attests a FILE deliverable (#2904) names it in the bundle with the salt its commitment was made with;\n * `--deliverable <path>` gives the file's bytes, checked against the commitment the presentation binds: one changed byte\n * and the seal does not verify. Without it the file is reported as not given.\n *\n * Such a deliverable may have a MANIFESTED COPY (#2907): the original followed by a page naming who approved it, with the\n * JWS attached. `--manifested-copy <path>` checks it: rebuilt from its own prefix, the JWS and the disclosed approver's\n * name, then its prefix opened against the seal's commitment. One changed byte in the approval page and the seal does\n * not verify. A copy the approver's erasure deleted is reported as erased content, never as missing.\n */\nexport default class SealVerifyCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'seal verify',\n description: 'Verify one approval seal offline from a bundle file ({ jws, keys, expectedIssuer?, disclosures?, erasedClaims?, deliverableFile?, manifestedCopy? }), with your own pins, kept exports, corroboration, the approved file and its manifested copy.',\n category: CommandCategory.Core,\n args: [{ name: 'bundle', description: 'Path to the JSON bundle.', required: true }],\n flags: {\n json: { type: 'boolean', description: 'Print the verification as JSON.' },\n pins: { type: 'string', description: 'The operator\\'s pin sets file ({ \"approval_seal\": { \"keys\": [...] }, \"signing_log_export\": ... }).' },\n corroboration: { type: 'string', description: 'A file { decisionPayloadDigest, recordedAt }: the decision\\'s digest, recorded outside the application before the compromise.' },\n 'signing-log-exports': { type: 'string[]', description: 'Signing-log exports the operator kept (`wildo seal log-export`), to corroborate a seal under a compromised key.' },\n deliverable: { type: 'string', description: 'The file the seal attests as the approved deliverable (#2904): its bytes are checked against the seal\\'s commitment.' },\n 'manifested-copy': { type: 'string', description: 'The approved deliverable\\'s manifested copy (#2907): its approval page and attached seal are rebuilt and compared, and what precedes them checked against the seal\\'s commitment.' },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const path = ctx.args.bundle;\n if (!path) {\n ctx.log.error('Missing required <bundle> argument.');\n return { success: false };\n }\n let bundle;\n try {\n bundle = ApprovalSealVerificationBundleSchema.parse(JSON.parse(readFileSync(resolve(process.cwd(), path), 'utf8')));\n } catch (error) {\n ctx.log.error(`Cannot read the bundle ${path}: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n // The bundle is the host's; the pins and the kept exports come only from the operator's own files (#2932 review H1).\n // A pin file that does not pin the purpose being checked is refused rather than silently ignored (review L1).\n let input: ApprovalSealVerificationInput = bundle;\n try {\n const pinSets = typeof ctx.flags.pins === 'string' ? readPinSetsFile(ctx.flags.pins) : undefined;\n const exportPaths = parseCsvFlag(ctx.flags['signing-log-exports']);\n if (pinSets) {\n const sealPins = pinSets[CryptoKey_Purpose.APPROVAL_SEAL];\n if (!sealPins) {\n ctx.log.error(`The pin sets file pins no ${CryptoKey_Purpose.APPROVAL_SEAL} key: nothing would be checked against it.`);\n return { success: false };\n }\n if (exportPaths && !pinSets[CryptoKey_Purpose.SIGNING_LOG_EXPORT]) {\n ctx.log.error(`The pin sets file pins no ${CryptoKey_Purpose.SIGNING_LOG_EXPORT} key: the exports could not be checked against it.`);\n return { success: false };\n }\n input = { ...input, pins: sealPins };\n }\n if (typeof ctx.flags.corroboration === 'string') {\n input = { ...input, corroboration: ApprovalSealCorroborationSchema.parse(JSON.parse(readFileSync(resolve(process.cwd(), ctx.flags.corroboration), 'utf8'))) };\n }\n if (typeof ctx.flags.deliverable === 'string') {\n if (!bundle.deliverableFile) {\n ctx.log.error('The bundle names no file deliverable: this seal attests no file to check the given one against.');\n return { success: false };\n }\n input = { ...input, deliverableFile: { ...bundle.deliverableFile, bytes: readFileSync(resolve(process.cwd(), ctx.flags.deliverable)) } };\n }\n if (typeof ctx.flags['manifested-copy'] === 'string') {\n if (!bundle.deliverableFile) {\n ctx.log.error('The bundle names no file deliverable: this seal attests no file a manifested copy could be made of.');\n return { success: false };\n }\n input = { ...input, manifestedCopy: { ...(bundle.manifestedCopy ?? {}), bytes: readFileSync(resolve(process.cwd(), ctx.flags['manifested-copy'])) } };\n }\n if (exportPaths) {\n const files = exportPaths.map(readSigningLogExportFile);\n const exportPins = pinSets?.[CryptoKey_Purpose.SIGNING_LOG_EXPORT];\n input = { ...input, signingLogExports: { exports: files.map((file) => file.jws), keys: files.map((file) => file.key), ...(exportPins ? { pins: exportPins } : {}) } };\n }\n } catch (error) {\n ctx.log.error(`Cannot read the pin sets, the corroboration, the deliverable, the manifested copy or the signing-log exports: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n const result = verifyApprovalSeal(input);\n if (ctx.flags.json === true) {\n writeJsonDocument(result, JsonDocumentLayout.INDENTED);\n return { success: result.valid && result.provable };\n }\n if (!result.valid) {\n ctx.log.error(`${chalk.red('NOT VALID')} — ${result.failures.join(', ')}`);\n if (result.deliverableFile?.standing === ApprovalSealDeliverableFileStanding.CHANGED) {\n ctx.log.error(` deliverable file ${result.deliverableFile.fileId}: the given bytes are NOT the file the person approved`);\n }\n if (result.manifestedCopy?.standing === ApprovalSealDeliverableFileStanding.CHANGED) {\n ctx.log.error(' manifested copy: the given file is NOT this seal\\'s copy of the approved file (its approval page, attached seal or original differs)');\n }\n return { success: false };\n }\n const claims = result.claims!;\n ctx.log.info(`${result.provable ? chalk.green('VALID') : chalk.yellow('VALID, NOT PROVABLE')} — ${claims.source} ${claims.decisionRef} · ${claims.outcome} (${claims.meaning})`);\n ctx.log.info(` subject: ${claims.subject.resourceType}/${claims.subject.resourceId} · tenant ${claims.tenant}`);\n ctx.log.info(` decided: ${new Date(claims.decidedAt * 1000).toISOString()} · signed ${result.signingWindowSeconds ?? '?'} s later${result.lateSeal ? chalk.yellow(' (late seal)') : ''} · key ${result.kid} (${result.keyState})`);\n ctx.log.info(` decider: ${claims.decider.kind} via ${claims.decider.channel}${claims.decider.amr ? ` · amr ${claims.decider.amr.join(',')}` : ''}${claims.decider.stepUpMethod ? ` · step-up ${claims.decider.stepUpMethod}` : ''}${claims.decider.stepUpAt !== undefined ? ` proven ${claims.decidedAt - claims.decider.stepUpAt} s before the decision` : ''}${claims.decider.stepUpUserVerified !== undefined ? ` · user ${claims.decider.stepUpUserVerified ? 'verified' : 'NOT verified'} by the authenticator` : ''}`);\n // #2924: content the seal commits to and the bundle does not give is never a failure. An erasure the bundle states\n // reads UNDISCLOSED (erased) (PRESENTATION_ERASED for what the person was shown); anything else absent, not given.\n const undisclosed = (standing: ApprovalSealDisclosureStanding | undefined, erased: string) =>\n standing === ApprovalSealDisclosureStanding.ERASED ? chalk.dim(erased) : chalk.dim('not given');\n const person = (label: string, standing: typeof result.approver) => {\n if (!standing) return;\n ctx.log.info(` ${label}: ${standing.standing === ApprovalSealDisclosureStanding.DISCLOSED ? JSON.stringify(standing.value) : undisclosed(standing.standing, 'UNDISCLOSED (erased)')}`);\n };\n person('approver', result.approver);\n person('requester', result.requester);\n // #2903 S6: what the person was shown, and what they answered, each against its commitment.\n if (claims.presentation) {\n const shown = result.presentation?.standing === ApprovalSealDisclosureStanding.DISCLOSED ? 'disclosed, matches the seal'\n : undisclosed(result.presentation?.standing, 'PRESENTATION_ERASED (an erasure rewrote the stored presentation; the seal still binds its digest)');\n ctx.log.info(` presentation: ${claims.presentation.provenance} · ${shown}`);\n }\n if (result.deliverableFile) {\n const standing = result.deliverableFile.standing;\n const described = standing === ApprovalSealDeliverableFileStanding.MATCHES ? chalk.green('the given bytes are the file approved')\n : standing === ApprovalSealDeliverableFileStanding.NOT_GIVEN ? chalk.yellow('not given (pass --deliverable <file>)')\n : chalk.dim('nothing to compare with: the presentation is not disclosed, or binds no such file');\n ctx.log.info(` deliverable file ${result.deliverableFile.fileId}${result.deliverableFile.argument ? ` (${result.deliverableFile.argument})` : ''}: ${described}`);\n }\n if (result.manifestedCopy) {\n const standing = result.manifestedCopy.standing;\n const described = standing === ApprovalSealDeliverableFileStanding.MATCHES\n ? chalk.green(`the approved file, with this seal's approval page${result.manifestedCopy.approverName ? ` naming ${result.manifestedCopy.approverName}` : ''}${result.manifestedCopy.locale ? ` (words: ${result.manifestedCopy.locale})` : ''}${result.manifestedCopy.verificationUrl ? `, QR code to ${result.manifestedCopy.verificationUrl}` : ''}`)\n : standing === ApprovalSealDeliverableFileStanding.CONTENT_ERASED ? chalk.dim('CONTENT_ERASED (deleted with the approver\\'s erasure; the seal and the original still prove the approval)')\n : standing === ApprovalSealDeliverableFileStanding.NOT_GIVEN ? chalk.yellow('not given (pass --manifested-copy <file>)')\n : chalk.dim('nothing to compare with: the approver, the presentation or the deliverable\\'s salt is not disclosed');\n ctx.log.info(` manifested copy${result.manifestedCopy.fileId ? ` ${result.manifestedCopy.fileId}` : ''}: ${described}`);\n }\n if (claims.statementDigest) {\n ctx.log.info(` statement: ${result.statement?.standing === ApprovalSealDisclosureStanding.DISCLOSED ? JSON.stringify(result.statement.value) : undisclosed(result.statement?.standing, 'UNDISCLOSED (erased)')}`);\n }\n if (!result.provable) {\n ctx.log.info(chalk.yellow(' The key is compromised: corroborate the decision payload digest with evidence recorded before its compromise instant,'));\n ctx.log.info(chalk.yellow(' or give a signing-log export you kept from before it (--signing-log-exports).'));\n }\n if (result.corroboratedBy) {\n ctx.log.info(` corroborated by: ${result.corroboratedBy === ApprovalSealCorroborationSource.SIGNING_LOG_EXPORT ? 'a signing-log export signed before the compromise' : 'evidence recorded before the compromise'}`);\n }\n ctx.log.info(` decision payload digest: ${result.decisionPayloadDigest}`);\n return { success: result.provable };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"verify.command.js","sourceRoot":"","sources":["../../../../src/commands/seal/verify.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,oCAAoC,EAAE,MAAM,uBAAuB,CAAC;AAC7H,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,EAC/B,mCAAmC,EACnC,8BAA8B,EAC9B,oCAAoC,EACpC,kBAAkB,GAGnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAEtF;;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AAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,iFAAiF,CAAC,CAAC,CAAC;QAChH,CAAC;QACD,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YAC1B,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,sBAAsB,MAAM,CAAC,cAAc,KAAK,+BAA+B,CAAC,kBAAkB,CAAC,CAAC,CAAC,mDAAmD,CAAC,CAAC,CAAC,yCAAyC,EAAE,CAAC,CAAC;QACvN,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,8BAA8B,MAAM,CAAC,qBAAqB,EAAE,CAAC,CAAC;QAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;CACF","sourcesContent":["import { createHash } from 'node:crypto';\nimport { readFileSync } from 'node:fs';\nimport { resolve } from 'node:path';\nimport chalk from 'chalk';\nimport { ApprovalSealSubjectCurrency, CryptoKey_Purpose, HumanDecision_PresentedFieldCurrency } from '@wildo-ai/saas-models';\nimport {\n ApprovalSealCorroborationSchema,\n ApprovalSealCorroborationSource,\n ApprovalSealDeliverableFileStanding,\n ApprovalSealDisclosureStanding,\n ApprovalSealVerificationBundleSchema,\n verifyApprovalSeal,\n type ApprovalSealVerificationBundle,\n type ApprovalSealVerificationInput,\n} from '@wildo-ai/platform-config-lib';\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { JsonDocumentLayout, writeJsonDocument } from '~wildo-cli/kernel/json-document-output';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { parseCsvFlag } from '~wildo-cli/kernel/flag-utils';\nimport { readPinSetsFile, readSigningLogExportFile } from './signing-log-files.utils';\n\n/**\n * The vendor-signed copies to verify (#2907): each given file paired with the bundle entry whose recorded hash it has,\n * so the entry's stated lineage is checked with it and the verifier can say the host records that exact copy. A host\n * whose file row for a copy is gone names it with no hash: when exactly one such entry and exactly one unpaired file\n * remain, they are paired, so the entry's lineage is still checked (the copy is then reported not recorded, since no\n * hash ties those bytes to the row). Any other given file is checked from its bytes alone and reported with no file id\n * and not recorded. Every named entry no file was paired with is passed as it is, and reported not given.\n */\nexport function vendorSignedCopyInputsOf(\n named: NonNullable<ApprovalSealVerificationBundle['vendorSignedCopies']>,\n given: readonly Buffer[],\n): NonNullable<ApprovalSealVerificationInput['vendorSignedCopies']> {\n const used = new Set<number>();\n const pairedWith = given.map((bytes) => {\n const hash = createHash('sha256').update(bytes).digest('hex');\n const index = named.findIndex((entry, at) => !used.has(at) && entry.contentSha256 === hash);\n if (index >= 0) used.add(index);\n return index;\n });\n const unpairedFiles = pairedWith.flatMap((index, at) => (index < 0 ? [at] : []));\n const hashlessEntries = named.flatMap((entry, at) => (!used.has(at) && entry.contentSha256 === undefined ? [at] : []));\n if (unpairedFiles.length === 1 && hashlessEntries.length === 1) {\n pairedWith[unpairedFiles[0]!] = hashlessEntries[0]!;\n used.add(hashlessEntries[0]!);\n }\n const inputs = given.map((bytes, at) => (pairedWith[at]! >= 0 ? { ...named[pairedWith[at]!]!, bytes } : { bytes }));\n return [...inputs, ...named.filter((_, at) => !used.has(at))];\n}\n\n/**\n * `wildo seal verify <bundle.json>` — verify one approval seal OFFLINE (#2903): the bundle carries the compact JWS, the\n * stored records of the keys that may have signed it (scope and issuer included, as an export carries them), and\n * optionally the disclosures. Nothing is called: it verifies after the application is gone. Exits non-zero on a seal\n * that does not verify, or one that is valid and not provable.\n *\n * The bundle is the host's file, so the operator adds what the host cannot vouch for itself (#2932): `--pins`, its pin\n * sets file (the seal key is trusted only when pinned, and its state is the pin's); `--signing-log-exports`, the exports\n * it kept, which corroborate a seal under a key compromised after an export that lists it; and `--corroboration`, a\n * decision digest recorded elsewhere before the compromise (an exported audit row, an immutable sink).\n *\n * A seal that attests a FILE deliverable (#2904) names it in the bundle with the salt its commitment was made with;\n * `--deliverable <path>` gives the file's bytes, checked against the commitment the presentation binds: one changed byte\n * and the seal does not verify. Without it the file is reported as not given.\n *\n * Such a deliverable may have a MANIFESTED COPY (#2907): the original followed by a page naming who approved it, with the\n * JWS attached. `--manifested-copy <path>` checks it: rebuilt from its own prefix, the JWS and the disclosed approver's\n * name, then its prefix opened against the seal's commitment. One changed byte in the approval page and the seal does\n * not verify. A copy the approver's erasure deleted is reported as erased content, never as missing.\n *\n * The same original may also have VENDOR-SIGNED COPIES (#2907's document chain, #2293): the bundle names each with the\n * file its row says it derives from. `--vendor-signed-copy <path>` (repeatable) checks one: its first revision, ending at\n * a `%%EOF`, must be the approved file, and the command reports which original it derives from. A copy whose row names\n * another original, whose bytes are not the ones its row hashed, or that does not start with the approved file, fails\n * the seal. Only a copy the host RECORDS (named, with these exact bytes) is reported as the signed copy whose vendor\n * signature was validated at receipt (that evidence is the signature request's, not the seal's); a copy the host does\n * not record is reported as starting with the approved file, and nothing more.\n *\n * Whether the approval is still CURRENT over its record (#2914): `--subject-record <record.json>` gives the record as it\n * is now (its fields, as an export of the record states them; `null` for a record that is gone). The values of the\n * fields the approval covers, as the disclosed presentation carries them, are compared with it. A record changed since\n * is reported NO LONGER CURRENT and is not a failure: the seal still proves what was approved.\n */\nexport default class SealVerifyCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'seal verify',\n description: 'Verify one approval seal offline from a bundle file ({ jws, keys, expectedIssuer?, disclosures?, erasedClaims?, deliverableFile?, manifestedCopy?, vendorSignedCopies? }), with your own pins, kept exports, corroboration, the approved file, its manifested copy and its vendor-signed copies.',\n category: CommandCategory.Core,\n args: [{ name: 'bundle', description: 'Path to the JSON bundle.', required: true }],\n flags: {\n json: { type: 'boolean', description: 'Print the verification as JSON.' },\n pins: { type: 'string', description: 'The operator\\'s pin sets file ({ \"approval_seal\": { \"keys\": [...] }, \"signing_log_export\": ... }).' },\n corroboration: { type: 'string', description: 'A file { decisionPayloadDigest, recordedAt }: the decision\\'s digest, recorded outside the application before the compromise.' },\n 'signing-log-exports': { type: 'string[]', description: 'Signing-log exports the operator kept (`wildo seal log-export`), to corroborate a seal under a compromised key.' },\n deliverable: { type: 'string', description: 'The file the seal attests as the approved deliverable (#2904): its bytes are checked against the seal\\'s commitment.' },\n 'manifested-copy': { type: 'string', description: 'The approved deliverable\\'s manifested copy (#2907): its approval page and attached seal are rebuilt and compared, and what precedes them checked against the seal\\'s commitment.' },\n 'vendor-signed-copy': { type: 'string[]', description: 'Copies of the approved deliverable an electronic-signature vendor signed (#2907): each one\\'s first revision is checked against the seal\\'s commitment, and the original it derives from is reported.' },\n 'subject-record': { type: 'string', description: 'The record the approval is about, as it is now (a JSON object of its fields, or null when gone) (#2914): reports whether the approval is still current over it.' },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const path = ctx.args.bundle;\n if (!path) {\n ctx.log.error('Missing required <bundle> argument.');\n return { success: false };\n }\n let bundle;\n try {\n bundle = ApprovalSealVerificationBundleSchema.parse(JSON.parse(readFileSync(resolve(process.cwd(), path), 'utf8')));\n } catch (error) {\n ctx.log.error(`Cannot read the bundle ${path}: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n // The bundle is the host's; the pins and the kept exports come only from the operator's own files (#2932 review H1).\n // A pin file that does not pin the purpose being checked is refused rather than silently ignored (review L1).\n let input: ApprovalSealVerificationInput = bundle;\n try {\n const pinSets = typeof ctx.flags.pins === 'string' ? readPinSetsFile(ctx.flags.pins) : undefined;\n const exportPaths = parseCsvFlag(ctx.flags['signing-log-exports']);\n if (pinSets) {\n const sealPins = pinSets[CryptoKey_Purpose.APPROVAL_SEAL];\n if (!sealPins) {\n ctx.log.error(`The pin sets file pins no ${CryptoKey_Purpose.APPROVAL_SEAL} key: nothing would be checked against it.`);\n return { success: false };\n }\n if (exportPaths && !pinSets[CryptoKey_Purpose.SIGNING_LOG_EXPORT]) {\n ctx.log.error(`The pin sets file pins no ${CryptoKey_Purpose.SIGNING_LOG_EXPORT} key: the exports could not be checked against it.`);\n return { success: false };\n }\n input = { ...input, pins: sealPins };\n }\n if (typeof ctx.flags.corroboration === 'string') {\n input = { ...input, corroboration: ApprovalSealCorroborationSchema.parse(JSON.parse(readFileSync(resolve(process.cwd(), ctx.flags.corroboration), 'utf8'))) };\n }\n if (typeof ctx.flags.deliverable === 'string') {\n if (!bundle.deliverableFile) {\n ctx.log.error('The bundle names no file deliverable: this seal attests no file to check the given one against.');\n return { success: false };\n }\n input = { ...input, deliverableFile: { ...bundle.deliverableFile, bytes: readFileSync(resolve(process.cwd(), ctx.flags.deliverable)) } };\n }\n if (typeof ctx.flags['manifested-copy'] === 'string') {\n if (!bundle.deliverableFile) {\n ctx.log.error('The bundle names no file deliverable: this seal attests no file a manifested copy could be made of.');\n return { success: false };\n }\n input = { ...input, manifestedCopy: { ...(bundle.manifestedCopy ?? {}), bytes: readFileSync(resolve(process.cwd(), ctx.flags['manifested-copy'])) } };\n }\n const vendorCopyPaths = parseCsvFlag(ctx.flags['vendor-signed-copy']);\n if (vendorCopyPaths) {\n if (!bundle.deliverableFile) {\n ctx.log.error('The bundle names no file deliverable: this seal attests no file a vendor could have signed a copy of.');\n return { success: false };\n }\n input = { ...input, vendorSignedCopies: vendorSignedCopyInputsOf(bundle.vendorSignedCopies ?? [], vendorCopyPaths.map((copyPath) => readFileSync(resolve(process.cwd(), copyPath)))) };\n }\n if (typeof ctx.flags['subject-record'] === 'string') {\n const record: unknown = JSON.parse(readFileSync(resolve(process.cwd(), ctx.flags['subject-record']), 'utf8'));\n if (record !== null && (typeof record !== 'object' || Array.isArray(record))) {\n ctx.log.error('The subject record must be a JSON object of the record\\'s fields, or null for a record that is gone.');\n return { success: false };\n }\n input = { ...input, subjectRecord: record as Record<string, unknown> | null };\n }\n if (exportPaths) {\n const files = exportPaths.map(readSigningLogExportFile);\n const exportPins = pinSets?.[CryptoKey_Purpose.SIGNING_LOG_EXPORT];\n input = { ...input, signingLogExports: { exports: files.map((file) => file.jws), keys: files.map((file) => file.key), ...(exportPins ? { pins: exportPins } : {}) } };\n }\n } catch (error) {\n ctx.log.error(`Cannot read the pin sets, the corroboration, the deliverable, the manifested copy, the subject record or the signing-log exports: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n const result = verifyApprovalSeal(input);\n if (ctx.flags.json === true) {\n writeJsonDocument(result, JsonDocumentLayout.INDENTED);\n return { success: result.valid && result.provable };\n }\n if (!result.valid) {\n ctx.log.error(`${chalk.red('NOT VALID')} — ${result.failures.join(', ')}`);\n if (result.deliverableFile?.standing === ApprovalSealDeliverableFileStanding.CHANGED) {\n ctx.log.error(` deliverable file ${result.deliverableFile.fileId}: the given bytes are NOT the file the person approved`);\n }\n if (result.manifestedCopy?.standing === ApprovalSealDeliverableFileStanding.CHANGED) {\n ctx.log.error(' manifested copy: the given file is NOT this seal\\'s copy of the approved file (its approval page, attached seal or original differs)');\n }\n for (const copy of result.vendorSignedCopies ?? []) {\n if (copy.standing === ApprovalSealDeliverableFileStanding.DERIVED_FROM_ANOTHER_FILE) {\n ctx.log.error(` vendor-signed copy${copy.fileId ? ` ${copy.fileId}` : ''}: derived from ${copy.statedDerivedFromFileId}, NOT from the file this seal approved`);\n } else if (copy.standing === ApprovalSealDeliverableFileStanding.CHANGED) {\n ctx.log.error(` vendor-signed copy${copy.fileId ? ` ${copy.fileId}` : ''}: does NOT start with the approved file (or is not the file its record names)`);\n }\n }\n return { success: false };\n }\n const claims = result.claims!;\n ctx.log.info(`${result.provable ? chalk.green('VALID') : chalk.yellow('VALID, NOT PROVABLE')} — ${claims.source} ${claims.decisionRef} · ${claims.outcome} (${claims.meaning})`);\n ctx.log.info(` subject: ${claims.subject.resourceType}/${claims.subject.resourceId} · tenant ${claims.tenant}`);\n ctx.log.info(` decided: ${new Date(claims.decidedAt * 1000).toISOString()} · signed ${result.signingWindowSeconds ?? '?'} s later${result.lateSeal ? chalk.yellow(' (late seal)') : ''} · key ${result.kid} (${result.keyState})`);\n ctx.log.info(` decider: ${claims.decider.kind} via ${claims.decider.channel}${claims.decider.amr ? ` · amr ${claims.decider.amr.join(',')}` : ''}${claims.decider.stepUpMethod ? ` · step-up ${claims.decider.stepUpMethod}` : ''}${claims.decider.stepUpAt !== undefined ? ` proven ${claims.decidedAt - claims.decider.stepUpAt} s before the decision` : ''}${claims.decider.stepUpUserVerified !== undefined ? ` · user ${claims.decider.stepUpUserVerified ? 'verified' : 'NOT verified'} by the authenticator` : ''}`);\n // #2924: content the seal commits to and the bundle does not give is never a failure. An erasure the bundle states\n // reads UNDISCLOSED (erased) (PRESENTATION_ERASED for what the person was shown); anything else absent, not given.\n const undisclosed = (standing: ApprovalSealDisclosureStanding | undefined, erased: string) =>\n standing === ApprovalSealDisclosureStanding.ERASED ? chalk.dim(erased) : chalk.dim('not given');\n const person = (label: string, standing: typeof result.approver) => {\n if (!standing) return;\n ctx.log.info(` ${label}: ${standing.standing === ApprovalSealDisclosureStanding.DISCLOSED ? JSON.stringify(standing.value) : undisclosed(standing.standing, 'UNDISCLOSED (erased)')}`);\n };\n person('approver', result.approver);\n person('requester', result.requester);\n // #2903 S6: what the person was shown, and what they answered, each against its commitment.\n if (claims.presentation) {\n const shown = result.presentation?.standing === ApprovalSealDisclosureStanding.DISCLOSED ? 'disclosed, matches the seal'\n : undisclosed(result.presentation?.standing, 'PRESENTATION_ERASED (an erasure rewrote the stored presentation; the seal still binds its digest)');\n ctx.log.info(` presentation: ${claims.presentation.provenance} · ${shown}`);\n }\n if (result.deliverableFile) {\n const standing = result.deliverableFile.standing;\n const described = standing === ApprovalSealDeliverableFileStanding.MATCHES ? chalk.green('the given bytes are the file approved')\n : standing === ApprovalSealDeliverableFileStanding.NOT_GIVEN ? chalk.yellow('not given (pass --deliverable <file>)')\n : chalk.dim('nothing to compare with: the presentation is not disclosed, or binds no such file');\n ctx.log.info(` deliverable file ${result.deliverableFile.fileId}${result.deliverableFile.argument ? ` (${result.deliverableFile.argument})` : ''}: ${described}`);\n }\n if (result.manifestedCopy) {\n const standing = result.manifestedCopy.standing;\n const described = standing === ApprovalSealDeliverableFileStanding.MATCHES\n ? chalk.green(`the approved file, with this seal's approval page${result.manifestedCopy.approverName ? ` naming ${result.manifestedCopy.approverName}` : ''}${result.manifestedCopy.locale ? ` (words: ${result.manifestedCopy.locale})` : ''}${result.manifestedCopy.verificationUrl ? `, QR code to ${result.manifestedCopy.verificationUrl}` : ''}`)\n : standing === ApprovalSealDeliverableFileStanding.CONTENT_ERASED ? chalk.dim('CONTENT_ERASED (deleted with the approver\\'s erasure; the seal and the original still prove the approval)')\n : standing === ApprovalSealDeliverableFileStanding.NOT_GIVEN ? chalk.yellow('not given (pass --manifested-copy <file>)')\n : chalk.dim('nothing to compare with: the approver, the presentation or the deliverable\\'s salt is not disclosed');\n ctx.log.info(` manifested copy${result.manifestedCopy.fileId ? ` ${result.manifestedCopy.fileId}` : ''}: ${described}`);\n }\n for (const copy of result.vendorSignedCopies ?? []) {\n const described = copy.standing === ApprovalSealDeliverableFileStanding.MATCHES\n ? copy.recordedByHost\n ? chalk.green(`derived from the approved file ${copy.derivesFromFileId}: its first ${copy.originalLength} bytes are that file, and it is the signed copy the host recorded (the vendor's signature was validated at receipt; see the signature request's validation evidence)`)\n : chalk.yellow(`starts with the approved file ${copy.derivesFromFileId} (its first ${copy.originalLength} bytes), but the host records no such copy: nothing here says what follows is a vendor's signature`)\n : copy.standing === ApprovalSealDeliverableFileStanding.NOT_GIVEN ? chalk.yellow('not given (pass --vendor-signed-copy <file>)')\n : chalk.dim('nothing to compare with: the presentation or the deliverable\\'s salt is not disclosed');\n ctx.log.info(` vendor-signed copy${copy.fileId ? ` ${copy.fileId}` : ''}: ${described}`);\n }\n if (result.subjectRecordCurrency) {\n const currency = result.subjectRecordCurrency;\n const record = currency.subject ? ` ${currency.subject.resourceType}/${currency.subject.resourceId}` : '';\n const moved = (currency.fields ?? []).filter((field) => field.currency !== HumanDecision_PresentedFieldCurrency.CURRENT).map((field) => `${field.key} ${field.currency}`);\n const described = currency.standing === ApprovalSealSubjectCurrency.CURRENT ? chalk.green('CURRENT — every value the approval covers still holds')\n : currency.standing === ApprovalSealSubjectCurrency.NO_LONGER_CURRENT ? chalk.yellow(`NO LONGER CURRENT — ${moved.join(', ')}`)\n : currency.standing === ApprovalSealSubjectCurrency.SUBJECT_GONE ? chalk.yellow('the record is gone')\n : chalk.dim('nothing to compare with: the presentation is not disclosed, or the approval covers no record field');\n ctx.log.info(` currency over the record${record}: ${described}`);\n }\n if (claims.statementDigest) {\n ctx.log.info(` statement: ${result.statement?.standing === ApprovalSealDisclosureStanding.DISCLOSED ? JSON.stringify(result.statement.value) : undisclosed(result.statement?.standing, 'UNDISCLOSED (erased)')}`);\n }\n if (!result.provable) {\n ctx.log.info(chalk.yellow(' The key is compromised: corroborate the decision payload digest with evidence recorded before its compromise instant,'));\n ctx.log.info(chalk.yellow(' or give a signing-log export you kept from before it (--signing-log-exports).'));\n }\n if (result.corroboratedBy) {\n ctx.log.info(` corroborated by: ${result.corroboratedBy === ApprovalSealCorroborationSource.SIGNING_LOG_EXPORT ? 'a signing-log export signed before the compromise' : 'evidence recorded before the compromise'}`);\n }\n ctx.log.info(` decision payload digest: ${result.decisionPayloadDigest}`);\n return { success: result.provable };\n }\n}\n"]}
|
|
@@ -44,12 +44,29 @@ export type EnvironmentClassifierReading = {
|
|
|
44
44
|
readonly secrets: EnvironmentProviderEnvReading;
|
|
45
45
|
/** Of the serving provider's required secrets, those absent from `providerEnv` (empty unless `secrets` was READ). */
|
|
46
46
|
readonly missingSecrets: readonly string[];
|
|
47
|
+
/** Which guardrail the provider asked first offers, by its declared capabilities (both false when there is none). */
|
|
48
|
+
readonly offers: GuardrailsOffered;
|
|
49
|
+
/** The environment's reason, when it declares that its agents run unguarded where no classifier offers a guardrail. */
|
|
50
|
+
readonly runsUnguardedBecause?: string;
|
|
51
|
+
/**
|
|
52
|
+
* With no provider found: the providers the backend scope or a selection DECLARE for the capability although none can
|
|
53
|
+
* serve (not installed, or selected and not scoped with it). The runtime refuses such a declared classifier and never
|
|
54
|
+
* waives it.
|
|
55
|
+
*/
|
|
56
|
+
readonly declaredButMissing?: readonly string[];
|
|
47
57
|
/**
|
|
48
58
|
* A REMOTE environment (its authored file is `wildo.infra.remote.config.ts`): its deployed secrets are rebuilt from its
|
|
49
59
|
* CI environment, so the `secrets.json` on this machine is a copy that may not be the whole of them.
|
|
50
60
|
*/
|
|
51
61
|
readonly remote?: true;
|
|
52
62
|
};
|
|
63
|
+
/** Which classifier-backed guardrail something offers, or needs. */
|
|
64
|
+
export interface GuardrailsOffered {
|
|
65
|
+
readonly promptInjection: boolean;
|
|
66
|
+
readonly outputModeration: boolean;
|
|
67
|
+
}
|
|
68
|
+
/** The guardrails the guarded agents declare, between them. `undefined` when the agents could not be read. */
|
|
69
|
+
export declare function guardrailsDeclaredBy(agents: readonly AgentAiUseDeclaration[]): GuardrailsOffered | undefined;
|
|
53
70
|
/**
|
|
54
71
|
* The agents that can be refused for want of a classifier, by ref, or `undefined` when the projection cannot say (it
|
|
55
72
|
* predates the guardrail fields, so absence there means NOT READ). An agent is left out when it is known not to run
|
|
@@ -75,6 +92,8 @@ export declare function contentGuardrailClassifierCheck(input: {
|
|
|
75
92
|
readonly readings: readonly EnvironmentClassifierReading[];
|
|
76
93
|
/** The guarded agents, or `undefined` when the agents could not be read. */
|
|
77
94
|
readonly guardedAgents: readonly string[] | undefined;
|
|
95
|
+
/** The guardrails they declare between them ({@link guardrailsDeclaredBy}); both when absent or unknown. */
|
|
96
|
+
readonly guardrailsNeeded?: GuardrailsOffered;
|
|
78
97
|
readonly agentsNotReadBecause?: string;
|
|
79
98
|
}): LocalPreconditionCheckResult;
|
|
80
99
|
//# sourceMappingURL=content-guardrail-classifier.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-guardrail-classifier.service.d.ts","sourceRoot":"","sources":["../../../../src/services/application/content-guardrail-classifier.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"content-guardrail-classifier.service.d.ts","sourceRoot":"","sources":["../../../../src/services/application/content-guardrail-classifier.service.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAIrE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kEAAkE,CAAC;AACrH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6DAA6D,CAAC;AACjH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6DAA6D,CAAC;AAEjH,eAAO,MAAM,uCAAuC,iCAAiC,CAAC;AAItF,qEAAqE;AACrE,oBAAY,iCAAiC;IAC3C,+EAA+E;IAC/E,IAAI,SAAS;IACb,8DAA8D;IAC9D,MAAM,WAAW;IACjB,uGAAuG;IACvG,UAAU,eAAe;CAC1B;AAED,MAAM,MAAM,6BAA6B,GACrC;IAAE,QAAQ,CAAC,IAAI,EAAE,iCAAiC,CAAC,IAAI,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CAAE,GAClH;IAAE,QAAQ,CAAC,IAAI,EAAE,iCAAiC,CAAC,MAAM,CAAA;CAAE,GAC3D;IAAE,QAAQ,CAAC,IAAI,EAAE,iCAAiC,CAAC,UAAU,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpH;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAE;IAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CAG/H,GAAG,6BAA6B,CAchC;AAED,sGAA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