@almadar/core 5.4.0 → 5.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.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { h as OrbitalSchema, m as State, O as OrbitalDefinition } from './schema-4TWKcBt4.js';
2
2
  export { A as AGENT_DOMAIN_CATEGORIES, n as ALLOWED_CUSTOM_COMPONENTS, o as AgentDomainCategory, p as AgentDomainCategorySchema, q as AgentEffect, r as AllowedCustomComponent, s as AnimationDef, t as AnimationDefInput, u as AnimationDefSchema, v as AssetMap, w as AssetMapInput, x as AssetMapSchema, y as AssetMapping, z as AssetMappingInput, B as AssetMappingSchema, C as AtomicEffect, D as CORE_BINDINGS, F as CallServiceConfig, G as CallServiceEffect, H as ComputedEventContract, I as ComputedEventContractSchema, J as ComputedEventListener, K as ComputedEventListenerSchema, L as CoreBinding, M as CustomPatternDefinition, N as CustomPatternDefinitionInput, Q as CustomPatternDefinitionSchema, R as CustomPatternMap, V as CustomPatternMapInput, W as CustomPatternMapSchema, X as DerefEffect, Y as DesignPreferences, Z as DesignPreferencesInput, _ as DesignPreferencesSchema, $ as DesignTokens, a0 as DesignTokensInput, a1 as DesignTokensSchema, a2 as DespawnEffect, a3 as DoEffect, a4 as DomainCategory, a5 as DomainCategorySchema, a6 as DomainContext, a7 as DomainContextInput, a8 as DomainContextSchema, a9 as DomainVocabulary, aa as DomainVocabularySchema, ab as ENTITY_ROLES, ac as Effect, ad as EffectInput, ae as EffectSchema, af as EmitConfig, ag as EmitEffect, E as Entity, ah as EntityCall, ai as EntityCallSchema, aj as EntityData, c as EntityField, ak as EntityFieldInput, al as EntityFieldSchema, d as EntityPersistence, am as EntityPersistenceSchema, f as EntityRef, an as EntityRefSchema, ao as EntityRefStringSchema, ap as EntityRole, aq as EntityRoleSchema, e as EntityRow, ar as EntitySchema, as as EntitySemanticRole, at as EntitySemanticRoleSchema, au as EvalContext, av as Event, aw as EventInput, ax as EventListener, ay as EventListenerSchema, az as EventPayload, aA as EventPayloadField, aB as EventPayloadFieldSchema, aC as EventPayloadValue, aD as EventSchema, aE as EventScope, aF as EventScopeSchema, aG as EventSemanticRole, aH as EventSemanticRoleSchema, aI as EventSource, aJ as EventSourceSchema, aK as Expression, aL as ExpressionInput, aM as ExpressionSchema, aN as FetchEffect, aO as Field, aP as FieldFormat, aQ as FieldFormatSchema, aR as FieldSchema, aS as FieldType, aT as FieldTypeSchema, aU as FieldValue, aV as FullOrbitalUnit, aW as GAME_TYPES, aX as GameSubCategory, aY as GameSubCategorySchema, aZ as GameType, a_ as GameTypeSchema, a$ as Guard, b0 as GuardInput, b1 as GuardSchema, b2 as ListenSource, b3 as ListenSourceSchema, b4 as LogEffect, b5 as LogMeta, b6 as McpServiceDef, b7 as McpServiceDefSchema, b8 as NavigateEffect, b9 as NodeClassification, ba as NodeClassificationSchema, bb as NotifyEffect, aV as Orbital, bc as OrbitalConfig, bd as OrbitalConfigInput, be as OrbitalConfigSchema, bf as OrbitalDefinitionSchema, bg as OrbitalEntity, bh as OrbitalEntityInput, bi as OrbitalEntitySchema, bj as OrbitalInput, bk as OrbitalPage, bl as OrbitalPageInput, bm as OrbitalPageSchema, bn as OrbitalPageStrictInput, bo as OrbitalPageStrictSchema, bp as OrbitalSchemaInput, bq as OrbitalSchemaSchema, br as OrbitalTraitRef, bs as OrbitalTraitRefSchema, bt as OrbitalUnit, bu as OrbitalUnitSchema, bv as OrbitalZodSchema, j as Page, P as PageRef, k as PageRefObject, bw as PageRefObjectSchema, bx as PageRefSchema, by as PageRefStringSchema, bz as PageSchema, bA as PageTraitRef, bB as PageTraitRefSchema, bC as ParsedBinding, bD as PayloadField, bE as PayloadFieldSchema, bF as PersistEffect, bG as PresentationType, bH as RefEffect, bI as RelatedLink, bJ as RelatedLinkSchema, bK as RelationConfig, bL as RelationConfigSchema, bM as RenderItemLambda, bN as RenderUIConfig, bO as RenderUIEffect, bP as RenderUINode, bQ as RequiredField, bR as RequiredFieldSchema, bS as ResolvedAsset, bT as ResolvedAssetInput, bU as ResolvedAssetSchema, bV as ResolvedPatternProps, bW as RestAuthConfig, bX as RestAuthConfigSchema, bY as RestServiceDef, bZ as RestServiceDefSchema, b_ as SERVICE_TYPES, S as SExpr, b$ as SExprAtom, c0 as SExprAtomSchema, c1 as SExprInput, c2 as SExprSchema, c3 as SemanticAssetRef, c4 as SemanticAssetRefInput, c5 as SemanticAssetRefSchema, c6 as ServiceDefinition, c7 as ServiceDefinitionSchema, c8 as ServiceParams, c9 as ServiceRef, ca as ServiceRefObject, cb as ServiceRefObjectSchema, cc as ServiceRefSchema, cd as ServiceRefStringSchema, ce as ServiceType, cf as ServiceTypeSchema, cg as SetEffect, ch as SocketEvents, ci as SocketEventsSchema, cj as SocketServiceDef, ck as SocketServiceDefSchema, cl as SpawnEffect, cm as StateInput, cn as StateMachine, co as StateMachineInput, cp as StateMachineSchema, cq as StateSchema, cr as StateSemanticRole, cs as StateSemanticRoleSchema, ct as SuggestedGuard, cu as SuggestedGuardSchema, cv as SwapEffect, cw as ThemeDefinition, cx as ThemeDefinitionSchema, cy as ThemeRef, cz as ThemeRefSchema, cA as ThemeRefStringSchema, cB as ThemeTokens, cC as ThemeTokensSchema, cD as ThemeVariant, cE as ThemeVariantSchema, i as Trait, cF as TraitCategory, cG as TraitCategorySchema, b as TraitConfig, cH as TraitConfigObject, cI as TraitConfigSchema, cJ as TraitConfigValue, cK as TraitConfigValueSchema, cL as TraitDataEntity, cM as TraitDataEntitySchema, cN as TraitEntityField, cO as TraitEntityFieldSchema, T as TraitEventContract, cP as TraitEventContractSchema, a as TraitEventListener, cQ as TraitEventListenerSchema, cR as TraitInput, g as TraitRef, cS as TraitRefSchema, l as TraitReference, cT as TraitReferenceInput, cU as TraitReferenceSchema, cV as TraitSchema, cW as TraitTick, cX as TraitTickSchema, cY as TraitUIBinding, cZ as Transition, c_ as TransitionInput, c$ as TransitionSchema, d0 as TypedEffect, d1 as UISlot, d2 as UISlotSchema, d3 as UI_SLOTS, d4 as UXHints, d5 as UXHintsSchema, U as UseDeclaration, d6 as UseDeclarationSchema, d7 as UserPersona, d8 as UserPersonaInput, d9 as UserPersonaSchema, da as VISUAL_STYLES, db as ViewType, dc as ViewTypeSchema, dd as VisualStyle, de as VisualStyleSchema, df as WatchEffect, dg as WatchOptions, dh as atomic, di as callService, dj as collectBindings, dk as createAssetKey, dl as deref, dm as deriveCollection, dn as despawn, dp as doEffects, dq as emit, dr as findService, ds as getArgs, dt as getDefaultAnimationsForRole, du as getOperator, dv as getServiceNames, dw as getTraitConfig, dx as getTraitName, dy as hasService, dz as isBinding, dA as isCircuitEvent, dB as isEffect, dC as isEntityCall, dD as isEntityReference, dE as isEntityReferenceAny, dF as isImportedTraitRef, dG as isInlineTrait, dH as isMcpService, dI as isOrbitalDefinition, dJ as isPageReference, dK as isPageReferenceObject, dL as isPageReferenceString, dM as isRestService, dN as isRuntimeEntity, dO as isSExpr, dP as isSExprAtom, dQ as isSExprCall, dR as isSExprEffect, dS as isServiceReference, dT as isServiceReferenceObject, dU as isSingletonEntity, dV as isSocketService, dW as isThemeReference, dX as isValidBinding, dY as navigate, dZ as normalizeTraitRef, d_ as notify, d$ as parseAssetKey, e0 as parseBinding, e1 as parseEntityRef, e2 as parseImportedTraitRef, e3 as parseOrbitalSchema, e4 as parsePageRef, e5 as parseServiceRef, e6 as persist, e7 as ref, e8 as renderUI, e9 as safeParseOrbitalSchema, ea as set, eb as sexpr, ec as spawn, ed as swap, ee as validateAssetAnimations, ef as walkSExpr, eg as watch } from './schema-4TWKcBt4.js';
