@almadar/std 16.243.0 → 16.244.1

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 +72537 -31220
  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 +72537 -31220
  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 +11617 -1225
  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
@@ -91,6 +91,15 @@
91
91
  "parent": "trt_01M07581DD9V8TRJYWFKW9AG1R",
92
92
  "renames": []
93
93
  },
94
+ "evt_01M459R7SVACRB9XP6KAK5M3YT": {
95
+ "bakedName": "ROSTER_LOADED",
96
+ "curName": "ROSTER_LOADED",
97
+ "id": "evt_01M459R7SVACRB9XP6KAK5M3YT",
98
+ "kind": "event",
99
+ "owner": "workspace",
100
+ "parent": "trt_01M07581DD9V8TRJYWFKW9AG1R",
101
+ "renames": []
102
+ },
94
103
  "orb_01M07581DDJA8E66K21HQZ2YNH": {
95
104
  "bakedName": "PredictOrbital",
96
105
  "curName": "PredictOrbital",
@@ -137,6 +146,63 @@
137
146
  "name": "title",
138
147
  "type": "string"
139
148
  },
149
+ {
150
+ "items": {
151
+ "properties": {
152
+ "correctIndex": {
153
+ "name": "correctIndex",
154
+ "required": true,
155
+ "type": "number"
156
+ },
157
+ "explanation": {
158
+ "name": "explanation",
159
+ "required": false,
160
+ "type": "string"
161
+ },
162
+ "frames": {
163
+ "items": {
164
+ "properties": {
165
+ "caption": {
166
+ "name": "caption",
167
+ "required": true,
168
+ "type": "string"
169
+ },
170
+ "value": {
171
+ "name": "value",
172
+ "required": true,
173
+ "type": "number"
174
+ }
175
+ },
176
+ "type": "object"
177
+ },
178
+ "name": "frames",
179
+ "required": true,
180
+ "type": "array"
181
+ },
182
+ "options": {
183
+ "items": {
184
+ "type": "string"
185
+ },
186
+ "name": "options",
187
+ "required": true,
188
+ "type": "array"
189
+ },
190
+ "question": {
191
+ "name": "question",
192
+ "required": true,
193
+ "type": "string"
194
+ },
195
+ "setup": {
196
+ "name": "setup",
197
+ "required": true,
198
+ "type": "string"
199
+ }
200
+ },
201
+ "type": "object"
202
+ },
203
+ "name": "scenarios",
204
+ "type": "array"
205
+ },
140
206
  {
141
207
  "default": 0.0,
142
208
  "name": "scenarioIndex",
@@ -359,6 +425,17 @@
359
425
  "tier": "presentation",
360
426
  "type": "string"
361
427
  },
