@almadar/core 10.21.0 → 10.23.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/{schema-BEL2Gr4v.d.ts → builders-BjButZdb.d.ts} +582 -3
- package/dist/builders.d.ts +4 -469
- package/dist/builders.js.map +1 -1
- package/dist/{expression-BUIi9ezJ.d.ts → expression-BVRFm0sV.d.ts} +1 -1
- package/dist/factory/index.d.ts +4 -4
- package/dist/factory-runtime/index.d.ts +3 -5
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/index.d.ts +8 -9
- package/dist/index.js.map +1 -1
- package/dist/state-machine/index.d.ts +1 -1
- package/dist/{trait-BcRvHKLW.d.ts → trait-Cs8Mrdw9.d.ts} +2 -2
- package/dist/types/index.d.ts +184 -25
- package/dist/types/index.js.map +1 -1
- package/dist/{types-DBzaYmuJ.d.ts → types-DpBetrYc.d.ts} +41 -2
- package/package.json +1 -1
- package/dist/compose-behaviors-mP-vUG61.d.ts +0 -119
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as TraitEventListener, E as EntityField, a as EntityPersistence, b as TraitReference, R as RelationConfig } from './trait-Cs8Mrdw9.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Cross-cutting presentation knobs that don't live per orbital
|
|
@@ -357,6 +357,18 @@ interface FactoryPageSignature {
|
|
|
357
357
|
defaultPath: string;
|
|
358
358
|
primaryEntity: string;
|
|
359
359
|
}
|
|
360
|
+
/**
|
|
361
|
+
* Which coordinator surface may see this entry: `'app'` = pickable factory
|
|
362
|
+
* organism catalog, `'palette'` = free-lolo compose palette, `'both'`,
|
|
363
|
+
* `'internal'` = neither.
|
|
364
|
+
*/
|
|
365
|
+
type FactoryExposure = 'app' | 'palette' | 'both' | 'internal';
|
|
366
|
+
/**
|
|
367
|
+
* `'generated'` = machine-emitted 1:1 wrapper (lolo-ui), `'authored'` =
|
|
368
|
+
* hand-authored (`.hand-authored.json` membership), `'promoted'` = landed
|
|
369
|
+
* through the cache-fill promotion pipeline.
|
|
370
|
+
*/
|
|
371
|
+
type FactoryProvenance = 'generated' | 'authored' | 'promoted';
|
|
360
372
|
interface FactorySignature {
|
|
361
373
|
/** Organism the factory belongs to (e.g. `"std-realtime-chat"`). */
|
|
362
374
|
organism: string;
|
|
@@ -397,6 +409,33 @@ interface FactorySignature {
|
|
|
397
409
|
* back to a loose schema + post-hoc validation.
|
|
398
410
|
*/
|
|
399
411
|
paramsSchema?: JsonSchema;
|
|
412
|
+
/**
|
|
413
|
+
* Which coordinator surface may see this entry: `'app'` = pickable
|
|
414
|
+
* factory organism catalog, `'palette'` = free-lolo compose palette,
|
|
415
|
+
* `'both'`, `'internal'` = neither. Stamped at generation time by
|
|
416
|
+
* `tools/almadar-pattern-sync` (std-ts) from the `.lolo` `@exposure`
|
|
417
|
+
* header tag with per-topic defaults; consumers treat a missing field
|
|
418
|
+
* as "pre-V3 signature" and fall back to their legacy filters. An
|
|
419
|
+
* entry may carry `'app'`/`'both'` only if its factory is registered
|
|
420
|
+
* in the package's dispatch registry — enforced at generation time.
|
|
421
|
+
*/
|
|
422
|
+
exposure?: FactoryExposure;
|
|
423
|
+
/**
|
|
424
|
+
* `'generated'` = machine-emitted 1:1 wrapper (lolo-ui), `'authored'` =
|
|
425
|
+
* hand-authored (`.hand-authored.json` membership), `'promoted'` =
|
|
426
|
+
* landed through the cache-fill promotion pipeline.
|
|
427
|
+
*/
|
|
428
|
+
provenance?: FactoryProvenance;
|
|
429
|
+
/**
|
|
430
|
+
* Deterministic hash of the ui-substrate surface the behavior composes,
|
|
431
|
+
* stamped for `authored`/`promoted` (blessed) entries: sha256 (16 hex
|
|
432
|
+
* chars) over the sorted union of the registry .orb's `uses[].from`
|
|
433
|
+
* basenames and each trait `ref`'s imported trait name. A substrate
|
|
434
|
+
* change (what the entry composes) flips it — drift against the current
|
|
435
|
+
* substrate flags the entry for review. Stamped by pattern-sync std-ts
|
|
436
|
+
* (`computeSubstrateSignature`); recomputed every generation run.
|
|
437
|
+
*/
|
|
438
|
+
substrateSignature?: string;
|
|
400
439
|
}
|
|
401
440
|
/**
|
|
402
441
|
* Aggregate catalog written to
|
|
@@ -460,4 +499,4 @@ type FactoryParamValue = string | number | boolean | ReadonlyArray<FactoryParamV
|
|
|
460
499
|
readonly [key: string]: FactoryParamValue;
|
|
461
500
|
};
|
|
462
501
|
|
|
463
|
-
export { type FactoryCallSite as F, type JsonValue as J, type OwnershipOverlayEntry as O, type PresentationNavItem as P, type RuleOverlay as R, type SchemaFieldType as S, type ToolArgs as T, type FactoryCallSiteParams as a, type FactoryConfigParam as b, type FactoryConfigTier as c, type FactoryEntitySignature as d, type FactoryEventSignature as e, type
|
|
502
|
+
export { type FactoryCallSite as F, type JsonValue as J, type OwnershipOverlayEntry as O, type PresentationNavItem as P, type RuleOverlay as R, type SchemaFieldType as S, type ToolArgs as T, type FactoryCallSiteParams as a, type FactoryConfigParam as b, type FactoryConfigTier as c, type FactoryEntitySignature as d, type FactoryEventSignature as e, type FactoryExposure as f, type FactoryPageSignature as g, type FactoryParamValue as h, type FactoryProvenance as i, type FactorySignature as j, type FactorySignatureCatalog as k, type FactorySignatureEntityField as l, type FactoryTraitSignature as m, type JsonObject as n, type JsonSchema as o, type JsonSchemaType as p, type PresentationOverlay as q, type RuleOverlayEntry as r, type TraitOverlay as s, type TraitOverlayEntry as t, type TraitOverlayListener as u, isJsonArray as v, isJsonObject as w, isJsonPrimitive as x };
|
package/package.json
CHANGED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { a as OrbitalDefinition, O as OrbitalSchema } from './schema-BEL2Gr4v.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Event Wiring
|
|
5
|
-
*
|
|
6
|
-
* Applies cross-orbital event wiring to orbital definitions.
|
|
7
|
-
* Adds emits/listens declarations to traits so they can communicate
|
|
8
|
-
* across orbital boundaries.
|
|
9
|
-
*
|
|
10
|
-
* @packageDocumentation
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* A single event wiring entry connecting two traits across orbitals.
|
|
15
|
-
*/
|
|
16
|
-
interface EventWiringEntry {
|
|
17
|
-
/** Source trait name or orbital name */
|
|
18
|
-
from: string;
|
|
19
|
-
/** Event name (UPPER_SNAKE_CASE) */
|
|
20
|
-
event: string;
|
|
21
|
-
/** Target trait name or orbital name */
|
|
22
|
-
to: string;
|
|
23
|
-
/** Event to trigger on the listener side */
|
|
24
|
-
triggers: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Apply event wiring to orbital definitions.
|
|
28
|
-
*
|
|
29
|
-
* For each wiring entry:
|
|
30
|
-
* 1. Find the source trait and add an external emit (if not already present)
|
|
31
|
-
* 2. Find the target trait and add an external listen (if not already present)
|
|
32
|
-
*
|
|
33
|
-
* Returns a new array of orbitals with wiring applied (deep-cloned).
|
|
34
|
-
*/
|
|
35
|
-
declare function applyEventWiring(orbitals: OrbitalDefinition[], wiring: EventWiringEntry[]): OrbitalDefinition[];
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Layout Strategy Detection
|
|
39
|
-
*
|
|
40
|
-
* Auto-detects the best layout strategy for a composed application
|
|
41
|
-
* based on the number of orbitals and their event wiring topology.
|
|
42
|
-
*
|
|
43
|
-
* @packageDocumentation
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Layout strategy for the composed application.
|
|
48
|
-
*
|
|
49
|
-
* - 'single': One orbital, one page
|
|
50
|
-
* - 'tabs': 2-4 orbitals with no sequential chain
|
|
51
|
-
* - 'sidebar': 5+ orbitals (navigation-heavy)
|
|
52
|
-
* - 'dashboard': Single page with all orbitals visible
|
|
53
|
-
* - 'wizard-flow': Sequential event chain detected (A -> B -> C)
|
|
54
|
-
*/
|
|
55
|
-
type LayoutStrategy = 'sidebar' | 'tabs' | 'dashboard' | 'wizard-flow' | 'single';
|
|
56
|
-
/**
|
|
57
|
-
* Detect the best layout strategy based on orbital count and event wiring.
|
|
58
|
-
*
|
|
59
|
-
* Heuristic:
|
|
60
|
-
* 1. Sequential event chain detected -> 'wizard-flow'
|
|
61
|
-
* 2. 1 orbital -> 'single'
|
|
62
|
-
* 3. 2-4 orbitals -> 'tabs'
|
|
63
|
-
* 4. 5+ orbitals -> 'sidebar'
|
|
64
|
-
*/
|
|
65
|
-
declare function detectLayoutStrategy(orbitals: OrbitalDefinition[], eventWiring?: EventWiringEntry[]): LayoutStrategy;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Compose Behaviors
|
|
69
|
-
*
|
|
70
|
-
* Main entry point for composing multiple orbital definitions into
|
|
71
|
-
* a single OrbitalSchema application. Handles event wiring, layout
|
|
72
|
-
* strategy detection, and page generation.
|
|
73
|
-
*
|
|
74
|
-
* @packageDocumentation
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Input for composing behaviors into an application.
|
|
79
|
-
*/
|
|
80
|
-
interface ComposeBehaviorsInput {
|
|
81
|
-
/** Application name */
|
|
82
|
-
appName: string;
|
|
83
|
-
/** Orbital definitions (or schemas) to compose */
|
|
84
|
-
orbitals: (OrbitalDefinition | OrbitalSchema)[];
|
|
85
|
-
/** Layout strategy override, or 'auto' to detect */
|
|
86
|
-
layoutStrategy?: LayoutStrategy | 'auto';
|
|
87
|
-
/** Cross-orbital event wiring */
|
|
88
|
-
eventWiring?: EventWiringEntry[];
|
|
89
|
-
/** Optional entity name mappings (original -> renamed) */
|
|
90
|
-
entityMappings?: Record<string, string>;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Result of composing behaviors.
|
|
94
|
-
*/
|
|
95
|
-
interface ComposeBehaviorsResult {
|
|
96
|
-
/** The composed OrbitalSchema */
|
|
97
|
-
schema: OrbitalSchema;
|
|
98
|
-
/** Layout metadata */
|
|
99
|
-
layout: {
|
|
100
|
-
strategy: LayoutStrategy;
|
|
101
|
-
pageCount: number;
|
|
102
|
-
};
|
|
103
|
-
/** Wiring metadata */
|
|
104
|
-
wiring: {
|
|
105
|
-
connections: number;
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Compose multiple orbital definitions into a single application schema.
|
|
110
|
-
*
|
|
111
|
-
* Steps:
|
|
112
|
-
* 1. Apply event wiring (adds emits/listens to traits)
|
|
113
|
-
* 2. Detect or use provided layout strategy
|
|
114
|
-
* 3. Generate pages based on the strategy
|
|
115
|
-
* 4. Build the final OrbitalSchema
|
|
116
|
-
*/
|
|
117
|
-
declare function composeBehaviors(input: ComposeBehaviorsInput): ComposeBehaviorsResult;
|
|
118
|
-
|
|
119
|
-
export { type ComposeBehaviorsInput as C, type EventWiringEntry as E, type LayoutStrategy as L, type ComposeBehaviorsResult as a, applyEventWiring as b, composeBehaviors as c, detectLayoutStrategy as d };
|