enigma-memory 0.1.16 → 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.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Enigma Memory is a local-first AI Memory Passport. It gives you one canonical local memory vault, receipt-backed proof for Enigma-controlled events, and MCP connections into assistants such as Claude Desktop, Cursor, Kimi Code, and generic MCP clients.
4
4
 
5
- Start with `enigma setup --overwrite` below. You do not need to understand relay, gateway, mesh, browser, desktop, hosted infrastructure, or the proof network before trying Enigma locally.
5
+ Start with the Memory Drive loop below — one install, one connect, then health and status verification. You do not need to understand relay, gateway, mesh, browser, desktop, hosted infrastructure, or the proof network before trying Enigma locally.
6
6
 
7
7
  The package path needs no database, provider credential, cloud credential, npm publishing token, or external account. Hosted cloud and BYOC operation are separate advanced modes that require real deployment credentials, domains, TLS, durable storage, KMS/secrets, monitoring, backups, and operator acceptance.
8
8
 
@@ -16,21 +16,25 @@ Prerequisites:
16
16
  - No database, package registry account, provider credential, cloud credential, hosted Enigma account, or external account for the local setup path
17
17
  - Git only when you choose the advanced source-checkout path
18
18
 
19
- Use Enigma as a one-time AI Memory Passport setup: install the package, create the local Enigma workspace once, then use the same memory/search/context/verify/connect loop from any supported client.
19
+ Use Enigma as your private Memory Drive for AI: install once, connect the AI clients you already have, then inspect drive health and passport status before remembering, retrieving, packaging, and verifying context.
20
20
 
21
21
  ```sh
22
22
  npm install -g enigma-memory
23
- enigma setup --overwrite
23
+ enigma init
24
+ enigma setup --client auto --connect-installed --overwrite
25
+ enigma drive health
26
+ enigma status
24
27
  enigma remember --text-file ./memory.txt
25
- enigma search --query "..."
26
- enigma context --query "..." --optimize
28
+ enigma search --query "project context"
29
+ enigma context --query "project context" --optimize
27
30
  enigma verify --export ./.enigma/export.json
28
- enigma connect claude-desktop --dry-run
29
31
  ```
30
32
 
31
- `enigma setup --overwrite` writes local Enigma artifacts under the workspace `.enigma` path and emits deterministic, public-safe JSON without printing raw memory plaintext. It does not write Claude, Cursor, Kimi, or other third-party app configs. Client config writes happen only when you explicitly run `enigma connect <client>` without `--dry-run`; keep `--dry-run` while reviewing the planned MCP entry.
33
+ `enigma init` is the credential-free first run: it creates the local `.enigma` workspace, bundle, and proof artifacts and emits public-safe JSON without provider or cloud credentials. `enigma setup --client auto --connect-installed --overwrite` then configures the drive and merges the `mcpServers.enigma` entry into every installed/config-present client it detects (Claude Desktop, Cursor, Kimi Code, VS Code/Cline, Roo, OpenCode, generic MCP). It skips clients that are not installed and never creates configs from scratch; preview with `--dry-run` first if you want to see which clients will be written. The same commands run on Windows PowerShell because the npm global install adds an `enigma.cmd` shim. Neither command prints raw memory plaintext.
34
+
35
+ `enigma drive health` reports a SMART-style memory-drive health packet — freshness, duplicate rate, tombstone backlog, stale derived artifacts, receipt coverage, and connector health — computed from local metadata only, with no network calls or private payloads. It is part of the Memory Drive surface in this release; in any build where it is unavailable, `enigma status` and `enigma doctor` cover the same local passport counts, roots, and connector readiness.
32
36
 
33
- The local Enigma vault remains canonical. Provider-native memory is non-canonical and should be treated as a convenience cache only. Enigma receipts prove Enigma-controlled vault state, receipts, checkpoints, and declared boundary operations; they do not prove provider deletion, provider model forgetting, provider-native memory removal, hosted availability, ROI/savings, or compliance certification.
37
+ `enigma status` shows passport counts, roots, owner display fields, and connector readiness. The local Enigma vault remains canonical. Provider-native memory is non-canonical and should be treated as a convenience cache only. Enigma receipts prove Enigma-controlled vault state, receipts, checkpoints, and declared boundary operations; they do not prove provider deletion, provider model forgetting, provider-native memory removal, hosted availability, ROI/savings, or compliance certification.
34
38
 
35
39
  ## Enigma Proof Network
36
40
 
@@ -146,7 +150,7 @@ Supported connector profiles are:
146
150
  - `opencode`
147
151
  - `generic-mcp`
148
152
 
149
- After `enigma setup --overwrite`, preview a client connection before writing anything:
153
+ The one-command path above (`enigma setup --client auto --connect-installed --overwrite`) already connects every installed/config-present client. To connect or preview a single client instead:
150
154
 
151
155
  ```sh
152
156
  enigma connect claude-desktop --dry-run
@@ -155,7 +159,7 @@ enigma connect kimi-code --dry-run
155
159
  enigma connect generic-mcp --dry-run
156
160
  ```
157
161
 
158
- Remove `--dry-run` from `enigma connect <client>` only after you are ready for Enigma to merge the `mcpServers.enigma` entry into that specific client config. The safe default setup command never writes third-party app configs.
162
+ Remove `--dry-run` from `enigma connect <client>` only after you are ready for Enigma to merge the `mcpServers.enigma` entry into that specific client config. Bare `enigma setup` without `--connect-installed` or `--write-connectors` never writes third-party app configs.
159
163
 
160
164
  Copy-paste MCP snippets:
161
165
 
@@ -6,7 +6,7 @@ import { access, mkdir, readFile, readdir, stat, writeFile } from 'node:fs/promi
6
6
  import { dirname, isAbsolute, join, resolve } from 'node:path';
