enigma-memory 0.1.17 → 0.1.22
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 +85 -27
- package/apps/cli/bin/enigma-desktop.mjs +140 -0
- package/apps/cli/bin/enigma-terminal.mjs +78 -0
- package/apps/cli/bin/enigma.mjs +4979 -3263
- package/apps/desktop/electron-main.cjs +217 -0
- package/apps/desktop/package.json +12 -0
- package/apps/desktop/src/app.js +264 -7
- package/apps/desktop/src/index.html +3514 -1373
- package/apps/desktop/src/launch-electron.mjs +51 -0
- package/apps/desktop/src/server.mjs +2914 -0
- package/apps/desktop/src/styles.css +2972 -260
- package/apps/desktop/src/zk-browser-prove.mjs +53 -0
- package/apps/desktop/src/zk-state.mjs +1789 -0
- package/apps/gateway/bin/enigma-gateway.mjs +102 -5
- package/apps/gateway/src/server.mjs +271 -8
- package/apps/ios/EnigmaCore/Package.swift +12 -0
- package/apps/ios/EnigmaCore/Sources/EnigmaCore/EnigmaAPIClient.swift +227 -0
- package/apps/ios/EnigmaCore/Sources/EnigmaCore/Models.swift +278 -0
- package/apps/ios/EnigmaCore/Sources/EnigmaCore/PKCE.swift +96 -0
- package/apps/ios/EnigmaCore/Sources/EnigmaCore/PrivacyMinimizer.swift +187 -0
- package/apps/ios/EnigmaCore/Sources/EnigmaCore/ToolModels.swift +129 -0
- package/apps/ios/EnigmaCore/Tests/EnigmaCoreTests/EnigmaCoreTests.swift +42 -0
- package/apps/ios/EnigmaIOS/Enigma/AppModel.swift +346 -0
- package/apps/ios/EnigmaIOS/Enigma/Assets.xcassets/AccentColor.colorset/Contents.json +12 -0
- package/apps/ios/EnigmaIOS/Enigma/Assets.xcassets/AppIcon.appiconset/Contents.json +11 -0
- package/apps/ios/EnigmaIOS/Enigma/Assets.xcassets/AppIcon.appiconset/EnigmaAppIcon.png +0 -0
- package/apps/ios/EnigmaIOS/Enigma/Assets.xcassets/Contents.json +3 -0
- package/apps/ios/EnigmaIOS/Enigma/Assets.xcassets/LaunchBackground.colorset/Contents.json +12 -0
- package/apps/ios/EnigmaIOS/Enigma/ChatView.swift +181 -0
- package/apps/ios/EnigmaIOS/Enigma/CouncilView.swift +78 -0
- package/apps/ios/EnigmaIOS/Enigma/CreateView.swift +152 -0
- package/apps/ios/EnigmaIOS/Enigma/EnigmaApp.swift +52 -0
- package/apps/ios/EnigmaIOS/Enigma/Info.plist +52 -0
- package/apps/ios/EnigmaIOS/Enigma/NaturalLanguagePrivacyTagger.swift +26 -0
- package/apps/ios/EnigmaIOS/Enigma/OAuthClient.swift +321 -0
- package/apps/ios/EnigmaIOS/Enigma/OnboardingView.swift +105 -0
- package/apps/ios/EnigmaIOS/Enigma/PrivateVaultView.swift +275 -0
- package/apps/ios/EnigmaIOS/Enigma/SecureStore.swift +76 -0
- package/apps/ios/EnigmaIOS/Enigma/SettingsView.swift +60 -0
- package/apps/ios/EnigmaIOS/Enigma/Theme.swift +80 -0
- package/apps/ios/EnigmaIOS/EnigmaIOS.xcodeproj/project.pbxproj +211 -0
- package/apps/ios/EnigmaIOS/EnigmaIOS.xcodeproj/xcshareddata/xcschemes/Enigma.xcscheme +23 -0
- package/apps/native-host/README.md +19 -8
- package/apps/native-host/bin/enigma-native-host.mjs +229 -13
- package/apps/relay/bin/enigma-relay.mjs +103 -5
- package/apps/relay/src/federation-runtime.mjs +618 -0
- package/apps/relay/src/server.mjs +310 -9
- package/apps/verifier/bin/enigma-verify.mjs +327 -11
- package/cortex-v3/circuits/build/intent_vk_bytes.json +35 -0
- package/cortex-v3/circuits/build/sale_vk_bytes.json +35 -0
- package/cortex-v3/circuits/build/vk_bytes.json +32 -0
- package/cortex-v3/proving-assets.json +64 -0
- package/cortex-v3/zk/BUILD-CONTRACT.md +87 -0
- package/cortex-v3/zk/action-transition-vk.json +119 -0
- package/cortex-v3/zk/alias-adversarial.test.mjs +220 -0
- package/cortex-v3/zk/groth16-verify-child.mjs +17 -0
- package/cortex-v3/zk/intent-witness.mjs +365 -0
- package/cortex-v3/zk/intent-witness.test.mjs +485 -0
- package/cortex-v3/zk/proving-assets.mjs +203 -0
- package/cortex-v3/zk/sale-witness.mjs +783 -0
- package/cortex-v3/zk/sale-witness.test.mjs +784 -0
- package/cortex-v3/zk/sealed-sale-release-vk.json +119 -0
- package/cortex-v3/zk/settlement-evidence.mjs +722 -0
- package/cortex-v3/zk/setup-intent.mjs +688 -0
- package/cortex-v3/zk/setup-sale.mjs +666 -0
- package/cortex-v3/zk/setup.mjs +594 -0
- package/cortex-v3/zk/witness.mjs +184 -0
- package/cortex-v3/zk/zk-codec.mjs +232 -0
- package/cortex-v3/zk/zk-codec.test.mjs +293 -0
- package/cortex-v3/zk/zk-settle.mjs +370 -0
- package/cortex-v3/zk/zk-tree.mjs +256 -0
- package/cortex-v3/zk/zk-tree.test.mjs +419 -0
- package/deploy/SIMULATION.md +14 -9
- package/deploy/docker-compose.local-production-simulation.yml +54 -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/browser-extension-install.md +8 -6
- package/docs/client-connectors.md +16 -12
- package/docs/demo-proof-network.md +275 -275
- package/docs/developer-ecosystem.md +15 -13
- package/docs/developer-proof-quickstart.md +325 -325
- package/docs/enigma-memory-ready-conformance.md +378 -376
- package/docs/install-anywhere.md +64 -30
- package/docs/installers-and-desktop.md +8 -7
- package/docs/memory-benchmarks.md +1 -1
- package/docs/memory-drive-health-model.md +690 -690
- package/docs/novelty-invention-candidates.md +161 -161
- package/docs/proof-network-build-notes.md +240 -240
- package/docs/proof-network-claim-boundaries.md +320 -318
- package/docs/proof-network.md +339 -339
- package/docs/sdk-api.md +324 -324
- package/docs/solana-proof-rail.md +453 -453
- package/examples/01-quickstart-agent/index.mjs +49 -0
- package/examples/01_agent_memory_quickstart.mjs +57 -0
- package/examples/02-multi-agent-swarm/index.mjs +57 -0
- package/examples/02_cross_model_passport.mjs +64 -0
- package/examples/03-langchain-memory/index.mjs +41 -0
- package/examples/03_poseidon_commitment_verification.mjs +71 -0
- package/examples/04-python-trading-agent/trader.py +49 -0
- package/examples/README.md +27 -0
- package/examples/ci/github-actions.yml +7 -2
- package/package.json +410 -278
- package/packages/adapters/PACKAGE_CONTRACT.md +1 -1
- package/packages/connectors/src/index.js +196 -4
- package/packages/connectors/swarm-router.mjs +168 -0
- package/packages/core/src/index.js +249 -2
- package/packages/core/src/version.mjs +7 -0
- package/packages/dev-tools/package.json +19 -0
- package/packages/dev-tools/src/index.js +4 -0
- package/packages/dev-tools/src/memory-benchmark-suite.js +112 -0
- package/packages/dev-tools/src/swarm-simulator.js +101 -0
- package/packages/dev-tools/src/vault-inspector.js +114 -0
- package/packages/dev-tools/src/vector-benchmark.js +100 -0
- package/packages/developer-platform/src/access-credentials.js +341 -0
- package/packages/developer-platform/src/http.js +132 -0
- package/packages/developer-platform/src/index.js +4 -0
- package/packages/developer-platform/src/usage-http.js +60 -0
- package/packages/developer-platform/src/usage.js +295 -0
- package/packages/enclave-runtime/attestation.mjs +159 -0
- package/packages/enclave-runtime/index.mjs +47 -0
- package/packages/enclave-runtime/session-manager.mjs +253 -0
- package/packages/enclave-runtime/zeroization-proof.mjs +227 -0
- package/packages/enigma-reflex/package.json +14 -0
- package/packages/enigma-reflex/src/index.js +204 -0
- package/packages/enigma-reflex/training/generate-dataset.mjs +40 -0
- package/packages/enigma-reflex/training/requirements.txt +8 -0
- package/packages/enigma-reflex/training/train.py +314 -0
- package/packages/enigma-weave/LICENSE +22 -0
- package/packages/enigma-weave/UPSTREAM.json +21 -0
- package/packages/enigma-weave/package.json +14 -0
- package/packages/enigma-weave/src/index.js +286 -0
- package/packages/hosted-cloud/src/index.js +80 -5
- package/packages/importers/src/index.js +432 -0
- package/packages/inference-runtime/src/browser.js +401 -0
- package/packages/inference-runtime/src/chat.js +265 -0
- package/packages/inference-runtime/src/code.js +407 -0
- package/packages/inference-runtime/src/contracts.js +162 -0
- package/packages/inference-runtime/src/http.js +232 -0
- package/packages/inference-runtime/src/image.js +186 -0
- package/packages/inference-runtime/src/index.js +10 -0
- package/packages/inference-runtime/src/model-router.js +320 -0
- package/packages/inference-runtime/src/platform.js +125 -0
- package/packages/inference-runtime/src/privacy.js +400 -0
- package/packages/inference-runtime/src/video.js +253 -0
- package/packages/mcp-server/README.md +22 -6
- package/packages/mcp-server/bin/enigma-mcp.mjs +2 -1
- package/packages/mcp-server/src/index.js +2498 -1185
- package/packages/mcp-server/src/oauth.js +561 -0
- package/packages/mcp-server/src/private-handoff.js +84 -0
- package/packages/mcp-server/src/remote-http.js +273 -0
- package/packages/mcp-server/src/remote-policy.js +72 -0
- package/packages/mcp-server/swarm-bridge.mjs +361 -0
- package/packages/mesh/index.d.ts +283 -0
- package/packages/mesh/package.json +23 -0
- package/packages/mesh/src/crypto.js +189 -0
- package/packages/mesh/src/federation-packets.js +353 -0
- package/packages/mesh/src/gossip.js +311 -0
- package/packages/mesh/src/index.js +6 -0
- package/packages/mesh/src/protocol.js +255 -0
- package/packages/mesh/src/router.js +279 -0
- package/packages/mesh/src/transport.js +306 -0
- package/packages/passport/src/index.js +436 -7
- package/packages/private-economy/src/credits-http.js +100 -0
- package/packages/private-economy/src/credits.js +447 -0
- package/packages/private-economy/src/index.js +5 -0
- package/packages/private-economy/src/payments-http.js +120 -0
- package/packages/private-economy/src/payments.js +509 -0
- package/packages/private-economy/src/x402.js +346 -0
- package/packages/proof-network/PACKAGE_CONTRACT.md +21 -0
- package/packages/rag/index.d.ts +182 -0
- package/packages/rag/models/Xenova/all-MiniLM-L6-v2/THIRD_PARTY_LICENSES.txt +207 -0
- package/packages/rag/models/Xenova/all-MiniLM-L6-v2/config.json +25 -0
- package/packages/rag/models/Xenova/all-MiniLM-L6-v2/onnx/model_quantized.onnx +0 -0
- package/packages/rag/models/Xenova/all-MiniLM-L6-v2/sha256-manifest.json +28 -0
- package/packages/rag/models/Xenova/all-MiniLM-L6-v2/tokenizer.json +30686 -0
- package/packages/rag/models/Xenova/all-MiniLM-L6-v2/tokenizer_config.json +15 -0
- package/packages/rag/package.json +27 -0
- package/packages/rag/src/blinded-search.js +109 -0
- package/packages/rag/src/bm25.js +169 -0
- package/packages/rag/src/embeddings.js +459 -0
- package/packages/rag/src/hybrid.js +76 -0
- package/packages/rag/src/index.js +38 -0
- package/packages/rag/src/reranker.js +61 -0
- package/packages/rag/src/research.js +107 -0
- package/packages/rag/src/vector-store.js +430 -0
- package/packages/rag/src/verify-model-artifacts.mjs +4 -0
- package/packages/sdk/index.d.ts +760 -0
- package/packages/sdk/package.json +33 -0
- package/packages/sdk/python/README.md +24 -0
- package/packages/sdk/python/enigma_sdk.py +250 -0
- package/packages/sdk/python/pyproject.toml +34 -0
- package/packages/sdk/python/requirements.txt +1 -0
- package/packages/sdk/python/setup.py +20 -0
- package/packages/sdk/src/federation/capability-grant.js +389 -0
- package/packages/sdk/src/federation/federation-router.js +360 -0
- package/packages/sdk/src/federation/ghostmesh-bridge.js +497 -0
- package/packages/sdk/src/federation/index.js +3 -0
- package/packages/sdk/src/index.js +1796 -0
- package/packages/sdk/src/intelligence/contradiction.js +337 -0
- package/packages/sdk/src/intelligence/decision-engine.js +155 -0
- package/packages/sdk/src/intelligence/index.js +4 -0
- package/packages/sdk/src/intelligence/ontology.js +122 -0
- package/packages/sdk/src/intelligence/temporal.js +123 -0
- package/packages/sdk/src/market-client.js +142 -0
- package/packages/sdk/src/mesh-client.js +110 -0
- package/packages/sdk/src/middleware/index.js +3 -0
- package/packages/sdk/src/middleware/langchain.js +159 -0
- package/packages/sdk/src/middleware/llamaindex.js +101 -0
- package/packages/sdk/src/middleware/vercel-ai.js +112 -0
- package/packages/sdk/src/rag-client.js +85 -0
- package/packages/sdk/src/swarm-orchestrator.js +260 -0
- package/packages/settlement/PACKAGE_CONTRACT.md +1 -1
- package/packages/snapcompact/THIRD_PARTY_LICENSES.txt +40 -0
- package/packages/snapcompact/assets/8x13-latin1.bdf +3837 -0
- package/packages/snapcompact/index.d.ts +284 -0
- package/packages/snapcompact/package.json +25 -0
- package/packages/snapcompact/src/index.js +716 -0
- package/packages/storage/PACKAGE_CONTRACT.md +1 -1
- package/packages/terminal-console/animations.mjs +240 -0
- package/packages/terminal-console/auto-anchor.mjs +220 -0
- package/packages/terminal-console/banner.mjs +91 -0
- package/packages/terminal-console/commands.mjs +459 -0
- package/packages/terminal-console/delegation.mjs +152 -0
- package/packages/terminal-console/index.mjs +5 -0
- package/packages/terminal-console/outbox.mjs +143 -0
- package/packages/terminal-console/phantom-bridge.mjs +637 -0
- package/packages/terminal-console/repl.mjs +136 -0
- package/packages/terminal-console/signer-store.mjs +130 -0
- package/packages/terminal-console/solana-rpc.mjs +214 -0
- package/packages/terminal-console/solana-transport.mjs +189 -0
- package/packages/terminal-tui/dashboard.mjs +214 -0
- package/packages/terminal-tui/index.mjs +28 -0
- package/packages/terminal-tui/merkle-tree-renderer.mjs +268 -0
- package/packages/terminal-tui/telemetry-hud.mjs +137 -0
- package/packages/vault/index.d.ts +449 -0
- package/packages/vault/package.json +27 -0
- package/packages/vault/src/e2ee.mjs +393 -0
- package/packages/vault/src/enclave.js +481 -0
- package/packages/vault/src/erasure.js +207 -0
- package/packages/vault/src/index.js +1150 -125
- package/packages/vault/src/persistence.js +307 -0
- package/packages/vault/src/poseidon.js +354 -0
- package/packages/vault/src/receipt.js +459 -0
- package/scripts/benchmark-optical-context.mjs +166 -0
- package/scripts/bootstrap-enigma.mjs +502 -0
- package/scripts/build-edge-backend-workers.mjs +20 -5
- package/scripts/build-goal-completion-audit.mjs +72 -25
- package/scripts/build-hosted-api-key-lifecycle.mjs +292 -274
- package/scripts/build-hosted-customer-lifecycle.mjs +493 -476
- package/scripts/build-hosted-probe-worker.mjs +19 -4
- package/scripts/build-installer-assets.mjs +409 -389
- package/scripts/build-operator-evidence-starter.mjs +59 -1
- package/scripts/build-production-backend-env-kit.mjs +2 -0
- package/scripts/build-production-unblocker.mjs +4 -1
- package/scripts/build-proof-network-packet.mjs +213 -213
- package/scripts/check.mjs +25 -4
- package/scripts/collect-hosted-backend-live-evidence.mjs +49 -12
- package/scripts/install-enigma-local.mjs +18 -5
- package/scripts/release-audit.mjs +74 -115
- package/scripts/release-provenance.mjs +12 -2
- package/scripts/run-backend-readiness-smoke.mjs +112 -10
- package/scripts/run-standard-memory-benchmarks.mjs +1354 -1352
- package/scripts/scan-secrets.mjs +178 -0
- package/scripts/simulate-production-env.mjs +71 -10
- package/scripts/validate-hosted-backend-live.mjs +112 -1
- package/specs/antibody-pack-v1.schema.json +95 -0
- package/specs/antigen-envelope-v1.schema.json +81 -0
- package/specs/boundary-manifest-v1.schema.json +35 -35
- package/specs/capsule-v1.schema.json +55 -55
- package/specs/claim-boundary-manifest-v1.schema.json +22 -22
- package/specs/claim-ledger-v1.schema.json +291 -0
- package/specs/context-passport-v1.schema.json +59 -0
- package/specs/deletion-tombstone-v1.schema.json +26 -26
- package/specs/evidence-packet-v1.schema.json +177 -0
- package/specs/hosted-backend-live-evidence-v1.schema.json +72 -3
- package/specs/immune-scan-report-v1.schema.json +112 -0
- package/specs/lifecycle-receipt-log-v1.schema.json +67 -0
- package/specs/memory-atom-v1.schema.json +59 -0
- package/specs/memory-event-v1.schema.json +42 -42
- package/specs/passport-v1.schema.json +50 -50
- package/specs/proof-of-non-use-v1.schema.json +65 -0
- package/specs/quarantine-record-v1.schema.json +126 -0
- package/specs/receipt-v1.schema.json +61 -61
- package/specs/state-checkpoint-v1.schema.json +37 -37
- package/specs/trust-bundle-v1.schema.json +56 -56
- package/specs/trust-card-v1.schema.json +119 -0
- package/docs/proof-network-launch-plan.md +0 -421
- package/packages/metering/PACKAGE_CONTRACT.md +0 -20
- package/scripts/build-ai-orchestration-plan.mjs +0 -248
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))\""]
|
|
@@ -64,6 +70,13 @@ services:
|
|
|
64
70
|
start_period: 3s
|
|
65
71
|
restart: unless-stopped
|
|
66
72
|
|
|
73
|
+
simulation-state-init:
|
|
74
|
+
image: alpine:3.22
|
|
75
|
+
command: ["sh", "-c", "chown -R 1000:1000 /simulation-state && chmod 700 /simulation-state"]
|
|
76
|
+
volumes:
|
|
77
|
+
- simulation-state:/simulation-state
|
|
78
|
+
restart: "no"
|
|
79
|
+
|
|
67
80
|
relay:
|
|
68
81
|
build:
|
|
69
82
|
context: ..
|
|
@@ -79,6 +92,10 @@ services:
|
|
|
79
92
|
- operator_acceptance_evidence_uri
|
|
80
93
|
environment:
|
|
81
94
|
NODE_ENV: production
|
|
95
|
+
# Guarded local-only serve module; never use this module in hosted/BYOC manifests.
|
|
96
|
+
ENIGMA_LOCAL_PRODUCTION_SIMULATION: "true"
|
|
97
|
+
ENIGMA_RELAY_SERVE_MODULE: /app/scripts/local-production-simulation-serve.mjs
|
|
98
|
+
ENIGMA_SIMULATION_STATE_DIR: /simulation-state
|
|
82
99
|
ENIGMA_BACKEND_MODE: production
|
|
83
100
|
ENIGMA_REQUIRE_EXTERNAL_STORAGE: "true"
|
|
84
101
|
ENIGMA_REQUIRE_EXTERNAL_KMS: "true"
|
|
@@ -90,7 +107,9 @@ services:
|
|
|
90
107
|
ENIGMA_RELAY_RUNTIME_AUTH_REF: local-simulation-relay-runtime-auth-ref
|
|
91
108
|
ENIGMA_RELAY_MONITORING_REF: local-simulation-relay-monitoring-ref
|
|
92
109
|
ENIGMA_SIEM_REF: local-simulation-siem-ref
|
|
110
|
+
ENIGMA_RELAY_STORAGE_REF: local-simulation-relay-storage-ref
|
|
93
111
|
ENIGMA_BACKUP_TARGET_URI_FILE: /run/secrets/backup_target_uri
|
|
112
|
+
ENIGMA_BACKUP_TARGET_REF: local-simulation-backup-target-ref
|
|
94
113
|
ENIGMA_NETWORK_ACCESS_POLICY_REF: local-simulation-network-access-policy-ref
|
|
95
114
|
ENIGMA_KMS_CUSTODY_REF: local-simulation-kms-custody-ref
|
|
96
115
|
ENIGMA_KMS_KEY_REF: local-simulation-kms-key-ref
|
|
@@ -109,9 +128,15 @@ services:
|
|
|
109
128
|
ENIGMA_EXTERNAL_STORAGE_DSN_FILE: /run/secrets/external_storage_dsn
|
|
110
129
|
ENIGMA_KMS_KEY_REF_FILE: /run/secrets/kms_key_ref
|
|
111
130
|
ENIGMA_OPERATOR_ACCEPTANCE_EVIDENCE_URI_FILE: /run/secrets/operator_acceptance_evidence_uri
|
|
131
|
+
volumes:
|
|
132
|
+
- simulation-state:/simulation-state
|
|
112
133
|
depends_on:
|
|
113
134
|
postgres:
|
|
114
135
|
condition: service_healthy
|
|
136
|
+
kms-mock:
|
|
137
|
+
condition: service_healthy
|
|
138
|
+
simulation-state-init:
|
|
139
|
+
condition: service_completed_successfully
|
|
115
140
|
read_only: true
|
|
116
141
|
user: "1000:1000"
|
|
117
142
|
cap_drop: ["ALL"]
|
|
@@ -142,7 +167,15 @@ services:
|
|
|
142
167
|
- backup_target_uri
|
|
143
168
|
- operator_acceptance_evidence_uri
|
|
144
169
|
environment:
|
|
170
|
+
ENIGMA_GATEWAY_ADMIN_AUTH_BEARER_SHA256: ${ENIGMA_GATEWAY_ADMIN_AUTH_BEARER_SHA256:-operator-required-admin-bearer-sha256}
|
|
171
|
+
ENIGMA_GATEWAY_DATA_PLANE_AUTH_BEARER_SHA256: ${ENIGMA_GATEWAY_DATA_PLANE_AUTH_BEARER_SHA256:-operator-required-data-plane-bearer-sha256}
|
|
145
172
|
NODE_ENV: production
|
|
173
|
+
# Guarded local-only serve module; never use this module in hosted/BYOC manifests.
|
|
174
|
+
ENIGMA_LOCAL_PRODUCTION_SIMULATION: "true"
|
|
175
|
+
ENIGMA_GATEWAY_SERVE_MODULE: /app/scripts/local-production-simulation-serve.mjs
|
|
176
|
+
ENIGMA_SIMULATION_STATE_DIR: /simulation-state
|
|
177
|
+
ENIGMA_SIMULATION_KMS_KEY_PATH: /simulation-kms/kms-key-ref.json
|
|
178
|
+
ENIGMA_SIMULATION_SIEM_URL: http://siem-mock:3000/events
|
|
146
179
|
ENIGMA_BACKEND_MODE: production
|
|
147
180
|
ENIGMA_REQUIRE_EXTERNAL_STORAGE: "true"
|
|
148
181
|
ENIGMA_REQUIRE_EXTERNAL_KMS: "true"
|
|
@@ -158,6 +191,7 @@ services:
|
|
|
158
191
|
ENIGMA_GATEWAY_ADMIN_AUTH_REF: local-simulation-gateway-admin-auth-ref
|
|
159
192
|
ENIGMA_GATEWAY_DATA_PLANE_AUTH_REF: local-simulation-gateway-data-plane-auth-ref
|
|
160
193
|
ENIGMA_BACKUP_TARGET_URI_FILE: /run/secrets/backup_target_uri
|
|
194
|
+
ENIGMA_BACKUP_TARGET_REF: local-simulation-backup-target-ref
|
|
161
195
|
ENIGMA_NETWORK_ACCESS_POLICY_REF: local-simulation-network-access-policy-ref
|
|
162
196
|
ENIGMA_KMS_CUSTODY_REF: local-simulation-kms-custody-ref
|
|
163
197
|
ENIGMA_KMS_KEY_REF: local-simulation-kms-key-ref
|
|
@@ -172,16 +206,23 @@ services:
|
|
|
172
206
|
ENIGMA_INCIDENT_DRILL_REF: local-simulation-incident-drill-ref
|
|
173
207
|
ENIGMA_BACKUP_RESTORE_DRILL_REF: local-simulation-backup-restore-drill-ref
|
|
174
208
|
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
209
|
ENIGMA_GATEWAY_SIGNING_KEY_FILE: /run/secrets/gateway_signing_key
|
|
178
210
|
ENIGMA_KMS_KEY_REF_FILE: /run/secrets/kms_key_ref
|
|
179
211
|
ENIGMA_SIEM_EXPORT_ENDPOINT_FILE: /run/secrets/siem_export_endpoint
|
|
180
212
|
ENIGMA_EXTERNAL_STORAGE_DSN_FILE: /run/secrets/external_storage_dsn
|
|
181
213
|
ENIGMA_OPERATOR_ACCEPTANCE_EVIDENCE_URI_FILE: /run/secrets/operator_acceptance_evidence_uri
|
|
214
|
+
volumes:
|
|
215
|
+
- simulation-state:/simulation-state
|
|
216
|
+
- kms-data:/simulation-kms:ro
|
|
182
217
|
depends_on:
|
|
183
218
|
postgres:
|
|
184
219
|
condition: service_healthy
|
|
220
|
+
kms-mock:
|
|
221
|
+
condition: service_healthy
|
|
222
|
+
siem-mock:
|
|
223
|
+
condition: service_healthy
|
|
224
|
+
simulation-state-init:
|
|
225
|
+
condition: service_completed_successfully
|
|
185
226
|
read_only: true
|
|
186
227
|
user: "1000:1000"
|
|
187
228
|
cap_drop: ["ALL"]
|
|
@@ -203,8 +244,8 @@ services:
|
|
|
203
244
|
- "127.0.0.1:${ENIGMA_SIM_RELAY_PORT:-8443}:8443"
|
|
204
245
|
- "127.0.0.1:${ENIGMA_SIM_GATEWAY_PORT:-9443}:9443"
|
|
205
246
|
volumes:
|
|
206
|
-
-
|
|
207
|
-
-
|
|
247
|
+
- ${ENIGMA_SIM_SECRETS_DIR}/tls.crt:/etc/nginx/ssl/tls.crt:ro
|
|
248
|
+
- ${ENIGMA_SIM_SECRETS_DIR}/tls.key:/etc/nginx/ssl/tls.key:ro
|
|
208
249
|
- ./nginx.local-production-simulation.conf:/etc/nginx/conf.d/default.conf:ro
|
|
209
250
|
extra_hosts:
|
|
210
251
|
- "sim.enigmamemory.com:127.0.0.1"
|
|
@@ -219,21 +260,22 @@ services:
|
|
|
219
260
|
|
|
220
261
|
secrets:
|
|
221
262
|
relay_signing_key:
|
|
222
|
-
file:
|
|
263
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/relay-signing-key
|
|
223
264
|
gateway_signing_key:
|
|
224
|
-
file:
|
|
265
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/gateway-signing-key
|
|
225
266
|
external_storage_dsn:
|
|
226
|
-
file:
|
|
267
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/external-storage-dsn
|
|
227
268
|
kms_key_ref:
|
|
228
|
-
file:
|
|
269
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/kms-key-ref
|
|
229
270
|
backup_target_uri:
|
|
230
|
-
file:
|
|
271
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/backup-target-uri
|
|
231
272
|
siem_export_endpoint:
|
|
232
|
-
file:
|
|
273
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/siem-export-endpoint
|
|
233
274
|
operator_acceptance_evidence_uri:
|
|
234
|
-
file:
|
|
275
|
+
file: ${ENIGMA_SIM_SECRETS_DIR}/operator-acceptance-evidence-uri
|
|
235
276
|
|
|
236
277
|
volumes:
|
|
237
278
|
pgdata:
|
|
238
279
|
kms-data:
|
|
239
280
|
siem-data:
|
|
281
|
+
simulation-state:
|