@wildo-ai/platform-config-lib 1.1.9 → 1.1.11

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 (188) hide show
  1. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +1 -1
  2. package/dist/esm/_unimplemented/unimplemented-field-warning.js +1 -1
  3. package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +1 -1
  4. package/dist/esm/blueprint/anchored-region.d.ts +83 -0
  5. package/dist/esm/blueprint/anchored-region.d.ts.map +1 -0
  6. package/dist/esm/blueprint/anchored-region.js +263 -0
  7. package/dist/esm/blueprint/anchored-region.js.map +1 -0
  8. package/dist/esm/blueprint/blueprint.schemas.d.ts +689 -0
  9. package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -0
  10. package/dist/esm/blueprint/blueprint.schemas.js +638 -0
  11. package/dist/esm/blueprint/blueprint.schemas.js.map +1 -0
  12. package/dist/esm/bootstrap/bootstrap.contracts.d.ts +13 -1
  13. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  14. package/dist/esm/bootstrap/bootstrap.contracts.js +6 -0
  15. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  16. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +21 -3
  17. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  18. package/dist/esm/bootstrap/bootstrap.schemas.js +14 -3
  19. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  20. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +121 -0
  21. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  22. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +129 -0
  23. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  24. package/dist/esm/bootstrap/runtime-response-integrity.d.ts +249 -0
  25. package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -0
  26. package/dist/esm/bootstrap/runtime-response-integrity.js +353 -0
  27. package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -0
  28. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts +32 -0
  29. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -0
  30. package/dist/esm/bootstrap/runtime-secret-env.contracts.js +43 -0
  31. package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -0
  32. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts +51 -0
  33. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -0
  34. package/dist/esm/canonical-json/rfc8785-canonical-json.js +231 -0
  35. package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -0
  36. package/dist/esm/index.d.ts +15 -0
  37. package/dist/esm/index.d.ts.map +1 -1
  38. package/dist/esm/index.js +15 -0
  39. package/dist/esm/index.js.map +1 -1
  40. package/dist/esm/key-management/approval-seal-verifier.d.ts +216 -0
  41. package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -0
  42. package/dist/esm/key-management/approval-seal-verifier.js +233 -0
  43. package/dist/esm/key-management/approval-seal-verifier.js.map +1 -0
  44. package/dist/esm/key-management/approval-seal.contracts.d.ts +131 -0
  45. package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -0
  46. package/dist/esm/key-management/approval-seal.contracts.js +115 -0
  47. package/dist/esm/key-management/approval-seal.contracts.js.map +1 -0
  48. package/dist/esm/key-management/data-key.contracts.d.ts +108 -0
  49. package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -0
  50. package/dist/esm/key-management/data-key.contracts.js +54 -0
  51. package/dist/esm/key-management/data-key.contracts.js.map +1 -0
  52. package/dist/esm/key-management/es256-jws.d.ts +60 -0
  53. package/dist/esm/key-management/es256-jws.d.ts.map +1 -0
  54. package/dist/esm/key-management/es256-jws.js +135 -0
  55. package/dist/esm/key-management/es256-jws.js.map +1 -0
  56. package/dist/esm/key-management/key-provider.spi.d.ts +151 -0
  57. package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -0
  58. package/dist/esm/key-management/key-provider.spi.js +38 -0
  59. package/dist/esm/key-management/key-provider.spi.js.map +1 -0
  60. package/dist/esm/key-management/keyring-rotation.contracts.d.ts +93 -0
  61. package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -0
  62. package/dist/esm/key-management/keyring-rotation.contracts.js +101 -0
  63. package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -0
  64. package/dist/esm/key-management/keyring-status.contracts.d.ts +66 -0
  65. package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -0
  66. package/dist/esm/key-management/keyring-status.contracts.js +45 -0
  67. package/dist/esm/key-management/keyring-status.contracts.js.map +1 -0
  68. package/dist/esm/key-management/signature-request.contracts.d.ts +95 -0
  69. package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -0
  70. package/dist/esm/key-management/signature-request.contracts.js +96 -0
  71. package/dist/esm/key-management/signature-request.contracts.js.map +1 -0
  72. package/dist/esm/key-management/signing-log-export.contracts.d.ts +216 -0
  73. package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -0
  74. package/dist/esm/key-management/signing-log-export.contracts.js +268 -0
  75. package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -0
  76. package/dist/esm/key-management/vault-custody.contracts.d.ts +55 -0
  77. package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -0
  78. package/dist/esm/key-management/vault-custody.contracts.js +88 -0
  79. package/dist/esm/key-management/vault-custody.contracts.js.map +1 -0
  80. package/dist/esm/lockfile/lockfile-io.d.ts +7 -9
  81. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  82. package/dist/esm/lockfile/lockfile-io.js +23 -22
  83. package/dist/esm/lockfile/lockfile-io.js.map +1 -1
  84. package/dist/esm/lockfile/materialize-infra-section.d.ts +17 -14
  85. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  86. package/dist/esm/lockfile/materialize-infra-section.js +9 -9
  87. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  88. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +26 -2
  89. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  90. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +27 -2
  91. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  92. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -1
  93. package/dist/esm/project-config/application-public-pricing-catalog.loader.js +9 -2
  94. package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -1
  95. package/dist/esm/project-config/application-served-public-documents.loader.d.ts +26 -0
  96. package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -0
  97. package/dist/esm/project-config/application-served-public-documents.loader.js +78 -0
  98. package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -0
  99. package/dist/esm/project-config/define-infra-env-config.d.ts +236 -15
  100. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  101. package/dist/esm/project-config/define-infra-env-config.js +104 -91
  102. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  103. package/dist/esm/project-config/define-saas-config.d.ts +133 -3
  104. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  105. package/dist/esm/project-config/define-saas-config.js +170 -19
  106. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  107. package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -1
  108. package/dist/esm/project-config/hosted-infra-env-config.js +3 -0
  109. package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
  110. package/dist/esm/project-config/index.d.ts +3 -0
  111. package/dist/esm/project-config/index.d.ts.map +1 -1
  112. package/dist/esm/project-config/index.js +3 -0
  113. package/dist/esm/project-config/index.js.map +1 -1
  114. package/dist/esm/project-config/npm-version-range.d.ts.map +1 -1
  115. package/dist/esm/project-config/npm-version-range.js +39 -16
  116. package/dist/esm/project-config/npm-version-range.js.map +1 -1
  117. package/dist/esm/project-config/owning-package-tsconfig.d.ts +15 -0
  118. package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -0
  119. package/dist/esm/project-config/owning-package-tsconfig.js +29 -0
  120. package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -0
  121. package/dist/esm/project-config/provider-companion-discovery.d.ts +4 -4
  122. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  123. package/dist/esm/project-config/provider-companion-discovery.js +13 -9
  124. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  125. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +32 -3
  126. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  127. package/dist/esm/project-config/provider-runtime-artifacts.js +67 -13
  128. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  129. package/dist/esm/project-config/shared/csp-defaults.d.ts +4 -5
  130. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
  131. package/dist/esm/project-config/shared/csp-defaults.js +4 -5
  132. package/dist/esm/project-config/shared/csp-defaults.js.map +1 -1
  133. package/dist/esm/project-config/shared/csp.schemas.d.ts +1 -2
  134. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
  135. package/dist/esm/project-config/shared/csp.schemas.js +1 -2
  136. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
  137. package/dist/esm/project-config/shared/environment.schemas.d.ts +6 -0
  138. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  139. package/dist/esm/project-config/shared/environment.schemas.js +8 -1
  140. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  141. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +1 -0
  142. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  143. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +3 -0
  144. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  145. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +4 -0
  146. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
  147. package/dist/esm/project-config/shared/minion-resource-access.validation.js +6 -2
  148. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
  149. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts +250 -0
  150. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -0
  151. package/dist/esm/project-config/shared/platform-key-management.schemas.js +194 -0
  152. package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -0
  153. package/dist/esm/registry/index.d.ts +1 -0
  154. package/dist/esm/registry/index.d.ts.map +1 -1
  155. package/dist/esm/registry/index.js +1 -0
  156. package/dist/esm/registry/index.js.map +1 -1
  157. package/dist/esm/registry/local-checkout-source.d.ts +22 -2
  158. package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
  159. package/dist/esm/registry/local-checkout-source.js +66 -3
  160. package/dist/esm/registry/local-checkout-source.js.map +1 -1
  161. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +10 -0
  162. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  163. package/dist/esm/registry/module-artifact.schemas.d.ts +23 -0
  164. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  165. package/dist/esm/registry/module-manifest.schemas.d.ts +336 -18
  166. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  167. package/dist/esm/registry/module-manifest.schemas.js +245 -19
  168. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  169. package/dist/esm/registry/module-search.schemas.d.ts +2 -0
  170. package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
  171. package/dist/esm/registry/module-search.schemas.js +14 -1
  172. package/dist/esm/registry/module-search.schemas.js.map +1 -1
  173. package/dist/esm/registry/registry-errors.d.ts +22 -2
  174. package/dist/esm/registry/registry-errors.d.ts.map +1 -1
  175. package/dist/esm/registry/registry-errors.js +28 -2
  176. package/dist/esm/registry/registry-errors.js.map +1 -1
  177. package/dist/esm/registry/registry-section-schemas.constants.d.ts +5 -0
  178. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  179. package/dist/esm/registry/registry-url-resolution.d.ts +72 -0
  180. package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -0
  181. package/dist/esm/registry/registry-url-resolution.js +157 -0
  182. package/dist/esm/registry/registry-url-resolution.js.map +1 -0
  183. package/dist/esm/schemas/framework-secrets.schemas.d.ts +55 -0
  184. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  185. package/dist/esm/schemas/framework-secrets.schemas.js +53 -0
  186. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  187. package/dist/tsconfig.build.tsbuildinfo +1 -1
  188. package/package.json +7 -7
