@almadar/core 10.129.0 → 11.0.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/behavior-package.d.ts +49 -11
- package/dist/behavior-package.js +1 -1
- package/dist/{orbital-CkFdDS9f.d.ts → builders-BhnofAik.d.ts} +5966 -7116
- package/dist/builders.d.ts +6 -6
- package/dist/builders.js +7 -6
- package/dist/{bus-CcbB__oo.d.ts → bus-BrRFWDQK.d.ts} +270 -354
- package/dist/chunk-347APWFM.js +286 -0
- package/dist/chunk-347APWFM.js.map +1 -0
- package/dist/chunk-3URQAGD7.js +98 -0
- package/dist/chunk-3URQAGD7.js.map +1 -0
- package/dist/chunk-7GHJU5WI.js +39 -0
- package/dist/chunk-7GHJU5WI.js.map +1 -0
- package/dist/chunk-B4MNHGBP.js +8 -0
- package/dist/chunk-B4MNHGBP.js.map +1 -0
- package/dist/{chunk-KDMV222Q.js → chunk-F6KHUW7T.js} +304 -373
- package/dist/chunk-F6KHUW7T.js.map +1 -0
- package/dist/chunk-FGT5OS2Y.js +918 -0
- package/dist/chunk-FGT5OS2Y.js.map +1 -0
- package/dist/chunk-FQLEAMAB.js +24 -0
- package/dist/chunk-FQLEAMAB.js.map +1 -0
- package/dist/chunk-HEXOGHQ4.js +3264 -0
- package/dist/chunk-HEXOGHQ4.js.map +1 -0
- package/dist/chunk-JCD6GLBX.js +412 -0
- package/dist/chunk-JCD6GLBX.js.map +1 -0
- package/dist/{chunk-QUOTJULD.js → chunk-MGLG2XLD.js} +20 -219
- package/dist/chunk-MGLG2XLD.js.map +1 -0
- package/dist/chunk-MTBEBSNO.js +1293 -0
- package/dist/chunk-MTBEBSNO.js.map +1 -0
- package/dist/{chunk-X4SC7FGF.js → chunk-RGACZEYC.js} +99 -96
- package/dist/chunk-RGACZEYC.js.map +1 -0
- package/dist/{chunk-RYPVOI6H.js → chunk-UZPYYI37.js} +524 -26
- package/dist/{chunk-RYPVOI6H.js.map → chunk-UZPYYI37.js.map} +1 -1
- package/dist/chunk-VG7BRFUD.js +152 -0
- package/dist/chunk-VG7BRFUD.js.map +1 -0
- package/dist/chunk-Y2DYZPP5.js +2329 -0
- package/dist/chunk-Y2DYZPP5.js.map +1 -0
- package/dist/chunk-ZEI7C32D.js +1566 -0
- package/dist/chunk-ZEI7C32D.js.map +1 -0
- package/dist/{domain-Dz3jP-UM.d.ts → domain-CfKPpXCP.d.ts} +51 -51
- package/dist/{effect-result-Bebwu9yT.d.ts → effect-result-DPERsn_v.d.ts} +641 -851
- package/dist/{effect-CiEVLsZz.d.ts → effect-wP-IdRt2.d.ts} +236 -443
- package/dist/{expression-D0Fs0riG.d.ts → expression-DirYKz-f.d.ts} +5 -13
- package/dist/factory/index.d.ts +7 -144
- package/dist/factory/index.js +8 -8
- package/dist/factory-runtime/index.d.ts +7 -6
- package/dist/factory-runtime/index.js +527 -8
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/fixtures.d.ts +9 -11
- package/dist/fixtures.js +12 -8
- package/dist/fixtures.js.map +1 -1
- package/dist/i18n/index.d.ts +15 -19
- package/dist/i18n/index.js +2 -1
- package/dist/{index-BC-Jycqj.d.ts → index-DomgmRBG.d.ts} +29 -729
- package/dist/index.d.ts +69 -247
- package/dist/index.js +322 -986
- package/dist/index.js.map +1 -1
- package/dist/kernel-wire.d.ts +3 -3
- package/dist/kernel-wire.js +3 -79
- package/dist/kernel-wire.js.map +1 -1
- package/dist/language/constructs.json +22 -2
- package/dist/language/program-types.json +203 -22
- package/dist/language/protocols.json +46 -0
- package/dist/language/ui-vocabulary.json +1697 -0
- package/dist/language/validation-codes.json +1205 -1215
- package/dist/language/vocabulary.json +44 -8
- package/dist/language-data.d.ts +7 -4
- package/dist/language-data.js +20 -14
- package/dist/language-data.js.map +1 -1
- package/dist/patterns/component-mapping.json +11 -1
- package/dist/patterns/definitions.d.ts +2 -2
- package/dist/patterns/definitions.js +1 -1
- package/dist/patterns/event-contracts.json +1 -15
- package/dist/patterns/index.d.ts +24 -120
- package/dist/patterns/index.js +3 -3
- package/dist/patterns/patterns-registry.json +522 -24
- package/dist/patterns/registry.json +522 -24
- package/dist/trait-CzG9M89M.d.ts +3519 -0
- package/dist/types/index.d.ts +9 -10
- package/dist/types/index.js +11 -5
- package/dist/{types-DGwrltUF.d.ts → types-BHlTjwWd.d.ts} +3 -3
- package/fixtures/events-wire/client-effects-by-trait/response.json +0 -18
- package/fixtures/events-wire/client-effects-provenance/response.json +0 -18
- package/fixtures/events-wire/effect-results-every-kind/response.json +2 -27
- package/fixtures/events-wire/navigate-1/response.json +8 -5
- package/fixtures/events-wire/navigate-2/response.json +11 -8
- package/fixtures/events-wire/navigate-3/response.json +14 -11
- package/fixtures/events-wire/navigate-back/response.json +7 -4
- package/fixtures/events-wire/render-ui-3/response.json +12 -9
- package/fixtures/events-wire/render-ui-clear/response.json +0 -7
- package/fixtures/events-wire/sse-stream/response.json +0 -20
- package/fixtures/events-wire/sse-stream/stream.json +0 -20
- package/fixtures/events-wire/stateless-traits/response.json +14 -5
- package/fixtures/kernel-wire/golden/basic-entity.json +1687 -0
- package/fixtures/kernel-wire/golden/entity-rerender.json +743 -0
- package/fixtures/kernel-wire/golden/rollback.json +793 -0
- package/fixtures/kernel-wire/golden/tick-counter.json +1538 -0
- package/fixtures/kernel-wire/golden/two-orbital-chore.json +847 -0
- package/fixtures/kernel-wire/golden/two-orbital-task.json +457 -0
- package/fixtures/kernel-wire/played-step.json +136 -0
- package/fixtures/kernel-wire/scripts/basic-entity.json +28 -0
- package/fixtures/kernel-wire/scripts/entity-rerender.json +13 -0
- package/fixtures/kernel-wire/scripts/rollback.json +53 -0
- package/fixtures/kernel-wire/scripts/tick-counter.json +26 -0
- package/fixtures/kernel-wire/scripts/two-orbital-chore.json +9 -0
- package/fixtures/kernel-wire/scripts/two-orbital-task.json +9 -0
- package/package.json +28 -19
- package/dist/builders-DmZE5By0.d.ts +0 -2663
- package/dist/chunk-45I2O4SJ.js +0 -4646
- package/dist/chunk-45I2O4SJ.js.map +0 -1
- package/dist/chunk-6LR43Z5E.js +0 -3061
- package/dist/chunk-6LR43Z5E.js.map +0 -1
- package/dist/chunk-GIUA3NUJ.js +0 -809
- package/dist/chunk-GIUA3NUJ.js.map +0 -1
- package/dist/chunk-GTY53NS5.js +0 -1908
- package/dist/chunk-GTY53NS5.js.map +0 -1
- package/dist/chunk-JOHDVS6J.js +0 -1614
- package/dist/chunk-JOHDVS6J.js.map +0 -1
- package/dist/chunk-KDMV222Q.js.map +0 -1
- package/dist/chunk-QRHJUS3D.js +0 -23
- package/dist/chunk-QRHJUS3D.js.map +0 -1
- package/dist/chunk-QUOTJULD.js.map +0 -1
- package/dist/chunk-V5VNGRVU.js +0 -66
- package/dist/chunk-V5VNGRVU.js.map +0 -1
- package/dist/chunk-X4SC7FGF.js.map +0 -1
- package/dist/entityAccess-BPSz1i2n.d.ts +0 -80
- package/dist/mock/index.d.ts +0 -153
- package/dist/mock/index.js +0 -190
- package/dist/mock/index.js.map +0 -1
- package/dist/schema-T5RT5s6H.d.ts +0 -282
- package/dist/state-machine/index.d.ts +0 -359
- package/dist/state-machine/index.js +0 -3
- package/dist/state-machine/index.js.map +0 -1
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as JsonObject, J as JsonValue, S as SExpr, R as RuntimeValue, b as EventPayloadValue, E as EventPayload, h as EvalTrace, T as ToolArgs, f as EvalContext } from './expression-D0Fs0riG.js';
|
|
1
|
+
import { M as MakeTraitRefOpts, aE as PageTraitRef, O as OrbitalSchema, G as EventWiringEntry, S as LayoutStrategy, L as Orbital, P as Page, a as OrbitalDefinition } from './builders-BhnofAik.js';
|
|
2
|
+
import { E as EntityField, a as EntityPersistence, j as ServiceParams, h as Entity, c as EntityRow, d as Effect, T as TraitId, b as EventId } from './effect-wP-IdRt2.js';
|
|
3
|
+
import { a as JsonObject, J as JsonValue, S as SExpr, R as RuntimeValue, E as EventPayloadValue, c as EventPayload, h as EvalTrace, T as ToolArgs, f as EvalContext } from './expression-DirYKz-f.js';
|
|
5
4
|
import { z } from 'zod';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { T as TraitOverlay, R as RuleOverlay, J as JsonSchema, c as FactoryConfigTier } from './types-
|
|
9
|
-
import { T as ThemeDefinition, D as DomainContext, K as DiagramLineCap, M as DiagramLineJoin, E as DiagramFillStyle, O as DiagramMarker, I as DiagramLabelFont } from './domain-
|
|
10
|
-
import {
|
|
5
|
+
import { aF as WriteCapabilities, a3 as QueryCapabilities, a7 as RowCommit, aa as RowIdPage, af as RowPredicate, ah as RowQueryPage, ag as RowQuery, an as RowWriteBatch, ap as RowWriteOp, aq as RowWriteOutcome, ac as RowOrder, c as BusEventSource } from './bus-BrRFWDQK.js';
|
|
6
|
+
import { a as TraitReference, c as Trait, d as TraitConfig, C as ConfigFieldDeclaration, ab as State, ay as Transition, z as Event, b as TraitConfigValue, T as TraitEventListener } from './trait-CzG9M89M.js';
|
|
7
|
+
import { T as TraitOverlay, R as RuleOverlay, J as JsonSchema, c as FactoryConfigTier } from './types-BHlTjwWd.js';
|
|
8
|
+
import { T as ThemeDefinition, D as DomainContext, K as DiagramLineCap, M as DiagramLineJoin, E as DiagramFillStyle, O as DiagramMarker, I as DiagramLabelFont } from './domain-CfKPpXCP.js';
|
|
9
|
+
import { U as HopObservation, W as TabAsk, X as TabFailureKind, n as MachineRow, P as PayloadSlot, w as PlayedStep } from './effect-result-DPERsn_v.js';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Observability contract for a running app: one structured log line per entry (Cloud Logging's
|
|
@@ -804,113 +803,6 @@ interface TraceContext {
|
|
|
804
803
|
log(message: string, level?: 'log' | 'warn' | 'error', data?: EventPayloadValue): void;
|
|
805
804
|
}
|
|
806
805
|
|
|
807
|
-
/**
|
|
808
|
-
* Interaction Model Types
|
|
809
|
-
*
|
|
810
|
-
* Defines how users interact with entities in the application.
|
|
811
|
-
* Used to drive trait selection and UI slot usage.
|
|
812
|
-
*
|
|
813
|
-
* @packageDocumentation
|
|
814
|
-
*/
|
|
815
|
-
|
|
816
|
-
/**
|
|
817
|
-
* Create flow - how new items are created
|
|
818
|
-
*/
|
|
819
|
-
type CreateFlow = 'modal' | 'page' | 'inline' | 'none';
|
|
820
|
-
/**
|
|
821
|
-
* Edit flow - how items are edited
|
|
822
|
-
*/
|
|
823
|
-
type EditFlow = 'modal' | 'page' | 'inline' | 'none';
|
|
824
|
-
/**
|
|
825
|
-
* View flow - how item details are viewed
|
|
826
|
-
*/
|
|
827
|
-
type ViewFlow = 'drawer' | 'page' | 'modal' | 'inline' | 'none';
|
|
828
|
-
/**
|
|
829
|
-
* Delete flow - how items are deleted
|
|
830
|
-
*/
|
|
831
|
-
type DeleteFlow = 'confirm' | 'instant' | 'none';
|
|
832
|
-
/**
|
|
833
|
-
* List interaction - what happens when clicking list items
|
|
834
|
-
*/
|
|
835
|
-
type ListInteraction = 'click-to-view' | 'click-to-edit' | 'inline-edit';
|
|
836
|
-
/**
|
|
837
|
-
* InteractionModel - defines how users interact with entities.
|
|
838
|
-
*
|
|
839
|
-
* This drives:
|
|
840
|
-
* - Which traits to attach (EntityManagement, ModalEdit, etc.)
|
|
841
|
-
* - How render_ui effects target slots (modal, drawer, page)
|
|
842
|
-
* - What UI patterns to use
|
|
843
|
-
*/
|
|
844
|
-
interface InteractionModel {
|
|
845
|
-
/** How new items are created */
|
|
846
|
-
createFlow: CreateFlow;
|
|
847
|
-
/** How items are edited */
|
|
848
|
-
editFlow: EditFlow;
|
|
849
|
-
/** How item details are viewed */
|
|
850
|
-
viewFlow: ViewFlow;
|
|
851
|
-
/** How items are deleted */
|
|
852
|
-
deleteFlow: DeleteFlow;
|
|
853
|
-
/** What happens when clicking list items */
|
|
854
|
-
listInteraction?: ListInteraction;
|
|
855
|
-
/** Enable bulk actions (select multiple, delete all) */
|
|
856
|
-
bulkActions?: boolean;
|
|
857
|
-
/** Enable real-time updates */
|
|
858
|
-
realtime?: boolean;
|
|
859
|
-
}
|
|
860
|
-
declare const InteractionModelSchema: z.ZodObject<{
|
|
861
|
-
createFlow: z.ZodEnum<{
|
|
862
|
-
page: "page";
|
|
863
|
-
modal: "modal";
|
|
864
|
-
inline: "inline";
|
|
865
|
-
none: "none";
|
|
866
|
-
}>;
|
|
867
|
-
editFlow: z.ZodEnum<{
|
|
868
|
-
page: "page";
|
|
869
|
-
modal: "modal";
|
|
870
|
-
inline: "inline";
|
|
871
|
-
none: "none";
|
|
872
|
-
}>;
|
|
873
|
-
viewFlow: z.ZodEnum<{
|
|
874
|
-
page: "page";
|
|
875
|
-
modal: "modal";
|
|
876
|
-
drawer: "drawer";
|
|
877
|
-
inline: "inline";
|
|
878
|
-
none: "none";
|
|
879
|
-
}>;
|
|
880
|
-
deleteFlow: z.ZodEnum<{
|
|
881
|
-
instant: "instant";
|
|
882
|
-
none: "none";
|
|
883
|
-
confirm: "confirm";
|
|
884
|
-
}>;
|
|
885
|
-
listInteraction: z.ZodOptional<z.ZodEnum<{
|
|
886
|
-
"click-to-view": "click-to-view";
|
|
887
|
-
"click-to-edit": "click-to-edit";
|
|
888
|
-
"inline-edit": "inline-edit";
|
|
889
|
-
}>>;
|
|
890
|
-
bulkActions: z.ZodOptional<z.ZodBoolean>;
|
|
891
|
-
realtime: z.ZodOptional<z.ZodBoolean>;
|
|
892
|
-
}, z.core.$strip>;
|
|
893
|
-
/**
|
|
894
|
-
* Default interaction models for each domain type
|
|
895
|
-
*/
|
|
896
|
-
declare const DEFAULT_INTERACTION_MODELS: Record<string, InteractionModel>;
|
|
897
|
-
/**
|
|
898
|
-
* Gets the interaction model for a domain.
|
|
899
|
-
*
|
|
900
|
-
* Retrieves the appropriate interaction model configuration based on the
|
|
901
|
-
* specified domain. Falls back to the business model if no specific
|
|
902
|
-
* domain match is found.
|
|
903
|
-
*
|
|
904
|
-
* @param {string} domain - Domain name (e.g., 'healthcare', 'education')
|
|
905
|
-
* @returns {InteractionModel} Interaction model configuration
|
|
906
|
-
*
|
|
907
|
-
* @example
|
|
908
|
-
* getInteractionModelForDomain('healthcare'); // returns healthcare-specific model
|
|
909
|
-
* getInteractionModelForDomain('unknown'); // returns business fallback model
|
|
910
|
-
*/
|
|
911
|
-
declare function getInteractionModelForDomain(domain: string): InteractionModel;
|
|
912
|
-
type InteractionModelInput = z.input<typeof InteractionModelSchema>;
|
|
913
|
-
|
|
914
806
|
/**
|
|
915
807
|
* Pattern Type for Orbital Units
|
|
916
808
|
*
|
|
@@ -1249,358 +1141,6 @@ type RowBindingResult = {
|
|
|
1249
1141
|
/** A fetch's `orderBy` (`"field"` or `"field:asc|desc"`): ascending unless `desc`. */
|
|
1250
1142
|
declare function parseFetchOrder(orderBy: string | undefined): RowOrder | undefined;
|
|
1251
1143
|
|
|
1252
|
-
/**
|
|
1253
|
-
* Transition source state specification.
|
|
1254
|
-
* - string: Single state name (e.g., 'Idle')
|
|
1255
|
-
* - '*': Wildcard - matches any current state
|
|
1256
|
-
* - string[]: Array of states - matches any of the listed states
|
|
1257
|
-
*/
|
|
1258
|
-
type TransitionFrom = string | '*' | string[];
|
|
1259
|
-
interface ResolvedField {
|
|
1260
|
-
name: string;
|
|
1261
|
-
type: string;
|
|
1262
|
-
tsType: string;
|
|
1263
|
-
description?: string;
|
|
1264
|
-
/** Field default — JSON-shaped, mirroring `EntityField.default`. */
|
|
1265
|
-
default?: JsonValue;
|
|
1266
|
-
required: boolean;
|
|
1267
|
-
/** Validation constraints carried from the schema (enum whitelist). */
|
|
1268
|
-
validation?: {
|
|
1269
|
-
enum?: string[];
|
|
1270
|
-
};
|
|
1271
|
-
/** Enum values for enum or constrained string fields */
|
|
1272
|
-
values?: string[];
|
|
1273
|
-
/** Enum values (alias for values, for compatibility) */
|
|
1274
|
-
enumValues?: string[];
|
|
1275
|
-
relation?: RelationConfig;
|
|
1276
|
-
intrinsic?: boolean;
|
|
1277
|
-
items?: EntityField;
|
|
1278
|
-
properties?: Record<string, EntityField>;
|
|
1279
|
-
}
|
|
1280
|
-
interface ResolvedEntity {
|
|
1281
|
-
name: string;
|
|
1282
|
-
description?: string;
|
|
1283
|
-
icon?: string;
|
|
1284
|
-
collection: string;
|
|
1285
|
-
fields: ResolvedField[];
|
|
1286
|
-
/** Whether this entity only exists in runtime (not persisted to Firestore) */
|
|
1287
|
-
runtime?: boolean;
|
|
1288
|
-
/** Whether this entity's state is shared across every bound trait (vs a per-trait copy). Orthogonal to `runtime`. */
|
|
1289
|
-
shared?: boolean;
|
|
1290
|
-
/** Whether this entity has pre-authored instances in the schema */
|
|
1291
|
-
hasInstances?: boolean;
|
|
1292
|
-
/** Pre-authored instances from the schema (seed data or static reference data) */
|
|
1293
|
-
instances?: EntityRow[];
|
|
1294
|
-
/** Default field values from schema (for spawning singletons) */
|
|
1295
|
-
defaults?: Record<string, FieldValue>;
|
|
1296
|
-
usedByTraits: string[];
|
|
1297
|
-
usedByPages: string[];
|
|
1298
|
-
}
|
|
1299
|
-
interface ResolvedEntityBinding {
|
|
1300
|
-
/** Binding name in code */
|
|
1301
|
-
name: string;
|
|
1302
|
-
/** Entity being bound */
|
|
1303
|
-
entity: ResolvedEntity;
|
|
1304
|
-
/** CRUD operations to generate */
|
|
1305
|
-
operations: ('list' | 'get' | 'create' | 'update' | 'delete')[];
|
|
1306
|
-
}
|
|
1307
|
-
interface ResolvedTraitState {
|
|
1308
|
-
name: string;
|
|
1309
|
-
isInitial: boolean;
|
|
1310
|
-
isFinal: boolean;
|
|
1311
|
-
}
|
|
1312
|
-
interface ResolvedTraitEvent {
|
|
1313
|
-
key: string;
|
|
1314
|
-
name: string;
|
|
1315
|
-
payload?: Record<string, string>;
|
|
1316
|
-
}
|
|
1317
|
-
interface ResolvedTraitTransition {
|
|
1318
|
-
/** Source state(s): string, '*' for wildcard, or array of states */
|
|
1319
|
-
from: TransitionFrom;
|
|
1320
|
-
to: string;
|
|
1321
|
-
event: string;
|
|
1322
|
-
guard?: SExpr;
|
|
1323
|
-
effects: SExpr[];
|
|
1324
|
-
}
|
|
1325
|
-
interface ResolvedTraitGuard {
|
|
1326
|
-
name: string;
|
|
1327
|
-
condition: SExpr;
|
|
1328
|
-
}
|
|
1329
|
-
interface ResolvedTraitTick {
|
|
1330
|
-
name: string;
|
|
1331
|
-
/**
|
|
1332
|
-
* `number` (ms), `'frame'`, a duration string (`'5s'`/`'1m'`/`'1h'`), or a
|
|
1333
|
-
* 5-field cron expression (`'0 9 * * *'`) — `schema-to-ir.ts`'s
|
|
1334
|
-
* `interval: tick.interval || 0` passes the source schema's raw
|
|
1335
|
-
* `string | number` straight through with no normalization, so this must
|
|
1336
|
-
* match that reality rather than the narrower `number | 'frame'` it used
|
|
1337
|
-
* to declare (which made every non-'frame' string an unchecked cast at
|
|
1338
|
-
* every consumer).
|
|
1339
|
-
*/
|
|
1340
|
-
interval: number | string;
|
|
1341
|
-
guard?: SExpr;
|
|
1342
|
-
effects: SExpr[];
|
|
1343
|
-
priority: number;
|
|
1344
|
-
appliesTo: string[];
|
|
1345
|
-
/** `[visible]`: pauses while the trait's rendered output is off screen. */
|
|
1346
|
-
whileVisible: boolean;
|
|
1347
|
-
}
|
|
1348
|
-
interface ResolvedTraitListener {
|
|
1349
|
-
event: string;
|
|
1350
|
-
triggers: string;
|
|
1351
|
-
guard?: SExpr;
|
|
1352
|
-
/** `with { ... }` payload rewrite: `{ targetField: SExpr }`, evaluated against the source payload. */
|
|
1353
|
-
payloadMapping?: Record<string, SExpr>;
|
|
1354
|
-
/** Source scoping (see `ListenSource` in types/trait). */
|
|
1355
|
-
source?: ListenSource;
|
|
1356
|
-
}
|
|
1357
|
-
interface ResolvedTraitDataEntity {
|
|
1358
|
-
name: string;
|
|
1359
|
-
fields: ResolvedField[];
|
|
1360
|
-
runtime: boolean;
|
|
1361
|
-
singleton: boolean;
|
|
1362
|
-
}
|
|
1363
|
-
/**
|
|
1364
|
-
* UI binding for interaction traits - maps states to presentations
|
|
1365
|
-
*/
|
|
1366
|
-
interface ResolvedTraitUIBinding {
|
|
1367
|
-
[stateName: string]: {
|
|
1368
|
-
/** Presentation type: modal, drawer, popover, inline, confirm-dialog */
|
|
1369
|
-
presentation: string;
|
|
1370
|
-
/** Content pattern(s) to render */
|
|
1371
|
-
content: AnyPatternConfig | AnyPatternConfig[];
|
|
1372
|
-
/** Presentation props */
|
|
1373
|
-
props?: {
|
|
1374
|
-
size?: string;
|
|
1375
|
-
position?: string;
|
|
1376
|
-
title?: string;
|
|
1377
|
-
closable?: boolean;
|
|
1378
|
-
width?: string;
|
|
1379
|
-
showProgress?: boolean;
|
|
1380
|
-
step?: number;
|
|
1381
|
-
totalSteps?: number;
|
|
1382
|
-
};
|
|
1383
|
-
};
|
|
1384
|
-
}
|
|
1385
|
-
/**
|
|
1386
|
-
* One emit contract on a resolved trait — the minimal shape the
|
|
1387
|
-
* emit-source stamp needs (`eventId` lookup by event name, parity with
|
|
1388
|
-
* `OrbitalServerRuntime`'s `emitContract?.eventId`).
|
|
1389
|
-
*/
|
|
1390
|
-
interface ResolvedTraitEmit {
|
|
1391
|
-
event: string;
|
|
1392
|
-
eventId?: EventId;
|
|
1393
|
-
}
|
|
1394
|
-
/**
|
|
1395
|
-
* Fully resolved trait - expanded from schema OR library.
|
|
1396
|
-
* The compiler generates code from this structure universally,
|
|
1397
|
-
* without knowing which specific trait it is.
|
|
1398
|
-
*/
|
|
1399
|
-
interface ResolvedTrait {
|
|
1400
|
-
/** Unique trait identifier */
|
|
1401
|
-
name: string;
|
|
1402
|
-
/**
|
|
1403
|
-
* V4 dual-carry id sibling of `name` — preserved from the source trait
|
|
1404
|
-
* when the schema carries ids. The emit-source stamp needs it: an
|
|
1405
|
-
* id-scoped `listens` matcher (`buildSourceMatcher`, `@almadar/runtime`)
|
|
1406
|
-
* compares ids ONLY, so a name-only stamp never matches a `traitId`-carrying
|
|
1407
|
-
* listen (the chat SAVE → DO_CREATE relay died on the stateful path,
|
|
1408
|
-
* 2026-09-22).
|
|
1409
|
-
*/
|
|
1410
|
-
id?: TraitId;
|
|
1411
|
-
/**
|
|
1412
|
-
* The trait's emit contracts, preserved from the source trait when the
|
|
1413
|
-
* schema carries them. The emit-source stamp reads `eventId` from the
|
|
1414
|
-
* matching contract — parity with `OrbitalServerRuntime`'s emit stamp.
|
|
1415
|
-
*/
|
|
1416
|
-
emits?: ResolvedTraitEmit[];
|
|
1417
|
-
/** Human-readable description */
|
|
1418
|
-
description?: string;
|
|
1419
|
-
/** Where this trait came from */
|
|
1420
|
-
source: 'schema' | 'library' | 'inline';
|
|
1421
|
-
states: ResolvedTraitState[];
|
|
1422
|
-
events: ResolvedTraitEvent[];
|
|
1423
|
-
transitions: ResolvedTraitTransition[];
|
|
1424
|
-
guards: ResolvedTraitGuard[];
|
|
1425
|
-
ticks: ResolvedTraitTick[];
|
|
1426
|
-
listens: ResolvedTraitListener[];
|
|
1427
|
-
dataEntities: ResolvedTraitDataEntity[];
|
|
1428
|
-
/**
|
|
1429
|
-
* Atom-declared linked entity. The atom (e.g. std-pagination)
|
|
1430
|
-
* declares which entity its `@entity.X` bindings resolve against
|
|
1431
|
-
* (e.g. `PagedItem`). Distinct from the call-site rebind on
|
|
1432
|
-
* `ResolvedTraitBinding.linkedEntity`, which a molecule may use
|
|
1433
|
-
* to override the atom's default. Either side may be undefined
|
|
1434
|
-
* for traits that don't bind any entity (pure interaction).
|
|
1435
|
-
*/
|
|
1436
|
-
linkedEntity?: string;
|
|
1437
|
-
/**
|
|
1438
|
-
* The trait's DECLARED `config { }` schema (per-field
|
|
1439
|
-
* `{ type, default? }`). Drives `@config.X` substitution: each
|
|
1440
|
-
* field's `default` seeds the binding context behind any caller-
|
|
1441
|
-
* supplied call-site `config: { ... }` override on the trait
|
|
1442
|
-
* reference. Authored on the atom; flows through verbatim from
|
|
1443
|
-
* `Trait.config`.
|
|
1444
|
-
*
|
|
1445
|
-
* (Caller-supplied call-site overrides live on the page-trait
|
|
1446
|
-
* binding's `config: TraitConfig` — see `ResolvedTraitBinding`.)
|
|
1447
|
-
*/
|
|
1448
|
-
config?: DeclaredTraitConfig;
|
|
1449
|
-
ui?: ResolvedTraitUIBinding;
|
|
1450
|
-
}
|
|
1451
|
-
/**
|
|
1452
|
-
* Trait binding on a page - links a resolved trait to the page
|
|
1453
|
-
*/
|
|
1454
|
-
interface ResolvedTraitBinding {
|
|
1455
|
-
/** Reference name */
|
|
1456
|
-
ref?: string;
|
|
1457
|
-
/** Fully resolved trait */
|
|
1458
|
-
trait: ResolvedTrait;
|
|
1459
|
-
/** Entity this trait operates on (if any) */
|
|
1460
|
-
linkedEntity?: string;
|
|
1461
|
-
/** Instance configuration */
|
|
1462
|
-
config?: TraitConfig;
|
|
1463
|
-
}
|
|
1464
|
-
interface ResolvedPattern {
|
|
1465
|
-
/** Pattern type (e.g., 'page-header', 'data-list', 'game-canvas') */
|
|
1466
|
-
type: string;
|
|
1467
|
-
/** Pattern configuration */
|
|
1468
|
-
config: AnyPatternConfig;
|
|
1469
|
-
/** Shell component to use */
|
|
1470
|
-
shellComponent?: string;
|
|
1471
|
-
}
|
|
1472
|
-
interface ResolvedSectionEvent {
|
|
1473
|
-
event: string;
|
|
1474
|
-
action: string;
|
|
1475
|
-
target?: string;
|
|
1476
|
-
}
|
|
1477
|
-
interface ResolvedSection {
|
|
1478
|
-
/** Section identifier */
|
|
1479
|
-
id: string;
|
|
1480
|
-
/** Resolved pattern */
|
|
1481
|
-
pattern: ResolvedPattern;
|
|
1482
|
-
/** Events emitted by this section */
|
|
1483
|
-
events: ResolvedSectionEvent[];
|
|
1484
|
-
/** Position in page layout */
|
|
1485
|
-
position?: number;
|
|
1486
|
-
/** Entity binding for this section */
|
|
1487
|
-
binding?: ResolvedEntityBinding;
|
|
1488
|
-
}
|
|
1489
|
-
interface ResolvedNavigation {
|
|
1490
|
-
event?: string;
|
|
1491
|
-
from?: string;
|
|
1492
|
-
to: string;
|
|
1493
|
-
trigger?: string;
|
|
1494
|
-
params?: Record<string, string>;
|
|
1495
|
-
label?: string;
|
|
1496
|
-
path?: string;
|
|
1497
|
-
icon?: string;
|
|
1498
|
-
}
|
|
1499
|
-
interface ResolvedPage {
|
|
1500
|
-
/** Page identifier */
|
|
1501
|
-
name: string;
|
|
1502
|
-
/** URL path */
|
|
1503
|
-
path: string;
|
|
1504
|
-
/** Feature folder name */
|
|
1505
|
-
featureName: string;
|
|
1506
|
-
/** Layout component */
|
|
1507
|
-
layout?: string;
|
|
1508
|
-
/** View type (dashboard, list, detail, create, edit) */
|
|
1509
|
-
viewType?: 'dashboard' | 'list' | 'detail' | 'create' | 'edit';
|
|
1510
|
-
/** Resolved sections */
|
|
1511
|
-
sections: ResolvedSection[];
|
|
1512
|
-
/** Resolved trait bindings */
|
|
1513
|
-
traits: ResolvedTraitBinding[];
|
|
1514
|
-
/** Entity data bindings */
|
|
1515
|
-
entityBindings: ResolvedEntityBinding[];
|
|
1516
|
-
/** Navigation wiring */
|
|
1517
|
-
navigation: ResolvedNavigation[];
|
|
1518
|
-
/** Singleton entities to spawn on this page (runtime singletons) */
|
|
1519
|
-
singletonEntities: ResolvedEntity[];
|
|
1520
|
-
/** `access:` page modifier; absent = no gate. */
|
|
1521
|
-
access?: PageAccess;
|
|
1522
|
-
/** `indexing:` page modifier. */
|
|
1523
|
-
indexing?: PageIndexing;
|
|
1524
|
-
/** The upstream page this one was imported from; see `OrbitalPage.sourcePage`. */
|
|
1525
|
-
sourcePage?: string;
|
|
1526
|
-
/** `translationOf:` page modifier; see `OrbitalPage.translationOf`. */
|
|
1527
|
-
translationOf?: string;
|
|
1528
|
-
/** `title:` page modifier. */
|
|
1529
|
-
title?: PageMeta;
|
|
1530
|
-
/** `description:` page modifier. */
|
|
1531
|
-
description?: PageMeta;
|
|
1532
|
-
}
|
|
1533
|
-
/**
|
|
1534
|
-
* Complete resolved IR - all references expanded
|
|
1535
|
-
*/
|
|
1536
|
-
interface ResolvedIR {
|
|
1537
|
-
/** App name */
|
|
1538
|
-
appName: string;
|
|
1539
|
-
/** App description */
|
|
1540
|
-
description?: string;
|
|
1541
|
-
/** App version */
|
|
1542
|
-
version?: string;
|
|
1543
|
-
/** All resolved entities (Map for lookup) */
|
|
1544
|
-
entities: Map<string, ResolvedEntity>;
|
|
1545
|
-
/** All resolved traits (Map for lookup) */
|
|
1546
|
-
traits: Map<string, ResolvedTrait>;
|
|
1547
|
-
/** All resolved pages (Map for lookup) */
|
|
1548
|
-
pages: Map<string, ResolvedPage>;
|
|
1549
|
-
/** Entity bindings (used for data hook generation) */
|
|
1550
|
-
entityBindings: ResolvedEntityBinding[];
|
|
1551
|
-
/** Raw data entities (used for instance data generation) */
|
|
1552
|
-
rawEntities?: Entity[];
|
|
1553
|
-
/** Generation timestamp */
|
|
1554
|
-
generatedAt: string;
|
|
1555
|
-
}
|
|
1556
|
-
/**
|
|
1557
|
-
* Create an empty resolved trait with defaults
|
|
1558
|
-
*/
|
|
1559
|
-
declare function createEmptyResolvedTrait(name: string, source: 'schema' | 'library' | 'inline'): ResolvedTrait;
|
|
1560
|
-
/**
|
|
1561
|
-
* Create an empty resolved page with defaults
|
|
1562
|
-
*/
|
|
1563
|
-
declare function createEmptyResolvedPage(name: string): ResolvedPage;
|
|
1564
|
-
/**
|
|
1565
|
-
* Infer TypeScript type from schema type
|
|
1566
|
-
*/
|
|
1567
|
-
declare function inferTsType(schemaType: string): string;
|
|
1568
|
-
/**
|
|
1569
|
-
* Create a resolved field with TypeScript type inference
|
|
1570
|
-
*/
|
|
1571
|
-
declare function createResolvedField(field: {
|
|
1572
|
-
name: string;
|
|
1573
|
-
type: string;
|
|
1574
|
-
description?: string;
|
|
1575
|
-
default?: JsonValue;
|
|
1576
|
-
required?: boolean;
|
|
1577
|
-
validation?: {
|
|
1578
|
-
enum?: string[];
|
|
1579
|
-
};
|
|
1580
|
-
values?: string[];
|
|
1581
|
-
relation?: RelationConfig;
|
|
1582
|
-
intrinsic?: boolean;
|
|
1583
|
-
items?: EntityField;
|
|
1584
|
-
properties?: Record<string, EntityField>;
|
|
1585
|
-
}): ResolvedField;
|
|
1586
|
-
/**
|
|
1587
|
-
* Type guard to check if an object is a ResolvedIR.
|
|
1588
|
-
*
|
|
1589
|
-
* Validates that an unknown value conforms to the ResolvedIR structure.
|
|
1590
|
-
* Checks for required properties and correct types. Used for runtime
|
|
1591
|
-
* type checking and validation.
|
|
1592
|
-
*
|
|
1593
|
-
* @param {unknown} ir - Value to check
|
|
1594
|
-
* @returns {boolean} True if value is ResolvedIR, false otherwise
|
|
1595
|
-
*
|
|
1596
|
-
* @example
|
|
1597
|
-
* if (isResolvedIR(schema)) {
|
|
1598
|
-
* // Type-safe access to ResolvedIR properties
|
|
1599
|
-
* console.log('Valid IR:', schema.appName);
|
|
1600
|
-
* }
|
|
1601
|
-
*/
|
|
1602
|
-
declare function isResolvedIR(ir: RuntimeValue): ir is ResolvedIR;
|
|
1603
|
-
|
|
1604
1144
|
/**
|
|
1605
1145
|
* Context Extensions (framework concept)
|
|
1606
1146
|
*
|
|
@@ -1650,26 +1190,6 @@ declare class DispatchVisits {
|
|
|
1650
1190
|
add(trait: string, event: string, from: string, payload: EventPayload | null | undefined, frame: EventPayload | null): void;
|
|
1651
1191
|
}
|
|
1652
1192
|
|
|
1653
|
-
/** What a guard or effect reads: `@event`, `@prevEvents`, `@prevStates`. */
|
|
1654
|
-
interface DispatchScope {
|
|
1655
|
-
event: EventPayload;
|
|
1656
|
-
prevEvents: EventPayload[];
|
|
1657
|
-
prevStates: string[];
|
|
1658
|
-
}
|
|
1659
|
-
/** The scope of a delivery with the given log so far; no delivery = a direct dispatch of `event`. */
|
|
1660
|
-
declare function dispatchScopeOf(delivery: DeliveryRecord | undefined, log: DispatchLog | undefined, event: string, payload: EventPayload | undefined): DispatchScope;
|
|
1661
|
-
declare class DispatchMemory {
|
|
1662
|
-
private readonly deliveries;
|
|
1663
|
-
private readonly left;
|
|
1664
|
-
/** This trait's log so far, as it travels on a request. */
|
|
1665
|
-
log(trait: string): DispatchLog;
|
|
1666
|
-
view(trait: string, delivery: DeliveryRecord): DispatchScope;
|
|
1667
|
-
/** Continue a dispatch that began elsewhere: the target trait's log so far. */
|
|
1668
|
-
seed(trait: string, log: DispatchLog): void;
|
|
1669
|
-
recordDelivery(trait: string, delivery: DeliveryRecord): void;
|
|
1670
|
-
recordTransition(trait: string, from: string, to: string): void;
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
1193
|
/**
|
|
1674
1194
|
* Whether a guard holds. A guard that throws does not hold: it blocks its transition exactly
|
|
1675
1195
|
* like a false guard, and the error is handed to `onError` (one rule on every path — the JS
|
|
@@ -1748,7 +1268,7 @@ interface ServerResponseTrace {
|
|
|
1748
1268
|
success: boolean;
|
|
1749
1269
|
/**
|
|
1750
1270
|
* The runtime's own verdict on whether ANY arm accepted this dispatch
|
|
1751
|
-
* (`
|
|
1271
|
+
* (`EventResponse.transitioned`). `false` = the event was
|
|
1752
1272
|
* delivered but no transition fired — guard false, or no arm in the
|
|
1753
1273
|
* current state — which a self-loop's unchanged state cannot reveal on
|
|
1754
1274
|
* its own. Undefined only where the producing path does not report it
|
|
@@ -1756,7 +1276,7 @@ interface ServerResponseTrace {
|
|
|
1756
1276
|
*/
|
|
1757
1277
|
transitioned?: boolean;
|
|
1758
1278
|
/**
|
|
1759
|
-
* Server-side emits with their EVALUATED payloads (`
|
|
1279
|
+
* Server-side emits with their EVALUATED payloads (`EventResponse.
|
|
1760
1280
|
* emittedEvents[].payload`). `emittedEvents` keeps the names for existing
|
|
1761
1281
|
* consumers; observers that judge what an emit CARRIES read this — a
|
|
1762
1282
|
* server-side `(emit SAVE {…})` never reaches the client bus log, and the
|
|
@@ -2557,190 +2077,6 @@ interface LivingOrbitalSchema {
|
|
|
2557
2077
|
diff(hash1: string, hash2: string): EvolutionDelta;
|
|
2558
2078
|
}
|
|
2559
2079
|
|
|
2560
|
-
/**
|
|
2561
|
-
* Parsed AST — LLM-emit relaxed views of the canonical orbital types.
|
|
2562
|
-
*
|
|
2563
|
-
* Every `Parsed*` type mirrors its canonical counterpart in this module
|
|
2564
|
-
* (`Trait`, `StateMachine`, `Transition`, `State`, `Event`, `OrbitalDefinition`,
|
|
2565
|
-
* `PageRefObject`, etc.) but loosens required fields to optional. The
|
|
2566
|
-
* loosening exists for one reason: the LLM can emit a partial orbital
|
|
2567
|
-
* (mid-stream, mid-tool-call, mid-LoLo lowering) and consumer code
|
|
2568
|
-
* needs to walk it WITHOUT casting to the strict canonical type before
|
|
2569
|
-
* every field access.
|
|
2570
|
-
*
|
|
2571
|
-
* Discipline:
|
|
2572
|
-
*
|
|
2573
|
-
* - **No `unknown`.** Every field has a concrete type, sourced from
|
|
2574
|
-
* this same module where the type already exists (`EntityField`,
|
|
2575
|
-
* `EntityPersistence`, `SExpr`,
|
|
2576
|
-
* `PageTraitRef`, `TraitEventContract`, `TraitEventListener`).
|
|
2577
|
-
*
|
|
2578
|
-
* - **No index signatures.** If the LLM emits a key the schema doesn't
|
|
2579
|
-
* know about, the validator rejects it. The `Parsed*` types do not
|
|
2580
|
-
* pretend to accept unknown keys at the type level.
|
|
2581
|
-
*
|
|
2582
|
-
* - **Required fields stay required.** `name` on `ParsedOrbital` is
|
|
2583
|
-
* required because no orbital can exist without one. `name` /
|
|
2584
|
-
* `linkedEntity` on `ParsedTrait` are required because the orbital
|
|
2585
|
-
* compiler rejects traits missing either. Only fields the LLM
|
|
2586
|
-
* legitimately omits during construction are optional.
|
|
2587
|
-
*
|
|
2588
|
-
* Use site: walkers that observe an orbital before it's fully
|
|
2589
|
-
* validated. Construct it as `ParsedOrbital`, narrow to
|
|
2590
|
-
* `OrbitalDefinition` after validation.
|
|
2591
|
-
*
|
|
2592
|
-
* @packageDocumentation
|
|
2593
|
-
*/
|
|
2594
|
-
|
|
2595
|
-
/**
|
|
2596
|
-
* Top-level orbital as the LLM emits it. Relaxed view of
|
|
2597
|
-
* `OrbitalDefinition`: traits and pages may be partial, the domain
|
|
2598
|
-
* context + design hints may be missing.
|
|
2599
|
-
*/
|
|
2600
|
-
interface ParsedOrbital {
|
|
2601
|
-
name: string;
|
|
2602
|
-
entity: ParsedEntity;
|
|
2603
|
-
traits: ParsedTrait[];
|
|
2604
|
-
pages: ParsedPage[];
|
|
2605
|
-
domainContext?: ParsedDomainContext;
|
|
2606
|
-
design?: ParsedDesign;
|
|
2607
|
-
}
|
|
2608
|
-
/**
|
|
2609
|
-
* Entity nucleus of an orbital. `name` + `fields` are required; the
|
|
2610
|
-
* factory canonical defaults can fill `persistence` and `collection`
|
|
2611
|
-
* when omitted.
|
|
2612
|
-
*/
|
|
2613
|
-
interface ParsedEntity {
|
|
2614
|
-
name: string;
|
|
2615
|
-
fields: EntityField[];
|
|
2616
|
-
persistence?: EntityPersistence;
|
|
2617
|
-
collection?: string;
|
|
2618
|
-
}
|
|
2619
|
-
/**
|
|
2620
|
-
* One trait on an orbital. `name` + `linkedEntity` are required (the
|
|
2621
|
-
* compiler rejects either omission); state machine + scope + category
|
|
2622
|
-
* are filled by defaults when the LLM doesn't specify them.
|
|
2623
|
-
*/
|
|
2624
|
-
interface ParsedTrait {
|
|
2625
|
-
name: string;
|
|
2626
|
-
linkedEntity: string;
|
|
2627
|
-
description?: string;
|
|
2628
|
-
config?: ParsedTraitConfig;
|
|
2629
|
-
emits?: ParsedEmitDeclaration[];
|
|
2630
|
-
listens?: ParsedListenDeclaration[];
|
|
2631
|
-
stateMachine?: ParsedStateMachine;
|
|
2632
|
-
}
|
|
2633
|
-
/**
|
|
2634
|
-
* Trait `config { }` block — the LLM-emit shape carries each declared
|
|
2635
|
-
* config key as a typed value drawn from the JSON primitive set. A
|
|
2636
|
-
* stricter view (`DeclaredTraitConfig` in `trait.ts`) captures the
|
|
2637
|
-
* authored field descriptors with type+default+label+tier metadata;
|
|
2638
|
-
* `ParsedTraitConfig` is the in-flight value map.
|
|
2639
|
-
*/
|
|
2640
|
-
type ParsedTraitConfig = {
|
|
2641
|
-
[key: string]: string | number | boolean | null | ReadonlyArray<string | number | boolean | null>;
|
|
2642
|
-
};
|
|
2643
|
-
/**
|
|
2644
|
-
* State-machine of a trait. Every field optional because the LLM may
|
|
2645
|
-
* emit the trait header before its body. A canonical
|
|
2646
|
-
* `StateMachine` (`state-machine.ts`) requires at least one state +
|
|
2647
|
-
* one transition.
|
|
2648
|
-
*/
|
|
2649
|
-
interface ParsedStateMachine {
|
|
2650
|
-
states?: ParsedState[];
|
|
2651
|
-
events?: ParsedEvent[];
|
|
2652
|
-
transitions?: ParsedTransition[];
|
|
2653
|
-
initial?: string;
|
|
2654
|
-
}
|
|
2655
|
-
/**
|
|
2656
|
-
* One state of a `ParsedStateMachine`. Mirrors `State` from
|
|
2657
|
-
* `state-machine.ts` with name optional during construction.
|
|
2658
|
-
*/
|
|
2659
|
-
interface ParsedState {
|
|
2660
|
-
name?: string;
|
|
2661
|
-
isInitial?: boolean;
|
|
2662
|
-
}
|
|
2663
|
-
/**
|
|
2664
|
-
* One event of a `ParsedStateMachine`. Mirrors `Event` from
|
|
2665
|
-
* `state-machine.ts`. `payloadSchema` is the canonical shape — an
|
|
2666
|
-
* array of `EntityField`s describing the event's payload.
|
|
2667
|
-
*/
|
|
2668
|
-
interface ParsedEvent {
|
|
2669
|
-
key?: string;
|
|
2670
|
-
name?: string;
|
|
2671
|
-
payloadSchema?: EntityField[];
|
|
2672
|
-
}
|
|
2673
|
-
/**
|
|
2674
|
-
* One transition of a `ParsedStateMachine`. `effects` + `guard` use
|
|
2675
|
-
* `SExpr` from `expression.ts` — the canonical S-expression shape the
|
|
2676
|
-
* runtime evaluates.
|
|
2677
|
-
*/
|
|
2678
|
-
interface ParsedTransition {
|
|
2679
|
-
from?: string;
|
|
2680
|
-
to?: string;
|
|
2681
|
-
event?: string;
|
|
2682
|
-
effects?: SExpr[];
|
|
2683
|
-
guard?: SExpr;
|
|
2684
|
-
}
|
|
2685
|
-
/**
|
|
2686
|
-
* Trait-emit declaration. Aliases `TraitEventContract` from
|
|
2687
|
-
* `trait.ts` with every field optional. The canonical contract
|
|
2688
|
-
* carries `event`, `scope`, `payload`; here all three are optional so
|
|
2689
|
-
* an in-flight emit (just the name, no payload yet) types correctly.
|
|
2690
|
-
*/
|
|
2691
|
-
interface ParsedEmitDeclaration {
|
|
2692
|
-
event?: string;
|
|
2693
|
-
scope?: 'internal' | 'external';
|
|
2694
|
-
payload?: EntityField[];
|
|
2695
|
-
}
|
|
2696
|
-
/**
|
|
2697
|
-
* Trait-listen declaration. Mirrors `TraitEventListener` from
|
|
2698
|
-
* `trait.ts` with the source remap and trigger key optional.
|
|
2699
|
-
*/
|
|
2700
|
-
interface ParsedListenDeclaration {
|
|
2701
|
-
event?: string;
|
|
2702
|
-
triggers?: string;
|
|
2703
|
-
scope?: 'internal' | 'external';
|
|
2704
|
-
payloadMapping?: {
|
|
2705
|
-
[key: string]: SExpr;
|
|
2706
|
-
};
|
|
2707
|
-
}
|
|
2708
|
-
/**
|
|
2709
|
-
* One page entry on an orbital. Mirrors `PageRefObject` /
|
|
2710
|
-
* `OrbitalPage`; `path` is the URL, `name` is the canonical
|
|
2711
|
-
* identifier the molecule references.
|
|
2712
|
-
*/
|
|
2713
|
-
interface ParsedPage {
|
|
2714
|
-
path?: string;
|
|
2715
|
-
name?: string;
|
|
2716
|
-
primaryEntity?: string;
|
|
2717
|
-
traits?: PageTraitRef[];
|
|
2718
|
-
}
|
|
2719
|
-
/**
|
|
2720
|
-
* Domain-context decorations the analyzer attaches to an orbital
|
|
2721
|
-
* (vocabulary, category, original request). Mirrors `DomainContext`
|
|
2722
|
-
* from `domain.ts` for the fields used in the parsed-AST surface; the
|
|
2723
|
-
* full `DomainContext` carries semantic-role overlays + custom-pattern
|
|
2724
|
-
* maps too, which the LLM doesn't emit in this surface.
|
|
2725
|
-
*/
|
|
2726
|
-
interface ParsedDomainContext {
|
|
2727
|
-
request?: string;
|
|
2728
|
-
category?: string;
|
|
2729
|
-
vocabulary?: {
|
|
2730
|
-
[key: string]: string;
|
|
2731
|
-
};
|
|
2732
|
-
}
|
|
2733
|
-
/**
|
|
2734
|
-
* Design hints (style + UX cues) the analyzer attaches. Mirrors
|
|
2735
|
-
* `DesignPreferences` from `domain.ts`.
|
|
2736
|
-
*/
|
|
2737
|
-
interface ParsedDesign {
|
|
2738
|
-
style?: string;
|
|
2739
|
-
uxHints?: {
|
|
2740
|
-
[key: string]: string;
|
|
2741
|
-
};
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
2080
|
/**
|
|
2745
2081
|
* Render-UI structural editing — the single canonical pattern-tree navigator,
|
|
2746
2082
|
* mutators, and overlay application. Promoted out of apps/builder so the studio
|
|
@@ -2886,7 +2222,6 @@ declare const AriaRoleSchema: z.ZodEnum<{
|
|
|
2886
2222
|
form: "form";
|
|
2887
2223
|
navigation: "navigation";
|
|
2888
2224
|
tab: "tab";
|
|
2889
|
-
presentation: "presentation";
|
|
2890
2225
|
alert: "alert";
|
|
2891
2226
|
button: "button";
|
|
2892
2227
|
checkbox: "checkbox";
|
|
@@ -2897,16 +2232,23 @@ declare const AriaRoleSchema: z.ZodEnum<{
|
|
|
2897
2232
|
radio: "radio";
|
|
2898
2233
|
switch: "switch";
|
|
2899
2234
|
tooltip: "tooltip";
|
|
2235
|
+
presentation: "presentation";
|
|
2236
|
+
article: "article";
|
|
2237
|
+
toolbar: "toolbar";
|
|
2238
|
+
none: "none";
|
|
2239
|
+
row: "row";
|
|
2900
2240
|
list: "list";
|
|
2901
2241
|
caption: "caption";
|
|
2902
|
-
|
|
2242
|
+
time: "time";
|
|
2903
2243
|
main: "main";
|
|
2244
|
+
generic: "generic";
|
|
2245
|
+
option: "option";
|
|
2246
|
+
table: "table";
|
|
2247
|
+
math: "math";
|
|
2248
|
+
note: "note";
|
|
2904
2249
|
log: "log";
|
|
2905
2250
|
application: "application";
|
|
2906
|
-
article: "article";
|
|
2907
2251
|
img: "img";
|
|
2908
|
-
row: "row";
|
|
2909
|
-
time: "time";
|
|
2910
2252
|
alertdialog: "alertdialog";
|
|
2911
2253
|
banner: "banner";
|
|
2912
2254
|
blockquote: "blockquote";
|
|
@@ -2921,7 +2263,6 @@ declare const AriaRoleSchema: z.ZodEnum<{
|
|
|
2921
2263
|
emphasis: "emphasis";
|
|
2922
2264
|
feed: "feed";
|
|
2923
2265
|
figure: "figure";
|
|
2924
|
-
generic: "generic";
|
|
2925
2266
|
gridcell: "gridcell";
|
|
2926
2267
|
group: "group";
|
|
2927
2268
|
heading: "heading";
|
|
@@ -2929,13 +2270,10 @@ declare const AriaRoleSchema: z.ZodEnum<{
|
|
|
2929
2270
|
listbox: "listbox";
|
|
2930
2271
|
listitem: "listitem";
|
|
2931
2272
|
marquee: "marquee";
|
|
2932
|
-
math: "math";
|
|
2933
2273
|
menubar: "menubar";
|
|
2934
2274
|
menuitem: "menuitem";
|
|
2935
2275
|
menuitemcheckbox: "menuitemcheckbox";
|
|
2936
2276
|
menuitemradio: "menuitemradio";
|
|
2937
|
-
note: "note";
|
|
2938
|
-
option: "option";
|
|
2939
2277
|
paragraph: "paragraph";
|
|
2940
2278
|
progressbar: "progressbar";
|
|
2941
2279
|
radiogroup: "radiogroup";
|
|
@@ -2950,13 +2288,11 @@ declare const AriaRoleSchema: z.ZodEnum<{
|
|
|
2950
2288
|
strong: "strong";
|
|
2951
2289
|
subscript: "subscript";
|
|
2952
2290
|
superscript: "superscript";
|
|
2953
|
-
table: "table";
|
|
2954
2291
|
tablist: "tablist";
|
|
2955
2292
|
tabpanel: "tabpanel";
|
|
2956
2293
|
term: "term";
|
|
2957
2294
|
textbox: "textbox";
|
|
2958
2295
|
timer: "timer";
|
|
2959
|
-
toolbar: "toolbar";
|
|
2960
2296
|
tree: "tree";
|
|
2961
2297
|
treegrid: "treegrid";
|
|
2962
2298
|
treeitem: "treeitem";
|
|
@@ -3020,14 +2356,14 @@ declare const DiagramToneSchema: z.ZodEnum<{
|
|
|
3020
2356
|
fill: "fill";
|
|
3021
2357
|
grid: "grid";
|
|
3022
2358
|
label: "label";
|
|
2359
|
+
info: "info";
|
|
3023
2360
|
primary: "primary";
|
|
3024
|
-
accent: "accent";
|
|
3025
2361
|
muted: "muted";
|
|
2362
|
+
axis: "axis";
|
|
2363
|
+
accent: "accent";
|
|
3026
2364
|
warning: "warning";
|
|
3027
|
-
info: "info";
|
|
3028
2365
|
ink: "ink";
|
|
3029
2366
|
guide: "guide";
|
|
3030
|
-
axis: "axis";
|
|
3031
2367
|
highlight: "highlight";
|
|
3032
2368
|
"series-1": "series-1";
|
|
3033
2369
|
"series-2": "series-2";
|
|
@@ -3288,8 +2624,8 @@ type TabUrlMatcher = (pattern: string, url: string) => boolean;
|
|
|
3288
2624
|
|
|
3289
2625
|
/**
|
|
3290
2626
|
* What a server hands the program-independent web client at startup (`/client.json`), beside `program.client.orb`:
|
|
3291
|
-
* the program's locale and text direction
|
|
3292
|
-
*
|
|
2627
|
+
* the program's locale and text direction and its themes with the default theme and mode. The TypeScript shell writes it
|
|
2628
|
+
* for `orb compile` and `orb serve` alike, beside the kernel's language data (`/language.json`).
|
|
3293
2629
|
*/
|
|
3294
2630
|
|
|
3295
2631
|
declare const ClientThemeSchema: z.ZodObject<{
|
|
@@ -3315,7 +2651,6 @@ declare const ClientManifestSchema: z.ZodObject<{
|
|
|
3315
2651
|
light: "light";
|
|
3316
2652
|
dark: "dark";
|
|
3317
2653
|
}>;
|
|
3318
|
-
language: z.ZodBoolean;
|
|
3319
2654
|
}, z.core.$strict>;
|
|
3320
2655
|
type ClientTheme = z.infer<typeof ClientThemeSchema>;
|
|
3321
2656
|
type ClientManifest = z.infer<typeof ClientManifestSchema>;
|
|
@@ -3333,11 +2668,7 @@ declare const PayloadSlotSchema: z.ZodType<PayloadSlot>;
|
|
|
3333
2668
|
declare const MachineRowSchema: z.ZodType<MachineRow>;
|
|
3334
2669
|
declare const PlayedStepSchema: z.ZodType<PlayedStep>;
|
|
3335
2670
|
|
|
3336
|
-
/**
|
|
3337
|
-
* The per-trait evaluation index contract: a trait's flat definition and the
|
|
3338
|
-
* resolved index a host builds over a schema's orbitals. Types only — the
|
|
3339
|
-
* builder lives in `@almadar/runtime`.
|
|
3340
|
-
*/
|
|
2671
|
+
/** A trait's flat definition: the shape the circuit store keeps its initial state from. */
|
|
3341
2672
|
|
|
3342
2673
|
/** Minimal trait definition for state machine processing. */
|
|
3343
2674
|
interface TraitDefinition {
|
|
@@ -3366,37 +2697,6 @@ interface TraitDefinition {
|
|
|
3366
2697
|
/** Cross-trait event listeners (optional). */
|
|
3367
2698
|
listens?: TraitEventListener[];
|
|
3368
2699
|
}
|
|
3369
|
-
/** One trait's fully-resolved evaluation entry. */
|
|
3370
|
-
interface IndexedTrait {
|
|
3371
|
-
/** Flat shape `processEvent`/`runTraitCascade` consume. */
|
|
3372
|
-
traitDef: TraitDefinition;
|
|
3373
|
-
/** IR-level trait — `stateMachine.events[].payloadSchema`, `emits[]`. */
|
|
3374
|
-
irTrait: Trait;
|
|
3375
|
-
/** The trait's RESOLVED linked entity (cross-orbital/auxiliary aware). */
|
|
3376
|
-
entity: Entity;
|
|
3377
|
-
/** Host orbital's declared name (emit stamping, bus keys). */
|
|
3378
|
-
orbitalName: string;
|
|
3379
|
-
/** Host orbital's V4 id (emit stamping), when the schema carries one. */
|
|
3380
|
-
orbitalId?: BusEventSource['orbitalId'];
|
|
3381
|
-
/**
|
|
3382
|
-
* The entity-frame key: `$shared::<entityName>` when the linked entity
|
|
3383
|
-
* is declared `[shared]` (every trait bound to it shares ONE frame),
|
|
3384
|
-
* else the trait's own name.
|
|
3385
|
-
*/
|
|
3386
|
-
frameKey: string;
|
|
3387
|
-
/** The linked entity's declared `shared` flag (render-binding deferral). */
|
|
3388
|
-
isSharedEntity: boolean;
|
|
3389
|
-
}
|
|
3390
|
-
interface TraitIndex {
|
|
3391
|
-
byName: Map<string, IndexedTrait>;
|
|
3392
|
-
/** Every orbital's primary + auxiliary entities (persistence routing, entity lookups). */
|
|
3393
|
-
allEntities: Entity[];
|
|
3394
|
-
/** The source orbitals with their resolved primary entities. */
|
|
3395
|
-
orbitals: Array<{
|
|
3396
|
-
schema: OrbitalDefinition;
|
|
3397
|
-
entity: Entity;
|
|
3398
|
-
}>;
|
|
3399
|
-
}
|
|
3400
2700
|
|
|
3401
2701
|
declare const ProgramSourceLocationSchema: z.ZodObject<{
|
|
3402
2702
|
path: z.ZodString;
|
|
@@ -3495,5 +2795,5 @@ type ProgramSourceLocation = z.infer<typeof ProgramSourceLocationSchema>;
|
|
|
3495
2795
|
type ProgramSourceAnchor = z.infer<typeof ProgramSourceAnchorSchema>;
|
|
3496
2796
|
type ProgramInspection = z.infer<typeof ProgramInspectionSchema>;
|
|
3497
2797
|
|
|
3498
|
-
export { A11Y_ATTRIBUTES as A, AriaRoleSchema as
|
|
3499
|
-
export type {
|
|
2798
|
+
export { A11Y_ATTRIBUTES as A, AriaRoleSchema as K, BINDING_CONTEXT_RULES as N, BINDING_DOCS as O, BINDING_ROOTS as Q, BindingSchema as V, CALL_KINDS as Y, EVAL_TIERS as aA, EvalSpecSchema as aO, FORM_PATTERN as aU, FULL_WRITE_CAPABILITIES as aV, GESTURE_EVENT_PROPS as aY, ClientManifestSchema as ac, ClientThemeSchema as ae, DIAGRAM_STROKE_WEIGHTS as aj, DIAGRAM_TEXT_CASES as ak, DIAGRAM_TEXT_SIZES as al, DIAGRAM_TONES as am, DIAGRAM_TONE_COLOR_KEYS as an, DiagramStrokeWeightSchema as aq, DiagramTextCaseSchema as as, DiagramTextSizeSchema as au, DiagramToneSchema as av, DispatchVisits as ax, EMPTY_STATE_MARKER as az, KNOWN_VALIDATION_ERROR_CODES as b3, LOADING_STATE_MARKER as b7, LOG_SEVERITIES as b8, PATTERN_PROP_TYPE_ERROR_TESTID as bD, PatternTypeSchema as bG, PayloadSlotSchema as bI, PlayedStepSchema as bM, ProgramInspectionSchema as bU, ProgramSourceAnchorSchema as bW, ProgramSourceLocationSchema as bY, QueryCapabilitiesSchema as bZ, QueryDeclinedError as b_, MachineRowSchema as bv, NATIVE_ID_PREFIX as by, NATIVE_ID_SEPARATOR as bz, RENDER_BINDING_MARKER as c1, TAB_INDEX_VALUES as cJ, TEXT_DIRECTIONS as cK, TRAIT_MOUNT_ERROR_TESTID as cL, TabHostFailure as cN, TraitFieldRefSchema as cZ, RowCommitSchema as ca, RowIdPageSchema as cb, RowPredicateSchema as cc, RowQueryPageSchema as cd, RowQuerySchema as ce, RowWriteBatchSchema as cf, RowWriteOpSchema as cg, RowWriteOutcomeSchema as ch, SEMANTIC_CHANGE_KINDS as ci, SURFACE_MODES as cm, VERIFICATION_DOM_ATTRS as d0, isRenderBindingMarker as dA, isSessionHistoryEntry as dB, isStructuredLogEntry as dC, isTraitFieldRef as dD, nativeFieldId as dE, nativeIds as dF, nativePatternId as dG, nativeRowId as dH, nativeSlotId as dI, navigatePatternPath as dJ, orbitalIndexOfValidationPath as dK, parseClientManifest as dL, parseEvalSpec as dM, parseFetchOrder as dN, removeChildAtPath as dO, renderRootOf as dP, replaceChildAtPath as dQ, rowMatchesPredicate as dR, runRowWrite as dS, setPropAtPath as dT, splitNativeIds as dU, splitPatternChildPath as dV, toBindingRoot as dW, validateBindingInContext as dX, widenTier as dY, WriteCapabilitiesSchema as dg, WriteDeclinedError as dh, actionTestId as di, actionTestIdMatches as dj, applyRenderOverlay as dk, containsEntityBinding as dl, containsPayloadBinding as dm, dispatchVisitKey as dn, evalPatternMatches as dp, fingerprintNode as dq, gestureActionTestId as dr, gestureOfActionTestId as ds, getBindingExamples as dt, guardHolds as du, insertChildAtPath as dv, isAriaRole as dw, isCallRecord as dx, isKnownValidationErrorCode as dy, isPlanSnapshot as dz, ACCESSIBLE_NAME_ATTRIBUTES as f, ACTION_OVERFLOW_TESTID as g, ACTION_TESTID_PREFIX as h, ARIA_CURRENT as i, ARIA_LIVE as j, ARIA_PRESSED as k, ARIA_ROLES as l };
|
|
2799
|
+
export type { CancelledEvent as $, AppCreatedEvent as B, ChangesetValue as C, DiagramTone as D, AppSummary as E, AriaBooleanish as F, AriaCurrent as G, AriaLive as H, AriaPressed as I, AriaRole as J, LlmCallMeta as L, AssetLoadStatus as M, PageContentReduction as P, RowBindingResult as R, SemanticChangeKind as S, BindingContext as T, BindingRoot as U, BridgeHealth as W, BrowserTabPort as X, CallKind as Z, CallRecord as _, SchemaChange as a, GitHubLink as a$, CanvasShadow as a0, CanvasTheme as a1, ChangeAuthor as a2, ChangeSetDocument as a3, ChangeSummary as a4, ChangesetRecordedEvent as a5, CheckStatus as a6, CircuitStepResult as a7, Clarification as a8, ClarificationCandidate as a9, EdgeType as aB, EditFocus as aC, EditFocusLevel as aD, EffectPayload as aE, EffectResult as aF, EffectTrace as aG, ErrorEvent as aH, EvalCheck as aI, EvalClass as aJ, EvalExpectations as aK, EvalPattern as aL, EvalPredicate as aM, EvalSpec as aN, EvalTier as aP, EventLogEntry as aQ, EvolutionDelta as aR, ExecutePlanResult as aS, ExtraTraitRef as aT, FileOperationEvent as aW, FileWrittenEvent as aX, GateState as aZ, GenerationLogEvent as a_, ClarificationLevel as aa, ClientManifest as ab, ClientTheme as ad, CompleteEvent as af, ComplexityAssessment as ag, ComposeOptions as ah, ContextExtensions as ai, DiagramMarkRoles as ao, DiagramStrokeWeight as ap, DiagramTextCase as ar, DiagramTextSize as at, DispatchUpdatesResult as aw, DrawableDescriptor as ay, CategorizedRemovals as b, QueryDeclinedReason as b$, GuardEvaluation as b0, HistoryMeta as b1, InterruptEvent as b2, KnobPayload as b4, KnownValidationErrorCode as b5, LLMErrorContext as b6, LineageEntry as b9, OrbitalAddedEvent as bA, OrbitalSchemaCompleteEvent as bB, OrbitalVerificationAPI as bC, ParamsRepairEmittedEvent as bE, PatternNode as bF, PatternValue as bH, PlanSnapshot as bJ, PlanSnapshotStatus as bK, PlannerResult as bL, Probability as bN, ProcessCompleteEvent as bO, ProcessErrorEvent as bP, ProcessRepairCompleteEvent as bQ, ProcessRepairEvent as bR, ProcessStartEvent as bS, ProgramInspection as bT, ProgramSourceAnchor as bV, ProgramSourceLocation as bX, LivingEdge as ba, LivingEffect as bb, LivingEntity as bc, LivingEvent as bd, LivingField as be, LivingOrbital as bf, LivingOrbitalSchema as bg, LivingPage as bh, LivingState as bi, LivingTrait as bj, LivingTransition as bk, LivingValue as bl, LivingVertex as bm, LlmCallToolsResult as bn, LlmContext as bo, LlmMessage as bp, LlmTokenUsage as bq, LlmToolCall as br, LlmToolDef as bs, LogContext as bt, LogSeverity as bu, MemoryContext as bw, MessageEvent as bx, SemanticSchemaChange as c, TransitionTrace as c$, QueryUnsupportedReason as c0, RenderBindingMarker as c2, RenderOverlayResult as c3, RenderRootAddress as c4, RenderUiPatch as c5, RenderUiPatchAddress as c6, RenderUiPatchOp as c7, RepairResult as c8, RowBindingScalar as c9, SpawnResult as cA, StartEvent as cB, StatsView as cC, StructuredLogEntry as cD, SubagentCompleteEvent as cE, SubagentEvent as cF, SubagentProgressEvent as cG, SubagentStartEvent as cH, SurfaceMode as cI, TabAskContext as cM, TabIndexValue as cO, TabUrlMatcher as cP, TextDirection as cQ, TodoActivityType as cR, TodoDetailEvent as cS, TodoUpdateEvent as cT, ToolCallEvent as cU, ToolResultEvent as cV, TraceContext as cW, TraitDefinition as cX, TraitFieldRef as cY, TraitStateSnapshot as c_, SSEEvent as cj, SSEEventBase as ck, SSEEventType as cl, SaveOptions as cn, SaveResult as co, SchemaPhaseUpdateEvent as cp, SchemaPhaseValidatedEvent as cq, SchemaUpdateEvent as cr, SemanticAnnotation as cs, SemanticVector as ct, ServerResponseTrace as cu, ServiceCallResult as cv, SessionContext as cw, SessionHistoryEntry as cx, SnapshotCreatedEvent as cy, SnapshotDocument as cz, A11yAttributeSchema as d, ValidateResult as d1, ValidationDocument as d2, ValidationError as d3, ValidationErrorCode as d4, ValidationIssue as d5, ValidationMeta as d6, ValidationResult as d7, ValidationResults as d8, VerificationCheck as d9, VerificationSnapshot as da, VerificationSummary as db, VertexId as dc, VertexPayload as dd, VertexType as de, WorkspaceContext as df, A11yProps as e, ActionGesture as m, AgentCodeSearchResult as n, AgentCompactResult as o, AgentCompactStrategy as p, AgentContext as q, AgentGenerateOptions as r, AgentMemoryCategory as s, AgentMemoryRecord as t, AnalysisOrbital as u, AnalysisOrbitalParams as v, AnalysisPageOverride as w, AnalysisRename as x, AnalysisResult as y, AnnotationTier as z };
|