428
+ "rosterSource": {
429
+ "default": "config",
430
+ "description": "Where the scenario roster comes from: config reads the scenarios knob at INIT; event waits for ROSTER_LOADED and takes the roster from its payload.",
431
+ "label": "Roster Source",
432
+ "tier": "domain",
433
+ "type": "string",
434
+ "values": [
435
+ "config",
436
+ "event"
437
+ ]
438
+ },
362
439
  "scenarios": {
363
440
  "default": [
364
441
  {
@@ -645,6 +722,10 @@
645
722
  "kind": "set",
646
723
  "resource": "@entity.scenarioIndex"
647
724
  },
725
+ {
726
+ "kind": "set",
727
+ "resource": "@entity.scenarios"
728
+ },
648
729
  {
649
730
  "kind": "set",
650
731
  "resource": "@entity.score"
@@ -765,6 +846,7 @@
765
846
  "revealCurves",
766
847
  "revealSamples",
767
848
  "scenarioIndex",
849
+ "scenarios",
768
850
  "score",
769
851
  "setupText",
770
852
  "title",
@@ -802,6 +884,68 @@
802
884
  ],
803
885
  "tier": "domain"
804
886
  },
887
+ {
888
+ "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 scenarios is the scenario list; a matching instrument re-initialises from it exactly as INIT does from config, any other instrument hides.",
889
+ "id": "evt_01M459R7SVACRB9XP6KAK5M3YT",
890
+ "key": "ROSTER_LOADED",
891
+ "name": "Roster Loaded",
892
+ "payloadSchema": [
893
+ {
894
+ "name": "mode",
895
+ "required": true,
896
+ "type": "string"
897
+ },
898
+ {
899
+ "name": "scenarios",
900
+ "properties": [
901
+ {
902
+ "name": "setup",
903
+ "required": true,
904
+ "type": "string"
905
+ },
906
+ {
907
+ "name": "question",
908
+ "required": true,
909
+ "type": "string"
910
+ },
911
+ {
912
+ "name": "options",
913
+ "required": true,
914
+ "type": "[string]"
915
+ },
916
+ {
917
+ "name": "correctIndex",
918
+ "required": true,
919
+ "type": "number"
920
+ },
921
+ {
922
+ "name": "explanation",
923
+ "type": "string"
924
+ },
925
+ {
926
+ "name": "frames",
927
+ "properties": [
928
+ {
929
+ "name": "caption",
930
+ "required": true,
931
+ "type": "string"
932
+ },
933
+ {
934
+ "name": "value",
935
+ "required": true,
936
+ "type": "number"
937
+ }
938
+ ],
939
+ "required": true,
940
+ "type": "[object]"
941
+ }
942
+ ],
943
+ "required": true,
944
+ "type": "[object]"
945
+ }
946
+ ],
947
+ "tier": "domain"
948
+ },
805
949
  {
806
950
  "description": "Learner committed to one of the predicted outcomes before seeing the reveal — index is the chosen option; the reveal then plays out.",
807
951
  "id": "evt_01M07581DK0R8SSN52WKWDRM7M",
@@ -938,6 +1082,11 @@
938
1082
  "@entity.scenarioIndex",
939
1083
  0.0
940
1084
  ],
1085
+ [
1086
+ "set",
1087
+ "@entity.scenarios",
1088
+ "@config.scenarios"
1089
+ ],
941
1090
  [
942
1091
  "set",
943
1092
  "@entity.totalScenarios",
@@ -1424,9 +1573,17 @@
1424
1573
  "eventId": "evt_01M07581DDEAH9VG9CYTH1VJE7",
1425
1574
  "from": "idle",
1426
1575
  "guard": [
1427
- "==",
1428
- "@config.matchMode",
1429
- ""
1576
+ "and",
1577
+ [
1578
+ "==",
1579
+ "@config.matchMode",
1580
+ ""
1581
+ ],
1582
+ [
1583
+ "==",
1584
+ "@config.rosterSource",
1585
+ "config"
1586
+ ]
1430
1587
  ],
1431
1588
  "to": "idle"
1432
1589
  },
@@ -1498,6 +1655,11 @@
1498
1655
  "@entity.scenarioIndex",
1499
1656
  0.0
1500
1657
  ],
1658
+ [
1659
+ "set",
1660
+ "@entity.scenarios",
1661
+ "@config.scenarios"
1662
+ ],
1501
1663
  [
1502
1664
  "set",
1503
1665
  "@entity.totalScenarios",
@@ -1984,9 +2146,17 @@
1984
2146
  "eventId": "evt_01M07581DK61J8ARTARPY4MNHW",
1985
2147
  "from": "idle",
1986
2148
  "guard": [
1987
- "==",
1988
- "@payload.mode",
1989
- "@config.matchMode"
2149
+ "and",
2150
+ [
2151
+ "==",
2152
+ "@payload.mode",
2153
+ "@config.matchMode"
2154
+ ],
2155
+ [
2156
+ "==",
2157
+ "@config.rosterSource",
2158
+ "config"
2159
+ ]
1990
2160
  ],
1991
2161
  "to": "idle"
1992
2162
  },
@@ -1996,10 +2166,10 @@
1996
2166
  "let",
