@almadar/std 16.200.0 → 16.201.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 (64) hide show
  1. package/behaviors/lolo/ui/core/molecules/ui-file-tree.lolo +5 -0
  2. package/behaviors/lolo/ui/core/molecules/ui-floating-toolbar.lolo +54 -0
  3. package/behaviors/lolo/ui/core/organisms/ui-dock-layout.lolo +186 -0
  4. package/behaviors/lolo/ui/core/organisms/ui-split-pane.lolo +37 -1
  5. package/behaviors/lolo/ui/game/atoms/std-coef-pad.lolo +5 -3
  6. package/behaviors/lolo/ui/game/atoms/std-platformer-body.lolo +14 -5
  7. package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +12 -0
  8. package/behaviors/registry/infra/atoms/std-approval-gate.orb +20 -10
  9. package/behaviors/registry/infra/atoms/std-cache-aside.orb +62 -31
  10. package/behaviors/registry/infra/atoms/std-circuit-breaker.orb +32 -16
  11. package/behaviors/registry/infra/atoms/std-data-erasure.orb +16 -8
  12. package/behaviors/registry/infra/atoms/std-mod-queue.orb +16 -8
  13. package/behaviors/registry/infra/atoms/std-rate-limiter.orb +28 -14
  14. package/behaviors/registry/infra/organisms/std-status-lifecycle-control.orb +2 -1
  15. package/behaviors/registry/ml/organisms/std-escalating-decision.orb +10 -5
  16. package/behaviors/registry/ml/organisms/std-knowledge-tracing.orb +4 -2
  17. package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +2 -1
  18. package/behaviors/registry/ui/core/atoms/std-browse.orb +6 -3
  19. package/behaviors/registry/ui/core/atoms/std-dashboard-grid-embedded.orb +2 -1
  20. package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +4 -2
  21. package/behaviors/registry/ui/core/atoms/std-esign-request.orb +6 -3
  22. package/behaviors/registry/ui/core/atoms/std-export.orb +4 -2
  23. package/behaviors/registry/ui/core/atoms/std-gallery.orb +18 -9
  24. package/behaviors/registry/ui/core/atoms/std-import.orb +4 -2
  25. package/behaviors/registry/ui/core/atoms/std-list.orb +6 -3
  26. package/behaviors/registry/ui/core/molecules/ui-file-tree.orb +8 -0
  27. package/behaviors/registry/ui/core/molecules/ui-floating-toolbar.orb +274 -0
  28. package/behaviors/registry/ui/core/organisms/ui-dock-layout.orb +521 -0
  29. package/behaviors/registry/ui/core/organisms/ui-split-pane.orb +109 -2
  30. package/behaviors/registry/ui/game/atoms/std-coef-pad.orb +170 -4
  31. package/behaviors/registry/ui/game/atoms/std-platformer-body.orb +84 -7
  32. package/behaviors/registry/ui/game/organisms/std-arcade-board-3d.orb +8 -4
  33. package/behaviors/registry/ui/game/organisms/std-crew-board-2d.orb +6 -3
  34. package/behaviors/registry/ui/game/organisms/std-dungeon-board-2d.orb +10 -5
  35. package/behaviors/registry/ui/game/organisms/std-market-board-3d.orb +8 -4
  36. package/behaviors/registry/ui/game/organisms/std-objective-board-3d.orb +8 -4
  37. package/behaviors/registry/ui/game/organisms/std-platformer-board-2d.orb +6 -3
  38. package/behaviors/registry/ui/game/organisms/std-survival-board-3d.orb +8 -4
  39. package/behaviors/registry/ui/game/organisms/std-tactics-board-2d.orb +12 -6
  40. package/behaviors/registry/ui/game/organisms/std-tactics-board-3d.orb +8 -4
  41. package/behaviors/registry/ui/game/organisms/std-worldmap-board-2d.orb +6 -3
  42. package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +18 -0
  43. package/behaviors/registry/ui/marketing/atoms/std-marketing-article.orb +2 -1
  44. package/behaviors/registry/ui/marketing/atoms/std-marketing-footer.orb +2 -1
  45. package/behaviors/registry/ui/marketing/atoms/std-marketing-split.orb +2 -1
  46. package/behaviors/registry/ui/marketing/atoms/std-marketing-stats.orb +2 -1
  47. package/behaviors/registry/ui/marketing/atoms/std-marketing-steps.orb +2 -1
  48. package/behaviors/registry/ui/marketing/atoms/std-marketing-team.orb +2 -1
  49. package/dist/behaviors/exports-reader.js +1099 -485
  50. package/dist/behaviors/functions/index.d.ts +268 -3
  51. package/dist/behaviors/functions/index.js +1093 -486
  52. package/dist/behaviors/index.d.ts +2 -2
  53. package/dist/behaviors/index.js +1110 -486
  54. package/dist/behaviors/query.d.ts +88 -4
  55. package/dist/behaviors/query.js +1110 -486
  56. package/dist/behaviors-embeddings.hash.json +3 -3
  57. package/dist/behaviors-embeddings.json +11 -3
  58. package/dist/behaviors-registry.json +121784 -2638
  59. package/dist/index.d.ts +2 -2
  60. package/dist/index.js +1110 -486
  61. package/dist/knob-embeddings.hash.json +3 -3
  62. package/dist/knob-embeddings.json +1 -1
  63. package/dist/registry/factory-signatures.json +1 -1
  64. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import { FactoryExposure, FactoryProvenance } from '@almadar/core';
