@almadar/std 16.242.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 (144) 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-search.lolo +3 -1
  10. package/behaviors/lolo/infra/atoms/std-page-treat.lolo +28 -1
  11. package/behaviors/lolo/infra/atoms/std-page-watch.lolo +3 -1
  12. package/behaviors/lolo/ui/avl/atoms/ui-avl-state-machine.lolo +22 -0
  13. package/behaviors/lolo/ui/avl/atoms/ui-avl-transition-explainer.lolo +175 -0
  14. package/behaviors/lolo/ui/avl/atoms/ui-module-card.lolo +22 -0
  15. package/behaviors/lolo/ui/core/atoms/std-app-layout.lolo +23 -4
  16. package/behaviors/lolo/ui/core/atoms/std-hero.lolo +72 -33
  17. package/behaviors/lolo/ui/core/molecules/ui-agent-chat-feed.lolo +1 -1
  18. package/behaviors/lolo/ui/core/molecules/ui-markdown-content.lolo +54 -0
  19. package/behaviors/lolo/ui/core/molecules/ui-upload-drop-zone.lolo +5 -0
  20. package/behaviors/lolo/ui/core/organisms/ui-segment-renderer.lolo +127 -3
  21. package/behaviors/lolo/ui/core/organisms/ui-state-machine-view.lolo +22 -0
  22. package/behaviors/lolo/ui/core/templates/ui-dashboard-layout.lolo +2 -2
  23. package/behaviors/lolo/ui/learning/atoms/std-learn-arrangement.lolo +87 -17
  24. package/behaviors/lolo/ui/learning/atoms/std-learn-classify.lolo +172 -37
  25. package/behaviors/lolo/ui/learning/atoms/std-learn-coupled-sim.lolo +183 -70
  26. package/behaviors/lolo/ui/learning/atoms/std-learn-derivation.lolo +78 -13
  27. package/behaviors/lolo/ui/learning/atoms/std-learn-diagram.lolo +58 -2
  28. package/behaviors/lolo/ui/learning/atoms/std-learn-doser.lolo +107 -12
  29. package/behaviors/lolo/ui/learning/atoms/std-learn-estimate.lolo +83 -10
  30. package/behaviors/lolo/ui/learning/atoms/std-learn-goal-seek.lolo +130 -9
  31. package/behaviors/lolo/ui/learning/atoms/std-learn-grid-sim.lolo +143 -59
  32. package/behaviors/lolo/ui/learning/atoms/std-learn-hotspot.lolo +96 -22
  33. package/behaviors/lolo/ui/learning/atoms/std-learn-live-sim.lolo +66 -5
  34. package/behaviors/lolo/ui/learning/atoms/std-learn-predict.lolo +84 -6
  35. package/behaviors/lolo/ui/learning/atoms/std-learn-sandbox.lolo +80 -14
  36. package/behaviors/lolo/ui/learning/atoms/std-learn-scatter-fit.lolo +99 -5
  37. package/behaviors/lolo/ui/learning/atoms/std-learn-scenario.lolo +81 -7
  38. package/behaviors/lolo/ui/learning/atoms/std-learn-speed-drill.lolo +83 -7
  39. package/behaviors/lolo/ui/learning/atoms/std-learn-stepper.lolo +224 -99
  40. package/behaviors/lolo/ui/learning/atoms/std-learn-tour-3d.lolo +63 -2
  41. package/behaviors/lolo/ui/learning/atoms/std-learn-trace-player.lolo +99 -38
  42. package/behaviors/lolo/ui/learning/atoms/std-learn-transport.lolo +7 -7
  43. package/behaviors/lolo/ui/learning/atoms/std-learn-tree.lolo +69 -4
  44. package/behaviors/lolo-behavior-contracts.json +1 -1
  45. package/behaviors/registry/agent/atoms/std-agent-context.orb +205 -6
  46. package/behaviors/registry/agent/atoms/std-agent-memory.orb +146 -4
  47. package/behaviors/registry/agent/atoms/std-agent-proposal.orb +1972 -0
  48. package/behaviors/registry/agent/atoms/std-agent-session.orb +2021 -597
  49. package/behaviors/registry/agent/atoms/std-agent-suggestions.orb +5079 -0
  50. package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +287 -5
  51. package/behaviors/registry/agent/organisms/std-agent-assistant.orb +7 -0
  52. package/behaviors/registry/factory-signatures.json +1 -1
  53. package/behaviors/registry/infra/atoms/std-page-search.orb +19 -1
  54. package/behaviors/registry/infra/atoms/std-page-treat.orb +327 -2
  55. package/behaviors/registry/infra/atoms/std-page-watch.orb +19 -1
  56. package/behaviors/registry/ui/avl/atoms/ui-avl-state-machine.orb +134 -0
  57. package/behaviors/registry/ui/avl/atoms/ui-avl-transition-explainer.orb +678 -0
  58. package/behaviors/registry/ui/avl/atoms/ui-module-card.orb +122 -0
  59. package/behaviors/registry/ui/core/atoms/std-app-layout.orb +73 -4
  60. package/behaviors/registry/ui/core/atoms/std-hero.orb +174 -97
  61. package/behaviors/registry/ui/core/molecules/ui-markdown-content.orb +204 -1
  62. package/behaviors/registry/ui/core/molecules/ui-upload-drop-zone.orb +12 -0
  63. package/behaviors/registry/ui/core/organisms/ui-segment-renderer.orb +683 -30
  64. package/behaviors/registry/ui/learning/atoms/std-learn-arrangement.orb +748 -21
  65. package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1429 -41
  66. package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +1031 -185
  67. package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +807 -132
  68. package/behaviors/registry/ui/learning/atoms/std-learn-diagram.orb +553 -6
  69. package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +987 -21
  70. package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +582 -16
  71. package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +954 -13
  72. package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +828 -88
  73. package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +730 -28
  74. package/behaviors/registry/ui/learning/atoms/std-learn-live-sim.orb +479 -9
  75. package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +797 -46
  76. package/behaviors/registry/ui/learning/atoms/std-learn-sandbox.orb +757 -58
  77. package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +1176 -164
  78. package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +599 -12
  79. package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +832 -150
  80. package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +1561 -127
  81. package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +655 -6
  82. package/behaviors/registry/ui/learning/atoms/std-learn-trace-player.orb +634 -43
  83. package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +85 -31
  84. package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +425 -9
  85. package/canonical-operators.json +45 -2
  86. package/dist/behaviors/exports-reader.js +16667 -7868
  87. package/dist/behaviors/functions/index.d.ts +711 -32
  88. package/dist/behaviors/functions/index.js +16651 -7869
  89. package/dist/behaviors/index.d.ts +1 -1
  90. package/dist/behaviors/index.js +16668 -7869
  91. package/dist/behaviors/query.js +16667 -7868
  92. package/dist/behaviors-embeddings.hash.json +3 -3
  93. package/dist/behaviors-embeddings.json +77 -53
  94. package/dist/behaviors-registry.json +4470 -513
  95. package/dist/index.d.ts +3 -3
  96. package/dist/index.js +16101 -7275
  97. package/dist/knob-embeddings.hash.json +3 -3
  98. package/dist/knob-embeddings.json +1309 -685
  99. package/dist/modules/anim.d.ts +1 -1
  100. package/dist/modules/array.d.ts +1 -1
  101. package/dist/modules/async.d.ts +1 -1
  102. package/dist/modules/behavior.d.ts +1 -1
  103. package/dist/modules/browser.d.ts +1 -1
  104. package/dist/modules/composition.d.ts +1 -1
  105. package/dist/modules/contract.d.ts +1 -1
  106. package/dist/modules/core.d.ts +1 -1
  107. package/dist/modules/core.js +29 -2
  108. package/dist/modules/data.d.ts +1 -1
  109. package/dist/modules/ease.d.ts +1 -1
  110. package/dist/modules/format.d.ts +1 -1
  111. package/dist/modules/geo.d.ts +1 -1
  112. package/dist/modules/graph.d.ts +1 -1
  113. package/dist/modules/grid.d.ts +1 -1
  114. package/dist/modules/i18n.d.ts +1 -1
  115. package/dist/modules/index.d.ts +1 -1
  116. package/dist/modules/index.js +29 -2
  117. package/dist/modules/integration.d.ts +1 -1
  118. package/dist/modules/json.d.ts +1 -1
  119. package/dist/modules/llm.d.ts +1 -1
  120. package/dist/modules/math.d.ts +1 -1
  121. package/dist/modules/memory.d.ts +1 -1
  122. package/dist/modules/nn.d.ts +1 -1
  123. package/dist/modules/noise.d.ts +1 -1
  124. package/dist/modules/object.d.ts +1 -1
  125. package/dist/modules/os.d.ts +1 -1
  126. package/dist/modules/path.d.ts +1 -1
  127. package/dist/modules/prob.d.ts +1 -1
  128. package/dist/modules/session.d.ts +1 -1
  129. package/dist/modules/str.d.ts +1 -1
  130. package/dist/modules/tensor.d.ts +1 -1
  131. package/dist/modules/time.d.ts +1 -1
  132. package/dist/modules/trace.d.ts +1 -1
  133. package/dist/modules/train.d.ts +1 -1
  134. package/dist/modules/validate.d.ts +1 -1
  135. package/dist/modules/vector.d.ts +1 -1
  136. package/dist/modules/workspace.d.ts +1 -1
  137. package/dist/registry/factory-signatures.json +1 -1
  138. package/dist/registry.d.ts +2 -2
  139. package/dist/registry.js +29 -2
  140. package/dist/{types-Cdb321uM.d.ts → types-Y-yYWEOX.d.ts} +1 -1
  141. package/i18n/ar.json +3 -1
  142. package/i18n/en.json +2 -0
  143. package/i18n/sl.json +3 -1
  144. package/package.json +3 -3
