enigma-memory 0.1.18 → 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.
Files changed (276) hide show
  1. package/README.md +76 -24
  2. package/apps/cli/bin/enigma-desktop.mjs +140 -0
  3. package/apps/cli/bin/enigma-terminal.mjs +78 -0
  4. package/apps/cli/bin/enigma.mjs +1923 -285
  5. package/apps/desktop/electron-main.cjs +217 -0
  6. package/apps/desktop/package.json +12 -0
  7. package/apps/desktop/src/app.js +264 -7
  8. package/apps/desktop/src/index.html +3514 -1373
  9. package/apps/desktop/src/launch-electron.mjs +51 -0
  10. package/apps/desktop/src/server.mjs +2914 -0
  11. package/apps/desktop/src/styles.css +2972 -260
  12. package/apps/desktop/src/zk-browser-prove.mjs +53 -0
  13. package/apps/desktop/src/zk-state.mjs +1789 -0
  14. package/apps/gateway/bin/enigma-gateway.mjs +102 -5
  15. package/apps/gateway/src/server.mjs +271 -8
  16. package/apps/ios/EnigmaCore/Package.swift +12 -0
  17. package/apps/ios/EnigmaCore/Sources/EnigmaCore/EnigmaAPIClient.swift +227 -0
  18. package/apps/ios/EnigmaCore/Sources/EnigmaCore/Models.swift +278 -0
  19. package/apps/ios/EnigmaCore/Sources/EnigmaCore/PKCE.swift +96 -0
  20. package/apps/ios/EnigmaCore/Sources/EnigmaCore/PrivacyMinimizer.swift +187 -0
  21. package/apps/ios/EnigmaCore/Sources/EnigmaCore/ToolModels.swift +129 -0
  22. package/apps/ios/EnigmaCore/Tests/EnigmaCoreTests/EnigmaCoreTests.swift +42 -0
  23. package/apps/ios/EnigmaIOS/Enigma/AppModel.swift +346 -0
  24. package/apps/ios/EnigmaIOS/Enigma/Assets.xcassets/AccentColor.colorset/Contents.json +12 -0
  25. package/apps/ios/EnigmaIOS/Enigma/Assets.xcassets/AppIcon.appiconset/Contents.json +11 -0
  26. package/apps/ios/EnigmaIOS/Enigma/Assets.xcassets/AppIcon.appiconset/EnigmaAppIcon.png +0 -0
  27. package/apps/ios/EnigmaIOS/Enigma/Assets.xcassets/Contents.json +3 -0
  28. package/apps/ios/EnigmaIOS/Enigma/Assets.xcassets/LaunchBackground.colorset/Contents.json +12 -0
  29. package/apps/ios/EnigmaIOS/Enigma/ChatView.swift +181 -0
  30. package/apps/ios/EnigmaIOS/Enigma/CouncilView.swift +78 -0
  31. package/apps/ios/EnigmaIOS/Enigma/CreateView.swift +152 -0
  32. package/apps/ios/EnigmaIOS/Enigma/EnigmaApp.swift +52 -0
  33. package/apps/ios/EnigmaIOS/Enigma/Info.plist +52 -0
  34. package/apps/ios/EnigmaIOS/Enigma/NaturalLanguagePrivacyTagger.swift +26 -0
  35. package/apps/ios/EnigmaIOS/Enigma/OAuthClient.swift +321 -0
  36. package/apps/ios/EnigmaIOS/Enigma/OnboardingView.swift +105 -0
  37. package/apps/ios/EnigmaIOS/Enigma/PrivateVaultView.swift +275 -0
  38. package/apps/ios/EnigmaIOS/Enigma/SecureStore.swift +76 -0
  39. package/apps/ios/EnigmaIOS/Enigma/SettingsView.swift +60 -0
  40. package/apps/ios/EnigmaIOS/Enigma/Theme.swift +80 -0
  41. package/apps/ios/EnigmaIOS/EnigmaIOS.xcodeproj/project.pbxproj +211 -0
  42. package/apps/ios/EnigmaIOS/EnigmaIOS.xcodeproj/xcshareddata/xcschemes/Enigma.xcscheme +23 -0
  43. package/apps/native-host/README.md +19 -8
  44. package/apps/native-host/bin/enigma-native-host.mjs +229 -13
  45. package/apps/relay/bin/enigma-relay.mjs +103 -5
  46. package/apps/relay/src/federation-runtime.mjs +618 -0
  47. package/apps/relay/src/server.mjs +310 -9
  48. package/apps/verifier/bin/enigma-verify.mjs +327 -11
  49. package/cortex-v3/circuits/build/intent_vk_bytes.json +35 -0
  50. package/cortex-v3/circuits/build/sale_vk_bytes.json +35 -0
  51. package/cortex-v3/circuits/build/vk_bytes.json +32 -0
  52. package/cortex-v3/proving-assets.json +64 -0
  53. package/cortex-v3/zk/BUILD-CONTRACT.md +87 -0
  54. package/cortex-v3/zk/action-transition-vk.json +119 -0
  55. package/cortex-v3/zk/alias-adversarial.test.mjs +220 -0
  56. package/cortex-v3/zk/groth16-verify-child.mjs +17 -0
  57. package/cortex-v3/zk/intent-witness.mjs +365 -0
  58. package/cortex-v3/zk/intent-witness.test.mjs +485 -0
  59. package/cortex-v3/zk/proving-assets.mjs +203 -0
  60. package/cortex-v3/zk/sale-witness.mjs +783 -0
  61. package/cortex-v3/zk/sale-witness.test.mjs +784 -0
  62. package/cortex-v3/zk/sealed-sale-release-vk.json +119 -0
  63. package/cortex-v3/zk/settlement-evidence.mjs +722 -0
  64. package/cortex-v3/zk/setup-intent.mjs +688 -0
  65. package/cortex-v3/zk/setup-sale.mjs +666 -0
  66. package/cortex-v3/zk/setup.mjs +594 -0
  67. package/cortex-v3/zk/witness.mjs +184 -0
  68. package/cortex-v3/zk/zk-codec.mjs +232 -0
  69. package/cortex-v3/zk/zk-codec.test.mjs +293 -0
  70. package/cortex-v3/zk/zk-settle.mjs +370 -0
  71. package/cortex-v3/zk/zk-tree.mjs +256 -0
  72. package/cortex-v3/zk/zk-tree.test.mjs +419 -0
  73. package/deploy/docker-compose.local-production-simulation.yml +36 -0
  74. package/docs/browser-extension-install.md +8 -6
  75. package/docs/client-connectors.md +15 -11
  76. package/docs/developer-ecosystem.md +15 -13
  77. package/docs/enigma-memory-ready-conformance.md +11 -9
  78. package/docs/install-anywhere.md +61 -28
  79. package/docs/installers-and-desktop.md +8 -7
  80. package/docs/novelty-invention-candidates.md +161 -161
  81. package/docs/proof-network-claim-boundaries.md +320 -318
  82. package/examples/01-quickstart-agent/index.mjs +49 -0
  83. package/examples/01_agent_memory_quickstart.mjs +57 -0
  84. package/examples/02-multi-agent-swarm/index.mjs +57 -0
  85. package/examples/02_cross_model_passport.mjs +64 -0
  86. package/examples/03-langchain-memory/index.mjs +41 -0
  87. package/examples/03_poseidon_commitment_verification.mjs +71 -0
  88. package/examples/04-python-trading-agent/trader.py +49 -0
  89. package/examples/README.md +27 -0
  90. package/examples/ci/github-actions.yml +7 -2
  91. package/package.json +142 -11
  92. package/packages/adapters/PACKAGE_CONTRACT.md +1 -1
  93. package/packages/connectors/src/index.js +196 -4
  94. package/packages/connectors/swarm-router.mjs +168 -0
  95. package/packages/core/src/index.js +248 -1
  96. package/packages/core/src/version.mjs +7 -0
  97. package/packages/dev-tools/package.json +19 -0
  98. package/packages/dev-tools/src/index.js +4 -0
  99. package/packages/dev-tools/src/memory-benchmark-suite.js +112 -0
  100. package/packages/dev-tools/src/swarm-simulator.js +101 -0
  101. package/packages/dev-tools/src/vault-inspector.js +114 -0
  102. package/packages/dev-tools/src/vector-benchmark.js +100 -0
  103. package/packages/developer-platform/src/access-credentials.js +341 -0
  104. package/packages/developer-platform/src/http.js +132 -0
  105. package/packages/developer-platform/src/index.js +4 -0
  106. package/packages/developer-platform/src/usage-http.js +60 -0
  107. package/packages/developer-platform/src/usage.js +295 -0
  108. package/packages/enclave-runtime/attestation.mjs +159 -0
  109. package/packages/enclave-runtime/index.mjs +47 -0
  110. package/packages/enclave-runtime/session-manager.mjs +253 -0
  111. package/packages/enclave-runtime/zeroization-proof.mjs +227 -0
  112. package/packages/enigma-reflex/package.json +14 -0
  113. package/packages/enigma-reflex/src/index.js +204 -0
  114. package/packages/enigma-reflex/training/generate-dataset.mjs +40 -0
  115. package/packages/enigma-reflex/training/requirements.txt +8 -0
  116. package/packages/enigma-reflex/training/train.py +314 -0
  117. package/packages/enigma-weave/LICENSE +22 -0
  118. package/packages/enigma-weave/UPSTREAM.json +21 -0
  119. package/packages/enigma-weave/package.json +14 -0
  120. package/packages/enigma-weave/src/index.js +286 -0
  121. package/packages/hosted-cloud/src/index.js +80 -5
  122. package/packages/importers/src/index.js +432 -0
  123. package/packages/inference-runtime/src/browser.js +401 -0
  124. package/packages/inference-runtime/src/chat.js +265 -0
  125. package/packages/inference-runtime/src/code.js +407 -0
  126. package/packages/inference-runtime/src/contracts.js +162 -0
  127. package/packages/inference-runtime/src/http.js +232 -0
  128. package/packages/inference-runtime/src/image.js +186 -0
  129. package/packages/inference-runtime/src/index.js +10 -0
  130. package/packages/inference-runtime/src/model-router.js +320 -0
  131. package/packages/inference-runtime/src/platform.js +125 -0
  132. package/packages/inference-runtime/src/privacy.js +400 -0
  133. package/packages/inference-runtime/src/video.js +253 -0
  134. package/packages/mcp-server/README.md +22 -6
  135. package/packages/mcp-server/bin/enigma-mcp.mjs +2 -1
  136. package/packages/mcp-server/src/index.js +1418 -105
  137. package/packages/mcp-server/src/oauth.js +561 -0
  138. package/packages/mcp-server/src/private-handoff.js +84 -0
  139. package/packages/mcp-server/src/remote-http.js +273 -0
  140. package/packages/mcp-server/src/remote-policy.js +72 -0
  141. package/packages/mcp-server/swarm-bridge.mjs +361 -0
  142. package/packages/mesh/index.d.ts +283 -0
  143. package/packages/mesh/package.json +23 -0
  144. package/packages/mesh/src/crypto.js +189 -0
  145. package/packages/mesh/src/federation-packets.js +353 -0
  146. package/packages/mesh/src/gossip.js +311 -0
  147. package/packages/mesh/src/index.js +6 -0
  148. package/packages/mesh/src/protocol.js +255 -0
  149. package/packages/mesh/src/router.js +279 -0
  150. package/packages/mesh/src/transport.js +306 -0
  151. package/packages/passport/src/index.js +426 -1
  152. package/packages/private-economy/src/credits-http.js +100 -0
  153. package/packages/private-economy/src/credits.js +447 -0
  154. package/packages/private-economy/src/index.js +5 -0
  155. package/packages/private-economy/src/payments-http.js +120 -0
  156. package/packages/private-economy/src/payments.js +509 -0
  157. package/packages/private-economy/src/x402.js +346 -0
  158. package/packages/proof-network/PACKAGE_CONTRACT.md +21 -0
  159. package/packages/rag/index.d.ts +182 -0
  160. package/packages/rag/models/Xenova/all-MiniLM-L6-v2/THIRD_PARTY_LICENSES.txt +207 -0
  161. package/packages/rag/models/Xenova/all-MiniLM-L6-v2/config.json +25 -0
  162. package/packages/rag/models/Xenova/all-MiniLM-L6-v2/onnx/model_quantized.onnx +0 -0
  163. package/packages/rag/models/Xenova/all-MiniLM-L6-v2/sha256-manifest.json +28 -0
  164. package/packages/rag/models/Xenova/all-MiniLM-L6-v2/tokenizer.json +30686 -0
  165. package/packages/rag/models/Xenova/all-MiniLM-L6-v2/tokenizer_config.json +15 -0
  166. package/packages/rag/package.json +27 -0
  167. package/packages/rag/src/blinded-search.js +109 -0
  168. package/packages/rag/src/bm25.js +169 -0
  169. package/packages/rag/src/embeddings.js +459 -0
  170. package/packages/rag/src/hybrid.js +76 -0
  171. package/packages/rag/src/index.js +38 -0
  172. package/packages/rag/src/reranker.js +61 -0
  173. package/packages/rag/src/research.js +107 -0
  174. package/packages/rag/src/vector-store.js +430 -0
  175. package/packages/rag/src/verify-model-artifacts.mjs +4 -0
  176. package/packages/sdk/index.d.ts +760 -0
  177. package/packages/sdk/package.json +33 -0
  178. package/packages/sdk/python/README.md +24 -0
  179. package/packages/sdk/python/enigma_sdk.py +250 -0
  180. package/packages/sdk/python/pyproject.toml +34 -0
  181. package/packages/sdk/python/requirements.txt +1 -0
  182. package/packages/sdk/python/setup.py +20 -0
  183. package/packages/sdk/src/federation/capability-grant.js +389 -0
  184. package/packages/sdk/src/federation/federation-router.js +360 -0
  185. package/packages/sdk/src/federation/ghostmesh-bridge.js +497 -0
  186. package/packages/sdk/src/federation/index.js +3 -0
  187. package/packages/sdk/src/index.js +1796 -0
  188. package/packages/sdk/src/intelligence/contradiction.js +337 -0
  189. package/packages/sdk/src/intelligence/decision-engine.js +155 -0
  190. package/packages/sdk/src/intelligence/index.js +4 -0
  191. package/packages/sdk/src/intelligence/ontology.js +122 -0
  192. package/packages/sdk/src/intelligence/temporal.js +123 -0
  193. package/packages/sdk/src/market-client.js +142 -0
  194. package/packages/sdk/src/mesh-client.js +110 -0
  195. package/packages/sdk/src/middleware/index.js +3 -0
  196. package/packages/sdk/src/middleware/langchain.js +159 -0
  197. package/packages/sdk/src/middleware/llamaindex.js +101 -0
  198. package/packages/sdk/src/middleware/vercel-ai.js +112 -0
  199. package/packages/sdk/src/rag-client.js +85 -0
  200. package/packages/sdk/src/swarm-orchestrator.js +260 -0
  201. package/packages/settlement/PACKAGE_CONTRACT.md +1 -1
  202. package/packages/snapcompact/THIRD_PARTY_LICENSES.txt +40 -0
  203. package/packages/snapcompact/assets/8x13-latin1.bdf +3837 -0
  204. package/packages/snapcompact/index.d.ts +284 -0
  205. package/packages/snapcompact/package.json +25 -0
  206. package/packages/snapcompact/src/index.js +716 -0
  207. package/packages/storage/PACKAGE_CONTRACT.md +1 -1
  208. package/packages/terminal-console/animations.mjs +240 -0
  209. package/packages/terminal-console/auto-anchor.mjs +220 -0
  210. package/packages/terminal-console/banner.mjs +91 -0
  211. package/packages/terminal-console/commands.mjs +459 -0
  212. package/packages/terminal-console/delegation.mjs +152 -0
  213. package/packages/terminal-console/index.mjs +5 -0
  214. package/packages/terminal-console/outbox.mjs +143 -0
  215. package/packages/terminal-console/phantom-bridge.mjs +637 -0
  216. package/packages/terminal-console/repl.mjs +136 -0
  217. package/packages/terminal-console/signer-store.mjs +130 -0
  218. package/packages/terminal-console/solana-rpc.mjs +214 -0
  219. package/packages/terminal-console/solana-transport.mjs +189 -0
  220. package/packages/terminal-tui/dashboard.mjs +214 -0
  221. package/packages/terminal-tui/index.mjs +28 -0
  222. package/packages/terminal-tui/merkle-tree-renderer.mjs +268 -0
  223. package/packages/terminal-tui/telemetry-hud.mjs +137 -0
  224. package/packages/vault/index.d.ts +449 -0
  225. package/packages/vault/package.json +27 -0
  226. package/packages/vault/src/e2ee.mjs +393 -0
  227. package/packages/vault/src/enclave.js +481 -0
  228. package/packages/vault/src/erasure.js +207 -0
  229. package/packages/vault/src/index.js +1018 -155
  230. package/packages/vault/src/persistence.js +307 -0
  231. package/packages/vault/src/poseidon.js +354 -0
  232. package/packages/vault/src/receipt.js +459 -0
  233. package/scripts/benchmark-optical-context.mjs +166 -0
  234. package/scripts/bootstrap-enigma.mjs +502 -0
  235. package/scripts/build-edge-backend-workers.mjs +20 -5
  236. package/scripts/build-goal-completion-audit.mjs +72 -25
  237. package/scripts/build-hosted-api-key-lifecycle.mjs +26 -8
  238. package/scripts/build-hosted-customer-lifecycle.mjs +20 -3
  239. package/scripts/build-hosted-probe-worker.mjs +19 -4
  240. package/scripts/build-installer-assets.mjs +41 -21
  241. package/scripts/build-operator-evidence-starter.mjs +59 -1
  242. package/scripts/build-production-backend-env-kit.mjs +2 -0
  243. package/scripts/build-production-unblocker.mjs +3 -0
  244. package/scripts/check.mjs +17 -3
  245. package/scripts/collect-hosted-backend-live-evidence.mjs +49 -12
  246. package/scripts/install-enigma-local.mjs +18 -5
  247. package/scripts/release-audit.mjs +65 -109
  248. package/scripts/release-provenance.mjs +6 -0
  249. package/scripts/run-backend-readiness-smoke.mjs +112 -10
  250. package/scripts/scan-secrets.mjs +1 -0
  251. package/scripts/simulate-production-env.mjs +7 -2
  252. package/scripts/validate-hosted-backend-live.mjs +112 -1
  253. package/specs/antibody-pack-v1.schema.json +95 -0
  254. package/specs/antigen-envelope-v1.schema.json +81 -0
  255. package/specs/boundary-manifest-v1.schema.json +35 -35
  256. package/specs/capsule-v1.schema.json +55 -55
  257. package/specs/claim-boundary-manifest-v1.schema.json +22 -22
  258. package/specs/claim-ledger-v1.schema.json +291 -0
  259. package/specs/context-passport-v1.schema.json +59 -0
  260. package/specs/deletion-tombstone-v1.schema.json +26 -26
  261. package/specs/evidence-packet-v1.schema.json +177 -0
  262. package/specs/hosted-backend-live-evidence-v1.schema.json +72 -3
  263. package/specs/immune-scan-report-v1.schema.json +112 -0
  264. package/specs/lifecycle-receipt-log-v1.schema.json +67 -0
  265. package/specs/memory-atom-v1.schema.json +59 -0
  266. package/specs/memory-event-v1.schema.json +42 -42
  267. package/specs/passport-v1.schema.json +50 -50
  268. package/specs/proof-of-non-use-v1.schema.json +65 -0
  269. package/specs/quarantine-record-v1.schema.json +126 -0
  270. package/specs/receipt-v1.schema.json +61 -61
  271. package/specs/state-checkpoint-v1.schema.json +37 -37
  272. package/specs/trust-bundle-v1.schema.json +56 -56
  273. package/specs/trust-card-v1.schema.json +119 -0
  274. package/docs/proof-network-launch-plan.md +0 -421
  275. package/packages/metering/PACKAGE_CONTRACT.md +0 -20
  276. package/scripts/build-ai-orchestration-plan.mjs +0 -248
