@almadar/std 3.12.2 → 3.13.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 (86) hide show
  1. package/behaviors/exports/atoms/std-agent-activity-log.orb +559 -0
  2. package/behaviors/exports/atoms/std-agent-chat-thread.orb +774 -0
  3. package/behaviors/exports/atoms/std-agent-classifier.orb +871 -0
  4. package/behaviors/exports/atoms/std-agent-completion.orb +933 -0
  5. package/behaviors/exports/atoms/std-agent-context-window.orb +2294 -0
  6. package/behaviors/exports/atoms/std-agent-conversation.orb +1020 -0
  7. package/behaviors/exports/atoms/std-agent-memory.orb +879 -0
  8. package/behaviors/exports/atoms/std-agent-provider.orb +898 -0
  9. package/behaviors/exports/atoms/std-agent-search.orb +448 -0
  10. package/behaviors/exports/atoms/std-agent-session.orb +835 -0
  11. package/behaviors/exports/atoms/std-agent-step-progress.orb +850 -0
  12. package/behaviors/exports/atoms/std-agent-token-gauge.orb +1616 -0
  13. package/behaviors/exports/atoms/std-agent-tool-call.orb +1237 -0
  14. package/behaviors/exports/molecules/std-agent-fix-loop.orb +3177 -0
  15. package/behaviors/exports/molecules/std-agent-learner.orb +2950 -0
  16. package/behaviors/exports/molecules/std-agent-planner.orb +2655 -0
  17. package/behaviors/exports/molecules/std-agent-rag.orb +1871 -0
  18. package/behaviors/exports/molecules/std-agent-tool-loop.orb +4857 -0
  19. package/behaviors/exports/organisms/std-agent-assistant.orb +6440 -0
  20. package/behaviors/exports/organisms/std-agent-builder.orb +14863 -0
  21. package/behaviors/exports/organisms/std-agent-pipeline.orb +11950 -0
  22. package/behaviors/exports/organisms/std-agent-reviewer.orb +5405 -0
  23. package/behaviors/exports/organisms/std-agent-tutor.orb +5107 -0
  24. package/behaviors/exports/validation-report.json +2 -1099
  25. package/dist/behaviors/exports/atoms/std-agent-activity-log.orb +559 -0
  26. package/dist/behaviors/exports/atoms/std-agent-chat-thread.orb +774 -0
  27. package/dist/behaviors/exports/atoms/std-agent-classifier.orb +871 -0
  28. package/dist/behaviors/exports/atoms/std-agent-completion.orb +933 -0
  29. package/dist/behaviors/exports/atoms/std-agent-context-window.orb +2294 -0
  30. package/dist/behaviors/exports/atoms/std-agent-conversation.orb +1020 -0
  31. package/dist/behaviors/exports/atoms/std-agent-memory.orb +879 -0
  32. package/dist/behaviors/exports/atoms/std-agent-provider.orb +898 -0
  33. package/dist/behaviors/exports/atoms/std-agent-search.orb +448 -0
  34. package/dist/behaviors/exports/atoms/std-agent-session.orb +835 -0
  35. package/dist/behaviors/exports/atoms/std-agent-step-progress.orb +850 -0
  36. package/dist/behaviors/exports/atoms/std-agent-token-gauge.orb +1616 -0
  37. package/dist/behaviors/exports/atoms/std-agent-tool-call.orb +1237 -0
  38. package/dist/behaviors/exports/molecules/std-agent-fix-loop.orb +3177 -0
  39. package/dist/behaviors/exports/molecules/std-agent-learner.orb +2950 -0
  40. package/dist/behaviors/exports/molecules/std-agent-planner.orb +2655 -0
  41. package/dist/behaviors/exports/molecules/std-agent-rag.orb +1871 -0
  42. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +4857 -0
  43. package/dist/behaviors/exports/organisms/std-agent-assistant.orb +6440 -0
  44. package/dist/behaviors/exports/organisms/std-agent-builder.orb +14863 -0
  45. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +11950 -0
  46. package/dist/behaviors/exports/organisms/std-agent-reviewer.orb +5405 -0
  47. package/dist/behaviors/exports/organisms/std-agent-tutor.orb +5107 -0
  48. package/dist/behaviors/exports/validation-report.json +2 -1099
  49. package/dist/behaviors/exports-reader.js +7156 -302
  50. package/dist/behaviors/exports-reader.js.map +1 -1
  51. package/dist/behaviors/functions/index.d.ts +781 -1
  52. package/dist/behaviors/functions/index.js +7080 -303
  53. package/dist/behaviors/functions/index.js.map +1 -1
  54. package/dist/behaviors/index.d.ts +1 -1
  55. package/dist/behaviors/index.js +7159 -305
  56. package/dist/behaviors/index.js.map +1 -1
  57. package/dist/behaviors/query.js +7158 -304
  58. package/dist/behaviors/query.js.map +1 -1
  59. package/dist/exports/atoms/std-agent-activity-log.orb +559 -0
  60. package/dist/exports/atoms/std-agent-chat-thread.orb +774 -0
  61. package/dist/exports/atoms/std-agent-classifier.orb +871 -0
  62. package/dist/exports/atoms/std-agent-completion.orb +933 -0
  63. package/dist/exports/atoms/std-agent-context-window.orb +2294 -0
  64. package/dist/exports/atoms/std-agent-conversation.orb +1020 -0
  65. package/dist/exports/atoms/std-agent-memory.orb +879 -0
  66. package/dist/exports/atoms/std-agent-provider.orb +898 -0
  67. package/dist/exports/atoms/std-agent-search.orb +448 -0
  68. package/dist/exports/atoms/std-agent-session.orb +835 -0
  69. package/dist/exports/atoms/std-agent-step-progress.orb +850 -0
  70. package/dist/exports/atoms/std-agent-token-gauge.orb +1616 -0
  71. package/dist/exports/atoms/std-agent-tool-call.orb +1237 -0
  72. package/dist/exports/molecules/std-agent-fix-loop.orb +3177 -0
  73. package/dist/exports/molecules/std-agent-learner.orb +2950 -0
  74. package/dist/exports/molecules/std-agent-planner.orb +2655 -0
  75. package/dist/exports/molecules/std-agent-rag.orb +1871 -0
  76. package/dist/exports/molecules/std-agent-tool-loop.orb +4857 -0
  77. package/dist/exports/organisms/std-agent-assistant.orb +6440 -0
  78. package/dist/exports/organisms/std-agent-builder.orb +14863 -0
  79. package/dist/exports/organisms/std-agent-pipeline.orb +11950 -0
  80. package/dist/exports/organisms/std-agent-reviewer.orb +5405 -0
  81. package/dist/exports/organisms/std-agent-tutor.orb +5107 -0
  82. package/dist/exports/validation-report.json +2 -1099
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.js +7159 -305
  85. package/dist/index.js.map +1 -1
  86. package/package.json +1 -1
