@wildo-ai/platform-config-lib 1.1.5 → 1.1.6

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 (138) hide show
  1. package/dist/esm/bootstrap/bootstrap.contracts.d.ts +3 -2
  2. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  3. package/dist/esm/bootstrap/bootstrap.contracts.js +3 -2
  4. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  5. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +47 -0
  6. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  7. package/dist/esm/bootstrap/bootstrap.schemas.js +8 -0
  8. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  9. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +12 -1
  10. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  11. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +12 -0
  12. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  13. package/dist/esm/bootstrap/platform-store-preconnect.d.ts +37 -0
  14. package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -0
  15. package/dist/esm/bootstrap/platform-store-preconnect.js +43 -0
  16. package/dist/esm/bootstrap/platform-store-preconnect.js.map +1 -0
  17. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
  18. package/dist/esm/bootstrap/runtime-backing-service-access.js +8 -4
  19. package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -1
  20. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts +36 -3
  21. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
  22. package/dist/esm/bootstrap/runtime-topology.contracts.js +36 -13
  23. package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
  24. package/dist/esm/index.d.ts +1 -0
  25. package/dist/esm/index.d.ts.map +1 -1
  26. package/dist/esm/index.js +1 -0
  27. package/dist/esm/index.js.map +1 -1
  28. package/dist/esm/lockfile/lockfile-io.d.ts +7 -1
  29. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  30. package/dist/esm/lockfile/lockfile-io.js +17 -3
  31. package/dist/esm/lockfile/lockfile-io.js.map +1 -1
  32. package/dist/esm/lockfile/materialize-infra-section.d.ts +27 -6
  33. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  34. package/dist/esm/lockfile/materialize-infra-section.js +23 -10
  35. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  36. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +455 -6
  37. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  38. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +27 -0
  39. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  40. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts +13 -0
  41. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -0
  42. package/dist/esm/project-config/application-public-pricing-catalog.loader.js +56 -0
  43. package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -0
  44. package/dist/esm/project-config/define-infra-env-config.d.ts +0 -27
  45. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  46. package/dist/esm/project-config/define-infra-env-config.js +0 -2
  47. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  48. package/dist/esm/project-config/define-saas-config.d.ts +52 -0
  49. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  50. package/dist/esm/project-config/define-saas-config.js +65 -15
  51. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  52. package/dist/esm/project-config/index.d.ts +3 -0
  53. package/dist/esm/project-config/index.d.ts.map +1 -1
  54. package/dist/esm/project-config/index.js +3 -0
  55. package/dist/esm/project-config/index.js.map +1 -1
  56. package/dist/esm/project-config/loader.d.ts +11 -0
  57. package/dist/esm/project-config/loader.d.ts.map +1 -1
  58. package/dist/esm/project-config/loader.js +34 -7
  59. package/dist/esm/project-config/loader.js.map +1 -1
  60. package/dist/esm/project-config/npm-version-range.d.ts +23 -0
  61. package/dist/esm/project-config/npm-version-range.d.ts.map +1 -0
  62. package/dist/esm/project-config/npm-version-range.js +175 -0
  63. package/dist/esm/project-config/npm-version-range.js.map +1 -0
  64. package/dist/esm/project-config/provider-companion-discovery.d.ts +256 -30
  65. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  66. package/dist/esm/project-config/provider-companion-discovery.js +719 -40
  67. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  68. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +125 -2
  69. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  70. package/dist/esm/project-config/provider-runtime-artifacts.js +283 -66
  71. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  72. package/dist/esm/project-config/shared/backing-service-servability.d.ts +157 -0
  73. package/dist/esm/project-config/shared/backing-service-servability.d.ts.map +1 -0
  74. package/dist/esm/project-config/shared/backing-service-servability.js +256 -0
  75. package/dist/esm/project-config/shared/backing-service-servability.js.map +1 -0
  76. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +62 -67
  77. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  78. package/dist/esm/project-config/shared/backing-services.schemas.js +71 -68
  79. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  80. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
  81. package/dist/esm/project-config/shared/csp-emit.js +41 -2
  82. package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
  83. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +180 -4
  84. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
  85. package/dist/esm/project-config/shared/infra-providers.schemas.js +40 -0
  86. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
  87. package/dist/esm/project-config/static-asset-import-noop.d.ts +26 -0
  88. package/dist/esm/project-config/static-asset-import-noop.d.ts.map +1 -0
  89. package/dist/esm/project-config/static-asset-import-noop.js +49 -0
  90. package/dist/esm/project-config/static-asset-import-noop.js.map +1 -0
  91. package/dist/esm/registry/companion-api.schemas.d.ts +0 -176
  92. package/dist/esm/registry/companion-api.schemas.d.ts.map +0 -1
  93. package/dist/esm/registry/companion-api.schemas.js.map +0 -1
  94. package/dist/esm/registry/index.d.ts +3 -1
  95. package/dist/esm/registry/index.d.ts.map +1 -1
  96. package/dist/esm/registry/index.js +3 -1
  97. package/dist/esm/registry/index.js.map +1 -1
  98. package/dist/esm/registry/local-checkout-source.d.ts +31 -0
  99. package/dist/esm/registry/local-checkout-source.d.ts.map +1 -0
  100. package/dist/esm/registry/local-checkout-source.js +45 -0
  101. package/dist/esm/registry/local-checkout-source.js.map +1 -0
  102. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +174 -14
  103. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  104. package/dist/esm/registry/lockfile-modules-section.schemas.js +120 -11
  105. package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -1
  106. package/dist/esm/registry/module-artifact.schemas.d.ts +79 -0
  107. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  108. package/dist/esm/registry/module-artifact.schemas.js +36 -0
  109. package/dist/esm/registry/module-artifact.schemas.js.map +1 -1
  110. package/dist/esm/registry/module-manifest.schemas.d.ts +393 -7
  111. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  112. package/dist/esm/registry/module-manifest.schemas.js +488 -40
  113. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  114. package/dist/esm/registry/module-search.schemas.d.ts +80 -0
  115. package/dist/esm/registry/module-search.schemas.d.ts.map +1 -0
  116. package/dist/esm/registry/module-search.schemas.js +112 -0
  117. package/dist/esm/registry/module-search.schemas.js.map +1 -0
  118. package/dist/esm/registry/registry-config.schemas.d.ts +16 -0
  119. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
  120. package/dist/esm/registry/registry-config.schemas.js +8 -0
  121. package/dist/esm/registry/registry-config.schemas.js.map +1 -1
  122. package/dist/esm/registry/registry-errors.d.ts +126 -2
  123. package/dist/esm/registry/registry-errors.d.ts.map +1 -1
  124. package/dist/esm/registry/registry-errors.js +183 -14
  125. package/dist/esm/registry/registry-errors.js.map +1 -1
  126. package/dist/esm/registry/registry-keys.schemas.d.ts +80 -0
  127. package/dist/esm/registry/registry-keys.schemas.d.ts.map +1 -0
  128. package/dist/esm/registry/registry-keys.schemas.js +68 -0
  129. package/dist/esm/registry/registry-keys.schemas.js.map +1 -0
  130. package/dist/esm/registry/registry-section-schemas.constants.d.ts +25 -3
  131. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  132. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts +13 -11
  133. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
  134. package/dist/esm/workspace-scope/workspace-homes.schemas.js +2 -2
  135. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
  136. package/package.json +7 -7
  137. package/dist/esm/registry/companion-api.schemas.js +0 -165
  138. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -26,6 +26,28 @@ export declare const ModuleVersionRecordSchema: z.ZodObject<{
26
26
  manifest: z.ZodObject<{
27
27
  id: z.ZodString;
28
28
  version: z.ZodString;
29
+ kind: z.ZodDefault<z.ZodEnum<typeof import("./module-manifest.schemas").ModuleKind>>;
30
+ provider: z.ZodOptional<z.ZodObject<{
31
+ ref: z.ZodString;
32
+ vendor: z.ZodOptional<z.ZodString>;
33
+ tier: z.ZodEnum<{
34
+ EXTENSION: import("@wildo-ai/saas-models").ProviderTier.EXTENSION;
35
+ CATALOGUE: import("@wildo-ai/saas-models").ProviderTier.CATALOGUE;
36
+ }>;
37
+ providerCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
38
+ facets: z.ZodObject<{
39
+ backend: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
40
+ frontend: z.ZodOptional<z.ZodObject<{
41
+ surfaces: z.ZodArray<z.ZodEnum<typeof import("@wildo-ai/saas-models").AppFrontendType>>;
42
+ }, z.core.$strict>>;
43
+ }, z.core.$strict>;
44
+ maturity: z.ZodEnum<typeof import("./module-manifest.schemas").ProviderModuleMaturity>;
45
+ seed: z.ZodOptional<z.ZodObject<{
46
+ source: z.ZodEnum<typeof import("@wildo-ai/saas-models").ProviderCatalogueSource>;
47
+ sourceRef: z.ZodString;
48
+ sourceVersion: z.ZodString;
49
+ }, z.core.$strip>>;
50
+ }, z.core.$strict>>;
29
51
  description: z.ZodOptional<z.ZodString>;
30
52
  longDescription: z.ZodOptional<z.ZodString>;
31
53
  engine: z.ZodOptional<z.ZodObject<{
@@ -38,6 +60,7 @@ export declare const ModuleVersionRecordSchema: z.ZodObject<{
38
60
  backend: z.ZodDefault<z.ZodArray<z.ZodString>>;
39
61
  minions: z.ZodDefault<z.ZodArray<z.ZodString>>;
40
62
  workers: z.ZodDefault<z.ZodArray<z.ZodString>>;
63
+ providers: z.ZodDefault<z.ZodArray<z.ZodString>>;
41
64
  }, z.core.$strict>>;
42
65
  dependsOn: z.ZodOptional<z.ZodObject<{
43
66
  modules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -47,6 +70,24 @@ export declare const ModuleVersionRecordSchema: z.ZodObject<{
47
70
  }, z.core.$strict>>;
48
71
  capabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
49
72
  }, z.core.$strict>>;
73
+ registration: z.ZodOptional<z.ZodObject<{
74
+ scenario: z.ZodEnum<typeof import("./module-manifest.schemas").ModuleRegistrationScenario>;
75
+ moduleId: z.ZodString;
76
+ moduleCamel: z.ZodString;
77
+ layers: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof import("./module-manifest.schemas").DomainModuleLayer>>>;
78
+ providerWiring: z.ZodOptional<z.ZodObject<{
79
+ backendPackage: z.ZodOptional<z.ZodString>;
80
+ backendOwners: z.ZodArray<z.ZodObject<{
81
+ serviceKey: z.ZodString;
82
+ path: z.ZodString;
83
+ }, z.core.$strict>>;
84
+ frontendPackage: z.ZodOptional<z.ZodString>;
85
+ frontendOwners: z.ZodArray<z.ZodObject<{
86
+ serviceKey: z.ZodString;
87
+ path: z.ZodString;
88
+ }, z.core.$strict>>;
89
+ }, z.core.$strict>>;
90
+ }, z.core.$strict>>;
50
91
  meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
51
92
  }, z.core.$catchall<z.ZodUnknown>>;
52
93
  /** Engine-`FILES`-resource id of the artifact zip in storage. */
@@ -76,6 +117,19 @@ export declare const ModuleVersionRecordSchema: z.ZodObject<{
76
117
  signatures: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
77
118
  }, z.core.$strict>;
78
119
  export type ModuleVersionRecord = z.infer<typeof ModuleVersionRecordSchema>;
120
+ /**
121
+ * A yanked release is still served by EXACT version (#1758): an application whose lockfile pins it
122
+ * must be able to reinstall. The artifact download then carries the yank in these two headers, and the
123
+ * resolve response carries it as {@link RegistryYankNoticeSchema}, so a client can warn.
124
+ * The reason is free text, so it travels percent-encoded (`encodeURIComponent`) — never raw in a header.
125
+ */
126
+ export declare const REGISTRY_YANKED_AT_HEADER = "x-wildo-yanked-at";
127
+ export declare const REGISTRY_YANK_REASON_HEADER = "x-wildo-yank-reason";
128
+ export declare const RegistryYankNoticeSchema: z.ZodObject<{
129
+ yankedAt: z.ZodISODateTime;
130
+ reason: z.ZodOptional<z.ZodString>;
131
+ }, z.core.$strip>;
132
+ export type RegistryYankNotice = z.infer<typeof RegistryYankNoticeSchema>;
79
133
  /**
80
134
  * 7th-pass S-M3: wire schema for the `PUT /v1/registry/:domain/modules/:moduleId/tags/:tag`
81
135
  * response. Documented so future CLI consumers can Zod-parse it
@@ -91,4 +145,29 @@ export declare const SetTagResponseSchema: z.ZodObject<{
91
145
  noChange: z.ZodOptional<z.ZodBoolean>;
92
146
  }, z.core.$strip>;
93
147
  export type SetTagResponse = z.infer<typeof SetTagResponseSchema>;
148
+ /**
149
+ * `GET /v1/auth/whoami` on the REGISTRY SERVER — the identity a bearer key resolves to, read by
150
+ * `wildo registry login` and `whoami --verify`. The CLI Zod-parses every required field so a misconfigured registry
151
+ * that omits `organizationId` cannot persist a credential with `org=?`.
152
+ *
153
+ * `roles` is optional because not every registry deployment models
154
+ * roles today; when supplied it lands on the per-machine credential
155
+ * blob for staleness UX.
156
+ *
157
+ * 4th-pass review M5: the schema is `.object({...})` (NOT `.strictObject`)
158
+ * so the registry server can add new optional response fields
159
+ * (`tokenIssuedAt`, `lastUsedAt`, etc.) WITHOUT every existing CLI
160
+ * version refusing to authenticate. The CLI still fails-closed on
161
+ * missing required fields; only unknown additional fields are
162
+ * silently dropped on the client side. Forward-compat is the priority
163
+ * here since CLI versions cannot be flushed in lockstep with server
164
+ * deployments.
165
+ */
166
+ export declare const RegistryWhoamiResponseSchema: z.ZodObject<{
167
+ organizationId: z.ZodString;
168
+ apiKeyId: z.ZodString;
169
+ apiKeyName: z.ZodOptional<z.ZodString>;
170
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
171
+ }, z.core.$strip>;
172
+ export type RegistryWhoamiResponse = z.infer<typeof RegistryWhoamiResponseSchema>;
94
173
  //# sourceMappingURL=module-artifact.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module-artifact.schemas.d.ts","sourceRoot":"","sources":["../../../../src/registry/module-artifact.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIpC,iEAAiE;;IAEjE,4DAA4D;;IAE5D,gEAAgE;;;IAGhE;;;;;;;OAOG;;IAEH,6EAA6E;;;IAG7E;;;;OAIG;;kBAEH,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"module-artifact.schemas.d.ts","sourceRoot":"","sources":["../../../../src/registry/module-artifact.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIpC,iEAAiE;;IAEjE,4DAA4D;;IAE5D,gEAAgE;;;IAGhE;;;;;;;OAOG;;IAEH,6EAA6E;;;IAG7E;;;;OAIG;;kBAEH,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAC7D,eAAO,MAAM,2BAA2B,wBAAwB,CAAC;AAEjE,eAAO,MAAM,wBAAwB;;;iBAGnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,4BAA4B;;;;;iBAKvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -52,6 +52,18 @@ export const ModuleVersionRecordSchema = z.strictObject({
52
52
  */
53
53
  signatures: z.array(z.unknown()).optional(),
54
54
  });
