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