@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
@@ -73,6 +73,15 @@
73
73
  "parent": "trt_01M0CGJFW9PRAPQTAZS9GBDEVH",
74
74
  "renames": []
75
75
  },
76
+ "evt_01M459W790350DY3T859VK82KZ": {
77
+ "bakedName": "ROSTER_LOADED",
78
+ "curName": "ROSTER_LOADED",
79
+ "id": "evt_01M459W790350DY3T859VK82KZ",
80
+ "kind": "event",
81
+ "owner": "workspace",
82
+ "parent": "trt_01M0CGJFW9PRAPQTAZS9GBDEVH",
83
+ "renames": []
84
+ },
76
85
  "orb_01M0CGJFW9KQ380JGA7R8T6ZCR": {
77
86
  "bakedName": "LearnDerivationOrbital",
78
87
  "curName": "LearnDerivationOrbital",
@@ -115,6 +124,144 @@
115
124
  "name": "active",
116
125
  "type": "boolean"
117
126
  },
127
+ {
128
+ "items": {
129
+ "properties": {
130
+ "badgeLabel": {
131
+ "name": "badgeLabel",
132
+ "required": false,
133
+ "type": "string"
134
+ },
135
+ "badgeVariant": {
136
+ "name": "badgeVariant",
137
+ "required": false,
138
+ "type": "string"
139
+ },
140
+ "id": {
141
+ "name": "id",
142
+ "required": true,
143
+ "type": "string"
144
+ },
145
+ "kind": {
146
+ "name": "kind",
147
+ "required": true,
148
+ "type": "string",
149
+ "values": [
150
+ "fact",
151
+ "link"
152
+ ]
153
+ },
154
+ "label": {
155
+ "name": "label",
156
+ "required": true,
157
+ "type": "string"
158
+ },
159
+ "leftNegated": {
160
+ "name": "leftNegated",
161
+ "required": false,
162
+ "type": "boolean"
163
+ },
164
+ "leftSubject": {
165
+ "name": "leftSubject",
166
+ "required": false,
167
+ "type": "string"
168
+ },
169
+ "negated": {
170
+ "name": "negated",
171
+ "required": false,
172
+ "type": "boolean"
173
+ },
174
+ "rightNegated": {
175
+ "name": "rightNegated",
176
+ "required": false,
177
+ "type": "boolean"
178
+ },
179
+ "rightSubject": {
180
+ "name": "rightSubject",
181
+ "required": false,
182
+ "type": "string"
183
+ },
184
+ "subject": {
185
+ "name": "subject",
186
+ "required": false,
187
+ "type": "string"
188
+ }
189
+ },
190
+ "type": "object"
191
+ },
192
+ "name": "premises",
193
+ "type": "array"
194
+ },
195
+ {
196
+ "items": {
197
+ "properties": {
198
+ "deriveNegationMode": {
199
+ "name": "deriveNegationMode",
200
+ "required": true,
201
+ "type": "string",
202
+ "values": [
203
+ "same",
204
+ "invert"
205
+ ]
206
+ },
207
+ "deriveSide": {
208
+ "name": "deriveSide",
209
+ "required": true,
210
+ "type": "string",
211
+ "values": [
212
+ "left",
213
+ "right"
214
+ ]
215
+ },
216
+ "key": {
217
+ "name": "key",
218
+ "required": true,
219
+ "type": "string"
220
+ },
221
+ "label": {
222
+ "name": "label",
223
+ "required": true,
224
+ "type": "string"
225
+ },
226
+ "matchNegationMode": {
227
+ "name": "matchNegationMode",
228
+ "required": true,
229
+ "type": "string",
230
+ "values": [
231
+ "same",
232
+ "opposite"
233
+ ]
234
+ },
235
+ "matchSide": {
236
+ "name": "matchSide",
237
+ "required": true,
238
+ "type": "string",
239
+ "values": [
240
+ "left",
241
+ "right"
242
+ ]
243
+ },
244
+ "noMatchFeedback": {
245
+ "name": "noMatchFeedback",
246
+ "required": false,
247
+ "type": "string"
248
+ },
249
+ "resultBadgeLabel": {
250
+ "name": "resultBadgeLabel",
251
+ "required": false,
252
+ "type": "string"
253
+ },
254
+ "resultBadgeVariant": {
255
+ "name": "resultBadgeVariant",
256
+ "required": false,
257
+ "type": "string"
258
+ }
259
+ },
260
+ "type": "object"
261
+ },
262
+ "name": "candidates",
263
+ "type": "array"
264
+ },
118
265
  {
119
266
  "name": "title",
120
267
  "type": "string"
@@ -516,6 +663,17 @@
516
663
  "tier": "presentation",
517
664
  "type": "string"
518
665
  },
