@almadar/std 16.243.0 → 16.244.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 (140) hide show
  1. package/behaviors/behaviors-registry.json +4470 -513
  2. package/behaviors/lolo/agent/atoms/std-agent-context.lolo +24 -4
  3. package/behaviors/lolo/agent/atoms/std-agent-memory.lolo +20 -5
  4. package/behaviors/lolo/agent/atoms/std-agent-proposal.lolo +550 -0
  5. package/behaviors/lolo/agent/atoms/std-agent-session.lolo +284 -25
  6. package/behaviors/lolo/agent/atoms/std-agent-suggestions.lolo +841 -0
  7. package/behaviors/lolo/agent/atoms/std-agent-tool-loop.lolo +58 -8
  8. package/behaviors/lolo/agent/organisms/std-agent-assistant.lolo +1 -0
  9. package/behaviors/lolo/infra/atoms/std-page-treat.lolo +28 -1
  10. package/behaviors/lolo/ui/avl/atoms/ui-avl-state-machine.lolo +22 -0
  11. package/behaviors/lolo/ui/avl/atoms/ui-avl-transition-explainer.lolo +175 -0
  12. package/behaviors/lolo/ui/avl/atoms/ui-module-card.lolo +22 -0
  13. package/behaviors/lolo/ui/core/atoms/std-app-layout.lolo +23 -4
  14. package/behaviors/lolo/ui/core/atoms/std-hero.lolo +72 -33
  15. package/behaviors/lolo/ui/core/molecules/ui-agent-chat-feed.lolo +1 -1
  16. package/behaviors/lolo/ui/core/molecules/ui-markdown-content.lolo +54 -0
  17. package/behaviors/lolo/ui/core/molecules/ui-upload-drop-zone.lolo +5 -0
  18. package/behaviors/lolo/ui/core/organisms/ui-segment-renderer.lolo +127 -3
  19. package/behaviors/lolo/ui/core/organisms/ui-state-machine-view.lolo +22 -0
  20. package/behaviors/lolo/ui/core/templates/ui-dashboard-layout.lolo +2 -2
  21. package/behaviors/lolo/ui/learning/atoms/std-learn-arrangement.lolo +87 -17
  22. package/behaviors/lolo/ui/learning/atoms/std-learn-classify.lolo +172 -37
  23. package/behaviors/lolo/ui/learning/atoms/std-learn-coupled-sim.lolo +183 -70
  24. package/behaviors/lolo/ui/learning/atoms/std-learn-derivation.lolo +78 -13
  25. package/behaviors/lolo/ui/learning/atoms/std-learn-diagram.lolo +58 -2
  26. package/behaviors/lolo/ui/learning/atoms/std-learn-doser.lolo +107 -12
  27. package/behaviors/lolo/ui/learning/atoms/std-learn-estimate.lolo +83 -10
  28. package/behaviors/lolo/ui/learning/atoms/std-learn-goal-seek.lolo +130 -9
  29. package/behaviors/lolo/ui/learning/atoms/std-learn-grid-sim.lolo +143 -59
  30. package/behaviors/lolo/ui/learning/atoms/std-learn-hotspot.lolo +96 -22
  31. package/behaviors/lolo/ui/learning/atoms/std-learn-live-sim.lolo +66 -5
  32. package/behaviors/lolo/ui/learning/atoms/std-learn-predict.lolo +84 -6
  33. package/behaviors/lolo/ui/learning/atoms/std-learn-sandbox.lolo +80 -14
  34. package/behaviors/lolo/ui/learning/atoms/std-learn-scatter-fit.lolo +99 -5
  35. package/behaviors/lolo/ui/learning/atoms/std-learn-scenario.lolo +81 -7
  36. package/behaviors/lolo/ui/learning/atoms/std-learn-speed-drill.lolo +83 -7
  37. package/behaviors/lolo/ui/learning/atoms/std-learn-stepper.lolo +224 -99
  38. package/behaviors/lolo/ui/learning/atoms/std-learn-tour-3d.lolo +63 -2
  39. package/behaviors/lolo/ui/learning/atoms/std-learn-trace-player.lolo +99 -38
  40. package/behaviors/lolo/ui/learning/atoms/std-learn-transport.lolo +7 -7
  41. package/behaviors/lolo/ui/learning/atoms/std-learn-tree.lolo +69 -4
  42. package/behaviors/lolo-behavior-contracts.json +1 -1
  43. package/behaviors/registry/agent/atoms/std-agent-context.orb +205 -6
  44. package/behaviors/registry/agent/atoms/std-agent-memory.orb +146 -4
  45. package/behaviors/registry/agent/atoms/std-agent-proposal.orb +1972 -0
  46. package/behaviors/registry/agent/atoms/std-agent-session.orb +2021 -597
  47. package/behaviors/registry/agent/atoms/std-agent-suggestions.orb +5079 -0
  48. package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +287 -5
  49. package/behaviors/registry/agent/organisms/std-agent-assistant.orb +7 -0
  50. package/behaviors/registry/factory-signatures.json +1 -1
  51. package/behaviors/registry/infra/atoms/std-page-treat.orb +327 -2
  52. package/behaviors/registry/ui/avl/atoms/ui-avl-state-machine.orb +134 -0
  53. package/behaviors/registry/ui/avl/atoms/ui-avl-transition-explainer.orb +678 -0
  54. package/behaviors/registry/ui/avl/atoms/ui-module-card.orb +122 -0
  55. package/behaviors/registry/ui/core/atoms/std-app-layout.orb +73 -4
  56. package/behaviors/registry/ui/core/atoms/std-hero.orb +174 -97
  57. package/behaviors/registry/ui/core/molecules/ui-markdown-content.orb +204 -1
  58. package/behaviors/registry/ui/core/molecules/ui-upload-drop-zone.orb +12 -0
  59. package/behaviors/registry/ui/core/organisms/ui-segment-renderer.orb +683 -30
  60. package/behaviors/registry/ui/learning/atoms/std-learn-arrangement.orb +748 -21
  61. package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1429 -41
  62. package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +1031 -185
  63. package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +807 -132
  64. package/behaviors/registry/ui/learning/atoms/std-learn-diagram.orb +553 -6
  65. package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +987 -21
  66. package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +582 -16
  67. package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +954 -13
  68. package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +828 -88
  69. package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +730 -28
  70. package/behaviors/registry/ui/learning/atoms/std-learn-live-sim.orb +479 -9
  71. package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +797 -46
  72. package/behaviors/registry/ui/learning/atoms/std-learn-sandbox.orb +757 -58
  73. package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +1176 -164
  74. package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +599 -12
  75. package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +832 -150
  76. package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +1561 -127
  77. package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +655 -6
  78. package/behaviors/registry/ui/learning/atoms/std-learn-trace-player.orb +634 -43
  79. package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +85 -31
  80. package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +425 -9
  81. package/canonical-operators.json +45 -2
  82. package/dist/behaviors/exports-reader.js +16667 -7868
  83. package/dist/behaviors/functions/index.d.ts +711 -32
  84. package/dist/behaviors/functions/index.js +16651 -7869
  85. package/dist/behaviors/index.d.ts +1 -1
  86. package/dist/behaviors/index.js +16668 -7869
  87. package/dist/behaviors/query.js +16667 -7868
  88. package/dist/behaviors-embeddings.hash.json +3 -3
  89. package/dist/behaviors-embeddings.json +77 -53
  90. package/dist/behaviors-registry.json +4470 -513
  91. package/dist/index.d.ts +3 -3
  92. package/dist/index.js +16101 -7275
  93. package/dist/knob-embeddings.hash.json +3 -3
  94. package/dist/knob-embeddings.json +1309 -685
  95. package/dist/modules/anim.d.ts +1 -1
  96. package/dist/modules/array.d.ts +1 -1
  97. package/dist/modules/async.d.ts +1 -1
  98. package/dist/modules/behavior.d.ts +1 -1
  99. package/dist/modules/browser.d.ts +1 -1
  100. package/dist/modules/composition.d.ts +1 -1
  101. package/dist/modules/contract.d.ts +1 -1
  102. package/dist/modules/core.d.ts +1 -1
  103. package/dist/modules/core.js +29 -2
  104. package/dist/modules/data.d.ts +1 -1
  105. package/dist/modules/ease.d.ts +1 -1
  106. package/dist/modules/format.d.ts +1 -1
  107. package/dist/modules/geo.d.ts +1 -1
  108. package/dist/modules/graph.d.ts +1 -1
  109. package/dist/modules/grid.d.ts +1 -1
  110. package/dist/modules/i18n.d.ts +1 -1
  111. package/dist/modules/index.d.ts +1 -1
  112. package/dist/modules/index.js +29 -2
  113. package/dist/modules/integration.d.ts +1 -1
  114. package/dist/modules/json.d.ts +1 -1
  115. package/dist/modules/llm.d.ts +1 -1
  116. package/dist/modules/math.d.ts +1 -1
  117. package/dist/modules/memory.d.ts +1 -1
  118. package/dist/modules/nn.d.ts +1 -1
  119. package/dist/modules/noise.d.ts +1 -1
  120. package/dist/modules/object.d.ts +1 -1
  121. package/dist/modules/os.d.ts +1 -1
  122. package/dist/modules/path.d.ts +1 -1
  123. package/dist/modules/prob.d.ts +1 -1
  124. package/dist/modules/session.d.ts +1 -1
  125. package/dist/modules/str.d.ts +1 -1
  126. package/dist/modules/tensor.d.ts +1 -1
  127. package/dist/modules/time.d.ts +1 -1
  128. package/dist/modules/trace.d.ts +1 -1
  129. package/dist/modules/train.d.ts +1 -1
  130. package/dist/modules/validate.d.ts +1 -1
  131. package/dist/modules/vector.d.ts +1 -1
  132. package/dist/modules/workspace.d.ts +1 -1
  133. package/dist/registry/factory-signatures.json +1 -1
  134. package/dist/registry.d.ts +2 -2
  135. package/dist/registry.js +29 -2
  136. package/dist/{types-Cdb321uM.d.ts → types-Y-yYWEOX.d.ts} +1 -1
  137. package/i18n/ar.json +3 -1
  138. package/i18n/en.json +2 -0
  139. package/i18n/sl.json +3 -1
  140. package/package.json +3 -3