@@ -44,14 +44,35 @@ const SemverExact = SemverExactSchema;
44
44
  */
45
45
  export const ModuleManifestModuleDependenciesSchema = z.record(z.string().min(1), SemverRange);
46
46
  /**
47
- * `dependsOn.npm.dependencies` / `peerDependencies` — npm packages
48
- * the installed module imports at runtime. Install surfaces these
49
- * to the operator but does not edit `package.json` automatically
50
- * or install dependencies. The operator chooses the consuming package (KD-13).
47
+ * `dependsOn.npm.dependencies` / `peerDependencies` — npm packages the installed module imports at runtime (KD-13);
48
+ * for a provider module, see below: `dependencies` is its vendor pins and `peerDependencies` must stay empty.
49
+ *
50
+ * For a PROVIDER module, `dependencies` is the module's VENDOR PINS (#2787, epic #2786): the third-party packages its
51
+ * facets use to talk to the vendor (`posthog-js`, `posthog-node`), each at an EXACT version, recorded here once. The
52
+ * facets declare them as `"*"`, and the version an application runs comes from this record. Both publishing doors
53
+ * refuse a provider module whose record disagrees with its facets (`providerModuleVendorPackageRefusals` in the CLI):
54
+ * a range, a name the framework itself owns (`zod`, `react`), a facet dependency not recorded here or a record no
55
+ * facet declares, a vendor package a browser entry loads EAGERLY (a dynamic `import()` may reach one), a backend facet
56
+ * whose vendor dependencies differ from its `requiredPackages`, a browser SDK descriptor naming a package the facet does
57
+ * not declare, and any `peerDependencies` (a vendor package's optional peers are the application's to resolve). A
58
+ * vendor SDK is never pinned at the framework root.
59
+ *
60
+ * For any other module kind the fields keep their original meaning: what the operator is told to declare.
51
61
  */
