@almadar/std 3.12.2 → 3.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/behaviors/exports/atoms/std-agent-activity-log.orb +559 -0
  2. package/behaviors/exports/atoms/std-agent-chat-thread.orb +774 -0
  3. package/behaviors/exports/atoms/std-agent-classifier.orb +871 -0
  4. package/behaviors/exports/atoms/std-agent-completion.orb +933 -0
  5. package/behaviors/exports/atoms/std-agent-context-window.orb +2294 -0
  6. package/behaviors/exports/atoms/std-agent-conversation.orb +1020 -0
  7. package/behaviors/exports/atoms/std-agent-memory.orb +879 -0
  8. package/behaviors/exports/atoms/std-agent-provider.orb +898 -0
  9. package/behaviors/exports/atoms/std-agent-search.orb +448 -0
  10. package/behaviors/exports/atoms/std-agent-session.orb +835 -0
  11. package/behaviors/exports/atoms/std-agent-step-progress.orb +850 -0
  12. package/behaviors/exports/atoms/std-agent-token-gauge.orb +1616 -0
  13. package/behaviors/exports/atoms/std-agent-tool-call.orb +1237 -0
  14. package/behaviors/exports/molecules/std-agent-fix-loop.orb +3177 -0
  15. package/behaviors/exports/molecules/std-agent-learner.orb +2950 -0
  16. package/behaviors/exports/molecules/std-agent-planner.orb +2655 -0
  17. package/behaviors/exports/molecules/std-agent-rag.orb +1871 -0
  18. package/behaviors/exports/molecules/std-agent-tool-loop.orb +4857 -0
  19. package/behaviors/exports/organisms/std-agent-assistant.orb +6440 -0
  20. package/behaviors/exports/organisms/std-agent-builder.orb +14863 -0
  21. package/behaviors/exports/organisms/std-agent-pipeline.orb +11950 -0
  22. package/behaviors/exports/organisms/std-agent-reviewer.orb +5405 -0
  23. package/behaviors/exports/organisms/std-agent-tutor.orb +5107 -0
  24. package/behaviors/exports/validation-report.json +2 -1099
  25. package/dist/behaviors/exports/atoms/std-agent-activity-log.orb +559 -0
  26. package/dist/behaviors/exports/atoms/std-agent-chat-thread.orb +774 -0
  27. package/dist/behaviors/exports/atoms/std-agent-classifier.orb +871 -0
  28. package/dist/behaviors/exports/atoms/std-agent-completion.orb +933 -0
  29. package/dist/behaviors/exports/atoms/std-agent-context-window.orb +2294 -0
  30. package/dist/behaviors/exports/atoms/std-agent-conversation.orb +1020 -0
  31. package/dist/behaviors/exports/atoms/std-agent-memory.orb +879 -0
  32. package/dist/behaviors/exports/atoms/std-agent-provider.orb +898 -0
  33. package/dist/behaviors/exports/atoms/std-agent-search.orb +448 -0
  34. package/dist/behaviors/exports/atoms/std-agent-session.orb +835 -0
  35. package/dist/behaviors/exports/atoms/std-agent-step-progress.orb +850 -0
  36. package/dist/behaviors/exports/atoms/std-agent-token-gauge.orb +1616 -0
  37. package/dist/behaviors/exports/atoms/std-agent-tool-call.orb +1237 -0
  38. package/dist/behaviors/exports/molecules/std-agent-fix-loop.orb +3177 -0
  39. package/dist/behaviors/exports/molecules/std-agent-learner.orb +2950 -0
  40. package/dist/behaviors/exports/molecules/std-agent-planner.orb +2655 -0
  41. package/dist/behaviors/exports/molecules/std-agent-rag.orb +1871 -0
  42. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +4857 -0
  43. package/dist/behaviors/exports/organisms/std-agent-assistant.orb +6440 -0
  44. package/dist/behaviors/exports/organisms/std-agent-builder.orb +14863 -0
  45. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +11950 -0
  46. package/dist/behaviors/exports/organisms/std-agent-reviewer.orb +5405 -0
  47. package/dist/behaviors/exports/organisms/std-agent-tutor.orb +5107 -0
  48. package/dist/behaviors/exports/validation-report.json +2 -1099
  49. package/dist/behaviors/exports-reader.js +7156 -302
  50. package/dist/behaviors/exports-reader.js.map +1 -1
  51. package/dist/behaviors/functions/index.d.ts +781 -1
  52. package/dist/behaviors/functions/index.js +7080 -303
  53. package/dist/behaviors/functions/index.js.map +1 -1
  54. package/dist/behaviors/index.d.ts +1 -1
  55. package/dist/behaviors/index.js +7159 -305
  56. package/dist/behaviors/index.js.map +1 -1
  57. package/dist/behaviors/query.js +7158 -304
  58. package/dist/behaviors/query.js.map +1 -1
  59. package/dist/exports/atoms/std-agent-activity-log.orb +559 -0
  60. package/dist/exports/atoms/std-agent-chat-thread.orb +774 -0
  61. package/dist/exports/atoms/std-agent-classifier.orb +871 -0
  62. package/dist/exports/atoms/std-agent-completion.orb +933 -0
  63. package/dist/exports/atoms/std-agent-context-window.orb +2294 -0
  64. package/dist/exports/atoms/std-agent-conversation.orb +1020 -0
  65. package/dist/exports/atoms/std-agent-memory.orb +879 -0
  66. package/dist/exports/atoms/std-agent-provider.orb +898 -0
  67. package/dist/exports/atoms/std-agent-search.orb +448 -0
  68. package/dist/exports/atoms/std-agent-session.orb +835 -0
  69. package/dist/exports/atoms/std-agent-step-progress.orb +850 -0
  70. package/dist/exports/atoms/std-agent-token-gauge.orb +1616 -0
  71. package/dist/exports/atoms/std-agent-tool-call.orb +1237 -0
  72. package/dist/exports/molecules/std-agent-fix-loop.orb +3177 -0
  73. package/dist/exports/molecules/std-agent-learner.orb +2950 -0
  74. package/dist/exports/molecules/std-agent-planner.orb +2655 -0
  75. package/dist/exports/molecules/std-agent-rag.orb +1871 -0
  76. package/dist/exports/molecules/std-agent-tool-loop.orb +4857 -0
  77. package/dist/exports/organisms/std-agent-assistant.orb +6440 -0
  78. package/dist/exports/organisms/std-agent-builder.orb +14863 -0
  79. package/dist/exports/organisms/std-agent-pipeline.orb +11950 -0
  80. package/dist/exports/organisms/std-agent-reviewer.orb +5405 -0
  81. package/dist/exports/organisms/std-agent-tutor.orb +5107 -0
  82. package/dist/exports/validation-report.json +2 -1099
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.js +7159 -305
  85. package/dist/index.js.map +1 -1
  86. package/package.json +1 -1
