enigma-memory 0.1.0
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/LICENSE +55 -0
- package/README.md +379 -0
- package/apps/cli/bin/enigma.mjs +1117 -0
- package/apps/desktop/src/app.js +1327 -0
- package/apps/desktop/src/index.html +1373 -0
- package/apps/desktop/src/styles.css +386 -0
- package/apps/gateway/bin/enigma-gateway.mjs +52 -0
- package/apps/gateway/src/server.mjs +1403 -0
- package/apps/native-host/README.md +265 -0
- package/apps/native-host/bin/enigma-native-host.mjs +499 -0
- package/apps/native-host/manifests/com.enigma.native_host.chrome.json +9 -0
- package/apps/native-host/manifests/com.enigma.native_host.edge.json +9 -0
- package/apps/native-host/manifests/com.enigma.native_host.firefox.json +9 -0
- package/apps/relay/bin/enigma-relay.mjs +52 -0
- package/apps/relay/src/server.mjs +1571 -0
- package/apps/verifier/bin/enigma-verify.mjs +240 -0
- package/deploy/docker-compose.production.example.yml +150 -0
- package/deploy/kubernetes/enigma-backend.example.yaml +580 -0
- package/package.json +196 -0
- package/packages/adapters/PACKAGE_CONTRACT.md +47 -0
- package/packages/adapters/src/index.js +183 -0
- package/packages/boundary/src/index.js +468 -0
- package/packages/connectors/src/index.js +533 -0
- package/packages/core/src/index.js +766 -0
- package/packages/enterprise/src/index.js +505 -0
- package/packages/importers/src/index.js +1083 -0
- package/packages/mcp-server/bin/enigma-mcp.mjs +19 -0
- package/packages/mcp-server/src/index.js +1185 -0
- package/packages/mesh/src/index.js +531 -0
- package/packages/metering/PACKAGE_CONTRACT.md +20 -0
- package/packages/metering/src/index.js +246 -0
- package/packages/optimizer/src/index.js +707 -0
- package/packages/passport/src/index.js +651 -0
- package/packages/settlement/PACKAGE_CONTRACT.md +28 -0
- package/packages/settlement/src/index.js +369 -0
- package/packages/storage/PACKAGE_CONTRACT.md +23 -0
- package/packages/storage/src/index.js +392 -0
- package/packages/vault/src/index.js +904 -0
- package/scripts/build-ai-orchestration-plan.mjs +248 -0
- package/scripts/build-cloudflare-pages-release-packet.mjs +287 -0
- package/scripts/build-cloudflare-token-policy.mjs +239 -0
- package/scripts/build-cloudflare-token-request.mjs +314 -0
- package/scripts/build-demo-assets.mjs +263 -0
- package/scripts/build-edge-backend-workers.mjs +353 -0
- package/scripts/build-goal-completion-audit.mjs +398 -0
- package/scripts/build-hosted-probe-worker.mjs +191 -0
- package/scripts/build-operator-acceptance-packet.mjs +254 -0
- package/scripts/build-operator-evidence-starter.mjs +525 -0
- package/scripts/build-production-backend-env-kit.mjs +384 -0
- package/scripts/build-production-dependency-report.mjs +369 -0
- package/scripts/build-production-handoff-packet.mjs +475 -0
- package/scripts/build-production-readiness-manifest.mjs +209 -0
- package/scripts/build-production-status-board.mjs +297 -0
- package/scripts/build-production-storage-migration.mjs +86 -0
- package/scripts/build-production-workplan.mjs +371 -0
- package/scripts/build-review-packet.mjs +594 -0
- package/scripts/check.mjs +419 -0
- package/scripts/cloudflare-ops.mjs +1672 -0
- package/scripts/cloudflare-secret-env.mjs +128 -0
- package/scripts/collect-hosted-backend-live-evidence.mjs +263 -0
- package/scripts/infrastructure-readiness.mjs +944 -0
- package/scripts/install-enigma-local.mjs +270 -0
- package/scripts/memory-optimization-benchmark.mjs +242 -0
- package/scripts/monitor-live-endpoints.mjs +358 -0
- package/scripts/release-audit.mjs +5588 -0
- package/scripts/release-provenance.mjs +250 -0
- package/scripts/run-backend-readiness-smoke.mjs +220 -0
- package/scripts/validate-backup-restore-drill.mjs +166 -0
- package/scripts/validate-cloudflare-credentials.mjs +112 -0
- package/scripts/validate-cloudflare-worker-inspect.mjs +179 -0
- package/scripts/validate-domain-tls.mjs +248 -0
- package/scripts/validate-hosted-backend-live.mjs +319 -0
- package/scripts/validate-incident-drill.mjs +221 -0
- package/scripts/validate-kms-custody.mjs +235 -0
- package/scripts/validate-legal-compliance-approval.mjs +274 -0
- package/scripts/validate-monitoring-alerting.mjs +263 -0
- package/scripts/validate-network-access-policy.mjs +285 -0
- package/scripts/validate-operator-acceptance.mjs +298 -0
- package/scripts/validate-production-manifests.mjs +325 -0
- package/scripts/validate-public-site-security.mjs +252 -0
- package/scripts/validate-security-threat-model.mjs +285 -0
- package/scripts/validate-service-settlement.mjs +256 -0
- package/scripts/validate-support-sla.mjs +190 -0
- package/scripts/validate-tenant-policy-approval.mjs +228 -0
- package/scripts/validate-usage-metering.mjs +224 -0
- package/scripts/validate-whitepaper-claims.mjs +166 -0
- package/specs/boundary-manifest-v1.schema.json +35 -0
- package/specs/capsule-v1.schema.json +55 -0
- package/specs/claim-boundary-manifest-v1.schema.json +22 -0
- package/specs/connector-profile-v1.schema.json +62 -0
- package/specs/deletion-tombstone-v1.schema.json +26 -0
- package/specs/enterprise-policy-v1.schema.json +59 -0
- package/specs/gateway-request-v1.schema.json +32 -0
- package/specs/goal-completion-audit-v1.schema.json +70 -0
- package/specs/hosted-backend-live-evidence-v1.schema.json +147 -0
- package/specs/import-report-v1.schema.json +214 -0
- package/specs/infrastructure-readiness-manifest-v1.schema.json +130 -0
- package/specs/memory-event-v1.schema.json +42 -0
- package/specs/mesh-node-v1.schema.json +126 -0
- package/specs/passport-v1.schema.json +50 -0
- package/specs/production-handoff-packet-v1.schema.json +149 -0
- package/specs/receipt-v1.schema.json +61 -0
- package/specs/relay-record-v1.schema.json +43 -0
- package/specs/state-checkpoint-v1.schema.json +37 -0
- package/specs/trust-bundle-v1.schema.json +56 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.enigma.ai/import-report-v1.schema.json",
|
|
4
|
+
"title": "Enigma Import Report v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"schema",
|
|
8
|
+
"report_id",
|
|
9
|
+
"importer",
|
|
10
|
+
"source_type",
|
|
11
|
+
"source_fingerprint",
|
|
12
|
+
"generated_at",
|
|
13
|
+
"complete",
|
|
14
|
+
"completeness",
|
|
15
|
+
"source_refs",
|
|
16
|
+
"limitations",
|
|
17
|
+
"confidence",
|
|
18
|
+
"memory_candidates",
|
|
19
|
+
"vault_writes"
|
|
20
|
+
],
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"properties": {
|
|
23
|
+
"schema": { "const": "enigma.import_report.v1" },
|
|
24
|
+
"report_id": { "type": "string", "pattern": "^imp_[a-f0-9]{32}$" },
|
|
25
|
+
"importer": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"importChatGptExport",
|
|
29
|
+
"importClaudeMemory",
|
|
30
|
+
"importMem0Export",
|
|
31
|
+
"importLettaAgentFile",
|
|
32
|
+
"importLangGraphStore",
|
|
33
|
+
"importZepGraphitiExport"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"source_type": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"enum": [
|
|
39
|
+
"chatgpt_export",
|
|
40
|
+
"claude_memory",
|
|
41
|
+
"mem0_export",
|
|
42
|
+
"letta_agent_file",
|
|
43
|
+
"langgraph_store",
|
|
44
|
+
"zep_graphiti_export"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"source_fingerprint": { "$ref": "#/$defs/sha256Root" },
|
|
48
|
+
"generated_at": { "type": "string", "format": "date-time" },
|
|
49
|
+
"complete": { "type": "boolean" },
|
|
50
|
+
"completeness": { "type": "string", "enum": ["explicit_complete", "partial_or_unknown"] },
|
|
51
|
+
"completeness_evidence": { "$ref": "#/$defs/completenessEvidence" },
|
|
52
|
+
"recognized_candidate_count": { "type": "integer", "minimum": 0 },
|
|
53
|
+
"unsupported_item_count": { "type": "integer", "minimum": 0 },
|
|
54
|
+
"private_plaintext_boundary": { "$ref": "#/$defs/privatePlaintextBoundary" },
|
|
55
|
+
"source_refs": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"items": { "$ref": "#/$defs/sourceRef" }
|
|
58
|
+
},
|
|
59
|
+
"limitations": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"minItems": 1,
|
|
62
|
+
"items": { "type": "string", "minLength": 1 },
|
|
63
|
+
"uniqueItems": true
|
|
64
|
+
},
|
|
65
|
+
"confidence": { "$ref": "#/$defs/confidence" },
|
|
66
|
+
"memory_candidates": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": { "$ref": "#/$defs/memoryCandidate" }
|
|
69
|
+
},
|
|
70
|
+
"vault_writes": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"items": { "$ref": "#/$defs/vaultWrite" }
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"$defs": {
|
|
76
|
+
"sha256Root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
77
|
+
"confidence": { "type": "string", "enum": ["low", "medium", "high", "source_asserted", "user_confirmed"] },
|
|
78
|
+
"completenessEvidence": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"required": ["recognized_count", "unsupported_count", "conflicting", "explicit_assertion", "complete"],
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"properties": {
|
|
83
|
+
"recognized_count": { "type": "integer", "minimum": 0 },
|
|
84
|
+
"unsupported_count": { "type": "integer", "minimum": 0 },
|
|
85
|
+
"conflicting": { "type": "boolean" },
|
|
86
|
+
"explicit_assertion": { "type": "boolean" },
|
|
87
|
+
"complete": { "type": "boolean" }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"privatePlaintextBoundary": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"required": ["contains_private_plaintext", "private_fields", "public_artifact_policy"],
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"properties": {
|
|
95
|
+
"contains_private_plaintext": { "type": "boolean" },
|
|
96
|
+
"private_fields": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
97
|
+
"public_artifact_policy": { "type": "string", "enum": ["hashes_and_commitments_only", "manifest_and_verifier_metadata_only", "hashes_roots_counts_and_trusted_descriptor_only"] }
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"sourceRef": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"required": ["source_type", "path", "source_hash"],
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"properties": {
|
|
105
|
+
"source_type": { "type": "string", "minLength": 1 },
|
|
106
|
+
"path": { "type": "string", "minLength": 1 },
|
|
107
|
+
"source_id": { "type": "string", "minLength": 1 },
|
|
108
|
+
"source_hash": { "$ref": "#/$defs/sha256Root" }
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"memoryCandidate": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"required": ["schema", "candidate_id", "kind", "content", "source_refs", "limitations", "confidence", "metadata"],
|
|
114
|
+
"additionalProperties": false,
|
|
115
|
+
"properties": {
|
|
116
|
+
"schema": { "const": "enigma.memory_candidate.v1" },
|
|
117
|
+
"candidate_id": { "type": "string", "pattern": "^cand_[a-f0-9]{32}$" },
|
|
118
|
+
"kind": { "type": "string", "minLength": 1 },
|
|
119
|
+
"content": { "type": "string", "minLength": 1 },
|
|
120
|
+
"source_refs": {
|
|
121
|
+
"type": "array",
|
|
122
|
+
"minItems": 1,
|
|
123
|
+
"items": { "$ref": "#/$defs/sourceRef" }
|
|
124
|
+
},
|
|
125
|
+
"limitations": {
|
|
126
|
+
"type": "array",
|
|
127
|
+
"minItems": 1,
|
|
128
|
+
"items": { "type": "string", "minLength": 1 },
|
|
129
|
+
"uniqueItems": true
|
|
130
|
+
},
|
|
131
|
+
"confidence": { "$ref": "#/$defs/confidence" },
|
|
132
|
+
"metadata": {
|
|
133
|
+
"type": "object",
|
|
134
|
+
"additionalProperties": {
|
|
135
|
+
"type": ["string", "number", "boolean", "null"]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"vaultWrite": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"required": ["candidate_id", "memory_addr", "receipt_hash"],
|
|
143
|
+
"additionalProperties": false,
|
|
144
|
+
"properties": {
|
|
145
|
+
"candidate_id": { "type": "string", "pattern": "^cand_[a-f0-9]{32}$" },
|
|
146
|
+
"memory_addr": { "type": "string", "minLength": 1 },
|
|
147
|
+
"receipt_hash": { "$ref": "#/$defs/sha256Root" },
|
|
148
|
+
"event_id": { "type": "string", "minLength": 1 },
|
|
149
|
+
"receipt_public_key": { "type": "string", "minLength": 1 },
|
|
150
|
+
"receipt": { "$ref": "#/$defs/receipt" }
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"receipt": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"required": [
|
|
156
|
+
"schema",
|
|
157
|
+
"receipt_id",
|
|
158
|
+
"event_hash",
|
|
159
|
+
"operation",
|
|
160
|
+
"tenant_id",
|
|
161
|
+
"subject_id",
|
|
162
|
+
"sequence",
|
|
163
|
+
"previous_receipt_hash",
|
|
164
|
+
"active_set_root",
|
|
165
|
+
"receipt_log_root",
|
|
166
|
+
"timestamp",
|
|
167
|
+
"signer",
|
|
168
|
+
"signature"
|
|
169
|
+
],
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"properties": {
|
|
172
|
+
"schema": { "const": "enigma.receipt.v1" },
|
|
173
|
+
"receipt_id": { "type": "string", "pattern": "^rcpt_[a-f0-9]{32}$" },
|
|
174
|
+
"event_hash": { "$ref": "#/$defs/sha256Root" },
|
|
175
|
+
"operation": { "type": "string", "minLength": 1 },
|
|
176
|
+
"tenant_id": { "type": "string", "minLength": 1 },
|
|
177
|
+
"subject_id": { "type": "string", "minLength": 1 },
|
|
178
|
+
"memory_addr": { "type": "string", "minLength": 1 },
|
|
179
|
+
"source_addr": { "type": "string", "minLength": 1 },
|
|
180
|
+
"provider": { "type": "string", "minLength": 1 },
|
|
181
|
+
"model": { "type": "string", "minLength": 1 },
|
|
182
|
+
"policy_id": { "type": "string", "minLength": 1 },
|
|
183
|
+
"sequence": { "type": "integer", "minimum": 0 },
|
|
184
|
+
"previous_receipt_hash": {
|
|
185
|
+
"anyOf": [
|
|
186
|
+
{ "const": "GENESIS" },
|
|
187
|
+
{ "$ref": "#/$defs/sha256Root" }
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"active_set_root": { "$ref": "#/$defs/sha256Root" },
|
|
191
|
+
"receipt_log_root": { "$ref": "#/$defs/sha256Root" },
|
|
192
|
+
"timestamp": { "type": "string", "format": "date-time" },
|
|
193
|
+
"signer": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"required": ["alg", "key_id"],
|
|
196
|
+
"additionalProperties": false,
|
|
197
|
+
"properties": {
|
|
198
|
+
"alg": { "const": "Ed25519" },
|
|
199
|
+
"key_id": { "type": "string", "minLength": 1 }
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"signature": {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"required": ["alg", "value"],
|
|
205
|
+
"additionalProperties": false,
|
|
206
|
+
"properties": {
|
|
207
|
+
"alg": { "const": "Ed25519" },
|
|
208
|
+
"value": { "type": "string", "minLength": 1 }
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.enigma.ai/infrastructure-readiness-manifest-v1.schema.json",
|
|
4
|
+
"title": "Enigma Infrastructure Readiness Manifest v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schema", "claim_boundary"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "const": "enigma.infrastructure_readiness_manifest.v1" },
|
|
10
|
+
"name": { "type": "string", "minLength": 1 },
|
|
11
|
+
"mode": { "type": "string", "enum": ["contract-only", "hosted-live"] },
|
|
12
|
+
"public_site": { "$ref": "#/$defs/endpoint" },
|
|
13
|
+
"github": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"properties": {
|
|
17
|
+
"repository": { "type": "string", "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" },
|
|
18
|
+
"repo": { "type": "string", "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" },
|
|
19
|
+
"repository_full_name": { "type": "string", "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" },
|
|
20
|
+
"url": { "type": "string", "format": "uri" },
|
|
21
|
+
"repository_url": { "type": "string", "format": "uri" },
|
|
22
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
23
|
+
"commit": { "type": "string", "minLength": 1 },
|
|
24
|
+
"release_ref": { "type": "string", "minLength": 1 },
|
|
25
|
+
"pages_branch": { "type": "string", "minLength": 1 },
|
|
26
|
+
"workflow_ref": { "type": "string", "minLength": 1 }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"cloudflare": { "$ref": "#/$defs/cloudflare" },
|
|
30
|
+
"cloudflare_pages": { "$ref": "#/$defs/cloudflare" },
|
|
31
|
+
"relay": { "$ref": "#/$defs/endpoint" },
|
|
32
|
+
"gateway": { "$ref": "#/$defs/endpoint" },
|
|
33
|
+
"refs": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"properties": {
|
|
37
|
+
"relay": { "type": "string", "minLength": 1 },
|
|
38
|
+
"gateway": { "type": "string", "minLength": 1 },
|
|
39
|
+
"relay_deployment": { "type": "string", "minLength": 1 },
|
|
40
|
+
"relay_ref": { "type": "string", "minLength": 1 },
|
|
41
|
+
"gateway_deployment": { "type": "string", "minLength": 1 },
|
|
42
|
+
"gateway_ref": { "type": "string", "minLength": 1 },
|
|
43
|
+
"backend_host": { "type": "string", "minLength": 1 },
|
|
44
|
+
"dns_tls": { "type": "string", "minLength": 1 },
|
|
45
|
+
"durable_storage": { "type": "string", "minLength": 1 },
|
|
46
|
+
"kms": { "type": "string", "minLength": 1 },
|
|
47
|
+
"kms_or_secret_custody": { "type": "string", "minLength": 1 },
|
|
48
|
+
"siem_or_log_sink": { "type": "string", "minLength": 1 },
|
|
49
|
+
"backup_restore": { "type": "string", "minLength": 1 },
|
|
50
|
+
"monitoring": { "type": "string", "minLength": 1 },
|
|
51
|
+
"runtime_auth": { "type": "string", "minLength": 1 },
|
|
52
|
+
"admin_auth": { "type": "string", "minLength": 1 },
|
|
53
|
+
"data_plane_auth": { "type": "string", "minLength": 1 },
|
|
54
|
+
"siem": { "type": "string", "minLength": 1 },
|
|
55
|
+
"backup": { "type": "string", "minLength": 1 },
|
|
56
|
+
"operator_acceptance": { "type": "string", "minLength": 1 },
|
|
57
|
+
"network_access_policy": { "type": "string", "minLength": 1 },
|
|
58
|
+
"kms_custody": { "type": "string", "minLength": 1 },
|
|
59
|
+
"tenant_policy_approval": { "type": "string", "minLength": 1 },
|
|
60
|
+
"usage_metering": { "type": "string", "minLength": 1 },
|
|
61
|
+
"service_settlement": { "type": "string", "minLength": 1 },
|
|
62
|
+
"monitoring_alerting": { "type": "string", "minLength": 1 },
|
|
63
|
+
"public_site_security": { "type": "string", "minLength": 1 },
|
|
64
|
+
"security_threat_model": { "type": "string", "minLength": 1 },
|
|
65
|
+
"legal_compliance_approval": { "type": "string", "minLength": 1 },
|
|
66
|
+
"support_sla": { "type": "string", "minLength": 1 },
|
|
67
|
+
"incident_drill": { "type": "string", "minLength": 1 },
|
|
68
|
+
"backup_restore_drill": { "type": "string", "minLength": 1 },
|
|
69
|
+
"token_approval": { "type": "string", "minLength": 1 }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"operator_acceptance": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"properties": {
|
|
76
|
+
"decision": { "type": "string", "enum": ["go", "no-go", "no_go", "pending"] },
|
|
77
|
+
"status": { "type": "string", "enum": ["go", "no-go", "no_go", "pending"] },
|
|
78
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
79
|
+
"packet_ref": { "type": "string", "minLength": 1 },
|
|
80
|
+
"evidence_ref": { "type": "string", "minLength": 1 },
|
|
81
|
+
"owner": { "type": "string", "minLength": 1 }
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"external_blockers": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": { "type": "string", "minLength": 1 }
|
|
87
|
+
},
|
|
88
|
+
"claim_boundary": {
|
|
89
|
+
"type": ["string", "array"],
|
|
90
|
+
"minLength": 1,
|
|
91
|
+
"minItems": 1,
|
|
92
|
+
"items": { "type": "string", "minLength": 1 }
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"$defs": {
|
|
96
|
+
"endpoint": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"additionalProperties": false,
|
|
99
|
+
"properties": {
|
|
100
|
+
"url": { "type": "string", "format": "uri" },
|
|
101
|
+
"ready_url": { "type": "string", "format": "uri" },
|
|
102
|
+
"health_url": { "type": "string", "format": "uri" },
|
|
103
|
+
"live_url": { "type": "string", "format": "uri" },
|
|
104
|
+
"expected_status": { "type": "integer", "minimum": 100, "maximum": 599 },
|
|
105
|
+
"expected_text": { "type": "array", "items": { "type": "string" } },
|
|
106
|
+
"required": { "type": "boolean" },
|
|
107
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
108
|
+
"reference": { "type": "string", "minLength": 1 },
|
|
109
|
+
"deployment_ref": { "type": "string", "minLength": 1 },
|
|
110
|
+
"unauthenticated_local_demo": { "type": "boolean" },
|
|
111
|
+
"internal": { "type": "boolean" }
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"cloudflare": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"properties": {
|
|
118
|
+
"account_id": { "type": "string", "minLength": 1 },
|
|
119
|
+
"project_name": { "type": "string", "minLength": 1 },
|
|
120
|
+
"pages_project": { "type": "string", "minLength": 1 },
|
|
121
|
+
"pages_project_name": { "type": "string", "minLength": 1 },
|
|
122
|
+
"pages_url": { "type": "string", "format": "uri" },
|
|
123
|
+
"project_url": { "type": "string", "format": "uri" },
|
|
124
|
+
"custom_domains": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
125
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
126
|
+
"deployment_ref": { "type": "string", "minLength": 1 }
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.enigma.ai/memory-event-v1.schema.json",
|
|
4
|
+
"title": "Enigma Memory Event v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"schema",
|
|
8
|
+
"event_id",
|
|
9
|
+
"operation",
|
|
10
|
+
"tenant_id",
|
|
11
|
+
"subject_id",
|
|
12
|
+
"actor_id",
|
|
13
|
+
"timestamp",
|
|
14
|
+
"sequence",
|
|
15
|
+
"policy_id"
|
|
16
|
+
],
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"properties": {
|
|
19
|
+
"schema": { "const": "enigma.memory_event.v1" },
|
|
20
|
+
"event_id": { "type": "string", "minLength": 8 },
|
|
21
|
+
"operation": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"enum": ["create", "read", "update", "supersede", "delete", "retrieve", "inject", "export", "import", "deny", "quarantine", "boundary_cross"]
|
|
24
|
+
},
|
|
25
|
+
"tenant_id": { "type": "string", "minLength": 1 },
|
|
26
|
+
"subject_id": { "type": "string", "minLength": 1 },
|
|
27
|
+
"actor_id": { "type": "string", "minLength": 1 },
|
|
28
|
+
"memory_addr": { "type": "string", "pattern": "^[a-z0-9_.:-]+$" },
|
|
29
|
+
"source_addr": { "type": "string", "pattern": "^[a-z0-9_.:-]+$" },
|
|
30
|
+
"provider": { "type": "string" },
|
|
31
|
+
"model": { "type": "string" },
|
|
32
|
+
"purpose": { "type": "string" },
|
|
33
|
+
"timestamp": { "type": "string", "format": "date-time" },
|
|
34
|
+
"sequence": { "type": "integer", "minimum": 0 },
|
|
35
|
+
"policy_id": { "type": "string", "minLength": 1 },
|
|
36
|
+
"decision": { "type": "string", "enum": ["allow", "deny", "quarantine", "out_of_scope"] },
|
|
37
|
+
"metadata": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": { "type": ["string", "number", "boolean", "null"] }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.enigma.ai/mesh-node-v1.schema.json",
|
|
4
|
+
"title": "Enigma Mesh Node and Mesh Artifact v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{ "$ref": "#/$defs/meshNode" },
|
|
8
|
+
{ "$ref": "#/$defs/capsuleManifest" },
|
|
9
|
+
{ "$ref": "#/$defs/witnessCheckpoint" },
|
|
10
|
+
{ "$ref": "#/$defs/relayRecord" },
|
|
11
|
+
{ "$ref": "#/$defs/federationGrant" }
|
|
12
|
+
],
|
|
13
|
+
"$defs": {
|
|
14
|
+
"sha256Root": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
15
|
+
"signature": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["alg", "key_id", "value"],
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"properties": {
|
|
20
|
+
"alg": { "const": "Ed25519" },
|
|
21
|
+
"key_id": { "type": "string", "minLength": 1 },
|
|
22
|
+
"value": { "type": "string", "minLength": 64 }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"meshNode": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"required": ["schema", "node_id", "role", "key", "public_key", "capabilities", "trust_roots", "endpoints", "created_at", "signature", "descriptor_hash"],
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"properties": {
|
|
30
|
+
"schema": { "const": "enigma.mesh_node.v1" },
|
|
31
|
+
"node_id": { "type": "string", "minLength": 8 },
|
|
32
|
+
"role": { "type": "string", "minLength": 1 },
|
|
33
|
+
"key": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"required": ["alg", "key_id", "public_key"],
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"properties": {
|
|
38
|
+
"alg": { "const": "Ed25519" },
|
|
39
|
+
"key_id": { "type": "string", "minLength": 1 },
|
|
40
|
+
"public_key": { "type": "string", "minLength": 64 }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"public_key": { "type": "string", "minLength": 64 },
|
|
44
|
+
"capabilities": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
45
|
+
"trust_roots": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
46
|
+
"endpoints": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
47
|
+
"created_at": { "type": "string", "format": "date-time" },
|
|
48
|
+
"signature": { "$ref": "#/$defs/signature" },
|
|
49
|
+
"descriptor_hash": { "$ref": "#/$defs/sha256Root" }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"capsuleManifest": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"required": ["schema", "capsule_id", "encrypted_payload_hash", "receipt_log_root", "active_set_root", "owner_scope_hash", "issuer", "holder", "issued_at", "expires_at", "signature", "capsule_hash"],
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"properties": {
|
|
57
|
+
"schema": { "const": "enigma.capsule_manifest.v1" },
|
|
58
|
+
"capsule_id": { "type": "string", "minLength": 8 },
|
|
59
|
+
"encrypted_payload_hash": { "$ref": "#/$defs/sha256Root" },
|
|
60
|
+
"receipt_log_root": { "$ref": "#/$defs/sha256Root" },
|
|
61
|
+
"active_set_root": { "$ref": "#/$defs/sha256Root" },
|
|
62
|
+
"owner_scope_hash": { "$ref": "#/$defs/sha256Root" },
|
|
63
|
+
"issuer": { "type": "string", "minLength": 1 },
|
|
64
|
+
"holder": { "type": "string", "minLength": 1 },
|
|
65
|
+
"issued_at": { "type": "string", "format": "date-time" },
|
|
66
|
+
"expires_at": { "type": "string", "format": "date-time" },
|
|
67
|
+
"signature": { "$ref": "#/$defs/signature" },
|
|
68
|
+
"capsule_hash": { "$ref": "#/$defs/sha256Root" }
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"witnessCheckpoint": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"required": ["schema", "witness_checkpoint_id", "witness_node_id", "subject_node_id", "epoch", "checkpoint_root", "receipt_log_root", "active_set_root", "previous_witness_hash", "issued_at", "signature", "witness_hash"],
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"properties": {
|
|
76
|
+
"schema": { "const": "enigma.witness_checkpoint.v1" },
|
|
77
|
+
"witness_checkpoint_id": { "type": "string", "minLength": 8 },
|
|
78
|
+
"witness_node_id": { "type": "string", "minLength": 1 },
|
|
79
|
+
"subject_node_id": { "type": "string", "minLength": 1 },
|
|
80
|
+
"epoch": { "type": "integer", "minimum": 0 },
|
|
81
|
+
"checkpoint_root": { "$ref": "#/$defs/sha256Root" },
|
|
82
|
+
"receipt_log_root": { "$ref": "#/$defs/sha256Root" },
|
|
83
|
+
"active_set_root": { "$ref": "#/$defs/sha256Root" },
|
|
84
|
+
"previous_witness_hash": { "$ref": "#/$defs/sha256Root" },
|
|
85
|
+
"issued_at": { "type": "string", "format": "date-time" },
|
|
86
|
+
"signature": { "$ref": "#/$defs/signature" },
|
|
87
|
+
"witness_hash": { "$ref": "#/$defs/sha256Root" }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"relayRecord": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"required": ["schema", "record_id", "store_id", "capsule_id", "encrypted_payload_hash", "opaque_encrypted_record", "received_at", "expires_at"],
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"properties": {
|
|
95
|
+
"schema": { "const": "enigma.relay_record.v1" },
|
|
96
|
+
"record_id": { "type": "string", "minLength": 8 },
|
|
97
|
+
"relay_record_id": { "type": "string", "minLength": 8 },
|
|
98
|
+
"store_id": { "type": "string", "minLength": 1 },
|
|
99
|
+
"capsule_id": { "type": ["string", "null"] },
|
|
100
|
+
"encrypted_payload_hash": { "$ref": "#/$defs/sha256Root" },
|
|
101
|
+
"opaque_encrypted_record": { "type": "string", "minLength": 1 },
|
|
102
|
+
"received_at": { "type": "string", "format": "date-time" },
|
|
103
|
+
"expires_at": { "type": ["string", "null"], "format": "date-time" },
|
|
104
|
+
"signature": { "$ref": "#/$defs/signature" }
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"federationGrant": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"required": ["schema", "grant_id", "issuer", "holder", "subjects", "operations", "purpose", "issued_at", "expires_at", "signature", "grant_hash"],
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"properties": {
|
|
112
|
+
"schema": { "const": "enigma.federation_grant.v1" },
|
|
113
|
+
"grant_id": { "type": "string", "minLength": 8 },
|
|
114
|
+
"issuer": { "type": "string", "minLength": 1 },
|
|
115
|
+
"holder": { "type": "string", "minLength": 1 },
|
|
116
|
+
"subjects": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
|
|
117
|
+
"operations": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
|
|
118
|
+
"purpose": { "type": "string", "minLength": 1 },
|
|
119
|
+
"issued_at": { "type": "string", "format": "date-time" },
|
|
120
|
+
"expires_at": { "type": "string", "format": "date-time" },
|
|
121
|
+
"signature": { "$ref": "#/$defs/signature" },
|
|
122
|
+
"grant_hash": { "$ref": "#/$defs/sha256Root" }
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +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
|
+
}
|