52
62
  export const ModuleManifestNpmDependenciesSchema = z.strictObject({
53
63
  dependencies: z.record(z.string().min(1), SemverRange).default({}),
54
64
  peerDependencies: z.record(z.string().min(1), SemverRange).default({}),
65
+ /**
66
+ * The recorded `dependencies` whose install script pnpm must run (#2787). pnpm runs a dependency's install script
67
+ * only when the name is in `onlyBuiltDependencies`, so a vendor package that needs one is listed here, and adoption
68
+ * adds it to the application's allow-list. pnpm's v9 lockfile does not record which packages need a build, so publish
69
+ * reads the INSTALLED package's own manifest (an install lifecycle script, or a `binding.gyp`) when the facet resolves it.
70
+ *
71
+ * Optional with NO default, deliberately: a manifest is sent to the registry and written into an artifact as PARSED,
72
+ * so a default would add this key to every manifest, and a registry server or CLI still on the earlier strict schema
73
+ * would refuse all of them. Absent reads as none.
74
+ */
75
+ onlyBuiltDependencies: z.array(z.string().min(1)).optional(),
55
76
  });
56
77
  /**
57
78
  * `dependsOn.capabilities` — required EngineCapability names. Adoption validates
@@ -267,6 +288,14 @@ export var ModuleRegistrationScenario;
267
288
  * Restricted to plain path segments, with no `..`, because a wiring names files the installer and `remove` edit.
268
289
  */
269
290
  const WIRED_SERVICE_PATH_PATTERN = /^(\.\/)?(?!\.\.?(\/|$))[A-Za-z0-9_-][A-Za-z0-9._-]*(\/(?!\.\.?(\/|$))[A-Za-z0-9_-][A-Za-z0-9._-]*)*$/;
