@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
@@ -100,6 +100,15 @@
100
100
  "parent": "trt_01M07580VZCAQ803GS0E38Q1J0",
101
101
  "renames": []
102
102
  },
103
+ "evt_01M459XDGMG0ZW5KN8VP84RT82": {
104
+ "bakedName": "ROSTER_LOADED",
105
+ "curName": "ROSTER_LOADED",
106
+ "id": "evt_01M459XDGMG0ZW5KN8VP84RT82",
107
+ "kind": "event",
108
+ "owner": "workspace",
109
+ "parent": "trt_01M07580VZCAQ803GS0E38Q1J0",
110
+ "renames": []
111
+ },
103
112
  "orb_01M07580VZ7B4B990TA9QZ36GF": {
104
113
  "bakedName": "GoalSeekOrbital",
105
114
  "curName": "GoalSeekOrbital",
@@ -150,6 +159,18 @@
150
159
  "name": "curveKind",
151
160
  "type": "string"
152
161
  },
162
+ {
163
+ "name": "goalText",
164
+ "type": "string"
165
+ },
166
+ {
167
+ "name": "targetA",
168
+ "type": "number"
169
+ },
170
+ {
171
+ "name": "targetB",
172
+ "type": "number"
173
+ },
153
174
  {
154
175
  "name": "paramA",
155
176
  "type": "number"
@@ -329,7 +350,7 @@
329
350
  },
330
351
  "matchMode": {
331
352
  "default": "",
332
- "description": "When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT.",
353
+ "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).",
333
354
  "label": "Match Mode",
334
355
  "tier": "presentation",
335
356
  "type": "string"
@@ -398,6 +419,17 @@
398
419
  "tier": "presentation",
399
420
  "type": "number"
400
421
  },
422
+ "rosterSource": {
423
+ "default": "config",
424
+ "description": "Where the problem definition (goalText, curveKind, targetA, targetB) comes from: config reads those knobs at INIT; event waits for ROSTER_LOADED and takes them from its payload.",
425
+ "label": "Roster Source",
426
+ "tier": "domain",
427
+ "type": "string",
428
+ "values": [
429
+ "config",
430
+ "event"
431
+ ]
432
+ },
401
433
  "showAxes": {
402
434
  "default": true,
403
435
  "label": "Show Axes",
@@ -528,6 +560,10 @@
528
560
  "kind": "set",
529
561
  "resource": "@entity.feedback"
530
562
  },
563
+ {
564
+ "kind": "set",
565
+ "resource": "@entity.goalText"
566
+ },
531
567
  {
532
568
  "kind": "set",
533
569
  "resource": "@entity.paramA"
@@ -552,6 +588,14 @@
552
588
  "kind": "set",
553
589
  "resource": "@entity.solved"
554
590
  },
591
+ {
592
+ "kind": "set",
593
+ "resource": "@entity.targetA"
594
+ },
595
+ {
596
+ "kind": "set",
597
+ "resource": "@entity.targetB"
598
+ },
555
599
  {
556
600
  "kind": "set",
557
601
  "resource": "@entity.targetSamples"
@@ -653,12 +697,15 @@
653
697
  "curves",
654
698
  "distance",
655
699
  "feedback",
700
+ "goalText",
656
701
  "paramA",
657
702
  "paramALabel",
658
703
  "paramB",
659
704
  "paramBLabel",
660
705
  "resultRow",
661
706
  "solved",
707
+ "targetA",
708
+ "targetB",
662
709
  "targetSamples",
663
710
  "title",
664
711
  "yMax",
@@ -695,6 +742,40 @@
695
742
  ],
696
743
  "tier": "domain"
697
744
  },