3
3
  import { ResolvedIR, ResolvedEntity, ResolvedPage, ResolvedTrait, SchemaChange, CategorizedRemovals, PageContentReduction, SemanticSchemaChange } from './types/index.js';
4
- export { AgentCodeSearchResult, AgentCompactResult, AgentCompactStrategy, AgentContext, AgentGenerateOptions, AgentMemoryCategory, AgentMemoryRecord, AppSummary, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, BindingContext, BindingRoot, BindingSchema, BusEvent, BusEventListener, BusEventSource, ChangeAuthor, ChangeSetDocument, ChangeSummary, ContextExtensions, CreateFlow, DEFAULT_INTERACTION_MODELS, DeleteFlow, EditFlow, GitHubLink, HistoryMeta, InteractionModel, InteractionModelInput, InteractionModelSchema, LazyService, ListInteraction, PatternTypeSchema, PersistActionName, ResolvedEntityBinding, ResolvedField, ResolvedNavigation, ResolvedPattern, ResolvedSection, ResolvedSectionEvent, ResolvedTraitBinding, ResolvedTraitDataEntity, ResolvedTraitEvent, ResolvedTraitGuard, ResolvedTraitListener, ResolvedTraitState, ResolvedTraitTick, ResolvedTraitTransition, ResolvedTraitUIBinding, SaveOptions, SaveResult, SemanticChangeKind, ServiceAction, ServiceActionName, ServiceContract, ServiceEvents, SnapshotDocument, StatsView, StoreContract, StoreFilter, StoreFilterOp, TransitionFrom, Unsubscribe, ValidationDocument, ValidationIssue, ValidationMeta, ValidationResults, ViewFlow, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, getAllPatternTypes, getBindingExamples, getInteractionModelForDomain, inferTsType, isResolvedIR, toBindingRoot, validateBindingInContext } from './types/index.js';
4
+ export { AgentCodeSearchResult, AgentCompactResult, AgentCompactStrategy, AgentContext, AgentGenerateOptions, AgentMemoryCategory, AgentMemoryRecord, AppSummary, AssetLoadStatus, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, BindingContext, BindingRoot, BindingSchema, BridgeHealth, BusEvent, BusEventListener, BusEventSource, ChangeAuthor, ChangeSetDocument, ChangeSummary, CheckStatus, ContextExtensions, CreateFlow, DEFAULT_INTERACTION_MODELS, DeleteFlow, EditFlow, EffectTrace, EventLogEntry, GitHubLink, HistoryMeta, InteractionModel, InteractionModelInput, InteractionModelSchema, LazyService, ListInteraction, OrbitalVerificationAPI, PatternTypeSchema, PersistActionName, ResolvedEntityBinding, ResolvedField, ResolvedNavigation, ResolvedPattern, ResolvedSection, ResolvedSectionEvent, ResolvedTraitBinding, ResolvedTraitDataEntity, ResolvedTraitEvent, ResolvedTraitGuard, ResolvedTraitListener, ResolvedTraitState, ResolvedTraitTick, ResolvedTraitTransition, ResolvedTraitUIBinding, SaveOptions, SaveResult, SemanticChangeKind, ServerResponseTrace, ServiceAction, ServiceActionName, ServiceContract, ServiceEvents, SnapshotDocument, StatsView, StoreContract, StoreFilter, StoreFilterOp, TraitStateSnapshot, TransitionFrom, TransitionTrace, Unsubscribe, ValidationDocument, ValidationIssue, ValidationMeta, ValidationResults, VerificationCheck, VerificationSnapshot, VerificationSummary, ViewFlow, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, getAllPatternTypes, getBindingExamples, getInteractionModelForDomain, inferTsType, isResolvedIR, toBindingRoot, validateBindingInContext } from './types/index.js';
5
5
  export { ASTNode, ComparisonCondition, ComparisonOperator, DomainBehavior, DomainChunk, DomainDocument, DomainEffect, DomainEntity, DomainField, DomainFieldType, DomainGuard, DomainPage, DomainPageAction, DomainPageSection, DomainRelationship, DomainTick, DomainToSchemaResult, DomainTransition, EFFECT_REGISTRY, EffectMapping, EffectType, FIELD_TYPE_REGISTRY, FieldCheckCondition, FieldReference, FieldTypeMapping, GUARD_REGISTRY, GuardCondition, GuardMapping, KEYWORDS, Lexer, LogicalCondition, LogicalOperator, MULTI_WORD_KEYWORDS, MappingStore, MergeResult, ParseError, ParseResult, RelationshipType, SchemaToDomainResult, SectionMapping, SourceLocation, SourceRange, Token, TokenType, UserCheckCondition, applySectionUpdate, computeSchemaHash, convertDomainToSchema, convertEntitiesToDomain, convertPagesToDomain, convertSchemaToDomain, convertTraitsToDomain, createMappingStore, deleteSection, detectChanges, domainKeywordToSchemaType, findMapping, findMappingByPath, findMappingsByType, formatBehaviorToDomain, formatBehaviorToSchema, formatDomainGuardToSchema, formatEntityToDomain, formatEntityToSchema, formatGuardConditionToDomain, formatGuardToDomain, formatGuardToSchema, formatMergeSummary, formatPageToDomain, formatPageToSchema, formatSchemaEntityToDomain, formatSchemaGuardToDomain, formatSchemaPageToDomain, formatSchemaTraitToDomain, generateDomainLanguageReference, generateSectionId, getEffectMapping, getFieldTypeMapping, getGuardMapping, getRegisteredEffects, getRegisteredFieldTypes, getRegisteredGuards, getRegistryStats, getSchemaPath, hasSchemaChanged, isEffectRegistered, isFieldTypeRegistered, isGuardRegistered, mergeDomainChunks, parseBehavior, parseDomainEffect, parseDomainEffects, parseDomainGuard, parseEntity, parseGuard, parsePage, parseSectionId, removeMapping, resolveConflict, schemaEntityToDomainEntity, schemaPageToDomainPage, schemaTraitToDomainBehavior, schemaTypeToDomainKeyword, tokenize, updateMappingRange, updateSchemaHash, upsertMapping, validateDomainChunk } from './domain-language/index.js';
