@noodleseed/one 0.63.0 → 0.64.0
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/auth-discovery.d.ts +17 -0
- package/dist/auth-discovery.d.ts.map +1 -0
- package/dist/auth-discovery.js +54 -0
- package/dist/auth-discovery.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/catalog-data-platform-auth.d.ts +7 -0
- package/dist/commands/catalog-data-platform-auth.d.ts.map +1 -0
- package/dist/commands/catalog-data-platform-auth.js +47 -0
- package/dist/commands/catalog-data-platform-auth.js.map +1 -0
- package/dist/commands/catalog.d.ts.map +1 -1
- package/dist/commands/catalog.js +6 -3
- package/dist/commands/catalog.js.map +1 -1
- package/dist/commands/docs-mcp.d.ts +3 -3
- package/dist/commands/docs-mcp.js +3 -3
- package/dist/commands/platform-auth-finalization-args.d.ts +13 -0
- package/dist/commands/platform-auth-finalization-args.d.ts.map +1 -0
- package/dist/commands/platform-auth-finalization-args.js +29 -0
- package/dist/commands/platform-auth-finalization-args.js.map +1 -0
- package/dist/commands/platform-auth-migration-args.d.ts +71 -0
- package/dist/commands/platform-auth-migration-args.d.ts.map +1 -0
- package/dist/commands/platform-auth-migration-args.js +320 -0
- package/dist/commands/platform-auth-migration-args.js.map +1 -0
- package/dist/commands/platform-auth-migration-ops.d.ts +3 -0
- package/dist/commands/platform-auth-migration-ops.d.ts.map +1 -0
- package/dist/commands/platform-auth-migration-ops.js +369 -0
- package/dist/commands/platform-auth-migration-ops.js.map +1 -0
- package/dist/commands/project-setup.js +1 -1
- package/dist/commands/project-setup.js.map +1 -1
- package/dist/config.d.ts +4 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/control-plane.d.ts +0 -11
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/control-plane.js +1 -8
- package/dist/control-plane.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +3 -5
- package/dist/doctor.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.js +4 -0
- package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js +1 -0
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js.map +1 -1
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.d.ts +2 -2
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.d.ts.map +1 -1
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.js +1 -1
- package/node_modules/@noodle-borg/auth/dist/verify.d.ts +1 -1
- package/node_modules/@noodle-borg/auth/dist/verify.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.d.ts +26 -0
- package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.js +105 -1
- package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.d.ts +25 -0
- package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.js +99 -0
- package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/index.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.js +15 -0
- package/node_modules/@noodle-borg/service/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/main.js +112 -19
- package/node_modules/@noodle-borg/service/dist/main.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.js +9 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.d.ts +24 -0
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.js +88 -0
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/branding.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/oauth/branding.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/branding.js +3 -2
- package/node_modules/@noodle-borg/service/dist/oauth/branding.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/consent-claims.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/consent-claims.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/consent-token.d.ts +5 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-token.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-token.js +19 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-token.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent.js +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-page.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-page.js +216 -28
- package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-page.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.js +62 -0
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.js +20 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/paths.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/paths.js +2 -0
- package/node_modules/@noodle-borg/service/dist/oauth/paths.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.js +58 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.js +49 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.js +7 -0
- package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/provider.d.ts +20 -25
- package/node_modules/@noodle-borg/service/dist/oauth/provider.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/provider.js +105 -196
- package/node_modules/@noodle-borg/service/dist/oauth/provider.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.js +157 -0
- package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.js +110 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.d.ts +7 -4
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.js +63 -120
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store.d.ts +19 -6
- package/node_modules/@noodle-borg/service/dist/oauth/store.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store.js +24 -2
- package/node_modules/@noodle-borg/service/dist/oauth/store.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/tokens.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/tokens.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/tokens.js +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/tokens.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.js +8 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.js +109 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.d.ts +22 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.js +30 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.d.ts +21 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.js +56 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.d.ts +30 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.js +94 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.d.ts +33 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.js +27 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.js +63 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.d.ts +20 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.js +40 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos-events.d.ts +115 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos-events.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos-events.js +310 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos-events.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos.d.ts +65 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos.js +85 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/options.d.ts +11 -2
- package/node_modules/@noodle-borg/service/dist/options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/personal-workspace.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/personal-workspace.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/personal-workspace.js +8 -2
- package/node_modules/@noodle-borg/service/dist/personal-workspace.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.d.ts +67 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.js +54 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.d.ts +25 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.js +61 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.d.ts +32 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.js +231 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.d.ts +29 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.js +350 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.d.ts +50 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.js +239 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.d.ts +66 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.js +77 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.d.ts +40 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.js +355 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.d.ts +41 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.js +230 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.d.ts +20 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.js +126 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.js +86 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.d.ts +42 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.js +368 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.d.ts +86 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.js +474 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.d.ts +17 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.js +435 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration.d.ts +202 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration.js +313 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.d.ts +48 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.js +158 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.d.ts +43 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.js +92 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.d.ts +31 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.js +94 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.d.ts +102 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.js +2 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.d.ts +17 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.js +367 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.d.ts +10 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.js +37 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.js +156 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.js +162 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.d.ts +92 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.js +271 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.js +67 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.js +47 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.d.ts +1569 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.js +274 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.d.ts +41 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.js +163 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.js +274 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.js +120 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.d.ts +79 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.js +88 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.js +38 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.d.ts +61 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.js +292 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.d.ts +19 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.js +121 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.d.ts +119 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.js +194 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.js +93 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.d.ts +32 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.js +68 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.js +92 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.d.ts +23 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.js +231 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.js +399 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.js +25 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.js +74 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.d.ts +19 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.js +249 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.js +275 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync.d.ts +98 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync.js +179 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity.d.ts +110 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity.js +312 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.js +36 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.js +3 -9
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-stripe.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-stripe.js +3 -3
- package/node_modules/@noodle-borg/service/dist/routes/billing-stripe.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.js +3 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.js +40 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.js +158 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/serve-options.d.ts +21 -3
- package/node_modules/@noodle-borg/service/dist/serve-options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.js +61 -146
- package/node_modules/@noodle-borg/service/dist/serve.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js +3 -0
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.js +17 -29
- package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/control-plane.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/control-plane.js +60 -19
- package/node_modules/@noodle-borg/service/dist/store/control-plane.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.d.ts +1 -2
- package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.js +0 -40
- package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.d.ts +5 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.js +176 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js +43 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-signup.js +2 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-signup.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/workos-directory.d.ts +71 -0
- package/node_modules/@noodle-borg/service/dist/workos-directory.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/workos-directory.js +175 -0
- package/node_modules/@noodle-borg/service/dist/workos-directory.js.map +1 -0
- package/node_modules/@noodle-borg/service/package.json +1 -0
- package/node_modules/@workos-inc/node/LICENSE +21 -0
- package/node_modules/@workos-inc/node/README.md +140 -0
- package/node_modules/@workos-inc/node/lib/factory-B8vTFojy.d.cts +9727 -0
- package/node_modules/@workos-inc/node/lib/factory-B8vTFojy.d.mts +9727 -0
- package/node_modules/@workos-inc/node/lib/factory-CoKXdPX2.cjs +8426 -0
- package/node_modules/@workos-inc/node/lib/factory-CoKXdPX2.cjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/factory-MKPb5Egh.mjs +8241 -0
- package/node_modules/@workos-inc/node/lib/factory-MKPb5Egh.mjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/index.cjs +449 -0
- package/node_modules/@workos-inc/node/lib/index.cjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/index.d.cts +478 -0
- package/node_modules/@workos-inc/node/lib/index.d.mts +478 -0
- package/node_modules/@workos-inc/node/lib/index.mjs +394 -0
- package/node_modules/@workos-inc/node/lib/index.mjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/index.worker.cjs +60 -0
- package/node_modules/@workos-inc/node/lib/index.worker.cjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/index.worker.d.cts +16 -0
- package/node_modules/@workos-inc/node/lib/index.worker.d.mts +16 -0
- package/node_modules/@workos-inc/node/lib/index.worker.mjs +35 -0
- package/node_modules/@workos-inc/node/lib/index.worker.mjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/webapi-BgpV54gi.mjs +3224 -0
- package/node_modules/@workos-inc/node/lib/webapi-BgpV54gi.mjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/webapi-BzGFatFp.cjs +3271 -0
- package/node_modules/@workos-inc/node/lib/webapi-BzGFatFp.cjs.map +1 -0
- package/node_modules/@workos-inc/node/package.json +96 -0
- package/package.json +2 -1
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { PlatformAuthOperationPreviewSchema, PlatformAuthOperatorError, PlatformAuthOperatorSnapshotSchema, } from './platform-auth-operator.js';
|
|
2
|
+
import { executePlatformAuthReconcile, executePlatformAuthStartImport, } from './platform-auth-operator-batches.js';
|
|
3
|
+
import { executePlatformAuthRollout, platformAuthRecoveryResult, platformAuthRolloutResult, recoverPlatformAuthOutbox, resolvePlatformAuthRolloutLineage, } from './platform-auth-operator-effects.js';
|
|
4
|
+
import { PostgresPlatformAuthOperatorOperationStore } from './platform-auth-operator-operation-postgres.js';
|
|
5
|
+
import { platformAuthOperatorRemoteVerificationStatus } from './platform-auth-operator-remote-status.js';
|
|
6
|
+
import { platformAuthExecutionPreviewRequest, platformAuthFinalizationEvidence, platformAuthPreviewBlockers, platformAuthPreviewTarget, platformAuthRolloutCohort, platformAuthRolloutPercentage, } from './platform-auth-operator-rollout.js';
|
|
7
|
+
import { PostgresPlatformAuthOperatorState, platformAuthOperatorHash, } from './platform-auth-operator-state-postgres.js';
|
|
8
|
+
import { mapPlatformAuthRecoveryError, platformAuthErrorHasCode, platformAuthInventoryGeneration, platformAuthPreviewSnapshotFingerprint, platformAuthRecoveryEvidence, } from './platform-auth-operator-support.js';
|
|
9
|
+
/** Durable aggregate-only orchestration. Upstream identity calls happen only in bounded explicit batches. */
|
|
10
|
+
export class PostgresPlatformAuthOperator {
|
|
11
|
+
#state;
|
|
12
|
+
#operations;
|
|
13
|
+
#inventoryStore;
|
|
14
|
+
#migrationStore;
|
|
15
|
+
#importService;
|
|
16
|
+
#rolloutStore;
|
|
17
|
+
#releaseSha;
|
|
18
|
+
#workosRealm;
|
|
19
|
+
#realmFingerprint;
|
|
20
|
+
#outboxProcessor;
|
|
21
|
+
#outboxRecoveryStore;
|
|
22
|
+
#eventsProcessor;
|
|
23
|
+
#remoteVerificationWorker;
|
|
24
|
+
#remoteVerificationStore;
|
|
25
|
+
constructor(options) {
|
|
26
|
+
if (!/^[0-9a-f]{40}$/.test(options.releaseSha) || options.workosRealm.trim().length === 0)
|
|
27
|
+
throw new Error('invalid platform-auth operator configuration');
|
|
28
|
+
this.#state = new PostgresPlatformAuthOperatorState(options.pool);
|
|
29
|
+
this.#operations = new PostgresPlatformAuthOperatorOperationStore(options.pool);
|
|
30
|
+
this.#inventoryStore = options.inventoryStore;
|
|
31
|
+
this.#migrationStore = options.migrationStore;
|
|
32
|
+
this.#importService = options.importService;
|
|
33
|
+
this.#rolloutStore = options.rolloutStore;
|
|
34
|
+
this.#releaseSha = options.releaseSha;
|
|
35
|
+
this.#workosRealm = options.workosRealm;
|
|
36
|
+
this.#realmFingerprint = hash(options.workosRealm);
|
|
37
|
+
this.#outboxProcessor = options.outboxProcessor;
|
|
38
|
+
this.#outboxRecoveryStore = options.outboxRecoveryStore;
|
|
39
|
+
this.#eventsProcessor = options.eventsProcessor;
|
|
40
|
+
this.#remoteVerificationWorker = options.remoteVerificationWorker;
|
|
41
|
+
this.#remoteVerificationStore = options.remoteVerificationStore;
|
|
42
|
+
}
|
|
43
|
+
async inventory(input) {
|
|
44
|
+
const generation = input.generation ?? 0;
|
|
45
|
+
if (!Number.isSafeInteger(generation) || generation < 0)
|
|
46
|
+
throw new PlatformAuthOperatorError('stale_generation');
|
|
47
|
+
const selector = this.#inventorySelector();
|
|
48
|
+
const runId = `inventory-${this.#releaseSha}-${this.#realmFingerprint.slice(0, 16)}-generation-${generation}`;
|
|
49
|
+
const advanceRunId = await this.#state.withInventoryLock(selector, async () => {
|
|
50
|
+
const latest = await this.#state.currentInventoryRun(selector);
|
|
51
|
+
if (latest !== undefined) {
|
|
52
|
+
const latestGeneration = platformAuthInventoryGeneration(latest.runId);
|
|
53
|
+
if (generation === latestGeneration) {
|
|
54
|
+
return latest.state === 'running' ? latest.runId : undefined;
|
|
55
|
+
}
|
|
56
|
+
if (generation !== latestGeneration + 1)
|
|
57
|
+
throw new PlatformAuthOperatorError('stale_generation');
|
|
58
|
+
if (latest.state === 'running' && !latest.terminal)
|
|
59
|
+
throw new PlatformAuthOperatorError('stale_generation');
|
|
60
|
+
}
|
|
61
|
+
else if (generation !== 0) {
|
|
62
|
+
throw new PlatformAuthOperatorError('stale_generation');
|
|
63
|
+
}
|
|
64
|
+
await this.#migrationStore.createRun({
|
|
65
|
+
runId,
|
|
66
|
+
kind: 'inventory',
|
|
67
|
+
releaseSha: this.#releaseSha,
|
|
68
|
+
workosRealm: this.#workosRealm,
|
|
69
|
+
actorFingerprint: input.actorFingerprint,
|
|
70
|
+
});
|
|
71
|
+
return runId;
|
|
72
|
+
});
|
|
73
|
+
if (advanceRunId !== undefined) {
|
|
74
|
+
if (this.#inventoryStore.advance === undefined)
|
|
75
|
+
await this.#inventoryStore.inspect(advanceRunId);
|
|
76
|
+
else
|
|
77
|
+
await this.#inventoryStore.advance(advanceRunId);
|
|
78
|
+
}
|
|
79
|
+
return this.status();
|
|
80
|
+
}
|
|
81
|
+
async status() {
|
|
82
|
+
const rollout = await this.#rolloutStore.status();
|
|
83
|
+
const selector = this.#inventorySelector();
|
|
84
|
+
const [inventory, inventoryStatus] = await Promise.all([
|
|
85
|
+
this.#state.latestInventory(selector),
|
|
86
|
+
this.#state.inventoryStatus(selector),
|
|
87
|
+
]);
|
|
88
|
+
const latestCampaign = await this.#state.latestCampaign(this.#inventorySelector());
|
|
89
|
+
const campaign = latestCampaign?.inventoryRunId === inventory?.runId ? latestCampaign : undefined;
|
|
90
|
+
const [imports, synchronization, remoteVerification] = await Promise.all([
|
|
91
|
+
this.#state.importAggregate(inventory, campaign),
|
|
92
|
+
this.#state.synchronization({
|
|
93
|
+
outboxConfigured: this.#outboxProcessor !== undefined,
|
|
94
|
+
eventsConfigured: this.#eventsProcessor !== undefined,
|
|
95
|
+
}),
|
|
96
|
+
platformAuthOperatorRemoteVerificationStatus({
|
|
97
|
+
store: this.#remoteVerificationStore,
|
|
98
|
+
inventory,
|
|
99
|
+
campaign,
|
|
100
|
+
realm: this.#workosRealm,
|
|
101
|
+
}),
|
|
102
|
+
]);
|
|
103
|
+
return PlatformAuthOperatorSnapshotSchema.parse({
|
|
104
|
+
schemaVersion: 1,
|
|
105
|
+
releaseSha: this.#releaseSha,
|
|
106
|
+
rollout,
|
|
107
|
+
inventory: inventoryStatus === undefined
|
|
108
|
+
? {
|
|
109
|
+
state: 'unavailable',
|
|
110
|
+
phase: null,
|
|
111
|
+
remotePages: 0,
|
|
112
|
+
remoteUsers: 0,
|
|
113
|
+
localSubjects: 0,
|
|
114
|
+
candidateCount: 0,
|
|
115
|
+
excludedCount: 0,
|
|
116
|
+
checksum: null,
|
|
117
|
+
blockers: [],
|
|
118
|
+
}
|
|
119
|
+
: inventoryStatus,
|
|
120
|
+
import: imports,
|
|
121
|
+
synchronization,
|
|
122
|
+
remoteVerification,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
async markMaintenanceSuccess(components) {
|
|
126
|
+
const unique = [...new Set(components)];
|
|
127
|
+
for (const component of unique) {
|
|
128
|
+
if ((component === 'outbox' && this.#outboxProcessor === undefined) ||
|
|
129
|
+
(component === 'events' && this.#eventsProcessor === undefined))
|
|
130
|
+
throw new Error(`cannot mark unconfigured platform-auth ${component} maintenance`);
|
|
131
|
+
}
|
|
132
|
+
await this.#state.markSynchronizationSuccess(unique);
|
|
133
|
+
}
|
|
134
|
+
async preview(input) {
|
|
135
|
+
const snapshot = await this.status();
|
|
136
|
+
const blockers = [...platformAuthPreviewBlockers(input, snapshot)];
|
|
137
|
+
let target = platformAuthPreviewTarget(input, snapshot.rollout);
|
|
138
|
+
if (input.operation === 'recover_outbox') {
|
|
139
|
+
if (this.#outboxRecoveryStore === undefined) {
|
|
140
|
+
blockers.push({ code: 'outbox_recovery_not_configured', count: 1 });
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
const recovery = await this.#outboxRecoveryStore.previewTerminalRecovery({
|
|
144
|
+
limit: input.batchSize,
|
|
145
|
+
});
|
|
146
|
+
target = {
|
|
147
|
+
batchSize: input.batchSize,
|
|
148
|
+
terminalCount: recovery.terminal,
|
|
149
|
+
terminalSetHash: recovery.checksum,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
let previewChecksum = null;
|
|
154
|
+
if (blockers.length === 0) {
|
|
155
|
+
if (input.operation === 'start_import' ||
|
|
156
|
+
input.operation === 'reconcile' ||
|
|
157
|
+
input.operation === 'recover_outbox') {
|
|
158
|
+
const snapshotFingerprint = platformAuthPreviewSnapshotFingerprint(snapshot);
|
|
159
|
+
const targetFingerprint = hash(target);
|
|
160
|
+
previewChecksum = hash({
|
|
161
|
+
schemaVersion: 1,
|
|
162
|
+
operation: input.operation,
|
|
163
|
+
expectedGeneration: snapshot.rollout.generation,
|
|
164
|
+
releaseSha: this.#releaseSha,
|
|
165
|
+
targetFingerprint,
|
|
166
|
+
snapshotFingerprint,
|
|
167
|
+
});
|
|
168
|
+
await this.#state.savePreview({
|
|
169
|
+
checksum: previewChecksum,
|
|
170
|
+
operation: input.operation,
|
|
171
|
+
expectedGeneration: snapshot.rollout.generation,
|
|
172
|
+
releaseSha: this.#releaseSha,
|
|
173
|
+
targetFingerprint,
|
|
174
|
+
snapshotFingerprint,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
const lineage = await resolvePlatformAuthRolloutLineage(input.operation, this.#rolloutStore, () => this.#lineage());
|
|
179
|
+
try {
|
|
180
|
+
const rolloutPreview = await this.#rolloutStore.preview({
|
|
181
|
+
...platformAuthFinalizationEvidence(input),
|
|
182
|
+
percentage: platformAuthRolloutPercentage(input),
|
|
183
|
+
...lineage,
|
|
184
|
+
workosRealm: this.#workosRealm,
|
|
185
|
+
releaseSha: this.#releaseSha,
|
|
186
|
+
...platformAuthRolloutCohort(input),
|
|
187
|
+
});
|
|
188
|
+
if (rolloutPreview.generation !== snapshot.rollout.generation)
|
|
189
|
+
throw new PlatformAuthOperatorError('stale_generation');
|
|
190
|
+
previewChecksum = rolloutPreview.checksum;
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
if (!platformAuthErrorHasCode(error, 'remote_verification_incomplete'))
|
|
194
|
+
throw error;
|
|
195
|
+
blockers.push({ code: 'remote_verification_incomplete', count: 1 });
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return PlatformAuthOperationPreviewSchema.parse({
|
|
200
|
+
...snapshot,
|
|
201
|
+
operation: input.operation,
|
|
202
|
+
ready: blockers.length === 0,
|
|
203
|
+
previewChecksum,
|
|
204
|
+
blockers,
|
|
205
|
+
target,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
async execute(input) {
|
|
209
|
+
if (input.releaseSha !== this.#releaseSha)
|
|
210
|
+
throw new PlatformAuthOperatorError('release_sha_mismatch');
|
|
211
|
+
if (input.operation === 'recover_outbox')
|
|
212
|
+
this.#requireRecoveryStore();
|
|
213
|
+
const requestFingerprint = hash({ ...input, idempotencyKey: undefined });
|
|
214
|
+
const claim = await this.#operations.claim({
|
|
215
|
+
idempotencyKey: input.idempotencyKey,
|
|
216
|
+
requestFingerprint,
|
|
217
|
+
actorFingerprint: input.actorFingerprint,
|
|
218
|
+
reasonFingerprint: hash(input.reason),
|
|
219
|
+
operation: input.operation,
|
|
220
|
+
previewChecksum: input.previewChecksum,
|
|
221
|
+
});
|
|
222
|
+
if (claim.kind === 'replay')
|
|
223
|
+
return claim.result;
|
|
224
|
+
if (input.operation === 'recover_outbox') {
|
|
225
|
+
const recoveryStore = this.#requireRecoveryStore();
|
|
226
|
+
let replay;
|
|
227
|
+
try {
|
|
228
|
+
replay = await recoveryStore.replayTerminalRecovery(platformAuthRecoveryEvidence(input, requestFingerprint));
|
|
229
|
+
}
|
|
230
|
+
catch (error) {
|
|
231
|
+
throw mapPlatformAuthRecoveryError(error);
|
|
232
|
+
}
|
|
233
|
+
if (replay !== undefined) {
|
|
234
|
+
const result = await platformAuthRecoveryResult(input, replay, () => this.status());
|
|
235
|
+
await this.#operations.recordApplied({
|
|
236
|
+
idempotencyKey: input.idempotencyKey,
|
|
237
|
+
leaseToken: claim.leaseToken,
|
|
238
|
+
result,
|
|
239
|
+
});
|
|
240
|
+
await this.#operations.complete({
|
|
241
|
+
idempotencyKey: input.idempotencyKey,
|
|
242
|
+
leaseToken: claim.leaseToken,
|
|
243
|
+
});
|
|
244
|
+
return result;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
if (input.operation === 'activate' ||
|
|
248
|
+
input.operation === 'rollback' ||
|
|
249
|
+
input.operation === 'finalize') {
|
|
250
|
+
const replay = await this.#rolloutStore.replayMutation({
|
|
251
|
+
idempotencyKey: input.idempotencyKey,
|
|
252
|
+
requestFingerprint,
|
|
253
|
+
});
|
|
254
|
+
if (replay !== undefined) {
|
|
255
|
+
const result = await platformAuthRolloutResult(input, replay, true, () => this.status());
|
|
256
|
+
await this.#operations.recordApplied({
|
|
257
|
+
idempotencyKey: input.idempotencyKey,
|
|
258
|
+
leaseToken: claim.leaseToken,
|
|
259
|
+
result,
|
|
260
|
+
});
|
|
261
|
+
await this.#operations.complete({
|
|
262
|
+
idempotencyKey: input.idempotencyKey,
|
|
263
|
+
leaseToken: claim.leaseToken,
|
|
264
|
+
});
|
|
265
|
+
return result;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
const before = await this.status();
|
|
269
|
+
if (before.rollout.generation !== input.expectedGeneration)
|
|
270
|
+
throw new PlatformAuthOperatorError('stale_generation');
|
|
271
|
+
if (input.operation === 'activate' ||
|
|
272
|
+
input.operation === 'rollback' ||
|
|
273
|
+
input.operation === 'finalize') {
|
|
274
|
+
const blockers = platformAuthPreviewBlockers(platformAuthExecutionPreviewRequest(input), before);
|
|
275
|
+
if (blockers.length > 0) {
|
|
276
|
+
if (input.operation === 'finalize')
|
|
277
|
+
throw new PlatformAuthOperatorError('finalize_precondition_failed');
|
|
278
|
+
if (blockers.some((blocker) => blocker.code === 'rollout_transition_invalid'))
|
|
279
|
+
throw new PlatformAuthOperatorError('rollout_transition_invalid');
|
|
280
|
+
throw new PlatformAuthOperatorError('reconciliation_drift');
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
const result = input.operation === 'start_import'
|
|
284
|
+
? await executePlatformAuthStartImport({
|
|
285
|
+
request: input,
|
|
286
|
+
snapshot: before,
|
|
287
|
+
state: this.#state,
|
|
288
|
+
migrationStore: this.#migrationStore,
|
|
289
|
+
releaseSha: this.#releaseSha,
|
|
290
|
+
workosRealm: this.#workosRealm,
|
|
291
|
+
realmFingerprint: this.#realmFingerprint,
|
|
292
|
+
inventorySelector: this.#inventorySelector(),
|
|
293
|
+
status: () => this.status(),
|
|
294
|
+
})
|
|
295
|
+
: input.operation === 'reconcile'
|
|
296
|
+
? await executePlatformAuthReconcile({
|
|
297
|
+
request: input,
|
|
298
|
+
snapshot: before,
|
|
299
|
+
state: this.#state,
|
|
300
|
+
migrationStore: this.#migrationStore,
|
|
301
|
+
importService: this.#importService,
|
|
302
|
+
workosRealm: this.#workosRealm,
|
|
303
|
+
currentLineage: () => this.#lineage(),
|
|
304
|
+
...(this.#outboxProcessor === undefined
|
|
305
|
+
? {}
|
|
306
|
+
: { outboxProcessor: this.#outboxProcessor }),
|
|
307
|
+
...(this.#eventsProcessor === undefined
|
|
308
|
+
? {}
|
|
309
|
+
: { eventsProcessor: this.#eventsProcessor }),
|
|
310
|
+
...(this.#remoteVerificationWorker === undefined
|
|
311
|
+
? {}
|
|
312
|
+
: { remoteVerificationWorker: this.#remoteVerificationWorker }),
|
|
313
|
+
markMaintenanceSuccess: (components) => this.markMaintenanceSuccess(components),
|
|
314
|
+
status: () => this.status(),
|
|
315
|
+
})
|
|
316
|
+
: input.operation === 'recover_outbox'
|
|
317
|
+
? await recoverPlatformAuthOutbox({
|
|
318
|
+
request: input,
|
|
319
|
+
snapshot: before,
|
|
320
|
+
requestFingerprint,
|
|
321
|
+
store: this.#requireRecoveryStore(),
|
|
322
|
+
state: this.#state,
|
|
323
|
+
status: () => this.status(),
|
|
324
|
+
})
|
|
325
|
+
: await executePlatformAuthRollout({
|
|
326
|
+
request: input,
|
|
327
|
+
requestFingerprint,
|
|
328
|
+
rolloutStore: this.#rolloutStore,
|
|
329
|
+
releaseSha: this.#releaseSha,
|
|
330
|
+
workosRealm: this.#workosRealm,
|
|
331
|
+
currentLineage: () => this.#lineage(),
|
|
332
|
+
status: () => this.status(),
|
|
333
|
+
});
|
|
334
|
+
await this.#operations.recordApplied({
|
|
335
|
+
idempotencyKey: input.idempotencyKey,
|
|
336
|
+
leaseToken: claim.leaseToken,
|
|
337
|
+
result,
|
|
338
|
+
});
|
|
339
|
+
await this.#operations.complete({
|
|
340
|
+
idempotencyKey: input.idempotencyKey,
|
|
341
|
+
leaseToken: claim.leaseToken,
|
|
342
|
+
});
|
|
343
|
+
return result;
|
|
344
|
+
}
|
|
345
|
+
#requireRecoveryStore() {
|
|
346
|
+
if (this.#outboxRecoveryStore === undefined)
|
|
347
|
+
throw new PlatformAuthOperatorError('outbox_recovery_not_configured');
|
|
348
|
+
return this.#outboxRecoveryStore;
|
|
349
|
+
}
|
|
350
|
+
async #lineage() {
|
|
351
|
+
const inventory = await this.#state.latestInventory(this.#inventorySelector());
|
|
352
|
+
if (inventory === undefined)
|
|
353
|
+
throw new PlatformAuthOperatorError('inventory_unavailable');
|
|
354
|
+
const campaign = await this.#state.latestCampaign(this.#inventorySelector());
|
|
355
|
+
if (campaign === undefined || campaign.inventoryRunId !== inventory.runId)
|
|
356
|
+
throw new PlatformAuthOperatorError('import_not_started');
|
|
357
|
+
return { inventory, campaign };
|
|
358
|
+
}
|
|
359
|
+
#inventorySelector() {
|
|
360
|
+
return {
|
|
361
|
+
releaseSha: this.#releaseSha,
|
|
362
|
+
workosRealmFingerprint: this.#realmFingerprint,
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
const hash = platformAuthOperatorHash;
|
|
367
|
+
//# sourceMappingURL=platform-auth-operator-postgres.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-postgres.js","sourceRoot":"","sources":["../src/platform-auth-operator-postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,kCAAkC,EAGlC,yBAAyB,EAEzB,kCAAkC,GAInC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,yBAAyB,EACzB,iCAAiC,GAClC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,0CAA0C,EAAE,MAAM,gDAAgD,CAAC;AAS5G,OAAO,EAAE,4CAA4C,EAAE,MAAM,2CAA2C,CAAC;AACzG,OAAO,EACL,mCAAmC,EACnC,gCAAgC,EAChC,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,GAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAGL,iCAAiC,EACjC,wBAAwB,GACzB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,+BAA+B,EAC/B,sCAAsC,EACtC,4BAA4B,GAC7B,MAAM,qCAAqC,CAAC;AAQ7C,6GAA6G;AAC7G,MAAM,OA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C,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,qBAAqB;QACnB,IAAI,IAAI,CAAC,oBAAoB,KAAK,SAAS;YACzC,MAAM,IAAI,yBAAyB,CAAC,gCAAgC,CAAC,CAAC;QACxE,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,QAAQ;QAIZ,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;QAC/E,IAAI,SAAS,KAAK,SAAS;YAAE,MAAM,IAAI,yBAAyB,CAAC,uBAAuB,CAAC,CAAC;QAC1F,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;QAC7E,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,cAAc,KAAK,SAAS,CAAC,KAAK;YACvE,MAAM,IAAI,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;QAC5D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;IACjC,CAAC;IAED,kBAAkB;QAChB,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,sBAAsB,EAAE,IAAI,CAAC,iBAAiB;SAC/C,CAAC;IACJ,CAAC;CACF;AAED,MAAM,IAAI,GAAG,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PlatformAuthOperatorSnapshot } from './platform-auth-operator.js';
|
|
2
|
+
import type { OperatorCampaignLineage, OperatorInventoryLineage } from './platform-auth-operator-state-postgres.js';
|
|
3
|
+
import { type PlatformAuthRemoteVerificationStore } from './platform-auth-remote-verification.js';
|
|
4
|
+
export declare function platformAuthOperatorRemoteVerificationStatus(input: {
|
|
5
|
+
readonly store: Pick<PlatformAuthRemoteVerificationStore, 'readiness'> | undefined;
|
|
6
|
+
readonly inventory: OperatorInventoryLineage | undefined;
|
|
7
|
+
readonly campaign: OperatorCampaignLineage | undefined;
|
|
8
|
+
readonly realm: string;
|
|
9
|
+
}): Promise<PlatformAuthOperatorSnapshot['remoteVerification']>;
|
|
10
|
+
//# sourceMappingURL=platform-auth-operator-remote-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-remote-status.d.ts","sourceRoot":"","sources":["../src/platform-auth-operator-remote-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,KAAK,EACV,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,KAAK,mCAAmC,EAEzC,MAAM,wCAAwC,CAAC;AAQhD,wBAAsB,4CAA4C,CAAC,KAAK,EAAE;IACxE,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,mCAAmC,EAAE,WAAW,CAAC,GAAG,SAAS,CAAC;IACnF,QAAQ,CAAC,SAAS,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACzD,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,GAAG,SAAS,CAAC;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,GAAG,OAAO,CAAC,4BAA4B,CAAC,oBAAoB,CAAC,CAAC,CA6B9D"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { platformAuthRemoteVerificationFreshAfter, } from './platform-auth-remote-verification.js';
|
|
2
|
+
const EMPTY_PROGRESS = {
|
|
3
|
+
checkedCount: 0,
|
|
4
|
+
verifiedCount: 0,
|
|
5
|
+
retryAt: null,
|
|
6
|
+
};
|
|
7
|
+
export async function platformAuthOperatorRemoteVerificationStatus(input) {
|
|
8
|
+
if (input.store === undefined) {
|
|
9
|
+
return {
|
|
10
|
+
state: 'not_configured',
|
|
11
|
+
candidateCount: input.inventory?.candidateCount ?? 0,
|
|
12
|
+
...EMPTY_PROGRESS,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
if (input.inventory === undefined || input.campaign === undefined) {
|
|
16
|
+
return {
|
|
17
|
+
state: 'not_started',
|
|
18
|
+
candidateCount: input.inventory?.candidateCount ?? 0,
|
|
19
|
+
...EMPTY_PROGRESS,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const readiness = await input.store.readiness({
|
|
23
|
+
inventoryRunId: input.inventory.runId,
|
|
24
|
+
importRunId: input.campaign.importRunId,
|
|
25
|
+
provider: 'workos',
|
|
26
|
+
realm: input.realm,
|
|
27
|
+
freshAfter: platformAuthRemoteVerificationFreshAfter(),
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
state: readiness.state,
|
|
31
|
+
checkedCount: readiness.checkedCount,
|
|
32
|
+
candidateCount: readiness.candidateCount,
|
|
33
|
+
verifiedCount: readiness.verifiedCount,
|
|
34
|
+
retryAt: readiness.retryAt?.toISOString() ?? null,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=platform-auth-operator-remote-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-remote-status.js","sourceRoot":"","sources":["../src/platform-auth-operator-remote-status.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,wCAAwC,GACzC,MAAM,wCAAwC,CAAC;AAEhD,MAAM,cAAc,GAAG;IACrB,YAAY,EAAE,CAAC;IACf,aAAa,EAAE,CAAC;IAChB,OAAO,EAAE,IAAI;CACL,CAAC;AAEX,MAAM,CAAC,KAAK,UAAU,4CAA4C,CAAC,KAKlE;IACC,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO;YACL,KAAK,EAAE,gBAAgB;YACvB,cAAc,EAAE,KAAK,CAAC,SAAS,EAAE,cAAc,IAAI,CAAC;YACpD,GAAG,cAAc;SAClB,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QAClE,OAAO;YACL,KAAK,EAAE,aAAa;YACpB,cAAc,EAAE,KAAK,CAAC,SAAS,EAAE,cAAc,IAAI,CAAC;YACpD,GAAG,cAAc;SAClB,CAAC;IACJ,CAAC;IACD,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC;QAC5C,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK;QACrC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,WAAW;QACvC,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,UAAU,EAAE,wCAAwC,EAAE;KACvD,CAAC,CAAC;IACH,OAAO;QACL,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,YAAY,EAAE,SAAS,CAAC,YAAY;QACpC,cAAc,EAAE,SAAS,CAAC,cAAc;QACxC,aAAa,EAAE,SAAS,CAAC,aAAa;QACtC,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,IAAI;KAClD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { PlatformAuthExecuteInput, PlatformAuthOperationPreview, PlatformAuthOperatorSnapshot, PlatformAuthPreviewRequest } from './platform-auth-operator.js';
|
|
2
|
+
export type PlatformAuthOperatorRolloutTarget = {
|
|
3
|
+
readonly cohortMode: 'preserve';
|
|
4
|
+
} | {
|
|
5
|
+
readonly cohortMode: 'replace';
|
|
6
|
+
readonly canaryClientIds: readonly string[];
|
|
7
|
+
readonly recoveryClientIds: readonly string[];
|
|
8
|
+
};
|
|
9
|
+
export declare const PLATFORM_AUTH_FINALIZATION_SOAK_MILLISECONDS: number;
|
|
10
|
+
export declare function platformAuthPreviewBlockers(input: PlatformAuthPreviewRequest, snapshot: PlatformAuthOperatorSnapshot, now?: Date): PlatformAuthOperationPreview['blockers'];
|
|
11
|
+
export declare function platformAuthPreviewTarget(input: PlatformAuthPreviewRequest, rollout: PlatformAuthOperatorSnapshot['rollout']): PlatformAuthOperationPreview['target'];
|
|
12
|
+
export declare function platformAuthRolloutCohort(input: Extract<PlatformAuthPreviewRequest, {
|
|
13
|
+
readonly operation: 'activate' | 'rollback' | 'finalize';
|
|
14
|
+
}> | Extract<PlatformAuthExecuteInput, {
|
|
15
|
+
readonly operation: 'activate' | 'rollback' | 'finalize';
|
|
16
|
+
}>): PlatformAuthOperatorRolloutTarget;
|
|
17
|
+
export declare function platformAuthRolloutPercentage(input: Extract<PlatformAuthPreviewRequest, {
|
|
18
|
+
readonly operation: 'activate' | 'rollback' | 'finalize';
|
|
19
|
+
}> | Extract<PlatformAuthExecuteInput, {
|
|
20
|
+
readonly operation: 'activate' | 'rollback' | 'finalize';
|
|
21
|
+
}>): number;
|
|
22
|
+
export declare function platformAuthFinalizationEvidence(input: Extract<PlatformAuthPreviewRequest, {
|
|
23
|
+
readonly operation: 'activate' | 'rollback' | 'finalize';
|
|
24
|
+
}> | Extract<PlatformAuthExecuteInput, {
|
|
25
|
+
readonly operation: 'activate' | 'rollback' | 'finalize';
|
|
26
|
+
}>): {
|
|
27
|
+
readonly operation: 'finalize';
|
|
28
|
+
readonly rollbackRehearsalChecksum: string;
|
|
29
|
+
readonly stagingWorkosOnlySmokeChecksum: string;
|
|
30
|
+
} | {
|
|
31
|
+
readonly operation: 'activate' | 'rollback';
|
|
32
|
+
};
|
|
33
|
+
export declare function platformAuthExecutionPreviewRequest(input: Extract<PlatformAuthExecuteInput, {
|
|
34
|
+
readonly operation: 'activate' | 'rollback' | 'finalize';
|
|
35
|
+
}>): PlatformAuthPreviewRequest;
|
|
36
|
+
//# sourceMappingURL=platform-auth-operator-rollout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-rollout.d.ts","sourceRoot":"","sources":["../src/platform-auth-operator-rollout.ts"],"names":[],"mappings":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AED,wBAAgB,gCAAgC,CAC9C,KAAK,EACD,OAAO,CACL,0BAA0B,EAC1B;IAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,CAAA;CAAE,CAC7D,GACD,OAAO,CACL,wBAAwB,EACxB;IAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,CAAA;CAAE,CAC7D,GAEH;IACE,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/B,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,8BAA8B,EAAE,MAAM,CAAC;CACjD,GACD;IAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,UAAU,CAAA;CAAE,CAQlD;AAED,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,OAAO,CACZ,wBAAwB,EACxB;IAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,CAAA;CAAE,CAC7D,GACA,0BAA0B,CA0B5B"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { platformAuthOperatorHash as hash } from './platform-auth-operator-state-postgres.js';
|
|
2
|
+
export const PLATFORM_AUTH_FINALIZATION_SOAK_MILLISECONDS = 14 * 24 * 60 * 60 * 1_000;
|
|
3
|
+
export function platformAuthPreviewBlockers(input, snapshot, now = new Date()) {
|
|
4
|
+
if (input.operation === 'recover_outbox')
|
|
5
|
+
return [];
|
|
6
|
+
if (input.operation === 'rollback')
|
|
7
|
+
return snapshot.rollout.lifecycle === 'finalized'
|
|
8
|
+
? [{ code: 'rollout_transition_invalid', count: 1 }]
|
|
9
|
+
: [];
|
|
10
|
+
const blockers = [
|
|
11
|
+
...snapshot.inventory.blockers,
|
|
12
|
+
];
|
|
13
|
+
if (snapshot.inventory.state === 'unavailable' || snapshot.inventory.candidateCount === 0)
|
|
14
|
+
blockers.push({ code: 'inventory_unavailable', count: 1 });
|
|
15
|
+
if (input.operation === 'start_import') {
|
|
16
|
+
if (snapshot.import.state !== 'not_started')
|
|
17
|
+
blockers.push({ code: 'import_already_started', count: 1 });
|
|
18
|
+
return blockers;
|
|
19
|
+
}
|
|
20
|
+
if (snapshot.import.state === 'not_started')
|
|
21
|
+
blockers.push({ code: 'import_not_started', count: 1 });
|
|
22
|
+
if (input.operation === 'reconcile')
|
|
23
|
+
return blockers;
|
|
24
|
+
const unresolved = snapshot.import.pending +
|
|
25
|
+
snapshot.import.reconcileRequired +
|
|
26
|
+
snapshot.import.blocked +
|
|
27
|
+
snapshot.import.failed;
|
|
28
|
+
if (unresolved > 0)
|
|
29
|
+
blockers.push({ code: 'unresolved_imports', count: unresolved });
|
|
30
|
+
if (snapshot.import.activeLeases > 0)
|
|
31
|
+
blockers.push({ code: 'active_import_leases', count: snapshot.import.activeLeases });
|
|
32
|
+
if (snapshot.synchronization.outbox.pending > 0)
|
|
33
|
+
blockers.push({ code: 'pending_outbox', count: snapshot.synchronization.outbox.pending });
|
|
34
|
+
if (snapshot.synchronization.outbox.status === 'not_configured')
|
|
35
|
+
blockers.push({ code: 'outbox_processor_not_configured', count: 1 });
|
|
36
|
+
else if (snapshot.synchronization.outbox.status === 'pending')
|
|
37
|
+
blockers.push({ code: 'outbox_reconciliation_pending', count: 1 });
|
|
38
|
+
if (snapshot.synchronization.events.status === 'not_configured')
|
|
39
|
+
blockers.push({ code: 'events_processor_not_configured', count: 1 });
|
|
40
|
+
else if (snapshot.synchronization.events.status === 'pending')
|
|
41
|
+
blockers.push({ code: 'events_reconciliation_pending', count: 1 });
|
|
42
|
+
if ((input.operation === 'activate' && input.percentage < snapshot.rollout.workosPercentage) ||
|
|
43
|
+
snapshot.rollout.lifecycle === 'finalized')
|
|
44
|
+
blockers.push({ code: 'rollout_transition_invalid', count: 1 });
|
|
45
|
+
if (input.operation === 'finalize') {
|
|
46
|
+
const defaultSince = snapshot.rollout.workosDefaultSince === null
|
|
47
|
+
? Number.NaN
|
|
48
|
+
: Date.parse(snapshot.rollout.workosDefaultSince);
|
|
49
|
+
if (snapshot.rollout.workosPercentage !== 100 ||
|
|
50
|
+
!Number.isFinite(defaultSince) ||
|
|
51
|
+
defaultSince > now.getTime() - PLATFORM_AUTH_FINALIZATION_SOAK_MILLISECONDS)
|
|
52
|
+
blockers.push({ code: 'finalize_precondition_failed', count: 1 });
|
|
53
|
+
}
|
|
54
|
+
return blockers;
|
|
55
|
+
}
|
|
56
|
+
export function platformAuthPreviewTarget(input, rollout) {
|
|
57
|
+
if (input.operation === 'recover_outbox') {
|
|
58
|
+
return {
|
|
59
|
+
batchSize: input.batchSize,
|
|
60
|
+
terminalCount: 0,
|
|
61
|
+
terminalSetHash: hash([]),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const cohort = input.operation === 'activate' && input.cohortMode === 'replace'
|
|
65
|
+
? {
|
|
66
|
+
cohortMode: input.cohortMode,
|
|
67
|
+
canaryClientSetHash: hash(sorted(input.canaryClientIds)),
|
|
68
|
+
canaryClientCount: sorted(input.canaryClientIds).length,
|
|
69
|
+
recoveryClientSetHash: hash(sorted(input.recoveryClientIds)),
|
|
70
|
+
recoveryClientCount: sorted(input.recoveryClientIds).length,
|
|
71
|
+
}
|
|
72
|
+
: input.operation === 'activate' ||
|
|
73
|
+
input.operation === 'rollback' ||
|
|
74
|
+
input.operation === 'finalize'
|
|
75
|
+
? {
|
|
76
|
+
cohortMode: 'preserve',
|
|
77
|
+
canaryClientSetHash: rollout.canaryClientSetHash,
|
|
78
|
+
canaryClientCount: rollout.canaryClientCount,
|
|
79
|
+
recoveryClientSetHash: rollout.recoveryClientSetHash,
|
|
80
|
+
recoveryClientCount: rollout.recoveryClientCount,
|
|
81
|
+
}
|
|
82
|
+
: {
|
|
83
|
+
cohortMode: null,
|
|
84
|
+
canaryClientSetHash: hash([]),
|
|
85
|
+
canaryClientCount: 0,
|
|
86
|
+
recoveryClientSetHash: hash([]),
|
|
87
|
+
recoveryClientCount: 0,
|
|
88
|
+
};
|
|
89
|
+
return {
|
|
90
|
+
percentage: input.operation === 'activate'
|
|
91
|
+
? input.percentage
|
|
92
|
+
: input.operation === 'rollback'
|
|
93
|
+
? 0
|
|
94
|
+
: input.operation === 'finalize'
|
|
95
|
+
? 100
|
|
96
|
+
: null,
|
|
97
|
+
batchSize: input.operation === 'reconcile' ? input.batchSize : null,
|
|
98
|
+
...cohort,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
export function platformAuthRolloutCohort(input) {
|
|
102
|
+
return input.operation === 'activate' && input.cohortMode === 'replace'
|
|
103
|
+
? {
|
|
104
|
+
cohortMode: input.cohortMode,
|
|
105
|
+
canaryClientIds: input.canaryClientIds,
|
|
106
|
+
recoveryClientIds: input.recoveryClientIds,
|
|
107
|
+
}
|
|
108
|
+
: { cohortMode: 'preserve' };
|
|
109
|
+
}
|
|
110
|
+
export function platformAuthRolloutPercentage(input) {
|
|
111
|
+
return input.operation === 'activate'
|
|
112
|
+
? input.percentage
|
|
113
|
+
: input.operation === 'rollback'
|
|
114
|
+
? 0
|
|
115
|
+
: 100;
|
|
116
|
+
}
|
|
117
|
+
export function platformAuthFinalizationEvidence(input) {
|
|
118
|
+
return input.operation === 'finalize'
|
|
119
|
+
? {
|
|
120
|
+
operation: input.operation,
|
|
121
|
+
rollbackRehearsalChecksum: input.rollbackRehearsalChecksum,
|
|
122
|
+
stagingWorkosOnlySmokeChecksum: input.stagingWorkosOnlySmokeChecksum,
|
|
123
|
+
}
|
|
124
|
+
: { operation: input.operation };
|
|
125
|
+
}
|
|
126
|
+
export function platformAuthExecutionPreviewRequest(input) {
|
|
127
|
+
if (input.operation === 'activate') {
|
|
128
|
+
return input.cohortMode === 'replace'
|
|
129
|
+
? {
|
|
130
|
+
schemaVersion: 1,
|
|
131
|
+
operation: input.operation,
|
|
132
|
+
percentage: input.percentage,
|
|
133
|
+
cohortMode: input.cohortMode,
|
|
134
|
+
canaryClientIds: [...input.canaryClientIds],
|
|
135
|
+
recoveryClientIds: [...input.recoveryClientIds],
|
|
136
|
+
}
|
|
137
|
+
: {
|
|
138
|
+
schemaVersion: 1,
|
|
139
|
+
operation: input.operation,
|
|
140
|
+
percentage: input.percentage,
|
|
141
|
+
cohortMode: input.cohortMode,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
return input.operation === 'finalize'
|
|
145
|
+
? {
|
|
146
|
+
schemaVersion: 1,
|
|
147
|
+
operation: input.operation,
|
|
148
|
+
rollbackRehearsalChecksum: input.rollbackRehearsalChecksum,
|
|
149
|
+
stagingWorkosOnlySmokeChecksum: input.stagingWorkosOnlySmokeChecksum,
|
|
150
|
+
}
|
|
151
|
+
: { schemaVersion: 1, operation: input.operation };
|
|
152
|
+
}
|
|
153
|
+
function sorted(values) {
|
|
154
|
+
return [...new Set(values)].sort();
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=platform-auth-operator-rollout.js.map
|