@joe-broadhead/opencode-mem 0.6.1 → 0.7.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.
- package/README.md +140 -17
- package/SECURITY.md +8 -4
- package/assets/icon.svg +14 -0
- package/package.json +459 -6
- package/src/commands.js +1 -0
- package/src/credentials.js +151 -15
- package/src/index.js +11 -1
- package/src/runtime.js +3 -1
- package/src/tools/status.js +1 -0
- package/src/views/contracts.js +239 -0
- package/src/views/rpc.js +412 -0
- package/views/home.html +184 -0
- package/views/memory.html +487 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joe-broadhead/opencode-mem",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Durable private and shared-space memory for OpenCode agents",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"jelly": {
|
|
15
15
|
"title": "Memory",
|
|
16
16
|
"summary": "Remembers your decisions, preferences and notes across conversations and agents.",
|
|
17
|
+
"icon": "assets/icon.svg",
|
|
17
18
|
"tools": [
|
|
18
19
|
{
|
|
19
20
|
"name": "mem.recall",
|
|
@@ -73,8 +74,446 @@
|
|
|
73
74
|
"skills": [
|
|
74
75
|
"mem.usage"
|
|
75
76
|
],
|
|
76
|
-
"rpc": [
|
|
77
|
-
|
|
77
|
+
"rpc": [
|
|
78
|
+
{
|
|
79
|
+
"name": "memory.overview",
|
|
80
|
+
"label": "say whether memory is connected and how much it holds",
|
|
81
|
+
"permission": "mem_status",
|
|
82
|
+
"readOnly": true,
|
|
83
|
+
"input": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"properties": {}
|
|
87
|
+
},
|
|
88
|
+
"output": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": [
|
|
92
|
+
"connected",
|
|
93
|
+
"credential",
|
|
94
|
+
"capture",
|
|
95
|
+
"health"
|
|
96
|
+
],
|
|
97
|
+
"properties": {
|
|
98
|
+
"connected": {
|
|
99
|
+
"type": "boolean"
|
|
100
|
+
},
|
|
101
|
+
"reason": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"maxLength": 400
|
|
104
|
+
},
|
|
105
|
+
"credential": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"enum": [
|
|
108
|
+
"jelly",
|
|
109
|
+
"key",
|
|
110
|
+
"option",
|
|
111
|
+
"none"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"refused": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"maxLength": 40
|
|
117
|
+
},
|
|
118
|
+
"address": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"maxLength": 300
|
|
121
|
+
},
|
|
122
|
+
"capture": {
|
|
123
|
+
"type": "boolean"
|
|
124
|
+
},
|
|
125
|
+
"health": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"enum": [
|
|
128
|
+
"ok",
|
|
129
|
+
"unreachable",
|
|
130
|
+
"unknown"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"space": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"required": [
|
|
137
|
+
"id",
|
|
138
|
+
"name",
|
|
139
|
+
"kind"
|
|
140
|
+
],
|
|
141
|
+
"properties": {
|
|
142
|
+
"id": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"maxLength": 200
|
|
145
|
+
},
|
|
146
|
+
"name": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"maxLength": 200
|
|
149
|
+
},
|
|
150
|
+
"kind": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"enum": [
|
|
153
|
+
"personal",
|
|
154
|
+
"shared",
|
|
155
|
+
"unknown"
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"counts": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"additionalProperties": false,
|
|
163
|
+
"required": [
|
|
164
|
+
"memories",
|
|
165
|
+
"conversations",
|
|
166
|
+
"summaries",
|
|
167
|
+
"profile"
|
|
168
|
+
],
|
|
169
|
+
"properties": {
|
|
170
|
+
"memories": {
|
|
171
|
+
"type": "integer",
|
|
172
|
+
"minimum": 0
|
|
173
|
+
},
|
|
174
|
+
"conversations": {
|
|
175
|
+
"type": "integer",
|
|
176
|
+
"minimum": 0
|
|
177
|
+
},
|
|
178
|
+
"summaries": {
|
|
179
|
+
"type": "integer",
|
|
180
|
+
"minimum": 0
|
|
181
|
+
},
|
|
182
|
+
"profile": {
|
|
183
|
+
"type": "boolean"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "spaces.list",
|
|
192
|
+
"label": "list your memory spaces",
|
|
193
|
+
"permission": "mem_spaces",
|
|
194
|
+
"readOnly": true,
|
|
195
|
+
"input": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"additionalProperties": false,
|
|
198
|
+
"properties": {}
|
|
199
|
+
},
|
|
200
|
+
"output": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"additionalProperties": false,
|
|
203
|
+
"required": [
|
|
204
|
+
"spaces"
|
|
205
|
+
],
|
|
206
|
+
"properties": {
|
|
207
|
+
"spaces": {
|
|
208
|
+
"type": "array",
|
|
209
|
+
"maxItems": 100,
|
|
210
|
+
"items": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"required": [
|
|
214
|
+
"id",
|
|
215
|
+
"name",
|
|
216
|
+
"kind",
|
|
217
|
+
"role"
|
|
218
|
+
],
|
|
219
|
+
"properties": {
|
|
220
|
+
"id": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"maxLength": 200
|
|
223
|
+
},
|
|
224
|
+
"name": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"maxLength": 200
|
|
227
|
+
},
|
|
228
|
+
"kind": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"enum": [
|
|
231
|
+
"personal",
|
|
232
|
+
"shared",
|
|
233
|
+
"unknown"
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
"role": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"maxLength": 40
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "memories.recent",
|
|
248
|
+
"label": "list your newest memories",
|
|
249
|
+
"permission": "mem_recall",
|
|
250
|
+
"readOnly": true,
|
|
251
|
+
"input": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"additionalProperties": false,
|
|
254
|
+
"properties": {
|
|
255
|
+
"offset": {
|
|
256
|
+
"type": "integer",
|
|
257
|
+
"minimum": 0,
|
|
258
|
+
"maximum": 50,
|
|
259
|
+
"multipleOf": 50
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"output": {
|
|
264
|
+
"type": "object",
|
|
265
|
+
"additionalProperties": false,
|
|
266
|
+
"required": [
|
|
267
|
+
"space",
|
|
268
|
+
"items",
|
|
269
|
+
"more"
|
|
270
|
+
],
|
|
271
|
+
"properties": {
|
|
272
|
+
"space": {
|
|
273
|
+
"type": "object",
|
|
274
|
+
"additionalProperties": false,
|
|
275
|
+
"required": [
|
|
276
|
+
"id",
|
|
277
|
+
"name",
|
|
278
|
+
"kind"
|
|
279
|
+
],
|
|
280
|
+
"properties": {
|
|
281
|
+
"id": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"maxLength": 200
|
|
284
|
+
},
|
|
285
|
+
"name": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"maxLength": 200
|
|
288
|
+
},
|
|
289
|
+
"kind": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"enum": [
|
|
292
|
+
"personal",
|
|
293
|
+
"shared",
|
|
294
|
+
"unknown"
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"items": {
|
|
300
|
+
"type": "array",
|
|
301
|
+
"maxItems": 50,
|
|
302
|
+
"items": {
|
|
303
|
+
"type": "object",
|
|
304
|
+
"additionalProperties": false,
|
|
305
|
+
"required": [
|
|
306
|
+
"id",
|
|
307
|
+
"text",
|
|
308
|
+
"type",
|
|
309
|
+
"at"
|
|
310
|
+
],
|
|
311
|
+
"properties": {
|
|
312
|
+
"id": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"maxLength": 200
|
|
315
|
+
},
|
|
316
|
+
"text": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"maxLength": 600
|
|
319
|
+
},
|
|
320
|
+
"type": {
|
|
321
|
+
"type": "string",
|
|
322
|
+
"maxLength": 40
|
|
323
|
+
},
|
|
324
|
+
"at": {
|
|
325
|
+
"type": "string",
|
|
326
|
+
"maxLength": 40
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"more": {
|
|
332
|
+
"type": "boolean"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "wiki.list",
|
|
339
|
+
"label": "list your wikis",
|
|
340
|
+
"permission": "mem_wiki",
|
|
341
|
+
"readOnly": true,
|
|
342
|
+
"input": {
|
|
343
|
+
"type": "object",
|
|
344
|
+
"additionalProperties": false,
|
|
345
|
+
"properties": {}
|
|
346
|
+
},
|
|
347
|
+
"output": {
|
|
348
|
+
"type": "object",
|
|
349
|
+
"additionalProperties": false,
|
|
350
|
+
"required": [
|
|
351
|
+
"wikis"
|
|
352
|
+
],
|
|
353
|
+
"properties": {
|
|
354
|
+
"wikis": {
|
|
355
|
+
"type": "array",
|
|
356
|
+
"maxItems": 100,
|
|
357
|
+
"items": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"additionalProperties": false,
|
|
360
|
+
"required": [
|
|
361
|
+
"id",
|
|
362
|
+
"name",
|
|
363
|
+
"pages"
|
|
364
|
+
],
|
|
365
|
+
"properties": {
|
|
366
|
+
"id": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"maxLength": 200
|
|
369
|
+
},
|
|
370
|
+
"name": {
|
|
371
|
+
"type": "string",
|
|
372
|
+
"maxLength": 200
|
|
373
|
+
},
|
|
374
|
+
"pages": {
|
|
375
|
+
"type": "integer",
|
|
376
|
+
"minimum": 0
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"name": "wiki.pages",
|
|
386
|
+
"label": "list a wiki's pages",
|
|
387
|
+
"permission": "mem_wiki",
|
|
388
|
+
"readOnly": true,
|
|
389
|
+
"input": {
|
|
390
|
+
"type": "object",
|
|
391
|
+
"additionalProperties": false,
|
|
392
|
+
"required": [
|
|
393
|
+
"wiki"
|
|
394
|
+
],
|
|
395
|
+
"properties": {
|
|
396
|
+
"wiki": {
|
|
397
|
+
"type": "string",
|
|
398
|
+
"maxLength": 200
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"output": {
|
|
403
|
+
"type": "object",
|
|
404
|
+
"additionalProperties": false,
|
|
405
|
+
"required": [
|
|
406
|
+
"pages"
|
|
407
|
+
],
|
|
408
|
+
"properties": {
|
|
409
|
+
"pages": {
|
|
410
|
+
"type": "array",
|
|
411
|
+
"maxItems": 100,
|
|
412
|
+
"items": {
|
|
413
|
+
"type": "object",
|
|
414
|
+
"additionalProperties": false,
|
|
415
|
+
"required": [
|
|
416
|
+
"ref",
|
|
417
|
+
"title"
|
|
418
|
+
],
|
|
419
|
+
"properties": {
|
|
420
|
+
"ref": {
|
|
421
|
+
"type": "string",
|
|
422
|
+
"maxLength": 200
|
|
423
|
+
},
|
|
424
|
+
"title": {
|
|
425
|
+
"type": "string",
|
|
426
|
+
"maxLength": 200
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "wiki.read",
|
|
436
|
+
"label": "read a wiki page",
|
|
437
|
+
"permission": "mem_wiki",
|
|
438
|
+
"readOnly": true,
|
|
439
|
+
"input": {
|
|
440
|
+
"type": "object",
|
|
441
|
+
"additionalProperties": false,
|
|
442
|
+
"required": [
|
|
443
|
+
"wiki",
|
|
444
|
+
"ref"
|
|
445
|
+
],
|
|
446
|
+
"properties": {
|
|
447
|
+
"wiki": {
|
|
448
|
+
"type": "string",
|
|
449
|
+
"maxLength": 200
|
|
450
|
+
},
|
|
451
|
+
"ref": {
|
|
452
|
+
"type": "string",
|
|
453
|
+
"maxLength": 200
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
"output": {
|
|
458
|
+
"type": "object",
|
|
459
|
+
"additionalProperties": false,
|
|
460
|
+
"required": [
|
|
461
|
+
"ref",
|
|
462
|
+
"content",
|
|
463
|
+
"clipped"
|
|
464
|
+
],
|
|
465
|
+
"properties": {
|
|
466
|
+
"ref": {
|
|
467
|
+
"type": "string",
|
|
468
|
+
"maxLength": 200
|
|
469
|
+
},
|
|
470
|
+
"content": {
|
|
471
|
+
"type": "string",
|
|
472
|
+
"maxLength": 48000
|
|
473
|
+
},
|
|
474
|
+
"clipped": {
|
|
475
|
+
"type": "boolean"
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
],
|
|
481
|
+
"views": [
|
|
482
|
+
{
|
|
483
|
+
"v": 1,
|
|
484
|
+
"id": "home",
|
|
485
|
+
"place": "home-widget",
|
|
486
|
+
"title": "Memory",
|
|
487
|
+
"size": "s",
|
|
488
|
+
"page": "views/home.html",
|
|
489
|
+
"grants": [
|
|
490
|
+
"rpc"
|
|
491
|
+
],
|
|
492
|
+
"rpc": [
|
|
493
|
+
"memory.overview"
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"v": 1,
|
|
498
|
+
"id": "memory",
|
|
499
|
+
"place": "settings-section",
|
|
500
|
+
"title": "Your memory",
|
|
501
|
+
"page": "views/memory.html",
|
|
502
|
+
"grants": [
|
|
503
|
+
"data",
|
|
504
|
+
"rpc",
|
|
505
|
+
"open-agent"
|
|
506
|
+
],
|
|
507
|
+
"rpc": [
|
|
508
|
+
"memory.overview",
|
|
509
|
+
"spaces.list",
|
|
510
|
+
"memories.recent",
|
|
511
|
+
"wiki.list",
|
|
512
|
+
"wiki.pages",
|
|
513
|
+
"wiki.read"
|
|
514
|
+
]
|
|
515
|
+
}
|
|
516
|
+
],
|
|
78
517
|
"signIns": [],
|
|
79
518
|
"contributes": {
|
|
80
519
|
"homeFeeds": [],
|
|
@@ -100,12 +539,25 @@
|
|
|
100
539
|
"description": "Only needed when your Jelly account does not sign you in to memory: paste the key from the memory site's /account page."
|
|
101
540
|
}
|
|
102
541
|
]
|
|
103
|
-
}
|
|
542
|
+
},
|
|
543
|
+
"resources": [
|
|
544
|
+
"memory"
|
|
545
|
+
],
|
|
546
|
+
"asks": [
|
|
547
|
+
"memory.remember",
|
|
548
|
+
"memory.forget",
|
|
549
|
+
"memory.promote",
|
|
550
|
+
"memory.promote.revoke",
|
|
551
|
+
"wiki.write"
|
|
552
|
+
]
|
|
104
553
|
},
|
|
105
554
|
"files": [
|
|
106
555
|
"index.js",
|
|
107
556
|
"src",
|
|
108
557
|
"skills",
|
|
558
|
+
"assets/icon.svg",
|
|
559
|
+
"views/home.html",
|
|
560
|
+
"views/memory.html",
|
|
109
561
|
"docs/agent-protocol.md",
|
|
110
562
|
"!docs/README.md",
|
|
111
563
|
"README.md",
|
|
@@ -156,7 +608,8 @@
|
|
|
156
608
|
"check:docs": "node scripts/check-docs.mjs",
|
|
157
609
|
"check:docker": "node scripts/check-docker-imports.mjs",
|
|
158
610
|
"check:compose": "node scripts/check-compose.mjs",
|
|
159
|
-
"check:jelly": "bun scripts/check-jelly-declaration.mjs"
|
|
611
|
+
"check:jelly": "bun scripts/check-jelly-declaration.mjs",
|
|
612
|
+
"shots:views": "node scripts/view-shots.mjs"
|
|
160
613
|
},
|
|
161
614
|
"keywords": [
|
|
162
615
|
"opencode",
|
|
@@ -167,7 +620,7 @@
|
|
|
167
620
|
],
|
|
168
621
|
"repository": {
|
|
169
622
|
"type": "git",
|
|
170
|
-
"url": "https://github.com/joe-broadhead/opencode-mem.git"
|
|
623
|
+
"url": "git+https://github.com/joe-broadhead/opencode-mem.git"
|
|
171
624
|
},
|
|
172
625
|
"homepage": "https://github.com/joe-broadhead/opencode-mem",
|
|
173
626
|
"bugs": {
|
package/src/commands.js
CHANGED
|
@@ -92,6 +92,7 @@ export async function registerCommands(ctx, runtime) {
|
|
|
92
92
|
}
|
|
93
93
|
if (status.collection) lines.push(`- collection: ${oneLine(status.collection, 120)}`)
|
|
94
94
|
lines.push(
|
|
95
|
+
`- credential: ${status.credential}`,
|
|
95
96
|
`- L0 conversations: ${status.layers?.l0 ?? "?"}`,
|
|
96
97
|
`- L1 atoms: ${status.layers?.l1 ?? "?"}`,
|
|
97
98
|
`- L2 scenarios: ${status.layers?.l2 ?? "?"}`,
|