enigma-memory 0.1.15 → 0.1.17

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 (44) hide show
  1. package/README.md +70 -86
  2. package/apps/cli/bin/enigma.mjs +152 -15
  3. package/apps/native-host/README.md +20 -0
  4. package/deploy/SIMULATION.md +34 -38
  5. package/docs/benchmark-attestation-network.md +2 -2
  6. package/docs/benchmark-reproducibility.md +70 -9
  7. package/docs/blockchain-only-mechanisms.md +12 -0
  8. package/docs/browser-extension-install.md +9 -6
  9. package/docs/client-connectors.md +29 -55
  10. package/docs/demo-proof-network.md +3 -3
  11. package/docs/developer-ecosystem.md +207 -223
  12. package/docs/developer-proof-quickstart.md +3 -3
  13. package/docs/enigma-memory-ready-conformance.md +1 -1
  14. package/docs/hosted-cloud-product.md +31 -0
  15. package/docs/install-anywhere.md +68 -70
  16. package/docs/memory-benchmarks.md +21 -3
  17. package/docs/memory-drive-health-model.md +41 -0
  18. package/docs/proof-network-build-notes.md +2 -2
  19. package/docs/proof-network.md +90 -8
  20. package/docs/sdk-api.md +1 -1
  21. package/docs/solana-devnet-acceptance.md +1 -1
  22. package/docs/solana-proof-rail.md +1 -1
  23. package/package.json +7 -1
  24. package/packages/connectors/src/index.js +13 -0
  25. package/packages/hosted-cloud/src/index.js +470 -2
  26. package/packages/mcp-server/README.md +22 -0
  27. package/packages/mcp-server/src/index.js +1 -1
  28. package/packages/passport/src/index.js +730 -0
  29. package/packages/proof-network/src/index.js +139 -0
  30. package/scripts/build-benchmark-proof-release.mjs +119 -6
  31. package/scripts/build-cloudflare-token-policy.mjs +6 -2
  32. package/scripts/build-hosted-api-key-lifecycle.mjs +1 -1
  33. package/scripts/build-hosted-customer-lifecycle.mjs +23 -3
  34. package/scripts/build-installer-assets.mjs +1 -1
  35. package/scripts/build-production-handoff-packet.mjs +1 -1
  36. package/scripts/build-production-unblocker.mjs +409 -409
  37. package/scripts/build-production-workplan.mjs +3 -1
  38. package/scripts/build-proof-network-packet.mjs +1 -1
  39. package/scripts/check.mjs +3 -1
  40. package/scripts/cloudflare-ops.mjs +35 -0
  41. package/scripts/collect-hosted-backend-live-evidence.mjs +44 -2
  42. package/scripts/run-memory-benchmarks.mjs +5 -0
  43. package/scripts/run-standard-memory-benchmarks.mjs +287 -5
  44. package/scripts/stage-cloudflare-pages-artifact.mjs +145 -0
@@ -1,8 +1,8 @@
1
1
  # Install Enigma anywhere
2
2
 
3
- Start with the published npm package path for `enigma-memory`: install once, run `enigma init --dry-run` to inspect the local plan, then execute local setup and connect real local clients only when you explicitly choose to. Use a source checkout only when you need source-only docs, Docker assets, browser-extension scaffolding, package development, or release scripts.
3
+ Start with the published npm package path for `enigma-memory`: install once, connect your installed AI clients, then inspect Memory Drive health and passport status. Use a source checkout only when you need source-only docs, Docker assets, browser-extension scaffolding, package development, or release scripts.
4
4
 
5
- Hosted cloud and BYOC operation require real deployment credentials, domains, TLS, durable storage, KMS/secrets, monitoring, backups, and operator/customer infrastructure; they are not activated by installing the package, running init, or running the test drive.
5
+ Hosted cloud and BYOC operation require real deployment credentials, domains, TLS, durable storage, KMS/secrets, monitoring, backups, and operator/customer infrastructure; they are not activated by installing the package, running setup, or running the test drive.
6
6
 
7
7
  ## Requirements
8
8
 
@@ -12,78 +12,29 @@ Hosted cloud and BYOC operation require real deployment credentials, domains, TL
12
12
  - Git only for the advanced source-checkout path
13
13
  - Optional: Docker for source-checkout containerized relay/gateway operation
14
14
 
15
- ## First run: inspect the safe local plan
16
-
17
- Use the published package as the primary path:
18
-
19
- ```sh
20
- npm install -g enigma-memory
21
- enigma init --dry-run
22
- ```
23
-
24
- `enigma init --dry-run` emits a public-safe JSON plan with exact next commands. It writes no local artifacts, writes no third-party client configs, does not call external providers, does not contact hosted Enigma SaaS, and does not require provider credentials, Solana, or browser extension installation. The output states `provider_credentials_required:false`, `hosted_saas_live:false`, and `raw_memory_printed:false`.
25
-
26
- When the plan looks right, create the regular local workspace:
27
-
28
- ```sh
29
- enigma init --overwrite
30
- ```
31
-
32
- `enigma init --overwrite` writes the local bundle, context pack, export, and verify report under `.enigma` by default. It does not write Claude, Cursor, Kimi, or other third-party client configs unless you explicitly add `--connect`.
33
-
34
- The isolated proof/demo command is still available for public reviewers:
35
-
36
- ```sh
37
- enigma test-drive --overwrite
38
- ```
39
-
40
- `enigma test-drive --overwrite` is the one-command local proof/demo. It needs no credentials, does not call external providers, does not contact hosted Enigma SaaS, and does not write third-party client configs. It writes an isolated demo under `.enigma/test-drive` by default; use `--dry-run` to preview the plan without writing, or `--out-dir <path>` to choose a different isolated demo directory.
41
-
42
- The command emits one public-safe JSON summary with paths to the local setup artifacts, search/status output, cross-model demo report, and benchmark pointers. The default bundle lives inside the demo directory. The summary includes exact next commands for public testers and does not print raw private memory plaintext.
43
-
44
- Keep the claim bounded: the test drive proves local Enigma-controlled vault state, receipts, checkpoints, committed roots, exported bundle shape, and declared boundary operations. It does not prove hosted SaaS availability, provider deletion, model forgetting, provider-native memory removal, legal approval, ROI/savings, or compliance certification.
45
-
46
- To connect real local clients that are already installed or already configured:
47
-
48
- ```sh
49
- enigma init --connect --overwrite
50
- ```
51
-
52
- `--connect` is the init-time write flag for client configs. With default client selection it skips missing client configs instead of creating every default client config.
53
-
54
15
  ## Default path: install once, use everywhere
