enigma-memory 0.1.0 → 0.1.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.
package/README.md CHANGED
@@ -1,379 +1,367 @@
1
- # Enigma
2
-
3
- Enigma is a provider-agnostic AI memory custody and proof layer. It gives a user or enterprise a local canonical memory vault, emits offline-verifiable receipts for Enigma-controlled lifecycle events, and connects that vault to assistants through CLI, MCP, browser, desktop, relay, gateway, and enterprise policy surfaces.
4
-
5
- Current status:
6
-
7
- - Local production foundation: CLI, verifier, vault, passport, boundary, MCP server, connector, importer, relay, gateway, enterprise, mesh, browser-extension, and desktop scaffold code exist in this repository.
8
- - Installable package scaffolding: package bins and module entry points are present. Until `enigma-memory` is published from the authorized npm account, use the repository path install below.
9
- - Source-only artifacts: `docs/`, `Dockerfile`, and `docker-compose.yml` live in the source checkout. The package README and CLI help are the package-included install guides; the full runbooks require the repository or hosted docs.
10
- - Hosted cloud is not included by default. Hosted relay/gateway/cloud operation requires deployment credentials, a domain, TLS, production durable storage, KMS/secrets, monitoring, backups, operator policy, and a completed operator acceptance packet. Local relay/gateway `--state-file` demo state does not satisfy those hosted/BYOC requirements.
11
- - Cloudflare API/domain/hosting automation is documented but safe-by-default: [`docs/cloudflare-token-and-domain-runbook.md`](docs/cloudflare-token-and-domain-runbook.md) gives the token recipe, Registrar prerequisites, local token storage rule, search/check flow, explicit domain+price purchase gate, Pages deploy gate, custom-domain steps, and post-setup token rotation.
12
- - Overnight execution plan: [`docs/overnight-build-master-plan.md`](docs/overnight-build-master-plan.md) defines the GPT-5.5/Kimi overnight build cadence, acceptance gates, exact non-claims, and hosted/BYOC blockers.
13
- - Security and production review artifacts: [`SECURITY.md`](SECURITY.md) defines reporting, safe harbor, disclosure, incident, secret-handling, plaintext-minimization, and proof-boundary policy; [`docs/security-threat-model.md`](docs/security-threat-model.md) maps assets, trust boundaries, controls, residual risks, and verification evidence; [`docs/operator-acceptance-packet.md`](docs/operator-acceptance-packet.md) is required before hosted/BYOC can be called live.
14
- - Public API reference: [`docs/public-api-reference.md`](docs/public-api-reference.md) lists package exports, CLI bins, MCP tools/resources/prompts, relay/gateway endpoints, importer/capsule APIs, connector profiles, verifier outputs, schemas, and local-vs-hosted boundaries.
15
- - Local release provenance/SBOM: [`docs/release-provenance-and-sbom.md`](docs/release-provenance-and-sbom.md) documents `npm run provenance:local -- --out ./.enigma/release-provenance.json` as unsigned local package-surface inventory and SHA-256 evidence only, not signed attestation, registry provenance, source-control proof, SLSA/compliance, Docker image, or hosted/cloud deployment evidence.
16
- - Reviewer packet: [`docs/reviewer-packet.md`](docs/reviewer-packet.md) documents `npm run review:packet -- --out ./.enigma-review-packet --public-site <path-to-_public_site>` as a local hand-review bundle for package, release-audit, provenance, and optional generated public-site evidence; it is not npm publication, live Cloudflare deployment, Docker runtime proof, hosted/BYOC readiness, legal approval, signed provenance, or compliance evidence.
17
-
18
- Enigma does not claim that a closed provider deleted internal data, that model weights forgot, or that provider-native memory disappeared. It proves facts about Enigma-controlled vault state, receipts, checkpoints, and declared boundary operations.
19
-
20
- ## Install and run locally
21
-
22
- Prerequisites:
23
-
24
- - Node.js `>=24`
25
- - Git for the source-checkout path
26
- - No database, package registry account, provider credential, or cloud credential for the local no-network path
27
-
28
- Fastest path from GitHub:
29
-
30
- ```sh
31
- git clone https://github.com/Enigma-Memory/enigma-memory.git
32
- cd enigma-memory
33
- npm run install:local -- --execute --init-vault --bundle ./.enigma/bundle.json
34
- enigma doctor
35
- enigma-relay demo
36
- enigma-gateway demo
37
- ```
38
-
39
- `install:local` is dry-run unless `--execute` is present. The command above installs the checked-out package globally, creates a local vault bundle, and never needs Cloudflare, OpenAI, Anthropic, npm publish credentials, a database, or hosted infrastructure.
40
-
41
- If the repository is already checked out:
42
-
43
- ```sh
44
- npm install -g .
45
- enigma --help
46
- enigma-verify --help
47
- enigma-relay demo
48
- enigma-gateway demo
49
- ```
50
-
51
- Repeat the local package/demo release evidence from a source checkout:
52
-
53
- ```sh
54
- npm run release:audit
55
- ```
56
-
57
- The audit prints an `enigma.release_audit.v1` JSON summary and supports `-- --out <file>` for handoff/goal-audit ingestion. It fails nonzero if any required local gate fails. It runs `npm run check`, `npm test`, `npm pack --dry-run`, direct-bin help/demo smokes, and an MCP stdio `initialize`/`tools`/`resources`/`prompts` smoke. It does not require Docker, cloud credentials, npm publish credentials, or a live website.
58
-
59
- Generate local provenance/SBOM checksum evidence from the source checkout:
60
-
61
- ```sh
62
- npm run provenance:local -- --out ./.enigma/release-provenance.json
63
- ```
64
-
65
- The provenance/SBOM command writes package-surface file inventory and SHA-256 values for reviewer comparison, then prints `{ ok, path, file_count, root_hash }`; without `--out`, it prints the full `enigma.release_provenance.v1` JSON to stdout. It complements `npm pack --dry-run` by giving checksums for inventoried local package-surface files; it does not sign the release, publish to a registry, prove a git commit, claim SLSA/compliance status, prove a Docker image digest, or prove hosted/cloud deployment.
66
-
67
- When the public package is available:
68
-
69
- ```sh
70
- npm install -g enigma-memory
71
- npx --yes --package enigma-memory enigma --help
72
- npx --yes --package enigma-memory enigma doctor
73
- ```
74
-
75
- Create a no-network local vault, write one local memory from a file, compile a context pack, export a proof bundle, and verify it. Use a tenant-approved smoke file; do not expand private memory into shell argv.
76
-
77
- POSIX shell:
78
-
79
- ```sh
80
- mkdir -p .enigma
81
- ENIGMA_DEMO_MEMORY_FILE=/absolute/path/to/tenant-approved-smoke-memory.txt
82
- test -f "$ENIGMA_DEMO_MEMORY_FILE"
83
- enigma init --bundle ./.enigma/bundle.json --subject local-user --display-name "Local user"
84
- enigma remember --bundle ./.enigma/bundle.json --text-file "$ENIGMA_DEMO_MEMORY_FILE" --purpose user_memory --tags local
85
- enigma context --bundle ./.enigma/bundle.json --query "local context" --purpose local_answer --out ./.enigma/context-pack.json
86
- enigma export --bundle ./.enigma/bundle.json --out ./.enigma/export.json
87
- enigma verify --bundle ./.enigma/export.json
88
- ```
89
-
90
- Windows PowerShell:
91
-
92
- ```powershell
93
- New-Item -ItemType Directory -Force .enigma | Out-Null
94
- $env:ENIGMA_DEMO_MEMORY_FILE = "C:\path\to\tenant-approved-smoke-memory.txt"
95
- if (-not (Test-Path -LiteralPath $env:ENIGMA_DEMO_MEMORY_FILE)) { throw "Missing ENIGMA_DEMO_MEMORY_FILE" }
96
- enigma init --bundle .\.enigma\bundle.json --subject local-user --display-name "Local user"
97
- enigma remember --bundle .\.enigma\bundle.json --text-file $env:ENIGMA_DEMO_MEMORY_FILE --purpose user_memory --tags local
98
- enigma context --bundle .\.enigma\bundle.json --query "local context" --purpose local_answer --out .\.enigma\context-pack.json
99
- enigma export --bundle .\.enigma\bundle.json --out .\.enigma\export.json
100
- enigma verify --bundle .\.enigma\export.json
101
- ```
102
-
103
- The bundle is local. Exported proof artifacts contain encrypted/committed vault state and receipt metadata; do not paste raw memory plaintext into relay records, witness checkpoints, SIEM events, public proof artifacts, or shell command lines.
104
-
105
- ## MCP setup
106
-
107
- Run the Enigma MCP server over stdio:
108
-
109
- POSIX shell:
110
-
111
- ```sh
112
- ENIGMA_BUNDLE="$HOME/.enigma/bundle.json" enigma-mcp
113
- ```
114
-
115
- Windows PowerShell:
116
-
117
- ```powershell
118
- $env:ENIGMA_BUNDLE = "$HOME\.enigma\bundle.json"
119
- enigma-mcp.cmd
120
- ```
121
-
122
- Or through the CLI:
123
-
124
- ```sh
125
- ENIGMA_BUNDLE="$HOME/.enigma/bundle.json" enigma mcp serve
126
- ```
127
-
128
- Windows PowerShell CLI form:
129
-
130
- ```powershell
131
- $env:ENIGMA_BUNDLE = "$HOME\.enigma\bundle.json"
132
- enigma.cmd mcp serve
133
- ```
134
-
135
- Generic MCP client entry:
136
-
137
- ```json
138
- {
139
- "mcpServers": {
140
- "enigma": {
141
- "command": "enigma-mcp",
142
- "args": [],
143
- "env": {
144
- "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
145
- }
146
- }
147
- }
148
- }
149
- ```
150
-
151
- The MCP server exposes `enigma_init`, `enigma_remember`, `enigma_search`, `enigma_context_pack`, `enigma_delete`, and `enigma_verify_receipts`, plus an Enigma passport summary resource and a memory-use prompt. Provider-native memory should be treated as cache only; Enigma vault state remains canonical.
152
-
153
- ## Connect clients
154
-
155
- Supported connector profiles are:
156
-
157
- - `claude-desktop`
158
- - `cursor`
159
- - `kimi-code`
160
- - `vscode-cline`
161
- - `roo`
162
- - `opencode`
163
- - `generic-mcp`
164
-
165
- Use the config in `docs/client-connectors.md` from a source checkout for Claude Desktop, Cursor, Kimi Code, VS Code/Cline, Roo Code, OpenCode, or any MCP-compatible client. The generated entry defaults to command `enigma-mcp` and sets `ENIGMA_BUNDLE` to the local vault bundle.
166
-
167
- CLI connector commands:
168
-
169
- ```sh
170
- enigma doctor
171
- enigma install --bundle "$HOME/.enigma/bundle.json"
172
- enigma connect claude-desktop --bundle "$HOME/.enigma/bundle.json"
173
- enigma connect kimi-code --bundle "$HOME/.enigma/bundle.json" --mcp-command "/absolute/path/to/enigma-mcp"
174
- enigma disconnect claude-desktop
175
- ```
176
-
177
- Use `--mcp-command` (alias `--command`) when a GUI app cannot find shell-installed binaries or needs a `.cmd` path on Windows.
178
-
179
- ## Browser extension and native host
180
-
181
- The browser extension is an unpacked Manifest V3 scaffold in:
182
-
183
- ```text
184
- apps/browser-extension
185
- ```
186
-
187
- The local native messaging host install assets are in:
188
-
189
- ```text
190
- apps/native-host
191
- ```
192
-
193
- Register host name `com.enigma.native_host` by generating a browser-specific manifest:
194
-
195
- ```sh
196
- enigma native-host manifest --browser chrome --host-path "/absolute/path/to/enigma-native-host" --extension-id "REPLACE_WITH_EXTENSION_ID" --out ./com.enigma.native_host.json
197
- ```
198
-
199
- Use `--browser edge` or `--browser firefox` for those browsers. Find unpacked Chrome IDs at `chrome://extensions` > Developer mode > Enigma > Details, Edge IDs at `edge://extensions` > Developer mode > Enigma > Details, and Firefox IDs at `about:debugging#/runtime/this-firefox` or from a stable `browser_specific_settings.gecko.id`/signed add-on ID. The host path must be absolute and point to `enigma-native-host` or a wrapper that sets `ENIGMA_BUNDLE` before launching it. Without `--out`, the generator prints manifest JSON to stdout; with `--out`, it writes the file and reports `{ ok, path }`. Copy the resulting `com.enigma.native_host.json` into the browser/OS native-host location, or create the documented Windows registry key yourself. Manual templates remain in `apps/native-host/manifests/`. Exact copy and registry commands are in [`apps/native-host/README.md`](apps/native-host/README.md).
200
-
201
- The native host is inside the local trust boundary: protect the manifest, wrapper, executable, and `ENIGMA_BUNDLE` path from local modification. The extension does not use browser sync storage (`chrome.storage.sync`) at all and requires an explicit user click before inserting Enigma context into ChatGPT, Claude, Kimi, Perplexity, or another supported provider page. Provider-native memory remains cache only; Enigma receipts do not prove provider deletion or model forgetting. See [`apps/browser-extension/README.md`](apps/browser-extension/README.md), [`apps/native-host/README.md`](apps/native-host/README.md), and [`docs/install-anywhere.md`](docs/install-anywhere.md) in the source checkout.
202
-
203
- ## Desktop scaffold
204
-
205
- The desktop surface is a static local scaffold in:
206
-
207
- ```text
208
- apps/desktop/src/index.html
209
- ```
210
-
211
- Open it directly in a browser or package it inside a desktop shell. It models vault, MCP, clients, import/export, verifier, deletion, mesh, and enterprise screens. Desktop UI state is operational evidence only; cryptographic proof still comes from Enigma receipts and verifier output.
212
-
213
- ## Relay, gateway, Docker, and enterprise modes
214
-
215
- Local relay and gateway servers are Node HTTP modules:
216
-
217
- - `apps/relay/src/server.mjs` stores opaque encrypted relay records, signs witness checkpoints, and handles pairing. It rejects plaintext-looking memory fields.
218
- - `apps/gateway/src/server.mjs` evaluates enterprise policy, emits signed decisions, and exports plaintext-minimized SIEM events. It does not call model providers.
219
-
220
- Direct bins are available after a source or package install. Add `--state-file <path>` when a local demo should survive a restart:
221
-
222
- ```sh
223
- mkdir -p .enigma/state
224
- enigma-relay demo
225
- enigma-relay serve --host 127.0.0.1 --port 8787 --state-file ./.enigma/state/relay-state.json
226
- enigma-gateway demo
227
- enigma-gateway serve --host 127.0.0.1 --port 8797 --state-file ./.enigma/state/gateway-state.json
228
- ```
229
-
230
- The same behavior is also available through the main CLI:
231
-
232
- ```sh
233
- enigma relay demo
234
- enigma relay serve --host 127.0.0.1 --port 8787 --state-file ./.enigma/state/relay-state.json
235
- enigma gateway demo
236
- enigma gateway serve --host 127.0.0.1 --port 8797 --state-file ./.enigma/state/gateway-state.json
237
- ```
238
-
239
- `--state-file` is local demo durability, not a production database. Relay state files may contain relay node/trust metadata, local demo signing material, hash-only or opaque relay records, witness checkpoints, completed pairings, and authorization mode; they must not contain raw memory plaintext, prompts, transcripts, decrypted capsule contents, raw request bodies, or pending challenges. Gateway state business data is limited to active policy/minimized policy metadata, policy hash, and plaintext-minimized SIEM/decision evidence, but the snapshot may also include local demo identity and Ed25519 signing key material needed to verify decisions; it must not contain raw memory, prompts, completions, transcripts, provider responses, embeddings, tenant secrets, KMS material, or provider hidden-state claims. Unknown, malformed, or plaintext-looking state fails closed instead of silently resetting.
240
-
241
- Keep state files outside source control with owner-only file permissions. Backups are useful for local demo restore only; hosted and BYOC deployments still need real durable storage, KMS/secrets, monitored backups, restore rehearsal, and an accepted operator packet.
242
-
243
- For source-checkout Docker demos:
244
-
245
- ```sh
246
- cd enigma
247
- docker compose up --build relay gateway
248
- ```
249
-
250
- See `docs/install-anywhere.md` and `docs/deployment-runbook.md` in the source checkout for concrete local server, Docker, hosted, and BYOC steps.
251
-
252
- Enterprise modes:
253
-
254
- - Hosted: Enigma operator runs relay/gateway for a tenant. Requires deployment credentials, TLS, production durable storage, KMS/secrets, monitoring, backups, incident response, and tenant policy.
255
- - BYOC: customer runs relay/gateway in its own cloud or network. Customer controls KMS, network policy, logs, data residency, backups, and deployment credentials.
256
-
257
- Both modes keep provider-native memory as cache only. Enigma can prove its own committed state and policy decisions; it cannot prove that a third-party provider erased hidden state or changed model weights.
258
-
259
- ## Import and migration
260
-
261
- Importer APIs normalize exported memory/context from ChatGPT, Claude, Mem0, Letta, LangGraph, Zep/Graphiti, and Enigma capsules into candidates with source references, limitations, confidence, and completeness flags. Imports preserve source caveats. A source export becomes canonical only after the candidate is written through an Enigma vault and receives Enigma receipts.
262
-
263
- Migration CLI examples:
264
-
265
- ```sh
266
- enigma import chatgpt --file ./chatgpt-export.json --out ./enigma-import-report.json
267
- enigma capsule export --file ./enigma-import-report.json --out ./enigma-capsule.json
268
- enigma capsule import --file ./enigma-capsule.json --bundle "$HOME/.enigma/bundle.json"
269
- ```
270
-
271
- ## Verification commands
272
-
273
- Repeatable package/demo audit:
274
-
275
- ```sh
276
- npm run release:audit
277
- ```
278
-
279
- This is the one-command local release evidence path; add `-- --out <file>` when another Enigma production command needs to consume the audit JSON. Docker runtime, hosted cloud, npm publication, and live website review remain external/operator-gated checks rather than prerequisites for `release:audit`.
280
-
281
- Local provenance/SBOM checksum evidence:
282
-
283
- ```sh
284
- npm run provenance:local -- --out ./.enigma/release-provenance.json
285
- ```
286
-
287
- Use [`docs/release-provenance-and-sbom.md`](docs/release-provenance-and-sbom.md) to interpret the generated JSON. Reviewers can compare recorded `(path, sha256)` entries with freshly computed SHA-256 values or with another provenance file. Run `npm pack --dry-run` separately when reviewing package tarball contents, and build the public site artifact before rerunning provenance when the optional `public_site_manifest` checksum is in scope. The provenance file is local unsigned checksum evidence only.
288
-
289
- Hand-review packet:
290
-
291
- ```sh
292
- python scripts/build_public_site.py
293
- npm run review:packet -- --out ./.enigma-review-packet --public-site ./_public_site
294
- ```
295
-
296
- Use [`docs/reviewer-packet.md`](docs/reviewer-packet.md) to inspect `REVIEW_PACKET_MANIFEST.json`, `evidence/release-audit.json`, `evidence/local-provenance.json`, `package/npm-pack-dry-run.json`, copied `docs/`, optional `site/`, and the recorded SHA-256 values. Pass `--public-site` only for an already-built generated public-site artifact such as `./_public_site`; the packet copies local evidence for review and does not prove npm publication, live Cloudflare deployment, Docker image/runtime behavior, hosted/BYOC readiness, legal approval, signed provenance, or compliance status.
297
-
298
- Local smoke path:
299
-
300
- ```sh
301
- ENIGMA_DEMO_MEMORY_FILE=/absolute/path/to/tenant-approved-smoke-memory.txt
302
- test -f "$ENIGMA_DEMO_MEMORY_FILE"
303
- enigma init --bundle ./.enigma/bundle.json
304
- enigma remember --bundle ./.enigma/bundle.json --text-file "$ENIGMA_DEMO_MEMORY_FILE" --purpose local_test
305
- enigma export --bundle ./.enigma/bundle.json --out ./.enigma/export.json
306
- enigma verify --bundle ./.enigma/export.json
307
- enigma boundary run --scenario committed_crossing
308
- ```
309
-
310
- MCP JSON-RPC handshake:
311
-
312
- ```sh
313
- 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="$PWD/.enigma/bundle.json" enigma-mcp
314
- ```
315
-
316
- Connector demo:
317
-
318
- ```sh
319
- node --input-type=module -e "import { runConnectorDemo } from './packages/connectors/src/index.js'; console.log(JSON.stringify(runConnectorDemo({ clientId: 'generic-mcp' }), null, 2));"
320
- ```
321
-
322
- Importer demo:
323
-
324
- ```sh
325
- node --input-type=module -e "import { runImporterDemo } from './packages/importers/src/index.js'; console.log(JSON.stringify(runImporterDemo(), null, 2));"
326
- ```
327
-
328
- Relay and gateway demos:
329
-
330
- ```sh
331
- enigma-relay demo
332
- enigma-gateway demo
333
- ```
334
-
335
- Relay and gateway servers:
336
-
337
- ```sh
338
- enigma-relay serve --host 127.0.0.1 --port 8787
339
- enigma-gateway serve --host 127.0.0.1 --port 8797
340
- ```
341
-
342
- ## Claim boundary
343
-
344
- Enigma can honestly claim:
345
-
346
- - A local Enigma vault contains or no longer serves a committed memory address.
347
- - A memory create, retrieval, context-pack, update, or tombstone event produced a receipt that verifies offline.
348
- - A boundary harness classified an observed boundary event as committed, blocked, out-of-scope, or failed.
349
- - A relay stored an opaque encrypted record or signed a witness checkpoint without raw memory plaintext.
350
- - A gateway decision followed a specific Enigma enterprise policy at a specific policy hash.
351
-
352
- Enigma cannot honestly claim:
353
-
354
- - A closed provider physically deleted all internal copies.
355
- - A model forgot training, fine-tuning, cache, telemetry, or hidden personalization state.
356
- - Enigma caused semantic forgetting across model outputs, hidden personalization, embeddings, summaries, caches, or third-party systems outside Enigma state.
357
- - Imported provider memories are complete unless the source export explicitly proves completeness.
358
- - A signed memory statement is true in the real world; receipts prove custody and lifecycle, not factual correctness.
359
- - Token ROI, profit, equity, revenue share, investment return, or token price expectation.
360
- - Tamper-proof hardware or raw compute superiority.
361
- - Benchmark leadership without measured repository evidence.
362
- - Hosted cloud or customer BYOC deployment is live without the required credentials, domain/TLS, production durable storage, KMS/secrets, monitoring, backups, incident ownership, and SIEM/log routing; local `--state-file` demo state is not hosted/BYOC readiness.
363
- - That a local review packet or local provenance/SBOM output is signed provenance, registry attestation, git/source-control evidence, SLSA level, compliance certification, Docker image digest/runtime evidence, npm publication, hosted/BYOC readiness, or hosted/cloud deployment proof.
364
-
365
- Read next:
366
-
367
- - [`docs/overnight-build-master-plan.md`](docs/overnight-build-master-plan.md)
368
- - [`docs/release-evidence-2026-06-23.md`](docs/release-evidence-2026-06-23.md)
369
- - [`docs/release-provenance-and-sbom.md`](docs/release-provenance-and-sbom.md)
370
- - [`docs/reviewer-packet.md`](docs/reviewer-packet.md)
371
- - [`SECURITY.md`](SECURITY.md)
372
- - [`docs/security-threat-model.md`](docs/security-threat-model.md)
373
- - [`docs/operator-acceptance-packet.md`](docs/operator-acceptance-packet.md)
374
- - [`docs/cloudflare-token-and-domain-runbook.md`](docs/cloudflare-token-and-domain-runbook.md)
375
- - [`docs/public-api-reference.md`](docs/public-api-reference.md)
376
- - `docs/install-anywhere.md`
377
- - `docs/client-connectors.md`
378
- - `docs/deployment-runbook.md`
379
- - `docs/production-release-checklist.md`
1
+ # Enigma
2
+
3
+ Enigma is a provider-agnostic AI memory custody and proof layer. It gives a user or enterprise a local canonical memory vault, emits offline-verifiable receipts for Enigma-controlled lifecycle events, and connects that vault to assistants through CLI, MCP, browser, desktop, relay, gateway, and enterprise policy surfaces.
4
+
5
+ Current status:
6
+
7
+ - Local production foundation: CLI, verifier, vault, passport, boundary, MCP server, connector, importer, relay, gateway, enterprise, mesh, browser-extension, and desktop scaffold code exist in this repository.
8
+ - Published npm package: package bins and module entry points are available as `enigma-memory`; use the npm install path below for the simplest onboarding flow.
9
+ - Source-only artifacts: `docs/`, `Dockerfile`, and `docker-compose.yml` live in the source checkout. The package README and CLI help are the package-included install guides; the full runbooks require the repository or hosted docs.
10
+ - Hosted cloud is not included by default. Hosted relay/gateway/cloud operation requires deployment credentials, a domain, TLS, production durable storage, KMS/secrets, monitoring, backups, operator policy, and a completed operator acceptance packet. Local relay/gateway `--state-file` demo state does not satisfy those hosted/BYOC requirements.
11
+ - Cloudflare API/domain/hosting automation is documented but safe-by-default: [`docs/cloudflare-token-and-domain-runbook.md`](docs/cloudflare-token-and-domain-runbook.md) gives the token recipe, Registrar prerequisites, local token storage rule, search/check flow, explicit domain+price purchase gate, Pages deploy gate, custom-domain steps, and post-setup token rotation.
12
+ - Overnight execution plan: [`docs/overnight-build-master-plan.md`](docs/overnight-build-master-plan.md) defines the GPT-5.5/Kimi overnight build cadence, acceptance gates, exact non-claims, and hosted/BYOC blockers.
13
+ - Security and production review artifacts: [`SECURITY.md`](SECURITY.md) defines reporting, safe harbor, disclosure, incident, secret-handling, plaintext-minimization, and proof-boundary policy; [`docs/security-threat-model.md`](docs/security-threat-model.md) maps assets, trust boundaries, controls, residual risks, and verification evidence; [`docs/operator-acceptance-packet.md`](docs/operator-acceptance-packet.md) is required before hosted/BYOC can be called live.
14
+ - Public API reference: [`docs/public-api-reference.md`](docs/public-api-reference.md) lists package exports, CLI bins, MCP tools/resources/prompts, relay/gateway endpoints, importer/capsule APIs, connector profiles, verifier outputs, schemas, and local-vs-hosted boundaries.
15
+ - Local release provenance/SBOM: [`docs/release-provenance-and-sbom.md`](docs/release-provenance-and-sbom.md) documents `npm run provenance:local -- --out ./.enigma/release-provenance.json` as unsigned local package-surface inventory and SHA-256 evidence only, not signed attestation, registry provenance, source-control proof, SLSA/compliance, Docker image, or hosted/cloud deployment evidence.
16
+ - Reviewer packet: [`docs/reviewer-packet.md`](docs/reviewer-packet.md) documents `npm run review:packet -- --out ./.enigma-review-packet --public-site <path-to-_public_site>` as a local hand-review bundle for package, release-audit, provenance, and optional generated public-site evidence; it is not npm publication, live Cloudflare deployment, Docker runtime proof, hosted/BYOC readiness, legal approval, signed provenance, or compliance evidence.
17
+
18
+ Enigma does not claim that a closed provider deleted internal data, that model weights forgot, or that provider-native memory disappeared. It proves facts about Enigma-controlled vault state, receipts, checkpoints, and declared boundary operations.
19
+
20
+ ## Install and run locally
21
+
22
+ Prerequisites:
23
+
24
+ - Node.js `>=24`
25
+ - No database, package registry account, provider credential, or cloud credential for the local package quickstart
26
+ - Git only when you choose the advanced source-checkout path
27
+
28
+ ## Quickstart from npm
29
+
30
+ Use the published package first:
31
+
32
+ ```sh
33
+ npm install -g enigma-memory
34
+ enigma quickstart --bundle ./.enigma/bundle.json --overwrite
35
+ enigma doctor
36
+ enigma-relay demo
37
+ enigma-gateway demo
38
+ ```
39
+
40
+ `enigma quickstart` creates a local Enigma workspace for proof review: a local vault bundle, a context pack, an export proof bundle, and a verify report. These artifacts prove Enigma-controlled local vault state, receipts, checkpoints, and verification results only; they do not prove provider deletion, provider model forgetting, provider-native memory removal, hosted availability, or compliance certification.
41
+
42
+ One-off execution without a global install:
43
+
44
+ ```sh
45
+ npx --yes --package enigma-memory enigma quickstart --bundle ./.enigma/bundle.json --overwrite
46
+ ```
47
+
48
+ ## Advanced/source-only path
49
+
50
+ Use a source checkout only when you need source-only docs, Docker assets, browser-extension scaffolding, package development, or release scripts:
51
+
52
+ ```sh
53
+ git clone https://github.com/Enigma-Memory/enigma-memory.git
54
+ cd enigma-memory
55
+ npm run install:local -- --execute --init-vault --bundle ./.enigma/bundle.json
56
+ enigma doctor
57
+ enigma-relay demo
58
+ enigma-gateway demo
59
+ ```
60
+
61
+ `install:local` is dry-run unless `--execute` is present. The command above installs the checked-out package globally and creates a local vault bundle. It does not require Cloudflare, OpenAI, Anthropic, npm publish credentials, a database, or hosted infrastructure.
62
+
63
+ Manual alternative: create a no-network local vault, write one local memory from a file, compile a context pack, export a proof bundle, and verify it. Use a tenant-approved smoke file; do not expand private memory into shell argv.
64
+
65
+ POSIX shell:
66
+
67
+ ```sh
68
+ mkdir -p .enigma
69
+ ENIGMA_DEMO_MEMORY_FILE=/absolute/path/to/tenant-approved-smoke-memory.txt
70
+ test -f "$ENIGMA_DEMO_MEMORY_FILE"
71
+ enigma init --bundle ./.enigma/bundle.json --subject local-user --display-name "Local user"
72
+ enigma remember --bundle ./.enigma/bundle.json --text-file "$ENIGMA_DEMO_MEMORY_FILE" --purpose user_memory --tags local
73
+ enigma context --bundle ./.enigma/bundle.json --query "local context" --purpose local_answer --out ./.enigma/context-pack.json
74
+ enigma export --bundle ./.enigma/bundle.json --out ./.enigma/export.json
75
+ enigma verify --bundle ./.enigma/export.json
76
+ ```
77
+
78
+ Windows PowerShell:
79
+
80
+ ```powershell
81
+ New-Item -ItemType Directory -Force .enigma | Out-Null
82
+ $env:ENIGMA_DEMO_MEMORY_FILE = "C:\path\to\tenant-approved-smoke-memory.txt"
83
+ if (-not (Test-Path -LiteralPath $env:ENIGMA_DEMO_MEMORY_FILE)) { throw "Missing ENIGMA_DEMO_MEMORY_FILE" }
84
+ enigma init --bundle .\.enigma\bundle.json --subject local-user --display-name "Local user"
85
+ enigma remember --bundle .\.enigma\bundle.json --text-file $env:ENIGMA_DEMO_MEMORY_FILE --purpose user_memory --tags local
86
+ enigma context --bundle .\.enigma\bundle.json --query "local context" --purpose local_answer --out .\.enigma\context-pack.json
87
+ enigma export --bundle .\.enigma\bundle.json --out .\.enigma\export.json
88
+ enigma verify --bundle .\.enigma\export.json
89
+ ```
90
+
91
+ The bundle is local. Exported proof artifacts contain encrypted/committed vault state and receipt metadata; do not paste raw memory plaintext into relay records, witness checkpoints, SIEM events, public proof artifacts, or shell command lines.
92
+
93
+ ## MCP setup
94
+
95
+ Run the Enigma MCP server over stdio:
96
+
97
+ POSIX shell:
98
+
99
+ ```sh
100
+ ENIGMA_BUNDLE="$HOME/.enigma/bundle.json" enigma-mcp
101
+ ```
102
+
103
+ Windows PowerShell:
104
+
105
+ ```powershell
106
+ $env:ENIGMA_BUNDLE = "$HOME\.enigma\bundle.json"
107
+ enigma-mcp.cmd
108
+ ```
109
+
110
+ Or through the CLI:
111
+
112
+ ```sh
113
+ ENIGMA_BUNDLE="$HOME/.enigma/bundle.json" enigma mcp serve
114
+ ```
115
+
116
+ Windows PowerShell CLI form:
117
+
118
+ ```powershell
119
+ $env:ENIGMA_BUNDLE = "$HOME\.enigma\bundle.json"
120
+ enigma.cmd mcp serve
121
+ ```
122
+
123
+ Generic MCP client entry:
124
+
125
+ ```json
126
+ {
127
+ "mcpServers": {
128
+ "enigma": {
129
+ "command": "enigma-mcp",
130
+ "args": [],
131
+ "env": {
132
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
133
+ }
134
+ }
135
+ }
136
+ }
137
+ ```
138
+
139
+ The MCP server exposes `enigma_init`, `enigma_remember`, `enigma_search`, `enigma_context_pack`, `enigma_delete`, and `enigma_verify_receipts`, plus an Enigma passport summary resource and a memory-use prompt. Provider-native memory should be treated as cache only; Enigma vault state remains canonical.
140
+
141
+ ## Connect clients
142
+
143
+ Supported connector profiles are:
144
+
145
+ - `claude-desktop`
146
+ - `cursor`
147
+ - `kimi-code`
148
+ - `vscode-cline`
149
+ - `roo`
150
+ - `opencode`
151
+ - `generic-mcp`
152
+
153
+ Use the config in `docs/client-connectors.md` from a source checkout for Claude Desktop, Cursor, Kimi Code, VS Code/Cline, Roo Code, OpenCode, or any MCP-compatible client. The generated entry defaults to command `enigma-mcp` and sets `ENIGMA_BUNDLE` to the local vault bundle.
154
+
155
+ CLI connector commands:
156
+
157
+ ```sh
158
+ enigma doctor
159
+ enigma install --bundle "$HOME/.enigma/bundle.json"
160
+ enigma connect claude-desktop --bundle "$HOME/.enigma/bundle.json"
161
+ enigma connect kimi-code --bundle "$HOME/.enigma/bundle.json" --mcp-command "/absolute/path/to/enigma-mcp"
162
+ enigma disconnect claude-desktop
163
+ ```
164
+
165
+ Use `--mcp-command` (alias `--command`) when a GUI app cannot find shell-installed binaries or needs a `.cmd` path on Windows.
166
+
167
+ ## Browser extension and native host
168
+
169
+ The browser extension is an unpacked Manifest V3 scaffold in:
170
+
171
+ ```text
172
+ apps/browser-extension
173
+ ```
174
+
175
+ The local native messaging host install assets are in:
176
+
177
+ ```text
178
+ apps/native-host
179
+ ```
180
+
181
+ Register host name `com.enigma.native_host` by generating a browser-specific manifest:
182
+
183
+ ```sh
184
+ enigma native-host manifest --browser chrome --host-path "/absolute/path/to/enigma-native-host" --extension-id "REPLACE_WITH_EXTENSION_ID" --out ./com.enigma.native_host.json
185
+ ```
186
+
187
+ Use `--browser edge` or `--browser firefox` for those browsers. Find unpacked Chrome IDs at `chrome://extensions` > Developer mode > Enigma > Details, Edge IDs at `edge://extensions` > Developer mode > Enigma > Details, and Firefox IDs at `about:debugging#/runtime/this-firefox` or from a stable `browser_specific_settings.gecko.id`/signed add-on ID. The host path must be absolute and point to `enigma-native-host` or a wrapper that sets `ENIGMA_BUNDLE` before launching it. Without `--out`, the generator prints manifest JSON to stdout; with `--out`, it writes the file and reports `{ ok, path }`. Copy the resulting `com.enigma.native_host.json` into the browser/OS native-host location, or create the documented Windows registry key yourself. Manual templates remain in `apps/native-host/manifests/`. Exact copy and registry commands are in [`apps/native-host/README.md`](apps/native-host/README.md).
188
+
189
+ The native host is inside the local trust boundary: protect the manifest, wrapper, executable, and `ENIGMA_BUNDLE` path from local modification. The extension does not use browser sync storage (`chrome.storage.sync`) at all and requires an explicit user click before inserting Enigma context into ChatGPT, Claude, Kimi, Perplexity, or another supported provider page. Provider-native memory remains cache only; Enigma receipts do not prove provider deletion or model forgetting. See [`apps/browser-extension/README.md`](apps/browser-extension/README.md), [`apps/native-host/README.md`](apps/native-host/README.md), and [`docs/install-anywhere.md`](docs/install-anywhere.md) in the source checkout.
190
+
191
+ ## Desktop scaffold
192
+
193
+ The desktop surface is a static local scaffold in:
194
+
195
+ ```text
196
+ apps/desktop/src/index.html
197
+ ```
198
+
199
+ Open it directly in a browser or package it inside a desktop shell. It models vault, MCP, clients, import/export, verifier, deletion, mesh, and enterprise screens. Desktop UI state is operational evidence only; cryptographic proof still comes from Enigma receipts and verifier output.
200
+
201
+ ## Relay, gateway, Docker, and enterprise modes
202
+
203
+ Local relay and gateway servers are Node HTTP modules:
204
+
205
+ - `apps/relay/src/server.mjs` stores opaque encrypted relay records, signs witness checkpoints, and handles pairing. It rejects plaintext-looking memory fields.
206
+ - `apps/gateway/src/server.mjs` evaluates enterprise policy, emits signed decisions, and exports plaintext-minimized SIEM events. It does not call model providers.
207
+
208
+ Direct bins are available after a source or package install. Add `--state-file <path>` when a local demo should survive a restart:
209
+
210
+ ```sh
211
+ mkdir -p .enigma/state
212
+ enigma-relay demo
213
+ enigma-relay serve --host 127.0.0.1 --port 8787 --state-file ./.enigma/state/relay-state.json
214
+ enigma-gateway demo
215
+ enigma-gateway serve --host 127.0.0.1 --port 8797 --state-file ./.enigma/state/gateway-state.json
216
+ ```
217
+
218
+ The same behavior is also available through the main CLI:
219
+
220
+ ```sh
221
+ enigma relay demo
222
+ enigma relay serve --host 127.0.0.1 --port 8787 --state-file ./.enigma/state/relay-state.json
223
+ enigma gateway demo
224
+ enigma gateway serve --host 127.0.0.1 --port 8797 --state-file ./.enigma/state/gateway-state.json
225
+ ```
226
+
227
+ `--state-file` is local demo durability, not a production database. Relay state files may contain relay node/trust metadata, local demo signing material, hash-only or opaque relay records, witness checkpoints, completed pairings, and authorization mode; they must not contain raw memory plaintext, prompts, transcripts, decrypted capsule contents, raw request bodies, or pending challenges. Gateway state business data is limited to active policy/minimized policy metadata, policy hash, and plaintext-minimized SIEM/decision evidence, but the snapshot may also include local demo identity and Ed25519 signing key material needed to verify decisions; it must not contain raw memory, prompts, completions, transcripts, provider responses, embeddings, tenant secrets, KMS material, or provider hidden-state claims. Unknown, malformed, or plaintext-looking state fails closed instead of silently resetting.
228
+
229
+ Keep state files outside source control with owner-only file permissions. Backups are useful for local demo restore only; hosted and BYOC deployments still need real durable storage, KMS/secrets, monitored backups, restore rehearsal, and an accepted operator packet.
230
+
231
+ For source-checkout Docker demos:
232
+
233
+ ```sh
234
+ cd enigma
235
+ docker compose up --build relay gateway
236
+ ```
237
+
238
+ See `docs/install-anywhere.md` and `docs/deployment-runbook.md` in the source checkout for concrete local server, Docker, hosted, and BYOC steps.
239
+
240
+ Enterprise modes:
241
+
242
+ - Hosted: Enigma operator runs relay/gateway for a tenant. Requires deployment credentials, TLS, production durable storage, KMS/secrets, monitoring, backups, incident response, and tenant policy.
243
+ - BYOC: customer runs relay/gateway in its own cloud or network. Customer controls KMS, network policy, logs, data residency, backups, and deployment credentials.
244
+
245
+ Both modes keep provider-native memory as cache only. Enigma can prove its own committed state and policy decisions; it cannot prove that a third-party provider erased hidden state or changed model weights.
246
+
247
+ ## Import and migration
248
+
249
+ Importer APIs normalize exported memory/context from ChatGPT, Claude, Mem0, Letta, LangGraph, Zep/Graphiti, and Enigma capsules into candidates with source references, limitations, confidence, and completeness flags. Imports preserve source caveats. A source export becomes canonical only after the candidate is written through an Enigma vault and receives Enigma receipts.
250
+
251
+ Migration CLI examples:
252
+
253
+ ```sh
254
+ enigma import chatgpt --file ./chatgpt-export.json --out ./enigma-import-report.json
255
+ enigma capsule export --file ./enigma-import-report.json --out ./enigma-capsule.json
256
+ enigma capsule import --file ./enigma-capsule.json --bundle "$HOME/.enigma/bundle.json"
257
+ ```
258
+
259
+ ## Verification commands
260
+
261
+ Repeatable package/demo audit:
262
+
263
+ ```sh
264
+ npm run release:audit
265
+ ```
266
+
267
+ This is the one-command local release evidence path; add `-- --out <file>` when another Enigma production command needs to consume the audit JSON. Docker runtime, hosted cloud, npm publication, and live website review remain external/operator-gated checks rather than prerequisites for `release:audit`.
268
+
269
+ Local provenance/SBOM checksum evidence:
270
+
271
+ ```sh
272
+ npm run provenance:local -- --out ./.enigma/release-provenance.json
273
+ ```
274
+
275
+ Use [`docs/release-provenance-and-sbom.md`](docs/release-provenance-and-sbom.md) to interpret the generated JSON. Reviewers can compare recorded `(path, sha256)` entries with freshly computed SHA-256 values or with another provenance file. Run `npm pack --dry-run` separately when reviewing package tarball contents, and build the public site artifact before rerunning provenance when the optional `public_site_manifest` checksum is in scope. The provenance file is local unsigned checksum evidence only.
276
+
277
+ Hand-review packet:
278
+
279
+ ```sh
280
+ python scripts/build_public_site.py
281
+ npm run review:packet -- --out ./.enigma-review-packet --public-site ./_public_site
282
+ ```
283
+
284
+ Use [`docs/reviewer-packet.md`](docs/reviewer-packet.md) to inspect `REVIEW_PACKET_MANIFEST.json`, `evidence/release-audit.json`, `evidence/local-provenance.json`, `package/npm-pack-dry-run.json`, copied `docs/`, optional `site/`, and the recorded SHA-256 values. Pass `--public-site` only for an already-built generated public-site artifact such as `./_public_site`; the packet copies local evidence for review and does not prove npm publication, live Cloudflare deployment, Docker image/runtime behavior, hosted/BYOC readiness, legal approval, signed provenance, or compliance status.
285
+
286
+ Local smoke path:
287
+
288
+ ```sh
289
+ ENIGMA_DEMO_MEMORY_FILE=/absolute/path/to/tenant-approved-smoke-memory.txt
290
+ test -f "$ENIGMA_DEMO_MEMORY_FILE"
291
+ enigma init --bundle ./.enigma/bundle.json
292
+ enigma remember --bundle ./.enigma/bundle.json --text-file "$ENIGMA_DEMO_MEMORY_FILE" --purpose local_test
293
+ enigma export --bundle ./.enigma/bundle.json --out ./.enigma/export.json
294
+ enigma verify --bundle ./.enigma/export.json
295
+ enigma boundary run --scenario committed_crossing
296
+ ```
297
+
298
+ MCP JSON-RPC handshake:
299
+
300
+ ```sh
301
+ 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="$PWD/.enigma/bundle.json" enigma-mcp
302
+ ```
303
+
304
+ Connector demo:
305
+
306
+ ```sh
307
+ node --input-type=module -e "import { runConnectorDemo } from './packages/connectors/src/index.js'; console.log(JSON.stringify(runConnectorDemo({ clientId: 'generic-mcp' }), null, 2));"
308
+ ```
309
+
310
+ Importer demo:
311
+
312
+ ```sh
313
+ node --input-type=module -e "import { runImporterDemo } from './packages/importers/src/index.js'; console.log(JSON.stringify(runImporterDemo(), null, 2));"
314
+ ```
315
+
316
+ Relay and gateway demos:
317
+
318
+ ```sh
319
+ enigma-relay demo
320
+ enigma-gateway demo
321
+ ```
322
+
323
+ Relay and gateway servers:
324
+
325
+ ```sh
326
+ enigma-relay serve --host 127.0.0.1 --port 8787
327
+ enigma-gateway serve --host 127.0.0.1 --port 8797
328
+ ```
329
+
330
+ ## Claim boundary
331
+
332
+ Enigma can honestly claim:
333
+
334
+ - A local Enigma vault contains or no longer serves a committed memory address.
335
+ - A memory create, retrieval, context-pack, update, or tombstone event produced a receipt that verifies offline.
336
+ - A boundary harness classified an observed boundary event as committed, blocked, out-of-scope, or failed.
337
+ - A relay stored an opaque encrypted record or signed a witness checkpoint without raw memory plaintext.
338
+ - A gateway decision followed a specific Enigma enterprise policy at a specific policy hash.
339
+
340
+ Enigma cannot honestly claim:
341
+
342
+ - A closed provider physically deleted all internal copies.
343
+ - A model forgot training, fine-tuning, cache, telemetry, or hidden personalization state.
344
+ - Enigma caused semantic forgetting across model outputs, hidden personalization, embeddings, summaries, caches, or third-party systems outside Enigma state.
345
+ - Imported provider memories are complete unless the source export explicitly proves completeness.
346
+ - A signed memory statement is true in the real world; receipts prove custody and lifecycle, not factual correctness.
347
+ - Token ROI, profit, equity, revenue share, investment return, or token price expectation.
348
+ - Tamper-proof hardware or raw compute superiority.
349
+ - Benchmark leadership without measured repository evidence.
350
+ - Hosted cloud or customer BYOC deployment is live without the required credentials, domain/TLS, production durable storage, KMS/secrets, monitoring, backups, incident ownership, and SIEM/log routing; local `--state-file` demo state is not hosted/BYOC readiness.
351
+ - That a local review packet or local provenance/SBOM output is signed provenance, registry attestation, git/source-control evidence, SLSA level, compliance certification, Docker image digest/runtime evidence, npm publication, hosted/BYOC readiness, or hosted/cloud deployment proof.
352
+
353
+ Read next:
354
+
355
+ - [`docs/overnight-build-master-plan.md`](docs/overnight-build-master-plan.md)
356
+ - [`docs/release-evidence-2026-06-23.md`](docs/release-evidence-2026-06-23.md)
357
+ - [`docs/release-provenance-and-sbom.md`](docs/release-provenance-and-sbom.md)
358
+ - [`docs/reviewer-packet.md`](docs/reviewer-packet.md)
359
+ - [`SECURITY.md`](SECURITY.md)
360
+ - [`docs/security-threat-model.md`](docs/security-threat-model.md)
361
+ - [`docs/operator-acceptance-packet.md`](docs/operator-acceptance-packet.md)
362
+ - [`docs/cloudflare-token-and-domain-runbook.md`](docs/cloudflare-token-and-domain-runbook.md)
363
+ - [`docs/public-api-reference.md`](docs/public-api-reference.md)
364
+ - `docs/install-anywhere.md`
365
+ - `docs/client-connectors.md`
366
+ - `docs/deployment-runbook.md`
367
+ - `docs/production-release-checklist.md`