enigma-memory 0.1.11 → 0.1.13

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/README.md +8 -0
  2. package/apps/cli/bin/enigma.mjs +362 -10
  3. package/deploy/SIMULATION.md +152 -0
  4. package/deploy/docker-compose.local-production-simulation.yml +237 -0
  5. package/deploy/docker-compose.production.example.yml +19 -0
  6. package/deploy/kms-mock.mjs +64 -0
  7. package/deploy/nginx.local-production-simulation.conf +33 -0
  8. package/deploy/siem-mock.mjs +50 -0
  9. package/docs/benchmark-attestation-network.md +488 -0
  10. package/docs/benchmark-reproducibility.md +19 -2
  11. package/docs/blockchain-only-mechanisms.md +388 -0
  12. package/docs/client-connectors.md +512 -0
  13. package/docs/demo-proof-network.md +275 -0
  14. package/docs/developer-ecosystem.md +47 -4
  15. package/docs/developer-proof-quickstart.md +325 -0
  16. package/docs/enigma-memory-ready-conformance.md +376 -0
  17. package/docs/enterprise-proof-control-plane.md +365 -0
  18. package/docs/install-anywhere.md +517 -0
  19. package/docs/market-category-narrative.md +398 -0
  20. package/docs/memory-drive-health-model.md +649 -0
  21. package/docs/memory-drive-strategy.md +458 -0
  22. package/docs/memory-passport-standard.md +445 -0
  23. package/docs/novelty-invention-candidates.md +161 -0
  24. package/docs/privacy-ledger-model.md +229 -0
  25. package/docs/proof-network-build-notes.md +240 -0
  26. package/docs/proof-network-claim-boundaries.md +318 -0
  27. package/docs/proof-network-dashboard-spec.md +773 -0
  28. package/docs/proof-network-glossary.md +27 -0
  29. package/docs/proof-network-launch-plan.md +421 -0
  30. package/docs/proof-network-operator-protocol.md +432 -0
  31. package/docs/proof-network-roadmap.md +431 -0
  32. package/docs/proof-network-test-plan.md +216 -0
  33. package/docs/proof-network-threat-model.md +373 -0
  34. package/docs/proof-network.md +257 -0
  35. package/docs/sdk-api.md +132 -10
  36. package/docs/solana-devnet-acceptance.md +226 -0
  37. package/docs/solana-proof-rail.md +453 -0
  38. package/examples/ci/github-actions.yml +6 -3
  39. package/examples/proof-network-anchor.json +37 -0
  40. package/examples/proof-network-attestation.json +35 -0
  41. package/examples/proof-network-grant.json +27 -0
  42. package/examples/proof-network-packet.json +71 -0
  43. package/package.json +42 -3
  44. package/packages/mcp-server/src/index.js +1 -1
  45. package/packages/proof-network/src/index.js +570 -0
  46. package/scripts/build-hosted-api-key-lifecycle.mjs +1 -1
  47. package/scripts/build-hosted-customer-lifecycle.mjs +1 -1
  48. package/scripts/build-installer-assets.mjs +1 -1
  49. package/scripts/build-proof-network-packet.mjs +213 -0
  50. package/scripts/run-standard-memory-benchmarks.mjs +1 -1
  51. package/scripts/simulate-production-env.mjs +210 -0
  52. package/scripts/verify-registry-install.mjs +1 -0
  53. package/scripts/wait-for-backend-ready.mjs +101 -0
  54. package/specs/goal-completion-audit-v1.schema.json +1 -0
  55. package/specs/proof-network-anchor-batch-v1.schema.json +125 -0
  56. package/specs/proof-network-benchmark-attestation-v1.schema.json +103 -0
  57. package/specs/proof-network-capability-grant-v1.schema.json +132 -0
  58. package/specs/proof-network-packet-v1.schema.json +171 -0
