@joe-broadhead/opencode-mem 0.8.5 → 0.9.0

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 (52) hide show
  1. package/CHANGELOG.md +429 -0
  2. package/README.md +114 -61
  3. package/docs/agent-protocol.md +67 -177
  4. package/package.json +1351 -98
  5. package/skills/mem.pages/SKILL.md +143 -0
  6. package/skills/mem.sharing/SKILL.md +82 -0
  7. package/skills/mem.sources/SKILL.md +93 -0
  8. package/skills/mem.usage/SKILL.md +118 -492
  9. package/src/backend/records.js +285 -0
  10. package/src/bootstrap.js +49 -45
  11. package/src/call-shapes.js +41 -10
  12. package/src/collector-lock.js +162 -0
  13. package/src/collector-service.js +441 -0
  14. package/src/collector.js +381 -0
  15. package/src/commands.js +3 -3
  16. package/src/config.js +12 -1
  17. package/src/curation.js +1 -1
  18. package/src/permissions.js +18 -2
  19. package/src/protocol.js +29 -20
  20. package/src/recall.js +104 -27
  21. package/src/records-store.js +280 -120
  22. package/src/records.js +63 -11
  23. package/src/runtime.js +23 -14
  24. package/src/skills.js +44 -18
  25. package/src/sources.js +58 -0
  26. package/src/spaces.js +93 -10
  27. package/src/tools/aliases.js +163 -0
  28. package/src/tools/commitments.js +12 -9
  29. package/src/tools/index.js +88 -19
  30. package/src/tools/ingest.js +277 -0
  31. package/src/tools/knowledge.js +6 -1
  32. package/src/tools/memory.js +640 -210
  33. package/src/tools/page.js +411 -0
  34. package/src/tools/recall.js +363 -112
  35. package/src/tools/records-kit.js +142 -0
  36. package/src/tools/share.js +1012 -0
  37. package/src/tools/shared.js +8 -1
  38. package/src/tools/spaces.js +431 -143
  39. package/src/tools/status.js +87 -58
  40. package/src/tools/wiki.js +2 -2
  41. package/src/views/contracts.js +273 -3
  42. package/src/views/records-reads.js +675 -0
  43. package/src/views/rpc.js +17 -100
  44. package/src/views/shape.js +61 -0
  45. package/views/commitments.html +4 -0
  46. package/views/graph.html +753 -0
  47. package/views/home.html +11 -5
  48. package/views/journal.html +621 -0
  49. package/views/memory.html +7 -1
  50. package/views/pages.html +636 -0
  51. package/views/review.html +406 -0
  52. package/views/today.html +309 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joe-broadhead/opencode-mem",
3
- "version": "0.8.5",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "description": "Durable private and shared-space memory for OpenCode agents",
6
6
  "license": "MIT",
@@ -23,14 +23,20 @@
23
23
  "readOnly": true
24
24
  },
25
25
  {
26
- "name": "mem.wiki",
27
- "permission": "mem_wiki",
26
+ "name": "mem.remember",
27
+ "permission": "mem_remember",
28
28
  "effect": "allow",
29
29
  "readOnly": false
30
30
  },
31
31
  {
32
- "name": "mem.remember",
33
- "permission": "mem_remember",
32
+ "name": "mem.revise",
33
+ "permission": "mem_revise",
34
+ "effect": "allow",
35
+ "readOnly": false
36
+ },
37
+ {
38
+ "name": "mem.page",
39
+ "permission": "mem_page",
34
40
  "effect": "allow",
35
41
  "readOnly": false
36
42
  },
@@ -40,6 +46,42 @@
40
46
  "effect": "allow",
41
47
  "readOnly": false
42
48
  },
49
+ {
50
+ "name": "mem.share",
51
+ "permission": "mem_share",
52
+ "effect": "allow",
53
+ "readOnly": false
54
+ },
55
+ {
56
+ "name": "mem.spaces",
57
+ "permission": "mem_spaces",
58
+ "effect": "allow",
59
+ "readOnly": false
60
+ },
61
+ {
62
+ "name": "mem.wiki",
63
+ "permission": "mem_wiki",
64
+ "effect": "allow",
65
+ "readOnly": false
66
+ },
67
+ {
68
+ "name": "mem.ingest",
69
+ "permission": "mem_ingest",
70
+ "effect": "allow",
71
+ "readOnly": false
72
+ },
73
+ {
74
+ "name": "mem.cursor",
75
+ "permission": "mem_cursor",
76
+ "effect": "allow",
77
+ "readOnly": true
78
+ },
79
+ {
80
+ "name": "mem.collect",
81
+ "permission": "mem_collect",
82
+ "effect": "allow",
83
+ "readOnly": false
84
+ },
43
85
  {
44
86
  "name": "mem.forget",
45
87
  "permission": "mem_forget",
@@ -58,12 +100,6 @@
58
100
  "effect": "allow",
59
101
  "readOnly": true
60
102
  },
61
- {
62
- "name": "mem.spaces",
63
- "permission": "mem_spaces",
64
- "effect": "allow",
65
- "readOnly": true
66
- },
67
103
  {
68
104
  "name": "mem.grants",
69
105
  "permission": "mem_grants",
@@ -78,7 +114,10 @@
78
114
  }
79
115
  ],
80
116
  "skills": [
81
- "mem.usage"
117
+ "mem.usage",
118
+ "mem.pages",
119
+ "mem.sharing",
120
+ "mem.sources"
82
121
  ],
83
122
  "rpc": [
84
123
  {
@@ -140,6 +179,13 @@
140
179
  "unknown"
141
180
  ]
142
181
  },