745
+ {
746
+ "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 goalText, curveKind, targetA and targetB define the inverse problem; a matching instrument re-initialises from it exactly as INIT does from config, any other instrument hides.",
747
+ "id": "evt_01M459XDGMG0ZW5KN8VP84RT82",
748
+ "key": "ROSTER_LOADED",
749
+ "name": "Roster Loaded",
750
+ "payloadSchema": [
751
+ {
752
+ "name": "mode",
753
+ "required": true,
754
+ "type": "string"
755
+ },
756
+ {
757
+ "name": "goalText",
758
+ "required": true,
759
+ "type": "string"
760
+ },
761
+ {
762
+ "name": "curveKind",
763
+ "required": true,
764
+ "type": "string"
765
+ },
766
+ {
767
+ "name": "targetA",
768
+ "required": true,
769
+ "type": "number"
770
+ },
771
+ {
772
+ "name": "targetB",
773
+ "required": true,
774
+ "type": "number"
775
+ }
776
+ ],
777
+ "tier": "domain"
778
+ },
698
779
  {
699
780
  "description": "Learner dragged the first parameter's slider — value is the new A; the learner curve and its distance to the target recompute immediately.",
700
781
  "id": "evt_01M07580W5F7ACE7Z9TSS3G2W0",
@@ -1199,6 +1280,21 @@
1199
1280
  "@entity.curveKind",
1200
1281
  "@kind"
1201
1282
  ],
1283
+ [
1284
+ "set",
1285
+ "@entity.goalText",
1286
+ "@config.goalText"
1287
+ ],
1288
+ [
1289
+ "set",
1290
+ "@entity.targetA",
1291
+ "@tA"
1292
+ ],
1293
+ [
1294
+ "set",
1295
+ "@entity.targetB",
1296
+ "@tB"
1297
+ ],
1202
1298
  [
1203
1299
  "set",
1204
1300
  "@entity.paramA",
@@ -1535,7 +1631,7 @@
1535
1631
  "type": "stack"
1536
1632
  },
1537
1633
  {
1538
- "content": "@config.goalText",
1634
+ "content": "@entity.goalText",
1539
1635
  "type": "typography",
1540
1636
  "variant": "body"
1541
1637
  },
@@ -1560,9 +1656,17 @@
1560
1656
  "eventId": "evt_01M07580VZ8RDZMA3WMX2DKFAR",
1561
1657
  "from": "idle",
1562
1658
  "guard": [
1563
- "==",
1564
- "@config.matchMode",
1565
- ""
1659
+ "and",
1660
+ [
1661
+ "==",
1662
+ "@config.matchMode",
1663
+ ""
1664
+ ],
1665
+ [
1666
+ "==",
1667
+ "@config.rosterSource",
1668
+ "config"
1669
+ ]
1566
1670
  ],
1567
1671
  "to": "idle"
1568
1672
  },
@@ -1985,6 +2089,21 @@
1985
2089
  "@entity.curveKind",
1986
2090
  "@kind"
1987
2091
  ],
2092
+ [
2093
+ "set",
2094
+ "@entity.goalText",
2095
+ "@config.goalText"
2096
+ ],
2097
+ [
2098
+ "set",
2099
+ "@entity.targetA",
2100
+ "@tA"
2101
+ ],
2102
+ [
2103
+ "set",
2104
+ "@entity.targetB",
2105
+ "@tB"
2106
+ ],
1988
2107
  [
1989
2108
  "set",
1990
2109
  "@entity.paramA",
@@ -2321,7 +2440,7 @@
2321
2440
  "type": "stack"
2322
2441
  },
2323
2442
  {
2324
- "content": "@config.goalText",
2443
+ "content": "@entity.goalText",
2325
2444
  "type": "typography",
2326
2445
  "variant": "body"
2327
2446
  },
@@ -2346,9 +2465,831 @@
2346
2465
  "eventId": "evt_01M07580W5HD3M1WG88XEPW7CQ",
2347
2466
  "from": "idle",