291
+ /**
292
+ * The scenarios' variable patterns for the directory and camelCase stem their REGISTRY edits use
293
+ * (`moduleId`/`moduleCamel`, `minionDir`/`minionCamel`, `workerDir`/`workerCamel` share them). Mirrored
294
+ * here because the manifest is validated where no scenario is loaded (the registry server); a test pins
295
+ * them equal to the scenarios' own declarations.
296
+ */
297
+ export const MODULE_REGISTRATION_MODULE_ID_PATTERN = /^[a-z][a-z0-9-]*$/;
298
+ export const MODULE_REGISTRATION_MODULE_CAMEL_PATTERN = /^[a-z][A-Za-z0-9]*$/;
270
299
  /** A scoped provider facet package name: `@<scope>/provider-<ref>` or `@<scope>/provider-<ref>-frontend`. */
271
300
  const PROVIDER_FACET_PACKAGE_NAME_PATTERN = /^@[a-z0-9][a-z0-9._-]*\/provider-[a-z][a-z0-9-]*$/;
272
301
  /** One runtime a provider facet was wired into: its key in `services`, and its directory. */
@@ -277,8 +306,8 @@ export const ProviderWiringOwnerSchema = z.strictObject({
277
306
  /**
278
307
  * What an `add-provider-package` install wired, as the INSTALLER derived it from its own application (#2014):
279
308
  * - `backendOwners`: the backend services that depend on the backend facet and scope the provider;
280
- * - `frontendOwners`: the frontend services, of a type in the facet's `surfaces`, that depend on the browser facet
281
- * and scope the provider.
309
+ * - `frontendOwners`: the frontend services, of a type in the facet's `surfaces`, that depend on the browser facet.
310
+ * The install does not scope the provider there (#2579): naming it in a frontend scope is what loads it.
282
311
  *
283
312
  * Recorded so `remove` reverses exactly what install wrote, even after the application's services change.
284
313
  */
@@ -289,7 +318,48 @@ export const ProviderWiringSchema = z.strictObject({
289
318
  /** The browser facet's package name as installed; absent without a frontend facet. */
290
319
  frontendPackage: z.string().regex(PROVIDER_FACET_PACKAGE_NAME_PATTERN).optional(),
291
320
  frontendOwners: z.array(ProviderWiringOwnerSchema),
321
+ /**
322
+ * The provider an AUGMENTATION module adds operations to (#2022). Present, the install wrote NO scope: the module owns
323
+ * no ref an application scopes, and adding its operations is the application's opt-in under
324
+ * `providers.augmentations.<augments>`, which an install never writes (it would activate what nobody chose).
325
+ */
326
+ augments: z.string().regex(MODULE_REGISTRATION_MODULE_ID_PATTERN).optional(),
327
+ /**
328
+ * The module's vendor pins (#2789): its `dependsOn.npm.dependencies`, exact versions, written into the application's
329
+ * root `pnpm.overrides` by the install, as a framework pin is. Absent when the module records none, so a module with
330
+ * no vendor package keeps the wiring it always had. Recorded so an update moves them, a later install of another
331
+ * module pinning one of them differently is refused naming this one, and `remove` takes out what this install WROTE.
332
+ */
333
+ vendorPins: z.record(z.string().min(1), z.string().min(1)).optional(),
334
+ /**
335
+ * The vendor pins the application already held, at the module's version, when the install met them (#2789): left as
336
+ * written, never written by the install, so `remove` leaves them too. An application pinning the SDK may use it
337
+ * itself; the module taking that pin away on removal would leave the application's own dependency floating. Absent
338
+ * when the install met none; never compared when deciding whether a wiring changed.
339
+ */
340
+ heldVendorPins: z.array(z.string().min(1)).optional(),
341
+ /**
342
+ * The vendor packages whose install script pnpm must run (#2801): the module's `dependsOn.npm.onlyBuiltDependencies`,
343
+ * written into the application's root `package.json` → `pnpm.onlyBuiltDependencies` by the install, as its pins are.
344
+ * Absent when the module records none. Recorded so an update moves them and `remove` takes out what this install WROTE.
345
+ * Measured on pnpm 10.6.4 (#2801): that list is honoured in a multi-package workspace, and when `pnpm-workspace.yaml`
346
+ * carries one too, pnpm reads this one and ignores the YAML. So an application keeping its list in the YAML file gets
347
+ * nothing written (that would switch its list off); the install names the entries to add there instead.
348
+ */
349
+ onlyBuiltDependencies: z.array(z.string().min(1)).optional(),
350
+ /**
351
+ * The names the application's list already held when the install met them (#2801): never written by the install, so
352
+ * `remove` leaves them. Absent when the install met none; never compared when deciding whether a wiring changed.
353
+ */
354
+ heldOnlyBuiltDependencies: z.array(z.string().min(1)).optional(),
292
355
  });
356
+ /** The application's root manifest, relative to its root: where a provider module's vendor pins are written (#2789). */
357
+ export const PROVIDER_VENDOR_PINS_MANIFEST = 'package.json';
358
+ /**
359
+ * The application's workspace file, relative to its root. When it carries an `onlyBuiltDependencies` list and the root
360
+ * manifest carries none, a provider install writes no allow-list (#2801): a list in the manifest would replace it.
361
+ */
362
+ export const PROVIDER_WORKSPACE_FILE = 'pnpm-workspace.yaml';
293
363
  /**
294
364
  * The four layers of a domain module, named as its manifest boundaries name them. A domain-module
295
365
  * registration may cover a SUBSET (#1773): a backend+shared module registers its shared entries and an
@@ -314,14 +384,6 @@ export const DOMAIN_MODULE_LAYERS = [
314
384
  DomainModuleLayer.FRONTEND,
315
385
  DomainModuleLayer.BACKEND,
316
386
  ];
317
- /**
318
- * The scenarios' variable patterns for the directory and camelCase stem their REGISTRY edits use
319
- * (`moduleId`/`moduleCamel`, `minionDir`/`minionCamel`, `workerDir`/`workerCamel` share them). Mirrored
320
- * here because the manifest is validated where no scenario is loaded (the registry server); a test pins
321
- * them equal to the scenarios' own declarations.
322
- */
323
- export const MODULE_REGISTRATION_MODULE_ID_PATTERN = /^[a-z][a-z0-9-]*$/;
324
- export const MODULE_REGISTRATION_MODULE_CAMEL_PATTERN = /^[a-z][A-Za-z0-9]*$/;
325
387
  /**
326
388
  * A module's registration: the scenario plus the ONLY values its registry edits read. It carries no
327
389
  * code — the installer renders the scenario's own edit steps with these values, both restricted to
@@ -397,6 +459,14 @@ export var ModuleKind;
397
459
  * be one. They stay in the platform's own package, selected by the application's declaration (#1692).
398
460
  */
399
461
  ModuleKind["PROVIDER"] = "provider";
462
+ /**
463
+ * An application blueprint (epic #2856): a layer upon the `wildo init` base, published here so an organization's
464
+ * blueprints are distributed exactly like its modules. Its zip holds the packed blueprint (`blueprint.json` +
465
+ * `files/`) beside this manifest, which carries its identity and nothing an install would act on — no boundaries,
466
+ * no registration, no provider block. It is never installed into an existing application: `wildo registry add`
467
+ * refuses it, and `wildo init --blueprint` is the only door that applies one.
468
+ */
469
+ ModuleKind["BLUEPRINT"] = "blueprint";
400
470
  })(ModuleKind || (ModuleKind = {}));
