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,386 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: dark;
|
|
3
|
+
--bg: #090b10;
|
|
4
|
+
--panel: #11151d;
|
|
5
|
+
--panel-strong: #171d28;
|
|
6
|
+
--line: #273040;
|
|
7
|
+
--text: #edf2ff;
|
|
8
|
+
--muted: #9aa8bf;
|
|
9
|
+
--soft: #c7d2e4;
|
|
10
|
+
--accent: #8bd3ff;
|
|
11
|
+
--accent-strong: #55b7ff;
|
|
12
|
+
--good: #7ee2a8;
|
|
13
|
+
--bad: #ff8f8f;
|
|
14
|
+
--warn: #ffd27a;
|
|
15
|
+
--shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
|
|
16
|
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
* {
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
html {
|
|
24
|
+
min-height: 100%;
|
|
25
|
+
background: radial-gradient(circle at 20% 0%, rgba(85, 183, 255, 0.18), transparent 32rem), var(--bg);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
body {
|
|
29
|
+
min-height: 100%;
|
|
30
|
+
margin: 0;
|
|
31
|
+
color: var(--text);
|
|
32
|
+
background: linear-gradient(180deg, rgba(9, 11, 16, 0.18), var(--bg) 34rem);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
button,
|
|
36
|
+
input,
|
|
37
|
+
textarea {
|
|
38
|
+
font: inherit;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
button {
|
|
42
|
+
border: 1px solid rgba(139, 211, 255, 0.42);
|
|
43
|
+
border-radius: 999px;
|
|
44
|
+
padding: 0.72rem 1rem;
|
|
45
|
+
color: #041018;
|
|
46
|
+
background: var(--accent);
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
button:hover:not(:disabled) {
|
|
52
|
+
transform: translateY(-1px);
|
|
53
|
+
background: var(--accent-strong);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
button:disabled {
|
|
57
|
+
color: var(--muted);
|
|
58
|
+
background: #1d2532;
|
|
59
|
+
border-color: var(--line);
|
|
60
|
+
cursor: not-allowed;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
input,
|
|
64
|
+
textarea {
|
|
65
|
+
width: 100%;
|
|
66
|
+
border: 1px solid var(--line);
|
|
67
|
+
border-radius: 16px;
|
|
68
|
+
padding: 0.78rem 0.9rem;
|
|
69
|
+
color: var(--text);
|
|
70
|
+
background: #0b0f16;
|
|
71
|
+
outline: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
input:focus,
|
|
75
|
+
textarea:focus {
|
|
76
|
+
border-color: var(--accent);
|
|
77
|
+
box-shadow: 0 0 0 3px rgba(139, 211, 255, 0.12);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
textarea {
|
|
81
|
+
min-height: 9rem;
|
|
82
|
+
resize: vertical;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
label {
|
|
86
|
+
display: grid;
|
|
87
|
+
gap: 0.45rem;
|
|
88
|
+
color: var(--soft);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
code {
|
|
92
|
+
display: inline-block;
|
|
93
|
+
max-width: 100%;
|
|
94
|
+
overflow-wrap: anywhere;
|
|
95
|
+
color: var(--accent);
|
|
96
|
+
font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.app-shell,
|
|
100
|
+
.no-script {
|
|
101
|
+
width: min(1180px, calc(100% - 32px));
|
|
102
|
+
margin: 0 auto;
|
|
103
|
+
padding: 32px 0 56px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.shell-hero {
|
|
107
|
+
display: grid;
|
|
108
|
+
grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
|
|
109
|
+
gap: 24px;
|
|
110
|
+
align-items: stretch;
|
|
111
|
+
padding: 28px;
|
|
112
|
+
border: 1px solid rgba(139, 211, 255, 0.18);
|
|
113
|
+
border-radius: 32px;
|
|
114
|
+
background: linear-gradient(135deg, rgba(23, 29, 40, 0.94), rgba(11, 15, 22, 0.92));
|
|
115
|
+
box-shadow: var(--shadow);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.eyebrow,
|
|
119
|
+
.screen-heading p {
|
|
120
|
+
margin: 0 0 0.55rem;
|
|
121
|
+
color: var(--accent);
|
|
122
|
+
font-size: 0.76rem;
|
|
123
|
+
font-weight: 700;
|
|
124
|
+
letter-spacing: 0.12em;
|
|
125
|
+
text-transform: uppercase;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
h1,
|
|
129
|
+
h2,
|
|
130
|
+
h3,
|
|
131
|
+
p {
|
|
132
|
+
margin-top: 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
h1 {
|
|
136
|
+
max-width: 860px;
|
|
137
|
+
margin-bottom: 0.8rem;
|
|
138
|
+
font-size: clamp(2.2rem, 5vw, 4.8rem);
|
|
139
|
+
line-height: 0.96;
|
|
140
|
+
letter-spacing: -0.06em;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
h2 {
|
|
144
|
+
margin-bottom: 0;
|
|
145
|
+
font-size: clamp(1.7rem, 3vw, 3rem);
|
|
146
|
+
letter-spacing: -0.04em;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
h3 {
|
|
150
|
+
margin-bottom: 0.75rem;
|
|
151
|
+
font-size: 1rem;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
p {
|
|
155
|
+
color: var(--muted);
|
|
156
|
+
line-height: 1.6;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.summary-grid {
|
|
160
|
+
display: grid;
|
|
161
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
162
|
+
gap: 12px;
|
|
163
|
+
margin: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.summary-grid div,
|
|
167
|
+
.detail-list div {
|
|
168
|
+
padding: 14px;
|
|
169
|
+
border: 1px solid var(--line);
|
|
170
|
+
border-radius: 20px;
|
|
171
|
+
background: rgba(255, 255, 255, 0.03);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
dt {
|
|
175
|
+
color: var(--muted);
|
|
176
|
+
font-size: 0.78rem;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
dd {
|
|
180
|
+
margin: 0.2rem 0 0;
|
|
181
|
+
color: var(--text);
|
|
182
|
+
font-weight: 700;
|
|
183
|
+
overflow-wrap: anywhere;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.screen-nav {
|
|
187
|
+
position: sticky;
|
|
188
|
+
top: 0;
|
|
189
|
+
z-index: 4;
|
|
190
|
+
display: flex;
|
|
191
|
+
gap: 10px;
|
|
192
|
+
margin: 18px 0;
|
|
193
|
+
padding: 12px;
|
|
194
|
+
overflow-x: auto;
|
|
195
|
+
border: 1px solid rgba(39, 48, 64, 0.82);
|
|
196
|
+
border-radius: 24px;
|
|
197
|
+
background: rgba(9, 11, 16, 0.82);
|
|
198
|
+
backdrop-filter: blur(18px);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.screen-tab {
|
|
202
|
+
flex: 0 0 auto;
|
|
203
|
+
color: var(--soft);
|
|
204
|
+
background: transparent;
|
|
205
|
+
border-color: var(--line);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.screen-tab.is-active {
|
|
209
|
+
color: #041018;
|
|
210
|
+
background: var(--accent);
|
|
211
|
+
border-color: var(--accent);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
main {
|
|
215
|
+
display: grid;
|
|
216
|
+
gap: 18px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.screen-card {
|
|
220
|
+
padding: 24px;
|
|
221
|
+
border: 1px solid var(--line);
|
|
222
|
+
border-radius: 30px;
|
|
223
|
+
background: rgba(17, 21, 29, 0.88);
|
|
224
|
+
box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.screen-heading {
|
|
228
|
+
display: flex;
|
|
229
|
+
align-items: end;
|
|
230
|
+
justify-content: space-between;
|
|
231
|
+
gap: 16px;
|
|
232
|
+
margin-bottom: 20px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.two-column {
|
|
236
|
+
display: grid;
|
|
237
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
238
|
+
gap: 16px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.panel,
|
|
242
|
+
.inline-form,
|
|
243
|
+
.memory-row,
|
|
244
|
+
.connection-list li,
|
|
245
|
+
.evidence-row {
|
|
246
|
+
border: 1px solid var(--line);
|
|
247
|
+
border-radius: 24px;
|
|
248
|
+
background: var(--panel-strong);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.panel {
|
|
252
|
+
display: grid;
|
|
253
|
+
gap: 14px;
|
|
254
|
+
padding: 18px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.status-panel {
|
|
258
|
+
align-content: start;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.detail-list {
|
|
262
|
+
display: grid;
|
|
263
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
264
|
+
gap: 10px;
|
|
265
|
+
margin: 0;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.button-row,
|
|
269
|
+
.button-grid {
|
|
270
|
+
display: flex;
|
|
271
|
+
flex-wrap: wrap;
|
|
272
|
+
gap: 10px;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.button-grid button {
|
|
276
|
+
flex: 1 1 220px;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.inline-form {
|
|
280
|
+
display: grid;
|
|
281
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
282
|
+
gap: 12px;
|
|
283
|
+
align-items: end;
|
|
284
|
+
margin: 16px 0;
|
|
285
|
+
padding: 14px;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.inline-form span {
|
|
289
|
+
color: var(--muted);
|
|
290
|
+
font-size: 0.9rem;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.memory-list,
|
|
294
|
+
.connection-list,
|
|
295
|
+
.evidence-list,
|
|
296
|
+
.panel ul {
|
|
297
|
+
display: grid;
|
|
298
|
+
gap: 10px;
|
|
299
|
+
padding: 0;
|
|
300
|
+
margin: 0;
|
|
301
|
+
list-style: none;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.memory-row,
|
|
305
|
+
.connection-list li,
|
|
306
|
+
.evidence-row,
|
|
307
|
+
.panel li {
|
|
308
|
+
display: grid;
|
|
309
|
+
grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr) auto;
|
|
310
|
+
gap: 12px;
|
|
311
|
+
align-items: center;
|
|
312
|
+
padding: 14px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.boundary-list li {
|
|
316
|
+
grid-template-columns: minmax(0, 1fr);
|
|
317
|
+
align-items: start;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.memory-row div,
|
|
321
|
+
.connection-list li,
|
|
322
|
+
.evidence-row {
|
|
323
|
+
min-width: 0;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.memory-row span,
|
|
327
|
+
.connection-list span,
|
|
328
|
+
.evidence-row span,
|
|
329
|
+
.evidence-row small,
|
|
330
|
+
.panel li span {
|
|
331
|
+
display: block;
|
|
332
|
+
color: var(--muted);
|
|
333
|
+
overflow-wrap: anywhere;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.memory-row.is-deleted,
|
|
337
|
+
.evidence-row.is-bad {
|
|
338
|
+
border-color: rgba(255, 143, 143, 0.36);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.evidence-row.is-ok {
|
|
342
|
+
border-color: rgba(126, 226, 168, 0.38);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.empty-row {
|
|
346
|
+
grid-template-columns: 1fr !important;
|
|
347
|
+
color: var(--muted);
|
|
348
|
+
border-style: dashed;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.status-pill {
|
|
352
|
+
justify-self: start;
|
|
353
|
+
border: 1px solid rgba(139, 211, 255, 0.34);
|
|
354
|
+
border-radius: 999px;
|
|
355
|
+
padding: 0.32rem 0.72rem;
|
|
356
|
+
color: var(--accent);
|
|
357
|
+
background: rgba(139, 211, 255, 0.08);
|
|
358
|
+
font-size: 0.82rem;
|
|
359
|
+
font-weight: 700;
|
|
360
|
+
text-transform: uppercase;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.honesty-note {
|
|
364
|
+
color: var(--warn);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
@media (max-width: 820px) {
|
|
368
|
+
.shell-hero,
|
|
369
|
+
.two-column,
|
|
370
|
+
.inline-form,
|
|
371
|
+
.memory-row,
|
|
372
|
+
.connection-list li,
|
|
373
|
+
.evidence-row,
|
|
374
|
+
.panel li {
|
|
375
|
+
grid-template-columns: 1fr;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.screen-heading {
|
|
379
|
+
display: block;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.summary-grid,
|
|
383
|
+
.detail-list {
|
|
384
|
+
grid-template-columns: 1fr;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { realpathSync } from 'node:fs';
|
|
3
|
+
import { pathToFileURL } from 'node:url';
|
|
4
|
+
import { DEFAULT_GATEWAY_PORT, main as cliMain } from '../../cli/bin/enigma.mjs';
|
|
5
|
+
|
|
6
|
+
function gatewayUsage() {
|
|
7
|
+
return {
|
|
8
|
+
usage: 'enigma-gateway [demo|serve] [options]',
|
|
9
|
+
default_command: 'serve',
|
|
10
|
+
commands: ['demo', 'serve'],
|
|
11
|
+
serve_options: {
|
|
12
|
+
'--host <host>': 'Bind host. Defaults to 127.0.0.1.',
|
|
13
|
+
'--port <port>': `Bind port. Defaults to ${DEFAULT_GATEWAY_PORT}.`,
|
|
14
|
+
'--state-file <path>': 'Load and persist local gateway demo state as JSON.',
|
|
15
|
+
'--once': 'Start, report the listening address, persist state when configured, then close.',
|
|
16
|
+
},
|
|
17
|
+
claim_boundaries: 'Gateway evaluates Enigma enterprise policy and emits plaintext-minimized decisions/SIEM events; it does not call model providers or prove provider deletion/model forgetting.',
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function print(value, io) {
|
|
22
|
+
io.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function isHelp(argv) {
|
|
26
|
+
return argv.includes('--help') || argv.includes('-h');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function gatewayArgv(argv) {
|
|
30
|
+
return argv[0] === 'demo' || argv[0] === 'serve' ? ['gateway', ...argv] : ['gateway', 'serve', ...argv];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export async function main(argv = process.argv.slice(2), io = { stdout: process.stdout, stderr: process.stderr }) {
|
|
34
|
+
if (isHelp(argv)) {
|
|
35
|
+
print(gatewayUsage(), io);
|
|
36
|
+
return 0;
|
|
37
|
+
}
|
|
38
|
+
return cliMain(gatewayArgv(argv), io);
|
|
39
|
+
}
|
|
40
|
+
function isMainModule(metaUrl) {
|
|
41
|
+
if (!process.argv[1]) return false;
|
|
42
|
+
try {
|
|
43
|
+
return metaUrl === pathToFileURL(realpathSync(process.argv[1])).href;
|
|
44
|
+
} catch {
|
|
45
|
+
return metaUrl === pathToFileURL(process.argv[1]).href;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
if (isMainModule(import.meta.url)) {
|
|
51
|
+
process.exitCode = await main();
|
|
52
|
+
}
|