@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
@@ -67,6 +67,56 @@
67
67
  "name": "error",
68
68
  "type": "string",
69
69
  "default": ""
70
+ },
71
+ {
72
+ "name": "currentStep",
73
+ "type": "number",
74
+ "default": 0
75
+ },
76
+ {
77
+ "name": "totalSteps",
78
+ "type": "number",
79
+ "default": 4
80
+ },
81
+ {
82
+ "name": "steps",
83
+ "type": "string",
84
+ "default": "Validate,Analyze,Fix,Re-validate"
85
+ },
86
+ {
87
+ "name": "toolName",
88
+ "type": "string",
89
+ "default": ""
90
+ },
91
+ {
92
+ "name": "args",
93
+ "type": "string",
94
+ "default": ""
95
+ },
96
+ {
97
+ "name": "result",
98
+ "type": "string",
99
+ "default": ""
100
+ },
101
+ {
102
+ "name": "prompt",
103
+ "type": "string",
104
+ "default": ""
105
+ },
106
+ {
107
+ "name": "response",
108
+ "type": "string",
109
+ "default": ""
110
+ },
111
+ {
112
+ "name": "provider",
113
+ "type": "string",
114
+ "default": "anthropic"
115
+ },
116
+ {
117
+ "name": "model",
118
+ "type": "string",
119
+ "default": "claude-sonnet-4-20250514"
70
120
  }
71
121
  ]
72
122
  },
@@ -77,10 +127,40 @@
77
127
  "category": "interaction",