7
7
  import { pathToFileURL } from 'node:url';
8
8
  import { createVault, remember, recall, updateMemory, deleteMemory, exportBundle } from '../../../packages/vault/src/index.js';
9
- import { createPassport, compileContextPack } from '../../../packages/passport/src/index.js';
9
+ import { createPassport, compileContextPack, createMemoryDriveHealthReport } from '../../../packages/passport/src/index.js';
10
10
  import { runBoundarySimulation } from '../../../packages/boundary/src/index.js';
11
11
  import { startStdioServer } from '../../../packages/mcp-server/src/index.js';
12
12
  import { runMeshDemo } from '../../../packages/mesh/src/index.js';
@@ -36,11 +36,15 @@ import {
36
36
  createCapabilityGrant,
37
37
  createCapabilityRevocation,
38
38
  createProofNetworkAnchorBatch,
39
+ createRegistryEntry,
40
+ createRegistryBatch,
39
41
  sha256Json as proofNetworkSha256Json,
40
42
  validateBenchmarkAttestation,
41
43
  validateCapabilityGrant,
42
44
  validateCapabilityRevocation,
43
45
  validateProofNetworkAnchorBatch,
46
+ validateRegistryEntry,
47
+ validateRegistryBatch,
44
48
  validateProofNetworkPacket,
45
49
  } from '../../../packages/proof-network/src/index.js';
46
50
 
