@almadar/core 10.78.0 → 10.80.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 { O as OrbitalSchema, a as OrbitalDefinition } from '../schema-BG7mDO7m.js';
2
- import { h as CallSiteConfig, i as CallSiteConfigEntry, g as Trait } from '../trait-jWk0BInU.js';
3
- import { E as EntityField, a as EntityPersistence } from '../effect-CW3s399G.js';
1
+ import { O as OrbitalSchema, a as OrbitalDefinition } from '../schema-Cma07_18.js';
2
+ import { i as CallSiteConfig, j as CallSiteConfigEntry, h as Trait } from '../trait-BXkQKZbO.js';
3
+ import { E as EntityField, a as EntityPersistence } from '../effect-C4uehm-r.js';
4
4
  import { MakeTraitRefOpts } from '../builders.js';
5
5
  import '../expression-Fk8bQWef.js';
6
6
  import 'zod';
@@ -472,11 +472,17 @@ var StateSchema = z.object({
472
472
  onEntry: z.array(z.string()).optional(),
473
473
  onExit: z.array(z.string()).optional()
474
474
  });
475
+ var PayloadTypeWhenSchema = z.object({
476
+ knob: z.string().min(1),
477
+ equals: z.string().min(1),
478
+ type: z.string().min(1)
479
+ });
475
480
  var PayloadFieldSchema = z.object({
476
481
  name: z.string().min(1),
477
482
  type: z.string().min(1),
478
483
  required: z.boolean().optional(),
479
- properties: z.lazy(() => z.array(PayloadFieldSchema)).optional()
484
+ properties: z.lazy(() => z.array(PayloadFieldSchema)).optional(),
485
+ typeWhen: z.array(PayloadTypeWhenSchema).optional()
480
486
  });
481
487
  var EventSchema = z.object({
482
488
  key: z.string().min(1, "Event key is required"),
@@ -529,7 +535,8 @@ var ConfigFieldItemsDeclarationSchema = z.lazy(
529
535
  () => z.object({
530
536
  type: z.string().optional(),
531
537
  properties: z.record(TraitEntityFieldSchema).optional(),
532
- items: ConfigFieldItemsDeclarationSchema.optional()
538
+ items: ConfigFieldItemsDeclarationSchema.optional(),
539
+ values: z.array(z.string()).optional()
533
540
  })
534
541
  );
535
542
  var ConfigFieldDeclarationSchema = z.object({
@@ -645,7 +652,8 @@ var EventPayloadFieldSchema = z.object({
645
652
  required: z.boolean().optional(),
646
653
  description: z.string().optional(),
647
654
  entityType: z.string().optional(),
648
- properties: z.lazy(() => z.array(EventPayloadFieldSchema)).optional()
655
+ properties: z.lazy(() => z.array(EventPayloadFieldSchema)).optional(),
656
+ typeWhen: z.array(PayloadTypeWhenSchema).optional()
649
657
  });
650
658
  var TraitEventContractSchema = z.object({
651
659
  /**
@@ -666,6 +674,7 @@ var TraitEventContractSchema = z.object({
666
674
  synonyms: z.string().optional(),
667
675
  tier: z.string().optional(),
668
676
  definerKnob: z.string().optional(),
677
+ scopeOverridden: z.boolean().optional(),
669
678
  payloadSchema: z.array(EventPayloadFieldSchema).optional(),
670
679
  scope: EventScopeSchema.optional()
671
680
  });
@@ -719,6 +728,11 @@ var TraitReferenceSchema = z.object({
719
728
  z.string().min(1, "events value (caller event name) must be non-empty")
720
729
  ).optional(),
721
730
  eventIds: z.record(z.string().min(1), EventIdSchema).optional(),
731
+ // 3-II type-parameter arguments (see `TraitReference.typeArgs`).
732
+ typeArgs: z.record(
733
+ z.string().min(1, "typeArgs key (declared param name) must be non-empty"),
734
+ z.string().min(1, "typeArgs value (type name) must be non-empty")
735
+ ).optional(),
722
736
  fields: z.record(
723
737
  z.string().min(1, "fields key (canonical field name) must be non-empty"),
724
738
  z.string().min(1, "fields value (consumer field name) must be non-empty")
@@ -779,6 +793,11 @@ var SourceBehaviorMetadataSchema = z.object({
779
793
  alias: z.string().min(1),
780
794
  originalName: z.string().min(1)
781
795
  });
796
+ var TraitTypeParamDefSchema = z.object({
797
+ name: z.string().min(1),
798
+ kind: z.string().min(1),
799
+ default: z.string().optional()
800
+ });
782
801
  var TraitSchema = z.object({
783
802
  id: TraitIdSchema.optional(),
784
803
  name: z.string().min(1),
@@ -805,7 +824,8 @@ var TraitSchema = z.object({
805
824
  ui: TraitUIBindingSchema.optional(),
806
825
  config: DeclaredTraitConfigSchema.optional(),
807
826
  sourceBehavior: SourceBehaviorMetadataSchema.optional(),
808
- sourceEntityDefinition: EntitySchema.optional()
827
+ sourceEntityDefinition: EntitySchema.optional(),
828
+ typeParams: z.array(TraitTypeParamDefSchema).optional()
809
829
  });
810
830
  var TraitRefSchema = z.union([
811
831
  z.string().min(1),
@@ -1446,7 +1466,8 @@ var OrbitalDefinitionSchema = z.object({
1446
1466
  // Context fields - persisted throughout orbital lifecycle
1447
1467
  domainContext: DomainContextSchema.optional(),
1448
1468
  design: DesignPreferencesSchema.optional(),
1449
- suggestedGuards: z.array(SuggestedGuardSchema).optional()
1469
+ suggestedGuards: z.array(SuggestedGuardSchema).optional(),
1470
+ types: z.record(z.string(), z.array(EventPayloadFieldSchema)).optional()
1450
1471
  });
1451
1472
  var OrbitalSchema = OrbitalDefinitionSchema;
1452
1473
  var OrbitalConfigSchema = z.object({
@@ -1611,6 +1632,7 @@ function makeTraitRef(opts) {
1611
1632
  if (opts.linkedEntity !== void 0) ref2.linkedEntity = opts.linkedEntity;
1612
1633
  if (opts.linkedEntityId !== void 0) ref2.linkedEntityId = opts.linkedEntityId;
1613
1634
  if (opts.events !== void 0) ref2.events = opts.events;
1635
+ if (opts.typeArgs !== void 0) ref2.typeArgs = opts.typeArgs;
1614
1636
  if (opts.fields !== void 0) ref2.fields = opts.fields;
1615
1637
  if (opts.effects !== void 0) ref2.effects = opts.effects;
1616
1638
  if (opts.listens !== void 0) ref2.listens = opts.listens;