@almadar/std 3.13.0 → 3.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/behaviors/exports/atoms/std-agent-activity-log.orb +559 -0
  2. package/behaviors/exports/atoms/std-agent-chat-thread.orb +774 -0
  3. package/behaviors/exports/atoms/std-agent-classifier.orb +606 -137
  4. package/behaviors/exports/atoms/std-agent-completion.orb +646 -182
  5. package/behaviors/exports/atoms/std-agent-context-window.orb +1762 -258
  6. package/behaviors/exports/atoms/std-agent-conversation.orb +652 -369
  7. package/behaviors/exports/atoms/std-agent-memory.orb +574 -322
  8. package/behaviors/exports/atoms/std-agent-provider.orb +632 -136
  9. package/behaviors/exports/atoms/std-agent-search.orb +228 -198
  10. package/behaviors/exports/atoms/std-agent-session.orb +569 -559
  11. package/behaviors/exports/atoms/std-agent-step-progress.orb +850 -0
  12. package/behaviors/exports/atoms/std-agent-token-gauge.orb +1616 -0
  13. package/behaviors/exports/atoms/std-agent-tool-call.orb +983 -126
  14. package/behaviors/exports/molecules/std-agent-fix-loop.orb +1985 -21
  15. package/behaviors/exports/molecules/std-agent-learner.orb +1830 -23
  16. package/behaviors/exports/molecules/std-agent-planner.orb +1776 -19
  17. package/behaviors/exports/molecules/std-agent-rag.orb +1150 -15
  18. package/behaviors/exports/molecules/std-agent-tool-loop.orb +3643 -23
  19. package/behaviors/exports/organisms/std-agent-assistant.orb +5308 -1156
  20. package/behaviors/exports/organisms/std-agent-builder.orb +13525 -1326
  21. package/behaviors/exports/organisms/std-agent-pipeline.orb +10731 -1088
  22. package/behaviors/exports/organisms/std-agent-reviewer.orb +4187 -525
  23. package/behaviors/exports/organisms/std-agent-tutor.orb +3126 -322
  24. package/behaviors/exports/validation-report.json +1 -1426
  25. package/dist/behaviors/exports/atoms/std-agent-activity-log.orb +559 -0
  26. package/dist/behaviors/exports/atoms/std-agent-chat-thread.orb +774 -0
  27. package/dist/behaviors/exports/atoms/std-agent-classifier.orb +606 -137
  28. package/dist/behaviors/exports/atoms/std-agent-completion.orb +646 -182
  29. package/dist/behaviors/exports/atoms/std-agent-context-window.orb +1762 -258
  30. package/dist/behaviors/exports/atoms/std-agent-conversation.orb +652 -369
  31. package/dist/behaviors/exports/atoms/std-agent-memory.orb +574 -322
  32. package/dist/behaviors/exports/atoms/std-agent-provider.orb +632 -136
  33. package/dist/behaviors/exports/atoms/std-agent-search.orb +228 -198
  34. package/dist/behaviors/exports/atoms/std-agent-session.orb +569 -559
  35. package/dist/behaviors/exports/atoms/std-agent-step-progress.orb +850 -0
  36. package/dist/behaviors/exports/atoms/std-agent-token-gauge.orb +1616 -0
  37. package/dist/behaviors/exports/atoms/std-agent-tool-call.orb +983 -126
  38. package/dist/behaviors/exports/molecules/std-agent-fix-loop.orb +1985 -21
  39. package/dist/behaviors/exports/molecules/std-agent-learner.orb +1830 -23
  40. package/dist/behaviors/exports/molecules/std-agent-planner.orb +1776 -19
  41. package/dist/behaviors/exports/molecules/std-agent-rag.orb +1150 -15
  42. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +3643 -23
  43. package/dist/behaviors/exports/organisms/std-agent-assistant.orb +5308 -1156
  44. package/dist/behaviors/exports/organisms/std-agent-builder.orb +13525 -1326
  45. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +10731 -1088
  46. package/dist/behaviors/exports/organisms/std-agent-reviewer.orb +4187 -525
  47. package/dist/behaviors/exports/organisms/std-agent-tutor.orb +3126 -322
  48. package/dist/behaviors/exports/validation-report.json +1 -1426
  49. package/dist/behaviors/exports-reader.js +4860 -4176
  50. package/dist/behaviors/exports-reader.js.map +1 -1
  51. package/dist/behaviors/functions/index.d.ts +259 -98
  52. package/dist/behaviors/functions/index.js +4845 -4177
  53. package/dist/behaviors/functions/index.js.map +1 -1
  54. package/dist/behaviors/index.d.ts +1 -1
  55. package/dist/behaviors/index.js +4863 -4179
  56. package/dist/behaviors/index.js.map +1 -1
  57. package/dist/behaviors/query.js +4862 -4178
  58. package/dist/behaviors/query.js.map +1 -1
  59. package/dist/exports/atoms/std-agent-activity-log.orb +559 -0
  60. package/dist/exports/atoms/std-agent-chat-thread.orb +774 -0
  61. package/dist/exports/atoms/std-agent-classifier.orb +606 -137
  62. package/dist/exports/atoms/std-agent-completion.orb +646 -182
  63. package/dist/exports/atoms/std-agent-context-window.orb +1762 -258
  64. package/dist/exports/atoms/std-agent-conversation.orb +652 -369
  65. package/dist/exports/atoms/std-agent-memory.orb +574 -322
  66. package/dist/exports/atoms/std-agent-provider.orb +632 -136
  67. package/dist/exports/atoms/std-agent-search.orb +228 -198
  68. package/dist/exports/atoms/std-agent-session.orb +569 -559
  69. package/dist/exports/atoms/std-agent-step-progress.orb +850 -0
  70. package/dist/exports/atoms/std-agent-token-gauge.orb +1616 -0
  71. package/dist/exports/atoms/std-agent-tool-call.orb +983 -126
  72. package/dist/exports/molecules/std-agent-fix-loop.orb +1985 -21
  73. package/dist/exports/molecules/std-agent-learner.orb +1830 -23
  74. package/dist/exports/molecules/std-agent-planner.orb +1776 -19
  75. package/dist/exports/molecules/std-agent-rag.orb +1150 -15
  76. package/dist/exports/molecules/std-agent-tool-loop.orb +3643 -23
  77. package/dist/exports/organisms/std-agent-assistant.orb +5308 -1156
  78. package/dist/exports/organisms/std-agent-builder.orb +13525 -1326
  79. package/dist/exports/organisms/std-agent-pipeline.orb +10731 -1088
  80. package/dist/exports/organisms/std-agent-reviewer.orb +4187 -525
  81. package/dist/exports/organisms/std-agent-tutor.orb +3126 -322
  82. package/dist/exports/validation-report.json +1 -1426
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.js +4864 -4180
  85. package/dist/index.js.map +1 -1
  86. package/package.json +1 -1
