@joe-broadhead/opencode-mem 0.11.2 → 0.11.4
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.
- package/CHANGELOG.md +63 -0
- package/README.md +1 -0
- package/package.json +504 -2
- package/src/config.js +9 -1
- package/src/tools/commitments.js +50 -32
- package/src/tools/held-write.js +15 -7
- package/src/tools/index.js +1 -0
- package/src/tools/ingest.js +11 -0
- package/src/tools/memory.js +26 -18
- package/src/tools/page.js +118 -87
- package/src/tools/recall.js +12 -2
- package/src/tools/shared.js +40 -2
- package/src/tools/spaces.js +8 -1
- package/src/tools/wiki.js +208 -113
- package/src/views/contracts.js +152 -2
- package/src/views/receipt.js +26 -1
- package/src/views/records-reads.js +165 -3
- package/src/views/rpc.js +35 -17
- package/src/views/write-state.js +89 -0
- package/src/wiki-ingest.js +270 -0
- package/src/wiki-queue.js +252 -0
- package/src/wiki-state.js +228 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,69 @@
|
|
|
3
3
|
The format follows Keep a Changelog 1.1.0: one `## [x.y.z] - date` section per
|
|
4
4
|
release.
|
|
5
5
|
|
|
6
|
+
## [0.11.4] - 2026-11-16
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- A wiki write that arrives while the wiki is ingesting is saved to disk before the answer, and
|
|
11
|
+
written after that ingest finishes, even after a restart. If it cannot be saved, the answer is
|
|
12
|
+
refused and says to try again, never queued.
|
|
13
|
+
|
|
14
|
+
### Deploy
|
|
15
|
+
|
|
16
|
+
No server code change, and no migration.
|
|
17
|
+
|
|
18
|
+
## [0.11.3] - 2026-11-16
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- `meetings.list` and `meetings.read` list and read the person's meeting pages, newest first by the
|
|
23
|
+
meeting's start, with the page's `at`, `endsAt`, `people`, `body` and `transcript`.
|
|
24
|
+
- `share.requests` lists the hand-over requests addressed to the caller, pending first and then
|
|
25
|
+
newest first, and never a request the caller sent.
|
|
26
|
+
- `projects.list` lists the project pages the caller can read across the spaces they can reach,
|
|
27
|
+
narrowed by name and by id, with `more` and `incomplete` when a space holds more or could not be
|
|
28
|
+
read.
|
|
29
|
+
- `commitments.list` items carry `due`, an ISO 8601 local date, and the order is dated first by
|
|
30
|
+
`due`, then undated, with ties by creation.
|
|
31
|
+
- `review.list` items carry `at`, an ISO 8601 instant, and the queue reads oldest first with ties
|
|
32
|
+
by id.
|
|
33
|
+
- `pages.list` items carry `changedAt`, an ISO 8601 instant. `updated` stays the display day.
|
|
34
|
+
- `metadata.memoryReceipt` carries `text`, `textMore`, `state` and `link`, so a host draws the
|
|
35
|
+
saved card from one place.
|
|
36
|
+
- The declaration carries `toolsRequireResource: "memory"`. A host that has not handed the engine a
|
|
37
|
+
`memory` resource is told so, and the agent is given none of Memory's tools.
|
|
38
|
+
- A wiki answers its own state (A1), and pages are still listed during an ingest, marked `stale`, so
|
|
39
|
+
the person's pages never vanish (A2).
|
|
40
|
+
- Ingest is automatic and debounced (A3): after the last write Memory starts one ingest itself,
|
|
41
|
+
`MEMORY_WIKI_INGEST_MS` sets the delay, `ingest: false` is accepted and ignored, and a write
|
|
42
|
+
during an ingest is queued rather than refused.
|
|
43
|
+
- Every write and every refusal of `mem_remember`, `mem_commitments`, `mem_page` and `mem_wiki`
|
|
44
|
+
answers with a structured first line, `state: <state> · id: <id> · link: <kind>:<address>`:
|
|
45
|
+
`stored`, `held`, `processing`, `queued`, `ready`, `failed` or `refused`, with `link`
|
|
46
|
+
naming a memory, a commitment, a page or a wiki document
|
|
47
|
+
([write-states.md](docs/write-states.md); A4). The prose after it is unchanged, and
|
|
48
|
+
`metadata.memoryReceipt` carries the same `state` and `link`.
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- A host's direct `mem.collect` with no call id is refused when the host has offered no `memory`
|
|
53
|
+
resource. The answer names the state (`unconfigured`) and never says it started.
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
|
|
57
|
+
- A miss or an absence now says which space it searched, and the scoped sentence is used only where
|
|
58
|
+
the space really refused the read.
|
|
59
|
+
|
|
60
|
+
### Checks
|
|
61
|
+
|
|
62
|
+
- A `test-node24` CI job runs the suite on Node 24, the version the release workflow publishes on,
|
|
63
|
+
so a Node 24 only failure stops a merge instead of the first publish.
|
|
64
|
+
|
|
65
|
+
### Deploy
|
|
66
|
+
|
|
67
|
+
No migrations, and no records or control schema change.
|
|
68
|
+
|
|
6
69
|
## [0.11.2] - 2026-11-16
|
|
7
70
|
|
|
8
71
|
Includes every change listed under 0.11.1 and 0.11.0, and this fix:
|
package/README.md
CHANGED
|
@@ -197,6 +197,7 @@ newer; on older hosts use a key.
|
|
|
197
197
|
| `now` | the real clock | A fixed clock start (ISO date-time) for tests and evals; time runs forward from it. Never set it in daily use |
|
|
198
198
|
| `collect` | `true` (`MEMORY_COLLECT`) | Collect from the person's bound sources on a timer while OpenCode runs; one process per machine, the holder of `stateDir/collector.lock`. Off: `mem_collect` and `/mem-collect` still collect on request |
|
|
199
199
|
| `collectEveryMinutes` | `30` | Minutes between collections, 5 to 1440 |
|
|
200
|
+
| `wikiIngestMs` | `3000` (`MEMORY_WIKI_INGEST_MS`) | How long a wiki write waits for the rest of its burst before one ingest starts, 250 to 60000. A write during an ingest is queued, not refused |
|
|
200
201
|
| `skipAsks` | none | Default asks to turn into allows: action names, as a list or a comma-separated string, such as `"memory.forget, page.delete"`. A deny still stands. Read only from the user-level config (or Jelly's setting), never a project's `opencode.json` or the environment; a held team write still waits in the Inbox ([permissions](docs/permissions.md)) |
|
|
201
202
|
| `recordsWriteTimeoutMs` | `10000` (`MEMORY_RECORDS_WRITE_TIMEOUT_MS`) | Timeout in milliseconds for records writes; reads still use `timeoutMs` (2000 ms by default) |
|
|
202
203
|
| `captureTimeoutMs` | `10000` (`MEMORY_CAPTURE_TIMEOUT_MS`) | Timeout in milliseconds for one turn capture. A capture that times out is retried from the spool with the same key, and the gateway dedupes it ([capture delivery](docs/capture-delivery.md)) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joe-broadhead/opencode-mem",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Durable private and shared-space memory for OpenCode agents",
|
|
6
6
|
"license": "MIT",
|
|
@@ -727,7 +727,8 @@
|
|
|
727
727
|
"required": [
|
|
728
728
|
"id",
|
|
729
729
|
"name",
|
|
730
|
-
"pages"
|
|
730
|
+
"pages",
|
|
731
|
+
"status"
|
|
731
732
|
],
|
|
732
733
|
"properties": {
|
|
733
734
|
"id": {
|
|
@@ -741,6 +742,18 @@
|
|
|
741
742
|
"pages": {
|
|
742
743
|
"type": "integer",
|
|
743
744
|
"minimum": 0
|
|
745
|
+
},
|
|
746
|
+
"status": {
|
|
747
|
+
"type": "string",
|
|
748
|
+
"enum": [
|
|
749
|
+
"processing",
|
|
750
|
+
"ready",
|
|
751
|
+
"failed"
|
|
752
|
+
]
|
|
753
|
+
},
|
|
754
|
+
"error": {
|
|
755
|
+
"type": "string",
|
|
756
|
+
"maxLength": 400
|
|
744
757
|
}
|
|
745
758
|
}
|
|
746
759
|
}
|
|
@@ -797,6 +810,9 @@
|
|
|
797
810
|
}
|
|
798
811
|
}
|
|
799
812
|
}
|
|
813
|
+
},
|
|
814
|
+
"stale": {
|
|
815
|
+
"type": "boolean"
|
|
800
816
|
}
|
|
801
817
|
}
|
|
802
818
|
}
|
|
@@ -924,6 +940,10 @@
|
|
|
924
940
|
"type": "string",
|
|
925
941
|
"maxLength": 40
|
|
926
942
|
},
|
|
943
|
+
"due": {
|
|
944
|
+
"type": "string",
|
|
945
|
+
"maxLength": 40
|
|
946
|
+
},
|
|
927
947
|
"overdue": {
|
|
928
948
|
"type": "boolean"
|
|
929
949
|
},
|
|
@@ -951,6 +971,479 @@
|
|
|
951
971
|
}
|
|
952
972
|
}
|
|
953
973
|
},
|
|
974
|
+
{
|
|
975
|
+
"name": "meetings.list",
|
|
976
|
+
"label": "list your meeting pages",
|
|
977
|
+
"permission": "mem_page",
|
|
978
|
+
"readOnly": true,
|
|
979
|
+
"input": {
|
|
980
|
+
"type": "object",
|
|
981
|
+
"additionalProperties": false,
|
|
982
|
+
"properties": {
|
|
983
|
+
"space": {
|
|
984
|
+
"type": "string",
|
|
985
|
+
"maxLength": 200
|
|
986
|
+
},
|
|
987
|
+
"cursor": {
|
|
988
|
+
"type": "string",
|
|
989
|
+
"maxLength": 600
|
|
990
|
+
},
|
|
991
|
+
"jellySpeaker": {
|
|
992
|
+
"type": "string"
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
"output": {
|
|
997
|
+
"type": "object",
|
|
998
|
+
"additionalProperties": false,
|
|
999
|
+
"required": [
|
|
1000
|
+
"space",
|
|
1001
|
+
"items",
|
|
1002
|
+
"more"
|
|
1003
|
+
],
|
|
1004
|
+
"properties": {
|
|
1005
|
+
"space": {
|
|
1006
|
+
"type": "object",
|
|
1007
|
+
"additionalProperties": false,
|
|
1008
|
+
"required": [
|
|
1009
|
+
"id",
|
|
1010
|
+
"name",
|
|
1011
|
+
"kind",
|
|
1012
|
+
"grantOnly"
|
|
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
|
+
"grantOnly": {
|
|
1032
|
+
"type": "boolean"
|
|
1033
|
+
},
|
|
1034
|
+
"members": {
|
|
1035
|
+
"type": "integer",
|
|
1036
|
+
"minimum": 0
|
|
1037
|
+
},
|
|
1038
|
+
"wikis": {
|
|
1039
|
+
"type": "integer",
|
|
1040
|
+
"minimum": 0
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
"items": {
|
|
1045
|
+
"type": "array",
|
|
1046
|
+
"maxItems": 100,
|
|
1047
|
+
"items": {
|
|
1048
|
+
"type": "object",
|
|
1049
|
+
"additionalProperties": false,
|
|
1050
|
+
"required": [
|
|
1051
|
+
"id",
|
|
1052
|
+
"path",
|
|
1053
|
+
"title",
|
|
1054
|
+
"at"
|
|
1055
|
+
],
|
|
1056
|
+
"properties": {
|
|
1057
|
+
"id": {
|
|
1058
|
+
"type": "string",
|
|
1059
|
+
"maxLength": 200
|
|
1060
|
+
},
|
|
1061
|
+
"path": {
|
|
1062
|
+
"type": "string",
|
|
1063
|
+
"maxLength": 300
|
|
1064
|
+
},
|
|
1065
|
+
"title": {
|
|
1066
|
+
"type": "string",
|
|
1067
|
+
"maxLength": 200
|
|
1068
|
+
},
|
|
1069
|
+
"at": {
|
|
1070
|
+
"type": "string",
|
|
1071
|
+
"maxLength": 40
|
|
1072
|
+
},
|
|
1073
|
+
"endsAt": {
|
|
1074
|
+
"type": "string",
|
|
1075
|
+
"maxLength": 40
|
|
1076
|
+
},
|
|
1077
|
+
"people": {
|
|
1078
|
+
"type": "array",
|
|
1079
|
+
"maxItems": 50,
|
|
1080
|
+
"items": {
|
|
1081
|
+
"type": "string",
|
|
1082
|
+
"maxLength": 200
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
},
|
|
1088
|
+
"more": {
|
|
1089
|
+
"type": "boolean"
|
|
1090
|
+
},
|
|
1091
|
+
"cursor": {
|
|
1092
|
+
"type": "string",
|
|
1093
|
+
"maxLength": 600
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
"name": "meetings.read",
|
|
1100
|
+
"label": "read a meeting page and its transcript",
|
|
1101
|
+
"permission": "mem_page",
|
|
1102
|
+
"readOnly": true,
|
|
1103
|
+
"input": {
|
|
1104
|
+
"type": "object",
|
|
1105
|
+
"additionalProperties": false,
|
|
1106
|
+
"required": [
|
|
1107
|
+
"id"
|
|
1108
|
+
],
|
|
1109
|
+
"properties": {
|
|
1110
|
+
"space": {
|
|
1111
|
+
"type": "string",
|
|
1112
|
+
"maxLength": 200
|
|
1113
|
+
},
|
|
1114
|
+
"id": {
|
|
1115
|
+
"type": "string",
|
|
1116
|
+
"maxLength": 200
|
|
1117
|
+
},
|
|
1118
|
+
"jellySpeaker": {
|
|
1119
|
+
"type": "string"
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
},
|
|
1123
|
+
"output": {
|
|
1124
|
+
"type": "object",
|
|
1125
|
+
"additionalProperties": false,
|
|
1126
|
+
"required": [
|
|
1127
|
+
"id",
|
|
1128
|
+
"path",
|
|
1129
|
+
"title",
|
|
1130
|
+
"at",
|
|
1131
|
+
"body"
|
|
1132
|
+
],
|
|
1133
|
+
"properties": {
|
|
1134
|
+
"space": {
|
|
1135
|
+
"type": "object",
|
|
1136
|
+
"additionalProperties": false,
|
|
1137
|
+
"required": [
|
|
1138
|
+
"id",
|
|
1139
|
+
"name",
|
|
1140
|
+
"kind",
|
|
1141
|
+
"grantOnly"
|
|
1142
|
+
],
|
|
1143
|
+
"properties": {
|
|
1144
|
+
"id": {
|
|
1145
|
+
"type": "string",
|
|
1146
|
+
"maxLength": 200
|
|
1147
|
+
},
|
|
1148
|
+
"name": {
|
|
1149
|
+
"type": "string",
|
|
1150
|
+
"maxLength": 200
|
|
1151
|
+
},
|
|
1152
|
+
"kind": {
|
|
1153
|
+
"type": "string",
|
|
1154
|
+
"enum": [
|
|
1155
|
+
"personal",
|
|
1156
|
+
"shared",
|
|
1157
|
+
"unknown"
|
|
1158
|
+
]
|
|
1159
|
+
},
|
|
1160
|
+
"grantOnly": {
|
|
1161
|
+
"type": "boolean"
|
|
1162
|
+
},
|
|
1163
|
+
"members": {
|
|
1164
|
+
"type": "integer",
|
|
1165
|
+
"minimum": 0
|
|
1166
|
+
},
|
|
1167
|
+
"wikis": {
|
|
1168
|
+
"type": "integer",
|
|
1169
|
+
"minimum": 0
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
},
|
|
1173
|
+
"id": {
|
|
1174
|
+
"type": "string",
|
|
1175
|
+
"maxLength": 200
|
|
1176
|
+
},
|
|
1177
|
+
"path": {
|
|
1178
|
+
"type": "string",
|
|
1179
|
+
"maxLength": 300
|
|
1180
|
+
},
|
|
1181
|
+
"title": {
|
|
1182
|
+
"type": "string",
|
|
1183
|
+
"maxLength": 200
|
|
1184
|
+
},
|
|
1185
|
+
"at": {
|
|
1186
|
+
"type": "string",
|
|
1187
|
+
"maxLength": 40
|
|
1188
|
+
},
|
|
1189
|
+
"endsAt": {
|
|
1190
|
+
"type": "string",
|
|
1191
|
+
"maxLength": 40
|
|
1192
|
+
},
|
|
1193
|
+
"people": {
|
|
1194
|
+
"type": "array",
|
|
1195
|
+
"maxItems": 50,
|
|
1196
|
+
"items": {
|
|
1197
|
+
"type": "string",
|
|
1198
|
+
"maxLength": 200
|
|
1199
|
+
}
|
|
1200
|
+
},
|
|
1201
|
+
"body": {
|
|
1202
|
+
"type": "string",
|
|
1203
|
+
"maxLength": 200000
|
|
1204
|
+
},
|
|
1205
|
+
"transcript": {
|
|
1206
|
+
"type": "string",
|
|
1207
|
+
"maxLength": 12000
|
|
1208
|
+
},
|
|
1209
|
+
"transcriptMore": {
|
|
1210
|
+
"type": "boolean"
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
"name": "share.requests",
|
|
1217
|
+
"label": "list the hand-over requests addressed to you",
|
|
1218
|
+
"permission": "mem_share",
|
|
1219
|
+
"readOnly": true,
|
|
1220
|
+
"input": {
|
|
1221
|
+
"type": "object",
|
|
1222
|
+
"additionalProperties": false,
|
|
1223
|
+
"properties": {
|
|
1224
|
+
"jellySpeaker": {
|
|
1225
|
+
"type": "string"
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
},
|
|
1229
|
+
"output": {
|
|
1230
|
+
"type": "object",
|
|
1231
|
+
"additionalProperties": false,
|
|
1232
|
+
"required": [
|
|
1233
|
+
"requests"
|
|
1234
|
+
],
|
|
1235
|
+
"properties": {
|
|
1236
|
+
"requests": {
|
|
1237
|
+
"type": "array",
|
|
1238
|
+
"maxItems": 100,
|
|
1239
|
+
"items": {
|
|
1240
|
+
"type": "object",
|
|
1241
|
+
"additionalProperties": false,
|
|
1242
|
+
"required": [
|
|
1243
|
+
"id",
|
|
1244
|
+
"state",
|
|
1245
|
+
"target",
|
|
1246
|
+
"from",
|
|
1247
|
+
"to",
|
|
1248
|
+
"at"
|
|
1249
|
+
],
|
|
1250
|
+
"properties": {
|
|
1251
|
+
"id": {
|
|
1252
|
+
"type": "string",
|
|
1253
|
+
"maxLength": 200
|
|
1254
|
+
},
|
|
1255
|
+
"state": {
|
|
1256
|
+
"type": "string",
|
|
1257
|
+
"enum": [
|
|
1258
|
+
"pending",
|
|
1259
|
+
"accepted",
|
|
1260
|
+
"declined"
|
|
1261
|
+
]
|
|
1262
|
+
},
|
|
1263
|
+
"target": {
|
|
1264
|
+
"type": "object",
|
|
1265
|
+
"additionalProperties": false,
|
|
1266
|
+
"required": [
|
|
1267
|
+
"type",
|
|
1268
|
+
"id",
|
|
1269
|
+
"label"
|
|
1270
|
+
],
|
|
1271
|
+
"properties": {
|
|
1272
|
+
"type": {
|
|
1273
|
+
"type": "string",
|
|
1274
|
+
"enum": [
|
|
1275
|
+
"space",
|
|
1276
|
+
"page"
|
|
1277
|
+
]
|
|
1278
|
+
},
|
|
1279
|
+
"id": {
|
|
1280
|
+
"type": "string",
|
|
1281
|
+
"maxLength": 200
|
|
1282
|
+
},
|
|
1283
|
+
"label": {
|
|
1284
|
+
"type": "string",
|
|
1285
|
+
"maxLength": 300
|
|
1286
|
+
},
|
|
1287
|
+
"space": {
|
|
1288
|
+
"type": "string",
|
|
1289
|
+
"maxLength": 200
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
},
|
|
1293
|
+
"from": {
|
|
1294
|
+
"type": "object",
|
|
1295
|
+
"additionalProperties": false,
|
|
1296
|
+
"required": [
|
|
1297
|
+
"user_id"
|
|
1298
|
+
],
|
|
1299
|
+
"properties": {
|
|
1300
|
+
"user_id": {
|
|
1301
|
+
"type": "string",
|
|
1302
|
+
"maxLength": 200
|
|
1303
|
+
},
|
|
1304
|
+
"name": {
|
|
1305
|
+
"type": "string",
|
|
1306
|
+
"maxLength": 200
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
},
|
|
1310
|
+
"to": {
|
|
1311
|
+
"type": "object",
|
|
1312
|
+
"additionalProperties": false,
|
|
1313
|
+
"required": [
|
|
1314
|
+
"user_id"
|
|
1315
|
+
],
|
|
1316
|
+
"properties": {
|
|
1317
|
+
"user_id": {
|
|
1318
|
+
"type": "string",
|
|
1319
|
+
"maxLength": 200
|
|
1320
|
+
},
|
|
1321
|
+
"name": {
|
|
1322
|
+
"type": "string",
|
|
1323
|
+
"maxLength": 200
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
"at": {
|
|
1328
|
+
"type": "string",
|
|
1329
|
+
"maxLength": 40
|
|
1330
|
+
},
|
|
1331
|
+
"note": {
|
|
1332
|
+
"type": "string",
|
|
1333
|
+
"maxLength": 300
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
"name": "projects.list",
|
|
1343
|
+
"label": "list your project pages",
|
|
1344
|
+
"permission": "mem_page",
|
|
1345
|
+
"readOnly": true,
|
|
1346
|
+
"input": {
|
|
1347
|
+
"type": "object",
|
|
1348
|
+
"additionalProperties": false,
|
|
1349
|
+
"properties": {
|
|
1350
|
+
"space": {
|
|
1351
|
+
"type": "string",
|
|
1352
|
+
"maxLength": 200
|
|
1353
|
+
},
|
|
1354
|
+
"jellySpeaker": {
|
|
1355
|
+
"type": "string"
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
"output": {
|
|
1360
|
+
"type": "object",
|
|
1361
|
+
"additionalProperties": false,
|
|
1362
|
+
"required": [
|
|
1363
|
+
"items",
|
|
1364
|
+
"more",
|
|
1365
|
+
"incomplete"
|
|
1366
|
+
],
|
|
1367
|
+
"properties": {
|
|
1368
|
+
"items": {
|
|
1369
|
+
"type": "array",
|
|
1370
|
+
"maxItems": 200,
|
|
1371
|
+
"items": {
|
|
1372
|
+
"type": "object",
|
|
1373
|
+
"additionalProperties": false,
|
|
1374
|
+
"required": [
|
|
1375
|
+
"id",
|
|
1376
|
+
"name",
|
|
1377
|
+
"path",
|
|
1378
|
+
"space"
|
|
1379
|
+
],
|
|
1380
|
+
"properties": {
|
|
1381
|
+
"id": {
|
|
1382
|
+
"type": "string",
|
|
1383
|
+
"maxLength": 200
|
|
1384
|
+
},
|
|
1385
|
+
"name": {
|
|
1386
|
+
"type": "string",
|
|
1387
|
+
"maxLength": 200
|
|
1388
|
+
},
|
|
1389
|
+
"path": {
|
|
1390
|
+
"type": "string",
|
|
1391
|
+
"maxLength": 200
|
|
1392
|
+
},
|
|
1393
|
+
"space": {
|
|
1394
|
+
"type": "object",
|
|
1395
|
+
"additionalProperties": false,
|
|
1396
|
+
"required": [
|
|
1397
|
+
"id",
|
|
1398
|
+
"name"
|
|
1399
|
+
],
|
|
1400
|
+
"properties": {
|
|
1401
|
+
"id": {
|
|
1402
|
+
"type": "string",
|
|
1403
|
+
"maxLength": 200
|
|
1404
|
+
},
|
|
1405
|
+
"name": {
|
|
1406
|
+
"type": "string",
|
|
1407
|
+
"maxLength": 200
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
"more": {
|
|
1415
|
+
"type": "boolean"
|
|
1416
|
+
},
|
|
1417
|
+
"incomplete": {
|
|
1418
|
+
"type": "array",
|
|
1419
|
+
"maxItems": 100,
|
|
1420
|
+
"items": {
|
|
1421
|
+
"type": "object",
|
|
1422
|
+
"additionalProperties": false,
|
|
1423
|
+
"required": [
|
|
1424
|
+
"id",
|
|
1425
|
+
"name",
|
|
1426
|
+
"reason"
|
|
1427
|
+
],
|
|
1428
|
+
"properties": {
|
|
1429
|
+
"id": {
|
|
1430
|
+
"type": "string",
|
|
1431
|
+
"maxLength": 200
|
|
1432
|
+
},
|
|
1433
|
+
"name": {
|
|
1434
|
+
"type": "string",
|
|
1435
|
+
"maxLength": 200
|
|
1436
|
+
},
|
|
1437
|
+
"reason": {
|
|
1438
|
+
"type": "string",
|
|
1439
|
+
"maxLength": 200
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
},
|
|
954
1447
|
{
|
|
955
1448
|
"name": "journal.list",
|
|
956
1449
|
"label": "list your journal pages",
|
|
@@ -1556,6 +2049,10 @@
|
|
|
1556
2049
|
"type": "string",
|
|
1557
2050
|
"maxLength": 40
|
|
1558
2051
|
},
|
|
2052
|
+
"at": {
|
|
2053
|
+
"type": "string",
|
|
2054
|
+
"maxLength": 40
|
|
2055
|
+
},
|
|
1559
2056
|
"payload": {
|
|
1560
2057
|
"type": "object",
|
|
1561
2058
|
"additionalProperties": false,
|
|
@@ -1790,6 +2287,10 @@
|
|
|
1790
2287
|
"type": "string",
|
|
1791
2288
|
"maxLength": 40
|
|
1792
2289
|
},
|
|
2290
|
+
"changedAt": {
|
|
2291
|
+
"type": "string",
|
|
2292
|
+
"maxLength": 40
|
|
2293
|
+
},
|
|
1793
2294
|
"owner": {
|
|
1794
2295
|
"type": "object",
|
|
1795
2296
|
"additionalProperties": false,
|
|
@@ -5355,6 +5856,7 @@
|
|
|
5355
5856
|
"resources": [
|
|
5356
5857
|
"memory"
|
|
5357
5858
|
],
|
|
5859
|
+
"toolsRequireResource": "memory",
|
|
5358
5860
|
"asks": [
|
|
5359
5861
|
"memory.forget",
|
|
5360
5862
|
"memory.promote",
|
package/src/config.js
CHANGED
|
@@ -98,6 +98,12 @@ const DEFAULTS = Object.freeze({
|
|
|
98
98
|
collect: true,
|
|
99
99
|
/** Minutes between collections, 5 to 1440. */
|
|
100
100
|
collectEveryMinutes: 30,
|
|
101
|
+
/**
|
|
102
|
+
* Milliseconds a wiki write waits for the rest of its burst before one
|
|
103
|
+
* ingest starts (jelly #89 A3), 250 to 60000. A write during an ingest is
|
|
104
|
+
* queued, so nothing here needs tuning for a batch of writes.
|
|
105
|
+
*/
|
|
106
|
+
wikiIngestMs: 3000,
|
|
101
107
|
|
|
102
108
|
bootstrapChars: 4000,
|
|
103
109
|
recallLimit: 8,
|
|
@@ -148,6 +154,7 @@ const ENV_MAP = {
|
|
|
148
154
|
stateDir: "MEMORY_STATE_DIR",
|
|
149
155
|
timeZone: "MEMORY_TIME_ZONE",
|
|
150
156
|
collect: "MEMORY_COLLECT",
|
|
157
|
+
wikiIngestMs: "MEMORY_WIKI_INGEST_MS",
|
|
151
158
|
recordsWriteTimeoutMs: "MEMORY_RECORDS_WRITE_TIMEOUT_MS",
|
|
152
159
|
captureTimeoutMs: "MEMORY_CAPTURE_TIMEOUT_MS",
|
|
153
160
|
recordsWriteRetries: "MEMORY_RECORDS_WRITE_RETRIES",
|
|
@@ -173,7 +180,7 @@ const BOOLEAN_KEYS = [
|
|
|
173
180
|
"debug",
|
|
174
181
|
]
|
|
175
182
|
|
|
176
|
-
const NUMBER_KEYS = ["bootstrapChars", "recallLimit", "recallChars", "timeoutMs", "recordsWriteTimeoutMs", "captureTimeoutMs", "retries", "collectEveryMinutes"]
|
|
183
|
+
const NUMBER_KEYS = ["bootstrapChars", "recallLimit", "recallChars", "timeoutMs", "recordsWriteTimeoutMs", "captureTimeoutMs", "retries", "collectEveryMinutes", "wikiIngestMs"]
|
|
177
184
|
|
|
178
185
|
/** An IANA zone this runtime knows, or "". */
|
|
179
186
|
function validTimeZone(value) {
|
|
@@ -364,6 +371,7 @@ export function resolveConfig(options = {}, env = process.env) {
|
|
|
364
371
|
merged.recordsWriteRetries = Number.isInteger(value) && value >= 0 ? Math.min(value, 5) : DEFAULTS.recordsWriteRetries
|
|
365
372
|
}
|
|
366
373
|
merged.collectEveryMinutes = Math.min(Math.max(merged.collectEveryMinutes, 5), 1440)
|
|
374
|
+
merged.wikiIngestMs = Math.min(Math.max(merged.wikiIngestMs, 250), 60_000)
|
|
367
375
|
{
|
|
368
376
|
const value = Number(merged.actionKeysMaxAgeHours)
|
|
369
377
|
merged.actionKeysMaxAgeHours = Number.isInteger(value) && value >= 0 ? Math.min(value, 8760) : DEFAULTS.actionKeysMaxAgeHours
|