@almadar/core 10.43.0 → 10.45.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.
@@ -1,6 +1,6 @@
1
- import { I as IdentityLedger, A as AnyPatternConfig, U as UISlot, c as Effect, h as RenderBinding, i as RenderUIEffect, d as EntityId, e as Entity, E as EntityField, a as EntityPersistence, f as EntityRow } from './effect-NbTgX2yB.js';
2
- import { a as OrbitalDefinition, O as OrbitalSchema, U as UseDeclaration, E as EntityRef, P as PageRef, b as Page, c as PageRefObject } from './schema-DdcBBHkb.js';
3
- import { b as TraitConfig, g as Trait, T as TraitEventListener, h as CallSiteConfig, j as TraitEventContract, d as TraitRef, a as TraitReference } from './trait-DdBiEffx.js';
1
+ import { I as IdentityLedger, A as AnyPatternConfig, U as UISlot, c as Effect, h as RenderBinding, i as RenderUIEffect, d as EntityId, e as Entity, E as EntityField, a as EntityPersistence, f as EntityRow } from './effect-BZ1nzN3q.js';
2
+ import { a as OrbitalDefinition, O as OrbitalSchema, U as UseDeclaration, E as EntityRef, P as PageRef, b as Page, c as PageRefObject } from './schema-CZNILCHD.js';
3
+ import { b as TraitConfig, g as Trait, T as TraitEventListener, h as CallSiteConfig, j as TraitEventContract, d as TraitRef, a as TraitReference } from './trait-1V3odk0y.js';
4
4
  import { S as SExpr } from './expression-Yf7qvvOs.js';
5
5
  import 'zod';
6
6
 
package/dist/builders.js CHANGED
@@ -316,6 +316,27 @@ z.object({
316
316
  fov: z.number().optional(),
317
317
  mode: CameraModeSchema.optional()
318
318
  });
319
+ var SExprDataSchema = z.lazy(
320
+ () => z.union([SExprAtomSchema, z.array(SExprDataSchema)])
321
+ );
322
+ var SExprAtomSchema = z.union([
323
+ z.string(),
324
+ z.number(),
325
+ z.boolean(),
326
+ z.null(),
327
+ z.record(SExprDataSchema)
328
+ // Objects for payload data
329
+ ]);
330
+ var SExprSchema = z.lazy(
331
+ () => z.union([
332
+ SExprAtomSchema,
333
+ z.array(z.lazy(() => SExprSchema)).min(1).refine(
334
+ (arr) => typeof arr[0] === "string",
335
+ { message: "S-expression array must have a string operator as first element" }
336
+ )
337
+ ])
338
+ );
339
+ var ExpressionSchema = SExprSchema;
319
340
 
320
341
  // src/types/entity.ts
321
342
  var EntityPersistenceSchema = z.enum([
@@ -331,6 +352,16 @@ var OrbitalEntitySchema = z.object({
331
352
  // than rejecting them, so a Rust-only field works on the compiled path and
332
353
  // silently vanishes on the interpreter path.
333
354
  identity: z.boolean().optional(),
355
+ // Same "must stay in step with Rust serde" hazard as `identity` above —
356
+ // these four mirror `EntityDefinition.{read,create,update,delete}_policy`.
357
+ // Rust has no `rename_all` on this struct, so the wire key IS snake_case
358
+ // (unlike this file's other camelCase fields, which are Rust-side-absent
359
+ // and so never hit this cross-language constraint — see `visual_prompt`
360
+ // just below for the existing precedent).
361
+ read_policy: SExprSchema.optional(),
362
+ create_policy: SExprSchema.optional(),
363
+ update_policy: SExprSchema.optional(),
364
+ delete_policy: SExprSchema.optional(),
334
365
  collection: z.string().optional(),
335
366
  fields: z.array(EntityFieldSchema).min(1, "At least one field is required"),
336
367
  instances: z.array(z.record(JsonValueSchema)).optional(),
@@ -341,29 +372,6 @@ var OrbitalEntitySchema = z.object({
341
372
  assetRef: SemanticAssetRefSchema.optional()
342
373
  });
343
374
  var EntitySchema = OrbitalEntitySchema;
344
- var SExprDataSchema = z.lazy(
345
- () => z.union([SExprAtomSchema, z.array(SExprDataSchema)])
346
- );
347
- var SExprAtomSchema = z.union([
348
- z.string(),
349
- z.number(),
350
- z.boolean(),
351
- z.null(),
352
- z.record(SExprDataSchema)
353
- // Objects for payload data
354
- ]);
355
- var SExprSchema = z.lazy(
356
- () => z.union([
357
- SExprAtomSchema,
358
- z.array(z.lazy(() => SExprSchema)).min(1).refine(
359
- (arr) => typeof arr[0] === "string",
360
- { message: "S-expression array must have a string operator as first element" }
361
- )
362
- ])
363
- );
364
- var ExpressionSchema = SExprSchema;
365
-
366
- // src/types/effect.ts
367
375
  var UI_SLOTS = [
368
376
  // App slots
369
377
  "main",