@almadar/core 11.4.0 → 11.5.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.
Files changed (49) hide show
  1. package/dist/{builders-CAQ_shuO.d.ts → builders-JiXD6W1T.d.ts} +2434 -266
  2. package/dist/builders.d.ts +5 -5
  3. package/dist/builders.js +3 -3
  4. package/dist/{bus-QFvlnIfW.d.ts → bus-__zVNcsp.d.ts} +26 -6
  5. package/dist/{chunk-OLSKERKZ.js → chunk-27Y5AXHB.js} +21 -0
  6. package/dist/chunk-2WLRKYD5.js +3823 -0
  7. package/dist/{chunk-UCP26C3C.js → chunk-J64IR3DR.js} +14 -4
  8. package/dist/{chunk-ISAUHHDU.js → chunk-J64YVVB4.js} +1 -1
  9. package/dist/{chunk-JPJQCTJI.js → chunk-JN3MMQTB.js} +3 -1
  10. package/dist/{chunk-JCRN3F6T.js → chunk-LQZXCL47.js} +62 -26
  11. package/dist/{chunk-O2ZUOWNK.js → chunk-OQ3Y5SL3.js} +1 -1
  12. package/dist/{chunk-TOAMAGC7.js → chunk-Q4OJQNYY.js} +5 -2
  13. package/dist/{chunk-QV6J4EAF.js → chunk-VC3HXUWQ.js} +7071 -48
  14. package/dist/{chunk-7JO77HA6.js → chunk-VQWE3FCB.js} +1 -1
  15. package/dist/{chunk-DHWP7B4S.js → chunk-XYHBAUWE.js} +102 -5
  16. package/dist/{effect--PY8R4Oi.d.ts → effect-gddySYLX.d.ts} +212 -49
  17. package/dist/{effect-result-fH1ZTxn6.d.ts → effect-result-BvBwmspK.d.ts} +76 -9
  18. package/dist/factory/index.d.ts +2 -2
  19. package/dist/factory/index.js +4 -4
  20. package/dist/factory-runtime/index.d.ts +3 -3
  21. package/dist/factory-runtime/index.js +10 -10
  22. package/dist/fixtures.d.ts +3 -3
  23. package/dist/fixtures.js +2 -2
  24. package/dist/i18n/index.js +1 -1
  25. package/dist/{index-Dk2AoJdI.d.ts → index-h6KrpmjR.d.ts} +27 -27
  26. package/dist/index.d.ts +14 -14
  27. package/dist/index.js +15 -15
  28. package/dist/kernel-wire.d.ts +2 -2
  29. package/dist/kernel-wire.js +1 -1
  30. package/dist/language/constructs.json +13 -3
  31. package/dist/language/program-types.json +22 -1
  32. package/dist/language/validation-codes.json +96 -1
  33. package/dist/language/vocabulary.json +19 -1
  34. package/dist/language-data.js +1 -1
  35. package/dist/patterns/component-mapping.json +11 -1
  36. package/dist/patterns/definitions.d.ts +1 -1
  37. package/dist/patterns/definitions.js +1 -1
  38. package/dist/patterns/event-contracts.json +1 -1
  39. package/dist/patterns/index.d.ts +41 -3
  40. package/dist/patterns/index.js +2 -2
  41. package/dist/patterns/patterns-registry.json +7071 -48
  42. package/dist/patterns/registry.json +7071 -48
  43. package/dist/{trait-BO2gbBte.d.ts → trait-Oun4JgeZ.d.ts} +113 -73
  44. package/dist/types/index.d.ts +8 -8
  45. package/dist/types/index.js +7 -7
  46. package/dist/{types-CSBhbbse.d.ts → types-B-r7Z7Lf.d.ts} +2 -2
  47. package/package.json +6 -6
  48. package/dist/chunk-AIRZM37O.js +0 -3809
  49. package/dist/{domain-Cpmja5ak.d.ts → domain-WtYcvBMH.d.ts} +51 -51
@@ -1,5 +1,5 @@
1
1
  import { SuggestedGuardSchema, DesignPreferencesSchema, DomainContextSchema, ThemeRefSchema, CustomPatternMapSchema, DesignTokensSchema, ThemeDefinitionSchema } from './chunk-IU3WGC6Q.js';
2
- import { FieldProjectionSchema, EffectSchema, EntityFieldSchema, TypeVariableSchema, PatternObjectSchema, EntitySchema, EntityPersistenceSchema } from './chunk-JPJQCTJI.js';
2
+ import { FieldProjectionSchema, EffectSchema, EntityFieldSchema, TypeVariableSchema, PatternObjectSchema, EntitySchema, EntityPersistenceSchema } from './chunk-JN3MMQTB.js';
3
3
  import { SExprSchema, ExpressionSchema, SExprListSchema } from './chunk-R3Y7ABF4.js';
4
4
  import { EventIdSchema, PageIdSchema, TraitIdSchema, OrbitalIdSchema, EntityIdSchema, IdentityLedgerSchema } from './chunk-W3UJRSYC.js';
