@ogygie/studio 0.6.0 → 0.8.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
@@ -115,9 +115,14 @@ var HttpRouteSchema = z2.object({
115
115
  "Cache roots this mutation stales BEYOND its own path root (cross-feature dependency, read by the manifest-derived client \u2014 never guessed in a screen). Each value must be an existing feature name or route root"
116
116
  )
117
117
  });
118
+ var SharedTableKindSchema = z2.enum(["reference", "ownerless"]);
118
119
  var DbTableDeclarationSchema = z2.union([
119
120
  z2.string(),
120
- z2.object({ name: z2.string(), shared: z2.literal(true) })
121
+ z2.object({
122
+ name: z2.string(),
123
+ shared: z2.literal(true),
124
+ sharedKind: SharedTableKindSchema.optional()
125
+ })
121
126
  ]);
122
127
  var FeatureManifestSchema = z2.object({
123
128
  name: FeatureNameSchema,
@@ -167,6 +172,12 @@ var PackageManifestSchema = z2.object({
167
172
  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
173
  status: z2.enum(["skeleton", "in-progress", "delivered"])
169
174
  });
175
+ var TenancyManifestSchema = z2.object({
176
+ column: z2.string().min(1).describe("SQL name of the tenant column, e.g. workspace_id \u2014 the one AGENTS.product.md announces"),
177
+ rawDbAllowed: z2.array(FeatureNameSchema).default([]).describe(
178
+ "Features allowed to reach the raw database: the tenancy socle, which BUILDS the contexts and therefore predates them. Every other feature goes through tenantDb"
179
+ )
180
+ });
170
181
  var OgygieManifestSchema = z2.object({
171
182
  version: z2.literal(1),
172
183
  product: z2.object({
@@ -197,6 +208,9 @@ var OgygieManifestSchema = z2.object({
197
208
  })
198
209
  ),
199
210
  features: z2.array(FeatureManifestSchema),
211
+ tenancy: TenancyManifestSchema.optional().describe(
212
+ "Product values the framework gates need \u2014 absent, the tenancy checks do not run"
213
+ ),
200
214
  packages: z2.array(PackageManifestSchema).optional().describe("Product code living outside every app \u2014 libraries, engines. Absent = the project has none"),
201
215
  vocabulary: ProductVocabularySchema.optional().describe(
202
216
  "The product's closed vocabulary \u2014 declared here, enforced by `ogygie verify-vocabulary`. Absent = gate silent"
@@ -245,6 +259,15 @@ var OgygieManifestSchema = z2.object({
245
259
  (manifest.packages ?? []).forEach((packageEntry, index) => {
246
260
  checkPackageDependencies(packageEntry.dependsOn, ["packages", index, "dependsOn"]);
247
261
  });
262
+ (manifest.tenancy?.rawDbAllowed ?? []).forEach((featureName, index) => {
263
+ if (!featureNames.has(featureName)) {
264
+ context.addIssue({
265
+ code: "custom",
266
+ path: ["tenancy", "rawDbAllowed", index],
267
+ message: `"${featureName}" matches no declared feature`
268
+ });
269
+ }
270
+ });
248
271
  const canonicalOwners = /* @__PURE__ */ new Map();
249
272
  const aliasOwners = /* @__PURE__ */ new Map();
250
273
  (manifest.vocabulary?.entries ?? []).forEach((entry, index) => {