@@ -0,0 +1,3177 @@
1
+ {
2
+ "name": "AgentFixLoopOrbital",
3
+ "orbitals": [
4
+ {
5
+ "name": "AgentFixLoopOrbital",
6
+ "entity": {
7
+ "name": "AgentFixLoop",
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": "target",
38
+ "type": "string",
39
+ "default": ""
40
+ },
41
+ {
42
+ "name": "validationErrors",
43
+ "type": "string",
44
+ "default": ""
45
+ },
46
+ {
47
+ "name": "fixAttempts",
48
+ "type": "number",
49
+ "default": 0
50
+ },
51
+ {
52
+ "name": "maxAttempts",
53
+ "type": "number",
54
+ "default": 5
55
+ },
56
+ {
57
+ "name": "currentFix",
58
+ "type": "string",
59
+ "default": ""
60
+ },
61
+ {
62
+ "name": "errorCount",
63
+ "type": "number",
64
+ "default": 0
65
+ },
66
+ {
67
+ "name": "error",
68
+ "type": "string",
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"
120
+ }
121
+ ]
122
+ },
123
+ "traits": [
124
+ {
125
+ "name": "AgentFixLoopCycle",
126
+ "linkedEntity": "AgentFixLoop",
127
+ "category": "interaction",
128
+ "emits": [
129
+ {
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"
159
+ },
160
+ {
161
+ "event": "FIX_FAILED",
162
+ "triggers": "INIT",
163
+ "scope": "external"
164
+ }
165
+ ],
166
+ "stateMachine": {
167
+ "states": [
168
+ {
169
+ "name": "idle",
170
+ "isInitial": true
171
+ },
172
+ {
173
+ "name": "validating"
174
+ },
175
+ {
176
+ "name": "fixing"
177
+ },
178
+ {
179
+ "name": "applying"
180
+ },
181
+ {
182
+ "name": "succeeded"
183
+ },
184
+ {
185
+ "name": "failed"
186
+ }
187
+ ],
188
+ "events": [
189
+ {
190
+ "key": "INIT",
191
+ "name": "Initialize"
192
+ },
193
+ {
194
+ "key": "FIX",
195
+ "name": "Start Fix Loop"
196
+ },
197
+ {
198
+ "key": "VALIDATION_PASSED",
199
+ "name": "Validation Passed"
200
+ },
201
+ {
202
+ "key": "VALIDATION_ERRORS",
203
+ "name": "Validation Errors",
204
+ "payload": [
205
+ {
206
+ "name": "errors",
207
+ "type": "string",
208
+ "required": true
209
+ },
210
+ {
211
+ "name": "count",
212
+ "type": "number",
213
+ "required": true
214
+ }
215
+ ]
216
+ },
217
+ {
218
+ "key": "FIX_GENERATED",
219
+ "name": "Fix Generated",
220
+ "payload": [
221
+ {
222
+ "name": "fix",
223
+ "type": "string",
224
+ "required": true
225
+ }
226
+ ]
227
+ },
228
+ {
229
+ "key": "FIX_APPLIED",
230
+ "name": "Fix Applied"
231
+ },
232
+ {
233
+ "key": "EXCEEDED_ATTEMPTS",
234
+ "name": "Exceeded Max Attempts",
235
+ "payload": [
236
+ {
237
+ "name": "error",
238
+ "type": "string",
239
+ "required": true
240
+ }
241
+ ]
242
+ },
243
+ {
244
+ "key": "FAILED",
245
+ "name": "Failed",
246
+ "payload": [
247
+ {
248
+ "name": "error",
249
+ "type": "string",
250
+ "required": true
251
+ }
252
+ ]
253
+ },
254
+ {
255
+ "key": "RESET",
256
+ "name": "Reset"
257
+ }
258
+ ],
259
+ "transitions": [
260
+ {
261
+ "from": "idle",
262
+ "to": "idle",
263
+ "event": "INIT",
264
+ "effects": [
265
+ [
266
+ "render-ui",
267
+ "main",
268
+ {
269
+ "type": "stack",
270
+ "direction": "vertical",
271
+ "gap": "lg",
272
+ "children": [
273
+ {
274
+ "type": "stack",
275
+ "direction": "horizontal",
276
+ "gap": "sm",
277
+ "align": "center",
278
+ "children": [
279
+ {
280
+ "type": "icon",
281
+ "name": "wrench",
282
+ "size": "lg"
283
+ },
284
+ {
285
+ "type": "typography",
286
+ "content": "Validation-Fix Loop",
287
+ "variant": "h2"
288
+ }
289
+ ]
290
+ },
291
+ {
292
+ "type": "divider"
293
+ },
294
+ {
295
+ "type": "card",
296
+ "children": [
297
+ {
298
+ "type": "stack",
299
+ "direction": "vertical",
300
+ "gap": "md",
301
+ "children": [
302
+ {
303
+ "type": "typography",
304
+ "content": "Enter the target to validate and auto-fix",
305
+ "variant": "body"
306
+ },
307
+ {
308
+ "type": "form-section",
309
+ "entity": "AgentFixLoop",
310
+ "mode": "edit",
311
+ "submitEvent": "FIX",
312
+ "fields": [
313
+ "target"
314
+ ]
315
+ }
316
+ ]
317
+ }
318
+ ]
319
+ }
320
+ ]
321
+ }
322
+ ]
323
+ ]
324
+ },
325
+ {
326
+ "from": "idle",
327
+ "to": "validating",
328
+ "event": "FIX",
329
+ "effects": [
330
+ [
331
+ "set",
332
+ "@entity.status",
333
+ "validating"
334
+ ],
335
+ [
336
+ "set",
337
+ "@entity.fixAttempts",
338
+ 0
339
+ ],
340
+ [
341
+ "set",
342
+ "@entity.validationErrors",
343
+ ""
344
+ ],
345
+ [
346
+ "set",
347
+ "@entity.errorCount",
348
+ 0
349
+ ],
350
+ [
351
+ "agent/invoke",
352
+ "validate-schema",
353
+ {
354
+ "target": "@entity.target"
355
+ }
356
+ ],
357
+ [
358
+ "render-ui",
359
+ "main",
360
+ {
361
+ "type": "stack",
362
+ "direction": "vertical",
363
+ "gap": "lg",
364
+ "align": "center",
365
+ "children": [
366
+ {
367
+ "type": "icon",
368
+ "name": "shield-check",
369
+ "size": "lg"
370
+ },
371
+ {
372
+ "type": "typography",
373
+ "content": "Validating...",
374
+ "variant": "h3"
375
+ },
376
+ {
377
+ "type": "spinner",
378
+ "size": "lg"
379
+ },
380
+ {
381
+ "type": "stack",
382
+ "direction": "horizontal",
383
+ "gap": "md",
384
+ "justify": "center",
385
+ "children": [
386
+ {
387
+ "type": "badge",
388
+ "label": "@entity.target"
389
+ },
390
+ {
391
+ "type": "badge",
392
+ "label": [
393
+ "str/concat",
394
+ "Attempt ",
395
+ [
396
+ "str/concat",
397
+ "@entity.fixAttempts"
398
+ ],
399
+ "/",
400
+ [
401
+ "str/concat",
402
+ "@entity.maxAttempts"
403
+ ]
404
+ ]
405
+ }
406
+ ]
407
+ }
408
+ ]
409
+ }
410
+ ]
411
+ ]
412
+ },
413
+ {
414
+ "from": "validating",
415
+ "to": "succeeded",
416
+ "event": "VALIDATION_PASSED",
417
+ "effects": [
418
+ [
419
+ "set",
420
+ "@entity.status",
421
+ "succeeded"
422
+ ],
423
+ [
424
+ "emit",
425
+ "FIX_SUCCEEDED"
426
+ ],
427
+ [
428
+ "render-ui",
429
+ "main",
430
+ {
431
+ "type": "stack",
432
+ "direction": "vertical",
433
+ "gap": "lg",
434
+ "children": [
435
+ {
436
+ "type": "stack",
437
+ "direction": "horizontal",
438
+ "gap": "sm",
439
+ "align": "center",
440
+ "justify": "space-between",
441
+ "children": [
442
+ {
443
+ "type": "stack",
444
+ "direction": "horizontal",
445
+ "gap": "sm",
446
+ "align": "center",
447
+ "children": [
448
+ {
449
+ "type": "icon",
450
+ "name": "check-circle",
451
+ "size": "lg"
452
+ },
453
+ {
454
+ "type": "typography",
455
+ "content": "Validation Passed",
456
+ "variant": "h2"
457
+ }
458
+ ]
459
+ },
460
+ {
461
+ "type": "button",
462
+ "label": "New Target",
463
+ "event": "RESET",
464
+ "variant": "ghost",
465
+ "icon": "rotate-ccw"
466
+ }
467
+ ]
468
+ },
469
+ {
470
+ "type": "divider"
471
+ },
472
+ {
473
+ "type": "simple-grid",
474
+ "columns": 2,
475
+ "children": [
476
+ {
477
+ "type": "stat-display",
478
+ "label": "Fix Attempts",
479
+ "value": "@entity.fixAttempts",
480
+ "icon": "wrench"
481
+ },
482
+ {
483
+ "type": "stat-display",
484
+ "label": "Status",
485
+ "value": "Passed",
486
+ "icon": "check"
487
+ }
488
+ ]
489
+ },
490
+ {
491
+ "type": "card",
492
+ "children": [
493
+ {
494
+ "type": "stack",
495
+ "direction": "vertical",
496
+ "gap": "sm",
497
+ "children": [
498
+ {
499
+ "type": "typography",
500
+ "content": "Target",
501
+ "variant": "caption"
502
+ },
503
+ {
504
+ "type": "typography",
505
+ "content": "@entity.target",
506
+ "variant": "body"
507
+ }
508
+ ]
509
+ }
510
+ ]
511
+ }
512
+ ]
513
+ }
514
+ ]
515
+ ]
516
+ },
517
+ {
518
+ "from": "validating",
519
+ "to": "fixing",
520
+ "event": "VALIDATION_ERRORS",
521
+ "guards": [
522
+ [
523
+ "<",
524
+ "@entity.fixAttempts",
525
+ 5
526
+ ]
527
+ ],
528
+ "effects": [
529
+ [
530
+ "set",
531
+ "@entity.validationErrors",
532
+ "@payload.errors"
533
+ ],
534
+ [
535
+ "set",
536
+ "@entity.errorCount",
537
+ "@payload.count"
538
+ ],
539
+ [
540
+ "set",
541
+ "@entity.fixAttempts",
542
+ [
543
+ "+",
544
+ "@entity.fixAttempts",
545
+ 1
546
+ ]
547
+ ],
548
+ [
549
+ "set",
550
+ "@entity.status",
551
+ "fixing"
552
+ ],
553
+ [
554
+ "agent/generate",
555
+ [
556
+ "str/concat",
557
+ "Target: ",
558
+ "@entity.target",
559
+ "\n\nValidation errors:\n",
560
+ "@payload.errors",
561
+ "\n\nGenerate a fix that resolves these errors. Return only the fix content."
562
+ ]
563
+ ],
564
+ [
565
+ "render-ui",
566
+ "main",
567
+ {
568
+ "type": "stack",
569
+ "direction": "vertical",
570
+ "gap": "lg",
571
+ "children": [
572
+ {
573
+ "type": "stack",
574
+ "direction": "horizontal",
575
+ "gap": "sm",
576
+ "align": "center",
577
+ "justify": "space-between",
578
+ "children": [
579
+ {
580
+ "type": "stack",
581
+ "direction": "horizontal",
582
+ "gap": "sm",
583
+ "align": "center",
584
+ "children": [
585
+ {
586
+ "type": "icon",
587
+ "name": "cpu",
588
+ "size": "lg"
589
+ },
590
+ {
591
+ "type": "typography",
592
+ "content": "Generating fix...",
593
+ "variant": "h2"
594
+ }
595
+ ]
596
+ },
597
+ {
598
+ "type": "badge",
599
+ "label": [
600
+ "str/concat",
601
+ "Attempt ",
602
+ [
603
+ "str/concat",
604
+ "@entity.fixAttempts"
605
+ ]
606
+ ]
607
+ }
608
+ ]
609
+ },
610
+ {
611
+ "type": "divider"
612
+ },
613
+ {
614
+ "type": "card",
615
+ "children": [
616
+ {
617
+ "type": "stack",
618
+ "direction": "vertical",
619
+ "gap": "sm",
620
+ "children": [
621
+ {
622
+ "type": "typography",
623
+ "content": "Validation Errors",
624
+ "variant": "caption"
625
+ },
626
+ {
627
+ "type": "alert",
628
+ "variant": "error",
629
+ "message": "@entity.validationErrors"
630
+ }
631
+ ]
632
+ }
633
+ ]
634
+ },
635
+ {
636
+ "type": "spinner",
637
+ "size": "lg"
638
+ }
639
+ ]
640
+ }
641
+ ]
642
+ ]
643
+ },
644
+ {
645
+ "from": "validating",
646
+ "to": "failed",
647
+ "event": "EXCEEDED_ATTEMPTS",
648
+ "effects": [
649
+ [
650
+ "set",
651
+ "@entity.status",
652
+ "failed"
653
+ ],
654
+ [
655
+ "set",
656
+ "@entity.error",
657
+ "@payload.error"
658
+ ],
659
+ [
660
+ "emit",
661
+ "FIX_FAILED"
662
+ ],
663
+ [
664
+ "render-ui",
665
+ "main",
666
+ {
667
+ "type": "stack",
668
+ "direction": "vertical",
669
+ "gap": "lg",
670
+ "align": "center",
671
+ "children": [
672
+ {
673
+ "type": "icon",
674
+ "name": "x-circle",
675
+ "size": "lg"
676
+ },
677
+ {
678
+ "type": "typography",
679
+ "content": "Fix Loop Failed",
680
+ "variant": "h2"
681
+ },
682
+ {
683
+ "type": "alert",
684
+ "variant": "error",
685
+ "message": "@entity.error"
686
+ },
687
+ {
688
+ "type": "simple-grid",
689
+ "columns": 2,
690
+ "children": [
691
+ {
692
+ "type": "stat-display",
693
+ "label": "Attempts Used",
694
+ "value": "@entity.fixAttempts",
695
+ "icon": "wrench"
696
+ },
697
+ {
698
+ "type": "stat-display",
699
+ "label": "Remaining Errors",
700
+ "value": "@entity.errorCount",
701
+ "icon": "alert-triangle"
702
+ }
703
+ ]
704
+ },
705
+ {
706
+ "type": "card",
707
+ "children": [
708
+ {
709
+ "type": "stack",
710
+ "direction": "vertical",
711
+ "gap": "sm",
712
+ "children": [
713
+ {
714
+ "type": "typography",
715
+ "content": "Last Validation Errors",
716
+ "variant": "caption"
717
+ },
718
+ {
719
+ "type": "typography",
720
+ "content": "@entity.validationErrors",
721
+ "variant": "body"
722
+ }
723
+ ]
724
+ }
725
+ ]
726
+ },
727
+ {
728
+ "type": "button",
729
+ "label": "Retry",
730
+ "event": "RESET",
731
+ "variant": "primary",
732
+ "icon": "rotate-ccw"
733
+ }
734
+ ]
735
+ }
736
+ ]
737
+ ]
738
+ },
739
+ {
740
+ "from": "fixing",
741
+ "to": "applying",
742
+ "event": "FIX_GENERATED",
743
+ "effects": [
744
+ [
745
+ "set",
746
+ "@entity.currentFix",
747
+ "@payload.fix"
748
+ ],
749
+ [
750
+ "set",
751
+ "@entity.status",
752
+ "applying"
753
+ ],
754
+ [
755
+ "agent/invoke",
756
+ "apply-fix",
757
+ {
758
+ "target": "@entity.target",
759
+ "fix": "@payload.fix"
760
+ }
761
+ ],
762
+ [
763
+ "render-ui",
764
+ "main",
765
+ {
766
+ "type": "stack",
767
+ "direction": "vertical",
768
+ "gap": "lg",
769
+ "align": "center",
770
+ "children": [
771
+ {
772
+ "type": "icon",
773
+ "name": "tool",
774
+ "size": "lg"
775
+ },
776
+ {
777
+ "type": "typography",
778
+ "content": "Applying fix...",
779
+ "variant": "h3"
780
+ },
781
+ {
782
+ "type": "spinner",
783
+ "size": "lg"
784
+ },
785
+ {
786
+ "type": "card",
787
+ "children": [
788
+ {
789
+ "type": "stack",
790
+ "direction": "vertical",
791
+ "gap": "sm",
792
+ "children": [
793
+ {
794
+ "type": "typography",
795
+ "content": "Proposed Fix",
796
+ "variant": "caption"
797
+ },
798
+ {
799
+ "type": "typography",
800
+ "content": "@entity.currentFix",
801
+ "variant": "body"
802
+ }
803
+ ]
804
+ }
805
+ ]
806
+ }
807
+ ]
808
+ }
809
+ ]
810
+ ]
811
+ },
812
+ {
813
+ "from": "applying",
814
+ "to": "validating",
815
+ "event": "FIX_APPLIED",
816
+ "effects": [
817
+ [
818
+ "set",
819
+ "@entity.status",
820
+ "validating"
821
+ ],
822
+ [
823
+ "agent/invoke",
824
+ "validate-schema",
825
+ {
826
+ "target": "@entity.target"
827
+ }
828
+ ],
829
+ [
830
+ "render-ui",
831
+ "main",
832
+ {
833
+ "type": "stack",
834
+ "direction": "vertical",
835
+ "gap": "lg",
836
+ "align": "center",
837
+ "children": [
838
+ {
839
+ "type": "icon",
840
+ "name": "shield-check",
841
+ "size": "lg"
842
+ },
843
+ {
844
+ "type": "typography",
845
+ "content": "Validating...",
846
+ "variant": "h3"
847
+ },
848
+ {
849
+ "type": "spinner",
850
+ "size": "lg"
851
+ },
852
+ {
853
+ "type": "stack",
854
+ "direction": "horizontal",
855
+ "gap": "md",
856
+ "justify": "center",
857
+ "children": [
858
+ {
859
+ "type": "badge",
860
+ "label": "@entity.target"
861
+ },
862
+ {
863
+ "type": "badge",
864
+ "label": [
865
+ "str/concat",
866
+ "Attempt ",
867
+ [
868
+ "str/concat",
869
+ "@entity.fixAttempts"
870
+ ],
871
+ "/",
872
+ [
873
+ "str/concat",
874
+ "@entity.maxAttempts"
875
+ ]
876
+ ]
877
+ }
878
+ ]
879
+ }
880
+ ]
881
+ }
882
+ ]
883
+ ]
884
+ },
885
+ {
886
+ "from": "fixing",
887
+ "to": "failed",
888
+ "event": "FAILED",
889
+ "effects": [
890
+ [
891
+ "set",
892
+ "@entity.error",
893
+ "@payload.error"
894
+ ],
895
+ [
896
+ "set",
897
+ "@entity.status",
898
+ "failed"
899
+ ],
900
+ [
901
+ "emit",
902
+ "FIX_FAILED"
903
+ ],
904
+ [
905
+ "render-ui",
906
+ "main",
907
+ {
908
+ "type": "stack",
909
+ "direction": "vertical",
910
+ "gap": "lg",
911
+ "align": "center",
912
+ "children": [
913
+ {
914
+ "type": "icon",
915
+ "name": "x-circle",
916
+ "size": "lg"
917
+ },
918
+ {
919
+ "type": "typography",
920
+ "content": "Fix Loop Failed",
921
+ "variant": "h2"
922
+ },
923
+ {
924
+ "type": "alert",
925
+ "variant": "error",
926
+ "message": "@entity.error"
927
+ },
928
+ {
929
+ "type": "simple-grid",
930
+ "columns": 2,
931
+ "children": [
932
+ {
933
+ "type": "stat-display",
934
+ "label": "Attempts Used",
935
+ "value": "@entity.fixAttempts",
936
+ "icon": "wrench"
937
+ },
938
+ {
939
+ "type": "stat-display",
940
+ "label": "Remaining Errors",
941
+ "value": "@entity.errorCount",
942
+ "icon": "alert-triangle"
943
+ }
944
+ ]
945
+ },
946
+ {
947
+ "type": "card",
948
+ "children": [
949
+ {
950
+ "type": "stack",
951
+ "direction": "vertical",
952
+ "gap": "sm",
953
+ "children": [
954
+ {
955
+ "type": "typography",
956
+ "content": "Last Validation Errors",
957
+ "variant": "caption"
958
+ },
959
+ {
960
+ "type": "typography",
961
+ "content": "@entity.validationErrors",
962
+ "variant": "body"
963
+ }
964
+ ]
965
+ }
966
+ ]
967
+ },
968
+ {
969
+ "type": "button",
970
+ "label": "Retry",
971
+ "event": "RESET",
972
+ "variant": "primary",
973
+ "icon": "rotate-ccw"
974
+ }
975
+ ]
976
+ }
977
+ ]
978
+ ]
979
+ },
980
+ {
981
+ "from": "applying",
982
+ "to": "failed",
983
+ "event": "FAILED",
984
+ "effects": [
985
+ [
986
+ "set",
987
+ "@entity.error",
988
+ "@payload.error"
989
+ ],
990
+ [
991
+ "set",
992
+ "@entity.status",
993
+ "failed"
994
+ ],
995
+ [
996
+ "emit",
997
+ "FIX_FAILED"
998
+ ],
999
+ [
1000
+ "render-ui",
1001
+ "main",
1002
+ {
1003
+ "type": "stack",
1004
+ "direction": "vertical",
1005
+ "gap": "lg",
1006
+ "align": "center",
1007
+ "children": [
1008
+ {
1009
+ "type": "icon",
1010
+ "name": "x-circle",
1011
+ "size": "lg"
1012
+ },
1013
+ {
1014
+ "type": "typography",
1015
+ "content": "Fix Loop Failed",
1016
+ "variant": "h2"
1017
+ },
1018
+ {
1019
+ "type": "alert",
1020
+ "variant": "error",
1021
+ "message": "@entity.error"
1022
+ },
1023
+ {
1024
+ "type": "simple-grid",
1025
+ "columns": 2,
1026
+ "children": [
1027
+ {
1028
+ "type": "stat-display",
1029
+ "label": "Attempts Used",
1030
+ "value": "@entity.fixAttempts",
1031
+ "icon": "wrench"
1032
+ },
1033
+ {
1034
+ "type": "stat-display",
1035
+ "label": "Remaining Errors",
1036
+ "value": "@entity.errorCount",
1037
+ "icon": "alert-triangle"
1038
+ }
1039
+ ]
1040
+ },
1041
+ {
1042
+ "type": "card",
1043
+ "children": [
1044
+ {
1045
+ "type": "stack",
1046
+ "direction": "vertical",
1047
+ "gap": "sm",
1048
+ "children": [
1049
+ {
1050
+ "type": "typography",
1051
+ "content": "Last Validation Errors",
1052
+ "variant": "caption"
1053
+ },
1054
+ {
1055
+ "type": "typography",
1056
+ "content": "@entity.validationErrors",
1057
+ "variant": "body"
1058
+ }
1059
+ ]
1060
+ }
1061
+ ]
1062
+ },
1063
+ {
1064
+ "type": "button",
1065
+ "label": "Retry",
1066
+ "event": "RESET",
1067
+ "variant": "primary",
1068
+ "icon": "rotate-ccw"
1069
+ }
1070
+ ]
1071
+ }
1072
+ ]
1073
+ ]
1074
+ },
1075
+ {
1076
+ "from": "succeeded",
1077
+ "to": "idle",
1078
+ "event": "RESET",
1079
+ "effects": [
1080
+ [
1081
+ "set",
1082
+ "@entity.status",
1083
+ "idle"
1084
+ ],
1085
+ [
1086
+ "set",
1087
+ "@entity.target",
1088
+ ""
1089
+ ],
1090
+ [
1091
+ "set",
1092
+ "@entity.validationErrors",
1093
+ ""
1094
+ ],
1095
+ [
1096
+ "set",
1097
+ "@entity.currentFix",
1098
+ ""
1099
+ ],
1100
+ [
1101
+ "set",
1102
+ "@entity.fixAttempts",
1103
+ 0
1104
+ ],
1105
+ [
1106
+ "set",
1107
+ "@entity.errorCount",
1108
+ 0
1109
+ ],
1110
+ [
1111
+ "set",
1112
+ "@entity.error",
1113
+ ""
1114
+ ],
1115
+ [
1116
+ "render-ui",
1117
+ "main",
1118
+ {
1119
+ "type": "stack",
1120
+ "direction": "vertical",
1121
+ "gap": "lg",
1122
+ "children": [
1123
+ {
1124
+ "type": "stack",
1125
+ "direction": "horizontal",
1126
+ "gap": "sm",
1127
+ "align": "center",
1128
+ "children": [
1129
+ {
1130
+ "type": "icon",
1131
+ "name": "wrench",
1132
+ "size": "lg"
1133
+ },
1134
+ {
1135
+ "type": "typography",
1136
+ "content": "Validation-Fix Loop",
1137
+ "variant": "h2"
1138
+ }
1139
+ ]
1140
+ },
1141
+ {
1142
+ "type": "divider"
1143
+ },
1144
+ {
1145
+ "type": "card",
1146
+ "children": [
1147
+ {
1148
+ "type": "stack",
1149
+ "direction": "vertical",
1150
+ "gap": "md",
1151
+ "children": [
1152
+ {
1153
+ "type": "typography",
1154
+ "content": "Enter the target to validate and auto-fix",
1155
+ "variant": "body"
1156
+ },
1157
+ {
1158
+ "type": "form-section",
1159
+ "entity": "AgentFixLoop",
1160
+ "mode": "edit",
1161
+ "submitEvent": "FIX",
1162
+ "fields": [
1163
+ "target"
1164
+ ]
1165
+ }
1166
+ ]
1167
+ }
1168
+ ]
1169
+ }
1170
+ ]
1171
+ }
1172
+ ]
1173
+ ]
1174
+ },
1175
+ {
1176
+ "from": "failed",
1177
+ "to": "idle",
1178
+ "event": "RESET",
1179
+ "effects": [
1180
+ [
1181
+ "set",
1182
+ "@entity.status",
1183
+ "idle"
1184
+ ],
1185
+ [
1186
+ "set",
1187
+ "@entity.target",
1188
+ ""
1189
+ ],
1190
+ [
1191
+ "set",
1192
+ "@entity.validationErrors",
1193
+ ""
1194
+ ],
1195
+ [
1196
+ "set",
1197
+ "@entity.currentFix",
1198
+ ""
1199
+ ],
1200
+ [
1201
+ "set",
1202
+ "@entity.fixAttempts",
1203
+ 0
1204
+ ],
1205
+ [
1206
+ "set",
1207
+ "@entity.errorCount",
1208
+ 0
1209
+ ],
1210
+ [
1211
+ "set",
1212
+ "@entity.error",
1213
+ ""
1214
+ ],
1215
+ [
1216
+ "render-ui",
1217
+ "main",
1218
+ {
1219
+ "type": "stack",
1220
+ "direction": "vertical",
1221
+ "gap": "lg",
1222
+ "children": [
1223
+ {
1224
+ "type": "stack",
1225
+ "direction": "horizontal",
1226
+ "gap": "sm",
1227
+ "align": "center",
1228
+ "children": [
1229
+ {
1230
+ "type": "icon",
1231
+ "name": "wrench",
1232
+ "size": "lg"
1233
+ },
1234
+ {
1235
+ "type": "typography",
1236
+ "content": "Validation-Fix Loop",
1237
+ "variant": "h2"
1238
+ }
1239
+ ]
1240
+ },
1241
+ {
1242
+ "type": "divider"
1243
+ },
1244
+ {
1245
+ "type": "card",
1246
+ "children": [
1247
+ {
1248
+ "type": "stack",
1249
+ "direction": "vertical",
1250
+ "gap": "md",
1251
+ "children": [
1252
+ {
1253
+ "type": "typography",
1254
+ "content": "Enter the target to validate and auto-fix",
1255
+ "variant": "body"
1256
+ },
1257
+ {
1258
+ "type": "form-section",
1259
+ "entity": "AgentFixLoop",
1260
+ "mode": "edit",
1261
+ "submitEvent": "FIX",
1262
+ "fields": [
1263
+ "target"
1264
+ ]
1265
+ }
1266
+ ]
1267
+ }
1268
+ ]
1269
+ }
1270
+ ]
1271
+ }
1272
+ ]
1273
+ ]
1274
+ }
1275
+ ]
1276
+ }
1277
+ },
1278
+ {
1279
+ "name": "FixLoopStepProgress",
1280
+ "linkedEntity": "AgentFixLoop",
1281
+ "category": "interaction",
1282
+ "emits": [
1283
+ {
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"
3170
+ }
3171
+ ]
3172
+ }
3173
+ ]
3174
+ }
3175
+ ],
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"
3177
+ }