55
16
 
56
- After reviewing the first-run plan, create a regular local workspace when you want to use Enigma day to day:
17
+ Use the published package as the primary path:
57
18
 
58
19
  ```sh
59
20
  npm install -g enigma-memory
60
- enigma init --dry-run
61
- enigma init --overwrite
62
- ```
63
-
64
- `enigma init --overwrite` is the safe default for a regular local workspace. It 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, or other third-party app configs.
65
-
66
- To let init auto-detect installed or already-configured clients and show the connector plan without mutating client configs:
67
-
68
- ```sh
69
- enigma init --client auto --dry-run
70
- ```
71
-
72
- `--client auto` selects clients found by connector detection and falls back to the default setup client list when none are present. The init output lists which clients were selected, which were skipped, and why. Existing setup commands remain available: `enigma setup --overwrite`, `enigma setup --client auto --overwrite`, and `enigma setup --connect-installed --overwrite`.
73
-
74
- After init or setup, use the same local vault from the CLI or connected clients:
75
-
76
- ```sh
21
+ enigma init
22
+ enigma setup --client auto --connect-installed --overwrite
23
+ enigma drive health
24
+ enigma status
77
25
  enigma remember --text-file ./memory.txt
78
- enigma search --query "..."
79
- enigma context --query "..." --optimize
26
+ enigma search --query "project context"
27
+ enigma context --query "project context" --optimize
80
28
  enigma verify --export ./.enigma/export.json
81
- enigma connect claude-desktop --dry-run
82
29
  ```
83
30
 
31
+ `enigma init` is the credential-free first run that creates the local `.enigma` workspace, bundle, and proof artifacts. `enigma setup --client auto --connect-installed --overwrite` then configures the drive and writes the `mcpServers.enigma` entry into every installed/config-present client it detects; it skips clients that are not installed and never creates configs from scratch. Preview with `--dry-run` first to see which clients will be written. Both commands emit deterministic, public-safe JSON without printing raw memory plaintext, and both run on Windows PowerShell via the `enigma.cmd` shim the npm global install adds.
32
+
33
+ `enigma drive health` reports a SMART-style memory-drive health packet — freshness, duplicate rate, tombstone backlog, stale derived artifacts, receipt coverage, and connector health — from local metadata only, with no network calls or private payloads. It is part of the Memory Drive surface in this release; `enigma status` and `enigma doctor` cover local passport counts, roots, and connector readiness in every build.
34
+
84
35
  The local Enigma vault is the canonical memory passport. Provider-native memory is non-canonical cache only. Enigma proof covers Enigma-controlled vault state, receipts, checkpoints, committed roots, and exported bundle shape; it does not prove provider deletion, model forgetting, provider-native memory removal, hosted/BYOC availability, legal approval, ROI/savings, or compliance certification.
85
36
 
86
- One-off public test drive without a global install:
37
+ Optional public test drive without a global install:
87
38
 
88
39
  ```sh
89
40
  npx --yes --package enigma-memory enigma test-drive --overwrite
@@ -226,19 +177,66 @@ MCP resource and prompt:
226
177
 
227
178
  Use `docs/client-connectors.md` from a source checkout for Claude Desktop, Cursor, Kimi Code, VS Code/Cline, Roo Code, OpenCode, and generic MCP JSON. Connector entries default to command `enigma-mcp` and env key `ENIGMA_BUNDLE`.
228
179
 
229
- Npm-first connector flow:
180
+ Npm-first connector flow — one command connects every installed/config-present client:
230
181
 
231
182
  ```sh
232
183
  npm install -g enigma-memory
