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,223 +1,207 @@
1
- # Developer ecosystem
2
-
3
- Enigma Memory is a local-first SDK, CLI, MCP server, and service-contract package. The developer surfaces are designed to be copied without secrets, cloud credentials, hidden local paths, or account identifiers.
4
-
5
- ## Public test-drive loop
6
-
7
- For most developers, start with the installed CLI before reading the SDK internals or service contracts:
8
-
9
- ```sh
10
- npm install -g enigma-memory
11
- enigma test-drive --overwrite
12
- ```
13
-
14
- `enigma test-drive --overwrite` is zero-credential, local-only, and public-safe by default. It writes an isolated demo under `.enigma/test-drive`, keeps the default bundle inside that directory, emits one 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.
15
-
16
- The test drive runs the local proof/demo path only: setup artifacts, search/status output, a cross-model demo report, and benchmark pointers. It does not call external providers, contact hosted Enigma SaaS, require OpenAI/Anthropic/Cloudflare credentials, create accounts, or write third-party client configs. Keep public claims bounded to local Enigma-controlled vault state, receipts, checkpoints, committed roots, exported bundle shape, and declared boundary operations.
17
-
18
- To explicitly connect real local clients that are already installed or already configured:
19
-
20
- ```sh
21
- enigma setup --connect-installed --overwrite
22
- ```
23
-
24
- `--connect-installed` implies auto selection, writes only for installed/config-present clients, and skips missing configs instead of creating every default client config. Only explicit write flags mutate client configs; `enigma connect <client>` without `--dry-run` remains the single-client write path, and existing `enigma setup --write-connectors` behavior for explicit/default clients is unchanged. Treat provider-native memory as non-canonical cache only; the local Enigma vault is canonical.
25
-
26
- ## CLI memory passport loop
27
-
28
- After the public test drive, create a regular local workspace when you want day-to-day CLI usage:
29
-
30
- ```sh
31
- npm install -g enigma-memory
32
- enigma setup --overwrite
33
- ```
34
-
35
- `enigma setup --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 third-party app configs.
36
-
37
- After setup, use the same local vault from the CLI or connected clients:
38
-
39
- ```sh
40
- enigma remember --text-file ./memory.txt
41
- enigma search --query "..."
42
- enigma context --query "..." --optimize
43
- enigma verify --export ./.enigma/export.json
44
- enigma connect claude-desktop --dry-run
45
- ```
46
-
47
- ## Copyable starting points
48
-
49
- - SDK/API guide: [`docs/sdk-api.md`](./sdk-api.md)
50
- - Node example app: [`examples/node-basic-memory.mjs`](../examples/node-basic-memory.mjs)
51
- - GitHub Actions example: [`examples/ci/github-actions.yml`](../examples/ci/github-actions.yml)
52
- - Benchmark reproducibility guide: [`docs/benchmark-reproducibility.md`](./benchmark-reproducibility.md)
53
- - Generic MCP client template: [`templates/mcp-client-config.json`](../templates/mcp-client-config.json)
54
-
55
- ## Local SDK loop
56
-
57
- Use the SDK when you want an app-owned vault and receipt-backed proof loop:
58
-
59
- 1. Create a local vault with `createVault`.
60
- 2. Add a generic, non-private memory with `remember`.
61
- 3. Create a passport with `createPassport`.
62
- 4. Compile a receipt-backed context pack with `compileContextPack`.
63
- 5. Export a proof-carrying bundle with `exportBundle`; keep full bundles private unless local import key material has been reviewed and removed.
64
- 6. Verify receipts with `verifyReceiptChain`, `enigma verify`, `enigma-verify`, or MCP `enigma_verify_receipts`.
65
-
66
- The example app prints ids, counts, roots, and verification status only. It does not print raw memory text, generated key material, credentials, provider transcripts, or local absolute paths.
67
-
68
- ## CLI and CI loop
69
-
70
- The CI example installs Node 24, installs `enigma-memory` into a disposable npm project, exposes the package benchmark script, then runs:
71
-
72
- ```sh
73
- npx enigma test-drive --overwrite
74
- npx enigma setup --overwrite
75
- npx enigma doctor
76
- npm run benchmark:memory-suite -- --out benchmark-report.json
77
- ```
78
-
79
- and then runs a small ESM import smoke. It does not require GitHub secrets, cloud provider credentials, npm tokens, private bundles, local path assumptions, hosted Enigma SaaS, external memory-provider calls, or official dataset network downloads in normal CI. The test-drive and benchmark steps write public-safe local JSON reports; see the benchmark reproducibility guide for claim boundaries and the requirements for any future live third-party comparison.
80
-
81
- The workflow also includes optional official-dataset benchmark preparation steps gated behind the manual `workflow_dispatch` input `run_standard_benchmark: true`. Normal `push` and `pull_request` runs skip them, so official dataset downloads are not required in normal CI. Enable the manual path only after the repository has reviewed network use and dataset-license handling:
82
-
83
- ```sh
84
- node ./node_modules/enigma-memory/scripts/download-standard-benchmarks.mjs --dry-run
85
- node ./node_modules/enigma-memory/scripts/download-standard-benchmarks.mjs --execute --dataset all --out-dir .enigma/benchmarks/datasets --manifest .enigma/benchmarks/dataset-manifest.json
86
- node ./node_modules/enigma-memory/scripts/run-standard-memory-benchmarks.mjs --locomo .enigma/benchmarks/datasets/locomo10.json --longmemeval .enigma/benchmarks/datasets/longmemeval_s_cleaned.json --max-locomo-qa 25 --max-longmemeval-items 25 --top-k 5 --out .enigma/standard-memory-benchmark-sample.json
87
- ```
88
-
89
- Those commands produce a dataset manifest with source URLs, byte sizes, and SHA-256 hashes plus a standard benchmark report using schema `enigma.standard_memory_benchmark_suite.v1`. The standard runner is retrieval/evidence proxy scoring only: it does not call providers, grade generated answers, or produce competitor scores.
90
-
91
- Use the workflow as a template in a consumer repository. It is intentionally limited to install/import/doctor smoke coverage, local proof generation, and deterministic local benchmark evidence by default; it does not publish packages, deploy infrastructure, contact hosted Enigma cloud, call external memory providers, or download official benchmark datasets unless you intentionally enable `run_standard_benchmark` for a manual workflow run.
92
-
93
- ## Proof Network developer loop
94
-
95
- The proof-network path gives integrators a public, privacy-preserving adoption track before any chain transaction or hosted integration exists. The adoption ladder is intentionally simple:
96
-
97
- 1. Install or invoke the npm package.
98
- 2. Run the local test drive to produce safe roots/receipts/counts.
99
- 3. Generate proof-network chain artifacts from public-safe inputs.
100
- 4. Verify those artifacts locally.
101
- 5. Wire the same artifact contract into a connector, benchmark dashboard, or conformance test.
102
-
103
- ```sh
104
- npx --yes --package enigma-memory enigma test-drive --overwrite
105
- npx --yes --package enigma-memory enigma chain anchor --root sha256:8f8f... --root sha256:9a9a... --ref demo-local-vault --authority demo-public-authority --batch-ref demo-anchor-batch --out .enigma/proof-anchor-batch.json
106
- npx --yes --package enigma-memory enigma chain grant --subject did:example:agent --capability memory.read --scope demo-scope --resource-ref sha256:8f8f... --policy-hash sha256:7e7e... --expires-at 2026-07-01T00:00:00Z --grant-ref demo-grant --out .enigma/proof-capability-grant.json
107
- npx --yes --package enigma-memory enigma chain revoke --grant-hash sha256:6d6d... --reason scope-ended --revocation-ref demo-revocation --out .enigma/proof-capability-revocation.json
108
- npx --yes --package enigma-memory enigma chain attest --report-file benchmark-report.json --dataset-ref sha256:5c5c... --runner-ref enigma-standard-runner --package-ref enigma-memory@0.1.15 --score accuracy=0.92 --out .enigma/proof-benchmark-attestation.json
109
- npx --yes --package enigma-memory enigma chain verify --file .enigma/proof-anchor-batch.json
110
- ```
111
-
112
- `enigma chain anchor`, `grant`, `revoke`, `attest`, and `verify` are local planning commands. They create or validate opaque JSON proof-network artifacts for Solana-ready anchoring, but they do not create accounts, sign with private keys, submit transactions, deploy programs, or call RPC providers. Generated chain artifacts must keep `transaction_submitted:false` and `raw_memory_on_chain:false`; if an example needs a memory reference, use a public-safe commitment or receipt root rather than raw memory, prompts, transcripts, completions, embeddings, ACL bodies, tenant names, provider responses, private keys, seed phrases, or credentials.
113
-
114
- Use proof artifacts as the common exchange format for developer integrations:
115
-
116
- - **NPM test-drive adopters:** run the test drive, create an anchor batch from local roots/refs, verify the artifact, and attach the JSON to a pull request, demo, or release note without exposing private memory.
117
- - **Chain artifact builders:** treat `anchor_batch`, `capability_grant`, `capability_revocation`, `benchmark_attestation`, and `packet` as the supported public artifact types. Anchors carry roots/refs/counts for later settlement; grants carry subject, capability, scope, resource refs, policy hashes, and expiry; revocations carry grant hashes and nullifiers; attestations carry report hashes plus dataset, runner, package, and score refs.
118
- - **Conformance program partners:** build fixtures that accept valid proof-network artifacts and reject artifacts that leak private payload keys or values, omit the false transaction flags, use raw ACL or tenant bodies, or mix raw memory with public chain payloads. A connector should pass conformance before it claims proof-network support.
119
- - **Benchmark attestation contributors:** hash the benchmark report or pass the report file, then bind it to dataset, runner, and package refs. The attestation makes benchmark evidence portable, but benchmark claims still depend on the benchmark guide's dataset, scoring, and comparison boundaries.
120
- - **Connector authors:** wallet, agent, MCP, CI, and dashboard connectors can verify packets, display opaque Solana-ready roots, enforce grants before retrieval, publish revocation/nullifier artifacts when access ends, and keep private bundles off-chain while sharing verifiable commitments.
121
-
122
- Conformance should stay narrow and testable. A proof-network connector is ready for public examples when it can:
123
-
124
- 1. accept every supported proof-network artifact shape and return a deterministic validation result;
125
- 2. reject any artifact containing private-looking field names or values before display, upload, signing, or indexing;
126
- 3. preserve `transaction_submitted:false` unless a separate reviewed settlement path actually submits a transaction;
127
- 4. preserve `raw_memory_on_chain:false` for every chain-facing artifact;
128
- 5. enforce capability grant subject, capability, scope, resource-ref, policy-hash, and expiry constraints before retrieval;
129
- 6. accept capability revocations/nullifiers and stop treating revoked grants as usable;
130
- 7. bind benchmark attestations to report hashes/files plus dataset, runner, and package refs without importing the raw benchmark corpus or private model output.
131
-
132
- Good first connector projects are deliberately small: a CLI verifier that fails CI on leaked private payloads, a wallet preview that shows only roots/scopes/expiry/nullifiers, an MCP middleware that blocks retrieval without a live grant, a benchmark dashboard that accepts attestation JSON beside a report hash, and a Solana explorer plugin that labels opaque anchor batches without claiming transaction submission.
133
-
134
- This path is intentionally copyable: npm install, run a local test drive, generate proof artifacts, verify them, then wire the same public-safe contract into a connector or conformance test. Do not position it as live settlement, provider deletion proof, compliance certification, or benchmark leadership without the separate evidence those claims require.
135
-
136
- ## MCP client loop
137
-
138
- The same installed package can be used by Claude Desktop, Cursor, Kimi Code, or any generic MCP client. Run `enigma test-drive --overwrite` first if you want a zero-credential local proof before touching real client configs. The smooth setup path is `enigma setup --client auto --overwrite` to plan detected clients, then `enigma setup --connect-installed --overwrite` only when you explicitly want setup to write installed/config-present client configs. Manual snippets remain useful when a client needs a copied entry; replace the bundle path with the local path from your setup output, and restart the client.
139
-
140
- Claude Desktop:
141
-
142
- ```json
143
- {
144
- "mcpServers": {
145
- "enigma": {
146
- "command": "enigma-mcp",
147
- "args": [],
148
- "env": {
149
- "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
150
- }
151
- }
152
- }
153
- }
154
- ```
155
-
156
- Cursor:
157
-
158
- ```json
159
- {
160
- "mcpServers": {
161
- "enigma": {
162
- "command": "enigma-mcp",
163
- "args": [],
164
- "env": {
165
- "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
166
- }
167
- }
168
- }
169
- }
170
- ```
171
-
172
- Kimi Code:
173
-
174
- ```json
175
- {
176
- "mcpServers": {
177
- "enigma": {
178
- "command": "enigma-mcp",
179
- "args": [],
180
- "env": {
181
- "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
182
- }
183
- }
184
- }
185
- }
186
- ```
187
-
188
- Generic MCP:
189
-
190
- ```json
191
- {
192
- "mcpServers": {
193
- "enigma": {
194
- "command": "enigma-mcp",
195
- "args": [],
196
- "env": {
197
- "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
198
- }
199
- }
200
- }
201
- }
202
- ```
203
-
204
- Do not commit private bundle paths if they reveal local usernames, workspace names, account ids, or other personal details.
205
-
206
- ## Claim boundaries for developers
207
-
208
- Enigma proof artifacts cover Enigma-controlled or Enigma-mediated state: local vault events, receipts, active/tombstoned memory addresses, context-pack retrieval/injection receipts, relay/gateway records, usage events, and settlement receipts.
209
-
210
- They do not prove:
211
-
212
- - provider-side deletion;
213
- - model forgetting;
214
- - compliance certification;
215
- - token ROI, investment outcome, or provider invoice savings;
216
- - hosted-cloud readiness from a local demo;
217
- - benchmark leadership from SDK mechanics alone.
218
-
219
- Benchmark claims require benchmark-specific evidence. LoCoMo covers long-term conversational memory QA, event summarization, and multimodal generation across long conversations. LongMemEval covers extraction, multi-session reasoning, temporal reasoning, knowledge updates, and abstention. Agent-memory benchmark results can depend heavily on the agent/framework/tool loop, not only on the memory store. Keep those distinctions when writing integrations or public copy.
220
-
221
- ## What to keep out of examples
222
-
223
- Do not add secrets, tokens, 2FA codes, cloud account ids, personal data, provider transcripts, raw private memory, absolute local paths, or unreviewed hosted endpoints to examples/templates. Public-safe examples should use generic ids, relative paths, placeholders, hashes, commitments, counts, receipt ids, and roots.
1
+ # Developer ecosystem
2
+
3
+ Enigma Memory is a local-first SDK, CLI, MCP server, and service-contract package. The developer surfaces are designed to be copied without secrets, cloud credentials, hidden local paths, or account identifiers.
4
+
5
+ ## CLI memory passport loop
6
+
7
+ For most developers, start with the installed CLI before reading the SDK internals or service contracts:
8
+
9
+ ```sh
10
+ npm install -g enigma-memory
11
+ enigma init
12
+ enigma setup --client auto --connect-installed --overwrite
13
+ enigma drive health
14
+ enigma status
15
+ enigma remember --text-file ./memory.txt
16
+ enigma search --query "project context"
17
+ enigma context --query "project context" --optimize
18
+ enigma verify --export ./.enigma/export.json
19
+ ```
20
+
21
+ `enigma init` creates the local `.enigma` workspace, bundle, and proof artifacts with no provider or cloud credentials. `enigma setup --client auto --connect-installed --overwrite` configures the drive and writes the `mcpServers.enigma` entry into every installed/config-present client it detects, skipping clients that are not installed; preview with `--dry-run` first. `enigma drive health` reports a SMART-style memory-drive health packet (freshness, duplicate rate, tombstone backlog, stale derived artifacts, receipt coverage, connector health) from local metadata only; it is part of the Memory Drive surface in this release, and `enigma status` plus `enigma doctor` cover local passport counts, roots, and connector readiness in every build. Neither setup command prints raw memory plaintext. Treat provider-native memory as non-canonical cache only; the local Enigma vault is canonical.
22
+
23
+ Optional public test-drive loop:
24
+
25
+ ```sh
26
+ npx --yes --package enigma-memory enigma test-drive --overwrite
27
+ ```
28
+
29
+ `enigma test-drive --overwrite` is zero-credential, local-only, and public-safe by default. It does not call external providers, contact hosted Enigma SaaS, require OpenAI/Anthropic/Cloudflare credentials, create accounts, or write third-party client configs.
30
+
31
+ ## Copyable starting points
32
+
33
+ - SDK/API guide: [`docs/sdk-api.md`](./sdk-api.md)
34
+ - Node example app: [`examples/node-basic-memory.mjs`](../examples/node-basic-memory.mjs)
35
+ - GitHub Actions example: [`examples/ci/github-actions.yml`](../examples/ci/github-actions.yml)
36
+ - Benchmark reproducibility guide: [`docs/benchmark-reproducibility.md`](./benchmark-reproducibility.md)
37
+ - Generic MCP client template: [`templates/mcp-client-config.json`](../templates/mcp-client-config.json)
38
+
39
+ ## Local SDK loop
40
+
41
+ Use the SDK when you want an app-owned vault and receipt-backed proof loop:
42
+
43
+ 1. Create a local vault with `createVault`.
44
+ 2. Add a generic, non-private memory with `remember`.
45
+ 3. Create a passport with `createPassport`.
46
+ 4. Compile a receipt-backed context pack with `compileContextPack`.
47
+ 5. Export a proof-carrying bundle with `exportBundle`; keep full bundles private unless local import key material has been reviewed and removed.
48
+ 6. Verify receipts with `verifyReceiptChain`, `enigma verify`, `enigma-verify`, or MCP `enigma_verify_receipts`.
49
+
50
+ The example app prints ids, counts, roots, and verification status only. It does not print raw memory text, generated key material, credentials, provider transcripts, or local absolute paths.
51
+
52
+ ## CLI and CI loop
53
+
54
+ The CI example installs Node 24, installs `enigma-memory` into a disposable npm project, exposes the package benchmark script, then runs:
55
+
56
+ ```sh
57
+ npx enigma test-drive --overwrite
58
+ npx enigma setup --overwrite
59
+ npx enigma doctor
60
+ npm run benchmark:memory-suite -- --out benchmark-report.json
61
+ ```
62
+
63
+ and then runs a small ESM import smoke. It does not require GitHub secrets, cloud provider credentials, npm tokens, private bundles, local path assumptions, hosted Enigma SaaS, external memory-provider calls, or official dataset network downloads in normal CI. The test-drive and benchmark steps write public-safe local JSON reports; see the benchmark reproducibility guide for claim boundaries and the requirements for any future live third-party comparison.
64
+
65
+ The workflow also includes optional official-dataset benchmark preparation steps gated behind the manual `workflow_dispatch` input `run_standard_benchmark: true`. Normal `push` and `pull_request` runs skip them, so official dataset downloads are not required in normal CI. Enable the manual path only after the repository has reviewed network use and dataset-license handling:
66
+
67
+ ```sh
68
+ node ./node_modules/enigma-memory/scripts/download-standard-benchmarks.mjs --dry-run
69
+ node ./node_modules/enigma-memory/scripts/download-standard-benchmarks.mjs --execute --dataset all --out-dir .enigma/benchmarks/datasets --manifest .enigma/benchmarks/dataset-manifest.json
70
+ node ./node_modules/enigma-memory/scripts/run-standard-memory-benchmarks.mjs --locomo .enigma/benchmarks/datasets/locomo10.json --longmemeval .enigma/benchmarks/datasets/longmemeval_s_cleaned.json --max-locomo-qa 25 --max-longmemeval-items 25 --top-k 5 --out .enigma/standard-memory-benchmark-sample.json
71
+ ```
72
+
73
+ Those commands produce a dataset manifest with source URLs, byte sizes, and SHA-256 hashes plus a standard benchmark report using schema `enigma.standard_memory_benchmark_suite.v1`. The standard runner is retrieval/evidence proxy scoring only: it does not call providers, grade generated answers, or produce competitor scores.
74
+
75
+ Use the workflow as a template in a consumer repository. It is intentionally limited to install/import/doctor smoke coverage, local proof generation, and deterministic local benchmark evidence by default; it does not publish packages, deploy infrastructure, contact hosted Enigma cloud, call external memory providers, or download official benchmark datasets unless you intentionally enable `run_standard_benchmark` for a manual workflow run.
76
+
77
+ ## Proof Network developer loop
78
+
79
+ The proof-network path gives integrators a public, privacy-preserving adoption track before any chain transaction or hosted integration exists. The adoption ladder is intentionally simple:
80
+
81
+ 1. Install or invoke the npm package.
82
+ 2. Run the local test drive to produce safe roots/receipts/counts.
83
+ 3. Generate proof-network chain artifacts from public-safe inputs.
84
+ 4. Verify those artifacts locally.
85
+ 5. Wire the same artifact contract into a connector, benchmark dashboard, or conformance test.
86
+
87
+ ```sh
88
+ npx --yes --package enigma-memory enigma test-drive --overwrite
89
+ npx --yes --package enigma-memory enigma chain anchor --root sha256:8f8f... --root sha256:9a9a... --ref demo-local-vault --authority demo-public-authority --batch-ref demo-anchor-batch --out .enigma/proof-anchor-batch.json
90
+ npx --yes --package enigma-memory enigma chain grant --subject did:example:agent --capability memory.read --scope demo-scope --resource-ref sha256:8f8f... --policy-hash sha256:7e7e... --expires-at 2026-07-01T00:00:00Z --grant-ref demo-grant --out .enigma/proof-capability-grant.json
91
+ npx --yes --package enigma-memory enigma chain revoke --grant-hash sha256:6d6d... --reason scope-ended --revocation-ref demo-revocation --out .enigma/proof-capability-revocation.json
92
+ npx --yes --package enigma-memory enigma chain attest --report-file benchmark-report.json --dataset-ref sha256:5c5c... --runner-ref enigma-standard-runner --package-ref enigma-memory@0.1.5 --score accuracy=0.92 --out .enigma/proof-benchmark-attestation.json
93
+ npx --yes --package enigma-memory enigma chain verify --file .enigma/proof-anchor-batch.json
94
+ ```
95
+
96
+ `enigma chain anchor`, `grant`, `revoke`, `attest`, and `verify` are local planning commands. They create or validate opaque JSON proof-network artifacts for Solana-ready anchoring, but they do not create accounts, sign with private keys, submit transactions, deploy programs, or call RPC providers. Generated chain artifacts must keep `transaction_submitted:false` and `raw_memory_on_chain:false`; if an example needs a memory reference, use a public-safe commitment or receipt root rather than raw memory, prompts, transcripts, completions, embeddings, ACL bodies, tenant names, provider responses, private keys, seed phrases, or credentials.
97
+
98
+ Use proof artifacts as the common exchange format for developer integrations:
99
+
100
+ - **NPM test-drive adopters:** run the test drive, create an anchor batch from local roots/refs, verify the artifact, and attach the JSON to a pull request, demo, or release note without exposing private memory.
101
+ - **Chain artifact builders:** treat `anchor_batch`, `capability_grant`, `capability_revocation`, `benchmark_attestation`, and `packet` as the supported public artifact types. Anchors carry roots/refs/counts for later settlement; grants carry subject, capability, scope, resource refs, policy hashes, and expiry; revocations carry grant hashes and nullifiers; attestations carry report hashes plus dataset, runner, package, and score refs.
102
+ - **Conformance program partners:** build fixtures that accept valid proof-network artifacts and reject artifacts that leak private payload keys or values, omit the false transaction flags, use raw ACL or tenant bodies, or mix raw memory with public chain payloads. A connector should pass conformance before it claims proof-network support.
103
+ - **Benchmark attestation contributors:** hash the benchmark report or pass the report file, then bind it to dataset, runner, and package refs. The attestation makes benchmark evidence portable, but benchmark claims still depend on the benchmark guide's dataset, scoring, and comparison boundaries.
104
+ - **Connector authors:** wallet, agent, MCP, CI, and dashboard connectors can verify packets, display opaque Solana-ready roots, enforce grants before retrieval, publish revocation/nullifier artifacts when access ends, and keep private bundles off-chain while sharing verifiable commitments.
105
+
106
+ Conformance should stay narrow and testable. A proof-network connector is ready for public examples when it can:
107
+
108
+ 1. accept every supported proof-network artifact shape and return a deterministic validation result;
109
+ 2. reject any artifact containing private-looking field names or values before display, upload, signing, or indexing;
110
+ 3. preserve `transaction_submitted:false` unless a separate reviewed settlement path actually submits a transaction;
111
+ 4. preserve `raw_memory_on_chain:false` for every chain-facing artifact;
112
+ 5. enforce capability grant subject, capability, scope, resource-ref, policy-hash, and expiry constraints before retrieval;
113
+ 6. accept capability revocations/nullifiers and stop treating revoked grants as usable;
114
+ 7. bind benchmark attestations to report hashes/files plus dataset, runner, and package refs without importing the raw benchmark corpus or private model output.
115
+
116
+ Good first connector projects are deliberately small: a CLI verifier that fails CI on leaked private payloads, a wallet preview that shows only roots/scopes/expiry/nullifiers, an MCP middleware that blocks retrieval without a live grant, a benchmark dashboard that accepts attestation JSON beside a report hash, and a Solana explorer plugin that labels opaque anchor batches without claiming transaction submission.
117
+
118
+ This path is intentionally copyable: npm install, run a local test drive, generate proof artifacts, verify them, then wire the same public-safe contract into a connector or conformance test. Do not position it as live settlement, provider deletion proof, compliance certification, or benchmark leadership without the separate evidence those claims require.
119
+
120
+ ## MCP client loop
121
+
122
+ The same installed package can be used by Claude Desktop, Cursor, Kimi Code, or any generic MCP client. The smooth path is still one local setup plus a dry-run connector preview: `enigma setup --overwrite`, then `enigma connect claude-desktop --dry-run` or the matching client id. Remove `--dry-run` only when you explicitly want Enigma to write that client config. Manual snippets remain useful when a client needs a copied entry; replace the bundle path with the local path from your setup output, and restart the client.
123
+
124
+ Claude Desktop:
125
+
126
+ ```json
127
+ {
128
+ "mcpServers": {
129
+ "enigma": {
130
+ "command": "enigma-mcp",
131
+ "args": [],
132
+ "env": {
133
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
134
+ }
135
+ }
136
+ }
137
+ }
138
+ ```
139
+
140
+ Cursor:
141
+
142
+ ```json
143
+ {
144
+ "mcpServers": {
145
+ "enigma": {
146
+ "command": "enigma-mcp",
147
+ "args": [],
148
+ "env": {
149
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
150
+ }
151
+ }
152
+ }
153
+ }
154
+ ```
155
+
156
+ Kimi Code:
157
+
158
+ ```json
159
+ {
160
+ "mcpServers": {
161
+ "enigma": {
162
+ "command": "enigma-mcp",
163
+ "args": [],
164
+ "env": {
165
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
166
+ }
167
+ }
168
+ }
169
+ }
170
+ ```
171
+
172
+ Generic MCP:
173
+
174
+ ```json
175
+ {
176
+ "mcpServers": {
177
+ "enigma": {
178
+ "command": "enigma-mcp",
179
+ "args": [],
180
+ "env": {
181
+ "ENIGMA_BUNDLE": "/absolute/path/to/.enigma/bundle.json"
182
+ }
183
+ }
184
+ }
185
+ }
186
+ ```
187
+
188
+ Do not commit private bundle paths if they reveal local usernames, workspace names, account ids, or other personal details.
189
+
190
+ ## Claim boundaries for developers
191
+
192
+ Enigma proof artifacts cover Enigma-controlled or Enigma-mediated state: local vault events, receipts, active/tombstoned memory addresses, context-pack retrieval/injection receipts, relay/gateway records, usage events, and settlement receipts.
193
+
194
+ They do not prove:
195
+
196
+ - provider-side deletion;
197
+ - model forgetting;
198
+ - compliance certification;
199
+ - token ROI, investment outcome, or provider invoice savings;
200
+ - hosted-cloud readiness from a local demo;
201
+ - benchmark leadership from SDK mechanics alone.
202
+
203
+ Benchmark claims require benchmark-specific evidence. LoCoMo covers long-term conversational memory QA, event summarization, and multimodal generation across long conversations. LongMemEval covers extraction, multi-session reasoning, temporal reasoning, knowledge updates, and abstention. Agent-memory benchmark results can depend heavily on the agent/framework/tool loop, not only on the memory store. Keep those distinctions when writing integrations or public copy.
204
+
205
+ ## What to keep out of examples
206
+
207
+ Do not add secrets, tokens, 2FA codes, cloud account ids, personal data, provider transcripts, raw private memory, absolute local paths, or unreviewed hosted endpoints to examples/templates. Public-safe examples should use generic ids, relative paths, placeholders, hashes, commitments, counts, receipt ids, and roots.
@@ -141,7 +141,7 @@ npx --yes --package enigma-memory enigma chain attest \
141
141
  --report-hash sha256:6666666666666666666666666666666666666666666666666666666666666666 \
142
142
  --dataset-ref dataset:quickstart-public-fixture:v1 \
143
143
  --runner-ref runner:enigma-local:v1 \
144
- --package-ref npm:enigma-memory@0.1.15 \
144
+ --package-ref npm:enigma-memory@0.1.17 \
145
145
  --score recall_at_5=1 \
146
146
  --score p95_latency_ms=14 \
147
147
  --out .enigma/proof-quickstart/benchmark-attestation.json
@@ -154,7 +154,7 @@ npx --yes --package enigma-memory enigma chain attest \
154
154
  --report-file .enigma/proof-quickstart/reviewed-benchmark-report.json \
155
155
  --dataset-ref dataset:quickstart-public-fixture:v1 \
156
156
  --runner-ref runner:enigma-local:v1 \
157
- --package-ref npm:enigma-memory@0.1.15 \
157
+ --package-ref npm:enigma-memory@0.1.17 \
158
158
  --score recall_at_5=1 \
159
159
  --score p95_latency_ms=14 \
160
160
  --out .enigma/proof-quickstart/benchmark-attestation.json
@@ -282,7 +282,7 @@ const attestation = createBenchmarkAttestation({
282
282
  report_hash: 'sha256:6666666666666666666666666666666666666666666666666666666666666666',
283
283
  dataset_ref: 'dataset:quickstart-public-fixture:v1',
284
284
  runner_ref: 'runner:enigma-local:v1',
285
- package_ref: 'npm:enigma-memory@0.1.15',
285
+ package_ref: 'npm:enigma-memory@0.1.17',
286
286
  sample_count: 12,
287
287
  run_count: 1,
288
288
  });
@@ -341,7 +341,7 @@ The negative fixture set should include intentionally unsafe keys and values so
341
341
  "subject": {
342
342
  "name_ref": "public-package-or-client-ref",
343
343
  "version": "0.0.0",
344
- "enigma_version": "0.1.15"
344
+ "enigma_version": "0.1.17"
345
345
  },
346
346
  "commands": [
347
347
  {
@@ -16,11 +16,14 @@ The source package now has pure contract builders and validators in `packages/ho
16
16
  - backup drill records;
