@wildo-ai/external-connectors-public 1.1.3 → 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 (104) hide show
  1. package/dist/esm/app/compose-frontend-app-providers.d.ts.map +1 -1
  2. package/dist/esm/app/compose-frontend-app-providers.js.map +1 -1
  3. package/dist/esm/app/compose-hydrated-frontend-app-providers.d.ts.map +1 -1
  4. package/dist/esm/app/compose-hydrated-frontend-app-providers.js.map +1 -1
  5. package/dist/esm/app/engine-frontend-app-provider-registry.d.ts.map +1 -1
  6. package/dist/esm/app/engine-frontend-app-provider-registry.js +4 -0
  7. package/dist/esm/app/engine-frontend-app-provider-registry.js.map +1 -1
  8. package/dist/esm/app/frontend-app-provider-module.types.d.ts +14 -1
  9. package/dist/esm/app/frontend-app-provider-module.types.d.ts.map +1 -1
  10. package/dist/esm/app/frontend-app-provider-module.types.js.map +1 -1
  11. package/dist/esm/app/frontend-app-provider-registry.types.d.ts.map +1 -1
  12. package/dist/esm/app/index.d.ts.map +1 -1
  13. package/dist/esm/app/index.js.map +1 -1
  14. package/dist/esm/companion-exports.d.ts +25 -14
  15. package/dist/esm/companion-exports.d.ts.map +1 -1
  16. package/dist/esm/companion-exports.js +31 -13
  17. package/dist/esm/companion-exports.js.map +1 -1
  18. package/dist/esm/engine-frontend-providers-package.d.ts.map +1 -1
  19. package/dist/esm/engine-frontend-providers-package.js.map +1 -1
  20. package/dist/esm/providers/algolia/algolia.frontend-techdoc.module.d.ts.map +1 -1
  21. package/dist/esm/providers/algolia/algolia.frontend-techdoc.module.js.map +1 -1
  22. package/dist/esm/providers/algolia/index.d.ts.map +1 -1
  23. package/dist/esm/providers/apple/apple.frontend-app.module.d.ts.map +1 -1
  24. package/dist/esm/providers/apple/apple.frontend-app.module.js.map +1 -1
  25. package/dist/esm/providers/apple/index.d.ts.map +1 -1
  26. package/dist/esm/providers/github/github.frontend-app.module.d.ts.map +1 -1
  27. package/dist/esm/providers/github/github.frontend-app.module.js.map +1 -1
  28. package/dist/esm/providers/github/index.d.ts.map +1 -1
  29. package/dist/esm/providers/google/google.frontend-app.module.d.ts +9 -0
  30. package/dist/esm/providers/google/google.frontend-app.module.d.ts.map +1 -1
  31. package/dist/esm/providers/google/google.frontend-app.module.js +13 -1
  32. package/dist/esm/providers/google/google.frontend-app.module.js.map +1 -1
  33. package/dist/esm/providers/google/index.d.ts.map +1 -1
  34. package/dist/esm/providers/google-drive/google-drive.frontend-app.module.d.ts +17 -0
  35. package/dist/esm/providers/google-drive/google-drive.frontend-app.module.d.ts.map +1 -0
  36. package/dist/esm/providers/google-drive/google-drive.frontend-app.module.js +66 -0
  37. package/dist/esm/providers/google-drive/google-drive.frontend-app.module.js.map +1 -0
  38. package/dist/esm/providers/google-drive/index.d.ts +2 -0
  39. package/dist/esm/providers/google-drive/index.d.ts.map +1 -0
  40. package/dist/esm/providers/google-drive/index.js +2 -0
  41. package/dist/esm/providers/google-drive/index.js.map +1 -0
  42. package/dist/esm/providers/microsoft/index.d.ts.map +1 -1
  43. package/dist/esm/providers/microsoft/microsoft.frontend-app.module.d.ts +6 -0
  44. package/dist/esm/providers/microsoft/microsoft.frontend-app.module.d.ts.map +1 -1
  45. package/dist/esm/providers/microsoft/microsoft.frontend-app.module.js +10 -4
  46. package/dist/esm/providers/microsoft/microsoft.frontend-app.module.js.map +1 -1
  47. package/dist/esm/providers/microsoft-onedrive/index.d.ts +2 -0
  48. package/dist/esm/providers/microsoft-onedrive/index.d.ts.map +1 -0
  49. package/dist/esm/providers/microsoft-onedrive/index.js +2 -0
  50. package/dist/esm/providers/microsoft-onedrive/index.js.map +1 -0
  51. package/dist/esm/providers/microsoft-onedrive/microsoft-onedrive.frontend-app.module.d.ts +13 -0
  52. package/dist/esm/providers/microsoft-onedrive/microsoft-onedrive.frontend-app.module.d.ts.map +1 -0
  53. package/dist/esm/providers/microsoft-onedrive/microsoft-onedrive.frontend-app.module.js +44 -0
  54. package/dist/esm/providers/microsoft-onedrive/microsoft-onedrive.frontend-app.module.js.map +1 -0
  55. package/dist/esm/providers/posthog/index.d.ts.map +1 -1
  56. package/dist/esm/providers/posthog/posthog.frontend-website.module.d.ts.map +1 -1
  57. package/dist/esm/providers/posthog/posthog.frontend-website.module.js.map +1 -1
  58. package/dist/esm/providers/recaptcha/index.d.ts.map +1 -1
  59. package/dist/esm/providers/recaptcha/recaptcha.frontend-website.module.d.ts.map +1 -1
  60. package/dist/esm/providers/recaptcha/recaptcha.frontend-website.module.js.map +1 -1
  61. package/dist/esm/providers/sentry/sentry.frontend-app.module.d.ts.map +1 -1
  62. package/dist/esm/providers/sentry/sentry.frontend-app.module.js.map +1 -1
  63. package/dist/esm/providers/sentry/sentry.frontend-website.module.d.ts.map +1 -1
  64. package/dist/esm/providers/sentry/sentry.frontend-website.module.js.map +1 -1
  65. package/dist/esm/providers/stripe/index.d.ts.map +1 -1
  66. package/dist/esm/providers/stripe/stripe.frontend-app.module.d.ts.map +1 -1
  67. package/dist/esm/providers/stripe/stripe.frontend-app.module.js.map +1 -1
  68. package/dist/esm/shared/activate-frontend-provider-sdks.d.ts.map +1 -1
  69. package/dist/esm/shared/activate-frontend-provider-sdks.js.map +1 -1
  70. package/dist/esm/shared/frontend-provider-surface.types.d.ts +22 -134
  71. package/dist/esm/shared/frontend-provider-surface.types.d.ts.map +1 -1
  72. package/dist/esm/shared/frontend-provider-surface.types.js +12 -0
  73. package/dist/esm/shared/frontend-provider-surface.types.js.map +1 -1
  74. package/dist/esm/shared/hydrate-frontend-providers.d.ts +8 -1
  75. package/dist/esm/shared/hydrate-frontend-providers.d.ts.map +1 -1
  76. package/dist/esm/shared/hydrate-frontend-providers.js +12 -0
  77. package/dist/esm/shared/hydrate-frontend-providers.js.map +1 -1
  78. package/dist/esm/techdoc/compose-frontend-techdoc-providers.d.ts.map +1 -1
  79. package/dist/esm/techdoc/compose-frontend-techdoc-providers.js.map +1 -1
  80. package/dist/esm/techdoc/compose-hydrated-frontend-techdoc-providers.d.ts.map +1 -1
  81. package/dist/esm/techdoc/compose-hydrated-frontend-techdoc-providers.js.map +1 -1
  82. package/dist/esm/techdoc/engine-frontend-techdoc-provider-registry.d.ts.map +1 -1
  83. package/dist/esm/techdoc/frontend-techdoc-provider-module.types.d.ts.map +1 -1
  84. package/dist/esm/techdoc/frontend-techdoc-provider-module.types.js.map +1 -1
  85. package/dist/esm/techdoc/frontend-techdoc-provider-registry.types.d.ts.map +1 -1
  86. package/dist/esm/techdoc/index.d.ts.map +1 -1
  87. package/dist/esm/techdoc/index.js.map +1 -1
  88. package/dist/esm/website/compose-frontend-website-providers.d.ts.map +1 -1
  89. package/dist/esm/website/compose-frontend-website-providers.js.map +1 -1
  90. package/dist/esm/website/compose-hydrated-frontend-website-providers.d.ts.map +1 -1
  91. package/dist/esm/website/compose-hydrated-frontend-website-providers.js.map +1 -1
  92. package/dist/esm/website/engine-frontend-website-provider-registry.d.ts.map +1 -1
  93. package/dist/esm/website/engine-frontend-website-provider-registry.js.map +1 -1
  94. package/dist/esm/website/frontend-website-provider-module.types.d.ts.map +1 -1
  95. package/dist/esm/website/frontend-website-provider-module.types.js.map +1 -1
  96. package/dist/esm/website/frontend-website-provider-registry.types.d.ts.map +1 -1
  97. package/dist/esm/website/index.d.ts.map +1 -1
  98. package/dist/esm/website/index.js.map +1 -1
  99. package/dist/tsconfig.build.tsbuildinfo +1 -1
  100. package/package.json +3 -3
  101. package/dist/esm/providers/sentry/index.d.ts +0 -0
  102. package/dist/esm/providers/sentry/index.d.ts.map +0 -0
  103. package/dist/esm/providers/sentry/index.js +0 -0
  104. package/dist/esm/providers/sentry/index.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"compose-frontend-app-providers.d.ts","sourceRoot":"","sources":["../../../../src/app/compose-frontend-app-providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,KAAK,EACV,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,wCAAwC,CAAC;AAEhD,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,CAAC;CAClF;AAED,wBAAgB,2BAA2B,CACzC,GAAG,SAAS,EAAE,aAAa,CAAC,mCAAmC,CAAC,GAC/D,2BAA2B,CAQ7B"}