5
5
  import { z } from 'zod';
@@ -330,6 +330,7 @@ var TRAIT_FIELD_TYPES = [
330
330
  "event",
331
331
  "EventAddress",
332
332
  "CallKey",
333
+ "MessageKey",
333
334
  "SExpr",
334
335
  "union",
335
336
  "tuple",
@@ -374,6 +375,7 @@ var TraitTickSchema = z.object({
374
375
  appliesTo: z.array(z.string()).optional(),
375
376
  runsInBackground: z.boolean().optional(),
376
377
  whileVisible: z.boolean().optional(),
378
+ afterEntryMs: z.number().int().nonnegative().optional(),
377
379
  pages: z.array(z.string()).optional(),
378
380
  pageIds: z.array(PageIdSchema).optional(),
379
381
  guard: ExpressionSchema.optional(),
@@ -1251,7 +1253,8 @@ var SiteMetaSchema = z.object({
1251
1253
  origin: z.string().url().optional(),
1252
1254
  icon: z.string().min(1).optional(),
1253
1255
  name: z.string().min(1).optional(),
1254
- signIn: z.string().startsWith("/").optional()
1256
+ signIn: z.string().startsWith("/").optional(),
1257
+ entries: z.array(z.string().startsWith("/")).optional()
1255
1258
  }).strict();
1256
1259
  var ConfigProvenanceRecordSchema = z.object({
1257
1260
  trait: z.string(),
@@ -1277,7 +1280,7 @@ var OrbitalSchemaSchema = z.object({
1277
1280
  name: z.string().min(1, "Schema name is required"),
1278
1281
  description: z.string().optional(),
1279
1282
  theme: ThemeRefSchema.optional(),
1280
- themes: z.array(z.string().min(1)).optional(),
1283
+ themes: z.array(ThemeRefSchema).optional(),
1281
1284
  themeDefinitions: z.array(ThemeDefinitionSchema).optional(),
1282
1285
  summary: z.string().optional(),
1283
1286
  version: z.string().optional(),
@@ -1296,6 +1299,7 @@ var OrbitalSchemaSchema = z.object({
1296
1299
  inbound: z.array(z.string().min(1)).optional(),
1297
1300
  site: SiteMetaSchema.optional(),
1298
1301
  lazyPages: z.array(LazyPageSchema).optional(),
1302
+ lazyPrograms: z.record(z.string(), z.lazy(() => OrbitalSchemaSchema)).optional(),
1299
1303
  services: z.array(ServiceDefinitionSchema).optional(),
1300
1304
  config: DeclaredTraitConfigSchema.optional(),
1301
1305
  _metadata: SchemaMetadataSchema.optional(),
@@ -1569,7 +1573,13 @@ var BehaviorDescriptionSchema = z.object({
1569
1573
  knobs: z.array(KnobFieldSchema),
1570
1574
  orbitals: z.array(OrbitalDescriptionSchema),
1571
1575
  /** The behaviors this one imports (`uses … from`): what it already contains. */
1572
- uses: z.array(z.string()).optional()
1576
+ uses: z.array(z.string()).optional(),
1577
+ /** The look and languages the behavior's app header declares; absent when it declares none. Reach is not here: composition unions it. */
1578
+ header: z.object({
1579
+ theme: ThemeRefSchema.optional(),
1580
+ themes: z.array(ThemeRefSchema).optional(),
1581
+ locales: z.array(z.string().min(1)).optional()
1582
+ }).strict().optional()
1573
1583
  }).strict();
1574
1584
 
1575
1585
  export { AwaitRenderSchema, BehaviorDescriptionSchema, BehaviorRefSchema, BehaviorValueSchema, CONFIG_REF_EVENT_PATTERN, CatalogEntrySchema, CatalogScopeSchema, ComputedEventContractSchema, ComputedEventListenerSchema, ConfigFieldDeclarationSchema, ConfigProvenanceRecordSchema, DeclaredTraitConfigSchema, DeploymentSchema, DescribeTargetSchema, DispatchModeSchema, EntityCallSchema, EntityFieldContractSchema, EntityRefSchema, EntityRefStringSchema, EventListenerSchema, EventPayloadFieldSchema, EventSchema, EventScopeSchema, EventSourceSchema, ExpectDeclarationSchema, ExpectationDiagnosticSchema, GuardSchema, HOST_SIGN_IN_ROUTE, InboundVerificationSchema, KnobFieldSchema, LazyPageSchema, LazyTraitSchema, ListenSourceSchema, McpServiceDefSchema, OrbitalDefinitionSchema, OrbitalDescriptionSchema, OrbitalOverridesSchema, OrbitalPageSchema, OrbitalPageStrictSchema, OrbitalRefObjectSchema, OrbitalRefStringSchema, OrbitalSchema, OrbitalSchemaSchema, OrbitalTraitRefSchema, OrbitalUnitSchema, OrbitalValueSchema, OrbitalValueSiblingSchema, OrbitalValueUseSchema, OrganismExpectationsSchema, OsGrantsSchema, PageAccessSchema, PageIndexingSchema, PageMetaSchema, PageModifiersSchema, PageRefObjectSchema, PageRefSchema, PageRefStringSchema, PageSchema, PageTraitRefSchema, PayloadFieldSchema, PayloadTypeWhenSchema, ProtocolSideSchema, ProtocolSpecSchema, REFERENCE_CONFIG_TYPES, ROUTE_PROTOCOL, RequiredFieldSchema, RestAuthConfigSchema, RestServiceDefSchema, SECRET_CONFIG_TYPES, SERVICE_TYPES, SKELETON_VARIANTS, SchemaMetadataSchema, ServiceDefinitionSchema, ServiceRefObjectSchema, ServiceRefSchema, ServiceRefStringSchema, ServiceTypeSchema, SiteMetaSchema, SkeletonNodeSchema, SkeletonShapeSchema, SkeletonSpecSchema, SkeletonVariantSchema, SocketEventsSchema, SocketServiceDefSchema, SourceDeclarationMetadataSchema, StateMachineSchema, StateSchema, TickIntervalSchema, TraitConfigSchema, TraitConfigValueSchema, TraitDataEntitySchema, TraitDescriptionSchema, TraitDispatchModeSchema, TraitEntityFieldSchema, TraitEventContractSchema, TraitEventListenerSchema, TraitEventsSchema, TraitKnobSchema, TraitMachineSchema, TraitOverridesSchema, TraitRefSchema, TraitReferenceSchema, TraitSchema, TraitSourceSchema, TraitTickSchema, TraitUIBindingSchema, TraitValueSchema, TransitionSchema, UseDeclarationSchema, ViewTypeSchema, applyBehaviorOverrides, applyOrbitalOverrides, applyTraitOverrides, behaviorRef, configRefEventKnob, credentialStatusConnected, credentialStorageKey, expectedEntityName, findService, formatBehaviorValueLiteral, formatOrbitalValueLiteral, formatTraitValueLiteral, getServiceNames, getTraitConfig, getTraitName, hasService, inlineTraitRefs, isBehaviorRefValue, isCallSiteConfigDeclaration, isCircuitEvent, isConfigFieldSchema, isConfigRedeclaration, isEntityCall, isEntityReference, isEntityReferenceAny, isHostSignInRoute, isImportedTraitRef, isInlineTrait, isMcpService, isOrbitalDefinition, isOrbitalValue, isPageReference, isPageReferenceObject, isPageReferenceString, isReferenceConfigType, isRestService, isRoutePage, isSecretConfigType, isServiceReference, isServiceReferenceObject, isSocketService, isTraitValue, joinEventAddress, maskSecretConfigValues, mergeCallSiteConfigOverrides, normalizeCallSiteConfigToValues, normalizeTraitRef, overrideDeclaredKnobs, parseBehaviorValueLiteral, parseEntityRef, parseImportedTraitRef, parseOrbitalRef, parseOrbitalSchema, parseOrbitalValueLiteral, parsePageRef, parseServiceRef, parseTraitValueLiteral, payloadTypeContainer, protocolName, resolveConfigRefEventName, resolveCredentialStatusIdentity, resolvePageMeta, safeParseOrbitalSchema, splitEventAddress, unionOsGrants, unwrapTraitRef };
@@ -1,4 +1,4 @@
1
- import { isInlineTrait } from './chunk-UCP26C3C.js';
1
+ import { isInlineTrait } from './chunk-J64IR3DR.js';
2
2
 
3
3
  // src/data-bearing.ts
4
4
  function touchesRecord(effect, name) {
@@ -39,6 +39,7 @@ var FIELD_TYPES = [
39
39
  "event",
40
40
  "EventAddress",
41
41
  "CallKey",
42
+ "MessageKey",
42
43
  "SExpr",
43
44
  "union",
44
45
  "tuple",
@@ -229,6 +230,7 @@ var EntityFieldSchema = z.lazy(() => {
229
230
  scalarVariant("event"),
230
231
  scalarVariant("EventAddress"),
231
232
  scalarVariant("CallKey"),
233
+ scalarVariant("MessageKey"),
232
234
  scalarVariant("money"),
233
235
  scalarVariant("file"),
234
236
  scalarVariant("bytes"),
@@ -668,7 +670,7 @@ var OrbitalEntitySchema = z.object({
668
670
  delete: z.string().optional()
669
671
  }).optional(),
670
672
  invariants: SExprListSchema.optional(),
671
- indexes: z.array(z.object({ fields: z.array(z.string()), orderBy: z.string().optional() }).strict()).optional(),
673
+ indexes: z.array(z.object({ fields: z.array(z.string()), orderBy: z.string().optional(), nearest: z.object({ field: z.string(), dimension: z.number().int().positive() }).strict().optional() }).strict()).optional(),
672
674
  collection: z.string().optional(),
673
675
  fields: z.array(EntityFieldSchema),
674
676
  instances: z.array(z.record(z.string(), JsonValueSchema)).optional(),