1
+ import { JsonValue, FactoryExposure, FactoryProvenance, FactoryEventSignature, FactoryConfigParam } from '@almadar/core';
2
2
 
3
3
  /**
4
4
  * Behavior Registry Query Helpers
@@ -10,6 +10,53 @@ import { FactoryExposure, FactoryProvenance } from '@almadar/core';
10
10
  * @packageDocumentation
11
11
  */
12
12
 
13
+ /**
14
+ * The role a trait plays inside its orbital — stamped by
15
+ * `tools/almadar-pattern-sync` (`behaviors` command) via `deriveTraitRole`.
16
+ * `authority` = owns ticking state it provides fields for; `reactor` = wires
17
+ * transitions off listened/transitioned events with no tick of its own;
18
+ * `renderer` = renders UI; `chrome` = a generated `ui-*` atom wrapper;
19
+ * `frame` = an organism-level ref trait sharing a `linkedEntity` with a
20
+ * sibling ref trait (≥2), neither independently classified; `catalog` = a
21
+ * trait declaring the `asset-catalog` capability; `passive` = none of the
22
+ * above (config-only binding).
23
+ */
24
+ type BehaviorTraitRole = 'authority' | 'reactor' | 'renderer' | 'chrome' | 'frame' | 'catalog' | 'passive';
25
+ /**
26
+ * Per-trait exposure surface for one trait inside a `RegistryEntry`'s
27
+ * orbital — the registry-record mirror of `FactoryTraitSignature`
28
+ * (`@almadar/core` `src/factory/types.ts`) plus the fields
29
+ * `*.signature.json` computes but the trait-signature type doesn't carry
30
+ * (`ticks`, `rendersUi`) and the derived `role`. Stamped by
31
+ * `tools/almadar-pattern-sync` (`behaviors` command); a ref trait (organism
32
+ * call site) inherits `entityContract`/`transitionEvents`/`ticks`/
33
+ * `rendersUi`/`overridableConfigKeys` from the referenced atom.
34
+ */
35
+ interface RegistryTraitSurface {
36
+ name: string;
37
+ orbital: string;
38
+ ref?: string;
39
+ category?: string;
40
+ role: BehaviorTraitRole;
41
+ entityRebindable?: boolean;
42
+ linkedEntity?: string;
43
+ entityContract?: {
44
+ requires: string[];
45
+ provides: string[];
46
+ };
47
+ transitionEvents?: string[];
48
+ emittedEvents: string[];
49
+ listenedEvents: string[];
50
+ events?: FactoryEventSignature[];
51
+ overridableConfigKeys: FactoryConfigParam[];
52
+ definerKnobs?: string[];
53
+ capabilities: string[];
54
+ ticks: Array<{
55
+ name: string;
56
+ interval: string | number;
57
+ }>;
58
+ rendersUi: boolean;
59
+ }
13
60
  interface RegistryEntry {
14
61
  name: string;
15
62
  level: 'atom' | 'molecule' | 'organism';
@@ -49,20 +96,24 @@ interface RegistryEntry {
49
96
  fields: Array<{
50
97
  name: string;
51
98
  type: string;
52
- default?: string;
99
+ required?: boolean;
100
+ default?: JsonValue;
53
101
  }>;
54
102
  };
55
103
  defaultLabels: {
56
104
  title: string;
105
+ createButton?: string;
57
106
  entitySingular: string;
58
107
  entityPlural: string;
59
108
  };
109
+ /** Icon names lifted from the INIT render-ui tree. Stamped by `tools/almadar-pattern-sync` (`behaviors` command). */
110
+ defaultIcons?: string[];
60
111
  composableWith: string[];
61
112
  connectableEvents: string[];
62
113
  eventPayloads: Record<string, Array<{
63
114
  name: string;
64
115
  type: string;
65
- required: boolean;
116
+ required?: boolean;
66
117
  }>>;
67
118
  /**
68
119
  * Where the behavior may be dispatched: `app` (whole-app organisms),
@@ -87,6 +138,26 @@ interface RegistryEntry {
87
138
  * legacy filters.
88
139
  */
89
140
  provenance?: FactoryProvenance;
141
+ /**
142
+ * Per-trait exposure surfaces for the orbital's first (canonical) orbital
143
+ * — the registry-record mirror of `FactorySignature.traits`. Stamped by
144
+ * `tools/almadar-pattern-sync` (`behaviors` command) via `extractSignatures`
145
+ * + `inheritCallSiteOverrideTypes`. Optional: pre-W0 registries don't carry it.
146
+ */
147
+ traits?: RegistryTraitSurface[];
148
+ /** Sorted unique union of `traits[].role`. Optional: pre-W0 registries don't carry it. */
149
+ roles?: BehaviorTraitRole[];
150
+ /**
151
+ * `orb validate`/`orb resolve` readiness, back-stamped by `std-ts`
152
+ * (`tools/almadar-pattern-sync` `regenerate.ts`) right after it computes
153
+ * the same fields for `*.signature.json` — one writer, pipeline-ordered.
154
+ * Optional: unstamped until the `orb` binary is available at regen time.
155
+ */
156
+ sourceValid?: boolean;
157
+ /** `orb validate`/`orb resolve` error strings when `sourceValid` is `false`. Back-stamped alongside `sourceValid`. */
158
+ sourceErrors?: string[];
159
+ /** Path (relative to the package root) of the generated factory source, mirrors `FactorySignature.factoryPath`. */
160
+ factoryPath?: string;
90
161
  }