666
+ "rosterSource": {
667
+ "default": "config",
668
+ "description": "Where the roster comes from: config reads the premises/candidates knob(s) at INIT; event waits for ROSTER_LOADED and takes the roster from its payload.",
669
+ "label": "Roster Source",
670
+ "tier": "domain",
671
+ "type": "string",
672
+ "values": [
673
+ "config",
674
+ "event"
675
+ ]
676
+ },
519
677
  "summary": {
520
678
  "default": "",
521
679
  "description": "One line under the title saying what is being derived (keep it under ~65 characters). Empty shows no line.",
@@ -565,6 +723,10 @@
565
723
  "kind": "set",
566
724
  "resource": "@entity.active"
567
725
  },
726
+ {
727
+ "kind": "set",
728
+ "resource": "@entity.candidates"
729
+ },
568
730
  {
569
731
  "kind": "set",
570
732
  "resource": "@entity.elapsedMs"
@@ -610,6 +772,10 @@
610
772
  "resource": "@entity.narration",
611
773
  "site": "tick"
612
774
  },
775
+ {
776
+ "kind": "set",
777
+ "resource": "@entity.premises"
778
+ },
613
779
  {
614
780
  "kind": "set",
615
781
  "resource": "@entity.renderChildren"
@@ -681,11 +847,13 @@
681
847
  "entityContract": {
682
848
  "provides": [
683
849
  "active",
850
+ "candidates",
684
851
  "elapsedMs",
685
852
  "feedback",
686
853
  "goalReached",
687
854
  "lines",
688
855
  "narration",
856
+ "premises",
689
857
  "renderChildren",
690
858
  "running",
691
859
  "title"
@@ -719,89 +887,551 @@
719
887
  "type": "string"
720
888
  }
721
889
  ],
722
- "tier": "domain"
723
- },
724
- {
725
- "description": "Learner clicked a candidate-step button to try to derive the next line: the candidate's matchSide/matchNegationMode is matched against the current lines, and on success its deriveSide/deriveNegationMode determines the appended line.",
726
- "id": "evt_01M0CGJFW9AA9N4C7ADX4VGB15",
727
- "key": "APPLY_STEP",
728
- "name": "Apply Step",
729
- "payloadSchema": [
730
- {
731
- "name": "candidateKey",
732
- "type": "string"
733
- }
890
+ "tier": "domain"
891
+ },
892
+ {
893
+ "description": "Runtime content feed, honoured only when rosterSource is event — mode names the instrument it is for (the matchMode it carries, blank when standalone), premises are the starting lines and candidates the offered derivation steps; a matching instrument re-initialises from them exactly as INIT does from config, any other instrument hides.",
894
+ "id": "evt_01M459W790350DY3T859VK82KZ",
895
+ "key": "ROSTER_LOADED",
896
+ "name": "Roster Loaded",
897
+ "payloadSchema": [
898
+ {
899
+ "name": "mode",
900
+ "required": true,
901
+ "type": "string"
902
+ },
903
+ {
904
+ "name": "premises",
905
+ "properties": [
906
+ {
907
+ "name": "id",
908
+ "required": true,
909
+ "type": "string"
910
+ },
911
+ {
912
+ "name": "label",
913
+ "required": true,
914
+ "type": "string"
915
+ },
916
+ {
917
+ "name": "kind",
918
+ "required": true,
919
+ "type": "string"
920
+ },
921
+ {
922
+ "name": "subject",
923
+ "type": "string"
924
+ },
925
+ {
926
+ "name": "negated",
927
+ "type": "boolean"
928
+ },
929
+ {
930
+ "name": "leftSubject",
931
+ "type": "string"
932
+ },
933
+ {
934
+ "name": "leftNegated",
935
+ "type": "boolean"
936
+ },
937
+ {
938
+ "name": "rightSubject",
939
+ "type": "string"
940
+ },
941
+ {
942
+ "name": "rightNegated",
943
+ "type": "boolean"
944
+ },
945
+ {
946
+ "name": "badgeLabel",
947
+ "type": "string"
948
+ },
949
+ {
950
+ "name": "badgeVariant",
951
+ "type": "string"
952
+ }
953
+ ],
954
+ "required": true,
955
+ "type": "[object]"
956
+ },
957
+ {
958
+ "name": "candidates",
959
+ "properties": [
960
+ {
961
+ "name": "key",
962
+ "required": true,
963
+ "type": "string"
964
+ },
965
+ {
966
+ "name": "label",
967
+ "required": true,
968
+ "type": "string"
969
+ },
970
+ {
971
+ "name": "matchSide",
972
+ "required": true,
973
+ "type": "string"
974
+ },
975
+ {
976
+ "name": "matchNegationMode",
977
+ "required": true,
978
+ "type": "string"
979
+ },
980
+ {
981
+ "name": "deriveSide",
982
+ "required": true,
983
+ "type": "string"
984
+ },
985
+ {
986
+ "name": "deriveNegationMode",
987
+ "required": true,
988
+ "type": "string"
989
+ },
990
+ {
991
+ "name": "resultBadgeLabel",
992
+ "type": "string"
993
+ },
994
+ {
995
+ "name": "resultBadgeVariant",
996
+ "type": "string"
997
+ },
998
+ {
999
+ "name": "noMatchFeedback",
1000
+ "type": "string"
1001
+ }
1002
+ ],
1003
+ "required": true,
1004
+ "type": "[object]"
1005
+ }
1006
+ ],
1007
+ "tier": "domain"
1008
+ },
1009
+ {
1010
+ "description": "Learner clicked a candidate-step button to try to derive the next line: the candidate's matchSide/matchNegationMode is matched against the current lines, and on success its deriveSide/deriveNegationMode determines the appended line.",
1011
+ "id": "evt_01M0CGJFW9AA9N4C7ADX4VGB15",
1012
+ "key": "APPLY_STEP",
1013
+ "name": "Apply Step",
1014
+ "payloadSchema": [
1015
+ {
1016
+ "name": "candidateKey",
1017
+ "type": "string"
1018
+ }
1019
+ ],
1020
+ "tier": "domain"
1021
+ },
1022
+ {
1023
+ "description": "Learner toggled auto-derive: while running, the tick applies the first applicable candidate automatically every autoApplyIntervalMs.",
1024
+ "id": "evt_01M0CGJFW9S6N0YP8GJFD54KXA",
1025
+ "key": "TOGGLE_RUN",
1026
+ "name": "Toggle Run",
1027
+ "tier": "domain"
1028
+ },
1029
+ {
1030
+ "description": "Learner reset the derivation: lines restore to the config-declared starting premises, feedback/narration clear, and goalReached/running reset.",
1031
+ "id": "evt_01M0CGJFW98W2XTBPXCK1DWBHW",
1032
+ "key": "RESET",
1033
+ "name": "Reset",
1034
+ "tier": "domain"
1035
+ },
1036
+ {
1037
+ "description": "The derivation state after each learner action — a composed listener (readout, grader) can subscribe; a harmless no-op when the atom runs standalone.",
1038
+ "id": "evt_01M0CGJFW9HC02BTAY2QGW6ZNE",
1039
+ "key": "DERIVATION_UPDATED",
1040
+ "name": "Derivation Updated",
1041
+ "payloadSchema": [
1042
+ {
1043
+ "name": "feedback",
1044
+ "type": "string"
1045
+ },
1046
+ {
1047
+ "name": "goalReached",
1048
+ "type": "boolean"
1049
+ },
1050
+ {
1051
+ "name": "lineCount",
1052
+ "type": "number"
1053
+ },
1054
+ {
1055
+ "name": "narration",
1056
+ "type": "string"
1057
+ }
1058
+ ],
1059
+ "synonyms": "derivation update, proof step, derived line, candidate applied, goal reached",
1060
+ "tier": "domain"
1061
+ },
1062
+ {
1063
+ "description": "Fired once when the step that derives the goal fact lands — the standard learning completion broadcast a celebration/progression sibling (fx cues, badges) rides.",
1064
+ "id": "evt_01M0GTSZ55B00DB7TJF6M4N2CH",
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, goal reached",
1078
+ "tier": "domain"
1079
+ }
1080
+ ],
1081
+ "states": [
1082
+ {
1083
+ "isInitial": true,
1084
+ "name": "idle"
1085
+ }
1086
+ ],
1087
+ "transitions": [
1088
+ {
1089
+ "effects": [
1090
+ [
1091
+ "set",
1092
+ "@entity.premises",
1093
+ "@config.premises"
1094
+ ],
1095
+ [
1096
+ "set",
1097
+ "@entity.candidates",
1098
+ "@config.candidates"
1099
+ ],
1100
+ [
1101
+ "set",
1102
+ "@entity.active",
1103
+ true
1104
+ ],
1105
+ [
1106
+ "set",
1107
+ "@entity.title",
1108
+ "@config.title"
1109
+ ],
1110
+ [
1111
+ "set",
1112
+ "@entity.feedback",
1113
+ ""
1114
+ ],
1115
+ [
1116
+ "set",
1117
+ "@entity.narration",
1118
+ ""
1119
+ ],
1120
+ [
1121
+ "set",
1122
+ "@entity.goalReached",
1123
+ false
1124
+ ],
1125
+ [
1126
+ "set",
1127
+ "@entity.running",
1128
+ "@config.autoRun"
1129
+ ],
1130
+ [
1131
+ "set",
1132
+ "@entity.elapsedMs",
1133
+ 0.0
1134
+ ],
1135
+ [
1136
+ "set",
1137
+ "@entity.lines",
1138
+ "@entity.premises"
1139
+ ],
1140
+ [
1141
+ "set",
1142
+ "@entity.renderChildren",
1143
+ [
1144
+ {
1145
+ "align": "start",
1146
+ "children": [
1147
+ {
1148
+ "children": [
1149
+ {
1150
+ "content": "@entity.title",
1151
+ "type": "typography",
1152
+ "variant": "h4"
1153
+ },
1154
+ [
1155
+ "if",
1156
+ [
1157
+ "==",
1158
+ "@config.summary",
1159
+ ""
1160
+ ],
1161
+ null,
1162
+ {
1163
+ "color": "muted",
1164
+ "content": "@config.summary",
1165
+ "type": "typography",
1166
+ "variant": "body2"
1167
+ }
1168
+ ]
1169
+ ],
1170
+ "direction": "vertical",
1171
+ "gap": "xs",
1172
+ "type": "stack"
1173
+ },
1174
+ {
1175
+ "label": [
1176
+ "if",
1177
+ "@entity.goalReached",
1178
+ "Goal reached",
1179
+ [
1180
+ "if",
1181
+ "@entity.running",
1182
+ "Auto-stepping",
1183
+ "In progress"
1184
+ ]
1185
+ ],
1186
+ "type": "badge",
1187
+ "variant": [
1188
+ "if",
1189
+ "@entity.goalReached",
1190
+ "success",
1191
+ [
1192
+ "if",
1193
+ "@entity.running",
1194
+ "primary",
1195
+ "neutral"
1196
+ ]
1197
+ ]
1198
+ }
1199
+ ],
1200
+ "direction": "horizontal",
1201
+ "gap": "md",
1202
+ "justify": "between",
1203
+ "type": "stack"
1204
+ },
1205
+ {
1206
+ "content": [
1207
+ "str/concat",
1208
+ "@config.goalPrefix",
1209
+ "@config.goalLabel"
1210
+ ],
1211
+ "type": "typography",
1212
+ "variant": "body"
1213
+ },
1214
+ {
1215
+ "children": [
1216
+ "array/map",
1217
+ "@entity.lines",
1218
+ [
1219
+ "fn",
1220
+ "line",
1221
+ {
1222
+ "align": "center",
1223
+ "children": [
1224
+ {
1225
+ "label": "@line.badgeLabel",
1226
+ "type": "badge",
1227
+ "variant": "@line.badgeVariant"
1228
+ },
1229
+ {
1230
+ "content": "@line.label",
1231
+ "type": "typography",
1232
+ "variant": "body"
1233
+ }
1234
+ ],
1235
+ "direction": "horizontal",
1236
+ "gap": "sm",
1237
+ "type": "stack"
1238
+ }
1239
+ ]
1240
+ ],
1241
+ "direction": "vertical",
1242
+ "gap": "xs",
1243
+ "style": {
1244
+ "maxHeight": [
1245
+ "str/concat",
1246
+ "@config.height",
1247
+ "px"
1248
+ ],
1249
+ "overflowY": "auto"
1250
+ },
1251
+ "type": "stack"
1252
+ },
1253
+ {
1254
+ "align": "center",
1255
+ "children": [
1256
+ "array/map",
1257
+ "@entity.candidates",
1258
+ [
1259
+ "fn",
1260
+ "c",
1261
+ {
1262
+ "action": "APPLY_STEP",
1263
+ "actionPayload": {
1264
+ "candidateKey": "@c.key"
1265
+ },
1266
+ "disabled": "@entity.goalReached",
1267
+ "label": "@c.label",
1268
+ "size": "lg",
1269
+ "type": "button",
1270
+ "variant": "secondary"
1271
+ }
1272
+ ]
1273
+ ],
1274
+ "direction": "horizontal",
1275
+ "gap": "sm",
1276
+ "type": "stack",
1277
+ "wrap": true
1278
+ },
1279
+ {
1280
+ "align": "center",
1281
+ "children": [
1282
+ [
1283
+ "if",
1284
+ "@entity.running",
1285
+ {
1286
+ "action": "TOGGLE_RUN",
1287
+ "aria-pressed": "true",
1288
+ "icon": "pause",
1289
+ "label": "Pause",
1290
+ "type": "button",
1291
+ "variant": "primary"
1292
+ },
1293
+ {
1294
+ "action": "TOGGLE_RUN",
1295
+ "aria-pressed": "false",
1296
+ "disabled": "@entity.goalReached",
1297
+ "icon": "play",
1298
+ "label": "Run",
1299
+ "type": "button",
1300
+ "variant": "primary"
1301
+ }
1302
+ ],
1303
+ {
1304
+ "action": "RESET",
1305
+ "icon": "rotate-ccw",
1306
+ "label": "@config.resetLabel",
1307
+ "type": "button",
1308
+ "variant": "ghost"
1309
+ },
1310
+ {
1311
+ "color": "muted",
1312
+ "content": [
1313
+ "str/concat",
1314
+ [
1315
+ "array/len",
1316
+ "@entity.lines"
1317
+ ],
1318
+ " lines"
1319
+ ],
1320
+ "type": "typography",
1321
+ "variant": "caption"
1322
+ }
1323
+ ],
1324
+ "direction": "horizontal",
1325
+ "gap": "sm",
1326
+ "type": "stack",
1327
+ "wrap": true
1328
+ },
1329
+ {
1330
+ "content": [
1331
+ "if",
1332
+ "@entity.goalReached",
1333
+ "@config.goalReachedMessage",
1334
+ "@entity.narration"
1335
+ ],
1336
+ "type": "typography",
1337
+ "variant": "body"
1338
+ }
1339
+ ]
1340
+ ],
1341
+ [
1342
+ "render-ui",
1343
+ "main",
1344
+ {
1345
+ "children": [
1346
+ {
1347
+ "children": "@entity.renderChildren",
1348
+ "direction": "vertical",
1349
+ "gap": "md",
1350
+ "type": "stack"
1351
+ }
1352
+ ],
1353
+ "maxWidth": [
1354
+ "str/concat",
1355
+ "@config.width",
1356
+ "px"
1357
+ ],
1358
+ "padding": "md",
1359
+ "type": "box"
1360
+ }
1361
+ ]
1362
+ ],
1363
+ "event": "INIT",
1364
+ "eventId": "evt_01M0CGJFW9FJVWEPW6PZH91R9A",
1365
+ "from": "idle",
1366
+ "guard": [
1367
+ "and",
1368
+ [
1369
+ "==",
1370
+ "@config.matchMode",
1371
+ ""
1372
+ ],
1373
+ [
1374
+ "==",
1375
+ "@config.rosterSource",
1376
+ "config"
1377
+ ]
734
1378
  ],
735
- "tier": "domain"
736
- },
737
- {
738
- "description": "Learner toggled auto-derive: while running, the tick applies the first applicable candidate automatically every autoApplyIntervalMs.",
739
- "id": "evt_01M0CGJFW9S6N0YP8GJFD54KXA",
740
- "key": "TOGGLE_RUN",
741
- "name": "Toggle Run",
742
- "tier": "domain"
743
- },
744
- {
745
- "description": "Learner reset the derivation: lines restore to the config-declared starting premises, feedback/narration clear, and goalReached/running reset.",
746
- "id": "evt_01M0CGJFW98W2XTBPXCK1DWBHW",
747
- "key": "RESET",
748
- "name": "Reset",
749
- "tier": "domain"
1379
+ "to": "idle"
750
1380
  },
751
1381
  {
752
- "description": "The derivation state after each learner action — a composed listener (readout, grader) can subscribe; a harmless no-op when the atom runs standalone.",
753
- "id": "evt_01M0CGJFW9HC02BTAY2QGW6ZNE",
754
- "key": "DERIVATION_UPDATED",
755
- "name": "Derivation Updated",
756
- "payloadSchema": [
757
- {
758
- "name": "feedback",
759
- "type": "string"
760
- },
761
- {
762
- "name": "goalReached",
763
- "type": "boolean"
764
- },
765
- {
766
- "name": "lineCount",
767
- "type": "number"
768
- },
769
- {
770
- "name": "narration",
771
- "type": "string"
772
- }
1382
+ "effects": [
1383
+ [
1384
+ "set",
1385
+ "@entity.active",
1386
+ false
1387
+ ],
1388
+ [
1389
+ "set",
1390
+ "@entity.running",
1391
+ false
1392
+ ],
1393
+ [
1394
+ "render-ui",
1395
+ "main",
1396
+ null
1397
+ ]
773
1398
  ],
774
- "synonyms": "derivation update, proof step, derived line, candidate applied, goal reached",
775
- "tier": "domain"
776
- },
777
- {
778
- "description": "Fired once when the step that derives the goal fact lands — the standard learning completion broadcast a celebration/progression sibling (fx cues, badges) rides.",
779
- "id": "evt_01M0GTSZ55B00DB7TJF6M4N2CH",
780
- "key": "LEARN_ROUND_COMPLETE",
781
- "name": "Learn Round Complete",
782
- "payloadSchema": [
783
- {
784
- "name": "score",
785
- "type": "number"
786
- },
787
- {
788
- "name": "total",
789
- "type": "number"
790
- }
1399
+ "event": "MODE_SELECTED",
1400
+ "eventId": "evt_01M0CGJFW96K8FBC6WV4D341YQ",
1401
+ "from": "idle",
1402
+ "guard": [
1403
+ "and",
1404
+ [
1405
+ "not",
1406
+ [
1407
+ "==",
1408
+ "@config.matchMode",
1409
+ ""
1410
+ ]
1411
+ ],
1412
+ [
1413
+ "not",
1414
+ [
1415
+ "==",
1416
+ "@payload.mode",
1417
+ "@config.matchMode"
1418
+ ]
1419
+ ]
791
1420
  ],
792
- "synonyms": "round complete, finished, done, completion, goal reached",
793
- "tier": "domain"
794
- }
795
- ],
796
- "states": [
797
- {
798
- "isInitial": true,
799
- "name": "idle"
800
- }
801
- ],
802
- "transitions": [
1421
+ "to": "idle"
1422
+ },
803
1423
  {
804
1424
  "effects": [
1425
+ [
1426
+ "set",
1427
+ "@entity.premises",
1428
+ "@config.premises"
1429
+ ],
1430
+ [
1431
+ "set",
1432
+ "@entity.candidates",
1433
+ "@config.candidates"
1434
+ ],
805
1435
  [
806
1436
  "set",
807
1437
  "@entity.active",
@@ -840,7 +1470,7 @@
840
1470
  [
841
1471
  "set",
842
1472
  "@entity.lines",
843
- "@config.premises"
1473
+ "@entity.premises"
844
1474
  ],
845
1475
  [
846
1476
  "set",
@@ -959,7 +1589,7 @@
959
1589
  "align": "center",
960
1590
  "children": [
961
1591
  "array/map",
962
- "@config.candidates",
1592
+ "@entity.candidates",
963
1593
  [
964
1594
  "fn",
965
1595
  "c",
@@ -1065,60 +1695,36 @@
1065
1695
  }
1066
1696
  ]
1067
1697
  ],
1068
- "event": "INIT",
1069
- "eventId": "evt_01M0CGJFW9FJVWEPW6PZH91R9A",
1070
- "from": "idle",
1071
- "guard": [
1072
- "==",
1073
- "@config.matchMode",
1074
- ""
1075
- ],
1076
- "to": "idle"
1077
- },
1078
- {
1079
- "effects": [
1080
- [
1081
- "set",
1082
- "@entity.active",
1083
- false
1084
- ],
1085
- [
1086
- "set",
1087
- "@entity.running",
1088
- false
1089
- ],
1090
- [
1091
- "render-ui",
1092
- "main",
1093
- null
1094
- ]
1095
- ],
1096
1698
  "event": "MODE_SELECTED",
1097
1699
  "eventId": "evt_01M0CGJFW96K8FBC6WV4D341YQ",
1098
1700
  "from": "idle",
1099
1701
  "guard": [
1100
1702
  "and",
1101
1703
  [
1102
- "not",
1103
- [
1104
- "==",
1105
- "@config.matchMode",
1106
- ""
1107
- ]
1704
+ "==",
1705
+ "@payload.mode",
1706
+ "@config.matchMode"
1108
1707
  ],
1109
1708
  [
1110
- "not",
1111
- [
1112
- "==",
1113
- "@payload.mode",
1114
- "@config.matchMode"
1115
- ]
1709
+ "==",
1710
+ "@config.rosterSource",
1711
+ "config"
1116
1712
  ]
1117
1713
  ],
1118
1714
  "to": "idle"
1119
1715
  },
1120
1716
  {
1121
1717
  "effects": [
1718
+ [
1719
+ "set",
1720
+ "@entity.premises",
1721
+ "@payload.premises"
1722
+ ],
1723
+ [
1724
+ "set",
1725
+ "@entity.candidates",
1726
+ "@payload.candidates"
1727
+ ],
1122
1728
  [
1123
1729
  "set",
1124
1730
  "@entity.active",
@@ -1157,7 +1763,7 @@
1157
1763
  [
1158
1764
  "set",
1159
1765
  "@entity.lines",
1160
- "@config.premises"
1766
+ "@entity.premises"
1161
1767
  ],
1162
1768
  [
1163
1769
  "set",
@@ -1276,7 +1882,7 @@
1276
1882
  "align": "center",
1277
1883
  "children": [
1278
1884
  "array/map",
1279
- "@config.candidates",
1885
+ "@entity.candidates",
1280
1886
  [
1281
1887
  "fn",
1282
1888
  "c",
@@ -1382,13 +1988,82 @@
1382
1988
  }
1383
1989
  ]
1384
1990
  ],
1385
- "event": "MODE_SELECTED",
1386
- "eventId": "evt_01M0CGJFW96K8FBC6WV4D341YQ",
1991
+ "event": "ROSTER_LOADED",
1992
+ "eventId": "evt_01M459W790350DY3T859VK82KZ",
1387
1993
  "from": "idle",
1388
1994
  "guard": [
1389
- "==",
1390
- "@payload.mode",
1391
- "@config.matchMode"
1995
+ "and",
1996
+ [
1997
+ "==",
1998
+ "@config.rosterSource",
1999
+ "event"
2000
+ ],
2001
+ [
2002
+ "and",
2003
+ [
2004
+ "==",
2005
+ "@payload.mode",
2006
+ "@config.matchMode"
2007
+ ],
2008
+ [
2009
+ "and",
2010
+ [
2011
+ ">",
2012
+ [
2013
+ "array/len",
2014
+ "@payload.premises"
2015
+ ],
2016
+ 0.0
2017
+ ],
2018
+ [
2019
+ ">",
2020
+ [
2021
+ "array/len",
2022
+ "@payload.candidates"
2023
+ ],
2024
+ 0.0
2025
+ ]
2026
+ ]
2027
+ ]
2028
+ ],
2029
+ "to": "idle"
2030
+ },
2031
+ {
2032
+ "effects": [
2033
+ [
2034
+ "set",
2035
+ "@entity.active",
2036
+ false
2037
+ ],
2038
+ [
2039
+ "set",
2040
+ "@entity.running",
2041
+ false
2042
+ ],
2043
+ [
2044
+ "render-ui",
2045
+ "main",
2046
+ null
2047
+ ]
2048
+ ],
2049
+ "event": "ROSTER_LOADED",
2050
+ "eventId": "evt_01M459W790350DY3T859VK82KZ",
2051
+ "from": "idle",
2052
+ "guard": [
2053
+ "and",
2054
+ [
2055
+ "==",
2056
+ "@config.rosterSource",
2057
+ "event"
2058
+ ],
2059
+ [
2060
+ "not",
2061
+ [
2062
+ "==",
2063
+ "@payload.mode",
2064
+ "@config.matchMode"
2065
+ ]
2066
+ ]
1392
2067
  ],
1393
2068
  "to": "idle"
1394
2069
  },
@@ -1403,7 +2078,7 @@
1403
2078
  "array/first",
1404
2079
  [
1405
2080
  "array/filter",
1406
- "@config.candidates",
2081
+ "@entity.candidates",
1407
2082
  [
1408
2083
  "fn",
1409
2084
  "c",
@@ -1870,7 +2545,7 @@
1870
2545
  "align": "center",
1871
2546
  "children": [
1872
2547
  "array/map",
1873
- "@config.candidates",
2548
+ "@entity.candidates",
1874
2549
  [
1875
2550
  "fn",
1876
2551
  "c",
@@ -2141,7 +2816,7 @@
2141
2816
  "align": "center",
2142
2817
  "children": [
2143
2818
  "array/map",
2144
- "@config.candidates",
2819
+ "@entity.candidates",
2145
2820
  [
2146
2821
  "fn",
2147
2822
  "c",
@@ -2275,7 +2950,7 @@
2275
2950
  [
2276
2951
  "set",
2277
2952
  "@entity.lines",
2278
- "@config.premises"
2953
+ "@entity.premises"
2279
2954
  ],
2280
2955
  [
2281
2956
  "set",
@@ -2419,7 +3094,7 @@
2419
3094
  "align": "center",
2420
3095
  "children": [
2421
3096
  "array/map",
2422
- "@config.candidates",
3097
+ "@entity.candidates",
2423
3098
  [
2424
3099
  "fn",
2425
3100
  "c",
@@ -2615,7 +3290,7 @@
2615
3290
  "evaluated",
2616
3291
  [
2617
3292
  "array/map",
2618
- "@config.candidates",
3293
+ "@entity.candidates",
2619
3294
  [
2620
3295
  "fn",
2621
3296
  "c",
@@ -3055,7 +3730,7 @@
3055
3730
  "align": "center",
3056
3731
  "children": [
3057
3732
  "array/map",
3058
- "@config.candidates",
3733
+ "@entity.candidates",
3059
3734
  [
3060
3735
  "fn",
3061
3736
  "c",