78
128
  "emits": [
79
129
  {
80
- "event": "FIX_SUCCEEDED"
130
+ "event": "FIX_SUCCEEDED",
131
+ "scope": "external",
132
+ "payload": [
133
+ {
134
+ "name": "target",
135
+ "type": "string"
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "event": "FIX_FAILED",
141
+ "scope": "external",
142
+ "payload": [
143
+ {
144
+ "name": "target",
145
+ "type": "string"
146
+ },
147
+ {
148
+ "name": "error",
149
+ "type": "string"
150
+ }
151
+ ]
152
+ }
153
+ ],
154
+ "listens": [
155
+ {
156
+ "event": "FIX_SUCCEEDED",
157
+ "triggers": "INIT",
158
+ "scope": "external"
81
159
  },
82
160
  {
83
- "event": "FIX_FAILED"
161
+ "event": "FIX_FAILED",
162
+ "triggers": "INIT",
163
+ "scope": "external"
84
164
  }
85
165
  ],
86
166
  "stateMachine": {
@@ -310,15 +390,15 @@
310
390
  {
311
391
  "type": "badge",
312
392
  "label": [
313
- "string/concat",
393
+ "str/concat",
314
394
  "Attempt ",
315
395
  [
316
- "string/of",
396
+ "str/concat",
317
397
  "@entity.fixAttempts"
318
398
  ],
319
399
  "/",
320
400
  [
321
- "string/of",
401
+ "str/concat",
322
402
  "@entity.maxAttempts"
323
403
  ]
324
404
  ]
@@ -440,7 +520,7 @@
440
520
  "event": "VALIDATION_ERRORS",
441
521
  "guards": [
442
522
  [
443
- "math/lt",
523
+ "<",
444
524
  "@entity.fixAttempts",
445
525
  5
446
526
  ]
@@ -460,7 +540,7 @@
460
540
  "set",
461
541
  "@entity.fixAttempts",
462
542
  [
463
- "math/add",
543
+ "+",
464
544
  "@entity.fixAttempts",
465
545
  1
466
546
  ]
@@ -473,7 +553,7 @@
473
553
  [
474
554
  "agent/generate",
475
555
  [
476
- "string/concat",
556
+ "str/concat",
477
557
  "Target: ",
478
558
  "@entity.target",
479
559
  "\n\nValidation errors:\n",
@@ -517,10 +597,10 @@
517
597
  {
518
598
  "type": "badge",
519
599
  "label": [
520
- "string/concat",
600
+ "str/concat",
521
601
  "Attempt ",
522
602
  [
523
- "string/of",
603
+ "str/concat",
524
604
  "@entity.fixAttempts"
525
605
  ]
526
606
  ]
@@ -782,15 +862,15 @@
782
862
  {
783
863
  "type": "badge",
784
864
  "label": [
785
- "string/concat",
865
+ "str/concat",
786
866
  "Attempt ",
787
867
  [
788
- "string/of",
868
+ "str/concat",
789
869
  "@entity.fixAttempts"
790
870
  ],
791
871
  "/",
792
872
  [
793
- "string/of",
873
+ "str/concat",
794
874
  "@entity.maxAttempts"
795
875
  ]
796
876
  ]
@@ -1194,20 +1274,1904 @@
1194
1274
  }
1195
1275
  ]
1196
1276
  }
1197
- }
1198
- ],
1199
- "pages": [
1277
+ },
1200
1278
  {
1201
- "name": "AgentFixLoopPage",
1202
- "path": "/agentfixloops",
1203
- "traits": [
1279
+ "name": "FixLoopStepProgress",
1280
+ "linkedEntity": "AgentFixLoop",
1281
+ "category": "interaction",
1282
+ "emits": [
1204
1283
  {
1205
- "ref": "AgentFixLoopCycle"
1284
+ "event": "ADVANCE",
1285
+ "scope": "internal",
1286
+ "payload": [
1287
+ {
1288
+ "name": "step",
1289
+ "type": "number"
1290
+ }
1291
+ ]
1292
+ },
1293
+ {
1294
+ "event": "COMPLETE",
1295
+ "scope": "internal",
1296
+ "payload": [
1297
+ {
1298
+ "name": "totalSteps",
1299
+ "type": "number"
1300
+ }
1301
+ ]
1302
+ },
1303
+ {
1304
+ "event": "FAIL",
1305
+ "scope": "internal",
1306
+ "payload": [
1307
+ {
1308
+ "name": "step",
1309
+ "type": "number"
1310
+ }
1311
+ ]
1312
+ }
1313
+ ],
1314
+ "stateMachine": {
1315
+ "states": [
1316
+ {
1317
+ "name": "idle",
1318
+ "isInitial": true
1319
+ },
1320
+ {
1321
+ "name": "in_progress"
1322
+ },
1323
+ {
1324
+ "name": "completed"
1325
+ },
1326
+ {
1327
+ "name": "failed"
1328
+ }
1329
+ ],
1330
+ "events": [
1331
+ {
1332
+ "key": "INIT",
1333
+ "name": "Initialize"
1334
+ },
1335
+ {
1336
+ "key": "START",
1337
+ "name": "Start Pipeline"
1338
+ },
1339
+ {
1340
+ "key": "ADVANCE",
1341
+ "name": "Advance Step"
1342
+ },
1343
+ {
1344
+ "key": "COMPLETE",
1345
+ "name": "Complete Pipeline"
1346
+ },
1347
+ {
1348
+ "key": "FAIL",
1349
+ "name": "Pipeline Failed"
1350
+ },
1351
+ {
1352
+ "key": "RESET",
1353
+ "name": "Reset Pipeline"
1354
+ }
1355
+ ],
1356
+ "transitions": [
1357
+ {
1358
+ "from": "idle",
1359
+ "to": "idle",
1360
+ "event": "INIT",
1361
+ "effects": [
1362
+ [
1363
+ "fetch",
1364
+ "AgentFixLoop"
1365
+ ],
1366
+ [
1367
+ "render-ui",
1368
+ "main",
1369
+ {
1370
+ "type": "stack",
1371
+ "direction": "vertical",
1372
+ "gap": "lg",
1373
+ "children": [
1374
+ {
1375
+ "type": "stack",
1376
+ "direction": "horizontal",
1377
+ "gap": "sm",
1378
+ "align": "center",
1379
+ "children": [
1380
+ {
1381
+ "type": "icon",
1382
+ "name": "list-ordered",
1383
+ "size": "lg"
1384
+ },
1385
+ {
1386
+ "type": "typography",
1387
+ "content": "AgentFixLoop",
1388
+ "variant": "h2"
1389
+ },
1390
+ {
1391
+ "type": "badge",
1392
+ "label": "Idle",
1393
+ "variant": "default"
1394
+ }
1395
+ ]
1396
+ },
1397
+ {
1398
+ "type": "divider"
1399
+ },
1400
+ {
1401
+ "type": "wizard-progress",
1402
+ "currentStep": "@entity.currentStep",
1403
+ "totalSteps": "@entity.totalSteps",
1404
+ "steps": "@entity.steps"
1405
+ },
1406
+ {
1407
+ "type": "button",
1408
+ "label": "Start",
1409
+ "event": "START",
1410
+ "variant": "primary",
1411
+ "icon": "play"
1412
+ }
1413
+ ]
1414
+ }
1415
+ ]
1416
+ ]
1417
+ },
1418
+ {
1419
+ "from": "idle",
1420
+ "to": "in_progress",
1421
+ "event": "START",
1422
+ "effects": [
1423
+ [
1424
+ "set",
1425
+ "@entity.status",
1426
+ "in_progress"
1427
+ ],
1428
+ [
1429
+ "set",
1430
+ "@entity.currentStep",
1431
+ 0
1432
+ ],
1433
+ [
1434
+ "render-ui",
1435
+ "main",
1436
+ {
1437
+ "type": "stack",
1438
+ "direction": "vertical",
1439
+ "gap": "lg",
1440
+ "children": [
1441
+ {
1442
+ "type": "stack",
1443
+ "direction": "horizontal",
1444
+ "gap": "sm",
1445
+ "align": "center",
1446
+ "children": [
1447
+ {
1448
+ "type": "icon",
1449
+ "name": "loader",
1450
+ "size": "lg"
1451
+ },
1452
+ {
1453
+ "type": "typography",
1454
+ "content": "AgentFixLoop",
1455
+ "variant": "h2"
1456
+ },
1457
+ {
1458
+ "type": "badge",
1459
+ "label": "In Progress",
1460
+ "variant": "warning"
1461
+ }
1462
+ ]
1463
+ },
1464
+ {
1465
+ "type": "divider"
1466
+ },
1467
+ {
1468
+ "type": "wizard-progress",
1469
+ "currentStep": "@entity.currentStep",
1470
+ "totalSteps": "@entity.totalSteps",
1471
+ "steps": "@entity.steps"
1472
+ },
1473
+ {
1474
+ "type": "stack",
1475
+ "direction": "horizontal",
1476
+ "gap": "sm",
1477
+ "align": "center",
1478
+ "children": [
1479
+ {
1480
+ "type": "stat-display",
1481
+ "label": "Current Step",
1482
+ "value": "@entity.currentStep"
1483
+ },
1484
+ {
1485
+ "type": "stat-display",
1486
+ "label": "Total Steps",
1487
+ "value": "@entity.totalSteps"
1488
+ }
1489
+ ]
1490
+ },
1491
+ {
1492
+ "type": "stack",
1493
+ "direction": "horizontal",
1494
+ "gap": "sm",
1495
+ "children": [
1496
+ {
1497
+ "type": "button",
1498
+ "label": "Advance",
1499
+ "event": "ADVANCE",
1500
+ "variant": "primary",
1501
+ "icon": "chevron-right"
1502
+ },
1503
+ {
1504
+ "type": "button",
1505
+ "label": "Reset",
1506
+ "event": "RESET",
1507
+ "variant": "ghost",
1508
+ "icon": "rotate-ccw"
1509
+ }
1510
+ ]
1511
+ }
1512
+ ]
1513
+ }
1514
+ ]
1515
+ ]
1516
+ },
1517
+ {
1518
+ "from": "in_progress",
1519
+ "to": "in_progress",
1520
+ "event": "ADVANCE",
1521
+ "guard": [
1522
+ "<",
1523
+ "@entity.currentStep",
1524
+ "@entity.totalSteps"
1525
+ ],
1526
+ "effects": [
1527
+ [
1528
+ "set",
1529
+ "@entity.currentStep",
1530
+ [
1531
+ "+",
1532
+ "@entity.currentStep",
1533
+ 1
1534
+ ]
1535
+ ],
1536
+ [
1537
+ "render-ui",
1538
+ "main",
1539
+ {
1540
+ "type": "stack",
1541
+ "direction": "vertical",
1542
+ "gap": "lg",
1543
+ "children": [
1544
+ {
1545
+ "type": "stack",
1546
+ "direction": "horizontal",
1547
+ "gap": "sm",
1548
+ "align": "center",
1549
+ "children": [
1550
+ {
1551
+ "type": "icon",
1552
+ "name": "loader",
1553
+ "size": "lg"
1554
+ },
1555
+ {
1556
+ "type": "typography",
1557
+ "content": "AgentFixLoop",
1558
+ "variant": "h2"
1559
+ },
1560
+ {
1561
+ "type": "badge",
1562
+ "label": "In Progress",
1563
+ "variant": "warning"
1564
+ }
1565
+ ]
1566
+ },
1567
+ {
1568
+ "type": "divider"
1569
+ },
1570
+ {
1571
+ "type": "wizard-progress",
1572
+ "currentStep": "@entity.currentStep",
1573
+ "totalSteps": "@entity.totalSteps",
1574
+ "steps": "@entity.steps"
1575
+ },
1576
+ {
1577
+ "type": "stack",
1578
+ "direction": "horizontal",
1579
+ "gap": "sm",
1580
+ "align": "center",
1581
+ "children": [
1582
+ {
1583
+ "type": "stat-display",
1584
+ "label": "Current Step",
1585
+ "value": "@entity.currentStep"
1586
+ },
1587
+ {
1588
+ "type": "stat-display",
1589
+ "label": "Total Steps",
1590
+ "value": "@entity.totalSteps"
1591
+ }
1592
+ ]
1593
+ },
1594
+ {
1595
+ "type": "stack",
1596
+ "direction": "horizontal",
1597
+ "gap": "sm",
1598
+ "children": [
1599
+ {
1600
+ "type": "button",
1601
+ "label": "Advance",
1602
+ "event": "ADVANCE",
1603
+ "variant": "primary",
1604
+ "icon": "chevron-right"
1605
+ },
1606
+ {
1607
+ "type": "button",
1608
+ "label": "Reset",
1609
+ "event": "RESET",
1610
+ "variant": "ghost",
1611
+ "icon": "rotate-ccw"
1612
+ }
1613
+ ]
1614
+ }
1615
+ ]
1616
+ }
1617
+ ]
1618
+ ]
1619
+ },
1620
+ {
1621
+ "from": "in_progress",
1622
+ "to": "completed",
1623
+ "event": "COMPLETE",
1624
+ "effects": [
1625
+ [
1626
+ "set",
1627
+ "@entity.status",
1628
+ "completed"
1629
+ ],
1630
+ [
1631
+ "set",
1632
+ "@entity.currentStep",
1633
+ "@entity.totalSteps"
1634
+ ],
1635
+ [
1636
+ "render-ui",
1637
+ "main",
1638
+ {
1639
+ "type": "stack",
1640
+ "direction": "vertical",
1641
+ "gap": "lg",
1642
+ "children": [
1643
+ {
1644
+ "type": "stack",
1645
+ "direction": "horizontal",
1646
+ "gap": "sm",
1647
+ "align": "center",
1648
+ "children": [
1649
+ {
1650
+ "type": "icon",
1651
+ "name": "check-circle",
1652
+ "size": "lg"
1653
+ },
1654
+ {
1655
+ "type": "typography",
1656
+ "content": "AgentFixLoop",
1657
+ "variant": "h2"
1658
+ },
1659
+ {
1660
+ "type": "badge",
1661
+ "label": "Completed",
1662
+ "variant": "success"
1663
+ }
1664
+ ]
1665
+ },
1666
+ {
1667
+ "type": "divider"
1668
+ },
1669
+ {
1670
+ "type": "wizard-progress",
1671
+ "currentStep": "@entity.totalSteps",
1672
+ "totalSteps": "@entity.totalSteps",
1673
+ "steps": "@entity.steps"
1674
+ },
1675
+ {
1676
+ "type": "alert",
1677
+ "variant": "success",
1678
+ "message": "All steps completed successfully."
1679
+ },
1680
+ {
1681
+ "type": "button",
1682
+ "label": "Reset",
1683
+ "event": "RESET",
1684
+ "variant": "ghost",
1685
+ "icon": "rotate-ccw"
1686
+ }
1687
+ ]
1688
+ }
1689
+ ]
1690
+ ]
1691
+ },
1692
+ {
1693
+ "from": "in_progress",
1694
+ "to": "failed",
1695
+ "event": "FAIL",
1696
+ "effects": [
1697
+ [
1698
+ "set",
1699
+ "@entity.status",
1700
+ "failed"
1701
+ ],
1702
+ [
1703
+ "render-ui",
1704
+ "main",
1705
+ {
1706
+ "type": "stack",
1707
+ "direction": "vertical",
1708
+ "gap": "lg",
1709
+ "children": [
1710
+ {
1711
+ "type": "stack",
1712
+ "direction": "horizontal",
1713
+ "gap": "sm",
1714
+ "align": "center",
1715
+ "children": [
1716
+ {
1717
+ "type": "icon",
1718
+ "name": "x-circle",
1719
+ "size": "lg"
1720
+ },
1721
+ {
1722
+ "type": "typography",
1723
+ "content": "AgentFixLoop",
1724
+ "variant": "h2"
1725
+ },
1726
+ {
1727
+ "type": "badge",
1728
+ "label": "Failed",
1729
+ "variant": "destructive"
1730
+ }
1731
+ ]
1732
+ },
1733
+ {
1734
+ "type": "divider"
1735
+ },
1736
+ {
1737
+ "type": "wizard-progress",
1738
+ "currentStep": "@entity.currentStep",
1739
+ "totalSteps": "@entity.totalSteps",
1740
+ "steps": "@entity.steps"
1741
+ },
1742
+ {
1743
+ "type": "alert",
1744
+ "variant": "error",
1745
+ "message": "Pipeline failed at the current step."
1746
+ },
1747
+ {
1748
+ "type": "stack",
1749
+ "direction": "horizontal",
1750
+ "gap": "sm",
1751
+ "children": [
1752
+ {
1753
+ "type": "stat-display",
1754
+ "label": "Failed At Step",
1755
+ "value": "@entity.currentStep"
1756
+ }
1757
+ ]
1758
+ },
1759
+ {
1760
+ "type": "button",
1761
+ "label": "Reset",
1762
+ "event": "RESET",
1763
+ "variant": "ghost",
1764
+ "icon": "rotate-ccw"
1765
+ }
1766
+ ]
1767
+ }
1768
+ ]
1769
+ ]
1770
+ },
1771
+ {
1772
+ "from": "idle",
1773
+ "to": "idle",
1774
+ "event": "RESET",
1775
+ "effects": [
1776
+ [
1777
+ "set",
1778
+ "@entity.status",
1779
+ "idle"
1780
+ ],
1781
+ [
1782
+ "set",
1783
+ "@entity.currentStep",
1784
+ 0
1785
+ ],
1786
+ [
1787
+ "render-ui",
1788
+ "main",
1789
+ {
1790
+ "type": "stack",
1791
+ "direction": "vertical",
1792
+ "gap": "lg",
1793
+ "children": [
1794
+ {
1795
+ "type": "stack",
1796
+ "direction": "horizontal",
1797
+ "gap": "sm",
1798
+ "align": "center",
1799
+ "children": [
1800
+ {
1801
+ "type": "icon",
1802
+ "name": "list-ordered",
1803
+ "size": "lg"
1804
+ },
1805
+ {
1806
+ "type": "typography",
1807
+ "content": "AgentFixLoop",
1808
+ "variant": "h2"
1809
+ },
1810
+ {
1811
+ "type": "badge",
1812
+ "label": "Idle",
1813
+ "variant": "default"
1814
+ }
1815
+ ]
1816
+ },
1817
+ {
1818
+ "type": "divider"
1819
+ },
1820
+ {
1821
+ "type": "wizard-progress",
1822
+ "currentStep": "@entity.currentStep",
1823
+ "totalSteps": "@entity.totalSteps",
1824
+ "steps": "@entity.steps"
1825
+ },
1826
+ {
1827
+ "type": "button",
1828
+ "label": "Start",
1829
+ "event": "START",
1830
+ "variant": "primary",
1831
+ "icon": "play"
1832
+ }
1833
+ ]
1834
+ }
1835
+ ]
1836
+ ]
1837
+ },
1838
+ {
1839
+ "from": "in_progress",
1840
+ "to": "idle",
1841
+ "event": "RESET",
1842
+ "effects": [
1843
+ [
1844
+ "set",
1845
+ "@entity.status",
1846
+ "idle"
1847
+ ],
1848
+ [
1849
+ "set",
1850
+ "@entity.currentStep",
1851
+ 0
1852
+ ],
1853
+ [
1854
+ "render-ui",
1855
+ "main",
1856
+ {
1857
+ "type": "stack",
1858
+ "direction": "vertical",
1859
+ "gap": "lg",
1860
+ "children": [
1861
+ {
1862
+ "type": "stack",
1863
+ "direction": "horizontal",
1864
+ "gap": "sm",
1865
+ "align": "center",
1866
+ "children": [
1867
+ {
1868
+ "type": "icon",
1869
+ "name": "list-ordered",
1870
+ "size": "lg"
1871
+ },
1872
+ {
1873
+ "type": "typography",
1874
+ "content": "AgentFixLoop",
1875
+ "variant": "h2"
1876
+ },
1877
+ {
1878
+ "type": "badge",
1879
+ "label": "Idle",
1880
+ "variant": "default"
1881
+ }
1882
+ ]
1883
+ },
1884
+ {
1885
+ "type": "divider"
1886
+ },
1887
+ {
1888
+ "type": "wizard-progress",
1889
+ "currentStep": "@entity.currentStep",
1890
+ "totalSteps": "@entity.totalSteps",
1891
+ "steps": "@entity.steps"
1892
+ },
1893
+ {
1894
+ "type": "button",
1895
+ "label": "Start",
1896
+ "event": "START",
1897
+ "variant": "primary",
1898
+ "icon": "play"
1899
+ }
1900
+ ]
1901
+ }
1902
+ ]
1903
+ ]
1904
+ },
1905
+ {
1906
+ "from": "completed",
1907
+ "to": "idle",
1908
+ "event": "RESET",
1909
+ "effects": [
1910
+ [
1911
+ "set",
1912
+ "@entity.status",
1913
+ "idle"
1914
+ ],
1915
+ [
1916
+ "set",
1917
+ "@entity.currentStep",
1918
+ 0
1919
+ ],
1920
+ [
1921
+ "render-ui",
1922
+ "main",
1923
+ {
1924
+ "type": "stack",
1925
+ "direction": "vertical",
1926
+ "gap": "lg",
1927
+ "children": [
1928
+ {
1929
+ "type": "stack",
1930
+ "direction": "horizontal",
1931
+ "gap": "sm",
1932
+ "align": "center",
1933
+ "children": [
1934
+ {
1935
+ "type": "icon",
1936
+ "name": "list-ordered",
1937
+ "size": "lg"
1938
+ },
1939
+ {
1940
+ "type": "typography",
1941
+ "content": "AgentFixLoop",
1942
+ "variant": "h2"
1943
+ },
1944
+ {
1945
+ "type": "badge",
1946
+ "label": "Idle",
1947
+ "variant": "default"
1948
+ }
1949
+ ]
1950
+ },
1951
+ {
1952
+ "type": "divider"
1953
+ },
1954
+ {
1955
+ "type": "wizard-progress",
1956
+ "currentStep": "@entity.currentStep",
1957
+ "totalSteps": "@entity.totalSteps",
1958
+ "steps": "@entity.steps"
1959
+ },
1960
+ {
1961
+ "type": "button",
1962
+ "label": "Start",
1963
+ "event": "START",
1964
+ "variant": "primary",
1965
+ "icon": "play"
1966
+ }
1967
+ ]
1968
+ }
1969
+ ]
1970
+ ]
1971
+ },
1972
+ {
1973
+ "from": "failed",
1974
+ "to": "idle",
1975
+ "event": "RESET",
1976
+ "effects": [
1977
+ [
1978
+ "set",
1979
+ "@entity.status",
1980
+ "idle"
1981
+ ],
1982
+ [
1983
+ "set",
1984
+ "@entity.currentStep",
1985
+ 0
1986
+ ],
1987
+ [
1988
+ "render-ui",
1989
+ "main",
1990
+ {
1991
+ "type": "stack",
1992
+ "direction": "vertical",
1993
+ "gap": "lg",
1994
+ "children": [
1995
+ {
1996
+ "type": "stack",
1997
+ "direction": "horizontal",
1998
+ "gap": "sm",
1999
+ "align": "center",
2000
+ "children": [
2001
+ {
2002
+ "type": "icon",
2003
+ "name": "list-ordered",
2004
+ "size": "lg"
2005
+ },
2006
+ {
2007
+ "type": "typography",
2008
+ "content": "AgentFixLoop",
2009
+ "variant": "h2"
2010
+ },
2011
+ {
2012
+ "type": "badge",
2013
+ "label": "Idle",
2014
+ "variant": "default"
2015
+ }
2016
+ ]
2017
+ },
2018
+ {
2019
+ "type": "divider"
2020
+ },
2021
+ {
2022
+ "type": "wizard-progress",
2023
+ "currentStep": "@entity.currentStep",
2024
+ "totalSteps": "@entity.totalSteps",
2025
+ "steps": "@entity.steps"
2026
+ },
2027
+ {
2028
+ "type": "button",
2029
+ "label": "Start",
2030
+ "event": "START",
2031
+ "variant": "primary",
2032
+ "icon": "play"
2033
+ }
2034
+ ]
2035
+ }
2036
+ ]
2037
+ ]
2038
+ }
2039
+ ]
2040
+ }
2041
+ },
2042
+ {
2043
+ "name": "FixLoopErrorsBrowse",
2044
+ "linkedEntity": "AgentFixLoop",
2045
+ "category": "interaction",
2046
+ "stateMachine": {
2047
+ "states": [
2048
+ {
2049
+ "name": "browsing",
2050
+ "isInitial": true
2051
+ }
2052
+ ],
2053
+ "events": [
2054
+ {
2055
+ "key": "INIT",
2056
+ "name": "Initialize"
2057
+ },
2058
+ {
2059
+ "key": "VIEW",
2060
+ "name": "VIEW",
2061
+ "payload": [
2062
+ {
2063
+ "name": "id",
2064
+ "type": "string",
2065
+ "required": true
2066
+ },
2067
+ {
2068
+ "name": "row",
2069
+ "type": "object"
2070
+ }
2071
+ ]
2072
+ }
2073
+ ],
2074
+ "transitions": [
2075
+ {
2076
+ "from": "browsing",
2077
+ "to": "browsing",
2078
+ "event": "INIT",
2079
+ "effects": [
2080
+ [
2081
+ "ref",
2082
+ "AgentFixLoop"
2083
+ ],
2084
+ [
2085
+ "render-ui",
2086
+ "main",
2087
+ {
2088
+ "type": "stack",
2089
+ "direction": "vertical",
2090
+ "gap": "lg",
2091
+ "className": "max-w-5xl mx-auto w-full",
2092
+ "children": [
2093
+ {
2094
+ "type": "stack",
2095
+ "direction": "horizontal",
2096
+ "gap": "md",
2097
+ "justify": "space-between",
2098
+ "align": "center",
2099
+ "children": [
2100
+ {
2101
+ "type": "stack",
2102
+ "direction": "horizontal",
2103
+ "gap": "sm",
2104
+ "align": "center",
2105
+ "children": [
2106
+ {
2107
+ "type": "icon",
2108
+ "name": "alert-triangle",
2109
+ "size": "lg"
2110
+ },
2111
+ {
2112
+ "type": "typography",
2113
+ "content": "Validation Errors",
2114
+ "variant": "h2"
2115
+ }
2116
+ ]
2117
+ }
2118
+ ]
2119
+ },
2120
+ {
2121
+ "type": "divider"
2122
+ },
2123
+ {
2124
+ "type": "data-grid",
2125
+ "entity": "AgentFixLoop",
2126
+ "emptyIcon": "inbox",
2127
+ "emptyTitle": "No errors",
2128
+ "emptyDescription": "All validations passed.",
2129
+ "itemActions": [
2130
+ {
2131
+ "label": "View",
2132
+ "event": "VIEW",
2133
+ "variant": "ghost",
2134
+ "size": "sm"
2135
+ }
2136
+ ],
2137
+ "columns": [
2138
+ {
2139
+ "name": "target",
2140
+ "label": "Target",
2141
+ "variant": "h4",
2142
+ "icon": "alert-triangle"
2143
+ },
2144
+ {
2145
+ "name": "errorCount",
2146
+ "label": "Error Count",
2147
+ "variant": "badge",
2148
+ "colorMap": {
2149
+ "active": "success",
2150
+ "completed": "success",
2151
+ "done": "success",
2152
+ "pending": "warning",
2153
+ "draft": "warning",
2154
+ "scheduled": "warning",
2155
+ "inactive": "neutral",
2156
+ "archived": "neutral",
2157
+ "disabled": "neutral",
2158
+ "error": "destructive",
2159
+ "cancelled": "destructive",
2160
+ "failed": "destructive"
2161
+ }
2162
+ },
2163
+ {
2164
+ "name": "status",
2165
+ "label": "Status",
2166
+ "variant": "caption"
2167
+ }
2168
+ ]
2169
+ },
2170
+ {
2171
+ "type": "floating-action-button",
2172
+ "icon": "plus",
2173
+ "event": "INIT",
2174
+ "label": "Create",
2175
+ "tooltip": "Create"
2176
+ }
2177
+ ]
2178
+ }
2179
+ ]
2180
+ ]
2181
+ }
2182
+ ]
2183
+ }
2184
+ },
2185
+ {
2186
+ "name": "FixLoopValidateCall",
2187
+ "linkedEntity": "AgentFixLoop",
2188
+ "category": "interaction",
2189
+ "emits": [
2190
+ {
2191
+ "event": "INVOKED",
2192
+ "scope": "internal"
2193
+ }
2194
+ ],
2195
+ "stateMachine": {
2196
+ "states": [
2197
+ {
2198
+ "name": "closed",
2199
+ "isInitial": true
2200
+ },
2201
+ {
2202
+ "name": "open"
2203
+ }
2204
+ ],
2205
+ "events": [
2206
+ {
2207
+ "key": "INIT",
2208
+ "name": "Initialize"
2209
+ },
2210
+ {
2211
+ "key": "INVOKE",
2212
+ "name": "Open"
2213
+ },
2214
+ {
2215
+ "key": "CLOSE",
2216
+ "name": "Close"
2217
+ },
2218
+ {
2219
+ "key": "SAVE",
2220
+ "name": "Save",
2221
+ "payload": [
2222
+ {
2223
+ "name": "data",
2224
+ "type": "object",
2225
+ "required": true
2226
+ }
2227
+ ]
2228
+ }
2229
+ ],
2230
+ "transitions": [
2231
+ {
2232
+ "from": "closed",
2233
+ "to": "closed",
2234
+ "event": "INIT",
2235
+ "effects": [
2236
+ [
2237
+ "ref",
2238
+ "AgentFixLoop"
2239
+ ],
2240
+ [
2241
+ "render-ui",
2242
+ "main",
2243
+ {
2244
+ "type": "stack",
2245
+ "direction": "vertical",
2246
+ "gap": "lg",
2247
+ "children": [
2248
+ {
2249
+ "type": "stack",
2250
+ "direction": "horizontal",
2251
+ "gap": "md",
2252
+ "justify": "space-between",
2253
+ "children": [
2254
+ {
2255
+ "type": "stack",
2256
+ "direction": "horizontal",
2257
+ "gap": "md",
2258
+ "children": [
2259
+ {
2260
+ "type": "icon",
2261
+ "name": "wrench",
2262
+ "size": "lg"
2263
+ },
2264
+ {
2265
+ "type": "typography",
2266
+ "content": "Invoke Tool",
2267
+ "variant": "h2"
2268
+ }
2269
+ ]
2270
+ },
2271
+ {
2272
+ "type": "button",
2273
+ "label": "Open",
2274
+ "event": "INVOKE",
2275
+ "variant": "primary",
2276
+ "icon": "wrench"
2277
+ }
2278
+ ]
2279
+ },
2280
+ {
2281
+ "type": "divider"
2282
+ },
2283
+ {
2284
+ "type": "empty-state",
2285
+ "icon": "wrench",
2286
+ "title": "Nothing open",
2287
+ "description": "Click Open to view details in a modal overlay."
2288
+ }
2289
+ ]
2290
+ }
2291
+ ]
2292
+ ]
2293
+ },
2294
+ {
2295
+ "from": "closed",
2296
+ "to": "open",
2297
+ "event": "INVOKE",
2298
+ "effects": [
2299
+ [
2300
+ "render-ui",
2301
+ "modal",
2302
+ {
2303
+ "type": "stack",
2304
+ "direction": "vertical",
2305
+ "gap": "md",
2306
+ "children": [
2307
+ {
2308
+ "type": "stack",
2309
+ "direction": "horizontal",
2310
+ "gap": "sm",
2311
+ "children": [
2312
+ {
2313
+ "type": "icon",
2314
+ "name": "wrench",
2315
+ "size": "md"
2316
+ },
2317
+ {
2318
+ "type": "typography",
2319
+ "content": "Invoke Tool",
2320
+ "variant": "h3"
2321
+ }
2322
+ ]
2323
+ },
2324
+ {
2325
+ "type": "divider"
2326
+ },
2327
+ {
2328
+ "type": "form-section",
2329
+ "entity": "AgentFixLoop",
2330
+ "mode": "create",
2331
+ "submitEvent": "SAVE",
2332
+ "cancelEvent": "CLOSE",
2333
+ "fields": [
2334
+ "toolName",
2335
+ "args"
2336
+ ]
2337
+ }
2338
+ ]
2339
+ }
2340
+ ]
2341
+ ]
2342
+ },
2343
+ {
2344
+ "from": "open",
2345
+ "to": "closed",
2346
+ "event": "CLOSE",
2347
+ "effects": [
2348
+ [
2349
+ "render-ui",
2350
+ "modal",
2351
+ null
2352
+ ],
2353
+ [
2354
+ "notify",
2355
+ "Cancelled",
2356
+ "info"
2357
+ ],
2358
+ [
2359
+ "ref",
2360
+ "AgentFixLoop"
2361
+ ],
2362
+ [
2363
+ "render-ui",
2364
+ "main",
2365
+ {
2366
+ "type": "stack",
2367
+ "direction": "vertical",
2368
+ "gap": "lg",
2369
+ "children": [
2370
+ {
2371
+ "type": "stack",
2372
+ "direction": "horizontal",
2373
+ "gap": "md",
2374
+ "justify": "space-between",
2375
+ "children": [
2376
+ {
2377
+ "type": "stack",
2378
+ "direction": "horizontal",
2379
+ "gap": "md",
2380
+ "children": [
2381
+ {
2382
+ "type": "icon",
2383
+ "name": "wrench",
2384
+ "size": "lg"
2385
+ },
2386
+ {
2387
+ "type": "typography",
2388
+ "content": "Invoke Tool",
2389
+ "variant": "h2"
2390
+ }
2391
+ ]
2392
+ },
2393
+ {
2394
+ "type": "button",
2395
+ "label": "Open",
2396
+ "event": "INVOKE",
2397
+ "variant": "primary",
2398
+ "icon": "wrench"
2399
+ }
2400
+ ]
2401
+ },
2402
+ {
2403
+ "type": "divider"
2404
+ },
2405
+ {
2406
+ "type": "empty-state",
2407
+ "icon": "wrench",
2408
+ "title": "Nothing open",
2409
+ "description": "Click Open to view details in a modal overlay."
2410
+ }
2411
+ ]
2412
+ }
2413
+ ]
2414
+ ]
2415
+ },
2416
+ {
2417
+ "from": "open",
2418
+ "to": "closed",
2419
+ "event": "SAVE",
2420
+ "effects": [
2421
+ [
2422
+ "persist",
2423
+ "create",
2424
+ "AgentFixLoop",
2425
+ "@payload.data"
2426
+ ],
2427
+ [
2428
+ "render-ui",
2429
+ "modal",
2430
+ null
2431
+ ],
2432
+ [
2433
+ "emit",
2434
+ "INVOKED"
2435
+ ],
2436
+ [
2437
+ "ref",
2438
+ "AgentFixLoop"
2439
+ ],
2440
+ [
2441
+ "render-ui",
2442
+ "main",
2443
+ {
2444
+ "type": "stack",
2445
+ "direction": "vertical",
2446
+ "gap": "lg",
2447
+ "children": [
2448
+ {
2449
+ "type": "stack",
2450
+ "direction": "horizontal",
2451
+ "gap": "md",
2452
+ "justify": "space-between",
2453
+ "children": [
2454
+ {
2455
+ "type": "stack",
2456
+ "direction": "horizontal",
2457
+ "gap": "md",
2458
+ "children": [
2459
+ {
2460
+ "type": "icon",
2461
+ "name": "wrench",
2462
+ "size": "lg"
2463
+ },
2464
+ {
2465
+ "type": "typography",
2466
+ "content": "Invoke Tool",
2467
+ "variant": "h2"
2468
+ }
2469
+ ]
2470
+ },
2471
+ {
2472
+ "type": "button",
2473
+ "label": "Open",
2474
+ "event": "INVOKE",
2475
+ "variant": "primary",
2476
+ "icon": "wrench"
2477
+ }
2478
+ ]
2479
+ },
2480
+ {
2481
+ "type": "divider"
2482
+ },
2483
+ {
2484
+ "type": "empty-state",
2485
+ "icon": "wrench",
2486
+ "title": "Nothing open",
2487
+ "description": "Click Open to view details in a modal overlay."
2488
+ }
2489
+ ]
2490
+ }
2491
+ ],
2492
+ [
2493
+ "notify",
2494
+ "AgentFixLoop created successfully"
2495
+ ]
2496
+ ]
2497
+ }
2498
+ ]
2499
+ }
2500
+ },
2501
+ {
2502
+ "name": "FixLoopFixCall",
2503
+ "linkedEntity": "AgentFixLoop",
2504
+ "category": "interaction",
2505
+ "emits": [
2506
+ {
2507
+ "event": "INVOKED",
2508
+ "scope": "internal"
2509
+ }
2510
+ ],
2511
+ "stateMachine": {
2512
+ "states": [
2513
+ {
2514
+ "name": "closed",
2515
+ "isInitial": true
2516
+ },
2517
+ {
2518
+ "name": "open"
2519
+ }
2520
+ ],
2521
+ "events": [
2522
+ {
2523
+ "key": "INIT",
2524
+ "name": "Initialize"
2525
+ },
2526
+ {
2527
+ "key": "INVOKE",
2528
+ "name": "Open"
2529
+ },
2530
+ {
2531
+ "key": "CLOSE",
2532
+ "name": "Close"
2533
+ },
2534
+ {
2535
+ "key": "SAVE",
2536
+ "name": "Save",
2537
+ "payload": [
2538
+ {
2539
+ "name": "data",
2540
+ "type": "object",
2541
+ "required": true
2542
+ }
2543
+ ]
2544
+ }
2545
+ ],
2546
+ "transitions": [
2547
+ {
2548
+ "from": "closed",
2549
+ "to": "closed",
2550
+ "event": "INIT",
2551
+ "effects": [
2552
+ [
2553
+ "ref",
2554
+ "AgentFixLoop"
2555
+ ],
2556
+ [
2557
+ "render-ui",
2558
+ "main",
2559
+ {
2560
+ "type": "stack",
2561
+ "direction": "vertical",
2562
+ "gap": "lg",
2563
+ "children": [
2564
+ {
2565
+ "type": "stack",
2566
+ "direction": "horizontal",
2567
+ "gap": "md",
2568
+ "justify": "space-between",
2569
+ "children": [
2570
+ {
2571
+ "type": "stack",
2572
+ "direction": "horizontal",
2573
+ "gap": "md",
2574
+ "children": [
2575
+ {
2576
+ "type": "icon",
2577
+ "name": "wrench",
2578
+ "size": "lg"
2579
+ },
2580
+ {
2581
+ "type": "typography",
2582
+ "content": "Invoke Tool",
2583
+ "variant": "h2"
2584
+ }
2585
+ ]
2586
+ },
2587
+ {
2588
+ "type": "button",
2589
+ "label": "Open",
2590
+ "event": "INVOKE",
2591
+ "variant": "primary",
2592
+ "icon": "wrench"
2593
+ }
2594
+ ]
2595
+ },
2596
+ {
2597
+ "type": "divider"
2598
+ },
2599
+ {
2600
+ "type": "empty-state",
2601
+ "icon": "wrench",
2602
+ "title": "Nothing open",
2603
+ "description": "Click Open to view details in a modal overlay."
2604
+ }
2605
+ ]
2606
+ }
2607
+ ]
2608
+ ]
2609
+ },
2610
+ {
2611
+ "from": "closed",
2612
+ "to": "open",
2613
+ "event": "INVOKE",
2614
+ "effects": [
2615
+ [
2616
+ "render-ui",
2617
+ "modal",
2618
+ {
2619
+ "type": "stack",
2620
+ "direction": "vertical",
2621
+ "gap": "md",
2622
+ "children": [
2623
+ {
2624
+ "type": "stack",
2625
+ "direction": "horizontal",
2626
+ "gap": "sm",
2627
+ "children": [
2628
+ {
2629
+ "type": "icon",
2630
+ "name": "wrench",
2631
+ "size": "md"
2632
+ },
2633
+ {
2634
+ "type": "typography",
2635
+ "content": "Invoke Tool",
2636
+ "variant": "h3"
2637
+ }
2638
+ ]
2639
+ },
2640
+ {
2641
+ "type": "divider"
2642
+ },
2643
+ {
2644
+ "type": "form-section",
2645
+ "entity": "AgentFixLoop",
2646
+ "mode": "create",
2647
+ "submitEvent": "SAVE",
2648
+ "cancelEvent": "CLOSE",
2649
+ "fields": [
2650
+ "toolName",
2651
+ "args"
2652
+ ]
2653
+ }
2654
+ ]
2655
+ }
2656
+ ]
2657
+ ]
2658
+ },
2659
+ {
2660
+ "from": "open",
2661
+ "to": "closed",
2662
+ "event": "CLOSE",
2663
+ "effects": [
2664
+ [
2665
+ "render-ui",
2666
+ "modal",
2667
+ null
2668
+ ],
2669
+ [
2670
+ "notify",
2671
+ "Cancelled",
2672
+ "info"
2673
+ ],
2674
+ [
2675
+ "ref",
2676
+ "AgentFixLoop"
2677
+ ],
2678
+ [
2679
+ "render-ui",
2680
+ "main",
2681
+ {
2682
+ "type": "stack",
2683
+ "direction": "vertical",
2684
+ "gap": "lg",
2685
+ "children": [
2686
+ {
2687
+ "type": "stack",
2688
+ "direction": "horizontal",
2689
+ "gap": "md",
2690
+ "justify": "space-between",
2691
+ "children": [
2692
+ {
2693
+ "type": "stack",
2694
+ "direction": "horizontal",
2695
+ "gap": "md",
2696
+ "children": [
2697
+ {
2698
+ "type": "icon",
2699
+ "name": "wrench",
2700
+ "size": "lg"
2701
+ },
2702
+ {
2703
+ "type": "typography",
2704
+ "content": "Invoke Tool",
2705
+ "variant": "h2"
2706
+ }
2707
+ ]
2708
+ },
2709
+ {
2710
+ "type": "button",
2711
+ "label": "Open",
2712
+ "event": "INVOKE",
2713
+ "variant": "primary",
2714
+ "icon": "wrench"
2715
+ }
2716
+ ]
2717
+ },
2718
+ {
2719
+ "type": "divider"
2720
+ },
2721
+ {
2722
+ "type": "empty-state",
2723
+ "icon": "wrench",
2724
+ "title": "Nothing open",
2725
+ "description": "Click Open to view details in a modal overlay."
2726
+ }
2727
+ ]
2728
+ }
2729
+ ]
2730
+ ]
2731
+ },
2732
+ {
2733
+ "from": "open",
2734
+ "to": "closed",
2735
+ "event": "SAVE",
2736
+ "effects": [
2737
+ [
2738
+ "persist",
2739
+ "create",
2740
+ "AgentFixLoop",
2741
+ "@payload.data"
2742
+ ],
2743
+ [
2744
+ "render-ui",
2745
+ "modal",
2746
+ null
2747
+ ],
2748
+ [
2749
+ "emit",
2750
+ "INVOKED"
2751
+ ],
2752
+ [
2753
+ "ref",
2754
+ "AgentFixLoop"
2755
+ ],
2756
+ [
2757
+ "render-ui",
2758
+ "main",
2759
+ {
2760
+ "type": "stack",
2761
+ "direction": "vertical",
2762
+ "gap": "lg",
2763
+ "children": [
2764
+ {
2765
+ "type": "stack",
2766
+ "direction": "horizontal",
2767
+ "gap": "md",
2768
+ "justify": "space-between",
2769
+ "children": [
2770
+ {
2771
+ "type": "stack",
2772
+ "direction": "horizontal",
2773
+ "gap": "md",
2774
+ "children": [
2775
+ {
2776
+ "type": "icon",
2777
+ "name": "wrench",
2778
+ "size": "lg"
2779
+ },
2780
+ {
2781
+ "type": "typography",
2782
+ "content": "Invoke Tool",
2783
+ "variant": "h2"
2784
+ }
2785
+ ]
2786
+ },
2787
+ {
2788
+ "type": "button",
2789
+ "label": "Open",
2790
+ "event": "INVOKE",
2791
+ "variant": "primary",
2792
+ "icon": "wrench"
2793
+ }
2794
+ ]
2795
+ },
2796
+ {
2797
+ "type": "divider"
2798
+ },
2799
+ {
2800
+ "type": "empty-state",
2801
+ "icon": "wrench",
2802
+ "title": "Nothing open",
2803
+ "description": "Click Open to view details in a modal overlay."
2804
+ }
2805
+ ]
2806
+ }
2807
+ ],
2808
+ [
2809
+ "notify",
2810
+ "AgentFixLoop created successfully"
2811
+ ]
2812
+ ]
2813
+ }
2814
+ ]
2815
+ }
2816
+ },
2817
+ {
2818
+ "name": "FixLoopCompletionFlow",
2819
+ "linkedEntity": "AgentFixLoop",
2820
+ "category": "interaction",
2821
+ "emits": [
2822
+ {
2823
+ "event": "GENERATED",
2824
+ "scope": "internal"
2825
+ }
2826
+ ],
2827
+ "stateMachine": {
2828
+ "states": [
2829
+ {
2830
+ "name": "closed",
2831
+ "isInitial": true
2832
+ },
2833
+ {
2834
+ "name": "open"
2835
+ }
2836
+ ],
2837
+ "events": [
2838
+ {
2839
+ "key": "INIT",
2840
+ "name": "Initialize"
2841
+ },
2842
+ {
2843
+ "key": "GENERATE",
2844
+ "name": "Open"
2845
+ },
2846
+ {
2847
+ "key": "CLOSE",
2848
+ "name": "Close"
2849
+ },
2850
+ {
2851
+ "key": "SAVE",
2852
+ "name": "Save",
2853
+ "payload": [
2854
+ {
2855
+ "name": "data",
2856
+ "type": "object",
2857
+ "required": true
2858
+ }
2859
+ ]
2860
+ }
2861
+ ],
2862
+ "transitions": [
2863
+ {
2864
+ "from": "closed",
2865
+ "to": "closed",
2866
+ "event": "INIT",
2867
+ "effects": [
2868
+ [
2869
+ "ref",
2870
+ "AgentFixLoop"
2871
+ ],
2872
+ [
2873
+ "render-ui",
2874
+ "main",
2875
+ {
2876
+ "type": "stack",
2877
+ "direction": "vertical",
2878
+ "gap": "lg",
2879
+ "children": [
2880
+ {
2881
+ "type": "stack",
2882
+ "direction": "horizontal",
2883
+ "gap": "md",
2884
+ "justify": "space-between",
2885
+ "children": [
2886
+ {
2887
+ "type": "stack",
2888
+ "direction": "horizontal",
2889
+ "gap": "md",
2890
+ "children": [
2891
+ {
2892
+ "type": "icon",
2893
+ "name": "sparkles",
2894
+ "size": "lg"
2895
+ },
2896
+ {
2897
+ "type": "typography",
2898
+ "content": "AgentFixLoop",
2899
+ "variant": "h2"
2900
+ }
2901
+ ]
2902
+ },
2903
+ {
2904
+ "type": "button",
2905
+ "label": "Open",
2906
+ "event": "GENERATE",
2907
+ "variant": "primary",
2908
+ "icon": "sparkles"
2909
+ }
2910
+ ]
2911
+ },
2912
+ {
2913
+ "type": "divider"
2914
+ },
2915
+ {
2916
+ "type": "empty-state",
2917
+ "icon": "sparkles",
2918
+ "title": "Nothing open",
2919
+ "description": "Click Open to view details in a modal overlay."
2920
+ }
2921
+ ]
2922
+ }
2923
+ ]
2924
+ ]
2925
+ },
2926
+ {
2927
+ "from": "closed",
2928
+ "to": "open",
2929
+ "event": "GENERATE",
2930
+ "effects": [
2931
+ [
2932
+ "render-ui",
2933
+ "modal",
2934
+ {
2935
+ "type": "stack",
2936
+ "direction": "vertical",
2937
+ "gap": "md",
2938
+ "children": [
2939
+ {
2940
+ "type": "stack",
2941
+ "direction": "horizontal",
2942
+ "gap": "sm",
2943
+ "children": [
2944
+ {
2945
+ "type": "icon",
2946
+ "name": "sparkles",
2947
+ "size": "md"
2948
+ },
2949
+ {
2950
+ "type": "typography",
2951
+ "content": "AgentFixLoop",
2952
+ "variant": "h3"
2953
+ }
2954
+ ]
2955
+ },
2956
+ {
2957
+ "type": "divider"
2958
+ },
2959
+ {
2960
+ "type": "stack",
2961
+ "direction": "horizontal",
2962
+ "gap": "sm",
2963
+ "children": [
2964
+ {
2965
+ "type": "badge",
2966
+ "label": "@entity.provider"
2967
+ },
2968
+ {
2969
+ "type": "badge",
2970
+ "label": "@entity.model"
2971
+ }
2972
+ ]
2973
+ },
2974
+ {
2975
+ "type": "form-section",
2976
+ "entity": "AgentFixLoop",
2977
+ "mode": "create",
2978
+ "submitEvent": "SAVE",
2979
+ "cancelEvent": "CLOSE",
2980
+ "fields": [
2981
+ "prompt"
2982
+ ]
2983
+ }
2984
+ ]
2985
+ }
2986
+ ]
2987
+ ]
2988
+ },
2989
+ {
2990
+ "from": "open",
2991
+ "to": "closed",
2992
+ "event": "CLOSE",
2993
+ "effects": [
2994
+ [
2995
+ "render-ui",
2996
+ "modal",
2997
+ null
2998
+ ],
2999
+ [
3000
+ "notify",
3001
+ "Cancelled",
3002
+ "info"
3003
+ ],
3004
+ [
3005
+ "ref",
3006
+ "AgentFixLoop"
3007
+ ],
3008
+ [
3009
+ "render-ui",
3010
+ "main",
3011
+ {
3012
+ "type": "stack",
3013
+ "direction": "vertical",
3014
+ "gap": "lg",
3015
+ "children": [
3016
+ {
3017
+ "type": "stack",
3018
+ "direction": "horizontal",
3019
+ "gap": "md",
3020
+ "justify": "space-between",
3021
+ "children": [
3022
+ {
3023
+ "type": "stack",
3024
+ "direction": "horizontal",
3025
+ "gap": "md",
3026
+ "children": [
3027
+ {
3028
+ "type": "icon",
3029
+ "name": "sparkles",
3030
+ "size": "lg"
3031
+ },
3032
+ {
3033
+ "type": "typography",
3034
+ "content": "AgentFixLoop",
3035
+ "variant": "h2"
3036
+ }
3037
+ ]
3038
+ },
3039
+ {
3040
+ "type": "button",
3041
+ "label": "Open",
3042
+ "event": "GENERATE",
3043
+ "variant": "primary",
3044
+ "icon": "sparkles"
3045
+ }
3046
+ ]
3047
+ },
3048
+ {
3049
+ "type": "divider"
3050
+ },
3051
+ {
3052
+ "type": "empty-state",
3053
+ "icon": "sparkles",
3054
+ "title": "Nothing open",
3055
+ "description": "Click Open to view details in a modal overlay."
3056
+ }
3057
+ ]
3058
+ }
3059
+ ]
3060
+ ]
3061
+ },
3062
+ {
3063
+ "from": "open",
3064
+ "to": "closed",
3065
+ "event": "SAVE",
3066
+ "effects": [
3067
+ [
3068
+ "persist",
3069
+ "create",
3070
+ "AgentFixLoop",
3071
+ "@payload.data"
3072
+ ],
3073
+ [
3074
+ "render-ui",
3075
+ "modal",
3076
+ null
3077
+ ],
3078
+ [
3079
+ "emit",
3080
+ "GENERATED"
3081
+ ],
3082
+ [
3083
+ "ref",
3084
+ "AgentFixLoop"
3085
+ ],
3086
+ [
3087
+ "render-ui",
3088
+ "main",
3089
+ {
3090
+ "type": "stack",
3091
+ "direction": "vertical",
3092
+ "gap": "lg",
3093
+ "children": [
3094
+ {
3095
+ "type": "stack",
3096
+ "direction": "horizontal",
3097
+ "gap": "md",
3098
+ "justify": "space-between",
3099
+ "children": [
3100
+ {
3101
+ "type": "stack",
3102
+ "direction": "horizontal",
3103
+ "gap": "md",
3104
+ "children": [
3105
+ {
3106
+ "type": "icon",
3107
+ "name": "sparkles",
3108
+ "size": "lg"
3109
+ },
3110
+ {
3111
+ "type": "typography",
3112
+ "content": "AgentFixLoop",
3113
+ "variant": "h2"
3114
+ }
3115
+ ]
3116
+ },
3117
+ {
3118
+ "type": "button",
3119
+ "label": "Open",
3120
+ "event": "GENERATE",
3121
+ "variant": "primary",
3122
+ "icon": "sparkles"
3123
+ }
3124
+ ]
3125
+ },
3126
+ {
3127
+ "type": "divider"
3128
+ },
3129
+ {
3130
+ "type": "empty-state",
3131
+ "icon": "sparkles",
3132
+ "title": "Nothing open",
3133
+ "description": "Click Open to view details in a modal overlay."
3134
+ }
3135
+ ]
3136
+ }
3137
+ ],
3138
+ [
3139
+ "notify",
3140
+ "AgentFixLoop created successfully"
3141
+ ]
3142
+ ]
3143
+ }
3144
+ ]
3145
+ }
3146
+ }
3147
+ ],
3148
+ "pages": [
3149
+ {
3150
+ "name": "AgentFixLoopPage",
3151
+ "path": "/agentfixloops",
3152
+ "traits": [
3153
+ {
3154
+ "ref": "AgentFixLoopCycle"
3155
+ },
3156
+ {
3157
+ "ref": "FixLoopStepProgress"
3158
+ },
3159
+ {
3160
+ "ref": "FixLoopErrorsBrowse"
3161
+ },
3162
+ {
3163
+ "ref": "FixLoopValidateCall"
3164
+ },
3165
+ {
3166
+ "ref": "FixLoopFixCall"
3167
+ },
3168
+ {
3169
+ "ref": "FixLoopCompletionFlow"
1206
3170
  }
1207
3171
  ]
1208
3172
  }
1209
3173
  ]
1210
3174
  }
1211
3175
  ],
1212
- "description": "Composes tool invocation (validate + fix) and LLM completion into an iterative validation-fix loop. Validates a target, and if errors are found, generates a fix via LLM, applies it via tool invocation, then re-validates. Loops up to maxAttempts rounds (default 5). Traits composed (inline, representing atom-level concerns): - FixLoopValidate: tool invocation for running validation - FixLoopFix: LLM completion to generate fixes + tool invocation to apply - FixLoopOrchestrator: state machine orchestrating the validate-fix cycle"
3176
+ "description": "Composes agent atoms + UI atoms into an iterative validation-fix loop with step progress tracking and an errors browse list. Validates a target, generates a fix via LLM, applies it via tool invocation, then re-validates. Composed atoms: - stdAgentToolCall (validate): run validation tool - stdAgentToolCall (fix): apply generated fix - stdAgentCompletion: generate fix via LLM - stdAgentStepProgress: visual step indicator - stdBrowse: browsable errors list"
1213
3177
  }