233
- enigma init --dry-run
234
- enigma init --overwrite
235
- enigma init --client auto --dry-run
236
- enigma init --connect --overwrite
184
+ enigma setup --client auto --connect-installed --overwrite
185
+ ```
186
+
187
+ `--connect-installed` detects installed/config-present clients (Claude Desktop, Cursor, Kimi Code, VS Code/Cline, Roo, OpenCode, generic MCP) and writes only those existing client configs; missing client configs are reported and skipped. To preview a single client without writing, or to connect just one client later, use `enigma connect <client> --dry-run` and then drop `--dry-run`.
188
+
189
+ Copy-paste MCP snippets:
190
+
191
+ Claude Desktop:
192
+
193
+ ```json
194
+ {
195
+ "mcpServers": {
196
+ "enigma": {
197
+ "command": "enigma-mcp",
198
+ "args": [],
199
+ "env": {
200
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
201
+ }
202
+ }
203
+ }
204
+ }
205
+ ```
206
+
207
+ Cursor:
208
+
209
+ ```json
210
+ {
211
+ "mcpServers": {
212
+ "enigma": {
213
+ "command": "enigma-mcp",
214
+ "args": [],
215
+ "env": {
216
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
217
+ }
218
+ }
219
+ }
220
+ }
237
221
  ```
238
222
 
239
- Run `enigma init --dry-run` first to inspect the safe local plan without credentials, hosted SaaS, provider calls, raw memory output, or client-config writes. Run `enigma init --overwrite` for a regular local workspace. Use `--client auto --dry-run` when you want init to report installed/config-present connector targets without writing client configs. Use `--connect` only when you explicitly want init to merge Enigma into installed/config-present client configs by default; missing configs are skipped with reasons instead of created. Existing `enigma setup --overwrite`, `enigma setup --client auto --overwrite`, `enigma setup --connect-installed --overwrite`, and `enigma setup --write-connectors` behavior remains available. For a single client, replace `claude-desktop` with `cursor`, `kimi-code`, `vscode-cline`, `roo`, `opencode`, or `generic-mcp` and run `enigma connect <client> --dry-run` before writing.
223
+ Kimi Code:
224
+
225
+ ```json
226
+ {
227
+ "mcpServers": {
228
+ "enigma": {
229
+ "command": "enigma-mcp",
230
+ "args": [],
231
+ "env": {
232
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
233
+ }
234
+ }
235
+ }
236
+ }
237
+ ```
240
238
 
241
- Copy-paste MCP entry for Claude Desktop, Cursor, Kimi Code, or a generic MCP client:
239
+ Generic MCP:
242
240
 
243
241
  ```json
