@almadar/std 3.13.0 → 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 +606 -137
  4. package/behaviors/exports/atoms/std-agent-completion.orb +646 -182
  5. package/behaviors/exports/atoms/std-agent-context-window.orb +1762 -258
  6. package/behaviors/exports/atoms/std-agent-conversation.orb +652 -369
  7. package/behaviors/exports/atoms/std-agent-memory.orb +574 -322
  8. package/behaviors/exports/atoms/std-agent-provider.orb +632 -136
  9. package/behaviors/exports/atoms/std-agent-search.orb +228 -198
  10. package/behaviors/exports/atoms/std-agent-session.orb +569 -559
  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 +983 -126
  14. package/behaviors/exports/molecules/std-agent-fix-loop.orb +1985 -21
  15. package/behaviors/exports/molecules/std-agent-learner.orb +1830 -23
  16. package/behaviors/exports/molecules/std-agent-planner.orb +1776 -19
  17. package/behaviors/exports/molecules/std-agent-rag.orb +1150 -15
  18. package/behaviors/exports/molecules/std-agent-tool-loop.orb +3643 -23
  19. package/behaviors/exports/organisms/std-agent-assistant.orb +5308 -1156
  20. package/behaviors/exports/organisms/std-agent-builder.orb +13525 -1326
  21. package/behaviors/exports/organisms/std-agent-pipeline.orb +10731 -1088
  22. package/behaviors/exports/organisms/std-agent-reviewer.orb +4187 -525
  23. package/behaviors/exports/organisms/std-agent-tutor.orb +3126 -322
  24. package/behaviors/exports/validation-report.json +1 -1426
  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 +606 -137
  28. package/dist/behaviors/exports/atoms/std-agent-completion.orb +646 -182
  29. package/dist/behaviors/exports/atoms/std-agent-context-window.orb +1762 -258
  30. package/dist/behaviors/exports/atoms/std-agent-conversation.orb +652 -369
  31. package/dist/behaviors/exports/atoms/std-agent-memory.orb +574 -322
  32. package/dist/behaviors/exports/atoms/std-agent-provider.orb +632 -136
  33. package/dist/behaviors/exports/atoms/std-agent-search.orb +228 -198
  34. package/dist/behaviors/exports/atoms/std-agent-session.orb +569 -559
  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 +983 -126
  38. package/dist/behaviors/exports/molecules/std-agent-fix-loop.orb +1985 -21
  39. package/dist/behaviors/exports/molecules/std-agent-learner.orb +1830 -23
  40. package/dist/behaviors/exports/molecules/std-agent-planner.orb +1776 -19
  41. package/dist/behaviors/exports/molecules/std-agent-rag.orb +1150 -15
  42. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +3643 -23
  43. package/dist/behaviors/exports/organisms/std-agent-assistant.orb +5308 -1156
  44. package/dist/behaviors/exports/organisms/std-agent-builder.orb +13525 -1326
  45. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +10731 -1088
  46. package/dist/behaviors/exports/organisms/std-agent-reviewer.orb +4187 -525
  47. package/dist/behaviors/exports/organisms/std-agent-tutor.orb +3126 -322
  48. package/dist/behaviors/exports/validation-report.json +1 -1426
  49. package/dist/behaviors/exports-reader.js +4860 -4176
  50. package/dist/behaviors/exports-reader.js.map +1 -1
  51. package/dist/behaviors/functions/index.d.ts +259 -98
  52. package/dist/behaviors/functions/index.js +4845 -4177
  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 +4863 -4179
  56. package/dist/behaviors/index.js.map +1 -1
  57. package/dist/behaviors/query.js +4862 -4178
  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 +606 -137
  62. package/dist/exports/atoms/std-agent-completion.orb +646 -182
  63. package/dist/exports/atoms/std-agent-context-window.orb +1762 -258
  64. package/dist/exports/atoms/std-agent-conversation.orb +652 -369
  65. package/dist/exports/atoms/std-agent-memory.orb +574 -322
  66. package/dist/exports/atoms/std-agent-provider.orb +632 -136
  67. package/dist/exports/atoms/std-agent-search.orb +228 -198
  68. package/dist/exports/atoms/std-agent-session.orb +569 -559
  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 +983 -126
  72. package/dist/exports/molecules/std-agent-fix-loop.orb +1985 -21
  73. package/dist/exports/molecules/std-agent-learner.orb +1830 -23
  74. package/dist/exports/molecules/std-agent-planner.orb +1776 -19
  75. package/dist/exports/molecules/std-agent-rag.orb +1150 -15
  76. package/dist/exports/molecules/std-agent-tool-loop.orb +3643 -23
  77. package/dist/exports/organisms/std-agent-assistant.orb +5308 -1156
  78. package/dist/exports/organisms/std-agent-builder.orb +13525 -1326
  79. package/dist/exports/organisms/std-agent-pipeline.orb +10731 -1088
  80. package/dist/exports/organisms/std-agent-reviewer.orb +4187 -525
  81. package/dist/exports/organisms/std-agent-tutor.orb +3126 -322
  82. package/dist/exports/validation-report.json +1 -1426
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.js +4864 -4180
  85. package/dist/index.js.map +1 -1
  86. package/package.json +1 -1
