@almadar/std 3.12.2 → 3.13.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 (74) hide show
  1. package/behaviors/exports/atoms/std-agent-classifier.orb +402 -0
  2. package/behaviors/exports/atoms/std-agent-completion.orb +469 -0
  3. package/behaviors/exports/atoms/std-agent-context-window.orb +790 -0
  4. package/behaviors/exports/atoms/std-agent-conversation.orb +737 -0
  5. package/behaviors/exports/atoms/std-agent-memory.orb +627 -0
  6. package/behaviors/exports/atoms/std-agent-provider.orb +402 -0
  7. package/behaviors/exports/atoms/std-agent-search.orb +418 -0
  8. package/behaviors/exports/atoms/std-agent-session.orb +825 -0
  9. package/behaviors/exports/atoms/std-agent-tool-call.orb +380 -0
  10. package/behaviors/exports/molecules/std-agent-fix-loop.orb +1213 -0
  11. package/behaviors/exports/molecules/std-agent-learner.orb +1143 -0
  12. package/behaviors/exports/molecules/std-agent-planner.orb +898 -0
  13. package/behaviors/exports/molecules/std-agent-rag.orb +736 -0
  14. package/behaviors/exports/molecules/std-agent-tool-loop.orb +1237 -0
  15. package/behaviors/exports/organisms/std-agent-assistant.orb +2288 -0
  16. package/behaviors/exports/organisms/std-agent-builder.orb +2664 -0
  17. package/behaviors/exports/organisms/std-agent-pipeline.orb +2307 -0
  18. package/behaviors/exports/organisms/std-agent-reviewer.orb +1743 -0
  19. package/behaviors/exports/organisms/std-agent-tutor.orb +2303 -0
  20. package/behaviors/exports/validation-report.json +328 -0
  21. package/dist/behaviors/exports/atoms/std-agent-classifier.orb +402 -0
  22. package/dist/behaviors/exports/atoms/std-agent-completion.orb +469 -0
  23. package/dist/behaviors/exports/atoms/std-agent-context-window.orb +790 -0
  24. package/dist/behaviors/exports/atoms/std-agent-conversation.orb +737 -0
  25. package/dist/behaviors/exports/atoms/std-agent-memory.orb +627 -0
  26. package/dist/behaviors/exports/atoms/std-agent-provider.orb +402 -0
  27. package/dist/behaviors/exports/atoms/std-agent-search.orb +418 -0
  28. package/dist/behaviors/exports/atoms/std-agent-session.orb +825 -0
  29. package/dist/behaviors/exports/atoms/std-agent-tool-call.orb +380 -0
  30. package/dist/behaviors/exports/molecules/std-agent-fix-loop.orb +1213 -0
  31. package/dist/behaviors/exports/molecules/std-agent-learner.orb +1143 -0
  32. package/dist/behaviors/exports/molecules/std-agent-planner.orb +898 -0
  33. package/dist/behaviors/exports/molecules/std-agent-rag.orb +736 -0
  34. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +1237 -0
  35. package/dist/behaviors/exports/organisms/std-agent-assistant.orb +2288 -0
  36. package/dist/behaviors/exports/organisms/std-agent-builder.orb +2664 -0
  37. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +2307 -0
  38. package/dist/behaviors/exports/organisms/std-agent-reviewer.orb +1743 -0
  39. package/dist/behaviors/exports/organisms/std-agent-tutor.orb +2303 -0
  40. package/dist/behaviors/exports/validation-report.json +328 -0
  41. package/dist/behaviors/exports-reader.js +6345 -175
  42. package/dist/behaviors/exports-reader.js.map +1 -1
  43. package/dist/behaviors/functions/index.d.ts +620 -1
  44. package/dist/behaviors/functions/index.js +6285 -176
  45. package/dist/behaviors/functions/index.js.map +1 -1
  46. package/dist/behaviors/index.d.ts +1 -1
  47. package/dist/behaviors/index.js +6348 -178
  48. package/dist/behaviors/index.js.map +1 -1
  49. package/dist/behaviors/query.js +6347 -177
  50. package/dist/behaviors/query.js.map +1 -1
  51. package/dist/exports/atoms/std-agent-classifier.orb +402 -0
  52. package/dist/exports/atoms/std-agent-completion.orb +469 -0
  53. package/dist/exports/atoms/std-agent-context-window.orb +790 -0
  54. package/dist/exports/atoms/std-agent-conversation.orb +737 -0
  55. package/dist/exports/atoms/std-agent-memory.orb +627 -0
  56. package/dist/exports/atoms/std-agent-provider.orb +402 -0
  57. package/dist/exports/atoms/std-agent-search.orb +418 -0
  58. package/dist/exports/atoms/std-agent-session.orb +825 -0
  59. package/dist/exports/atoms/std-agent-tool-call.orb +380 -0
  60. package/dist/exports/molecules/std-agent-fix-loop.orb +1213 -0
  61. package/dist/exports/molecules/std-agent-learner.orb +1143 -0
  62. package/dist/exports/molecules/std-agent-planner.orb +898 -0
  63. package/dist/exports/molecules/std-agent-rag.orb +736 -0
  64. package/dist/exports/molecules/std-agent-tool-loop.orb +1237 -0
  65. package/dist/exports/organisms/std-agent-assistant.orb +2288 -0
  66. package/dist/exports/organisms/std-agent-builder.orb +2664 -0
  67. package/dist/exports/organisms/std-agent-pipeline.orb +2307 -0
  68. package/dist/exports/organisms/std-agent-reviewer.orb +1743 -0
  69. package/dist/exports/organisms/std-agent-tutor.orb +2303 -0
  70. package/dist/exports/validation-report.json +328 -0
  71. package/dist/index.d.ts +1 -1
  72. package/dist/index.js +6348 -178
  73. package/dist/index.js.map +1 -1
  74. package/package.json +1 -1