@@ -0,0 +1,512 @@
1
+ # Client connectors
2
+
3
+ Enigma connects to assistant clients through MCP. The client starts `enigma-mcp` over stdio, and Enigma reads/writes the local vault bundle named by `ENIGMA_BUNDLE`. Start with the public test drive, then create a regular local workspace, then explicitly connect installed/config-present clients when you are ready.
4
+
5
+ Supported connector IDs:
6
+
7
+ - `claude-desktop`
8
+ - `cursor`
9
+ - `kimi-code`
10
+ - `vscode-cline`
11
+ - `roo`
12
+ - `opencode`
13
+ - `generic-mcp`
14
+
15
+ ## Public test drive first
16
+
17
+ Prove the live npm package path without credentials, hosted SaaS, provider calls, or client-config writes:
18
+
19
+ ```sh
20
+ npm install -g enigma-memory
21
+ enigma test-drive --overwrite
22
+ ```
23
+
24
+ `enigma test-drive --overwrite` writes an isolated demo under `.enigma/test-drive` by default, emits one public-safe JSON summary, and does not print raw private memory plaintext. Use `--dry-run` to preview without writing, or `--out-dir <path>` to choose another isolated demo directory. The local proof/demo is bounded to Enigma-controlled vault state, receipts, checkpoints, committed roots, exported bundle shape, and declared boundary operations; it is not hosted SaaS evidence and does not prove provider deletion or model forgetting.
25
+
26
+ ## One clear path
27
+
28
+ After the test drive, create a regular local workspace:
29
+
30
+ ```sh
31
+ npm install -g enigma-memory
32
+ enigma setup --overwrite
33
+ ```
34
+
35
+ `enigma setup --overwrite` writes local Enigma artifacts under the workspace `.enigma` path and emits deterministic, public-safe JSON without printing raw memory plaintext. It does not write Claude, Cursor, Kimi, VS Code, Roo, OpenCode, or generic MCP client configs.
36
+
37
+ To auto-detect installed or already-configured clients and show the setup connector plan without mutating client configs:
38
+
39
+ ```sh
40
+ enigma setup --client auto --overwrite
41
+ ```
42
+
43
+ `--client auto` selects clients found by connector detection and falls back to the default setup client list when none are present. The setup output lists selected clients, skipped clients, and the reason for each skip.
44
+
45
+ To explicitly write connector entries for installed/config-present clients only:
46
+
47
+ ```sh
48
+ enigma setup --connect-installed --overwrite
49
+ ```
50
+
51
+ `--connect-installed` implies auto client selection and is a client-config write flag. It skips missing client configs instead of creating every default client config. Only explicit write flags mutate client configs. Existing `enigma connect <client>` behavior and existing `enigma setup --write-connectors` behavior for explicit/default clients are unchanged.
52
+
53
+ After setup, use the same local vault from the CLI or connected clients:
54
+
55
+ ```sh
56
+ enigma remember --text-file ./memory.txt
57
+ enigma search --query "..."
58
+ enigma context --query "..." --optimize
59
+ enigma verify --export ./.enigma/export.json
60
+ enigma connect claude-desktop --dry-run
61
+ ```
62
+
63
+ Provider-native memory is non-canonical cache only in this architecture. The Enigma vault remains canonical, and Enigma receipts prove Enigma-controlled lifecycle events; they do not prove that a hosted provider deleted hidden copies or that a model forgot anything.
64
+
65
+ One-off public test drive without a global install:
66
+
67
+ ```sh
68
+ npx --yes --package enigma-memory enigma test-drive --overwrite
69
+ ```
70
+
71
+ From a source checkout, use this only for package development or source-only docs:
72
+
73
+ ```sh
74
+ cd enigma
75
+ npm install -g .
76
+ ```
77
+
78
+ ## Preview, then connect
79
+
80
+ Preview installed/config-present connector targets during setup without changing client configs:
81
+
82
+ ```sh
83
+ enigma setup --client auto --overwrite
84
+ ```
85
+
86
+ The output reports selected clients, skipped clients, and skip reasons. If no installed/config-present client is discovered, auto selection falls back to the default setup client list for planning.
87
+
88
+ Preview one client without changing it:
89
+
90
+ ```sh
91
+ enigma connect claude-desktop --dry-run
92
+ enigma connect cursor --dry-run
93
+ enigma connect kimi-code --dry-run
94
+ enigma connect vscode-cline --dry-run
95
+ enigma connect roo --dry-run
96
+ enigma connect opencode --dry-run
97
+ enigma connect generic-mcp --dry-run
98
+ ```
99
+
100
+ When you are ready to write all installed/config-present client configs discovered by setup, use the explicit setup-time write flag:
101
+
102
+ ```sh
103
+ enigma setup --connect-installed --overwrite
104
+ ```
105
+
106
+ `--connect-installed` skips missing client configs instead of creating every default client config. It is for installed/config-present clients only. Existing `enigma setup --write-connectors` behavior for explicit/default clients is unchanged.
107
+
108
+ When the single-client dry run looks right, remove `--dry-run` for the client you want:
109
+
110
+ ```sh
111
+ enigma connect claude-desktop
112
+ enigma connect cursor
113
+ enigma connect kimi-code
114
+ enigma connect vscode-cline
115
+ enigma connect roo
116
+ enigma connect opencode
117
+ enigma connect generic-mcp
118
+ ```
119
+
120
+ Disconnect one client without touching unrelated client settings:
121
+
122
+ ```sh
123
+ enigma disconnect claude-desktop
124
+ enigma disconnect cursor
125
+ enigma disconnect kimi-code
126
+ enigma disconnect vscode-cline
127
+ enigma disconnect roo
128
+ enigma disconnect opencode
129
+ enigma disconnect generic-mcp
130
+ ```
131
+
132
+ Connector writes are semantic and idempotent. Enigma preserves unrelated client settings and sibling MCP servers under `mcpServers`, writes changed JSON through a temporary file followed by `rename`, and creates a `.bak.<timestamp>` backup only when an existing config actually changes. Running the same `enigma connect ...` command against an equivalent config, even with JSON keys in a different order, reports `changed: false` and does not create or report a backup. Detection, `--client auto`, and dry runs are read-only.
133
+
134
+ ## Copy-paste MCP snippets
135
+
136
+ Use an absolute bundle path. The MCP process inherits client environment in some apps and not in others; setting `ENIGMA_BUNDLE` directly in the entry is the portable path. The command defaults to `enigma-mcp`; if a GUI app cannot find shell-installed binaries, render an absolute command with `--mcp-command` (alias: `--command`).
137
+
138
+ Claude Desktop:
139
+
140
+ ```json
141
+ {
142
+ "mcpServers": {
143
+ "enigma": {
144
+ "command": "enigma-mcp",
145
+ "args": [],
146
+ "env": {
147
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
148
+ }
149
+ }
150
+ }
151
+ }
152
+ ```
153
+
154
+ Cursor:
155
+
156
+ ```json
157
+ {
158
+ "mcpServers": {
159
+ "enigma": {
160
+ "command": "enigma-mcp",
161
+ "args": [],
162
+ "env": {
163
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
164
+ }
165
+ }
166
+ }
167
+ }
168
+ ```
169
+
170
+ Kimi Code:
171
+
172
+ ```json
173
+ {
174
+ "mcpServers": {
175
+ "enigma": {
176
+ "command": "enigma-mcp",
177
+ "args": [],
178
+ "env": {
179
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
180
+ }
181
+ }
182
+ }
183
+ }
184
+ ```
185
+
186
+ Generic MCP:
187
+
188
+ ```json
189
+ {
190
+ "mcpServers": {
191
+ "enigma": {
192
+ "command": "enigma-mcp",
193
+ "args": [],
194
+ "env": {
195
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
196
+ }
197
+ }
198
+ }
199
+ }
200
+ ```
201
+
202
+ ## Claude Desktop
203
+
204
+ Connector ID: `claude-desktop`
205
+
206
+ Default config paths:
207
+
208
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
209
+ - macOS: `$HOME/Library/Application Support/Claude/claude_desktop_config.json`
210
+ - Linux: `$HOME/.config/Claude/claude_desktop_config.json`
211
+
212
+ Manual entry:
213
+
214
+ ```json
215
+ {
216
+ "mcpServers": {
217
+ "enigma": {
218
+ "command": "enigma-mcp",
219
+ "args": [],
220
+ "env": {
221
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
222
+ }
223
+ }
224
+ }
225
+ }
226
+ ```
227
+
228
+ CLI:
229
+
230
+ ```sh
231
+ enigma connect claude-desktop --dry-run
232
+ enigma connect claude-desktop
233
+ ```
234
+
235
+ Restart Claude Desktop after changing the config.
236
+
237
+ ## Cursor
238
+
239
+ Connector ID: `cursor`
240
+
241
+ Default config paths:
242
+
243
+ - Windows: `%USERPROFILE%\.cursor\mcp.json`
244
+ - macOS: `$HOME/.cursor/mcp.json`
245
+ - Linux: `$HOME/.cursor/mcp.json`
246
+
247
+ Manual entry:
248
+
249
+ ```json
250
+ {
251
+ "mcpServers": {
252
+ "enigma": {
253
+ "command": "enigma-mcp",
254
+ "args": [],
255
+ "env": {
256
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
257
+ }
258
+ }
259
+ }
260
+ }
261
+ ```
262
+
263
+ CLI:
264
+
265
+ ```sh
266
+ enigma connect cursor --dry-run
267
+ enigma connect cursor
268
+ ```
269
+
270
+ Restart Cursor or reload the window after changing the config.
271
+
272
+ ## Kimi Code
273
+
274
+ Connector ID: `kimi-code`
275
+
276
+ Default config paths:
277
+
278
+ - Windows: `%APPDATA%\Kimi Code\mcp.json`
279
+ - macOS: `$HOME/Library/Application Support/Kimi Code/mcp.json`
280
+ - Linux: `$HOME/.config/kimi-code/mcp.json`
281
+
282
+ Manual entry:
283
+
284
+ ```json
285
+ {
286
+ "mcpServers": {
287
+ "enigma": {
288
+ "command": "enigma-mcp",
289
+ "args": [],
290
+ "env": {
291
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
292
+ }
293
+ }
294
+ }
295
+ }
296
+ ```
297
+
298
+ CLI:
299
+
300
+ ```sh
301
+ enigma connect kimi-code --dry-run
302
+ enigma connect kimi-code
303
+ ```
304
+
305
+ Kimi Code is usually launched from the operating-system GUI, so it may not inherit the same `PATH` as your terminal. If Kimi Code does not find `enigma-mcp`, pass an absolute executable path:
306
+
307
+ ```sh
308
+ enigma connect kimi-code --dry-run --mcp-command "/absolute/path/to/enigma-mcp"
309
+ enigma connect kimi-code --mcp-command "/absolute/path/to/enigma-mcp"
310
+ ```
311
+
312
+ The rendered Kimi Code config still uses the same local bundle contract:
313
+
314
+ ```json
315
+ {
316
+ "mcpServers": {
317
+ "enigma": {
318
+ "command": "/absolute/path/to/enigma-mcp",
319
+ "args": [],
320
+ "env": {
321
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
322
+ }
323
+ }
324
+ }
325
+ }
326
+ ```
327
+
328
+ Restart Kimi Code after changing the config.
329
+
330
+ ## VS Code / Cline
331
+
332
+ Connector ID: `vscode-cline`
333
+
334
+ Default config paths:
335
+
336
+ - Windows: `%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json`
337
+ - macOS: `$HOME/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
338
+ - Linux: `$HOME/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
339
+
340
+ Manual entry:
341
+
342
+ ```json
343
+ {
344
+ "mcpServers": {
345
+ "enigma": {
346
+ "command": "enigma-mcp",
347
+ "args": [],
348
+ "env": {
349
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
350
+ }
351
+ }
352
+ }
353
+ }
354
+ ```
355
+
356
+ CLI:
357
+
358
+ ```sh
359
+ enigma connect vscode-cline --dry-run
360
+ enigma connect vscode-cline
361
+ ```
362
+
363
+ Reload VS Code after changing the config.
364
+
365
+ ## Roo Code
366
+
367
+ Connector ID: `roo`
368
+
369
+ Default config paths:
370
+
371
+ - Windows: `%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\mcp_settings.json`
372
+ - macOS: `$HOME/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json`
373
+ - Linux: `$HOME/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json`
374
+
375
+ Manual entry:
376
+
377
+ ```json
378
+ {
379
+ "mcpServers": {
380
+ "enigma": {
381
+ "command": "enigma-mcp",
382
+ "args": [],
383
+ "env": {
384
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
385
+ }
386
+ }
387
+ }
388
+ }
389
+ ```
390
+
391
+ CLI:
392
+
393
+ ```sh
394
+ enigma connect roo --dry-run
395
+ enigma connect roo
396
+ ```
397
+
398
+ Reload VS Code after changing the config.
399
+
400
+ ## OpenCode
401
+
402
+ Connector ID: `opencode`
403
+
404
+ Default config paths:
405
+
406
+ - Windows: `%APPDATA%\opencode\opencode.json`
407
+ - macOS: `$HOME/Library/Application Support/opencode/opencode.json`
408
+ - Linux: `$HOME/.config/opencode/opencode.json`
409
+
410
+ Manual entry:
411
+
412
+ ```json
413
+ {
414
+ "mcpServers": {
415
+ "enigma": {
416
+ "command": "enigma-mcp",
417
+ "args": [],
418
+ "env": {
419
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
420
+ }
421
+ }
422
+ }
423
+ }
424
+ ```
425
+
426
+ CLI:
427
+
428
+ ```sh
429
+ enigma connect opencode --dry-run
430
+ enigma connect opencode
431
+ ```
432
+
433
+ Restart OpenCode after changing the config.
434
+
435
+ ## Generic MCP client
436
+
437
+ Connector ID: `generic-mcp`
438
+
439
+ Default config paths:
440
+
441
+ - Windows: `%APPDATA%\Enigma\mcp.json`
442
+ - macOS: `$HOME/Library/Application Support/Enigma/mcp.json`
443
+ - Linux: `$HOME/.config/enigma/mcp.json`
444
+
445
+ Manual entry:
446
+
447
+ ```json
448
+ {
449
+ "mcpServers": {
450
+ "enigma": {
451
+ "command": "enigma-mcp",
452
+ "args": [],
453
+ "env": {
454
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
455
+ }
456
+ }
457
+ }
458
+ }
459
+ ```
460
+
461
+ CLI:
462
+
463
+ ```sh
464
+ enigma connect generic-mcp --dry-run
465
+ enigma connect generic-mcp
466
+ ```
467
+
468
+ ## Verify MCP by hand
469
+
470
+ ```sh
471
+ printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"manual","version":"0"}}}\n{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}\n' | ENIGMA_BUNDLE="$HOME/.enigma/bundle.json" enigma-mcp
472
+ ```
473
+
474
+ Expected behavior: the response lists Enigma tools (`enigma_init`, `enigma_remember`, `enigma_search`, `enigma_context_pack`, `enigma_delete`, `enigma_verify_receipts`), the `enigma://passport/summary` resource, and the `enigma_standard_memory_prompt` prompt. This only verifies the local MCP process and bundle path. It does not prove that a hosted provider deleted memory or forgot anything.
475
+
476
+ ## Import/export commands for migrations
477
+
478
+ Import a source export into an Enigma report:
479
+
480
+ ```sh
481
+ enigma import chatgpt --file ./chatgpt-export.json --out ./enigma-import-report.json
482
+ enigma import claude --file ./claude-memory.json --out ./enigma-import-report.json
483
+ enigma import mem0 --file ./mem0-export.json --out ./enigma-import-report.json
484
+ enigma import letta --file ./letta-agent.json --out ./enigma-import-report.json
485
+ enigma import langgraph --file ./langgraph-store.json --out ./enigma-import-report.json
486
+ enigma import graphiti --file ./zep-graphiti-export.json --out ./enigma-import-report.json
487
+ ```
488
+
489
+ Export/import an Enigma capsule:
490
+
491
+ ```sh
492
+ enigma capsule export --file ./enigma-import-report.json --out ./enigma-capsule.json
493
+ enigma capsule import --file ./enigma-capsule.json --bundle "$HOME/.enigma/bundle.json"
494
+ ```
495
+
496
+ Imported source memories carry limitations and completeness status. They become Enigma-canonical only after writing through the local vault and receiving Enigma receipts.
497
+
498
+ ## Honesty boundaries for client setup
499
+
500
+ Enigma client connectors can say:
501
+
502
+ - The client is configured to start `enigma-mcp`.
503
+ - The Enigma MCP server can read/write the configured local bundle.
504
+ - Enigma receipts can verify Enigma-controlled lifecycle events.
505
+ - Provider-native memory is cache only in this architecture.
506
+
507
+ Enigma client connectors cannot say:
508
+
509
+ - Claude, Cursor, Kimi, VS Code extensions, Roo, OpenCode, ChatGPT, or any hosted provider deleted hidden copies.
510
+ - A model forgot a memory.
511
+ - A provider will never store prompt/context text after a user approves insertion.
512
+ - Imported provider exports are complete unless the source explicitly proves completeness.