244
242
  {
@@ -12,12 +12,13 @@ For official-dataset retrieval/evidence proxy scoring over operator-downloaded f
12
12
 
13
13
  ```sh
14
14
  cd enigma
15
+ node scripts/run-standard-memory-benchmarks.mjs --locomo ./data/locomo10.json --longmemeval ./data/longmemeval_s_cleaned.json --max-locomo-qa 100 --max-longmemeval-items 100 --top-k 5 --dry-run
15
16
  node scripts/run-standard-memory-benchmarks.mjs --locomo ./data/locomo10.json --out ./.enigma/locomo-standard-memory-benchmark.json
16
17
  node scripts/run-standard-memory-benchmarks.mjs --longmemeval ./data/longmemeval_s_cleaned.json --top-k 5 --out ./.enigma/longmemeval-standard-memory-benchmark.json
17
18
  node scripts/run-standard-memory-benchmarks.mjs --locomo ./data/locomo10.json --longmemeval ./data/longmemeval_s_cleaned.json --max-locomo-qa 100 --max-longmemeval-items 100 --out ./.enigma/standard-memory-benchmark.json
18
19
  ```
19
20
 
20
- The standard report schema is `enigma.standard_memory_benchmark_suite.v1`. It reads local official dataset JSON files only, scores deterministic retrieval/evidence coverage proxies, and still excludes raw question, answer, and conversation text from reports.
21
+ The standard dry-run schema is `enigma.standard_memory_benchmark_plan.v1`. It prints planned local file names, sample bounds, local deterministic method rows, a requirements-only Mem0 adapter row, apples-to-apples controls, and explicit no-network/no-provider/no-Mem0/no-score boundaries without reading dataset files. The scored standard report schema is `enigma.standard_memory_benchmark_suite.v1`. It reads local official dataset JSON files only, scores deterministic retrieval/evidence coverage proxies, includes Mem0 as requirements-only with `scores_included:false`, and still excludes raw question, answer, and conversation text from reports.
21
22
 
22
23
  The report schema is `enigma.memory_benchmark_suite.v1`. It is public-safe by design: aggregate metrics, commitments, citations, boundaries, and cross-provider profile labels are emitted, but raw fixture memory, question text, and answer text are not included.
23
24
 
@@ -52,9 +53,11 @@ Numeric token and latency values in generated reports are local fixture measurem
52
53
 
53
54
  ## Official dataset retrieval/proxy runner
54
55
 
55
- `scripts/run-standard-memory-benchmarks.mjs` is the dependency-free runner for official dataset files already present on disk. It supports `--locomo <path>`, `--longmemeval <path>`, `--max-locomo-qa <n>`, `--max-longmemeval-items <n>`, `--top-k <n>` (default `5`), and optional `--out <path>`. Supplying only one dataset path scores only that dataset.
56
+ `scripts/run-standard-memory-benchmarks.mjs` is the dependency-free runner for official dataset files already present on disk. It supports `--locomo <path>`, `--longmemeval <path>`, `--max-locomo-qa <n>`, `--max-longmemeval-items <n>`, `--top-k <n>` (default `5`), `--dry-run`, and optional `--out <path>`. Supplying only one dataset path scores only that dataset.
56
57
 
57
- Reports include only the input file name plus the input SHA-256, not the full local path, so operator usernames or workstation directories are not persisted.
58
+ Use `--dry-run` before a scored run when publishing benchmark evidence. The plan proves only command shape and offline boundaries: it does not read or hash the files, prove they exist, produce scores, call provider APIs, run Mem0, run competitor SDKs, generate answers, grade answer accuracy, or spend API budget.
59
+
60
+ Reports include only the input file name plus the input SHA-256, not the full local path, so operator usernames or workstation directories are not persisted. Scored reports also include `command_boundaries` and `apples_to_apples_controls` so reviewers can see that all local rows used the same parsed records, same `--top-k`, same scoring labels, and no gold labels for retrieval selection.
58
61
 
59
62
  The runner parses LoCoMo `conversation` session turns as memory records and maps evidence labels such as `D1:3` or `D8:6; D9:17` to dialog IDs. It parses LongMemEval `haystack_sessions` turns as memory records, uses `has_answer: true` turns plus `answer_session_ids` as gold evidence, and treats `_abs` question IDs as abstention cases.
60
63
 
@@ -71,6 +74,21 @@ Because `enigma_relevance` can match normalized variants, session/role cues, tem
71
74
 
72
75
  The standard runner reports retrieval/evidence proxy metrics: LoCoMo evidence-hit@k and exact evidence coverage; LongMemEval turn evidence-hit@k, session evidence-hit@k, exact coverage, and abstention correctness; plus estimated prompt tokens, selected memory counts, and local latency. These are not LLM-generated answer-accuracy scores and must not be described as provider, competitor, or benchmark-leadership results.
73
76
 
77
+ ## Full-answer benchmark protocol plan
78
+
79
+ A true apples-to-apples full-answer benchmark (same category set, same `--top-k`, same frozen answerer and judge, same prompts, same competitor adapters) is a separate credentialed run that this package does not execute. `--protocol-plan` is the readiness layer: it emits a public-safe plan of that future protocol with no provider calls, no answer generation, no judging, and no competitor adapters.
80
+
81
+ ```sh
82
+ cd enigma
83
+ node scripts/run-standard-memory-benchmarks.mjs --locomo .enigma/benchmarks/datasets/locomo10.json --longmemeval .enigma/benchmarks/datasets/longmemeval_s_cleaned.json --top-k 5 --protocol-plan --out .enigma/standard-memory-benchmark-protocol-plan.json
84
+ ```
85
+
86
+ The emitted schema is `enigma.standard_memory_benchmark_protocol_plan.v1`. It records the planned category set, `--top-k`, the answerer model ref, the judge model ref, the prompt refs, the protocol ref, requirements-only competitor adapter refs, and cost-estimate inputs. Refs can be pinned with `--answerer-ref`, `--judge-ref`, `--answer-prompt-ref`, `--judge-prompt-ref`, and `--protocol-ref`; unpinned refs read `not-selected`/`not-pinned`.
87
+
88
+ The plan carries explicit boundaries that must be `false`: `protocol_boundaries.network_required`, `provider_calls_made`, `answers_generated`, `judged`, and `competitor_adapters_run`, plus `benchmark_boundaries.llm_answer_accuracy_scored: false` and `retrieval_evidence_proxy_scored: false`. It contains no raw questions, answers, prompts, provider responses, credentials, or scores.
89
+
90
+ The protocol plan is accepted by the benchmark proof-release builder alongside a scored retrieval proxy report, producing an `enigma.proof_network.benchmark_attestation.v1` that binds the plan's report hash. A protocol-plan proof release is evidence of protocol readiness only: it is not evidence that answers were generated or judged, that any provider or competitor ran or was outperformed, or that benchmark leadership, ROI, provider deletion, model forgetting, or compliance was achieved. Competitor adapter refs are references, not scores; a reference is never a superiority claim.
91
+
74
92
  ## Local baseline comparison
75
93
 
76
94
  `local_baseline_comparisons` (also mirrored at `metrics.local_baseline_comparisons`) compares Enigma against deterministic local baselines only. Every row scores the same private fixture questions and keeps raw memory, question text, and answer text out of the report.
@@ -595,6 +595,47 @@ A CLI or UI should show a concise SMART table first, then drill-down evidence:
595
595
 
596
596
  The product should default to safe blocking language: `proof_network_ready.eligible_for_anchor_batch` is false unless every public-safety and source-root condition passes. This makes health reports usable as local operational evidence now and as future proof-network anchor inputs without changing the privacy model.
597
597
 
598
+ ## CLI surface
599
+
600
+ The reference implementation ships the health core in the passport package as `createMemoryDriveHealthReport(args)` and exposes it through a two-part CLI command that emits the report as JSON to stdout:
601
+
602
+ ```sh
603
+ enigma drive health --bundle <path> \
604
+ [--now <iso>] \
605
+ [--benchmark-summary <path>] \
606
+ [--connector-summary <path>] \
607
+ [--replicas <path>] \
608
+ [--latest-anchor-batch-ref <ref>] \
609
+ [--out <file>]
610
+ ```
611
+
612
+ - `--bundle <path>` is the local Enigma vault bundle to inspect (defaults to `.enigma/bundle.json`). A missing or unreadable bundle returns a clean CLI error rather than crashing.
613
+ - `--now <iso>` fixes the timestamp used for age calculations so output is deterministic and reproducible; it defaults to a stable timestamp when omitted.
614
+ - `--benchmark-summary`, `--connector-summary`, and `--replicas` are optional JSON files carrying public-safe retrieval, connector, and replica metadata. When omitted, the corresponding metrics default gracefully to a measured:false healthy state instead of failing the report.
615
+ - `--out <path>` additionally writes the JSON report to a file.
616
+
617
+ ### Output shape
618
+
619
+ Every emitted object uses schema `enigma.memory_drive_health_report.v1` and contains only public-safe hashes, roots, refs, integer counts, ratios in `0..1`, booleans, statuses, ISO-8601 timestamps, thresholds, and claim text. The top-level fields are:
620
+
621
+ - `schema`, `report_ref` (`health_report_sha256:<hex>`), `created_at`;
622
+ - `drive_ref`, `namespace_ref`, `source_root` (`memory_root_sha256:<hex>`), `policy_ref`;
623
+ - `overall_status` (`healthy` | `watch` | `degraded` | `critical`) and `overall_score` (0-100, conservative: any critical metric caps the drive at 49, any degraded metric caps it at 70);
624
+ - `transaction_submitted: false` and `raw_memory_on_chain: false` on every report;
625
+ - `privacy_boundaries` (all `*_included` flags false), `roots` (`active_set_root`, `receipt_log_root`);
626
+ - `metrics`: the ten SMART-style attributes (freshness, duplicate_rate, tombstone_risk, stale_derived_artifacts, retrieval_hit_rate, token_reduction, leakage_scan, receipt_coverage, connector_health, sync_fork_risk), each with `status`, `score`, `observed`, `thresholds`, `evidence_refs`, and `recommended_actions`;
627
+ - `recommended_actions` (deduplicated across metrics), `claim_boundaries`;
628
+ - `proof_network_ready`: a conservative block with `eligible_for_anchor_batch`, `blocking_reasons`, `public_payload_only`, and `suggested_anchor_fields` (artifact_type `memory_drive_health_report`, artifact_schema `enigma.memory_drive_health_report.v1`, artifact_root echoing `report_ref`, source_root, and counts). This block maps cleanly onto a proof-network registry `health_report` entry: `report_ref` becomes `artifact_hash`, `artifact_schema` becomes `artifact_schema_ref`.
629
+
630
+ ### Claim boundary
631
+
632
+ A Memory Drive health report is **local operational evidence**, not a proof of outcome. It:
633
+
634
+ - is computed locally from public-safe counters, roots, receipt metadata, tombstones, and derived/context-pack refs only, with no network or chain calls;
635
+ - never contains raw memory, prompts, connector bodies, identity labels, or secret material (a leakage scan runs over the report before it is emitted);
636
+ - does **not** prove provider deletion, model forgetting, compliance certification, or live-chain settlement, and never claims a submitted transaction or on-chain memory (`transaction_submitted` and `raw_memory_on_chain` are always false).
637
+
638
+
598
639
  ## Implementation requirements
599
640
 
600
641
  The first implementation should treat health reporting as a pure local planner:
@@ -1,6 +1,6 @@
1
1
  # Proof Network build notes
2
2
 
3
- These notes are for future engineers extending Enigma's privacy-preserving Proof Network into a Solana program or hosted verifier. The 0.1.15 scope is local-only: create and verify public-safe proof artifacts, prepare opaque root batches for future chain anchoring, and never submit transactions or write private memory material into proof payloads.
3
+ These notes are for future engineers extending Enigma's privacy-preserving Proof Network into a Solana program or hosted verifier. The 0.1.17 scope is local-only: create and verify public-safe proof artifacts, prepare opaque root batches for future chain anchoring, and never submit transactions or write private memory material into proof payloads.
4
4
 
5
5
  Paths below are relative to `enigma/`.
6
6
 
@@ -202,7 +202,7 @@ On-chain accounts should store compact hashes, counters, timestamps, and public
202
202
 
203
203
  A hosted verifier can add convenience, not authority over private content. It may validate schema ids, JSON Schemas, package validators, canonical hashes, packet nesting, artifact counts, and public registry/chain observations. It must return bounded public-safe error codes and never echo private submitted values.
204
204
 
205
- Verifier non-goals: no raw memory ingestion, provider transcript ingestion, embedding upload endpoint, tenant-name lookup endpoint, Solana transaction submission, or hosted secret custody in the 0.1.15 proof-network layer.
205
+ Verifier non-goals: no raw memory ingestion, provider transcript ingestion, embedding upload endpoint, tenant-name lookup endpoint, Solana transaction submission, or hosted secret custody in the 0.1.17 proof-network layer.
206
206
 
207
207
  ## Targeted test plan
208
208
 
@@ -16,6 +16,8 @@ The initial artifact families are:
16
16
  | Capability revocation | `enigma.proof_network.capability_revocation.v1` | Records that a prior grant or scope is no longer accepted by verifiers after the revocation artifact is recognized. |
17
17
  | Benchmark attestation | `enigma.proof_network.benchmark_attestation.v1` | Binds a benchmark report hash to dataset, runner, package, and environment refs without publishing raw benchmark contents. |
18
18
  | Proof packet | `enigma.proof_network.packet.v1` | Bundles supported proof-network artifacts and verification metadata for review or handoff. |
19
+ | Registry entry | `enigma.proof_network.registry_entry.v1` | Indexes one anchor batch, benchmark attestation, connector conformance attestation, health report, operator receipt, or settlement job ref into a public-safe marketplace registry by digest refs, signer refs, and schema ref only. |
20
+ | Registry batch | `enigma.proof_network.registry_batch.v1` | Aggregates registry entries into one registry root so a marketplace index can be reviewed or handed off as a single commitment. |
19
21
 
20
22
  The pure package API for these artifacts should stay side-effect free: constructors create public-safe JSON, validators check exact schema shape and privacy flags, `sha256Json` hashes canonical JSON, and `assertNoPrivateProofPayload` rejects private key names or values before an artifact can be emitted. The API must not call a network, touch the filesystem, invoke provider SDKs, or infer missing private context.
21
23
 
@@ -92,7 +94,7 @@ Example:
92
94
  ```sh
93
95
  enigma chain anchor \
94
96
  --root sha256:8f0f7d2b7b7f4f2a3e4b9a3d1f0f2c3b4a5d6e7f8091a2b3c4d5e6f708192a3b \
95
- --ref release:enigma:0.1.15 \
97
+ --ref release:enigma:0.1.17 \
96
98
  --ref memory-root:public-demo-2026-06-25 \
97
99
  --out ./.enigma/proof-network-anchor.json
98
100
  ```
@@ -144,8 +146,8 @@ Example:
144
146
  ```sh
145
147
  enigma chain revoke \
146
148
  --issuer did:example:enigma-issuer \
147
- --grant-ref grant:sha256:2a0f6d8c1e3b5a799887766554433221100ffeeddccbbaa998877665544332211 \
148
- --reason-ref operator-request:2026-06-25 \
149
+ --grant-hash sha256:2a0f6d8c1e3b5a799887766554433221100ffeeddccbbaa998877665544332211 \
150
+ --reason operator-request-2026-06-25 \
149
151
  --out ./.enigma/proof-network-revocation.json
150
152
  ```
151
153
 
@@ -166,8 +168,8 @@ Example with a report hash:
166
168
  enigma chain attest \
167
169
  --report-hash sha256:5c3a2e1d0f9b8a7766554433221100ffeeddccbbaa99887766554433221100ff \
168
170
  --dataset-ref locomo:file-sha256:6a7b8c9d0e1f2233445566778899aabbccddeeff00112233445566778899aabb \
169
- --runner-ref enigma-standard-memory-benchmark:0.1.15 \
170
- --package-ref npm:@enigma-ai/enigma:0.1.15 \
171
+ --runner-ref enigma-standard-memory-benchmark:0.1.17 \
172
+ --package-ref npm://enigma-memory@0.1.17 \
171
173
  --out ./.enigma/proof-network-attestation.json
172
174
  ```
173
175
 
@@ -177,13 +179,63 @@ Example with a local report file:
177
179
  enigma chain attest \
178
180
  --report-file ./.enigma/standard-memory-benchmark.json \
179
181
  --dataset-ref longmemeval:file-sha256:7b8c9d0e1f2233445566778899aabbccddeeff00112233445566778899aabbcc \
180
- --runner-ref enigma-standard-memory-benchmark:0.1.15 \
181
- --package-ref npm:@enigma-ai/enigma:0.1.15 \
182
+ --runner-ref enigma-standard-memory-benchmark:0.1.17 \
183
+ --package-ref npm://enigma-memory@0.1.17 \
182
184
  --out ./.enigma/proof-network-attestation.json
183
185
  ```
184
186
 
185
187
  The public attestation should include only the report hash and refs. It should not include raw benchmark rows, questions, answers, conversations, private file paths, credentials, or provider outputs.
186
188
 
189
+ ## Flow: register
190
+
191
+ Registry entries index one already-created proof artifact into a public-safe marketplace registry. The entry never copies the artifact body; it binds the artifact hash to a schema ref, digest refs, signer refs, an entry type, and a registry namespace ref.
192
+
193
+ 1. The operator creates or selects a supported artifact (anchor batch, benchmark attestation, connector conformance attestation, health report, operator receipt, or settlement job ref) and keeps its body private.
194
+ 2. The CLI records only the artifact hash, the artifact schema ref, the public-safe digest refs and signer refs to index, and the entry type.
195
+ 3. The CLI validates that no private payload is present and emits a registry entry with `transaction_submitted:false` and `raw_memory_on_chain:false`.
196
+ 4. A reviewer can later resolve the artifact hash through approved private channels; the registry entry reveals only that a digest was indexed under a schema by named signers.
197
+
198
+ Supported entry types are `anchor_batch`, `benchmark_attestation`, `connector_conformance`, `health_report`, `operator_receipt`, and `settlement_job`. An unsupported entry type is rejected before an entry is created.
199
+
200
+ Example:
201
+
202
+ ```sh
203
+ enigma chain register \
204
+ --entry-type benchmark_attestation \
205
+ --artifact-hash sha256:5c3a2e1d0f9b8a7766554433221100ffeeddccbbaa99887766554433221100ff \
206
+ --artifact-schema-ref enigma.proof_network.benchmark_attestation.v1 \
207
+ --digest-ref sha256:8f0f7d2b7b7f4f2a3e4b9a3d1f0f2c3b4a5d6e7f8091a2b3c4d5e6f708192a3b \
208
+ --signer did:key:zpublicattestor \
209
+ --registry-ref registry:memory-drive-marketplace \
210
+ --entry-ref registry-entry://enigma/public/benchmark-1 \
211
+ --out ./.enigma/proof-network-registry-entry.json
212
+ ```
213
+
214
+ A registry entry answers "which digest was indexed under which schema by which signers, in which registry namespace?" It does not publish the artifact body, the report rows, the memory behind a root, customer or tenant identifiers, or any private review content.
215
+
216
+ ## Flow: registry
217
+
218
+ Registry batches aggregate registry entries into one registry root so a marketplace index can be reviewed or handed off as a single commitment.
219
+
220
+ 1. The operator selects registry entries that have already passed local validation.
221
+ 2. The CLI sorts the entry hashes and hashes them into a registry root.
222
+ 3. The CLI emits a registry batch with the entry list, entry count, registry root, and the same safety boundaries.
223
+ 4. A reviewer verifies the batch locally and resolves individual entries through approved private channels.
224
+
225
+ The registry root is deterministic and independent of entry input order: the same set of entries always yields the same registry root.
226
+
227
+ Example:
228
+
229
+ ```sh
230
+ enigma chain registry \
231
+ --entry ./.enigma/proof-network-registry-entry.json \
232
+ --entry ./.enigma/proof-network-registry-entry-health.json \
233
+ --registry-ref registry:memory-drive-marketplace \
234
+ --out ./.enigma/proof-network-registry-batch.json
235
+ ```
236
+
237
+ A registry batch is a local planning artifact. It does not broadcast to a marketplace, register on a live chain, or prove that any third party adopted the index.
238
+
187
239
  ## Flow: packet
188
240
 
189
241
  Proof packets bundle several supported artifacts into one reviewable handoff.
@@ -207,10 +259,37 @@ enigma chain verify --file ./.enigma/proof-network-grant.json
207
259
  enigma chain verify --file ./.enigma/proof-network-revocation.json
208
260
  enigma chain verify --file ./.enigma/proof-network-attestation.json
209
261
  enigma chain verify --file ./.enigma/proof-network-packet.json
262
+ enigma chain verify --file ./.enigma/proof-network-registry-entry.json
263
+ enigma chain verify --file ./.enigma/proof-network-registry-batch.json
210
264
  ```
211
265
 
212
266
  A successful local verification means the artifact matches a supported proof-network shape and safety boundary. It does not mean a live account exists, a transaction was accepted, or a public rail was contacted.
213
267
 
268
+ ## Flow: optional Solana Memo dry-run
269
+
270
+ `enigma chain submit-solana` is the safe handoff from a verified local artifact to the optional Solana proof rail. It defaults to dry-run, validates the artifact first, and prints only the compact Memo reference that would be submitted.
271
+
272
+ Dry-run command:
273
+
274
+ ```sh
275
+ enigma chain submit-solana \
276
+ --file ./.enigma/proof-network-anchor.json \
277
+ --cluster devnet
278
+ ```
279
+
280
+ Execute command, only after devnet gate approval and with an explicit operator keypair:
281
+
282
+ ```sh
283
+ enigma chain submit-solana \
284
+ --file ./.enigma/proof-network-anchor.json \
285
+ --cluster devnet \
286
+ --rpc https://api.devnet.solana.com \
287
+ --keypair ./operator-devnet-keypair.json \
288
+ --execute
289
+ ```
290
+
291
+ Execute mode submits one Solana Memo instruction containing only `memo_ref` JSON: schema, artifact hash, cluster, and compact proof commitment. It does not submit the artifact body, raw memory, prompts, transcripts, embeddings, provider responses, private keys, local paths, or customer identifiers.
292
+
214
293
  ## Privacy boundaries
215
294
 
216
295
  Proof-network artifacts are public-safe only when they follow these boundaries:
@@ -222,6 +301,7 @@ Proof-network artifacts are public-safe only when they follow these boundaries:
222
301
  | Benchmark evidence | Report hash, dataset ref, runner ref, package ref, environment ref | Raw questions, answers, conversations, provider responses, private dataset rows |
223
302
  | Solana planning | Batch root, schema id, public keys, PDA seed descriptions | Private keys, seed phrases, API keys, local file paths, raw memory |
224
303
  | Review packet | Supported proof artifacts, hashes, signatures, verification metadata | Secrets, private operational notes, unredacted logs |
304
+ | Registry index | Artifact hash, schema ref, digest refs, signer refs, registry namespace ref, entry type, count | Artifact bodies, report rows, memory behind roots, customer or tenant identifiers |
225
305
 
226
306
  The private-payload guard should reject both key names and values that look like private data. Reviewers should treat that guard as a safety net, not as permission to put sensitive fields near public artifacts.
227
307
 
@@ -229,11 +309,12 @@ The private-payload guard should reject both key names and values that look like
229
309
 
230
310
  Allowed public claims are intentionally narrow:
231
311
 
232
- - Enigma can produce local proof-network JSON artifacts for anchors, grants, revocations, benchmark attestations, and packets.
312
+ - Enigma can produce local proof-network JSON artifacts for anchors, grants, revocations, benchmark attestations, packets, registry entries, and registry batches.
233
313
  - The artifacts are designed to contain public-safe hashes, roots, refs, counts, timestamps, signatures, and schema identifiers.
234
314
  - The local verifier can validate supported proof-network artifact shapes and reject private payload patterns.
235
315
  - Anchor batches are Solana-ready planning payloads for compact commitments, with `transaction_submitted:false`.
236
316
  - Raw memory is not intended to be placed on a public rail by these artifacts.
317
+ - Registry entries index an already-created artifact by digest refs, signer refs, and schema ref only; registry batches hash entries into one registry root for review or handoff. Neither claims that a marketplace or live chain adopted the index.
237
318
 
238
319
  Forbidden public claims include:
239
320
 
@@ -243,6 +324,7 @@ Forbidden public claims include:
243
324
  - saying a revocation changes third-party systems or private stores that do not consume the revocation artifact;
244
325
  - saying a benchmark attestation proves answer quality or provider ranking;
245
326
  - saying the system replaces separate audits, changes public-market outcomes, or controls systems that do not consume the artifact.
327
+ - saying a registry entry or registry batch was published to a live marketplace, registered on a live chain, or adopted by any third party;
246
328
 
247
329
  ## Reviewer checklist
248
330
 
package/docs/sdk-api.md CHANGED
@@ -241,7 +241,7 @@ const attestation = createBenchmarkAttestation({
241
241
  report_hash: 'sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
242
242
  dataset_ref: 'dataset-ref-public',
243
243
  runner_ref: 'runner-ref-public',
244
- package_ref: 'npm:enigma-memory@0.1.15',
244
+ package_ref: 'npm:enigma-memory@0.1.17',
245
245
  metric_roots: ['sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'],
246
246
  sample_count: 120,
247
247
  run_count: 1,
@@ -33,7 +33,7 @@ enigma chain submit-solana \
33
33
  --keypair ./operator-devnet-keypair.json
34
34
  ```
35
35
 
36
- Network submission is opt-in only. Execute mode requires an explicit Solana cluster and keypair, lazily loads `@solana/web3.js`, and submits one Memo-program transaction containing only the compact `memo_ref` JSON:
36
+ Network submission is opt-in only. Execute mode requires an explicit Solana cluster and Solana CLI-style 64-byte secret-key JSON keypair, lazily loads `@solana/web3.js`, and submits one Memo-program transaction containing only the compact `memo_ref` JSON:
37
37
 
38
38
  ```sh
39
39
  enigma chain submit-solana \
@@ -437,7 +437,7 @@ Mainnet use is blocked until all gates below are satisfied for the exact program
437
437
  - Use domain tags for every hash: `anchor_batch`, `capability_grant`, `capability_revocation`, `benchmark_attestation`, `job_escrow`, `operator_registry`, and `packet`.
438
438
  - Prefer fixed-size byte arrays and enums in instruction args. Avoid variable user text and arbitrary JSON on-chain.
439
439
  - Keep account sizes bounded. Store hash lists off-chain behind roots when a vector could grow without a hard cap.
440
- - Every chain-writing CLI command should have a local planning mode first. The default for release `0.1.15` planning artifacts is no transaction submission.
440
+ - Every chain-writing CLI command should have a local planning mode first. The default for release `0.1.17` planning artifacts is no transaction submission.
441
441
  - Chain refs should include cluster, program id, signature/account id, and slot. They should not include RPC URLs with credentials.
442
442
 
443
443
  ## Future implementation checklist
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enigma-memory",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "type": "module",
5
5
  "description": "Provider-agnostic AI memory passport and offline-verifiable proof layer.",
6
6
  "license": "Apache-2.0",
@@ -46,6 +46,7 @@
46
46
  "packages/optimizer/src/",
47
47
  "packages/mcp-server/bin/",
48
48
  "packages/mcp-server/src/",
49
+ "packages/mcp-server/README.md",
49
50
  "packages/mesh/src/",
50
51
  "packages/metering/src/",
51
52
  "packages/proof-network/src/",
@@ -76,6 +77,7 @@
76
77
  "scripts/build-production-backend-env-kit.mjs",
77
78
  "scripts/cloudflare-secret-env.mjs",
78
79
  "scripts/cloudflare-ops.mjs",
80
+ "scripts/stage-cloudflare-pages-artifact.mjs",
79
81
  "scripts/build-cloudflare-pages-release-packet.mjs",
80
82
  "scripts/build-cloudflare-token-policy.mjs",
81
83
  "scripts/build-cloudflare-token-request.mjs",
@@ -182,6 +184,10 @@
182
184
  "demo:assets": "node scripts/build-demo-assets.mjs",
183
185
  "cloudflare:ops": "node scripts/cloudflare-ops.mjs",
184
186
  "cloudflare:pages:packet": "node scripts/build-cloudflare-pages-release-packet.mjs",
187
+ "cloudflare:pages:stage": "node scripts/stage-cloudflare-pages-artifact.mjs --site ../enigma-deploy --out .enigma/cloudflare-pages/enigmamemory.com",
188
+ "cloudflare:pages:dry-run": "node scripts/stage-cloudflare-pages-artifact.mjs --site ../enigma-deploy --out .enigma/cloudflare-pages/enigmamemory.com && node scripts/cloudflare-ops.mjs pages deploy --site .enigma/cloudflare-pages/enigmamemory.com --project-name enigma-memory",
189
+ "cloudflare:pages:deploy": "node scripts/stage-cloudflare-pages-artifact.mjs --site ../enigma-deploy --out .enigma/cloudflare-pages/enigmamemory.com && node scripts/cloudflare-ops.mjs pages deploy --site .enigma/cloudflare-pages/enigmamemory.com --project-name enigma-memory --execute",
190
+ "cloudflare:pages:verify": "node scripts/cloudflare-ops.mjs pages verify --url https://enigmamemory.com/ --project-name enigma-memory --domain enigmamemory.com --cloudflare-live required",
185
191
  "cloudflare:token-policy": "node scripts/build-cloudflare-token-policy.mjs",
186
192
  "cloudflare:token-request": "node scripts/build-cloudflare-token-request.mjs",
187
193
  "infrastructure:readiness": "node scripts/infrastructure-readiness.mjs",
@@ -566,6 +566,15 @@ function connectCommandFor(clientId, platform) {
566
566
  return `enigma connect ${clientId} --bundle "${publicBundlePlaceholder(platform)}"`;
567
567
  }
568
568
 
569
+ function setupConnectCommandFor(clientId, platform) {
570
+ return `enigma setup --client ${clientId} --write-connectors --bundle "${publicBundlePlaceholder(platform)}" --overwrite`;
571
+ }
572
+
573
+ function installConnectCommandFor(clientId, platform) {
574
+ return `npm install -g enigma-memory && ${setupConnectCommandFor(clientId, platform)}`;
575
+ }
576
+
577
+
569
578
  function wizardStepsForClient(clientId, platform) {
570
579
  const steps = [
571
580
  {
@@ -635,6 +644,10 @@ export function planConnectWizard(clientIdOrOptions = {}, maybeOptions = {}) {
635
644
  display_name: CLIENT_DEFINITIONS[clientId].display_name,
636
645
  default_config_path: publicDefaultConfigPath(clientId, platform),
637
646
  steps: wizardStepsForClient(clientId, platform),
647
+ one_command_install_connect: installConnectCommandFor(clientId, platform),
648
+ setup_connect_command: setupConnectCommandFor(clientId, platform),
649
+ connect_command: connectCommandFor(clientId, platform),
650
+ mcp_config_preview: renderMcpConfig(clientId, { platform, bundlePath: publicBundlePlaceholder(platform) }),
638
651
  })),
639
652
  };
640
653
  }