182
+ "records": {
183
+ "type": "string",
184
+ "enum": [
185
+ "ok",
186
+ "unavailable"
187
+ ]
188
+ },
143
189
  "space": {
144
190
  "type": "object",
145
191
  "additionalProperties": false,
@@ -604,96 +650,1294 @@
604
650
  }
605
651
  }
606
652
  }
607
- }
608
- ],
609
- "views": [
610
- {
611
- "v": 1,
612
- "id": "home",
613
- "place": "home-widget",
614
- "title": "Memory",
615
- "size": "s",
616
- "page": "views/home.html",
617
- "grants": [
618
- "rpc"
619
- ],
620
- "rpc": [
621
- "memory.overview"
622
- ]
623
653
  },
624
654
  {
625
- "v": 1,
626
- "id": "commitments",
627
- "place": "home-widget",
628
- "title": "Commitments",
629
- "size": "s",
630
- "page": "views/commitments.html",
631
- "grants": [
632
- "rpc",
633
- "open-agent"
634
- ],
635
- "rpc": [
636
- "commitments.list"
637
- ]
655
+ "name": "journal.list",
656
+ "label": "list your journal pages",
657
+ "permission": "mem_page",
658
+ "readOnly": true,
659
+ "input": {
660
+ "type": "object",
661
+ "additionalProperties": false,
662
+ "properties": {
663
+ "space": {
664
+ "type": "string",
665
+ "maxLength": 200
666
+ },
667
+ "period": {
668
+ "type": "string",
669
+ "enum": [
670
+ "day",
671
+ "week",
672
+ "month"
673
+ ]
674
+ },
675
+ "jellySpeaker": {
676
+ "type": "string"
677
+ }
678
+ }
679
+ },
680
+ "output": {
681
+ "type": "object",
682
+ "additionalProperties": false,
683
+ "required": [
684
+ "space",
685
+ "items",
686
+ "more"
687
+ ],
688
+ "properties": {
689
+ "space": {
690
+ "type": "object",
691
+ "additionalProperties": false,
692
+ "required": [
693
+ "id",
694
+ "name",
695
+ "kind"
696
+ ],
697
+ "properties": {
698
+ "id": {
699
+ "type": "string",
700
+ "maxLength": 200
701
+ },
702
+ "name": {
703
+ "type": "string",
704
+ "maxLength": 200
705
+ },
706
+ "kind": {
707
+ "type": "string",
708
+ "enum": [
709
+ "personal",
710
+ "shared",
711
+ "unknown"
712
+ ]
713
+ }
714
+ }
715
+ },
716
+ "items": {
717
+ "type": "array",
718
+ "maxItems": 100,
719
+ "items": {
720
+ "type": "object",
721
+ "additionalProperties": false,
722
+ "required": [
723
+ "path",
724
+ "title",
725
+ "period",
726
+ "date",
727
+ "edited",
728
+ "summary",
729
+ "updated"
730
+ ],
731
+ "properties": {
732
+ "path": {
733
+ "type": "string",
734
+ "maxLength": 200
735
+ },
736
+ "title": {
737
+ "type": "string",
738
+ "maxLength": 200
739
+ },
740
+ "period": {
741
+ "type": "string",
742
+ "enum": [
743
+ "day",
744
+ "week",
745
+ "month"
746
+ ]
747
+ },
748
+ "date": {
749
+ "type": "string",
750
+ "maxLength": 40
751
+ },
752
+ "edited": {
753
+ "type": "boolean"
754
+ },
755
+ "summary": {
756
+ "type": "string",
757
+ "maxLength": 300
758
+ },
759
+ "updated": {
760
+ "type": "string",
761
+ "maxLength": 40
762
+ }
763
+ }
764
+ }
765
+ },
766
+ "more": {
767
+ "type": "boolean"
768
+ }
769
+ }
770
+ }
638
771
  },
639
772
  {
640
- "v": 1,
641
- "id": "memory",
642
- "place": "settings-section",
643
- "title": "Your memory",
644
- "page": "views/memory.html",
645
- "grants": [
646
- "data",
647
- "rpc",
648
- "open-agent"
649
- ],
650
- "rpc": [
651
- "memory.overview",
652
- "spaces.list",
653
- "memories.recent",
654
- "wiki.list",
655
- "wiki.pages",
656
- "wiki.read",
657
- "commitments.list"
658
- ]
659
- }
660
- ],
661
- "signIns": [],
662
- "contributes": {
663
- "homeFeeds": [],
664
- "homeWidgets": [],
665
- "workKinds": [],
666
- "settings": [
667
- {
668
- "key": "controlURL",
669
- "label": "Memory address",
670
- "type": "string",
671
- "description": "The Memory server to use, such as https://mem.example.com. Leave it empty to use the one your Jelly account offers."
672
- },
673
- {
674
- "key": "capture",
675
- "label": "Remember conversations",
676
- "type": "boolean",
677
- "description": "On by default: finished turns are saved to your private memory. Off: the memory tools still work, and nothing is saved unless the agent is asked to remember it."
773
+ "name": "journal.read",
774
+ "label": "read a journal page",
775
+ "permission": "mem_page",
776
+ "readOnly": true,
777
+ "input": {
778
+ "type": "object",
779
+ "additionalProperties": false,
780
+ "required": [
781
+ "path"
782
+ ],
783
+ "properties": {
784
+ "space": {
785
+ "type": "string",
786
+ "maxLength": 200
787
+ },
788
+ "path": {
789
+ "type": "string",
790
+ "maxLength": 200
791
+ },
792
+ "jellySpeaker": {
793
+ "type": "string"
794
+ }
795
+ }
678
796
  },
679
- {
680
- "key": "token",
681
- "label": "Memory key",
682
- "type": "secret",
683
- "description": "Only needed when your Jelly account does not sign you in to Memory: paste the key from Memory's /account page."
684
- }
685
- ]
686
- },
687
- "resources": [
688
- "memory"
689
- ],
690
- "asks": [
691
- "memory.remember",
692
- "memory.forget",
693
- "memory.promote",
694
- "memory.promote.revoke",
695
- "wiki.write",
696
- "wiki.delete"
797
+ "output": {
798
+ "type": "object",
799
+ "additionalProperties": false,
800
+ "required": [
801
+ "space",
802
+ "path",
803
+ "title",
804
+ "period",
805
+ "date",
806
+ "edited",
807
+ "updated",
808
+ "body",
809
+ "clipped",
810
+ "sources",
811
+ "footer"
812
+ ],
813
+ "properties": {
814
+ "space": {
815
+ "type": "object",
816
+ "additionalProperties": false,
817
+ "required": [
818
+ "id",
819
+ "name",
820
+ "kind"
821
+ ],
822
+ "properties": {
823
+ "id": {
824
+ "type": "string",
825
+ "maxLength": 200
826
+ },
827
+ "name": {
828
+ "type": "string",
829
+ "maxLength": 200
830
+ },
831
+ "kind": {
832
+ "type": "string",
833
+ "enum": [
834
+ "personal",
835
+ "shared",
836
+ "unknown"
837
+ ]
838
+ }
839
+ }
840
+ },
841
+ "path": {
842
+ "type": "string",
843
+ "maxLength": 200
844
+ },
845
+ "title": {
846
+ "type": "string",
847
+ "maxLength": 200
848
+ },
849
+ "period": {
850
+ "type": "string",
851
+ "enum": [
852
+ "day",
853
+ "week",
854
+ "month"
855
+ ]
856
+ },
857
+ "date": {
858
+ "type": "string",
859
+ "maxLength": 40
860
+ },
861
+ "edited": {
862
+ "type": "boolean"
863
+ },
864
+ "updated": {
865
+ "type": "string",
866
+ "maxLength": 40
867
+ },
868
+ "body": {
869
+ "type": "string",
870
+ "maxLength": 40000
871
+ },
872
+ "clipped": {
873
+ "type": "boolean"
874
+ },
875
+ "sources": {
876
+ "type": "array",
877
+ "maxItems": 200,
878
+ "items": {
879
+ "type": "object",
880
+ "additionalProperties": false,
881
+ "required": [
882
+ "ref",
883
+ "kind",
884
+ "source",
885
+ "title",
886
+ "url"
887
+ ],
888
+ "properties": {
889
+ "ref": {
890
+ "type": "string",
891
+ "maxLength": 200
892
+ },
893
+ "kind": {
894
+ "type": "string",
895
+ "enum": [
896
+ "event",
897
+ "turn"
898
+ ]
899
+ },
900
+ "source": {
901
+ "type": "string",
902
+ "maxLength": 40
903
+ },
904
+ "title": {
905
+ "type": "string",
906
+ "maxLength": 160
907
+ },
908
+ "url": {
909
+ "type": "string",
910
+ "maxLength": 300
911
+ }
912
+ }
913
+ }
914
+ },
915
+ "footer": {
916
+ "type": "object",
917
+ "additionalProperties": false,
918
+ "required": [
919
+ "routine",
920
+ "counts",
921
+ "line"
922
+ ],
923
+ "properties": {
924
+ "routine": {
925
+ "type": "string",
926
+ "maxLength": 40
927
+ },
928
+ "counts": {
929
+ "type": "array",
930
+ "maxItems": 20,
931
+ "items": {
932
+ "type": "object",
933
+ "additionalProperties": false,
934
+ "required": [
935
+ "source",
936
+ "count"
937
+ ],
938
+ "properties": {
939
+ "source": {
940
+ "type": "string",
941
+ "maxLength": 40
942
+ },
943
+ "count": {
944
+ "type": "integer",
945
+ "minimum": 0
946
+ }
947
+ }
948
+ }
949
+ },
950
+ "tokens": {
951
+ "type": "integer",
952
+ "minimum": 0
953
+ },
954
+ "budget": {
955
+ "type": "integer",
956
+ "minimum": 0
957
+ },
958
+ "line": {
959
+ "type": "string",
960
+ "maxLength": 600
961
+ }
962
+ }
963
+ }
964
+ }
965
+ }
966
+ },
967
+ {
968
+ "name": "review.list",
969
+ "label": "list what waits for your review",
970
+ "permission": "mem_spaces",
971
+ "readOnly": true,
972
+ "input": {
973
+ "type": "object",
974
+ "additionalProperties": false,
975
+ "properties": {
976
+ "space": {
977
+ "type": "string",
978
+ "maxLength": 200
979
+ },
980
+ "jellySpeaker": {
981
+ "type": "string"
982
+ }
983
+ }
984
+ },
985
+ "output": {
986
+ "type": "object",
987
+ "additionalProperties": false,
988
+ "required": [
989
+ "space",
990
+ "items",
991
+ "more"
992
+ ],
993
+ "properties": {
994
+ "space": {
995
+ "type": "object",
996
+ "additionalProperties": false,
997
+ "required": [
998
+ "id",
999
+ "name",
1000
+ "kind"
1001
+ ],
1002
+ "properties": {
1003
+ "id": {
1004
+ "type": "string",
1005
+ "maxLength": 200
1006
+ },
1007
+ "name": {
1008
+ "type": "string",
1009
+ "maxLength": 200
1010
+ },
1011
+ "kind": {
1012
+ "type": "string",
1013
+ "enum": [
1014
+ "personal",
1015
+ "shared",
1016
+ "unknown"
1017
+ ]
1018
+ }
1019
+ }
1020
+ },
1021
+ "items": {
1022
+ "type": "array",
1023
+ "maxItems": 20,
1024
+ "items": {
1025
+ "type": "object",
1026
+ "additionalProperties": false,
1027
+ "required": [
1028
+ "id",
1029
+ "action",
1030
+ "title",
1031
+ "target",
1032
+ "reason",
1033
+ "stated_by",
1034
+ "external",
1035
+ "evidence",
1036
+ "proposed",
1037
+ "expires",
1038
+ "created"
1039
+ ],
1040
+ "properties": {
1041
+ "id": {
1042
+ "type": "string",
1043
+ "maxLength": 200
1044
+ },
1045
+ "action": {
1046
+ "type": "string",
1047
+ "maxLength": 40
1048
+ },
1049
+ "title": {
1050
+ "type": "string",
1051
+ "maxLength": 200
1052
+ },
1053
+ "target": {
1054
+ "type": "string",
1055
+ "maxLength": 200
1056
+ },
1057
+ "reason": {
1058
+ "type": "string",
1059
+ "maxLength": 300
1060
+ },
1061
+ "stated_by": {
1062
+ "type": "string",
1063
+ "enum": [
1064
+ "person",
1065
+ "agent",
1066
+ "inferred",
1067
+ "external",
1068
+ "unknown"
1069
+ ]
1070
+ },
1071
+ "external": {
1072
+ "type": "boolean"
1073
+ },
1074
+ "evidence": {
1075
+ "type": "array",
1076
+ "maxItems": 3,
1077
+ "items": {
1078
+ "type": "object",
1079
+ "additionalProperties": false,
1080
+ "required": [
1081
+ "kind",
1082
+ "ref",
1083
+ "quote"
1084
+ ],
1085
+ "properties": {
1086
+ "kind": {
1087
+ "type": "string",
1088
+ "enum": [
1089
+ "event",
1090
+ "turn",
1091
+ "record"
1092
+ ]
1093
+ },
1094
+ "ref": {
1095
+ "type": "string",
1096
+ "maxLength": 200
1097
+ },
1098
+ "quote": {
1099
+ "type": "string",
1100
+ "maxLength": 300
1101
+ }
1102
+ }
1103
+ }
1104
+ },
1105
+ "proposed": {
1106
+ "type": "string",
1107
+ "maxLength": 600
1108
+ },
1109
+ "expires": {
1110
+ "type": "string",
1111
+ "maxLength": 40
1112
+ },
1113
+ "created": {
1114
+ "type": "string",
1115
+ "maxLength": 40
1116
+ }
1117
+ }
1118
+ }
1119
+ },
1120
+ "more": {
1121
+ "type": "boolean"
1122
+ }
1123
+ }
1124
+ }
1125
+ },
1126
+ {
1127
+ "name": "pages.list",
1128
+ "label": "list your pages by folder",
1129
+ "permission": "mem_page",
1130
+ "readOnly": true,
1131
+ "input": {
1132
+ "type": "object",
1133
+ "additionalProperties": false,
1134
+ "properties": {
1135
+ "space": {
1136
+ "type": "string",
1137
+ "maxLength": 200
1138
+ },
1139
+ "folder": {
1140
+ "type": "string",
1141
+ "maxLength": 64
1142
+ },
1143
+ "jellySpeaker": {
1144
+ "type": "string"
1145
+ }
1146
+ }
1147
+ },
1148
+ "output": {
1149
+ "type": "object",
1150
+ "additionalProperties": false,
1151
+ "required": [
1152
+ "space",
1153
+ "folder",
1154
+ "folders",
1155
+ "pages",
1156
+ "more"
1157
+ ],
1158
+ "properties": {
1159
+ "space": {
1160
+ "type": "object",
1161
+ "additionalProperties": false,
1162
+ "required": [
1163
+ "id",
1164
+ "name",
1165
+ "kind"
1166
+ ],
1167
+ "properties": {
1168
+ "id": {
1169
+ "type": "string",
1170
+ "maxLength": 200
1171
+ },
1172
+ "name": {
1173
+ "type": "string",
1174
+ "maxLength": 200
1175
+ },
1176
+ "kind": {
1177
+ "type": "string",
1178
+ "enum": [
1179
+ "personal",
1180
+ "shared",
1181
+ "unknown"
1182
+ ]
1183
+ }
1184
+ }
1185
+ },
1186
+ "folder": {
1187
+ "type": "string",
1188
+ "maxLength": 64
1189
+ },
1190
+ "folders": {
1191
+ "type": "array",
1192
+ "maxItems": 50,
1193
+ "items": {
1194
+ "type": "object",
1195
+ "additionalProperties": false,
1196
+ "required": [
1197
+ "name",
1198
+ "count"
1199
+ ],
1200
+ "properties": {
1201
+ "name": {
1202
+ "type": "string",
1203
+ "maxLength": 64
1204
+ },
1205
+ "count": {
1206
+ "type": "integer",
1207
+ "minimum": 0
1208
+ }
1209
+ }
1210
+ }
1211
+ },
1212
+ "pages": {
1213
+ "type": "array",
1214
+ "maxItems": 150,
1215
+ "items": {
1216
+ "type": "object",
1217
+ "additionalProperties": false,
1218
+ "required": [
1219
+ "path",
1220
+ "title",
1221
+ "type",
1222
+ "updated"
1223
+ ],
1224
+ "properties": {
1225
+ "path": {
1226
+ "type": "string",
1227
+ "maxLength": 200
1228
+ },
1229
+ "title": {
1230
+ "type": "string",
1231
+ "maxLength": 200
1232
+ },
1233
+ "type": {
1234
+ "type": "string",
1235
+ "maxLength": 40
1236
+ },
1237
+ "updated": {
1238
+ "type": "string",
1239
+ "maxLength": 40
1240
+ }
1241
+ }
1242
+ }
1243
+ },
1244
+ "more": {
1245
+ "type": "boolean"
1246
+ }
1247
+ }
1248
+ }
1249
+ },
1250
+ {
1251
+ "name": "pages.read",
1252
+ "label": "read a page or memory, with its links",
1253
+ "permission": "mem_page",
1254
+ "readOnly": true,
1255
+ "input": {
1256
+ "type": "object",
1257
+ "additionalProperties": false,
1258
+ "properties": {
1259
+ "space": {
1260
+ "type": "string",
1261
+ "maxLength": 200
1262
+ },
1263
+ "path": {
1264
+ "type": "string",
1265
+ "maxLength": 200
1266
+ },
1267
+ "id": {
1268
+ "type": "string",
1269
+ "maxLength": 200
1270
+ },
1271
+ "jellySpeaker": {
1272
+ "type": "string"
1273
+ }
1274
+ }
1275
+ },
1276
+ "output": {
1277
+ "type": "object",
1278
+ "additionalProperties": false,
1279
+ "required": [
1280
+ "space",
1281
+ "id",
1282
+ "path",
1283
+ "kind",
1284
+ "type",
1285
+ "title",
1286
+ "status",
1287
+ "stated_by",
1288
+ "updated",
1289
+ "version",
1290
+ "fields",
1291
+ "body",
1292
+ "clipped",
1293
+ "outlinks",
1294
+ "backlinks",
1295
+ "backlinksMore"
1296
+ ],
1297
+ "properties": {
1298
+ "space": {
1299
+ "type": "object",
1300
+ "additionalProperties": false,
1301
+ "required": [
1302
+ "id",
1303
+ "name",
1304
+ "kind"
1305
+ ],
1306
+ "properties": {
1307
+ "id": {
1308
+ "type": "string",
1309
+ "maxLength": 200
1310
+ },
1311
+ "name": {
1312
+ "type": "string",
1313
+ "maxLength": 200
1314
+ },
1315
+ "kind": {
1316
+ "type": "string",
1317
+ "enum": [
1318
+ "personal",
1319
+ "shared",
1320
+ "unknown"
1321
+ ]
1322
+ }
1323
+ }
1324
+ },
1325
+ "id": {
1326
+ "type": "string",
1327
+ "maxLength": 200
1328
+ },
1329
+ "path": {
1330
+ "type": "string",
1331
+ "maxLength": 200
1332
+ },
1333
+ "kind": {
1334
+ "type": "string",
1335
+ "maxLength": 20
1336
+ },
1337
+ "type": {
1338
+ "type": "string",
1339
+ "maxLength": 40
1340
+ },
1341
+ "title": {
1342
+ "type": "string",
1343
+ "maxLength": 200
1344
+ },
1345
+ "status": {
1346
+ "type": "string",
1347
+ "maxLength": 20
1348
+ },
1349
+ "stated_by": {
1350
+ "type": "string",
1351
+ "maxLength": 20
1352
+ },
1353
+ "updated": {
1354
+ "type": "string",
1355
+ "maxLength": 40
1356
+ },
1357
+ "version": {
1358
+ "type": "integer",
1359
+ "minimum": 0
1360
+ },
1361
+ "fields": {
1362
+ "type": "array",
1363
+ "maxItems": 24,
1364
+ "items": {
1365
+ "type": "object",
1366
+ "additionalProperties": false,
1367
+ "required": [
1368
+ "name",
1369
+ "value"
1370
+ ],
1371
+ "properties": {
1372
+ "name": {
1373
+ "type": "string",
1374
+ "maxLength": 40
1375
+ },
1376
+ "value": {
1377
+ "type": "string",
1378
+ "maxLength": 300
1379
+ }
1380
+ }
1381
+ }
1382
+ },
1383
+ "body": {
1384
+ "type": "string",
1385
+ "maxLength": 40000
1386
+ },
1387
+ "clipped": {
1388
+ "type": "boolean"
1389
+ },
1390
+ "outlinks": {
1391
+ "type": "array",
1392
+ "maxItems": 50,
1393
+ "items": {
1394
+ "type": "object",
1395
+ "additionalProperties": false,
1396
+ "required": [
1397
+ "target",
1398
+ "title",
1399
+ "exists"
1400
+ ],
1401
+ "properties": {
1402
+ "target": {
1403
+ "type": "string",
1404
+ "maxLength": 200
1405
+ },
1406
+ "title": {
1407
+ "type": "string",
1408
+ "maxLength": 200
1409
+ },
1410
+ "exists": {
1411
+ "type": "boolean"
1412
+ }
1413
+ }
1414
+ }
1415
+ },
1416
+ "backlinks": {
1417
+ "type": "array",
1418
+ "maxItems": 50,
1419
+ "items": {
1420
+ "type": "object",
1421
+ "additionalProperties": false,
1422
+ "required": [
1423
+ "id",
1424
+ "path",
1425
+ "title",
1426
+ "type"
1427
+ ],
1428
+ "properties": {
1429
+ "id": {
1430
+ "type": "string",
1431
+ "maxLength": 200
1432
+ },
1433
+ "path": {
1434
+ "type": "string",
1435
+ "maxLength": 200
1436
+ },
1437
+ "title": {
1438
+ "type": "string",
1439
+ "maxLength": 200
1440
+ },
1441
+ "type": {
1442
+ "type": "string",
1443
+ "maxLength": 40
1444
+ }
1445
+ }
1446
+ }
1447
+ },
1448
+ "backlinksMore": {
1449
+ "type": "boolean"
1450
+ }
1451
+ }
1452
+ }
1453
+ },
1454
+ {
1455
+ "name": "pages.history",
1456
+ "label": "read a page's history",
1457
+ "permission": "mem_page",
1458
+ "readOnly": true,
1459
+ "input": {
1460
+ "type": "object",
1461
+ "additionalProperties": false,
1462
+ "required": [
1463
+ "id"
1464
+ ],
1465
+ "properties": {
1466
+ "space": {
1467
+ "type": "string",
1468
+ "maxLength": 200
1469
+ },
1470
+ "id": {
1471
+ "type": "string",
1472
+ "maxLength": 200
1473
+ },
1474
+ "jellySpeaker": {
1475
+ "type": "string"
1476
+ }
1477
+ }
1478
+ },
1479
+ "output": {
1480
+ "type": "object",
1481
+ "additionalProperties": false,
1482
+ "required": [
1483
+ "id",
1484
+ "versions",
1485
+ "supersedes",
1486
+ "supersededBy"
1487
+ ],
1488
+ "properties": {
1489
+ "id": {
1490
+ "type": "string",
1491
+ "maxLength": 200
1492
+ },
1493
+ "versions": {
1494
+ "type": "array",
1495
+ "maxItems": 50,
1496
+ "items": {
1497
+ "type": "object",
1498
+ "additionalProperties": false,
1499
+ "required": [
1500
+ "version",
1501
+ "updated",
1502
+ "title",
1503
+ "status",
1504
+ "change"
1505
+ ],
1506
+ "properties": {
1507
+ "version": {
1508
+ "type": "integer",
1509
+ "minimum": 0
1510
+ },
1511
+ "updated": {
1512
+ "type": "string",
1513
+ "maxLength": 40
1514
+ },
1515
+ "title": {
1516
+ "type": "string",
1517
+ "maxLength": 200
1518
+ },
1519
+ "status": {
1520
+ "type": "string",
1521
+ "maxLength": 20
1522
+ },
1523
+ "change": {
1524
+ "type": "string",
1525
+ "maxLength": 200
1526
+ }
1527
+ }
1528
+ }
1529
+ },
1530
+ "supersedes": {
1531
+ "type": "array",
1532
+ "maxItems": 20,
1533
+ "items": {
1534
+ "type": "object",
1535
+ "additionalProperties": false,
1536
+ "required": [
1537
+ "id",
1538
+ "title",
1539
+ "status"
1540
+ ],
1541
+ "properties": {
1542
+ "id": {
1543
+ "type": "string",
1544
+ "maxLength": 200
1545
+ },
1546
+ "title": {
1547
+ "type": "string",
1548
+ "maxLength": 200
1549
+ },
1550
+ "status": {
1551
+ "type": "string",
1552
+ "maxLength": 20
1553
+ }
1554
+ }
1555
+ }
1556
+ },
1557
+ "supersededBy": {
1558
+ "type": "array",
1559
+ "maxItems": 20,
1560
+ "items": {
1561
+ "type": "object",
1562
+ "additionalProperties": false,
1563
+ "required": [
1564
+ "id",
1565
+ "title",
1566
+ "status"
1567
+ ],
1568
+ "properties": {
1569
+ "id": {
1570
+ "type": "string",
1571
+ "maxLength": 200
1572
+ },
1573
+ "title": {
1574
+ "type": "string",
1575
+ "maxLength": 200
1576
+ },
1577
+ "status": {
1578
+ "type": "string",
1579
+ "maxLength": 20
1580
+ }
1581
+ }
1582
+ }
1583
+ }
1584
+ }
1585
+ }
1586
+ },
1587
+ {
1588
+ "name": "graph.links",
1589
+ "label": "map the links around a page",
1590
+ "permission": "mem_page",
1591
+ "readOnly": true,
1592
+ "input": {
1593
+ "type": "object",
1594
+ "additionalProperties": false,
1595
+ "properties": {
1596
+ "space": {
1597
+ "type": "string",
1598
+ "maxLength": 200
1599
+ },
1600
+ "path": {
1601
+ "type": "string",
1602
+ "maxLength": 200
1603
+ },
1604
+ "id": {
1605
+ "type": "string",
1606
+ "maxLength": 200
1607
+ },
1608
+ "depth": {
1609
+ "type": "integer",
1610
+ "minimum": 1,
1611
+ "maximum": 2
1612
+ },
1613
+ "max": {
1614
+ "type": "integer",
1615
+ "minimum": 10,
1616
+ "maximum": 200
1617
+ },
1618
+ "types": {
1619
+ "type": "array",
1620
+ "maxItems": 20,
1621
+ "items": {
1622
+ "type": "string",
1623
+ "maxLength": 40
1624
+ }
1625
+ },
1626
+ "jellySpeaker": {
1627
+ "type": "string"
1628
+ }
1629
+ }
1630
+ },
1631
+ "output": {
1632
+ "type": "object",
1633
+ "additionalProperties": false,
1634
+ "required": [
1635
+ "space",
1636
+ "start",
1637
+ "nodes",
1638
+ "edges",
1639
+ "truncated"
1640
+ ],
1641
+ "properties": {
1642
+ "space": {
1643
+ "type": "object",
1644
+ "additionalProperties": false,
1645
+ "required": [
1646
+ "id",
1647
+ "name",
1648
+ "kind"
1649
+ ],
1650
+ "properties": {
1651
+ "id": {
1652
+ "type": "string",
1653
+ "maxLength": 200
1654
+ },
1655
+ "name": {
1656
+ "type": "string",
1657
+ "maxLength": 200
1658
+ },
1659
+ "kind": {
1660
+ "type": "string",
1661
+ "enum": [
1662
+ "personal",
1663
+ "shared",
1664
+ "unknown"
1665
+ ]
1666
+ }
1667
+ }
1668
+ },
1669
+ "start": {
1670
+ "type": "integer",
1671
+ "minimum": 0
1672
+ },
1673
+ "nodes": {
1674
+ "type": "array",
1675
+ "maxItems": 200,
1676
+ "items": {
1677
+ "type": "object",
1678
+ "additionalProperties": false,
1679
+ "required": [
1680
+ "id",
1681
+ "path",
1682
+ "title",
1683
+ "kind",
1684
+ "type",
1685
+ "dangling"
1686
+ ],
1687
+ "properties": {
1688
+ "id": {
1689
+ "type": "string",
1690
+ "maxLength": 200
1691
+ },
1692
+ "path": {
1693
+ "type": "string",
1694
+ "maxLength": 200
1695
+ },
1696
+ "title": {
1697
+ "type": "string",
1698
+ "maxLength": 80
1699
+ },
1700
+ "kind": {
1701
+ "type": "string",
1702
+ "maxLength": 20
1703
+ },
1704
+ "type": {
1705
+ "type": "string",
1706
+ "maxLength": 40
1707
+ },
1708
+ "dangling": {
1709
+ "type": "boolean"
1710
+ }
1711
+ }
1712
+ }
1713
+ },
1714
+ "edges": {
1715
+ "type": "array",
1716
+ "maxItems": 600,
1717
+ "items": {
1718
+ "type": "object",
1719
+ "additionalProperties": false,
1720
+ "required": [
1721
+ "from",
1722
+ "to",
1723
+ "type"
1724
+ ],
1725
+ "properties": {
1726
+ "from": {
1727
+ "type": "integer",
1728
+ "minimum": 0
1729
+ },
1730
+ "to": {
1731
+ "type": "integer",
1732
+ "minimum": 0
1733
+ },
1734
+ "type": {
1735
+ "type": "string",
1736
+ "enum": [
1737
+ "link",
1738
+ "supersedes",
1739
+ "source"
1740
+ ]
1741
+ }
1742
+ }
1743
+ }
1744
+ },
1745
+ "truncated": {
1746
+ "type": "boolean"
1747
+ }
1748
+ }
1749
+ }
1750
+ }
1751
+ ],
1752
+ "views": [
1753
+ {
1754
+ "v": 1,
1755
+ "id": "home",
1756
+ "place": "home-widget",
1757
+ "title": "Memory",
1758
+ "size": "s",
1759
+ "page": "views/home.html",
1760
+ "grants": [
1761
+ "rpc"
1762
+ ],
1763
+ "rpc": [
1764
+ "memory.overview"
1765
+ ]
1766
+ },
1767
+ {
1768
+ "v": 1,
1769
+ "id": "commitments",
1770
+ "place": "home-widget",
1771
+ "title": "Commitments",
1772
+ "size": "s",
1773
+ "page": "views/commitments.html",
1774
+ "grants": [
1775
+ "rpc",
1776
+ "open-agent"
1777
+ ],
1778
+ "rpc": [
1779
+ "commitments.list"
1780
+ ]
1781
+ },
1782
+ {
1783
+ "v": 1,
1784
+ "id": "memory",
1785
+ "place": "settings-section",
1786
+ "title": "Your memory",
1787
+ "page": "views/memory.html",
1788
+ "grants": [
1789
+ "data",
1790
+ "rpc",
1791
+ "open-agent"
1792
+ ],
1793
+ "rpc": [
1794
+ "memory.overview",
1795
+ "spaces.list",
1796
+ "memories.recent",
1797
+ "wiki.list",
1798
+ "wiki.pages",
1799
+ "wiki.read",
1800
+ "commitments.list"
1801
+ ]
1802
+ },
1803
+ {
1804
+ "v": 1,
1805
+ "id": "today",
1806
+ "place": "home-widget",
1807
+ "title": "Today in memory",
1808
+ "size": "m",
1809
+ "page": "views/today.html",
1810
+ "grants": [
1811
+ "rpc"
1812
+ ],
1813
+ "rpc": [
1814
+ "journal.list",
1815
+ "review.list",
1816
+ "commitments.list"
1817
+ ]
1818
+ },
1819
+ {
1820
+ "v": 1,
1821
+ "id": "journal",
1822
+ "place": "home-widget",
1823
+ "title": "Journal",
1824
+ "size": "l",
1825
+ "page": "views/journal.html",
1826
+ "grants": [
1827
+ "rpc"
1828
+ ],
1829
+ "rpc": [
1830
+ "spaces.list",
1831
+ "journal.list",
1832
+ "journal.read",
1833
+ "pages.read"
1834
+ ]
1835
+ },
1836
+ {
1837
+ "v": 1,
1838
+ "id": "review",
1839
+ "place": "home-widget",
1840
+ "title": "Review",
1841
+ "size": "l",
1842
+ "page": "views/review.html",
1843
+ "grants": [
1844
+ "rpc",
1845
+ "open-agent"
1846
+ ],
1847
+ "rpc": [
1848
+ "spaces.list",
1849
+ "review.list"
1850
+ ]
1851
+ },
1852
+ {
1853
+ "v": 1,
1854
+ "id": "pages",
1855
+ "place": "home-widget",
1856
+ "title": "Pages",
1857
+ "size": "xl",
1858
+ "page": "views/pages.html",
1859
+ "grants": [
1860
+ "rpc"
1861
+ ],
1862
+ "rpc": [
1863
+ "spaces.list",
1864
+ "pages.list",
1865
+ "pages.read",
1866
+ "pages.history"
1867
+ ]
1868
+ },
1869
+ {
1870
+ "v": 1,
1871
+ "id": "graph",
1872
+ "place": "home-widget",
1873
+ "title": "Graph",
1874
+ "size": "xl",
1875
+ "page": "views/graph.html",
1876
+ "grants": [
1877
+ "rpc"
1878
+ ],
1879
+ "rpc": [
1880
+ "spaces.list",
1881
+ "pages.list",
1882
+ "pages.read",
1883
+ "graph.links"
1884
+ ]
1885
+ }
1886
+ ],
1887
+ "signIns": [],
1888
+ "contributes": {
1889
+ "homeFeeds": [],
1890
+ "homeWidgets": [],
1891
+ "workKinds": [],
1892
+ "settings": [
1893
+ {
1894
+ "key": "controlURL",
1895
+ "label": "Memory address",
1896
+ "type": "string",
1897
+ "description": "The Memory server to use, such as https://mem.example.com. Leave it empty to use the one your Jelly account offers."
1898
+ },
1899
+ {
1900
+ "key": "capture",
1901
+ "label": "Remember conversations",
1902
+ "type": "boolean",
1903
+ "description": "On by default: finished turns are saved to your private memory. Off: the memory tools still work, and nothing is saved unless the agent is asked to remember it."
1904
+ },
1905
+ {
1906
+ "key": "token",
1907
+ "label": "Memory key",
1908
+ "type": "secret",
1909
+ "description": "Only needed when your Jelly account does not sign you in to Memory: paste the key from Memory's /account page."
1910
+ }
1911
+ ]
1912
+ },
1913
+ "resources": [
1914
+ "memory"
1915
+ ],
1916
+ "asks": [
1917
+ "memory.remember",
1918
+ "memory.forget",
1919
+ "memory.promote",
1920
+ "memory.promote.revoke",
1921
+ "wiki.write",
1922
+ "wiki.delete",
1923
+ "memory.revise",
1924
+ "page.write",
1925
+ "page.delete",
1926
+ "share.grant",
1927
+ "share.revoke",
1928
+ "share.transfer",
1929
+ "sources.bind"
1930
+ ],
1931
+ "routines": [
1932
+ {
1933
+ "name": "collect",
1934
+ "cron": "*/30 * * * *",
1935
+ "check": {
1936
+ "tool": "mem.collect",
1937
+ "input": {}
1938
+ },
1939
+ "description": "Collect new events from your enabled sources into Memory"
1940
+ }
697
1941
  ]