@@ -1,50 +1,50 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schemas.enigma.ai/passport-v1.schema.json",
4
- "title": "Enigma Passport v1",
5
- "type": "object",
6
- "required": ["schema", "passport_id", "owner", "created_at", "updated_at", "vault", "policies", "checkpoints"],
7
- "additionalProperties": false,
8
- "properties": {
9
- "schema": { "const": "enigma.passport.v1" },
10
- "passport_id": { "type": "string", "minLength": 8 },
11
- "owner": {
12
- "type": "object",
13
- "required": ["subject_id", "display_name"],
14
- "additionalProperties": false,
15
- "properties": {
16
- "subject_id": { "type": "string", "minLength": 1 },
17
- "display_name": { "type": "string" },
18
- "identity_refs": { "type": "array", "items": { "type": "string" } }
19
- }
20
- },
21
- "created_at": { "type": "string", "format": "date-time" },
22
- "updated_at": { "type": "string", "format": "date-time" },
23
- "vault": {
24
- "type": "object",
25
- "required": ["vault_id", "encryption", "active_set_root", "receipt_log_root"],
26
- "additionalProperties": false,
27
- "properties": {
28
- "vault_id": { "type": "string", "minLength": 1 },
29
- "encryption": { "type": "string", "enum": ["local_aead", "kms_envelope", "external"] },
30
- "active_set_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
31
- "receipt_log_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
32
- }
33
- },
34
- "policies": { "type": "array", "items": { "type": "string" } },
35
- "checkpoints": {
36
- "type": "array",
37
- "items": {
38
- "type": "object",
39
- "required": ["sequence", "active_set_root", "receipt_log_root", "timestamp"],
40
- "additionalProperties": false,
41
- "properties": {
42
- "sequence": { "type": "integer", "minimum": 0 },
43
- "active_set_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
44
- "receipt_log_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
45
- "timestamp": { "type": "string", "format": "date-time" }
46
- }
47
- }
48
- }
49
- }
50
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.enigma.ai/passport-v1.schema.json",
4
+ "title": "Enigma Passport v1",
5
+ "type": "object",
6
+ "required": ["schema", "passport_id", "owner", "created_at", "updated_at", "vault", "policies", "checkpoints"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "schema": { "const": "enigma.passport.v1" },
10
+ "passport_id": { "type": "string", "minLength": 8 },
11
+ "owner": {
12
+ "type": "object",
13
+ "required": ["subject_id", "display_name"],
14
+ "additionalProperties": false,
15
+ "properties": {
16
+ "subject_id": { "type": "string", "minLength": 1 },
17
+ "display_name": { "type": "string" },
18
+ "identity_refs": { "type": "array", "items": { "type": "string" } }
19
+ }
20
+ },
21
+ "created_at": { "type": "string", "format": "date-time" },
22
+ "updated_at": { "type": "string", "format": "date-time" },
23
+ "vault": {
24
+ "type": "object",
25
+ "required": ["vault_id", "encryption", "active_set_root", "receipt_log_root"],
26
+ "additionalProperties": false,
27
+ "properties": {
28
+ "vault_id": { "type": "string", "minLength": 1 },
29
+ "encryption": { "type": "string", "enum": ["local_aead", "kms_envelope", "external"] },
30
+ "active_set_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
31
+ "receipt_log_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
32
+ }
33
+ },
34
+ "policies": { "type": "array", "items": { "type": "string" } },
35
+ "checkpoints": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "object",
39
+ "required": ["sequence", "active_set_root", "receipt_log_root", "timestamp"],
40
+ "additionalProperties": false,
41
+ "properties": {
42
+ "sequence": { "type": "integer", "minimum": 0 },
43
+ "active_set_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
44
+ "receipt_log_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
45
+ "timestamp": { "type": "string", "format": "date-time" }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.enigma.ai/proof-of-non-use-v1.schema.json",
4
+ "title": "Enigma Proof of Non-Use v1",
5
+ "type": "object",
6
+ "required": [
7
+ "schema",
8
+ "proof_id",
9
+ "issued_at",
10
+ "subject_ref",
11
+ "query_commitment",
12
+ "candidate_set_root",
13
+ "selected_set_root",
14
+ "omitted_set_root",
15
+ "tombstone_set_root",
16
+ "candidate_count",
17
+ "selected_count",
18
+ "omitted_count",
19
+ "tombstone_count",
20
+ "policy_id",
21
+ "policy_decision",
22
+ "verifier_status",
23
+ "verifier_ref",
24
+ "receipt_log_root",
25
+ "receipt_refs"
26
+ ],
27
+ "additionalProperties": false,
28
+ "properties": {
29
+ "schema": { "const": "enigma.proof_of_non_use.v1" },
30
+ "proof_id": { "$ref": "#/$defs/publicId" },
31
+ "issued_at": { "type": "string", "format": "date-time" },
32
+ "subject_ref": { "$ref": "#/$defs/publicRef" },
33
+ "query_commitment": { "$ref": "#/$defs/sha256Digest" },
34
+ "candidate_set_root": { "$ref": "#/$defs/sha256Digest" },
35
+ "selected_set_root": { "$ref": "#/$defs/sha256Digest" },
36
+ "omitted_set_root": { "$ref": "#/$defs/sha256Digest" },
37
+ "tombstone_set_root": { "$ref": "#/$defs/sha256Digest" },
38
+ "candidate_count": { "type": "integer", "minimum": 0 },
39
+ "selected_count": { "type": "integer", "minimum": 0 },
40
+ "omitted_count": { "type": "integer", "minimum": 0 },
41
+ "tombstone_count": { "type": "integer", "minimum": 0 },
42
+ "policy_id": { "$ref": "#/$defs/publicId" },
43
+ "policy_decision": {
44
+ "type": "string",
45
+ "enum": ["allow", "deny", "redact", "quarantine", "tombstone_only"]
46
+ },
47
+ "verifier_status": {
48
+ "type": "string",
49
+ "enum": ["verified", "failed", "inconclusive"]
50
+ },
51
+ "verifier_ref": { "$ref": "#/$defs/publicRef" },
52
+ "receipt_log_root": { "$ref": "#/$defs/sha256Digest" },
53
+ "receipt_refs": {
54
+ "type": "array",
55
+ "minItems": 1,
56
+ "items": { "$ref": "#/$defs/publicRef" },
57
+ "uniqueItems": true
58
+ }
59
+ },
60
+ "$defs": {
61
+ "sha256Digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
62
+ "publicId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$" },
63
+ "publicRef": { "type": "string", "pattern": "^(?![A-Za-z]:$)[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$" }
64
+ }
65
+ }
@@ -0,0 +1,126 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.enigma.ai/quarantine-record-v1.schema.json",
4
+ "title": "Enigma Quarantine Record v1",
5
+ "type": "object",
6
+ "required": [
7
+ "schema",
8
+ "quarantine_record_id",
9
+ "created_at",
10
+ "antigen_ref",
11
+ "quarantine_ref",
12
+ "subject_commitment",
13
+ "transition",
14
+ "decision",
15
+ "receipts",
16
+ "roots",
17
+ "claim_boundary",
18
+ "public_payload_only",
19
+ "payload_included"
20
+ ],
21
+ "additionalProperties": false,
22
+ "properties": {
23
+ "schema": { "const": "enigma.quarantine_record.v1" },
24
+ "quarantine_record_id": { "$ref": "#/$defs/publicId" },
25
+ "created_at": { "type": "string", "format": "date-time" },
26
+ "antigen_ref": { "$ref": "#/$defs/publicRef" },
27
+ "quarantine_ref": { "$ref": "#/$defs/publicRef" },
28
+ "subject_commitment": { "$ref": "#/$defs/sha256Digest" },
29
+ "transition": { "type": "string", "enum": ["isolated", "reintegrated", "tombstoned"] },
30
+ "decision": {
31
+ "type": "object",
32
+ "required": ["decision_id", "decided_at", "action", "reason_labels", "policy_id"],
33
+ "additionalProperties": false,
34
+ "properties": {
35
+ "decision_id": { "$ref": "#/$defs/publicId" },
36
+ "decided_at": { "type": "string", "format": "date-time" },
37
+ "action": { "type": "string", "enum": ["isolate", "reintegrate", "tombstone"] },
38
+ "reason_labels": {
39
+ "type": "array",
40
+ "minItems": 1,
41
+ "items": { "$ref": "#/$defs/reasonLabel" },
42
+ "uniqueItems": true
43
+ },
44
+ "policy_id": { "$ref": "#/$defs/policyId" }
45
+ }
46
+ },
47
+ "receipts": {
48
+ "type": "array",
49
+ "minItems": 1,
50
+ "items": { "$ref": "#/$defs/receiptCommitment" }
51
+ },
52
+ "roots": { "$ref": "#/$defs/quarantineRoots" },
53
+ "claim_boundary": { "$ref": "#/$defs/claimBoundary" },
54
+ "public_payload_only": { "const": true },
55
+ "payload_included": { "const": false }
56
+ },
57
+ "$defs": {
58
+ "sha256Digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
59
+ "publicId": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._:-]{7,127}$" },
60
+ "publicRef": { "type": "string", "pattern": "^ref:[A-Za-z0-9][A-Za-z0-9._~:@#?=&%+-]{0,255}$" },
61
+ "policyId": { "type": "string", "pattern": "^policy:[A-Za-z0-9][A-Za-z0-9._~:@#?=&%+-]{0,191}$" },
62
+ "receiptCommitment": {
63
+ "type": "object",
64
+ "required": ["receipt_ref", "receipt_hash", "sequence", "operation"],
65
+ "additionalProperties": false,
66
+ "properties": {
67
+ "receipt_ref": { "$ref": "#/$defs/publicRef" },
68
+ "receipt_hash": { "$ref": "#/$defs/sha256Digest" },
69
+ "sequence": { "type": "integer", "minimum": 0 },
70
+ "operation": { "type": "string", "enum": ["quarantine", "isolate", "review", "reintegrate", "tombstone"] }
71
+ }
72
+ },
73
+ "quarantineRoots": {
74
+ "type": "object",
75
+ "required": [
76
+ "previous_active_root",
77
+ "previous_quarantine_root",
78
+ "previous_tombstone_root",
79
+ "next_active_root",
80
+ "next_quarantine_root",
81
+ "next_tombstone_root",
82
+ "receipt_chain_root"
83
+ ],
84
+ "additionalProperties": false,
85
+ "properties": {
86
+ "previous_active_root": { "$ref": "#/$defs/sha256Digest" },
87
+ "previous_quarantine_root": { "$ref": "#/$defs/sha256Digest" },
88
+ "previous_tombstone_root": { "$ref": "#/$defs/sha256Digest" },
89
+ "next_active_root": { "$ref": "#/$defs/sha256Digest" },
90
+ "next_quarantine_root": { "$ref": "#/$defs/sha256Digest" },
91
+ "next_tombstone_root": { "$ref": "#/$defs/sha256Digest" },
92
+ "receipt_chain_root": { "$ref": "#/$defs/sha256Digest" }
93
+ }
94
+ },
95
+ "claimBoundary": {
96
+ "type": "object",
97
+ "required": [
98
+ "local_state_transition_claim",
99
+ "provider_deletion_claim",
100
+ "model_forgetting_claim",
101
+ "raw_payload_public",
102
+ "hardware_tamper_proof_claim"
103
+ ],
104
+ "additionalProperties": false,
105
+ "properties": {
106
+ "local_state_transition_claim": { "const": true },
107
+ "provider_deletion_claim": { "const": false },
108
+ "model_forgetting_claim": { "const": false },
109
+ "raw_payload_public": { "const": false },
110
+ "hardware_tamper_proof_claim": { "const": false }
111
+ }
112
+ },
113
+ "reasonLabel": {
114
+ "type": "string",
115
+ "enum": [
116
+ "untrusted_origin",
117
+ "prompt_injection",
118
+ "data_exfiltration",
119
+ "secret_material",
120
+ "memory_poisoning",
121
+ "policy_violation",
122
+ "manual_review"
123
+ ]
124
+ }
125
+ }
126
+ }
@@ -1,61 +1,61 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schemas.enigma.ai/receipt-v1.schema.json",
4
- "title": "Enigma Receipt v1",
5
- "type": "object",
6
- "required": [
7
- "schema",
8
- "receipt_id",
9
- "event_hash",
10
- "operation",
11
- "tenant_id",
12
- "subject_id",
13
- "sequence",
14
- "previous_receipt_hash",
15
- "active_set_root",
16
- "receipt_log_root",
17
- "timestamp",
18
- "signer",
19
- "signature"
20
- ],
21
- "additionalProperties": false,
22
- "properties": {
23
- "schema": { "const": "enigma.receipt.v1" },
24
- "receipt_id": { "type": "string", "minLength": 8 },
25
- "event_hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
26
- "operation": {
27
- "type": "string",
28
- "enum": ["create", "read", "update", "supersede", "delete", "retrieve", "inject", "export", "import", "deny", "quarantine", "boundary_cross"]
29
- },
30
- "tenant_id": { "type": "string", "minLength": 1 },
31
- "subject_id": { "type": "string", "minLength": 1 },
32
- "memory_addr": { "type": "string" },
33
- "source_addr": { "type": "string" },
34
- "provider": { "type": "string" },
35
- "model": { "type": "string" },
36
- "policy_id": { "type": "string" },
37
- "sequence": { "type": "integer", "minimum": 0 },
38
- "previous_receipt_hash": { "type": "string", "pattern": "^(sha256:[a-f0-9]{64}|GENESIS)$" },
39
- "active_set_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
40
- "receipt_log_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
41
- "timestamp": { "type": "string", "format": "date-time" },
42
- "signer": {
43
- "type": "object",
44
- "required": ["key_id", "alg"],
45
- "additionalProperties": false,
46
- "properties": {
47
- "key_id": { "type": "string", "minLength": 1 },
48
- "alg": { "const": "Ed25519" }
49
- }
50
- },
51
- "signature": {
52
- "type": "object",
53
- "required": ["alg", "value"],
54
- "additionalProperties": false,
55
- "properties": {
56
- "alg": { "const": "Ed25519" },
57
- "value": { "type": "string", "minLength": 64 }
58
- }
59
- }
60
- }
61
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.enigma.ai/receipt-v1.schema.json",
4
+ "title": "Enigma Receipt v1",
5
+ "type": "object",
6
+ "required": [
7
+ "schema",
8
+ "receipt_id",
9
+ "event_hash",
10
+ "operation",
11
+ "tenant_id",
12
+ "subject_id",
13
+ "sequence",
14
+ "previous_receipt_hash",
15
+ "active_set_root",
16
+ "receipt_log_root",
17
+ "timestamp",
18
+ "signer",
19
+ "signature"
20
+ ],
21
+ "additionalProperties": false,
22
+ "properties": {
23
+ "schema": { "const": "enigma.receipt.v1" },
24
+ "receipt_id": { "type": "string", "minLength": 8 },
25
+ "event_hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
26
+ "operation": {
27
+ "type": "string",
28
+ "enum": ["create", "read", "update", "supersede", "delete", "retrieve", "inject", "export", "import", "deny", "quarantine", "boundary_cross"]
29
+ },
30
+ "tenant_id": { "type": "string", "minLength": 1 },
31
+ "subject_id": { "type": "string", "minLength": 1 },
32
+ "memory_addr": { "type": "string" },
33
+ "source_addr": { "type": "string" },
34
+ "provider": { "type": "string" },
35
+ "model": { "type": "string" },
36
+ "policy_id": { "type": "string" },
37
+ "sequence": { "type": "integer", "minimum": 0 },
38
+ "previous_receipt_hash": { "type": "string", "pattern": "^(sha256:[a-f0-9]{64}|GENESIS)$" },
39
+ "active_set_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
40
+ "receipt_log_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
41
+ "timestamp": { "type": "string", "format": "date-time" },
42
+ "signer": {
43
+ "type": "object",
44
+ "required": ["key_id", "alg"],
45
+ "additionalProperties": false,
46
+ "properties": {
47
+ "key_id": { "type": "string", "minLength": 1 },
48
+ "alg": { "const": "Ed25519" }
49
+ }
50
+ },
51
+ "signature": {
52
+ "type": "object",
53
+ "required": ["alg", "value"],
54
+ "additionalProperties": false,
55
+ "properties": {
56
+ "alg": { "const": "Ed25519" },
57
+ "value": { "type": "string", "minLength": 64 }
58
+ }
59
+ }
60
+ }
61
+ }
@@ -1,37 +1,37 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schemas.enigma.ai/state-checkpoint-v1.schema.json",
4
- "title": "Enigma State Checkpoint v1",
5
- "type": "object",
6
- "required": ["schema", "checkpoint_id", "tenant_hash", "owner_scope_hash", "epoch", "active_memory_root", "deleted_memory_root", "receipt_log_root", "key_registry_root", "policy_registry_root", "previous_checkpoint_hash", "issued_at", "signatures"],
7
- "additionalProperties": false,
8
- "properties": {
9
- "schema": { "const": "enigma.state_checkpoint.v1" },
10
- "checkpoint_id": { "type": "string", "minLength": 8 },
11
- "tenant_hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
12
- "owner_scope_hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
13
- "epoch": { "type": "integer", "minimum": 0 },
14
- "active_memory_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
15
- "deleted_memory_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
16
- "receipt_log_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
17
- "key_registry_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
18
- "policy_registry_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
19
- "previous_checkpoint_hash": { "type": "string", "pattern": "^(sha256:[a-f0-9]{64}|GENESIS)$" },
20
- "witness_policy": { "type": "string" },
21
- "issued_at": { "type": "string", "format": "date-time" },
22
- "signatures": {
23
- "type": "array",
24
- "minItems": 1,
25
- "items": {
26
- "type": "object",
27
- "required": ["alg", "key_id", "value"],
28
- "additionalProperties": false,
29
- "properties": {
30
- "alg": { "type": "string", "enum": ["Ed25519", "Ed25519+ML-DSA-policy"] },
31
- "key_id": { "type": "string", "minLength": 1 },
32
- "value": { "type": "string", "minLength": 64 }
33
- }
34
- }
35
- }
36
- }
37
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.enigma.ai/state-checkpoint-v1.schema.json",
4
+ "title": "Enigma State Checkpoint v1",
5
+ "type": "object",
6
+ "required": ["schema", "checkpoint_id", "tenant_hash", "owner_scope_hash", "epoch", "active_memory_root", "deleted_memory_root", "receipt_log_root", "key_registry_root", "policy_registry_root", "previous_checkpoint_hash", "issued_at", "signatures"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "schema": { "const": "enigma.state_checkpoint.v1" },
10
+ "checkpoint_id": { "type": "string", "minLength": 8 },
11
+ "tenant_hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
12
+ "owner_scope_hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
13
+ "epoch": { "type": "integer", "minimum": 0 },
14
+ "active_memory_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
15
+ "deleted_memory_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
16
+ "receipt_log_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
17
+ "key_registry_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
18
+ "policy_registry_root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
19
+ "previous_checkpoint_hash": { "type": "string", "pattern": "^(sha256:[a-f0-9]{64}|GENESIS)$" },
20
+ "witness_policy": { "type": "string" },
21
+ "issued_at": { "type": "string", "format": "date-time" },
22
+ "signatures": {
23
+ "type": "array",
24
+ "minItems": 1,
25
+ "items": {
26
+ "type": "object",
27
+ "required": ["alg", "key_id", "value"],
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "alg": { "type": "string", "enum": ["Ed25519", "Ed25519+ML-DSA-policy"] },
31
+ "key_id": { "type": "string", "minLength": 1 },
32
+ "value": { "type": "string", "minLength": 64 }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
@@ -1,56 +1,56 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schemas.enigma.ai/trust-bundle-v1.schema.json",
4
- "title": "Enigma Trust Bundle v1",
5
- "type": "object",
6
- "required": ["schema", "bundle_id", "created_at", "trusted_issuers", "trusted_witnesses", "accepted_algorithms", "revocations"],
7
- "additionalProperties": false,
8
- "properties": {
9
- "schema": { "const": "enigma.trust_bundle.v1" },
10
- "bundle_id": { "type": "string", "minLength": 8 },
11
- "created_at": { "type": "string", "format": "date-time" },
12
- "trusted_issuers": {
13
- "type": "array",
14
- "items": {
15
- "type": "object",
16
- "required": ["issuer_id", "key_id", "public_key", "scope"],
17
- "additionalProperties": false,
18
- "properties": {
19
- "issuer_id": { "type": "string", "minLength": 1 },
20
- "key_id": { "type": "string", "minLength": 1 },
21
- "public_key": { "type": "string", "minLength": 1 },
22
- "scope": { "type": "array", "items": { "type": "string" } }
23
- }
24
- }
25
- },
26
- "trusted_witnesses": {
27
- "type": "array",
28
- "items": {
29
- "type": "object",
30
- "required": ["witness_id", "key_id", "public_key"],
31
- "additionalProperties": false,
32
- "properties": {
33
- "witness_id": { "type": "string", "minLength": 1 },
34
- "key_id": { "type": "string", "minLength": 1 },
35
- "public_key": { "type": "string", "minLength": 1 }
36
- }
37
- }
38
- },
39
- "accepted_algorithms": { "type": "array", "items": { "type": "string", "enum": ["Ed25519", "Ed25519+ML-DSA-policy", "sha256", "hmac-sha256"] } },
40
- "import_capsule_policy": {
41
- "type": "object",
42
- "required": ["private_plaintext_boundary", "completeness_evidence_required", "recognized_importer_count", "unsupported_importer_count"],
43
- "additionalProperties": false,
44
- "properties": {
45
- "private_plaintext_boundary": {
46
- "type": "string",
47
- "enum": ["payload_private_public_artifacts_hash_only"]
48
- },
49
- "completeness_evidence_required": { "type": "boolean" },
50
- "recognized_importer_count": { "type": "integer", "minimum": 0 },
51
- "unsupported_importer_count": { "type": "integer", "minimum": 0 }
52
- }
53
- },
54
- "revocations": { "type": "array", "items": { "type": "string" } }
55
- }
56
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.enigma.ai/trust-bundle-v1.schema.json",
4
+ "title": "Enigma Trust Bundle v1",
5
+ "type": "object",
6
+ "required": ["schema", "bundle_id", "created_at", "trusted_issuers", "trusted_witnesses", "accepted_algorithms", "revocations"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "schema": { "const": "enigma.trust_bundle.v1" },
10
+ "bundle_id": { "type": "string", "minLength": 8 },
11
+ "created_at": { "type": "string", "format": "date-time" },
12
+ "trusted_issuers": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "required": ["issuer_id", "key_id", "public_key", "scope"],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "issuer_id": { "type": "string", "minLength": 1 },
20
+ "key_id": { "type": "string", "minLength": 1 },
21
+ "public_key": { "type": "string", "minLength": 1 },
22
+ "scope": { "type": "array", "items": { "type": "string" } }
23
+ }
24
+ }
25
+ },
26
+ "trusted_witnesses": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "object",
30
+ "required": ["witness_id", "key_id", "public_key"],
31
+ "additionalProperties": false,
32
+ "properties": {
33
+ "witness_id": { "type": "string", "minLength": 1 },
34
+ "key_id": { "type": "string", "minLength": 1 },
35
+ "public_key": { "type": "string", "minLength": 1 }
36
+ }
37
+ }
38
+ },
39
+ "accepted_algorithms": { "type": "array", "items": { "type": "string", "enum": ["Ed25519", "Ed25519+ML-DSA-policy", "sha256", "hmac-sha256"] } },
40
+ "import_capsule_policy": {
41
+ "type": "object",
42
+ "required": ["private_plaintext_boundary", "completeness_evidence_required", "recognized_importer_count", "unsupported_importer_count"],
43
+ "additionalProperties": false,
44
+ "properties": {
45
+ "private_plaintext_boundary": {
46
+ "type": "string",
47
+ "enum": ["payload_private_public_artifacts_hash_only"]
48
+ },
49
+ "completeness_evidence_required": { "type": "boolean" },
50
+ "recognized_importer_count": { "type": "integer", "minimum": 0 },
51
+ "unsupported_importer_count": { "type": "integer", "minimum": 0 }
52
+ }
53
+ },
54
+ "revocations": { "type": "array", "items": { "type": "string" } }
55
+ }
56
+ }