2348
2467
  "guard": [
2349
- "==",
2350
- "@payload.mode",
2351
- "@config.matchMode"
2468
+ "and",
2469
+ [
2470
+ "==",
2471
+ "@payload.mode",
2472
+ "@config.matchMode"
2473
+ ],
2474
+ [
2475
+ "==",
2476
+ "@config.rosterSource",
2477
+ "config"
2478
+ ]
2479
+ ],
2480
+ "to": "idle"
2481
+ },
2482
+ {
2483
+ "effects": [
2484
+ [
2485
+ "let",
2486
+ [
2487
+ [
2488
+ "kind",
2489
+ "@payload.curveKind"
2490
+ ],
2491
+ [
2492
+ "span",
2493
+ [
2494
+ "-",
2495
+ "@config.xMax",
2496
+ "@config.xMin"
2497
+ ]
2498
+ ],
2499
+ [
2500
+ "tA",
2501
+ "@payload.targetA"
2502
+ ],
2503
+ [
2504
+ "tB",
2505
+ "@payload.targetB"
2506
+ ],
2507
+ [
2508
+ "A",
2509
+ "@config.paramADefault"
2510
+ ],
2511
+ [
2512
+ "B",
2513
+ "@config.paramBDefault"
2514
+ ],
2515
+ [
2516
+ "targetSamples",
2517
+ [
2518
+ "array/map",
2519
+ [
2520
+ "array/range",
2521
+ 0.0,
2522
+ 81.0
2523
+ ],
2524
+ [
2525
+ "fn",
2526
+ [
2527
+ "i"
2528
+ ],
2529
+ [
2530
+ "let",
2531
+ [
2532
+ [
2533
+ "x",
2534
+ [
2535
+ "+",
2536
+ "@config.xMin",
2537
+ [
2538
+ "*",
2539
+ "@i",
2540
+ [
2541
+ "/",
2542
+ "@span",
2543
+ 80.0
2544
+ ]
2545
+ ]
2546
+ ]
2547
+ ],
2548
+ [
2549
+ "yVal",
2550
+ [
2551
+ "if",
2552
+ [
2553
+ "==",
2554
+ "@kind",
2555
+ "power"
2556
+ ],
2557
+ [
2558
+ "*",
2559
+ "@tA",
2560
+ [
2561
+ "math/pow",
2562
+ "@x",
2563
+ "@tB"
2564
+ ]
2565
+ ],
2566
+ [
2567
+ "if",
2568
+ [
2569
+ "==",
2570
+ "@kind",
2571
+ "linear"
2572
+ ],
2573
+ [
2574
+ "+",
2575
+ "@tA",
2576
+ [
2577
+ "*",
2578
+ "@tB",
2579
+ "@x"
2580
+ ]
2581
+ ],
2582
+ [
2583
+ "*",
2584
+ "@tA",
2585
+ [
2586
+ "math/sin",
2587
+ [
2588
+ "*",
2589
+ "@tB",
2590
+ "@x"
2591
+ ]
2592
+ ]
2593
+ ]
2594
+ ]
2595
+ ]
2596
+ ]
2597
+ ],
2598
+ {
2599
+ "x": "@x",
2600
+ "y": "@yVal"
2601
+ }
2602
+ ]
2603
+ ]
2604
+ ]
2605
+ ],
2606
+ [
2607
+ "samples",
2608
+ [
2609
+ "array/map",
2610
+ [
2611
+ "array/range",
2612
+ 0.0,
2613
+ 81.0
2614
+ ],
2615
+ [
2616
+ "fn",
2617
+ [
2618
+ "i"
2619
+ ],
2620
+ [
2621
+ "let",
2622
+ [
2623
+ [
2624
+ "x",
2625
+ [
2626
+ "+",
2627
+ "@config.xMin",
2628
+ [
2629
+ "*",
2630
+ "@i",
2631
+ [
2632
+ "/",
2633
+ "@span",
2634
+ 80.0
2635
+ ]
2636
+ ]
2637
+ ]
2638
+ ],
2639
+ [
2640
+ "yVal",
2641
+ [
2642
+ "if",
2643
+ [
2644
+ "==",
2645
+ "@kind",
2646
+ "power"
2647
+ ],
2648
+ [
2649
+ "*",
2650
+ "@A",
2651
+ [
2652
+ "math/pow",
2653
+ "@x",
2654
+ "@B"
2655
+ ]
2656
+ ],
2657
+ [
2658
+ "if",
2659
+ [
2660
+ "==",
2661
+ "@kind",
2662
+ "linear"
2663
+ ],
2664
+ [
2665
+ "+",
2666
+ "@A",
2667
+ [
2668
+ "*",
2669
+ "@B",
2670
+ "@x"
2671
+ ]
2672
+ ],
2673
+ [
2674
+ "*",
2675
+ "@A",
2676
+ [
2677
+ "math/sin",
2678
+ [
2679
+ "*",
2680
+ "@B",
2681
+ "@x"
2682
+ ]
2683
+ ]
2684
+ ]
2685
+ ]
2686
+ ]
2687
+ ]
2688
+ ],
2689
+ {
2690
+ "x": "@x",
2691
+ "y": "@yVal"
2692
+ }
2693
+ ]
2694
+ ]
2695
+ ]
2696
+ ],
2697
+ [
2698
+ "dist",
2699
+ [
2700
+ "math/sqrt",
2701
+ [
2702
+ "/",
2703
+ [
2704
+ "array/sum",
2705
+ [
2706
+ "array/map",
2707
+ [
2708
+ "array/range",
2709
+ 0.0,
2710
+ 81.0
2711
+ ],
2712
+ [
2713
+ "fn",
2714
+ [
2715
+ "i"
2716
+ ],
2717
+ [
2718
+ "let",
2719
+ [
2720
+ [
2721
+ "dY",
2722
+ [
2723
+ "-",
2724
+ [
2725
+ "object/get",
2726
+ [
2727
+ "array/nth",
2728
+ "@samples",
2729
+ "@i"
2730
+ ],
2731
+ "y"
2732
+ ],
2733
+ [
2734
+ "object/get",
2735
+ [
2736
+ "array/nth",
2737
+ "@targetSamples",
2738
+ "@i"
2739
+ ],
2740
+ "y"
2741
+ ]
2742
+ ]
2743
+ ]
2744
+ ],
2745
+ [
2746
+ "*",
2747
+ "@dY",
2748
+ "@dY"
2749
+ ]
2750
+ ]
2751
+ ]
2752
+ ]
2753
+ ],
2754
+ 81.0
2755
+ ]
2756
+ ]
2757
+ ],
2758
+ [
2759
+ "allSamples",
2760
+ [
2761
+ "array/concat",
2762
+ "@samples",
2763
+ "@targetSamples"
2764
+ ]
2765
+ ],
2766
+ [
2767
+ "yMinRaw",
2768
+ [
2769
+ "array/reduce",
2770
+ "@allSamples",
2771
+ [
2772
+ "object/get",
2773
+ [
2774
+ "array/nth",
2775
+ "@allSamples",
2776
+ 0.0
2777
+ ],
2778
+ "y"
2779
+ ],
2780
+ [
2781
+ "fn",
2782
+ [
2783
+ "acc",
2784
+ "s"
2785
+ ],
2786
+ [
2787
+ "math/min",
2788
+ "@acc",
2789
+ [
2790
+ "object/get",
2791
+ "@s",
2792
+ "y"
2793
+ ]
2794
+ ]
2795
+ ]
2796
+ ]
2797
+ ],
2798
+ [
2799
+ "yMaxRaw",
2800
+ [
2801
+ "array/reduce",
2802
+ "@allSamples",
2803
+ [
2804
+ "object/get",
2805
+ [
2806
+ "array/nth",
2807
+ "@allSamples",
2808
+ 0.0
2809
+ ],
2810
+ "y"
2811
+ ],
2812
+ [
2813
+ "fn",
2814
+ [
2815
+ "acc",
2816
+ "s"
2817
+ ],
2818
+ [
2819
+ "math/max",
2820
+ "@acc",
2821
+ [
2822
+ "object/get",
2823
+ "@s",
2824
+ "y"
2825
+ ]
2826
+ ]
2827
+ ]
2828
+ ]
2829
+ ],
2830
+ [
2831
+ "yPad",
2832
+ [
2833
+ "*",
2834
+ 0.1,
2835
+ [
2836
+ "math/max",
2837
+ 0.001,
2838
+ [
2839
+ "-",
2840
+ "@yMaxRaw",
2841
+ "@yMinRaw"
2842
+ ]
2843
+ ]
2844
+ ]
2845
+ ]
2846
+ ],
2847
+ [
2848
+ "do",
2849
+ [
2850
+ "set",
2851
+ "@entity.active",
2852
+ true
2853
+ ],
2854
+ [
2855
+ "set",
2856
+ "@entity.title",
2857
+ "@config.title"
2858
+ ],
2859
+ [
2860
+ "set",
2861
+ "@entity.curveKind",
2862
+ "@kind"
2863
+ ],
2864
+ [
2865
+ "set",
2866
+ "@entity.goalText",
2867
+ "@payload.goalText"
2868
+ ],
2869
+ [
2870
+ "set",
2871
+ "@entity.targetA",
2872
+ "@payload.targetA"
2873
+ ],
2874
+ [
2875
+ "set",
2876
+ "@entity.targetB",
2877
+ "@payload.targetB"
2878
+ ],
2879
+ [
2880
+ "set",
2881
+ "@entity.paramA",
2882
+ "@A"
2883
+ ],
2884
+ [
2885
+ "set",
2886
+ "@entity.paramB",
2887
+ "@B"
2888
+ ],
2889
+ [
2890
+ "set",
2891
+ "@entity.paramALabel",
2892
+ "@config.paramALabel"
2893
+ ],
2894
+ [
2895
+ "set",
2896
+ "@entity.paramBLabel",
2897
+ "@config.paramBLabel"
2898
+ ],
2899
+ [
2900
+ "set",
2901
+ "@entity.targetSamples",
2902
+ "@targetSamples"
2903
+ ],
2904
+ [
2905
+ "set",
2906
+ "@entity.distance",
2907
+ "@dist"
2908
+ ],
2909
+ [
2910
+ "set",
2911
+ "@entity.attempts",
2912
+ 0.0
2913
+ ],
2914
+ [
2915
+ "set",
2916
+ "@entity.solved",
2917
+ false
2918
+ ],
2919
+ [
2920
+ "set",
2921
+ "@entity.feedback",
2922
+ ""
2923
+ ],
2924
+ [
2925
+ "set",
2926
+ "@entity.yMin",
2927
+ [
2928
+ "-",
2929
+ "@yMinRaw",
2930
+ "@yPad"
2931
+ ]
2932
+ ],
2933
+ [
2934
+ "set",
2935
+ "@entity.yMax",
2936
+ [
2937
+ "+",
2938
+ "@yMaxRaw",
2939
+ "@yPad"
2940
+ ]
2941
+ ],
2942
+ [
2943
+ "set",
2944
+ "@entity.curves",
2945
+ [
2946
+ {
2947
+ "color": "@config.targetColor",
2948
+ "label": "@config.targetLabel",
2949
+ "samples": "@targetSamples"
2950
+ },
2951
+ {
2952
+ "color": "@config.learnerColor",
2953
+ "label": "@config.learnerLabel",
2954
+ "samples": "@samples"
2955
+ }
2956
+ ]
2957
+ ]
2958
+ ]
2959
+ ],
2960
+ [
2961
+ "set",
2962
+ "@entity.resultRow",
2963
+ [
2964
+ "array/concat",
2965
+ [
2966
+ "if",
2967
+ "@entity.solved",
2968
+ [
2969
+ {
2970
+ "label": "Solved",
2971
+ "type": "badge",
2972
+ "variant": "success"
2973
+ }
2974
+ ],
2975
+ []
2976
+ ],
2977
+ [
2978
+ {
2979
+ "content": "@entity.feedback",
2980
+ "type": "typography",
2981
+ "variant": "caption"
2982
+ }
2983
+ ]
2984
+ ]
2985
+ ],
2986
+ [
2987
+ "render-ui",
2988
+ "main",
2989
+ {
2990
+ "children": [
2991
+ {
2992
+ "children": [
2993
+ {
2994
+ "align": "start",
2995
+ "children": [
2996
+ {
2997
+ "children": [
2998
+ {
2999
+ "content": "@entity.title",
3000
+ "type": "typography",
3001
+ "variant": "h4"
3002
+ },
3003
+ [
3004
+ "if",
3005
+ [
3006
+ "==",
3007
+ "@config.summary",
3008
+ ""
3009
+ ],
3010
+ null,
3011
+ {
3012
+ "color": "muted",
3013
+ "content": "@config.summary",
3014
+ "type": "typography",
3015
+ "variant": "body2"
3016
+ }
3017
+ ]
3018
+ ],
3019
+ "direction": "vertical",
3020
+ "gap": "xs",
3021
+ "type": "stack"
3022
+ },
3023
+ {
3024
+ "label": [
3025
+ "if",
3026
+ "@entity.solved",
3027
+ "Solved",
3028
+ [
3029
+ "if",
3030
+ [
3031
+ ">",
3032
+ "@entity.attempts",
3033
+ 0.0
3034
+ ],
3035
+ "Try again",
3036
+ "Tuning"
3037
+ ]
3038
+ ],
3039
+ "type": "badge",
3040
+ "variant": [
3041
+ "if",
3042
+ "@entity.solved",
3043
+ "success",
3044
+ [
3045
+ "if",
3046
+ [
3047
+ ">",
3048
+ "@entity.attempts",
3049
+ 0.0
3050
+ ],
3051
+ "warning",
3052
+ "neutral"
3053
+ ]
3054
+ ]
3055
+ }
3056
+ ],
3057
+ "direction": "horizontal",
3058
+ "gap": "md",
3059
+ "justify": "between",
3060
+ "type": "stack"
3061
+ },
3062
+ {
3063
+ "align": "center",
3064
+ "children": [
3065
+ {
3066
+ "action": "CHECK",
3067
+ "disabled": [
3068
+ "if",
3069
+ "@entity.solved",
3070
+ true,
3071
+ false
3072
+ ],
3073
+ "icon": "check",
3074
+ "label": "@config.checkLabel",
3075
+ "type": "button",
3076
+ "variant": "primary"
3077
+ },
3078
+ {
3079
+ "action": "RESET",
3080
+ "icon": "rotate-ccw",
3081
+ "label": "Reset",
3082
+ "type": "button",
3083
+ "variant": "ghost"
3084
+ },
3085
+ {
3086
+ "color": "muted",
3087
+ "content": [
3088
+ "if",
3089
+ "@config.showLiveDistance",
3090
+ [
3091
+ "str/concat",
3092
+ "Distance from target: ",
3093
+ [
3094
+ "math/round",
3095
+ "@entity.distance",
3096
+ 3.0
3097
+ ],
3098
+ " · attempts: ",
3099
+ [
3100
+ "str/concat",
3101
+ "",
3102
+ "@entity.attempts"
3103
+ ]
3104
+ ],
3105
+ [
3106
+ "str/concat",
3107
+ "Attempts: ",
3108
+ [
3109
+ "str/concat",
3110
+ "",
3111
+ "@entity.attempts"
3112
+ ]
3113
+ ]
3114
+ ],
3115
+ "type": "typography",
3116
+ "variant": "caption"
3117
+ }
3118
+ ],
3119
+ "direction": "horizontal",
3120
+ "gap": "sm",
3121
+ "type": "stack",
3122
+ "wrap": true
3123
+ },
3124
+ {
3125
+ "animate": false,
3126
+ "curves": "@entity.curves",
3127
+ "gridStep": "@config.gridStep",
3128
+ "height": "@config.height",
3129
+ "interactive": false,
3130
+ "keyMap": {
3131
+ "KeyR": "RESET",
3132
+ "Space": "CHECK"
3133
+ },
3134
+ "points": [],
3135
+ "shapes": [],
3136
+ "showAxes": "@config.showAxes",
3137
+ "showGrid": "@config.showGrid",
3138
+ "title": "",
3139
+ "type": "math-canvas",
3140
+ "vectors": [],
3141
+ "width": "@config.width",
3142
+ "xMax": "@config.xMax",
3143
+ "xMin": "@config.xMin",
3144
+ "yMax": "@entity.yMax",
3145
+ "yMin": "@entity.yMin"
3146
+ },
3147
+ {
3148
+ "children": [
3149
+ {
3150
+ "children": [
3151
+ {
3152
+ "content": [
3153
+ "str/concat",
3154
+ "@entity.paramALabel",
3155
+ ": ",
3156
+ [
3157
+ "math/round",
3158
+ "@entity.paramA",
3159
+ 2.0
3160
+ ]
3161
+ ],
3162
+ "type": "typography",
3163
+ "variant": "caption"
3164
+ },
3165
+ {
3166
+ "action": "SET_PARAM_A",
3167
+ "max": "@config.paramAMax",
3168
+ "min": "@config.paramAMin",
3169
+ "showTooltip": true,
3170
+ "step": "@config.paramAStep",
3171
+ "type": "range-slider",
3172
+ "value": "@entity.paramA"
3173
+ }
3174
+ ],
3175
+ "direction": "vertical",
3176
+ "gap": "xs",
3177
+ "type": "stack"
3178
+ },
3179
+ {
3180
+ "children": [
3181
+ {
3182
+ "content": [
3183
+ "str/concat",
3184
+ "@entity.paramBLabel",
3185
+ ": ",
3186
+ [
3187
+ "math/round",
3188
+ "@entity.paramB",
3189
+ 2.0
3190
+ ]
3191
+ ],
3192
+ "type": "typography",
3193
+ "variant": "caption"
3194
+ },
3195
+ {
3196
+ "action": "SET_PARAM_B",
3197
+ "max": "@config.paramBMax",
3198
+ "min": "@config.paramBMin",
3199
+ "showTooltip": true,
3200
+ "step": "@config.paramBStep",
3201
+ "type": "range-slider",
3202
+ "value": "@entity.paramB"
3203
+ }
3204
+ ],
3205
+ "direction": "vertical",
3206
+ "gap": "xs",
3207
+ "type": "stack"
3208
+ }
3209
+ ],
3210
+ "direction": "vertical",
3211
+ "gap": "sm",
3212
+ "type": "stack"
3213
+ },
3214
+ {
3215
+ "content": "@entity.goalText",
3216
+ "type": "typography",
3217
+ "variant": "body"
3218
+ },
3219
+ {
3220
+ "color": "muted",
3221
+ "content": "@entity.feedback",
3222
+ "type": "typography",
3223
+ "variant": "caption"
3224
+ }
3225
+ ],
3226
+ "direction": "vertical",
3227
+ "gap": "md",
3228
+ "type": "stack"
3229
+ }
3230
+ ],
3231
+ "padding": "md",
3232
+ "type": "box"
3233
+ }
3234
+ ]
3235
+ ],
3236
+ "event": "ROSTER_LOADED",
3237
+ "eventId": "evt_01M459XDGMG0ZW5KN8VP84RT82",
3238
+ "from": "idle",
3239
+ "guard": [
3240
+ "and",
3241
+ [
3242
+ "==",
3243
+ "@config.rosterSource",
3244
+ "event"
3245
+ ],
3246
+ [
3247
+ "and",
3248
+ [
3249
+ "==",
3250
+ "@payload.mode",
3251
+ "@config.matchMode"
3252
+ ],
3253
+ [
3254
+ "!=",
3255
+ "@payload.curveKind",
3256
+ ""
3257
+ ]
3258
+ ]
3259
+ ],
3260
+ "to": "idle"
3261
+ },
3262
+ {
3263
+ "effects": [
3264
+ [
3265
+ "set",
3266
+ "@entity.active",
3267
+ false
3268
+ ],
3269
+ [
3270
+ "render-ui",
3271
+ "main",
3272
+ null
3273
+ ]
3274
+ ],
3275
+ "event": "ROSTER_LOADED",
3276
+ "eventId": "evt_01M459XDGMG0ZW5KN8VP84RT82",
3277
+ "from": "idle",
3278
+ "guard": [
3279
+ "and",
3280
+ [
3281
+ "==",
3282
+ "@config.rosterSource",
3283
+ "event"
3284
+ ],
3285
+ [
3286
+ "not",
3287
+ [
3288
+ "==",
3289
+ "@payload.mode",
3290
+ "@config.matchMode"
3291
+ ]
3292
+ ]
2352
3293
  ],
2353
3294
  "to": "idle"
2354
3295
  },
@@ -2926,7 +3867,7 @@
2926
3867
  "type": "stack"
2927
3868
  },
2928
3869
  {
2929
- "content": "@config.goalText",
3870
+ "content": "@entity.goalText",
2930
3871
  "type": "typography",
2931
3872
  "variant": "body"
2932
3873
  },
@@ -3548,7 +4489,7 @@
3548
4489
  "type": "stack"
3549
4490
  },
3550
4491
  {
3551
- "content": "@config.goalText",
4492
+ "content": "@entity.goalText",
3552
4493
  "type": "typography",
3553
4494
  "variant": "body"
3554
4495
  },
@@ -3920,7 +4861,7 @@
3920
4861
  "type": "stack"
3921
4862
  },
3922
4863
  {
3923
- "content": "@config.goalText",
4864
+ "content": "@entity.goalText",
3924
4865
  "type": "typography",
3925
4866
  "variant": "body"
3926
4867
  },
@@ -4570,7 +5511,7 @@
4570
5511
  "type": "stack"
4571
5512
  },
4572
5513
  {
4573
- "content": "@config.goalText",
5514
+ "content": "@entity.goalText",
4574
5515
  "type": "typography",
4575
5516
  "variant": "body"
4576
5517
  },