698
1942
  },
699
1943
  "files": [
@@ -704,6 +1948,11 @@
704
1948
  "views/home.html",
705
1949
  "views/memory.html",
706
1950
  "views/commitments.html",
1951
+ "views/today.html",
1952
+ "views/journal.html",
1953
+ "views/review.html",
1954
+ "views/pages.html",
1955
+ "views/graph.html",
707
1956
  "docs/agent-protocol.md",
708
1957
  "!docs/README.md",
709
1958
  "README.md",
@@ -720,6 +1969,7 @@
720
1969
  "test:ops": "node --test test/ops-control.test.js",
721
1970
  "test:eval": "node --test test/agent-eval.test.js",
722
1971
  "test:pack": "node --test test/package-contents.test.js",
1972
+ "test:records": "node --disable-warning=ExperimentalWarning --test records/test/*.test.js",
723
1973
  "eval:agent": "node scripts/eval/agent-eval.mjs",
724
1974
  "eval:core": "node scripts/eval/agent-eval.mjs --suite core --runs 1 --timeout 120",
725
1975
  "eval:core:release": "node scripts/eval/agent-eval.mjs --suite core --runs 3 --timeout 120",
@@ -744,6 +1994,7 @@
744
1994
  "stub": "node stub/server.js",
745
1995
  "install:plugin": "node scripts/install.mjs",
746
1996
  "e2e": "node scripts/e2e.mjs",
1997
+ "e2e:stack": "node scripts/e2e/stack.mjs",
747
1998
  "verify:stub": "node scripts/live-check.mjs",
748
1999
  "skill:publish": "node scripts/publish-skill.mjs",
749
2000
  "wiki:ingest": "node scripts/ingest-wiki.mjs",
@@ -756,10 +2007,12 @@
756
2007
  "test:control": "npm --prefix control test",
757
2008
  "check:syntax": "node scripts/check-syntax.mjs",
758
2009
  "check:docs": "node scripts/check-docs.mjs",
2010
+ "gen:protocol": "node scripts/gen-protocol.mjs",
2011
+ "check:protocol": "node scripts/gen-protocol.mjs --check",
759
2012
  "check:docker": "node scripts/check-docker-imports.mjs",
760
2013
  "check:compose": "node scripts/check-compose.mjs",
761
2014
  "check:copies": "node scripts/check-copies.mjs",
762
- "check": "npm test && npm run check:syntax && npm run check:docs && npm run check:copies",
2015
+ "check": "npm test && npm run check:syntax && npm run check:docs && npm run check:protocol && npm run check:copies",
763
2016
  "check:jelly": "bun scripts/check-jelly-declaration.mjs",
764
2017
  "shots:views": "node scripts/view-shots.mjs"
765
2018
  },