dotmem 0.2.5 → 0.2.6
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/AGENTS.md +107 -0
- package/MEMORY.md +1 -1
- package/README.md +431 -461
- package/agent.cjs +93 -88
- package/agent.js +93 -88
- package/bin/dotmem-burst-stats.cjs +25 -0
- package/bin/dotmem-burst-stats.js +25 -0
- package/built-in-context.json +2 -2
- package/cli.cjs +211 -197
- package/cli.js +211 -197
- package/global.cjs +93 -88
- package/global.js +93 -88
- package/index.cjs +115 -110
- package/index.js +115 -110
- package/llms.txt +27 -10
- package/mcp.cjs +127 -122
- package/mcp.js +127 -122
- package/package.json +1 -1
- package/types/global-types.d.ts +14 -0
- package/types/memory.d.ts +3 -0
package/README.md
CHANGED
|
@@ -1,461 +1,431 @@
|
|
|
1
|
-
# Dotmem (.mem)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
|
112
|
-
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
|
120
|
-
|
|
121
|
-
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
###
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
###
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
|
330
|
-
|
|
331
|
-
|
|
|
332
|
-
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
-
|
|
355
|
-
-
|
|
356
|
-
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
## Compatibility
|
|
433
|
-
|
|
434
|
-
| Runtime | Status |
|
|
435
|
-
|---|---|
|
|
436
|
-
| Node.js >= 20.0.0 | Declared in `package.json` engines; tested in CI (20.x, 22.x) |
|
|
437
|
-
| Bun >= 1.0 | Tested in CI (1.x) |
|
|
438
|
-
| Browser | ES2020+ with IndexedDB, localStorage, sessionStorage |
|
|
439
|
-
| Deno | Compatible, not routinely tested |
|
|
440
|
-
|
|
441
|
-
Persistence rules differ per runtime: see the [persistence warning](#agent-namespaced-memory).
|
|
442
|
-
|
|
443
|
-
---
|
|
444
|
-
|
|
445
|
-
## Project direction
|
|
446
|
-
|
|
447
|
-
Dotmem is developed as an independent memory runtime. Long-term objectives: reliable cross-session continuity, portable memory across providers and environments, stronger evidence and verification workflows, transparent memory inspection and management, efficient context projection, and durable lifecycle and checkpoint management. These objectives do not imply that every capability is already implemented; current functionality and limitations are documented above and in the linked documents.
|
|
448
|
-
|
|
449
|
-
**Your memory. Your continuity.**
|
|
450
|
-
|
|
451
|
-
---
|
|
452
|
-
|
|
453
|
-
## Disclaimer
|
|
454
|
-
|
|
455
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. Outputs of AI systems that use Dotmem can be wrong or incomplete; verify critical information independently, and do not store sensitive or confidential data in unencrypted memory.
|
|
456
|
-
|
|
457
|
-
## License
|
|
458
|
-
|
|
459
|
-
MIT - Copyright (c) 2026 Dario Passariello.
|
|
460
|
-
|
|
461
|
-
SPDX-License-Identifier: `MIT`
|
|
1
|
+
# Dotmem (.mem)
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
**Memory. Identity. Continuity.**
|
|
6
|
+
|
|
7
|
+
Dotmem is an independent, local-first memory runtime for AI agents and applications. It preserves experience, context, provenance, and continuity across sessions, models, providers, and machines.
|
|
8
|
+
|
|
9
|
+
AI provides intelligence. Dotmem provides continuity.
|
|
10
|
+
|
|
11
|
+
- Evidence-based, auditable memory.
|
|
12
|
+
- Deterministic lexical and structured retrieval.
|
|
13
|
+
- Bounded context projection.
|
|
14
|
+
- Policy-governed acquisition and writes.
|
|
15
|
+
- No embeddings, vector database, or model dependency.
|
|
16
|
+
|
|
17
|
+
Your memory should remain under your control, independent of the model or provider you use.
|
|
18
|
+
|
|
19
|
+
## Contents
|
|
20
|
+
|
|
21
|
+
- [Choose your path](#choose-your-path)
|
|
22
|
+
- [Quick start for developers](#quick-start-for-developers)
|
|
23
|
+
- [Connect an AI host](#connect-an-ai-host)
|
|
24
|
+
- [Core concepts](#core-concepts)
|
|
25
|
+
- [Progressive context loading](#progressive-context-loading)
|
|
26
|
+
- [Storage and inspection](#storage-and-inspection)
|
|
27
|
+
- [MCP integration](#mcp-integration)
|
|
28
|
+
- [Security and limitations](#security-and-limitations)
|
|
29
|
+
- [Build profiles](#build-profiles)
|
|
30
|
+
- [Compatibility](#compatibility)
|
|
31
|
+
- [Documentation](#documentation)
|
|
32
|
+
- [License](#license)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Choose your path
|
|
37
|
+
|
|
38
|
+
| If you want to... | Start here |
|
|
39
|
+
|---|---|
|
|
40
|
+
| Use Dotmem from your own application | [Quick start for developers](#quick-start-for-developers) |
|
|
41
|
+
| Connect a VS Code or other AI host to local Dotmem memory | [Connect an AI host](#connect-an-ai-host) |
|
|
42
|
+
| Understand trust, retrieval, and context limits | [Core concepts](#core-concepts) |
|
|
43
|
+
|
|
44
|
+
Dotmem can be used without the Joy assistant profile. Jo/Joy is an optional assistant profile, not an entry point or a requirement of the memory runtime.
|
|
45
|
+
|
|
46
|
+
## Quick start for developers
|
|
47
|
+
|
|
48
|
+
### Requirements
|
|
49
|
+
|
|
50
|
+
- Node.js >= 20, or Bun >= 1.0.
|
|
51
|
+
- An application that can use the Dotmem package.
|
|
52
|
+
|
|
53
|
+
### Install
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm install dotmem
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
With Bun:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
bun add dotmem
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`dotmem` is sufficient for the memory API shown here. `memorio` is an optional companion package; add it only if your application or integration directly uses Memorio's state and persistence APIs:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm install memorio
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Your first memory
|
|
72
|
+
|
|
73
|
+
The example stores a language preference and then retrieves it using a matching term. Dotmem retrieval is lexical and structured, so this avoids relying on synonym or semantic matching.
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
import { memory } from 'dotmem'
|
|
77
|
+
|
|
78
|
+
await memory.acquire({
|
|
79
|
+
id: 'user.language-preference',
|
|
80
|
+
knowledge: { language: 'TypeScript' },
|
|
81
|
+
applicability: { area: 'language-selection' },
|
|
82
|
+
evidence: [{
|
|
83
|
+
id: 'example-001',
|
|
84
|
+
source: 'application',
|
|
85
|
+
observedAt: new Date().toISOString()
|
|
86
|
+
}],
|
|
87
|
+
epistemicType: 'observed'
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
const discovery = await memory.discover(
|
|
91
|
+
'TypeScript',
|
|
92
|
+
{ depth: 'current', maxCandidates: 10 }
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
const projection = memory.project(discovery, {
|
|
96
|
+
maxCandidates: 8,
|
|
97
|
+
maxCharacters: 4000
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
console.log(projection.text)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
This is a lexical example, not a demonstration of semantic search. A successful matching discovery is projected into `projection.text`; the exact text depends on the claim's eligibility and the runtime's projection rules.
|
|
104
|
+
|
|
105
|
+
The runtime initializes lazily on first use. No explicit `init()` is required.
|
|
106
|
+
|
|
107
|
+
In Node.js and Bun, `memory.acquire()` persists durable experience as `.mem` files. An empty store, an ineligible claim, or a query with no lexical/structured match can produce an empty discovery.
|
|
108
|
+
|
|
109
|
+
### Which API should I use?
|
|
110
|
+
|
|
111
|
+
| Purpose | API |
|
|
112
|
+
|---|---|
|
|
113
|
+
| Acquire durable knowledge | `memory.acquire()` |
|
|
114
|
+
| Review before acquisition | `memory.acquireStaged()` |
|
|
115
|
+
| Retrieve relevant experience | `memory.discover()` |
|
|
116
|
+
| Build bounded context | `memory.project()` |
|
|
117
|
+
| Key/value memory | `remember()` / `recall()` |
|
|
118
|
+
| Agent-specific memory | `createAgentMemory()` |
|
|
119
|
+
| Short-lived notes | `memory.note` |
|
|
120
|
+
| Session continuity | `continuity` |
|
|
121
|
+
| Write authorization | `memory.policy` |
|
|
122
|
+
|
|
123
|
+
**Persistence note:** On Node.js and Bun, use `memory.acquire()` for durable claims. Key/value persistence depends on the selected scope and runtime. See [MEMORY.md](./MEMORY.md).
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Connect an AI host
|
|
128
|
+
|
|
129
|
+
Dotmem can provide local memory and continuity to a compatible AI agent host, including a VS Code extension that supports MCP.
|
|
130
|
+
|
|
131
|
+
### 1. Install Dotmem
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npm install -g dotmem
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Memorio is optional. Install it separately only when your application or integration uses its APIs.
|
|
138
|
+
|
|
139
|
+
### 2. Configure the MCP server in your host
|
|
140
|
+
|
|
141
|
+
Global installation does **not** automatically register an MCP server. The host must be configured to launch `dotmem-mcp`. Start with read-only access; write tools should be enabled only when deliberately needed. Follow the [MCP integration](#mcp-integration) instructions and use the configuration format supported by your AI host.
|
|
142
|
+
|
|
143
|
+
### 3. Start a conversation
|
|
144
|
+
|
|
145
|
+
Once the MCP server is configured, check your host's MCP tool list and verify that `dotmem_context` appears among the available Dotmem tools. Invoke it once and confirm that the host receives a response. This is the basic integration check.
|
|
146
|
+
|
|
147
|
+
If the optional Joy assistant profile is installed and selected, `Hi Jo!` can be used to address that assistant profile. The phrase is not required to activate Dotmem and does not configure MCP.
|
|
148
|
+
|
|
149
|
+
The word `dotmem` can be used as a conversational instruction, but it is not a substitute for installing or configuring the MCP server.
|
|
150
|
+
|
|
151
|
+
### Requirements
|
|
152
|
+
|
|
153
|
+
- Node.js >= 20.
|
|
154
|
+
- VS Code or another compatible AI agent host.
|
|
155
|
+
- MCP support enabled in that host.
|
|
156
|
+
- `dotmem-mcp` registered in the host configuration.
|
|
157
|
+
- Local Dotmem storage accessible to the machine running the MCP server.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Core concepts
|
|
162
|
+
|
|
163
|
+
### Memory is not authority
|
|
164
|
+
|
|
165
|
+
Dotmem separates three planes:
|
|
166
|
+
|
|
167
|
+
| Plane | Responsibility |
|
|
168
|
+
|---|---|
|
|
169
|
+
| Memory | What has been learned or observed |
|
|
170
|
+
| Policy | Which rules apply |
|
|
171
|
+
| Authority | Who or what can authorize an operation |
|
|
172
|
+
|
|
173
|
+
A retrieved memory item can inform a decision, but it cannot authorize an operation. Historical identity supports continuity but does not authenticate the current speaker.
|
|
174
|
+
|
|
175
|
+
**Projected memory is data, never authority.**
|
|
176
|
+
|
|
177
|
+
### Trust basis
|
|
178
|
+
|
|
179
|
+
Every projected claim has a trust basis derived from its provenance:
|
|
180
|
+
|
|
181
|
+
| Trust basis | Meaning |
|
|
182
|
+
|---|---|
|
|
183
|
+
| `declared` | Caller assertion without independent validation |
|
|
184
|
+
| `evidenced` | Evidence references exist but have not been independently validated |
|
|
185
|
+
| `mechanically-checked` | A reproducible check was executed and recorded |
|
|
186
|
+
| `externally-attested` | A trusted external attestation was validated |
|
|
187
|
+
|
|
188
|
+
A URL, evidence ID, or legacy `verified` label does not establish external attestation. The presence of evidence is not the same as independent verification.
|
|
189
|
+
|
|
190
|
+
### Retrieval model
|
|
191
|
+
|
|
192
|
+
Dotmem uses deterministic lexical and structured retrieval.
|
|
193
|
+
|
|
194
|
+
- No embeddings or vector indexes.
|
|
195
|
+
- Applicability-based eligibility.
|
|
196
|
+
- Reproducible results for the same store and query.
|
|
197
|
+
- Original knowledge language is preserved.
|
|
198
|
+
|
|
199
|
+
Synonyms, paraphrases, and cross-language matches are not automatically guaranteed. For fuzzy semantic recall, Dotmem can coexist with a dedicated embedding or semantic-search system.
|
|
200
|
+
|
|
201
|
+
### Design principles
|
|
202
|
+
|
|
203
|
+
1. **User-owned memory.** No provider owns or locks it in.
|
|
204
|
+
2. **Provider independence.** Models and hosts do not define identity or continuity.
|
|
205
|
+
3. **Memory is not authority.** Retrieval never turns a claim into policy.
|
|
206
|
+
4. **Identity survives the carrier.** Runtime metadata cannot redefine canonical identity.
|
|
207
|
+
5. **Provenance matters.** Labels are not proof.
|
|
208
|
+
6. **Memory stays correctable.** Revision, supersession, and retraction are explicit.
|
|
209
|
+
7. **Honest boundaries.** Dotmem states what it knows and what it cannot enforce.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Progressive context loading
|
|
214
|
+
|
|
215
|
+
Dotmem can progressively load context according to the session's configured loading profile and progress.
|
|
216
|
+
|
|
217
|
+
| Level | Purpose | Projection limit |
|
|
218
|
+
|---|---|---:|
|
|
219
|
+
| L0 | Minimal startup | 0 claims |
|
|
220
|
+
| L1 | Initial context | 5 candidates / 900 characters |
|
|
221
|
+
| L2 | Expanded context | 12 candidates / 3,000 characters |
|
|
222
|
+
| L3 | Deep context | 20 candidates / 6,000 characters |
|
|
223
|
+
|
|
224
|
+
### Loading profiles
|
|
225
|
+
|
|
226
|
+
The profile determines the maximum automatic loading level:
|
|
227
|
+
|
|
228
|
+
- **SHORT**: maximum L1.
|
|
229
|
+
- **MEDIUM**: maximum L2.
|
|
230
|
+
- **LONG**: can progress to L3 from turn 6 onward.
|
|
231
|
+
|
|
232
|
+
The profile (SHORT, MEDIUM, or LONG) is supplied to Dotmem's session-loading policy; it is not inferred from the user's wording or from the contents of a query. A *turn* is a conversation turn counted by the session metrics used by Dotmem. The LONG profile does not mean that every session immediately loads L3; the session must reach the configured progression threshold.
|
|
233
|
+
|
|
234
|
+
The mechanism that selects the profile is host/integration-specific. Configure it in the component that supplies session metrics to Dotmem.
|
|
235
|
+
|
|
236
|
+
After a summary restart, automatic progression returns to L1.
|
|
237
|
+
|
|
238
|
+
The complete projection remains available explicitly through `--full`. L3 is bounded and is not equivalent to a complete memory dump.
|
|
239
|
+
|
|
240
|
+
### Useful CLI commands
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
npx dotmem
|
|
244
|
+
npx dotmem --level 1
|
|
245
|
+
npx dotmem --level 2
|
|
246
|
+
npx dotmem --level 3
|
|
247
|
+
npx dotmem --summary-restart
|
|
248
|
+
npx dotmem --full
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Storage and inspection
|
|
254
|
+
|
|
255
|
+
### Location
|
|
256
|
+
|
|
257
|
+
The default storage location is:
|
|
258
|
+
|
|
259
|
+
```text
|
|
260
|
+
<user-home>/.dotmem
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
To select a custom location:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
DOTMEM_STORAGE_ROOT=/path/to/storage
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
`.mem` files are versioned, compressed packages with SHA-256 integrity manifests.
|
|
270
|
+
|
|
271
|
+
- Atomic writes and backups.
|
|
272
|
+
- Directory locking.
|
|
273
|
+
- Expected-version checks.
|
|
274
|
+
- V2 writes and V1 reads.
|
|
275
|
+
|
|
276
|
+
Do not edit `.mem` files directly. They are binary packages.
|
|
277
|
+
|
|
278
|
+
### Inspect memory
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
npx dotmem inspect path/to/file.mem
|
|
282
|
+
npx dotmem inspect path/to/file.mem --format json
|
|
283
|
+
npx dotmem dump
|
|
284
|
+
npx dotmem diff FILE_A.mem FILE_B.mem
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Inspection is read-only and redacts secret-shaped values by default.
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## MCP integration
|
|
292
|
+
|
|
293
|
+
Use Dotmem as a local memory service for MCP-compatible AI applications.
|
|
294
|
+
|
|
295
|
+
`dotmem-mcp` is a local stdio MCP server. It runs on the machine that owns the memory store, allowing compatible AI hosts and the terminal to use the same local data.
|
|
296
|
+
|
|
297
|
+
### Register the server
|
|
298
|
+
|
|
299
|
+
For a quick trial, use the current published package. This unpinned configuration can resolve a different package version on a later launch, so its behavior may change between runs:
|
|
300
|
+
|
|
301
|
+
```json
|
|
302
|
+
{
|
|
303
|
+
"mcpServers": {
|
|
304
|
+
"dotmem": {
|
|
305
|
+
"command": "npx",
|
|
306
|
+
"args": ["-y", "-p", "dotmem", "dotmem-mcp"]
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
For repeatable deployments, check the current published version with:
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
npm view dotmem version
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
Then replace `dotmem` in the configuration with `dotmem@<version>` using the exact version returned by the command.
|
|
319
|
+
|
|
320
|
+
Restart the AI host and verify that the Dotmem tools are available.
|
|
321
|
+
|
|
322
|
+
### Available tools
|
|
323
|
+
|
|
324
|
+
| Tool | Access | Purpose |
|
|
325
|
+
|---|---|---|
|
|
326
|
+
| `dotmem_context` | Read | Retrieve relevant context |
|
|
327
|
+
| `dotmem_rules` | Read | Retrieve operating rules |
|
|
328
|
+
| `dotmem_bootstrap` | Read | Unified context and rules bootstrap |
|
|
329
|
+
| `dotmem_inspect` | Read | Inspect memory packages and stores |
|
|
330
|
+
| `dotmem_acquire` | Write | Acquire durable experience |
|
|
331
|
+
| `dotmem_verify` | Write | Execute supported verification probes |
|
|
332
|
+
| `dotmem_continuity` | Read / conditional write | Manage checkpoints and open loops |
|
|
333
|
+
|
|
334
|
+
### Read-only by default
|
|
335
|
+
|
|
336
|
+
Write tools are registered only when explicitly enabled. The default configuration above does not set the write flag.
|
|
337
|
+
|
|
338
|
+
To enable write tools, set this environment variable in the MCP server process:
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
DOTMEM_MCP_WRITE=1
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Only enable it for hosts and workflows that are intended to write to the local memory store.
|
|
345
|
+
|
|
346
|
+
### Host configuration
|
|
347
|
+
|
|
348
|
+
The generic stdio configuration above is the reference shape. Host-specific configuration syntax, Windows launch details, and write-enabled variants are maintained in [MEMORY.md](./MEMORY.md), so this README does not duplicate instructions that can drift between clients.
|
|
349
|
+
|
|
350
|
+
### Deployment notes
|
|
351
|
+
|
|
352
|
+
- The MCP server must run on the machine that owns the memory store.
|
|
353
|
+
- The CLI and MCP server must resolve the same storage root when they are expected to share memory.
|
|
354
|
+
- Hosted AI environments do not automatically share your local filesystem.
|
|
355
|
+
- GUI clients may not inherit your shell's `PATH`; use an explicit executable path or a suitable launcher when necessary.
|
|
356
|
+
- MCP stdio is a local process integration; it is not a publicly hosted remote endpoint.
|
|
357
|
+
|
|
358
|
+
See [AGENTS.md](./AGENTS.md) for agent integration rules and [MEMORY.md](./MEMORY.md) for the complete memory and MCP reference.
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## Security and limitations
|
|
363
|
+
|
|
364
|
+
Dotmem is designed to preserve user control and make its boundaries explicit.
|
|
365
|
+
|
|
366
|
+
- `.mem` files and vault data are **not encrypted at rest**.
|
|
367
|
+
- SHA-256 integrity is not encryption or access control.
|
|
368
|
+
- Filesystem permissions are enforced by the operating system.
|
|
369
|
+
- Retrieval is lexical and structured, not semantic.
|
|
370
|
+
- Dotmem governs context projection, not downstream model behavior.
|
|
371
|
+
- Shared storage coordination is not a distributed transaction system.
|
|
372
|
+
- No formal uptime or scalability SLA is provided.
|
|
373
|
+
|
|
374
|
+
Do not use Dotmem as a replacement for an encrypted backup solution, secrets manager, or database authorization system.
|
|
375
|
+
|
|
376
|
+
See [SECURITY.md](./SECURITY.md).
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## Build profiles
|
|
381
|
+
|
|
382
|
+
Dotmem core is independent of assistant identity and branding.
|
|
383
|
+
|
|
384
|
+
The product owner selects the assistant profile at build time. Profiles are embedded in the build artifact and cannot be changed by end users at runtime.
|
|
385
|
+
|
|
386
|
+
The default build uses the Joy profile. Joy is a selectable profile, not a mandatory identity of the Dotmem runtime.
|
|
387
|
+
|
|
388
|
+
See [AI.md](./context/templates/AI.md).
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## Compatibility
|
|
393
|
+
|
|
394
|
+
| Runtime | Status |
|
|
395
|
+
|---|---|
|
|
396
|
+
| Node.js >= 20 | Supported and tested |
|
|
397
|
+
| Bun >= 1.0 | Supported and tested |
|
|
398
|
+
| Browser | ES2020+ with browser storage APIs |
|
|
399
|
+
| Deno | Compatible, not routinely tested |
|
|
400
|
+
|
|
401
|
+
Persistence behavior differs by runtime. See [MEMORY.md](./MEMORY.md).
|
|
402
|
+
|
|
403
|
+
## Documentation
|
|
404
|
+
|
|
405
|
+
| Document | Description |
|
|
406
|
+
|---|---|
|
|
407
|
+
| [MEMORY.md](./MEMORY.md) | Memory model, acquisition, policy, continuity and MCP |
|
|
408
|
+
| [AGENTS.md](./AGENTS.md) | Agent integration and operating rules |
|
|
409
|
+
| [SECURITY.md](./SECURITY.md) | Security and trust model |
|
|
410
|
+
| [AI.md](./context/templates/AI.md) | Assistant profiles and operating contract |
|
|
411
|
+
| [PACKAGE.md](./PACKAGE.md) | Package contents and dependency details |
|
|
412
|
+
|
|
413
|
+
## Project direction
|
|
414
|
+
|
|
415
|
+
Dotmem is developed as independent memory and continuity infrastructure.
|
|
416
|
+
|
|
417
|
+
Its direction includes reliable cross-session continuity, portable memory, stronger evidence and verification workflows, transparent memory inspection, efficient context projection, and durable lifecycle management.
|
|
418
|
+
|
|
419
|
+
These objectives do not imply that every capability is already implemented.
|
|
420
|
+
|
|
421
|
+
## Disclaimer
|
|
422
|
+
|
|
423
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
424
|
+
|
|
425
|
+
Outputs of AI systems using Dotmem can be wrong or incomplete. Verify critical information independently, and do not store sensitive or confidential data in unencrypted memory.
|
|
426
|
+
|
|
427
|
+
## License
|
|
428
|
+
|
|
429
|
+
MIT - Copyright (c) 2026 Dario Passariello.
|
|
430
|
+
|
|
431
|
+
SPDX-License-Identifier: `MIT`
|