55
+ /**
56
+ * A yanked release is still served by EXACT version (#1758): an application whose lockfile pins it
57
+ * must be able to reinstall. The artifact download then carries the yank in these two headers, and the
58
+ * resolve response carries it as {@link RegistryYankNoticeSchema}, so a client can warn.
59
+ * The reason is free text, so it travels percent-encoded (`encodeURIComponent`) — never raw in a header.
60
+ */
61
+ export const REGISTRY_YANKED_AT_HEADER = 'x-wildo-yanked-at';
62
+ export const REGISTRY_YANK_REASON_HEADER = 'x-wildo-yank-reason';
63
+ export const RegistryYankNoticeSchema = z.object({
64
+ yankedAt: z.iso.datetime({ offset: true }),
65
+ reason: z.string().optional(),
66
+ });
55
67
  /**
56
68
  * 7th-pass S-M3: wire schema for the `PUT /v1/registry/:domain/modules/:moduleId/tags/:tag`
57
69
  * response. Documented so future CLI consumers can Zod-parse it
@@ -66,4 +78,28 @@ export const SetTagResponseSchema = z.object({
66
78
  ok: z.boolean(),
67
79
  noChange: z.boolean().optional(),
68
80
  });
81
+ /**
82
+ * `GET /v1/auth/whoami` on the REGISTRY SERVER — the identity a bearer key resolves to, read by
83
+ * `wildo registry login` and `whoami --verify`. The CLI Zod-parses every required field so a misconfigured registry
84
+ * that omits `organizationId` cannot persist a credential with `org=?`.
85
+ *
86
+ * `roles` is optional because not every registry deployment models
87
+ * roles today; when supplied it lands on the per-machine credential
88
+ * blob for staleness UX.
89
+ *
90
+ * 4th-pass review M5: the schema is `.object({...})` (NOT `.strictObject`)
91
+ * so the registry server can add new optional response fields
92
+ * (`tokenIssuedAt`, `lastUsedAt`, etc.) WITHOUT every existing CLI
93
+ * version refusing to authenticate. The CLI still fails-closed on
94
+ * missing required fields; only unknown additional fields are
95
+ * silently dropped on the client side. Forward-compat is the priority
96
+ * here since CLI versions cannot be flushed in lockstep with server
97
+ * deployments.
98
+ */
99
+ export const RegistryWhoamiResponseSchema = z.object({
100
+ organizationId: z.string().min(1),
101
+ apiKeyId: z.string().min(1),
102
+ apiKeyName: z.string().min(1).optional(),
103
+ roles: z.array(z.string().min(1)).optional(),
104
+ });
69
105
  //# sourceMappingURL=module-artifact.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module-artifact.schemas.js","sourceRoot":"","sources":["../../../../src/registry/module-artifact.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,YAAY,CAAC;IACtD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,QAAQ,EAAE,oBAAoB;IAC9B,iEAAiE;IACjE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,4DAA4D;IAC5D,SAAS,EAAE,kBAAkB;IAC7B,gEAAgE;IAChE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACzC,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC7C;;;;;;;OAOG;IACH,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,6EAA6E;IAC7E,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC;;;;OAIG;IACH,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAGH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE;IACf,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC","sourcesContent":["/**\n * Module-artifact schemas — metadata that travels alongside the zip\n * artifact bytes (server-stored ledger rows + CLI `info` payloads\n * + lockfile audit refs).\n *\n * Phase 1 landed the published-version row + integrity descriptor.\n * Phase 3.1-bis aligned the registry server's resource model with the\n * framework's user/org/api-key identity layer: the publish-time\n * identity is now `ApiKeyOrganization._id` only — `ApiKeyOrganization`\n * has no `email` field, and api-keys are typically used by automation\n * (CI/CD), not interactively by a user. The wire schema reflects that\n * decision: `publishedByOrgApiKeyId` replaces the old\n * `publishedBy: { keyId, email }` envelope.\n *\n * Phase 5 install/update verifies `integrity` before unzipping.\n */\n\nimport { z } from 'zod';\nimport { Sha256DigestSchema } from './digest.schemas';\nimport { ModuleManifestSchema } from './module-manifest.schemas';\n\n/**\n * One immutable published version row. Mirrors `RegistryModuleVersion`\n * fields documented in the analysis plan's \"Registry Server Data\n * Model\" section.\n */\nexport const ModuleVersionRecordSchema = z.strictObject({\n moduleId: z.string().min(1),\n version: z.string().min(1),\n manifest: ModuleManifestSchema,\n /** Engine-`FILES`-resource id of the artifact zip in storage. */\n artifactFileId: z.string().min(1),\n /** Required `sha256:<hex>` digest of the artifact bytes. */\n integrity: Sha256DigestSchema,\n /** Total artifact size in bytes (informational + DoS clamp). */\n sizeBytes: z.number().int().nonnegative(),\n publishedAt: z.iso.datetime({ offset: true }),\n /**\n * `ApiKeyOrganization._id` of the api-key used at publish time.\n * The framework's `ApiKeyOrganization` is org-scoped and has no\n * `email` / `userId` field, so the wire identity tracks the\n * api-key only — readers who want richer publisher attribution\n * resolve the api-key against the framework's `ORG_API_KEYS`\n * resource separately.\n */\n publishedByOrgApiKeyId: z.string().min(1),\n /** ISO datetime when the version was yanked. Soft-yank by default (KD-9). */\n yankedAt: z.iso.datetime({ offset: true }).optional(),\n yankReason: z.string().optional(),\n /**\n * Reserved for future signing implementations. Format intentionally\n * left open until the signing decision is taken (deferred per the\n * \"Deferred / Out Of Scope\" section of the plan).\n */\n signatures: z.array(z.unknown()).optional(),\n});\nexport type ModuleVersionRecord = z.infer<typeof ModuleVersionRecordSchema>;\n\n/**\n * 7th-pass S-M3: wire schema for the `PUT /v1/registry/:domain/modules/:moduleId/tags/:tag`\n * response. Documented so future CLI consumers can Zod-parse it\n * without guessing the shape.\n *\n * `noChange: true` signals that the requested `(tag, version)` mapping\n * was already in place — the registry short-circuited the repo write\n * + audit emission to keep SIEM counts honest. Optional so successful\n * mutations omit it. Consumers should treat absence as `false`.\n */\nexport const SetTagResponseSchema = z.object({\n ok: z.boolean(),\n noChange: z.boolean().optional(),\n});\nexport type SetTagResponse = z.infer<typeof SetTagResponseSchema>;\n"]}