6
6
  export { C as ComposeBehaviorsInput, a as ComposeBehaviorsResult, E as EventWiringEntry, L as LayoutStrategy, b as applyEventWiring, c as composeBehaviors, d as detectLayoutStrategy } from './compose-behaviors-B6kpM8Iy.js';
7
7
  export { BFSNode, BFSPathNode, EdgeWalkTransition, GraphTransition, GuardPayload, ReplayStep, ReplayTransition, StateEdge, WalkStep, buildEdgeCoveringWalk, buildGuardPayloads, buildReplayPaths, buildStateGraph, collectReachableStates, extractPayloadFieldRef, walkStatePairs } from './state-machine/index.js';
@@ -1144,4 +1144,195 @@ type BusEventListener = (event: BusEvent) => void;
1144
1144
  /** Returned by `on()` / `once()` to detach a listener. */
1145
1145
  type Unsubscribe = () => void;
1146
1146
 
1147
- export { type AgentCodeSearchResult, type AgentCompactResult, type AgentCompactStrategy, type AgentContext, type AgentGenerateOptions, type AgentMemoryCategory, type AgentMemoryRecord, type AppSummary, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, type BindingContext, type BindingRoot, BindingSchema, type BusEvent, type BusEventListener, type BusEventSource, type CategorizedRemovals, type ChangeAuthor, type ChangeSetDocument, type ChangeSummary, type ContextExtensions, type CreateFlow, DEFAULT_INTERACTION_MODELS, type DeleteFlow, type EditFlow, EntityRow, EventPayload, FieldValue, type GitHubLink, type HistoryMeta, type InteractionModel, type InteractionModelInput, InteractionModelSchema, type LazyService, type ListInteraction, type PageContentReduction, PatternTypeSchema, type PersistActionName, type ResolvedEntity, type ResolvedEntityBinding, type ResolvedField, type ResolvedIR, type ResolvedNavigation, type ResolvedPage, type ResolvedPattern, type ResolvedSection, type ResolvedSectionEvent, type ResolvedTrait, type ResolvedTraitBinding, type ResolvedTraitDataEntity, type ResolvedTraitEvent, type ResolvedTraitGuard, type ResolvedTraitListener, type ResolvedTraitState, type ResolvedTraitTick, type ResolvedTraitTransition, type ResolvedTraitUIBinding, SExpr, type SaveOptions, type SaveResult, type SchemaChange, type SemanticChangeKind, type SemanticSchemaChange, type ServiceAction, type ServiceActionName, type ServiceContract, type ServiceEvents, type SnapshotDocument, type StatsView, type StoreContract, type StoreFilter, type StoreFilterOp, TraitConfig, type TransitionFrom, type Unsubscribe, type ValidationDocument, type ValidationIssue, type ValidationMeta, type ValidationResults, type ViewFlow, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, getAllPatternTypes, getBindingExamples, getInteractionModelForDomain, inferTsType, isResolvedIR, toBindingRoot, validateBindingInContext };
1147
+ /**
1148
+ * Verification Types (framework concept)
1149
+ *
1150
+ * The `window.__orbitalVerification` bridge is the single observation
1151
+ * point Playwright-based verifiers (`orbital-verify`, `runtime-verify`,
1152
+ * `@almadar-io/verify`) use to read runtime state out of a live app.
1153
+ * Its shape was previously duplicated between `@almadar/ui`'s
1154
+ * `verificationRegistry.ts` (producer) and `@almadar-io/verify`'s
1155
+ * `state-bridge.ts` (consumer). Every added field had to be mirrored
1156
+ * by hand; one side drifting silently broke the other.
1157
+ *
1158
+ * Hoisting the wire types into `@almadar/core` closes that gap the same
1159
+ * way {@link BusEvent} closed the UI/runtime event-shape drift. The
1160
+ * registry still owns the state machine, the schedule, and the window
1161
+ * exposure — this module owns only the shapes both sides agree on.
1162
+ *
1163
+ * @packageDocumentation
1164
+ */
1165
+
1166
+ /**
1167
+ * Outcome of a single verification check. `warn` is non-fatal in the
1168
+ * overall pass/fail tally; `pending` means the check has been registered
1169
+ * but not yet resolved.
1170
+ */
1171
+ type CheckStatus = "pass" | "fail" | "pending" | "warn";
1172
+ interface VerificationCheck {
1173
+ id: string;
1174
+ label: string;
1175
+ status: CheckStatus;
1176
+ details?: string;
1177
+ /** Timestamp (ms since epoch) when the status last changed. */
1178
+ updatedAt: number;
1179
+ }
1180
+ /**
1181
+ * Trace of a single effect as it ran on a transition. `args` are left
1182
+ * as `unknown[]` because different effect kinds have different argument
1183
+ * shapes; consumers narrow via `type` before inspecting.
1184
+ */
1185
+ interface EffectTrace {
1186
+ type: string;
1187
+ args: unknown[];
1188
+ status: "executed" | "failed" | "skipped";
1189
+ error?: string;
1190
+ durationMs?: number;
1191
+ }
1192
+ /** What the server returned for a forwarded event. */
1193
+ interface ServerResponseTrace {
1194
+ orbitalName: string;
1195
+ success: boolean;
1196
+ clientEffects: number;
1197
+ dataEntities: Record<string, number>;
1198
+ emittedEvents: string[];
1199
+ error?: string;
1200
+ timestamp: number;
1201
+ }
1202
+ interface TransitionTrace {
1203
+ id: string;
1204
+ traitName: string;
1205
+ from: string;
1206
+ to: string;
1207
+ event: string;
1208
+ guardExpression?: string;
1209
+ guardResult?: boolean;
1210
+ effects: EffectTrace[];
1211
+ /** Populated when the event round-tripped to the server. */
1212
+ serverResponse?: ServerResponseTrace;
1213
+ timestamp: number;
1214
+ }
1215
+ interface BridgeHealth {
1216
+ connected: boolean;
1217
+ eventsForwarded: number;
1218
+ eventsReceived: number;
1219
+ lastError?: string;
1220
+ lastHeartbeat: number;
1221
+ }
1222
+ interface VerificationSummary {
1223
+ totalChecks: number;
1224
+ passed: number;
1225
+ failed: number;
1226
+ warnings: number;
1227
+ pending: number;
1228
+ }
1229
+ /**
1230
+ * Per-trait state snapshot exposed to the verifier so it can assert
1231
+ * that reducer data (populated by fetch/persist transitions) and the
1232
+ * last dispatched payload land in the DOM correctly (VG4/VG6/VG11a/b/c).
1233
+ *
1234
+ * Mirrors what `useTraitStateMachine` / generated trait logic hooks
1235
+ * keep internally, without the verifier having to parse rendered text.
1236
+ */
1237
+ interface TraitStateSnapshot {
1238
+ /** Trait name as declared in the schema. */
1239
+ traitName: string;
1240
+ /** Current state machine state. */
1241
+ currentState: string;
1242
+ /** Declared state names for this trait (non-empty for healthy refs). */
1243
+ states: string[];
1244
+ /** Declared event keys for this trait (non-empty for healthy refs). */
1245
+ events: string[];
1246
+ /**
1247
+ * Entity data keyed by entity name. Uses {@link EntityRow} — the
1248
+ * canonical persisted-entity shape the server returns and the trait
1249
+ * reducer stores. Consumers that need full field-level types can cast
1250
+ * down to the generated entity (e.g. `data['CartItem'] as CartItem[]`).
1251
+ * Snapshot-on-read; mutating the returned arrays does not affect the
1252
+ * live reducer.
1253
+ */
1254
+ data: Record<string, EntityRow[]>;
1255
+ /** Payload of the last event the state machine processed, if any. */
1256
+ lastPayload?: EventPayload;
1257
+ /**
1258
+ * Last event the walker (or a UI click) dispatched into this trait.
1259
+ * Used by VG11a to resolve `@payload.X` expected values.
1260
+ */
1261
+ lastEventDispatched?: {
1262
+ event: string;
1263
+ payload?: EventPayload;
1264
+ source?: BusEventSource;
1265
+ timestamp: number;
1266
+ };
1267
+ /**
1268
+ * Bus events received from the server's `emittedEvents` cascade
1269
+ * since the last user dispatch. VG4 compares the length against the
1270
+ * number of `emit: { success/failure: ... }` entries on the
1271
+ * triggering transition.
1272
+ */
1273
+ cascadeReceived: Array<{
1274
+ event: string;
1275
+ payload?: EventPayload;
1276
+ timestamp: number;
1277
+ }>;
1278
+ }
1279
+ interface VerificationSnapshot {
1280
+ checks: VerificationCheck[];
1281
+ transitions: TransitionTrace[];
1282
+ bridge: BridgeHealth | null;
1283
+ summary: VerificationSummary;
1284
+ /**
1285
+ * Per-trait reducer snapshots. Empty on older runtimes that predate
1286
+ * the Foundation 1 expansion; non-empty once any trait hook has
1287
+ * registered a snapshot getter.
1288
+ */
1289
+ traits: TraitStateSnapshot[];
1290
+ }
1291
+ /** Asset load status exposed for canvas-based game verification. */
1292
+ type AssetLoadStatus = "loaded" | "failed" | "pending";
1293
+ /**
1294
+ * Entry recorded on the verification event log. The registry clamps
1295
+ * the log size (see `verificationRegistry`'s internal `MAX_EVENT_LOG`)
1296
+ * so long runs don't grow unbounded.
1297
+ */
1298
+ interface EventLogEntry {
1299
+ type: string;
1300
+ payload?: EventPayload;
1301
+ timestamp: number;
1302
+ }
1303
+ /**
1304
+ * The object attached to `window.__orbitalVerification`. Every optional
1305
+ * member is wired up by a corresponding `bind*` / `register*` call on
1306
+ * the registry (e.g. `bindEventBus` populates `sendEvent`). Consumers
1307
+ * should null-check before calling — an older bundle might expose only
1308
+ * the core readers.
1309
+ */
1310
+ interface OrbitalVerificationAPI {
1311
+ getSnapshot: () => VerificationSnapshot;
1312
+ getChecks: () => VerificationCheck[];
1313
+ getTransitions: () => TransitionTrace[];
1314
+ getBridge: () => BridgeHealth | null;
1315
+ getSummary: () => VerificationSummary;
1316
+ /** Wait for a specific event to be processed. Resolves to null on timeout. */
1317
+ waitForTransition: (event: string, timeoutMs?: number) => Promise<TransitionTrace | null>;
1318
+ /**
1319
+ * Send an event into the runtime. Requires {@link bindEventBus} (in
1320
+ * `@almadar/ui`) to have run at least once. Payload typed as
1321
+ * {@link EventPayload} so callers can't slip non-bus-shaped data in.
1322
+ */
1323
+ sendEvent?: (event: string, payload?: EventPayload) => void;
1324
+ /** Current state name for a given trait, if known. */
1325
+ getTraitState?: (traitName: string) => string | undefined;
1326
+ /** Per-trait reducer snapshots (VG4/VG6/VG11a/b/c). */
1327
+ getTraitSnapshots?: () => TraitStateSnapshot[];
1328
+ /** Canvas frame capture. Populated by game organisms on mount. */
1329
+ captureFrame?: () => string | null;
1330
+ /** Asset-url → load-status map. Populated by game organisms. */
1331
+ assetStatus?: Record<string, AssetLoadStatus>;
1332
+ /** Rolling event bus log. Populated by `bindEventBus`. */
1333
+ eventLog?: EventLogEntry[];
1334
+ /** Clear the event log in place. */
1335
+ clearEventLog?: () => void;
1336
+ }
1337
+
1338
+ export { type AgentCodeSearchResult, type AgentCompactResult, type AgentCompactStrategy, type AgentContext, type AgentGenerateOptions, type AgentMemoryCategory, type AgentMemoryRecord, type AppSummary, type AssetLoadStatus, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, type BindingContext, type BindingRoot, BindingSchema, type BridgeHealth, type BusEvent, type BusEventListener, type BusEventSource, type CategorizedRemovals, type ChangeAuthor, type ChangeSetDocument, type ChangeSummary, type CheckStatus, type ContextExtensions, type CreateFlow, DEFAULT_INTERACTION_MODELS, type DeleteFlow, type EditFlow, type EffectTrace, EntityRow, type EventLogEntry, EventPayload, FieldValue, type GitHubLink, type HistoryMeta, type InteractionModel, type InteractionModelInput, InteractionModelSchema, type LazyService, type ListInteraction, type OrbitalVerificationAPI, type PageContentReduction, PatternTypeSchema, type PersistActionName, type ResolvedEntity, type ResolvedEntityBinding, type ResolvedField, type ResolvedIR, type ResolvedNavigation, type ResolvedPage, type ResolvedPattern, type ResolvedSection, type ResolvedSectionEvent, type ResolvedTrait, type ResolvedTraitBinding, type ResolvedTraitDataEntity, type ResolvedTraitEvent, type ResolvedTraitGuard, type ResolvedTraitListener, type ResolvedTraitState, type ResolvedTraitTick, type ResolvedTraitTransition, type ResolvedTraitUIBinding, SExpr, type SaveOptions, type SaveResult, type SchemaChange, type SemanticChangeKind, type SemanticSchemaChange, type ServerResponseTrace, type ServiceAction, type ServiceActionName, type ServiceContract, type ServiceEvents, type SnapshotDocument, type StatsView, type StoreContract, type StoreFilter, type StoreFilterOp, TraitConfig, type TraitStateSnapshot, type TransitionFrom, type TransitionTrace, type Unsubscribe, type ValidationDocument, type ValidationIssue, type ValidationMeta, type ValidationResults, type VerificationCheck, type VerificationSnapshot, type VerificationSummary, type ViewFlow, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, getAllPatternTypes, getBindingExamples, getInteractionModelForDomain, inferTsType, isResolvedIR, toBindingRoot, validateBindingInContext };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/core",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "description": "Core schema types and definitions for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",