@@ -64,6 +64,15 @@
64
64
  "parent": "trt_01M055GQ55PTH647PY8K2J09RQ",
65
65
  "renames": []
66
66
  },
67
+ "evt_01M459WQMZ61TJXMND9JGX66K2": {
68
+ "bakedName": "ROSTER_LOADED",
69
+ "curName": "ROSTER_LOADED",
70
+ "id": "evt_01M459WQMZ61TJXMND9JGX66K2",
71
+ "kind": "event",
72
+ "owner": "workspace",
73
+ "parent": "trt_01M055GQ55PTH647PY8K2J09RQ",
74
+ "renames": []
75
+ },
67
76
  "orb_01M055GQ55Q5JY2EX41SCDK8QP": {
68
77
  "bakedName": "LearnSandboxOrbital",
69
78
  "curName": "LearnSandboxOrbital",
@@ -110,6 +119,64 @@
110
119
  "name": "title",
111
120
  "type": "string"
112
121
  },
122
+ {
123
+ "items": {
124
+ "properties": {
125
+ "enabled": {
126
+ "name": "enabled",
127
+ "required": false,
128
+ "type": "boolean"
129
+ },
130
+ "id": {
131
+ "name": "id",
132
+ "required": true,
133
+ "type": "string"
134
+ },
135
+ "label": {
136
+ "name": "label",
137
+ "required": true,
138
+ "type": "string"
139
+ },
140
+ "weight": {
141
+ "name": "weight",
142
+ "required": true,
143
+ "type": "number"
144
+ },
145
+ "x": {
146
+ "name": "x",
147
+ "required": false,
148
+ "type": "number"
149
+ },
150
+ "y": {
151
+ "name": "y",
152
+ "required": false,
153
+ "type": "number"
154
+ }
155
+ },
156
+ "type": "object"
157
+ },
158
+ "name": "elements",
159
+ "type": "array"
160
+ },
161
+ {
162
+ "items": {
163
+ "properties": {
164
+ "from": {
165
+ "name": "from",
166
+ "required": true,
167
+ "type": "string"
168
+ },
169
+ "to": {
170
+ "name": "to",
171
+ "required": true,
172
+ "type": "string"
173
+ }
174
+ },
175
+ "type": "object"
176
+ },
177
+ "name": "links",
178
+ "type": "array"
179
+ },
113
180
  {
114
181
  "items": {
115
182
  "type": "string"
@@ -395,7 +462,7 @@
395
462
  },
396
463
  "matchMode": {
397
464
  "default": "",
398
- "description": "When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT.",
465
+ "description": "When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT, or on ROSTER_LOADED when rosterSource is event.",
399
466
  "label": "Match Mode",
400
467
  "tier": "presentation",
401
468
  "type": "string"
@@ -419,6 +486,17 @@
419
486
  "tier": "presentation",
420
487
  "type": "string"
421
488
  },
489
+ "rosterSource": {
490
+ "default": "config",
491
+ "description": "Where the roster comes from: config reads elements and links knobs at INIT; event waits for ROSTER_LOADED and takes the roster from its payload.",
492
+ "label": "Roster Source",
493
+ "tier": "domain",
494
+ "type": "string",
495
+ "values": [
496
+ "config",
497
+ "event"
498
+ ]
499
+ },
422
500
  "summary": {
423
501
  "default": "",
424
502
  "description": "One line under the title saying what the system models (keep it under ~65 characters). Empty shows no line.",
@@ -470,6 +548,10 @@
470
548
  "kind": "set",
471
549
  "resource": "@entity.edges"
472
550
  },
551
+ {
552
+ "kind": "set",
553
+ "resource": "@entity.elements"
554
+ },
473
555
  {
474
556
  "kind": "set",
475
557
  "resource": "@entity.enabledIds"
@@ -478,6 +560,10 @@
478
560
  "kind": "set",
479
561
  "resource": "@entity.holds"
480
562
  },
563
+ {
564
+ "kind": "set",
565
+ "resource": "@entity.links"
566
+ },
481
567
  {
482
568
  "kind": "set",
483
569
  "resource": "@entity.nodes"
@@ -527,8 +613,10 @@
527
613
  "provides": [
528
614
  "active",
529
615
  "edges",
616
+ "elements",
530
617
  "enabledIds",
531
618
  "holds",
619
+ "links",
532
620
  "nodes",
533
621
  "readout",
534
622
  "title",
@@ -565,6 +653,71 @@
565
653
  ],
566
654
  "tier": "domain"
567
655
  },
656
+ {
657
+ "description": "Runtime content feed, honoured only when rosterSource is event — mode names the instrument it is for (the matchMode it carries, blank when standalone) and elements and links are the element roster and its relationships; a matching instrument re-initialises from it exactly as INIT does from config, any other instrument hides.",
658
+ "id": "evt_01M459WQMZ61TJXMND9JGX66K2",
659
+ "key": "ROSTER_LOADED",
660
+ "name": "Roster Loaded",
661
+ "payloadSchema": [
662
+ {
663
+ "name": "mode",
664
+ "required": true,
665
+ "type": "string"
666
+ },
667
+ {
668
+ "name": "elements",
669
+ "properties": [
670
+ {
671
+ "name": "id",
672
+ "required": true,
673
+ "type": "string"
674
+ },
675
+ {
676
+ "name": "label",
677
+ "required": true,
678
+ "type": "string"
679
+ },
680
+ {
681
+ "name": "weight",
682
+ "required": true,
683
+ "type": "number"
684
+ },
685
+ {
686
+ "name": "enabled",
687
+ "type": "boolean"
688
+ },
689
+ {
690
+ "name": "x",
691
+ "type": "number"
692
+ },
693
+ {
694
+ "name": "y",
695
+ "type": "number"
696
+ }
697
+ ],
698
+ "required": true,
699
+ "type": "[object]"
700
+ },
701
+ {
702
+ "name": "links",
703
+ "properties": [
704
+ {
705
+ "name": "from",
706
+ "required": true,
707
+ "type": "string"
708
+ },
709
+ {
710
+ "name": "to",
711
+ "required": true,
712
+ "type": "string"
713
+ }
714
+ ],
715
+ "required": true,
716
+ "type": "[object]"
717
+ }
718
+ ],
719
+ "tier": "domain"
720
+ },
568
721
  {
569
722
  "description": "Learner toggled one element on or off, recomputing the derived total against the threshold.",
570
723
  "id": "evt_01M055GQ56YA2WHZ4GQ3RHQ384",
@@ -621,6 +774,16 @@
621
774
  "transitions": [
622
775
  {
623
776
  "effects": [
777
+ [
778
+ "set",
779
+ "@entity.elements",
780
+ "@config.elements"
781
+ ],
782
+ [
783
+ "set",
784
+ "@entity.links",
785
+ "@config.links"
786
+ ],
624
787
  [
625
788
  "set",
626
789
  "@entity.active",
@@ -936,7 +1099,7 @@
936
1099
  "align": "center",
937
1100
  "children": [
938
1101
  "array/map",
939
- "@config.elements",
1102
+ "@entity.elements",
940
1103
  [
941
1104
  "fn",
942
1105
  "e",
@@ -1060,9 +1223,17 @@
1060
1223
  "eventId": "evt_01M055GQ557G8QV8JREMRHKTHX",
1061
1224
  "from": "idle",
1062
1225
  "guard": [
1063
- "==",
1064
- "@config.matchMode",
1065
- ""
1226
+ "and",
1227
+ [
1228
+ "==",
1229
+ "@config.matchMode",
1230
+ ""
1231
+ ],
1232
+ [
1233
+ "==",
1234
+ "@config.rosterSource",
1235
+ "config"
1236
+ ]
1066
1237
  ],
1067
1238
  "to": "idle"
1068
1239
  },
@@ -1105,6 +1276,16 @@
1105
1276
  },
1106
1277
  {
1107
1278
  "effects": [
1279
+ [
1280
+ "set",
1281
+ "@entity.elements",
1282
+ "@config.elements"
1283
+ ],
1284
+ [
1285
+ "set",
1286
+ "@entity.links",
1287
+ "@config.links"
1288
+ ],
1108
1289
  [
1109
1290
  "set",
1110
1291
  "@entity.active",
@@ -1420,7 +1601,7 @@
1420
1601
  "align": "center",
1421
1602
  "children": [
1422
1603
  "array/map",
1423
- "@config.elements",
1604
+ "@entity.elements",
1424
1605
  [
1425
1606
  "fn",
1426
1607
  "e",
@@ -1544,42 +1725,72 @@
1544
1725
  "eventId": "evt_01M055GQ5616ZKF3AC9G2WQX88",
1545
1726
  "from": "idle",
1546
1727
  "guard": [
1547
- "==",
1548
- "@payload.mode",
1549
- "@config.matchMode"
1728
+ "and",
1729
+ [
1730
+ "==",
1731
+ "@payload.mode",
1732
+ "@config.matchMode"
1733
+ ],
1734
+ [
1735
+ "==",
1736
+ "@config.rosterSource",
1737
+ "config"
1738
+ ]
1550
1739
  ],
1551
1740
  "to": "idle"
1552
1741
  },
1553
1742
  {
1554
1743
  "effects": [
1744
+ [
1745
+ "set",
1746
+ "@entity.elements",
1747
+ "@payload.elements"
1748
+ ],
1749
+ [
1750
+ "set",
1751
+ "@entity.links",
1752
+ "@payload.links"
1753
+ ],
1754
+ [
1755
+ "set",
1756
+ "@entity.active",
1757
+ true
1758
+ ],
1759
+ [
1760
+ "set",
1761
+ "@entity.title",
1762
+ "@config.title"
1763
+ ],
1555
1764
  [
1556
1765
  "set",
1557
1766
  "@entity.enabledIds",
1558
1767
  [
1559
- "if",
1560
- [
1561
- "array/includes",
1562
- "@entity.enabledIds",
1563
- "@payload.elementId"
1564
- ],
1768
+ "array/map",
1565
1769
  [
1566
1770
  "array/filter",
1567
- "@entity.enabledIds",
1771
+ "@payload.elements",
1568
1772
  [
1569
1773
  "fn",
1570
- "eid",
1774
+ "e",
1571
1775
  [
1572
- "!=",
1573
- "@eid",
1574
- "@payload.elementId"
1776
+ "==",
1777
+ [
1778
+ "object/get",
1779
+ "@e",
1780
+ "enabled",
1781
+ true
1782
+ ],
1783
+ true
1575
1784
  ]
1576
1785
  ]
1577
1786
  ],
1578
1787
  [
1579
- "array/concat",
1580
- "@entity.enabledIds",
1788
+ "fn",
1789
+ "e",
1581
1790
  [
1582
- "@payload.elementId"
1791
+ "object/get",
1792
+ "@e",
1793
+ "id"
1583
1794
  ]
1584
1795
  ]
1585
1796
  ]
@@ -1591,7 +1802,7 @@
1591
1802
  "activeElements",
1592
1803
  [
1593
1804
  "array/filter",
1594
- "@config.elements",
1805
+ "@payload.elements",
1595
1806
  [
1596
1807
  "fn",
1597
1808
  "e",
@@ -1656,7 +1867,7 @@
1656
1867
  "nodes",
1657
1868
  [
1658
1869
  "array/map",
1659
- "@config.elements",
1870
+ "@payload.elements",
1660
1871
  [
1661
1872
  "fn",
1662
1873
  "e",
@@ -1704,7 +1915,7 @@
1704
1915
  "edges",
1705
1916
  [
1706
1917
  "array/map",
1707
- "@config.links",
1918
+ "@payload.links",
1708
1919
  [
1709
1920
  "fn",
1710
1921
  "l",
@@ -1855,7 +2066,7 @@
1855
2066
  "align": "center",
1856
2067
  "children": [
1857
2068
  "array/map",
1858
- "@config.elements",
2069
+ "@entity.elements",
1859
2070
  [
1860
2071
  "fn",
1861
2072
  "e",
@@ -1973,23 +2184,68 @@
1973
2184
  "padding": "md",
1974
2185
  "type": "box"
1975
2186
  }
2187
+ ]
2188
+ ],
2189
+ "event": "ROSTER_LOADED",
2190
+ "eventId": "evt_01M459WQMZ61TJXMND9JGX66K2",
2191
+ "from": "idle",
2192
+ "guard": [
2193
+ "and",
2194
+ [
2195
+ "==",
2196
+ "@config.rosterSource",
2197
+ "event"
1976
2198
  ],
1977
2199
  [
1978
- "emit",
1979
- "SYSTEM_CHANGED",
1980
- {
1981
- "holds": "@entity.holds",
1982
- "total": "@entity.total"
1983
- }
2200
+ "and",
2201
+ [
2202
+ "==",
2203
+ "@payload.mode",
2204
+ "@config.matchMode"
2205
+ ],
2206
+ [
2207
+ ">",
2208
+ [
2209
+ "array/len",
2210
+ "@payload.elements"
2211
+ ],
2212
+ 0.0
2213
+ ]
1984
2214
  ]
1985
2215
  ],
1986
- "event": "TOGGLE",
1987
- "eventId": "evt_01M055GQ56YA2WHZ4GQ3RHQ384",
2216
+ "to": "idle"
2217
+ },
2218
+ {
2219
+ "effects": [
2220
+ [
2221
+ "set",
2222
+ "@entity.active",
2223
+ false
2224
+ ],
2225
+ [
2226
+ "render-ui",
2227
+ "main",
2228
+ null
2229
+ ]
2230
+ ],
2231
+ "event": "ROSTER_LOADED",
2232
+ "eventId": "evt_01M459WQMZ61TJXMND9JGX66K2",
1988
2233
  "from": "idle",
1989
2234
  "guard": [
1990
- "==",
1991
- "@entity.active",
1992
- true
2235
+ "and",
2236
+ [
2237
+ "==",
2238
+ "@config.rosterSource",
2239
+ "event"
2240
+ ],
2241
+ [
2242
+ "not",
2243
+ [
2244
+ "==",
2245
+ "@payload.mode",
2246
+ "@config.matchMode"
2247
+ ]
2248
+ ]
1993
2249
  ],
1994
2250
  "to": "idle"
1995
2251
  },
@@ -1999,32 +2255,30 @@
1999
2255
  "set",
2000
2256
  "@entity.enabledIds",
2001
2257
  [
2002
- "array/map",
2258
+ "if",
2259
+ [
2260
+ "array/includes",
2261
+ "@entity.enabledIds",
2262
+ "@payload.elementId"
2263
+ ],
2003
2264
  [
2004
2265
  "array/filter",
2005
- "@config.elements",
2266
+ "@entity.enabledIds",
2006
2267
  [
2007
2268
  "fn",
2008
- "e",
2269
+ "eid",
2009
2270
  [
2010
- "==",
2011
- [
2012
- "object/get",
2013
- "@e",
2014
- "enabled",
2015
- true
2016
- ],
2017
- true
2271
+ "!=",
2272
+ "@eid",
2273
+ "@payload.elementId"
2018
2274
  ]
2019
2275
  ]
2020
2276
  ],
2021
2277
  [
2022
- "fn",
2023
- "e",
2278
+ "array/concat",
2279
+ "@entity.enabledIds",
2024
2280
  [
2025
- "object/get",
2026
- "@e",
2027
- "id"
2281
+ "@payload.elementId"
2028
2282
  ]
2029
2283
  ]
2030
2284
  ]
@@ -2036,7 +2290,7 @@
2036
2290
  "activeElements",
2037
2291
  [
2038
2292
  "array/filter",
2039
- "@config.elements",
2293
+ "@entity.elements",
2040
2294
  [
2041
2295
  "fn",
2042
2296
  "e",
@@ -2101,7 +2355,7 @@
2101
2355
  "nodes",
2102
2356
  [
2103
2357
  "array/map",
2104
- "@config.elements",
2358
+ "@entity.elements",
2105
2359
  [
2106
2360
  "fn",
2107
2361
  "e",
@@ -2149,7 +2403,452 @@
2149
2403
  "edges",
2150
2404
  [
2151
2405
  "array/map",
2152
- "@config.links",
2406
+ "@entity.links",
2407
+ [
2408
+ "fn",
2409
+ "l",
2410
+ {
2411
+ "color": [
2412
+ "if",
2413
+ [
2414
+ "and",
2415
+ [
2416
+ "array/includes",
2417
+ "@entity.enabledIds",
2418
+ [
2419
+ "object/get",
2420
+ "@l",
2421
+ "from"
2422
+ ]
2423
+ ],
2424
+ [
2425
+ "array/includes",
2426
+ "@entity.enabledIds",
2427
+ [
2428
+ "object/get",
2429
+ "@l",
2430
+ "to"
2431
+ ]
2432
+ ]
2433
+ ],
2434
+ "@config.enabledEdgeColor",
2435
+ "@config.disabledEdgeColor"
2436
+ ],
2437
+ "from": [
2438
+ "object/get",
2439
+ "@l",
2440
+ "from"
2441
+ ],
2442
+ "to": [
2443
+ "object/get",
2444
+ "@l",
2445
+ "to"
2446
+ ]
2447
+ }
2448
+ ]
2449
+ ]
2450
+ ]
2451
+ ],
2452
+ [
2453
+ "do",
2454
+ [
2455
+ "set",
2456
+ "@entity.total",
2457
+ "@total"
2458
+ ],
2459
+ [
2460
+ "set",
2461
+ "@entity.holds",
2462
+ "@holds"
2463
+ ],
2464
+ [
2465
+ "set",
2466
+ "@entity.readout",
2467
+ "@readout"
2468
+ ],
2469
+ [
2470
+ "set",
2471
+ "@entity.nodes",
2472
+ "@nodes"
2473
+ ],
2474
+ [
2475
+ "set",
2476
+ "@entity.edges",
2477
+ "@edges"
2478
+ ]
2479
+ ]
2480
+ ],
2481
+ [
2482
+ "render-ui",
2483
+ "main",
2484
+ {
2485
+ "children": [
2486
+ {
2487
+ "children": [
2488
+ {
2489
+ "align": "start",
2490
+ "children": [
2491
+ {
2492
+ "children": [
2493
+ {
2494
+ "content": "@entity.title",
2495
+ "type": "typography",
2496
+ "variant": "h4"
2497
+ },
2498
+ [
2499
+ "if",
2500
+ [
2501
+ "==",
2502
+ "@config.summary",
2503
+ ""
2504
+ ],
2505
+ null,
2506
+ {
2507
+ "color": "muted",
2508
+ "content": "@config.summary",
2509
+ "type": "typography",
2510
+ "variant": "body2"
2511
+ }
2512
+ ]
2513
+ ],
2514
+ "direction": "vertical",
2515
+ "gap": "xs",
2516
+ "type": "stack"
2517
+ },
2518
+ {
2519
+ "label": [
2520
+ "if",
2521
+ "@entity.holds",
2522
+ "Holds",
2523
+ "Does not hold"
2524
+ ],
2525
+ "type": "badge",
2526
+ "variant": [
2527
+ "if",
2528
+ "@entity.holds",
2529
+ "primary",
2530
+ "warning"
2531
+ ]
2532
+ }
2533
+ ],
2534
+ "direction": "horizontal",
2535
+ "gap": "md",
2536
+ "justify": "between",
2537
+ "type": "stack"
2538
+ },
2539
+ {
2540
+ "animate": "@config.animate",
2541
+ "backgroundColor": "@config.backgroundColor",
2542
+ "edges": "@entity.edges",
2543
+ "height": "@config.height",
2544
+ "interactive": "@config.interactive",
2545
+ "keyMap": {
2546
+ "KeyR": "RESET"
2547
+ },
2548
+ "nodes": "@entity.nodes",
2549
+ "shapes": [],
2550
+ "type": "biology-canvas",
2551
+ "width": "@config.width"
2552
+ },
2553
+ {
2554
+ "align": "center",
2555
+ "children": [
2556
+ "array/map",
2557
+ "@entity.elements",
2558
+ [
2559
+ "fn",
2560
+ "e",
2561
+ {
2562
+ "action": "TOGGLE",
2563
+ "actionPayload": {
2564
+ "elementId": [
2565
+ "object/get",
2566
+ "@e",
2567
+ "id"
2568
+ ]
2569
+ },
2570
+ "aria-pressed": [
2571
+ "if",
2572
+ [
2573
+ "array/includes",
2574
+ "@entity.enabledIds",
2575
+ [
2576
+ "object/get",
2577
+ "@e",
2578
+ "id"
2579
+ ]
2580
+ ],
2581
+ "true",
2582
+ "false"
2583
+ ],
2584
+ "label": [
2585
+ "if",
2586
+ [
2587
+ "array/includes",
2588
+ "@entity.enabledIds",
2589
+ [
2590
+ "object/get",
2591
+ "@e",
2592
+ "id"
2593
+ ]
2594
+ ],
2595
+ [
2596
+ "object/get",
2597
+ "@e",
2598
+ "label"
2599
+ ],
2600
+ [
2601
+ "str/concat",
2602
+ [
2603
+ "object/get",
2604
+ "@e",
2605
+ "label"
2606
+ ],
2607
+ " — off"
2608
+ ]
2609
+ ],
2610
+ "type": "button",
2611
+ "variant": [
2612
+ "if",
2613
+ [
2614
+ "array/includes",
2615
+ "@entity.enabledIds",
2616
+ [
2617
+ "object/get",
2618
+ "@e",
2619
+ "id"
2620
+ ]
2621
+ ],
2622
+ "secondary",
2623
+ "ghost"
2624
+ ]
2625
+ }
2626
+ ]
2627
+ ],
2628
+ "direction": "horizontal",
2629
+ "gap": "sm",
2630
+ "type": "stack",
2631
+ "wrap": true
2632
+ },
2633
+ {
2634
+ "align": "center",
2635
+ "children": [
2636
+ {
2637
+ "action": "RESET",
2638
+ "icon": "rotate-ccw",
2639
+ "label": "@config.resetLabel",
2640
+ "type": "button",
2641
+ "variant": "ghost"
2642
+ },
2643
+ {
2644
+ "color": "muted",
2645
+ "content": [
2646
+ "str/concat",
2647
+ "Total ",
2648
+ "@entity.total",
2649
+ " of ",
2650
+ "@config.threshold"
2651
+ ],
2652
+ "type": "typography",
2653
+ "variant": "caption"
2654
+ }
2655
+ ],
2656
+ "direction": "horizontal",
2657
+ "gap": "sm",
2658
+ "type": "stack",
2659
+ "wrap": true
2660
+ },
2661
+ {
2662
+ "content": "@entity.readout",
2663
+ "type": "typography",
2664
+ "variant": "body"
2665
+ }
2666
+ ],
2667
+ "direction": "vertical",
2668
+ "gap": "md",
2669
+ "type": "stack"
2670
+ }
2671
+ ],
2672
+ "padding": "md",
2673
+ "type": "box"
2674
+ }
2675
+ ],
2676
+ [
2677
+ "emit",
2678
+ "SYSTEM_CHANGED",
2679
+ {
2680
+ "holds": "@entity.holds",
2681
+ "total": "@entity.total"
2682
+ }
2683
+ ]
2684
+ ],
2685
+ "event": "TOGGLE",
2686
+ "eventId": "evt_01M055GQ56YA2WHZ4GQ3RHQ384",
2687
+ "from": "idle",
2688
+ "guard": [
2689
+ "==",
2690
+ "@entity.active",
2691
+ true
2692
+ ],
2693
+ "to": "idle"
2694
+ },
2695
+ {
2696
+ "effects": [
2697
+ [
2698
+ "set",
2699
+ "@entity.enabledIds",
2700
+ [
2701
+ "array/map",
2702
+ [
2703
+ "array/filter",
2704
+ "@entity.elements",
2705
+ [
2706
+ "fn",
2707
+ "e",
2708
+ [
2709
+ "==",
2710
+ [
2711
+ "object/get",
2712
+ "@e",
2713
+ "enabled",
2714
+ true
2715
+ ],
2716
+ true
2717
+ ]
2718
+ ]
2719
+ ],
2720
+ [
2721
+ "fn",
2722
+ "e",
2723
+ [
2724
+ "object/get",
2725
+ "@e",
2726
+ "id"
2727
+ ]
2728
+ ]
2729
+ ]
2730
+ ],
2731
+ [
2732
+ "let",
2733
+ [
2734
+ [
2735
+ "activeElements",
2736
+ [
2737
+ "array/filter",
2738
+ "@entity.elements",
2739
+ [
2740
+ "fn",
2741
+ "e",
2742
+ [
2743
+ "array/includes",
2744
+ "@entity.enabledIds",
2745
+ [
2746
+ "object/get",
2747
+ "@e",
2748
+ "id"
2749
+ ]
2750
+ ]
2751
+ ]
2752
+ ]
2753
+ ],
2754
+ [
2755
+ "total",
2756
+ [
2757
+ "array/sum",
2758
+ [
2759
+ "array/map",
2760
+ "@activeElements",
2761
+ [
2762
+ "fn",
2763
+ "e",
2764
+ [
2765
+ "object/get",
2766
+ "@e",
2767
+ "weight"
2768
+ ]
2769
+ ]
2770
+ ]
2771
+ ]
2772
+ ],
2773
+ [
2774
+ "holds",
2775
+ [
2776
+ ">=",
2777
+ "@total",
2778
+ "@config.threshold"
2779
+ ]
2780
+ ],
2781
+ [
2782
+ "readout",
2783
+ [
2784
+ "str/concat",
2785
+ "@config.outcomeLabel",
2786
+ ": total ",
2787
+ "@total",
2788
+ " of ",
2789
+ "@config.threshold",
2790
+ " needed. ",
2791
+ [
2792
+ "if",
2793
+ "@holds",
2794
+ "Holds.",
2795
+ "Does not hold."
2796
+ ]
2797
+ ]
2798
+ ],
2799
+ [
2800
+ "nodes",
2801
+ [
2802
+ "array/map",
2803
+ "@entity.elements",
2804
+ [
2805
+ "fn",
2806
+ "e",
2807
+ {
2808
+ "color": [
2809
+ "if",
2810
+ [
2811
+ "array/includes",
2812
+ "@entity.enabledIds",
2813
+ [
2814
+ "object/get",
2815
+ "@e",
2816
+ "id"
2817
+ ]
2818
+ ],
2819
+ "@config.enabledColor",
2820
+ "@config.disabledColor"
2821
+ ],
2822
+ "id": [
2823
+ "object/get",
2824
+ "@e",
2825
+ "id"
2826
+ ],
2827
+ "label": [
2828
+ "object/get",
2829
+ "@e",
2830
+ "label"
2831
+ ],
2832
+ "radius": "@config.nodeRadius",
2833
+ "x": [
2834
+ "object/get",
2835
+ "@e",
2836
+ "x"
2837
+ ],
2838
+ "y": [
2839
+ "object/get",
2840
+ "@e",
2841
+ "y"
2842
+ ]
2843
+ }
2844
+ ]
2845
+ ]
2846
+ ],
2847
+ [
2848
+ "edges",
2849
+ [
2850
+ "array/map",
2851
+ "@entity.links",
2153
2852
  [
2154
2853
  "fn",
2155
2854
  "l",
@@ -2300,7 +2999,7 @@
2300
2999
  "align": "center",
2301
3000
  "children": [
2302
3001
  "array/map",
2303
- "@config.elements",
3002
+ "@entity.elements",
2304
3003
  [
2305
3004
  "fn",
2306
3005
  "e",