@tokenoftrust/storefront-runner 1.4.2-rc.0 → 2.0.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/apps/storefront/astro.config.mjs +3 -3
- package/apps/storefront/env.d.ts +54 -5
- package/apps/storefront/integrations/materialize-guard.mjs +12 -14
- package/apps/storefront/migrations-apps/0004_deep_morph.sql +36 -0
- package/apps/storefront/migrations-apps/0005_common_mystique.sql +23 -0
- package/apps/storefront/migrations-apps/0006_broad_microchip.sql +16 -0
- package/apps/storefront/migrations-apps/0007_brave_outlaw_kid.sql +15 -0
- package/apps/storefront/migrations-apps/0008_blue_dazzler.sql +11 -0
- package/apps/storefront/migrations-apps/0009_bored_shinobi_shaw.sql +15 -0
- package/apps/storefront/migrations-apps/0010_ws4_verified_provider_measurement.sql +35 -0
- package/apps/storefront/migrations-apps/meta/0004_snapshot.json +1474 -0
- package/apps/storefront/migrations-apps/meta/0005_snapshot.json +1617 -0
- package/apps/storefront/migrations-apps/meta/0006_snapshot.json +1716 -0
- package/apps/storefront/migrations-apps/meta/0007_snapshot.json +1812 -0
- package/apps/storefront/migrations-apps/meta/0008_snapshot.json +1881 -0
- package/apps/storefront/migrations-apps/meta/0009_snapshot.json +1979 -0
- package/apps/storefront/migrations-apps/meta/_journal.json +42 -0
- package/apps/storefront/public/apps/tot.demo.analytics/0.1.0/entry.js +42 -0
- package/apps/storefront/public/platform/amplitude-http/v1/entry.mjs +19 -0
- package/apps/storefront/public/platform/google-measurement/v1/entry.mjs +19 -0
- package/apps/storefront/public/shared/commerce-chrome.css +20 -2
- package/apps/storefront/scripts/build-v84-clean-clone-standalone.mjs +68 -0
- package/apps/storefront/scripts/deny-v84-clean-clone-standalone-capabilities.mjs +111 -0
- package/apps/storefront/scripts/deny-v84-dogfood-capabilities.mjs +2 -0
- package/apps/storefront/scripts/deny-v84-lifecycle-capabilities.mjs +247 -0
- package/apps/storefront/scripts/dogfood-v84-nonportable-routes.ts +73 -0
- package/apps/storefront/scripts/fixed-v84-native-install-producer.ts +79 -0
- package/apps/storefront/scripts/generated/v84-clean-clone-replay.bundle.mjs +10982 -0
- package/apps/storefront/scripts/import-v84-through-ws2.ts +38 -0
- package/apps/storefront/scripts/initialize-v84-lifecycle-tooling-dependency.ts +2 -0
- package/apps/storefront/scripts/initialize-v84-lifecycle-tooling.ts +4 -0
- package/apps/storefront/scripts/install-v84-native-through-ws1.ts +185 -0
- package/apps/storefront/scripts/prove-clone-isolation.ts +506 -0
- package/apps/storefront/scripts/replay-v84-clean-clone-pass.ts +148 -0
- package/apps/storefront/scripts/replay-v84-clean-clone-standalone.ts +35 -0
- package/apps/storefront/scripts/replay-v84-clean-clone.ts +214 -0
- package/apps/storefront/scripts/run-fixed-v84-native-install-producer.mjs +18 -0
- package/apps/storefront/scripts/run-v84-clone-isolation-proof.mjs +18 -0
- package/apps/storefront/scripts/run-v84-clone-lifecycle-proof.mjs +18 -0
- package/apps/storefront/scripts/run-v84-import-through-ws2-proof.mjs +17 -0
- package/apps/storefront/scripts/run-v84-nonportable-route-dogfood.mjs +15 -0
- package/apps/storefront/scripts/sanitize-v84-proof-environment.mjs +21 -0
- package/apps/storefront/scripts/v84CleanCloneGraphPin.ts +42 -0
- package/apps/storefront/scripts/v84CleanCloneSourceGraph.ts +145 -0
- package/apps/storefront/scripts/validate-v84-clone-lifecycle.ts +18 -0
- package/apps/storefront/src/components/Img.astro +1 -1
- package/apps/storefront/src/components/admin/AdminBlogTab.astro +19 -16
- package/apps/storefront/src/components/admin/AdminIntegrationsTab.astro +105 -0
- package/apps/storefront/src/components/admin/AdminPublishTab.astro +1057 -412
- package/apps/storefront/src/components/admin/AdminSettingsTab.astro +2 -2
- package/apps/storefront/src/components/admin/orders/OrdersWorkspace.astro +5 -5
- package/apps/storefront/src/components/chrome/NavDropdown.astro +12 -0
- package/apps/storefront/src/components/chrome/SiteFooter.astro +7 -2
- package/apps/storefront/src/components/chrome/SiteHeader.astro +46 -10
- package/apps/storefront/src/components/compliance/AdultSignatureNotice.astro +1 -1
- package/apps/storefront/src/components/compliance/ComplianceNotice.astro +1 -2
- package/apps/storefront/src/components/compliance/ExciseTaxNotice.astro +1 -2
- package/apps/storefront/src/components/compliance/PactActNotice.astro +1 -1
- package/apps/storefront/src/components/compliance/Prop65Warning.astro +1 -2
- package/apps/storefront/src/components/compliance/PurchaseLimitNotice.astro +2 -3
- package/apps/storefront/src/components/compliance/ShippingRestrictionNotice.astro +2 -2
- package/apps/storefront/src/components/compliance/StateEligibilityNotice.astro +2 -3
- package/apps/storefront/src/components/content/TrustStrip.astro +4 -4
- package/apps/storefront/src/components/islands/MobileNav.tsx +26 -1
- package/apps/storefront/src/components/islands/VariantSelector.tsx +27 -2
- package/apps/storefront/src/components/islands/useCheckoutHandoffCorrelation.ts +75 -0
- package/apps/storefront/src/components/membership/IllustrativeLabel.astro +1 -2
- package/apps/storefront/src/components/membership/TierCards.astro +2 -2
- package/apps/storefront/src/components/membership/TierComparisonTable.astro +2 -2
- package/apps/storefront/src/components/subscription/SavingsExplainer.astro +2 -2
- package/apps/storefront/src/config/adminTenantLookup.ts +35 -0
- package/apps/storefront/src/config/devTenantSeed.ts +9 -9
- package/apps/storefront/src/config/resolver.ts +4 -4
- package/apps/storefront/src/layouts/Layout.astro +100 -20
- package/apps/storefront/src/lib/activity/candidateSubmitLease.ts +87 -0
- package/apps/storefront/src/lib/activity/changeActorAttribution.ts +86 -6
- package/apps/storefront/src/lib/activity/deployVersion.ts +1 -1
- package/apps/storefront/src/lib/admin/adminShell.ts +2 -0
- package/apps/storefront/src/lib/admin/envelope.ts +1 -2
- package/apps/storefront/src/lib/apps/adminService.ts +10 -0
- package/apps/storefront/src/lib/apps/adminSession.ts +1 -1
- package/apps/storefront/src/lib/apps/appVersionStore.ts +281 -0
- package/apps/storefront/src/lib/apps/consentConfigStore.ts +228 -0
- package/apps/storefront/src/lib/apps/gtmMigrationInstall.ts +447 -0
- package/apps/storefront/src/lib/apps/gtmMigrationReport.ts +367 -0
- package/apps/storefront/src/lib/apps/gtmMigrationTab.ts +315 -0
- package/apps/storefront/src/lib/apps/integrationLifecycle.ts +614 -0
- package/apps/storefront/src/lib/apps/integrationLifecycleController.ts +125 -0
- package/apps/storefront/src/lib/apps/integrationReadModel.ts +563 -0
- package/apps/storefront/src/lib/apps/integrationsTab.ts +547 -0
- package/apps/storefront/src/lib/apps/integrationsView.ts +106 -0
- package/apps/storefront/src/lib/apps/managedAnalyticsService.ts +599 -0
- package/apps/storefront/src/lib/apps/orders/orderConversionD1.ts +150 -0
- package/apps/storefront/src/lib/apps/orders/orderForwardReceiver.ts +8 -0
- package/apps/storefront/src/lib/apps/orders/ordersStore.ts +1 -1
- package/apps/storefront/src/lib/apps/orders/verifiedProviderMeasurement.ts +117 -0
- package/apps/storefront/src/lib/apps/registryService.ts +264 -10
- package/apps/storefront/src/lib/apps/tenantIntegrationMaterialization.ts +170 -0
- package/apps/storefront/src/lib/apps/v84CleanCloneReplayContext.ts +16 -0
- package/apps/storefront/src/lib/apps/v84CloneLifecycleCacheEvidence.ts +105 -0
- package/apps/storefront/src/lib/apps/v84CloneLifecycleEvidence.ts +177 -0
- package/apps/storefront/src/lib/apps/v84CloneLifecycleMaterialization.ts +251 -0
- package/apps/storefront/src/lib/apps/v84CloneLifecycleSemantics.ts +241 -0
- package/apps/storefront/src/lib/apps/v84CloneMigrationEvidence.ts +211 -0
- package/apps/storefront/src/lib/apps/v84CloneNativeInstallEvidence.ts +409 -0
- package/apps/storefront/src/lib/apps/v84NonportableCodeCoaching.ts +368 -0
- package/apps/storefront/src/lib/apps/v84NonportableRouteContract.ts +188 -0
- package/apps/storefront/src/lib/apps/v84NonportableRouteDogfood.ts +291 -0
- package/apps/storefront/src/lib/apps/ws1ManagedAnalyticsClient.ts +95 -0
- package/apps/storefront/src/lib/auth/adminApiGuard.ts +66 -0
- package/apps/storefront/src/lib/auth/adminEntry.ts +2 -2
- package/apps/storefront/src/lib/auth/adminLanding.ts +88 -0
- package/apps/storefront/src/lib/blog/collection.ts +97 -10
- package/apps/storefront/src/lib/blog/markdown.ts +1 -1
- package/apps/storefront/src/lib/blog/provider.ts +57 -3
- package/apps/storefront/src/lib/blog/types.ts +9 -9
- package/apps/storefront/src/lib/chrome/examples/tokenoftrust.chrome-assignments.example.json +6 -0
- package/apps/storefront/src/lib/chrome/examples/tokenoftrust.chrome.example.json +79 -0
- package/apps/storefront/src/lib/chrome/model.ts +48 -253
- package/apps/storefront/src/lib/chrome/navCurrent.ts +29 -0
- package/apps/storefront/src/lib/chrome/parseConfig.ts +18 -32
- package/apps/storefront/src/lib/chrome/variant.ts +39 -0
- package/apps/storefront/src/lib/commerce/checkoutHandoffCorrelation.ts +105 -0
- package/apps/storefront/src/lib/compliance/tamper-sentinel-boot.ts +152 -0
- package/apps/storefront/src/lib/compliance/tamper-sentinel.ts +327 -0
- package/apps/storefront/src/lib/content/index.ts +5 -5
- package/apps/storefront/src/lib/content-edit/applyDiff.ts +1 -1
- package/apps/storefront/src/lib/content-edit/route.ts +1 -1
- package/apps/storefront/src/lib/d1/catalog.ts +12 -0
- package/apps/storefront/src/lib/d1/schema-apps.ts +276 -0
- package/apps/storefront/src/lib/dev/cockpit/ask.ts +49 -0
- package/apps/storefront/src/lib/dev/cockpit/clickToSource.ts +71 -0
- package/apps/storefront/src/lib/dev/cockpit/copyCommand.ts +227 -0
- package/apps/storefront/src/lib/dev/cockpit/files.ts +249 -0
- package/apps/storefront/src/lib/dev/cockpit/hostedActivity.ts +500 -0
- package/apps/storefront/src/lib/dev/cockpit/infoPopover.ts +12 -0
- package/apps/storefront/src/lib/dev/cockpit/mcpCopy.ts +34 -0
- package/apps/storefront/src/lib/dev/cockpit/monitor.ts +107 -0
- package/apps/storefront/src/lib/dev/cockpit/stepper.ts +116 -0
- package/apps/storefront/src/lib/dev/cockpit/themeToggle.ts +23 -0
- package/apps/storefront/src/lib/dev/runtimeStore.ts +1 -1
- package/apps/storefront/src/lib/edgeCache.ts +18 -6
- package/apps/storefront/src/lib/email/candidateConflictEmail.ts +80 -0
- package/apps/storefront/src/lib/integration/browserEnvironment.ts +137 -0
- package/apps/storefront/src/lib/integration/managedInstallDeclarations.ts +72 -0
- package/apps/storefront/src/lib/integration/nonceStamp.ts +49 -0
- package/apps/storefront/src/lib/integration/tenantDeclarations.ts +116 -0
- package/apps/storefront/src/lib/membership/eligibility.ts +1 -1
- package/apps/storefront/src/lib/membership/model.ts +1 -2
- package/apps/storefront/src/lib/newsletter/confirmationEmail.ts +2 -2
- package/apps/storefront/src/lib/newsletter/consent.ts +2 -2
- package/apps/storefront/src/lib/newsletter/send.ts +3 -3
- package/apps/storefront/src/lib/previewReload.ts +57 -1
- package/apps/storefront/src/lib/publish/adminPublishTab.ts +1775 -669
- package/apps/storefront/src/lib/publish/buildStream.ts +269 -0
- package/apps/storefront/src/lib/publish/collapsePersistence.ts +72 -0
- package/apps/storefront/src/lib/publish/lifecycleState.ts +369 -0
- package/apps/storefront/src/lib/publish/liveReleaseSummary.ts +29 -0
- package/apps/storefront/src/lib/publish/mergeDoctorOnFailure.ts +78 -0
- package/apps/storefront/src/lib/publish/mergeHealthBanner.ts +62 -0
- package/apps/storefront/src/lib/publish/mergeRowFindings.ts +124 -0
- package/apps/storefront/src/lib/publish/mergeSupportEscalation.ts +75 -0
- package/apps/storefront/src/lib/publish/publish-guard.ts +88 -0
- package/apps/storefront/src/lib/publish/publishFormat.ts +165 -0
- package/apps/storefront/src/lib/publish/publishHero.ts +177 -0
- package/apps/storefront/src/lib/publish/reviewRelease/changeState.ts +66 -0
- package/apps/storefront/src/lib/publish/reviewRelease/copy.ts +141 -0
- package/apps/storefront/src/lib/publish/reviewRelease/index.ts +41 -0
- package/apps/storefront/src/lib/publish/reviewRelease/permissions.ts +47 -0
- package/apps/storefront/src/lib/publish/reviewRelease/releaseState.ts +42 -0
- package/apps/storefront/src/lib/publish/reviewRelease/types.ts +59 -0
- package/apps/storefront/src/lib/publish/reviewRelease/viewModel.ts +440 -0
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/actions.ts +161 -0
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/controller.ts +325 -0
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/render.ts +241 -0
- package/apps/storefront/src/lib/publish/shipWorkspace.ts +22 -3
- package/apps/storefront/src/lib/publish/sseRoute.ts +119 -0
- package/apps/storefront/src/lib/publish/streamLogConsole.ts +142 -0
- package/apps/storefront/src/lib/publish/versionNumber.ts +52 -0
- package/apps/storefront/src/lib/rawChrome.ts +125 -47
- package/apps/storefront/src/lib/rawMarketingHtml.ts +74 -3
- package/apps/storefront/src/lib/seo/alternates.ts +1 -1
- package/apps/storefront/src/lib/social/notify.ts +4 -4
- package/apps/storefront/src/lib/storyblok/content-model.ts +7 -33
- package/apps/storefront/src/lib/storyblok/provider.ts +168 -60
- package/apps/storefront/src/lib/subscription/model.ts +4 -4
- package/apps/storefront/src/lib/the-build/provider.ts +9 -4
- package/apps/storefront/src/middleware/index.ts +273 -51
- package/apps/storefront/src/pages/[...slug].astro +9 -4
- package/apps/storefront/src/pages/admin/review-release.astro +265 -0
- package/apps/storefront/src/pages/admin/select.astro +96 -0
- package/apps/storefront/src/pages/admin.astro +16 -2
- package/apps/storefront/src/pages/api/activity.ts +8 -8
- package/apps/storefront/src/pages/api/admin/activity-alerts.ts +5 -20
- package/apps/storefront/src/pages/api/admin/orders/[id].ts +7 -2
- package/apps/storefront/src/pages/api/admin/orders.ts +8 -2
- package/apps/storefront/src/pages/api/apps/admin/gtm-migration-install.ts +174 -0
- package/apps/storefront/src/pages/api/apps/admin/gtm-migration.ts +96 -0
- package/apps/storefront/src/pages/api/apps/admin/integration-lifecycle.ts +118 -0
- package/apps/storefront/src/pages/api/apps/admin/integrations.ts +89 -0
- package/apps/storefront/src/pages/api/apps/admin/platform-adapters.ts +85 -0
- package/apps/storefront/src/pages/api/apps/internal/order-forward.ts +74 -2
- package/apps/storefront/src/pages/api/commerce/checkout-handoff.ts +77 -0
- package/apps/storefront/src/pages/api/compliance/tamper.ts +88 -0
- package/apps/storefront/src/pages/api/integrations/v1/[operation].ts +108 -0
- package/apps/storefront/src/pages/api/rum/vitals.ts +1 -2
- package/apps/storefront/src/pages/blog/[slug].astro +5 -5
- package/apps/storefront/src/pages/blog/author/[author].astro +3 -3
- package/apps/storefront/src/pages/blog/category/[category].astro +2 -2
- package/apps/storefront/src/pages/blog/index.astro +2 -2
- package/apps/storefront/src/pages/blog/tag/[tag].astro +2 -2
- package/apps/storefront/src/pages/cockpit.astro +61 -1362
- package/apps/storefront/src/pages/index.astro +10 -5
- package/apps/storefront/src/pages/llms.txt.ts +1 -1
- package/apps/storefront/src/pages/products/[handle].astro +7 -6
- package/apps/storefront/src/pages/sitemap.xml.ts +2 -2
- package/apps/storefront/src/pages/style-guide/[tenant]/[theme].astro +31 -27
- package/apps/storefront/src/pages/style-guide/[tenant]/chrome/[theme].astro +1 -1
- package/apps/storefront/src/pages/tenants/[id]/[...path].ts +38 -2
- package/apps/storefront/src/pages/the-build/[slug].astro +4 -4
- package/apps/storefront/src/pages/the-build/index.astro +2 -2
- package/apps/storefront/src/pages/the-build/rss.xml.ts +2 -2
- package/apps/storefront/src/styles/admin.css +27 -1
- package/apps/storefront/tsconfig.json +1 -1
- package/package.json +1 -1
- package/packages/public-runtime/package.json +2 -1
- package/packages/public-runtime/schemas/managed-analytics/v1/adapter-definition.schema.json +427 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/create-integration-install-request.schema.json +161 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/create-migration-draft-request.schema.json +157 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/delete-integration-install-request.schema.json +84 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/delete-migration-draft-request.schema.json +84 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/error-envelope.schema.json +180 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/get-adapter-definition-request.schema.json +52 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/get-integration-install-request.schema.json +52 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/get-integration-revision-request.schema.json +79 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/get-migration-draft-request.schema.json +52 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/integration-install.schema.json +167 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/integration-revision.schema.json +208 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/list-adapter-definitions-request.schema.json +53 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/list-integration-installs-request.schema.json +53 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/list-integration-revisions-request.schema.json +82 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/migration-draft.schema.json +218 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/mutation-request.schema.json +52 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/mutation-success-envelope.schema.json +49 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/read-request.schema.json +20 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/read-success-envelope.schema.json +45 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/revise-integration-install-request.schema.json +156 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/set-integration-install-status-request.schema.json +92 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/update-migration-draft-request.schema.json +184 -0
- package/packages/public-runtime/scripts/generate-managed-analytics-api-v1-schemas.mjs +13 -0
- package/packages/public-runtime/src/activity/catalog.ts +41 -37
- package/packages/public-runtime/src/activity/event.ts +6 -6
- package/packages/public-runtime/src/activity/index.ts +2 -2
- package/packages/public-runtime/src/activity/redaction.ts +4 -4
- package/packages/public-runtime/src/candidate-index.ts +42 -8
- package/packages/public-runtime/src/checkout-orders.ts +2 -2
- package/packages/public-runtime/src/checkout-style-publish.ts +2 -2
- package/packages/public-runtime/src/checkout-style.ts +7 -7
- package/packages/public-runtime/src/checkout.ts +3 -3
- package/packages/public-runtime/src/chrome.ts +777 -0
- package/packages/public-runtime/src/compliance-obligations.ts +310 -0
- package/packages/public-runtime/src/csp.ts +99 -0
- package/packages/public-runtime/src/customization-runtime.ts +32 -1
- package/packages/public-runtime/src/destination-webhook/contract.ts +353 -0
- package/packages/public-runtime/src/embed-catalog.d.mts +9 -0
- package/packages/public-runtime/src/embed-catalog.mjs +40 -0
- package/packages/public-runtime/src/evidence.ts +288 -0
- package/packages/public-runtime/src/gtm-migration/bounds.ts +138 -0
- package/packages/public-runtime/src/gtm-migration/disposition-rules.ts +361 -0
- package/packages/public-runtime/src/gtm-migration/dispositions.ts +181 -0
- package/packages/public-runtime/src/gtm-migration/draft-generator.ts +400 -0
- package/packages/public-runtime/src/gtm-migration/graph.ts +468 -0
- package/packages/public-runtime/src/gtm-migration/index.ts +95 -0
- package/packages/public-runtime/src/gtm-migration/parse.ts +410 -0
- package/packages/public-runtime/src/gtm-migration/references.ts +266 -0
- package/packages/public-runtime/src/gtm-migration/types.ts +86 -0
- package/packages/public-runtime/src/index.ts +16 -1
- package/packages/public-runtime/src/integration/assurance-decision.ts +259 -0
- package/packages/public-runtime/src/integration/assurance.ts +228 -0
- package/packages/public-runtime/src/integration/candidate-evidence.ts +377 -0
- package/packages/public-runtime/src/integration/commerce-broker.ts +497 -0
- package/packages/public-runtime/src/integration/consent-broker.ts +337 -0
- package/packages/public-runtime/src/integration/consent-cmp-demand.ts +115 -0
- package/packages/public-runtime/src/integration/consent-config.ts +260 -0
- package/packages/public-runtime/src/integration/consent-preview.ts +125 -0
- package/packages/public-runtime/src/integration/correlation-token.ts +444 -0
- package/packages/public-runtime/src/integration/csp-compiler.ts +267 -0
- package/packages/public-runtime/src/integration/csp.ts +105 -0
- package/packages/public-runtime/src/integration/digest.ts +43 -0
- package/packages/public-runtime/src/integration/environment.ts +228 -0
- package/packages/public-runtime/src/integration/events-catalog.ts +186 -0
- package/packages/public-runtime/src/integration/events.ts +701 -0
- package/packages/public-runtime/src/integration/g2-action-boundary.ts +106 -0
- package/packages/public-runtime/src/integration/index.ts +90 -0
- package/packages/public-runtime/src/integration/interim-bridge.ts +138 -0
- package/packages/public-runtime/src/integration/lifecycle-boot.ts +317 -0
- package/packages/public-runtime/src/integration/lifecycle-runtime.ts +393 -0
- package/packages/public-runtime/src/integration/lifecycle.ts +94 -0
- package/packages/public-runtime/src/integration/managed-analytics-api-v1-safety.d.mts +2 -0
- package/packages/public-runtime/src/integration/managed-analytics-api-v1-safety.mjs +10 -0
- package/packages/public-runtime/src/integration/managed-analytics-api-v1.schemas.ts +382 -0
- package/packages/public-runtime/src/integration/managed-analytics-api-v1.ts +684 -0
- package/packages/public-runtime/src/integration/managed-analytics-bridge.ts +383 -0
- package/packages/public-runtime/src/integration/managed-analytics-value-safety.ts +14 -0
- package/packages/public-runtime/src/integration/managed-analytics.ts +277 -0
- package/packages/public-runtime/src/integration/manifest.ts +470 -0
- package/packages/public-runtime/src/integration/native-amplitude.ts +362 -0
- package/packages/public-runtime/src/integration/native-ga4.ts +352 -0
- package/packages/public-runtime/src/integration/observability.ts +451 -0
- package/packages/public-runtime/src/integration/order-conversion.ts +0 -0
- package/packages/public-runtime/src/integration/phases.ts +182 -0
- package/packages/public-runtime/src/integration/plan.ts +112 -0
- package/packages/public-runtime/src/integration/platform-adapter-runtime.ts +146 -0
- package/packages/public-runtime/src/integration/platform-adapters.ts +671 -0
- package/packages/public-runtime/src/integration/promotion-gate.ts +451 -0
- package/packages/public-runtime/src/integration/provider-checkout-extension.ts +425 -0
- package/packages/public-runtime/src/integration/receipt-measurement.ts +370 -0
- package/packages/public-runtime/src/integration/regulated-parent-cert.ts +311 -0
- package/packages/public-runtime/src/integration/render-phases.ts +267 -0
- package/packages/public-runtime/src/integration/resolve.ts +465 -0
- package/packages/public-runtime/src/integration/result.ts +239 -0
- package/packages/public-runtime/src/integration/secrets.ts +92 -0
- package/packages/public-runtime/src/integration/tamper-evidence.ts +205 -0
- package/packages/public-runtime/src/integration/tamper-recovery.ts +127 -0
- package/packages/public-runtime/src/integration/version.ts +92 -0
- package/packages/public-runtime/src/integration-capabilities.ts +520 -0
- package/packages/public-runtime/src/membership.ts +2 -2
- package/packages/public-runtime/src/raw-html-policy.ts +2 -4
- package/packages/public-runtime/src/regulated-commerce/broker/consent-dedupe.ts +144 -0
- package/packages/public-runtime/src/regulated-commerce/correlation/contract.ts +177 -0
- package/packages/public-runtime/src/regulated-commerce/diagnostics/local-dispatch.ts +24 -0
- package/packages/public-runtime/src/regulated-commerce/diagnostics/read-model.ts +69 -0
- package/packages/public-runtime/src/regulated-commerce/dispatch/core.ts +134 -0
- package/packages/public-runtime/src/regulated-commerce/events/contract.ts +113 -0
- package/packages/public-runtime/src/regulated-commerce/ledger/core.ts +81 -0
- package/packages/public-runtime/src/regulated-commerce/mappings/ga4-ads.ts +87 -0
- package/packages/public-runtime/src/regulated-commerce/provider-order/bridge.ts +52 -0
- package/packages/public-runtime/src/regulated-commerce/purchase-truth/contract.ts +252 -0
- package/packages/public-runtime/src/regulated-commerce/sources/accepted-browser-operation.ts +67 -0
- package/packages/public-runtime/src/regulated-commerce/testing/fake-destination.ts +93 -0
- package/packages/public-runtime/src/static-bundle.ts +5 -5
- package/packages/public-runtime/src/tenant-assets.ts +143 -4
- package/packages/public-runtime/src/tenant.ts +45 -9
- package/packages/public-runtime/tests/fixtures/integration/browser-environment.example.json +8 -0
- package/packages/public-runtime/tests/fixtures/integration/commerce-event.example.json +44 -0
- package/packages/public-runtime/tests/fixtures/integration/commerce-order-event.example.json +44 -0
- package/packages/public-runtime/tests/fixtures/integration/compliance-assurance-record.example.json +50 -0
- package/packages/public-runtime/tests/fixtures/integration/integration-manifest-v2.example.json +120 -0
- package/packages/public-runtime/tests/fixtures/integration/managed-analytics-v1/fake-adapter-catalog.json +35 -0
- package/packages/public-runtime/tests/fixtures/integration/tenant-action-registry.example.json +11 -0
- package/packages/public-runtime/tests/fixtures/integration/tenant-local-example/README.md +22 -0
- package/packages/public-runtime/tests/fixtures/integration/tenant-local-example/entry.js +30 -0
- package/packages/public-runtime/tests/fixtures/integration/tenant-local-example/manifest.json +75 -0
- package/packages/public-runtime/tests/fixtures/integration/tenant-local-example/public-config.json +3 -0
- package/packages/public-runtime/tests/fixtures/regulated-commerce/fake-destinations.ts +38 -0
- package/packages/public-runtime/tests/gtm-migration/fixtures/gtm-sample-container-v84.provenance.json +29 -0
- package/packages/public-runtime/tests/gtm-migration/fixtures/gtm-sample-container-v84.redacted.json +3397 -0
- package/scripts/dev/file-browser.mjs +2 -2
- package/scripts/dev/file-writer.mjs +2 -2
- package/scripts/dev/integration-guardrails.mjs +498 -0
- package/scripts/dev/safe-path.mjs +2 -2
- package/scripts/dev/tenant-source-root.mjs +1 -1
- package/scripts/tot-dev.mjs +2 -2
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://tokenoftrust.com/schemas/managed-analytics/v1/set-integration-install-status-request.schema.json",
|
|
4
|
+
"title": "SetIntegrationInstallStatusRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"apiVersion",
|
|
9
|
+
"idempotencyKey",
|
|
10
|
+
"expectedRevision",
|
|
11
|
+
"body"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"apiVersion": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"const": "v1"
|
|
17
|
+
},
|
|
18
|
+
"idempotencyKey": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"not": {
|
|
21
|
+
"anyOf": [
|
|
22
|
+
{
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})[ .-]?[0-9]{3}[ .-]?[0-9]{4}(?=$|[^0-9]))"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "string",
|
|
36
|
+
"pattern": "(?:</?[A-Za-z][^>]*>|[Jj][Aa][Vv][Aa][Ss][Cc][Rr][Ii][Pp][Tt]\\s*:|[Ee][Vv][Aa][Ll]\\s*\\(|(?:[Aa][Ll][Ee][Rr][Tt]|[Ff][Ee][Tt][Cc][Hh])\\s*\\(|\\{\\{|\\}\\}|\\$\\{|#[A-Za-z_][A-Za-z0-9_-]*|(?:^|[\\s,>+~])\\.[A-Za-z_-][A-Za-z0-9_-]*(?:$|[\\s,>+~.#[\\:])|\\[[A-Za-z_:][-A-Za-z0-9_:.]*(?:[~|^$*]?=[^\\]]+)?\\]|(?:[Ll][Oo][Cc][Aa][Ll]|[Ss][Ee][Ss][Ss][Ii][Oo][Nn])[Ss][Tt][Oo][Rr][Aa][Gg][Ee]|[Ii][Nn][Dd][Ee][Xx][Ee][Dd][Dd][Bb]|[Qq][Uu][Ee][Rr][Yy][Ss][Ee][Ll][Ee][Cc][Tt][Oo][Rr]|(?:[Ww][Ii][Nn][Dd][Oo][Ww]|[Dd][Oo][Cc][Uu][Mm][Ee][Nn][Tt]|[Gg][Ll][Oo][Bb][Aa][Ll][Tt][Hh][Ii][Ss]|[Cc][Oo][Nn][Ss][Oo][Ll][Ee])\\s*(?:\\.|\\[)|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\.\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*\\(|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\([^)]*\\)\\s*;|[Rr][Ee][Tt][Uu][Rr][Nn][^;{}]*;|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|=>|(?:[Vv][Aa][Rr]|[Ll][Ee][Tt]|[Cc][Oo][Nn][Ss][Tt])\\s+[A-Za-z_$])"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"minLength": 8,
|
|
41
|
+
"maxLength": 128,
|
|
42
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
43
|
+
},
|
|
44
|
+
"expectedRevision": {
|
|
45
|
+
"type": "integer",
|
|
46
|
+
"minimum": 0
|
|
47
|
+
},
|
|
48
|
+
"body": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"required": [
|
|
52
|
+
"installId",
|
|
53
|
+
"status"
|
|
54
|
+
],
|
|
55
|
+
"properties": {
|
|
56
|
+
"installId": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"not": {
|
|
59
|
+
"anyOf": [
|
|
60
|
+
{
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "string",
|
|
66
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "string",
|
|
70
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|[2-9][0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
+
"minLength": 1,
|
|
79
|
+
"maxLength": 128,
|
|
80
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
81
|
+
},
|
|
82
|
+
"status": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"enum": [
|
|
85
|
+
"disabled",
|
|
86
|
+
"enabled"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://tokenoftrust.com/schemas/managed-analytics/v1/update-migration-draft-request.schema.json",
|
|
4
|
+
"title": "UpdateMigrationDraftRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"apiVersion",
|
|
9
|
+
"idempotencyKey",
|
|
10
|
+
"expectedRevision",
|
|
11
|
+
"body"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"apiVersion": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"const": "v1"
|
|
17
|
+
},
|
|
18
|
+
"idempotencyKey": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"not": {
|
|
21
|
+
"anyOf": [
|
|
22
|
+
{
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})[ .-]?[0-9]{3}[ .-]?[0-9]{4}(?=$|[^0-9]))"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "string",
|
|
36
|
+
"pattern": "(?:</?[A-Za-z][^>]*>|[Jj][Aa][Vv][Aa][Ss][Cc][Rr][Ii][Pp][Tt]\\s*:|[Ee][Vv][Aa][Ll]\\s*\\(|(?:[Aa][Ll][Ee][Rr][Tt]|[Ff][Ee][Tt][Cc][Hh])\\s*\\(|\\{\\{|\\}\\}|\\$\\{|#[A-Za-z_][A-Za-z0-9_-]*|(?:^|[\\s,>+~])\\.[A-Za-z_-][A-Za-z0-9_-]*(?:$|[\\s,>+~.#[\\:])|\\[[A-Za-z_:][-A-Za-z0-9_:.]*(?:[~|^$*]?=[^\\]]+)?\\]|(?:[Ll][Oo][Cc][Aa][Ll]|[Ss][Ee][Ss][Ss][Ii][Oo][Nn])[Ss][Tt][Oo][Rr][Aa][Gg][Ee]|[Ii][Nn][Dd][Ee][Xx][Ee][Dd][Dd][Bb]|[Qq][Uu][Ee][Rr][Yy][Ss][Ee][Ll][Ee][Cc][Tt][Oo][Rr]|(?:[Ww][Ii][Nn][Dd][Oo][Ww]|[Dd][Oo][Cc][Uu][Mm][Ee][Nn][Tt]|[Gg][Ll][Oo][Bb][Aa][Ll][Tt][Hh][Ii][Ss]|[Cc][Oo][Nn][Ss][Oo][Ll][Ee])\\s*(?:\\.|\\[)|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\.\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*\\(|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\([^)]*\\)\\s*;|[Rr][Ee][Tt][Uu][Rr][Nn][^;{}]*;|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|=>|(?:[Vv][Aa][Rr]|[Ll][Ee][Tt]|[Cc][Oo][Nn][Ss][Tt])\\s+[A-Za-z_$])"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"minLength": 8,
|
|
41
|
+
"maxLength": 128,
|
|
42
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
43
|
+
},
|
|
44
|
+
"expectedRevision": {
|
|
45
|
+
"type": "integer",
|
|
46
|
+
"minimum": 0
|
|
47
|
+
},
|
|
48
|
+
"body": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"required": [
|
|
52
|
+
"draftId",
|
|
53
|
+
"proposedAdapterId",
|
|
54
|
+
"proposedConfiguration",
|
|
55
|
+
"findings"
|
|
56
|
+
],
|
|
57
|
+
"properties": {
|
|
58
|
+
"draftId": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"not": {
|
|
61
|
+
"anyOf": [
|
|
62
|
+
{
|
|
63
|
+
"type": "string",
|
|
64
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "string",
|
|
68
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "string",
|
|
72
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})[ .-]?[0-9]{3}[ .-]?[0-9]{4}(?=$|[^0-9]))"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type":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83
|
+
},
|
|
84
|
+
"proposedAdapterId": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"not": {
|
|
87
|
+
"anyOf": [
|
|
88
|
+
{
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "string",
|
|
94
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "string",
|
|
98
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|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
|
106
|
+
"minLength": 1,
|
|
107
|
+
"maxLength": 128,
|
|
108
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
109
|
+
},
|
|
110
|
+
"proposedConfiguration": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"propertyNames": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"pattern": "^[a-z][a-zA-Z0-9]{0,63}$",
|
|
115
|
+
"not": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"pattern": "^(?:(?:nonce|token|secret|credential|bearer|password|passwd|passphrase|signature|tenant|html|javascript|js|script|template|eval|selector|storage|cookie|gtm)(?:$|[A-Z].*)|.*(?:Nonce|Token|Secret|Credential|Bearer|Password|Passwd|Passphrase|Signature|Tenant|Html|JavaScript|Javascript|Js|Script|Template|Eval|Selector|Storage|Cookie|Gtm|GTM)(?:$|[A-Z].*)|.*(?:signedUrl|SignedUrl|signedURL|SignedURL|apiKey|ApiKey|privateKey|PrivateKey|sessionKey|SessionKey|accessKey|AccessKey|clientSecret|ClientSecret|accessToken|AccessToken|refreshToken|RefreshToken).*|tenantId|liveAuthority|publishAuthority|uaId|localStorage|sessionStorage)$"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"additionalProperties": {
|
|
121
|
+
"oneOf": [
|
|
122
|
+
{
|
|
123
|
+
"type": "string",
|
|
124
|
+
"not": {
|
|
125
|
+
"anyOf": [
|
|
126
|
+
{
|
|
127
|
+
"type": "string",
|
|
128
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "string",
|
|
132
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"type": "string",
|
|
136
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})[ .-]?[0-9]{3}[ .-]?[0-9]{4}(?=$|[^0-9]))"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"type": "string",
|
|
140
|
+
"pattern": "(?:</?[A-Za-z][^>]*>|[Jj][Aa][Vv][Aa][Ss][Cc][Rr][Ii][Pp][Tt]\\s*:|[Ee][Vv][Aa][Ll]\\s*\\(|(?:[Aa][Ll][Ee][Rr][Tt]|[Ff][Ee][Tt][Cc][Hh])\\s*\\(|\\{\\{|\\}\\}|\\$\\{|#[A-Za-z_][A-Za-z0-9_-]*|(?:^|[\\s,>+~])\\.[A-Za-z_-][A-Za-z0-9_-]*(?:$|[\\s,>+~.#[\\:])|\\[[A-Za-z_:][-A-Za-z0-9_:.]*(?:[~|^$*]?=[^\\]]+)?\\]|(?:[Ll][Oo][Cc][Aa][Ll]|[Ss][Ee][Ss][Ss][Ii][Oo][Nn])[Ss][Tt][Oo][Rr][Aa][Gg][Ee]|[Ii][Nn][Dd][Ee][Xx][Ee][Dd][Dd][Bb]|[Qq][Uu][Ee][Rr][Yy][Ss][Ee][Ll][Ee][Cc][Tt][Oo][Rr]|(?:[Ww][Ii][Nn][Dd][Oo][Ww]|[Dd][Oo][Cc][Uu][Mm][Ee][Nn][Tt]|[Gg][Ll][Oo][Bb][Aa][Ll][Tt][Hh][Ii][Ss]|[Cc][Oo][Nn][Ss][Oo][Ll][Ee])\\s*(?:\\.|\\[)|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\.\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*\\(|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\([^)]*\\)\\s*;|[Rr][Ee][Tt][Uu][Rr][Nn][^;{}]*;|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|=>|(?:[Vv][Aa][Rr]|[Ll][Ee][Tt]|[Cc][Oo][Nn][Ss][Tt])\\s+[A-Za-z_$])"
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"type": "boolean"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "integer"
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"findings": {
|
|
155
|
+
"type": "array",
|
|
156
|
+
"items": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"not": {
|
|
159
|
+
"anyOf": [
|
|
160
|
+
{
|
|
161
|
+
"type": "string",
|
|
162
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"type": "string",
|
|
166
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"type": "string",
|
|
170
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})[ .-]?[0-9]{3}[ .-]?[0-9]{4}(?=$|[^0-9]))"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"type": "string",
|
|
174
|
+
"pattern": "(?:</?[A-Za-z][^>]*>|[Jj][Aa][Vv][Aa][Ss][Cc][Rr][Ii][Pp][Tt]\\s*:|[Ee][Vv][Aa][Ll]\\s*\\(|(?:[Aa][Ll][Ee][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resolve } from "node:path";
|
|
4
|
+
import { MANAGED_ANALYTICS_API_V1_JSON_SCHEMAS } from "../src/integration/managed-analytics-api-v1.schemas.ts";
|
|
5
|
+
|
|
6
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const output = resolve(here, "../schemas/managed-analytics/v1");
|
|
8
|
+
await mkdir(output, { recursive: true });
|
|
9
|
+
|
|
10
|
+
for (const schema of Object.values(MANAGED_ANALYTICS_API_V1_JSON_SCHEMAS)) {
|
|
11
|
+
const name = new URL(schema.$id).pathname.split("/").at(-1);
|
|
12
|
+
await writeFile(resolve(output, name), `${JSON.stringify(schema, null, 2)}\n`, "utf8");
|
|
13
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
2
|
-
// Action catalog — the ALLOWLISTED registry of actionKeys
|
|
2
|
+
// Action catalog — the ALLOWLISTED registry of actionKeys.
|
|
3
3
|
//
|
|
4
4
|
// The `action` field of an ActivityEvent is NEVER a free string. It is one of
|
|
5
5
|
// the keys below, and each key ships a spec: which actor kinds may emit it,
|
|
@@ -7,22 +7,22 @@
|
|
|
7
7
|
// default-DENY allowlist of payload fields that survive redaction for it.
|
|
8
8
|
//
|
|
9
9
|
// WHY A FIXED CATALOG. Free-string actions make the downstream query/alert
|
|
10
|
-
// surface
|
|
10
|
+
// surface intractable: you cannot build a dashboard, an alert rule,
|
|
11
11
|
// or a redaction allowlist against an open vocabulary. Adding a NEW action is a
|
|
12
12
|
// deliberate edit HERE (plus, for the CLI, the JS mirror + its keep-in-step
|
|
13
13
|
// test — see the module README), not an ad-hoc string at a call site.
|
|
14
14
|
//
|
|
15
15
|
// GROUNDING. These keys were reverse-engineered from the activity surfaces that
|
|
16
|
-
// already exist informally in this repo, so
|
|
17
|
-
// inventing new vocab:
|
|
16
|
+
// already exist informally in this repo, so those surfaces map onto them 1:1
|
|
17
|
+
// rather than inventing new vocab:
|
|
18
18
|
// • CLI command dispatch + ~/.tot/activity.log → cli.command.*
|
|
19
19
|
// • obstacle beacon (obstacle-beacon.cjs) → cli.obstacle.reported
|
|
20
20
|
// • local→hosted dev bridge (dev/activityStore, runtimeStore, obstacleStore)
|
|
21
21
|
// → dev.*
|
|
22
22
|
// • preview serve / reconcile / Gitea webhook → preview.* / reconcile.* / webhook.*
|
|
23
|
-
// • deploy version observed (provenance
|
|
23
|
+
// • deploy version observed (provenance) → deploy.version_observed
|
|
24
24
|
// • ShipLoop CHANGE_STATES + admin routes
|
|
25
|
-
// (accept/reject/ship/revert/rollback/integrate/publish/invite
|
|
25
|
+
// (accept/reject/ship/revert/rollback/integrate/publish/invite)
|
|
26
26
|
// → change.* / content.* / grant.* / preview.*
|
|
27
27
|
// • app installs (STOREFRONT_APPS_DB) → app.*
|
|
28
28
|
// • agent cohort (later) → agent.*
|
|
@@ -154,7 +154,7 @@ export const ACTION_CATALOG = {
|
|
|
154
154
|
desc: "A preview build finished (result: ok|failed).",
|
|
155
155
|
},
|
|
156
156
|
"preview.override": {
|
|
157
|
-
//
|
|
157
|
+
// An AUTHENTICATED operator accepted the risk of a blocking-safety finding for a
|
|
158
158
|
// specific commit (/api/preview/override), letting the reconcile materialize past it.
|
|
159
159
|
// Cockpit-gated (signed-in real developer capability + session tenant), so the acting
|
|
160
160
|
// cohort is owner→merchant, staff→admin, or a signed-in developer→dev. The required
|
|
@@ -166,7 +166,7 @@ export const ACTION_CATALOG = {
|
|
|
166
166
|
"webhook.reconcile.received": {
|
|
167
167
|
// Gitea candidate-reconcile webhook (api/changes/candidate-reconcile.ts). Low
|
|
168
168
|
// volume (one per PR push, NOT per request) and the lifecycle PARTNER of
|
|
169
|
-
// `reconcile.terminal` — timelined so
|
|
169
|
+
// `reconcile.terminal` — timelined so the reconcile-hang watchdog can correlate
|
|
170
170
|
// "received" against "terminal" for the same changeId and detect an ABSENCE.
|
|
171
171
|
actors: ["system"], source: "server", sinks: LIFECYCLE,
|
|
172
172
|
argsAllow: ["repo", "action", "branch", "changeId"], renderedAllow: [],
|
|
@@ -174,9 +174,9 @@ export const ACTION_CATALOG = {
|
|
|
174
174
|
},
|
|
175
175
|
"reconcile.terminal": {
|
|
176
176
|
// A reconcile reached a terminal state (reconciled|blocked|failed). Low
|
|
177
|
-
// volume, high value → timelined for the ops UI
|
|
177
|
+
// volume, high value → timelined for the ops UI.
|
|
178
178
|
actors: ["system"], source: "server", sinks: LIFECYCLE,
|
|
179
|
-
argsAllow: ["changeId", "result", "evidenceStatus"], renderedAllow: [],
|
|
179
|
+
argsAllow: ["changeId", "result", "evidenceStatus", "evidencePushError"], renderedAllow: [],
|
|
180
180
|
desc: "A candidate reconcile reached a terminal state.",
|
|
181
181
|
},
|
|
182
182
|
"candidate.closed": {
|
|
@@ -189,7 +189,7 @@ export const ACTION_CATALOG = {
|
|
|
189
189
|
desc: "A merged/closed PR webhook transitioned a candidate to a terminal state.",
|
|
190
190
|
},
|
|
191
191
|
"prebuild.dispatched": {
|
|
192
|
-
//
|
|
192
|
+
// Background pre-build (docs/epics/proposed/storefront-instant-static-rollback.md
|
|
193
193
|
// Addendum §B): a successful candidate reconcile fired (or failed to fire) the
|
|
194
194
|
// materialize+validate+STAGE-ONLY repository_dispatch for a static-publish
|
|
195
195
|
// tenant (candidate-reconcile.ts). Fail-open by design — this never gates the
|
|
@@ -200,7 +200,7 @@ export const ACTION_CATALOG = {
|
|
|
200
200
|
desc: "A candidate's background static-prebuild dispatch (stage-only) succeeded or failed.",
|
|
201
201
|
},
|
|
202
202
|
|
|
203
|
-
// ── Deploy provenance (source: server or cli)
|
|
203
|
+
// ── Deploy provenance (source: server or cli) ────────────────────
|
|
204
204
|
"deploy.version_observed": {
|
|
205
205
|
actors: ["system", "dev"], source: "server", sinks: PROVENANCE,
|
|
206
206
|
argsAllow: ["version", "commit", "env", "observedFrom"], renderedAllow: [],
|
|
@@ -234,7 +234,7 @@ export const ACTION_CATALOG = {
|
|
|
234
234
|
desc: "A change was rejected (reason required).",
|
|
235
235
|
},
|
|
236
236
|
"change.resolve": {
|
|
237
|
-
//
|
|
237
|
+
// One-click conflict resolution via
|
|
238
238
|
// candidate_refresh. Same admission ladder as change.reject (resolveShipSession
|
|
239
239
|
// → ship-on-behalf floor), so the same actor cohort. `strategy` is a
|
|
240
240
|
// low-cardinality enum (ours|theirs|merge), safe to render.
|
|
@@ -243,7 +243,7 @@ export const ACTION_CATALOG = {
|
|
|
243
243
|
desc: "A not-mergeable change was resolved by rebuilding it from the base tip under a strategy.",
|
|
244
244
|
},
|
|
245
245
|
"change.ship": {
|
|
246
|
-
//
|
|
246
|
+
// The admin/cockpit "Publish" (go-live) handler admits the store OWNER
|
|
247
247
|
// (merchant), ToT staff (admin), a ship-on-behalf developer (dev), AND the
|
|
248
248
|
// headless Bearer/CLI operator (agent) — the actor list reflects who actually
|
|
249
249
|
// reaches POST /api/changes/ship, not a placeholder subset.
|
|
@@ -252,7 +252,7 @@ export const ACTION_CATALOG = {
|
|
|
252
252
|
desc: "A change was shipped to the live channel.",
|
|
253
253
|
},
|
|
254
254
|
"change.revert": {
|
|
255
|
-
//
|
|
255
|
+
// Same admission ladder as change.ship/rollback (resolveShipSession) — owner
|
|
256
256
|
// (merchant), staff (admin), ship-on-behalf dev, headless operator (agent). The
|
|
257
257
|
// `/api/changes/revert` route gates on the SAME seam, so the emitter cohort matches.
|
|
258
258
|
actors: ["admin", "merchant", "dev", "agent"], source: "ui", sinks: LIFECYCLE,
|
|
@@ -260,7 +260,7 @@ export const ACTION_CATALOG = {
|
|
|
260
260
|
desc: "A change was reverted.",
|
|
261
261
|
},
|
|
262
262
|
"change.hotfix": {
|
|
263
|
-
//
|
|
263
|
+
// The owner-only emergency HOTFIX lane (/api/changes/hotfix) — a DISTINCT verb
|
|
264
264
|
// from change.ship (never a `--base main` flag): a bypass-normal-flow live promote
|
|
265
265
|
// from `main` while `preview` holds other unshipped work. Same resolveShipSession
|
|
266
266
|
// ladder as ship/rollback (owner ⊇ ship-on-behalf), so the same cohort set.
|
|
@@ -269,20 +269,20 @@ export const ACTION_CATALOG = {
|
|
|
269
269
|
desc: "An emergency hotfix was released to the live channel (bypassing unshipped preview work).",
|
|
270
270
|
},
|
|
271
271
|
"change.rollback": {
|
|
272
|
-
//
|
|
272
|
+
// Same admission ladder as change.ship (resolveShipSession) — owner
|
|
273
273
|
// (merchant), staff (admin), ship-on-behalf dev, headless operator (agent).
|
|
274
274
|
actors: ["admin", "merchant", "dev", "agent"], source: "ui", sinks: LIFECYCLE,
|
|
275
275
|
argsAllow: ["changeId", "toVersion"], renderedAllow: ["reason"],
|
|
276
276
|
desc: "The live channel was rolled back to a prior version.",
|
|
277
277
|
},
|
|
278
278
|
"change.integrate": {
|
|
279
|
-
//
|
|
279
|
+
// Accept/integrate (resolveShipSession) admits the same cohort set.
|
|
280
280
|
actors: ["admin", "merchant", "dev", "agent"], source: "ui", sinks: LIFECYCLE,
|
|
281
281
|
argsAllow: ["changeId"], renderedAllow: [],
|
|
282
282
|
desc: "A change was integrated into the shared preview.",
|
|
283
283
|
},
|
|
284
284
|
"change.rebuild": {
|
|
285
|
-
//
|
|
285
|
+
// Retry a dead aggregate rebuild without a new merge (/api/changes/rebuild).
|
|
286
286
|
// Same admission ladder as change.integrate/revert (resolveShipSession) — the
|
|
287
287
|
// route gates on the SAME seam, so the emitter cohort matches. No changeId: a
|
|
288
288
|
// rebuild retries the tenant's most recent integration attempt, not one candidate.
|
|
@@ -291,7 +291,7 @@ export const ACTION_CATALOG = {
|
|
|
291
291
|
desc: "A dead aggregate rebuild was retried without a new merge.",
|
|
292
292
|
},
|
|
293
293
|
"change.resync": {
|
|
294
|
-
//
|
|
294
|
+
// Advance the shared preview aggregate to an out-of-band branch tip
|
|
295
295
|
// without a candidate/<changeId> PR (/api/changes/resync). Same admission
|
|
296
296
|
// ladder as change.integrate/rebuild (resolveShipSession). No changeId: a
|
|
297
297
|
// resync pins an operator-supplied branch/sha, not one candidate.
|
|
@@ -314,7 +314,7 @@ export const ACTION_CATALOG = {
|
|
|
314
314
|
desc: "Tenant customization/content was published to a version.",
|
|
315
315
|
},
|
|
316
316
|
"content.checkout_style.saved": {
|
|
317
|
-
// NEW
|
|
317
|
+
// NEW: a tenant's checkout styling was saved to a versioned test artifact
|
|
318
318
|
// (Settings → Checkout styling → publishToTest spine). A persistent tenant
|
|
319
319
|
// customization — low volume, high value → timelined. Actor cohort mirrors the
|
|
320
320
|
// route's own auth (resolveOwnerSession): a merchant saving their own tenant, or
|
|
@@ -324,7 +324,7 @@ export const ACTION_CATALOG = {
|
|
|
324
324
|
desc: "A tenant's checkout styling was saved to a version.",
|
|
325
325
|
},
|
|
326
326
|
"change.go_live": {
|
|
327
|
-
//
|
|
327
|
+
// Renamed from the orphaned, un-namespaced `go_live` (the ONE key that broke the
|
|
328
328
|
// domain-prefix rule). The snake_case suffix is kept (the `deploy.version_observed`
|
|
329
329
|
// precedent) — only the missing `change.` domain prefix is added. Wired into
|
|
330
330
|
// /api/preview/promote (promote the current preview snapshot to live).
|
|
@@ -337,9 +337,9 @@ export const ACTION_CATALOG = {
|
|
|
337
337
|
// Invitee identity is PII → DROPPED by allowlist; only the role/resource +
|
|
338
338
|
// an opaque hashed invitee ref (rendered) survive.
|
|
339
339
|
"grant.invite": {
|
|
340
|
-
//
|
|
340
|
+
// The self-serve "Invite a Developer" handler admits an owner (merchant) or
|
|
341
341
|
// staff (admin) session, and the headless operator (agent) via the Bearer seam.
|
|
342
|
-
//
|
|
342
|
+
// The SECOND invite path (grants/team-invite.ts) is session-authed by vendor
|
|
343
343
|
// MEMBERSHIP — a signed-in team member who is neither owner nor staff classifies as
|
|
344
344
|
// "dev" (see uiActor.classifyActorKind), so `dev` joins the admission set.
|
|
345
345
|
actors: ["admin", "merchant", "dev", "agent"], source: "ui", sinks: LIFECYCLE,
|
|
@@ -347,14 +347,14 @@ export const ACTION_CATALOG = {
|
|
|
347
347
|
desc: "A developer/team invite was issued.",
|
|
348
348
|
},
|
|
349
349
|
"grant.approve": {
|
|
350
|
-
//
|
|
350
|
+
// The browserless CLI sign-in approval is taken by whoever is signed in
|
|
351
351
|
// (owner→merchant, staff→admin, or a signed-in developer→dev).
|
|
352
352
|
actors: ["admin", "merchant", "dev"], source: "ui", sinks: LIFECYCLE,
|
|
353
353
|
argsAllow: ["role", "resource"], renderedAllow: [],
|
|
354
354
|
desc: "A pending access request / CLI sign-in was approved.",
|
|
355
355
|
},
|
|
356
356
|
"grant.revoke": {
|
|
357
|
-
//
|
|
357
|
+
// The self-serve "remove a developer from my team" handler (/api/grants/revoke),
|
|
358
358
|
// the inverse of grant.invite — same resolveOwnerSession seam, so the same cohort
|
|
359
359
|
// (owner→merchant, staff→admin, headless operator→agent). The revoked developer's
|
|
360
360
|
// identity is PII → DROPPED by the allowlist; only an opaque hashed ref survives.
|
|
@@ -372,10 +372,14 @@ export const ACTION_CATALOG = {
|
|
|
372
372
|
argsAllow: ["changeId"], renderedAllow: ["inviteeRef"],
|
|
373
373
|
desc: "A reviewer/developer was invited to a preview.",
|
|
374
374
|
},
|
|
375
|
-
"preview.
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
375
|
+
"preview.evidence.retry": {
|
|
376
|
+
// An operator retried the change_report_evidence push for an already-`ready`
|
|
377
|
+
// candidate whose evidence.pushFailed was set (candidate-evidence-retry.ts) —
|
|
378
|
+
// the manual recovery for fb-1787938036559-ppmu4e when the automatic retry in
|
|
379
|
+
// reportPreviewEvidence still didn't land.
|
|
380
|
+
actors: ["admin", "merchant", "dev", "system"], source: "server", sinks: LIFECYCLE,
|
|
381
|
+
argsAllow: ["changeId", "versionId", "pushed"], renderedAllow: [],
|
|
382
|
+
desc: "An operator retried a candidate's evidence push to MCP after it failed.",
|
|
379
383
|
},
|
|
380
384
|
"store.connect": {
|
|
381
385
|
actors: ["merchant", "admin"], source: "ui", sinks: LIFECYCLE,
|
|
@@ -429,8 +433,8 @@ export const ACTION_CATALOG = {
|
|
|
429
433
|
|
|
430
434
|
// ── Agent cohort (source: server/cli) — later ──────────────────────────────
|
|
431
435
|
// Placeholder spine so the agent cohort (a later card) has stable keys to emit
|
|
432
|
-
// against without reopening
|
|
433
|
-
// defines what an agent action is allowed to record.
|
|
436
|
+
// against without reopening the action catalog. Args are deliberately empty until
|
|
437
|
+
// that card defines what an agent action is allowed to record.
|
|
434
438
|
"agent.action.invoked": {
|
|
435
439
|
actors: ["agent"], source: "server", sinks: HIGH_VOLUME,
|
|
436
440
|
argsAllow: ["tool"], renderedAllow: [],
|
|
@@ -442,9 +446,9 @@ export const ACTION_CATALOG = {
|
|
|
442
446
|
desc: "An automated agent action finished.",
|
|
443
447
|
},
|
|
444
448
|
|
|
445
|
-
// ──
|
|
446
|
-
//
|
|
447
|
-
// and machine-authed (signature/idempotency/app-JWT) mutations
|
|
449
|
+
// ── Remaining grant/staff-ops gaps + machine/agent-driven mutations ─────
|
|
450
|
+
// Wires the invite/grant paths, staff-impersonation, cache,
|
|
451
|
+
// and machine-authed (signature/idempotency/app-JWT) mutations the earlier catalog entries left out.
|
|
448
452
|
// Grant/staff actions are low-volume lifecycle → timelined; the machine cohort's
|
|
449
453
|
// high-volume streams (order-forward, attribution) are analytics-only.
|
|
450
454
|
"grant.issue": {
|
|
@@ -485,7 +489,7 @@ export const ACTION_CATALOG = {
|
|
|
485
489
|
},
|
|
486
490
|
"store.connect.completed": {
|
|
487
491
|
// domain/callback.ts — the CI completion callback for the www-domain job, the
|
|
488
|
-
// machine-side terminal PARTNER of
|
|
492
|
+
// machine-side terminal PARTNER of `store.connect`. Signature-authed, one per
|
|
489
493
|
// connect run (rare) → low-volume lifecycle terminal, timelined like reconcile.terminal.
|
|
490
494
|
actors: ["system"], source: "server", sinks: LIFECYCLE,
|
|
491
495
|
argsAllow: ["status", "state", "action"], renderedAllow: [],
|
|
@@ -521,7 +525,7 @@ export const ACTION_CATALOG = {
|
|
|
521
525
|
|
|
522
526
|
// ── Meta (source: server) ──────────────────────────────────────────────────
|
|
523
527
|
"system.ingest.rejected": {
|
|
524
|
-
// The ingest endpoint
|
|
528
|
+
// The ingest endpoint rejected an event (unknown action, actor
|
|
525
529
|
// mismatch, canary tripped). Self-telemetry so a leak attempt is visible.
|
|
526
530
|
actors: ["system"], source: "server", sinks: HIGH_VOLUME,
|
|
527
531
|
argsAllow: ["reason", "attemptedAction"], renderedAllow: [],
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
2
|
-
// ActivityEvent — the versioned actor×action telemetry envelope
|
|
2
|
+
// ActivityEvent — the versioned actor×action telemetry envelope.
|
|
3
3
|
//
|
|
4
4
|
// One event = "an ACTOR performed an ACTION, here is the OUTCOME." It is the
|
|
5
5
|
// single shape every operational-activity emitter produces and every sink
|
|
6
6
|
// stores, across the whole storefront platform (dev/CLI first, then merchant/
|
|
7
|
-
// admin/agent). Downstream
|
|
8
|
-
//
|
|
9
|
-
//
|
|
7
|
+
// admin/agent). Downstream consumers import this directly: server
|
|
8
|
+
// recordActivity() · deploy provenance · CLI emitActivity · ingest+store ·
|
|
9
|
+
// the query/timeline UI · alerts.
|
|
10
10
|
//
|
|
11
11
|
// TWO ZONES, and the split is load-bearing:
|
|
12
12
|
// 1. CORE fields (everything except `payload`) — always safe to store. They
|
|
@@ -86,9 +86,9 @@ export interface ActivityScope {
|
|
|
86
86
|
*/
|
|
87
87
|
traceId?: string;
|
|
88
88
|
/**
|
|
89
|
-
* BUILD PROVENANCE
|
|
89
|
+
* BUILD PROVENANCE. The git commit SHA the running server/edge build
|
|
90
90
|
* was cut from — stamped by the emitter onto every SERVER-sourced event so the
|
|
91
|
-
* query surface
|
|
91
|
+
* query surface can derive **deploy skew**: is the build that produced this
|
|
92
92
|
* event == the pushed umbrella tip, or is a stale worker still serving? Core,
|
|
93
93
|
* non-secret by construction (a 40-hex git sha, never PII/free-text), so it is
|
|
94
94
|
* never redacted. Absent on `cli`/`ui`-sourced events and on any build with no
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
2
2
|
// @tot/public-runtime/activity — the operational activity telemetry contract.
|
|
3
3
|
//
|
|
4
|
-
//
|
|
4
|
+
// The actor×action ActivityEvent envelope, the allowlisted action
|
|
5
5
|
// catalog, and the default-deny redaction contract. This is the FOUNDATION the
|
|
6
6
|
// downstream cards import directly — nothing here does I/O or picks a store; it
|
|
7
7
|
// is pure types + pure functions so server, edge, and the CLI's JS mirror can
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// DECISIONS.md §8; the per-action routing lives on each catalog entry (sinks).
|
|
10
10
|
//
|
|
11
11
|
// See ./README.md for the envelope shape, catalog rules, redaction contract,
|
|
12
|
-
// and the CLI-mirror keep-in-step obligation
|
|
12
|
+
// and the CLI-mirror keep-in-step obligation.
|
|
13
13
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
14
14
|
export * from "./event.js";
|
|
15
15
|
export * from "./catalog.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
2
|
-
// Redaction contract for the activity payload zone
|
|
2
|
+
// Redaction contract for the activity payload zone.
|
|
3
3
|
//
|
|
4
|
-
// This is the surface
|
|
4
|
+
// This is the surface the adversarial PII/secret-leak review will attack,
|
|
5
5
|
// so the posture is deliberately conservative. Three layers, in order:
|
|
6
6
|
//
|
|
7
7
|
// 1. DEFAULT-DENY ALLOWLIST. For a given action, ONLY the top-level payload
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
// shapes (JWTs, bearer tokens, API keys, private keys, emails, card/phone
|
|
21
21
|
// numbers) AND secret-looking KEY NAMES. A hit replaces the value with a
|
|
22
22
|
// redaction marker and is REPORTED (the fact of the hit, never the value) so
|
|
23
|
-
//
|
|
23
|
+
// alerting can flag it and auditing can review it. A secret-named key is dropped outright.
|
|
24
24
|
//
|
|
25
25
|
// The safe constructor createActivityEvent() runs all three before an event is
|
|
26
26
|
// ever returned — you cannot build an event whose payload skipped redaction.
|
|
27
27
|
//
|
|
28
|
-
// OPEN QUESTION
|
|
28
|
+
// OPEN QUESTION: the canonical actor-id pseudonymization salt.
|
|
29
29
|
// This module scrubs PII that leaks into the PAYLOAD, but actor.id in the CORE
|
|
30
30
|
// zone is the emitter's responsibility to pseudonymize. A shared, salted,
|
|
31
31
|
// non-reversible hash helper (with the salt as a Worker secret) should land with
|