401
471
  /**
402
472
  * The runtime facets a provider module can ship, each as its own workspace package under
@@ -428,9 +498,86 @@ export var ProviderModuleMaturity;
428
498
  (function (ProviderModuleMaturity) {
429
499
  /** Copied from a seed or written by hand, reviewed, and owned by Wildo. Not yet met the real vendor. */
430
500
  ProviderModuleMaturity["ADOPTED"] = "adopted";
431
- /** Has executed against the real vendor it names, with the proof recorded on the tracker. */
501
+ /** Has executed against the real vendor it names, with the proof recorded on the tracker. Requires `proof` (#2515). */
432
502
  ProviderModuleMaturity["PROVEN"] = "proven";
433
503
  })(ProviderModuleMaturity || (ProviderModuleMaturity = {}));
504
+ /**
505
+ * Where a PROVEN provider module's proof is, and what it covered (#2515).
506
+ *
507
+ * `proven` used to be a word nobody checked: a module could claim it with no proof, and asana, which #333 drove
508
+ * against Asana end to end, still read `adopted`. So the claim now names its evidence, and the manifest refuses
509
+ * `proven` without it and a proof on an `adopted` module.
510
+ *
511
+ * - `issue` is the tracker issue whose closing evidence records the run. The tracker is where proof lives, by the
512
+ * same rule that keeps every durable record there; a manifest field cannot hold a run's output.
513
+ * - `operations` are the operations the run actually called, named as the module declares them: a REST operation id,
514
+ * an augmentation's operation id, or a capability arm's operation (`extractDocumentText`). Publish refuses a name
515
+ * the module does not declare (`providerModuleCodeRefusals`), so a proof cannot outlive a renamed operation. An
516
+ * operation the run did not call is not proven, however similar it is.
517
+ * - `provenAt` is the day the run happened. A vendor changes under a module that stays still, so the date is what
518
+ * tells a reader how old the evidence is.
519
+ *
520
+ * Rejected: deriving maturity from the tracker at publish. Publish runs offline and from a commit, and a check that
521
+ * needs the GitHub API to pass would fail closed on every machine without a token.
522
+ */
523
+ export const ModuleManifestProviderProofSchema = z.strictObject({
524
+ issue: z.number().int().positive(),
525
+ provenAt: z.iso.date(),
526
+ operations: z.array(z.string().min(1)).min(1),
527
+ });
528
+ /**
529
+ * What the OpenAPI conformance check (#2028) can find wrong with one declared operation, compared with the vendor's
530
+ * own description. Each names a request the module would send that the vendor never described, because that is what
531
+ * makes a call fail at the vendor while every Wildo check passes: the archive's first real socket test found 231 GET
532
+ * operations declaring a body, all of which had passed schema checks.
533
+ */
534
+ export var ProviderOpenApiFindingKind;
535
+ (function (ProviderOpenApiFindingKind) {
536
+ /** No operation of the description has this method and path. */
537
+ ProviderOpenApiFindingKind["OPERATION_NOT_DESCRIBED"] = "operation-not-described";
538
+ /** A query or header parameter the module sends, which the described operation does not take. */
539
+ ProviderOpenApiFindingKind["PARAMETER_NOT_DESCRIBED"] = "parameter-not-described";
540
+ /** A query or header parameter the description requires, which the module never sends. */
541
+ ProviderOpenApiFindingKind["REQUIRED_PARAMETER_NOT_DECLARED"] = "required-parameter-not-declared";
542
+ /** The module sends a body to an operation the description gives none. */
543
+ ProviderOpenApiFindingKind["BODY_NOT_DESCRIBED"] = "body-not-described";
544
+ /** The description requires a body, and the module sends none (a body it could not model and left out). */
545
+ ProviderOpenApiFindingKind["BODY_REQUIRED_NOT_SENT"] = "body-required-not-sent";
546
+ /** The module encodes its body as a media type the described operation does not accept. */
547
+ ProviderOpenApiFindingKind["BODY_ENCODING_NOT_DESCRIBED"] = "body-encoding-not-described";
548
+ /** A field of the module's body, which the described body schema does not have. */
549
+ ProviderOpenApiFindingKind["BODY_FIELD_NOT_DESCRIBED"] = "body-field-not-described";
550
+ })(ProviderOpenApiFindingKind || (ProviderOpenApiFindingKind = {}));
551
+ /**
552
+ * A finding the module keeps on purpose, with the reason: the description is not always right, and a vendor that
553
+ * accepts what it never described is common. Refused when it matches no finding, so it cannot outlive the deviation it
554
+ * excuses. `subject` is the parameter or field the finding names; absent for a whole-operation finding.
555
+ */
556
+ export const ModuleManifestProviderOpenApiDeviationSchema = z.strictObject({
557
+ operationId: z.string().min(1),
558
+ finding: z.enum(ProviderOpenApiFindingKind),
559
+ subject: z.string().min(1).optional(),
560
+ reason: z.string().min(1),
561
+ });
562
+ /**
563
+ * The vendor's own OpenAPI description a module's operations are checked against at publish (#2028).
564
+ *
565
+ * - `url` must not move: a commit-pinned raw URL, or a versioned path. The check is a statement about one document,
566
+ * and a URL that changes under it would make the same commit pass on Monday and fail on Tuesday. Watching for a NEW
567
+ * description is #2027's, a different question.
568
+ * - `revision` is the description's own `info.version`, as read when the module was checked. Publish refuses a
569
+ * document reporting another. That catches a moved URL only when the vendor bumps its version, and many never do
570
+ * (Asana's is `1.0`), so it is not what keeps the URL fixed: the URL is. Publish refuses a GitHub raw URL on a
571
+ * branch rather than a commit, the common way such a URL moves.
572
+ *
573
+ * Optional: about a quarter of the archived vendors had an official description at all. A module without one is
574
+ * checked by its live proof only.
575
+ */
576
+ export const ModuleManifestProviderOpenApiSchema = z.strictObject({
577
+ url: z.url({ protocol: /^https$/ }),
578
+ revision: z.string().min(1),
579
+ deviations: z.array(ModuleManifestProviderOpenApiDeviationSchema).optional(),
580
+ });
434
581
  /**
435
582
  * The tiers a PROVIDER module may declare. MAIN is the engine's own set: its origin is always ENGINE,
436
583
  * and the tier rule (`provider-tier-rule.shared.utils.ts`) refuses MAIN from anywhere else.
@@ -447,8 +594,8 @@ const PROVIDER_MODULE_TIERS = [ProviderTier.CATALOGUE, ProviderTier.EXTENSION];
447
594
  * (`BackendProviderModule`), which discovery already reads. Publish checks that this block agrees
448
595
  * with that code (#2014).
449
596
  *
450
- * Fields for per-provider skills, OpenAPI binding and change monitoring are added by the issues that
451
- * read them (#2026, #2028, #2027), not before.
597
+ * The OpenAPI binding is `openApi` (#2028); a field for change monitoring is added by the issue that reads it (#2027),
598
+ * not before. Per-provider skills are `skills` (#2026).
452
599
  */