17
17
  - incident and SLA reference records;
18
18
  - customer lifecycle packets that aggregate those surfaces for launch-readiness evidence.
19
+ - hosted cloud readiness aggregator packets that roll all lifecycle surfaces, auth, billing, legal/DPA, support, security review, monitoring, backup, KMS/BYOK, and operator go-live refs into one public-safe readiness assessment.
19
20
 
20
21
  These functions are contract and validation code only. They do not call an auth provider, billing provider, cloud deployment, KMS, backup target, support desk, status page, SIEM, or model provider. They are safe to import as package code because they do not start servers, read user files, mutate deployment state, publish packages, or contact external accounts.
21
22
 
22
23
  The lifecycle packet public APIs are `buildCustomerLifecyclePacket(input)` / `validateCustomerLifecyclePacket(packet)` and `buildApiKeyLifecyclePacket(input)` / `validateApiKeyLifecyclePacket(packet)` under `enigma-memory/hosted-cloud`; the script commands below emit the same schemas for release evidence.
23
24
 
25
+ The readiness aggregator APIs are `buildHostedCloudReadinessPacket(input)` / `validateHostedCloudReadinessPacket(packet)` under `enigma-memory/hosted-cloud`; the `--readiness` script flag emits the same schema for release evidence.
26
+
24
27
  The validators enforce hosted-cloud boundaries:
25
28
 
26
29
  - contract artifacts must include `operator_evidence_refs` for auth provider, billing provider, legal docs, data processing terms, support ownership, and external security review;
@@ -49,6 +52,8 @@ Hosted cloud remains blocked until an operator wires and records evidence for al
49
52
 
50
53
  A `provided` operator evidence ref means the contract can point to external evidence. It still does not by itself make hosted cloud sellable; an operator must complete the release checklist and issue go-live approval. A `blocked_external_dependency` ref is an explicit blocker, not fake evidence.
51
54
 
55
+ Hosted relay/gateway readiness is a separate backend health boundary, not hosted-cloud sellability. Operators may validate the backend path with `npm run production:hosted-collect` followed by `npm run production:hosted-live`, but those commands only prove public HTTPS relay/gateway probes and required hosted refs for the named environment. They do not wire auth, billing, legal terms, support, security review, customer lifecycle, API key lifecycle, or operator SaaS go-live approval.
56
+
52
57
  ## Consolidated unblocker report
53
58
 
54
59
  Before treating hosted cloud as sellable, run the consolidated public-safe unblocker report:
@@ -73,6 +78,32 @@ The command writes public-safe validation evidence only. It must not receive or
73
78
 
74
79
  The packet records lifecycle events, required evidence refs, missing evidence refs, malformed operation blockers, the operator approval ref, readiness status, `customer_api_keys_live`, and no-secret/no-plaintext guarantees. Missing evidence refs, blocked evidence refs, malformed operation surfaces, or absent operator approval keep `customer_api_keys_live:false`.