1
+ {"version":3,"file":"module-artifact.schemas.js","sourceRoot":"","sources":["../../../../src/registry/module-artifact.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,YAAY,CAAC;IACtD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,QAAQ,EAAE,oBAAoB;IAC9B,iEAAiE;IACjE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,4DAA4D;IAC5D,SAAS,EAAE,kBAAkB;IAC7B,gEAAgE;IAChE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACzC,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC7C;;;;;;;OAOG;IACH,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,6EAA6E;IAC7E,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC;;;;OAIG;IACH,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAGH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;AAC7D,MAAM,CAAC,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;AAEjE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC1C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAGH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE;IACf,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACxC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC","sourcesContent":["/**\n * Module-artifact schemas — metadata that travels alongside the zip\n * artifact bytes (server-stored ledger rows + CLI `info` payloads\n * + lockfile audit refs).\n *\n * Phase 1 landed the published-version row + integrity descriptor.\n * Phase 3.1-bis aligned the registry server's resource model with the\n * framework's user/org/api-key identity layer: the publish-time\n * identity is now `ApiKeyOrganization._id` only — `ApiKeyOrganization`\n * has no `email` field, and api-keys are typically used by automation\n * (CI/CD), not interactively by a user. The wire schema reflects that\n * decision: `publishedByOrgApiKeyId` replaces the old\n * `publishedBy: { keyId, email }` envelope.\n *\n * Phase 5 install/update verifies `integrity` before unzipping.\n */\n\nimport { z } from 'zod';\nimport { Sha256DigestSchema } from './digest.schemas';\nimport { ModuleManifestSchema } from './module-manifest.schemas';\n\n/**\n * One immutable published version row. Mirrors `RegistryModuleVersion`\n * fields documented in the analysis plan's \"Registry Server Data\n * Model\" section.\n */\nexport const ModuleVersionRecordSchema = z.strictObject({\n moduleId: z.string().min(1),\n version: z.string().min(1),\n manifest: ModuleManifestSchema,\n /** Engine-`FILES`-resource id of the artifact zip in storage. */\n artifactFileId: z.string().min(1),\n /** Required `sha256:<hex>` digest of the artifact bytes. */\n integrity: Sha256DigestSchema,\n /** Total artifact size in bytes (informational + DoS clamp). */\n sizeBytes: z.number().int().nonnegative(),\n publishedAt: z.iso.datetime({ offset: true }),\n /**\n * `ApiKeyOrganization._id` of the api-key used at publish time.\n * The framework's `ApiKeyOrganization` is org-scoped and has no\n * `email` / `userId` field, so the wire identity tracks the\n * api-key only — readers who want richer publisher attribution\n * resolve the api-key against the framework's `ORG_API_KEYS`\n * resource separately.\n */\n publishedByOrgApiKeyId: z.string().min(1),\n /** ISO datetime when the version was yanked. Soft-yank by default (KD-9). */\n yankedAt: z.iso.datetime({ offset: true }).optional(),\n yankReason: z.string().optional(),\n /**\n * Reserved for future signing implementations. Format intentionally\n * left open until the signing decision is taken (deferred per the\n * \"Deferred / Out Of Scope\" section of the plan).\n */\n signatures: z.array(z.unknown()).optional(),\n});\nexport type ModuleVersionRecord = z.infer<typeof ModuleVersionRecordSchema>;\n\n/**\n * A yanked release is still served by EXACT version (#1758): an application whose lockfile pins it\n * must be able to reinstall. The artifact download then carries the yank in these two headers, and the\n * resolve response carries it as {@link RegistryYankNoticeSchema}, so a client can warn.\n * The reason is free text, so it travels percent-encoded (`encodeURIComponent`) — never raw in a header.\n */\nexport const REGISTRY_YANKED_AT_HEADER = 'x-wildo-yanked-at';\nexport const REGISTRY_YANK_REASON_HEADER = 'x-wildo-yank-reason';\n\nexport const RegistryYankNoticeSchema = z.object({\n yankedAt: z.iso.datetime({ offset: true }),\n reason: z.string().optional(),\n});\nexport type RegistryYankNotice = z.infer<typeof RegistryYankNoticeSchema>;\n\n/**\n * 7th-pass S-M3: wire schema for the `PUT /v1/registry/:domain/modules/:moduleId/tags/:tag`\n * response. Documented so future CLI consumers can Zod-parse it\n * without guessing the shape.\n *\n * `noChange: true` signals that the requested `(tag, version)` mapping\n * was already in place — the registry short-circuited the repo write\n * + audit emission to keep SIEM counts honest. Optional so successful\n * mutations omit it. Consumers should treat absence as `false`.\n */\nexport const SetTagResponseSchema = z.object({\n ok: z.boolean(),\n noChange: z.boolean().optional(),\n});\nexport type SetTagResponse = z.infer<typeof SetTagResponseSchema>;\n\n/**\n * `GET /v1/auth/whoami` on the REGISTRY SERVER — the identity a bearer key resolves to, read by\n * `wildo registry login` and `whoami --verify`. The CLI Zod-parses every required field so a misconfigured registry\n * that omits `organizationId` cannot persist a credential with `org=?`.\n *\n * `roles` is optional because not every registry deployment models\n * roles today; when supplied it lands on the per-machine credential\n * blob for staleness UX.\n *\n * 4th-pass review M5: the schema is `.object({...})` (NOT `.strictObject`)\n * so the registry server can add new optional response fields\n * (`tokenIssuedAt`, `lastUsedAt`, etc.) WITHOUT every existing CLI\n * version refusing to authenticate. The CLI still fails-closed on\n * missing required fields; only unknown additional fields are\n * silently dropped on the client side. Forward-compat is the priority\n * here since CLI versions cannot be flushed in lockstep with server\n * deployments.\n */\nexport const RegistryWhoamiResponseSchema = z.object({\n organizationId: z.string().min(1),\n apiKeyId: z.string().min(1),\n apiKeyName: z.string().min(1).optional(),\n roles: z.array(z.string().min(1)).optional(),\n});\nexport type RegistryWhoamiResponse = z.infer<typeof RegistryWhoamiResponseSchema>;\n"]}
@@ -16,6 +16,7 @@
16
16
  * downstream by Phase 5+ verification, not the manifest itself.
17
17
  */
18
18
  import { z } from 'zod';
19
+ import { AppFrontendType, ProviderTier, type EngineCapability } from '@wildo-ai/saas-models';
19
20
  /**
20
21
  * Exact `MAJOR.MINOR.PATCH[-prerelease][+build]` semver. The regex
21
22
  * mirrors the official semver.org grammar, so manifest authors
@@ -71,15 +72,75 @@ export declare const ModuleManifestEngineSchema: z.ZodObject<{
71
72
  framework: z.ZodString;
72
73
  }, z.core.$strict>;
73
74
  export type ModuleManifestEngine = z.infer<typeof ModuleManifestEngineSchema>;
75
+ /** A registry domain slug (`acme`, `internal`) — one {@link isRegistryNameSegment} segment. */
76
+ export declare const RegistryDomainSlugSchema: z.ZodString;
77
+ /** Whether `moduleId` is a well-formed `<scope>/<name>` module id. */
78
+ export declare function isModuleId(moduleId: string): boolean;
74
79
  /**
75
- * `boundaries` — the per-layer surface the module is allowed to
76
- * write into the host app source (KD-12). Paths are relative to the
77
- * saas root; install rejects artifacts that attempt to write outside
78
- * any declared boundary.
80
+ * A module id: exactly `<scope>/<name>` (e.g. `acme/billing`), each half a registry name segment.
81
+ * The id is also the lockfile key, the registry URL segment, and — through the CLI — a directory
82
+ * path, so its shape is the path-safety rule, not a style preference.
83
+ */
84
+ export declare const ModuleIdSchema: z.ZodString;
85
+ /**
86
+ * Where each layer's MODULE directories live in a Wildo SaaS application, relative to its root.
87
+ *
88
+ * Derived from the scaffold, not invented: the `add-module` scenario creates a module's directories
89
+ * under `shared-lib/src/modules/<id>`, `specifications/src/modules/<id>`, `frontend/src/modules/<id>`
90
+ * and `backend-api/src/modules/<id>`; `add-minion` and `add-worker-node` create a package directory
91
+ * under `minions/<dir>` and `workers/<dir>`.
92
+ *
93
+ * A registry module may write only BELOW one of these roots, in a directory it names. That is the
94
+ * whole of KD-12, stated positively. Until 2026-09-25 the boundary rule refused only absolute paths
95
+ * and `..` segments, so `.`, `.git/hooks`, `.wildo-saas` and `wildo.saas.config.ts` were all valid
96
+ * boundaries: a published module could overwrite the host's configuration or plant a git hook, and
97
+ * `wildo registry publish` would ship the author's `.env` and `secrets.json`.
98
+ */
99
+ export declare const MODULE_BOUNDARY_LAYER_ROOTS: {
100
+ readonly specifications: "specifications/src/modules";
101
+ readonly shared: "shared-lib/src/modules";
102
+ readonly frontend: "frontend/src/modules";
103
+ readonly backend: "backend-api/src/modules";
104
+ readonly minions: "minions";
105
+ readonly workers: "workers";
106
+ /**
107
+ * A PROVIDER module's directory, `providers/<ref>` (#2014), holding one workspace package per facet
108
+ * (`providers/<ref>/backend`, `providers/<ref>/frontend`). Like a minion or a worker, each facet is its
109
+ * own package, so the root is a top-level directory rather than a layer's `src/modules`: the facet's own
110
+ * `package.json` is where its vendor SDK dependency lives, and a runtime depends only on the facet it runs.
111
+ */
112
+ readonly providers: "providers";
113
+ };
114
+ export type ModuleBoundaryLayer = keyof typeof MODULE_BOUNDARY_LAYER_ROOTS;
115
+ /** Every boundary layer, in the canonical order of {@link MODULE_BOUNDARY_LAYER_ROOTS}. */
116
+ export declare const MODULE_BOUNDARY_LAYERS: ModuleBoundaryLayer[];
117
+ /**
118
+ * Whether `appRelativePath` (POSIX separators, relative to the application root) may be carried by a
119
+ * module artifact. Used on BOTH sides of the registry so they cannot disagree:
79
120
  *
80
- * Each layer is optional; modules typically declare only the layers
81
- * they actually contain (a backend-only module declares `backend`
82
- * + `shared` and omits `frontend` / `specifications`).
121
+ * - `wildo registry publish` skips a file that fails it, so a secret beside the module's source is
122
+ * never packed;
123
+ * - `wildo registry add` / `update` / `repair` refuse an artifact containing one, before writing
124
+ * anything — a correctly published artifact cannot contain it, so its presence means the bytes
125
+ * did not come from `publish`.
126
+ */
127
+ export declare function isModuleArtifactPathAllowed(appRelativePath: string): boolean;
128
+ /**
129
+ * Whether `appRelativePath` is a file a registry module can OWN in an application: a path a module
130
+ * artifact may carry ({@link isModuleArtifactPathAllowed}) that also sits strictly below one of the
131
+ * layer roots ({@link MODULE_BOUNDARY_LAYER_ROOTS}) — because an install only ever writes inside a
132
+ * boundary, and every boundary lives there.
133
+ *
134
+ * This is the rule for a path RECORDED as installed (`sections.modules.installed[*].files`), which
135
+ * `remove` and `update` delete. `isModuleArtifactPathAllowed` alone would let a hand-edited or badly
136
+ * merged entry name `wildo.saas.config.ts` or `backend-api/src/index.ts`, and removing the module would
137
+ * then delete the application's own file.
138
+ */
139
+ export declare function isModuleOwnedFilePath(appRelativePath: string): boolean;
140
+ /**
141
+ * `boundaries` — the per-layer surface the module is allowed to write into the host app source
142
+ * (KD-12). Each layer is optional; modules typically declare only the layers they actually contain
143
+ * (a backend-only module declares `backend` + `shared` and omits `frontend` / `specifications`).
83
144
  */
84
145
  export declare const ModuleManifestBoundariesSchema: z.ZodObject<{
85
146
  specifications: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -88,8 +149,265 @@ export declare const ModuleManifestBoundariesSchema: z.ZodObject<{
88
149
  backend: z.ZodDefault<z.ZodArray<z.ZodString>>;
89
150
  minions: z.ZodDefault<z.ZodArray<z.ZodString>>;
90
151
  workers: z.ZodDefault<z.ZodArray<z.ZodString>>;
152
+ providers: z.ZodDefault<z.ZodArray<z.ZodString>>;
91
153
  }, z.core.$strict>;
92
154
  export type ModuleManifestBoundaries = z.infer<typeof ModuleManifestBoundariesSchema>;
155
+ /**
156
+ * The boundaries schema declares every layer of {@link MODULE_BOUNDARY_LAYER_ROOTS} and nothing else: a
157
+ * root added without its boundaries key (or the reverse) fails to compile here.
158
+ */
159
+ export declare const BOUNDARIES_SCHEMA_COVERS_EVERY_LAYER: [keyof ModuleManifestBoundaries] extends [ModuleBoundaryLayer] ? [ModuleBoundaryLayer] extends [keyof ModuleManifestBoundaries] ? true : never : never;
160
+ /**
161
+ * Every boundary directory a manifest declares, across ALL layers, in canonical layer order.
162
+ *
163
+ * The one place a consumer turns `boundaries` into a list. Three consumers (the packager, `publish`, the
164
+ * install fan-out) each used to spell the six layers out by hand, so a seventh layer — `providers`,
165
+ * #2014 — would have been silently skipped by all three: an artifact that packs nothing, an install that
166
+ * copies nothing, and a publish that reports success. Iterating the roots makes the next layer impossible
167
+ * to forget.
168
+ */
169
+ export declare function flattenModuleBoundaries(boundaries: ModuleManifestBoundaries | undefined): string[];
170
+ /**
171
+ * How an installed module is REGISTERED in the host application — the composition scenario whose
172
+ * registry edits make it a module the application knows about (#1755, #1773).
173
+ *
174
+ * Installing copies a module's files; registering it adds it to what the application declares. Without
175
+ * registration the backend discovers `backend-api/src/modules/<dir>` by directory scan while every other
176
+ * layer ignores the module, and a minion or worker is never declared at all, so it never runs.
177
+ *
178
+ * Each member is the framework scenario that IS the declaration of how that shape is registered, so
179
+ * installation replays its edit steps rather than keeping a second copy of them:
180
+ */
181
+ export declare enum ModuleRegistrationScenario {
182
+ /** A domain module — its shared, specifications and frontend registries and `applicationModules`. */
183
+ ADD_MODULE = "add-module",
184
+ /** A minion — `applicationMinions`, its provider scope, and the pnpm workspace member. */
185
+ ADD_MINION = "add-minion",
186
+ /** A worker node — `applicationWorkers`, its provider scope, and the pnpm workspace member. */
187
+ ADD_WORKER_NODE = "add-worker-node",
188
+ /**
189
+ * A provider module (#2014): the pnpm workspace member, each facet package as a `workspace:*` dependency of the
190
+ * runtimes that own that facet, and the provider's scope in each. Unlike the three above it is never carried by a
191
+ * MANIFEST: the owners are the INSTALLING application's, so the installer derives the wiring and only its lockfile
192
+ * records it ({@link ProviderWiringSchema}).
193
+ */
194
+ ADD_PROVIDER_PACKAGE = "add-provider-package"
195
+ }
196
+ /** One runtime a provider facet was wired into: its key in `services`, and its directory. */
197
+ export declare const ProviderWiringOwnerSchema: z.ZodObject<{
198
+ serviceKey: z.ZodString;
199
+ path: z.ZodString;
200
+ }, z.core.$strict>;
201
+ export type ProviderWiringOwner = z.infer<typeof ProviderWiringOwnerSchema>;
202
+ /**
203
+ * What an `add-provider-package` install wired, as the INSTALLER derived it from its own application (#2014):
204
+ * - `backendOwners`: the backend services that depend on the backend facet and scope the provider;
205
+ * - `frontendOwners`: the frontend services, of a type in the facet's `surfaces`, that depend on the browser facet
206
+ * and scope the provider.
207
+ *
208
+ * Recorded so `remove` reverses exactly what install wrote, even after the application's services change.
209
+ */
210
+ export declare const ProviderWiringSchema: z.ZodObject<{
211
+ /** The backend facet's package name as installed (`@<scope>/provider-<ref>`); absent without a backend facet. */
212
+ backendPackage: z.ZodOptional<z.ZodString>;
213
+ backendOwners: z.ZodArray<z.ZodObject<{
214
+ serviceKey: z.ZodString;
215
+ path: z.ZodString;
216
+ }, z.core.$strict>>;
217
+ /** The browser facet's package name as installed; absent without a frontend facet. */
218
+ frontendPackage: z.ZodOptional<z.ZodString>;
219
+ frontendOwners: z.ZodArray<z.ZodObject<{
220
+ serviceKey: z.ZodString;
221
+ path: z.ZodString;
222
+ }, z.core.$strict>>;
223
+ }, z.core.$strict>;
224
+ export type ProviderWiring = z.infer<typeof ProviderWiringSchema>;
225
+ /**
226
+ * The four layers of a domain module, named as its manifest boundaries name them. A domain-module
227
+ * registration may cover a SUBSET (#1773): a backend+shared module registers its shared entries and an
228
+ * `applicationModules` entry bound to the backend only.
229
+ */
230
+ export declare enum DomainModuleLayer {
231
+ SHARED = "shared",
232
+ SPECIFICATIONS = "specifications",
233
+ FRONTEND = "frontend",
234
+ BACKEND = "backend"
235
+ }
236
+ /**
237
+ * Every domain layer is a boundary layer, spelled the same (#1773 review): the enum restates four keys of
238
+ * `MODULE_BOUNDARY_LAYER_ROOTS`, so a member added or renamed on one side alone fails to compile here.
239
+ */
240
+ export declare const DOMAIN_LAYERS_ARE_BOUNDARY_LAYERS: `${DomainModuleLayer}` extends ModuleBoundaryLayer ? true : never;
241
+ /** Canonical order, so one set of layers has one spelling. */
242
+ export declare const DOMAIN_MODULE_LAYERS: readonly DomainModuleLayer[];
243
+ /**
244
+ * The scenarios' variable patterns for the directory and camelCase stem their REGISTRY edits use
245
+ * (`moduleId`/`moduleCamel`, `minionDir`/`minionCamel`, `workerDir`/`workerCamel` share them). Mirrored
246
+ * here because the manifest is validated where no scenario is loaded (the registry server); a test pins
247
+ * them equal to the scenarios' own declarations.
248
+ */
249
+ export declare const MODULE_REGISTRATION_MODULE_ID_PATTERN: RegExp;
250
+ export declare const MODULE_REGISTRATION_MODULE_CAMEL_PATTERN: RegExp;
251
+ /**
252
+ * A module's registration: the scenario plus the ONLY values its registry edits read. It carries no
253
+ * code — the installer renders the scenario's own edit steps with these values, both restricted to
254
+ * identifier alphabets (and anything else a scenario needs is DERIVED by the installer, never read from
255
+ * the manifest) — so a manifest cannot smuggle text into the host's files. Derived by
256
+ * `wildo registry publish` from the publishing application (every edit already present), never authored.
257
+ */
258
+ export declare const ModuleManifestRegistrationSchema: z.ZodObject<{
259
+ scenario: z.ZodEnum<typeof ModuleRegistrationScenario>;
260
+ /** The module's directory under its scenario's root: each layer's modules root, `minions/` or `workers/` (kebab-case). */
261
+ moduleId: z.ZodString;
262
+ /** The camelCase stem the scenario's entries are named from (`<stem>Module`, the minion/worker bucket key). */
263
+ moduleCamel: z.ZodString;
264
+ /**
265
+ * `add-module` only: the layers the module covers, when it is NOT all four (absent = the whole module,
266
+ * so one module has one spelling). Must include `backend` or `frontend`: an `applicationModules` entry
267
+ * binds the module to at least one service.
268
+ */
269
+ layers: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof DomainModuleLayer>>>;
270
+ /** `add-provider-package` only, and required there: what the installer wired. */
271
+ providerWiring: z.ZodOptional<z.ZodObject<{
272
+ /** The backend facet's package name as installed (`@<scope>/provider-<ref>`); absent without a backend facet. */
273
+ backendPackage: z.ZodOptional<z.ZodString>;
274
+ backendOwners: z.ZodArray<z.ZodObject<{
275
+ serviceKey: z.ZodString;
276
+ path: z.ZodString;
277
+ }, z.core.$strict>>;
278
+ /** The browser facet's package name as installed; absent without a frontend facet. */
279
+ frontendPackage: z.ZodOptional<z.ZodString>;
280
+ frontendOwners: z.ZodArray<z.ZodObject<{
281
+ serviceKey: z.ZodString;
282
+ path: z.ZodString;
283
+ }, z.core.$strict>>;
284
+ }, z.core.$strict>>;
285
+ }, z.core.$strict>;
286
+ export type ModuleManifestRegistration = z.infer<typeof ModuleManifestRegistrationSchema>;
287
+ /**
288
+ * What a registry module IS: the one discriminator every consumer branches on (#2014).
289
+ *
290
+ * The registry was built to carry application FEATURES. On 2026-09-29 Paul decided it also carries
291
+ * PROVIDERS, distributed shadcn-style: a provider's source is copied into the application, which owns it
292
+ * from then on. The Activepieces/Sim-generated catalogue that used to hold providers is archived (#2012).
293
+ * The two kinds differ in what they may contain and in how they are registered, so the difference is
294
+ * named rather than inferred from which boundaries happen to be present.
295
+ */
296
+ export declare enum ModuleKind {
297
+ /**
298
+ * An application feature: domain module layers, a minion or a worker. Every module published before
299
+ * #2014 is one, which is why a manifest that omits `kind` reads as FEATURE.
300
+ */
301
+ FEATURE = "feature",
302
+ /**
303
+ * One vendor's integration, installed at `providers/<ref>/` with ONE workspace package per facet
304
+ * ({@link ProviderModuleFacet}): each carries its own SDK dependencies in its own `package.json`, and
305
+ * each runtime depends only on the facet it runs. It may fill an engine capability when its tier is
306
+ * EXTENSION.
307
+ *
308
+ * What a provider module never is:
309
+ * - system-of-record facets: a separate lane, delivered by `@wildo-ai/systems-of-record` (#2013);
310
+ * - an INFRASTRUCTURE provider (object storage, databases, brokers, scanners): those are executed by the
311
+ * PLATFORM (apps-manager) with platform administrator credentials, so application-owned code must never
312
+ * be one. They stay in the platform's own package, selected by the application's declaration (#1692).
313
+ */
314
+ PROVIDER = "provider"
315
+ }
316
+ /**
317
+ * The runtime facets a provider module can ship, each as its own workspace package under
318
+ * `providers/<ref>/<facet>/` (Paul, 2026-09-29).
319
+ *
320
+ * One package per facet, as the engine itself separates `external-connectors-private` (backend) from
321
+ * `external-connectors-public` (browser):
322
+ * - a Node SDK never reaches a frontend install, and a browser SDK never reaches a backend's;
323
+ * - each runtime owner depends on exactly the facet it runs, so imports stay unambiguous;
324
+ * - the browser facet cannot reach backend code unless its own manifest declares that dependency, which
325
+ * publish refuses. Isolation is a property of the dependency graph, not of scanning import statements.
326
+ *
327
+ * There is deliberately no INFRASTRUCTURE member: see {@link ModuleKind.PROVIDER}.
328
+ */
329
+ export declare enum ProviderModuleFacet {
330
+ /** Loaded by the application backend, the companion and minions. Workers load no providers. */
331
+ BACKEND = "backend",
332
+ /** Loaded by the frontend services whose type is listed in its `surfaces`. */
333
+ FRONTEND = "frontend"
334
+ }
335
+ /**
336
+ * How far a published provider has been taken since it was adopted (#2012).
337
+ *
338
+ * There is deliberately no SEEDED member: a seed (a catalogue transposition in the archive) is never
339
+ * published, so the registry only ever holds providers someone adopted.
340
+ */
341
+ export declare enum ProviderModuleMaturity {
342
+ /** Copied from a seed or written by hand, reviewed, and owned by Wildo. Not yet met the real vendor. */
343
+ ADOPTED = "adopted",
344
+ /** Has executed against the real vendor it names, with the proof recorded on the tracker. */
345
+ PROVEN = "proven"
346
+ }
347
+ /**
348
+ * The `provider` block of a PROVIDER module: what the registry must know about the provider WITHOUT
349
+ * executing its code, which is what server-side search and listing need.
350
+ *
351
+ * Deliberately NOT carried here, so there is one source for each fact:
352
+ * - the ENGINE capabilities it fills: derived from `providerCapabilities` through the same closed map the
353
+ * engine uses (`engineSlotsBoundByCapabilities`);
354
+ * - the compliance profile, secrets contract, operations and auth: they live in the module's code
355
+ * (`BackendProviderModule`), which discovery already reads. Publish checks that this block agrees
356
+ * with that code (#2014).
357
+ *
358
+ * Fields for per-provider skills, OpenAPI binding and change monitoring are added by the issues that
359
+ * read them (#2026, #2028, #2027), not before.
360
+ */
361
+ export declare const ModuleManifestProviderSchema: z.ZodObject<{
362
+ /**
363
+ * The provider ref: the application's scope key, the directory under `providers/`, and the suffix of
364
+ * the package name. One kebab-case segment, the same alphabet as a registration directory.
365
+ */
366
+ ref: z.ZodString;
367
+ /** The vendor's identity, shared by every ref of one vendor. Defaults to the ref, as provider metadata does. */
368
+ vendor: z.ZodOptional<z.ZodString>;
369
+ /** CATALOGUE (operations only) or EXTENSION (fills an engine capability). */
370
+ tier: z.ZodEnum<{
371
+ EXTENSION: ProviderTier.EXTENSION;
372
+ CATALOGUE: ProviderTier.CATALOGUE;
373
+ }>;
374
+ /** The provider capability tokens the module declares, as its `BackendProviderModule` does. */
375
+ providerCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
376
+ /**
377
+ * The facets the module ships, each a package at `providers/<ref>/<facet>/`. At least one.
378
+ * Keys are {@link ProviderModuleFacet} members.
379
+ */
380
+ facets: z.ZodObject<{
381
+ backend: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
382
+ frontend: z.ZodOptional<z.ZodObject<{
383
+ /**
384
+ * Which frontend surfaces the browser facet serves: the application, the public website, the
385
+ * documentation site. Installation adds the facet's package only to frontend services of these
386
+ * types. The engine composes a separate provider registry per surface, which is why it is named.
387
+ */
388
+ surfaces: z.ZodArray<z.ZodEnum<typeof AppFrontendType>>;
389
+ }, z.core.$strict>>;
390
+ }, z.core.$strict>;
391
+ maturity: z.ZodEnum<typeof ProviderModuleMaturity>;
392
+ /** Where the adopted source came from, when it came from a catalogue seed. */
393
+ seed: z.ZodOptional<z.ZodObject<{
394
+ source: z.ZodEnum<typeof import("@wildo-ai/saas-models").ProviderCatalogueSource>;
395
+ sourceRef: z.ZodString;
396
+ sourceVersion: z.ZodString;
397
+ }, z.core.$strip>>;
398
+ }, z.core.$strict>;
399
+ export type ModuleManifestProvider = z.infer<typeof ModuleManifestProviderSchema>;
400
+ /**
401
+ * The facets a provider module ships, in canonical enum order, and the package directory of each.
402
+ * Install, publish and registration all read these rather than re-deriving the layout.
403
+ */
404
+ export declare function providerModuleFacets(provider: Pick<ModuleManifestProvider, 'facets'>): ProviderModuleFacet[];
405
+ /** `providers/<ref>/<facet>`: where one facet's workspace package lives. */
406
+ export declare function providerModuleFacetDirectory(ref: string, facet: ProviderModuleFacet): string;
407
+ /** The engine capabilities a provider module fills, derived rather than declared. */
408
+ export declare function engineCapabilitiesFilledByProviderModule(provider: ModuleManifestProvider): EngineCapability[];
409
+ /** The file a module's manifest lives in: at the root of every artifact, of a checkout module, and of a publishing application. */
410
+ export declare const MODULE_MANIFEST_FILE_NAME = "wildo.module.json";
93
411
  /**
94
412
  * Top-level manifest. Stored at `wildo.module.json` inside every
95
413
  * artifact zip and at the registry server alongside its version row.
@@ -101,6 +419,45 @@ export type ModuleManifestBoundaries = z.infer<typeof ModuleManifestBoundariesSc
101
419
  export declare const ModuleManifestSchema: z.ZodObject<{
102
420
  id: z.ZodString;
103
421
  version: z.ZodString;
422
+ kind: z.ZodDefault<z.ZodEnum<typeof ModuleKind>>;
423
+ provider: z.ZodOptional<z.ZodObject<{
424
+ /**
425
+ * The provider ref: the application's scope key, the directory under `providers/`, and the suffix of
426
+ * the package name. One kebab-case segment, the same alphabet as a registration directory.
427
+ */
428
+ ref: z.ZodString;
429
+ /** The vendor's identity, shared by every ref of one vendor. Defaults to the ref, as provider metadata does. */
430
+ vendor: z.ZodOptional<z.ZodString>;
431
+ /** CATALOGUE (operations only) or EXTENSION (fills an engine capability). */
432
+ tier: z.ZodEnum<{
433
+ EXTENSION: ProviderTier.EXTENSION;
434
+ CATALOGUE: ProviderTier.CATALOGUE;
435
+ }>;
436
+ /** The provider capability tokens the module declares, as its `BackendProviderModule` does. */
437
+ providerCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
438
+ /**
439
+ * The facets the module ships, each a package at `providers/<ref>/<facet>/`. At least one.
440
+ * Keys are {@link ProviderModuleFacet} members.
441
+ */
442
+ facets: z.ZodObject<{
443
+ backend: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
444
+ frontend: z.ZodOptional<z.ZodObject<{
445
+ /**
446
+ * Which frontend surfaces the browser facet serves: the application, the public website, the
447
+ * documentation site. Installation adds the facet's package only to frontend services of these
448
+ * types. The engine composes a separate provider registry per surface, which is why it is named.
449
+ */
450
+ surfaces: z.ZodArray<z.ZodEnum<typeof AppFrontendType>>;
451
+ }, z.core.$strict>>;
452
+ }, z.core.$strict>;
453
+ maturity: z.ZodEnum<typeof ProviderModuleMaturity>;
454
+ /** Where the adopted source came from, when it came from a catalogue seed. */
455
+ seed: z.ZodOptional<z.ZodObject<{
456
+ source: z.ZodEnum<typeof import("@wildo-ai/saas-models").ProviderCatalogueSource>;
457
+ sourceRef: z.ZodString;
458
+ sourceVersion: z.ZodString;
459
+ }, z.core.$strip>>;
460
+ }, z.core.$strict>>;
104
461
  description: z.ZodOptional<z.ZodString>;
105
462
  longDescription: z.ZodOptional<z.ZodString>;
106
463
  engine: z.ZodOptional<z.ZodObject<{
@@ -113,6 +470,7 @@ export declare const ModuleManifestSchema: z.ZodObject<{
113
470
  backend: z.ZodDefault<z.ZodArray<z.ZodString>>;
114
471
  minions: z.ZodDefault<z.ZodArray<z.ZodString>>;
115
472
  workers: z.ZodDefault<z.ZodArray<z.ZodString>>;
473
+ providers: z.ZodDefault<z.ZodArray<z.ZodString>>;
116
474
  }, z.core.$strict>>;
117
475
  dependsOn: z.ZodOptional<z.ZodObject<{
118
476
  modules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -122,6 +480,34 @@ export declare const ModuleManifestSchema: z.ZodObject<{
122
480
  }, z.core.$strict>>;
123
481
  capabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
124
482
  }, z.core.$strict>>;
483
+ registration: z.ZodOptional<z.ZodObject<{
484
+ scenario: z.ZodEnum<typeof ModuleRegistrationScenario>;
485
+ /** The module's directory under its scenario's root: each layer's modules root, `minions/` or `workers/` (kebab-case). */
486
+ moduleId: z.ZodString;
487
+ /** The camelCase stem the scenario's entries are named from (`<stem>Module`, the minion/worker bucket key). */
488
+ moduleCamel: z.ZodString;
489
+ /**
490
+ * `add-module` only: the layers the module covers, when it is NOT all four (absent = the whole module,
491
+ * so one module has one spelling). Must include `backend` or `frontend`: an `applicationModules` entry
492
+ * binds the module to at least one service.
493
+ */
494
+ layers: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof DomainModuleLayer>>>;
495
+ /** `add-provider-package` only, and required there: what the installer wired. */
496
+ providerWiring: z.ZodOptional<z.ZodObject<{
497
+ /** The backend facet's package name as installed (`@<scope>/provider-<ref>`); absent without a backend facet. */
498
+ backendPackage: z.ZodOptional<z.ZodString>;
499
+ backendOwners: z.ZodArray<z.ZodObject<{
500
+ serviceKey: z.ZodString;
501
+ path: z.ZodString;
502
+ }, z.core.$strict>>;
503
+ /** The browser facet's package name as installed; absent without a frontend facet. */
504
+ frontendPackage: z.ZodOptional<z.ZodString>;
505
+ frontendOwners: z.ZodArray<z.ZodObject<{
506
+ serviceKey: z.ZodString;
507
+ path: z.ZodString;
508
+ }, z.core.$strict>>;
509
+ }, z.core.$strict>>;
510
+ }, z.core.$strict>>;
125
511
  meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
126
512
  }, z.core.$catchall<z.ZodUnknown>>;
127
513
  export type ModuleManifest = z.infer<typeof ModuleManifestSchema>;