453
600
  export const ModuleManifestProviderSchema = z
454
601
  .strictObject({
@@ -481,10 +628,68 @@ export const ModuleManifestProviderSchema = z
481
628
  .optional(),
482
629
  }),
483
630
  maturity: z.enum(ProviderModuleMaturity),
631
+ /** Present exactly when `maturity` is `proven`: where the proof is and what it covered. See {@link ModuleManifestProviderProofSchema}. */
632
+ proof: ModuleManifestProviderProofSchema.optional(),
633
+ /** The vendor's OpenAPI description the operations are checked against at publish. See {@link ModuleManifestProviderOpenApiSchema}. */
634
+ openApi: ModuleManifestProviderOpenApiSchema.optional(),
484
635
  /** Where the adopted source came from, when it came from a catalogue seed. */
485
636
  seed: ProviderCatalogueProvenanceSchema.optional(),
637
+ /**
638
+ * Present when the module is an AUGMENTATION (#1672, #2022): it adds OPERATIONS to the provider `augments` names,
639
+ * owned by the engine or by another package, and owns nothing else. The base keeps its identity, base URL,
640
+ * credential, OAuth2 block and connections, so an augmentation module:
641
+ * - ships the backend facet only (its operations run where the base's do);
642
+ * - is tier CATALOGUE and declares no provider capabilities (it binds no engine slot);
643
+ * - exports `providerAugmentations` from its backend facet instead of a `backendProviderFragment`.
644
+ *
645
+ * `ref` still names the module: its directory under `providers/` and its package name. Installing it adds
646
+ * nothing to the base until the application opts it in under `providers.augmentations.<augments>`.
647
+ */
648
+ augments: z.string().regex(MODULE_REGISTRATION_MODULE_ID_PATTERN).optional(),
649
+ /**
650
+ * The skills the module ships (#2026), each a folder `skills/<id>/SKILL.md` inside the module. Installing the module
651
+ * installs them into the application's `.claude/skills/` (the skills sync reads the application's `providers/` tree),
652
+ * and removing it removes them. Read by `wildo registry add` / `update`, which run the skills sync when a provider
653
+ * carries skills, and by publish, which holds this list equal to the folders. An id is `provider-<ref>` or
654
+ * `provider-<ref>-<topic>`.
655
+ */
656
+ skills: z.array(z.string().regex(MODULE_REGISTRATION_MODULE_ID_PATTERN)).optional(),
486
657
  })