@@ -1059,13 +1063,16 @@ function oneCommandInstallConnect(bundleDisplay = DEFAULT_BUNDLE, outDirDisplay
1059
1063
 
1060
1064
  function setupNextCommands(bundleInput, exportDisplay, clients, writeConnectors) {
1061
1065
  const primaryClient = clients[0] ?? DEFAULT_SETUP_CLIENTS[0];
1066
+ const bundle = commandPath(bundleInput);
1062
1067
  const commands = [
1063
- `enigma remember --bundle ${commandPath(bundleInput)} --text-file ./memory.txt`,
1064
- `enigma search --bundle ${commandPath(bundleInput)} --query "project context"`,
1065
- `enigma context --bundle ${commandPath(bundleInput)} --query "project context"`,
1068
+ `enigma status --bundle ${bundle}`,
1069
+ `enigma drive health --bundle ${bundle}`,
1070
+ `enigma remember --bundle ${bundle} --text-file ./memory.txt`,
1071
+ `enigma search --bundle ${bundle} --query "project context"`,
1072
+ `enigma context --bundle ${bundle} --query "project context"`,
1066
1073
  `enigma verify --export ${commandPath(exportDisplay)}`,
1067
1074
  ];
1068
- if (!writeConnectors) commands.push(`enigma connect ${primaryClient} --bundle ${commandPath(bundleInput)} --dry-run`);
1075
+ if (!writeConnectors) commands.push(`enigma connect ${primaryClient} --bundle ${bundle} --dry-run`);
1069
1076
  return commands;
1070
1077
  }
1071
1078
 
@@ -1086,10 +1093,13 @@ function initNextCommands({ dryRun, bundleDisplay, outDirDisplay, exportDisplay,
1086
1093
 
1087
1094
  function doctorNextCommands(bundleDisplay, client) {
1088
1095
  const clientId = client ?? DEFAULT_SETUP_CLIENTS[0];
1096
+ const bundle = commandPath(bundleDisplay);
1089
1097
  return [
1090
- `enigma setup --bundle ${commandPath(bundleDisplay)}`,
1091
- `enigma doctor --bundle ${commandPath(bundleDisplay)} --client ${clientId}`,
1092
- `enigma connect ${clientId} --bundle ${commandPath(bundleDisplay)}`,
1098
+ `enigma status --bundle ${bundle}`,
1099
+ `enigma drive health --bundle ${bundle}`,
1100
+ `enigma setup --bundle ${bundle}`,
1101
+ `enigma doctor --bundle ${bundle} --client ${clientId}`,
1102
+ `enigma connect ${clientId} --bundle ${bundle}`,
1093
1103
  ];
1094
1104
  }
1095
1105
 
@@ -1690,6 +1700,27 @@ async function statusCommand(flags, io) {
1690
1700
  print(passportStatusReport({ bundlePath, stored, vault, passport }), io);
1691
1701
  return 0;
1692
1702
  }
1703
+ async function readOptionalJsonInput(flags, names) {
1704
+ const path = getFlag(flags, names);
1705
+ if (!path) return null;
1706
+ if (!(await fileExists(path))) return null;
1707
+ return readJson(path);
1708
+ }
1709
+
1710
+ async function driveHealthCommand(flags, io) {
1711
+ const bundlePath = resolve(String(getFlag(flags, ['bundle', 'file'], DEFAULT_BUNDLE)));
1712
+ const { vault, passport } = await loadState(bundlePath);
1713
+ const benchmarkSummary = await readOptionalJsonInput(flags, ['benchmark-summary', 'benchmarkSummary']);
1714
+ const connectorSummary = await readOptionalJsonInput(flags, ['connector-summary', 'connectorSummary']);
1715
+ const replicas = await readOptionalJsonInput(flags, ['replicas']);
1716
+ const latestAnchorBatchRef = getFlag(flags, ['latest-anchor-batch-ref', 'latestAnchorBatchRef']);
1717
+ const now = getFlag(flags, ['now'], '2026-06-25T00:00:00.000Z');
1718
+ const report = createMemoryDriveHealthReport({ vault, passport, benchmarkSummary, connectorSummary, replicas, latestAnchorBatchRef, now });
1719
+ const outPath = getFlag(flags, ['out']);
1720
+ if (outPath) await writeJson(outPath, report);
1721
+ print(report, io);
1722
+ return 0;
1723
+ }
1693
1724
 
1694
1725
  function testDrivePathDisplay(outDirInput, name) {
1695
1726
  return isAbsolute(outDirInput) ? join(outDirInput, name) : quickstartPathDisplay(outDirInput, name);
@@ -1746,6 +1777,7 @@ function testDriveNextCommands(bundleDisplay, crossModelReportDisplay) {
1746
1777
  const quotedReport = commandPath(crossModelReportDisplay);
1747
1778
  return [
1748
1779
  `enigma status --bundle ${quotedBundle}`,
1780
+ `enigma drive health --bundle ${quotedBundle}`,
1749
1781
  `enigma search --bundle ${quotedBundle} --query "local proof bundle"`,
1750
1782
  `enigma demo cross-model --bundle ${quotedBundle} --out ${quotedReport}`,
1751
1783
  'enigma setup --overwrite',
@@ -1760,6 +1792,7 @@ function testDriveFlowCommands({ bundleDisplay, outDirInput, crossModelReportDis
1760
1792
  return [
1761
1793
  `enigma quickstart --bundle ${quotedBundle} --out-dir ${quotedOutDir}${overwriteSuffix}`,
1762
1794
  `enigma status --bundle ${quotedBundle}`,
1795
+ `enigma drive health --bundle ${quotedBundle}`,
1763
1796
  `enigma search --bundle ${quotedBundle} --query "local proof bundle"`,
1764
1797
  `enigma demo cross-model --bundle ${quotedBundle} --out ${quotedReport}`,
1765
1798
  ];
@@ -1953,7 +1986,7 @@ export async function testDriveCommand(flags, io) {
1953
1986
  out_dir: outDirInput,
1954
1987
  bundle: bundleInput,
1955
1988
  install_command: `npm install -g ${packageJson.name ?? 'enigma-memory'}`,
1956
- release_target: '0.1.16',
1989
+ release_target: '0.1.17',
1957
1990
  artifacts_written: !dryRun,
1958
1991
  client_configs_written: false,
1959
1992
  client_config_write_required: false,
@@ -2405,6 +2438,8 @@ function chainArtifactValidator(artifact) {
2405
2438
  if (schema === 'enigma.proof_network.capability_revocation.v1') return [schema, validateCapabilityRevocation];
2406
2439
  if (schema === 'enigma.proof_network.benchmark_attestation.v1') return [schema, validateBenchmarkAttestation];
2407
2440
  if (schema === 'enigma.proof_network.packet.v1') return [schema, validateProofNetworkPacket];
2441
+ if (schema === 'enigma.proof_network.registry_entry.v1') return [schema, validateRegistryEntry];
2442
+ if (schema === 'enigma.proof_network.registry_batch.v1') return [schema, validateRegistryBatch];
2408
2443
  throw new Error(schema ? 'Unsupported proof-network artifact schema.' : 'Unsupported proof-network artifact schema: missing.');
2409
2444
  }
2410
2445
 
@@ -2702,6 +2737,60 @@ export async function chainVerifyCommand(flags, io, positionalFile = undefined)
2702
2737
  return result.ok === true ? 0 : 1;
2703
2738
  }
2704
2739
 
2740
+ export async function chainRegisterCommand(flags, io) {
2741
+ const entryType = requireFlag(flags, ['entry-type', 'entryType', 'type'], 'entry-type');
2742
+ const artifactHashFlag = getFlag(flags, ['artifact-hash', 'artifactHash', 'digest-ref', 'digestRef', 'artifact-ref', 'artifactRef']);
2743
+ const artifactFile = getFlag(flags, ['artifact-file', 'artifactFile']);
2744
+ const resolvedArtifactHash = artifactHashFlag || (artifactFile ? await sha256PublicFile(resolve(String(artifactFile))) : undefined);
2745
+ if (!resolvedArtifactHash) throw new Error('Missing required --artifact-hash or --artifact-file.');
2746
+ const digestRefs = flagValues(flags, ['digest-ref', 'digest-refs', 'digestRef', 'digestRefs', 'root', 'roots']);
2747
+ const entry = createRegistryEntry({
2748
+ entry_type: entryType,
2749
+ artifact_hash: resolvedArtifactHash,
2750
+ artifact_schema_ref: requireFlag(flags, ['artifact-schema-ref', 'artifactSchemaRef', 'schema-ref', 'schemaRef'], 'artifact-schema-ref'),
2751
+ digest_refs: digestRefs.length ? digestRefs : resolvedArtifactHash,
2752
+ signer_refs: flagValues(flags, ['signer', 'signers', 'signer-ref', 'signerRef', 'signer-refs', 'signerRefs', 'attestor', 'attestor-ref', 'attestorRef']),
2753
+ registry_ref: getFlag(flags, ['registry-ref', 'registryRef', 'marketplace-ref', 'marketplaceRef']),
2754
+ entry_ref: getFlag(flags, ['entry-ref', 'entryRef']),
2755
+ entry_count: getFlag(flags, ['entry-count', 'entryCount', 'count']),
2756
+ created_at: getFlag(flags, ['created-at', 'createdAt', 'registered-at', 'registeredAt']),
2757
+ transaction_submitted: false,
2758
+ raw_memory_on_chain: false,
2759
+ });
2760
+ assertChainArtifact(validateRegistryEntry, entry);
2761
+ return chainWriteOrPrint(flags, io, entry, {
2762
+ artifact_type: entry.schema,
2763
+ registry_entry_id: entry.registry_entry_id,
2764
+ registry_entry_hash: entry.registry_entry_hash ?? proofNetworkSha256Json(entry),
2765
+ });
2766
+ }
2767
+
2768
+ export async function chainRegistryCommand(flags, io, positionalFile = undefined) {
2769
+ const entryPaths = flagValues(flags, ['entry', 'entries', 'entry-file', 'entryFile']);
2770
+ const positionalEntry = positionalFile && !String(positionalFile).startsWith('--') ? positionalFile : undefined;
2771
+ const paths = entryPaths.length ? entryPaths : (positionalEntry ? [positionalEntry] : []);
2772
+ if (paths.length === 0) throw new Error('Missing required --entry <registry-entry.json>.');
2773
+ const entries = [];
2774
+ for (const entryPath of paths) {
2775
+ const entry = await readJson(resolve(entryPath));
2776
+ assertNoPrivateProofPayload(entry);
2777
+ entries.push(entry);
2778
+ }
2779
+ const batch = createRegistryBatch({
2780
+ entries,
2781
+ registry_ref: getFlag(flags, ['registry-ref', 'registryRef', 'marketplace-ref', 'marketplaceRef']),
2782
+ created_at: getFlag(flags, ['created-at', 'createdAt']),
2783
+ transaction_submitted: false,
2784
+ raw_memory_on_chain: false,
2785
+ });
2786
+ assertChainArtifact(validateRegistryBatch, batch);
2787
+ return chainWriteOrPrint(flags, io, batch, {
2788
+ artifact_type: batch.schema,
2789
+ registry_batch_id: batch.registry_batch_id,
2790
+ registry_batch_hash: batch.registry_batch_hash ?? proofNetworkSha256Json(batch),
2791
+ });
2792
+ }
2793
+
2705
2794
 
2706
2795
  export async function meterEventCommand(flags, io) {
2707
2796
  const event = createUsageEvent({
@@ -2927,6 +3016,9 @@ function usage() {
2927
3016
  'chain attest',
2928
3017
  'chain verify',
2929
3018
  'chain submit-solana',
3019
+ 'chain register',
3020
+ 'chain registry',
3021
+ 'drive health',
2930
3022
  ],
2931
3023
  connector_options: {
2932
3024
  '--bundle <path>': 'Absolute local Enigma vault bundle path rendered as ENIGMA_BUNDLE.',
@@ -3047,9 +3139,26 @@ function usage() {
3047
3139
  revoke: 'enigma chain revoke --grant-hash <sha256:...> --reason <public-reason-code> [--revocation-ref <public-ref>] [--out <file>]',
3048
3140
  attest: 'enigma chain attest (--report-hash <sha256:...> | --report-file <report.json>) --dataset-ref <sha256:...> --runner-ref <public-runner-ref> --package-ref <public-package-ref> [--score name=value] [--out <file>]',
3049
3141
  verify: 'enigma chain verify --file <proof-artifact.json>',
3142
+ register: 'enigma chain register --entry-type <anchor_batch|benchmark_attestation|connector_conformance|health_report|operator_receipt|settlement_job> (--artifact-hash <sha256:...> | --artifact-file <artifact.json>) --artifact-schema-ref <schema-id> [--digest-ref <sha256:...>] [--signer <public-ref>] [--registry-ref <public-ref>] [--entry-ref <public-ref>] [--entry-count <n>] [--out <file>]',
3143
+ registry: 'enigma chain registry --entry <registry-entry.json> [--entry <registry-entry.json>] [--registry-ref <public-ref>] [--out <file>]',
3050
3144
  submit_solana: 'enigma chain submit-solana --file <proof-artifact.json> --cluster <devnet|testnet|mainnet-beta|localnet> [--rpc <url>] [--execute --keypair <solana-cli-64-byte-keypair.json>]',
3051
3145
  boundary: 'Proof Network chain commands default to local planning and dry-run validation. submit-solana only submits a Solana Memo transaction when --execute is passed; it carries compact public-safe commitment/ref JSON, never raw memory or artifact bodies.',
3052
3146
  },
3147
+ memory_drive_health: {
3148
+ command: 'enigma drive health --bundle <path> [--now <iso>] [--benchmark-summary <path>] [--connector-summary <path>] [--replicas <path>] [--latest-anchor-batch-ref <ref>] [--out <file>]',
3149
+ schema: 'enigma.memory_drive_health_report.v1',
3150
+ output_shape: 'SMART-style report: overall_status/overall_score, ten metrics (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/recommended_actions, plus roots, privacy_boundaries, claim_boundaries, and a conservative proof_network_ready block.',
3151
+ options: {
3152
+ '--bundle <path>': 'Local Enigma vault bundle to inspect. Defaults to .enigma/bundle.json.',
3153
+ '--now <iso>': 'ISO-8601 timestamp used for age calculations. Defaults to a deterministic timestamp.',
3154
+ '--benchmark-summary <path>': 'Optional JSON file with public-safe retrieval probes (probe_count, top_k, hit_at_k, exact_coverage, abstention_correctness). Omit to default gracefully.',
3155
+ '--connector-summary <path>': 'Optional JSON file with public-safe connector health (connector_count, healthy_connector_count, lagging_connector_count, error_rate_24h, cursor_gap_count). Omit to default gracefully.',
3156
+ '--replicas <path>': 'Optional JSON file of replica root reports for sync fork risk.',
3157
+ '--latest-anchor-batch-ref <ref>': 'Optional public-safe proof-network anchor batch ref for receipt coverage.',
3158
+ '--out <path>': 'Write the JSON report to a file in addition to stdout.',
3159
+ },
3160
+ boundary: 'Computed locally from public-safe counters, roots, receipt metadata, tombstones, and derived/context-pack refs only. No network or chain calls; transaction_submitted and raw_memory_on_chain are always false. It is local operational evidence, not provider-deletion, model-forgetting, compliance, or live-chain-settlement proof.',
3161
+ },
3053
3162
  relay_gateway_options: {
3054
3163
  '--host <host>': 'Bind host. Defaults to 127.0.0.1.',
3055
3164
  '--port <port>': `Bind port. Defaults to ${DEFAULT_RELAY_PORT} for relay and ${DEFAULT_GATEWAY_PORT} for gateway.`,
@@ -3076,10 +3185,10 @@ export async function main(argv = process.argv.slice(2), io = { stdout: process.
3076
3185
  print(usage(), io);
3077
3186
  return 0;
3078
3187
  }
3079
- const twoPartCommands = ['boundary', 'mcp', 'mesh', 'enterprise', 'capsule', 'relay', 'gateway', 'connect', 'disconnect', 'import', 'native-host', 'meter', 'settlement', 'chain', 'demo', 'passport'];
3188
+ const twoPartCommands = ['boundary', 'mcp', 'mesh', 'enterprise', 'capsule', 'relay', 'gateway', 'connect', 'disconnect', 'import', 'native-host', 'meter', 'settlement', 'chain', 'demo', 'passport', 'drive'];
3080
3189
  const flags = parseArgs(twoPartCommands.includes(command) ? argv.slice(2) : argv.slice(1));
3081
3190
  const positionalFile = optionalPositional(argv[2]);
3082
- if ((command === 'chain' && (!subcommand || subcommand === '--help' || subcommand === '-h' || flags.has('help'))) || ((flags.has('help') || argv.includes('-h')) && (command === 'init' || command === 'setup' || command === 'test-drive' || command === 'search' || command === 'status' || (command === 'passport' && subcommand === 'status') || ((command === 'relay' || command === 'gateway') && (subcommand === 'serve' || subcommand === 'demo')) || (command === 'native-host' && (subcommand === 'manifest' || subcommand === 'install-plan')) || (command === 'demo' && subcommand === 'cross-model')))) {
3191
+ if ((command === 'chain' && (!subcommand || subcommand === '--help' || subcommand === '-h' || flags.has('help'))) || ((flags.has('help') || argv.includes('-h')) && (command === 'init' || command === 'setup' || command === 'test-drive' || command === 'search' || command === 'status' || (command === 'passport' && subcommand === 'status') || ((command === 'relay' || command === 'gateway') && (subcommand === 'serve' || subcommand === 'demo')) || (command === 'native-host' && (subcommand === 'manifest' || subcommand === 'install-plan')) || (command === 'demo' && subcommand === 'cross-model') || (command === 'drive' && subcommand === 'health')))) {
3083
3192
  print(usage(), io);
3084
3193
  return 0;
3085
3194
  }
@@ -3101,6 +3210,7 @@ export async function main(argv = process.argv.slice(2), io = { stdout: process.
3101
3210
  if (command === 'search') return await searchCommand(flags, io);
3102
3211
  if (command === 'status') return await statusCommand(flags, io);
3103
3212
  if (command === 'passport' && subcommand === 'status') return await statusCommand(flags, io);
3213
+ if (command === 'drive' && subcommand === 'health') return await driveHealthCommand(flags, io);
3104
3214
  if (command === 'export') return await exportCommand(flags, io);
3105
3215
  if (command === 'import') return await importCommand(subcommand, flags, io, positionalFile);
3106
3216
  if (command === 'capsule' && subcommand === 'export') return await capsuleExportCommand(flags, io, positionalFile);
@@ -3127,6 +3237,8 @@ export async function main(argv = process.argv.slice(2), io = { stdout: process.
3127
3237
  if (command === 'chain' && subcommand === 'attest') return await chainAttestCommand(flags, io);
3128
3238
  if (command === 'chain' && subcommand === 'verify') return await chainVerifyCommand(flags, io, positionalFile);
3129
3239
  if (command === 'chain' && subcommand === 'submit-solana') return await chainSubmitSolanaCommand(flags, io, positionalFile);
3240
+ if (command === 'chain' && subcommand === 'register') return await chainRegisterCommand(flags, io);
3241
+ if (command === 'chain' && subcommand === 'registry') return await chainRegistryCommand(flags, io, positionalFile);
3130
3242
  if (command === 'native-host' && subcommand === 'install-plan') return await nativeHostInstallPlanCommand(flags, io);
3131
3243
  if (command === 'mesh' && subcommand === 'demo') return await meshDemoCommand(flags, io);
3132
3244
  if (command === 'enterprise' && subcommand === 'demo') return await enterpriseDemoCommand(flags, io);
@@ -169,7 +169,7 @@ Minimum public-safe attestation skeleton:
169
169
  "track": "public_practice",
170
170
  "program": {
171
171
  "name": "enigma_benchmark_attestation_network",
172
- "version": "0.1.16",
172
+ "version": "0.1.17",
173
173
  "policy_ref": "sha256:policy-root"
174
174
  },
175
175
  "run": {
@@ -177,7 +177,7 @@ Minimum public-safe attestation skeleton:
177
177
  "nonce": "sha256:run-nonce-commitment",
178
178
  "status": "completed",
179
179
  "runner_ref": "sha256:runner-root",
180
- "package_ref": "npm:enigma-memory@0.1.16",
180
+ "package_ref": "npm:enigma-memory@0.1.17",
181
181
  "adapter_ref": "local:enigma-relevance",
182
182
  "environment_ref": "sha256:environment-summary-root"
183
183
  },
@@ -4,7 +4,7 @@ This guide explains how to reproduce the current local Enigma memory benchmark,
4
4
 
5
5
  ## What is reproducible today
6
6
 
7
- The current planned package is `enigma-memory@0.1.16`. Two benchmark paths are reproducible without provider credentials:
7
+ The current planned package is `enigma-memory@0.1.17`. Two benchmark paths are reproducible without provider credentials:
8
8
 
9
9
  1. The local deterministic memory suite, available through the package script and the script file it wraps:
10
10
 
@@ -67,7 +67,7 @@ Do not commit downloaded files or raw benchmark conversations. The package `.git
67
67
 
68
68
  ## Reproduce and save local fixture JSON
69
69
 
70
- 1. Use a clean checkout containing `enigma-memory@0.1.16`.
70
+ 1. Use a clean checkout containing `enigma-memory@0.1.17`.
71
71
  2. From a repository root that contains `enigma/package.json`, enter the package directory:
72
72
 
73
73
  ```sh
@@ -142,7 +142,7 @@ Public sharing should include the generated benchmark report JSON and generated
142
142
 
143
143
  ## Proof-network benchmark attestations
144
144
 
145
- For the planned 0.1.16 proof-network layer, benchmark results should be represented as a public-safe local attestation rather than by publishing raw benchmark inputs. The attestation JSON uses `schema: "enigma.proof_network.benchmark_attestation.v1"` and may be bundled in `enigma.proof_network.packet.v1` for review. The benchmark proof-release flow is local planning only: it does not call APIs, submit transactions, or claim hosted SaaS behavior, and generated artifacts must keep `transaction_submitted: false` and `raw_memory_on_chain: false`.
145
+ For the planned 0.1.17 proof-network layer, benchmark results should be represented as a public-safe local attestation rather than by publishing raw benchmark inputs. The attestation JSON uses `schema: "enigma.proof_network.benchmark_attestation.v1"` and may be bundled in `enigma.proof_network.packet.v1` for review. The benchmark proof-release flow is local planning only: it does not call APIs, submit transactions, or claim hosted SaaS behavior, and generated artifacts must keep `transaction_submitted: false` and `raw_memory_on_chain: false`.
146
146
 
147
147
  Hash the generated benchmark report and companion dataset manifest, then attest only the report hash, schema name, dataset refs, runner refs, package refs, score commitments, record counts, top-k/sample bounds, and timestamps needed for review. The public artifacts must not contain raw dataset rows, raw conversations, prompts, private questions, private answers, provider responses, embeddings, credentials, tenant names, account ids, local absolute paths, unpublished benchmark scores, or the raw benchmark report body.
148
148
 
@@ -151,7 +151,7 @@ Use a `sha256:<hex>` commitment for the report and manifest. The proof-release s
151
151
  After running one of the benchmark commands above and confirming the report is public-safe, create a local proof release:
152
152
 
153
153
  ```sh
154
- npm run benchmark:proof-release -- --report .enigma/standard-memory-benchmark-sample.json --dataset-ref "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" --runner-ref "runner:run-standard-memory-benchmarks.mjs@reviewed-revision" --package-ref "enigma-memory@0.1.16" --score "retrieval_evidence_proxy=<value-copied-from-report>" --out-dir .enigma/benchmark-proof-release
154
+ npm run benchmark:proof-release -- --report .enigma/standard-memory-benchmark-sample.json --dataset-ref "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" --runner-ref "runner:run-standard-memory-benchmarks.mjs@reviewed-revision" --package-ref "enigma-memory@0.1.17" --score "retrieval_evidence_proxy=<value-copied-from-report>" --out-dir .enigma/benchmark-proof-release
155
155
  ```
156
156
 
157
157
  The command writes `benchmark-attestation.json`, `benchmark-proof-packet.json`, and `benchmark-proof-release.json` in the output directory. The release manifest uses `schema: "enigma.benchmark_proof_release.v1"` and records explicit boundaries: local benchmark attestation only, local report file hashing only, no network calls, no provider APIs, no API spend, no provider answer-accuracy claim, no competitor performance claim, no Solana submission claim, no hosted SaaS claim, and no ROI/profit/provider-savings claim.
@@ -180,6 +180,55 @@ Use these standards as dataset sources, citations, and task-category references,
180
180
 
181
181
  The local report mirrors some task categories from those benchmarks but does not download or score official records. The standard runner consumes official local dataset files and scores retrieval/evidence coverage; it does not run the original papers' full LLM evaluation pipelines or claim leaderboard-equivalent answer accuracy.
182
182
 
183
+ ## Full-answer benchmark protocol plan (--protocol-plan)
184
+
185
+ The scored standard runner is retrieval/evidence proxy only. A true apples-to-apples full-answer run (same category set, same top-k, same frozen answerer and judge, same prompts, same competitor adapters) is a separate, credentialed benchmark that this package does not execute. `--protocol-plan` is the readiness layer between the two: it emits a public-safe plan of that future protocol without reading datasets, calling providers, generating answers, judging answers, or running competitor adapters.
186
+
187
+ ```sh
188
+ cd enigma
189
+ node 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 --protocol-plan --out .enigma/standard-memory-benchmark-protocol-plan.json
190
+ ```
191
+
192
+ Optionally pin the public-safe model/prompt/protocol refs so the plan records exactly which artifacts a future live run must freeze (defaults mark every ref `not-selected`/`not-pinned`):
193
+
194
+ ```sh
195
+ node scripts/run-standard-memory-benchmarks.mjs --locomo .enigma/benchmarks/datasets/locomo10.json --top-k 5 --protocol-plan \
196
+ --answerer-ref "model:answerer@frozen-revision" \
197
+ --judge-ref "model:judge@frozen-revision" \
198
+ --answer-prompt-ref "prompt:standard-answer@frozen-revision" \
199
+ --judge-prompt-ref "prompt:standard-judge@frozen-revision" \
200
+ --protocol-ref "protocol:apples-to-apples-full-answer@frozen-revision" \
201
+ --out .enigma/standard-memory-benchmark-protocol-plan.json
202
+ ```
203
+
204
+ The emitted schema is `enigma.standard_memory_benchmark_protocol_plan.v1`. It records the planned category set (the same LoCoMo/LongMemEval task categories the scored report uses), `--top-k`, the answerer model ref and judge model ref, the prompt refs and protocol ref, the requirements-only competitor adapter refs, and cost-estimate inputs (sample limits, token caps, temperature, retries, timeout, and a `budget_cap_set:false` flag). It does not contain raw questions, raw answers, prompts, provider responses, embeddings, credentials, dataset bytes, or scores.
205
+
206
+ The plan carries explicit boundaries that must read `false`:
207
+
208
+ | Boundary | Meaning |
209
+ | --- | --- |
210
+ | `protocol_boundaries.network_required` | No network is used to produce the plan. |
211
+ | `protocol_boundaries.provider_calls_made` | No provider APIs are called. |
212
+ | `protocol_boundaries.answers_generated` | No model answers are generated. |
213
+ | `protocol_boundaries.judged` | No answers are judged or graded. |
214
+ | `protocol_boundaries.competitor_adapters_run` | No Mem0 or other competitor adapters are run. |
215
+ | `benchmark_boundaries.llm_answer_accuracy_scored` | The plan is not a score. |
216
+ | `benchmark_boundaries.retrieval_evidence_proxy_scored` | The plan does not even score the retrieval proxy. |
217
+
218
+ The protocol plan can be turned into a local proof release with the same command used for a scored report, because the proof-release builder accepts either a local retrieval proxy report or a protocol-plan report:
219
+
220
+ ```sh
221
+ npm run benchmark:proof-release -- --report .enigma/standard-memory-benchmark-protocol-plan.json --dataset-ref "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" --runner-ref "runner:run-standard-memory-benchmarks.mjs@protocol-plan" --package-ref "enigma-memory@0.1.17" --out-dir .enigma/benchmark-protocol-proof-release
222
+ ```
223
+
224
+ The resulting attestation uses the existing `enigma.proof_network.benchmark_attestation.v1` schema and binds the protocol-plan report hash plus `report_hash_only` metric roots; it does not copy the report body. A protocol-plan proof release is evidence of protocol readiness only. It is not evidence that answers were generated, that answers were judged, that any provider or competitor was called or 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.
225
+
226
+ ### What the protocol plan proves and does not prove
227
+
228
+ **Proves:** the exact category set, top-k, planned answerer/judge model refs, prompt/protocol refs, competitor adapter refs, and cost-estimate inputs that a future full-answer run would freeze, plus the explicit no-network/no-provider/no-answers/no-judgement boundary.
229
+
230
+ **Does not prove:** that any model answered correctly, that any model was judged, that any provider or competitor ran, that prompts are final, that a budget cap was set, or that the planned run would favor Enigma. Pinned refs mark which artifacts a future run must freeze; they are not a claim that the run happened or succeeded.
231
+
183
232
  ## Future provider answer-accuracy runs
184
233
 
185
234
  A real answer-accuracy run is a different benchmark from the current standard runner. It would need all of the following before any answer-correctness or model-quality claim is published:
@@ -166,6 +166,8 @@ Keep private:
166
166
 
167
167
  The registry should answer, "Which public key attested to which digest under which schema?" It should not answer, "What private data produced that digest?" Disclosure of the underlying report is a separate permissioned review action.
168
168
 
169
+ The local Enigma artifacts that prepare this registry are `enigma.proof_network.registry_entry.v1` and `enigma.proof_network.registry_batch.v1`. A registry entry binds one already-created artifact (anchor batch, benchmark attestation, connector conformance attestation, health report, operator receipt, or settlement job ref) to a public-safe `registry_ref`, the artifact schema ref, digest refs, signer refs, an entry type, and a count — never the artifact body. A registry batch sorts entry hashes into a single registry root. Both are local planning artifacts: they carry `transaction_submitted:false` and `raw_memory_on_chain:false`, and they do not prove that any marketplace, registry program, or live chain has adopted the index. What the chain would uniquely add is shared discovery (any verifier can resolve an indexed digest by package, dataset, runner, or operator key without trusting one private API) and signer accountability (the public key that attested to a digest is recorded alongside it); neither requires revealing the private report behind the digest.
170
+
169
171
  ## Mechanism 5: USDC escrow and settlement
170
172
 
171
173
  ### Blockchain-native value
@@ -292,6 +294,7 @@ The public rail should be modeled as a small state machine over commitments, not
292
294
  | Grant record | program id, `grant`, issuer key, subject key, scope digest, capability | grant id, capability, scope digest, expiry, revocation ref | Was this public subject granted this scoped capability at this time? |
293
295
  | Nullifier record | program id, `nullifier`, nullifier digest | nullifier digest, issuer key, effective slot, optional safe reason ref | Should verifiers reject the matching grant, scope, or one-time proof? |
294
296
  | Attestation record | program id, `attestation`, attestor key, report or packet digest | digest, attestation type, public-safe refs, slot, signature | Which public key attested to this digest under which schema? |
297
+ | Registry index record | program id, `registry`, registry namespace ref, artifact digest, attestor key | artifact digest, artifact schema ref, entry type, public-safe digest/signer refs, count, slot, signature | Which public key indexed which digest under which schema and registry namespace? |
295
298
  | Escrow record | program id, `escrow`, payer key, operator key, job ref | token mint, amount, proof refs, release rule, timeout, state | Are funds locked, releasable, refundable, or disputed against public-safe refs? |
296
299
  | Reputation index | program id, `operator`, operator key | counters, correction refs, challenge refs, signer rotation refs | What public-key history can be checked without private customer facts? |
297
300
 
@@ -342,6 +345,15 @@ The chain contributes shared permission and revocation state. It does not expose
342
345
 
343
346
  The chain contributes shared discovery and signer accountability. It does not publish raw benchmark examples or private results.
344
347
 
348
+ ### Marketplace registry index
349
+
350
+ 1. Enigma creates one or more proof artifacts (anchor, attestation, health report, operator receipt, or settlement job ref) and keeps their bodies private.
351
+ 2. Enigma emits a registry entry per artifact that records only the artifact hash, schema ref, digest refs, signer refs, entry type, and a registry namespace ref.
352
+ 3. Enigma aggregates entries into a registry batch whose root commits to the whole index.
353
+ 4. A reviewer resolves individual artifact hashes through approved private channels; a public observer can see only that a digest was indexed under a schema by named signers.
354
+
355
+ The chain would contribute shared discovery and signer accountability. The local registry artifacts do not broadcast to a marketplace, register on a live chain, or prove third-party adoption.
356
+
345
357
  ### Escrow for proof-backed operator work
346
358
 
347
359
  1. A payer would lock USDC against a job ref and release rule.
@@ -16,15 +16,19 @@ Supported connector IDs:
16
16
 
17
17
  ```sh
18
18
  npm install -g enigma-memory
19
- enigma setup --overwrite
19
+ enigma init
20
+ enigma setup --client auto --connect-installed --overwrite
21
+ enigma drive health
22
+ enigma status
20
23
  enigma remember --text-file ./memory.txt
21
- enigma search --query "..."
22
- enigma context --query "..." --optimize
24
+ enigma search --query "project context"
25
+ enigma context --query "project context" --optimize
23
26
  enigma verify --export ./.enigma/export.json
24
- enigma connect claude-desktop --dry-run
25
27
  ```
26
28
 
27
- `enigma setup --overwrite` writes local Enigma artifacts under the workspace `.enigma` path and emits deterministic, public-safe JSON without printing raw memory plaintext. It does not write Claude, Cursor, Kimi, VS Code, Roo, OpenCode, or generic MCP client configs. Client config writes happen only when you explicitly run `enigma connect <client>` without `--dry-run`.
29
+ One command connects every installed client: `enigma setup --client auto --connect-installed --overwrite` writes the `mcpServers.enigma` entry into every installed/config-present client it detects (Claude Desktop, Cursor, Kimi Code, VS Code/Cline, Roo, OpenCode, generic MCP). It skips clients that are not installed and never creates configs from scratch; preview with `--dry-run` first. `enigma drive health` reports a SMART-style memory-drive health packet (freshness, 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. No setup command prints raw memory plaintext.
30
+
31
+ For a single client, or to preview before writing, use `enigma connect <client> --dry-run` and then drop `--dry-run`.
28
32
 
29
33
  Provider-native memory is non-canonical cache only in this architecture. The Enigma vault remains canonical, and Enigma receipts prove Enigma-controlled lifecycle events; they do not prove that a hosted provider deleted hidden copies or that a model forgot anything.
30
34
 
@@ -201,7 +201,7 @@ enigma chain attest \
201
201
  --report-hash sha256:5555555555555555555555555555555555555555555555555555555555555555 \
202
202
  --dataset-ref enigma-fixture:deterministic-local:v1 \
203
203
  --runner-ref enigma-memory:local-benchmark-runner:v1 \
204
- --package-ref npm:enigma-memory@0.1.16 \
204
+ --package-ref npm:enigma-memory@0.1.17 \
205
205
  --score recall_at_5=1 \
206
206
  --score p95_latency_ms=14 \
207
207
  --out .enigma/proof-network/benchmark-attestation.json
@@ -219,7 +219,7 @@ enigma chain attest \
219
219
  --report-file .enigma/benchmarks/report.json \
220
220
  --dataset-ref enigma-fixture:deterministic-local:v1 \
221
221
  --runner-ref enigma-memory:scripts/run-memory-benchmarks.mjs \
222
- --package-ref npm:enigma-memory@0.1.16 \
222
+ --package-ref npm:enigma-memory@0.1.17 \
223
223
  --score recall_at_5=1 \
224
224
  --score p95_latency_ms=14 \
225
225
  --out .enigma/proof-network/benchmark-attestation.json
@@ -236,7 +236,7 @@ Expected public-safe output shape from `chain attest`:
236
236
  "report_hash": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
237
237
  "dataset_ref": "enigma-fixture:deterministic-local:v1",
238
238
  "runner_ref": "enigma-memory:local-benchmark-runner:v1",
239
- "package_ref": "npm:enigma-memory@0.1.16",
239
+ "package_ref": "npm:enigma-memory@0.1.17",
240
240
  "scores": {
241
241
  "recall_at_5": 1,
242
242
  "p95_latency_ms": 14
@@ -8,15 +8,17 @@ For most developers, start with the installed CLI before reading the SDK interna
8
8
 
9
9
  ```sh
10
10
  npm install -g enigma-memory
11
- enigma setup --overwrite
11
+ enigma init
12
+ enigma setup --client auto --connect-installed --overwrite
13
+ enigma drive health
14
+ enigma status
12
15
  enigma remember --text-file ./memory.txt
13
- enigma search --query "..."
14
- enigma context --query "..." --optimize
16
+ enigma search --query "project context"
17
+ enigma context --query "project context" --optimize
15
18
  enigma verify --export ./.enigma/export.json
16
- enigma connect claude-desktop --dry-run
17
19
  ```
18
20
 
19
- `enigma setup --overwrite` writes local Enigma artifacts under the workspace `.enigma` path and emits deterministic, public-safe JSON without printing raw memory plaintext. It does not write third-party app configs unless you explicitly run `enigma connect <client>` without `--dry-run`. Treat provider-native memory as non-canonical cache only; the local Enigma vault is canonical.
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.
20
22
 
21
23
  Optional public test-drive loop:
22
24
 
@@ -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.16 \
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.16 \
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.16',
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.16"
344
+ "enigma_version": "0.1.17"
345
345
  },
346
346
  "commands": [
347
347
  {