@almadar/core 10.55.0 → 10.56.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,5 +1,5 @@
1
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-DxD-XTI8.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-0C1bXRFm.js';
2
+ import { a as OrbitalDefinition, O as OrbitalSchema, U as UseDeclaration, E as EntityRef, b as ExpectDeclaration, P as PageRef, c as Page, d as PageRefObject } from './schema-Nk1usPv6.js';
3
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-WnYkvPdZ.js';
4
4
  import { S as SExpr } from './expression-Fk8bQWef.js';
5
5
  import 'zod';
@@ -480,6 +480,12 @@ interface MakeOrbitalWithUsesOpts {
480
480
  uses: UseDeclaration[];
481
481
  /** Entity (inline or reference form). */
482
482
  entity: EntityRef;
483
+ /**
484
+ * Derived `expects` declarations (consumer-side requirements). Threaded
485
+ * verbatim — derivation lives in `deriveExpectations`; builders never
486
+ * compute it. Omitted from the result when not provided.
487
+ */
488
+ expects?: ExpectDeclaration[];
483
489
  /** Trait references. */
484
490
  traits: TraitRef[];
485
491
  /** Optional page references (omitted entirely when not provided). */
package/dist/builders.js CHANGED
@@ -1274,6 +1274,23 @@ var UseDeclarationSchema = z.object({
1274
1274
  'Alias must be PascalCase (e.g., "Health", "GameCore")'
1275
1275
  )
1276
1276
  });
1277
+ var ExpectDeclarationSchema = z.discriminatedUnion("kind", [
1278
+ z.object({
1279
+ kind: z.literal("identity"),
1280
+ name: z.string().optional(),
1281
+ shape: z.array(EntityFieldSchema).optional()
1282
+ }),
1283
+ z.object({
1284
+ kind: z.literal("entity"),
1285
+ name: z.string().min(1, "Expected entity name is required"),
1286
+ shape: z.array(EntityFieldSchema).optional()
1287
+ }),
1288
+ z.object({
1289
+ kind: z.literal("event"),
1290
+ traitName: z.string().min(1, "Expected event trait name is required"),
1291
+ event: z.string().min(1, "Expected event name is required")
1292
+ })
1293
+ ]);
1277
1294
  function isEntityReference(entity) {
1278
1295
  return typeof entity === "string";
1279
1296
  }
@@ -1374,6 +1391,8 @@ z.object({
1374
1391
  visual_prompt: z.string().optional(),
1375
1392
  // Import system
1376
1393
  uses: z.array(UseDeclarationSchema).optional(),
1394
+ // Consumer-side requirement declarations (`.lolo` `expects ...`)
1395
+ expects: z.array(ExpectDeclarationSchema).optional(),
1377
1396
  // Theme & Services
1378
1397
  theme: ThemeRefSchema.optional(),
1379
1398
  services: z.array(ServiceRefSchema).optional(),
@@ -1821,6 +1840,7 @@ function makeOrbitalWithUses(opts) {
1821
1840
  const orbital = {
1822
1841
  name: opts.name,
1823
1842
  uses: opts.uses,
1843
+ ...opts.expects !== void 0 ? { expects: opts.expects } : {},
1824
1844
  entity: opts.entity,
1825
1845
  traits: opts.traits,
1826
1846
  pages: opts.pages ?? []