@@ -82,6 +82,81 @@
82
82
  "name": "error",
83
83
  "type": "string",
84
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
85
160
  }
86
161
  ]
87
162
  },
@@ -90,14 +165,46 @@
90
165
  "name": "AgentLearnerLearner",
91
166
  "linkedEntity": "AgentLearner",
92
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
+ ],
93
198
  "listens": [
94
199
  {
95
200
  "event": "TASK_SUCCEEDED",
96
- "triggers": "TASK_SUCCEEDED"
201
+ "triggers": "TASK_SUCCEEDED",
202
+ "scope": "external"
97
203
  },
98
204
  {
99
205
  "event": "TASK_FAILED",
100
- "triggers": "TASK_FAILED"
206
+ "triggers": "TASK_FAILED",
207
+ "scope": "external"
101
208
  }
102
209
  ],
103
210
  "stateMachine": {
@@ -345,7 +452,7 @@
345
452
  "set",
346
453
  "@entity.totalSuccesses",
347
454
  [
348
- "math/add",
455
+ "+",
349
456
  "@entity.totalSuccesses",
350
457
  1
351
458
  ]
@@ -358,7 +465,7 @@
358
465
  [
359
466
  "agent/memorize",
360
467
  [
361
- "string/concat",
468
+ "str/concat",
362
469
  "Success: ",
363
470
  "@payload.outcome"
364
471
  ],
@@ -420,7 +527,7 @@
420
527
  "set",
421
528
  "@entity.consecutiveFailures",
422
529
  [
423
- "math/add",
530
+ "+",
424
531
  "@entity.consecutiveFailures",
425
532
  1
426
533
  ]
@@ -429,7 +536,7 @@
429
536
  "set",
430
537
  "@entity.totalFailures",
431
538
  [
432
- "math/add",
539
+ "+",
433
540
  "@entity.totalFailures",
434
541
  1
435
542
  ]
@@ -442,7 +549,7 @@
442
549
  [
443
550
  "agent/memorize",
444
551
  [
445
- "string/concat",
552
+ "str/concat",
446
553
  "Failure: ",
447
554
  "@payload.outcome"
448
555
  ],
@@ -491,7 +598,7 @@
491
598
  "@payload.memoryId"
492
599
  ],
493
600
  [
494
- "cond",
601
+ "if",
495
602
  "@entity.isSuccess",
496
603
  [
497
604
  "agent/reinforce",
@@ -502,15 +609,19 @@
502
609
  ]
503
610
  ],
504
611
  [
505
- "cond",
612
+ "if",
506
613
  [
507
- "math/gte",
614
+ ">=",
508
615
  "@entity.consecutiveFailures",
509
616
  3
510
617
  ],
511
618
  [
512
619
  "agent/switch-provider",
513
620
  "anthropic"
621
+ ],
622
+ [
623
+ "log",
624
+ "No provider switch needed"
514
625
  ]
515
626
  ],
516
627
  [
@@ -521,7 +632,7 @@
521
632
  [
522
633
  "agent/generate",
523
634
  [
524
- "string/concat",
635
+ "str/concat",
525
636
  "Outcome: ",
526
637
  "@entity.outcome",
527
638
  "\n",
@@ -530,7 +641,7 @@
530
641
  "\n",
531
642
  "Result: ",
532
643
  [
533
- "cond",
644
+ "if",
534
645
  "@entity.isSuccess",
535
646
  "success",
536
647
  "failure"
@@ -538,7 +649,7 @@
538
649
  "\n",
539
650
  "Consecutive failures: ",
540
651
  [
541
- "string/of",
652
+ "str/concat",
542
653
  "@entity.consecutiveFailures"
543
654
  ],
544
655
  "\n\n",
@@ -577,7 +688,7 @@
577
688
  {
578
689
  "type": "badge",
579
690
  "label": [
580
- "string/concat",
691
+ "str/concat",
581
692
  "Category: ",
582
693
  "@entity.category"
583
694
  ]
@@ -585,7 +696,7 @@
585
696
  {
586
697
  "type": "badge",
587
698
  "label": [
588
- "cond",
699
+ "if",
589
700
  "@entity.isSuccess",
590
701
  "Success",
591
702
  "Failure"
@@ -1124,20 +1235,1716 @@
1124
1235
  }
1125
1236
  ]
1126
1237
  }
1127
- }
1128
- ],
1129
- "pages": [
1238
+ },
1130
1239
  {
1131
- "name": "AgentLearnerPage",
1132
- "path": "/agentlearners",
1133
- "traits": [
1240
+ "name": "LearnerActivityLog",
1241
+ "linkedEntity": "AgentLearner",
1242
+ "category": "interaction",
1243
+ "emits": [
1134
1244
  {
1135
- "ref": "AgentLearnerLearner"
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"
1136
2943
  }
1137
2944
  ]
1138
2945
  }
1139
2946
  ]
1140
2947
  }
1141
2948
  ],
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"
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"
1143
2950
  }