1997
2167
  [
1998
2168
  [
1999
- "frame0",
2169
+ "first",
2000
2170
  [
2001
2171
  "array/nth",
2002
- "@entity.frames",
2172
+ "@payload.scenarios",
2003
2173
  0.0
2004
2174
  ]
2005
2175
  ]
@@ -2008,13 +2178,50 @@
2008
2178
  "do",
2009
2179
  [
2010
2180
  "set",
2011
- "@entity.chosenIndex",
2012
- "@payload.index"
2181
+ "@entity.active",
2182
+ true
2183
+ ],
2184
+ [
2185
+ "set",
2186
+ "@entity.title",
2187
+ "@config.title"
2188
+ ],
2189
+ [
2190
+ "set",
2191
+ "@entity.scenarioIndex",
2192
+ 0.0
2193
+ ],
2194
+ [
2195
+ "set",
2196
+ "@entity.scenarios",
2197
+ "@payload.scenarios"
2198
+ ],
2199
+ [
2200
+ "set",
2201
+ "@entity.totalScenarios",
2202
+ [
2203
+ "array/len",
2204
+ "@payload.scenarios"
2205
+ ]
2013
2206
  ],
2014
2207
  [
2015
2208
  "set",
2016
2209
  "@entity.phase",
2017
- "reveal"
2210
+ "commit"
2211
+ ],
2212
+ [
2213
+ "set",
2214
+ "@entity.chosenIndex",
2215
+ 0.0
2216
+ ],
2217
+ [
2218
+ "set",
2219
+ "@entity.frames",
2220
+ [
2221
+ "object/get",
2222
+ "@first",
2223
+ "frames"
2224
+ ]
2018
2225
  ],
2019
2226
  [
2020
2227
  "set",
@@ -2024,64 +2231,608 @@
2024
2231
  [
2025
2232
  "set",
2026
2233
  "@entity.frameCaption",
2234
+ ""
2235
+ ],
2236
+ [
2237
+ "set",
2238
+ "@entity.frameValue",
2239
+ 0.0
2240
+ ],
2241
+ [
2242
+ "set",
2243
+ "@entity.revealSamples",
2244
+ []
2245
+ ],
2246
+ [
2247
+ "set",
2248
+ "@entity.revealCurves",
2249
+ []
2250
+ ],
2251
+ [
2252
+ "set",
2253
+ "@entity.score",
2254
+ 0.0
2255
+ ],
2256
+ [
2257
+ "set",
2258
+ "@entity.done",
2259
+ false
2260
+ ],
2261
+ [
2262
+ "set",
2263
+ "@entity.setupText",
2027
2264
  [
2028
2265
  "object/get",
2029
- "@frame0",
2030
- "caption"
2266
+ "@first",
2267
+ "setup"
2031
2268
  ]
2032
2269
  ],
2033
2270
  [
2034
2271
  "set",
2035
- "@entity.frameValue",
2272
+ "@entity.question",
2036
2273
  [
2037
2274
  "object/get",
2038
- "@frame0",
2039
- "value"
2275
+ "@first",
2276
+ "question"
2040
2277
  ]
2041
2278
  ],
2042
2279
  [
2043
2280
  "set",
2044
- "@entity.revealSamples",
2281
+ "@entity.options",
2045
2282
  [
2046
- {
2047
- "x": 0.0,
2048
- "y": [
2049
- "object/get",
2050
- "@frame0",
2051
- "value"
2052
- ]
2053
- }
2283
+ "object/get",
2284
+ "@first",
2285
+ "options"
2054
2286
  ]
2055
2287
  ],
2056
2288
  [
2057
2289
  "set",
2058
- "@entity.revealCurves",
2290
+ "@entity.correctIndex",
2059
2291
  [
2060
- {
2061
- "color": "@config.revealColor",
2062
- "label": "@config.revealLabel",
2063
- "samples": "@entity.revealSamples"
2064
- }
2292
+ "object/get",
2293
+ "@first",
2294
+ "correctIndex"
2295
+ ]
2296
+ ],
2297
+ [
2298
+ "set",
2299
+ "@entity.explanation",
2300
+ [
2301
+ "object/get",
2302
+ "@first",
2303
+ "explanation",
2304
+ ""
2065
2305
  ]
2066
2306
  ],
2067
2307
  [
2068
2308
  "set",
2069
2309
  "@entity.feedback",
2310
+ ""
2311
+ ],
2312
+ [
2313
+ "set",
2314
+ "@entity.view",
2070
2315
  [
2071
- "str/concat",
2072
- "Prediction locked: ",
2073
- [
2074
- "array/nth",
2075
- "@entity.options",
2076
- "@payload.index"
2077
- ],
2078
- " — watch what happens."
2316
+ {
2317
+ "children": [
2318
+ {
2319
+ "content": "@entity.setupText",
2320
+ "type": "typography",
2321
+ "variant": "body"
2322
+ },
2323
+ {
2324
+ "content": "@entity.question",
2325
+ "type": "typography",
2326
+ "variant": "h4"
2327
+ }
2328
+ ],
2329
+ "padding": "md",
2330
+ "type": "card",
2331
+ "variant": "bordered"
2332
+ }
2079
2333
  ]
2080
2334
  ]
2081
2335
  ]
2082
2336
  ],