91
162
  interface BehaviorSummary {
92
163
  name: string;
@@ -109,6 +180,19 @@ interface BehaviorSummary {
109
180
  * Caching (and its concurrency safety) lives in `loadRegistryData`.
110
181
  */
111
182
  declare function getBehaviorRegistry(): Promise<Record<string, RegistryEntry>>;
183
+ /**
184
+ * Filter behaviors by the derived per-trait role (`authority`/`reactor`/
185
+ * `renderer`/`chrome`/`frame`/`catalog`/`passive`) — matches an entry whose
186
+ * `roles` union contains `role`. Entries from a pre-W0 registry (no `roles`
187
+ * stamped) never match.
188
+ */
189
+ declare function getBehaviorsByRole(role: BehaviorTraitRole): Promise<RegistryEntry[]>;
190
+ /**
191
+ * Look up one trait's exposure surface by behavior name + trait name.
192
+ * Returns `null` when the behavior or trait isn't found, or the registry
193
+ * entry predates `traits` stamping (V0 rollout).
194
+ */
195
+ declare function getTraitSurface(name: string, trait: string): Promise<RegistryTraitSurface | null>;
112
196
  /**
113
197
  * Filter behaviors by domain. Matches against layer (primary) and family (fallback).
114
198
  */
@@ -127,4 +211,4 @@ declare function searchBehaviors(query: string): Promise<RegistryEntry[]>;
127
211
  */
128
212
  declare function getBehaviorSummary(name: string): Promise<BehaviorSummary | null>;
129
213
 
130
- export { type BehaviorSummary, type RegistryEntry, getBehaviorRegistry, getBehaviorSummary, getBehaviorsByDomain, getBehaviorsByOperations, searchBehaviors };
214
+ export { type BehaviorSummary, type BehaviorTraitRole, type RegistryEntry, type RegistryTraitSurface, getBehaviorRegistry, getBehaviorSummary, getBehaviorsByDomain, getBehaviorsByOperations, getBehaviorsByRole, getTraitSurface, searchBehaviors };