@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,1020 @@
1
+ {
2
+ "name": "AgentConversationOrbital",
3
+ "orbitals": [
4
+ {
5
+ "name": "AgentConversationOrbital",
6
+ "entity": {
7
+ "name": "AgentConversation",
8
+ "persistence": "persistent",
9
+ "collection": "agentconversations",
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": "messages",
39
+ "type": "array",
40
+ "default": []
41
+ },
42
+ {
43
+ "name": "turnCount",
44
+ "type": "number",
45
+ "default": 0
46
+ },
47
+ {
48
+ "name": "lastMessage",
49
+ "type": "string",
50
+ "default": ""
51
+ },
52
+ {
53
+ "name": "tokenCount",
54
+ "type": "number",
55
+ "default": 0
56
+ },
57
+ {
58
+ "name": "role",
59
+ "type": "string",
60
+ "default": "user"
61
+ },
62
+ {
63
+ "name": "content",
64
+ "type": "string",
65
+ "default": ""
66
+ },
67
+ {
68
+ "name": "timestamp",
69
+ "type": "string",
70
+ "default": ""
71
+ },
72
+ {
73
+ "name": "toolName",
74
+ "type": "string",
75
+ "default": ""
76
+ }
77
+ ]
78
+ },
79
+ "traits": [
80
+ {
81
+ "name": "AgentConversationThread",
82
+ "linkedEntity": "AgentConversation",
83
+ "category": "interaction",
84
+ "emits": [
85
+ {
86
+ "event": "SEND_MESSAGE",
87
+ "scope": "internal",
88
+ "payload": [
89
+ {
90
+ "name": "content",
91
+ "type": "string"
92
+ }
93
+ ]
94
+ }
95
+ ],
96
+ "stateMachine": {
97
+ "states": [
98
+ {
99
+ "name": "idle",
100
+ "isInitial": true
101
+ },
102
+ {
103
+ "name": "composing"
104
+ }
105
+ ],
106
+ "events": [
107
+ {
108
+ "key": "INIT",
109
+ "name": "Initialize"
110
+ },
111
+ {
112
+ "key": "COMPOSE",
113
+ "name": "Compose Message"
114
+ },
115
+ {
116
+ "key": "SEND",
117
+ "name": "Send Message",
118
+ "payload": [
119
+ {
120
+ "name": "content",
121
+ "type": "string",
122
+ "required": true
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ "key": "CLEAR",
128
+ "name": "Clear Thread"
129
+ }
130
+ ],
131
+ "transitions": [
132
+ {
133
+ "from": "idle",
134
+ "to": "idle",
135
+ "event": "INIT",
136
+ "effects": [
137
+ [
138
+ "fetch",
139
+ "AgentConversation"
140
+ ],
141
+ [
142
+ "render-ui",
143
+ "main",
144
+ {
145
+ "type": "stack",
146
+ "direction": "vertical",
147
+ "gap": "lg",
148
+ "children": [
149
+ {
150
+ "type": "stack",
151
+ "direction": "horizontal",
152
+ "gap": "sm",
153
+ "justify": "space-between",
154
+ "align": "center",
155
+ "children": [
156
+ {
157
+ "type": "stack",
158
+ "direction": "horizontal",
159
+ "gap": "sm",
160
+ "align": "center",
161
+ "children": [
162
+ {
163
+ "type": "icon",
164
+ "name": "message-circle",
165
+ "size": "lg"
166
+ },
167
+ {
168
+ "type": "typography",
169
+ "content": "AgentConversation Thread",
170
+ "variant": "h2"
171
+ }
172
+ ]
173
+ },
174
+ {
175
+ "type": "button",
176
+ "label": "New Message",
177
+ "event": "COMPOSE",
178
+ "variant": "primary",
179
+ "icon": "plus"
180
+ }
181
+ ]
182
+ },
183
+ {
184
+ "type": "divider"
185
+ },
186
+ {
187
+ "type": "data-list",
188
+ "entity": "AgentConversation",
189
+ "emptyIcon": "message-circle",
190
+ "emptyTitle": "No messages yet",
191
+ "emptyDescription": "Start a conversation by sending a message.",
192
+ "renderItem": [
193
+ "fn",
194
+ "item",
195
+ {
196
+ "type": "stack",
197
+ "direction": "vertical",
198
+ "gap": "xs",
199
+ "children": [
200
+ {
201
+ "type": "stack",
202
+ "direction": "horizontal",
203
+ "gap": "sm",
204
+ "align": "center",
205
+ "children": [
206
+ {
207
+ "type": "badge",
208
+ "label": "@item.role"
209
+ },
210
+ {
211
+ "type": "badge",
212
+ "label": "@item.status",
213
+ "variant": "outline"
214
+ },
215
+ {
216
+ "type": "typography",
217
+ "variant": "caption",
218
+ "color": "muted",
219
+ "content": "@item.timestamp"
220
+ }
221
+ ]
222
+ },
223
+ {
224
+ "type": "typography",
225
+ "variant": "body",
226
+ "content": "@item.content"
227
+ }
228
+ ]
229
+ }
230
+ ]
231
+ }
232
+ ]
233
+ }
234
+ ]
235
+ ]
236
+ },
237
+ {
238
+ "from": "idle",
239
+ "to": "composing",
240
+ "event": "COMPOSE",
241
+ "effects": [
242
+ [
243
+ "render-ui",
244
+ "main",
245
+ {
246
+ "type": "stack",
247
+ "direction": "vertical",
248
+ "gap": "lg",
249
+ "children": [
250
+ {
251
+ "type": "stack",
252
+ "direction": "horizontal",
253
+ "gap": "sm",
254
+ "justify": "space-between",
255
+ "align": "center",
256
+ "children": [
257
+ {
258
+ "type": "stack",
259
+ "direction": "horizontal",
260
+ "gap": "sm",
261
+ "align": "center",
262
+ "children": [
263
+ {
264
+ "type": "icon",
265
+ "name": "message-circle",
266
+ "size": "lg"
267
+ },
268
+ {
269
+ "type": "typography",
270
+ "content": "AgentConversation Thread",
271
+ "variant": "h2"
272
+ }
273
+ ]
274
+ },
275
+ {
276
+ "type": "button",
277
+ "label": "New Message",
278
+ "event": "COMPOSE",
279
+ "variant": "primary",
280
+ "icon": "plus",
281
+ "disabled": true
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ "type": "divider"
287
+ },
288
+ {
289
+ "type": "data-list",
290
+ "entity": "AgentConversation",
291
+ "emptyIcon": "message-circle",
292
+ "emptyTitle": "No messages yet",
293
+ "emptyDescription": "Start a conversation by sending a message.",
294
+ "renderItem": [
295
+ "fn",
296
+ "item",
297
+ {
298
+ "type": "stack",
299
+ "direction": "vertical",
300
+ "gap": "xs",
301
+ "children": [
302
+ {
303
+ "type": "stack",
304
+ "direction": "horizontal",
305
+ "gap": "sm",
306
+ "align": "center",
307
+ "children": [
308
+ {
309
+ "type": "badge",
310
+ "label": "@item.role"
311
+ },
312
+ {
313
+ "type": "badge",
314
+ "label": "@item.status",
315
+ "variant": "outline"
316
+ },
317
+ {
318
+ "type": "typography",
319
+ "variant": "caption",
320
+ "color": "muted",
321
+ "content": "@item.timestamp"
322
+ }
323
+ ]
324
+ },
325
+ {
326
+ "type": "typography",
327
+ "variant": "body",
328
+ "content": "@item.content"
329
+ }
330
+ ]
331
+ }
332
+ ]
333
+ },
334
+ {
335
+ "type": "form-section",
336
+ "title": "Compose Message",
337
+ "children": [
338
+ {
339
+ "type": "textarea",
340
+ "label": "Message",
341
+ "bind": "@entity.content",
342
+ "placeholder": "Type your message..."
343
+ },
344
+ {
345
+ "type": "stack",
346
+ "direction": "horizontal",
347
+ "gap": "sm",
348
+ "children": [
349
+ {
350
+ "type": "button",
351
+ "label": "Send",
352
+ "event": "SEND",
353
+ "variant": "primary",
354
+ "icon": "send"
355
+ }
356
+ ]
357
+ }
358
+ ],
359
+ "fields": [
360
+ {
361
+ "name": "name",
362
+ "type": "string"
363
+ },
364
+ {
365
+ "name": "description",
366
+ "type": "string"
367
+ },
368
+ {
369
+ "name": "status",
370
+ "type": "string",
371
+ "values": [
372
+ "active",
373
+ "inactive",
374
+ "pending"
375
+ ]
376
+ },
377
+ {
378
+ "name": "createdAt",
379
+ "type": "string"
380
+ },
381
+ {
382
+ "name": "messages",
383
+ "type": "array"
384
+ },
385
+ {
386
+ "name": "turnCount",
387
+ "type": "number"
388
+ },
389
+ {
390
+ "name": "lastMessage",
391
+ "type": "string"
392
+ },
393
+ {
394
+ "name": "tokenCount",
395
+ "type": "number"
396
+ },
397
+ {
398
+ "name": "role",
399
+ "type": "string"
400
+ },
401
+ {
402
+ "name": "content",
403
+ "type": "string"
404
+ },
405
+ {
406
+ "name": "timestamp",
407
+ "type": "string"
408
+ },
409
+ {
410
+ "name": "toolName",
411
+ "type": "string"
412
+ }
413
+ ]
414
+ }
415
+ ]
416
+ }
417
+ ]
418
+ ]
419
+ },
420
+ {
421
+ "from": "composing",
422
+ "to": "idle",
423
+ "event": "SEND",
424
+ "effects": [
425
+ [
426
+ "set",
427
+ "@entity.content",
428
+ "@payload.content"
429
+ ],
430
+ [
431
+ "set",
432
+ "@entity.role",
433
+ "user"
434
+ ],
435
+ [
436
+ "set",
437
+ "@entity.timestamp",
438
+ "@now"
439
+ ],
440
+ [
441
+ "set",
442
+ "@entity.status",
443
+ "sent"
444
+ ],
445
+ [
446
+ "persist",
447
+ "create",
448
+ "AgentConversation",
449
+ {
450
+ "role": "user",
451
+ "content": "@payload.content",
452
+ "timestamp": "@now",
453
+ "status": "sent"
454
+ }
455
+ ],
456
+ [
457
+ "emit",
458
+ "SEND_MESSAGE"
459
+ ],
460
+ [
461
+ "fetch",
462
+ "AgentConversation"
463
+ ],
464
+ [
465
+ "render-ui",
466
+ "main",
467
+ {
468
+ "type": "stack",
469
+ "direction": "vertical",
470
+ "gap": "lg",
471
+ "children": [
472
+ {
473
+ "type": "stack",
474
+ "direction": "horizontal",
475
+ "gap": "sm",
476
+ "justify": "space-between",
477
+ "align": "center",
478
+ "children": [
479
+ {
480
+ "type": "stack",
481
+ "direction": "horizontal",
482
+ "gap": "sm",
483
+ "align": "center",
484
+ "children": [
485
+ {
486
+ "type": "icon",
487
+ "name": "message-circle",
488
+ "size": "lg"
489
+ },
490
+ {
491
+ "type": "typography",
492
+ "content": "AgentConversation Thread",
493
+ "variant": "h2"
494
+ }
495
+ ]
496
+ },
497
+ {
498
+ "type": "button",
499
+ "label": "New Message",
500
+ "event": "COMPOSE",
501
+ "variant": "primary",
502
+ "icon": "plus"
503
+ }
504
+ ]
505
+ },
506
+ {
507
+ "type": "divider"
508
+ },
509
+ {
510
+ "type": "data-list",
511
+ "entity": "AgentConversation",
512
+ "emptyIcon": "message-circle",
513
+ "emptyTitle": "No messages yet",
514
+ "emptyDescription": "Start a conversation by sending a message.",
515
+ "renderItem": [
516
+ "fn",
517
+ "item",
518
+ {
519
+ "type": "stack",
520
+ "direction": "vertical",
521
+ "gap": "xs",
522
+ "children": [
523
+ {
524
+ "type": "stack",
525
+ "direction": "horizontal",
526
+ "gap": "sm",
527
+ "align": "center",
528
+ "children": [
529
+ {
530
+ "type": "badge",
531
+ "label": "@item.role"
532
+ },
533
+ {
534
+ "type": "badge",
535
+ "label": "@item.status",
536
+ "variant": "outline"
537
+ },
538
+ {
539
+ "type": "typography",
540
+ "variant": "caption",
541
+ "color": "muted",
542
+ "content": "@item.timestamp"
543
+ }
544
+ ]
545
+ },
546
+ {
547
+ "type": "typography",
548
+ "variant": "body",
549
+ "content": "@item.content"
550
+ }
551
+ ]
552
+ }
553
+ ]
554
+ }
555
+ ]
556
+ }
557
+ ],
558
+ [
559
+ "notify",
560
+ "AgentConversation created successfully"
561
+ ]
562
+ ]
563
+ },
564
+ {
565
+ "from": "idle",
566
+ "to": "idle",
567
+ "event": "CLEAR",
568
+ "effects": [
569
+ [
570
+ "persist",
571
+ "delete",
572
+ "AgentConversation"
573
+ ],
574
+ [
575
+ "fetch",
576
+ "AgentConversation"
577
+ ],
578
+ [
579
+ "render-ui",
580
+ "main",
581
+ {
582
+ "type": "stack",
583
+ "direction": "vertical",
584
+ "gap": "lg",
585
+ "children": [
586
+ {
587
+ "type": "stack",
588
+ "direction": "horizontal",
589
+ "gap": "sm",
590
+ "justify": "space-between",
591
+ "align": "center",
592
+ "children": [
593
+ {
594
+ "type": "stack",
595
+ "direction": "horizontal",
596
+ "gap": "sm",
597
+ "align": "center",
598
+ "children": [
599
+ {
600
+ "type": "icon",
601
+ "name": "message-circle",
602
+ "size": "lg"
603
+ },
604
+ {
605
+ "type": "typography",
606
+ "content": "AgentConversation Thread",
607
+ "variant": "h2"
608
+ }
609
+ ]
610
+ },
611
+ {
612
+ "type": "button",
613
+ "label": "New Message",
614
+ "event": "COMPOSE",
615
+ "variant": "primary",
616
+ "icon": "plus"
617
+ }
618
+ ]
619
+ },
620
+ {
621
+ "type": "divider"
622
+ },
623
+ {
624
+ "type": "data-list",
625
+ "entity": "AgentConversation",
626
+ "emptyIcon": "message-circle",
627
+ "emptyTitle": "No messages yet",
628
+ "emptyDescription": "Start a conversation by sending a message.",
629
+ "renderItem": [
630
+ "fn",
631
+ "item",
632
+ {
633
+ "type": "stack",
634
+ "direction": "vertical",
635
+ "gap": "xs",
636
+ "children": [
637
+ {
638
+ "type": "stack",
639
+ "direction": "horizontal",
640
+ "gap": "sm",
641
+ "align": "center",
642
+ "children": [
643
+ {
644
+ "type": "badge",
645
+ "label": "@item.role"
646
+ },
647
+ {
648
+ "type": "badge",
649
+ "label": "@item.status",
650
+ "variant": "outline"
651
+ },
652
+ {
653
+ "type": "typography",
654
+ "variant": "caption",
655
+ "color": "muted",
656
+ "content": "@item.timestamp"
657
+ }
658
+ ]
659
+ },
660
+ {
661
+ "type": "typography",
662
+ "variant": "body",
663
+ "content": "@item.content"
664
+ }
665
+ ]
666
+ }
667
+ ]
668
+ }
669
+ ]
670
+ }
671
+ ],
672
+ [
673
+ "notify",
674
+ "AgentConversation deleted successfully"
675
+ ]
676
+ ]
677
+ },
678
+ {
679
+ "from": "composing",
680
+ "to": "idle",
681
+ "event": "CLEAR",
682
+ "effects": [
683
+ [
684
+ "persist",
685
+ "delete",
686
+ "AgentConversation"
687
+ ],
688
+ [
689
+ "fetch",
690
+ "AgentConversation"
691
+ ],
692
+ [
693
+ "render-ui",
694
+ "main",
695
+ {
696
+ "type": "stack",
697
+ "direction": "vertical",
698
+ "gap": "lg",
699
+ "children": [
700
+ {
701
+ "type": "stack",
702
+ "direction": "horizontal",
703
+ "gap": "sm",
704
+ "justify": "space-between",
705
+ "align": "center",
706
+ "children": [
707
+ {
708
+ "type": "stack",
709
+ "direction": "horizontal",
710
+ "gap": "sm",
711
+ "align": "center",
712
+ "children": [
713
+ {
714
+ "type": "icon",
715
+ "name": "message-circle",
716
+ "size": "lg"
717
+ },
718
+ {
719
+ "type": "typography",
720
+ "content": "AgentConversation Thread",
721
+ "variant": "h2"
722
+ }
723
+ ]
724
+ },
725
+ {
726
+ "type": "button",
727
+ "label": "New Message",
728
+ "event": "COMPOSE",
729
+ "variant": "primary",
730
+ "icon": "plus"
731
+ }
732
+ ]
733
+ },
734
+ {
735
+ "type": "divider"
736
+ },
737
+ {
738
+ "type": "data-list",
739
+ "entity": "AgentConversation",
740
+ "emptyIcon": "message-circle",
741
+ "emptyTitle": "No messages yet",
742
+ "emptyDescription": "Start a conversation by sending a message.",
743
+ "renderItem": [
744
+ "fn",
745
+ "item",
746
+ {
747
+ "type": "stack",
748
+ "direction": "vertical",
749
+ "gap": "xs",
750
+ "children": [
751
+ {
752
+ "type": "stack",
753
+ "direction": "horizontal",
754
+ "gap": "sm",
755
+ "align": "center",
756
+ "children": [
757
+ {
758
+ "type": "badge",
759
+ "label": "@item.role"
760
+ },
761
+ {
762
+ "type": "badge",
763
+ "label": "@item.status",
764
+ "variant": "outline"
765
+ },
766
+ {
767
+ "type": "typography",
768
+ "variant": "caption",
769
+ "color": "muted",
770
+ "content": "@item.timestamp"
771
+ }
772
+ ]
773
+ },
774
+ {
775
+ "type": "typography",
776
+ "variant": "body",
777
+ "content": "@item.content"
778
+ }
779
+ ]
780
+ }
781
+ ]
782
+ }
783
+ ]
784
+ }
785
+ ],
786
+ [
787
+ "notify",
788
+ "AgentConversation deleted successfully"
789
+ ]
790
+ ]
791
+ }
792
+ ]
793
+ }
794
+ },
795
+ {
796
+ "name": "AgentConversationAgent",
797
+ "linkedEntity": "AgentConversation",
798
+ "category": "interaction",
799
+ "emits": [
800
+ {
801
+ "event": "TOKEN_UPDATE",
802
+ "scope": "internal",
803
+ "payload": [
804
+ {
805
+ "name": "tokenCount",
806
+ "type": "number"
807
+ }
808
+ ]
809
+ }
810
+ ],
811
+ "stateMachine": {
812
+ "states": [
813
+ {
814
+ "name": "idle",
815
+ "isInitial": true
816
+ },
817
+ {
818
+ "name": "active"
819
+ },
820
+ {
821
+ "name": "paused"
822
+ }
823
+ ],
824
+ "events": [
825
+ {
826
+ "key": "INIT",
827
+ "name": "Initialize"
828
+ },
829
+ {
830
+ "key": "SEND_MESSAGE",
831
+ "name": "Send Message",
832
+ "payload": [
833
+ {
834
+ "name": "content",
835
+ "type": "string",
836
+ "required": true
837
+ }
838
+ ]
839
+ },
840
+ {
841
+ "key": "PAUSE",
842
+ "name": "Pause"
843
+ },
844
+ {
845
+ "key": "RESUME",
846
+ "name": "Resume"
847
+ },
848
+ {
849
+ "key": "CLEAR",
850
+ "name": "Clear"
851
+ }
852
+ ],
853
+ "transitions": [
854
+ {
855
+ "from": "idle",
856
+ "to": "idle",
857
+ "event": "INIT",
858
+ "effects": [
859
+ [
860
+ "fetch",
861
+ "AgentConversation"
862
+ ],
863
+ [
864
+ "render-ui",
865
+ "main",
866
+ {
867
+ "type": "empty-state",
868
+ "icon": "message-circle",
869
+ "title": "Conversation",
870
+ "description": "Conversation is ready"
871
+ }
872
+ ]
873
+ ]
874
+ },
875
+ {
876
+ "from": "idle",
877
+ "to": "active",
878
+ "event": "SEND_MESSAGE",
879
+ "effects": [
880
+ [
881
+ "set",
882
+ "@entity.lastMessage",
883
+ "@payload.content"
884
+ ],
885
+ [
886
+ "set",
887
+ "@entity.turnCount",
888
+ [
889
+ "+",
890
+ "@entity.turnCount",
891
+ 1
892
+ ]
893
+ ],
894
+ [
895
+ "agent/generate",
896
+ "@payload.content"
897
+ ],
898
+ [
899
+ "emit",
900
+ "TOKEN_UPDATE"
901
+ ]
902
+ ]
903
+ },
904
+ {
905
+ "from": "active",
906
+ "to": "active",
907
+ "event": "SEND_MESSAGE",
908
+ "effects": [
909
+ [
910
+ "set",
911
+ "@entity.lastMessage",
912
+ "@payload.content"
913
+ ],
914
+ [
915
+ "set",
916
+ "@entity.turnCount",
917
+ [
918
+ "+",
919
+ "@entity.turnCount",
920
+ 1
921
+ ]
922
+ ],
923
+ [
924
+ "agent/generate",
925
+ "@payload.content"
926
+ ],
927
+ [
928
+ "emit",
929
+ "TOKEN_UPDATE"
930
+ ]
931
+ ]
932
+ },
933
+ {
934
+ "from": "active",
935
+ "to": "paused",
936
+ "event": "PAUSE",
937
+ "effects": []
938
+ },
939
+ {
940
+ "from": "paused",
941
+ "to": "active",
942
+ "event": "RESUME",
943
+ "effects": []
944
+ },
945
+ {
946
+ "from": "active",
947
+ "to": "idle",
948
+ "event": "CLEAR",
949
+ "effects": [
950
+ [
951
+ "set",
952
+ "@entity.messages",
953
+ []
954
+ ],
955
+ [
956
+ "set",
957
+ "@entity.turnCount",
958
+ 0
959
+ ],
960
+ [
961
+ "set",
962
+ "@entity.lastMessage",
963
+ ""
964
+ ],
965
+ [
966
+ "set",
967
+ "@entity.tokenCount",
968
+ 0
969
+ ]
970
+ ]
971
+ },
972
+ {
973
+ "from": "paused",
974
+ "to": "idle",
975
+ "event": "CLEAR",
976
+ "effects": [
977
+ [
978
+ "set",
979
+ "@entity.messages",
980
+ []
981
+ ],
982
+ [
983
+ "set",
984
+ "@entity.turnCount",
985
+ 0
986
+ ],
987
+ [
988
+ "set",
989
+ "@entity.lastMessage",
990
+ ""
991
+ ],
992
+ [
993
+ "set",
994
+ "@entity.tokenCount",
995
+ 0
996
+ ]
997
+ ]
998
+ }
999
+ ]
1000
+ }
1001
+ }
1002
+ ],
1003
+ "pages": [
1004
+ {
1005
+ "name": "AgentConversationPage",
1006
+ "path": "/agentconversations",
1007
+ "traits": [
1008
+ {
1009
+ "ref": "AgentConversationThread"
1010
+ },
1011
+ {
1012
+ "ref": "AgentConversationAgent"
1013
+ }
1014
+ ]
1015
+ }
1016
+ ]
1017
+ }
1018
+ ],
1019
+ "description": "Conversation flow atom for multi-turn agent interactions. Composes stdAgentChatThread (message display and compose) with an agent trait that handles agent/generate for AI replies and TOKEN_UPDATE emitting."
1020
+ }