487
658
  .superRefine((provider, context) => {
659
+ if (provider.maturity === ProviderModuleMaturity.PROVEN && provider.proof === undefined) {
660
+ context.addIssue({ code: 'custom', path: ['proof'], message: 'a `proven` provider names its proof: the tracker issue that records the run, the day, and the operations it called' });
661
+ }
662
+ if (provider.maturity !== ProviderModuleMaturity.PROVEN && provider.proof !== undefined) {
663
+ context.addIssue({ code: 'custom', path: ['maturity'], message: 'a provider with a proof is `proven`; one that has not met its vendor carries no proof' });
664
+ }
665
+ const provenOperations = provider.proof?.operations ?? [];
666
+ if (new Set(provenOperations).size !== provenOperations.length) {
667
+ context.addIssue({ code: 'custom', path: ['proof', 'operations'], message: 'each proven operation is listed once' });
668
+ }
669
+ const skills = provider.skills ?? [];
670
+ if (new Set(skills).size !== skills.length) {
671
+ context.addIssue({ code: 'custom', path: ['skills'], message: 'each skill is listed once' });
672
+ }
673
+ for (const [index, skill] of skills.entries()) {
674
+ if (skill !== `provider-${provider.ref}` && !skill.startsWith(`provider-${provider.ref}-`)) {
675
+ context.addIssue({ code: 'custom', path: ['skills', index], message: `a skill of provider "${provider.ref}" is named "provider-${provider.ref}" or "provider-${provider.ref}-<topic>"` });
676
+ }
677
+ }
678
+ if (provider.augments !== undefined) {
679
+ const facets = providerModuleFacets(provider);
680
+ if (facets.length !== 1 || facets[0] !== ProviderModuleFacet.BACKEND) {
681
+ context.addIssue({ code: 'custom', path: ['facets'], message: 'an augmentation ships the backend facet only: its operations run where the base provider runs' });
682
+ }
683
+ if (provider.tier !== ProviderTier.CATALOGUE) {
684
+ context.addIssue({ code: 'custom', path: ['tier'], message: 'an augmentation is tier CATALOGUE: it adds operations and binds no engine slot' });
685
+ }
686
+ if (provider.providerCapabilities.length > 0) {
687
+ context.addIssue({ code: 'custom', path: ['providerCapabilities'], message: 'an augmentation declares no provider capabilities: the base provider owns them' });
688
+ }
689
+ if (provider.augments === provider.ref) {
690
+ context.addIssue({ code: 'custom', path: ['augments'], message: 'an augmentation names another provider: its own ref is the module\'s, the base is the one it adds operations to' });
691
+ }
692
+ }
488
693
  if (providerModuleFacets(provider).length === 0) {
489
694
  context.addIssue({ code: 'custom', path: ['facets'], message: 'a provider module ships a backend facet, a frontend facet, or both' });
490
695
  }
@@ -537,8 +742,18 @@ export const MODULE_MANIFEST_FILE_NAME = 'wildo.module.json';
537
742
  export const ModuleManifestSchema = z.object({
538
743
  id: ModuleIdSchema,
539
744
  version: SemverExact,
540
- /** What the module is. Absent reads as FEATURE: every module published before #2014 is one. */
541
- kind: z.enum(ModuleKind).default(ModuleKind.FEATURE),
745
+ /**
746
+ * What the module is. Absent reads as FEATURE: every module published before #2014 is one.
747
+ *
748
+ * A kind this CLI does not know is a module published by a NEWER framework (`blueprint` reached CLIs that had only
749
+ * `feature` and `provider`, #2861). It refuses with the upgrade to make, not a schema dump: nothing about the module
750
+ * is wrong, the reader is old.
751
+ */
752
+ kind: z.enum(ModuleKind, {
753
+ // Shared by the CLI and the registry server, so it names the reader generically and the CLI's upgrade as an example.
754
+ error: (issue) => `module kind '${String(issue.input)}' is not known to this version of the Wildo CLI or registry (it knows ${Object.values(ModuleKind).join(', ')}); `
755
+ + 'the module comes from a newer framework: upgrade the reader (for the CLI, `wildo update`)',
756
+ }).default(ModuleKind.FEATURE),
542
757
  /** Present exactly when `kind` is PROVIDER. */
543
758
  provider: ModuleManifestProviderSchema.optional(),
544
759
  description: z.string().optional(),
@@ -556,6 +771,17 @@ export const ModuleManifestSchema = z.object({
556
771
  */
557
772
  meta: z.record(z.string().min(1), z.unknown()).optional(),
558
773
  }).catchall(z.unknown()).superRefine((manifest, context) => {
774
+ if (manifest.kind === ModuleKind.BLUEPRINT) {
775
+ // A blueprint's content is its own artifact (`blueprint.json`), read by `wildo init --blueprint`; a manifest that
776
+ // also declared boundaries or a registration would be telling a module install what to write.
777
+ if (manifest.boundaries !== undefined)
778
+ context.addIssue({ code: 'custom', path: ['boundaries'], message: 'a blueprint declares no boundaries: its content is its blueprint.json' });
779
+ if (manifest.registration !== undefined)
780
+ context.addIssue({ code: 'custom', path: ['registration'], message: 'a blueprint carries no registration' });
781
+ if (manifest.provider !== undefined)
782
+ context.addIssue({ code: 'custom', path: ['provider'], message: 'only a module of kind `provider` carries a provider block' });
783
+ return;
784
+ }
559
785
  const providerBoundaries = manifest.boundaries?.providers ?? [];
560
786
  if (manifest.kind !== ModuleKind.PROVIDER) {
561
787
  if (manifest.provider !== undefined) {