@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
@@ -68,17 +68,36 @@
68
68
  },
69
69
  "traits": [
70
70
  {
71
- "name": "AgentMemoryLifecycle",
71
+ "name": "AgentMemoryBrowse",
72
72
  "linkedEntity": "AgentMemory",
73
73
  "category": "interaction",
74
+ "listens": [
75
+ {
76
+ "event": "MEMORIZED",
77
+ "triggers": "MEMORIZED"
78
+ },
79
+ {
80
+ "event": "PINNED",
81
+ "triggers": "PINNED"
82
+ },
83
+ {
84
+ "event": "FORGOT",
85
+ "triggers": "FORGOT"
86
+ },
87
+ {
88
+ "event": "REINFORCED",
89
+ "triggers": "REINFORCED"
90
+ },
91
+ {
92
+ "event": "DECAYED",
93
+ "triggers": "DECAYED"
94
+ }
95
+ ],
74
96
  "stateMachine": {
75
97
  "states": [
76
98
  {
77
- "name": "idle",
99
+ "name": "browsing",
78
100
  "isInitial": true
79
- },
80
- {
81
- "name": "active"
82
101
  }
83
102
  ],
84
103
  "events": [
@@ -88,77 +107,125 @@
88
107
  },
89
108
  {
90
109
  "key": "MEMORIZE",
91
- "name": "Memorize",
110
+ "name": "MEMORIZE"
111
+ },
112
+ {
113
+ "key": "RECALL",
114
+ "name": "RECALL"
115
+ },
116
+ {
117
+ "key": "DECAY",
118
+ "name": "DECAY"
119
+ },
120
+ {
121
+ "key": "PIN",
122
+ "name": "PIN",
92
123
  "payload": [
93
124
  {
94
- "name": "content",
125
+ "name": "id",
95
126
  "type": "string",
96
127
  "required": true
97
128
  },
98
129
  {
99
- "name": "category",
100
- "type": "string",
101
- "required": false
130
+ "name": "row",
131
+ "type": "object"
102
132
  }
103
133
  ]
104
134
  },
105
135
  {
106
- "key": "RECALL",
107
- "name": "Recall",
136
+ "key": "REINFORCE",
137
+ "name": "REINFORCE",
108
138
  "payload": [
109
139
  {
110
- "name": "query",
140
+ "name": "id",
111
141
  "type": "string",
112
142
  "required": true
143
+ },
144
+ {
145
+ "name": "row",
146
+ "type": "object"
113
147
  }
114
148
  ]
115
149
  },
116
150
  {
117
- "key": "PIN",
118
- "name": "Pin",
151
+ "key": "FORGET",
152
+ "name": "FORGET",
119
153
  "payload": [
120
154
  {
121
155
  "name": "id",
122
156
  "type": "string",
123
157
  "required": true
158
+ },
159
+ {
160
+ "name": "row",
161
+ "type": "object"
124
162
  }
125
163
  ]
126
164
  },
127
165
  {
128
- "key": "FORGET",
129
- "name": "Forget",
166
+ "key": "MEMORIZED",
167
+ "name": "MEMORIZED",
130
168
  "payload": [
131
169
  {
132
- "name": "id",
133
- "type": "string",
170
+ "name": "data",
171
+ "type": "object",
134
172
  "required": true
135
173
  }
136
174
  ]
137
175
  },
138
176
  {
139
- "key": "REINFORCE",
140
- "name": "Reinforce",
177
+ "key": "PINNED",
178
+ "name": "PINNED",
141
179
  "payload": [
142
180
  {
143
- "name": "id",
144
- "type": "string",
181
+ "name": "data",
182
+ "type": "object",
145
183
  "required": true
146
184
  }
147
185
  ]
148
186
  },
149
187
  {
150
- "key": "DECAY",
151
- "name": "Decay"
188
+ "key": "FORGOT",
189
+ "name": "FORGOT",
190
+ "payload": [
191
+ {
192
+ "name": "data",
193
+ "type": "object",
194
+ "required": true
195
+ }
196
+ ]
197
+ },
198
+ {
199
+ "key": "REINFORCED",
200
+ "name": "REINFORCED",
201
+ "payload": [
202
+ {
203
+ "name": "data",
204
+ "type": "object",
205
+ "required": true
206
+ }
207
+ ]
208
+ },
209
+ {
210
+ "key": "DECAYED",
211
+ "name": "DECAYED",
212
+ "payload": [
213
+ {
214
+ "name": "data",
215
+ "type": "object",
216
+ "required": true
217
+ }
218
+ ]
152
219
  }
153
220
  ],
154
221
  "transitions": [
155
222
  {
156
- "from": "idle",
157
- "to": "idle",
223
+ "from": "browsing",
224
+ "to": "browsing",
158
225
  "event": "INIT",
159
226
  "effects": [
160
227
  [
161
- "fetch",
228
+ "ref",
162
229
  "AgentMemory"
163
230
  ],
164
231
  [
@@ -168,22 +235,60 @@
168
235
  "type": "stack",
169
236
  "direction": "vertical",
170
237
  "gap": "lg",
238
+ "className": "max-w-5xl mx-auto w-full",
171
239
  "children": [
172
240
  {
173
241
  "type": "stack",
174
242
  "direction": "horizontal",
175
- "gap": "sm",
243
+ "gap": "md",
244
+ "justify": "space-between",
176
245
  "align": "center",
177
246
  "children": [
178
247
  {
179
- "type": "icon",
180
- "name": "brain",
181
- "size": "lg"
248
+ "type": "stack",
249
+ "direction": "horizontal",
250
+ "gap": "sm",
251
+ "align": "center",
252
+ "children": [
253
+ {
254
+ "type": "icon",
255
+ "name": "brain",
256
+ "size": "lg"
257
+ },
258
+ {
259
+ "type": "typography",
260
+ "content": "AgentMemory Manager",
261
+ "variant": "h2"
262
+ }
263
+ ]
182
264
  },
183
265
  {
184
- "type": "typography",
185
- "content": "AgentMemory Manager",
186
- "variant": "h2"
266
+ "type": "stack",
267
+ "direction": "horizontal",
268
+ "gap": "sm",
269
+ "children": [
270
+ {
271
+ "type": "button",
272
+ "label": "Memorize",
273
+ "event": "MEMORIZE",
274
+ "variant": "primary",
275
+ "icon": "plus"
276
+ },
277
+ {
278
+ "type": "button",
279
+ "label": "Recall",
280
+ "event": "RECALL",
281
+ "variant": "secondary",
282
+ "icon": "search"
283
+ },
284
+ {
285
+ "type": "button",
286
+ "label": "Decay All",
287
+ "event": "DECAY",
288
+ "variant": "ghost",
289
+ "icon": "clock"
290
+ }
291
+ ]
187
292
  }
188
293
  ]
189
294
  },
@@ -191,30 +296,61 @@
191
296
  "type": "divider"
192
297
  },
193
298
  {
194
- "type": "stack",
195
- "direction": "horizontal",
196
- "gap": "sm",
197
- "children": [
299
+ "type": "data-grid",
300
+ "entity": "AgentMemory",
301
+ "emptyIcon": "inbox",
302
+ "emptyTitle": "No memories yet",
303
+ "emptyDescription": "Create your first memory to get started.",
304
+ "itemActions": [
198
305
  {
199
- "type": "button",
200
- "label": "Memorize",
201
- "event": "MEMORIZE",
202
- "variant": "primary",
203
- "icon": "plus"
306
+ "label": "Pin",
307
+ "event": "PIN",
308
+ "variant": "ghost",
309
+ "size": "sm"
204
310
  },
205
311
  {
206
- "type": "button",
207
- "label": "Recall",
208
- "event": "RECALL",
209
- "variant": "secondary",
210
- "icon": "search"
312
+ "label": "Reinforce",
313
+ "event": "REINFORCE",
314
+ "variant": "ghost",
315
+ "size": "sm"
211
316
  },
212
317
  {
213
- "type": "button",
214
- "label": "Decay All",
215
- "event": "DECAY",
216
- "variant": "ghost",
217
- "icon": "clock"
318
+ "label": "Forget",
319
+ "event": "FORGET",
320
+ "variant": "danger",
321
+ "size": "sm"
322
+ }
323
+ ],
324
+ "columns": [
325
+ {
326
+ "name": "content",
327
+ "label": "Content",
328
+ "variant": "h4",
329
+ "icon": "brain"
330
+ },
331
+ {
332
+ "name": "category",
333
+ "label": "Category",
334
+ "variant": "badge",
335
+ "colorMap": {
336
+ "active": "success",
337
+ "completed": "success",
338
+ "done": "success",
339
+ "pending": "warning",
340
+ "draft": "warning",
341
+ "scheduled": "warning",
342
+ "inactive": "neutral",
343
+ "archived": "neutral",
344
+ "disabled": "neutral",
345
+ "error": "destructive",
346
+ "cancelled": "destructive",
347
+ "failed": "destructive"
348
+ }
349
+ },
350
+ {
351
+ "name": "strength",
352
+ "label": "Strength",
353
+ "variant": "caption"
218
354
  }
219
355
  ]
220
356
  }
@@ -224,53 +360,146 @@
224
360
  ]
225
361
  },
226
362
  {
227
- "from": "idle",
228
- "to": "active",
229
- "event": "MEMORIZE",
363
+ "from": "browsing",
364
+ "to": "browsing",
365
+ "event": "MEMORIZED",
230
366
  "effects": [
231
367
  [
232
- "agent/memorize",
233
- "@payload.content",
234
- "@payload.category"
235
- ],
368
+ "ref",
369
+ "AgentMemory"
370
+ ]
371
+ ]
372
+ },
373
+ {
374
+ "from": "browsing",
375
+ "to": "browsing",
376
+ "event": "PINNED",
377
+ "effects": [
236
378
  [
237
- "set",
238
- "@entity.content",
239
- "@payload.content"
240
- ],
379
+ "ref",
380
+ "AgentMemory"
381
+ ]
382
+ ]
383
+ },
384
+ {
385
+ "from": "browsing",
386
+ "to": "browsing",
387
+ "event": "FORGOT",
388
+ "effects": [
241
389
  [
242
- "set",
243
- "@entity.category",
244
- "@payload.category"
245
- ],
390
+ "ref",
391
+ "AgentMemory"
392
+ ]
393
+ ]
394
+ },
395
+ {
396
+ "from": "browsing",
397
+ "to": "browsing",
398
+ "event": "REINFORCED",
399
+ "effects": [
246
400
  [
247
- "set",
248
- "@entity.createdAt",
249
- "@now"
250
- ],
401
+ "ref",
402
+ "AgentMemory"
403
+ ]
404
+ ]
405
+ },
406
+ {
407
+ "from": "browsing",
408
+ "to": "browsing",
409
+ "event": "DECAYED",
410
+ "effects": [
411
+ [
412
+ "ref",
413
+ "AgentMemory"
414
+ ]
415
+ ]
416
+ }
417
+ ]
418
+ }
419
+ },
420
+ {
421
+ "name": "AgentMemoryCreate",
422
+ "linkedEntity": "AgentMemory",
423
+ "category": "interaction",
424
+ "emits": [
425
+ {
426
+ "event": "MEMORIZED"
427
+ }
428
+ ],
429
+ "stateMachine": {
430
+ "states": [
431
+ {
432
+ "name": "closed",
433
+ "isInitial": true
434
+ },
435
+ {
436
+ "name": "open"
437
+ }
438
+ ],
439
+ "events": [
440
+ {
441
+ "key": "INIT",
442
+ "name": "Initialize"
443
+ },
444
+ {
445
+ "key": "MEMORIZE",
446
+ "name": "Open"
447
+ },
448
+ {
449
+ "key": "CLOSE",
450
+ "name": "Close"
451
+ },
452
+ {
453
+ "key": "SAVE",
454
+ "name": "Save",
455
+ "payload": [
456
+ {
457
+ "name": "data",
458
+ "type": "object",
459
+ "required": true
460
+ }
461
+ ]
462
+ }
463
+ ],
464
+ "transitions": [
465
+ {
466
+ "from": "closed",
467
+ "to": "closed",
468
+ "event": "INIT",
469
+ "effects": [
470
+ [
471
+ "ref",
472
+ "AgentMemory"
473
+ ]
474
+ ]
475
+ },
476
+ {
477
+ "from": "closed",
478
+ "to": "open",
479
+ "event": "MEMORIZE",
480
+ "effects": [
251
481
  [
252
482
  "render-ui",
253
- "main",
483
+ "modal",
254
484
  {
255
485
  "type": "stack",
256
486
  "direction": "vertical",
257
- "gap": "lg",
487
+ "gap": "md",
258
488
  "children": [
259
489
  {
260
490
  "type": "stack",
261
491
  "direction": "horizontal",
262
492
  "gap": "sm",
263
- "align": "center",
264
493
  "children": [
265
494
  {
266
495
  "type": "icon",
267
- "name": "brain",
268
- "size": "lg"
496
+ "name": "plus-circle",
497
+ "size": "md"
269
498
  },
270
499
  {
271
500
  "type": "typography",
272
- "content": "AgentMemory Active",
273
- "variant": "h2"
501
+ "content": "Memorize",
502
+ "variant": "h3"
274
503
  }
275
504
  ]
276
505
  },
@@ -278,51 +507,15 @@
278
507
  "type": "divider"
279
508
  },
280
509
  {
281
- "type": "typography",
282
- "variant": "body",
283
- "content": "@entity.content"
284
- },
285
- {
286
- "type": "stack",
287
- "direction": "horizontal",
288
- "gap": "sm",
289
- "children": [
290
- {
291
- "type": "badge",
292
- "label": "@entity.category"
293
- },
294
- {
295
- "type": "badge",
296
- "label": "@entity.strength"
297
- }
298
- ]
299
- },
300
- {
301
- "type": "stack",
302
- "direction": "horizontal",
303
- "gap": "sm",
304
- "children": [
305
- {
306
- "type": "button",
307
- "label": "Pin",
308
- "event": "PIN",
309
- "variant": "secondary",
310
- "icon": "pin"
311
- },
312
- {
313
- "type": "button",
314
- "label": "Reinforce",
315
- "event": "REINFORCE",
316
- "variant": "secondary",
317
- "icon": "zap"
318
- },
319
- {
320
- "type": "button",
321
- "label": "Forget",
322
- "event": "FORGET",
323
- "variant": "destructive",
324
- "icon": "trash"
325
- }
510
+ "type": "form-section",
511
+ "entity": "AgentMemory",
512
+ "mode": "create",
513
+ "submitEvent": "SAVE",
514
+ "cancelEvent": "CLOSE",
515
+ "fields": [
516
+ "content",
517
+ "category",
518
+ "scope"
326
519
  ]
327
520
  }
328
521
  ]
@@ -330,97 +523,239 @@
330
523
  ]
331
524
  ]
332
525
  },
526
+ {
527
+ "from": "open",
528
+ "to": "closed",
529
+ "event": "CLOSE",
530
+ "effects": [
531
+ [
532
+ "render-ui",
533
+ "modal",
534
+ null
535
+ ],
536
+ [
537
+ "notify",
538
+ "Cancelled",
539
+ "info"
540
+ ]
541
+ ]
542
+ },
543
+ {
544
+ "from": "open",
545
+ "to": "closed",
546
+ "event": "SAVE",
547
+ "effects": [
548
+ [
549
+ "persist",
550
+ "create",
551
+ "AgentMemory",
552
+ "@payload.data"
553
+ ],
554
+ [
555
+ "render-ui",
556
+ "modal",
557
+ null
558
+ ],
559
+ [
560
+ "emit",
561
+ "MEMORIZED"
562
+ ],
563
+ [
564
+ "notify",
565
+ "AgentMemory created successfully"
566
+ ]
567
+ ]
568
+ }
569
+ ]
570
+ }
571
+ },
572
+ {
573
+ "name": "AgentMemoryAgent",
574
+ "linkedEntity": "AgentMemory",
575
+ "category": "interaction",
576
+ "emits": [
577
+ {
578
+ "event": "FORGOT",
579
+ "scope": "external",
580
+ "payload": [
581
+ {
582
+ "name": "id",
583
+ "type": "string"
584
+ }
585
+ ]
586
+ },
587
+ {
588
+ "event": "REINFORCED",
589
+ "scope": "external",
590
+ "payload": [
591
+ {
592
+ "name": "id",
593
+ "type": "string"
594
+ }
595
+ ]
596
+ },
597
+ {
598
+ "event": "DECAYED",
599
+ "scope": "external",
600
+ "payload": [
601
+ {
602
+ "name": "id",
603
+ "type": "string"
604
+ }
605
+ ]
606
+ },
607
+ {
608
+ "event": "PINNED",
609
+ "scope": "external",
610
+ "payload": [
611
+ {
612
+ "name": "id",
613
+ "type": "string"
614
+ }
615
+ ]
616
+ }
617
+ ],
618
+ "stateMachine": {
619
+ "states": [
620
+ {
621
+ "name": "idle",
622
+ "isInitial": true
623
+ },
624
+ {
625
+ "name": "active"
626
+ }
627
+ ],
628
+ "events": [
629
+ {
630
+ "key": "INIT",
631
+ "name": "Initialize"
632
+ },
633
+ {
634
+ "key": "DO_MEMORIZE",
635
+ "name": "Do Memorize",
636
+ "payload": [
637
+ {
638
+ "name": "data",
639
+ "type": "object",
640
+ "required": true
641
+ }
642
+ ]
643
+ },
644
+ {
645
+ "key": "RECALL",
646
+ "name": "Recall",
647
+ "payload": [
648
+ {
649
+ "name": "query",
650
+ "type": "string",
651
+ "required": true
652
+ }
653
+ ]
654
+ },
655
+ {
656
+ "key": "PIN",
657
+ "name": "Pin",
658
+ "payload": [
659
+ {
660
+ "name": "id",
661
+ "type": "string",
662
+ "required": true
663
+ }
664
+ ]
665
+ },
666
+ {
667
+ "key": "FORGET",
668
+ "name": "Forget",
669
+ "payload": [
670
+ {
671
+ "name": "id",
672
+ "type": "string",
673
+ "required": true
674
+ }
675
+ ]
676
+ },
677
+ {
678
+ "key": "REINFORCE",
679
+ "name": "Reinforce",
680
+ "payload": [
681
+ {
682
+ "name": "id",
683
+ "type": "string",
684
+ "required": true
685
+ }
686
+ ]
687
+ },
688
+ {
689
+ "key": "DECAY",
690
+ "name": "Decay"
691
+ },
692
+ {
693
+ "key": "MEMORIZED",
694
+ "name": "Memorized",
695
+ "payload": [
696
+ {
697
+ "name": "data",
698
+ "type": "object",
699
+ "required": true
700
+ }
701
+ ]
702
+ }
703
+ ],
704
+ "transitions": [
333
705
  {
334
706
  "from": "idle",
335
- "to": "active",
336
- "event": "RECALL",
707
+ "to": "idle",
708
+ "event": "INIT",
337
709
  "effects": [
338
710
  [
339
- "agent/recall",
340
- "@payload.query"
711
+ "fetch",
712
+ "AgentMemory"
341
713
  ],
342
714
  [
343
715
  "render-ui",
344
716
  "main",
345
717
  {
346
- "type": "stack",
347
- "direction": "vertical",
348
- "gap": "lg",
349
- "children": [
350
- {
351
- "type": "stack",
352
- "direction": "horizontal",
353
- "gap": "sm",
354
- "align": "center",
355
- "children": [
356
- {
357
- "type": "icon",
358
- "name": "brain",
359
- "size": "lg"
360
- },
361
- {
362
- "type": "typography",
363
- "content": "AgentMemory Active",
364
- "variant": "h2"
365
- }
366
- ]
367
- },
368
- {
369
- "type": "divider"
370
- },
371
- {
372
- "type": "typography",
373
- "variant": "body",
374
- "content": "@entity.content"
375
- },
376
- {
377
- "type": "stack",
378
- "direction": "horizontal",
379
- "gap": "sm",
380
- "children": [
381
- {
382
- "type": "badge",
383
- "label": "@entity.category"
384
- },
385
- {
386
- "type": "badge",
387
- "label": "@entity.strength"
388
- }
389
- ]
390
- },
391
- {
392
- "type": "stack",
393
- "direction": "horizontal",
394
- "gap": "sm",
395
- "children": [
396
- {
397
- "type": "button",
398
- "label": "Pin",
399
- "event": "PIN",
400
- "variant": "secondary",
401
- "icon": "pin"
402
- },
403
- {
404
- "type": "button",
405
- "label": "Reinforce",
406
- "event": "REINFORCE",
407
- "variant": "secondary",
408
- "icon": "zap"
409
- },
410
- {
411
- "type": "button",
412
- "label": "Forget",
413
- "event": "FORGET",
414
- "variant": "destructive",
415
- "icon": "trash"
416
- }
417
- ]
418
- }
419
- ]
718
+ "type": "empty-state",
719
+ "icon": "brain",
720
+ "title": "Memory",
721
+ "description": "Memory is ready"
420
722
  }
421
723
  ]
422
724
  ]
423
725
  },
726
+ {
727
+ "from": "idle",
728
+ "to": "active",
729
+ "event": "DO_MEMORIZE",
730
+ "effects": [
731
+ [
732
+ "agent/memorize",
733
+ "@payload.data.content",
734
+ "@payload.data.category"
735
+ ],
736
+ [
737
+ "persist",
738
+ "create",
739
+ "AgentMemory",
740
+ "@payload.data"
741
+ ],
742
+ [
743
+ "notify",
744
+ "AgentMemory created successfully"
745
+ ]
746
+ ]
747
+ },
748
+ {
749
+ "from": "active",
750
+ "to": "active",
751
+ "event": "RECALL",
752
+ "effects": [
753
+ [
754
+ "agent/recall",
755
+ "@payload.query"
756
+ ]
757
+ ]
758
+ },
424
759
  {
425
760
  "from": "active",
426
761
  "to": "active",
@@ -441,6 +776,10 @@
441
776
  "set",
442
777
  "@entity.pinned",
443
778
  true
779
+ ],
780
+ [
781
+ "emit",
782
+ "PINNED"
444
783
  ]
445
784
  ]
446
785
  },
@@ -454,64 +793,8 @@
454
793
  "@payload.id"
455
794
  ],
456
795
  [
457
- "render-ui",
458
- "main",
459
- {
460
- "type": "stack",
461
- "direction": "vertical",
462
- "gap": "lg",
463
- "children": [
464
- {
465
- "type": "stack",
466
- "direction": "horizontal",
467
- "gap": "sm",
468
- "align": "center",
469
- "children": [
470
- {
471
- "type": "icon",
472
- "name": "brain",
473
- "size": "lg"
474
- },
475
- {
476
- "type": "typography",
477
- "content": "AgentMemory Manager",
478
- "variant": "h2"
479
- }
480
- ]
481
- },
482
- {
483
- "type": "divider"
484
- },
485
- {
486
- "type": "stack",
487
- "direction": "horizontal",
488
- "gap": "sm",
489
- "children": [
490
- {
491
- "type": "button",
492
- "label": "Memorize",
493
- "event": "MEMORIZE",
494
- "variant": "primary",
495
- "icon": "plus"
496
- },
497
- {
498
- "type": "button",
499
- "label": "Recall",
500
- "event": "RECALL",
501
- "variant": "secondary",
502
- "icon": "search"
503
- },
504
- {
505
- "type": "button",
506
- "label": "Decay All",
507
- "event": "DECAY",
508
- "variant": "ghost",
509
- "icon": "clock"
510
- }
511
- ]
512
- }
513
- ]
514
- }
796
+ "emit",
797
+ "FORGOT"
515
798
  ]
516
799
  ]
517
800
  },
@@ -523,6 +806,10 @@
523
806
  [
524
807
  "agent/reinforce",
525
808
  "@payload.id"
809
+ ],
810
+ [
811
+ "emit",
812
+ "REINFORCED"
526
813
  ]
527
814
  ]
528
815
  },
@@ -533,76 +820,35 @@
533
820
  "effects": [
534
821
  [
535
822
  "agent/decay"
823
+ ],
824
+ [
825
+ "emit",
826
+ "DECAYED"
536
827
  ]
537
828
  ]
538
829
  },
539
830
  {
540
831
  "from": "active",
541
- "to": "idle",
832
+ "to": "active",
542
833
  "event": "DECAY",
543
834
  "effects": [
544
835
  [
545
836
  "agent/decay"
546
837
  ],
547
838
  [
548
- "render-ui",
549
- "main",
550
- {
551
- "type": "stack",
552
- "direction": "vertical",
553
- "gap": "lg",
554
- "children": [
555
- {
556
- "type": "stack",
557
- "direction": "horizontal",
558
- "gap": "sm",
559
- "align": "center",
560
- "children": [
561
- {
562
- "type": "icon",
563
- "name": "brain",
564
- "size": "lg"
565
- },
566
- {
567
- "type": "typography",
568
- "content": "AgentMemory Manager",
569
- "variant": "h2"
570
- }
571
- ]
572
- },
573
- {
574
- "type": "divider"
575
- },
576
- {
577
- "type": "stack",
578
- "direction": "horizontal",
579
- "gap": "sm",
580
- "children": [
581
- {
582
- "type": "button",
583
- "label": "Memorize",
584
- "event": "MEMORIZE",
585
- "variant": "primary",
586
- "icon": "plus"
587
- },
588
- {
589
- "type": "button",
590
- "label": "Recall",
591
- "event": "RECALL",
592
- "variant": "secondary",
593
- "icon": "search"
594
- },
595
- {
596
- "type": "button",
597
- "label": "Decay All",
598
- "event": "DECAY",
599
- "variant": "ghost",
600
- "icon": "clock"
601
- }
602
- ]
603
- }
604
- ]
605
- }
839
+ "emit",
840
+ "DECAYED"
841
+ ]
842
+ ]
843
+ },
844
+ {
845
+ "from": "idle",
846
+ "to": "active",
847
+ "event": "MEMORIZED",
848
+ "effects": [
849
+ [
850
+ "fetch",
851
+ "AgentMemory"
606
852
  ]
607
853
  ]
608
854
  }
@@ -616,12 +862,18 @@
616
862
  "path": "/agentmemorys",
617
863
  "traits": [
618
864
  {
619
- "ref": "AgentMemoryLifecycle"
865
+ "ref": "AgentMemoryBrowse"
866
+ },
867
+ {
868
+ "ref": "AgentMemoryCreate"
869
+ },
870
+ {
871
+ "ref": "AgentMemoryAgent"
620
872
  }
621
873
  ]
622
874
  }
623
875
  ]
624
876
  }
625
877
  ],
626
- "description": "Memory lifecycle atom for agent memory operations. Provides memorize, recall, pin, forget, reinforce, and decay using agent/* operators."
878
+ "description": "Memory lifecycle atom for agent memory operations. Composes UI atoms (stdBrowse for memory table, stdModal for memorize form) with an agent trait that handles agent/memorize, agent/recall, agent/pin, agent/forget, agent/reinforce, and agent/decay operators."
627
879
  }