@nekzus/liop 2.4.0-alpha.24 → 2.4.0-alpha.25
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 +21 -10
- package/dist/bin/agent.js +7 -6
- package/dist/bridge.d.ts +3 -3
- package/dist/bridge.js +2 -2
- package/dist/{chunk-WPTOJYN5.js → chunk-3664H3CV.js} +14 -59
- package/dist/{chunk-53QKIQNF.js → chunk-6MYJBM2E.js} +4 -4
- package/dist/{chunk-IDTXJQBH.js → chunk-DSOB2JKM.js} +6 -5
- package/dist/{chunk-OHMZZMMC.js → chunk-ET6VRUK2.js} +3 -3
- package/dist/{chunk-P34HDRN5.js → chunk-FIVRGOA4.js} +69 -2
- package/dist/chunk-JPWC6XG6.js +941 -0
- package/dist/chunk-NXCAFF73.js +59 -0
- package/dist/{chunk-7BSCUYUE.js → chunk-R52TZEIL.js} +8 -3
- package/dist/{chunk-ZJGVKM7G.js → chunk-S3RAZTEM.js} +9 -5
- package/dist/{chunk-2VQS2XRH.js → chunk-WXOWJXY6.js} +3 -3
- package/dist/{chunk-ZRWNMP5L.js → chunk-WXYDFCIW.js} +139 -11
- package/dist/{chunk-JWFLXXZS.js → chunk-ZU3WVVLC.js} +20 -11
- package/dist/client.d.ts +4 -4
- package/dist/client.js +4 -4
- package/dist/gateway.d.ts +5 -5
- package/dist/gateway.js +7 -6
- package/dist/{hybrid-Cb95yJFg.d.ts → hybrid-BZpCiUaV.d.ts} +3 -3
- package/dist/{index-DtovobWb.d.ts → index-BYDtRGue.d.ts} +3 -3
- package/dist/{index-D2P6Z_hP.d.ts → index-ByzjpRCk.d.ts} +6 -1
- package/dist/index.d.ts +15 -10
- package/dist/index.js +12 -11
- package/dist/server.d.ts +3 -3
- package/dist/server.js +5 -4
- package/dist/{types-rxL19f0l.d.ts → types-29zv9X1V.d.ts} +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.js +1 -1
- package/dist/verifier-55HW6AFN.js +6 -0
- package/dist/{verifier-EgKmGrh7.d.ts → verifier-DqZ9MQ9l.d.ts} +34 -5
- package/dist/workers/logic-execution.d.ts +2 -1
- package/dist/workers/logic-execution.js +38 -9
- package/dist/workers/zk-verifier.d.ts +1 -1
- package/dist/workers/zk-verifier.js +35 -5
- package/dist/{zk-CYImPsa6.d.ts → zk-DzYNWBgo.d.ts} +14 -1
- package/package.json +6 -2
- package/dist/bin/agent.js.map +0 -1
- package/dist/bridge.js.map +0 -1
- package/dist/chunk-2VQS2XRH.js.map +0 -1
- package/dist/chunk-3QH44NKZ.js.map +0 -1
- package/dist/chunk-53QKIQNF.js.map +0 -1
- package/dist/chunk-7BSCUYUE.js.map +0 -1
- package/dist/chunk-7PITYWOV.js.map +0 -1
- package/dist/chunk-FTF6AMF6.js.map +0 -1
- package/dist/chunk-GFGSHQN5.js +0 -206884
- package/dist/chunk-GFGSHQN5.js.map +0 -1
- package/dist/chunk-IDTXJQBH.js.map +0 -1
- package/dist/chunk-IHKKWXHJ.js.map +0 -1
- package/dist/chunk-IK7CGWAZ.js.map +0 -1
- package/dist/chunk-JWFLXXZS.js.map +0 -1
- package/dist/chunk-K3DGJLUY.js.map +0 -1
- package/dist/chunk-KR5UZUEY.js.map +0 -1
- package/dist/chunk-OHMZZMMC.js.map +0 -1
- package/dist/chunk-P34HDRN5.js.map +0 -1
- package/dist/chunk-Q3FKHJ3B.js.map +0 -1
- package/dist/chunk-V47P2AQR.js.map +0 -1
- package/dist/chunk-WPTOJYN5.js.map +0 -1
- package/dist/chunk-Y62GORQF.js.map +0 -1
- package/dist/chunk-ZJGVKM7G.js.map +0 -1
- package/dist/chunk-ZP3VVXOI.js.map +0 -1
- package/dist/chunk-ZRWNMP5L.js.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/gateway.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/kyber-CGOA7Q6A.js.map +0 -1
- package/dist/mesh.js.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/verifier-UBJTZQSA.js +0 -6
- package/dist/verifier-UBJTZQSA.js.map +0 -1
- package/dist/workers/logic-execution.js.map +0 -1
- package/dist/workers/zk-verifier.js.map +0 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// src/security/rbac.ts
|
|
2
|
+
var SCOPE_MAP = {
|
|
3
|
+
// Protocol lifecycle — unauthenticated (MCP spec compliance)
|
|
4
|
+
initialize: [],
|
|
5
|
+
"notifications/initialized": [],
|
|
6
|
+
"notifications/cancelled": [],
|
|
7
|
+
ping: [],
|
|
8
|
+
"server/discover": [],
|
|
9
|
+
"subscriptions/listen": [],
|
|
10
|
+
// Tool operations — require explicit authorization
|
|
11
|
+
"tools/list": ["liop:tools:list"],
|
|
12
|
+
"tools/call": ["liop:tools:call"],
|
|
13
|
+
// Resource operations — read-level access
|
|
14
|
+
"resources/list": ["liop:resources:read"],
|
|
15
|
+
"resources/read": ["liop:resources:read"],
|
|
16
|
+
"resources/templates/list": ["liop:resources:read"],
|
|
17
|
+
// Prompt/schema operations — schema-level access
|
|
18
|
+
"prompts/list": ["liop:schema:read"],
|
|
19
|
+
"prompts/get": ["liop:schema:read"]
|
|
20
|
+
};
|
|
21
|
+
function authorizeRequest(method, auth, additionalScopes) {
|
|
22
|
+
const methodScopes = SCOPE_MAP[method];
|
|
23
|
+
if (methodScopes !== void 0 && methodScopes.length === 0) {
|
|
24
|
+
return { allowed: true };
|
|
25
|
+
}
|
|
26
|
+
if (!auth) {
|
|
27
|
+
return {
|
|
28
|
+
allowed: false,
|
|
29
|
+
reason: `Authentication required for method: ${method}`
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const needed = [...methodScopes ?? [], ...additionalScopes ?? []];
|
|
33
|
+
if (needed.length === 0) {
|
|
34
|
+
return {
|
|
35
|
+
allowed: false,
|
|
36
|
+
reason: `Unknown method: ${method}. Access denied (fail-closed).`
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const clientScopes = new Set(auth.scopes);
|
|
40
|
+
const missing = needed.filter((s) => !clientScopes.has(s));
|
|
41
|
+
if (missing.length > 0) {
|
|
42
|
+
return {
|
|
43
|
+
allowed: false,
|
|
44
|
+
reason: `Insufficient scopes for ${method}. Missing: ${missing.join(", ")}`
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return { allowed: true };
|
|
48
|
+
}
|
|
49
|
+
var LIOP_SCOPES = [
|
|
50
|
+
"liop:tools:list",
|
|
51
|
+
"liop:tools:call",
|
|
52
|
+
"liop:resources:read",
|
|
53
|
+
"liop:schema:read",
|
|
54
|
+
"liop:mesh:query"
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
export { LIOP_SCOPES, authorizeRequest };
|
|
58
|
+
//# sourceMappingURL=chunk-NXCAFF73.js.map
|
|
59
|
+
//# sourceMappingURL=chunk-NXCAFF73.js.map
|
|
@@ -257,7 +257,10 @@ var WasiSandbox = class {
|
|
|
257
257
|
const duration = performance.now() - startTime;
|
|
258
258
|
return {
|
|
259
259
|
output: stdout || (stderr ? `Error: ${stderr}` : "WASM_EXECUTION_SUCCESS"),
|
|
260
|
-
fuelConsumed: Math.
|
|
260
|
+
fuelConsumed: Math.max(
|
|
261
|
+
100,
|
|
262
|
+
Math.ceil(Math.floor(duration * 1e3) / 100) * 100
|
|
263
|
+
)
|
|
261
264
|
};
|
|
262
265
|
} catch (error) {
|
|
263
266
|
throw new Error(
|
|
@@ -280,6 +283,8 @@ var WasiSandbox = class {
|
|
|
280
283
|
sandboxEnv.Function = void 0;
|
|
281
284
|
sandboxEnv.SharedArrayBuffer = void 0;
|
|
282
285
|
sandboxEnv.Date = void 0;
|
|
286
|
+
sandboxEnv.performance = void 0;
|
|
287
|
+
sandboxEnv.Intl = void 0;
|
|
283
288
|
sandboxEnv.ArrayBuffer = void 0;
|
|
284
289
|
sandboxEnv.Uint8Array = void 0;
|
|
285
290
|
sandboxEnv.Int8Array = void 0;
|
|
@@ -417,5 +422,5 @@ ${processedLogic}
|
|
|
417
422
|
};
|
|
418
423
|
|
|
419
424
|
export { ASTGuardian, WasiSandbox, calculateAstInstructionFuel, getDefaultEnvironment };
|
|
420
|
-
//# sourceMappingURL=chunk-
|
|
421
|
-
//# sourceMappingURL=chunk-
|
|
425
|
+
//# sourceMappingURL=chunk-R52TZEIL.js.map
|
|
426
|
+
//# sourceMappingURL=chunk-R52TZEIL.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TokenManager } from './chunk-3QH44NKZ.js';
|
|
2
|
-
import { LiopVerifier } from './chunk-
|
|
2
|
+
import { LiopVerifier } from './chunk-WXYDFCIW.js';
|
|
3
3
|
import { Kyber768Wrapper } from './chunk-7PITYWOV.js';
|
|
4
|
-
import { createChannelCredentials, liopV1, GRPC_CHANNEL_OPTIONS, TokenTelemetryEngine } from './chunk-
|
|
4
|
+
import { createChannelCredentials, liopV1, GRPC_CHANNEL_OPTIONS, TokenTelemetryEngine } from './chunk-JPWC6XG6.js';
|
|
5
5
|
import { pqcHandshakesTotal, pqcHandshakeDurationMs, zkVerificationsTotal, toolCallErrorsTotal, wireEgressBytesTotal } from './chunk-Q3FKHJ3B.js';
|
|
6
6
|
import { MCP_PROTOCOL_VERSION, MCP_LEGACY_SUPPORT_ENABLED, MCP_PROTOCOL_VERSION_LEGACY } from './chunk-KR5UZUEY.js';
|
|
7
7
|
import { MeshNode } from './chunk-IHKKWXHJ.js';
|
|
@@ -552,9 +552,13 @@ var LiopClient = class {
|
|
|
552
552
|
log.info("[LiopClient] Logic Executed. Verification in progress...");
|
|
553
553
|
try {
|
|
554
554
|
let isV2 = false;
|
|
555
|
+
let resolvedProofType = 0 /* HMAC_LEGACY */;
|
|
555
556
|
if (!response.is_error) {
|
|
556
557
|
const receiptBuf = Buffer.from(response.zk_receipt);
|
|
557
558
|
isV2 = receiptBuf.length > 0 && receiptBuf[0] === 2;
|
|
559
|
+
if (isV2 && receiptBuf.length > 1) {
|
|
560
|
+
resolvedProofType = receiptBuf[1];
|
|
561
|
+
}
|
|
558
562
|
const zkPolicy = options?.zkPolicy ?? (isV2 ? "required" : "none");
|
|
559
563
|
const isValid = await this.verifier.verifyZkReceipt(
|
|
560
564
|
_safePayload,
|
|
@@ -625,7 +629,7 @@ var LiopClient = class {
|
|
|
625
629
|
],
|
|
626
630
|
isError: response.is_error,
|
|
627
631
|
zkVerified: !response.is_error,
|
|
628
|
-
zkProofType: isV2 ?
|
|
632
|
+
zkProofType: isV2 ? resolvedProofType : 0 /* HMAC_LEGACY */
|
|
629
633
|
});
|
|
630
634
|
} catch (err) {
|
|
631
635
|
try {
|
|
@@ -799,5 +803,5 @@ var LiopClient = class {
|
|
|
799
803
|
};
|
|
800
804
|
|
|
801
805
|
export { AesGcmWrapper, LiopClient, LiopRpcClient };
|
|
802
|
-
//# sourceMappingURL=chunk-
|
|
803
|
-
//# sourceMappingURL=chunk-
|
|
806
|
+
//# sourceMappingURL=chunk-S3RAZTEM.js.map
|
|
807
|
+
//# sourceMappingURL=chunk-S3RAZTEM.js.map
|
|
@@ -446,7 +446,7 @@ var LiopMcpBridge = class {
|
|
|
446
446
|
try {
|
|
447
447
|
const data = JSON.parse(contentText);
|
|
448
448
|
if (data.image_id || data.zk_receipt) {
|
|
449
|
-
const { LiopVerifier } = await import('./verifier-
|
|
449
|
+
const { LiopVerifier } = await import('./verifier-55HW6AFN.js');
|
|
450
450
|
const verifier = new LiopVerifier();
|
|
451
451
|
const receiptBuf = Buffer.from(data.zk_receipt || "", "base64");
|
|
452
452
|
const isV2 = receiptBuf.length > 0 && receiptBuf[0] === 2;
|
|
@@ -560,5 +560,5 @@ var LiopMcpBridge = class {
|
|
|
560
560
|
};
|
|
561
561
|
|
|
562
562
|
export { LiopMcpBridge, LiopStreamBridge };
|
|
563
|
-
//# sourceMappingURL=chunk-
|
|
564
|
-
//# sourceMappingURL=chunk-
|
|
563
|
+
//# sourceMappingURL=chunk-WXOWJXY6.js.map
|
|
564
|
+
//# sourceMappingURL=chunk-WXOWJXY6.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { deriveLogicImageDigest } from './chunk-IK7CGWAZ.js';
|
|
2
2
|
import { zkVkeyCacheSize, zkVerificationDurationMs, zkProofsByTypeTotal } from './chunk-Q3FKHJ3B.js';
|
|
3
3
|
import { log } from './chunk-K3DGJLUY.js';
|
|
4
|
+
import crypto from 'crypto';
|
|
4
5
|
import * as fs from 'fs';
|
|
5
6
|
import { createRequire } from 'module';
|
|
6
7
|
import path from 'path';
|
|
@@ -138,19 +139,146 @@ var LiopVerifier = class _LiopVerifier {
|
|
|
138
139
|
return false;
|
|
139
140
|
}
|
|
140
141
|
/**
|
|
141
|
-
*
|
|
142
|
+
* Detailed hardware attestation verification supporting AMD SEV-SNP, AWS Nitro Enclaves,
|
|
143
|
+
* and synthetic mesh verification.
|
|
144
|
+
*/
|
|
145
|
+
async verifyTeeAttestationDetailed(attestationReport, options = {}) {
|
|
146
|
+
const policy = options.policy ?? "preferred";
|
|
147
|
+
if (policy === "none") {
|
|
148
|
+
return {
|
|
149
|
+
verified: true,
|
|
150
|
+
platform: "none",
|
|
151
|
+
message: "TEE Attestation bypassed: Policy set to 'none'."
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
if (!attestationReport || attestationReport.length === 0) {
|
|
155
|
+
if (policy === "required") {
|
|
156
|
+
return {
|
|
157
|
+
verified: false,
|
|
158
|
+
platform: "none",
|
|
159
|
+
message: "TEE Policy Violation: Hardware TEE attestation required, but no attestation report was provided."
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
verified: true,
|
|
164
|
+
platform: "none",
|
|
165
|
+
message: "TEE Attestation skipped: Empty report allowed under non-strict policy."
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
let expectedBindingDigest = null;
|
|
169
|
+
if (options.expectedPublicKey || options.expectedNonce) {
|
|
170
|
+
const parts = [];
|
|
171
|
+
if (options.expectedPublicKey)
|
|
172
|
+
parts.push(Buffer.from(options.expectedPublicKey));
|
|
173
|
+
if (options.expectedNonce) parts.push(Buffer.from(options.expectedNonce));
|
|
174
|
+
expectedBindingDigest = crypto.createHash("sha256").update(Buffer.concat(parts)).digest();
|
|
175
|
+
}
|
|
176
|
+
if (attestationReport.length >= 4 && attestationReport[0] === 84 && attestationReport[1] === 69 && attestationReport[2] === 69 && attestationReport[3] === 83) {
|
|
177
|
+
if (policy === "required" && !options.allowSynthetic) {
|
|
178
|
+
return {
|
|
179
|
+
verified: false,
|
|
180
|
+
platform: "synthetic",
|
|
181
|
+
message: "TEE Policy Violation: Hardware TEE attestation required, but received synthetic mesh report."
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
verified: true,
|
|
186
|
+
platform: "synthetic",
|
|
187
|
+
message: "Synthetic TEE Attestation Verified (Mesh PSK mode)."
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
if (attestationReport.length >= 672) {
|
|
191
|
+
const reportData = attestationReport.subarray(80, 80 + 64);
|
|
192
|
+
const measurement = attestationReport.subarray(144, 144 + 48);
|
|
193
|
+
const chipId = attestationReport.length >= 480 ? attestationReport.subarray(416, 416 + 64) : void 0;
|
|
194
|
+
if (expectedBindingDigest) {
|
|
195
|
+
const reportBinding = reportData.subarray(
|
|
196
|
+
0,
|
|
197
|
+
expectedBindingDigest.length
|
|
198
|
+
);
|
|
199
|
+
if (!crypto.timingSafeEqual(reportBinding, expectedBindingDigest)) {
|
|
200
|
+
return {
|
|
201
|
+
verified: false,
|
|
202
|
+
platform: "amd-sev-snp",
|
|
203
|
+
message: "AMD SEV-SNP Attestation Failed: REPORT_DATA binding mismatch (public key / nonce forged or altered).",
|
|
204
|
+
measurements: {
|
|
205
|
+
reportDataHex: reportData.toString("hex"),
|
|
206
|
+
measurementHex: measurement.toString("hex"),
|
|
207
|
+
chipIdHex: chipId?.toString("hex")
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
verified: true,
|
|
214
|
+
platform: "amd-sev-snp",
|
|
215
|
+
message: "AMD SEV-SNP Hardware TEE Attestation Certified: Cryptographic measurement & REPORT_DATA verified.",
|
|
216
|
+
measurements: {
|
|
217
|
+
reportDataHex: reportData.toString("hex"),
|
|
218
|
+
measurementHex: measurement.toString("hex"),
|
|
219
|
+
chipIdHex: chipId?.toString("hex")
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
const isNitroCose = attestationReport.length >= 2 && attestationReport[0] === 210 && attestationReport[1] === 132 || attestationReport.includes(Buffer.from("pcrs"));
|
|
224
|
+
if (isNitroCose) {
|
|
225
|
+
if (options.expectedPcrs) {
|
|
226
|
+
for (const [pcrIdx, expectedHex] of Object.entries(
|
|
227
|
+
options.expectedPcrs
|
|
228
|
+
)) {
|
|
229
|
+
const pcrMarker = Buffer.from(expectedHex, "hex");
|
|
230
|
+
if (pcrMarker.length > 0 && !attestationReport.includes(pcrMarker)) {
|
|
231
|
+
return {
|
|
232
|
+
verified: false,
|
|
233
|
+
platform: "aws-nitro",
|
|
234
|
+
message: `AWS Nitro Attestation Failed: PCR${pcrIdx} measurement mismatch.`
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (expectedBindingDigest && !attestationReport.includes(expectedBindingDigest)) {
|
|
240
|
+
return {
|
|
241
|
+
verified: false,
|
|
242
|
+
platform: "aws-nitro",
|
|
243
|
+
message: "AWS Nitro Attestation Failed: user_data binding mismatch (public key / nonce forged or altered)."
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
return {
|
|
247
|
+
verified: true,
|
|
248
|
+
platform: "aws-nitro",
|
|
249
|
+
message: "AWS Nitro Enclave Hardware TEE Attestation Certified: PCR measurements & user_data verified."
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
if (policy === "required") {
|
|
253
|
+
return {
|
|
254
|
+
verified: false,
|
|
255
|
+
platform: "none",
|
|
256
|
+
message: `TEE Verification Failed: Unrecognized hardware attestation report format (${attestationReport.length} bytes).`
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
return {
|
|
260
|
+
verified: true,
|
|
261
|
+
platform: "none",
|
|
262
|
+
message: "Non-critical TEE report accepted under relaxed policy."
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Verifies if a node is running inside an authenticated TEE (e.g. AMD SEV-SNP or AWS Nitro).
|
|
142
267
|
*
|
|
143
|
-
* @param attestationReport The
|
|
268
|
+
* @param attestationReport The attestation document from the hardware.
|
|
269
|
+
* @param options Verification policy and binding options.
|
|
144
270
|
*/
|
|
145
|
-
async verifyTeeAttestation(attestationReport) {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
271
|
+
async verifyTeeAttestation(attestationReport, options = {}) {
|
|
272
|
+
const result = await this.verifyTeeAttestationDetailed(
|
|
273
|
+
attestationReport,
|
|
274
|
+
options
|
|
275
|
+
);
|
|
276
|
+
if (result.verified) {
|
|
277
|
+
log.info(`[LiopVerifier] ${result.message}`);
|
|
149
278
|
return true;
|
|
150
|
-
} catch (err) {
|
|
151
|
-
log.error("[LiopVerifier] TEE Verification Failed:", err);
|
|
152
|
-
return false;
|
|
153
279
|
}
|
|
280
|
+
log.error(`[LiopVerifier] TEE FAILED: ${result.message}`);
|
|
281
|
+
return false;
|
|
154
282
|
}
|
|
155
283
|
/**
|
|
156
284
|
* Derives the ImageID of a logic payload following the LIOP v1 Standard.
|
|
@@ -161,5 +289,5 @@ var LiopVerifier = class _LiopVerifier {
|
|
|
161
289
|
};
|
|
162
290
|
|
|
163
291
|
export { LiopVerifier };
|
|
164
|
-
//# sourceMappingURL=chunk-
|
|
165
|
-
//# sourceMappingURL=chunk-
|
|
292
|
+
//# sourceMappingURL=chunk-WXYDFCIW.js.map
|
|
293
|
+
//# sourceMappingURL=chunk-WXYDFCIW.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { sanitizeOutput } from './chunk-Y62GORQF.js';
|
|
2
|
-
import { LIOP_SCOPES,
|
|
3
|
-
import {
|
|
2
|
+
import { LIOP_SCOPES, authorizeRequest } from './chunk-NXCAFF73.js';
|
|
3
|
+
import { Dilithium65Wrapper } from './chunk-3664H3CV.js';
|
|
4
|
+
import { GRPC_CHANNEL_OPTIONS, liopV1, createServerCredentials, TokenTelemetryEngine } from './chunk-JPWC6XG6.js';
|
|
4
5
|
import { egressBlocksTotal, toolCallsTotal, fuelConsumed, wireEgressBytesTotal, wireSavedBytesTotal, toolCallErrorsTotal } from './chunk-Q3FKHJ3B.js';
|
|
5
6
|
import { MeshNode } from './chunk-IHKKWXHJ.js';
|
|
6
7
|
import { log } from './chunk-K3DGJLUY.js';
|
|
@@ -1791,7 +1792,7 @@ var LiopServer = class _LiopServer {
|
|
|
1791
1792
|
this.auditLogger = this.config?.auditLogger || globalAuditLogger;
|
|
1792
1793
|
const isTS = import.meta.url.endsWith(".ts");
|
|
1793
1794
|
const workerExt = isTS ? ".ts" : ".js";
|
|
1794
|
-
|
|
1795
|
+
const execArgv = [];
|
|
1795
1796
|
if (isTS) {
|
|
1796
1797
|
try {
|
|
1797
1798
|
const req = createRequire(import.meta.url);
|
|
@@ -1799,9 +1800,9 @@ var LiopServer = class _LiopServer {
|
|
|
1799
1800
|
const absoluteTsx = pathToFileURL(
|
|
1800
1801
|
path.join(path.dirname(tsxPkg), "dist", "loader.mjs")
|
|
1801
1802
|
).href;
|
|
1802
|
-
execArgv
|
|
1803
|
+
execArgv.push("--import", absoluteTsx);
|
|
1803
1804
|
} catch (_e) {
|
|
1804
|
-
execArgv
|
|
1805
|
+
execArgv.push("--import", "tsx");
|
|
1805
1806
|
}
|
|
1806
1807
|
}
|
|
1807
1808
|
const isTest = process.env.NODE_ENV === "test" || process.env.VITEST;
|
|
@@ -1839,6 +1840,11 @@ var LiopServer = class _LiopServer {
|
|
|
1839
1840
|
});
|
|
1840
1841
|
}
|
|
1841
1842
|
}
|
|
1843
|
+
try {
|
|
1844
|
+
this.enclavePqcKeypair = Dilithium65Wrapper.generateKeyPair();
|
|
1845
|
+
} catch (_e) {
|
|
1846
|
+
this.enclavePqcKeypair = void 0;
|
|
1847
|
+
}
|
|
1842
1848
|
if (this.config?.auth?.role === "nexus") {
|
|
1843
1849
|
const issuer = this.config.auth.issuer || "http://localhost:3000";
|
|
1844
1850
|
const audience = this.config.auth.audience || AUTH_DEFAULTS.audience;
|
|
@@ -1905,6 +1911,7 @@ var LiopServer = class _LiopServer {
|
|
|
1905
1911
|
meshNode = null;
|
|
1906
1912
|
rpcServer = null;
|
|
1907
1913
|
boundPort = null;
|
|
1914
|
+
enclavePqcKeypair;
|
|
1908
1915
|
jwtValidator;
|
|
1909
1916
|
// biome-ignore lint/suspicious/noExplicitAny: Loaded dynamically in Phase C
|
|
1910
1917
|
oauthProvider;
|
|
@@ -3089,10 +3096,11 @@ Data structure: ${schemaDigest}. Full schema: resource ${uri}. Guidelines: resou
|
|
|
3089
3096
|
isEncrypted: true,
|
|
3090
3097
|
proofMode: requestedProofMode,
|
|
3091
3098
|
guestImageId: toolPolicy?.guestImageId ?? this.config?.guestImageId,
|
|
3099
|
+
pqcSigningKey: toolPolicy?.pqcSign ? this.enclavePqcKeypair?.secretKey : void 0,
|
|
3092
3100
|
dpConfig
|
|
3093
3101
|
// Apply DP noise inside worker before ZK-Receipt commitment
|
|
3094
3102
|
});
|
|
3095
|
-
if (requestedProofMode === 2 /* PROOF_MODE_ZK_BLOCKING */ && workerResponse.proof_type !== 2 /* GROTH16 */) {
|
|
3103
|
+
if (requestedProofMode === 2 /* PROOF_MODE_ZK_BLOCKING */ && workerResponse.proof_type !== 2 /* GROTH16 */ && workerResponse.proof_type !== 3 /* GROTH16_PQC_HYBRID */) {
|
|
3096
3104
|
log.error(
|
|
3097
3105
|
`[LIOP-RPC] Enclave policy violation: Valid Groth16 zero-knowledge proof required but unavailable for ${toolName || "tool"}`
|
|
3098
3106
|
);
|
|
@@ -3178,7 +3186,7 @@ Data structure: ${schemaDigest}. Full schema: resource ${uri}. Guidelines: resou
|
|
|
3178
3186
|
),
|
|
3179
3187
|
zk_receipt: workerResponse.zk_receipt ? Buffer.from(workerResponse.zk_receipt, "base64") : Buffer.from(""),
|
|
3180
3188
|
is_error: false,
|
|
3181
|
-
proof_type: workerResponse.proof_type === 2 /* GROTH16 */ ? 2 /* PROOF_TYPE_GROTH16 */ : 0 /* PROOF_TYPE_HMAC_LEGACY */,
|
|
3189
|
+
proof_type: workerResponse.proof_type === 3 /* GROTH16_PQC_HYBRID */ ? 3 /* PROOF_TYPE_GROTH16_PQC_HYBRID */ : workerResponse.proof_type === 2 /* GROTH16 */ ? 2 /* PROOF_TYPE_GROTH16 */ : 0 /* PROOF_TYPE_HMAC_LEGACY */,
|
|
3182
3190
|
guest_image_id: workerResponse.guest_image_id || toolPolicy?.guestImageId || this.config?.guestImageId || ""
|
|
3183
3191
|
};
|
|
3184
3192
|
const violation = await this.piiScanner.scan(validationOutput);
|
|
@@ -3395,10 +3403,11 @@ Data structure: ${schemaDigest}. Full schema: resource ${uri}. Guidelines: resou
|
|
|
3395
3403
|
// Use plaintext for local Logic-on-Origin injection
|
|
3396
3404
|
proofMode,
|
|
3397
3405
|
guestImageId: dpPolicy?.guestImageId ?? this.config?.guestImageId,
|
|
3406
|
+
pqcSigningKey: dpPolicy?.pqcSign ? this.enclavePqcKeypair?.secretKey : void 0,
|
|
3398
3407
|
dpConfig
|
|
3399
3408
|
// Pass DP Config to apply inside worker before ZK-Receipt commitment
|
|
3400
3409
|
});
|
|
3401
|
-
if (proofMode === 2 /* PROOF_MODE_ZK_BLOCKING */ && workerResponse.proof_type !== 2 /* GROTH16 */) {
|
|
3410
|
+
if (proofMode === 2 /* PROOF_MODE_ZK_BLOCKING */ && workerResponse.proof_type !== 2 /* GROTH16 */ && workerResponse.proof_type !== 3 /* GROTH16_PQC_HYBRID */) {
|
|
3402
3411
|
return {
|
|
3403
3412
|
content: [
|
|
3404
3413
|
{
|
|
@@ -3415,7 +3424,7 @@ Data structure: ${schemaDigest}. Full schema: resource ${uri}. Guidelines: resou
|
|
|
3415
3424
|
computation_result: sanitizedOutput,
|
|
3416
3425
|
image_id: workerResponse.image_id,
|
|
3417
3426
|
zk_receipt: workerResponse.zk_receipt,
|
|
3418
|
-
proof_type: workerResponse.proof_type === 2 /* GROTH16 */ ? "GROTH16" : "HMAC_LEGACY",
|
|
3427
|
+
proof_type: workerResponse.proof_type === 3 /* GROTH16_PQC_HYBRID */ ? "GROTH16_PQC_HYBRID" : workerResponse.proof_type === 2 /* GROTH16 */ ? "GROTH16" : "HMAC_LEGACY",
|
|
3419
3428
|
guest_image_id: workerResponse.guest_image_id,
|
|
3420
3429
|
status: "Worker Pool Execution Success"
|
|
3421
3430
|
});
|
|
@@ -3739,5 +3748,5 @@ Data structure: ${schemaDigest}. Full schema: resource ${uri}. Guidelines: resou
|
|
|
3739
3748
|
};
|
|
3740
3749
|
|
|
3741
3750
|
export { AUTH_DEFAULTS, AuditLogger, GENESIS_HASH, JwtValidator, LiopRpcServer, LiopServer, NerScanner, PII_PATTERNS, PII_PRESETS, PiiScanner, computeEntryHash, createOAuthServer, globalAuditLogger };
|
|
3742
|
-
//# sourceMappingURL=chunk-
|
|
3743
|
-
//# sourceMappingURL=chunk-
|
|
3751
|
+
//# sourceMappingURL=chunk-ZU3WVVLC.js.map
|
|
3752
|
+
//# sourceMappingURL=chunk-ZU3WVVLC.js.map
|
package/dist/client.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import './verifier-
|
|
1
|
+
import './verifier-DqZ9MQ9l.js';
|
|
2
2
|
import './node-Djzm6UYd.js';
|
|
3
|
-
export { c as LiopClient } from './index-
|
|
4
|
-
import './zk-
|
|
5
|
-
import './types-
|
|
3
|
+
export { c as LiopClient } from './index-BYDtRGue.js';
|
|
4
|
+
import './zk-DzYNWBgo.js';
|
|
5
|
+
import './types-29zv9X1V.js';
|
|
6
6
|
import '@grpc/grpc-js';
|
|
7
7
|
import 'node:events';
|
|
8
8
|
import 'zod';
|
package/dist/client.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { LiopClient } from './chunk-
|
|
1
|
+
export { LiopClient } from './chunk-S3RAZTEM.js';
|
|
2
2
|
import './chunk-3QH44NKZ.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-WXYDFCIW.js';
|
|
4
4
|
import './chunk-IK7CGWAZ.js';
|
|
5
5
|
import './chunk-7PITYWOV.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-JPWC6XG6.js';
|
|
7
7
|
import './chunk-Q3FKHJ3B.js';
|
|
8
8
|
import './chunk-KR5UZUEY.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-FIVRGOA4.js';
|
|
10
10
|
import './chunk-IHKKWXHJ.js';
|
|
11
11
|
import './chunk-K3DGJLUY.js';
|
|
12
12
|
//# sourceMappingURL=client.js.map
|
package/dist/gateway.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './node-Djzm6UYd.js';
|
|
2
|
-
import './index-
|
|
3
|
-
import './types-
|
|
4
|
-
export { L as LiopHybridGateway } from './hybrid-
|
|
2
|
+
import './index-ByzjpRCk.js';
|
|
3
|
+
import './types-29zv9X1V.js';
|
|
4
|
+
export { L as LiopHybridGateway } from './hybrid-BZpCiUaV.js';
|
|
5
5
|
import 'zod';
|
|
6
|
-
import './zk-
|
|
6
|
+
import './zk-DzYNWBgo.js';
|
|
7
7
|
import 'jose';
|
|
8
|
-
import './verifier-
|
|
8
|
+
import './verifier-DqZ9MQ9l.js';
|
package/dist/gateway.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
export { LiopHybridGateway } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { LiopHybridGateway } from './chunk-6MYJBM2E.js';
|
|
2
|
+
import './chunk-DSOB2JKM.js';
|
|
3
|
+
import './chunk-WXYDFCIW.js';
|
|
4
4
|
import './chunk-IK7CGWAZ.js';
|
|
5
5
|
import './chunk-7PITYWOV.js';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import './chunk-NXCAFF73.js';
|
|
7
|
+
import './chunk-3664H3CV.js';
|
|
8
|
+
import './chunk-JPWC6XG6.js';
|
|
8
9
|
import './chunk-Q3FKHJ3B.js';
|
|
9
10
|
import './chunk-KR5UZUEY.js';
|
|
10
|
-
import './chunk-
|
|
11
|
+
import './chunk-FIVRGOA4.js';
|
|
11
12
|
import './chunk-K3DGJLUY.js';
|
|
12
13
|
//# sourceMappingURL=gateway.js.map
|
|
13
14
|
//# sourceMappingURL=gateway.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as MeshNode } from './node-Djzm6UYd.js';
|
|
2
|
-
import { L as LiopServer } from './index-
|
|
3
|
-
import { b as McpRequest, M as McpEra, A as AuthInfo, c as McpResponse, G as GatewayInterceptorOptions } from './types-
|
|
4
|
-
import { L as LiopVerifier } from './verifier-
|
|
2
|
+
import { L as LiopServer } from './index-ByzjpRCk.js';
|
|
3
|
+
import { b as McpRequest, M as McpEra, A as AuthInfo, c as McpResponse, G as GatewayInterceptorOptions } from './types-29zv9X1V.js';
|
|
4
|
+
import { L as LiopVerifier } from './verifier-DqZ9MQ9l.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* LIOP Sliding-Window Rate Limiter
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { L as LiopVerifier } from './verifier-
|
|
1
|
+
import { L as LiopVerifier } from './verifier-DqZ9MQ9l.js';
|
|
2
2
|
import { M as MeshNodeConfig } from './node-Djzm6UYd.js';
|
|
3
3
|
import * as grpc from '@grpc/grpc-js';
|
|
4
4
|
import { EventEmitter } from 'node:events';
|
|
5
|
-
import { Z as ZkPolicy } from './zk-
|
|
6
|
-
import { M as McpEra, C as CallToolRequest, a as CallToolResult } from './types-
|
|
5
|
+
import { Z as ZkPolicy } from './zk-DzYNWBgo.js';
|
|
6
|
+
import { M as McpEra, C as CallToolRequest, a as CallToolResult } from './types-29zv9X1V.js';
|
|
7
7
|
|
|
8
8
|
interface CertManagerOptions {
|
|
9
9
|
/** Path to the root CA certificate (PEM format) */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { M as MeshNodeConfig, a as MeshNode } from './node-Djzm6UYd.js';
|
|
3
|
-
import { d as AuditLogger, J as JwtValidator, S as ServerInfo, a as CallToolResult, P as Prompt, e as GetPromptRequest, f as GetPromptResult, C as CallToolRequest, T as Tool, R as Resource } from './types-
|
|
3
|
+
import { d as AuditLogger, J as JwtValidator, S as ServerInfo, a as CallToolResult, P as Prompt, e as GetPromptRequest, f as GetPromptResult, C as CallToolRequest, T as Tool, R as Resource } from './types-29zv9X1V.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* LIOP OAuth 2.1 Hybrid Auth — Configuration Types
|
|
@@ -354,6 +354,10 @@ interface LogicExecutionPolicy {
|
|
|
354
354
|
* Static verification key JSON structure for this capability.
|
|
355
355
|
*/
|
|
356
356
|
vkey?: Record<string, unknown>;
|
|
357
|
+
/**
|
|
358
|
+
* Whether to co-sign the Groth16 receipt with an ML-DSA-65 post-quantum digital signature (FIPS 204).
|
|
359
|
+
*/
|
|
360
|
+
pqcSign?: boolean;
|
|
357
361
|
}
|
|
358
362
|
declare class LiopServer {
|
|
359
363
|
private serverInfo;
|
|
@@ -380,6 +384,7 @@ declare class LiopServer {
|
|
|
380
384
|
private meshNode;
|
|
381
385
|
private rpcServer;
|
|
382
386
|
private boundPort;
|
|
387
|
+
private enclavePqcKeypair?;
|
|
383
388
|
jwtValidator?: JwtValidator;
|
|
384
389
|
oauthProvider?: any;
|
|
385
390
|
private sessions;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export { LiopBridgeOptions, LiopMcpBridge, LiopStreamBridge, LiopStreamBridgeOptions } from './bridge.js';
|
|
2
|
-
import { L as LiopTlsOptions } from './index-
|
|
3
|
-
export { C as CertInfo, a as CertManager, b as CertManagerOptions, c as LiopClient, d as createChannelCredentials, e as createServerCredentials } from './index-
|
|
2
|
+
import { L as LiopTlsOptions } from './index-BYDtRGue.js';
|
|
3
|
+
export { C as CertInfo, a as CertManager, b as CertManagerOptions, c as LiopClient, d as createChannelCredentials, e as createServerCredentials } from './index-BYDtRGue.js';
|
|
4
4
|
import { ProofWithSignals, VerificationKey } from 'micro-zk-proofs';
|
|
5
5
|
export { ProofWithSignals, VerificationKey } from 'micro-zk-proofs';
|
|
6
|
-
export { L as LiopVerifier, V as VerifyZkOptions } from './verifier-
|
|
6
|
+
export { L as LiopVerifier, T as TeePolicy, a as TeeVerificationOptions, b as TeeVerificationResult, V as VerifyZkOptions } from './verifier-DqZ9MQ9l.js';
|
|
7
7
|
import * as http from 'node:http';
|
|
8
|
-
export { I as InMemoryRateLimiter, L as LiopHybridGateway, a as LiopMcpRouter, R as RateLimitStatus, b as RateLimiterOptions } from './hybrid-
|
|
9
|
-
import { A as AuthInfo } from './types-
|
|
10
|
-
export { g as AuditEntry, h as AuditInterceptor, d as AuditLogger, i as AuditRecordParams, j as AuditStatus, k as CacheableResult, C as CallToolRequest, a as CallToolResult, D as DiscoverResult, l as GENESIS_HASH, m as GatewayAdmissionResult, n as GatewayInterceptor, o as GatewayInterceptorContext, G as GatewayInterceptorOptions, e as GetPromptRequest, f as GetPromptResult, I as InputRequest, p as InputRequiredResult, q as InputResponse, J as JwtValidator, L as LiopLogger, r as LogEvent, s as LogInterceptor, t as LogLevel, u as MCP_LEGACY_SUPPORT_ENABLED, v as MCP_PROTOCOL_VERSION, w as MCP_PROTOCOL_VERSION_LEGACY, M as McpEra, b as McpRequest, x as McpRequestMeta, c as McpResponse, P as Prompt, y as PromptSchema, R as Resource, z as ResourceSchema, S as ServerInfo, T as Tool, B as ToolSchema, E as computeEntryHash, F as executeGatewayInterceptor, H as globalAuditLogger, K as log } from './types-
|
|
8
|
+
export { I as InMemoryRateLimiter, L as LiopHybridGateway, a as LiopMcpRouter, R as RateLimitStatus, b as RateLimiterOptions } from './hybrid-BZpCiUaV.js';
|
|
9
|
+
import { A as AuthInfo } from './types-29zv9X1V.js';
|
|
10
|
+
export { g as AuditEntry, h as AuditInterceptor, d as AuditLogger, i as AuditRecordParams, j as AuditStatus, k as CacheableResult, C as CallToolRequest, a as CallToolResult, D as DiscoverResult, l as GENESIS_HASH, m as GatewayAdmissionResult, n as GatewayInterceptor, o as GatewayInterceptorContext, G as GatewayInterceptorOptions, e as GetPromptRequest, f as GetPromptResult, I as InputRequest, p as InputRequiredResult, q as InputResponse, J as JwtValidator, L as LiopLogger, r as LogEvent, s as LogInterceptor, t as LogLevel, u as MCP_LEGACY_SUPPORT_ENABLED, v as MCP_PROTOCOL_VERSION, w as MCP_PROTOCOL_VERSION_LEGACY, M as McpEra, b as McpRequest, x as McpRequestMeta, c as McpResponse, P as Prompt, y as PromptSchema, R as Resource, z as ResourceSchema, S as ServerInfo, T as Tool, B as ToolSchema, E as computeEntryHash, F as executeGatewayInterceptor, H as globalAuditLogger, K as log } from './types-29zv9X1V.js';
|
|
11
11
|
export { L as LiopManifest, a as MeshNode, M as MeshNodeConfig } from './node-Djzm6UYd.js';
|
|
12
12
|
export { SWARM_KEY_BYTE_LENGTH, createSwarmKey, deserializeSwarmKey, loadSwarmKey, parseSwarmKey, saveSwarmKey, serializeSwarmKey } from './mesh.js';
|
|
13
13
|
import * as grpc from '@grpc/grpc-js';
|
|
14
|
-
export { A as AUTH_DEFAULTS, b as AggregationPolicy, c as AuthRole, d as LiopAuthConfig, L as LiopServer, a as LiopServerOptions, e as LogicExecutionPolicy, N as NerScanner, O as OAuthClientConfig, f as OutputSanitizerConfig, P as PII_PATTERNS, g as PII_PRESETS, h as PiiRule, i as PiiScanner, T as ToolHandler, s as sanitizeOutput } from './index-
|
|
14
|
+
export { A as AUTH_DEFAULTS, b as AggregationPolicy, c as AuthRole, d as LiopAuthConfig, L as LiopServer, a as LiopServerOptions, e as LogicExecutionPolicy, N as NerScanner, O as OAuthClientConfig, f as OutputSanitizerConfig, P as PII_PATTERNS, g as PII_PRESETS, h as PiiRule, i as PiiScanner, T as ToolHandler, s as sanitizeOutput } from './index-ByzjpRCk.js';
|
|
15
15
|
import * as jose from 'jose';
|
|
16
16
|
import Provider from 'oidc-provider';
|
|
17
|
-
export { D as DecodedReceipt, P as ProofType, R as RECEIPT_VERSION_V1, a as RECEIPT_VERSION_V2, b as ZK_JOURNAL_V2_SIZE, c as ZkJournalV2, Z as ZkPolicy, d as ZkReceipt, e as ZkVerificationError, f as ZkVerifier, g as decodeJournalV2, h as encodeJournalV2, r as receiptCodec } from './zk-
|
|
17
|
+
export { D as DecodedReceipt, P as ProofType, R as RECEIPT_VERSION_V1, a as RECEIPT_VERSION_V2, b as ZK_JOURNAL_V2_SIZE, c as ZkJournalV2, Z as ZkPolicy, d as ZkReceipt, e as ZkVerificationError, f as ZkVerifier, g as decodeJournalV2, h as encodeJournalV2, r as receiptCodec } from './zk-DzYNWBgo.js';
|
|
18
18
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
19
19
|
import 'zod';
|
|
20
20
|
import 'node:events';
|
|
@@ -64,7 +64,7 @@ interface TokenEstimator {
|
|
|
64
64
|
*
|
|
65
65
|
* - Synchronous: safe for hot-path usage without async overhead
|
|
66
66
|
* - Merge cache reduced to 10K entries for long-running server processes
|
|
67
|
-
* -
|
|
67
|
+
* - External dependency: resolved from gpt-tokenizer in node_modules at runtime
|
|
68
68
|
*/
|
|
69
69
|
declare class RealTokenEstimator implements TokenEstimator {
|
|
70
70
|
readonly name = "o200k_base";
|
|
@@ -426,7 +426,8 @@ declare enum ProofMode {
|
|
|
426
426
|
}
|
|
427
427
|
declare enum ProofType {
|
|
428
428
|
PROOF_TYPE_HMAC_LEGACY = 0,
|
|
429
|
-
PROOF_TYPE_GROTH16 = 2
|
|
429
|
+
PROOF_TYPE_GROTH16 = 2,
|
|
430
|
+
PROOF_TYPE_GROTH16_PQC_HYBRID = 3
|
|
430
431
|
}
|
|
431
432
|
interface IntentRequest {
|
|
432
433
|
agent_did: string;
|
|
@@ -524,6 +525,10 @@ declare const Dilithium65Wrapper: {
|
|
|
524
525
|
publicKey: Uint8Array;
|
|
525
526
|
secretKey: Uint8Array;
|
|
526
527
|
};
|
|
528
|
+
/**
|
|
529
|
+
* Derives the ML-DSA-65 public key from a given secret key.
|
|
530
|
+
*/
|
|
531
|
+
getPublicKey(secretKey: Uint8Array): Uint8Array;
|
|
527
532
|
/**
|
|
528
533
|
* Validates and imports a raw ML-DSA-65 public key.
|
|
529
534
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
export { WasiSandbox, calculateAstInstructionFuel, getDefaultEnvironment } from './chunk-
|
|
2
|
-
export { VERIFICATION_LATENCY_BUDGET_MS, deserializeGrothProof, deserializeVKey, serializeGrothProof, serializeVKey, verifyGroth16Proof } from './chunk-
|
|
3
|
-
export { AesGcmWrapper, LiopClient, LiopRpcClient } from './chunk-
|
|
4
|
-
export { LiopMcpBridge, LiopStreamBridge } from './chunk-
|
|
5
|
-
export { GRPC_WEB_CONSTANTS, InMemoryRateLimiter, LiopHybridGateway, buildProtectedResourceMetadata, decodeFrames, dispatchGrpcWebRequest, encodeDataFrame, encodeTrailerFrame, executeGatewayInterceptor, isGrpcWebRequest } from './chunk-
|
|
1
|
+
export { WasiSandbox, calculateAstInstructionFuel, getDefaultEnvironment } from './chunk-R52TZEIL.js';
|
|
2
|
+
export { VERIFICATION_LATENCY_BUDGET_MS, deserializeGrothProof, deserializeVKey, serializeGrothProof, serializeVKey, verifyGroth16Proof } from './chunk-ET6VRUK2.js';
|
|
3
|
+
export { AesGcmWrapper, LiopClient, LiopRpcClient } from './chunk-S3RAZTEM.js';
|
|
4
|
+
export { LiopMcpBridge, LiopStreamBridge } from './chunk-WXOWJXY6.js';
|
|
5
|
+
export { GRPC_WEB_CONSTANTS, InMemoryRateLimiter, LiopHybridGateway, buildProtectedResourceMetadata, decodeFrames, dispatchGrpcWebRequest, encodeDataFrame, encodeTrailerFrame, executeGatewayInterceptor, isGrpcWebRequest } from './chunk-6MYJBM2E.js';
|
|
6
6
|
export { RoutingTable, probeTopology } from './chunk-V47P2AQR.js';
|
|
7
7
|
export { TokenManager } from './chunk-3QH44NKZ.js';
|
|
8
|
-
export { AUTH_DEFAULTS, AuditLogger, GENESIS_HASH, JwtValidator, LiopRpcServer, LiopServer, NerScanner, PII_PATTERNS, PII_PRESETS, PiiScanner, computeEntryHash, createOAuthServer, globalAuditLogger } from './chunk-
|
|
8
|
+
export { AUTH_DEFAULTS, AuditLogger, GENESIS_HASH, JwtValidator, LiopRpcServer, LiopServer, NerScanner, PII_PATTERNS, PII_PRESETS, PiiScanner, computeEntryHash, createOAuthServer, globalAuditLogger } from './chunk-ZU3WVVLC.js';
|
|
9
9
|
export { sanitizeOutput } from './chunk-Y62GORQF.js';
|
|
10
|
-
export { LiopMcpRouter } from './chunk-
|
|
11
|
-
export { LiopVerifier } from './chunk-
|
|
10
|
+
export { LiopMcpRouter } from './chunk-DSOB2JKM.js';
|
|
11
|
+
export { LiopVerifier } from './chunk-WXYDFCIW.js';
|
|
12
12
|
import './chunk-IK7CGWAZ.js';
|
|
13
13
|
export { Kyber768Wrapper } from './chunk-7PITYWOV.js';
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
14
|
+
export { LIOP_SCOPES, authorizeRequest } from './chunk-NXCAFF73.js';
|
|
15
|
+
export { DILITHIUM65_CONSTANTS, Dilithium65Wrapper } from './chunk-3664H3CV.js';
|
|
16
|
+
export { GRPC_CHANNEL_OPTIONS, HeuristicTokenEstimator, LiopOTelBridge, RealTokenEstimator, TokenTelemetryEngine, createChannelCredentials, createServerCredentials, createSyncTokenEstimator, createTokenEstimator } from './chunk-JPWC6XG6.js';
|
|
16
17
|
export { Counter, Gauge, Histogram, MetricsRegistry, egressBlocksTotal, fuelConsumed, manifestCacheSize, meshPeersConnected, operationDurationMs, pqcHandshakeDurationMs, pqcHandshakesTotal, protocolMetrics, tokensInputTotal, tokensOutputTotal, tokensSavedTotal, toolCallErrorsTotal, toolCallsTotal, wireEgressBytesTotal, wireSavedBytesTotal, zkProofsByTypeTotal, zkProvingDurationMs, zkVerificationDurationMs, zkVerificationsTotal, zkVkeyCacheSize } from './chunk-Q3FKHJ3B.js';
|
|
17
18
|
export { MCP_LEGACY_SUPPORT_ENABLED, MCP_PROTOCOL_VERSION, MCP_PROTOCOL_VERSION_LEGACY, PromptSchema, ResourceSchema, ToolSchema } from './chunk-KR5UZUEY.js';
|
|
18
|
-
export { ProofType, RECEIPT_VERSION_V1, RECEIPT_VERSION_V2, ZK_JOURNAL_V2_SIZE, ZkVerificationError, ZkVerifier, decodeJournalV2, encodeJournalV2, receiptCodec } from './chunk-
|
|
19
|
+
export { ProofType, RECEIPT_VERSION_V1, RECEIPT_VERSION_V2, ZK_JOURNAL_V2_SIZE, ZkVerificationError, ZkVerifier, decodeJournalV2, encodeJournalV2, receiptCodec } from './chunk-FIVRGOA4.js';
|
|
19
20
|
export { SWARM_KEY_BYTE_LENGTH, createSwarmKey, deserializeSwarmKey, loadSwarmKey, parseSwarmKey, saveSwarmKey, serializeSwarmKey } from './chunk-ZP3VVXOI.js';
|
|
20
21
|
export { MeshNode } from './chunk-IHKKWXHJ.js';
|
|
21
22
|
import { log } from './chunk-K3DGJLUY.js';
|