1
+ {"version":3,"file":"compose-frontend-app-providers.d.ts","sourceRoot":"","sources":["../../../src/app/compose-frontend-app-providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,KAAK,EACV,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,wCAAwC,CAAC;AAEhD,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,CAAC;CAClF;AAED,wBAAgB,2BAA2B,CACzC,GAAG,SAAS,EAAE,aAAa,CAAC,mCAAmC,CAAC,GAC/D,2BAA2B,CAQ7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"compose-frontend-app-providers.js","sourceRoot":"","sources":["../../../../src/app/compose-frontend-app-providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,uBAAuB,EAC9B,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC;AAY9C,MAAM,UAAU,2BAA2B,CACzC,GAAG,SAA6D;IAEhE,MAAM,QAAQ,GAAG,uBAAuB,CACtC,aAAa,EACb,SAAS,CACV,CAAC;IACF,wFAAwF;IACxF,2BAA2B,CAAC,aAAa,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACtE,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["/**\n * `composeFrontendAppProviders` — frontend-app-facet wrapper around the\n * 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 { FrontendAppProviderModule } from './frontend-app-provider-module.types';\nimport type {\n FrontendAppProviderRef,\n FrontendAppProviderRegistry,\n} from './frontend-app-provider-registry.types';\n\nexport interface FrontendAppProviderRegistryFragment {\n readonly modules: ReadonlyMap<FrontendAppProviderRef, FrontendAppProviderModule>;\n}\n\nexport function composeFrontendAppProviders(\n ...fragments: ReadonlyArray<FrontendAppProviderRegistryFragment>\n): FrontendAppProviderRegistry {\n const registry = composeProviderRegistry<FrontendAppProviderRef, FrontendAppProviderModule>(\n 'FrontendApp',\n fragments,\n );\n // #328 — the tier rule holds on every facet: a CATALOGUE provider binds no engine slot.\n assertProviderTierCoherence('FrontendApp', registry.modules.values());\n return registry;\n}\n"]}
1
+ {"version":3,"file":"compose-frontend-app-providers.js","sourceRoot":"","sources":["../../../src/app/compose-frontend-app-providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,uBAAuB,EAC9B,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC;AAY9C,MAAM,UAAU,2BAA2B,CACzC,GAAG,SAA6D;IAEhE,MAAM,QAAQ,GAAG,uBAAuB,CACtC,aAAa,EACb,SAAS,CACV,CAAC;IACF,wFAAwF;IACxF,2BAA2B,CAAC,aAAa,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACtE,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["/**\n * `composeFrontendAppProviders` — frontend-app-facet wrapper around the\n * 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 { FrontendAppProviderModule } from './frontend-app-provider-module.types';\nimport type {\n FrontendAppProviderRef,\n FrontendAppProviderRegistry,\n} from './frontend-app-provider-registry.types';\n\nexport interface FrontendAppProviderRegistryFragment {\n readonly modules: ReadonlyMap<FrontendAppProviderRef, FrontendAppProviderModule>;\n}\n\nexport function composeFrontendAppProviders(\n ...fragments: ReadonlyArray<FrontendAppProviderRegistryFragment>\n): FrontendAppProviderRegistry {\n const registry = composeProviderRegistry<FrontendAppProviderRef, FrontendAppProviderModule>(\n 'FrontendApp',\n fragments,\n );\n // #328 — the tier rule holds on every facet: a CATALOGUE provider binds no engine slot.\n assertProviderTierCoherence('FrontendApp', registry.modules.values());\n return registry;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"compose-hydrated-frontend-app-providers.d.ts","sourceRoot":"","sources":["../../../../src/app/compose-hydrated-frontend-app-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,KAAK,EAEV,2BAA2B,EAC5B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,sCAAsC,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC;AAE9F;;;GAGG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,6BAA6B,CAAC,yBAAyB,CAAC,GAC9D,2BAA2B,CAsB7B"}
1
+ {"version":3,"file":"compose-hydrated-frontend-app-providers.d.ts","sourceRoot":"","sources":["../../../src/app/compose-hydrated-frontend-app-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,KAAK,EAEV,2BAA2B,EAC5B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,sCAAsC,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC;AAE9F;;;GAGG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,6BAA6B,CAAC,yBAAyB,CAAC,GAC9D,2BAA2B,CAsB7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"compose-hydrated-frontend-app-providers.js","sourceRoot":"","sources":["../../../../src/app/compose-hydrated-frontend-app-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EACL,8BAA8B,GAE/B,MAAM,sCAAsC,CAAC;AAc9C;;;GAGG;AACH,MAAM,UAAU,mCAAmC,CACjD,KAA+D;IAE/D,MAAM,QAAQ,GAAG,8BAA8B,CAA4B,KAAK,CAAC,CAAC;IAClF,MAAM,OAAO,GAAG,IAAI,GAAG,CACrB,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;QACnC,GAA6B;QAC7B;YACE,GAAG,MAAM;YACT,kEAAkE;YAClE,uEAAuE;YACvE,uEAAuE;YACvE,wEAAwE;YACxE,sEAAsE;YACtE,wEAAwE;YACxE,gFAAgF;YAChF,mEAAmE;YACnE,6CAA6C;YAC7C,oBAAoB,EAAE,MAAM,CAAC,oBAAyD;YACtF,SAAS,EAAE,MAAM,CAAC,SAA4C;SAC/D;KACF,CAAC,CACH,CAAC;IACF,OAAO,2BAA2B,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC","sourcesContent":["/**\n * Hydration for the main SaaS-app frontend facet: the DATA channel joined with the\n * CODE channel, composed into the same registry every consumer already reads.\n *\n * `composeFrontendAppProviders` (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 { FrontendAppProviderModule } from './frontend-app-provider-module.types';\nimport type {\n FrontendAppProviderRef,\n FrontendAppProviderRegistry,\n} from './frontend-app-provider-registry.types';\nimport { composeFrontendAppProviders } from './compose-frontend-app-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 * main SaaS-app frontend 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 GeneratedAppProviderModules = Readonly<Record<string, FrontendAppProviderModule>>;\n\n/**\n * Joins the served provider entries with the bundle's generated modules and\n * composes the result.\n */\nexport function composeHydratedFrontendAppProviders(\n input: HydrateFrontendProvidersInput<FrontendAppProviderModule>,\n): FrontendAppProviderRegistry {\n const hydrated = hydrateFrontendProviderModules<FrontendAppProviderModule>(input);\n const modules = new Map<FrontendAppProviderRef, FrontendAppProviderModule>(\n [...hydrated].map(([ref, module]) => [\n ref as FrontendAppProviderRef,\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: `composeFrontendAppProviders` 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 composeFrontendAppProviders({ modules });\n}\n"]}
1
+ {"version":3,"file":"compose-hydrated-frontend-app-providers.js","sourceRoot":"","sources":["../../../src/app/compose-hydrated-frontend-app-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EACL,8BAA8B,GAE/B,MAAM,sCAAsC,CAAC;AAc9C;;;GAGG;AACH,MAAM,UAAU,mCAAmC,CACjD,KAA+D;IAE/D,MAAM,QAAQ,GAAG,8BAA8B,CAA4B,KAAK,CAAC,CAAC;IAClF,MAAM,OAAO,GAAG,IAAI,GAAG,CACrB,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;QACnC,GAA6B;QAC7B;YACE,GAAG,MAAM;YACT,kEAAkE;YAClE,uEAAuE;YACvE,uEAAuE;YACvE,wEAAwE;YACxE,sEAAsE;YACtE,wEAAwE;YACxE,gFAAgF;YAChF,mEAAmE;YACnE,6CAA6C;YAC7C,oBAAoB,EAAE,MAAM,CAAC,oBAAyD;YACtF,SAAS,EAAE,MAAM,CAAC,SAA4C;SAC/D;KACF,CAAC,CACH,CAAC;IACF,OAAO,2BAA2B,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC","sourcesContent":["/**\n * Hydration for the main SaaS-app frontend facet: the DATA channel joined with the\n * CODE channel, composed into the same registry every consumer already reads.\n *\n * `composeFrontendAppProviders` (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 { FrontendAppProviderModule } from './frontend-app-provider-module.types';\nimport type {\n FrontendAppProviderRef,\n FrontendAppProviderRegistry,\n} from './frontend-app-provider-registry.types';\nimport { composeFrontendAppProviders } from './compose-frontend-app-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 * main SaaS-app frontend 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 GeneratedAppProviderModules = Readonly<Record<string, FrontendAppProviderModule>>;\n\n/**\n * Joins the served provider entries with the bundle's generated modules and\n * composes the result.\n */\nexport function composeHydratedFrontendAppProviders(\n input: HydrateFrontendProvidersInput<FrontendAppProviderModule>,\n): FrontendAppProviderRegistry {\n const hydrated = hydrateFrontendProviderModules<FrontendAppProviderModule>(input);\n const modules = new Map<FrontendAppProviderRef, FrontendAppProviderModule>(\n [...hydrated].map(([ref, module]) => [\n ref as FrontendAppProviderRef,\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: `composeFrontendAppProviders` 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 composeFrontendAppProviders({ modules });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"engine-frontend-app-provider-registry.d.ts","sourceRoot":"","sources":["../../../../src/app/engine-frontend-app-provider-registry.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,kCAAkC,CAAC;AAY5F,eAAO,MAAM,yCAAyC,EAAE,mCAOvD,CAAC;AAEF,eAAO,MAAM,iCAAiC,8EAE7C,CAAC"}
1
+ {"version":3,"file":"engine-frontend-app-provider-registry.d.ts","sourceRoot":"","sources":["../../../src/app/engine-frontend-app-provider-registry.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,kCAAkC,CAAC;AAc5F,eAAO,MAAM,yCAAyC,EAAE,mCAOvD,CAAC;AAEF,eAAO,MAAM,iCAAiC,8EAE7C,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import { AppleFrontendAppProvider } from '../providers/apple/index.js';
2
2
  import { GitHubFrontendAppProvider } from '../providers/github/index.js';
3
3
  import { GoogleFrontendAppProvider } from '../providers/google/index.js';
4
+ import { GoogleDriveFrontendAppProvider } from '../providers/google-drive/index.js';
4
5
  import { MicrosoftFrontendAppProvider } from '../providers/microsoft/index.js';
6
+ import { MicrosoftOneDriveFrontendAppProvider } from '../providers/microsoft-onedrive/index.js';
5
7
  // The owning source directly — see the note in the website registry: a barrel exporting
6
8
  // both of Sentry's surface modules would put the website module in this app bundle.
7
9
  import { SentryFrontendAppProvider } from '../providers/sentry/sentry.frontend-app.module.js';
@@ -11,7 +13,9 @@ const frontendAppProviders = [
11
13
  AppleFrontendAppProvider,
12
14
  GitHubFrontendAppProvider,
13
15
  GoogleFrontendAppProvider,
16
+ GoogleDriveFrontendAppProvider,
14
17
  MicrosoftFrontendAppProvider,
18
+ MicrosoftOneDriveFrontendAppProvider,
15
19
  SentryFrontendAppProvider,
16
20
  StripeFrontendAppProvider,
17
21
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"engine-frontend-app-provider-registry.js","sourceRoot":"","sources":["../../../../src/app/engine-frontend-app-provider-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AACtE,wFAAwF;AACxF,oFAAoF;AACpF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAI/E,MAAM,oBAAoB,GAAG;IAC3B,wBAAwB;IACxB,yBAAyB;IACzB,yBAAyB;IACzB,4BAA4B;IAC5B,yBAAyB;IACzB,yBAAyB;CACjB,CAAC;AAEX,MAAM,CAAC,MAAM,yCAAyC,GAAwC;IAC5F,OAAO,EAAE,IAAI,GAAG,CACd,oBAAoB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;QACrC,QAAQ,CAAC,QAAQ,CAAC,GAA6B;QAC/C,QAAQ;KACT,CAAC,CACH;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,2BAA2B,CAC1E,yCAAyC,CAC1C,CAAC","sourcesContent":["import { AppleFrontendAppProvider } from '../providers/apple';\nimport { GitHubFrontendAppProvider } from '../providers/github';\nimport { GoogleFrontendAppProvider } from '../providers/google';\nimport { MicrosoftFrontendAppProvider } from '../providers/microsoft';\n// The owning source directly — see the note in the website registry: a barrel exporting\n// both of Sentry's surface modules would put the website module in this app bundle.\nimport { SentryFrontendAppProvider } from '../providers/sentry/sentry.frontend-app.module';\nimport { StripeFrontendAppProvider } from '../providers/stripe';\n\nimport { composeFrontendAppProviders } from './compose-frontend-app-providers';\nimport type { FrontendAppProviderRegistryFragment } from './compose-frontend-app-providers';\nimport type { FrontendAppProviderRef } from './frontend-app-provider-registry.types';\n\nconst frontendAppProviders = [\n AppleFrontendAppProvider,\n GitHubFrontendAppProvider,\n GoogleFrontendAppProvider,\n MicrosoftFrontendAppProvider,\n SentryFrontendAppProvider,\n StripeFrontendAppProvider,\n] as const;\n\nexport const EngineFrontendAppProviderRegistryFragment: FrontendAppProviderRegistryFragment = {\n modules: new Map(\n frontendAppProviders.map((provider) => [\n provider.metadata.ref as FrontendAppProviderRef,\n provider,\n ]),\n ),\n};\n\nexport const EngineFrontendAppProviderRegistry = composeFrontendAppProviders(\n EngineFrontendAppProviderRegistryFragment,\n);\n"]}
1
+ {"version":3,"file":"engine-frontend-app-provider-registry.js","sourceRoot":"","sources":["../../../src/app/engine-frontend-app-provider-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,oCAAoC,EAAE,MAAM,iCAAiC,CAAC;AACvF,wFAAwF;AACxF,oFAAoF;AACpF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAI/E,MAAM,oBAAoB,GAAG;IAC3B,wBAAwB;IACxB,yBAAyB;IACzB,yBAAyB;IACzB,8BAA8B;IAC9B,4BAA4B;IAC5B,oCAAoC;IACpC,yBAAyB;IACzB,yBAAyB;CACjB,CAAC;AAEX,MAAM,CAAC,MAAM,yCAAyC,GAAwC;IAC5F,OAAO,EAAE,IAAI,GAAG,CACd,oBAAoB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;QACrC,QAAQ,CAAC,QAAQ,CAAC,GAA6B;QAC/C,QAAQ;KACT,CAAC,CACH;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,2BAA2B,CAC1E,yCAAyC,CAC1C,CAAC","sourcesContent":["import { AppleFrontendAppProvider } from '../providers/apple';\nimport { GitHubFrontendAppProvider } from '../providers/github';\nimport { GoogleFrontendAppProvider } from '../providers/google';\nimport { GoogleDriveFrontendAppProvider } from '../providers/google-drive';\nimport { MicrosoftFrontendAppProvider } from '../providers/microsoft';\nimport { MicrosoftOneDriveFrontendAppProvider } from '../providers/microsoft-onedrive';\n// The owning source directly — see the note in the website registry: a barrel exporting\n// both of Sentry's surface modules would put the website module in this app bundle.\nimport { SentryFrontendAppProvider } from '../providers/sentry/sentry.frontend-app.module';\nimport { StripeFrontendAppProvider } from '../providers/stripe';\n\nimport { composeFrontendAppProviders } from './compose-frontend-app-providers';\nimport type { FrontendAppProviderRegistryFragment } from './compose-frontend-app-providers';\nimport type { FrontendAppProviderRef } from './frontend-app-provider-registry.types';\n\nconst frontendAppProviders = [\n AppleFrontendAppProvider,\n GitHubFrontendAppProvider,\n GoogleFrontendAppProvider,\n GoogleDriveFrontendAppProvider,\n MicrosoftFrontendAppProvider,\n MicrosoftOneDriveFrontendAppProvider,\n SentryFrontendAppProvider,\n StripeFrontendAppProvider,\n] as const;\n\nexport const EngineFrontendAppProviderRegistryFragment: FrontendAppProviderRegistryFragment = {\n modules: new Map(\n frontendAppProviders.map((provider) => [\n provider.metadata.ref as FrontendAppProviderRef,\n provider,\n ]),\n ),\n};\n\nexport const EngineFrontendAppProviderRegistry = composeFrontendAppProviders(\n EngineFrontendAppProviderRegistryFragment,\n);\n"]}
@@ -20,7 +20,7 @@
20
20
  * those keys through the app i18n service at render time. Do not freeze
21
21
  * localized button labels or provider names into `publicConfig`.
22
22
  */
23
- import type { ProviderComplianceProfile } from '@wildo-ai/saas-models/public-runtime';
23
+ import type { FileStorageAccepted, ProviderComplianceProfile } from '@wildo-ai/saas-models/public-runtime';
24
24
  import type { ProviderFrontendCspFootprintDeclaration, ProviderFrontendScriptDeclaration, ProviderMetadata, ProviderCapability, ProviderProtocol } from '@wildo-ai/saas-models/public-runtime';
25
25
  import type { ProviderFrontendComponents, ProviderFrontendPublicConfigSchema, ProviderFrontendSdk } from '../shared/frontend-provider-surface.types';
26
26
  /** @wildo_source:part:start external-connectors.app.frontend-provider-module facet:layer:frontend facet:family:provider */
@@ -133,6 +133,19 @@ export interface FrontendAppProviderModule {
133
133
  * index first.
134
134
  */
135
135
  components?: ProviderFrontendComponents;
136
+ /**
137
+ * The `z_file` storage this provider's file picker fronts (#394 P5). Declare
138
+ * it when the picker delivers a `REMOTE_REFERENCE`: the bytes stay at the
139
+ * vendor, so the FILES row lands in this storage and only a field whose
140
+ * `storageAccepted` names it may receive the link. Leave it undeclared for a
141
+ * picker that delivers bytes — those are ingested into the field's own
142
+ * storage and offered to every field.
143
+ *
144
+ * The backend serves the same storage through an `IFileStorageProvider`
145
+ * keyed by this member that names this provider back as its
146
+ * `connectedProviderRef`; the framework pins the two declarations equal.
147
+ */
148
+ fileStorage?: FileStorageAccepted;
136
149
  /**
137
150
  * Validator for this provider's own `publicConfig`, as a Standard Schema v1
138
151
  * value (a Zod 4 schema satisfies it as-is).
@@ -1 +1 @@
1
- {"version":3,"file":"frontend-app-provider-module.types.d.ts","sourceRoot":"","sources":["../../../../src/app/frontend-app-provider-module.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;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,2HAA2H;AAC3H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,oBAAoB,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACxD,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC3C;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,GAAG,CAAC,EAAE,uCAAuC,CAAC;IAC9C;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,iCAAiC,CAAC,CAAC;IAC3D;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,mBAAmB,CAAC;IAC1B;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,kCAAkC,CAAC;IACxD;;;;;;;;;;;;;;;;;OAiBG;IACH,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;CAC/C;AACD,8EAA8E"}
1
+ {"version":3,"file":"frontend-app-provider-module.types.d.ts","sourceRoot":"","sources":["../../../src/app/frontend-app-provider-module.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAE3G,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,2HAA2H;AAC3H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,oBAAoB,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACxD,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC3C;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,GAAG,CAAC,EAAE,uCAAuC,CAAC;IAC9C;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,iCAAiC,CAAC,CAAC;IAC3D;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,mBAAmB,CAAC;IAC1B;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,kCAAkC,CAAC;IACxD;;;;;;;;;;;;;;;;;OAiBG;IACH,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;CAC/C;AACD,8EAA8E"}
@@ -1 +1 @@
1
- {"version":3,"file":"frontend-app-provider-module.types.js","sourceRoot":"","sources":["../../../../src/app/frontend-app-provider-module.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AA8JH,8EAA8E","sourcesContent":["/**\n * `FrontendAppProviderModule` — browser-bound facet of a provider for\n * the main SaaS-app frontend (`AppFrontendType.SAAS_APP`).\n *\n * Intentionally HOLDS NO SECRETS — this type lives in\n * `@wildo-ai/external-connectors-public/app`, the browser-bound side\n * of the trust-zone split.\n *\n * The module is the CODE half of a provider's frontend surface. Its DATA half\n * is `FrontendProviderEntry`, hydrated on first paint via\n * `FrontendAppBootstrapPayload.frontendProviders`; the two are joined at\n * runtime by `composeHydratedFrontendAppProviders` rather than one being cast\n * to the other.\n *\n * The `publicConfig` slice is the only place public configuration flows\n * to the frontend (e.g. Stripe publishable keys, OAuth client IDs).\n *\n * I18n ownership stays at the consuming frontend surface: provider modules\n * export translation-ready keys on `metadata`, while React/UI code resolves\n * those keys through the app i18n service at render time. Do not freeze\n * localized button labels or provider names into `publicConfig`.\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\n/** @wildo_source:part:start external-connectors.app.frontend-provider-module facet:layer:frontend facet:family:provider */\n/**\n * The browser-bound provider module an application authors for its main\n * SaaS-app frontend.\n *\n * Import from `@wildo-ai/external-connectors-public/app`. The module is a\n * plain object — no class, no registration call: the app re-exports it\n * through its `./frontend-providers` package entry and appends a matching\n * companion contribution; the framework joins it with the provider's hydrated\n * entry on first paint.\n *\n * NEVER put a secret in this object — it ships to the browser. `publicConfig`\n * is the only channel for public runtime configuration (publishable keys,\n * client IDs, picker constraints). Author `metadata` ONLY through\n * `defineProviderMetadata({ ref, packageName, tier, origin })` (#328): it\n * derives the translation-ready display-name key and records the provider's\n * identity — package, tier (an application-owned file picker is CATALOGUE: it\n * binds no engine slot), vendor and origin. Never a frozen localized string,\n * never a hand-written identity.\n *\n * ## Two channels, and which fields ride which\n *\n * `metadata`, `providerCapabilities`, `protocols`, `publicConfig`, `csp` and\n * `scripts` are DATA: they are projected onto the provider's entry, travel as\n * JSON, and are what the CLI reads when it composes the service's\n * Content-Security-Policy — it cannot execute this module, because it is a Node\n * process and this module is browser-bound.\n *\n * `sdk.activate` and `publicConfigSchema` are CODE. They reach a bundle only\n * because the bundle imports this module, through the generated\n * `frontend-providers.generated.ts` that `wildo config sync` writes for each\n * frontend service. They are never serialized; a JSON channel would drop them\n * without a word.\n *\n * A worked module declaring every field is in\n * `frontend-app-provider.example.ts`, beside this file. It lives there rather\n * than in an `@example` block here because the package's typecheck compiles it:\n * the inline version shipped for a session showing three of the CSP footprint's\n * six buckets while the type required all six, and nothing caught it.\n */\nexport interface FrontendAppProviderModule {\n metadata: ProviderMetadata;\n providerCapabilities: ReadonlyArray<ProviderCapability>;\n protocols: ReadonlyArray<ProviderProtocol>;\n /**\n * Public configuration the frontend needs at runtime. Strongly typed\n * via per-providerCapability shapes downstream — the registry stores\n * them as `unknown` so the registry shape stays stable across apps\n * that augment provider capabilities. Declare `publicConfigSchema`\n * beside it to have the framework validate it once, at hydration,\n * instead of each use site coercing it by hand.\n */\n publicConfig?: Readonly<Record<string, unknown>>;\n /**\n * Origins this provider needs the SaaS app'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. Declaring it here is what\n * removes the alternative — hand-editing script / frame / connect origins in\n * every application's config, for every environment.\n *\n * Name only the buckets you reach; the framework fills in the rest. For an\n * endpoint you CANNOT know — one the application configures, such as a\n * monitoring DSN, an analytics host, a self-hosted deployment — declare where\n * it lives instead of guessing what it is:\n *\n * ```ts\n * csp: {\n * derivedOrigins: [\n * { publicConfigKey: 'dsn', bucket: ProviderFrontendCspOriginBucket.CONNECT },\n * ],\n * }\n * ```\n *\n * The framework reads that key out of your own `publicConfig` and takes its\n * URL origin. That is what stops an application authoring the same host twice\n * — once as your configuration, once in its CSP — where the copy that drifts\n * fails only in production, because development is report-only.\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.\n *\n * DATA. Each declared `src`'s origin MUST also appear in `csp.scriptOrigins`\n * — `projectFrontendProviderContribution` refuses the provider otherwise,\n * because the policy it contributes to would block its own script, and only\n * where CSP enforces, so the failure would first appear in 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).\n *\n * `activate` must reach its package through a DYNAMIC `import()`, so the SDK\n * is a separate chunk and no page pays for a provider it does not use.\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).\n *\n * CODE, and the answer to a real defect: `publicConfig` is\n * `Record<string, unknown>`, and each consuming site was coercing it by hand,\n * so a renamed key yielded `undefined` and a silently wrong provider. With a\n * schema declared, the framework validates once at hydration and a mismatch\n * says which key and why.\n */\n publicConfigSchema?: ProviderFrontendPublicConfigSchema;\n /**\n * The vendor's deployment model, processing regions and legal entity — the primitives a\n * processor register and a transfer statement are derived from.\n *\n * OPTIONAL, matching the backend contract, because a provider whose author has not stated them\n * must still load. Absent means the APPLICATION has to declare them on its own register entry,\n * where its contract with the vendor makes them checkable.\n *\n * Why a FRONTEND provider needs this at least as much as a backend one (#345): this module\n * executes in the DATA SUBJECT'S BROWSER. It loads third-party script, may set storage, and\n * talks to the vendor directly — the application's backend never sees the call. Product\n * analytics, error monitoring, a captcha and a payment element are precisely the third-party\n * recipients a privacy notice has to name, and the operator controls them LESS than a backend\n * provider routed through their own infrastructure.\n *\n * See `ProviderComplianceProfileSchema` for each field's meaning and for the refusal that a\n * `VENDOR_HOSTED` provider declaring no region cannot support a transfer statement.\n */\n complianceProfile?: ProviderComplianceProfile;\n}\n/** @wildo_source:part:end external-connectors.app.frontend-provider-module */\n"]}
1
+ {"version":3,"file":"frontend-app-provider-module.types.js","sourceRoot":"","sources":["../../../src/app/frontend-app-provider-module.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AA2KH,8EAA8E","sourcesContent":["/**\n * `FrontendAppProviderModule` — browser-bound facet of a provider for\n * the main SaaS-app frontend (`AppFrontendType.SAAS_APP`).\n *\n * Intentionally HOLDS NO SECRETS — this type lives in\n * `@wildo-ai/external-connectors-public/app`, the browser-bound side\n * of the trust-zone split.\n *\n * The module is the CODE half of a provider's frontend surface. Its DATA half\n * is `FrontendProviderEntry`, hydrated on first paint via\n * `FrontendAppBootstrapPayload.frontendProviders`; the two are joined at\n * runtime by `composeHydratedFrontendAppProviders` rather than one being cast\n * to the other.\n *\n * The `publicConfig` slice is the only place public configuration flows\n * to the frontend (e.g. Stripe publishable keys, OAuth client IDs).\n *\n * I18n ownership stays at the consuming frontend surface: provider modules\n * export translation-ready keys on `metadata`, while React/UI code resolves\n * those keys through the app i18n service at render time. Do not freeze\n * localized button labels or provider names into `publicConfig`.\n */\n\nimport type { FileStorageAccepted, 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\n/** @wildo_source:part:start external-connectors.app.frontend-provider-module facet:layer:frontend facet:family:provider */\n/**\n * The browser-bound provider module an application authors for its main\n * SaaS-app frontend.\n *\n * Import from `@wildo-ai/external-connectors-public/app`. The module is a\n * plain object — no class, no registration call: the app re-exports it\n * through its `./frontend-providers` package entry and appends a matching\n * companion contribution; the framework joins it with the provider's hydrated\n * entry on first paint.\n *\n * NEVER put a secret in this object — it ships to the browser. `publicConfig`\n * is the only channel for public runtime configuration (publishable keys,\n * client IDs, picker constraints). Author `metadata` ONLY through\n * `defineProviderMetadata({ ref, packageName, tier, origin })` (#328): it\n * derives the translation-ready display-name key and records the provider's\n * identity — package, tier (an application-owned file picker is CATALOGUE: it\n * binds no engine slot), vendor and origin. Never a frozen localized string,\n * never a hand-written identity.\n *\n * ## Two channels, and which fields ride which\n *\n * `metadata`, `providerCapabilities`, `protocols`, `publicConfig`, `csp` and\n * `scripts` are DATA: they are projected onto the provider's entry, travel as\n * JSON, and are what the CLI reads when it composes the service's\n * Content-Security-Policy — it cannot execute this module, because it is a Node\n * process and this module is browser-bound.\n *\n * `sdk.activate` and `publicConfigSchema` are CODE. They reach a bundle only\n * because the bundle imports this module, through the generated\n * `frontend-providers.generated.ts` that `wildo config sync` writes for each\n * frontend service. They are never serialized; a JSON channel would drop them\n * without a word.\n *\n * A worked module declaring every field is in\n * `frontend-app-provider.example.ts`, beside this file. It lives there rather\n * than in an `@example` block here because the package's typecheck compiles it:\n * the inline version shipped for a session showing three of the CSP footprint's\n * six buckets while the type required all six, and nothing caught it.\n */\nexport interface FrontendAppProviderModule {\n metadata: ProviderMetadata;\n providerCapabilities: ReadonlyArray<ProviderCapability>;\n protocols: ReadonlyArray<ProviderProtocol>;\n /**\n * Public configuration the frontend needs at runtime. Strongly typed\n * via per-providerCapability shapes downstream — the registry stores\n * them as `unknown` so the registry shape stays stable across apps\n * that augment provider capabilities. Declare `publicConfigSchema`\n * beside it to have the framework validate it once, at hydration,\n * instead of each use site coercing it by hand.\n */\n publicConfig?: Readonly<Record<string, unknown>>;\n /**\n * Origins this provider needs the SaaS app'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. Declaring it here is what\n * removes the alternative — hand-editing script / frame / connect origins in\n * every application's config, for every environment.\n *\n * Name only the buckets you reach; the framework fills in the rest. For an\n * endpoint you CANNOT know — one the application configures, such as a\n * monitoring DSN, an analytics host, a self-hosted deployment — declare where\n * it lives instead of guessing what it is:\n *\n * ```ts\n * csp: {\n * derivedOrigins: [\n * { publicConfigKey: 'dsn', bucket: ProviderFrontendCspOriginBucket.CONNECT },\n * ],\n * }\n * ```\n *\n * The framework reads that key out of your own `publicConfig` and takes its\n * URL origin. That is what stops an application authoring the same host twice\n * — once as your configuration, once in its CSP — where the copy that drifts\n * fails only in production, because development is report-only.\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.\n *\n * DATA. Each declared `src`'s origin MUST also appear in `csp.scriptOrigins`\n * — `projectFrontendProviderContribution` refuses the provider otherwise,\n * because the policy it contributes to would block its own script, and only\n * where CSP enforces, so the failure would first appear in 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).\n *\n * `activate` must reach its package through a DYNAMIC `import()`, so the SDK\n * is a separate chunk and no page pays for a provider it does not use.\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 * The `z_file` storage this provider's file picker fronts (#394 P5). Declare\n * it when the picker delivers a `REMOTE_REFERENCE`: the bytes stay at the\n * vendor, so the FILES row lands in this storage and only a field whose\n * `storageAccepted` names it may receive the link. Leave it undeclared for a\n * picker that delivers bytes — those are ingested into the field's own\n * storage and offered to every field.\n *\n * The backend serves the same storage through an `IFileStorageProvider`\n * keyed by this member that names this provider back as its\n * `connectedProviderRef`; the framework pins the two declarations equal.\n */\n fileStorage?: FileStorageAccepted;\n /**\n * Validator for this provider's own `publicConfig`, as a Standard Schema v1\n * value (a Zod 4 schema satisfies it as-is).\n *\n * CODE, and the answer to a real defect: `publicConfig` is\n * `Record<string, unknown>`, and each consuming site was coercing it by hand,\n * so a renamed key yielded `undefined` and a silently wrong provider. With a\n * schema declared, the framework validates once at hydration and a mismatch\n * says which key and why.\n */\n publicConfigSchema?: ProviderFrontendPublicConfigSchema;\n /**\n * The vendor's deployment model, processing regions and legal entity — the primitives a\n * processor register and a transfer statement are derived from.\n *\n * OPTIONAL, matching the backend contract, because a provider whose author has not stated them\n * must still load. Absent means the APPLICATION has to declare them on its own register entry,\n * where its contract with the vendor makes them checkable.\n *\n * Why a FRONTEND provider needs this at least as much as a backend one (#345): this module\n * executes in the DATA SUBJECT'S BROWSER. It loads third-party script, may set storage, and\n * talks to the vendor directly — the application's backend never sees the call. Product\n * analytics, error monitoring, a captcha and a payment element are precisely the third-party\n * recipients a privacy notice has to name, and the operator controls them LESS than a backend\n * provider routed through their own infrastructure.\n *\n * See `ProviderComplianceProfileSchema` for each field's meaning and for the refusal that a\n * `VENDOR_HOSTED` provider declaring no region cannot support a transfer statement.\n */\n complianceProfile?: ProviderComplianceProfile;\n}\n/** @wildo_source:part:end external-connectors.app.frontend-provider-module */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"frontend-app-provider-registry.types.d.ts","sourceRoot":"","sources":["../../../../src/app/frontend-app-provider-registry.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG;IAC5C,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC;CAC5C,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,CAAC;IAEjF,gBAAgB,CAAC,GAAG,EAAE,sBAAsB,GAAG,yBAAyB,GAAG,SAAS,CAAC;IAErF,gCAAgC,CAC9B,kBAAkB,EAAE,kBAAkB,GACrC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAE5C,gCAAgC,CAC9B,kBAAkB,EAAE,kBAAkB,GACrC,yBAAyB,GAAG,SAAS,CAAC;CAC1C"}
1
+ {"version":3,"file":"frontend-app-provider-registry.types.d.ts","sourceRoot":"","sources":["../../../src/app/frontend-app-provider-registry.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG;IAC5C,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC;CAC5C,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,CAAC;IAEjF,gBAAgB,CAAC,GAAG,EAAE,sBAAsB,GAAG,yBAAyB,GAAG,SAAS,CAAC;IAErF,gCAAgC,CAC9B,kBAAkB,EAAE,kBAAkB,GACrC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAE5C,gCAAgC,CAC9B,kBAAkB,EAAE,kBAAkB,GACrC,yBAAyB,GAAG,SAAS,CAAC;CAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC","sourcesContent":["/**\n * Public surface of `@wildo-ai/external-connectors-public/app`.\n *\n * Browser-bound, no secrets. Phase 1 wires `composeFrontendAppProviders`.\n */\n\nexport * from './frontend-app-provider-module.types';\nexport * from './frontend-app-provider-registry.types';\nexport * from './compose-frontend-app-providers';\nexport * from './engine-frontend-app-provider-registry';\nexport * from './compose-hydrated-frontend-app-providers';\nexport * from '../shared/frontend-provider-surface.types';\nexport * from '../shared/hydrate-frontend-providers';\nexport * from '../shared/activate-frontend-provider-sdks';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC","sourcesContent":["/**\n * Public surface of `@wildo-ai/external-connectors-public/app`.\n *\n * Browser-bound, no secrets. Phase 1 wires `composeFrontendAppProviders`.\n */\n\nexport * from './frontend-app-provider-module.types';\nexport * from './frontend-app-provider-registry.types';\nexport * from './compose-frontend-app-providers';\nexport * from './engine-frontend-app-provider-registry';\nexport * from './compose-hydrated-frontend-app-providers';\nexport * from '../shared/frontend-provider-surface.types';\nexport * from '../shared/hydrate-frontend-providers';\nexport * from '../shared/activate-frontend-provider-sdks';\n"]}
@@ -8,19 +8,27 @@
8
8
  * keyed to a frontend service-type via `serviceType` (closed
9
9
  * `AppFrontendType` enum).
10
10
  *
11
- * NOT auto-discovered today (do not assume this array reaches a catalog
12
- * on its own). `discoverSaasProviderCompanionContributions`
13
- * (platform-config-lib) walks ONLY the app-owned runtime packages
14
- * declared in `wildo.saas.config.ts` and reads THEIR `./companion`
15
- * `providerContributions`; it does not load this engine package. So
16
- * these arrays reach a generated `provider-catalog.types.ts` / runtime
17
- * artifact only when an app's frontend `provider-contributions.ts`
18
- * re-derives them from the same registries — which is exactly the
19
- * dogfood pattern: Wonder Todos's `app` / `website`
20
- * `provider-contributions.ts` map `EngineFrontend*ProviderRegistry.modules`
21
- * and add app-owned entries (e.g. its file-picker provider). Wiring the
22
- * discovery walker to load engine connector packages directly is a
23
- * tracked follow-up, not the current contract.
11
+ * NOT auto-discovered — and this package is now the EXCEPTION rather than the rule,
12
+ * which is the part to read carefully. `discoverSaasProviderCompanionContributions`
13
+ * (platform-config-lib) walks each runtime owner declared in `wildo.saas.config.ts`
14
+ * AND every provider package it depends on, admitting the scraped catalogue,
15
+ * `@wildo-ai/provider-*` and — since #358 — the engine's BACKEND connector package
16
+ * `@wildo-ai/external-connectors-private` by exact name. It does not admit this one.
17
+ * So these arrays reach a generated `provider-catalog.types.ts` / runtime artifact
18
+ * only when an app's frontend `provider-contributions.ts` re-derives them from the
19
+ * same registries — which is exactly the dogfood pattern: Wonder Todos's `app` /
20
+ * `website` `provider-contributions.ts` map `EngineFrontend*ProviderRegistry.modules`
21
+ * and add app-owned entries (e.g. its file-picker provider).
22
+ *
23
+ * A `frontendService` target additionally requires a `frontendEntry` payload for
24
+ * bootstrap materialization, which the discovery validator refuses without — so the
25
+ * frontend case is not merely un-admitted, it carries a payload the backend case
26
+ * has no equivalent of. Admitting this package would have to answer that first.
27
+ *
28
+ * (This paragraph used to end "Wiring the discovery walker to load engine connector
29
+ * packages directly is a tracked follow-up, not the current contract." Half of that
30
+ * shipped in #358 and the sentence did not distinguish the two packages, so it read
31
+ * as false about the backend and true here.)
24
32
  *
25
33
  * NOT for browser consumption. This module is loaded only by Node-side
26
34
  * tooling (`wildo config sync` and the `discoverSaasProviderCompanionContributions`
@@ -30,6 +38,7 @@
30
38
  */
31
39
  import { AppFrontendType, type ProviderFrontendCspFootprintDeclaration, type ProviderFrontendScriptDeclaration, type ProviderFrontendComponentDescriptor, type ProviderFrontendSdkDescriptor, type ProviderMetadata } from '@wildo-ai/saas-models/public-runtime';
32
40
  import { type ProviderCompanionContribution, type RuntimeOwnerCompanionExports } from '@wildo-ai/saas-models';
41
+ import type { FileStorageAccepted } from '@wildo-ai/saas-models/public-runtime';
33
42
  /**
34
43
  * The facet-agnostic view of a frontend provider module this projection reads.
35
44
  *
@@ -52,8 +61,10 @@ interface FrontendProviderModuleShape {
52
61
  readonly descriptor: ProviderFrontendSdkDescriptor;
53
62
  };
54
63
  components?: Readonly<Record<string, ProviderFrontendComponentDescriptor & {
55
- readonly load: unknown;
64
+ readonly load?: unknown;
56
65
  }>>;
66
+ fileStorage?: FileStorageAccepted;
67
+ publicConfigSchema?: unknown;
57
68
  }
58
69
  /**
59
70
  * Turns a frontend provider module into the companion contribution tooling
@@ -1 +1 @@
1
- {"version":3,"file":"companion-exports.d.ts","sourceRoot":"","sources":["../../../src/companion-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EACL,eAAe,EAIf,KAAK,uCAAuC,EAC5C,KAAK,iCAAiC,EACtC,KAAK,mCAAmC,EACxC,KAAK,6BAA6B,EAClC,KAAK,gBAAgB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAGL,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EAClC,MAAM,uBAAuB,CAAC;AAoC/B;;;;;;;;;;GAUG;AACH,UAAU,2BAA2B;IACnC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,oBAAoB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5C,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,GAAG,CAAC,EAAE,uCAAuC,CAAC;IAC9C,OAAO,CAAC,EAAE,aAAa,CAAC,iCAAiC,CAAC,CAAC;IAC3D,GAAG,CAAC,EAAE;QAAE,QAAQ,CAAC,UAAU,EAAE,6BAA6B,CAAA;KAAE,CAAC;IAC7D,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mCAAmC,GAAG;QAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;CACzG;AAqDD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,2BAA2B,EACnC,WAAW,EAAE,eAAe,EAC5B,iBAAiB,EAAE,MAAM,GACxB,6BAA6B,CAgD/B;AAED,6FAA6F;AAC7F,eAAO,MAAM,sCAAsC,EAAE,6BAA6B,EAG/E,CAAC;AAEJ,iGAAiG;AACjG,eAAO,MAAM,0CAA0C,EAAE,6BAA6B,EAGnF,CAAC;AAEJ,uGAAuG;AACvG,eAAO,MAAM,0CAA0C,EAAE,6BAA6B,EAGnF,CAAC;AAEJ,sGAAsG;AACtG,eAAO,MAAM,mCAAmC,EAAE,6BAA6B,EAI9E,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,EAAE,4BAEvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"companion-exports.d.ts","sourceRoot":"","sources":["../../src/companion-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EACL,eAAe,EAIf,KAAK,uCAAuC,EAC5C,KAAK,iCAAiC,EACtC,KAAK,mCAAmC,EACxC,KAAK,6BAA6B,EAClC,KAAK,gBAAgB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAGL,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EAClC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAoChF;;;;;;;;;;GAUG;AACH,UAAU,2BAA2B;IACnC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,oBAAoB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5C,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,GAAG,CAAC,EAAE,uCAAuC,CAAC;IAC9C,OAAO,CAAC,EAAE,aAAa,CAAC,iCAAiC,CAAC,CAAC;IAC3D,GAAG,CAAC,EAAE;QAAE,QAAQ,CAAC,UAAU,EAAE,6BAA6B,CAAA;KAAE,CAAC;IAC7D,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mCAAmC,GAAG;QAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;IACzG,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAqDD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,2BAA2B,EACnC,WAAW,EAAE,eAAe,EAC5B,iBAAiB,EAAE,MAAM,GACxB,6BAA6B,CAyD/B;AAED,6FAA6F;AAC7F,eAAO,MAAM,sCAAsC,EAAE,6BAA6B,EAG/E,CAAC;AAEJ,iGAAiG;AACjG,eAAO,MAAM,0CAA0C,EAAE,6BAA6B,EAGnF,CAAC;AAEJ,uGAAuG;AACvG,eAAO,MAAM,0CAA0C,EAAE,6BAA6B,EAGnF,CAAC;AAEJ,sGAAsG;AACtG,eAAO,MAAM,mCAAmC,EAAE,6BAA6B,EAI9E,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,EAAE,4BAEvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -8,19 +8,27 @@
8
8
  * keyed to a frontend service-type via `serviceType` (closed
9
9
  * `AppFrontendType` enum).
10
10
  *
11
- * NOT auto-discovered today (do not assume this array reaches a catalog
12
- * on its own). `discoverSaasProviderCompanionContributions`
13
- * (platform-config-lib) walks ONLY the app-owned runtime packages
14
- * declared in `wildo.saas.config.ts` and reads THEIR `./companion`
15
- * `providerContributions`; it does not load this engine package. So
16
- * these arrays reach a generated `provider-catalog.types.ts` / runtime
17
- * artifact only when an app's frontend `provider-contributions.ts`
18
- * re-derives them from the same registries — which is exactly the
19
- * dogfood pattern: Wonder Todos's `app` / `website`
20
- * `provider-contributions.ts` map `EngineFrontend*ProviderRegistry.modules`
21
- * and add app-owned entries (e.g. its file-picker provider). Wiring the
22
- * discovery walker to load engine connector packages directly is a
23
- * tracked follow-up, not the current contract.
11
+ * NOT auto-discovered — and this package is now the EXCEPTION rather than the rule,
12
+ * which is the part to read carefully. `discoverSaasProviderCompanionContributions`
13
+ * (platform-config-lib) walks each runtime owner declared in `wildo.saas.config.ts`
14
+ * AND every provider package it depends on, admitting the scraped catalogue,
15
+ * `@wildo-ai/provider-*` and — since #358 — the engine's BACKEND connector package
16
+ * `@wildo-ai/external-connectors-private` by exact name. It does not admit this one.
17
+ * So these arrays reach a generated `provider-catalog.types.ts` / runtime artifact
18
+ * only when an app's frontend `provider-contributions.ts` re-derives them from the
19
+ * same registries — which is exactly the dogfood pattern: Wonder Todos's `app` /
20
+ * `website` `provider-contributions.ts` map `EngineFrontend*ProviderRegistry.modules`
21
+ * and add app-owned entries (e.g. its file-picker provider).
22
+ *
23
+ * A `frontendService` target additionally requires a `frontendEntry` payload for
24
+ * bootstrap materialization, which the discovery validator refuses without — so the
25
+ * frontend case is not merely un-admitted, it carries a payload the backend case
26
+ * has no equivalent of. Admitting this package would have to answer that first.
27
+ *
28
+ * (This paragraph used to end "Wiring the discovery walker to load engine connector
29
+ * packages directly is a tracked follow-up, not the current contract." Half of that
30
+ * shipped in #358 and the sentence did not distinguish the two packages, so it read
31
+ * as false about the backend and true here.)
24
32
  *
25
33
  * NOT for browser consumption. This module is loaded only by Node-side
26
34
  * tooling (`wildo config sync` and the `discoverSaasProviderCompanionContributions`
@@ -30,6 +38,7 @@
30
38
  */
31
39
  import { AppFrontendType, normalizeProviderFrontendCspFootprint, } from '@wildo-ai/saas-models/public-runtime';
32
40
  import { PROVIDER_CAPABILITY_TO_ENGINE_CAPABILITY, } from '@wildo-ai/saas-models';
41
+ import { readDeclaredPublicConfigKeys } from '@wildo-ai/saas-models/public-runtime';
33
42
  import { projectFrontendComponentDescriptors } from './shared/frontend-provider-surface.types.js';
34
43
  import { EngineFrontendAppProviderRegistry } from './app/engine-frontend-app-provider-registry.js';
35
44
  import { EngineFrontendTechdocProviderRegistry } from './techdoc/engine-frontend-techdoc-provider-registry.js';
@@ -154,6 +163,15 @@ export function projectFrontendProviderContribution(module, serviceType, runtime
154
163
  // instead of one that crosses by default. `sdk` makes the same choice by
155
164
  // naming `descriptor`; this is the same rule where the shape is a map.
156
165
  components: projectFrontendComponentDescriptors(module.components),
166
+ // The keys the module's `publicConfigSchema` declares, as DATA (#394 P3).
167
+ // The schema itself is CODE and stays behind; this list is what lets
168
+ // `wildo config sync` refuse an application-supplied key the module never
169
+ // reads, at the moment it is typed rather than when a picker opens.
170
+ publicConfigKeys: readDeclaredPublicConfigKeys(module.publicConfigSchema)?.slice(),
171
+ // The z_file storage the picker fronts (#394 P5) — an enum member, so it
172
+ // crosses the wire as-is; the chooser filters on it and the hydration join
173
+ // compares it to the CODE side.
174
+ fileStorage: module.fileStorage,
157
175
  };
158
176
  return {
159
177
  ref: module.metadata.ref,
@@ -1 +1 @@
1
- {"version":3,"file":"companion-exports.js","sourceRoot":"","sources":["../../../src/companion-exports.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Companion-discovery export for `@wildo-ai/external-connectors-public`.\n *\n * Surfaces the engine's three browser-safe frontend provider registries\n * (`EngineFrontendAppProviderRegistry`, `EngineFrontendTechdocProviderRegistry`,\n * `EngineFrontendWebsiteProviderRegistry`) as a single derived\n * `ProviderCompanionContribution[]`, one entry per registered module,\n * keyed to a frontend service-type via `serviceType` (closed\n * `AppFrontendType` enum).\n *\n * NOT auto-discovered today (do not assume this array reaches a catalog\n * on its own). `discoverSaasProviderCompanionContributions`\n * (platform-config-lib) walks ONLY the app-owned runtime packages\n * declared in `wildo.saas.config.ts` and reads THEIR `./companion`\n * `providerContributions`; it does not load this engine package. So\n * these arrays reach a generated `provider-catalog.types.ts` / runtime\n * artifact only when an app's frontend `provider-contributions.ts`\n * re-derives them from the same registries — which is exactly the\n * dogfood pattern: Wonder Todos's `app` / `website`\n * `provider-contributions.ts` map `EngineFrontend*ProviderRegistry.modules`\n * and add app-owned entries (e.g. its file-picker provider). Wiring the\n * discovery walker to load engine connector packages directly is a\n * tracked follow-up, not the current contract.\n *\n * NOT for browser consumption. This module is loaded only by Node-side\n * tooling (`wildo config sync` and the `discoverSaasProviderCompanionContributions`\n * walker). The package's `./app`, `./techdoc`, `./website` subpaths\n * remain the browser-shipped surface; this `./companion` subpath is\n * tooling-only.\n */\n\nimport {\n AppFrontendType,\n type BuiltinProviderCapability,\n type FrontendProviderEntry,\n normalizeProviderFrontendCspFootprint,\n type ProviderFrontendCspFootprintDeclaration,\n type ProviderFrontendScriptDeclaration,\n type ProviderFrontendComponentDescriptor,\n type ProviderFrontendSdkDescriptor,\n type ProviderMetadata,\n} from '@wildo-ai/saas-models/public-runtime';\nimport {\n EngineCapability,\n PROVIDER_CAPABILITY_TO_ENGINE_CAPABILITY,\n type ProviderCompanionContribution,\n type RuntimeOwnerCompanionExports,\n} from '@wildo-ai/saas-models';\nimport { projectFrontendComponentDescriptors } from './shared/frontend-provider-surface.types';\nimport { EngineFrontendAppProviderRegistry } from './app/engine-frontend-app-provider-registry';\nimport { EngineFrontendTechdocProviderRegistry } from './techdoc/engine-frontend-techdoc-provider-registry';\nimport { EngineFrontendWebsiteProviderRegistry } from './website/engine-frontend-website-provider-registry';\n\nconst APP_RUNTIME_IMPORT_PATH = '@wildo-ai/external-connectors-public/app';\nconst TECHDOC_RUNTIME_IMPORT_PATH = '@wildo-ai/external-connectors-public/techdoc';\nconst WEBSITE_RUNTIME_IMPORT_PATH = '@wildo-ai/external-connectors-public/website';\n\n/**\n * Projects a frontend provider's declared capabilities onto the engine\n * slots it fills, using the canonical\n * `PROVIDER_CAPABILITY_TO_ENGINE_CAPABILITY` map from\n * `@wildo-ai/saas-models` — the single source of truth shared with the\n * backend discovery export and the runtime registry projection. The map\n * is a superset of what frontend providers need: among the capabilities\n * frontend modules actually declare, only `BILLING`,\n * `FRONTEND_ERROR_MONITORING`, and `FRONTEND_PRODUCT_ANALYTICS` resolve\n * to a slot, so the map's email / SMS / LLM entries are never hit here\n * and stay inert. The other capabilities frontend modules declare —\n * `SSO_OAUTH2`, `FRONTEND_SEARCH`, `FRONTEND_CAPTCHA` — are intentionally\n * absent from the map, so those providers contribute no engine slot by\n * construction.\n */\nfunction deriveEngineCapabilities(\n providerCapabilities: ReadonlyArray<string>,\n): EngineCapability[] {\n const slots = new Set<EngineCapability>();\n for (const cap of providerCapabilities) {\n const slot = PROVIDER_CAPABILITY_TO_ENGINE_CAPABILITY[cap as BuiltinProviderCapability];\n if (slot) slots.add(slot);\n }\n return Array.from(slots);\n}\n\n/**\n * The facet-agnostic view of a frontend provider module this projection reads.\n *\n * Only the DATA half appears here, and that is the contract rather than an\n * omission: this file is loaded by NODE-side tooling (`wildo config sync` and\n * the discovery walker), which cannot execute a browser-bound module's\n * `sdk.activate` and must never try. What it CAN read is the descriptor beside\n * it — which package the SDK lives in — and that is what the bundle-isolation\n * policy, an application's dependency alignment and a human reading a bundle\n * report need.\n */\ninterface FrontendProviderModuleShape {\n metadata: ProviderMetadata;\n providerCapabilities: ReadonlyArray<string>;\n protocols: ReadonlyArray<string>;\n publicConfig?: Readonly<Record<string, unknown>>;\n csp?: ProviderFrontendCspFootprintDeclaration;\n scripts?: ReadonlyArray<ProviderFrontendScriptDeclaration>;\n sdk?: { readonly descriptor: ProviderFrontendSdkDescriptor };\n components?: Readonly<Record<string, ProviderFrontendComponentDescriptor & { readonly load: unknown }>>;\n}\n\n/**\n * Refuses a provider whose declared `<script>` origin it did not also grant\n * itself in `csp.scriptOrigins`.\n *\n * The three facet module types have carried this rule in prose since the fields\n * landed, and prose is not a check. The failure it prevents is the worst shape\n * this surface has: the provider ships, the script tag is injected, the composed\n * policy does not admit its origin, and the browser refuses it — in PRODUCTION\n * ONLY, because development is report-only. The provider looks configured, the\n * page looks fine locally, and the capability is simply absent for real users.\n *\n * Absolute rather than conditional on the application's own policy, and that is\n * the point: a provider cannot know whether the application it lands in\n * happens to allow-list its vendor, and relying on that is exactly the\n * hand-editing per app, per service, per environment that declaring a footprint\n * exists to remove. Restating an origin the app would have allowed anyway costs\n * nothing — CSP source lists are a union.\n *\n * Thrown, not reported, and only HERE. This runs where the author is: in the\n * provider package's own `./companion` barrel and in the CLI's discovery walk,\n * so `wildo config sync` fails with the provider, the script and the missing\n * origin named. The backend's fallback projection deliberately does NOT repeat\n * it — refusing there would take an application's boot down for a provider\n * authoring mistake, long after the person who could fix it has gone.\n */\nfunction assertDeclaredScriptOriginsAreGranted(module: FrontendProviderModuleShape): void {\n const declaredScriptOrigins = new Set(module.csp?.scriptOrigins ?? []);\n\n for (const script of module.scripts ?? []) {\n let origin: string;\n try {\n origin = new URL(script.src).origin;\n } catch {\n throw new Error(\n `Frontend provider \"${module.metadata.ref}\" declares a script whose src is not an absolute URL: `\n + `\"${script.src}\". A script declaration names a third-party origin, so the framework can neither `\n + 'resolve it nor grant it in the composed Content-Security-Policy.',\n );\n }\n\n if (!declaredScriptOrigins.has(origin)) {\n throw new Error(\n `Frontend provider \"${module.metadata.ref}\" declares the script \"${script.src}\" but does not list `\n + `\"${origin}\" in csp.scriptOrigins. The policy this provider contributes to would then block its own `\n + 'script — and only where CSP enforces, so the failure would first appear in production. Add the '\n + 'origin to the provider\\'s csp.scriptOrigins.',\n );\n }\n }\n}\n\n/**\n * Turns a frontend provider module into the companion contribution tooling\n * reads — the ONE place a facet module becomes a discovery record.\n *\n * Exported because the engine is not the only producer. Every\n * `@wildo-ai/provider-<ref>` package's own `./companion` barrel has to do\n * exactly this for its own facet modules, and a projection each package\n * hand-rolls is a projection that drifts: the DATA half of the frontend\n * surface would end up carried by some packages and dropped by others, and a\n * dropped CSP footprint is invisible until a provider is blocked in production.\n *\n * What crosses and what does not is the whole contract. `csp`, `scripts` and\n * the SDK DESCRIPTOR cross, because tooling has to read them without executing\n * anything — this runs in Node and a facet module is browser-bound. The\n * executable half — `sdk.activate`, `publicConfigSchema` — does NOT, and cannot:\n * the contribution is serialized to JSON on its way into the generated\n * artifact, so a function would be dropped by `JSON.stringify` with no error\n * anywhere. Code reaches a bundle through the generated\n * `frontend-providers.generated.ts` instead.\n */\nexport function projectFrontendProviderContribution(\n module: FrontendProviderModuleShape,\n serviceType: AppFrontendType,\n runtimeImportPath: string,\n): ProviderCompanionContribution {\n assertDeclaredScriptOriginsAreGranted(module);\n\n const frontendEntry: FrontendProviderEntry = {\n metadata: module.metadata,\n providerCapabilities: [...module.providerCapabilities],\n protocols: [...module.protocols],\n publicConfig: module.publicConfig,\n // The DATA half of the frontend surface (#332). It has to travel with the\n // contribution because the CSP of a service is composed by the CLI, from\n // the materialized artifact, long before any browser loads the module that\n // declares it — and the CLI cannot execute that module to ask.\n // Normalized here, once: a provider AUTHORS the buckets it reaches and the\n // wire carries all of them, so the CSP composer never branches on absence\n // and the hydration join compares two shapes of the same kind.\n csp: module.csp === undefined ? undefined : normalizeProviderFrontendCspFootprint(module.csp),\n scripts: module.scripts === undefined ? undefined : [...module.scripts],\n sdk: module.sdk?.descriptor,\n // The DATA half of each contributed component (#380). `load` is stripped\n // HERE rather than left to `JSON.stringify` to drop it: a function that\n // disappears silently on its way through a serializer is the failure this\n // whole two-channel split exists to remove, and stripping it explicitly is\n // what makes the projection's contract readable at the projection.\n //\n // Rebuilt field by field rather than spread-minus-`load`, so a future field\n // on the declaration is a COMPILE decision about whether it crosses the wire\n // instead of one that crosses by default. `sdk` makes the same choice by\n // naming `descriptor`; this is the same rule where the shape is a map.\n components: projectFrontendComponentDescriptors(module.components),\n };\n return {\n ref: module.metadata.ref,\n identity: {\n packageName: module.metadata.packageName,\n tier: module.metadata.tier,\n vendor: module.metadata.vendor,\n origin: module.metadata.origin,\n },\n runtimeImportPath,\n runtimeTargets: [{ kind: 'frontendService', serviceType }],\n engineCapabilities: deriveEngineCapabilities(module.providerCapabilities),\n providerCapabilities: [...module.providerCapabilities],\n protocols: [...module.protocols],\n // Browser-safe providers cannot own server secrets. The explicit empty\n // shape is authoritative and distinct from an unknown/missing contract.\n secretsContractShape: [],\n frontendEntry,\n };\n}\n\n/** One contribution per `EngineFrontendAppProviderRegistry` module, targeting `SAAS_APP`. */\nexport const engineFrontendAppProviderContributions: ProviderCompanionContribution[] =\n Array.from(EngineFrontendAppProviderRegistry.modules.values()).map((module) =>\n projectFrontendProviderContribution(module, AppFrontendType.SAAS_APP, APP_RUNTIME_IMPORT_PATH),\n );\n\n/** One contribution per `EngineFrontendTechdocProviderRegistry` module, targeting `TECH_DOC`. */\nexport const engineFrontendTechdocProviderContributions: ProviderCompanionContribution[] =\n Array.from(EngineFrontendTechdocProviderRegistry.modules.values()).map((module) =>\n projectFrontendProviderContribution(module, AppFrontendType.TECH_DOC, TECHDOC_RUNTIME_IMPORT_PATH),\n );\n\n/** One contribution per `EngineFrontendWebsiteProviderRegistry` module, targeting `STATIC_WEBSITE`. */\nexport const engineFrontendWebsiteProviderContributions: ProviderCompanionContribution[] =\n Array.from(EngineFrontendWebsiteProviderRegistry.modules.values()).map((module) =>\n projectFrontendProviderContribution(module, AppFrontendType.STATIC_WEBSITE, WEBSITE_RUNTIME_IMPORT_PATH),\n );\n\n/** Stable union — order: app providers, then techdoc, then website (matches the registry imports). */\nexport const engineFrontendProviderContributions: ProviderCompanionContribution[] = [\n ...engineFrontendAppProviderContributions,\n ...engineFrontendTechdocProviderContributions,\n ...engineFrontendWebsiteProviderContributions,\n];\n\n/**\n * Companion-discovery contract — see `RuntimeOwnerCompanionExports`.\n * The framework loader reads `providerContributions` via the package's\n * `./companion` subpath export.\n */\nconst companionExports: RuntimeOwnerCompanionExports = {\n providerContributions: engineFrontendProviderContributions,\n};\n\nexport default companionExports;\n"]}
1
+ {"version":3,"file":"companion-exports.js","sourceRoot":"","sources":["../../src/companion-exports.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Companion-discovery export for `@wildo-ai/external-connectors-public`.\n *\n * Surfaces the engine's three browser-safe frontend provider registries\n * (`EngineFrontendAppProviderRegistry`, `EngineFrontendTechdocProviderRegistry`,\n * `EngineFrontendWebsiteProviderRegistry`) as a single derived\n * `ProviderCompanionContribution[]`, one entry per registered module,\n * keyed to a frontend service-type via `serviceType` (closed\n * `AppFrontendType` enum).\n *\n * NOT auto-discovered — and this package is now the EXCEPTION rather than the rule,\n * which is the part to read carefully. `discoverSaasProviderCompanionContributions`\n * (platform-config-lib) walks each runtime owner declared in `wildo.saas.config.ts`\n * AND every provider package it depends on, admitting the scraped catalogue,\n * `@wildo-ai/provider-*` and — since #358 — the engine's BACKEND connector package\n * `@wildo-ai/external-connectors-private` by exact name. It does not admit this one.\n * So these arrays reach a generated `provider-catalog.types.ts` / runtime artifact\n * only when an app's frontend `provider-contributions.ts` re-derives them from the\n * same registries — which is exactly the dogfood pattern: Wonder Todos's `app` /\n * `website` `provider-contributions.ts` map `EngineFrontend*ProviderRegistry.modules`\n * and add app-owned entries (e.g. its file-picker provider).\n *\n * A `frontendService` target additionally requires a `frontendEntry` payload for\n * bootstrap materialization, which the discovery validator refuses without — so the\n * frontend case is not merely un-admitted, it carries a payload the backend case\n * has no equivalent of. Admitting this package would have to answer that first.\n *\n * (This paragraph used to end \"Wiring the discovery walker to load engine connector\n * packages directly is a tracked follow-up, not the current contract.\" Half of that\n * shipped in #358 and the sentence did not distinguish the two packages, so it read\n * as false about the backend and true here.)\n *\n * NOT for browser consumption. This module is loaded only by Node-side\n * tooling (`wildo config sync` and the `discoverSaasProviderCompanionContributions`\n * walker). The package's `./app`, `./techdoc`, `./website` subpaths\n * remain the browser-shipped surface; this `./companion` subpath is\n * tooling-only.\n */\n\nimport {\n AppFrontendType,\n type BuiltinProviderCapability,\n type FrontendProviderEntry,\n normalizeProviderFrontendCspFootprint,\n type ProviderFrontendCspFootprintDeclaration,\n type ProviderFrontendScriptDeclaration,\n type ProviderFrontendComponentDescriptor,\n type ProviderFrontendSdkDescriptor,\n type ProviderMetadata,\n} from '@wildo-ai/saas-models/public-runtime';\nimport {\n EngineCapability,\n PROVIDER_CAPABILITY_TO_ENGINE_CAPABILITY,\n type ProviderCompanionContribution,\n type RuntimeOwnerCompanionExports,\n} from '@wildo-ai/saas-models';\nimport { readDeclaredPublicConfigKeys } from '@wildo-ai/saas-models/public-runtime';\nimport type { FileStorageAccepted } from '@wildo-ai/saas-models/public-runtime';\nimport { projectFrontendComponentDescriptors } from './shared/frontend-provider-surface.types';\nimport { EngineFrontendAppProviderRegistry } from './app/engine-frontend-app-provider-registry';\nimport { EngineFrontendTechdocProviderRegistry } from './techdoc/engine-frontend-techdoc-provider-registry';\nimport { EngineFrontendWebsiteProviderRegistry } from './website/engine-frontend-website-provider-registry';\n\nconst APP_RUNTIME_IMPORT_PATH = '@wildo-ai/external-connectors-public/app';\nconst TECHDOC_RUNTIME_IMPORT_PATH = '@wildo-ai/external-connectors-public/techdoc';\nconst WEBSITE_RUNTIME_IMPORT_PATH = '@wildo-ai/external-connectors-public/website';\n\n/**\n * Projects a frontend provider's declared capabilities onto the engine\n * slots it fills, using the canonical\n * `PROVIDER_CAPABILITY_TO_ENGINE_CAPABILITY` map from\n * `@wildo-ai/saas-models` — the single source of truth shared with the\n * backend discovery export and the runtime registry projection. The map\n * is a superset of what frontend providers need: among the capabilities\n * frontend modules actually declare, only `BILLING`,\n * `FRONTEND_ERROR_MONITORING`, and `FRONTEND_PRODUCT_ANALYTICS` resolve\n * to a slot, so the map's email / SMS / LLM entries are never hit here\n * and stay inert. The other capabilities frontend modules declare —\n * `SSO_OAUTH2`, `FRONTEND_SEARCH`, `FRONTEND_CAPTCHA` — are intentionally\n * absent from the map, so those providers contribute no engine slot by\n * construction.\n */\nfunction deriveEngineCapabilities(\n providerCapabilities: ReadonlyArray<string>,\n): EngineCapability[] {\n const slots = new Set<EngineCapability>();\n for (const cap of providerCapabilities) {\n const slot = PROVIDER_CAPABILITY_TO_ENGINE_CAPABILITY[cap as BuiltinProviderCapability];\n if (slot) slots.add(slot);\n }\n return Array.from(slots);\n}\n\n/**\n * The facet-agnostic view of a frontend provider module this projection reads.\n *\n * Only the DATA half appears here, and that is the contract rather than an\n * omission: this file is loaded by NODE-side tooling (`wildo config sync` and\n * the discovery walker), which cannot execute a browser-bound module's\n * `sdk.activate` and must never try. What it CAN read is the descriptor beside\n * it — which package the SDK lives in — and that is what the bundle-isolation\n * policy, an application's dependency alignment and a human reading a bundle\n * report need.\n */\ninterface FrontendProviderModuleShape {\n metadata: ProviderMetadata;\n providerCapabilities: ReadonlyArray<string>;\n protocols: ReadonlyArray<string>;\n publicConfig?: Readonly<Record<string, unknown>>;\n csp?: ProviderFrontendCspFootprintDeclaration;\n scripts?: ReadonlyArray<ProviderFrontendScriptDeclaration>;\n sdk?: { readonly descriptor: ProviderFrontendSdkDescriptor };\n components?: Readonly<Record<string, ProviderFrontendComponentDescriptor & { readonly load?: unknown }>>;\n fileStorage?: FileStorageAccepted;\n publicConfigSchema?: unknown;\n}\n\n/**\n * Refuses a provider whose declared `<script>` origin it did not also grant\n * itself in `csp.scriptOrigins`.\n *\n * The three facet module types have carried this rule in prose since the fields\n * landed, and prose is not a check. The failure it prevents is the worst shape\n * this surface has: the provider ships, the script tag is injected, the composed\n * policy does not admit its origin, and the browser refuses it — in PRODUCTION\n * ONLY, because development is report-only. The provider looks configured, the\n * page looks fine locally, and the capability is simply absent for real users.\n *\n * Absolute rather than conditional on the application's own policy, and that is\n * the point: a provider cannot know whether the application it lands in\n * happens to allow-list its vendor, and relying on that is exactly the\n * hand-editing per app, per service, per environment that declaring a footprint\n * exists to remove. Restating an origin the app would have allowed anyway costs\n * nothing — CSP source lists are a union.\n *\n * Thrown, not reported, and only HERE. This runs where the author is: in the\n * provider package's own `./companion` barrel and in the CLI's discovery walk,\n * so `wildo config sync` fails with the provider, the script and the missing\n * origin named. The backend's fallback projection deliberately does NOT repeat\n * it — refusing there would take an application's boot down for a provider\n * authoring mistake, long after the person who could fix it has gone.\n */\nfunction assertDeclaredScriptOriginsAreGranted(module: FrontendProviderModuleShape): void {\n const declaredScriptOrigins = new Set(module.csp?.scriptOrigins ?? []);\n\n for (const script of module.scripts ?? []) {\n let origin: string;\n try {\n origin = new URL(script.src).origin;\n } catch {\n throw new Error(\n `Frontend provider \"${module.metadata.ref}\" declares a script whose src is not an absolute URL: `\n + `\"${script.src}\". A script declaration names a third-party origin, so the framework can neither `\n + 'resolve it nor grant it in the composed Content-Security-Policy.',\n );\n }\n\n if (!declaredScriptOrigins.has(origin)) {\n throw new Error(\n `Frontend provider \"${module.metadata.ref}\" declares the script \"${script.src}\" but does not list `\n + `\"${origin}\" in csp.scriptOrigins. The policy this provider contributes to would then block its own `\n + 'script — and only where CSP enforces, so the failure would first appear in production. Add the '\n + 'origin to the provider\\'s csp.scriptOrigins.',\n );\n }\n }\n}\n\n/**\n * Turns a frontend provider module into the companion contribution tooling\n * reads — the ONE place a facet module becomes a discovery record.\n *\n * Exported because the engine is not the only producer. Every\n * `@wildo-ai/provider-<ref>` package's own `./companion` barrel has to do\n * exactly this for its own facet modules, and a projection each package\n * hand-rolls is a projection that drifts: the DATA half of the frontend\n * surface would end up carried by some packages and dropped by others, and a\n * dropped CSP footprint is invisible until a provider is blocked in production.\n *\n * What crosses and what does not is the whole contract. `csp`, `scripts` and\n * the SDK DESCRIPTOR cross, because tooling has to read them without executing\n * anything — this runs in Node and a facet module is browser-bound. The\n * executable half — `sdk.activate`, `publicConfigSchema` — does NOT, and cannot:\n * the contribution is serialized to JSON on its way into the generated\n * artifact, so a function would be dropped by `JSON.stringify` with no error\n * anywhere. Code reaches a bundle through the generated\n * `frontend-providers.generated.ts` instead.\n */\nexport function projectFrontendProviderContribution(\n module: FrontendProviderModuleShape,\n serviceType: AppFrontendType,\n runtimeImportPath: string,\n): ProviderCompanionContribution {\n assertDeclaredScriptOriginsAreGranted(module);\n\n const frontendEntry: FrontendProviderEntry = {\n metadata: module.metadata,\n providerCapabilities: [...module.providerCapabilities],\n protocols: [...module.protocols],\n publicConfig: module.publicConfig,\n // The DATA half of the frontend surface (#332). It has to travel with the\n // contribution because the CSP of a service is composed by the CLI, from\n // the materialized artifact, long before any browser loads the module that\n // declares it — and the CLI cannot execute that module to ask.\n // Normalized here, once: a provider AUTHORS the buckets it reaches and the\n // wire carries all of them, so the CSP composer never branches on absence\n // and the hydration join compares two shapes of the same kind.\n csp: module.csp === undefined ? undefined : normalizeProviderFrontendCspFootprint(module.csp),\n scripts: module.scripts === undefined ? undefined : [...module.scripts],\n sdk: module.sdk?.descriptor,\n // The DATA half of each contributed component (#380). `load` is stripped\n // HERE rather than left to `JSON.stringify` to drop it: a function that\n // disappears silently on its way through a serializer is the failure this\n // whole two-channel split exists to remove, and stripping it explicitly is\n // what makes the projection's contract readable at the projection.\n //\n // Rebuilt field by field rather than spread-minus-`load`, so a future field\n // on the declaration is a COMPILE decision about whether it crosses the wire\n // instead of one that crosses by default. `sdk` makes the same choice by\n // naming `descriptor`; this is the same rule where the shape is a map.\n components: projectFrontendComponentDescriptors(module.components),\n // The keys the module's `publicConfigSchema` declares, as DATA (#394 P3).\n // The schema itself is CODE and stays behind; this list is what lets\n // `wildo config sync` refuse an application-supplied key the module never\n // reads, at the moment it is typed rather than when a picker opens.\n publicConfigKeys: readDeclaredPublicConfigKeys(module.publicConfigSchema)?.slice(),\n // The z_file storage the picker fronts (#394 P5) — an enum member, so it\n // crosses the wire as-is; the chooser filters on it and the hydration join\n // compares it to the CODE side.\n fileStorage: module.fileStorage,\n };\n return {\n ref: module.metadata.ref,\n identity: {\n packageName: module.metadata.packageName,\n tier: module.metadata.tier,\n vendor: module.metadata.vendor,\n origin: module.metadata.origin,\n },\n runtimeImportPath,\n runtimeTargets: [{ kind: 'frontendService', serviceType }],\n engineCapabilities: deriveEngineCapabilities(module.providerCapabilities),\n providerCapabilities: [...module.providerCapabilities],\n protocols: [...module.protocols],\n // Browser-safe providers cannot own server secrets. The explicit empty\n // shape is authoritative and distinct from an unknown/missing contract.\n secretsContractShape: [],\n frontendEntry,\n };\n}\n\n/** One contribution per `EngineFrontendAppProviderRegistry` module, targeting `SAAS_APP`. */\nexport const engineFrontendAppProviderContributions: ProviderCompanionContribution[] =\n Array.from(EngineFrontendAppProviderRegistry.modules.values()).map((module) =>\n projectFrontendProviderContribution(module, AppFrontendType.SAAS_APP, APP_RUNTIME_IMPORT_PATH),\n );\n\n/** One contribution per `EngineFrontendTechdocProviderRegistry` module, targeting `TECH_DOC`. */\nexport const engineFrontendTechdocProviderContributions: ProviderCompanionContribution[] =\n Array.from(EngineFrontendTechdocProviderRegistry.modules.values()).map((module) =>\n projectFrontendProviderContribution(module, AppFrontendType.TECH_DOC, TECHDOC_RUNTIME_IMPORT_PATH),\n );\n\n/** One contribution per `EngineFrontendWebsiteProviderRegistry` module, targeting `STATIC_WEBSITE`. */\nexport const engineFrontendWebsiteProviderContributions: ProviderCompanionContribution[] =\n Array.from(EngineFrontendWebsiteProviderRegistry.modules.values()).map((module) =>\n projectFrontendProviderContribution(module, AppFrontendType.STATIC_WEBSITE, WEBSITE_RUNTIME_IMPORT_PATH),\n );\n\n/** Stable union — order: app providers, then techdoc, then website (matches the registry imports). */\nexport const engineFrontendProviderContributions: ProviderCompanionContribution[] = [\n ...engineFrontendAppProviderContributions,\n ...engineFrontendTechdocProviderContributions,\n ...engineFrontendWebsiteProviderContributions,\n];\n\n/**\n * Companion-discovery contract — see `RuntimeOwnerCompanionExports`.\n * The framework loader reads `providerContributions` via the package's\n * `./companion` subpath export.\n */\nconst companionExports: RuntimeOwnerCompanionExports = {\n providerContributions: engineFrontendProviderContributions,\n};\n\nexport default companionExports;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"engine-frontend-providers-package.d.ts","sourceRoot":"","sources":["../../../src/engine-frontend-providers-package.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,yCAAyC,CAAC"}
1
+ {"version":3,"file":"engine-frontend-providers-package.d.ts","sourceRoot":"","sources":["../../src/engine-frontend-providers-package.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,yCAAyC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"engine-frontend-providers-package.js","sourceRoot":"","sources":["../../../src/engine-frontend-providers-package.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,sCAAsC,CAAC","sourcesContent":["/**\n * The npm package every ENGINE frontend provider module — on all three facets — names as its\n * `packageName` (#328). One constant, so a provider extracted into its own package changes ONE\n * import. Intra-package relative import from the provider modules; not a public entrypoint.\n */\nexport const ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME = '@wildo-ai/external-connectors-public';\n"]}
1
+ {"version":3,"file":"engine-frontend-providers-package.js","sourceRoot":"","sources":["../../src/engine-frontend-providers-package.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,sCAAsC,CAAC","sourcesContent":["/**\n * The npm package every ENGINE frontend provider module — on all three facets — names as its\n * `packageName` (#328). One constant, so a provider extracted into its own package changes ONE\n * import. Intra-package relative import from the provider modules; not a public entrypoint.\n */\nexport const ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME = '@wildo-ai/external-connectors-public';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"algolia.frontend-techdoc.module.d.ts","sourceRoot":"","sources":["../../../../../src/providers/algolia/algolia.frontend-techdoc.module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;AAE1G,eAAO,MAAM,8BAA8B,EAAE,6BAgC5C,CAAC"}
1
+ {"version":3,"file":"algolia.frontend-techdoc.module.d.ts","sourceRoot":"","sources":["../../../../src/providers/algolia/algolia.frontend-techdoc.module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;AAE1G,eAAO,MAAM,8BAA8B,EAAE,6BAgC5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"algolia.frontend-techdoc.module.js","sourceRoot":"","sources":["../../../../../src/providers/algolia/algolia.frontend-techdoc.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sCAAsC,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,EACL,uBAAuB,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAG9L,MAAM,CAAC,MAAM,8BAA8B,GAAkC;IAC3E,QAAQ,EAAE,sBAAsB,CAAC;QAC/B,GAAG,EAAE,SAAS;QACd,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,YAAY,CAAC,SAAS;QAC5B,MAAM,EAAE,sBAAsB;KAC/B,CAAC;IACF,oBAAoB,EAAE,CAAC,2BAA2B,CAAC,eAAe,CAAC;IACnE,SAAS,EAAE,CAAC,yBAAyB,CAAC,YAAY,CAAC;IACnD,YAAY,EAAE;QACZ,iBAAiB,EAAE,SAAS;QAC5B,eAAe,EAAE,WAAW;KAC7B;IACD;;;;;;;;;;;;;;OAcG;IACH,iBAAiB,EAAE;QACjB,gBAAgB,EAAE,CAAC,uBAAuB,CAAC,aAAa,CAAC;QACzD,iBAAiB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;KACtC;CACF,CAAC","sourcesContent":["import { ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME } from '../../engine-frontend-providers-package';\nimport {\n ProviderDeploymentModel, BUILTIN_PROVIDER_CAPABILITY, BUILTIN_PROVIDER_PROTOCOL, defineProviderMetadata, ENGINE_PROVIDER_ORIGIN, ProviderTier } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendTechdocProviderModule } from '../../techdoc/frontend-techdoc-provider-module.types';\n\nexport const AlgoliaFrontendTechdocProvider: FrontendTechdocProviderModule = {\n metadata: defineProviderMetadata({\n ref: 'algolia',\n packageName: ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME,\n tier: ProviderTier.CATALOGUE,\n origin: ENGINE_PROVIDER_ORIGIN,\n }),\n providerCapabilities: [BUILTIN_PROVIDER_CAPABILITY.FRONTEND_SEARCH],\n protocols: [BUILTIN_PROVIDER_PROTOCOL.FRONTEND_SDK],\n publicConfig: {\n searchProviderRef: 'algolia',\n integrationKind: 'docsearch',\n },\n /**\n * Researched 2026-09-06; no backend counterpart.\n *\n * `vendorLegalEntityName` is OMITTED ON PURPOSE, and this is the field's optionality working as\n * designed rather than an authoring gap: Algolia has TWO processor entities selected by the\n * SUBSCRIBER'S domicile — `Algolia, Inc.` outside Europe, `Algolia SAS` within it. The framework\n * cannot know an application's domicile, so any single value here is wrong for half of them. The\n * application states it on its own register entry, where its contract makes it checkable.\n *\n * Regions are JURISDICTIONS rather than datacentre identifiers, because that is the granularity\n * the source supports: Algolia publishes US regions (Virginia, California, Texas) and European\n * ones (France, Germany, UK) without a stable public region-id vocabulary. Vendor-hosted only —\n * the infrastructure policy describes partner datacentres under Algolia's logical control and no\n * self-hosted option.\n */\n complianceProfile: {\n deploymentModels: [ProviderDeploymentModel.VENDOR_HOSTED],\n processingRegions: ['US', 'EU', 'UK'],\n },\n};\n"]}
1
+ {"version":3,"file":"algolia.frontend-techdoc.module.js","sourceRoot":"","sources":["../../../../src/providers/algolia/algolia.frontend-techdoc.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sCAAsC,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,EACL,uBAAuB,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAG9L,MAAM,CAAC,MAAM,8BAA8B,GAAkC;IAC3E,QAAQ,EAAE,sBAAsB,CAAC;QAC/B,GAAG,EAAE,SAAS;QACd,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,YAAY,CAAC,SAAS;QAC5B,MAAM,EAAE,sBAAsB;KAC/B,CAAC;IACF,oBAAoB,EAAE,CAAC,2BAA2B,CAAC,eAAe,CAAC;IACnE,SAAS,EAAE,CAAC,yBAAyB,CAAC,YAAY,CAAC;IACnD,YAAY,EAAE;QACZ,iBAAiB,EAAE,SAAS;QAC5B,eAAe,EAAE,WAAW;KAC7B;IACD;;;;;;;;;;;;;;OAcG;IACH,iBAAiB,EAAE;QACjB,gBAAgB,EAAE,CAAC,uBAAuB,CAAC,aAAa,CAAC;QACzD,iBAAiB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;KACtC;CACF,CAAC","sourcesContent":["import { ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME } from '../../engine-frontend-providers-package';\nimport {\n ProviderDeploymentModel, BUILTIN_PROVIDER_CAPABILITY, BUILTIN_PROVIDER_PROTOCOL, defineProviderMetadata, ENGINE_PROVIDER_ORIGIN, ProviderTier } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendTechdocProviderModule } from '../../techdoc/frontend-techdoc-provider-module.types';\n\nexport const AlgoliaFrontendTechdocProvider: FrontendTechdocProviderModule = {\n metadata: defineProviderMetadata({\n ref: 'algolia',\n packageName: ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME,\n tier: ProviderTier.CATALOGUE,\n origin: ENGINE_PROVIDER_ORIGIN,\n }),\n providerCapabilities: [BUILTIN_PROVIDER_CAPABILITY.FRONTEND_SEARCH],\n protocols: [BUILTIN_PROVIDER_PROTOCOL.FRONTEND_SDK],\n publicConfig: {\n searchProviderRef: 'algolia',\n integrationKind: 'docsearch',\n },\n /**\n * Researched 2026-09-06; no backend counterpart.\n *\n * `vendorLegalEntityName` is OMITTED ON PURPOSE, and this is the field's optionality working as\n * designed rather than an authoring gap: Algolia has TWO processor entities selected by the\n * SUBSCRIBER'S domicile — `Algolia, Inc.` outside Europe, `Algolia SAS` within it. The framework\n * cannot know an application's domicile, so any single value here is wrong for half of them. The\n * application states it on its own register entry, where its contract makes it checkable.\n *\n * Regions are JURISDICTIONS rather than datacentre identifiers, because that is the granularity\n * the source supports: Algolia publishes US regions (Virginia, California, Texas) and European\n * ones (France, Germany, UK) without a stable public region-id vocabulary. Vendor-hosted only —\n * the infrastructure policy describes partner datacentres under Algolia's logical control and no\n * self-hosted option.\n */\n complianceProfile: {\n deploymentModels: [ProviderDeploymentModel.VENDOR_HOSTED],\n processingRegions: ['US', 'EU', 'UK'],\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/providers/algolia/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/algolia/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"apple.frontend-app.module.d.ts","sourceRoot":"","sources":["../../../../../src/providers/apple/apple.frontend-app.module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAE9F,eAAO,MAAM,wBAAwB,EAAE,yBAqBtC,CAAC"}
1
+ {"version":3,"file":"apple.frontend-app.module.d.ts","sourceRoot":"","sources":["../../../../src/providers/apple/apple.frontend-app.module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAE9F,eAAO,MAAM,wBAAwB,EAAE,yBAqBtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"apple.frontend-app.module.js","sourceRoot":"","sources":["../../../../../src/providers/apple/apple.frontend-app.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sCAAsC,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,EACL,uBAAuB,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAG9L,MAAM,CAAC,MAAM,wBAAwB,GAA8B;IACjE,QAAQ,EAAE,sBAAsB,CAAC;QAC/B,GAAG,EAAE,OAAO;QACZ,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,YAAY,CAAC,IAAI;QACvB,MAAM,EAAE,sBAAsB;KAC/B,CAAC;IACF,oBAAoB,EAAE,CAAC,2BAA2B,CAAC,UAAU,CAAC;IAC9D,SAAS,EAAE,CAAC,yBAAyB,CAAC,UAAU,CAAC;IACjD,YAAY,EAAE;QACZ,eAAe,EAAE,OAAO;KACzB;IACD;;;OAGG;IACH,iBAAiB,EAAE;QACjB,gBAAgB,EAAE,CAAC,uBAAuB,CAAC,aAAa,CAAC;QACzD,iBAAiB,EAAE,CAAC,WAAW,CAAC;QAChC,qBAAqB,EAAE,YAAY;KACpC;CACF,CAAC","sourcesContent":["import { ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME } from '../../engine-frontend-providers-package';\nimport {\n ProviderDeploymentModel, BUILTIN_PROVIDER_CAPABILITY, BUILTIN_PROVIDER_PROTOCOL, defineProviderMetadata, ENGINE_PROVIDER_ORIGIN, ProviderTier } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendAppProviderModule } from '../../app/frontend-app-provider-module.types';\n\nexport const AppleFrontendAppProvider: FrontendAppProviderModule = {\n metadata: defineProviderMetadata({\n ref: 'apple',\n packageName: ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME,\n tier: ProviderTier.MAIN,\n origin: ENGINE_PROVIDER_ORIGIN,\n }),\n providerCapabilities: [BUILTIN_PROVIDER_CAPABILITY.SSO_OAUTH2],\n protocols: [BUILTIN_PROVIDER_PROTOCOL.SSO_OAUTH2],\n publicConfig: {\n authProviderRef: 'apple',\n },\n /**\n * Mirrors the authored `apple` BACKEND profile: one vendor, one legal identity, and the browser\n * SDK reaches the same vendor infrastructure.\n */\n complianceProfile: {\n deploymentModels: [ProviderDeploymentModel.VENDOR_HOSTED],\n processingRegions: ['us-east-1'],\n vendorLegalEntityName: 'Apple Inc.',\n },\n};\n"]}
1
+ {"version":3,"file":"apple.frontend-app.module.js","sourceRoot":"","sources":["../../../../src/providers/apple/apple.frontend-app.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sCAAsC,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,EACL,uBAAuB,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAG9L,MAAM,CAAC,MAAM,wBAAwB,GAA8B;IACjE,QAAQ,EAAE,sBAAsB,CAAC;QAC/B,GAAG,EAAE,OAAO;QACZ,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,YAAY,CAAC,IAAI;QACvB,MAAM,EAAE,sBAAsB;KAC/B,CAAC;IACF,oBAAoB,EAAE,CAAC,2BAA2B,CAAC,UAAU,CAAC;IAC9D,SAAS,EAAE,CAAC,yBAAyB,CAAC,UAAU,CAAC;IACjD,YAAY,EAAE;QACZ,eAAe,EAAE,OAAO;KACzB;IACD;;;OAGG;IACH,iBAAiB,EAAE;QACjB,gBAAgB,EAAE,CAAC,uBAAuB,CAAC,aAAa,CAAC;QACzD,iBAAiB,EAAE,CAAC,WAAW,CAAC;QAChC,qBAAqB,EAAE,YAAY;KACpC;CACF,CAAC","sourcesContent":["import { ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME } from '../../engine-frontend-providers-package';\nimport {\n ProviderDeploymentModel, BUILTIN_PROVIDER_CAPABILITY, BUILTIN_PROVIDER_PROTOCOL, defineProviderMetadata, ENGINE_PROVIDER_ORIGIN, ProviderTier } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendAppProviderModule } from '../../app/frontend-app-provider-module.types';\n\nexport const AppleFrontendAppProvider: FrontendAppProviderModule = {\n metadata: defineProviderMetadata({\n ref: 'apple',\n packageName: ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME,\n tier: ProviderTier.MAIN,\n origin: ENGINE_PROVIDER_ORIGIN,\n }),\n providerCapabilities: [BUILTIN_PROVIDER_CAPABILITY.SSO_OAUTH2],\n protocols: [BUILTIN_PROVIDER_PROTOCOL.SSO_OAUTH2],\n publicConfig: {\n authProviderRef: 'apple',\n },\n /**\n * Mirrors the authored `apple` BACKEND profile: one vendor, one legal identity, and the browser\n * SDK reaches the same vendor infrastructure.\n */\n complianceProfile: {\n deploymentModels: [ProviderDeploymentModel.VENDOR_HOSTED],\n processingRegions: ['us-east-1'],\n vendorLegalEntityName: 'Apple Inc.',\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/providers/apple/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/apple/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"github.frontend-app.module.d.ts","sourceRoot":"","sources":["../../../../../src/providers/github/github.frontend-app.module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAE9F,eAAO,MAAM,yBAAyB,EAAE,yBAoBvC,CAAC"}
1
+ {"version":3,"file":"github.frontend-app.module.d.ts","sourceRoot":"","sources":["../../../../src/providers/github/github.frontend-app.module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAE9F,eAAO,MAAM,yBAAyB,EAAE,yBAoBvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"github.frontend-app.module.js","sourceRoot":"","sources":["../../../../../src/providers/github/github.frontend-app.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sCAAsC,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,EACL,uBAAuB,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAG9L,MAAM,CAAC,MAAM,yBAAyB,GAA8B;IAClE,QAAQ,EAAE,sBAAsB,CAAC;QAC/B,GAAG,EAAE,QAAQ;QACb,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,YAAY,CAAC,IAAI;QACvB,MAAM,EAAE,sBAAsB;KAC/B,CAAC;IACF,oBAAoB,EAAE,CAAC,2BAA2B,CAAC,UAAU,CAAC;IAC9D,SAAS,EAAE,CAAC,yBAAyB,CAAC,UAAU,CAAC;IACjD,YAAY,EAAE;QACZ,eAAe,EAAE,QAAQ;KAC1B;IACD;;OAEG;IACH,iBAAiB,EAAE;QACjB,gBAAgB,EAAE,CAAC,uBAAuB,CAAC,aAAa,CAAC;QACzD,iBAAiB,EAAE,CAAC,WAAW,CAAC;QAChC,qBAAqB,EAAE,cAAc;KACtC;CACF,CAAC","sourcesContent":["import { ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME } from '../../engine-frontend-providers-package';\nimport {\n ProviderDeploymentModel, BUILTIN_PROVIDER_CAPABILITY, BUILTIN_PROVIDER_PROTOCOL, defineProviderMetadata, ENGINE_PROVIDER_ORIGIN, ProviderTier } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendAppProviderModule } from '../../app/frontend-app-provider-module.types';\n\nexport const GitHubFrontendAppProvider: FrontendAppProviderModule = {\n metadata: defineProviderMetadata({\n ref: 'github',\n packageName: ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME,\n tier: ProviderTier.MAIN,\n origin: ENGINE_PROVIDER_ORIGIN,\n }),\n providerCapabilities: [BUILTIN_PROVIDER_CAPABILITY.SSO_OAUTH2],\n protocols: [BUILTIN_PROVIDER_PROTOCOL.SSO_OAUTH2],\n publicConfig: {\n authProviderRef: 'github',\n },\n /**\n * Mirrors the authored `github` BACKEND profile.\n */\n complianceProfile: {\n deploymentModels: [ProviderDeploymentModel.VENDOR_HOSTED],\n processingRegions: ['us-east-1'],\n vendorLegalEntityName: 'GitHub, Inc.',\n },\n};\n"]}
1
+ {"version":3,"file":"github.frontend-app.module.js","sourceRoot":"","sources":["../../../../src/providers/github/github.frontend-app.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sCAAsC,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,EACL,uBAAuB,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAG9L,MAAM,CAAC,MAAM,yBAAyB,GAA8B;IAClE,QAAQ,EAAE,sBAAsB,CAAC;QAC/B,GAAG,EAAE,QAAQ;QACb,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,YAAY,CAAC,IAAI;QACvB,MAAM,EAAE,sBAAsB;KAC/B,CAAC;IACF,oBAAoB,EAAE,CAAC,2BAA2B,CAAC,UAAU,CAAC;IAC9D,SAAS,EAAE,CAAC,yBAAyB,CAAC,UAAU,CAAC;IACjD,YAAY,EAAE;QACZ,eAAe,EAAE,QAAQ;KAC1B;IACD;;OAEG;IACH,iBAAiB,EAAE;QACjB,gBAAgB,EAAE,CAAC,uBAAuB,CAAC,aAAa,CAAC;QACzD,iBAAiB,EAAE,CAAC,WAAW,CAAC;QAChC,qBAAqB,EAAE,cAAc;KACtC;CACF,CAAC","sourcesContent":["import { ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME } from '../../engine-frontend-providers-package';\nimport {\n ProviderDeploymentModel, BUILTIN_PROVIDER_CAPABILITY, BUILTIN_PROVIDER_PROTOCOL, defineProviderMetadata, ENGINE_PROVIDER_ORIGIN, ProviderTier } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendAppProviderModule } from '../../app/frontend-app-provider-module.types';\n\nexport const GitHubFrontendAppProvider: FrontendAppProviderModule = {\n metadata: defineProviderMetadata({\n ref: 'github',\n packageName: ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME,\n tier: ProviderTier.MAIN,\n origin: ENGINE_PROVIDER_ORIGIN,\n }),\n providerCapabilities: [BUILTIN_PROVIDER_CAPABILITY.SSO_OAUTH2],\n protocols: [BUILTIN_PROVIDER_PROTOCOL.SSO_OAUTH2],\n publicConfig: {\n authProviderRef: 'github',\n },\n /**\n * Mirrors the authored `github` BACKEND profile.\n */\n complianceProfile: {\n deploymentModels: [ProviderDeploymentModel.VENDOR_HOSTED],\n processingRegions: ['us-east-1'],\n vendorLegalEntityName: 'GitHub, Inc.',\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/providers/github/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/github/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1,3 +1,12 @@
1
1
  import type { FrontendAppProviderModule } from '../../app/frontend-app-provider-module.types';
2
+ /**
3
+ * Google as an SSO provider — and only that, on the frontend.
4
+ *
5
+ * The Drive picker used to live here (#394 P1–P5) and moved to the `google-drive` module on
6
+ * 2026-09-09, because a picker is the front door of a CONNECTED ACCOUNT, and the account a person
7
+ * connects for Drive goes through the `google-drive` backend provider (its own OAuth2 client, its own
8
+ * `drive.file` consent), not through the SSO registration this module fronts. A picker declared here
9
+ * asked the access-token door for `google`, which has no delegated contract, and could never open.
10
+ */
2
11
  export declare const GoogleFrontendAppProvider: FrontendAppProviderModule;
3
12
  //# sourceMappingURL=google.frontend-app.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"google.frontend-app.module.d.ts","sourceRoot":"","sources":["../../../../../src/providers/google/google.frontend-app.module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAE9F,eAAO,MAAM,yBAAyB,EAAE,yBAqBvC,CAAC"}
1
+ {"version":3,"file":"google.frontend-app.module.d.ts","sourceRoot":"","sources":["../../../../src/providers/google/google.frontend-app.module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAE9F;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,EAAE,yBAwBvC,CAAC"}
@@ -1,5 +1,14 @@
1
1
  import { ENGINE_FRONTEND_PROVIDERS_PACKAGE_NAME } from '../../engine-frontend-providers-package.js';
2
- import { ProviderDeploymentModel, BUILTIN_PROVIDER_CAPABILITY, BUILTIN_PROVIDER_PROTOCOL, defineProviderMetadata, ENGINE_PROVIDER_ORIGIN, ProviderTier } from '@wildo-ai/saas-models/public-runtime';
2
+ import { ProviderDeploymentModel, BUILTIN_PROVIDER_CAPABILITY, BUILTIN_PROVIDER_PROTOCOL, defineProviderMetadata, ENGINE_PROVIDER_ORIGIN, ProviderTier, defineFrontendPublicConfigSchema, FrontendPublicConfigValueKind } from '@wildo-ai/saas-models/public-runtime';
3
+ /**
4
+ * Google as an SSO provider — and only that, on the frontend.
5
+ *
6
+ * The Drive picker used to live here (#394 P1–P5) and moved to the `google-drive` module on
7
+ * 2026-09-09, because a picker is the front door of a CONNECTED ACCOUNT, and the account a person
8
+ * connects for Drive goes through the `google-drive` backend provider (its own OAuth2 client, its own
9
+ * `drive.file` consent), not through the SSO registration this module fronts. A picker declared here
10
+ * asked the access-token door for `google`, which has no delegated contract, and could never open.
11
+ */
3
12
  export const GoogleFrontendAppProvider = {
4
13
  metadata: defineProviderMetadata({
5
14
  ref: 'google',
@@ -12,6 +21,9 @@ export const GoogleFrontendAppProvider = {
12
21
  publicConfig: {
13
22
  authProviderRef: 'google',
14
23
  },
24
+ publicConfigSchema: defineFrontendPublicConfigSchema({
25
+ authProviderRef: { kind: FrontendPublicConfigValueKind.STRING, description: 'The SSO auth provider this module fronts.' },
26
+ }),
15
27
  /**
16
28
  * Mirrors the authored `google` BACKEND profile. Note the sibling `recaptcha` provider does NOT
17
29
  * share this entity — see its own profile.