@ogygie/studio 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.js CHANGED
@@ -167,6 +167,12 @@ var PackageManifestSchema = z2.object({
167
167
  dependsOn: z2.array(PackageDependencySchema).describe("Other PRODUCT packages, as package:<name> \u2014 never a feature: a package that depended on one would live under an app, and would be a feature"),
168
168
  status: z2.enum(["skeleton", "in-progress", "delivered"])
169
169
  });
170
+ var TenancyManifestSchema = z2.object({
171
+ column: z2.string().min(1).describe("SQL name of the tenant column, e.g. workspace_id \u2014 the one AGENTS.product.md announces"),
172
+ rawDbAllowed: z2.array(FeatureNameSchema).default([]).describe(
173
+ "Features allowed to reach the raw database: the tenancy socle, which BUILDS the contexts and therefore predates them. Every other feature goes through tenantDb"
174
+ )
175
+ });
170
176
  var OgygieManifestSchema = z2.object({
171
177
  version: z2.literal(1),
172
178
  product: z2.object({
@@ -197,6 +203,9 @@ var OgygieManifestSchema = z2.object({
197
203
  })
198
204
  ),
199
205
  features: z2.array(FeatureManifestSchema),
206
+ tenancy: TenancyManifestSchema.optional().describe(
207
+ "Product values the framework gates need \u2014 absent, the tenancy checks do not run"
208
+ ),
200
209
  packages: z2.array(PackageManifestSchema).optional().describe("Product code living outside every app \u2014 libraries, engines. Absent = the project has none"),
201
210
  vocabulary: ProductVocabularySchema.optional().describe(
202
211
  "The product's closed vocabulary \u2014 declared here, enforced by `ogygie verify-vocabulary`. Absent = gate silent"
@@ -245,6 +254,15 @@ var OgygieManifestSchema = z2.object({
245
254
  (manifest.packages ?? []).forEach((packageEntry, index) => {
246
255
  checkPackageDependencies(packageEntry.dependsOn, ["packages", index, "dependsOn"]);
247
256
  });
257
+ (manifest.tenancy?.rawDbAllowed ?? []).forEach((featureName, index) => {
258
+ if (!featureNames.has(featureName)) {
259
+ context.addIssue({
260
+ code: "custom",
261
+ path: ["tenancy", "rawDbAllowed", index],
262
+ message: `"${featureName}" matches no declared feature`
263
+ });
264
+ }
265
+ });
248
266
  const canonicalOwners = /* @__PURE__ */ new Map();
249
267
  const aliasOwners = /* @__PURE__ */ new Map();
250
268
  (manifest.vocabulary?.entries ?? []).forEach((entry, index) => {