enigma-memory 0.1.17 → 0.1.18
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 +18 -12
- package/apps/cli/bin/enigma.mjs +3341 -3263
- package/deploy/SIMULATION.md +14 -9
- package/deploy/docker-compose.local-production-simulation.yml +18 -12
- package/docs/benchmark-attestation-network.md +487 -487
- package/docs/benchmark-reproducibility.md +289 -289
- package/docs/blockchain-only-mechanisms.md +400 -400
- package/docs/client-connectors.md +1 -1
- package/docs/demo-proof-network.md +275 -275
- package/docs/developer-proof-quickstart.md +325 -325
- package/docs/enigma-memory-ready-conformance.md +376 -376
- package/docs/install-anywhere.md +3 -2
- package/docs/memory-benchmarks.md +1 -1
- package/docs/memory-drive-health-model.md +690 -690
- package/docs/proof-network-build-notes.md +240 -240
- package/docs/proof-network.md +339 -339
- package/docs/sdk-api.md +324 -324
- package/docs/solana-proof-rail.md +453 -453
- package/package.json +279 -278
- package/packages/core/src/index.js +1 -1
- package/packages/mcp-server/src/index.js +1185 -1185
- package/packages/passport/src/index.js +10 -6
- package/packages/vault/src/index.js +187 -25
- package/scripts/build-hosted-api-key-lifecycle.mjs +274 -274
- package/scripts/build-hosted-customer-lifecycle.mjs +476 -476
- package/scripts/build-installer-assets.mjs +389 -389
- package/scripts/build-production-unblocker.mjs +1 -1
- package/scripts/build-proof-network-packet.mjs +213 -213
- package/scripts/check.mjs +8 -1
- package/scripts/release-audit.mjs +9 -6
- package/scripts/release-provenance.mjs +6 -2
- package/scripts/run-standard-memory-benchmarks.mjs +1354 -1352
- package/scripts/scan-secrets.mjs +177 -0
- package/scripts/simulate-production-env.mjs +64 -8
package/deploy/SIMULATION.md
CHANGED
|
@@ -38,12 +38,15 @@ names so that containers can resolve them locally when needed.
|
|
|
38
38
|
node scripts/simulate-production-env.mjs
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
By default files are written outside the repo to
|
|
42
|
+
`~/.enigma/simulation-secrets`. Use `--secrets-dir <absolute-path>` for a
|
|
43
|
+
different location; paths inside the repository are rejected.
|
|
42
44
|
|
|
43
|
-
2. Start the simulation:
|
|
45
|
+
2. Start the simulation with the generated secrets path:
|
|
44
46
|
|
|
45
47
|
```bash
|
|
46
|
-
|
|
48
|
+
export ENIGMA_SIM_SECRETS_DIR="$HOME/.enigma/simulation-secrets"
|
|
49
|
+
docker compose -f deploy/docker-compose.local-production-simulation.yml --env-file "$ENIGMA_SIM_SECRETS_DIR/simulation.env" up --build -d
|
|
47
50
|
```
|
|
48
51
|
|
|
49
52
|
3. Wait for the backend to become ready:
|
|
@@ -64,13 +67,13 @@ names so that containers can resolve them locally when needed.
|
|
|
64
67
|
## Stop
|
|
65
68
|
|
|
66
69
|
```bash
|
|
67
|
-
docker compose -f deploy/docker-compose.local-production-simulation.yml down
|
|
70
|
+
docker compose -f deploy/docker-compose.local-production-simulation.yml --env-file "$ENIGMA_SIM_SECRETS_DIR/simulation.env" down
|
|
68
71
|
```
|
|
69
72
|
|
|
70
73
|
To also remove the Postgres volume and mock event data:
|
|
71
74
|
|
|
72
75
|
```bash
|
|
73
|
-
docker compose -f deploy/docker-compose.local-production-simulation.yml down -v
|
|
76
|
+
docker compose -f deploy/docker-compose.local-production-simulation.yml --env-file "$ENIGMA_SIM_SECRETS_DIR/simulation.env" down -v
|
|
74
77
|
```
|
|
75
78
|
|
|
76
79
|
## Ports and routes
|
|
@@ -86,11 +89,12 @@ docker compose -f deploy/docker-compose.local-production-simulation.yml down -v
|
|
|
86
89
|
## Verify secret files
|
|
87
90
|
|
|
88
91
|
```bash
|
|
92
|
+
export ENIGMA_SIM_SECRETS_DIR="$HOME/.enigma/simulation-secrets"
|
|
89
93
|
node scripts/simulate-production-env.mjs --check
|
|
90
94
|
```
|
|
91
95
|
|
|
92
|
-
This reports whether all required files in
|
|
93
|
-
and are non-empty.
|
|
96
|
+
This reports whether all required files in the configured simulation secrets
|
|
97
|
+
directory exist and are non-empty.
|
|
94
98
|
|
|
95
99
|
## Simulation-only behavior
|
|
96
100
|
|
|
@@ -144,5 +148,6 @@ Hosted readiness remains blocked until the production commands above observe
|
|
|
144
148
|
public HTTPS relay/gateway probes, all required hosted refs, and operator
|
|
145
149
|
acceptance `go` for the exact target environment.
|
|
146
150
|
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
Simulation secrets, TLS keys, and bearer-token digests are kept outside the
|
|
152
|
+
repository. Never commit the simulation secrets directory, `*.pem` files, or
|
|
153
|
+
`simulation.env`. They are generated locally and must not be added to the repo.
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
# SIEM. It is not a production deployment and does not prove hosted/BYOC
|
|
5
5
|
# readiness.
|
|
6
6
|
#
|
|
7
|
+
# REQUIRED ENVIRONMENT VARIABLE:
|
|
8
|
+
# ENIGMA_SIM_SECRETS_DIR must point to the absolute path of the simulation
|
|
9
|
+
# secrets directory. Generate it with:
|
|
10
|
+
# node scripts/simulate-production-env.mjs
|
|
11
|
+
# which writes the default to ~/.enigma/simulation-secrets.
|
|
12
|
+
#
|
|
7
13
|
# LOCAL DNS NOTE: From the host, map sim.enigmamemory.com (and optional
|
|
8
14
|
# relay.sim.enigmamemory.com and gateway.sim.enigmamemory.com) to 127.0.0.1
|
|
9
15
|
# via /etc/hosts or local DNS. This lets curl -k reach the tls-proxy container
|
|
@@ -37,7 +43,7 @@ services:
|
|
|
37
43
|
KMS_KEY_ID: "local-simulation-kms-key"
|
|
38
44
|
volumes:
|
|
39
45
|
- ./kms-mock.mjs:/app/deploy/kms-mock.mjs:ro
|
|
40
|
-
-
|
|
46
|
+
- ${ENIGMA_SIM_SECRETS_DIR}:/app/secrets-simulation:ro
|
|
41
47
|
- kms-data:/data
|
|
42
48
|
healthcheck:
|
|
43
49
|
test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:3000/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""]
|
|
@@ -142,6 +148,8 @@ services:
|
|
|
142
148
|
- backup_target_uri
|
|
143
149
|
- operator_acceptance_evidence_uri
|
|
144
150
|
environment:
|
|
151
|
+
ENIGMA_GATEWAY_ADMIN_AUTH_BEARER_SHA256: ${ENIGMA_GATEWAY_ADMIN_AUTH_BEARER_SHA256:-operator-required-admin-bearer-sha256}
|
|
152
|
+
ENIGMA_GATEWAY_DATA_PLANE_AUTH_BEARER_SHA256: ${ENIGMA_GATEWAY_DATA_PLANE_AUTH_BEARER_SHA256:-operator-required-data-plane-bearer-sha256}
|
|
145
153
|
NODE_ENV: production
|
|
146
154
|
ENIGMA_BACKEND_MODE: production
|
|
147
155
|
ENIGMA_REQUIRE_EXTERNAL_STORAGE: "true"
|
|
@@ -172,8 +180,6 @@ services:
|
|
|
172
180
|
ENIGMA_INCIDENT_DRILL_REF: local-simulation-incident-drill-ref
|
|
173
181
|
ENIGMA_BACKUP_RESTORE_DRILL_REF: local-simulation-backup-restore-drill-ref
|
|
174
182
|
ENIGMA_OPERATOR_ACCEPTANCE_DECISION: go
|
|
175
|
-
ENIGMA_GATEWAY_ADMIN_AUTH_BEARER_SHA256: sha256:6655800954551a39fc1cde811dbe44366ab67b369170b16f4f7c421b5b695870
|
|
176
|
-
ENIGMA_GATEWAY_DATA_PLANE_AUTH_BEARER_SHA256: sha256:21030e3332a199d4b729cd5a8035fdf43f0abdb541af9ee9917639ff67abdecb
|
|
177
183
|
ENIGMA_GATEWAY_SIGNING_KEY_FILE: /run/secrets/gateway_signing_key
|
|
178
184
|
ENIGMA_KMS_KEY_REF_FILE: /run/secrets/kms_key_ref
|
|
179
185
|
ENIGMA_SIEM_EXPORT_ENDPOINT_FILE: /run/secrets/siem_export_endpoint
|
|
@@ -203,8 +209,8 @@ services:
|
|
|
203
209
|
- "127.0.0.1:${ENIGMA_SIM_RELAY_PORT:-8443}:8443"
|
|
204
210
|
- "127.0.0.1:${ENIGMA_SIM_GATEWAY_PORT:-9443}:9443"
|
|
205
211
|
volumes:
|
|
206
|
-
-
|
|
207
|
-
-
|
|
212
|
+
- ${ENIGMA_SIM_SECRETS_DIR}/tls.crt:/etc/nginx/ssl/tls.crt:ro
|
|
213
|
+
- ${ENIGMA_SIM_SECRETS_DIR}/tls.key:/etc/nginx/ssl/tls.key:ro
|
|
208
214
|
- ./nginx.local-production-simulation.conf:/etc/nginx/conf.d/default.conf:ro
|
|
209
215
|
extra_hosts:
|
|
210
216
|
- "sim.enigmamemory.com:127.0.0.1"
|
|
@@ -219,19 +225,19 @@ services:
|
|
|
219
225
|
|
|
220
226
|
secrets:
|
|
221
227
|
relay_signing_key:
|
|
222
|
-
file:
|
|
228
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/relay-signing-key
|
|
223
229
|
gateway_signing_key:
|
|
224
|
-
file:
|
|
230
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/gateway-signing-key
|
|
225
231
|
external_storage_dsn:
|
|
226
|
-
file:
|
|
232
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/external-storage-dsn
|
|
227
233
|
kms_key_ref:
|
|
228
|
-
file:
|
|
234
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/kms-key-ref
|
|
229
235
|
backup_target_uri:
|
|
230
|
-
file:
|
|
236
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/backup-target-uri
|
|
231
237
|
siem_export_endpoint:
|
|
232
|
-
file:
|
|
238
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/siem-export-endpoint
|
|
233
239
|
operator_acceptance_evidence_uri:
|
|
234
|
-
file:
|
|
240
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/operator-acceptance-evidence-uri
|
|
235
241
|
|
|
236
242
|
volumes:
|
|
237
243
|
pgdata:
|