@@ -100,6 +100,15 @@
100
100
  "parent": "trt_01M0CGSNDKZW4BAAQ48B923K0C",
101
101
  "renames": []
102
102
  },
103
+ "evt_01M459WQQNEVCGWRAKJ3M6R067": {
104
+ "bakedName": "ROSTER_LOADED",
105
+ "curName": "ROSTER_LOADED",
106
+ "id": "evt_01M459WQQNEVCGWRAKJ3M6R067",
107
+ "kind": "event",
108
+ "owner": "workspace",
109
+ "parent": "trt_01M0CGSNDKZW4BAAQ48B923K0C",
110
+ "renames": []
111
+ },
103
112
  "orb_01M0CGSNDKXGJ1SK9X9MV7YKYG": {
104
113
  "bakedName": "LearnScatterFitOrbital",
105
114
  "curName": "LearnScatterFitOrbital",
@@ -146,6 +155,45 @@
146
155
  "name": "title",
147
156
  "type": "string"
148
157
  },
158
+ {
159
+ "items": {
160
+ "properties": {
161
+ "color": {
162
+ "name": "color",
163
+ "required": false,
164
+ "type": "string"
165
+ },
166
+ "id": {
167
+ "name": "id",
168
+ "required": false,
169
+ "type": "string"
170
+ },
171
+ "label": {
172
+ "name": "label",
173
+ "required": false,
174
+ "type": "string"
175
+ },
176
+ "radius": {
177
+ "name": "radius",
178
+ "required": false,
179
+ "type": "number"
180
+ },
181
+ "x": {
182
+ "name": "x",
183
+ "required": true,
184
+ "type": "number"
185
+ },
186
+ "y": {
187
+ "name": "y",
188
+ "required": true,
189
+ "type": "number"
190
+ }
191
+ },
192
+ "type": "object"
193
+ },
194
+ "name": "initialPoints",
195
+ "type": "array"
196
+ },
149
197
  {
150
198
  "items": {
151
199
  "properties": {
@@ -547,7 +595,7 @@
547
595
  },
548
596
  "matchMode": {
549
597
  "default": "",
550
- "description": "When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT.",
598
+ "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.",
551
599
  "label": "Match Mode",
552
600
  "tier": "presentation",
553
601
  "type": "string"
@@ -669,6 +717,17 @@
669
717
  "tier": "presentation",
670
718
  "type": "string"
671
719
  },
720
+ "rosterSource": {
721
+ "default": "config",
722
+ "description": "Where the roster comes from: config reads initialPoints knob at INIT; event waits for ROSTER_LOADED and takes the roster from its payload.",
723
+ "label": "Roster Source",
724
+ "tier": "domain",
725
+ "type": "string",
726
+ "values": [
727
+ "config",
728
+ "event"
729
+ ]
730
+ },
672
731
  "runLabel": {
673
732
  "default": "Run",
674
733
  "label": "Run Button Label",
@@ -793,6 +852,10 @@
793
852
  "kind": "set",
794
853
  "resource": "@entity.guessSlope"
795
854
  },
855
+ {
856
+ "kind": "set",
857
+ "resource": "@entity.initialPoints"
858
+ },
796
859
  {
797
860
  "kind": "set",
798
861
  "resource": "@entity.intercept"
@@ -926,6 +989,7 @@
926
989
  "guessIntercept",
927
990
  "guessScore",
928
991
  "guessSlope",
992
+ "initialPoints",
929
993
  "intercept",
930
994
  "narration",
931
995
  "points",
@@ -965,128 +1029,1058 @@
965
1029
  "type": "string"
966
1030
  }
967
1031
  ],
968
- "tier": "domain"
969
- },
970
- {
971
- "id": "evt_01M0CGSNDNFVTB79M3560MKVB4",
972
- "key": "ADD_POINT",
973
- "name": "Add Point"
974
- },
975
- {
976
- "description": "A scatter point was dragged — id names the point, x/y its new coordinates (clamped to the axis ranges); the fit recomputes live.",
977
- "id": "evt_01M0CGSNDNYV2VV7N4281G3X6X",
978
- "key": "DRAG_POINT",
979
- "name": "Drag Point",
980
- "payloadSchema": [
981
- {
982
- "name": "id",
983
- "type": "string"
984
- },
985
- {
986
- "name": "x",
987
- "type": "number"
988
- },
989
- {
990
- "name": "y",
991
- "type": "number"
992
- }
1032
+ "tier": "domain"
1033
+ },
1034
+ {
1035
+ "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 initialPoints is the starting point set; a matching instrument re-initialises from it exactly as INIT does from config, any other instrument hides.",
1036
+ "id": "evt_01M459WQQNEVCGWRAKJ3M6R067",
1037
+ "key": "ROSTER_LOADED",
1038
+ "name": "Roster Loaded",
1039
+ "payloadSchema": [
1040
+ {
1041
+ "name": "mode",
1042
+ "required": true,
1043
+ "type": "string"
1044
+ },
1045
+ {
1046
+ "name": "initialPoints",
1047
+ "properties": [
1048
+ {
1049
+ "name": "id",
1050
+ "type": "string"
1051
+ },
1052
+ {
1053
+ "name": "x",
1054
+ "required": true,
1055
+ "type": "number"
1056
+ },
1057
+ {
1058
+ "name": "y",
1059
+ "required": true,
1060
+ "type": "number"
1061
+ },
1062
+ {
1063
+ "name": "label",
1064
+ "type": "string"
1065
+ },
1066
+ {
1067
+ "name": "color",
1068
+ "type": "string"
1069
+ },
1070
+ {
1071
+ "name": "radius",
1072
+ "type": "number"
1073
+ }
1074
+ ],
1075
+ "required": true,
1076
+ "type": "[object]"
1077
+ }
1078
+ ],
1079
+ "tier": "domain"
1080
+ },
1081
+ {
1082
+ "id": "evt_01M0CGSNDNFVTB79M3560MKVB4",
1083
+ "key": "ADD_POINT",
1084
+ "name": "Add Point"
1085
+ },
1086
+ {
1087
+ "description": "A scatter point was dragged — id names the point, x/y its new coordinates (clamped to the axis ranges); the fit recomputes live.",
1088
+ "id": "evt_01M0CGSNDNYV2VV7N4281G3X6X",
1089
+ "key": "DRAG_POINT",
1090
+ "name": "Drag Point",
1091
+ "payloadSchema": [
1092
+ {
1093
+ "name": "id",
1094
+ "type": "string"
1095
+ },
1096
+ {
1097
+ "name": "x",
1098
+ "type": "number"
1099
+ },
1100
+ {
1101
+ "name": "y",
1102
+ "type": "number"
1103
+ }
1104
+ ],
1105
+ "tier": "domain"
1106
+ },
1107
+ {
1108
+ "description": "Learner dragged a guess-the-line slider — param is slope or intercept; the guess is scored against the least-squares fit.",
1109
+ "id": "evt_01M0CGSNDNWS2K4R391QPXQYFG",
1110
+ "key": "GUESS_LINE",
1111
+ "name": "Guess Line",
1112
+ "payloadSchema": [
1113
+ {
1114
+ "name": "param",
1115
+ "type": "string"
1116
+ },
1117
+ {
1118
+ "name": "value",
1119
+ "type": "number"
1120
+ }
1121
+ ],
1122
+ "tier": "domain"
1123
+ },
1124
+ {
1125
+ "id": "evt_01M0CGSNDN7W9T6E8N52B3FT19",
1126
+ "key": "REVEAL_FIT",
1127
+ "name": "Reveal Fit"
1128
+ },
1129
+ {
1130
+ "id": "evt_01M0CGSNDN9PCGWDRC046WE6AB",
1131
+ "key": "TOGGLE_RUN",
1132
+ "name": "Toggle Run"
1133
+ },
1134
+ {
1135
+ "id": "evt_01M0CGSNDN1VCP026JN2M802CH",
1136
+ "key": "RESET",
1137
+ "name": "Reset"
1138
+ },
1139
+ {
1140
+ "description": "The least-squares fit and narration after each learner action, auto-add tick, or reset — a composed listener (readout, grader) can subscribe; a harmless no-op when the atom runs standalone.",
1141
+ "id": "evt_01M0CGSNDNRJ5SEN6M870GKYWG",
1142
+ "key": "LEARN_SCATTER_FIT_UPDATED",
1143
+ "name": "Learn Scatter Fit Updated",
1144
+ "payloadSchema": [
1145
+ {
1146
+ "name": "slope",
1147
+ "type": "number"
1148
+ },
1149
+ {
1150
+ "name": "intercept",
1151
+ "type": "number"
1152
+ },
1153
+ {
1154
+ "name": "r",
1155
+ "type": "number"
1156
+ },
1157
+ {
1158
+ "name": "rSquared",
1159
+ "type": "number"
1160
+ },
1161
+ {
1162
+ "name": "pointCount",
1163
+ "type": "number"
1164
+ },
1165
+ {
1166
+ "name": "narration",
1167
+ "type": "string"
1168
+ }
1169
+ ],
1170
+ "synonyms": "fit update, line of best fit, slope, intercept, correlation, r squared",
1171
+ "tier": "domain"
1172
+ },
1173
+ {
1174
+ "description": "Fired once when the point that reaches maxPoints lands and the round latches done — the standard learning completion broadcast a celebration/progression sibling (fx cues, badges) rides.",
1175
+ "id": "evt_01M0GTSZG6B8B6VFWSEN7M2AT4",
1176
+ "key": "LEARN_ROUND_COMPLETE",
1177
+ "name": "Learn Round Complete",
1178
+ "payloadSchema": [
1179
+ {
1180
+ "name": "score",
1181
+ "type": "number"
1182
+ },
1183
+ {
1184
+ "name": "total",
1185
+ "type": "number"
1186
+ }
1187
+ ],
1188
+ "synonyms": "round complete, finished, done, completion, max points",
1189
+ "tier": "domain"
1190
+ }
1191
+ ],
1192
+ "states": [
1193
+ {
1194
+ "isInitial": true,
1195
+ "name": "idle"
1196
+ }
1197
+ ],
1198
+ "transitions": [
1199
+ {
1200
+ "effects": [
1201
+ [
1202
+ "set",
1203
+ "@entity.initialPoints",
1204
+ "@config.initialPoints"
1205
+ ],
1206
+ [
1207
+ "set",
1208
+ "@entity.active",
1209
+ true
1210
+ ],
1211
+ [
1212
+ "set",
1213
+ "@entity.title",
1214
+ "@config.title"
1215
+ ],
1216
+ [
1217
+ "set",
1218
+ "@entity.points",
1219
+ "@config.initialPoints"
1220
+ ],
1221
+ [
1222
+ "set",
1223
+ "@entity.guessSlope",
1224
+ 0.0
1225
+ ],
1226
+ [
1227
+ "set",
1228
+ "@entity.guessIntercept",
1229
+ [
1230
+ "/",
1231
+ [
1232
+ "+",
1233
+ "@config.axisYMin",
1234
+ "@config.axisYMax"
1235
+ ],
1236
+ 2.0
1237
+ ]
1238
+ ],
1239
+ [
1240
+ "set",
1241
+ "@entity.revealed",
1242
+ false
1243
+ ],
1244
+ [
1245
+ "set",
1246
+ "@entity.running",
1247
+ "@config.autoRun"
1248
+ ],
1249
+ [
1250
+ "let",
1251
+ [
1252
+ [
1253
+ "pts",
1254
+ "@config.initialPoints"
1255
+ ],
1256
+ [
1257
+ "n",
1258
+ [
1259
+ "array/len",
1260
+ "@pts"
1261
+ ]
1262
+ ],
1263
+ [
1264
+ "meanX",
1265
+ [
1266
+ "if",
1267
+ [
1268
+ ">",
1269
+ "@n",
1270
+ 0.0
1271
+ ],
1272
+ [
1273
+ "/",
1274
+ [
1275
+ "array/reduce",
1276
+ "@pts",
1277
+ 0.0,
1278
+ [
1279
+ "fn",
1280
+ [
1281
+ "acc",
1282
+ "p"
1283
+ ],
1284
+ [
1285
+ "+",
1286
+ "@acc",
1287
+ [
1288
+ "object/get",
1289
+ "@p",
1290
+ "x"
1291
+ ]
1292
+ ]
1293
+ ]
1294
+ ],
1295
+ "@n"
1296
+ ],
1297
+ 0.0
1298
+ ]
1299
+ ],
1300
+ [
1301
+ "meanY",
1302
+ [
1303
+ "if",
1304
+ [
1305
+ ">",
1306
+ "@n",
1307
+ 0.0
1308
+ ],
1309
+ [
1310
+ "/",
1311
+ [
1312
+ "array/reduce",
1313
+ "@pts",
1314
+ 0.0,
1315
+ [
1316
+ "fn",
1317
+ [
1318
+ "acc",
1319
+ "p"
1320
+ ],
1321
+ [
1322
+ "+",
1323
+ "@acc",
1324
+ [
1325
+ "object/get",
1326
+ "@p",
1327
+ "y"
1328
+ ]
1329
+ ]
1330
+ ]
1331
+ ],
1332
+ "@n"
1333
+ ],
1334
+ 0.0
1335
+ ]
1336
+ ],
1337
+ [
1338
+ "sxx",
1339
+ [
1340
+ "array/reduce",
1341
+ "@pts",
1342
+ 0.0,
1343
+ [
1344
+ "fn",
1345
+ [
1346
+ "acc",
1347
+ "p"
1348
+ ],
1349
+ [
1350
+ "let",
1351
+ [
1352
+ [
1353
+ "dx",
1354
+ [
1355
+ "-",
1356
+ [
1357
+ "object/get",
1358
+ "@p",
1359
+ "x"
1360
+ ],
1361
+ "@meanX"
1362
+ ]
1363
+ ]
1364
+ ],
1365
+ [
1366
+ "+",
1367
+ "@acc",
1368
+ [
1369
+ "*",
1370
+ "@dx",
1371
+ "@dx"
1372
+ ]
1373
+ ]
1374
+ ]
1375
+ ]
1376
+ ]
1377
+ ],
1378
+ [
1379
+ "syy",
1380
+ [
1381
+ "array/reduce",
1382
+ "@pts",
1383
+ 0.0,
1384
+ [
1385
+ "fn",
1386
+ [
1387
+ "acc",
1388
+ "p"
1389
+ ],
1390
+ [
1391
+ "let",
1392
+ [
1393
+ [
1394
+ "dy",
1395
+ [
1396
+ "-",
1397
+ [
1398
+ "object/get",
1399
+ "@p",
1400
+ "y"
1401
+ ],
1402
+ "@meanY"
1403
+ ]
1404
+ ]
1405
+ ],
1406
+ [
1407
+ "+",
1408
+ "@acc",
1409
+ [
1410
+ "*",
1411
+ "@dy",
1412
+ "@dy"
1413
+ ]
1414
+ ]
1415
+ ]
1416
+ ]
1417
+ ]
1418
+ ],
1419
+ [
1420
+ "sxy",
1421
+ [
1422
+ "array/reduce",
1423
+ "@pts",
1424
+ 0.0,
1425
+ [
1426
+ "fn",
1427
+ [
1428
+ "acc",
1429
+ "p"
1430
+ ],
1431
+ [
1432
+ "+",
1433
+ "@acc",
1434
+ [
1435
+ "*",
1436
+ [
1437
+ "-",
1438
+ [
1439
+ "object/get",
1440
+ "@p",
1441
+ "x"
1442
+ ],
1443
+ "@meanX"
1444
+ ],
1445
+ [
1446
+ "-",
1447
+ [
1448
+ "object/get",
1449
+ "@p",
1450
+ "y"
1451
+ ],
1452
+ "@meanY"
1453
+ ]
1454
+ ]
1455
+ ]
1456
+ ]
1457
+ ]
1458
+ ],
1459
+ [
1460
+ "newSlope",
1461
+ [
1462
+ "if",
1463
+ [
1464
+ ">",
1465
+ "@sxx",
1466
+ 0.0
1467
+ ],
1468
+ [
1469
+ "/",
1470
+ "@sxy",
1471
+ "@sxx"
1472
+ ],
1473
+ 0.0
1474
+ ]
1475
+ ],
1476
+ [
1477
+ "newIntercept",
1478
+ [
1479
+ "-",
1480
+ "@meanY",
1481
+ [
1482
+ "*",
1483
+ "@newSlope",
1484
+ "@meanX"
1485
+ ]
1486
+ ]
1487
+ ],
1488
+ [
1489
+ "newR",
1490
+ [
1491
+ "if",
1492
+ [
1493
+ "and",
1494
+ [
1495
+ ">",
1496
+ "@sxx",
1497
+ 0.0
1498
+ ],
1499
+ [
1500
+ ">",
1501
+ "@syy",
1502
+ 0.0
1503
+ ]
1504
+ ],
1505
+ [
1506
+ "/",
1507
+ "@sxy",
1508
+ [
1509
+ "math/sqrt",
1510
+ [
1511
+ "*",
1512
+ "@sxx",
1513
+ "@syy"
1514
+ ]
1515
+ ]
1516
+ ],
1517
+ 0.0
1518
+ ]
1519
+ ],
1520
+ [
1521
+ "fitCurve",
1522
+ {
1523
+ "color": "@config.fitColor",
1524
+ "label": "@config.fitLabel",
1525
+ "samples": [
1526
+ {
1527
+ "x": "@config.axisXMin",
1528
+ "y": [
1529
+ "math/clamp",
1530
+ "@newIntercept",
1531
+ "@config.axisYMin",
1532
+ "@config.axisYMax"
1533
+ ]
1534
+ },
1535
+ {
1536
+ "x": "@config.axisXMax",
1537
+ "y": [
1538
+ "math/clamp",
1539
+ [
1540
+ "+",
1541
+ [
1542
+ "*",
1543
+ "@newSlope",
1544
+ "@config.axisXMax"
1545
+ ],
1546
+ "@newIntercept"
1547
+ ],
1548
+ "@config.axisYMin",
1549
+ "@config.axisYMax"
1550
+ ]
1551
+ }
1552
+ ]
1553
+ }
1554
+ ],
1555
+ [
1556
+ "residualCurves",
1557
+ [
1558
+ "if",
1559
+ "@config.showResiduals",
1560
+ [
1561
+ "array/map",
1562
+ "@pts",
1563
+ [
1564
+ "fn",
1565
+ "p",
1566
+ {
1567
+ "color": "@config.residualColor",
1568
+ "dash": "@config.residualDash",
1569
+ "label": "",
1570
+ "samples": [
1571
+ {
1572
+ "x": [
1573
+ "object/get",
1574
+ "@p",
1575
+ "x"
1576
+ ],
1577
+ "y": [
1578
+ "object/get",
1579
+ "@p",
1580
+ "y"
1581
+ ]
1582
+ },
1583
+ {
1584
+ "x": [
1585
+ "object/get",
1586
+ "@p",
1587
+ "x"
1588
+ ],
1589
+ "y": [
1590
+ "+",
1591
+ [
1592
+ "*",
1593
+ "@newSlope",
1594
+ [
1595
+ "object/get",
1596
+ "@p",
1597
+ "x"
1598
+ ]
1599
+ ],
1600
+ "@newIntercept"
1601
+ ]
1602
+ }
1603
+ ]
1604
+ }
1605
+ ]
1606
+ ],
1607
+ []
1608
+ ]
1609
+ ]
1610
+ ],
1611
+ [
1612
+ "do",
1613
+ [
1614
+ "set",
1615
+ "@entity.slope",
1616
+ "@newSlope"
1617
+ ],
1618
+ [
1619
+ "set",
1620
+ "@entity.intercept",
1621
+ "@newIntercept"
1622
+ ],
1623
+ [
1624
+ "set",
1625
+ "@entity.r",
1626
+ "@newR"
1627
+ ],
1628
+ [
1629
+ "set",
1630
+ "@entity.rSquared",
1631
+ [
1632
+ "*",
1633
+ "@newR",
1634
+ "@newR"
1635
+ ]
1636
+ ],
1637
+ [
1638
+ "set",
1639
+ "@entity.guessScore",
1640
+ 0.0
1641
+ ],
1642
+ [
1643
+ "set",
1644
+ "@entity.curves",
1645
+ [
1646
+ "array/concat",
1647
+ [
1648
+ "array/append",
1649
+ [],
1650
+ "@fitCurve"
1651
+ ],
1652
+ "@residualCurves"
1653
+ ]
1654
+ ],
1655
+ [
1656
+ "set",
1657
+ "@entity.done",
1658
+ [
1659
+ ">=",
1660
+ "@n",
1661
+ "@config.maxPoints"
1662
+ ]
1663
+ ],
1664
+ [
1665
+ "set",
1666
+ "@entity.narration",
1667
+ [
1668
+ "str/concat",
1669
+ [
1670
+ "str/concat",
1671
+ "",
1672
+ "@n"
1673
+ ],
1674
+ " ",
1675
+ "@config.narrationLoadedTemplate",
1676
+ " — r = ",
1677
+ [
1678
+ "str/concat",
1679
+ "",
1680
+ [
1681
+ "math/round",
1682
+ "@newR",
1683
+ 3.0
1684
+ ]
1685
+ ],
1686
+ ", R² = ",
1687
+ [
1688
+ "str/concat",
1689
+ "",
1690
+ [
1691
+ "math/round",
1692
+ [
1693
+ "*",
1694
+ "@newR",
1695
+ "@newR"
1696
+ ],
1697
+ 3.0
1698
+ ]
1699
+ ]
1700
+ ]
1701
+ ]
1702
+ ]
1703
+ ],
1704
+ [
1705
+ "render-ui",
1706
+ "main",
1707
+ {
1708
+ "children": [
1709
+ {
1710
+ "children": [
1711
+ {
1712
+ "align": "start",
1713
+ "children": [
1714
+ {
1715
+ "children": [
1716
+ {
1717
+ "content": "@entity.title",
1718
+ "type": "typography",
1719
+ "variant": "h4"
1720
+ },
1721
+ [
1722
+ "if",
1723
+ [
1724
+ "==",
1725
+ "@config.summary",
1726
+ ""
1727
+ ],
1728
+ null,
1729
+ {
1730
+ "color": "muted",
1731
+ "content": "@config.summary",
1732
+ "type": "typography",
1733
+ "variant": "body2"
1734
+ }
1735
+ ]
1736
+ ],
1737
+ "direction": "vertical",
1738
+ "gap": "xs",
1739
+ "type": "stack"
1740
+ },
1741
+ {
1742
+ "label": [
1743
+ "if",
1744
+ "@entity.revealed",
1745
+ "Revealed",
1746
+ [
1747
+ "if",
1748
+ "@entity.done",
1749
+ "Max points",
1750
+ [
1751
+ "if",
1752
+ "@entity.running",
1753
+ "Adding points",
1754
+ [
1755
+ "if",
1756
+ "@config.guessMode",
1757
+ "Guessing",
1758
+ "Fitted"
1759
+ ]
1760
+ ]
1761
+ ]
1762
+ ],
1763
+ "type": "badge",
1764
+ "variant": [
1765
+ "if",
1766
+ "@entity.revealed",
1767
+ "success",
1768
+ [
1769
+ "if",
1770
+ "@entity.done",
1771
+ "neutral",
1772
+ [
1773
+ "if",
1774
+ "@entity.running",
1775
+ "primary",
1776
+ "neutral"
1777
+ ]
1778
+ ]
1779
+ ]
1780
+ }
1781
+ ],
1782
+ "direction": "horizontal",
1783
+ "gap": "md",
1784
+ "justify": "between",
1785
+ "type": "stack"
1786
+ },
1787
+ {
1788
+ "align": "center",
1789
+ "children": [
1790
+ {
1791
+ "action": "ADD_POINT",
1792
+ "disabled": "@entity.done",
1793
+ "icon": "plus",
1794
+ "label": "@config.addPointLabel",
1795
+ "type": "button",
1796
+ "variant": "primary"
1797
+ },
1798
+ {
1799
+ "action": "REVEAL_FIT",
1800
+ "icon": "eye",
1801
+ "label": "@config.revealLabel",
1802
+ "type": "button",
1803
+ "variant": "secondary"
1804
+ },
1805
+ [
1806
+ "if",
1807
+ "@entity.running",
1808
+ {
1809
+ "action": "TOGGLE_RUN",
1810
+ "aria-pressed": "true",
1811
+ "icon": "pause",
1812
+ "label": "@config.pauseLabel",
1813
+ "type": "button",
1814
+ "variant": "secondary"
1815
+ },
1816
+ {
1817
+ "action": "TOGGLE_RUN",
1818
+ "aria-pressed": "false",
1819
+ "disabled": "@entity.done",
1820
+ "icon": "play",
1821
+ "label": "@config.runLabel",
1822
+ "type": "button",
1823
+ "variant": "secondary"
1824
+ }
1825
+ ],
1826
+ {
1827
+ "action": "RESET",
1828
+ "icon": "rotate-ccw",
1829
+ "label": "@config.resetLabel",
1830
+ "type": "button",
1831
+ "variant": "ghost"
1832
+ },
1833
+ {
1834
+ "color": "muted",
1835
+ "content": [
1836
+ "str/concat",
1837
+ [
1838
+ "str/concat",
1839
+ "",
1840
+ [
1841
+ "array/len",
1842
+ "@entity.points"
1843
+ ]
1844
+ ],
1845
+ [
1846
+ "str/concat",
1847
+ " of ",
1848
+ [
1849
+ "str/concat",
1850
+ "",
1851
+ "@config.maxPoints"
1852
+ ]
1853
+ ]
1854
+ ],
1855
+ "type": "typography",
1856
+ "variant": "caption"
1857
+ }
1858
+ ],
1859
+ "direction": "horizontal",
1860
+ "gap": "sm",
1861
+ "type": "stack",
1862
+ "wrap": true
1863
+ },
1864
+ {
1865
+ "animate": "@config.animate",
1866
+ "curves": "@entity.curves",
1867
+ "gridStep": "@config.gridStep",
1868
+ "height": "@config.height",
1869
+ "interactive": "@config.interactive",
1870
+ "keyMap": {
1871
+ "ArrowRight": "ADD_POINT",
1872
+ "KeyR": "RESET",
1873
+ "Space": "TOGGLE_RUN"
1874
+ },
1875
+ "points": "@entity.points",
1876
+ "showAxes": "@config.showAxes",
1877
+ "showGrid": "@config.showGrid",
1878
+ "showTickLabels": "@config.showTickLabels",
1879
+ "type": "math-canvas",
1880
+ "vectors": [],
1881
+ "width": "@config.width",
1882
+ "xMax": "@config.axisXMax",
1883
+ "xMin": "@config.axisXMin",
1884
+ "yMax": "@config.axisYMax",
1885
+ "yMin": "@config.axisYMin"
1886
+ },
1887
+ {
1888
+ "children": [
1889
+ {
1890
+ "children": [
1891
+ {
1892
+ "content": [
1893
+ "str/concat",
1894
+ "@config.guessSlopeCaption",
1895
+ [
1896
+ "math/round",
1897
+ "@entity.guessSlope",
1898
+ 2.0
1899
+ ]
1900
+ ],
1901
+ "type": "typography",
1902
+ "variant": "caption"
1903
+ },
1904
+ {
1905
+ "action": "GUESS_LINE",
1906
+ "actionPayload": {
1907
+ "param": "slope"
1908
+ },
1909
+ "max": "@config.guessSlopeMax",
1910
+ "min": "@config.guessSlopeMin",
1911
+ "showTooltip": true,
1912
+ "step": "@config.guessSlopeStep",
1913
+ "type": "range-slider",
1914
+ "value": "@entity.guessSlope"
1915
+ }
1916
+ ],
1917
+ "direction": "vertical",
1918
+ "gap": "xs",
1919
+ "type": "stack"
1920
+ },
1921
+ {
1922
+ "children": [
1923
+ {
1924
+ "content": [
1925
+ "str/concat",
1926
+ "@config.guessInterceptCaption",
1927
+ [
1928
+ "math/round",
1929
+ "@entity.guessIntercept",
1930
+ 1.0
1931
+ ]
1932
+ ],
1933
+ "type": "typography",
1934
+ "variant": "caption"
1935
+ },
1936
+ {
1937
+ "action": "GUESS_LINE",
1938
+ "actionPayload": {
1939
+ "param": "intercept"
1940
+ },
1941
+ "max": "@config.guessInterceptMax",
1942
+ "min": "@config.guessInterceptMin",
1943
+ "showTooltip": true,
1944
+ "step": "@config.guessInterceptStep",
1945
+ "type": "range-slider",
1946
+ "value": "@entity.guessIntercept"
1947
+ }
1948
+ ],
1949
+ "direction": "vertical",
1950
+ "gap": "xs",
1951
+ "type": "stack"
1952
+ }
1953
+ ],
1954
+ "direction": "vertical",
1955
+ "gap": "sm",
1956
+ "type": "stack"
1957
+ },
1958
+ {
1959
+ "color": "muted",
1960
+ "content": [
1961
+ "if",
1962
+ "@config.showR",
1963
+ [
1964
+ "str/concat",
1965
+ "r = ",
1966
+ [
1967
+ "math/round",
1968
+ "@entity.r",
1969
+ 3.0
1970
+ ],
1971
+ " — R² = ",
1972
+ [
1973
+ "math/round",
1974
+ "@entity.rSquared",
1975
+ 3.0
1976
+ ],
1977
+ " — guess score ",
1978
+ "@entity.guessScore",
1979
+ "%"
1980
+ ],
1981
+ ""
1982
+ ],
1983
+ "type": "typography",
1984
+ "variant": "caption"
1985
+ },
1986
+ {
1987
+ "content": "@entity.narration",
1988
+ "type": "typography",
1989
+ "variant": "body"
1990
+ }
1991
+ ],
1992
+ "direction": "vertical",
1993
+ "gap": "md",
1994
+ "type": "stack"
1995
+ }
1996
+ ],
1997
+ "padding": "md",
1998
+ "type": "box"
1999
+ }
2000
+ ],
2001
+ [
2002
+ "emit",
2003
+ "LEARN_SCATTER_FIT_UPDATED",
2004
+ {
2005
+ "intercept": "@entity.intercept",
2006
+ "narration": "@entity.narration",
2007
+ "pointCount": [
2008
+ "array/len",
2009
+ "@entity.points"
2010
+ ],
2011
+ "r": "@entity.r",
2012
+ "rSquared": "@entity.rSquared",
2013
+ "slope": "@entity.slope"
2014
+ }
2015
+ ]
2016
+ ],
2017
+ "event": "INIT",
2018
+ "eventId": "evt_01M0CGSNDKG9JYEDATK8M75C4N",
2019
+ "from": "idle",
2020
+ "guard": [
2021
+ "and",
2022
+ [
2023
+ "==",
2024
+ "@config.matchMode",
2025
+ ""
2026
+ ],
2027
+ [
2028
+ "==",
2029
+ "@config.rosterSource",
2030
+ "config"
2031
+ ]
993
2032
  ],
994
- "tier": "domain"
2033
+ "to": "idle"
995
2034
  },
996
2035
  {
997
- "description": "Learner dragged a guess-the-line slider — param is slope or intercept; the guess is scored against the least-squares fit.",
998
- "id": "evt_01M0CGSNDNWS2K4R391QPXQYFG",
999
- "key": "GUESS_LINE",
1000
- "name": "Guess Line",
1001
- "payloadSchema": [
1002
- {
1003
- "name": "param",
1004
- "type": "string"
1005
- },
1006
- {
1007
- "name": "value",
1008
- "type": "number"
1009
- }
2036
+ "effects": [
2037
+ [
2038
+ "set",
2039
+ "@entity.active",
2040
+ false
2041
+ ],
2042
+ [
2043
+ "set",
2044
+ "@entity.running",
2045
+ false
2046
+ ],
2047
+ [
2048
+ "render-ui",
2049
+ "main",
2050
+ null
2051
+ ]
1010
2052
  ],
1011
- "tier": "domain"
1012
- },
1013
- {
1014
- "id": "evt_01M0CGSNDN7W9T6E8N52B3FT19",
1015
- "key": "REVEAL_FIT",
1016
- "name": "Reveal Fit"
1017
- },
1018
- {
1019
- "id": "evt_01M0CGSNDN9PCGWDRC046WE6AB",
1020
- "key": "TOGGLE_RUN",
1021
- "name": "Toggle Run"
1022
- },
1023
- {
1024
- "id": "evt_01M0CGSNDN1VCP026JN2M802CH",
1025
- "key": "RESET",
1026
- "name": "Reset"
1027
- },
1028
- {
1029
- "description": "The least-squares fit and narration after each learner action, auto-add tick, or reset — a composed listener (readout, grader) can subscribe; a harmless no-op when the atom runs standalone.",
1030
- "id": "evt_01M0CGSNDNRJ5SEN6M870GKYWG",
1031
- "key": "LEARN_SCATTER_FIT_UPDATED",
1032
- "name": "Learn Scatter Fit Updated",
1033
- "payloadSchema": [
1034
- {
1035
- "name": "slope",
1036
- "type": "number"
1037
- },
1038
- {
1039
- "name": "intercept",
1040
- "type": "number"
1041
- },
1042
- {
1043
- "name": "r",
1044
- "type": "number"
1045
- },
1046
- {
1047
- "name": "rSquared",
1048
- "type": "number"
1049
- },
1050
- {
1051
- "name": "pointCount",
1052
- "type": "number"
1053
- },
1054
- {
1055
- "name": "narration",
1056
- "type": "string"
1057
- }
2053
+ "event": "MODE_SELECTED",
2054
+ "eventId": "evt_01M0CGSNDNBDW8469VPNX0HE2C",
2055
+ "from": "idle",
2056
+ "guard": [
2057
+ "and",
2058
+ [
2059
+ "not",
2060
+ [
2061
+ "==",
2062
+ "@config.matchMode",
2063
+ ""
2064
+ ]
2065
+ ],
2066
+ [
2067
+ "not",
2068
+ [
2069
+ "==",
2070
+ "@payload.mode",
2071
+ "@config.matchMode"
2072
+ ]
2073
+ ]
1058
2074
  ],
1059
- "synonyms": "fit update, line of best fit, slope, intercept, correlation, r squared",
1060
- "tier": "domain"
2075
+ "to": "idle"
1061
2076
  },
1062
- {
1063
- "description": "Fired once when the point that reaches maxPoints lands and the round latches done — the standard learning completion broadcast a celebration/progression sibling (fx cues, badges) rides.",
1064
- "id": "evt_01M0GTSZG6B8B6VFWSEN7M2AT4",
1065
- "key": "LEARN_ROUND_COMPLETE",
1066
- "name": "Learn Round Complete",
1067
- "payloadSchema": [
1068
- {
1069
- "name": "score",
1070
- "type": "number"
1071
- },
1072
- {
1073
- "name": "total",
1074
- "type": "number"
1075
- }
1076
- ],
1077
- "synonyms": "round complete, finished, done, completion, max points",
1078
- "tier": "domain"
1079
- }
1080
- ],
1081
- "states": [
1082
- {
1083
- "isInitial": true,
1084
- "name": "idle"
1085
- }
1086
- ],
1087
- "transitions": [
1088
2077
  {
1089
2078
  "effects": [
2079
+ [
2080
+ "set",
2081
+ "@entity.initialPoints",
2082
+ "@config.initialPoints"
2083
+ ],
1090
2084
  [
1091
2085
  "set",
1092
2086
  "@entity.active",
@@ -1898,60 +2892,31 @@
1898
2892
  }
1899
2893
  ]
1900
2894
  ],
1901
- "event": "INIT",
1902
- "eventId": "evt_01M0CGSNDKG9JYEDATK8M75C4N",
1903
- "from": "idle",
1904
- "guard": [
1905
- "==",
1906
- "@config.matchMode",
1907
- ""
1908
- ],
1909
- "to": "idle"
1910
- },
1911
- {
1912
- "effects": [
1913
- [
1914
- "set",
1915
- "@entity.active",
1916
- false
1917
- ],
1918
- [
1919
- "set",
1920
- "@entity.running",
1921
- false
1922
- ],
1923
- [
1924
- "render-ui",
1925
- "main",
1926
- null
1927
- ]
1928
- ],
1929
2895
  "event": "MODE_SELECTED",
1930
2896
  "eventId": "evt_01M0CGSNDNBDW8469VPNX0HE2C",
1931
2897
  "from": "idle",
1932
2898
  "guard": [
1933
2899
  "and",
1934
2900
  [
1935
- "not",
1936
- [
1937
- "==",
1938
- "@config.matchMode",
1939
- ""
1940
- ]
2901
+ "==",
2902
+ "@payload.mode",
2903
+ "@config.matchMode"
1941
2904
  ],
1942
2905
  [
1943
- "not",
1944
- [
1945
- "==",
1946
- "@payload.mode",
1947
- "@config.matchMode"
1948
- ]
2906
+ "==",
2907
+ "@config.rosterSource",
2908
+ "config"
1949
2909
  ]
1950
2910
  ],
1951
2911
  "to": "idle"
1952
2912
  },
1953
2913
  {
1954
2914
  "effects": [
2915
+ [
2916
+ "set",
2917
+ "@entity.initialPoints",
2918
+ "@payload.initialPoints"
2919
+ ],
1955
2920
  [
1956
2921
  "set",
1957
2922
  "@entity.active",
@@ -1965,7 +2930,7 @@
1965
2930
  [
1966
2931
  "set",
1967
2932
  "@entity.points",
1968
- "@config.initialPoints"
2933
+ "@payload.initialPoints"
1969
2934
  ],
1970
2935
  [
1971
2936
  "set",
@@ -2000,7 +2965,7 @@
2000
2965
  [
2001
2966
  [
2002
2967
  "pts",
2003
- "@config.initialPoints"
2968
+ "@payload.initialPoints"
2004
2969
  ],
2005
2970
  [
2006
2971
  "n",
@@ -2763,13 +3728,60 @@
2763
3728
  }
2764
3729
  ]
2765
3730
  ],
2766
- "event": "MODE_SELECTED",
2767
- "eventId": "evt_01M0CGSNDNBDW8469VPNX0HE2C",
3731
+ "event": "ROSTER_LOADED",
3732
+ "eventId": "evt_01M459WQQNEVCGWRAKJ3M6R067",
2768
3733
  "from": "idle",
2769
3734
  "guard": [
2770
- "==",
2771
- "@payload.mode",
2772
- "@config.matchMode"
3735
+ "and",
3736
+ [
3737
+ "==",
3738
+ "@config.rosterSource",
3739
+ "event"
3740
+ ],
3741
+ [
3742
+ "==",
3743
+ "@payload.mode",
3744
+ "@config.matchMode"
3745
+ ]
3746
+ ],
3747
+ "to": "idle"
3748
+ },
3749
+ {
3750
+ "effects": [
3751
+ [
3752
+ "set",
3753
+ "@entity.active",
3754
+ false
3755
+ ],
3756
+ [
3757
+ "set",
3758
+ "@entity.running",
3759
+ false
3760
+ ],
3761
+ [
3762
+ "render-ui",
3763
+ "main",
3764
+ null
3765
+ ]
3766
+ ],
3767
+ "event": "ROSTER_LOADED",
3768
+ "eventId": "evt_01M459WQQNEVCGWRAKJ3M6R067",
3769
+ "from": "idle",
3770
+ "guard": [
3771
+ "and",
3772
+ [
3773
+ "==",
3774
+ "@config.rosterSource",
3775
+ "event"
3776
+ ],
3777
+ [
3778
+ "not",
3779
+ [
3780
+ "==",
3781
+ "@payload.mode",
3782
+ "@config.matchMode"
3783
+ ]
3784
+ ]
2773
3785
  ],
2774
3786
  "to": "idle"
2775
3787
  },
@@ -6252,7 +7264,7 @@
6252
7264
  [
6253
7265
  "set",
6254
7266
  "@entity.points",
6255
- "@config.initialPoints"
7267
+ "@entity.initialPoints"
6256
7268
  ],
6257
7269
  [
6258
7270
  "set",
@@ -6287,7 +7299,7 @@
6287
7299
  [
6288
7300
  [
6289
7301
  "pts",
6290
- "@config.initialPoints"
7302
+ "@entity.initialPoints"
6291
7303
  ],
6292
7304
  [
6293
7305
  "n",