@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,933 @@
1
+ {
2
+ "name": "AgentCompletionOrbital",
3
+ "orbitals": [
4
+ {
5
+ "name": "AgentCompletionOrbital",
6
+ "entity": {
7
+ "name": "AgentCompletion",
8
+ "persistence": "persistent",
9
+ "collection": "agentcompletions",
10
+ "fields": [
11
+ {
12
+ "name": "id",
13
+ "type": "string"
14
+ },
15
+ {
16
+ "name": "name",
17
+ "type": "string"
18
+ },
19
+ {
20
+ "name": "description",
21
+ "type": "string"
22
+ },
23
+ {
24
+ "name": "status",
25
+ "type": "string",
26
+ "default": "active",
27
+ "values": [
28
+ "active",
29
+ "inactive",
30
+ "pending"
31
+ ]
32
+ },
33
+ {
34
+ "name": "createdAt",
35
+ "type": "string"
36
+ },
37
+ {
38
+ "name": "prompt",
39
+ "type": "string",
40
+ "default": ""
41
+ },
42
+ {
43
+ "name": "response",
44
+ "type": "string",
45
+ "default": ""
46
+ },
47
+ {
48
+ "name": "provider",
49
+ "type": "string",
50
+ "default": "anthropic"
51
+ },
52
+ {
53
+ "name": "model",
54
+ "type": "string",
55
+ "default": "claude-sonnet-4-20250514"
56
+ },
57
+ {
58
+ "name": "error",
59
+ "type": "string",
60
+ "default": ""
61
+ },
62
+ {
63
+ "name": "message",
64
+ "type": "string",
65
+ "default": ""
66
+ },
67
+ {
68
+ "name": "notificationType",
69
+ "type": "string",
70
+ "default": "info"
71
+ }
72
+ ]
73
+ },
74
+ "traits": [
75
+ {
76
+ "name": "AgentCompletionModal",
77
+ "linkedEntity": "AgentCompletion",
78
+ "category": "interaction",
79
+ "emits": [
80
+ {
81
+ "event": "GENERATED"
82
+ }
83
+ ],
84
+ "stateMachine": {
85
+ "states": [
86
+ {
87
+ "name": "closed",
88
+ "isInitial": true
89
+ },
90
+ {
91
+ "name": "open"
92
+ }
93
+ ],
94
+ "events": [
95
+ {
96
+ "key": "INIT",
97
+ "name": "Initialize"
98
+ },
99
+ {
100
+ "key": "GENERATE",
101
+ "name": "Open"
102
+ },
103
+ {
104
+ "key": "CLOSE",
105
+ "name": "Close"
106
+ },
107
+ {
108
+ "key": "SAVE",
109
+ "name": "Save",
110
+ "payload": [
111
+ {
112
+ "name": "data",
113
+ "type": "object",
114
+ "required": true
115
+ }
116
+ ]
117
+ }
118
+ ],
119
+ "transitions": [
120
+ {
121
+ "from": "closed",
122
+ "to": "closed",
123
+ "event": "INIT",
124
+ "effects": [
125
+ [
126
+ "ref",
127
+ "AgentCompletion"
128
+ ],
129
+ [
130
+ "render-ui",
131
+ "main",
132
+ {
133
+ "type": "stack",
134
+ "direction": "vertical",
135
+ "gap": "lg",
136
+ "children": [
137
+ {
138
+ "type": "stack",
139
+ "direction": "horizontal",
140
+ "gap": "md",
141
+ "justify": "space-between",
142
+ "children": [
143
+ {
144
+ "type": "stack",
145
+ "direction": "horizontal",
146
+ "gap": "md",
147
+ "children": [
148
+ {
149
+ "type": "icon",
150
+ "name": "sparkles",
151
+ "size": "lg"
152
+ },
153
+ {
154
+ "type": "typography",
155
+ "content": "AgentCompletion",
156
+ "variant": "h2"
157
+ }
158
+ ]
159
+ },
160
+ {
161
+ "type": "button",
162
+ "label": "Open",
163
+ "event": "GENERATE",
164
+ "variant": "primary",
165
+ "icon": "sparkles"
166
+ }
167
+ ]
168
+ },
169
+ {
170
+ "type": "divider"
171
+ },
172
+ {
173
+ "type": "empty-state",
174
+ "icon": "sparkles",
175
+ "title": "Nothing open",
176
+ "description": "Click Open to view details in a modal overlay."
177
+ }
178
+ ]
179
+ }
180
+ ]
181
+ ]
182
+ },
183
+ {
184
+ "from": "closed",
185
+ "to": "open",
186
+ "event": "GENERATE",
187
+ "effects": [
188
+ [
189
+ "render-ui",
190
+ "modal",
191
+ {
192
+ "type": "stack",
193
+ "direction": "vertical",
194
+ "gap": "md",
195
+ "children": [
196
+ {
197
+ "type": "stack",
198
+ "direction": "horizontal",
199
+ "gap": "sm",
200
+ "children": [
201
+ {
202
+ "type": "icon",
203
+ "name": "sparkles",
204
+ "size": "md"
205
+ },
206
+ {
207
+ "type": "typography",
208
+ "content": "AgentCompletion",
209
+ "variant": "h3"
210
+ }
211
+ ]
212
+ },
213
+ {
214
+ "type": "divider"
215
+ },
216
+ {
217
+ "type": "stack",
218
+ "direction": "horizontal",
219
+ "gap": "sm",
220
+ "children": [
221
+ {
222
+ "type": "badge",
223
+ "label": "@entity.provider"
224
+ },
225
+ {
226
+ "type": "badge",
227
+ "label": "@entity.model"
228
+ }
229
+ ]
230
+ },
231
+ {
232
+ "type": "form-section",
233
+ "entity": "AgentCompletion",
234
+ "mode": "create",
235
+ "submitEvent": "SAVE",
236
+ "cancelEvent": "CLOSE",
237
+ "fields": [
238
+ "prompt"
239
+ ]
240
+ }
241
+ ]
242
+ }
243
+ ]
244
+ ]
245
+ },
246
+ {
247
+ "from": "open",
248
+ "to": "closed",
249
+ "event": "CLOSE",
250
+ "effects": [
251
+ [
252
+ "render-ui",
253
+ "modal",
254
+ null
255
+ ],
256
+ [
257
+ "notify",
258
+ "Cancelled",
259
+ "info"
260
+ ],
261
+ [
262
+ "ref",
263
+ "AgentCompletion"
264
+ ],
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": "md",
277
+ "justify": "space-between",
278
+ "children": [
279
+ {
280
+ "type": "stack",
281
+ "direction": "horizontal",
282
+ "gap": "md",
283
+ "children": [
284
+ {
285
+ "type": "icon",
286
+ "name": "sparkles",
287
+ "size": "lg"
288
+ },
289
+ {
290
+ "type": "typography",
291
+ "content": "AgentCompletion",
292
+ "variant": "h2"
293
+ }
294
+ ]
295
+ },
296
+ {
297
+ "type": "button",
298
+ "label": "Open",
299
+ "event": "GENERATE",
300
+ "variant": "primary",
301
+ "icon": "sparkles"
302
+ }
303
+ ]
304
+ },
305
+ {
306
+ "type": "divider"
307
+ },
308
+ {
309
+ "type": "empty-state",
310
+ "icon": "sparkles",
311
+ "title": "Nothing open",
312
+ "description": "Click Open to view details in a modal overlay."
313
+ }
314
+ ]
315
+ }
316
+ ]
317
+ ]
318
+ },
319
+ {
320
+ "from": "open",
321
+ "to": "closed",
322
+ "event": "SAVE",
323
+ "effects": [
324
+ [
325
+ "persist",
326
+ "create",
327
+ "AgentCompletion",
328
+ "@payload.data"
329
+ ],
330
+ [
331
+ "render-ui",
332
+ "modal",
333
+ null
334
+ ],
335
+ [
336
+ "emit",
337
+ "GENERATED"
338
+ ],
339
+ [
340
+ "ref",
341
+ "AgentCompletion"
342
+ ],
343
+ [
344
+ "render-ui",
345
+ "main",
346
+ {
347
+ "type": "stack",
348
+ "direction": "vertical",
349
+ "gap": "lg",
350
+ "children": [
351
+ {
352
+ "type": "stack",
353
+ "direction": "horizontal",
354
+ "gap": "md",
355
+ "justify": "space-between",
356
+ "children": [
357
+ {
358
+ "type": "stack",
359
+ "direction": "horizontal",
360
+ "gap": "md",
361
+ "children": [
362
+ {
363
+ "type": "icon",
364
+ "name": "sparkles",
365
+ "size": "lg"
366
+ },
367
+ {
368
+ "type": "typography",
369
+ "content": "AgentCompletion",
370
+ "variant": "h2"
371
+ }
372
+ ]
373
+ },
374
+ {
375
+ "type": "button",
376
+ "label": "Open",
377
+ "event": "GENERATE",
378
+ "variant": "primary",
379
+ "icon": "sparkles"
380
+ }
381
+ ]
382
+ },
383
+ {
384
+ "type": "divider"
385
+ },
386
+ {
387
+ "type": "empty-state",
388
+ "icon": "sparkles",
389
+ "title": "Nothing open",
390
+ "description": "Click Open to view details in a modal overlay."
391
+ }
392
+ ]
393
+ }
394
+ ],
395
+ [
396
+ "notify",
397
+ "AgentCompletion created successfully"
398
+ ]
399
+ ]
400
+ }
401
+ ]
402
+ }
403
+ },
404
+ {
405
+ "name": "AgentCompletionNotification",
406
+ "linkedEntity": "AgentCompletion",
407
+ "category": "interaction",
408
+ "stateMachine": {
409
+ "states": [
410
+ {
411
+ "name": "hidden",
412
+ "isInitial": true
413
+ },
414
+ {
415
+ "name": "visible"
416
+ }
417
+ ],
418
+ "events": [
419
+ {
420
+ "key": "INIT",
421
+ "name": "Initialize"
422
+ },
423
+ {
424
+ "key": "SHOW",
425
+ "name": "Show Notification",
426
+ "payload": [
427
+ {
428
+ "name": "message",
429
+ "type": "string",
430
+ "required": true
431
+ },
432
+ {
433
+ "name": "notificationType",
434
+ "type": "string"
435
+ }
436
+ ]
437
+ },
438
+ {
439
+ "key": "HIDE",
440
+ "name": "Hide Notification"
441
+ }
442
+ ],
443
+ "transitions": [
444
+ {
445
+ "from": "hidden",
446
+ "to": "hidden",
447
+ "event": "INIT",
448
+ "effects": [
449
+ [
450
+ "fetch",
451
+ "AgentCompletion"
452
+ ]
453
+ ]
454
+ },
455
+ {
456
+ "from": "hidden",
457
+ "to": "visible",
458
+ "event": "SHOW",
459
+ "effects": [
460
+ [
461
+ "set",
462
+ "@entity.message",
463
+ "@payload.message"
464
+ ],
465
+ [
466
+ "set",
467
+ "@entity.notificationType",
468
+ "@payload.notificationType"
469
+ ],
470
+ [
471
+ "render-ui",
472
+ "main",
473
+ {
474
+ "type": "stack",
475
+ "direction": "vertical",
476
+ "gap": "lg",
477
+ "children": [
478
+ {
479
+ "type": "stack",
480
+ "direction": "horizontal",
481
+ "gap": "md",
482
+ "justify": "space-between",
483
+ "align": "center",
484
+ "children": [
485
+ {
486
+ "type": "stack",
487
+ "direction": "horizontal",
488
+ "gap": "md",
489
+ "align": "center",
490
+ "children": [
491
+ {
492
+ "type": "icon",
493
+ "name": "sparkles",
494
+ "size": "lg"
495
+ },
496
+ {
497
+ "type": "typography",
498
+ "content": "AgentCompletion Status",
499
+ "variant": "h2"
500
+ }
501
+ ]
502
+ },
503
+ {
504
+ "type": "button",
505
+ "label": "Dismiss",
506
+ "event": "HIDE",
507
+ "variant": "ghost",
508
+ "icon": "x"
509
+ }
510
+ ]
511
+ },
512
+ {
513
+ "type": "divider"
514
+ },
515
+ {
516
+ "type": "alert",
517
+ "variant": [
518
+ "object/get",
519
+ [
520
+ "array/first",
521
+ "@entity"
522
+ ],
523
+ "notificationType"
524
+ ],
525
+ "message": [
526
+ "object/get",
527
+ [
528
+ "array/first",
529
+ "@entity"
530
+ ],
531
+ "message"
532
+ ]
533
+ },
534
+ {
535
+ "type": "toast-slot",
536
+ "position": "top-right"
537
+ },
538
+ {
539
+ "type": "violation-alert",
540
+ "severity": "warning",
541
+ "message": [
542
+ "object/get",
543
+ [
544
+ "array/first",
545
+ "@entity"
546
+ ],
547
+ "message"
548
+ ],
549
+ "category": "compliance"
550
+ }
551
+ ]
552
+ }
553
+ ]
554
+ ]
555
+ },
556
+ {
557
+ "from": "visible",
558
+ "to": "visible",
559
+ "event": "SHOW",
560
+ "effects": [
561
+ [
562
+ "set",
563
+ "@entity.message",
564
+ "@payload.message"
565
+ ],
566
+ [
567
+ "set",
568
+ "@entity.notificationType",
569
+ "@payload.notificationType"
570
+ ],
571
+ [
572
+ "render-ui",
573
+ "main",
574
+ {
575
+ "type": "stack",
576
+ "direction": "vertical",
577
+ "gap": "lg",
578
+ "children": [
579
+ {
580
+ "type": "stack",
581
+ "direction": "horizontal",
582
+ "gap": "md",
583
+ "justify": "space-between",
584
+ "align": "center",
585
+ "children": [
586
+ {
587
+ "type": "stack",
588
+ "direction": "horizontal",
589
+ "gap": "md",
590
+ "align": "center",
591
+ "children": [
592
+ {
593
+ "type": "icon",
594
+ "name": "sparkles",
595
+ "size": "lg"
596
+ },
597
+ {
598
+ "type": "typography",
599
+ "content": "AgentCompletion Status",
600
+ "variant": "h2"
601
+ }
602
+ ]
603
+ },
604
+ {
605
+ "type": "button",
606
+ "label": "Dismiss",
607
+ "event": "HIDE",
608
+ "variant": "ghost",
609
+ "icon": "x"
610
+ }
611
+ ]
612
+ },
613
+ {
614
+ "type": "divider"
615
+ },
616
+ {
617
+ "type": "alert",
618
+ "variant": [
619
+ "object/get",
620
+ [
621
+ "array/first",
622
+ "@entity"
623
+ ],
624
+ "notificationType"
625
+ ],
626
+ "message": [
627
+ "object/get",
628
+ [
629
+ "array/first",
630
+ "@entity"
631
+ ],
632
+ "message"
633
+ ]
634
+ },
635
+ {
636
+ "type": "toast-slot",
637
+ "position": "top-right"
638
+ },
639
+ {
640
+ "type": "violation-alert",
641
+ "severity": "warning",
642
+ "message": [
643
+ "object/get",
644
+ [
645
+ "array/first",
646
+ "@entity"
647
+ ],
648
+ "message"
649
+ ],
650
+ "category": "compliance"
651
+ }
652
+ ]
653
+ }
654
+ ]
655
+ ]
656
+ },
657
+ {
658
+ "from": "visible",
659
+ "to": "hidden",
660
+ "event": "HIDE",
661
+ "effects": [
662
+ [
663
+ "set",
664
+ "@entity.message",
665
+ ""
666
+ ]
667
+ ]
668
+ }
669
+ ]
670
+ }
671
+ },
672
+ {
673
+ "name": "AgentCompletionAgent",
674
+ "linkedEntity": "AgentCompletion",
675
+ "category": "interaction",
676
+ "emits": [
677
+ {
678
+ "event": "SHOW",
679
+ "scope": "internal",
680
+ "payload": [
681
+ {
682
+ "name": "response",
683
+ "type": "string"
684
+ }
685
+ ]
686
+ }
687
+ ],
688
+ "listens": [
689
+ {
690
+ "event": "GENERATED",
691
+ "triggers": "GENERATED",
692
+ "scope": "external"
693
+ }
694
+ ],
695
+ "stateMachine": {
696
+ "states": [
697
+ {
698
+ "name": "idle",
699
+ "isInitial": true
700
+ },
701
+ {
702
+ "name": "generating"
703
+ },
704
+ {
705
+ "name": "completed"
706
+ },
707
+ {
708
+ "name": "error"
709
+ }
710
+ ],
711
+ "events": [
712
+ {
713
+ "key": "INIT",
714
+ "name": "Initialize"
715
+ },
716
+ {
717
+ "key": "DO_GENERATE",
718
+ "name": "Do Generate",
719
+ "payload": [
720
+ {
721
+ "name": "data",
722
+ "type": "object",
723
+ "required": true
724
+ }
725
+ ]
726
+ },
727
+ {
728
+ "key": "RETRY",
729
+ "name": "Retry"
730
+ },
731
+ {
732
+ "key": "RESET",
733
+ "name": "Reset"
734
+ },
735
+ {
736
+ "key": "GENERATED",
737
+ "name": "Generated",
738
+ "payload": [
739
+ {
740
+ "name": "data",
741
+ "type": "object",
742
+ "required": true
743
+ }
744
+ ]
745
+ }
746
+ ],
747
+ "transitions": [
748
+ {
749
+ "from": "idle",
750
+ "to": "idle",
751
+ "event": "INIT",
752
+ "effects": [
753
+ [
754
+ "fetch",
755
+ "AgentCompletion"
756
+ ],
757
+ [
758
+ "render-ui",
759
+ "main",
760
+ {
761
+ "type": "empty-state",
762
+ "icon": "sparkles",
763
+ "title": "Completion",
764
+ "description": "Completion is ready"
765
+ }
766
+ ]
767
+ ]
768
+ },
769
+ {
770
+ "from": "idle",
771
+ "to": "generating",
772
+ "event": "DO_GENERATE",
773
+ "effects": [
774
+ [
775
+ "set",
776
+ "@entity.status",
777
+ "generating"
778
+ ],
779
+ [
780
+ "agent/generate",
781
+ "@entity.prompt"
782
+ ]
783
+ ]
784
+ },
785
+ {
786
+ "from": "idle",
787
+ "to": "generating",
788
+ "event": "GENERATED",
789
+ "effects": [
790
+ [
791
+ "set",
792
+ "@entity.status",
793
+ "generating"
794
+ ],
795
+ [
796
+ "agent/generate",
797
+ "@entity.prompt"
798
+ ]
799
+ ]
800
+ },
801
+ {
802
+ "from": "generating",
803
+ "to": "completed",
804
+ "event": "DO_GENERATE",
805
+ "effects": [
806
+ [
807
+ "set",
808
+ "@entity.response",
809
+ "@payload.data.prompt"
810
+ ],
811
+ [
812
+ "set",
813
+ "@entity.status",
814
+ "completed"
815
+ ],
816
+ [
817
+ "emit",
818
+ "SHOW"
819
+ ]
820
+ ]
821
+ },
822
+ {
823
+ "from": "generating",
824
+ "to": "error",
825
+ "event": "RESET",
826
+ "guard": [
827
+ "=",
828
+ "@entity.status",
829
+ "generating"
830
+ ],
831
+ "effects": [
832
+ [
833
+ "set",
834
+ "@entity.status",
835
+ "error"
836
+ ],
837
+ [
838
+ "set",
839
+ "@entity.error",
840
+ "Generation was cancelled"
841
+ ]
842
+ ]
843
+ },
844
+ {
845
+ "from": "error",
846
+ "to": "generating",
847
+ "event": "RETRY",
848
+ "guard": [
849
+ "=",
850
+ "@entity.status",
851
+ "error"
852
+ ],
853
+ "effects": [
854
+ [
855
+ "set",
856
+ "@entity.status",
857
+ "generating"
858
+ ],
859
+ [
860
+ "set",
861
+ "@entity.error",
862
+ ""
863
+ ],
864
+ [
865
+ "agent/generate",
866
+ "@entity.prompt"
867
+ ]
868
+ ]
869
+ },
870
+ {
871
+ "from": "completed",
872
+ "to": "idle",
873
+ "event": "RESET",
874
+ "effects": [
875
+ [
876
+ "set",
877
+ "@entity.status",
878
+ "idle"
879
+ ],
880
+ [
881
+ "set",
882
+ "@entity.response",
883
+ ""
884
+ ],
885
+ [
886
+ "set",
887
+ "@entity.prompt",
888
+ ""
889
+ ]
890
+ ]
891
+ },
892
+ {
893
+ "from": "error",
894
+ "to": "idle",
895
+ "event": "RESET",
896
+ "effects": [
897
+ [
898
+ "set",
899
+ "@entity.status",
900
+ "idle"
901
+ ],
902
+ [
903
+ "set",
904
+ "@entity.error",
905
+ ""
906
+ ]
907
+ ]
908
+ }
909
+ ]
910
+ }
911
+ }
912
+ ],
913
+ "pages": [
914
+ {
915
+ "name": "AgentCompletionPage",
916
+ "path": "/agentcompletions",
917
+ "traits": [
918
+ {
919
+ "ref": "AgentCompletionModal"
920
+ },
921
+ {
922
+ "ref": "AgentCompletionNotification"
923
+ },
924
+ {
925
+ "ref": "AgentCompletionAgent"
926
+ }
927
+ ]
928
+ }
929
+ ]
930
+ }
931
+ ],
932
+ "description": "Completion flow atom for agent text generation. Composes UI atoms (stdModal for prompt input, stdNotification for feedback) with an agent trait that handles agent/generate and retry logic."
933
+ }