@@ -53,25 +53,37 @@
53
53
  "name": "model",
54
54
  "type": "string",
55
55
  "default": "claude-sonnet-4-20250514"
56
+ },
57
+ {
58
+ "name": "message",
59
+ "type": "string",
60
+ "default": ""
61
+ },
62
+ {
63
+ "name": "notificationType",
64
+ "type": "string",
65
+ "default": "info"
56
66
  }
57
67
  ]
58
68
  },
59
69
  "traits": [
60
70
  {
61
- "name": "AgentClassifierFlow",
71
+ "name": "AgentClassifierModal",
62
72
  "linkedEntity": "AgentClassifier",
63
73
  "category": "interaction",
74
+ "emits": [
75
+ {
76
+ "event": "CLASSIFIED"
77
+ }
78
+ ],
64
79
  "stateMachine": {
65
80
  "states": [
66
81
  {
67
- "name": "idle",
82
+ "name": "closed",
68
83
  "isInitial": true
69
84
  },
70
85
  {
71
- "name": "classifying"
72
- },
73
- {
74
- "name": "classified"
86
+ "name": "open"
75
87
  }
76
88
  ],
77
89
  "events": [
@@ -81,28 +93,32 @@
81
93
  },
82
94
  {
83
95
  "key": "CLASSIFY",
84
- "name": "Classify",
96
+ "name": "Open"
97
+ },
98
+ {
99
+ "key": "CLOSE",
100
+ "name": "Close"
101
+ },
102
+ {
103
+ "key": "SAVE",
104
+ "name": "Save",
85
105
  "payload": [
86
106
  {
87
- "name": "input",
88
- "type": "string",
89
- "required": false
107
+ "name": "data",
108
+ "type": "object",
109
+ "required": true
90
110
  }
91
111
  ]
92
- },
93
- {
94
- "key": "RESET",
95
- "name": "Reset"
96
112
  }
97
113
  ],
98
114
  "transitions": [
99
115
  {
100
- "from": "idle",
101
- "to": "idle",
116
+ "from": "closed",
117
+ "to": "closed",
102
118
  "event": "INIT",
103
119
  "effects": [
104
120
  [
105
- "fetch",
121
+ "ref",
106
122
  "AgentClassifier"
107
123
  ],
108
124
  [
@@ -112,34 +128,86 @@
112
128
  "type": "stack",
113
129
  "direction": "vertical",
114
130
  "gap": "lg",
131
+ "children": [
132
+ {
133
+ "type": "stack",
134
+ "direction": "horizontal",
135
+ "gap": "md",
136
+ "justify": "space-between",
137
+ "children": [
138
+ {
139
+ "type": "stack",
140
+ "direction": "horizontal",
141
+ "gap": "md",
142
+ "children": [
143
+ {
144
+ "type": "icon",
145
+ "name": "tag",
146
+ "size": "lg"
147
+ },
148
+ {
149
+ "type": "typography",
150
+ "content": "AgentClassifier",
151
+ "variant": "h2"
152
+ }
153
+ ]
154
+ },
155
+ {
156
+ "type": "button",
157
+ "label": "Open",
158
+ "event": "CLASSIFY",
159
+ "variant": "primary",
160
+ "icon": "tag"
161
+ }
162
+ ]
163
+ },
164
+ {
165
+ "type": "divider"
166
+ },
167
+ {
168
+ "type": "empty-state",
169
+ "icon": "tag",
170
+ "title": "Nothing open",
171
+ "description": "Click Open to view details in a modal overlay."
172
+ }
173
+ ]
174
+ }
175
+ ]
176
+ ]
177
+ },
178
+ {
179
+ "from": "closed",
180
+ "to": "open",
181
+ "event": "CLASSIFY",
182
+ "effects": [
183
+ [
184
+ "render-ui",
185
+ "modal",
186
+ {
187
+ "type": "stack",
188
+ "direction": "vertical",
189
+ "gap": "md",
115
190
  "children": [
116
191
  {
117
192
  "type": "stack",
118
193
  "direction": "horizontal",
119
194
  "gap": "sm",
120
- "align": "center",
121
195
  "children": [
122
196
  {
123
197
  "type": "icon",
124
198
  "name": "tag",
125
- "size": "lg"
199
+ "size": "md"
126
200
  },
127
201
  {
128
202
  "type": "typography",
129
203
  "content": "AgentClassifier",
130
- "variant": "h2"
204
+ "variant": "h3"
131
205
  }
132
206
  ]
133
207
  },
134
208
  {
135
209
  "type": "divider"
136
210
  },
137
- {
138
- "type": "textarea",
139
- "label": "Input Text",
140
- "bind": "@entity.input",
141
- "placeholder": "Enter text to classify..."
142
- },
143
211
  {
144
212
  "type": "stack",
145
213
  "direction": "horizontal",
@@ -168,11 +236,14 @@
168
236
  ]
169
237
  },
170
238
  {
171
- "type": "button",
172
- "label": "Classify",
173
- "event": "CLASSIFY",
174
- "variant": "primary",
175
- "icon": "tag"
239
+ "type": "form-section",
240
+ "entity": "AgentClassifier",
241
+ "mode": "create",
242
+ "submitEvent": "SAVE",
243
+ "cancelEvent": "CLOSE",
244
+ "fields": [
245
+ "input"
246
+ ]
176
247
  }
177
248
  ]
178
249
  }
@@ -180,41 +251,23 @@
180
251
  ]
181
252
  },
182
253
  {
183
- "from": "idle",
184
- "to": "classifying",
185
- "event": "CLASSIFY",
254
+ "from": "open",
255
+ "to": "closed",
256
+ "event": "CLOSE",
186
257
  "effects": [
187
258
  [
188
259
  "render-ui",
189
- "main",
190
- {
191
- "type": "loading-state",
192
- "title": "Classifying...",
193
- "message": "Analyzing input text..."
194
- }
260
+ "modal",
261
+ null
195
262
  ],
196
263
  [
197
- "agent/generate",
198
- [
199
- "string/concat",
200
- "Classify the following text into one of these categories: ",
201
- "positive, negative, neutral",
202
- ". Text: ",
203
- "@entity.input",
204
- ". Respond with JSON: {\"category\": \"...\", \"confidence\": 0.0-1.0}"
205
- ]
206
- ]
207
- ]
208
- },
209
- {
210
- "from": "classifying",
211
- "to": "classified",
212
- "event": "CLASSIFY",
213
- "effects": [
264
+ "notify",
265
+ "Cancelled",
266
+ "info"
267
+ ],
214
268
  [
215
- "set",
216
- "@entity.category",
217
- "@payload.input"
269
+ "ref",
270
+ "AgentClassifier"
218
271
  ],
219
272
  [
220
273
  "render-ui",
@@ -227,18 +280,32 @@
227
280
  {
228
281
  "type": "stack",
229
282
  "direction": "horizontal",
230
- "gap": "sm",
231
- "align": "center",
283
+ "gap": "md",
284
+ "justify": "space-between",
232
285
  "children": [
233
286
  {
234
- "type": "icon",
235
- "name": "check-circle",
236
- "size": "lg"
287
+ "type": "stack",
288
+ "direction": "horizontal",
289
+ "gap": "md",
290
+ "children": [
291
+ {
292
+ "type": "icon",
293
+ "name": "tag",
294
+ "size": "lg"
295
+ },
296
+ {
297
+ "type": "typography",
298
+ "content": "AgentClassifier",
299
+ "variant": "h2"
300
+ }
301
+ ]
237
302
  },
238
303
  {
239
- "type": "typography",
240
- "content": "AgentClassifier Result",
241
- "variant": "h2"
304
+ "type": "button",
305
+ "label": "Open",
306
+ "event": "CLASSIFY",
307
+ "variant": "primary",
308
+ "icon": "tag"
242
309
  }
243
310
  ]
244
311
  },
@@ -246,66 +313,166 @@
246
313
  "type": "divider"
247
314
  },
248
315
  {
249
- "type": "typography",
250
- "variant": "body",
251
- "content": "@entity.input"
252
- },
316
+ "type": "empty-state",
317
+ "icon": "tag",
318
+ "title": "Nothing open",
319
+ "description": "Click Open to view details in a modal overlay."
320
+ }
321
+ ]
322
+ }
323
+ ]
324
+ ]
325
+ },
326
+ {
327
+ "from": "open",
328
+ "to": "closed",
329
+ "event": "SAVE",
330
+ "effects": [
331
+ [
332
+ "persist",
333
+ "create",
334
+ "AgentClassifier",
335
+ "@payload.data"
336
+ ],
337
+ [
338
+ "render-ui",
339
+ "modal",
340
+ null
341
+ ],
342
+ [
343
+ "emit",
344
+ "CLASSIFIED"
345
+ ],
346
+ [
347
+ "ref",
348
+ "AgentClassifier"
349
+ ],
350
+ [
351
+ "render-ui",
352
+ "main",
353
+ {
354
+ "type": "stack",
355
+ "direction": "vertical",
356
+ "gap": "lg",
357
+ "children": [
253
358
  {
254
359
  "type": "stack",
255
360
  "direction": "horizontal",
256
361
  "gap": "md",
362
+ "justify": "space-between",
257
363
  "children": [
258
364
  {
259
- "type": "typography",
260
- "variant": "caption",
261
- "content": "Category:"
262
- },
263
- {
264
- "type": "badge",
265
- "label": "@entity.category"
266
- },
267
- {
268
- "type": "typography",
269
- "variant": "caption",
270
- "content": "Confidence:"
365
+ "type": "stack",
366
+ "direction": "horizontal",
367
+ "gap": "md",
368
+ "children": [
369
+ {
370
+ "type": "icon",
371
+ "name": "tag",
372
+ "size": "lg"
373
+ },
374
+ {
375
+ "type": "typography",
376
+ "content": "AgentClassifier",
377
+ "variant": "h2"
378
+ }
379
+ ]
271
380
  },
272
381
  {
273
- "type": "badge",
274
- "label": "@entity.confidence"
382
+ "type": "button",
383
+ "label": "Open",
384
+ "event": "CLASSIFY",
385
+ "variant": "primary",
386
+ "icon": "tag"
275
387
  }
276
388
  ]
277
389
  },
278
390
  {
279
- "type": "button",
280
- "label": "Classify Another",
281
- "event": "RESET",
282
- "variant": "ghost",
283
- "icon": "rotate-ccw"
391
+ "type": "divider"
392
+ },
393
+ {
394
+ "type": "empty-state",
395
+ "icon": "tag",
396
+ "title": "Nothing open",
397
+ "description": "Click Open to view details in a modal overlay."
284
398
  }
285
399
  ]
286
400
  }
401
+ ],
402
+ [
403
+ "notify",
404
+ "AgentClassifier created successfully"
287
405
  ]
288
406
  ]
407
+ }
408
+ ]
409
+ }
410
+ },
411
+ {
412
+ "name": "AgentClassifierNotification",
413
+ "linkedEntity": "AgentClassifier",
414
+ "category": "interaction",
415
+ "stateMachine": {
416
+ "states": [
417
+ {
418
+ "name": "hidden",
419
+ "isInitial": true
289
420
  },
290
421
  {
291
- "from": "classified",
292
- "to": "idle",
293
- "event": "RESET",
422
+ "name": "visible"
423
+ }
424
+ ],
425
+ "events": [
426
+ {
427
+ "key": "INIT",
428
+ "name": "Initialize"
429
+ },
430
+ {
431
+ "key": "SHOW",
432
+ "name": "Show Notification",
433
+ "payload": [
434
+ {
435
+ "name": "message",
436
+ "type": "string",
437
+ "required": true
438
+ },
439
+ {
440
+ "name": "notificationType",
441
+ "type": "string"
442
+ }
443
+ ]
444
+ },
445
+ {
446
+ "key": "HIDE",
447
+ "name": "Hide Notification"
448
+ }
449
+ ],
450
+ "transitions": [
451
+ {
452
+ "from": "hidden",
453
+ "to": "hidden",
454
+ "event": "INIT",
294
455
  "effects": [
295
456
  [
296
- "set",
297
- "@entity.input",
298
- ""
299
- ],
457
+ "fetch",
458
+ "AgentClassifier"
459
+ ]
460
+ ]
461
+ },
462
+ {
463
+ "from": "hidden",
464
+ "to": "visible",
465
+ "event": "SHOW",
466
+ "effects": [
300
467
  [
301
468
  "set",
302
- "@entity.category",
303
- ""
469
+ "@entity.message",
470
+ "@payload.message"
304
471
  ],
305
472
  [
306
473
  "set",
307
- "@entity.confidence",
308
- 0
474
+ "@entity.notificationType",
475
+ "@payload.notificationType"
309
476
  ],
310
477
  [
311
478
  "render-ui",
@@ -318,18 +485,34 @@
318
485
  {
319
486
  "type": "stack",
320
487
  "direction": "horizontal",
321
- "gap": "sm",
488
+ "gap": "md",
489
+ "justify": "space-between",
322
490
  "align": "center",
323
491
  "children": [
324
492
  {
325
- "type": "icon",
326
- "name": "tag",
327
- "size": "lg"
493
+ "type": "stack",
494
+ "direction": "horizontal",
495
+ "gap": "md",
496
+ "align": "center",
497
+ "children": [
498
+ {
499
+ "type": "icon",
500
+ "name": "tag",
501
+ "size": "lg"
502
+ },
503
+ {
504
+ "type": "typography",
505
+ "content": "AgentClassifier Result",
506
+ "variant": "h2"
507
+ }
508
+ ]
328
509
  },
329
510
  {
330
- "type": "typography",
331
- "content": "AgentClassifier",
332
- "variant": "h2"
511
+ "type": "button",
512
+ "label": "Dismiss",
513
+ "event": "HIDE",
514
+ "variant": "ghost",
515
+ "icon": "x"
333
516
  }
334
517
  ]
335
518
  },
@@ -337,49 +520,329 @@
337
520
  "type": "divider"
338
521
  },
339
522
  {
340
- "type": "textarea",
341
- "label": "Input Text",
342
- "bind": "@entity.input",
343
- "placeholder": "Enter text to classify..."
523
+ "type": "alert",
524
+ "variant": [
525
+ "object/get",
526
+ [
527
+ "array/first",
528
+ "@entity"
529
+ ],
530
+ "notificationType"
531
+ ],
532
+ "message": [
533
+ "object/get",
534
+ [
535
+ "array/first",
536
+ "@entity"
537
+ ],
538
+ "message"
539
+ ]
344
540
  },
541
+ {
542
+ "type": "toast-slot",
543
+ "position": "top-right"
544
+ },
545
+ {
546
+ "type": "violation-alert",
547
+ "severity": "warning",
548
+ "message": [
549
+ "object/get",
550
+ [
551
+ "array/first",
552
+ "@entity"
553
+ ],
554
+ "message"
555
+ ],
556
+ "category": "compliance"
557
+ }
558
+ ]
559
+ }
560
+ ]
561
+ ]
562
+ },
563
+ {
564
+ "from": "visible",
565
+ "to": "visible",
566
+ "event": "SHOW",
567
+ "effects": [
568
+ [
569
+ "set",
570
+ "@entity.message",
571
+ "@payload.message"
572
+ ],
573
+ [
574
+ "set",
575
+ "@entity.notificationType",
576
+ "@payload.notificationType"
577
+ ],
578
+ [
579
+ "render-ui",
580
+ "main",
581
+ {
582
+ "type": "stack",
583
+ "direction": "vertical",
584
+ "gap": "lg",
585
+ "children": [
345
586
  {
346
587
  "type": "stack",
347
588
  "direction": "horizontal",
348
- "gap": "sm",
589
+ "gap": "md",
590
+ "justify": "space-between",
591
+ "align": "center",
349
592
  "children": [
350
593
  {
351
- "type": "typography",
352
- "variant": "caption",
353
- "content": "Categories:"
354
- },
355
- {
356
- "type": "badge",
357
- "label": "positive",
358
- "variant": "secondary"
359
- },
360
- {
361
- "type": "badge",
362
- "label": "negative",
363
- "variant": "secondary"
594
+ "type": "stack",
595
+ "direction": "horizontal",
596
+ "gap": "md",
597
+ "align": "center",
598
+ "children": [
599
+ {
600
+ "type": "icon",
601
+ "name": "tag",
602
+ "size": "lg"
603
+ },
604
+ {
605
+ "type": "typography",
606
+ "content": "AgentClassifier Result",
607
+ "variant": "h2"
608
+ }
609
+ ]
364
610
  },
365
611
  {
366
- "type": "badge",
367
- "label": "neutral",
368
- "variant": "secondary"
612
+ "type": "button",
613
+ "label": "Dismiss",
614
+ "event": "HIDE",
615
+ "variant": "ghost",
616
+ "icon": "x"
369
617
  }
370
618
  ]
371
619
  },
372
620
  {
373
- "type": "button",
374
- "label": "Classify",
375
- "event": "CLASSIFY",
376
- "variant": "primary",
377
- "icon": "tag"
621
+ "type": "divider"
622
+ },
623
+ {
624
+ "type": "alert",
625
+ "variant": [
626
+ "object/get",
627
+ [
628
+ "array/first",
629
+ "@entity"
630
+ ],
631
+ "notificationType"
632
+ ],
633
+ "message": [
634
+ "object/get",
635
+ [
636
+ "array/first",
637
+ "@entity"
638
+ ],
639
+ "message"
640
+ ]
641
+ },
642
+ {
643
+ "type": "toast-slot",
644
+ "position": "top-right"
645
+ },
646
+ {
647
+ "type": "violation-alert",
648
+ "severity": "warning",
649
+ "message": [
650
+ "object/get",
651
+ [
652
+ "array/first",
653
+ "@entity"
654
+ ],
655
+ "message"
656
+ ],
657
+ "category": "compliance"
378
658
  }
379
659
  ]
380
660
  }
381
661
  ]
382
662
  ]
663
+ },
664
+ {
665
+ "from": "visible",
666
+ "to": "hidden",
667
+ "event": "HIDE",
668
+ "effects": [
669
+ [
670
+ "set",
671
+ "@entity.message",
672
+ ""
673
+ ]
674
+ ]
675
+ }
676
+ ]
677
+ }
678
+ },
679
+ {
680
+ "name": "AgentClassifierAgent",
681
+ "linkedEntity": "AgentClassifier",
682
+ "category": "interaction",
683
+ "emits": [
684
+ {
685
+ "event": "SHOW",
686
+ "scope": "internal",
687
+ "payload": [
688
+ {
689
+ "name": "category",
690
+ "type": "string"
691
+ },
692
+ {
693
+ "name": "confidence",
694
+ "type": "number"
695
+ }
696
+ ]
697
+ }
698
+ ],
699
+ "listens": [
700
+ {
701
+ "event": "CLASSIFIED",
702
+ "triggers": "CLASSIFIED",
703
+ "scope": "external"
704
+ }
705
+ ],
706
+ "stateMachine": {
707
+ "states": [
708
+ {
709
+ "name": "idle",
710
+ "isInitial": true
711
+ },
712
+ {
713
+ "name": "classifying"
714
+ },
715
+ {
716
+ "name": "classified"
717
+ }
718
+ ],
719
+ "events": [
720
+ {
721
+ "key": "INIT",
722
+ "name": "Initialize"
723
+ },
724
+ {
725
+ "key": "DO_CLASSIFY",
726
+ "name": "Do Classify",
727
+ "payload": [
728
+ {
729
+ "name": "data",
730
+ "type": "object",
731
+ "required": true
732
+ }
733
+ ]
734
+ },
735
+ {
736
+ "key": "RESET",
737
+ "name": "Reset"
738
+ },
739
+ {
740
+ "key": "CLASSIFIED",
741
+ "name": "Classified",
742
+ "payload": [
743
+ {
744
+ "name": "data",
745
+ "type": "object",
746
+ "required": true
747
+ }
748
+ ]
749
+ }
750
+ ],
751
+ "transitions": [
752
+ {
753
+ "from": "idle",
754
+ "to": "idle",
755
+ "event": "INIT",
756
+ "effects": [
757
+ [
758
+ "fetch",
759
+ "AgentClassifier"
760
+ ],
761
+ [
762
+ "render-ui",
763
+ "main",
764
+ {
765
+ "type": "empty-state",
766
+ "icon": "tag",
767
+ "title": "Classifier",
768
+ "description": "Classifier is ready"
769
+ }
770
+ ]
771
+ ]
772
+ },
773
+ {
774
+ "from": "idle",
775
+ "to": "classifying",
776
+ "event": "DO_CLASSIFY",
777
+ "effects": [
778
+ [
779
+ "agent/generate",
780
+ [
781
+ "str/concat",
782
+ "Classify the following text into one of these categories: ",
783
+ "positive, negative, neutral",
784
+ ". Text: ",
785
+ "@entity.input",
786
+ ". Respond with JSON: {\"category\": \"...\", \"confidence\": 0.0-1.0}"
787
+ ]
788
+ ]
789
+ ]
790
+ },
791
+ {
792
+ "from": "idle",
793
+ "to": "classifying",
794
+ "event": "CLASSIFIED",
795
+ "effects": [
796
+ [
797
+ "agent/generate",
798
+ [
799
+ "str/concat",
800
+ "Classify the following text into one of these categories: ",
801
+ "positive, negative, neutral",
802
+ ". Text: ",
803
+ "@entity.input",
804
+ ". Respond with JSON: {\"category\": \"...\", \"confidence\": 0.0-1.0}"
805
+ ]
806
+ ]
807
+ ]
808
+ },
809
+ {
810
+ "from": "classifying",
811
+ "to": "classified",
812
+ "event": "DO_CLASSIFY",
813
+ "effects": [
814
+ [
815
+ "set",
816
+ "@entity.category",
817
+ "@payload.data.input"
818
+ ],
819
+ [
820
+ "emit",
821
+ "SHOW"
822
+ ]
823
+ ]
824
+ },
825
+ {
826
+ "from": "classified",
827
+ "to": "idle",
828
+ "event": "RESET",
829
+ "effects": [
830
+ [
831
+ "set",
832
+ "@entity.input",
833
+ ""
834
+ ],
835
+ [
836
+ "set",
837
+ "@entity.category",
838
+ ""
839
+ ],
840
+ [
841
+ "set",
842
+ "@entity.confidence",
843
+ 0
844
+ ]
845
+ ]
383
846
  }
384
847
  ]
385
848
  }
@@ -391,12 +854,18 @@
391
854
  "path": "/agentclassifiers",
392
855
  "traits": [
393
856
  {
394
- "ref": "AgentClassifierFlow"
857
+ "ref": "AgentClassifierModal"
858
+ },
859
+ {
860
+ "ref": "AgentClassifierNotification"
861
+ },
862
+ {
863
+ "ref": "AgentClassifierAgent"
395
864
  }
396
865
  ]
397
866
  }
398
867
  ]
399
868
  }
400
869
  ],
401
- "description": "Classification flow atom for agent-powered text classification. Uses agent/generate with a classification prompt to categorize input text. States: idle -> classifying -> classified."
870
+ "description": "Classification flow atom for agent-powered text classification. Composes UI atoms (stdModal for input form, stdNotification for result badge) with an agent trait that uses agent/generate with a classification prompt."
402
871
  }