75
80
 
81
+ ## Contract-ready vs sellable
82
+
83
+ Hosted cloud has two distinct readiness states:
84
+
85
+ - **Contract-ready**: The contract builders and validators exist, produce deterministic public-safe JSON, and enforce the privacy firewall (no raw memory, plaintext prompts, provider payloads, credentials, API key material, or forbidden claims). Every surface emits `readiness.contract_ready: true` and `readiness.integration_kind: "contract_validator_only"`. This state is reached now — the package code is safe to import and validates evidence structure.
86
+
87
+ - **Sellable**: The hosted cloud product is ready to sell to customers. This requires every readiness surface to have provided evidence refs, both the customer lifecycle packet and API key lifecycle packet to be embedded and approved, and an explicit operator go-live approval ref. This state is not reached until real external provider wiring, legal approval, security review, and operator sign-off exist.
88
+
89
+ A readiness packet or lifecycle packet may mark `hosted_cloud_sellable: true` only when all evidence refs are provided, both underlying lifecycle packets are sellable, and an operator go-live approval ref is supplied. Contract-ready is a code-quality state; sellable is an operational state that depends on external systems and human approval.
90
+
91
+ ## Hosted cloud readiness aggregator
92
+
93
+ `npm run production:hosted-customer -- --readiness --tenant <id> --domain <domain> --environment <env> --operator-go-live-ref <ref> --out <file>` builds `enigma.hosted_cloud.readiness_packet.v1`, a single public-safe packet that rolls all lifecycle surfaces plus auth, billing, legal/DPA, support, security review, monitoring, backup, KMS/BYOK, and operator go-live refs into one readiness assessment.
94
+
95
+ The readiness aggregator:
96
+
97
+ - accepts an optional `customer_lifecycle_packet` and `api_key_lifecycle_packet` (or builds a lifecycle packet from script args);
98
+ - derives readiness surface evidence from the lifecycle packet's phase evidence when available;
99
+ - propagates `external_blockers` from both embedded lifecycle packets as `propagated_lifecycle_blockers` (prefixed `customer_lifecycle.*` and `api_key_lifecycle.*`) — these are never masked;
100
+ - gates `hosted_cloud_sellable` on: all 8 readiness surfaces provided + operator go-live ref + customer lifecycle packet embedded and sellable + API key lifecycle packet embedded with operator approval ref;
101
+ - gates API key lifecycle readiness on `operator_approval_ref` (operator-provided evidence), not a self-asserted boolean;
102
+ - emits a `dashboard` block with counts, status refs, blocker refs, next actions, and safety summary for a future tenant dashboard;
103
+ - emits a schema-versioned packet with `propagated_lifecycle_blockers`, `readiness_surfaces`, and no-secret/no-plaintext guarantees.
104
+
105
+ If either lifecycle packet is missing, a propagated blocker notes its absence. If either is embedded but not sellable/approved, its individual blockers propagate through. The readiness packet never claims live hosted SaaS, provider wiring, or deployment — it is evidence validation only.
106
+
76
107
  ## Non-claims
77
108
 
78
109
  Hosted cloud collateral must not say or imply: