@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
@@ -62,6 +62,61 @@
62
62
  "name": "error",
63
63
  "type": "string",
64
64
  "default": ""
65
+ },
66
+ {
67
+ "name": "content",
68
+ "type": "string",
69
+ "default": ""
70
+ },
71
+ {
72
+ "name": "category",
73
+ "type": "string",
74
+ "default": ""
75
+ },
76
+ {
77
+ "name": "scope",
78
+ "type": "string",
79
+ "default": ""
80
+ },
81
+ {
82
+ "name": "strength",
83
+ "type": "number",
84
+ "default": 1
85
+ },
86
+ {
87
+ "name": "pinned",
88
+ "type": "boolean",
89
+ "default": false
90
+ },
91
+ {
92
+ "name": "language",
93
+ "type": "string",
94
+ "default": ""
95
+ },
96
+ {
97
+ "name": "resultCount",
98
+ "type": "number",
99
+ "default": 0
100
+ },
101
+ {
102
+ "name": "results",
103
+ "type": "string",
104
+ "default": "[]"
105
+ },
106
+ {
107
+ "name": "prompt",
108
+ "type": "string",
109
+ "default": ""
110
+ },
111
+ {
112
+ "name": "provider",
113
+ "type": "string",
114
+ "default": "anthropic"
115
+ },
116
+ {
117
+ "name": "model",
118
+ "type": "string",
119
+ "default": "claude-sonnet-4-20250514"
65
120
  }
66
121
  ]
67
122
  },
@@ -300,7 +355,7 @@
300
355
  [
301
356
  "agent/generate",
302
357
  [
303
- "string/concat",
358
+ "str/concat",
304
359
  "Context:\n",
305
360
  "@entity.context",
306
361
  "\n\nQuery: ",
@@ -340,9 +395,9 @@
340
395
  {
341
396
  "type": "badge",
342
397
  "label": [
343
- "string/concat",
398
+ "str/concat",
344
399
  [
345
- "string/of",
400
+ "str/concat",
346
401
  "@entity.memoryHits"
347
402
  ],
348
403
  " memories"
@@ -351,9 +406,9 @@
351
406
  {
352
407
  "type": "badge",
353
408
  "label": [
354
- "string/concat",
409
+ "str/concat",
355
410
  [
356
- "string/of",
411
+ "str/concat",
357
412
  "@entity.searchHits"
358
413
  ],
359
414
  " code hits"
@@ -384,7 +439,7 @@
384
439
  [
385
440
  "agent/memorize",
386
441
  [
387
- "string/concat",
442
+ "str/concat",
388
443
  "RAG query: ",
389
444
  "@entity.query"
390
445
  ],
@@ -717,20 +772,1100 @@
717
772
  }
718
773
  ]
719
774
  }
720
- }
721
- ],
722
- "pages": [
775
+ },
723
776
  {
724
- "name": "AgentRagPage",
725
- "path": "/agentrags",
726
- "traits": [
727
- {
728
- "ref": "AgentRagRag"
777
+ "name": "RagTabs",
778
+ "linkedEntity": "AgentRag",
779
+ "category": "interaction",
780
+ "stateMachine": {
781
+ "states": [
782
+ {
783
+ "name": "idle",
784
+ "isInitial": true
785
+ }
786
+ ],
787
+ "events": [
788
+ {
789
+ "key": "INIT",
790
+ "name": "Initialize"
791
+ },
792
+ {
793
+ "key": "SELECT_TAB",
794
+ "name": "Select Tab",
795
+ "payload": [
796
+ {
797
+ "name": "tab",
798
+ "type": "string",
799
+ "required": true
800
+ }
801
+ ]
802
+ }
803
+ ],
804
+ "transitions": [
805
+ {
806
+ "from": "idle",
807
+ "to": "idle",
808
+ "event": "INIT",
809
+ "effects": [
810
+ [
811
+ "fetch",
812
+ "AgentRag"
813
+ ],
814
+ [
815
+ "render-ui",
816
+ "main",
817
+ {
818
+ "type": "stack",
819
+ "direction": "vertical",
820
+ "gap": "lg",
821
+ "children": [
822
+ {
823
+ "type": "stack",
824
+ "direction": "horizontal",
825
+ "gap": "sm",
826
+ "align": "center",
827
+ "children": [
828
+ {
829
+ "type": "icon",
830
+ "name": "brain",
831
+ "size": "lg"
832
+ },
833
+ {
834
+ "type": "typography",
835
+ "content": "RAG Pipeline",
836
+ "variant": "h2"
837
+ }
838
+ ]
839
+ },
840
+ {
841
+ "type": "divider"
842
+ },
843
+ {
844
+ "type": "tabs",
845
+ "tabs": [
846
+ {
847
+ "label": "Query",
848
+ "value": "query"
849
+ },
850
+ {
851
+ "label": "Sources",
852
+ "value": "sources"
853
+ },
854
+ {
855
+ "label": "Response",
856
+ "value": "response"
857
+ }
858
+ ],
859
+ "defaultActiveTab": "query",
860
+ "onTabChange": "SELECT_TAB"
861
+ },
862
+ {
863
+ "type": "divider"
864
+ },
865
+ {
866
+ "type": "data-grid",
867
+ "entity": "AgentRag",
868
+ "emptyIcon": "inbox",
869
+ "emptyTitle": "No agentrags yet",
870
+ "emptyDescription": "Add agentrags to see them here.",
871
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
872
+ "renderItem": [
873
+ "fn",
874
+ "item",
875
+ {
876
+ "type": "stack",
877
+ "direction": "vertical",
878
+ "gap": "sm",
879
+ "children": [
880
+ {
881
+ "type": "typography",
882
+ "variant": "h4",
883
+ "content": "@item.name"
884
+ },
885
+ {
886
+ "type": "typography",
887
+ "variant": "caption",
888
+ "color": "muted",
889
+ "content": "@item.query"
890
+ }
891
+ ]
892
+ }
893
+ ]
894
+ }
895
+ ]
896
+ }
897
+ ]
898
+ ]
899
+ },
900
+ {
901
+ "from": "idle",
902
+ "to": "idle",
903
+ "event": "SELECT_TAB",
904
+ "effects": [
905
+ [
906
+ "fetch",
907
+ "AgentRag"
908
+ ],
909
+ [
910
+ "render-ui",
911
+ "main",
912
+ {
913
+ "type": "stack",
914
+ "direction": "vertical",
915
+ "gap": "lg",
916
+ "children": [
917
+ {
918
+ "type": "stack",
919
+ "direction": "horizontal",
920
+ "gap": "sm",
921
+ "align": "center",
922
+ "children": [
923
+ {
924
+ "type": "icon",
925
+ "name": "brain",
926
+ "size": "lg"
927
+ },
928
+ {
929
+ "type": "typography",
930
+ "content": "RAG Pipeline",
931
+ "variant": "h2"
932
+ }
933
+ ]
934
+ },
935
+ {
936
+ "type": "divider"
937
+ },
938
+ {
939
+ "type": "tabs",
940
+ "tabs": [
941
+ {
942
+ "label": "Query",
943
+ "value": "query"
944
+ },
945
+ {
946
+ "label": "Sources",
947
+ "value": "sources"
948
+ },
949
+ {
950
+ "label": "Response",
951
+ "value": "response"
952
+ }
953
+ ],
954
+ "defaultActiveTab": "query",
955
+ "activeTab": "@payload.tab",
956
+ "onTabChange": "SELECT_TAB"
957
+ },
958
+ {
959
+ "type": "divider"
960
+ },
961
+ {
962
+ "type": "data-grid",
963
+ "entity": "AgentRag",
964
+ "emptyIcon": "inbox",
965
+ "emptyTitle": "No agentrags yet",
966
+ "emptyDescription": "Add agentrags to see them here.",
967
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
968
+ "renderItem": [
969
+ "fn",
970
+ "item",
971
+ {
972
+ "type": "stack",
973
+ "direction": "vertical",
974
+ "gap": "sm",
975
+ "children": [
976
+ {
977
+ "type": "typography",
978
+ "variant": "h4",
979
+ "content": "@item.name"
980
+ },
981
+ {
982
+ "type": "typography",
983
+ "variant": "caption",
984
+ "color": "muted",
985
+ "content": "@item.query"
986
+ }
987
+ ]
988
+ }
989
+ ]
990
+ }
991
+ ]
992
+ }
993
+ ]
994
+ ]
995
+ }
996
+ ]
997
+ }
998
+ },
999
+ {
1000
+ "name": "RagMemoryLifecycle",
1001
+ "linkedEntity": "AgentRag",
1002
+ "category": "interaction",
1003
+ "stateMachine": {
1004
+ "states": [
1005
+ {
1006
+ "name": "browsing",
1007
+ "isInitial": true
1008
+ }
1009
+ ],
1010
+ "events": [
1011
+ {
1012
+ "key": "INIT",
1013
+ "name": "Initialize"
1014
+ },
1015
+ {
1016
+ "key": "MEMORIZE",
1017
+ "name": "MEMORIZE"
1018
+ },
1019
+ {
1020
+ "key": "RECALL",
1021
+ "name": "RECALL"
1022
+ },
1023
+ {
1024
+ "key": "DECAY",
1025
+ "name": "DECAY"
1026
+ },
1027
+ {
1028
+ "key": "PIN",
1029
+ "name": "PIN",
1030
+ "payload": [
1031
+ {
1032
+ "name": "id",
1033
+ "type": "string",
1034
+ "required": true
1035
+ },
1036
+ {
1037
+ "name": "row",
1038
+ "type": "object"
1039
+ }
1040
+ ]
1041
+ },
1042
+ {
1043
+ "key": "REINFORCE",
1044
+ "name": "REINFORCE",
1045
+ "payload": [
1046
+ {
1047
+ "name": "id",
1048
+ "type": "string",
1049
+ "required": true
1050
+ },
1051
+ {
1052
+ "name": "row",
1053
+ "type": "object"
1054
+ }
1055
+ ]
1056
+ },
1057
+ {
1058
+ "key": "FORGET",
1059
+ "name": "FORGET",
1060
+ "payload": [
1061
+ {
1062
+ "name": "id",
1063
+ "type": "string",
1064
+ "required": true
1065
+ },
1066
+ {
1067
+ "name": "row",
1068
+ "type": "object"
1069
+ }
1070
+ ]
1071
+ },
1072
+ {
1073
+ "key": "MEMORIZED",
1074
+ "name": "MEMORIZED",
1075
+ "payload": [
1076
+ {
1077
+ "name": "data",
1078
+ "type": "object",
1079
+ "required": true
1080
+ }
1081
+ ]
1082
+ },
1083
+ {
1084
+ "key": "PINNED",
1085
+ "name": "PINNED",
1086
+ "payload": [
1087
+ {
1088
+ "name": "data",
1089
+ "type": "object",
1090
+ "required": true
1091
+ }
1092
+ ]
1093
+ },
1094
+ {
1095
+ "key": "FORGOT",
1096
+ "name": "FORGOT",
1097
+ "payload": [
1098
+ {
1099
+ "name": "data",
1100
+ "type": "object",
1101
+ "required": true
1102
+ }
1103
+ ]
1104
+ },
1105
+ {
1106
+ "key": "REINFORCED",
1107
+ "name": "REINFORCED",
1108
+ "payload": [
1109
+ {
1110
+ "name": "data",
1111
+ "type": "object",
1112
+ "required": true
1113
+ }
1114
+ ]
1115
+ },
1116
+ {
1117
+ "key": "DECAYED",
1118
+ "name": "DECAYED",
1119
+ "payload": [
1120
+ {
1121
+ "name": "data",
1122
+ "type": "object",
1123
+ "required": true
1124
+ }
1125
+ ]
1126
+ }
1127
+ ],
1128
+ "transitions": [
1129
+ {
1130
+ "from": "browsing",
1131
+ "to": "browsing",
1132
+ "event": "INIT",
1133
+ "effects": [
1134
+ [
1135
+ "ref",
1136
+ "AgentRag"
1137
+ ],
1138
+ [
1139
+ "render-ui",
1140
+ "main",
1141
+ {
1142
+ "type": "stack",
1143
+ "direction": "vertical",
1144
+ "gap": "lg",
1145
+ "className": "max-w-5xl mx-auto w-full",
1146
+ "children": [
1147
+ {
1148
+ "type": "stack",
1149
+ "direction": "horizontal",
1150
+ "gap": "md",
1151
+ "justify": "space-between",
1152
+ "align": "center",
1153
+ "children": [
1154
+ {
1155
+ "type": "stack",
1156
+ "direction": "horizontal",
1157
+ "gap": "sm",
1158
+ "align": "center",
1159
+ "children": [
1160
+ {
1161
+ "type": "icon",
1162
+ "name": "brain",
1163
+ "size": "lg"
1164
+ },
1165
+ {
1166
+ "type": "typography",
1167
+ "content": "AgentRag Manager",
1168
+ "variant": "h2"
1169
+ }
1170
+ ]
1171
+ },
1172
+ {
1173
+ "type": "stack",
1174
+ "direction": "horizontal",
1175
+ "gap": "sm",
1176
+ "children": [
1177
+ {
1178
+ "type": "button",
1179
+ "label": "Memorize",
1180
+ "event": "MEMORIZE",
1181
+ "variant": "primary",
1182
+ "icon": "plus"
1183
+ },
1184
+ {
1185
+ "type": "button",
1186
+ "label": "Recall",
1187
+ "event": "RECALL",
1188
+ "variant": "secondary",
1189
+ "icon": "search"
1190
+ },
1191
+ {
1192
+ "type": "button",
1193
+ "label": "Decay All",
1194
+ "event": "DECAY",
1195
+ "variant": "ghost",
1196
+ "icon": "clock"
1197
+ }
1198
+ ]
1199
+ }
1200
+ ]
1201
+ },
1202
+ {
1203
+ "type": "divider"
1204
+ },
1205
+ {
1206
+ "type": "data-grid",
1207
+ "entity": "AgentRag",
1208
+ "emptyIcon": "inbox",
1209
+ "emptyTitle": "No memories yet",
1210
+ "emptyDescription": "Create your first memory to get started.",
1211
+ "itemActions": [
1212
+ {
1213
+ "label": "Pin",
1214
+ "event": "PIN",
1215
+ "variant": "ghost",
1216
+ "size": "sm"
1217
+ },
1218
+ {
1219
+ "label": "Reinforce",
1220
+ "event": "REINFORCE",
1221
+ "variant": "ghost",
1222
+ "size": "sm"
1223
+ },
1224
+ {
1225
+ "label": "Forget",
1226
+ "event": "FORGET",
1227
+ "variant": "danger",
1228
+ "size": "sm"
1229
+ }
1230
+ ],
1231
+ "columns": [
1232
+ {
1233
+ "name": "content",
1234
+ "label": "Content",
1235
+ "variant": "h4",
1236
+ "icon": "brain"
1237
+ },
1238
+ {
1239
+ "name": "category",
1240
+ "label": "Category",
1241
+ "variant": "badge",
1242
+ "colorMap": {
1243
+ "active": "success",
1244
+ "completed": "success",
1245
+ "done": "success",
1246
+ "pending": "warning",
1247
+ "draft": "warning",
1248
+ "scheduled": "warning",
1249
+ "inactive": "neutral",
1250
+ "archived": "neutral",
1251
+ "disabled": "neutral",
1252
+ "error": "destructive",
1253
+ "cancelled": "destructive",
1254
+ "failed": "destructive"
1255
+ }
1256
+ },
1257
+ {
1258
+ "name": "strength",
1259
+ "label": "Strength",
1260
+ "variant": "caption"
1261
+ }
1262
+ ]
1263
+ }
1264
+ ]
1265
+ }
1266
+ ]
1267
+ ]
1268
+ },
1269
+ {
1270
+ "from": "browsing",
1271
+ "to": "browsing",
1272
+ "event": "MEMORIZED",
1273
+ "effects": [
1274
+ [
1275
+ "ref",
1276
+ "AgentRag"
1277
+ ]
1278
+ ]
1279
+ },
1280
+ {
1281
+ "from": "browsing",
1282
+ "to": "browsing",
1283
+ "event": "PINNED",
1284
+ "effects": [
1285
+ [
1286
+ "ref",
1287
+ "AgentRag"
1288
+ ]
1289
+ ]
1290
+ },
1291
+ {
1292
+ "from": "browsing",
1293
+ "to": "browsing",
1294
+ "event": "FORGOT",
1295
+ "effects": [
1296
+ [
1297
+ "ref",
1298
+ "AgentRag"
1299
+ ]
1300
+ ]
1301
+ },
1302
+ {
1303
+ "from": "browsing",
1304
+ "to": "browsing",
1305
+ "event": "REINFORCED",
1306
+ "effects": [
1307
+ [
1308
+ "ref",
1309
+ "AgentRag"
1310
+ ]
1311
+ ]
1312
+ },
1313
+ {
1314
+ "from": "browsing",
1315
+ "to": "browsing",
1316
+ "event": "DECAYED",
1317
+ "effects": [
1318
+ [
1319
+ "ref",
1320
+ "AgentRag"
1321
+ ]
1322
+ ]
1323
+ }
1324
+ ]
1325
+ }
1326
+ },
1327
+ {
1328
+ "name": "RagSearchLifecycle",
1329
+ "linkedEntity": "AgentRag",
1330
+ "category": "interaction",
1331
+ "stateMachine": {
1332
+ "states": [
1333
+ {
1334
+ "name": "browsing",
1335
+ "isInitial": true
1336
+ }
1337
+ ],
1338
+ "events": [
1339
+ {
1340
+ "key": "INIT",
1341
+ "name": "Initialize"
1342
+ },
1343
+ {
1344
+ "key": "SEARCH",
1345
+ "name": "SEARCH"
1346
+ },
1347
+ {
1348
+ "key": "CLEAR",
1349
+ "name": "CLEAR"
1350
+ },
1351
+ {
1352
+ "key": "VIEW",
1353
+ "name": "VIEW",
1354
+ "payload": [
1355
+ {
1356
+ "name": "id",
1357
+ "type": "string",
1358
+ "required": true
1359
+ },
1360
+ {
1361
+ "name": "row",
1362
+ "type": "object"
1363
+ }
1364
+ ]
1365
+ },
1366
+ {
1367
+ "key": "SEARCHED",
1368
+ "name": "SEARCHED",
1369
+ "payload": [
1370
+ {
1371
+ "name": "data",
1372
+ "type": "object",
1373
+ "required": true
1374
+ }
1375
+ ]
1376
+ }
1377
+ ],
1378
+ "transitions": [
1379
+ {
1380
+ "from": "browsing",
1381
+ "to": "browsing",
1382
+ "event": "INIT",
1383
+ "effects": [
1384
+ [
1385
+ "ref",
1386
+ "AgentRag"
1387
+ ],
1388
+ [
1389
+ "render-ui",
1390
+ "main",
1391
+ {
1392
+ "type": "stack",
1393
+ "direction": "vertical",
1394
+ "gap": "lg",
1395
+ "className": "max-w-5xl mx-auto w-full",
1396
+ "children": [
1397
+ {
1398
+ "type": "stack",
1399
+ "direction": "horizontal",
1400
+ "gap": "md",
1401
+ "justify": "space-between",
1402
+ "align": "center",
1403
+ "children": [
1404
+ {
1405
+ "type": "stack",
1406
+ "direction": "horizontal",
1407
+ "gap": "sm",
1408
+ "align": "center",
1409
+ "children": [
1410
+ {
1411
+ "type": "icon",
1412
+ "name": "search",
1413
+ "size": "lg"
1414
+ },
1415
+ {
1416
+ "type": "typography",
1417
+ "content": "AgentRag",
1418
+ "variant": "h2"
1419
+ }
1420
+ ]
1421
+ },
1422
+ {
1423
+ "type": "stack",
1424
+ "direction": "horizontal",
1425
+ "gap": "sm",
1426
+ "children": [
1427
+ {
1428
+ "type": "button",
1429
+ "label": "Search",
1430
+ "event": "SEARCH",
1431
+ "variant": "primary",
1432
+ "icon": "search"
1433
+ },
1434
+ {
1435
+ "type": "button",
1436
+ "label": "Clear",
1437
+ "event": "CLEAR",
1438
+ "variant": "ghost",
1439
+ "icon": "x"
1440
+ }
1441
+ ]
1442
+ }
1443
+ ]
1444
+ },
1445
+ {
1446
+ "type": "divider"
1447
+ },
1448
+ {
1449
+ "type": "data-grid",
1450
+ "entity": "AgentRag",
1451
+ "emptyIcon": "inbox",
1452
+ "emptyTitle": "No search results",
1453
+ "emptyDescription": "Enter a query to search the codebase.",
1454
+ "itemActions": [
1455
+ {
1456
+ "label": "View",
1457
+ "event": "VIEW",
1458
+ "variant": "ghost",
1459
+ "size": "sm"
1460
+ }
1461
+ ],
1462
+ "columns": [
1463
+ {
1464
+ "name": "query",
1465
+ "label": "Query",
1466
+ "variant": "h4",
1467
+ "icon": "search"
1468
+ },
1469
+ {
1470
+ "name": "language",
1471
+ "label": "Language",
1472
+ "variant": "badge",
1473
+ "colorMap": {
1474
+ "active": "success",
1475
+ "completed": "success",
1476
+ "done": "success",
1477
+ "pending": "warning",
1478
+ "draft": "warning",
1479
+ "scheduled": "warning",
1480
+ "inactive": "neutral",
1481
+ "archived": "neutral",
1482
+ "disabled": "neutral",
1483
+ "error": "destructive",
1484
+ "cancelled": "destructive",
1485
+ "failed": "destructive"
1486
+ }
1487
+ },
1488
+ {
1489
+ "name": "resultCount",
1490
+ "label": "Result Count",
1491
+ "variant": "caption"
1492
+ }
1493
+ ]
1494
+ }
1495
+ ]
1496
+ }
1497
+ ]
1498
+ ]
1499
+ },
1500
+ {
1501
+ "from": "browsing",
1502
+ "to": "browsing",
1503
+ "event": "SEARCHED",
1504
+ "effects": [
1505
+ [
1506
+ "ref",
1507
+ "AgentRag"
1508
+ ]
1509
+ ]
1510
+ }
1511
+ ]
1512
+ }
1513
+ },
1514
+ {
1515
+ "name": "RagCompletionFlow",
1516
+ "linkedEntity": "AgentRag",
1517
+ "category": "interaction",
1518
+ "emits": [
1519
+ {
1520
+ "event": "GENERATED",
1521
+ "scope": "internal"
1522
+ }
1523
+ ],
1524
+ "stateMachine": {
1525
+ "states": [
1526
+ {
1527
+ "name": "closed",
1528
+ "isInitial": true
1529
+ },
1530
+ {
1531
+ "name": "open"
1532
+ }
1533
+ ],
1534
+ "events": [
1535
+ {
1536
+ "key": "INIT",
1537
+ "name": "Initialize"
1538
+ },
1539
+ {
1540
+ "key": "GENERATE",
1541
+ "name": "Open"
1542
+ },
1543
+ {
1544
+ "key": "CLOSE",
1545
+ "name": "Close"
1546
+ },
1547
+ {
1548
+ "key": "SAVE",
1549
+ "name": "Save",
1550
+ "payload": [
1551
+ {
1552
+ "name": "data",
1553
+ "type": "object",
1554
+ "required": true
1555
+ }
1556
+ ]
1557
+ }
1558
+ ],
1559
+ "transitions": [
1560
+ {
1561
+ "from": "closed",
1562
+ "to": "closed",
1563
+ "event": "INIT",
1564
+ "effects": [
1565
+ [
1566
+ "ref",
1567
+ "AgentRag"
1568
+ ],
1569
+ [
1570
+ "render-ui",
1571
+ "main",
1572
+ {
1573
+ "type": "stack",
1574
+ "direction": "vertical",
1575
+ "gap": "lg",
1576
+ "children": [
1577
+ {
1578
+ "type": "stack",
1579
+ "direction": "horizontal",
1580
+ "gap": "md",
1581
+ "justify": "space-between",
1582
+ "children": [
1583
+ {
1584
+ "type": "stack",
1585
+ "direction": "horizontal",
1586
+ "gap": "md",
1587
+ "children": [
1588
+ {
1589
+ "type": "icon",
1590
+ "name": "sparkles",
1591
+ "size": "lg"
1592
+ },
1593
+ {
1594
+ "type": "typography",
1595
+ "content": "AgentRag",
1596
+ "variant": "h2"
1597
+ }
1598
+ ]
1599
+ },
1600
+ {
1601
+ "type": "button",
1602
+ "label": "Open",
1603
+ "event": "GENERATE",
1604
+ "variant": "primary",
1605
+ "icon": "sparkles"
1606
+ }
1607
+ ]
1608
+ },
1609
+ {
1610
+ "type": "divider"
1611
+ },
1612
+ {
1613
+ "type": "empty-state",
1614
+ "icon": "sparkles",
1615
+ "title": "Nothing open",
1616
+ "description": "Click Open to view details in a modal overlay."
1617
+ }
1618
+ ]
1619
+ }
1620
+ ]
1621
+ ]
1622
+ },
1623
+ {
1624
+ "from": "closed",
1625
+ "to": "open",
1626
+ "event": "GENERATE",
1627
+ "effects": [
1628
+ [
1629
+ "render-ui",
1630
+ "modal",
1631
+ {
1632
+ "type": "stack",
1633
+ "direction": "vertical",
1634
+ "gap": "md",
1635
+ "children": [
1636
+ {
1637
+ "type": "stack",
1638
+ "direction": "horizontal",
1639
+ "gap": "sm",
1640
+ "children": [
1641
+ {
1642
+ "type": "icon",
1643
+ "name": "sparkles",
1644
+ "size": "md"
1645
+ },
1646
+ {
1647
+ "type": "typography",
1648
+ "content": "AgentRag",
1649
+ "variant": "h3"
1650
+ }
1651
+ ]
1652
+ },
1653
+ {
1654
+ "type": "divider"
1655
+ },
1656
+ {
1657
+ "type": "stack",
1658
+ "direction": "horizontal",
1659
+ "gap": "sm",
1660
+ "children": [
1661
+ {
1662
+ "type": "badge",
1663
+ "label": "@entity.provider"
1664
+ },
1665
+ {
1666
+ "type": "badge",
1667
+ "label": "@entity.model"
1668
+ }
1669
+ ]
1670
+ },
1671
+ {
1672
+ "type": "form-section",
1673
+ "entity": "AgentRag",
1674
+ "mode": "create",
1675
+ "submitEvent": "SAVE",
1676
+ "cancelEvent": "CLOSE",
1677
+ "fields": [
1678
+ "prompt"
1679
+ ]
1680
+ }
1681
+ ]
1682
+ }
1683
+ ]
1684
+ ]
1685
+ },
1686
+ {
1687
+ "from": "open",
1688
+ "to": "closed",
1689
+ "event": "CLOSE",
1690
+ "effects": [
1691
+ [
1692
+ "render-ui",
1693
+ "modal",
1694
+ null
1695
+ ],
1696
+ [
1697
+ "notify",
1698
+ "Cancelled",
1699
+ "info"
1700
+ ],
1701
+ [
1702
+ "ref",
1703
+ "AgentRag"
1704
+ ],
1705
+ [
1706
+ "render-ui",
1707
+ "main",
1708
+ {
1709
+ "type": "stack",
1710
+ "direction": "vertical",
1711
+ "gap": "lg",
1712
+ "children": [
1713
+ {
1714
+ "type": "stack",
1715
+ "direction": "horizontal",
1716
+ "gap": "md",
1717
+ "justify": "space-between",
1718
+ "children": [
1719
+ {
1720
+ "type": "stack",
1721
+ "direction": "horizontal",
1722
+ "gap": "md",
1723
+ "children": [
1724
+ {
1725
+ "type": "icon",
1726
+ "name": "sparkles",
1727
+ "size": "lg"
1728
+ },
1729
+ {
1730
+ "type": "typography",
1731
+ "content": "AgentRag",
1732
+ "variant": "h2"
1733
+ }
1734
+ ]
1735
+ },
1736
+ {
1737
+ "type": "button",
1738
+ "label": "Open",
1739
+ "event": "GENERATE",
1740
+ "variant": "primary",
1741
+ "icon": "sparkles"
1742
+ }
1743
+ ]
1744
+ },
1745
+ {
1746
+ "type": "divider"
1747
+ },
1748
+ {
1749
+ "type": "empty-state",
1750
+ "icon": "sparkles",
1751
+ "title": "Nothing open",
1752
+ "description": "Click Open to view details in a modal overlay."
1753
+ }
1754
+ ]
1755
+ }
1756
+ ]
1757
+ ]
1758
+ },
1759
+ {
1760
+ "from": "open",
1761
+ "to": "closed",
1762
+ "event": "SAVE",
1763
+ "effects": [
1764
+ [
1765
+ "persist",
1766
+ "create",
1767
+ "AgentRag",
1768
+ "@payload.data"
1769
+ ],
1770
+ [
1771
+ "render-ui",
1772
+ "modal",
1773
+ null
1774
+ ],
1775
+ [
1776
+ "emit",
1777
+ "GENERATED"
1778
+ ],
1779
+ [
1780
+ "ref",
1781
+ "AgentRag"
1782
+ ],
1783
+ [
1784
+ "render-ui",
1785
+ "main",
1786
+ {
1787
+ "type": "stack",
1788
+ "direction": "vertical",
1789
+ "gap": "lg",
1790
+ "children": [
1791
+ {
1792
+ "type": "stack",
1793
+ "direction": "horizontal",
1794
+ "gap": "md",
1795
+ "justify": "space-between",
1796
+ "children": [
1797
+ {
1798
+ "type": "stack",
1799
+ "direction": "horizontal",
1800
+ "gap": "md",
1801
+ "children": [
1802
+ {
1803
+ "type": "icon",
1804
+ "name": "sparkles",
1805
+ "size": "lg"
1806
+ },
1807
+ {
1808
+ "type": "typography",
1809
+ "content": "AgentRag",
1810
+ "variant": "h2"
1811
+ }
1812
+ ]
1813
+ },
1814
+ {
1815
+ "type": "button",
1816
+ "label": "Open",
1817
+ "event": "GENERATE",
1818
+ "variant": "primary",
1819
+ "icon": "sparkles"
1820
+ }
1821
+ ]
1822
+ },
1823
+ {
1824
+ "type": "divider"
1825
+ },
1826
+ {
1827
+ "type": "empty-state",
1828
+ "icon": "sparkles",
1829
+ "title": "Nothing open",
1830
+ "description": "Click Open to view details in a modal overlay."
1831
+ }
1832
+ ]
1833
+ }
1834
+ ],
1835
+ [
1836
+ "notify",
1837
+ "AgentRag created successfully"
1838
+ ]
1839
+ ]
1840
+ }
1841
+ ]
1842
+ }
1843
+ }
1844
+ ],
1845
+ "pages": [
1846
+ {
1847
+ "name": "AgentRagPage",
1848
+ "path": "/agentrags",
1849
+ "traits": [
1850
+ {
1851
+ "ref": "AgentRagRag"
1852
+ },
1853
+ {
1854
+ "ref": "RagTabs"
1855
+ },
1856
+ {
1857
+ "ref": "RagMemoryLifecycle"
1858
+ },
1859
+ {
1860
+ "ref": "RagSearchLifecycle"
1861
+ },
1862
+ {
1863
+ "ref": "RagCompletionFlow"
729
1864
  }
730
1865
  ]
731
1866
  }
732
1867
  ]
733
1868
  }
734
1869
  ],
735
- "description": "Composes memory recall, code search, and LLM completion into a RAG pipeline. Retrieves relevant memories and code snippets, injects them as context, then generates a response with the augmented prompt. Reinforces memories that contributed to the final output. Traits composed (inline, representing atom-level concerns): - RagMemory: recall memories by semantic query - RagSearch: search code repositories for relevant snippets - RagCompletion: generate response with augmented context"
1870
+ "description": "Composes agent atoms + UI atoms into a RAG pipeline with tabbed views. Retrieves relevant memories and code snippets, injects them as context, then generates a response with the augmented prompt. Composed atoms: - stdAgentMemory: recall memories by semantic query - stdAgentSearch: search code repositories for relevant snippets - stdAgentCompletion: generate response with augmented context - stdTabs: tabbed view for Query / Sources / Response Cross-trait events: - GENERATE (RagOrchestrator -> MemoryLifecycle): trigger recall - RETRIEVAL_DONE (RagOrchestrator -> SearchLifecycle): trigger search after recall - GENERATION_DONE (RagOrchestrator -> CompletionFlow): trigger completion"
736
1871
  }