@@ -0,0 +1,1143 @@
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
+ },
88
+ "traits": [
89
+ {
90
+ "name": "AgentLearnerLearner",
91
+ "linkedEntity": "AgentLearner",
92
+ "category": "interaction",
93
+ "listens": [
94
+ {
95
+ "event": "TASK_SUCCEEDED",
96
+ "triggers": "TASK_SUCCEEDED"
97
+ },
98
+ {
99
+ "event": "TASK_FAILED",
100
+ "triggers": "TASK_FAILED"
101
+ }
102
+ ],
103
+ "stateMachine": {
104
+ "states": [
105
+ {
106
+ "name": "idle",
107
+ "isInitial": true
108
+ },
109
+ {
110
+ "name": "recording"
111
+ },
112
+ {
113
+ "name": "analyzing"
114
+ }
115
+ ],
116
+ "events": [
117
+ {
118
+ "key": "INIT",
119
+ "name": "Initialize"
120
+ },
121
+ {
122
+ "key": "TASK_SUCCEEDED",
123
+ "name": "Task Succeeded",
124
+ "payload": [
125
+ {
126
+ "name": "outcome",
127
+ "type": "string",
128
+ "required": true
129
+ },
130
+ {
131
+ "name": "category",
132
+ "type": "string",
133
+ "required": true
134
+ }
135
+ ]
136
+ },
137
+ {
138
+ "key": "TASK_FAILED",
139
+ "name": "Task Failed",
140
+ "payload": [
141
+ {
142
+ "name": "outcome",
143
+ "type": "string",
144
+ "required": true
145
+ },
146
+ {
147
+ "name": "category",
148
+ "type": "string",
149
+ "required": true
150
+ }
151
+ ]
152
+ },
153
+ {
154
+ "key": "RECORDED",
155
+ "name": "Memory Recorded",
156
+ "payload": [
157
+ {
158
+ "name": "memoryId",
159
+ "type": "string",
160
+ "required": true
161
+ }
162
+ ]
163
+ },
164
+ {
165
+ "key": "ANALYSIS_DONE",
166
+ "name": "Analysis Done",
167
+ "payload": [
168
+ {
169
+ "name": "impact",
170
+ "type": "string",
171
+ "required": true
172
+ }
173
+ ]
174
+ },
175
+ {
176
+ "key": "FAILED",
177
+ "name": "Processing Failed",
178
+ "payload": [
179
+ {
180
+ "name": "error",
181
+ "type": "string",
182
+ "required": true
183
+ }
184
+ ]
185
+ },
186
+ {
187
+ "key": "RESET",
188
+ "name": "Reset View"
189
+ }
190
+ ],
191
+ "transitions": [
192
+ {
193
+ "from": "idle",
194
+ "to": "idle",
195
+ "event": "INIT",
196
+ "effects": [
197
+ [
198
+ "set",
199
+ "@entity.provider",
200
+ [
201
+ "agent/provider"
202
+ ]
203
+ ],
204
+ [
205
+ "render-ui",
206
+ "main",
207
+ {
208
+ "type": "stack",
209
+ "direction": "vertical",
210
+ "gap": "lg",
211
+ "children": [
212
+ {
213
+ "type": "stack",
214
+ "direction": "horizontal",
215
+ "gap": "sm",
216
+ "align": "center",
217
+ "children": [
218
+ {
219
+ "type": "icon",
220
+ "name": "graduation-cap",
221
+ "size": "lg"
222
+ },
223
+ {
224
+ "type": "typography",
225
+ "content": "Outcome Learner",
226
+ "variant": "h2"
227
+ }
228
+ ]
229
+ },
230
+ {
231
+ "type": "divider"
232
+ },
233
+ {
234
+ "type": "simple-grid",
235
+ "columns": 3,
236
+ "children": [
237
+ {
238
+ "type": "stat-display",
239
+ "label": "Successes",
240
+ "value": "@entity.totalSuccesses",
241
+ "icon": "check-circle"
242
+ },
243
+ {
244
+ "type": "stat-display",
245
+ "label": "Failures",
246
+ "value": "@entity.totalFailures",
247
+ "icon": "x-circle"
248
+ },
249
+ {
250
+ "type": "stat-display",
251
+ "label": "Current Provider",
252
+ "value": "@entity.provider",
253
+ "icon": "cpu"
254
+ }
255
+ ]
256
+ },
257
+ {
258
+ "type": "divider"
259
+ },
260
+ {
261
+ "type": "card",
262
+ "children": [
263
+ {
264
+ "type": "stack",
265
+ "direction": "vertical",
266
+ "gap": "md",
267
+ "children": [
268
+ {
269
+ "type": "typography",
270
+ "content": "Listening for task outcomes...",
271
+ "variant": "body"
272
+ },
273
+ {
274
+ "type": "typography",
275
+ "content": "This module records TASK_SUCCEEDED and TASK_FAILED events automatically.",
276
+ "variant": "caption"
277
+ }
278
+ ]
279
+ }
280
+ ]
281
+ },
282
+ {
283
+ "type": "card",
284
+ "children": [
285
+ {
286
+ "type": "stack",
287
+ "direction": "vertical",
288
+ "gap": "sm",
289
+ "children": [
290
+ {
291
+ "type": "typography",
292
+ "content": "Last Outcome",
293
+ "variant": "caption"
294
+ },
295
+ {
296
+ "type": "typography",
297
+ "content": "@entity.outcome",
298
+ "variant": "body"
299
+ },
300
+ {
301
+ "type": "typography",
302
+ "content": "Impact Analysis",
303
+ "variant": "caption"
304
+ },
305
+ {
306
+ "type": "typography",
307
+ "content": "@entity.impact",
308
+ "variant": "body"
309
+ }
310
+ ]
311
+ }
312
+ ]
313
+ }
314
+ ]
315
+ }
316
+ ]
317
+ ]
318
+ },
319
+ {
320
+ "from": "idle",
321
+ "to": "recording",
322
+ "event": "TASK_SUCCEEDED",
323
+ "effects": [
324
+ [
325
+ "set",
326
+ "@entity.outcome",
327
+ "@payload.outcome"
328
+ ],
329
+ [
330
+ "set",
331
+ "@entity.category",
332
+ "@payload.category"
333
+ ],
334
+ [
335
+ "set",
336
+ "@entity.isSuccess",
337
+ true
338
+ ],
339
+ [
340
+ "set",
341
+ "@entity.consecutiveFailures",
342
+ 0
343
+ ],
344
+ [
345
+ "set",
346
+ "@entity.totalSuccesses",
347
+ [
348
+ "math/add",
349
+ "@entity.totalSuccesses",
350
+ 1
351
+ ]
352
+ ],
353
+ [
354
+ "set",
355
+ "@entity.status",
356
+ "recording"
357
+ ],
358
+ [
359
+ "agent/memorize",
360
+ [
361
+ "string/concat",
362
+ "Success: ",
363
+ "@payload.outcome"
364
+ ],
365
+ "@payload.category"
366
+ ],
367
+ [
368
+ "render-ui",
369
+ "main",
370
+ {
371
+ "type": "stack",
372
+ "direction": "vertical",
373
+ "gap": "lg",
374
+ "align": "center",
375
+ "children": [
376
+ {
377
+ "type": "icon",
378
+ "name": "save",
379
+ "size": "lg"
380
+ },
381
+ {
382
+ "type": "typography",
383
+ "content": "Recording outcome...",
384
+ "variant": "h3"
385
+ },
386
+ {
387
+ "type": "spinner",
388
+ "size": "lg"
389
+ },
390
+ {
391
+ "type": "badge",
392
+ "label": "@entity.outcome"
393
+ }
394
+ ]
395
+ }
396
+ ]
397
+ ]
398
+ },
399
+ {
400
+ "from": "idle",
401
+ "to": "recording",
402
+ "event": "TASK_FAILED",
403
+ "effects": [
404
+ [
405
+ "set",
406
+ "@entity.outcome",
407
+ "@payload.outcome"
408
+ ],
409
+ [
410
+ "set",
411
+ "@entity.category",
412
+ "@payload.category"
413
+ ],
414
+ [
415
+ "set",
416
+ "@entity.isSuccess",
417
+ false
418
+ ],
419
+ [
420
+ "set",
421
+ "@entity.consecutiveFailures",
422
+ [
423
+ "math/add",
424
+ "@entity.consecutiveFailures",
425
+ 1
426
+ ]
427
+ ],
428
+ [
429
+ "set",
430
+ "@entity.totalFailures",
431
+ [
432
+ "math/add",
433
+ "@entity.totalFailures",
434
+ 1
435
+ ]
436
+ ],
437
+ [
438
+ "set",
439
+ "@entity.status",
440
+ "recording"
441
+ ],
442
+ [
443
+ "agent/memorize",
444
+ [
445
+ "string/concat",
446
+ "Failure: ",
447
+ "@payload.outcome"
448
+ ],
449
+ "@payload.category"
450
+ ],
451
+ [
452
+ "render-ui",
453
+ "main",
454
+ {
455
+ "type": "stack",
456
+ "direction": "vertical",
457
+ "gap": "lg",
458
+ "align": "center",
459
+ "children": [
460
+ {
461
+ "type": "icon",
462
+ "name": "save",
463
+ "size": "lg"
464
+ },
465
+ {
466
+ "type": "typography",
467
+ "content": "Recording outcome...",
468
+ "variant": "h3"
469
+ },
470
+ {
471
+ "type": "spinner",
472
+ "size": "lg"
473
+ },
474
+ {
475
+ "type": "badge",
476
+ "label": "@entity.outcome"
477
+ }
478
+ ]
479
+ }
480
+ ]
481
+ ]
482
+ },
483
+ {
484
+ "from": "recording",
485
+ "to": "analyzing",
486
+ "event": "RECORDED",
487
+ "effects": [
488
+ [
489
+ "set",
490
+ "@entity.memoryId",
491
+ "@payload.memoryId"
492
+ ],
493
+ [
494
+ "cond",
495
+ "@entity.isSuccess",
496
+ [
497
+ "agent/reinforce",
498
+ "@payload.memoryId"
499
+ ],
500
+ [
501
+ "agent/decay"
502
+ ]
503
+ ],
504
+ [
505
+ "cond",
506
+ [
507
+ "math/gte",
508
+ "@entity.consecutiveFailures",
509
+ 3
510
+ ],
511
+ [
512
+ "agent/switch-provider",
513
+ "anthropic"
514
+ ]
515
+ ],
516
+ [
517
+ "set",
518
+ "@entity.status",
519
+ "analyzing"
520
+ ],
521
+ [
522
+ "agent/generate",
523
+ [
524
+ "string/concat",
525
+ "Outcome: ",
526
+ "@entity.outcome",
527
+ "\n",
528
+ "Category: ",
529
+ "@entity.category",
530
+ "\n",
531
+ "Result: ",
532
+ [
533
+ "cond",
534
+ "@entity.isSuccess",
535
+ "success",
536
+ "failure"
537
+ ],
538
+ "\n",
539
+ "Consecutive failures: ",
540
+ [
541
+ "string/of",
542
+ "@entity.consecutiveFailures"
543
+ ],
544
+ "\n\n",
545
+ "Analyze the impact of this outcome. What should be learned? Keep it to 1-2 sentences."
546
+ ]
547
+ ],
548
+ [
549
+ "render-ui",
550
+ "main",
551
+ {
552
+ "type": "stack",
553
+ "direction": "vertical",
554
+ "gap": "lg",
555
+ "align": "center",
556
+ "children": [
557
+ {
558
+ "type": "icon",
559
+ "name": "cpu",
560
+ "size": "lg"
561
+ },
562
+ {
563
+ "type": "typography",
564
+ "content": "Analyzing impact...",
565
+ "variant": "h3"
566
+ },
567
+ {
568
+ "type": "spinner",
569
+ "size": "lg"
570
+ },
571
+ {
572
+ "type": "stack",
573
+ "direction": "horizontal",
574
+ "gap": "md",
575
+ "justify": "center",
576
+ "children": [
577
+ {
578
+ "type": "badge",
579
+ "label": [
580
+ "string/concat",
581
+ "Category: ",
582
+ "@entity.category"
583
+ ]
584
+ },
585
+ {
586
+ "type": "badge",
587
+ "label": [
588
+ "cond",
589
+ "@entity.isSuccess",
590
+ "Success",
591
+ "Failure"
592
+ ]
593
+ }
594
+ ]
595
+ }
596
+ ]
597
+ }
598
+ ]
599
+ ]
600
+ },
601
+ {
602
+ "from": "analyzing",
603
+ "to": "idle",
604
+ "event": "ANALYSIS_DONE",
605
+ "effects": [
606
+ [
607
+ "set",
608
+ "@entity.impact",
609
+ "@payload.impact"
610
+ ],
611
+ [
612
+ "set",
613
+ "@entity.status",
614
+ "idle"
615
+ ],
616
+ [
617
+ "set",
618
+ "@entity.provider",
619
+ [
620
+ "agent/provider"
621
+ ]
622
+ ],
623
+ [
624
+ "render-ui",
625
+ "main",
626
+ {
627
+ "type": "stack",
628
+ "direction": "vertical",
629
+ "gap": "lg",
630
+ "children": [
631
+ {
632
+ "type": "stack",
633
+ "direction": "horizontal",
634
+ "gap": "sm",
635
+ "align": "center",
636
+ "children": [
637
+ {
638
+ "type": "icon",
639
+ "name": "graduation-cap",
640
+ "size": "lg"
641
+ },
642
+ {
643
+ "type": "typography",
644
+ "content": "Outcome Learner",
645
+ "variant": "h2"
646
+ }
647
+ ]
648
+ },
649
+ {
650
+ "type": "divider"
651
+ },
652
+ {
653
+ "type": "simple-grid",
654
+ "columns": 3,
655
+ "children": [
656
+ {
657
+ "type": "stat-display",
658
+ "label": "Successes",
659
+ "value": "@entity.totalSuccesses",
660
+ "icon": "check-circle"
661
+ },
662
+ {
663
+ "type": "stat-display",
664
+ "label": "Failures",
665
+ "value": "@entity.totalFailures",
666
+ "icon": "x-circle"
667
+ },
668
+ {
669
+ "type": "stat-display",
670
+ "label": "Current Provider",
671
+ "value": "@entity.provider",
672
+ "icon": "cpu"
673
+ }
674
+ ]
675
+ },
676
+ {
677
+ "type": "divider"
678
+ },
679
+ {
680
+ "type": "card",
681
+ "children": [
682
+ {
683
+ "type": "stack",
684
+ "direction": "vertical",
685
+ "gap": "md",
686
+ "children": [
687
+ {
688
+ "type": "typography",
689
+ "content": "Listening for task outcomes...",
690
+ "variant": "body"
691
+ },
692
+ {
693
+ "type": "typography",
694
+ "content": "This module records TASK_SUCCEEDED and TASK_FAILED events automatically.",
695
+ "variant": "caption"
696
+ }
697
+ ]
698
+ }
699
+ ]
700
+ },
701
+ {
702
+ "type": "card",
703
+ "children": [
704
+ {
705
+ "type": "stack",
706
+ "direction": "vertical",
707
+ "gap": "sm",
708
+ "children": [
709
+ {
710
+ "type": "typography",
711
+ "content": "Last Outcome",
712
+ "variant": "caption"
713
+ },
714
+ {
715
+ "type": "typography",
716
+ "content": "@entity.outcome",
717
+ "variant": "body"
718
+ },
719
+ {
720
+ "type": "typography",
721
+ "content": "Impact Analysis",
722
+ "variant": "caption"
723
+ },
724
+ {
725
+ "type": "typography",
726
+ "content": "@entity.impact",
727
+ "variant": "body"
728
+ }
729
+ ]
730
+ }
731
+ ]
732
+ }
733
+ ]
734
+ }
735
+ ]
736
+ ]
737
+ },
738
+ {
739
+ "from": "recording",
740
+ "to": "idle",
741
+ "event": "FAILED",
742
+ "effects": [
743
+ [
744
+ "set",
745
+ "@entity.error",
746
+ "@payload.error"
747
+ ],
748
+ [
749
+ "set",
750
+ "@entity.status",
751
+ "idle"
752
+ ],
753
+ [
754
+ "render-ui",
755
+ "main",
756
+ {
757
+ "type": "stack",
758
+ "direction": "vertical",
759
+ "gap": "lg",
760
+ "children": [
761
+ {
762
+ "type": "stack",
763
+ "direction": "horizontal",
764
+ "gap": "sm",
765
+ "align": "center",
766
+ "children": [
767
+ {
768
+ "type": "icon",
769
+ "name": "graduation-cap",
770
+ "size": "lg"
771
+ },
772
+ {
773
+ "type": "typography",
774
+ "content": "Outcome Learner",
775
+ "variant": "h2"
776
+ }
777
+ ]
778
+ },
779
+ {
780
+ "type": "divider"
781
+ },
782
+ {
783
+ "type": "simple-grid",
784
+ "columns": 3,
785
+ "children": [
786
+ {
787
+ "type": "stat-display",
788
+ "label": "Successes",
789
+ "value": "@entity.totalSuccesses",
790
+ "icon": "check-circle"
791
+ },
792
+ {
793
+ "type": "stat-display",
794
+ "label": "Failures",
795
+ "value": "@entity.totalFailures",
796
+ "icon": "x-circle"
797
+ },
798
+ {
799
+ "type": "stat-display",
800
+ "label": "Current Provider",
801
+ "value": "@entity.provider",
802
+ "icon": "cpu"
803
+ }
804
+ ]
805
+ },
806
+ {
807
+ "type": "divider"
808
+ },
809
+ {
810
+ "type": "card",
811
+ "children": [
812
+ {
813
+ "type": "stack",
814
+ "direction": "vertical",
815
+ "gap": "md",
816
+ "children": [
817
+ {
818
+ "type": "typography",
819
+ "content": "Listening for task outcomes...",
820
+ "variant": "body"
821
+ },
822
+ {
823
+ "type": "typography",
824
+ "content": "This module records TASK_SUCCEEDED and TASK_FAILED events automatically.",
825
+ "variant": "caption"
826
+ }
827
+ ]
828
+ }
829
+ ]
830
+ },
831
+ {
832
+ "type": "card",
833
+ "children": [
834
+ {
835
+ "type": "stack",
836
+ "direction": "vertical",
837
+ "gap": "sm",
838
+ "children": [
839
+ {
840
+ "type": "typography",
841
+ "content": "Last Outcome",
842
+ "variant": "caption"
843
+ },
844
+ {
845
+ "type": "typography",
846
+ "content": "@entity.outcome",
847
+ "variant": "body"
848
+ },
849
+ {
850
+ "type": "typography",
851
+ "content": "Impact Analysis",
852
+ "variant": "caption"
853
+ },
854
+ {
855
+ "type": "typography",
856
+ "content": "@entity.impact",
857
+ "variant": "body"
858
+ }
859
+ ]
860
+ }
861
+ ]
862
+ }
863
+ ]
864
+ }
865
+ ]
866
+ ]
867
+ },
868
+ {
869
+ "from": "analyzing",
870
+ "to": "idle",
871
+ "event": "FAILED",
872
+ "effects": [
873
+ [
874
+ "set",
875
+ "@entity.error",
876
+ "@payload.error"
877
+ ],
878
+ [
879
+ "set",
880
+ "@entity.status",
881
+ "idle"
882
+ ],
883
+ [
884
+ "render-ui",
885
+ "main",
886
+ {
887
+ "type": "stack",
888
+ "direction": "vertical",
889
+ "gap": "lg",
890
+ "children": [
891
+ {
892
+ "type": "stack",
893
+ "direction": "horizontal",
894
+ "gap": "sm",
895
+ "align": "center",
896
+ "children": [
897
+ {
898
+ "type": "icon",
899
+ "name": "graduation-cap",
900
+ "size": "lg"
901
+ },
902
+ {
903
+ "type": "typography",
904
+ "content": "Outcome Learner",
905
+ "variant": "h2"
906
+ }
907
+ ]
908
+ },
909
+ {
910
+ "type": "divider"
911
+ },
912
+ {
913
+ "type": "simple-grid",
914
+ "columns": 3,
915
+ "children": [
916
+ {
917
+ "type": "stat-display",
918
+ "label": "Successes",
919
+ "value": "@entity.totalSuccesses",
920
+ "icon": "check-circle"
921
+ },
922
+ {
923
+ "type": "stat-display",
924
+ "label": "Failures",
925
+ "value": "@entity.totalFailures",
926
+ "icon": "x-circle"
927
+ },
928
+ {
929
+ "type": "stat-display",
930
+ "label": "Current Provider",
931
+ "value": "@entity.provider",
932
+ "icon": "cpu"
933
+ }
934
+ ]
935
+ },
936
+ {
937
+ "type": "divider"
938
+ },
939
+ {
940
+ "type": "card",
941
+ "children": [
942
+ {
943
+ "type": "stack",
944
+ "direction": "vertical",
945
+ "gap": "md",
946
+ "children": [
947
+ {
948
+ "type": "typography",
949
+ "content": "Listening for task outcomes...",
950
+ "variant": "body"
951
+ },
952
+ {
953
+ "type": "typography",
954
+ "content": "This module records TASK_SUCCEEDED and TASK_FAILED events automatically.",
955
+ "variant": "caption"
956
+ }
957
+ ]
958
+ }
959
+ ]
960
+ },
961
+ {
962
+ "type": "card",
963
+ "children": [
964
+ {
965
+ "type": "stack",
966
+ "direction": "vertical",
967
+ "gap": "sm",
968
+ "children": [
969
+ {
970
+ "type": "typography",
971
+ "content": "Last Outcome",
972
+ "variant": "caption"
973
+ },
974
+ {
975
+ "type": "typography",
976
+ "content": "@entity.outcome",
977
+ "variant": "body"
978
+ },
979
+ {
980
+ "type": "typography",
981
+ "content": "Impact Analysis",
982
+ "variant": "caption"
983
+ },
984
+ {
985
+ "type": "typography",
986
+ "content": "@entity.impact",
987
+ "variant": "body"
988
+ }
989
+ ]
990
+ }
991
+ ]
992
+ }
993
+ ]
994
+ }
995
+ ]
996
+ ]
997
+ },
998
+ {
999
+ "from": "idle",
1000
+ "to": "idle",
1001
+ "event": "RESET",
1002
+ "effects": [
1003
+ [
1004
+ "set",
1005
+ "@entity.provider",
1006
+ [
1007
+ "agent/provider"
1008
+ ]
1009
+ ],
1010
+ [
1011
+ "render-ui",
1012
+ "main",
1013
+ {
1014
+ "type": "stack",
1015
+ "direction": "vertical",
1016
+ "gap": "lg",
1017
+ "children": [
1018
+ {
1019
+ "type": "stack",
1020
+ "direction": "horizontal",
1021
+ "gap": "sm",
1022
+ "align": "center",
1023
+ "children": [
1024
+ {
1025
+ "type": "icon",
1026
+ "name": "graduation-cap",
1027
+ "size": "lg"
1028
+ },
1029
+ {
1030
+ "type": "typography",
1031
+ "content": "Outcome Learner",
1032
+ "variant": "h2"
1033
+ }
1034
+ ]
1035
+ },
1036
+ {
1037
+ "type": "divider"
1038
+ },
1039
+ {
1040
+ "type": "simple-grid",
1041
+ "columns": 3,
1042
+ "children": [
1043
+ {
1044
+ "type": "stat-display",
1045
+ "label": "Successes",
1046
+ "value": "@entity.totalSuccesses",
1047
+ "icon": "check-circle"
1048
+ },
1049
+ {
1050
+ "type": "stat-display",
1051
+ "label": "Failures",
1052
+ "value": "@entity.totalFailures",
1053
+ "icon": "x-circle"
1054
+ },
1055
+ {
1056
+ "type": "stat-display",
1057
+ "label": "Current Provider",
1058
+ "value": "@entity.provider",
1059
+ "icon": "cpu"
1060
+ }
1061
+ ]
1062
+ },
1063
+ {
1064
+ "type": "divider"
1065
+ },
1066
+ {
1067
+ "type": "card",
1068
+ "children": [
1069
+ {
1070
+ "type": "stack",
1071
+ "direction": "vertical",
1072
+ "gap": "md",
1073
+ "children": [
1074
+ {
1075
+ "type": "typography",
1076
+ "content": "Listening for task outcomes...",
1077
+ "variant": "body"
1078
+ },
1079
+ {
1080
+ "type": "typography",
1081
+ "content": "This module records TASK_SUCCEEDED and TASK_FAILED events automatically.",
1082
+ "variant": "caption"
1083
+ }
1084
+ ]
1085
+ }
1086
+ ]
1087
+ },
1088
+ {
1089
+ "type": "card",
1090
+ "children": [
1091
+ {
1092
+ "type": "stack",
1093
+ "direction": "vertical",
1094
+ "gap": "sm",
1095
+ "children": [
1096
+ {
1097
+ "type": "typography",
1098
+ "content": "Last Outcome",
1099
+ "variant": "caption"
1100
+ },
1101
+ {
1102
+ "type": "typography",
1103
+ "content": "@entity.outcome",
1104
+ "variant": "body"
1105
+ },
1106
+ {
1107
+ "type": "typography",
1108
+ "content": "Impact Analysis",
1109
+ "variant": "caption"
1110
+ },
1111
+ {
1112
+ "type": "typography",
1113
+ "content": "@entity.impact",
1114
+ "variant": "body"
1115
+ }
1116
+ ]
1117
+ }
1118
+ ]
1119
+ }
1120
+ ]
1121
+ }
1122
+ ]
1123
+ ]
1124
+ }
1125
+ ]
1126
+ }
1127
+ }
1128
+ ],
1129
+ "pages": [
1130
+ {
1131
+ "name": "AgentLearnerPage",
1132
+ "path": "/agentlearners",
1133
+ "traits": [
1134
+ {
1135
+ "ref": "AgentLearnerLearner"
1136
+ }
1137
+ ]
1138
+ }
1139
+ ]
1140
+ }
1141
+ ],
1142
+ "description": "Composes memory management, LLM completion, and provider routing into an outcome learning pipeline. Listens for task success/failure events, memorizes outcomes, reinforces memories for successes, applies decay for failures, and adjusts provider routing based on accumulated results. Traits composed (inline, representing atom-level concerns): - LearnerMemory: memorize outcomes, reinforce/decay based on results - LearnerCompletion: analyze outcome impact via LLM - LearnerProvider: adjust provider routing based on success patterns"
1143
+ }