@wildo-ai/external-connectors-public 1.1.2 → 1.1.4

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.
Files changed (141) hide show
  1. package/dist/esm/.native.tsbuildinfo +1 -0
  2. package/dist/esm/app/compose-frontend-app-providers.d.ts.map +1 -1
  3. package/dist/esm/app/compose-frontend-app-providers.js +5 -2
  4. package/dist/esm/app/compose-frontend-app-providers.js.map +1 -1
  5. package/dist/esm/app/compose-hydrated-frontend-app-providers.d.ts +33 -0
  6. package/dist/esm/app/compose-hydrated-frontend-app-providers.d.ts.map +1 -0
  7. package/dist/esm/app/compose-hydrated-frontend-app-providers.js +41 -0
  8. package/dist/esm/app/compose-hydrated-frontend-app-providers.js.map +1 -0
  9. package/dist/esm/app/engine-frontend-app-provider-registry.d.ts.map +1 -1
  10. package/dist/esm/app/engine-frontend-app-provider-registry.js +8 -0
  11. package/dist/esm/app/engine-frontend-app-provider-registry.js.map +1 -1
  12. package/dist/esm/app/frontend-app-provider-module.types.d.ts +141 -15
  13. package/dist/esm/app/frontend-app-provider-module.types.d.ts.map +1 -1
  14. package/dist/esm/app/frontend-app-provider-module.types.js +7 -6
  15. package/dist/esm/app/frontend-app-provider-module.types.js.map +1 -1
  16. package/dist/esm/app/frontend-app-provider-registry.types.d.ts.map +1 -1
  17. package/dist/esm/app/index.d.ts +4 -0
  18. package/dist/esm/app/index.d.ts.map +1 -1
  19. package/dist/esm/app/index.js +4 -0
  20. package/dist/esm/app/index.js.map +1 -1
  21. package/dist/esm/companion-exports.d.ts +71 -13
  22. package/dist/esm/companion-exports.d.ts.map +1 -1
  23. package/dist/esm/companion-exports.js +130 -18
  24. package/dist/esm/companion-exports.js.map +1 -1
  25. package/dist/esm/engine-frontend-providers-package.d.ts +7 -0
  26. package/dist/esm/engine-frontend-providers-package.d.ts.map +1 -0
  27. package/dist/esm/engine-frontend-providers-package.js +7 -0
  28. package/dist/esm/engine-frontend-providers-package.js.map +1 -0
  29. package/dist/esm/providers/algolia/algolia.frontend-techdoc.module.d.ts.map +1 -1
  30. package/dist/esm/providers/algolia/algolia.frontend-techdoc.module.js +26 -4
  31. package/dist/esm/providers/algolia/algolia.frontend-techdoc.module.js.map +1 -1
  32. package/dist/esm/providers/algolia/index.d.ts.map +1 -1
  33. package/dist/esm/providers/apple/apple.frontend-app.module.d.ts.map +1 -1
  34. package/dist/esm/providers/apple/apple.frontend-app.module.js +16 -4
  35. package/dist/esm/providers/apple/apple.frontend-app.module.js.map +1 -1
  36. package/dist/esm/providers/apple/index.d.ts.map +1 -1
  37. package/dist/esm/providers/github/github.frontend-app.module.d.ts.map +1 -1
  38. package/dist/esm/providers/github/github.frontend-app.module.js +15 -4
  39. package/dist/esm/providers/github/github.frontend-app.module.js.map +1 -1
  40. package/dist/esm/providers/github/index.d.ts.map +1 -1
  41. package/dist/esm/providers/google/google.frontend-app.module.d.ts +9 -0
  42. package/dist/esm/providers/google/google.frontend-app.module.d.ts.map +1 -1
  43. package/dist/esm/providers/google/google.frontend-app.module.js +28 -4
  44. package/dist/esm/providers/google/google.frontend-app.module.js.map +1 -1
  45. package/dist/esm/providers/google/index.d.ts.map +1 -1
  46. package/dist/esm/providers/google-drive/google-drive.frontend-app.module.d.ts +17 -0
  47. package/dist/esm/providers/google-drive/google-drive.frontend-app.module.d.ts.map +1 -0
  48. package/dist/esm/providers/google-drive/google-drive.frontend-app.module.js +66 -0
  49. package/dist/esm/providers/google-drive/google-drive.frontend-app.module.js.map +1 -0
  50. package/dist/esm/providers/google-drive/index.d.ts +2 -0
  51. package/dist/esm/providers/google-drive/index.d.ts.map +1 -0
  52. package/dist/esm/providers/google-drive/index.js +2 -0
  53. package/dist/esm/providers/google-drive/index.js.map +1 -0
  54. package/dist/esm/providers/microsoft/index.d.ts.map +1 -1
  55. package/dist/esm/providers/microsoft/microsoft.frontend-app.module.d.ts +6 -0
  56. package/dist/esm/providers/microsoft/microsoft.frontend-app.module.d.ts.map +1 -1
  57. package/dist/esm/providers/microsoft/microsoft.frontend-app.module.js +21 -4
  58. package/dist/esm/providers/microsoft/microsoft.frontend-app.module.js.map +1 -1
  59. package/dist/esm/providers/microsoft-onedrive/index.d.ts +2 -0
  60. package/dist/esm/providers/microsoft-onedrive/index.d.ts.map +1 -0
  61. package/dist/esm/providers/microsoft-onedrive/index.js +2 -0
  62. package/dist/esm/providers/microsoft-onedrive/index.js.map +1 -0
  63. package/dist/esm/providers/microsoft-onedrive/microsoft-onedrive.frontend-app.module.d.ts +13 -0
  64. package/dist/esm/providers/microsoft-onedrive/microsoft-onedrive.frontend-app.module.d.ts.map +1 -0
  65. package/dist/esm/providers/microsoft-onedrive/microsoft-onedrive.frontend-app.module.js +44 -0
  66. package/dist/esm/providers/microsoft-onedrive/microsoft-onedrive.frontend-app.module.js.map +1 -0
  67. package/dist/esm/providers/posthog/index.d.ts.map +1 -1
  68. package/dist/esm/providers/posthog/posthog.frontend-website.module.d.ts +19 -0
  69. package/dist/esm/providers/posthog/posthog.frontend-website.module.d.ts.map +1 -1
  70. package/dist/esm/providers/posthog/posthog.frontend-website.module.js +65 -4
  71. package/dist/esm/providers/posthog/posthog.frontend-website.module.js.map +1 -1
  72. package/dist/esm/providers/recaptcha/index.d.ts.map +1 -1
  73. package/dist/esm/providers/recaptcha/recaptcha.frontend-website.module.d.ts.map +1 -1
  74. package/dist/esm/providers/recaptcha/recaptcha.frontend-website.module.js +24 -4
  75. package/dist/esm/providers/recaptcha/recaptcha.frontend-website.module.js.map +1 -1
  76. package/dist/esm/providers/sentry/sentry.frontend-app.module.d.ts +57 -0
  77. package/dist/esm/providers/sentry/sentry.frontend-app.module.d.ts.map +1 -0
  78. package/dist/esm/providers/sentry/sentry.frontend-app.module.js +141 -0
  79. package/dist/esm/providers/sentry/sentry.frontend-app.module.js.map +1 -0
  80. package/dist/esm/providers/sentry/sentry.frontend-website.module.d.ts +27 -0
  81. package/dist/esm/providers/sentry/sentry.frontend-website.module.d.ts.map +1 -1
  82. package/dist/esm/providers/sentry/sentry.frontend-website.module.js +79 -4
  83. package/dist/esm/providers/sentry/sentry.frontend-website.module.js.map +1 -1
  84. package/dist/esm/providers/stripe/index.d.ts.map +1 -1
  85. package/dist/esm/providers/stripe/stripe.frontend-app.module.d.ts.map +1 -1
  86. package/dist/esm/providers/stripe/stripe.frontend-app.module.js +15 -4
  87. package/dist/esm/providers/stripe/stripe.frontend-app.module.js.map +1 -1
  88. package/dist/esm/shared/activate-frontend-provider-sdks.d.ts +88 -0
  89. package/dist/esm/shared/activate-frontend-provider-sdks.d.ts.map +1 -0
  90. package/dist/esm/shared/activate-frontend-provider-sdks.js +110 -0
  91. package/dist/esm/shared/activate-frontend-provider-sdks.js.map +1 -0
  92. package/dist/esm/shared/frontend-provider-surface.types.d.ts +253 -0
  93. package/dist/esm/shared/frontend-provider-surface.types.d.ts.map +1 -0
  94. package/dist/esm/shared/frontend-provider-surface.types.js +94 -0
  95. package/dist/esm/shared/frontend-provider-surface.types.js.map +1 -0
  96. package/dist/esm/shared/hydrate-frontend-providers.d.ts +157 -0
  97. package/dist/esm/shared/hydrate-frontend-providers.d.ts.map +1 -0
  98. package/dist/esm/shared/hydrate-frontend-providers.js +310 -0
  99. package/dist/esm/shared/hydrate-frontend-providers.js.map +1 -0
  100. package/dist/esm/techdoc/compose-frontend-techdoc-providers.d.ts.map +1 -1
  101. package/dist/esm/techdoc/compose-frontend-techdoc-providers.js +5 -2
  102. package/dist/esm/techdoc/compose-frontend-techdoc-providers.js.map +1 -1
  103. package/dist/esm/techdoc/compose-hydrated-frontend-techdoc-providers.d.ts +33 -0
  104. package/dist/esm/techdoc/compose-hydrated-frontend-techdoc-providers.d.ts.map +1 -0
  105. package/dist/esm/techdoc/compose-hydrated-frontend-techdoc-providers.js +41 -0
  106. package/dist/esm/techdoc/compose-hydrated-frontend-techdoc-providers.js.map +1 -0
  107. package/dist/esm/techdoc/engine-frontend-techdoc-provider-registry.d.ts.map +1 -1
  108. package/dist/esm/techdoc/frontend-techdoc-provider-module.types.d.ts +61 -4
  109. package/dist/esm/techdoc/frontend-techdoc-provider-module.types.d.ts.map +1 -1
  110. package/dist/esm/techdoc/frontend-techdoc-provider-module.types.js +5 -3
  111. package/dist/esm/techdoc/frontend-techdoc-provider-module.types.js.map +1 -1
  112. package/dist/esm/techdoc/frontend-techdoc-provider-registry.types.d.ts.map +1 -1
  113. package/dist/esm/techdoc/index.d.ts +4 -0
  114. package/dist/esm/techdoc/index.d.ts.map +1 -1
  115. package/dist/esm/techdoc/index.js +4 -0
  116. package/dist/esm/techdoc/index.js.map +1 -1
  117. package/dist/esm/website/compose-frontend-website-providers.d.ts.map +1 -1
  118. package/dist/esm/website/compose-frontend-website-providers.js +5 -2
  119. package/dist/esm/website/compose-frontend-website-providers.js.map +1 -1
  120. package/dist/esm/website/compose-hydrated-frontend-website-providers.d.ts +33 -0
  121. package/dist/esm/website/compose-hydrated-frontend-website-providers.d.ts.map +1 -0
  122. package/dist/esm/website/compose-hydrated-frontend-website-providers.js +41 -0
  123. package/dist/esm/website/compose-hydrated-frontend-website-providers.js.map +1 -0
  124. package/dist/esm/website/engine-frontend-website-provider-registry.d.ts.map +1 -1
  125. package/dist/esm/website/engine-frontend-website-provider-registry.js +5 -1
  126. package/dist/esm/website/engine-frontend-website-provider-registry.js.map +1 -1
  127. package/dist/esm/website/frontend-website-provider-module.types.d.ts +63 -3
  128. package/dist/esm/website/frontend-website-provider-module.types.d.ts.map +1 -1
  129. package/dist/esm/website/frontend-website-provider-module.types.js +7 -2
  130. package/dist/esm/website/frontend-website-provider-module.types.js.map +1 -1
  131. package/dist/esm/website/frontend-website-provider-registry.types.d.ts.map +1 -1
  132. package/dist/esm/website/index.d.ts +4 -0
  133. package/dist/esm/website/index.d.ts.map +1 -1
  134. package/dist/esm/website/index.js +4 -0
  135. package/dist/esm/website/index.js.map +1 -1
  136. package/dist/tsconfig.build.tsbuildinfo +1 -1
  137. package/package.json +15 -3
  138. package/dist/esm/providers/sentry/index.d.ts +0 -2
  139. package/dist/esm/providers/sentry/index.d.ts.map +0 -1
  140. package/dist/esm/providers/sentry/index.js +0 -2
  141. package/dist/esm/providers/sentry/index.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hydrate-frontend-providers.js","sourceRoot":"","sources":["../../../src/shared/hydrate-frontend-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,qCAAqC,EAAE,MAAM,sCAAsC,CAAC;AAiB7F;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,uCA0CX;AA1CD,WAAY,uCAAuC;IACjD;;;;;OAKG;IACH,oHAAyE,CAAA;IACzE;;;;OAIG;IACH,0GAA+D,CAAA;IAC/D;;;;;;OAMG;IACH,gGAAqD,CAAA;IACrD;;;;;;;;OAQG;IACH,oHAAyE,CAAA;IACzE,oFAAoF;IACpF,0FAA+C,CAAA;IAC/C;;;;;;OAMG;IACH,oGAAyD,CAAA;AAC3D,CAAC,EA1CW,uCAAuC,KAAvC,uCAAuC,QA0ClD;AAkED,SAAS,cAAc,CAAC,IAAuB,EAAE,KAAwB;IACvE,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC/C,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;IACpC,MAAM,WAAW,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;IACtC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,KAAK,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED;;;;GAIG;AACH,SAAS,gBAAgB,CACvB,cAAwD,EACxD,iBAAsE;IAEtE,IAAI,cAAc,KAAK,SAAS,IAAI,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpE,OAAO,cAAc,KAAK,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SAAS,CAAC;YAC/B,YAAY;YACZ,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,GAAG,EAAE,IAAI,EAAE,GAAG;YACd,UAAU,EAAE,IAAI,EAAE,UAAU;YAC5B,kBAAkB,EAAE,IAAI,EAAE,kBAAkB;SAC7C,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["/**\n * The join between the two channels a frontend provider arrives on.\n *\n * ## What this replaces\n *\n * Hydration used to be one channel and a cast: the registry took each JSON\n * entry off `/application-config` and asserted it was a provider module. The\n * assertion held only while the module type carried nothing but strings. The\n * moment a provider needed to load an SDK, the field would have been dropped by\n * `JSON.stringify` — with no error at any layer — and the provider would have\n * looked declared and done nothing.\n *\n * ## The rule\n *\n * A provider is LIVE for a surface when it appears on BOTH channels:\n *\n * - **DATA** (`entries`) — the authority on *which providers this service has\n * turned on, in this environment*. Backend-resolved, per service, and the\n * only channel that can differ between environments.\n * - **CODE** (`modules`) — the authority on *what code this bundle actually\n * contains*. Written by `wildo config sync` into a\n * `frontend-providers.generated.ts` the bundle imports.\n *\n * DATA without CODE is still live — the provider's identity, capabilities and\n * public config are all real and a UI may list it — but it has nothing to\n * execute, so `sdk` and `publicConfigSchema` are absent and a diagnostic names\n * `wildo config sync`. CODE without DATA is not live and is skipped quietly:\n * a bundle legitimately ships code for providers a given environment leaves\n * off, and warning about that would train readers to ignore the channel.\n *\n * The result is a registry of module-shaped values, so every existing consumer\n * reads exactly what it read before. What changed is that the shape is now\n * BUILT rather than asserted, and each field has a stated owner.\n */\n\nimport { normalizeProviderFrontendCspFootprint } from '@wildo-ai/saas-models/public-runtime';\nimport type {\n FileStorageAccepted,\n FrontendProvidersBlock,\n ProviderFrontendCspFootprint,\n ProviderFrontendCspFootprintDeclaration,\n ProviderFrontendScriptDeclaration,\n ProviderMetadata,\n} from '@wildo-ai/saas-models/public-runtime';\nimport type {\n ProviderFrontendComponents,\n ProviderFrontendPublicConfigFailure,\n ProviderFrontendPublicConfigResult,\n ProviderFrontendPublicConfigSchema,\n ProviderFrontendSdk,\n} from './frontend-provider-surface.types';\n\n/**\n * Why a hydration diagnostic was raised.\n *\n * A named vocabulary rather than message strings: a surface decides what to do\n * with a diagnostic (console, telemetry, a dev overlay) by its kind, and each\n * member is a distinct operator action.\n */\nexport enum FrontendProviderHydrationDiagnosticKind {\n /**\n * The service declares this provider, but the bundle carries no code for it.\n * Its data is served and its SDK cannot run. Remedy: `wildo config sync`, so\n * the generated `frontend-providers.generated.ts` imports the provider's\n * facet barrel.\n */\n CODE_MISSING_FOR_DECLARED_PROVIDER = 'CODE_MISSING_FOR_DECLARED_PROVIDER',\n /**\n * The generated module map keys a module under a ref that is not the ref on\n * the module's own metadata. The key is what the join uses, so trusting it\n * would silently bind one provider's code to another's configuration.\n */\n GENERATED_MODULE_REF_MISMATCH = 'GENERATED_MODULE_REF_MISMATCH',\n /**\n * The entry's CSP footprint or SDK descriptor disagrees with the module's.\n * The entry is what the service's Content-Security-Policy was composed from,\n * so a disagreement means the generated artifact predates the module — and\n * the consequence lands in production only, because CSP is report-only in\n * development. Remedy: `wildo config sync`.\n */\n GENERATED_ARTIFACT_STALE = 'GENERATED_ARTIFACT_STALE',\n /**\n * The bundle carries code for providers and the service declared NONE.\n *\n * Per-provider, code-without-data is silent on purpose — a bundle legitimately\n * ships code an environment leaves off. ALL code and ZERO data is a different\n * signal: almost always a backend older than this bundle, or a service whose\n * provider scope was never authored. Every consumer then degrades with no\n * symptom at all, which is the shape this diagnostic exists to break.\n */\n DATA_MISSING_FOR_BUNDLED_PROVIDERS = 'DATA_MISSING_FOR_BUNDLED_PROVIDERS',\n /** The provider's `publicConfig` did not satisfy the schema the module declares. */\n PUBLIC_CONFIG_INVALID = 'PUBLIC_CONFIG_INVALID',\n /**\n * The declared `publicConfigSchema` validated asynchronously. Hydration is\n * synchronous — it runs before first paint on three different bundlers — so\n * an async validator cannot be awaited here and its provider is treated as\n * having no code. Standard Schema permits async validation; Zod is\n * synchronous, which is why this is a refusal rather than a redesign.\n */\n PUBLIC_CONFIG_SCHEMA_ASYNC = 'PUBLIC_CONFIG_SCHEMA_ASYNC',\n}\n\nexport interface FrontendProviderHydrationDiagnostic {\n readonly kind: FrontendProviderHydrationDiagnosticKind;\n readonly providerRef: string;\n /** One sentence naming the remedy, safe to log verbatim. */\n readonly message: string;\n}\n\n/**\n * The facet-agnostic view of a provider module the CODE channel supplies.\n *\n * All three facet module types satisfy it structurally; naming it separately\n * keeps this join free of any facet's branded capability types, which are the\n * one thing that genuinely cannot cross the wire (see the note on the narrowing\n * in each facet's `composeHydratedFrontend<Facet>Providers`).\n */\nexport interface FrontendProviderCodeModule {\n metadata: ProviderMetadata;\n csp?: ProviderFrontendCspFootprintDeclaration;\n sdk?: ProviderFrontendSdk;\n components?: ProviderFrontendComponents;\n fileStorage?: FileStorageAccepted;\n publicConfigSchema?: ProviderFrontendPublicConfigSchema;\n}\n\n/**\n * One provider after the join: DATA for everything JSON can carry, CODE for\n * everything it cannot.\n *\n * `providerCapabilities` and `protocols` are `string` here because that is what\n * the wire carries. Narrowing them to a facet's open union is the one step no\n * runtime check can perform — an application extends that union by TypeScript\n * module augmentation, so its members do not exist at runtime to be checked\n * against — and it therefore happens once, visibly, at each facet boundary.\n */\nexport interface HydratedFrontendProviderModule {\n metadata: ProviderMetadata;\n providerCapabilities: ReadonlyArray<string>;\n protocols: ReadonlyArray<string>;\n publicConfig: Readonly<Record<string, unknown>>;\n csp?: ProviderFrontendCspFootprint;\n scripts?: ReadonlyArray<ProviderFrontendScriptDeclaration>;\n sdk?: ProviderFrontendSdk;\n components?: ProviderFrontendComponents;\n /**\n * The z_file storage the provider's picker fronts, from the DATA channel —\n * the served entry, not the code module, because the chooser and the backend\n * link path both read the entry and must agree with what the CLI wrote.\n */\n fileStorage?: FileStorageAccepted;\n publicConfigSchema?: ProviderFrontendPublicConfigSchema;\n}\n\nexport interface HydrateFrontendProvidersInput<TCodeModule extends FrontendProviderCodeModule> {\n /** The DATA channel: the block hydrated from the backend, or read from the generated artifact. */\n readonly entries: FrontendProvidersBlock | undefined;\n /**\n * The CODE channel: `generatedFrontendProviderModules` from this service's\n * `frontend-providers.generated.ts`. Absent is legal and common — a service\n * with no package-shipped providers ships no such file.\n */\n readonly modules?: Readonly<Record<string, TCodeModule>>;\n readonly onDiagnostic?: (diagnostic: FrontendProviderHydrationDiagnostic) => void;\n}\n\nfunction sameOriginList(left: readonly string[], right: readonly string[]): boolean {\n if (left.length !== right.length) return false;\n const sortedLeft = [...left].sort();\n const sortedRight = [...right].sort();\n return sortedLeft.every((origin, index) => origin === sortedRight[index]);\n}\n\n/**\n * Compares the footprint the CSP was composed from against the one the module\n * declares today. Order-insensitive, because neither channel promises an order\n * and a spurious staleness warning is how a real one stops being read.\n */\nfunction sameCspFootprint(\n entryFootprint: ProviderFrontendCspFootprint | undefined,\n moduleDeclaration: ProviderFrontendCspFootprintDeclaration | undefined,\n): boolean {\n if (entryFootprint === undefined || moduleDeclaration === undefined) {\n return entryFootprint === moduleDeclaration;\n }\n // The module side is a DECLARATION — partial by design — so it is normalized\n // before comparison. Without this, a provider that named one bucket would\n // differ from its own served footprint in the five it did not name, and the\n // staleness diagnostic would fire on every correctly-generated artifact.\n const moduleFootprint = normalizeProviderFrontendCspFootprint(moduleDeclaration);\n const buckets = [\n 'scriptOrigins',\n 'connectOrigins',\n 'frameOrigins',\n 'imgOrigins',\n 'styleOrigins',\n 'fontOrigins',\n ] as const;\n return buckets.every((bucket) => sameOriginList(entryFootprint[bucket], moduleFootprint[bucket]));\n}\n\n/**\n * Validates `publicConfig` against the module's declared schema.\n *\n * Returns the validated config, or `undefined` when the provider must be\n * treated as code-less. Failing that way rather than dropping the provider\n * entirely is deliberate: a misconfigured analytics provider must not take a\n * page down, but it must also not half-run — so its data stays visible and\n * nothing of it executes.\n */\n/**\n * Standard Schema discriminates success from failure by the PRESENCE of\n * `issues`, which is a shape TypeScript narrows only through an explicit\n * predicate — the success member declares `issues?: undefined`, so a bare\n * `result.issues !== undefined` leaves the union intact at the use site.\n */\nfunction isPublicConfigFailure(\n result: ProviderFrontendPublicConfigResult<unknown>,\n): result is ProviderFrontendPublicConfigFailure {\n return result.issues !== undefined;\n}\n\nfunction validatePublicConfig(\n providerRef: string,\n publicConfig: Readonly<Record<string, unknown>>,\n schema: ProviderFrontendPublicConfigSchema,\n raise: (diagnostic: FrontendProviderHydrationDiagnostic) => void,\n): Readonly<Record<string, unknown>> | undefined {\n const result = schema['~standard'].validate(publicConfig);\n\n if (result instanceof Promise) {\n raise({\n kind: FrontendProviderHydrationDiagnosticKind.PUBLIC_CONFIG_SCHEMA_ASYNC,\n providerRef,\n message:\n `Provider \"${providerRef}\" declares an asynchronous publicConfigSchema. Frontend provider hydration is `\n + 'synchronous, so the schema cannot be awaited; declare a synchronous validator (a Zod schema is one).',\n });\n return undefined;\n }\n\n if (isPublicConfigFailure(result)) {\n const detail = result.issues\n .map((issue) => {\n const path = (issue.path ?? [])\n .map((segment) => String(typeof segment === 'object' ? segment.key : segment))\n .join('.');\n return path.length > 0 ? `${path}: ${issue.message}` : issue.message;\n })\n .join('; ');\n raise({\n kind: FrontendProviderHydrationDiagnosticKind.PUBLIC_CONFIG_INVALID,\n providerRef,\n message:\n `Provider \"${providerRef}\" was served a publicConfig its own schema rejects, so none of its code will run. ${detail}`,\n });\n return undefined;\n }\n\n return result.value as Readonly<Record<string, unknown>>;\n}\n\n/**\n * Joins the DATA and CODE channels into one module map, ready for\n * `composeProviderRegistry`.\n *\n * Synchronous on purpose: it runs before first paint on three bundlers, and an\n * asynchronous join would either block the first render or leave a window in\n * which a consumer reads an empty registry and degrades silently — which is the\n * shape of the bug this whole surface exists to remove.\n */\nexport function hydrateFrontendProviderModules<TCodeModule extends FrontendProviderCodeModule>(\n input: HydrateFrontendProvidersInput<TCodeModule>,\n): Map<string, HydratedFrontendProviderModule> {\n const raise = (diagnostic: FrontendProviderHydrationDiagnostic): void => {\n input.onDiagnostic?.(diagnostic);\n };\n const generatedModules = input.modules ?? {};\n const hydrated = new Map<string, HydratedFrontendProviderModule>();\n\n const declaredRefs = Object.keys(input.entries?.providers ?? {});\n const bundledRefs = Object.keys(generatedModules);\n if (declaredRefs.length === 0 && bundledRefs.length > 0) {\n raise({\n kind: FrontendProviderHydrationDiagnosticKind.DATA_MISSING_FOR_BUNDLED_PROVIDERS,\n // No single provider owns this: it is a statement about the payload.\n providerRef: '',\n message:\n `This bundle carries code for ${bundledRefs.length} provider(s) — ${bundledRefs.join(', ')} — and the `\n + 'backend declared none for this service, so every provider-backed surface will render as though none '\n + 'exists. Usually a backend older than this bundle, or a frontend service whose provider scope was '\n + 'never authored; `wildo config sync` settles the second.',\n });\n }\n\n for (const [ref, entry] of Object.entries(input.entries?.providers ?? {})) {\n const generated = Object.prototype.hasOwnProperty.call(generatedModules, ref)\n ? generatedModules[ref]\n : undefined;\n\n let code: TCodeModule | undefined = generated;\n\n if (code !== undefined && code.metadata.ref !== ref) {\n raise({\n kind: FrontendProviderHydrationDiagnosticKind.GENERATED_MODULE_REF_MISMATCH,\n providerRef: ref,\n message:\n `The generated frontend provider module map lists \"${ref}\" but the module it points at declares ref `\n + `\"${code.metadata.ref}\". Its code is ignored rather than bound to another provider's configuration; `\n + 'regenerate with `wildo config sync`.',\n });\n code = undefined;\n }\n\n if (code !== undefined && !sameCspFootprint(entry.csp, code.csp)) {\n raise({\n kind: FrontendProviderHydrationDiagnosticKind.GENERATED_ARTIFACT_STALE,\n providerRef: ref,\n message:\n `Provider \"${ref}\" declares a CSP footprint that differs from the one its served entry carries, so the `\n + \"service's Content-Security-Policy was composed from a stale footprint. That surfaces in production \"\n + 'only, because CSP is report-only in development. Regenerate with `wildo config sync`.',\n });\n }\n\n if (code !== undefined && entry.sdk?.packageName !== code.sdk?.descriptor.packageName) {\n raise({\n kind: FrontendProviderHydrationDiagnosticKind.GENERATED_ARTIFACT_STALE,\n providerRef: ref,\n message:\n `Provider \"${ref}\" declares SDK package \"${code.sdk?.descriptor.packageName ?? '(none)'}\" but its served `\n + `entry says \"${entry.sdk?.packageName ?? '(none)'}\". Regenerate with \\`wildo config sync\\`.`,\n });\n }\n\n // The same staleness question for the component declarations (#380).\n //\n // It matters more here than for `csp` or `sdk`, because these two copies are\n // read by DIFFERENT parties for the SAME decision. The registry takes its\n // descriptor from the CODE side and the framework refuses a selection\n // against it; a reviewer, the CLI and any build step read the DATA side. So\n // a stale artifact makes the manifest and the ENFORCED contract disagree —\n // a provider whose entry says it returns a remote reference while its code\n // says otherwise — which is precisely the property issue #383 was answered\n // to establish.\n if (code !== undefined) {\n for (const [capability, declared] of Object.entries(code.components ?? {})) {\n const served = entry.components?.[capability]?.selectionDelivery;\n if (served === declared.selectionDelivery) continue;\n raise({\n kind: FrontendProviderHydrationDiagnosticKind.GENERATED_ARTIFACT_STALE,\n providerRef: ref,\n message:\n `Provider \"${ref}\" declares its \"${capability}\" component delivers `\n + `\"${declared.selectionDelivery ?? '(none)'}\" but its served entry says `\n + `\"${served ?? '(none)'}\". The framework enforces the CODE side, so the manifest a reviewer `\n + 'reads and the contract actually held would disagree. Regenerate with `wildo config sync`.',\n });\n }\n // And for the storage a picker fronts (#394 P5): the chooser filters on the\n // served entry, the backend refuses a link against its own registry, and a\n // stale entry would offer a picker to a field whose link the backend then\n // refuses — or hide one it would accept.\n if (code.fileStorage !== entry.fileStorage) {\n raise({\n kind: FrontendProviderHydrationDiagnosticKind.GENERATED_ARTIFACT_STALE,\n providerRef: ref,\n message:\n `Provider \"${ref}\" declares its file picker fronts the \"${code.fileStorage ?? '(none)'}\" storage `\n + `but its served entry says \"${entry.fileStorage ?? '(none)'}\". Regenerate with \\`wildo config sync\\`.`,\n });\n }\n }\n\n let publicConfig = (entry.publicConfig ?? {}) as Readonly<Record<string, unknown>>;\n\n if (code?.publicConfigSchema !== undefined) {\n const validated = validatePublicConfig(ref, publicConfig, code.publicConfigSchema, raise);\n if (validated === undefined) {\n code = undefined;\n } else {\n publicConfig = validated;\n }\n }\n\n if (code === undefined && generated === undefined) {\n raise({\n kind: FrontendProviderHydrationDiagnosticKind.CODE_MISSING_FOR_DECLARED_PROVIDER,\n providerRef: ref,\n message:\n `Frontend provider \"${ref}\" is declared for this service but the bundle carries no code for it, so its `\n + 'SDK and components are unavailable. Run `wildo config sync` to regenerate '\n + 'frontend-providers.generated.ts.',\n });\n }\n\n // The DATA channel is authoritative for everything it can carry: it is the\n // one that knows what this service turned on, in this environment. The CODE\n // channel contributes only what JSON cannot express — which is why the two\n // executable fields are read off `code` explicitly rather than spread: a\n // spread would also copy the code module's own stale `csp`, and the served\n // footprint is the one the policy was composed from.\n hydrated.set(ref, {\n // The entry's metadata is structurally looser than `ProviderMetadata`:\n // `ProviderOriginSchema` is a plain object whose \"GENERATED implies a\n // catalogue provenance\" rule is a `superRefine`, and a refinement cannot\n // be expressed in an inferred type. Every entry reaching this join has\n // been through that parse — the app parses the bootstrap response, the\n // website and the technical doc parse the materialized artifact — so the\n // rule holds and the narrowing is stating what the parse just proved.\n // Exactly the assertion `defineProviderMetadata` makes for the same\n // schema, at the other end of the same wire.\n metadata: entry.metadata as ProviderMetadata,\n providerCapabilities: [...entry.providerCapabilities],\n protocols: [...entry.protocols],\n publicConfig,\n csp: entry.csp,\n scripts: entry.scripts,\n sdk: code?.sdk,\n components: code?.components,\n publicConfigSchema: code?.publicConfigSchema,\n });\n }\n\n return hydrated;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"compose-frontend-techdoc-providers.d.ts","sourceRoot":"","sources":["../../../../src/techdoc/compose-frontend-techdoc-providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,KAAK,EACV,0BAA0B,EAC1B,+BAA+B,EAChC,MAAM,4CAA4C,CAAC;AAEpD,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,OAAO,EAAE,WAAW,CAC3B,0BAA0B,EAC1B,6BAA6B,CAC9B,CAAC;CACH;AAED,wBAAgB,+BAA+B,CAC7C,GAAG,SAAS,EAAE,aAAa,CAAC,uCAAuC,CAAC,GACnE,+BAA+B,CAKjC"}
1
+ {"version":3,"file":"compose-frontend-techdoc-providers.d.ts","sourceRoot":"","sources":["../../../src/techdoc/compose-frontend-techdoc-providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,KAAK,EACV,0BAA0B,EAC1B,+BAA+B,EAChC,MAAM,4CAA4C,CAAC;AAEpD,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,OAAO,EAAE,WAAW,CAC3B,0BAA0B,EAC1B,6BAA6B,CAC9B,CAAC;CACH;AAED,wBAAgB,+BAA+B,CAC7C,GAAG,SAAS,EAAE,aAAa,CAAC,uCAAuC,CAAC,GACnE,+BAA+B,CAQjC"}
@@ -4,8 +4,11 @@
4
4
  * `@wildo-ai/saas-models/external-providers/compose-provider-registry.shared`
5
5
  * for behavior, conflict policy, and indexing semantics.
6
6
  */
7
- import { composeProviderRegistry } from '@wildo-ai/saas-models/public-runtime';
7
+ import { composeProviderRegistry, assertProviderTierCoherence, } from '@wildo-ai/saas-models/public-runtime';
8
8
  export function composeFrontendTechdocProviders(...fragments) {
9
- return composeProviderRegistry('FrontendTechdoc', fragments);
9
+ const registry = composeProviderRegistry('FrontendTechdoc', fragments);
10
+ // #328 — the tier rule holds on every facet: a CATALOGUE provider binds no engine slot.
11
+ assertProviderTierCoherence('FrontendTechdoc', registry.modules.values());
12
+ return registry;
10
13
  }
11
14
  //# sourceMappingURL=compose-frontend-techdoc-providers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compose-frontend-techdoc-providers.js","sourceRoot":"","sources":["../../../../src/techdoc/compose-frontend-techdoc-providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAe/E,MAAM,UAAU,+BAA+B,CAC7C,GAAG,SAAiE;IAEpE,OAAO,uBAAuB,CAG5B,iBAAiB,EAAE,SAAS,CAAC,CAAC;AAClC,CAAC","sourcesContent":["/**\n * `composeFrontendTechdocProviders` — frontend-techdoc-facet wrapper\n * around the generic `composeProviderRegistry` core. See\n * `@wildo-ai/saas-models/external-providers/compose-provider-registry.shared`\n * for behavior, conflict policy, and indexing semantics.\n */\n\nimport { composeProviderRegistry } from '@wildo-ai/saas-models/public-runtime';\n\nimport type { FrontendTechdocProviderModule } from './frontend-techdoc-provider-module.types';\nimport type {\n FrontendTechdocProviderRef,\n FrontendTechdocProviderRegistry,\n} from './frontend-techdoc-provider-registry.types';\n\nexport interface FrontendTechdocProviderRegistryFragment {\n readonly modules: ReadonlyMap<\n FrontendTechdocProviderRef,\n FrontendTechdocProviderModule\n >;\n}\n\nexport function composeFrontendTechdocProviders(\n ...fragments: ReadonlyArray<FrontendTechdocProviderRegistryFragment>\n): FrontendTechdocProviderRegistry {\n return composeProviderRegistry<\n FrontendTechdocProviderRef,\n FrontendTechdocProviderModule\n >('FrontendTechdoc', fragments);\n}\n"]}
1
+ {"version":3,"file":"compose-frontend-techdoc-providers.js","sourceRoot":"","sources":["../../../src/techdoc/compose-frontend-techdoc-providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,uBAAuB,EAC9B,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC;AAe9C,MAAM,UAAU,+BAA+B,CAC7C,GAAG,SAAiE;IAEpE,MAAM,QAAQ,GAAG,uBAAuB,CAGtC,iBAAiB,EAAE,SAAS,CAAC,CAAC;IAChC,wFAAwF;IACxF,2BAA2B,CAAC,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1E,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["/**\n * `composeFrontendTechdocProviders` — frontend-techdoc-facet wrapper\n * around the generic `composeProviderRegistry` core. See\n * `@wildo-ai/saas-models/external-providers/compose-provider-registry.shared`\n * for behavior, conflict policy, and indexing semantics.\n */\n\nimport { composeProviderRegistry,\n assertProviderTierCoherence,\n} from '@wildo-ai/saas-models/public-runtime';\n\nimport type { FrontendTechdocProviderModule } from './frontend-techdoc-provider-module.types';\nimport type {\n FrontendTechdocProviderRef,\n FrontendTechdocProviderRegistry,\n} from './frontend-techdoc-provider-registry.types';\n\nexport interface FrontendTechdocProviderRegistryFragment {\n readonly modules: ReadonlyMap<\n FrontendTechdocProviderRef,\n FrontendTechdocProviderModule\n >;\n}\n\nexport function composeFrontendTechdocProviders(\n ...fragments: ReadonlyArray<FrontendTechdocProviderRegistryFragment>\n): FrontendTechdocProviderRegistry {\n const registry = composeProviderRegistry<\n FrontendTechdocProviderRef,\n FrontendTechdocProviderModule\n >('FrontendTechdoc', fragments);\n // #328 — the tier rule holds on every facet: a CATALOGUE provider binds no engine slot.\n assertProviderTierCoherence('FrontendTechdoc', registry.modules.values());\n return registry;\n}\n"]}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Hydration for the technical doc facet: the DATA channel joined with the
3
+ * CODE channel, composed into the same registry every consumer already reads.
4
+ *
5
+ * `composeFrontendTechdocProviders` (the fragment-composition core) is unchanged and still the
6
+ * single place the tier rule runs. What is added here is the step BEFORE it —
7
+ * building each module from its served entry and, where the bundle carries it,
8
+ * the provider package's own module — so the registry is no longer produced by
9
+ * casting a JSON entry to a module type.
10
+ *
11
+ * See `../shared/hydrate-frontend-providers.ts` for the join rule and the
12
+ * diagnostics it raises.
13
+ */
14
+ import type { FrontendTechdocProviderModule } from './frontend-techdoc-provider-module.types';
15
+ import type { FrontendTechdocProviderRegistry } from './frontend-techdoc-provider-registry.types';
16
+ import { type HydrateFrontendProvidersInput } from '../shared/hydrate-frontend-providers';
17
+ /**
18
+ * The shape of `generatedFrontendProviderModules` in a
19
+ * `frontend-providers.generated.ts` written by `wildo config sync` for a
20
+ * technical doc service.
21
+ *
22
+ * The key is the provider's `ref` and must equal `module.metadata.ref`; the
23
+ * join refuses a mismatch rather than binding one provider's code to another's
24
+ * configuration. An absent file is legal — a service that declares no
25
+ * package-shipped provider ships none — so a consumer passes `undefined`.
26
+ */
27
+ export type GeneratedTechdocProviderModules = Readonly<Record<string, FrontendTechdocProviderModule>>;
28
+ /**
29
+ * Joins the served provider entries with the bundle's generated modules and
30
+ * composes the result.
31
+ */
32
+ export declare function composeHydratedFrontendTechdocProviders(input: HydrateFrontendProvidersInput<FrontendTechdocProviderModule>): FrontendTechdocProviderRegistry;
33
+ //# sourceMappingURL=compose-hydrated-frontend-techdoc-providers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-hydrated-frontend-techdoc-providers.d.ts","sourceRoot":"","sources":["../../../src/techdoc/compose-hydrated-frontend-techdoc-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,KAAK,EAEV,+BAA+B,EAChC,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,sCAAsC,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,MAAM,+BAA+B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC,CAAC;AAEtG;;;GAGG;AACH,wBAAgB,uCAAuC,CACrD,KAAK,EAAE,6BAA6B,CAAC,6BAA6B,CAAC,GAClE,+BAA+B,CAsBjC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Hydration for the technical doc facet: the DATA channel joined with the
3
+ * CODE channel, composed into the same registry every consumer already reads.
4
+ *
5
+ * `composeFrontendTechdocProviders` (the fragment-composition core) is unchanged and still the
6
+ * single place the tier rule runs. What is added here is the step BEFORE it —
7
+ * building each module from its served entry and, where the bundle carries it,
8
+ * the provider package's own module — so the registry is no longer produced by
9
+ * casting a JSON entry to a module type.
10
+ *
11
+ * See `../shared/hydrate-frontend-providers.ts` for the join rule and the
12
+ * diagnostics it raises.
13
+ */
14
+ import { composeFrontendTechdocProviders } from './compose-frontend-techdoc-providers.js';
15
+ import { hydrateFrontendProviderModules, } from '../shared/hydrate-frontend-providers.js';
16
+ /**
17
+ * Joins the served provider entries with the bundle's generated modules and
18
+ * composes the result.
19
+ */
20
+ export function composeHydratedFrontendTechdocProviders(input) {
21
+ const hydrated = hydrateFrontendProviderModules(input);
22
+ const modules = new Map([...hydrated].map(([ref, module]) => [
23
+ ref,
24
+ {
25
+ ...module,
26
+ // The ONE narrowing on this path, and the only one that cannot be
27
+ // checked at runtime: the wire carries `string`, while the module type
28
+ // is a union an application EXTENDS by TypeScript module augmentation.
29
+ // Those app-declared members exist only at compile time, so there is no
30
+ // set to validate a served value against — a runtime check here could
31
+ // only ever reject what an application legitimately declared. What does
32
+ // have teeth still runs: `composeFrontendTechdocProviders` applies the tier rule to
33
+ // every composed module, which is the check that decides whether a
34
+ // capability may bind an engine slot at all.
35
+ providerCapabilities: module.providerCapabilities,
36
+ protocols: module.protocols,
37
+ },
38
+ ]));
39
+ return composeFrontendTechdocProviders({ modules });
40
+ }
41
+ //# sourceMappingURL=compose-hydrated-frontend-techdoc-providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-hydrated-frontend-techdoc-providers.js","sourceRoot":"","sources":["../../../src/techdoc/compose-hydrated-frontend-techdoc-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EACL,8BAA8B,GAE/B,MAAM,sCAAsC,CAAC;AAc9C;;;GAGG;AACH,MAAM,UAAU,uCAAuC,CACrD,KAAmE;IAEnE,MAAM,QAAQ,GAAG,8BAA8B,CAAgC,KAAK,CAAC,CAAC;IACtF,MAAM,OAAO,GAAG,IAAI,GAAG,CACrB,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;QACnC,GAAiC;QACjC;YACE,GAAG,MAAM;YACT,kEAAkE;YAClE,uEAAuE;YACvE,uEAAuE;YACvE,wEAAwE;YACxE,sEAAsE;YACtE,wEAAwE;YACxE,oFAAoF;YACpF,mEAAmE;YACnE,6CAA6C;YAC7C,oBAAoB,EAAE,MAAM,CAAC,oBAAyD;YACtF,SAAS,EAAE,MAAM,CAAC,SAA4C;SAC/D;KACF,CAAC,CACH,CAAC;IACF,OAAO,+BAA+B,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AACtD,CAAC","sourcesContent":["/**\n * Hydration for the technical doc facet: the DATA channel joined with the\n * CODE channel, composed into the same registry every consumer already reads.\n *\n * `composeFrontendTechdocProviders` (the fragment-composition core) is unchanged and still the\n * single place the tier rule runs. What is added here is the step BEFORE it —\n * building each module from its served entry and, where the bundle carries it,\n * the provider package's own module — so the registry is no longer produced by\n * casting a JSON entry to a module type.\n *\n * See `../shared/hydrate-frontend-providers.ts` for the join rule and the\n * diagnostics it raises.\n */\n\nimport type { ProviderCapability, ProviderProtocol } from '@wildo-ai/saas-models/public-runtime';\n\nimport type { FrontendTechdocProviderModule } from './frontend-techdoc-provider-module.types';\nimport type {\n FrontendTechdocProviderRef,\n FrontendTechdocProviderRegistry,\n} from './frontend-techdoc-provider-registry.types';\nimport { composeFrontendTechdocProviders } from './compose-frontend-techdoc-providers';\nimport {\n hydrateFrontendProviderModules,\n type HydrateFrontendProvidersInput,\n} from '../shared/hydrate-frontend-providers';\n\n/**\n * The shape of `generatedFrontendProviderModules` in a\n * `frontend-providers.generated.ts` written by `wildo config sync` for a\n * technical doc service.\n *\n * The key is the provider's `ref` and must equal `module.metadata.ref`; the\n * join refuses a mismatch rather than binding one provider's code to another's\n * configuration. An absent file is legal — a service that declares no\n * package-shipped provider ships none — so a consumer passes `undefined`.\n */\nexport type GeneratedTechdocProviderModules = Readonly<Record<string, FrontendTechdocProviderModule>>;\n\n/**\n * Joins the served provider entries with the bundle's generated modules and\n * composes the result.\n */\nexport function composeHydratedFrontendTechdocProviders(\n input: HydrateFrontendProvidersInput<FrontendTechdocProviderModule>,\n): FrontendTechdocProviderRegistry {\n const hydrated = hydrateFrontendProviderModules<FrontendTechdocProviderModule>(input);\n const modules = new Map<FrontendTechdocProviderRef, FrontendTechdocProviderModule>(\n [...hydrated].map(([ref, module]) => [\n ref as FrontendTechdocProviderRef,\n {\n ...module,\n // The ONE narrowing on this path, and the only one that cannot be\n // checked at runtime: the wire carries `string`, while the module type\n // is a union an application EXTENDS by TypeScript module augmentation.\n // Those app-declared members exist only at compile time, so there is no\n // set to validate a served value against — a runtime check here could\n // only ever reject what an application legitimately declared. What does\n // have teeth still runs: `composeFrontendTechdocProviders` applies the tier rule to\n // every composed module, which is the check that decides whether a\n // capability may bind an engine slot at all.\n providerCapabilities: module.providerCapabilities as ReadonlyArray<ProviderCapability>,\n protocols: module.protocols as ReadonlyArray<ProviderProtocol>,\n },\n ]),\n );\n return composeFrontendTechdocProviders({ modules });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"engine-frontend-techdoc-provider-registry.d.ts","sourceRoot":"","sources":["../../../../src/techdoc/engine-frontend-techdoc-provider-registry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,sCAAsC,CAAC;AAOpG,eAAO,MAAM,6CAA6C,EAAE,uCAO3D,CAAC;AAEF,eAAO,MAAM,qCAAqC,sFAEjD,CAAC"}
1
+ {"version":3,"file":"engine-frontend-techdoc-provider-registry.d.ts","sourceRoot":"","sources":["../../../src/techdoc/engine-frontend-techdoc-provider-registry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,sCAAsC,CAAC;AAOpG,eAAO,MAAM,6CAA6C,EAAE,uCAO3D,CAAC;AAEF,eAAO,MAAM,qCAAqC,sFAEjD,CAAC"}
@@ -8,18 +8,75 @@
8
8
  * — the techdoc bundle never sees the SaaS-app providers and vice
9
9
  * versa.
10
10
  *
11
+ * The module is the CODE half of a provider's frontend surface; its DATA half
12
+ * is `FrontendProviderEntry`, read from the materialized frontend-services
13
+ * artifact at build time. The two are joined by
14
+ * `composeHydratedFrontendTechdocProviders`.
15
+ *
11
16
  * I18n resolution belongs to the consuming techdoc surface: provider
12
17
  * metadata should stay locale-neutral and expose translation-ready keys,
13
18
  * not localized prose baked into generated/runtime artifacts.
14
- *
15
- * Phase 0 ships the type only; Phase 6 wires the techdoc bootstrap
16
- * payload.
17
19
  */
18
- import type { ProviderMetadata, ProviderCapability, ProviderProtocol } from '@wildo-ai/saas-models/public-runtime';
20
+ import type { ProviderComplianceProfile } from '@wildo-ai/saas-models/public-runtime';
21
+ import type { ProviderFrontendCspFootprintDeclaration, ProviderFrontendScriptDeclaration, ProviderMetadata, ProviderCapability, ProviderProtocol } from '@wildo-ai/saas-models/public-runtime';
22
+ import type { ProviderFrontendComponents, ProviderFrontendPublicConfigSchema, ProviderFrontendSdk } from '../shared/frontend-provider-surface.types';
19
23
  export interface FrontendTechdocProviderModule {
20
24
  metadata: ProviderMetadata;
21
25
  providerCapabilities: ReadonlyArray<ProviderCapability>;
22
26
  protocols: ReadonlyArray<ProviderProtocol>;
23
27
  publicConfig?: Readonly<Record<string, unknown>>;
28
+ /**
29
+ * Origins this provider needs the technical doc's composed CSP to admit.
30
+ *
31
+ * DATA: projected onto the provider entry and read by `resolveCspPolicy`'s
32
+ * provider layer, per service and per environment.
33
+ *
34
+ * Name only the buckets you reach. For an endpoint you cannot know — one the
35
+ * application configures — declare `derivedOrigins` instead and the framework
36
+ * reads it out of your own `publicConfig`; see the app facet's module type for
37
+ * the worked shape.
38
+ */
39
+ csp?: ProviderFrontendCspFootprintDeclaration;
40
+ /**
41
+ * Third-party `<script>` tags the surface must add for this provider — the
42
+ * case a dynamic `import()` cannot serve, because the vendor ships a
43
+ * global-installing tag rather than an npm module (reCAPTCHA is the one this
44
+ * facet already has). Each declared `src`'s origin MUST also appear in
45
+ * `csp.scriptOrigins` — `projectFrontendProviderContribution` refuses the
46
+ * provider otherwise, because the policy it contributes to would block its own
47
+ * script, and only where CSP enforces, so the failure would first appear in
48
+ * production.
49
+ */
50
+ scripts?: ReadonlyArray<ProviderFrontendScriptDeclaration>;
51
+ /**
52
+ * The provider's vendor SDK: which package (DATA) and how to load and start
53
+ * it (CODE). `activate` must reach its package through a DYNAMIC `import()`.
54
+ */
55
+ sdk?: ProviderFrontendSdk;
56
+ /**
57
+ * Components this provider contributes, keyed by the capability each fills
58
+ * and loaded on demand. CODE: it reaches a bundle only through the generated
59
+ * `frontend-providers.generated.ts`, never through the JSON entry.
60
+ *
61
+ * Several providers may offer a component for ONE capability — two file
62
+ * pickers, two meeting embeds — and that is the point: the surface presents
63
+ * the choice rather than silently taking whichever the registry happened to
64
+ * index first.
65
+ */
66
+ components?: ProviderFrontendComponents;
67
+ /**
68
+ * Validator for this provider's own `publicConfig`, as a Standard Schema v1
69
+ * value (a Zod 4 schema satisfies it as-is). Validated once at hydration, so
70
+ * no use site has to coerce `Record<string, unknown>` by hand.
71
+ */
72
+ publicConfigSchema?: ProviderFrontendPublicConfigSchema;
73
+ /**
74
+ * The vendor's deployment model, processing regions and legal entity (#345).
75
+ *
76
+ * Same contract, same optionality and same reasoning as `FrontendAppProviderModule`: this module
77
+ * runs in the data subject's browser and reaches the vendor directly, so it is a third-party
78
+ * recipient a processor register must name. See `ProviderComplianceProfileSchema`.
79
+ */
80
+ complianceProfile?: ProviderComplianceProfile;
24
81
  }
25
82
  //# sourceMappingURL=frontend-techdoc-provider-module.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontend-techdoc-provider-module.types.d.ts","sourceRoot":"","sources":["../../../../src/techdoc/frontend-techdoc-provider-module.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,sCAAsC,CAAC;AAE9C,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,oBAAoB,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACxD,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAClD"}
1
+ {"version":3,"file":"frontend-techdoc-provider-module.types.d.ts","sourceRoot":"","sources":["../../../src/techdoc/frontend-techdoc-provider-module.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,KAAK,EACV,uCAAuC,EACvC,iCAAiC,EACjC,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EACV,0BAA0B,EAC1B,kCAAkC,EAClC,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAEnD,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,oBAAoB,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACxD,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD;;;;;;;;;;OAUG;IACH,GAAG,CAAC,EAAE,uCAAuC,CAAC;IAC9C;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,iCAAiC,CAAC,CAAC;IAC3D;;;OAGG;IACH,GAAG,CAAC,EAAE,mBAAmB,CAAC;IAC1B;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,kCAAkC,CAAC;IACxD;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;CAC/C"}
@@ -8,11 +8,13 @@
8
8
  * — the techdoc bundle never sees the SaaS-app providers and vice
9
9
  * versa.
10
10
  *
11
+ * The module is the CODE half of a provider's frontend surface; its DATA half
12
+ * is `FrontendProviderEntry`, read from the materialized frontend-services
13
+ * artifact at build time. The two are joined by
14
+ * `composeHydratedFrontendTechdocProviders`.
15
+ *
11
16
  * I18n resolution belongs to the consuming techdoc surface: provider
12
17
  * metadata should stay locale-neutral and expose translation-ready keys,
13
18
  * not localized prose baked into generated/runtime artifacts.
14
- *
15
- * Phase 0 ships the type only; Phase 6 wires the techdoc bootstrap
16
- * payload.
17
19
  */
18
20
  //# sourceMappingURL=frontend-techdoc-provider-module.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontend-techdoc-provider-module.types.js","sourceRoot":"","sources":["../../../../src/techdoc/frontend-techdoc-provider-module.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG","sourcesContent":["/**\n * `FrontendTechdocProviderModule` — browser-bound facet for the\n * `AppFrontendType.TECH_DOC` surface (`@wildo-ai/saas-technical-doc`).\n *\n * Same shape as `FrontendAppProviderModule` but a distinct type so the\n * facet boundary is type-enforced. Authored providers explicitly opt\n * into techdoc visibility by exporting a `<ref>FrontendTechdocProvider`\n * — the techdoc bundle never sees the SaaS-app providers and vice\n * versa.\n *\n * I18n resolution belongs to the consuming techdoc surface: provider\n * metadata should stay locale-neutral and expose translation-ready keys,\n * not localized prose baked into generated/runtime artifacts.\n *\n * Phase 0 ships the type only; Phase 6 wires the techdoc bootstrap\n * payload.\n */\n\nimport type {\n ProviderMetadata,\n ProviderCapability,\n ProviderProtocol,\n} from '@wildo-ai/saas-models/public-runtime';\n\nexport interface FrontendTechdocProviderModule {\n metadata: ProviderMetadata;\n providerCapabilities: ReadonlyArray<ProviderCapability>;\n protocols: ReadonlyArray<ProviderProtocol>;\n publicConfig?: Readonly<Record<string, unknown>>;\n}\n"]}
1
+ {"version":3,"file":"frontend-techdoc-provider-module.types.js","sourceRoot":"","sources":["../../../src/techdoc/frontend-techdoc-provider-module.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG","sourcesContent":["/**\n * `FrontendTechdocProviderModule` — browser-bound facet for the\n * `AppFrontendType.TECH_DOC` surface (`@wildo-ai/saas-technical-doc`).\n *\n * Same shape as `FrontendAppProviderModule` but a distinct type so the\n * facet boundary is type-enforced. Authored providers explicitly opt\n * into techdoc visibility by exporting a `<ref>FrontendTechdocProvider`\n * — the techdoc bundle never sees the SaaS-app providers and vice\n * versa.\n *\n * The module is the CODE half of a provider's frontend surface; its DATA half\n * is `FrontendProviderEntry`, read from the materialized frontend-services\n * artifact at build time. The two are joined by\n * `composeHydratedFrontendTechdocProviders`.\n *\n * I18n resolution belongs to the consuming techdoc surface: provider\n * metadata should stay locale-neutral and expose translation-ready keys,\n * not localized prose baked into generated/runtime artifacts.\n */\n\nimport type { ProviderComplianceProfile } from '@wildo-ai/saas-models/public-runtime';\n\nimport type {\n ProviderFrontendCspFootprintDeclaration,\n ProviderFrontendScriptDeclaration,\n ProviderMetadata,\n ProviderCapability,\n ProviderProtocol,\n} from '@wildo-ai/saas-models/public-runtime';\nimport type {\n ProviderFrontendComponents,\n ProviderFrontendPublicConfigSchema,\n ProviderFrontendSdk,\n} from '../shared/frontend-provider-surface.types';\n\nexport interface FrontendTechdocProviderModule {\n metadata: ProviderMetadata;\n providerCapabilities: ReadonlyArray<ProviderCapability>;\n protocols: ReadonlyArray<ProviderProtocol>;\n publicConfig?: Readonly<Record<string, unknown>>;\n /**\n * Origins this provider needs the technical doc's composed CSP to admit.\n *\n * DATA: projected onto the provider entry and read by `resolveCspPolicy`'s\n * provider layer, per service and per environment.\n *\n * Name only the buckets you reach. For an endpoint you cannot know — one the\n * application configures — declare `derivedOrigins` instead and the framework\n * reads it out of your own `publicConfig`; see the app facet's module type for\n * the worked shape.\n */\n csp?: ProviderFrontendCspFootprintDeclaration;\n /**\n * Third-party `<script>` tags the surface must add for this provider — the\n * case a dynamic `import()` cannot serve, because the vendor ships a\n * global-installing tag rather than an npm module (reCAPTCHA is the one this\n * facet already has). Each declared `src`'s origin MUST also appear in\n * `csp.scriptOrigins` — `projectFrontendProviderContribution` refuses the\n * provider otherwise, because the policy it contributes to would block its own\n * script, and only where CSP enforces, so the failure would first appear in\n * production.\n */\n scripts?: ReadonlyArray<ProviderFrontendScriptDeclaration>;\n /**\n * The provider's vendor SDK: which package (DATA) and how to load and start\n * it (CODE). `activate` must reach its package through a DYNAMIC `import()`.\n */\n sdk?: ProviderFrontendSdk;\n /**\n * Components this provider contributes, keyed by the capability each fills\n * and loaded on demand. CODE: it reaches a bundle only through the generated\n * `frontend-providers.generated.ts`, never through the JSON entry.\n *\n * Several providers may offer a component for ONE capability — two file\n * pickers, two meeting embeds — and that is the point: the surface presents\n * the choice rather than silently taking whichever the registry happened to\n * index first.\n */\n components?: ProviderFrontendComponents;\n /**\n * Validator for this provider's own `publicConfig`, as a Standard Schema v1\n * value (a Zod 4 schema satisfies it as-is). Validated once at hydration, so\n * no use site has to coerce `Record<string, unknown>` by hand.\n */\n publicConfigSchema?: ProviderFrontendPublicConfigSchema;\n /**\n * The vendor's deployment model, processing regions and legal entity (#345).\n *\n * Same contract, same optionality and same reasoning as `FrontendAppProviderModule`: this module\n * runs in the data subject's browser and reaches the vendor directly, so it is a third-party\n * recipient a processor register must name. See `ProviderComplianceProfileSchema`.\n */\n complianceProfile?: ProviderComplianceProfile;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"frontend-techdoc-provider-registry.types.d.ts","sourceRoot":"","sources":["../../../../src/techdoc/frontend-techdoc-provider-registry.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG;IAChD,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAC;CAChD,CAAC;AAEF,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,OAAO,EAAE,WAAW,CAC3B,0BAA0B,EAC1B,6BAA6B,CAC9B,CAAC;IAEF,gBAAgB,CACd,GAAG,EAAE,0BAA0B,GAC9B,6BAA6B,GAAG,SAAS,CAAC;IAE7C,gCAAgC,CAC9B,kBAAkB,EAAE,kBAAkB,GACrC,aAAa,CAAC,6BAA6B,CAAC,CAAC;IAEhD,gCAAgC,CAC9B,kBAAkB,EAAE,kBAAkB,GACrC,6BAA6B,GAAG,SAAS,CAAC;CAC9C"}
1
+ {"version":3,"file":"frontend-techdoc-provider-registry.types.d.ts","sourceRoot":"","sources":["../../../src/techdoc/frontend-techdoc-provider-registry.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG;IAChD,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAC;CAChD,CAAC;AAEF,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,OAAO,EAAE,WAAW,CAC3B,0BAA0B,EAC1B,6BAA6B,CAC9B,CAAC;IAEF,gBAAgB,CACd,GAAG,EAAE,0BAA0B,GAC9B,6BAA6B,GAAG,SAAS,CAAC;IAE7C,gCAAgC,CAC9B,kBAAkB,EAAE,kBAAkB,GACrC,aAAa,CAAC,6BAA6B,CAAC,CAAC;IAEhD,gCAAgC,CAC9B,kBAAkB,EAAE,kBAAkB,GACrC,6BAA6B,GAAG,SAAS,CAAC;CAC9C"}
@@ -7,4 +7,8 @@ export * from './frontend-techdoc-provider-module.types';
7
7
  export * from './frontend-techdoc-provider-registry.types';
8
8
  export * from './compose-frontend-techdoc-providers';
9
9
  export * from './engine-frontend-techdoc-provider-registry';
10
+ export * from './compose-hydrated-frontend-techdoc-providers';
11
+ export * from '../shared/frontend-provider-surface.types';
12
+ export * from '../shared/hydrate-frontend-providers';
13
+ export * from '../shared/activate-frontend-provider-sdks';
10
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/techdoc/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/techdoc/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC"}
@@ -7,4 +7,8 @@ export * from './frontend-techdoc-provider-module.types.js';
7
7
  export * from './frontend-techdoc-provider-registry.types.js';
8
8
  export * from './compose-frontend-techdoc-providers.js';
9
9
  export * from './engine-frontend-techdoc-provider-registry.js';
10
+ export * from './compose-hydrated-frontend-techdoc-providers.js';
11
+ export * from '../shared/frontend-provider-surface.types.js';
12
+ export * from '../shared/hydrate-frontend-providers.js';
13
+ export * from '../shared/activate-frontend-provider-sdks.js';
10
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/techdoc/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC","sourcesContent":["/**\n * Public surface of `@wildo-ai/external-connectors-public/techdoc`.\n *\n * Browser-bound, no secrets. Phase 1 wires `composeFrontendTechdocProviders`.\n */\n\nexport * from './frontend-techdoc-provider-module.types';\nexport * from './frontend-techdoc-provider-registry.types';\nexport * from './compose-frontend-techdoc-providers';\nexport * from './engine-frontend-techdoc-provider-registry';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/techdoc/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC","sourcesContent":["/**\n * Public surface of `@wildo-ai/external-connectors-public/techdoc`.\n *\n * Browser-bound, no secrets. Phase 1 wires `composeFrontendTechdocProviders`.\n */\n\nexport * from './frontend-techdoc-provider-module.types';\nexport * from './frontend-techdoc-provider-registry.types';\nexport * from './compose-frontend-techdoc-providers';\nexport * from './engine-frontend-techdoc-provider-registry';\nexport * from './compose-hydrated-frontend-techdoc-providers';\nexport * from '../shared/frontend-provider-surface.types';\nexport * from '../shared/hydrate-frontend-providers';\nexport * from '../shared/activate-frontend-provider-sdks';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"compose-frontend-website-providers.d.ts","sourceRoot":"","sources":["../../../../src/website/compose-frontend-website-providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,KAAK,EACV,0BAA0B,EAC1B,+BAA+B,EAChC,MAAM,4CAA4C,CAAC;AAEpD,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,OAAO,EAAE,WAAW,CAC3B,0BAA0B,EAC1B,6BAA6B,CAC9B,CAAC;CACH;AAED,wBAAgB,+BAA+B,CAC7C,GAAG,SAAS,EAAE,aAAa,CAAC,uCAAuC,CAAC,GACnE,+BAA+B,CAKjC"}
1
+ {"version":3,"file":"compose-frontend-website-providers.d.ts","sourceRoot":"","sources":["../../../src/website/compose-frontend-website-providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,KAAK,EACV,0BAA0B,EAC1B,+BAA+B,EAChC,MAAM,4CAA4C,CAAC;AAEpD,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,OAAO,EAAE,WAAW,CAC3B,0BAA0B,EAC1B,6BAA6B,CAC9B,CAAC;CACH;AAED,wBAAgB,+BAA+B,CAC7C,GAAG,SAAS,EAAE,aAAa,CAAC,uCAAuC,CAAC,GACnE,+BAA+B,CAQjC"}
@@ -4,8 +4,11 @@
4
4
  * `@wildo-ai/saas-models/external-providers/compose-provider-registry.shared`
5
5
  * for behavior, conflict policy, and indexing semantics.
6
6
  */
7
- import { composeProviderRegistry } from '@wildo-ai/saas-models/public-runtime';
7
+ import { composeProviderRegistry, assertProviderTierCoherence, } from '@wildo-ai/saas-models/public-runtime';
8
8
  export function composeFrontendWebsiteProviders(...fragments) {
9
- return composeProviderRegistry('FrontendWebsite', fragments);
9
+ const registry = composeProviderRegistry('FrontendWebsite', fragments);
10
+ // #328 — the tier rule holds on every facet: a CATALOGUE provider binds no engine slot.
11
+ assertProviderTierCoherence('FrontendWebsite', registry.modules.values());
12
+ return registry;
10
13
  }
11
14
  //# sourceMappingURL=compose-frontend-website-providers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compose-frontend-website-providers.js","sourceRoot":"","sources":["../../../../src/website/compose-frontend-website-providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAe/E,MAAM,UAAU,+BAA+B,CAC7C,GAAG,SAAiE;IAEpE,OAAO,uBAAuB,CAG5B,iBAAiB,EAAE,SAAS,CAAC,CAAC;AAClC,CAAC","sourcesContent":["/**\n * `composeFrontendWebsiteProviders` — frontend-website-facet wrapper\n * around the generic `composeProviderRegistry` core. See\n * `@wildo-ai/saas-models/external-providers/compose-provider-registry.shared`\n * for behavior, conflict policy, and indexing semantics.\n */\n\nimport { composeProviderRegistry } from '@wildo-ai/saas-models/public-runtime';\n\nimport type { FrontendWebsiteProviderModule } from './frontend-website-provider-module.types';\nimport type {\n FrontendWebsiteProviderRef,\n FrontendWebsiteProviderRegistry,\n} from './frontend-website-provider-registry.types';\n\nexport interface FrontendWebsiteProviderRegistryFragment {\n readonly modules: ReadonlyMap<\n FrontendWebsiteProviderRef,\n FrontendWebsiteProviderModule\n >;\n}\n\nexport function composeFrontendWebsiteProviders(\n ...fragments: ReadonlyArray<FrontendWebsiteProviderRegistryFragment>\n): FrontendWebsiteProviderRegistry {\n return composeProviderRegistry<\n FrontendWebsiteProviderRef,\n FrontendWebsiteProviderModule\n >('FrontendWebsite', fragments);\n}\n"]}
1
+ {"version":3,"file":"compose-frontend-website-providers.js","sourceRoot":"","sources":["../../../src/website/compose-frontend-website-providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,uBAAuB,EAC9B,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC;AAe9C,MAAM,UAAU,+BAA+B,CAC7C,GAAG,SAAiE;IAEpE,MAAM,QAAQ,GAAG,uBAAuB,CAGtC,iBAAiB,EAAE,SAAS,CAAC,CAAC;IAChC,wFAAwF;IACxF,2BAA2B,CAAC,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1E,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["/**\n * `composeFrontendWebsiteProviders` — frontend-website-facet wrapper\n * around the generic `composeProviderRegistry` core. See\n * `@wildo-ai/saas-models/external-providers/compose-provider-registry.shared`\n * for behavior, conflict policy, and indexing semantics.\n */\n\nimport { composeProviderRegistry,\n assertProviderTierCoherence,\n} from '@wildo-ai/saas-models/public-runtime';\n\nimport type { FrontendWebsiteProviderModule } from './frontend-website-provider-module.types';\nimport type {\n FrontendWebsiteProviderRef,\n FrontendWebsiteProviderRegistry,\n} from './frontend-website-provider-registry.types';\n\nexport interface FrontendWebsiteProviderRegistryFragment {\n readonly modules: ReadonlyMap<\n FrontendWebsiteProviderRef,\n FrontendWebsiteProviderModule\n >;\n}\n\nexport function composeFrontendWebsiteProviders(\n ...fragments: ReadonlyArray<FrontendWebsiteProviderRegistryFragment>\n): FrontendWebsiteProviderRegistry {\n const registry = composeProviderRegistry<\n FrontendWebsiteProviderRef,\n FrontendWebsiteProviderModule\n >('FrontendWebsite', fragments);\n // #328 — the tier rule holds on every facet: a CATALOGUE provider binds no engine slot.\n assertProviderTierCoherence('FrontendWebsite', registry.modules.values());\n return registry;\n}\n"]}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Hydration for the marketing website facet: the DATA channel joined with the
3
+ * CODE channel, composed into the same registry every consumer already reads.
4
+ *
5
+ * `composeFrontendWebsiteProviders` (the fragment-composition core) is unchanged and still the
6
+ * single place the tier rule runs. What is added here is the step BEFORE it —
7
+ * building each module from its served entry and, where the bundle carries it,
8
+ * the provider package's own module — so the registry is no longer produced by
9
+ * casting a JSON entry to a module type.
10
+ *
11
+ * See `../shared/hydrate-frontend-providers.ts` for the join rule and the
12
+ * diagnostics it raises.
13
+ */
14
+ import type { FrontendWebsiteProviderModule } from './frontend-website-provider-module.types';
15
+ import type { FrontendWebsiteProviderRegistry } from './frontend-website-provider-registry.types';
16
+ import { type HydrateFrontendProvidersInput } from '../shared/hydrate-frontend-providers';
17
+ /**
18
+ * The shape of `generatedFrontendProviderModules` in a
19
+ * `frontend-providers.generated.ts` written by `wildo config sync` for a
20
+ * marketing website service.
21
+ *
22
+ * The key is the provider's `ref` and must equal `module.metadata.ref`; the
23
+ * join refuses a mismatch rather than binding one provider's code to another's
24
+ * configuration. An absent file is legal — a service that declares no
25
+ * package-shipped provider ships none — so a consumer passes `undefined`.
26
+ */
27
+ export type GeneratedWebsiteProviderModules = Readonly<Record<string, FrontendWebsiteProviderModule>>;
28
+ /**
29
+ * Joins the served provider entries with the bundle's generated modules and
30
+ * composes the result.
31
+ */
32
+ export declare function composeHydratedFrontendWebsiteProviders(input: HydrateFrontendProvidersInput<FrontendWebsiteProviderModule>): FrontendWebsiteProviderRegistry;
33
+ //# sourceMappingURL=compose-hydrated-frontend-website-providers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-hydrated-frontend-website-providers.d.ts","sourceRoot":"","sources":["../../../src/website/compose-hydrated-frontend-website-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,KAAK,EAEV,+BAA+B,EAChC,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,sCAAsC,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,MAAM,+BAA+B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC,CAAC;AAEtG;;;GAGG;AACH,wBAAgB,uCAAuC,CACrD,KAAK,EAAE,6BAA6B,CAAC,6BAA6B,CAAC,GAClE,+BAA+B,CAsBjC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Hydration for the marketing website facet: the DATA channel joined with the
3
+ * CODE channel, composed into the same registry every consumer already reads.
4
+ *
5
+ * `composeFrontendWebsiteProviders` (the fragment-composition core) is unchanged and still the
6
+ * single place the tier rule runs. What is added here is the step BEFORE it —
7
+ * building each module from its served entry and, where the bundle carries it,
8
+ * the provider package's own module — so the registry is no longer produced by
9
+ * casting a JSON entry to a module type.
10
+ *
11
+ * See `../shared/hydrate-frontend-providers.ts` for the join rule and the
12
+ * diagnostics it raises.
13
+ */
14
+ import { composeFrontendWebsiteProviders } from './compose-frontend-website-providers.js';
15
+ import { hydrateFrontendProviderModules, } from '../shared/hydrate-frontend-providers.js';
16
+ /**
17
+ * Joins the served provider entries with the bundle's generated modules and
18
+ * composes the result.
19
+ */
20
+ export function composeHydratedFrontendWebsiteProviders(input) {
21
+ const hydrated = hydrateFrontendProviderModules(input);
22
+ const modules = new Map([...hydrated].map(([ref, module]) => [
23
+ ref,
24
+ {
25
+ ...module,
26
+ // The ONE narrowing on this path, and the only one that cannot be
27
+ // checked at runtime: the wire carries `string`, while the module type
28
+ // is a union an application EXTENDS by TypeScript module augmentation.
29
+ // Those app-declared members exist only at compile time, so there is no
30
+ // set to validate a served value against — a runtime check here could
31
+ // only ever reject what an application legitimately declared. What does
32
+ // have teeth still runs: `composeFrontendWebsiteProviders` applies the tier rule to
33
+ // every composed module, which is the check that decides whether a
34
+ // capability may bind an engine slot at all.
35
+ providerCapabilities: module.providerCapabilities,
36
+ protocols: module.protocols,
37
+ },
38
+ ]));
39
+ return composeFrontendWebsiteProviders({ modules });
40
+ }
41
+ //# sourceMappingURL=compose-hydrated-frontend-website-providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-hydrated-frontend-website-providers.js","sourceRoot":"","sources":["../../../src/website/compose-hydrated-frontend-website-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EACL,8BAA8B,GAE/B,MAAM,sCAAsC,CAAC;AAc9C;;;GAGG;AACH,MAAM,UAAU,uCAAuC,CACrD,KAAmE;IAEnE,MAAM,QAAQ,GAAG,8BAA8B,CAAgC,KAAK,CAAC,CAAC;IACtF,MAAM,OAAO,GAAG,IAAI,GAAG,CACrB,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;QACnC,GAAiC;QACjC;YACE,GAAG,MAAM;YACT,kEAAkE;YAClE,uEAAuE;YACvE,uEAAuE;YACvE,wEAAwE;YACxE,sEAAsE;YACtE,wEAAwE;YACxE,oFAAoF;YACpF,mEAAmE;YACnE,6CAA6C;YAC7C,oBAAoB,EAAE,MAAM,CAAC,oBAAyD;YACtF,SAAS,EAAE,MAAM,CAAC,SAA4C;SAC/D;KACF,CAAC,CACH,CAAC;IACF,OAAO,+BAA+B,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AACtD,CAAC","sourcesContent":["/**\n * Hydration for the marketing website facet: the DATA channel joined with the\n * CODE channel, composed into the same registry every consumer already reads.\n *\n * `composeFrontendWebsiteProviders` (the fragment-composition core) is unchanged and still the\n * single place the tier rule runs. What is added here is the step BEFORE it —\n * building each module from its served entry and, where the bundle carries it,\n * the provider package's own module — so the registry is no longer produced by\n * casting a JSON entry to a module type.\n *\n * See `../shared/hydrate-frontend-providers.ts` for the join rule and the\n * diagnostics it raises.\n */\n\nimport type { ProviderCapability, ProviderProtocol } from '@wildo-ai/saas-models/public-runtime';\n\nimport type { FrontendWebsiteProviderModule } from './frontend-website-provider-module.types';\nimport type {\n FrontendWebsiteProviderRef,\n FrontendWebsiteProviderRegistry,\n} from './frontend-website-provider-registry.types';\nimport { composeFrontendWebsiteProviders } from './compose-frontend-website-providers';\nimport {\n hydrateFrontendProviderModules,\n type HydrateFrontendProvidersInput,\n} from '../shared/hydrate-frontend-providers';\n\n/**\n * The shape of `generatedFrontendProviderModules` in a\n * `frontend-providers.generated.ts` written by `wildo config sync` for a\n * marketing website service.\n *\n * The key is the provider's `ref` and must equal `module.metadata.ref`; the\n * join refuses a mismatch rather than binding one provider's code to another's\n * configuration. An absent file is legal — a service that declares no\n * package-shipped provider ships none — so a consumer passes `undefined`.\n */\nexport type GeneratedWebsiteProviderModules = Readonly<Record<string, FrontendWebsiteProviderModule>>;\n\n/**\n * Joins the served provider entries with the bundle's generated modules and\n * composes the result.\n */\nexport function composeHydratedFrontendWebsiteProviders(\n input: HydrateFrontendProvidersInput<FrontendWebsiteProviderModule>,\n): FrontendWebsiteProviderRegistry {\n const hydrated = hydrateFrontendProviderModules<FrontendWebsiteProviderModule>(input);\n const modules = new Map<FrontendWebsiteProviderRef, FrontendWebsiteProviderModule>(\n [...hydrated].map(([ref, module]) => [\n ref as FrontendWebsiteProviderRef,\n {\n ...module,\n // The ONE narrowing on this path, and the only one that cannot be\n // checked at runtime: the wire carries `string`, while the module type\n // is a union an application EXTENDS by TypeScript module augmentation.\n // Those app-declared members exist only at compile time, so there is no\n // set to validate a served value against — a runtime check here could\n // only ever reject what an application legitimately declared. What does\n // have teeth still runs: `composeFrontendWebsiteProviders` applies the tier rule to\n // every composed module, which is the check that decides whether a\n // capability may bind an engine slot at all.\n providerCapabilities: module.providerCapabilities as ReadonlyArray<ProviderCapability>,\n protocols: module.protocols as ReadonlyArray<ProviderProtocol>,\n },\n ]),\n );\n return composeFrontendWebsiteProviders({ modules });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"engine-frontend-website-provider-registry.d.ts","sourceRoot":"","sources":["../../../../src/website/engine-frontend-website-provider-registry.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,sCAAsC,CAAC;AASpG,eAAO,MAAM,6CAA6C,EAAE,uCAO3D,CAAC;AAEF,eAAO,MAAM,qCAAqC,sFAEjD,CAAC"}
1
+ {"version":3,"file":"engine-frontend-website-provider-registry.d.ts","sourceRoot":"","sources":["../../../src/website/engine-frontend-website-provider-registry.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,sCAAsC,CAAC;AASpG,eAAO,MAAM,6CAA6C,EAAE,uCAO3D,CAAC;AAEF,eAAO,MAAM,qCAAqC,sFAEjD,CAAC"}
@@ -1,6 +1,10 @@
1
1
  import { PostHogFrontendWebsiteProvider } from '../providers/posthog/index.js';
2
2
  import { RecaptchaFrontendWebsiteProvider } from '../providers/recaptcha/index.js';
3
- import { SentryFrontendWebsiteProvider } from '../providers/sentry/index.js';
3
+ // Imported from the owning source, NOT through `providers/sentry/index.ts`. Sentry is the
4
+ // first provider with TWO surface modules, and a barrel exporting both puts the app
5
+ // module in this website bundle's closure — `bundle-isolation.test.ts` saw exactly that,
6
+ // as `@sentry/browser` appearing twice in a walk of `website/index.ts`.
7
+ import { SentryFrontendWebsiteProvider } from '../providers/sentry/sentry.frontend-website.module.js';
4
8
  import { composeFrontendWebsiteProviders } from './compose-frontend-website-providers.js';
5
9
  const frontendWebsiteProviders = [
6
10
  PostHogFrontendWebsiteProvider,
@@ -1 +1 @@
1
- {"version":3,"file":"engine-frontend-website-provider-registry.js","sourceRoot":"","sources":["../../../../src/website/engine-frontend-website-provider-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAIvF,MAAM,wBAAwB,GAAG;IAC/B,8BAA8B;IAC9B,gCAAgC;IAChC,6BAA6B;CACrB,CAAC;AAEX,MAAM,CAAC,MAAM,6CAA6C,GAA4C;IACpG,OAAO,EAAE,IAAI,GAAG,CACd,wBAAwB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;QACzC,QAAQ,CAAC,QAAQ,CAAC,GAAiC;QACnD,QAAQ;KACT,CAAC,CACH;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,qCAAqC,GAAG,+BAA+B,CAClF,6CAA6C,CAC9C,CAAC","sourcesContent":["import { PostHogFrontendWebsiteProvider } from '../providers/posthog';\nimport { RecaptchaFrontendWebsiteProvider } from '../providers/recaptcha';\nimport { SentryFrontendWebsiteProvider } from '../providers/sentry';\n\nimport { composeFrontendWebsiteProviders } from './compose-frontend-website-providers';\nimport type { FrontendWebsiteProviderRegistryFragment } from './compose-frontend-website-providers';\nimport type { FrontendWebsiteProviderRef } from './frontend-website-provider-registry.types';\n\nconst frontendWebsiteProviders = [\n PostHogFrontendWebsiteProvider,\n RecaptchaFrontendWebsiteProvider,\n SentryFrontendWebsiteProvider,\n] as const;\n\nexport const EngineFrontendWebsiteProviderRegistryFragment: FrontendWebsiteProviderRegistryFragment = {\n modules: new Map(\n frontendWebsiteProviders.map((provider) => [\n provider.metadata.ref as FrontendWebsiteProviderRef,\n provider,\n ]),\n ),\n};\n\nexport const EngineFrontendWebsiteProviderRegistry = composeFrontendWebsiteProviders(\n EngineFrontendWebsiteProviderRegistryFragment,\n);\n"]}
1
+ {"version":3,"file":"engine-frontend-website-provider-registry.js","sourceRoot":"","sources":["../../../src/website/engine-frontend-website-provider-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,0FAA0F;AAC1F,oFAAoF;AACpF,yFAAyF;AACzF,wEAAwE;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAEnG,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAIvF,MAAM,wBAAwB,GAAG;IAC/B,8BAA8B;IAC9B,gCAAgC;IAChC,6BAA6B;CACrB,CAAC;AAEX,MAAM,CAAC,MAAM,6CAA6C,GAA4C;IACpG,OAAO,EAAE,IAAI,GAAG,CACd,wBAAwB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;QACzC,QAAQ,CAAC,QAAQ,CAAC,GAAiC;QACnD,QAAQ;KACT,CAAC,CACH;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,qCAAqC,GAAG,+BAA+B,CAClF,6CAA6C,CAC9C,CAAC","sourcesContent":["import { PostHogFrontendWebsiteProvider } from '../providers/posthog';\nimport { RecaptchaFrontendWebsiteProvider } from '../providers/recaptcha';\n// Imported from the owning source, NOT through `providers/sentry/index.ts`. Sentry is the\n// first provider with TWO surface modules, and a barrel exporting both puts the app\n// module in this website bundle's closure — `bundle-isolation.test.ts` saw exactly that,\n// as `@sentry/browser` appearing twice in a walk of `website/index.ts`.\nimport { SentryFrontendWebsiteProvider } from '../providers/sentry/sentry.frontend-website.module';\n\nimport { composeFrontendWebsiteProviders } from './compose-frontend-website-providers';\nimport type { FrontendWebsiteProviderRegistryFragment } from './compose-frontend-website-providers';\nimport type { FrontendWebsiteProviderRef } from './frontend-website-provider-registry.types';\n\nconst frontendWebsiteProviders = [\n PostHogFrontendWebsiteProvider,\n RecaptchaFrontendWebsiteProvider,\n SentryFrontendWebsiteProvider,\n] as const;\n\nexport const EngineFrontendWebsiteProviderRegistryFragment: FrontendWebsiteProviderRegistryFragment = {\n modules: new Map(\n frontendWebsiteProviders.map((provider) => [\n provider.metadata.ref as FrontendWebsiteProviderRef,\n provider,\n ]),\n ),\n};\n\nexport const EngineFrontendWebsiteProviderRegistry = composeFrontendWebsiteProviders(\n EngineFrontendWebsiteProviderRegistryFragment,\n);\n"]}
@@ -6,17 +6,77 @@
6
6
  * the marketing/website bundle never imports SaaS-app or techdoc
7
7
  * provider modules.
8
8
  *
9
+ * The module is the CODE half of a provider's frontend surface; its DATA half
10
+ * is `FrontendProviderEntry`, read from the materialized frontend-services
11
+ * artifact at build time. The two are joined by
12
+ * `composeHydratedFrontendWebsiteProviders` — the website used to resolve a
13
+ * provider ref and stamp it into a `data-*` attribute, which is as far as a
14
+ * data-only channel could go.
15
+ *
9
16
  * I18n resolution belongs to the website runtime/UI layer. Provider
10
17
  * modules should carry translation-ready metadata keys and locale-neutral
11
18
  * public config only.
12
- *
13
- * Phase 0 ships the type only.
14
19
  */
15
- import type { ProviderMetadata, ProviderCapability, ProviderProtocol } from '@wildo-ai/saas-models/public-runtime';
20
+ import type { ProviderComplianceProfile } from '@wildo-ai/saas-models/public-runtime';
21
+ import type { ProviderFrontendCspFootprintDeclaration, ProviderFrontendScriptDeclaration, ProviderMetadata, ProviderCapability, ProviderProtocol } from '@wildo-ai/saas-models/public-runtime';
22
+ import type { ProviderFrontendComponents, ProviderFrontendPublicConfigSchema, ProviderFrontendSdk } from '../shared/frontend-provider-surface.types';
16
23
  export interface FrontendWebsiteProviderModule {
17
24
  metadata: ProviderMetadata;
18
25
  providerCapabilities: ReadonlyArray<ProviderCapability>;
19
26
  protocols: ReadonlyArray<ProviderProtocol>;
20
27
  publicConfig?: Readonly<Record<string, unknown>>;
28
+ /**
29
+ * Origins this provider needs the marketing website's composed CSP to admit.
30
+ *
31
+ * DATA: projected onto the provider entry and read by `resolveCspPolicy`'s
32
+ * provider layer, per service and per environment.
33
+ *
34
+ * Name only the buckets you reach. For an endpoint you cannot know — one the
35
+ * application configures — declare `derivedOrigins` instead and the framework
36
+ * reads it out of your own `publicConfig`; see the app facet's module type for
37
+ * the worked shape.
38
+ */
39
+ csp?: ProviderFrontendCspFootprintDeclaration;
40
+ /**
41
+ * Third-party `<script>` tags the surface must add for this provider — the
42
+ * case a dynamic `import()` cannot serve, because the vendor ships a
43
+ * global-installing tag rather than an npm module (reCAPTCHA is the one this
44
+ * facet already has). Each declared `src`'s origin MUST also appear in
45
+ * `csp.scriptOrigins` — `projectFrontendProviderContribution` refuses the
46
+ * provider otherwise, because the policy it contributes to would block its own
47
+ * script, and only where CSP enforces, so the failure would first appear in
48
+ * production.
49
+ */
50
+ scripts?: ReadonlyArray<ProviderFrontendScriptDeclaration>;
51
+ /**
52
+ * The provider's vendor SDK: which package (DATA) and how to load and start
53
+ * it (CODE). `activate` must reach its package through a DYNAMIC `import()`.
54
+ */
55
+ sdk?: ProviderFrontendSdk;
56
+ /**
57
+ * Components this provider contributes, keyed by the capability each fills
58
+ * and loaded on demand. CODE: it reaches a bundle only through the generated
59
+ * `frontend-providers.generated.ts`, never through the JSON entry.
60
+ *
61
+ * Several providers may offer a component for ONE capability — two file
62
+ * pickers, two meeting embeds — and that is the point: the surface presents
63
+ * the choice rather than silently taking whichever the registry happened to
64
+ * index first.
65
+ */
66
+ components?: ProviderFrontendComponents;
67
+ /**
68
+ * Validator for this provider's own `publicConfig`, as a Standard Schema v1
69
+ * value (a Zod 4 schema satisfies it as-is). Validated once at hydration, so
70
+ * no use site has to coerce `Record<string, unknown>` by hand.
71
+ */
72
+ publicConfigSchema?: ProviderFrontendPublicConfigSchema;
73
+ /**
74
+ * The vendor's deployment model, processing regions and legal entity (#345).
75
+ *
76
+ * Same contract, same optionality and same reasoning as `FrontendAppProviderModule`: this module
77
+ * runs in the data subject's browser and reaches the vendor directly, so it is a third-party
78
+ * recipient a processor register must name. See `ProviderComplianceProfileSchema`.
79
+ */
80
+ complianceProfile?: ProviderComplianceProfile;
21
81
  }
22
82
  //# sourceMappingURL=frontend-website-provider-module.types.d.ts.map