2083
2337
  [
2084
- "emit",
2338
+ "render-ui",
2339
+ "main",
2340
+ {
2341
+ "children": [
2342
+ {
2343
+ "children": [
2344
+ {
2345
+ "align": "start",
2346
+ "children": [
2347
+ {
2348
+ "children": [
2349
+ {
2350
+ "content": "@entity.title",
2351
+ "type": "typography",
2352
+ "variant": "h4"
2353
+ },
2354
+ [
2355
+ "if",
2356
+ [
2357
+ "==",
2358
+ "@config.summary",
2359
+ ""
2360
+ ],
2361
+ null,
2362
+ {
2363
+ "color": "muted",
2364
+ "content": "@config.summary",
2365
+ "type": "typography",
2366
+ "variant": "body2"
2367
+ }
2368
+ ]
2369
+ ],
2370
+ "direction": "vertical",
2371
+ "gap": "xs",
2372
+ "type": "stack"
2373
+ },
2374
+ {
2375
+ "label": [
2376
+ "if",
2377
+ "@entity.done",
2378
+ [
2379
+ "str/concat",
2380
+ "@entity.score",
2381
+ " / ",
2382
+ "@entity.totalScenarios",
2383
+ " correct"
2384
+ ],
2385
+ [
2386
+ "if",
2387
+ [
2388
+ "==",
2389
+ "@entity.phase",
2390
+ "commit"
2391
+ ],
2392
+ "Predict",
2393
+ [
2394
+ "if",
2395
+ [
2396
+ "==",
2397
+ "@entity.phase",
2398
+ "reveal"
2399
+ ],
2400
+ "Revealing",
2401
+ [
2402
+ "if",
2403
+ [
2404
+ "==",
2405
+ "@entity.chosenIndex",
2406
+ "@entity.correctIndex"
2407
+ ],
2408
+ "Correct",
2409
+ "Incorrect"
2410
+ ]
2411
+ ]
2412
+ ]
2413
+ ],
2414
+ "type": "badge",
2415
+ "variant": [
2416
+ "if",
2417
+ "@entity.done",
2418
+ "primary",
2419
+ [
2420
+ "if",
2421
+ [
2422
+ "==",
2423
+ "@entity.phase",
2424
+ "judged"
2425
+ ],
2426
+ [
2427
+ "if",
2428
+ [
2429
+ "==",
2430
+ "@entity.chosenIndex",
2431
+ "@entity.correctIndex"
2432
+ ],
2433
+ "success",
2434
+ "error"
2435
+ ],
2436
+ "neutral"
2437
+ ]
2438
+ ]
2439
+ }
2440
+ ],
2441
+ "direction": "horizontal",
2442
+ "gap": "md",
2443
+ "justify": "between",
2444
+ "type": "stack"
2445
+ },
2446
+ {
2447
+ "label": [
2448
+ "str/concat",
2449
+ "Scenario ",
2450
+ [
2451
+ "str/concat",
2452
+ "",
2453
+ [
2454
+ "+",
2455
+ "@entity.scenarioIndex",
2456
+ 1.0
2457
+ ]
2458
+ ],
2459
+ " of ",
2460
+ [
2461
+ "str/concat",
2462
+ "",
2463
+ "@entity.totalScenarios"
2464
+ ]
2465
+ ],
2466
+ "max": "@entity.totalScenarios",
2467
+ "showPercentage": false,
2468
+ "type": "progress-bar",
2469
+ "value": [
2470
+ "+",
2471
+ "@entity.scenarioIndex",
2472
+ 1.0
2473
+ ]
2474
+ },
2475
+ {
2476
+ "children": "@entity.view",
2477
+ "direction": "vertical",
2478
+ "gap": "md",
2479
+ "type": "stack"
2480
+ },
2481
+ {
2482
+ "children": [
2483
+ "array/map",
2484
+ [
2485
+ "array/range",
2486
+ 0.0,
2487
+ [
2488
+ "array/len",
2489
+ "@entity.options"
2490
+ ]
2491
+ ],
2492
+ [
2493
+ "fn",
2494
+ [
2495
+ "i"
2496
+ ],
2497
+ {
2498
+ "action": "PREDICT",
2499
+ "actionPayload": {
2500
+ "index": "@i"
2501
+ },
2502
+ "disabled": [
2503
+ "!=",
2504
+ "@entity.phase",
2505
+ "commit"
2506
+ ],
2507
+ "label": [
2508
+ "array/nth",
2509
+ "@entity.options",
2510
+ "@i"
2511
+ ],
2512
+ "size": "lg",
2513
+ "type": "button",
2514
+ "variant": [
2515
+ "if",
2516
+ [
2517
+ "==",
2518
+ "@entity.phase",
2519
+ "commit"
2520
+ ],
2521
+ "secondary",
2522
+ [
2523
+ "if",
2524
+ [
2525
+ "==",
2526
+ "@entity.phase",
2527
+ "reveal"
2528
+ ],
2529
+ [
2530
+ "if",
2531
+ [
2532
+ "==",
2533
+ "@entity.chosenIndex",
2534
+ "@i"
2535
+ ],
2536
+ "primary",
2537
+ "ghost"
2538
+ ],
2539
+ [
2540
+ "if",
2541
+ [
2542
+ "==",
2543
+ "@i",
2544
+ "@entity.correctIndex"
2545
+ ],
2546
+ "success",
2547
+ [
2548
+ "if",
2549
+ [
2550
+ "==",
2551
+ "@entity.chosenIndex",
2552
+ "@i"
2553
+ ],
2554
+ "danger",
2555
+ "ghost"
2556
+ ]
2557
+ ]
2558
+ ]
2559
+ ]
2560
+ }
2561
+ ]
2562
+ ],
2563
+ "direction": "vertical",
2564
+ "gap": "sm",
2565
+ "type": "stack"
2566
+ },
2567
+ {
2568
+ "animate": false,
2569
+ "curves": "@entity.revealCurves",
2570
+ "gridStep": "@config.gridStep",
2571
+ "height": "@config.height",
2572
+ "interactive": false,
2573
+ "keyMap": {
2574
+ "ArrowRight": "NEXT",
2575
+ "KeyR": "RETRY"
2576
+ },
2577
+ "points": [],
2578
+ "shapes": [],
2579
+ "showAxes": true,
2580
+ "showGrid": true,
2581
+ "title": "",
2582
+ "type": "math-canvas",
2583
+ "vectors": [],
2584
+ "width": "@config.width",
2585
+ "xMax": [
2586
+ "math/max",
2587
+ 1.0,
2588
+ [
2589
+ "-",
2590
+ [
2591
+ "array/len",
2592
+ "@entity.frames"
2593
+ ],
2594
+ 1.0
2595
+ ]
2596
+ ],
2597
+ "xMin": 0.0,
2598
+ "yMax": "@config.valueMax",
2599
+ "yMin": "@config.valueMin"
2600
+ },
2601
+ {
2602
+ "content": "@entity.frameCaption",
2603
+ "type": "typography",
2604
+ "variant": "body"
2605
+ },
2606
+ {
2607
+ "content": "@entity.feedback",
2608
+ "type": "typography",
2609
+ "variant": "body"
2610
+ },
2611
+ {
2612
+ "align": "center",
2613
+ "children": [
2614
+ {
2615
+ "action": "NEXT",
2616
+ "disabled": [
2617
+ "if",
2618
+ [
2619
+ "and",
2620
+ [
2621
+ "==",
2622
+ "@entity.phase",
2623
+ "judged"
2624
+ ],
2625
+ [
2626
+ "==",
2627
+ "@entity.done",
2628
+ false
2629
+ ]
2630
+ ],
2631
+ false,
2632
+ true
2633
+ ],
2634
+ "icon": "chevron-right",
2635
+ "label": "@config.nextLabel",
2636
+ "type": "button",
2637
+ "variant": "primary"
2638
+ },
2639
+ {
2640
+ "action": "RETRY",
2641
+ "disabled": [
2642
+ "if",
2643
+ "@entity.done",
2644
+ false,
2645
+ true
2646
+ ],
2647
+ "icon": "rotate-ccw",
2648
+ "label": "@config.retryLabel",
2649
+ "type": "button",
2650
+ "variant": "ghost"
2651
+ },
2652
+ {
2653
+ "color": "muted",
2654
+ "content": [
2655
+ "str/concat",
2656
+ "Correct ",
2657
+ "@entity.score",
2658
+ " of ",
2659
+ "@entity.totalScenarios"
2660
+ ],
2661
+ "type": "typography",
2662
+ "variant": "caption"
2663
+ }
2664
+ ],
2665
+ "direction": "horizontal",
2666
+ "gap": "sm",
2667
+ "type": "stack",
2668
+ "wrap": true
2669
+ }
2670
+ ],
2671
+ "direction": "vertical",
2672
+ "gap": "md",
2673
+ "type": "stack"
2674
+ }
2675
+ ],
2676
+ "padding": "md",
2677
+ "type": "box"
2678
+ }
2679
+ ]
2680
+ ],
2681
+ "event": "ROSTER_LOADED",
2682
+ "eventId": "evt_01M459R7SVACRB9XP6KAK5M3YT",
2683
+ "from": "idle",
2684
+ "guard": [
2685
+ "and",
2686
+ [
2687
+ "==",
2688
+ "@config.rosterSource",
2689
+ "event"
2690
+ ],
2691
+ [
2692
+ "and",
2693
+ [
2694
+ "==",
2695
+ "@payload.mode",
2696
+ "@config.matchMode"
2697
+ ],
2698
+ [
2699
+ ">",
2700
+ [
2701
+ "array/len",
2702
+ "@payload.scenarios"
2703
+ ],
2704
+ 0.0
2705
+ ]
2706
+ ]
2707
+ ],
2708
+ "to": "idle"
2709
+ },
2710
+ {
2711
+ "effects": [
2712
+ [
2713
+ "set",
2714
+ "@entity.active",
2715
+ false
2716
+ ],
2717
+ [
2718
+ "render-ui",
2719
+ "main",
2720
+ null
2721
+ ]
2722
+ ],
2723
+ "event": "ROSTER_LOADED",
2724
+ "eventId": "evt_01M459R7SVACRB9XP6KAK5M3YT",
2725
+ "from": "idle",
2726
+ "guard": [
2727
+ "and",
2728
+ [
2729
+ "==",
2730
+ "@config.rosterSource",
2731
+ "event"
2732
+ ],
2733
+ [
2734
+ "not",
2735
+ [
2736
+ "==",
2737
+ "@payload.mode",
2738
+ "@config.matchMode"
2739
+ ]
2740
+ ]
2741
+ ],
2742
+ "to": "idle"
2743
+ },
2744
+ {
2745
+ "effects": [
2746
+ [
2747
+ "let",
2748
+ [
2749
+ [
2750
+ "frame0",
2751
+ [
2752
+ "array/nth",
2753
+ "@entity.frames",
2754
+ 0.0
2755
+ ]
2756
+ ]
2757
+ ],
2758
+ [
2759
+ "do",
2760
+ [
2761
+ "set",
2762
+ "@entity.chosenIndex",
2763
+ "@payload.index"
2764
+ ],
2765
+ [
2766
+ "set",
2767
+ "@entity.phase",
2768
+ "reveal"
2769
+ ],
2770
+ [
2771
+ "set",
2772
+ "@entity.frameIndex",
2773
+ 0.0
2774
+ ],
2775
+ [
2776
+ "set",
2777
+ "@entity.frameCaption",
2778
+ [
2779
+ "object/get",
2780
+ "@frame0",
2781
+ "caption"
2782
+ ]
2783
+ ],
2784
+ [
2785
+ "set",
2786
+ "@entity.frameValue",
2787
+ [
2788
+ "object/get",
2789
+ "@frame0",
2790
+ "value"
2791
+ ]
2792
+ ],
2793
+ [
2794
+ "set",
2795
+ "@entity.revealSamples",
2796
+ [
2797
+ {
2798
+ "x": 0.0,
2799
+ "y": [
2800
+ "object/get",
2801
+ "@frame0",
2802
+ "value"
2803
+ ]
2804
+ }
2805
+ ]
2806
+ ],
2807
+ [
2808
+ "set",
2809
+ "@entity.revealCurves",
2810
+ [
2811
+ {
2812
+ "color": "@config.revealColor",
2813
+ "label": "@config.revealLabel",
2814
+ "samples": "@entity.revealSamples"
2815
+ }
2816
+ ]
2817
+ ],
2818
+ [
2819
+ "set",
2820
+ "@entity.feedback",
2821
+ [
2822
+ "str/concat",
2823
+ "Prediction locked: ",
2824
+ [
2825
+ "array/nth",
2826
+ "@entity.options",
2827
+ "@payload.index"
2828
+ ],
2829
+ " — watch what happens."
2830
+ ]
2831
+ ]
2832
+ ]
2833
+ ],
2834
+ [
2835
+ "emit",
2085
2836
  "PREDICTION_COMMITTED",
2086
2837
  {
2087
2838
  "chosenIndex": "@entity.chosenIndex",
@@ -2128,7 +2879,7 @@
2128
2879
  ],
2129
2880
  [
2130
2881
  "array/len",
2131
- "@config.scenarios"
2882
+ "@entity.scenarios"
2132
2883
  ]
2133
2884
  ],
2134
2885
  [
@@ -2138,7 +2889,7 @@
2138
2889
  "score": "@entity.score",
2139
2890
  "total": [
2140
2891
  "array/len",
2141
- "@config.scenarios"
2892
+ "@entity.scenarios"
2142
2893
  ]
2143
2894
  }
2144
2895
  ],
@@ -2162,7 +2913,7 @@
2162
2913
  "@nextIndex",
2163
2914
  [
2164
2915
  "array/len",
2165
- "@config.scenarios"
2916
+ "@entity.scenarios"
2166
2917
  ]
2167
2918
  ]
2168
2919
  ],
@@ -2170,7 +2921,7 @@
2170
2921
  "next",
2171
2922
  [
2172
2923
  "array/nth",
2173
- "@config.scenarios",
2924
+ "@entity.scenarios",
2174
2925
  [
2175
2926
  "math/min",
2176
2927
  "@nextIndex",
@@ -2178,7 +2929,7 @@
2178
2929
  "-",
2179
2930
  [
2180
2931
  "array/len",
2181
- "@config.scenarios"
2932
+ "@entity.scenarios"
2182
2933
  ],
2183
2934
  1.0
2184
2935
  ]
@@ -2788,7 +3539,7 @@
2788
3539
  "first",
2789
3540
  [
2790
3541
  "array/nth",
2791
- "@config.scenarios",
3542
+ "@entity.scenarios",
2792
3543
  0.0
2793
3544
  ]
2794
3545
  ]