@@ -0,0 +1,2950 @@
1
+ {
2
+ "name": "AgentLearnerOrbital",
3
+ "orbitals": [
4
+ {
5
+ "name": "AgentLearnerOrbital",
6
+ "entity": {
7
+ "name": "AgentLearner",
8
+ "persistence": "runtime",
9
+ "fields": [
10
+ {
11
+ "name": "id",
12
+ "type": "string"
13
+ },
14
+ {
15
+ "name": "name",
16
+ "type": "string"
17
+ },
18
+ {
19
+ "name": "description",
20
+ "type": "string"
21
+ },
22
+ {
23
+ "name": "status",
24
+ "type": "string",
25
+ "default": "active",
26
+ "values": [
27
+ "active",
28
+ "inactive",
29
+ "pending"
30
+ ]
31
+ },
32
+ {
33
+ "name": "createdAt",
34
+ "type": "string"
35
+ },
36
+ {
37
+ "name": "outcome",
38
+ "type": "string",
39
+ "default": ""
40
+ },
41
+ {
42
+ "name": "category",
43
+ "type": "string",
44
+ "default": ""
45
+ },
46
+ {
47
+ "name": "impact",
48
+ "type": "string",
49
+ "default": ""
50
+ },
51
+ {
52
+ "name": "memoryId",
53
+ "type": "string",
54
+ "default": ""
55
+ },
56
+ {
57
+ "name": "isSuccess",
58
+ "type": "boolean",
59
+ "default": false
60
+ },
61
+ {
62
+ "name": "provider",
63
+ "type": "string",
64
+ "default": ""
65
+ },
66
+ {
67
+ "name": "consecutiveFailures",
68
+ "type": "number",
69
+ "default": 0
70
+ },
71
+ {
72
+ "name": "totalSuccesses",
73
+ "type": "number",
74
+ "default": 0
75
+ },
76
+ {
77
+ "name": "totalFailures",
78
+ "type": "number",
79
+ "default": 0
80
+ },
81
+ {
82
+ "name": "error",
83
+ "type": "string",
84
+ "default": ""
85
+ },
86
+ {
87
+ "name": "content",
88
+ "type": "string",
89
+ "default": ""
90
+ },
91
+ {
92
+ "name": "scope",
93
+ "type": "string",
94
+ "default": ""
95
+ },
96
+ {
97
+ "name": "strength",
98
+ "type": "number",
99
+ "default": 1
100
+ },
101
+ {
102
+ "name": "pinned",
103
+ "type": "boolean",
104
+ "default": false
105
+ },
106
+ {
107
+ "name": "prompt",
108
+ "type": "string",
109
+ "default": ""
110
+ },
111
+ {
112
+ "name": "response",
113
+ "type": "string",
114
+ "default": ""
115
+ },
116
+ {
117
+ "name": "model",
118
+ "type": "string",
119
+ "default": "claude-sonnet-4-20250514"
120
+ },
121
+ {
122
+ "name": "currentProvider",
123
+ "type": "string",
124
+ "default": "anthropic"
125
+ },
126
+ {
127
+ "name": "currentModel",
128
+ "type": "string",
129
+ "default": "claude-sonnet-4-20250514"
130
+ },
131
+ {
132
+ "name": "fallbackProvider",
133
+ "type": "string",
134
+ "default": "anthropic"
135
+ },
136
+ {
137
+ "name": "requestCount",
138
+ "type": "number",
139
+ "default": 0
140
+ },
141
+ {
142
+ "name": "action",
143
+ "type": "string",
144
+ "default": ""
145
+ },
146
+ {
147
+ "name": "detail",
148
+ "type": "string",
149
+ "default": ""
150
+ },
151
+ {
152
+ "name": "timestamp",
153
+ "type": "string",
154
+ "default": ""
155
+ },
156
+ {
157
+ "name": "duration",
158
+ "type": "number",
159
+ "default": 0
160
+ }
161
+ ]
162
+ },
163
+ "traits": [
164
+ {
165
+ "name": "AgentLearnerLearner",
166
+ "linkedEntity": "AgentLearner",
167
+ "category": "interaction",
168
+ "emits": [
169
+ {
170
+ "event": "TASK_SUCCEEDED",
171
+ "scope": "external",
172
+ "payload": [
173
+ {
174
+ "name": "outcome",
175
+ "type": "string"
176
+ },
177
+ {
178
+ "name": "category",
179
+ "type": "string"
180
+ }
181
+ ]
182
+ },
183
+ {
184
+ "event": "TASK_FAILED",
185
+ "scope": "external",
186
+ "payload": [
187
+ {
188
+ "name": "outcome",
189
+ "type": "string"
190
+ },
191
+ {
192
+ "name": "category",
193
+ "type": "string"
194
+ }
195
+ ]
196
+ }
197
+ ],
198
+ "listens": [
199
+ {
200
+ "event": "TASK_SUCCEEDED",
201
+ "triggers": "TASK_SUCCEEDED",
202
+ "scope": "external"
203
+ },
204
+ {
205
+ "event": "TASK_FAILED",
206
+ "triggers": "TASK_FAILED",
207
+ "scope": "external"
208
+ }
209
+ ],
210
+ "stateMachine": {
211
+ "states": [
212
+ {
213
+ "name": "idle",
214
+ "isInitial": true
215
+ },
216
+ {
217
+ "name": "recording"
218
+ },
219
+ {
220
+ "name": "analyzing"
221
+ }
222
+ ],
223
+ "events": [
224
+ {
225
+ "key": "INIT",
226
+ "name": "Initialize"
227
+ },
228
+ {
229
+ "key": "TASK_SUCCEEDED",
230
+ "name": "Task Succeeded",
231
+ "payload": [
232
+ {
233
+ "name": "outcome",
234
+ "type": "string",
235
+ "required": true
236
+ },
237
+ {
238
+ "name": "category",
239
+ "type": "string",
240
+ "required": true
241
+ }
242
+ ]
243
+ },
244
+ {
245
+ "key": "TASK_FAILED",
246
+ "name": "Task Failed",
247
+ "payload": [
248
+ {
249
+ "name": "outcome",
250
+ "type": "string",
251
+ "required": true
252
+ },
253
+ {
254
+ "name": "category",
255
+ "type": "string",
256
+ "required": true
257
+ }
258
+ ]
259
+ },
260
+ {
261
+ "key": "RECORDED",
262
+ "name": "Memory Recorded",
263
+ "payload": [
264
+ {
265
+ "name": "memoryId",
266
+ "type": "string",
267
+ "required": true
268
+ }
269
+ ]
270
+ },
271
+ {
272
+ "key": "ANALYSIS_DONE",
273
+ "name": "Analysis Done",
274
+ "payload": [
275
+ {
276
+ "name": "impact",
277
+ "type": "string",
278
+ "required": true
279
+ }
280
+ ]
281
+ },
282
+ {
283
+ "key": "FAILED",
284
+ "name": "Processing Failed",
285
+ "payload": [
286
+ {
287
+ "name": "error",
288
+ "type": "string",
289
+ "required": true
290
+ }
291
+ ]
292
+ },
293
+ {
294
+ "key": "RESET",
295
+ "name": "Reset View"
296
+ }
297
+ ],
298
+ "transitions": [
299
+ {
300
+ "from": "idle",
301
+ "to": "idle",
302
+ "event": "INIT",
303
+ "effects": [
304
+ [
305
+ "set",
306
+ "@entity.provider",
307
+ [
308
+ "agent/provider"
309
+ ]
310
+ ],
311
+ [
312
+ "render-ui",
313
+ "main",
314
+ {
315
+ "type": "stack",
316
+ "direction": "vertical",
317
+ "gap": "lg",
318
+ "children": [
319
+ {
320
+ "type": "stack",
321
+ "direction": "horizontal",
322
+ "gap": "sm",
323
+ "align": "center",
324
+ "children": [
325
+ {
326
+ "type": "icon",
327
+ "name": "graduation-cap",
328
+ "size": "lg"
329
+ },
330
+ {
331
+ "type": "typography",
332
+ "content": "Outcome Learner",
333
+ "variant": "h2"
334
+ }
335
+ ]
336
+ },
337
+ {
338
+ "type": "divider"
339
+ },
340
+ {
341
+ "type": "simple-grid",
342
+ "columns": 3,
343
+ "children": [
344
+ {
345
+ "type": "stat-display",
346
+ "label": "Successes",
347
+ "value": "@entity.totalSuccesses",
348
+ "icon": "check-circle"
349
+ },
350
+ {
351
+ "type": "stat-display",
352
+ "label": "Failures",
353
+ "value": "@entity.totalFailures",
354
+ "icon": "x-circle"
355
+ },
356
+ {
357
+ "type": "stat-display",
358
+ "label": "Current Provider",
359
+ "value": "@entity.provider",
360
+ "icon": "cpu"
361
+ }
362
+ ]
363
+ },
364
+ {
365
+ "type": "divider"
366
+ },
367
+ {
368
+ "type": "card",
369
+ "children": [
370
+ {
371
+ "type": "stack",
372
+ "direction": "vertical",
373
+ "gap": "md",
374
+ "children": [
375
+ {
376
+ "type": "typography",
377
+ "content": "Listening for task outcomes...",
378
+ "variant": "body"
379
+ },
380
+ {
381
+ "type": "typography",
382
+ "content": "This module records TASK_SUCCEEDED and TASK_FAILED events automatically.",
383
+ "variant": "caption"
384
+ }
385
+ ]
386
+ }
387
+ ]
388
+ },
389
+ {
390
+ "type": "card",
391
+ "children": [
392
+ {
393
+ "type": "stack",
394
+ "direction": "vertical",
395
+ "gap": "sm",
396
+ "children": [
397
+ {
398
+ "type": "typography",
399
+ "content": "Last Outcome",
400
+ "variant": "caption"
401
+ },
402
+ {
403
+ "type": "typography",
404
+ "content": "@entity.outcome",
405
+ "variant": "body"
406
+ },
407
+ {
408
+ "type": "typography",
409
+ "content": "Impact Analysis",
410
+ "variant": "caption"
411
+ },
412
+ {
413
+ "type": "typography",
414
+ "content": "@entity.impact",
415
+ "variant": "body"
416
+ }
417
+ ]
418
+ }
419
+ ]
420
+ }
421
+ ]
422
+ }
423
+ ]
424
+ ]
425
+ },
426
+ {
427
+ "from": "idle",
428
+ "to": "recording",
429
+ "event": "TASK_SUCCEEDED",
430
+ "effects": [
431
+ [
432
+ "set",
433
+ "@entity.outcome",
434
+ "@payload.outcome"
435
+ ],
436
+ [
437
+ "set",
438
+ "@entity.category",
439
+ "@payload.category"
440
+ ],
441
+ [
442
+ "set",
443
+ "@entity.isSuccess",
444
+ true
445
+ ],
446
+ [
447
+ "set",
448
+ "@entity.consecutiveFailures",
449
+ 0
450
+ ],
451
+ [
452
+ "set",
453
+ "@entity.totalSuccesses",
454
+ [
455
+ "+",
456
+ "@entity.totalSuccesses",
457
+ 1
458
+ ]
459
+ ],
460
+ [
461
+ "set",
462
+ "@entity.status",
463
+ "recording"
464
+ ],
465
+ [
466
+ "agent/memorize",
467
+ [
468
+ "str/concat",
469
+ "Success: ",
470
+ "@payload.outcome"
471
+ ],
472
+ "@payload.category"
473
+ ],
474
+ [
475
+ "render-ui",
476
+ "main",
477
+ {
478
+ "type": "stack",
479
+ "direction": "vertical",
480
+ "gap": "lg",
481
+ "align": "center",
482
+ "children": [
483
+ {
484
+ "type": "icon",
485
+ "name": "save",
486
+ "size": "lg"
487
+ },
488
+ {
489
+ "type": "typography",
490
+ "content": "Recording outcome...",
491
+ "variant": "h3"
492
+ },
493
+ {
494
+ "type": "spinner",
495
+ "size": "lg"
496
+ },
497
+ {
498
+ "type": "badge",
499
+ "label": "@entity.outcome"
500
+ }
501
+ ]
502
+ }
503
+ ]
504
+ ]
505
+ },
506
+ {
507
+ "from": "idle",
508
+ "to": "recording",
509
+ "event": "TASK_FAILED",
510
+ "effects": [
511
+ [
512
+ "set",
513
+ "@entity.outcome",
514
+ "@payload.outcome"
515
+ ],
516
+ [
517
+ "set",
518
+ "@entity.category",
519
+ "@payload.category"
520
+ ],
521
+ [
522
+ "set",
523
+ "@entity.isSuccess",
524
+ false
525
+ ],
526
+ [
527
+ "set",
528
+ "@entity.consecutiveFailures",
529
+ [
530
+ "+",
531
+ "@entity.consecutiveFailures",
532
+ 1
533
+ ]
534
+ ],
535
+ [
536
+ "set",
537
+ "@entity.totalFailures",
538
+ [
539
+ "+",
540
+ "@entity.totalFailures",
541
+ 1
542
+ ]
543
+ ],
544
+ [
545
+ "set",
546
+ "@entity.status",
547
+ "recording"
548
+ ],
549
+ [
550
+ "agent/memorize",
551
+ [
552
+ "str/concat",
553
+ "Failure: ",
554
+ "@payload.outcome"
555
+ ],
556
+ "@payload.category"
557
+ ],
558
+ [
559
+ "render-ui",
560
+ "main",
561
+ {
562
+ "type": "stack",
563
+ "direction": "vertical",
564
+ "gap": "lg",
565
+ "align": "center",
566
+ "children": [
567
+ {
568
+ "type": "icon",
569
+ "name": "save",
570
+ "size": "lg"
571
+ },
572
+ {
573
+ "type": "typography",
574
+ "content": "Recording outcome...",
575
+ "variant": "h3"
576
+ },
577
+ {
578
+ "type": "spinner",
579
+ "size": "lg"
580
+ },
581
+ {
582
+ "type": "badge",
583
+ "label": "@entity.outcome"
584
+ }
585
+ ]
586
+ }
587
+ ]
588
+ ]
589
+ },
590
+ {
591
+ "from": "recording",
592
+ "to": "analyzing",
593
+ "event": "RECORDED",
594
+ "effects": [
595
+ [
596
+ "set",
597
+ "@entity.memoryId",
598
+ "@payload.memoryId"
599
+ ],
600
+ [
601
+ "if",
602
+ "@entity.isSuccess",
603
+ [
604
+ "agent/reinforce",
605
+ "@payload.memoryId"
606
+ ],
607
+ [
608
+ "agent/decay"
609
+ ]
610
+ ],
611
+ [
612
+ "if",
613
+ [
614
+ ">=",
615
+ "@entity.consecutiveFailures",
616
+ 3
617
+ ],
618
+ [
619
+ "agent/switch-provider",
620
+ "anthropic"
621
+ ],
622
+ [
623
+ "log",
624
+ "No provider switch needed"
625
+ ]
626
+ ],
627
+ [
628
+ "set",
629
+ "@entity.status",
630
+ "analyzing"
631
+ ],
632
+ [
633
+ "agent/generate",
634
+ [
635
+ "str/concat",
636
+ "Outcome: ",
637
+ "@entity.outcome",
638
+ "\n",
639
+ "Category: ",
640
+ "@entity.category",
641
+ "\n",
642
+ "Result: ",
643
+ [
644
+ "if",
645
+ "@entity.isSuccess",
646
+ "success",
647
+ "failure"
648
+ ],
649
+ "\n",
650
+ "Consecutive failures: ",
651
+ [
652
+ "str/concat",
653
+ "@entity.consecutiveFailures"
654
+ ],
655
+ "\n\n",
656
+ "Analyze the impact of this outcome. What should be learned? Keep it to 1-2 sentences."
657
+ ]
658
+ ],
659
+ [
660
+ "render-ui",
661
+ "main",
662
+ {
663
+ "type": "stack",
664
+ "direction": "vertical",
665
+ "gap": "lg",
666
+ "align": "center",
667
+ "children": [
668
+ {
669
+ "type": "icon",
670
+ "name": "cpu",
671
+ "size": "lg"
672
+ },
673
+ {
674
+ "type": "typography",
675
+ "content": "Analyzing impact...",
676
+ "variant": "h3"
677
+ },
678
+ {
679
+ "type": "spinner",
680
+ "size": "lg"
681
+ },
682
+ {
683
+ "type": "stack",
684
+ "direction": "horizontal",
685
+ "gap": "md",
686
+ "justify": "center",
687
+ "children": [
688
+ {
689
+ "type": "badge",
690
+ "label": [
691
+ "str/concat",
692
+ "Category: ",
693
+ "@entity.category"
694
+ ]
695
+ },
696
+ {
697
+ "type": "badge",
698
+ "label": [
699
+ "if",
700
+ "@entity.isSuccess",
701
+ "Success",
702
+ "Failure"
703
+ ]
704
+ }
705
+ ]
706
+ }
707
+ ]
708
+ }
709
+ ]
710
+ ]
711
+ },
712
+ {
713
+ "from": "analyzing",
714
+ "to": "idle",
715
+ "event": "ANALYSIS_DONE",
716
+ "effects": [
717
+ [
718
+ "set",
719
+ "@entity.impact",
720
+ "@payload.impact"
721
+ ],
722
+ [
723
+ "set",
724
+ "@entity.status",
725
+ "idle"
726
+ ],
727
+ [
728
+ "set",
729
+ "@entity.provider",
730
+ [
731
+ "agent/provider"
732
+ ]
733
+ ],
734
+ [
735
+ "render-ui",
736
+ "main",
737
+ {
738
+ "type": "stack",
739
+ "direction": "vertical",
740
+ "gap": "lg",
741
+ "children": [
742
+ {
743
+ "type": "stack",
744
+ "direction": "horizontal",
745
+ "gap": "sm",
746
+ "align": "center",
747
+ "children": [
748
+ {
749
+ "type": "icon",
750
+ "name": "graduation-cap",
751
+ "size": "lg"
752
+ },
753
+ {
754
+ "type": "typography",
755
+ "content": "Outcome Learner",
756
+ "variant": "h2"
757
+ }
758
+ ]
759
+ },
760
+ {
761
+ "type": "divider"
762
+ },
763
+ {
764
+ "type": "simple-grid",
765
+ "columns": 3,
766
+ "children": [
767
+ {
768
+ "type": "stat-display",
769
+ "label": "Successes",
770
+ "value": "@entity.totalSuccesses",
771
+ "icon": "check-circle"
772
+ },
773
+ {
774
+ "type": "stat-display",
775
+ "label": "Failures",
776
+ "value": "@entity.totalFailures",
777
+ "icon": "x-circle"
778
+ },
779
+ {
780
+ "type": "stat-display",
781
+ "label": "Current Provider",
782
+ "value": "@entity.provider",
783
+ "icon": "cpu"
784
+ }
785
+ ]
786
+ },
787
+ {
788
+ "type": "divider"
789
+ },
790
+ {
791
+ "type": "card",
792
+ "children": [
793
+ {
794
+ "type": "stack",
795
+ "direction": "vertical",
796
+ "gap": "md",
797
+ "children": [
798
+ {
799
+ "type": "typography",
800
+ "content": "Listening for task outcomes...",
801
+ "variant": "body"
802
+ },
803
+ {
804
+ "type": "typography",
805
+ "content": "This module records TASK_SUCCEEDED and TASK_FAILED events automatically.",
806
+ "variant": "caption"
807
+ }
808
+ ]
809
+ }
810
+ ]
811
+ },
812
+ {
813
+ "type": "card",
814
+ "children": [
815
+ {
816
+ "type": "stack",
817
+ "direction": "vertical",
818
+ "gap": "sm",
819
+ "children": [
820
+ {
821
+ "type": "typography",
822
+ "content": "Last Outcome",
823
+ "variant": "caption"
824
+ },
825
+ {
826
+ "type": "typography",
827
+ "content": "@entity.outcome",
828
+ "variant": "body"
829
+ },
830
+ {
831
+ "type": "typography",
832
+ "content": "Impact Analysis",
833
+ "variant": "caption"
834
+ },
835
+ {
836
+ "type": "typography",
837
+ "content": "@entity.impact",
838
+ "variant": "body"
839
+ }
840
+ ]
841
+ }
842
+ ]
843
+ }
844
+ ]
845
+ }
846
+ ]
847
+ ]
848
+ },
849
+ {
850
+ "from": "recording",
851
+ "to": "idle",
852
+ "event": "FAILED",
853
+ "effects": [
854
+ [
855
+ "set",
856
+ "@entity.error",
857
+ "@payload.error"
858
+ ],
859
+ [
860
+ "set",
861
+ "@entity.status",
862
+ "idle"
863
+ ],
864
+ [
865
+ "render-ui",
866
+ "main",
867
+ {
868
+ "type": "stack",
869
+ "direction": "vertical",
870
+ "gap": "lg",
871
+ "children": [
872
+ {
873
+ "type": "stack",
874
+ "direction": "horizontal",
875
+ "gap": "sm",
876
+ "align": "center",
877
+ "children": [
878
+ {
879
+ "type": "icon",
880
+ "name": "graduation-cap",
881
+ "size": "lg"
882
+ },
883
+ {
884
+ "type": "typography",
885
+ "content": "Outcome Learner",
886
+ "variant": "h2"
887
+ }
888
+ ]
889
+ },
890
+ {
891
+ "type": "divider"
892
+ },
893
+ {
894
+ "type": "simple-grid",
895
+ "columns": 3,
896
+ "children": [
897
+ {
898
+ "type": "stat-display",
899
+ "label": "Successes",
900
+ "value": "@entity.totalSuccesses",
901
+ "icon": "check-circle"
902
+ },
903
+ {
904
+ "type": "stat-display",
905
+ "label": "Failures",
906
+ "value": "@entity.totalFailures",
907
+ "icon": "x-circle"
908
+ },
909
+ {
910
+ "type": "stat-display",
911
+ "label": "Current Provider",
912
+ "value": "@entity.provider",
913
+ "icon": "cpu"
914
+ }
915
+ ]
916
+ },
917
+ {
918
+ "type": "divider"
919
+ },
920
+ {
921
+ "type": "card",
922
+ "children": [
923
+ {
924
+ "type": "stack",
925
+ "direction": "vertical",
926
+ "gap": "md",
927
+ "children": [
928
+ {
929
+ "type": "typography",
930
+ "content": "Listening for task outcomes...",
931
+ "variant": "body"
932
+ },
933
+ {
934
+ "type": "typography",
935
+ "content": "This module records TASK_SUCCEEDED and TASK_FAILED events automatically.",
936
+ "variant": "caption"
937
+ }
938
+ ]
939
+ }
940
+ ]
941
+ },
942
+ {
943
+ "type": "card",
944
+ "children": [
945
+ {
946
+ "type": "stack",
947
+ "direction": "vertical",
948
+ "gap": "sm",
949
+ "children": [
950
+ {
951
+ "type": "typography",
952
+ "content": "Last Outcome",
953
+ "variant": "caption"
954
+ },
955
+ {
956
+ "type": "typography",
957
+ "content": "@entity.outcome",
958
+ "variant": "body"
959
+ },
960
+ {
961
+ "type": "typography",
962
+ "content": "Impact Analysis",
963
+ "variant": "caption"
964
+ },
965
+ {
966
+ "type": "typography",
967
+ "content": "@entity.impact",
968
+ "variant": "body"
969
+ }
970
+ ]
971
+ }
972
+ ]
973
+ }
974
+ ]
975
+ }
976
+ ]
977
+ ]
978
+ },
979
+ {
980
+ "from": "analyzing",
981
+ "to": "idle",
982
+ "event": "FAILED",
983
+ "effects": [
984
+ [
985
+ "set",
986
+ "@entity.error",
987
+ "@payload.error"
988
+ ],
989
+ [
990
+ "set",
991
+ "@entity.status",
992
+ "idle"
993
+ ],
994
+ [
995
+ "render-ui",
996
+ "main",
997
+ {
998
+ "type": "stack",
999
+ "direction": "vertical",
1000
+ "gap": "lg",
1001
+ "children": [
1002
+ {
1003
+ "type": "stack",
1004
+ "direction": "horizontal",
1005
+ "gap": "sm",
1006
+ "align": "center",
1007
+ "children": [
1008
+ {
1009
+ "type": "icon",
1010
+ "name": "graduation-cap",
1011
+ "size": "lg"
1012
+ },
1013
+ {
1014
+ "type": "typography",
1015
+ "content": "Outcome Learner",
1016
+ "variant": "h2"
1017
+ }
1018
+ ]
1019
+ },
1020
+ {
1021
+ "type": "divider"
1022
+ },
1023
+ {
1024
+ "type": "simple-grid",
1025
+ "columns": 3,
1026
+ "children": [
1027
+ {
1028
+ "type": "stat-display",
1029
+ "label": "Successes",
1030
+ "value": "@entity.totalSuccesses",
1031
+ "icon": "check-circle"
1032
+ },
1033
+ {
1034
+ "type": "stat-display",
1035
+ "label": "Failures",
1036
+ "value": "@entity.totalFailures",
1037
+ "icon": "x-circle"
1038
+ },
1039
+ {
1040
+ "type": "stat-display",
1041
+ "label": "Current Provider",
1042
+ "value": "@entity.provider",
1043
+ "icon": "cpu"
1044
+ }
1045
+ ]
1046
+ },
1047
+ {
1048
+ "type": "divider"
1049
+ },
1050
+ {
1051
+ "type": "card",
1052
+ "children": [
1053
+ {
1054
+ "type": "stack",
1055
+ "direction": "vertical",
1056
+ "gap": "md",
1057
+ "children": [
1058
+ {
1059
+ "type": "typography",
1060
+ "content": "Listening for task outcomes...",
1061
+ "variant": "body"
1062
+ },
1063
+ {
1064
+ "type": "typography",
1065
+ "content": "This module records TASK_SUCCEEDED and TASK_FAILED events automatically.",
1066
+ "variant": "caption"
1067
+ }
1068
+ ]
1069
+ }
1070
+ ]
1071
+ },
1072
+ {
1073
+ "type": "card",
1074
+ "children": [
1075
+ {
1076
+ "type": "stack",
1077
+ "direction": "vertical",
1078
+ "gap": "sm",
1079
+ "children": [
1080
+ {
1081
+ "type": "typography",
1082
+ "content": "Last Outcome",
1083
+ "variant": "caption"
1084
+ },
1085
+ {
1086
+ "type": "typography",
1087
+ "content": "@entity.outcome",
1088
+ "variant": "body"
1089
+ },
1090
+ {
1091
+ "type": "typography",
1092
+ "content": "Impact Analysis",
1093
+ "variant": "caption"
1094
+ },
1095
+ {
1096
+ "type": "typography",
1097
+ "content": "@entity.impact",
1098
+ "variant": "body"
1099
+ }
1100
+ ]
1101
+ }
1102
+ ]
1103
+ }
1104
+ ]
1105
+ }
1106
+ ]
1107
+ ]
1108
+ },
1109
+ {
1110
+ "from": "idle",
1111
+ "to": "idle",
1112
+ "event": "RESET",
1113
+ "effects": [
1114
+ [
1115
+ "set",
1116
+ "@entity.provider",
1117
+ [
1118
+ "agent/provider"
1119
+ ]
1120
+ ],
1121
+ [
1122
+ "render-ui",
1123
+ "main",
1124
+ {
1125
+ "type": "stack",
1126
+ "direction": "vertical",
1127
+ "gap": "lg",
1128
+ "children": [
1129
+ {
1130
+ "type": "stack",
1131
+ "direction": "horizontal",
1132
+ "gap": "sm",
1133
+ "align": "center",
1134
+ "children": [
1135
+ {
1136
+ "type": "icon",
1137
+ "name": "graduation-cap",
1138
+ "size": "lg"
1139
+ },
1140
+ {
1141
+ "type": "typography",
1142
+ "content": "Outcome Learner",
1143
+ "variant": "h2"
1144
+ }
1145
+ ]
1146
+ },
1147
+ {
1148
+ "type": "divider"
1149
+ },
1150
+ {
1151
+ "type": "simple-grid",
1152
+ "columns": 3,
1153
+ "children": [
1154
+ {
1155
+ "type": "stat-display",
1156
+ "label": "Successes",
1157
+ "value": "@entity.totalSuccesses",
1158
+ "icon": "check-circle"
1159
+ },
1160
+ {
1161
+ "type": "stat-display",
1162
+ "label": "Failures",
1163
+ "value": "@entity.totalFailures",
1164
+ "icon": "x-circle"
1165
+ },
1166
+ {
1167
+ "type": "stat-display",
1168
+ "label": "Current Provider",
1169
+ "value": "@entity.provider",
1170
+ "icon": "cpu"
1171
+ }
1172
+ ]
1173
+ },
1174
+ {
1175
+ "type": "divider"
1176
+ },
1177
+ {
1178
+ "type": "card",
1179
+ "children": [
1180
+ {
1181
+ "type": "stack",
1182
+ "direction": "vertical",
1183
+ "gap": "md",
1184
+ "children": [
1185
+ {
1186
+ "type": "typography",
1187
+ "content": "Listening for task outcomes...",
1188
+ "variant": "body"
1189
+ },
1190
+ {
1191
+ "type": "typography",
1192
+ "content": "This module records TASK_SUCCEEDED and TASK_FAILED events automatically.",
1193
+ "variant": "caption"
1194
+ }
1195
+ ]
1196
+ }
1197
+ ]
1198
+ },
1199
+ {
1200
+ "type": "card",
1201
+ "children": [
1202
+ {
1203
+ "type": "stack",
1204
+ "direction": "vertical",
1205
+ "gap": "sm",
1206
+ "children": [
1207
+ {
1208
+ "type": "typography",
1209
+ "content": "Last Outcome",
1210
+ "variant": "caption"
1211
+ },
1212
+ {
1213
+ "type": "typography",
1214
+ "content": "@entity.outcome",
1215
+ "variant": "body"
1216
+ },
1217
+ {
1218
+ "type": "typography",
1219
+ "content": "Impact Analysis",
1220
+ "variant": "caption"
1221
+ },
1222
+ {
1223
+ "type": "typography",
1224
+ "content": "@entity.impact",
1225
+ "variant": "body"
1226
+ }
1227
+ ]
1228
+ }
1229
+ ]
1230
+ }
1231
+ ]
1232
+ }
1233
+ ]
1234
+ ]
1235
+ }
1236
+ ]
1237
+ }
1238
+ },
1239
+ {
1240
+ "name": "LearnerActivityLog",
1241
+ "linkedEntity": "AgentLearner",
1242
+ "category": "interaction",
1243
+ "emits": [
1244
+ {
1245
+ "event": "LOG_ENTRY",
1246
+ "scope": "internal",
1247
+ "payload": [
1248
+ {
1249
+ "name": "action",
1250
+ "type": "string"
1251
+ },
1252
+ {
1253
+ "name": "detail",
1254
+ "type": "string"
1255
+ },
1256
+ {
1257
+ "name": "status",
1258
+ "type": "string"
1259
+ }
1260
+ ]
1261
+ }
1262
+ ],
1263
+ "stateMachine": {
1264
+ "states": [
1265
+ {
1266
+ "name": "logging",
1267
+ "isInitial": true
1268
+ }
1269
+ ],
1270
+ "events": [
1271
+ {
1272
+ "key": "INIT",
1273
+ "name": "Initialize"
1274
+ },
1275
+ {
1276
+ "key": "LOG_ENTRY",
1277
+ "name": "Log Entry",
1278
+ "payload": [
1279
+ {
1280
+ "name": "action",
1281
+ "type": "string",
1282
+ "required": true
1283
+ },
1284
+ {
1285
+ "name": "detail",
1286
+ "type": "string",
1287
+ "required": true
1288
+ },
1289
+ {
1290
+ "name": "status",
1291
+ "type": "string",
1292
+ "required": true
1293
+ }
1294
+ ]
1295
+ },
1296
+ {
1297
+ "key": "CLEAR",
1298
+ "name": "Clear Log"
1299
+ }
1300
+ ],
1301
+ "transitions": [
1302
+ {
1303
+ "from": "logging",
1304
+ "to": "logging",
1305
+ "event": "INIT",
1306
+ "effects": [
1307
+ [
1308
+ "fetch",
1309
+ "AgentLearner"
1310
+ ],
1311
+ [
1312
+ "render-ui",
1313
+ "main",
1314
+ {
1315
+ "type": "stack",
1316
+ "direction": "vertical",
1317
+ "gap": "lg",
1318
+ "children": [
1319
+ {
1320
+ "type": "stack",
1321
+ "direction": "horizontal",
1322
+ "gap": "sm",
1323
+ "justify": "space-between",
1324
+ "align": "center",
1325
+ "children": [
1326
+ {
1327
+ "type": "stack",
1328
+ "direction": "horizontal",
1329
+ "gap": "sm",
1330
+ "align": "center",
1331
+ "children": [
1332
+ {
1333
+ "type": "icon",
1334
+ "name": "activity",
1335
+ "size": "lg"
1336
+ },
1337
+ {
1338
+ "type": "typography",
1339
+ "content": "Activity Log",
1340
+ "variant": "h2"
1341
+ }
1342
+ ]
1343
+ },
1344
+ {
1345
+ "type": "button",
1346
+ "label": "Clear",
1347
+ "event": "CLEAR",
1348
+ "variant": "ghost",
1349
+ "icon": "trash"
1350
+ }
1351
+ ]
1352
+ },
1353
+ {
1354
+ "type": "divider"
1355
+ },
1356
+ {
1357
+ "type": "timeline",
1358
+ "entity": "AgentLearner",
1359
+ "emptyIcon": "activity",
1360
+ "emptyTitle": "No activity yet",
1361
+ "emptyDescription": "Agent actions will appear here as they occur.",
1362
+ "renderItem": [
1363
+ "fn",
1364
+ "item",
1365
+ {
1366
+ "type": "stack",
1367
+ "direction": "vertical",
1368
+ "gap": "xs",
1369
+ "children": [
1370
+ {
1371
+ "type": "stack",
1372
+ "direction": "horizontal",
1373
+ "gap": "sm",
1374
+ "align": "center",
1375
+ "children": [
1376
+ {
1377
+ "type": "badge",
1378
+ "label": "@item.status"
1379
+ },
1380
+ {
1381
+ "type": "typography",
1382
+ "variant": "h4",
1383
+ "content": "@item.action"
1384
+ }
1385
+ ]
1386
+ },
1387
+ {
1388
+ "type": "typography",
1389
+ "variant": "body",
1390
+ "color": "muted",
1391
+ "content": "@item.detail"
1392
+ },
1393
+ {
1394
+ "type": "stack",
1395
+ "direction": "horizontal",
1396
+ "gap": "sm",
1397
+ "align": "center",
1398
+ "children": [
1399
+ {
1400
+ "type": "typography",
1401
+ "variant": "caption",
1402
+ "color": "muted",
1403
+ "content": "@item.timestamp"
1404
+ },
1405
+ {
1406
+ "type": "badge",
1407
+ "label": "@item.duration",
1408
+ "variant": "outline"
1409
+ }
1410
+ ]
1411
+ }
1412
+ ]
1413
+ }
1414
+ ],
1415
+ "fields": [
1416
+ "name",
1417
+ "description",
1418
+ "status",
1419
+ "createdAt",
1420
+ "outcome",
1421
+ "category",
1422
+ "impact",
1423
+ "memoryId",
1424
+ "isSuccess",
1425
+ "provider",
1426
+ "consecutiveFailures",
1427
+ "totalSuccesses",
1428
+ "totalFailures",
1429
+ "error",
1430
+ "content",
1431
+ "scope",
1432
+ "strength",
1433
+ "pinned",
1434
+ "prompt",
1435
+ "response",
1436
+ "model",
1437
+ "currentProvider",
1438
+ "currentModel",
1439
+ "fallbackProvider",
1440
+ "requestCount",
1441
+ "action",
1442
+ "detail",
1443
+ "timestamp",
1444
+ "duration"
1445
+ ]
1446
+ }
1447
+ ]
1448
+ }
1449
+ ]
1450
+ ]
1451
+ },
1452
+ {
1453
+ "from": "logging",
1454
+ "to": "logging",
1455
+ "event": "LOG_ENTRY",
1456
+ "effects": [
1457
+ [
1458
+ "persist",
1459
+ "create",
1460
+ "AgentLearner",
1461
+ {
1462
+ "action": "@payload.action",
1463
+ "detail": "@payload.detail",
1464
+ "status": "@payload.status",
1465
+ "timestamp": "@now"
1466
+ }
1467
+ ],
1468
+ [
1469
+ "fetch",
1470
+ "AgentLearner"
1471
+ ],
1472
+ [
1473
+ "render-ui",
1474
+ "main",
1475
+ {
1476
+ "type": "stack",
1477
+ "direction": "vertical",
1478
+ "gap": "lg",
1479
+ "children": [
1480
+ {
1481
+ "type": "stack",
1482
+ "direction": "horizontal",
1483
+ "gap": "sm",
1484
+ "justify": "space-between",
1485
+ "align": "center",
1486
+ "children": [
1487
+ {
1488
+ "type": "stack",
1489
+ "direction": "horizontal",
1490
+ "gap": "sm",
1491
+ "align": "center",
1492
+ "children": [
1493
+ {
1494
+ "type": "icon",
1495
+ "name": "activity",
1496
+ "size": "lg"
1497
+ },
1498
+ {
1499
+ "type": "typography",
1500
+ "content": "Activity Log",
1501
+ "variant": "h2"
1502
+ }
1503
+ ]
1504
+ },
1505
+ {
1506
+ "type": "button",
1507
+ "label": "Clear",
1508
+ "event": "CLEAR",
1509
+ "variant": "ghost",
1510
+ "icon": "trash"
1511
+ }
1512
+ ]
1513
+ },
1514
+ {
1515
+ "type": "divider"
1516
+ },
1517
+ {
1518
+ "type": "timeline",
1519
+ "entity": "AgentLearner",
1520
+ "emptyIcon": "activity",
1521
+ "emptyTitle": "No activity yet",
1522
+ "emptyDescription": "Agent actions will appear here as they occur.",
1523
+ "renderItem": [
1524
+ "fn",
1525
+ "item",
1526
+ {
1527
+ "type": "stack",
1528
+ "direction": "vertical",
1529
+ "gap": "xs",
1530
+ "children": [
1531
+ {
1532
+ "type": "stack",
1533
+ "direction": "horizontal",
1534
+ "gap": "sm",
1535
+ "align": "center",
1536
+ "children": [
1537
+ {
1538
+ "type": "badge",
1539
+ "label": "@item.status"
1540
+ },
1541
+ {
1542
+ "type": "typography",
1543
+ "variant": "h4",
1544
+ "content": "@item.action"
1545
+ }
1546
+ ]
1547
+ },
1548
+ {
1549
+ "type": "typography",
1550
+ "variant": "body",
1551
+ "color": "muted",
1552
+ "content": "@item.detail"
1553
+ },
1554
+ {
1555
+ "type": "stack",
1556
+ "direction": "horizontal",
1557
+ "gap": "sm",
1558
+ "align": "center",
1559
+ "children": [
1560
+ {
1561
+ "type": "typography",
1562
+ "variant": "caption",
1563
+ "color": "muted",
1564
+ "content": "@item.timestamp"
1565
+ },
1566
+ {
1567
+ "type": "badge",
1568
+ "label": "@item.duration",
1569
+ "variant": "outline"
1570
+ }
1571
+ ]
1572
+ }
1573
+ ]
1574
+ }
1575
+ ],
1576
+ "fields": [
1577
+ "name",
1578
+ "description",
1579
+ "status",
1580
+ "createdAt",
1581
+ "outcome",
1582
+ "category",
1583
+ "impact",
1584
+ "memoryId",
1585
+ "isSuccess",
1586
+ "provider",
1587
+ "consecutiveFailures",
1588
+ "totalSuccesses",
1589
+ "totalFailures",
1590
+ "error",
1591
+ "content",
1592
+ "scope",
1593
+ "strength",
1594
+ "pinned",
1595
+ "prompt",
1596
+ "response",
1597
+ "model",
1598
+ "currentProvider",
1599
+ "currentModel",
1600
+ "fallbackProvider",
1601
+ "requestCount",
1602
+ "action",
1603
+ "detail",
1604
+ "timestamp",
1605
+ "duration"
1606
+ ]
1607
+ }
1608
+ ]
1609
+ }
1610
+ ],
1611
+ [
1612
+ "notify",
1613
+ "AgentLearner created successfully"
1614
+ ]
1615
+ ]
1616
+ },
1617
+ {
1618
+ "from": "logging",
1619
+ "to": "logging",
1620
+ "event": "CLEAR",
1621
+ "effects": [
1622
+ [
1623
+ "persist",
1624
+ "delete",
1625
+ "AgentLearner"
1626
+ ],
1627
+ [
1628
+ "fetch",
1629
+ "AgentLearner"
1630
+ ],
1631
+ [
1632
+ "render-ui",
1633
+ "main",
1634
+ {
1635
+ "type": "stack",
1636
+ "direction": "vertical",
1637
+ "gap": "lg",
1638
+ "children": [
1639
+ {
1640
+ "type": "stack",
1641
+ "direction": "horizontal",
1642
+ "gap": "sm",
1643
+ "justify": "space-between",
1644
+ "align": "center",
1645
+ "children": [
1646
+ {
1647
+ "type": "stack",
1648
+ "direction": "horizontal",
1649
+ "gap": "sm",
1650
+ "align": "center",
1651
+ "children": [
1652
+ {
1653
+ "type": "icon",
1654
+ "name": "activity",
1655
+ "size": "lg"
1656
+ },
1657
+ {
1658
+ "type": "typography",
1659
+ "content": "Activity Log",
1660
+ "variant": "h2"
1661
+ }
1662
+ ]
1663
+ },
1664
+ {
1665
+ "type": "button",
1666
+ "label": "Clear",
1667
+ "event": "CLEAR",
1668
+ "variant": "ghost",
1669
+ "icon": "trash"
1670
+ }
1671
+ ]
1672
+ },
1673
+ {
1674
+ "type": "divider"
1675
+ },
1676
+ {
1677
+ "type": "timeline",
1678
+ "entity": "AgentLearner",
1679
+ "emptyIcon": "activity",
1680
+ "emptyTitle": "No activity yet",
1681
+ "emptyDescription": "Agent actions will appear here as they occur.",
1682
+ "renderItem": [
1683
+ "fn",
1684
+ "item",
1685
+ {
1686
+ "type": "stack",
1687
+ "direction": "vertical",
1688
+ "gap": "xs",
1689
+ "children": [
1690
+ {
1691
+ "type": "stack",
1692
+ "direction": "horizontal",
1693
+ "gap": "sm",
1694
+ "align": "center",
1695
+ "children": [
1696
+ {
1697
+ "type": "badge",
1698
+ "label": "@item.status"
1699
+ },
1700
+ {
1701
+ "type": "typography",
1702
+ "variant": "h4",
1703
+ "content": "@item.action"
1704
+ }
1705
+ ]
1706
+ },
1707
+ {
1708
+ "type": "typography",
1709
+ "variant": "body",
1710
+ "color": "muted",
1711
+ "content": "@item.detail"
1712
+ },
1713
+ {
1714
+ "type": "stack",
1715
+ "direction": "horizontal",
1716
+ "gap": "sm",
1717
+ "align": "center",
1718
+ "children": [
1719
+ {
1720
+ "type": "typography",
1721
+ "variant": "caption",
1722
+ "color": "muted",
1723
+ "content": "@item.timestamp"
1724
+ },
1725
+ {
1726
+ "type": "badge",
1727
+ "label": "@item.duration",
1728
+ "variant": "outline"
1729
+ }
1730
+ ]
1731
+ }
1732
+ ]
1733
+ }
1734
+ ],
1735
+ "fields": [
1736
+ "name",
1737
+ "description",
1738
+ "status",
1739
+ "createdAt",
1740
+ "outcome",
1741
+ "category",
1742
+ "impact",
1743
+ "memoryId",
1744
+ "isSuccess",
1745
+ "provider",
1746
+ "consecutiveFailures",
1747
+ "totalSuccesses",
1748
+ "totalFailures",
1749
+ "error",
1750
+ "content",
1751
+ "scope",
1752
+ "strength",
1753
+ "pinned",
1754
+ "prompt",
1755
+ "response",
1756
+ "model",
1757
+ "currentProvider",
1758
+ "currentModel",
1759
+ "fallbackProvider",
1760
+ "requestCount",
1761
+ "action",
1762
+ "detail",
1763
+ "timestamp",
1764
+ "duration"
1765
+ ]
1766
+ }
1767
+ ]
1768
+ }
1769
+ ],
1770
+ [
1771
+ "notify",
1772
+ "AgentLearner deleted successfully"
1773
+ ]
1774
+ ]
1775
+ }
1776
+ ]
1777
+ }
1778
+ },
1779
+ {
1780
+ "name": "LearnerRecordsBrowse",
1781
+ "linkedEntity": "AgentLearner",
1782
+ "category": "interaction",
1783
+ "stateMachine": {
1784
+ "states": [
1785
+ {
1786
+ "name": "browsing",
1787
+ "isInitial": true
1788
+ }
1789
+ ],
1790
+ "events": [
1791
+ {
1792
+ "key": "INIT",
1793
+ "name": "Initialize"
1794
+ },
1795
+ {
1796
+ "key": "VIEW",
1797
+ "name": "VIEW",
1798
+ "payload": [
1799
+ {
1800
+ "name": "id",
1801
+ "type": "string",
1802
+ "required": true
1803
+ },
1804
+ {
1805
+ "name": "row",
1806
+ "type": "object"
1807
+ }
1808
+ ]
1809
+ }
1810
+ ],
1811
+ "transitions": [
1812
+ {
1813
+ "from": "browsing",
1814
+ "to": "browsing",
1815
+ "event": "INIT",
1816
+ "effects": [
1817
+ [
1818
+ "ref",
1819
+ "AgentLearner"
1820
+ ],
1821
+ [
1822
+ "render-ui",
1823
+ "main",
1824
+ {
1825
+ "type": "stack",
1826
+ "direction": "vertical",
1827
+ "gap": "lg",
1828
+ "className": "max-w-5xl mx-auto w-full",
1829
+ "children": [
1830
+ {
1831
+ "type": "stack",
1832
+ "direction": "horizontal",
1833
+ "gap": "md",
1834
+ "justify": "space-between",
1835
+ "align": "center",
1836
+ "children": [
1837
+ {
1838
+ "type": "stack",
1839
+ "direction": "horizontal",
1840
+ "gap": "sm",
1841
+ "align": "center",
1842
+ "children": [
1843
+ {
1844
+ "type": "icon",
1845
+ "name": "graduation-cap",
1846
+ "size": "lg"
1847
+ },
1848
+ {
1849
+ "type": "typography",
1850
+ "content": "Learning Records",
1851
+ "variant": "h2"
1852
+ }
1853
+ ]
1854
+ }
1855
+ ]
1856
+ },
1857
+ {
1858
+ "type": "divider"
1859
+ },
1860
+ {
1861
+ "type": "data-grid",
1862
+ "entity": "AgentLearner",
1863
+ "emptyIcon": "inbox",
1864
+ "emptyTitle": "No records yet",
1865
+ "emptyDescription": "Task outcomes will appear here as they are recorded.",
1866
+ "itemActions": [
1867
+ {
1868
+ "label": "View",
1869
+ "event": "VIEW",
1870
+ "variant": "ghost",
1871
+ "size": "sm"
1872
+ }
1873
+ ],
1874
+ "columns": [
1875
+ {
1876
+ "name": "outcome",
1877
+ "label": "Outcome",
1878
+ "variant": "h4",
1879
+ "icon": "graduation-cap"
1880
+ },
1881
+ {
1882
+ "name": "category",
1883
+ "label": "Category",
1884
+ "variant": "badge",
1885
+ "colorMap": {
1886
+ "active": "success",
1887
+ "completed": "success",
1888
+ "done": "success",
1889
+ "pending": "warning",
1890
+ "draft": "warning",
1891
+ "scheduled": "warning",
1892
+ "inactive": "neutral",
1893
+ "archived": "neutral",
1894
+ "disabled": "neutral",
1895
+ "error": "destructive",
1896
+ "cancelled": "destructive",
1897
+ "failed": "destructive"
1898
+ }
1899
+ },
1900
+ {
1901
+ "name": "status",
1902
+ "label": "Status",
1903
+ "variant": "caption"
1904
+ }
1905
+ ]
1906
+ },
1907
+ {
1908
+ "type": "floating-action-button",
1909
+ "icon": "plus",
1910
+ "event": "INIT",
1911
+ "label": "Create",
1912
+ "tooltip": "Create"
1913
+ }
1914
+ ]
1915
+ }
1916
+ ]
1917
+ ]
1918
+ }
1919
+ ]
1920
+ }
1921
+ },
1922
+ {
1923
+ "name": "LearnerMemoryLifecycle",
1924
+ "linkedEntity": "AgentLearner",
1925
+ "category": "interaction",
1926
+ "stateMachine": {
1927
+ "states": [
1928
+ {
1929
+ "name": "browsing",
1930
+ "isInitial": true
1931
+ }
1932
+ ],
1933
+ "events": [
1934
+ {
1935
+ "key": "INIT",
1936
+ "name": "Initialize"
1937
+ },
1938
+ {
1939
+ "key": "MEMORIZE",
1940
+ "name": "MEMORIZE"
1941
+ },
1942
+ {
1943
+ "key": "RECALL",
1944
+ "name": "RECALL"
1945
+ },
1946
+ {
1947
+ "key": "DECAY",
1948
+ "name": "DECAY"
1949
+ },
1950
+ {
1951
+ "key": "PIN",
1952
+ "name": "PIN",
1953
+ "payload": [
1954
+ {
1955
+ "name": "id",
1956
+ "type": "string",
1957
+ "required": true
1958
+ },
1959
+ {
1960
+ "name": "row",
1961
+ "type": "object"
1962
+ }
1963
+ ]
1964
+ },
1965
+ {
1966
+ "key": "REINFORCE",
1967
+ "name": "REINFORCE",
1968
+ "payload": [
1969
+ {
1970
+ "name": "id",
1971
+ "type": "string",
1972
+ "required": true
1973
+ },
1974
+ {
1975
+ "name": "row",
1976
+ "type": "object"
1977
+ }
1978
+ ]
1979
+ },
1980
+ {
1981
+ "key": "FORGET",
1982
+ "name": "FORGET",
1983
+ "payload": [
1984
+ {
1985
+ "name": "id",
1986
+ "type": "string",
1987
+ "required": true
1988
+ },
1989
+ {
1990
+ "name": "row",
1991
+ "type": "object"
1992
+ }
1993
+ ]
1994
+ },
1995
+ {
1996
+ "key": "MEMORIZED",
1997
+ "name": "MEMORIZED",
1998
+ "payload": [
1999
+ {
2000
+ "name": "data",
2001
+ "type": "object",
2002
+ "required": true
2003
+ }
2004
+ ]
2005
+ },
2006
+ {
2007
+ "key": "PINNED",
2008
+ "name": "PINNED",
2009
+ "payload": [
2010
+ {
2011
+ "name": "data",
2012
+ "type": "object",
2013
+ "required": true
2014
+ }
2015
+ ]
2016
+ },
2017
+ {
2018
+ "key": "FORGOT",
2019
+ "name": "FORGOT",
2020
+ "payload": [
2021
+ {
2022
+ "name": "data",
2023
+ "type": "object",
2024
+ "required": true
2025
+ }
2026
+ ]
2027
+ },
2028
+ {
2029
+ "key": "REINFORCED",
2030
+ "name": "REINFORCED",
2031
+ "payload": [
2032
+ {
2033
+ "name": "data",
2034
+ "type": "object",
2035
+ "required": true
2036
+ }
2037
+ ]
2038
+ },
2039
+ {
2040
+ "key": "DECAYED",
2041
+ "name": "DECAYED",
2042
+ "payload": [
2043
+ {
2044
+ "name": "data",
2045
+ "type": "object",
2046
+ "required": true
2047
+ }
2048
+ ]
2049
+ }
2050
+ ],
2051
+ "transitions": [
2052
+ {
2053
+ "from": "browsing",
2054
+ "to": "browsing",
2055
+ "event": "INIT",
2056
+ "effects": [
2057
+ [
2058
+ "ref",
2059
+ "AgentLearner"
2060
+ ],
2061
+ [
2062
+ "render-ui",
2063
+ "main",
2064
+ {
2065
+ "type": "stack",
2066
+ "direction": "vertical",
2067
+ "gap": "lg",
2068
+ "className": "max-w-5xl mx-auto w-full",
2069
+ "children": [
2070
+ {
2071
+ "type": "stack",
2072
+ "direction": "horizontal",
2073
+ "gap": "md",
2074
+ "justify": "space-between",
2075
+ "align": "center",
2076
+ "children": [
2077
+ {
2078
+ "type": "stack",
2079
+ "direction": "horizontal",
2080
+ "gap": "sm",
2081
+ "align": "center",
2082
+ "children": [
2083
+ {
2084
+ "type": "icon",
2085
+ "name": "brain",
2086
+ "size": "lg"
2087
+ },
2088
+ {
2089
+ "type": "typography",
2090
+ "content": "AgentLearner Manager",
2091
+ "variant": "h2"
2092
+ }
2093
+ ]
2094
+ },
2095
+ {
2096
+ "type": "stack",
2097
+ "direction": "horizontal",
2098
+ "gap": "sm",
2099
+ "children": [
2100
+ {
2101
+ "type": "button",
2102
+ "label": "Memorize",
2103
+ "event": "MEMORIZE",
2104
+ "variant": "primary",
2105
+ "icon": "plus"
2106
+ },
2107
+ {
2108
+ "type": "button",
2109
+ "label": "Recall",
2110
+ "event": "RECALL",
2111
+ "variant": "secondary",
2112
+ "icon": "search"
2113
+ },
2114
+ {
2115
+ "type": "button",
2116
+ "label": "Decay All",
2117
+ "event": "DECAY",
2118
+ "variant": "ghost",
2119
+ "icon": "clock"
2120
+ }
2121
+ ]
2122
+ }
2123
+ ]
2124
+ },
2125
+ {
2126
+ "type": "divider"
2127
+ },
2128
+ {
2129
+ "type": "data-grid",
2130
+ "entity": "AgentLearner",
2131
+ "emptyIcon": "inbox",
2132
+ "emptyTitle": "No memories yet",
2133
+ "emptyDescription": "Create your first memory to get started.",
2134
+ "itemActions": [
2135
+ {
2136
+ "label": "Pin",
2137
+ "event": "PIN",
2138
+ "variant": "ghost",
2139
+ "size": "sm"
2140
+ },
2141
+ {
2142
+ "label": "Reinforce",
2143
+ "event": "REINFORCE",
2144
+ "variant": "ghost",
2145
+ "size": "sm"
2146
+ },
2147
+ {
2148
+ "label": "Forget",
2149
+ "event": "FORGET",
2150
+ "variant": "danger",
2151
+ "size": "sm"
2152
+ }
2153
+ ],
2154
+ "columns": [
2155
+ {
2156
+ "name": "content",
2157
+ "label": "Content",
2158
+ "variant": "h4",
2159
+ "icon": "brain"
2160
+ },
2161
+ {
2162
+ "name": "category",
2163
+ "label": "Category",
2164
+ "variant": "badge",
2165
+ "colorMap": {
2166
+ "active": "success",
2167
+ "completed": "success",
2168
+ "done": "success",
2169
+ "pending": "warning",
2170
+ "draft": "warning",
2171
+ "scheduled": "warning",
2172
+ "inactive": "neutral",
2173
+ "archived": "neutral",
2174
+ "disabled": "neutral",
2175
+ "error": "destructive",
2176
+ "cancelled": "destructive",
2177
+ "failed": "destructive"
2178
+ }
2179
+ },
2180
+ {
2181
+ "name": "strength",
2182
+ "label": "Strength",
2183
+ "variant": "caption"
2184
+ }
2185
+ ]
2186
+ }
2187
+ ]
2188
+ }
2189
+ ]
2190
+ ]
2191
+ },
2192
+ {
2193
+ "from": "browsing",
2194
+ "to": "browsing",
2195
+ "event": "MEMORIZED",
2196
+ "effects": [
2197
+ [
2198
+ "ref",
2199
+ "AgentLearner"
2200
+ ]
2201
+ ]
2202
+ },
2203
+ {
2204
+ "from": "browsing",
2205
+ "to": "browsing",
2206
+ "event": "PINNED",
2207
+ "effects": [
2208
+ [
2209
+ "ref",
2210
+ "AgentLearner"
2211
+ ]
2212
+ ]
2213
+ },
2214
+ {
2215
+ "from": "browsing",
2216
+ "to": "browsing",
2217
+ "event": "FORGOT",
2218
+ "effects": [
2219
+ [
2220
+ "ref",
2221
+ "AgentLearner"
2222
+ ]
2223
+ ]
2224
+ },
2225
+ {
2226
+ "from": "browsing",
2227
+ "to": "browsing",
2228
+ "event": "REINFORCED",
2229
+ "effects": [
2230
+ [
2231
+ "ref",
2232
+ "AgentLearner"
2233
+ ]
2234
+ ]
2235
+ },
2236
+ {
2237
+ "from": "browsing",
2238
+ "to": "browsing",
2239
+ "event": "DECAYED",
2240
+ "effects": [
2241
+ [
2242
+ "ref",
2243
+ "AgentLearner"
2244
+ ]
2245
+ ]
2246
+ }
2247
+ ]
2248
+ }
2249
+ },
2250
+ {
2251
+ "name": "LearnerCompletionFlow",
2252
+ "linkedEntity": "AgentLearner",
2253
+ "category": "interaction",
2254
+ "emits": [
2255
+ {
2256
+ "event": "GENERATED",
2257
+ "scope": "internal"
2258
+ }
2259
+ ],
2260
+ "stateMachine": {
2261
+ "states": [
2262
+ {
2263
+ "name": "closed",
2264
+ "isInitial": true
2265
+ },
2266
+ {
2267
+ "name": "open"
2268
+ }
2269
+ ],
2270
+ "events": [
2271
+ {
2272
+ "key": "INIT",
2273
+ "name": "Initialize"
2274
+ },
2275
+ {
2276
+ "key": "GENERATE",
2277
+ "name": "Open"
2278
+ },
2279
+ {
2280
+ "key": "CLOSE",
2281
+ "name": "Close"
2282
+ },
2283
+ {
2284
+ "key": "SAVE",
2285
+ "name": "Save",
2286
+ "payload": [
2287
+ {
2288
+ "name": "data",
2289
+ "type": "object",
2290
+ "required": true
2291
+ }
2292
+ ]
2293
+ }
2294
+ ],
2295
+ "transitions": [
2296
+ {
2297
+ "from": "closed",
2298
+ "to": "closed",
2299
+ "event": "INIT",
2300
+ "effects": [
2301
+ [
2302
+ "ref",
2303
+ "AgentLearner"
2304
+ ],
2305
+ [
2306
+ "render-ui",
2307
+ "main",
2308
+ {
2309
+ "type": "stack",
2310
+ "direction": "vertical",
2311
+ "gap": "lg",
2312
+ "children": [
2313
+ {
2314
+ "type": "stack",
2315
+ "direction": "horizontal",
2316
+ "gap": "md",
2317
+ "justify": "space-between",
2318
+ "children": [
2319
+ {
2320
+ "type": "stack",
2321
+ "direction": "horizontal",
2322
+ "gap": "md",
2323
+ "children": [
2324
+ {
2325
+ "type": "icon",
2326
+ "name": "sparkles",
2327
+ "size": "lg"
2328
+ },
2329
+ {
2330
+ "type": "typography",
2331
+ "content": "AgentLearner",
2332
+ "variant": "h2"
2333
+ }
2334
+ ]
2335
+ },
2336
+ {
2337
+ "type": "button",
2338
+ "label": "Open",
2339
+ "event": "GENERATE",
2340
+ "variant": "primary",
2341
+ "icon": "sparkles"
2342
+ }
2343
+ ]
2344
+ },
2345
+ {
2346
+ "type": "divider"
2347
+ },
2348
+ {
2349
+ "type": "empty-state",
2350
+ "icon": "sparkles",
2351
+ "title": "Nothing open",
2352
+ "description": "Click Open to view details in a modal overlay."
2353
+ }
2354
+ ]
2355
+ }
2356
+ ]
2357
+ ]
2358
+ },
2359
+ {
2360
+ "from": "closed",
2361
+ "to": "open",
2362
+ "event": "GENERATE",
2363
+ "effects": [
2364
+ [
2365
+ "render-ui",
2366
+ "modal",
2367
+ {
2368
+ "type": "stack",
2369
+ "direction": "vertical",
2370
+ "gap": "md",
2371
+ "children": [
2372
+ {
2373
+ "type": "stack",
2374
+ "direction": "horizontal",
2375
+ "gap": "sm",
2376
+ "children": [
2377
+ {
2378
+ "type": "icon",
2379
+ "name": "sparkles",
2380
+ "size": "md"
2381
+ },
2382
+ {
2383
+ "type": "typography",
2384
+ "content": "AgentLearner",
2385
+ "variant": "h3"
2386
+ }
2387
+ ]
2388
+ },
2389
+ {
2390
+ "type": "divider"
2391
+ },
2392
+ {
2393
+ "type": "stack",
2394
+ "direction": "horizontal",
2395
+ "gap": "sm",
2396
+ "children": [
2397
+ {
2398
+ "type": "badge",
2399
+ "label": "@entity.provider"
2400
+ },
2401
+ {
2402
+ "type": "badge",
2403
+ "label": "@entity.model"
2404
+ }
2405
+ ]
2406
+ },
2407
+ {
2408
+ "type": "form-section",
2409
+ "entity": "AgentLearner",
2410
+ "mode": "create",
2411
+ "submitEvent": "SAVE",
2412
+ "cancelEvent": "CLOSE",
2413
+ "fields": [
2414
+ "prompt"
2415
+ ]
2416
+ }
2417
+ ]
2418
+ }
2419
+ ]
2420
+ ]
2421
+ },
2422
+ {
2423
+ "from": "open",
2424
+ "to": "closed",
2425
+ "event": "CLOSE",
2426
+ "effects": [
2427
+ [
2428
+ "render-ui",
2429
+ "modal",
2430
+ null
2431
+ ],
2432
+ [
2433
+ "notify",
2434
+ "Cancelled",
2435
+ "info"
2436
+ ],
2437
+ [
2438
+ "ref",
2439
+ "AgentLearner"
2440
+ ],
2441
+ [
2442
+ "render-ui",
2443
+ "main",
2444
+ {
2445
+ "type": "stack",
2446
+ "direction": "vertical",
2447
+ "gap": "lg",
2448
+ "children": [
2449
+ {
2450
+ "type": "stack",
2451
+ "direction": "horizontal",
2452
+ "gap": "md",
2453
+ "justify": "space-between",
2454
+ "children": [
2455
+ {
2456
+ "type": "stack",
2457
+ "direction": "horizontal",
2458
+ "gap": "md",
2459
+ "children": [
2460
+ {
2461
+ "type": "icon",
2462
+ "name": "sparkles",
2463
+ "size": "lg"
2464
+ },
2465
+ {
2466
+ "type": "typography",
2467
+ "content": "AgentLearner",
2468
+ "variant": "h2"
2469
+ }
2470
+ ]
2471
+ },
2472
+ {
2473
+ "type": "button",
2474
+ "label": "Open",
2475
+ "event": "GENERATE",
2476
+ "variant": "primary",
2477
+ "icon": "sparkles"
2478
+ }
2479
+ ]
2480
+ },
2481
+ {
2482
+ "type": "divider"
2483
+ },
2484
+ {
2485
+ "type": "empty-state",
2486
+ "icon": "sparkles",
2487
+ "title": "Nothing open",
2488
+ "description": "Click Open to view details in a modal overlay."
2489
+ }
2490
+ ]
2491
+ }
2492
+ ]
2493
+ ]
2494
+ },
2495
+ {
2496
+ "from": "open",
2497
+ "to": "closed",
2498
+ "event": "SAVE",
2499
+ "effects": [
2500
+ [
2501
+ "persist",
2502
+ "create",
2503
+ "AgentLearner",
2504
+ "@payload.data"
2505
+ ],
2506
+ [
2507
+ "render-ui",
2508
+ "modal",
2509
+ null
2510
+ ],
2511
+ [
2512
+ "emit",
2513
+ "GENERATED"
2514
+ ],
2515
+ [
2516
+ "ref",
2517
+ "AgentLearner"
2518
+ ],
2519
+ [
2520
+ "render-ui",
2521
+ "main",
2522
+ {
2523
+ "type": "stack",
2524
+ "direction": "vertical",
2525
+ "gap": "lg",
2526
+ "children": [
2527
+ {
2528
+ "type": "stack",
2529
+ "direction": "horizontal",
2530
+ "gap": "md",
2531
+ "justify": "space-between",
2532
+ "children": [
2533
+ {
2534
+ "type": "stack",
2535
+ "direction": "horizontal",
2536
+ "gap": "md",
2537
+ "children": [
2538
+ {
2539
+ "type": "icon",
2540
+ "name": "sparkles",
2541
+ "size": "lg"
2542
+ },
2543
+ {
2544
+ "type": "typography",
2545
+ "content": "AgentLearner",
2546
+ "variant": "h2"
2547
+ }
2548
+ ]
2549
+ },
2550
+ {
2551
+ "type": "button",
2552
+ "label": "Open",
2553
+ "event": "GENERATE",
2554
+ "variant": "primary",
2555
+ "icon": "sparkles"
2556
+ }
2557
+ ]
2558
+ },
2559
+ {
2560
+ "type": "divider"
2561
+ },
2562
+ {
2563
+ "type": "empty-state",
2564
+ "icon": "sparkles",
2565
+ "title": "Nothing open",
2566
+ "description": "Click Open to view details in a modal overlay."
2567
+ }
2568
+ ]
2569
+ }
2570
+ ],
2571
+ [
2572
+ "notify",
2573
+ "AgentLearner created successfully"
2574
+ ]
2575
+ ]
2576
+ }
2577
+ ]
2578
+ }
2579
+ },
2580
+ {
2581
+ "name": "LearnerProviderManager",
2582
+ "linkedEntity": "AgentLearner",
2583
+ "category": "interaction",
2584
+ "emits": [
2585
+ {
2586
+ "event": "SWITCHED",
2587
+ "scope": "internal"
2588
+ }
2589
+ ],
2590
+ "stateMachine": {
2591
+ "states": [
2592
+ {
2593
+ "name": "closed",
2594
+ "isInitial": true
2595
+ },
2596
+ {
2597
+ "name": "open"
2598
+ }
2599
+ ],
2600
+ "events": [
2601
+ {
2602
+ "key": "INIT",
2603
+ "name": "Initialize"
2604
+ },
2605
+ {
2606
+ "key": "SWITCH",
2607
+ "name": "Open"
2608
+ },
2609
+ {
2610
+ "key": "CLOSE",
2611
+ "name": "Close"
2612
+ },
2613
+ {
2614
+ "key": "SAVE",
2615
+ "name": "Save",
2616
+ "payload": [
2617
+ {
2618
+ "name": "data",
2619
+ "type": "object",
2620
+ "required": true
2621
+ }
2622
+ ]
2623
+ }
2624
+ ],
2625
+ "transitions": [
2626
+ {
2627
+ "from": "closed",
2628
+ "to": "closed",
2629
+ "event": "INIT",
2630
+ "effects": [
2631
+ [
2632
+ "ref",
2633
+ "AgentLearner"
2634
+ ],
2635
+ [
2636
+ "render-ui",
2637
+ "main",
2638
+ {
2639
+ "type": "stack",
2640
+ "direction": "vertical",
2641
+ "gap": "lg",
2642
+ "children": [
2643
+ {
2644
+ "type": "stack",
2645
+ "direction": "horizontal",
2646
+ "gap": "md",
2647
+ "justify": "space-between",
2648
+ "children": [
2649
+ {
2650
+ "type": "stack",
2651
+ "direction": "horizontal",
2652
+ "gap": "md",
2653
+ "children": [
2654
+ {
2655
+ "type": "icon",
2656
+ "name": "repeat",
2657
+ "size": "lg"
2658
+ },
2659
+ {
2660
+ "type": "typography",
2661
+ "content": "Switch Provider",
2662
+ "variant": "h2"
2663
+ }
2664
+ ]
2665
+ },
2666
+ {
2667
+ "type": "button",
2668
+ "label": "Open",
2669
+ "event": "SWITCH",
2670
+ "variant": "primary",
2671
+ "icon": "repeat"
2672
+ }
2673
+ ]
2674
+ },
2675
+ {
2676
+ "type": "divider"
2677
+ },
2678
+ {
2679
+ "type": "empty-state",
2680
+ "icon": "repeat",
2681
+ "title": "Nothing open",
2682
+ "description": "Click Open to view details in a modal overlay."
2683
+ }
2684
+ ]
2685
+ }
2686
+ ]
2687
+ ]
2688
+ },
2689
+ {
2690
+ "from": "closed",
2691
+ "to": "open",
2692
+ "event": "SWITCH",
2693
+ "effects": [
2694
+ [
2695
+ "fetch",
2696
+ "AgentLearner"
2697
+ ],
2698
+ [
2699
+ "render-ui",
2700
+ "modal",
2701
+ {
2702
+ "type": "stack",
2703
+ "direction": "vertical",
2704
+ "gap": "md",
2705
+ "children": [
2706
+ {
2707
+ "type": "stack",
2708
+ "direction": "horizontal",
2709
+ "gap": "sm",
2710
+ "children": [
2711
+ {
2712
+ "type": "icon",
2713
+ "name": "repeat",
2714
+ "size": "md"
2715
+ },
2716
+ {
2717
+ "type": "typography",
2718
+ "content": "Switch Provider",
2719
+ "variant": "h3"
2720
+ }
2721
+ ]
2722
+ },
2723
+ {
2724
+ "type": "divider"
2725
+ },
2726
+ {
2727
+ "type": "stack",
2728
+ "direction": "horizontal",
2729
+ "gap": "md",
2730
+ "children": [
2731
+ {
2732
+ "type": "typography",
2733
+ "variant": "caption",
2734
+ "content": "Current:"
2735
+ },
2736
+ {
2737
+ "type": "badge",
2738
+ "label": "@entity.currentProvider"
2739
+ },
2740
+ {
2741
+ "type": "badge",
2742
+ "label": "@entity.currentModel"
2743
+ }
2744
+ ]
2745
+ },
2746
+ {
2747
+ "type": "form-section",
2748
+ "entity": "AgentLearner",
2749
+ "mode": "edit",
2750
+ "submitEvent": "SAVE",
2751
+ "cancelEvent": "CLOSE",
2752
+ "fields": [
2753
+ "currentProvider",
2754
+ "currentModel"
2755
+ ]
2756
+ }
2757
+ ]
2758
+ }
2759
+ ]
2760
+ ]
2761
+ },
2762
+ {
2763
+ "from": "open",
2764
+ "to": "closed",
2765
+ "event": "CLOSE",
2766
+ "effects": [
2767
+ [
2768
+ "render-ui",
2769
+ "modal",
2770
+ null
2771
+ ],
2772
+ [
2773
+ "notify",
2774
+ "Cancelled",
2775
+ "info"
2776
+ ],
2777
+ [
2778
+ "ref",
2779
+ "AgentLearner"
2780
+ ],
2781
+ [
2782
+ "render-ui",
2783
+ "main",
2784
+ {
2785
+ "type": "stack",
2786
+ "direction": "vertical",
2787
+ "gap": "lg",
2788
+ "children": [
2789
+ {
2790
+ "type": "stack",
2791
+ "direction": "horizontal",
2792
+ "gap": "md",
2793
+ "justify": "space-between",
2794
+ "children": [
2795
+ {
2796
+ "type": "stack",
2797
+ "direction": "horizontal",
2798
+ "gap": "md",
2799
+ "children": [
2800
+ {
2801
+ "type": "icon",
2802
+ "name": "repeat",
2803
+ "size": "lg"
2804
+ },
2805
+ {
2806
+ "type": "typography",
2807
+ "content": "Switch Provider",
2808
+ "variant": "h2"
2809
+ }
2810
+ ]
2811
+ },
2812
+ {
2813
+ "type": "button",
2814
+ "label": "Open",
2815
+ "event": "SWITCH",
2816
+ "variant": "primary",
2817
+ "icon": "repeat"
2818
+ }
2819
+ ]
2820
+ },
2821
+ {
2822
+ "type": "divider"
2823
+ },
2824
+ {
2825
+ "type": "empty-state",
2826
+ "icon": "repeat",
2827
+ "title": "Nothing open",
2828
+ "description": "Click Open to view details in a modal overlay."
2829
+ }
2830
+ ]
2831
+ }
2832
+ ]
2833
+ ]
2834
+ },
2835
+ {
2836
+ "from": "open",
2837
+ "to": "closed",
2838
+ "event": "SAVE",
2839
+ "effects": [
2840
+ [
2841
+ "persist",
2842
+ "update",
2843
+ "AgentLearner",
2844
+ "@payload.data"
2845
+ ],
2846
+ [
2847
+ "render-ui",
2848
+ "modal",
2849
+ null
2850
+ ],
2851
+ [
2852
+ "emit",
2853
+ "SWITCHED"
2854
+ ],
2855
+ [
2856
+ "ref",
2857
+ "AgentLearner"
2858
+ ],
2859
+ [
2860
+ "render-ui",
2861
+ "main",
2862
+ {
2863
+ "type": "stack",
2864
+ "direction": "vertical",
2865
+ "gap": "lg",
2866
+ "children": [
2867
+ {
2868
+ "type": "stack",
2869
+ "direction": "horizontal",
2870
+ "gap": "md",
2871
+ "justify": "space-between",
2872
+ "children": [
2873
+ {
2874
+ "type": "stack",
2875
+ "direction": "horizontal",
2876
+ "gap": "md",
2877
+ "children": [
2878
+ {
2879
+ "type": "icon",
2880
+ "name": "repeat",
2881
+ "size": "lg"
2882
+ },
2883
+ {
2884
+ "type": "typography",
2885
+ "content": "Switch Provider",
2886
+ "variant": "h2"
2887
+ }
2888
+ ]
2889
+ },
2890
+ {
2891
+ "type": "button",
2892
+ "label": "Open",
2893
+ "event": "SWITCH",
2894
+ "variant": "primary",
2895
+ "icon": "repeat"
2896
+ }
2897
+ ]
2898
+ },
2899
+ {
2900
+ "type": "divider"
2901
+ },
2902
+ {
2903
+ "type": "empty-state",
2904
+ "icon": "repeat",
2905
+ "title": "Nothing open",
2906
+ "description": "Click Open to view details in a modal overlay."
2907
+ }
2908
+ ]
2909
+ }
2910
+ ],
2911
+ [
2912
+ "notify",
2913
+ "AgentLearner updated successfully"
2914
+ ]
2915
+ ]
2916
+ }
2917
+ ]
2918
+ }
2919
+ }
2920
+ ],
2921
+ "pages": [
2922
+ {
2923
+ "name": "AgentLearnerPage",
2924
+ "path": "/agentlearners",
2925
+ "traits": [
2926
+ {
2927
+ "ref": "AgentLearnerLearner"
2928
+ },
2929
+ {
2930
+ "ref": "LearnerActivityLog"
2931
+ },
2932
+ {
2933
+ "ref": "LearnerRecordsBrowse"
2934
+ },
2935
+ {
2936
+ "ref": "LearnerMemoryLifecycle"
2937
+ },
2938
+ {
2939
+ "ref": "LearnerCompletionFlow"
2940
+ },
2941
+ {
2942
+ "ref": "LearnerProviderManager"
2943
+ }
2944
+ ]
2945
+ }
2946
+ ]
2947
+ }
2948
+ ],
2949
+ "description": "Composes agent atoms + UI atoms into an outcome learning pipeline with an activity log for learning history and a browse list for records. Listens for task success/failure events, memorizes outcomes, reinforces memories for successes, applies decay for failures, and adjusts provider routing based on accumulated results. Composed atoms: - stdAgentMemory: memorize outcomes, reinforce/decay based on results - stdAgentCompletion: analyze outcome impact via LLM - stdAgentProvider: adjust provider routing based on success patterns - stdAgentActivityLog: chronological learning timeline - stdBrowse: browsable records list"
2950
+ }