@nekzus/liop 2.1.0-alpha.16 → 2.1.0-alpha.17
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 +58 -4
- package/dist/bin/agent.js +1 -1
- package/dist/chunk-GKV6M2PQ.js +208106 -0
- package/dist/chunk-GKV6M2PQ.js.map +1 -0
- package/dist/{chunk-636UOVSO.js → chunk-UCJEK75U.js} +3 -3
- package/dist/{chunk-636UOVSO.js.map → chunk-UCJEK75U.js.map} +1 -1
- package/dist/gateway.js +2 -2
- package/dist/index.d.ts +6 -11
- package/dist/index.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-KF4DCCU3.js +0 -2160
- package/dist/chunk-KF4DCCU3.js.map +0 -1
package/README.md
CHANGED
|
@@ -33,15 +33,17 @@ This fundamentally solves the data privacy, bandwidth, and latency challenges of
|
|
|
33
33
|
| Feature | Description |
|
|
34
34
|
| :---------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
35
35
|
| **Logic-Injection-on-Origin** | LLMs send code, not queries. Data never leaves the origin server. |
|
|
36
|
+
| **Dual-Era MCP Compliance** | Seamless support for modern stateless MCP v2 (2026-07-28) and legacy MCP (2025-11-25) clients (Claude Desktop, Cursor). |
|
|
37
|
+
| **Token Economy Engine** | Inlined BPE `o200k_base` tokenizer with zero runtime dependencies (16.5MB footprint reduction) and OpenTelemetry `gen_ai.*` bridge. |
|
|
38
|
+
| **Interactive Playground UI** | Real-time Web UI (`:14000`) with live 7-phase SSE execution stream and cryptographic proof inspector. |
|
|
36
39
|
| **MCP Drop-in Replacement** | `LiopServer` mirrors the Anthropic MCP `Server` API — tools, resources, and prompts with `Zod` schemas. |
|
|
37
40
|
| **Guardian AST** | Zero-time heuristic inspection blocks sandbox escapes (`require`, `fs`, `eval`, `fetch`, prototype pollution). |
|
|
38
41
|
| **WASI Sandbox** | JavaScript payloads execute inside V8 isolates with CPU fuel limits, no Node.js globals, and safe environment isolation (`allowEnv`). |
|
|
39
42
|
| **PII Shield** | Multi-layer egress filter with Regional Presets, custom keys, and recursive floats sanitization (`sanitizeOutput`). |
|
|
40
43
|
| **ZK-Receipts** | Cryptographic proof with `output_hash` cross-verification (Replay Mitigation) and balanced-brace proxy extraction. |
|
|
41
44
|
| **Worker Pool** | Heavy computation (crypto, sandboxing) dispatched to OS threads via `piscina` with background async warmup. |
|
|
42
|
-
| **
|
|
43
|
-
| **
|
|
44
|
-
| **Post-Quantum Ready** | ML-KEM-768 (Kyber) handshake + AES-256-GCM symmetric encryption for transport-layer security. |
|
|
45
|
+
| **Post-Quantum Ready** | ML-KEM-768 (Kyber) + ML-DSA-65 (Dilithium) with 1-hour session lifetime and AES-256-GCM encryption. |
|
|
46
|
+
| **Enterprise Observability** | Immutable SOC 2 Hash-Chain audit log (`AuditLogger`), Prometheus metrics (`/metrics`), and Kubernetes probes (`/healthz`, `/readyz`). |
|
|
45
47
|
| **P2P Mesh** | Kademlia DHT discovery via `libp2p` with TCP + WebSocket + Yamux multiplexing and Noise encryption. |
|
|
46
48
|
|
|
47
49
|
---
|
|
@@ -524,11 +526,63 @@ await server.connectToMesh();
|
|
|
524
526
|
|
|
525
527
|
---
|
|
526
528
|
|
|
529
|
+
---
|
|
530
|
+
|
|
531
|
+
## Interactive Web Playground (`:14000`)
|
|
532
|
+
|
|
533
|
+
The SDK includes an industrial, real-time developer interface to visually test Logic-Injection-on-Origin, trace post-quantum handshakes, and inspect cryptographic proofs:
|
|
534
|
+
|
|
535
|
+
```bash
|
|
536
|
+
# Launch the full Docker mesh and interactive Web UI
|
|
537
|
+
pnpm run demo:start
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
Navigate to **`http://localhost:14000`** in your browser:
|
|
541
|
+
|
|
542
|
+
* **Live 7-Phase Streaming:** Visualizes Bootstrap, DHT Discovery, ML-KEM-768 Handshake, AES-256-GCM Sealing, WASI Sandbox Execution, ZK-Receipt Verification, and Output Aggregation via real-time Server-Sent Events (SSE).
|
|
543
|
+
* **Built-in Industrial Presets:** Ready-to-run micro-modules for High-Frequency Trading (HFT Level 2 order books), Banking transaction analysis, Medical Vault HIPAA records, and PII exfiltration defense.
|
|
544
|
+
* **Cryptographic Proof Inspector:** Validates SHA-256 `ImageID`, HMAC-SHA256 ZK-receipt seals, and dataset integrity digests on the fly.
|
|
545
|
+
* **Dual Dark Modes:** Seamlessly toggle between OLED Obsidian and Slate Midnight interfaces.
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
## Token Economy & Telemetry
|
|
550
|
+
|
|
551
|
+
The SDK ships with a zero-runtime-dependency **`o200k_base`** BPE token estimation and telemetry engine:
|
|
552
|
+
|
|
553
|
+
```typescript
|
|
554
|
+
import {
|
|
555
|
+
createTokenEstimator,
|
|
556
|
+
createSyncTokenEstimator,
|
|
557
|
+
TokenTelemetryEngine,
|
|
558
|
+
LiopOTelBridge
|
|
559
|
+
} from "@nekzus/liop";
|
|
560
|
+
|
|
561
|
+
// 1. Exact BPE Token Counting (Bundled inlined o200k_base vocab, zero network/disk lag)
|
|
562
|
+
const estimator = createSyncTokenEstimator();
|
|
563
|
+
const tokens = estimator.countTokens("Hello world! Logic-Injection-on-Origin"); // 12
|
|
564
|
+
|
|
565
|
+
// 2. Operation-Level Token Telemetry
|
|
566
|
+
const telemetry = TokenTelemetryEngine.getInstance();
|
|
567
|
+
telemetry.record({
|
|
568
|
+
type: "tool_call",
|
|
569
|
+
method: "tools/call",
|
|
570
|
+
toolName: "Analyze_HFT_Market_Data",
|
|
571
|
+
estimatedInputTokens: 120,
|
|
572
|
+
estimatedOutputTokens: 42
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
// 3. OpenTelemetry gen_ai.* Bridge
|
|
576
|
+
// Automatically exports gen_ai.client.token.usage and gen_ai.client.operation.duration histograms
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
---
|
|
580
|
+
|
|
527
581
|
## Testing & Quality
|
|
528
582
|
|
|
529
583
|
This package is continuously tested across multiple platforms and Node.js versions via CI/CD:
|
|
530
584
|
|
|
531
|
-
- **
|
|
585
|
+
- **490+ tests** spanning unit, integration, conformance, adversarial, and live Docker mesh suites
|
|
532
586
|
- **Multi-OS matrix:** Ubuntu, Windows, macOS
|
|
533
587
|
- **Node.js versions:** 20.x, 22.x
|
|
534
588
|
- **Code quality:** Enforced by [Biome.js](https://biomejs.dev/) (linting + formatting)
|
package/dist/bin/agent.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { LiopServer } from '../chunk-UBOQZVV5.js';
|
|
3
3
|
import '../chunk-JIJPZFR2.js';
|
|
4
|
-
import { LiopMcpRouter } from '../chunk-
|
|
4
|
+
import { LiopMcpRouter } from '../chunk-GKV6M2PQ.js';
|
|
5
5
|
import '../chunk-32ADSAJS.js';
|
|
6
6
|
import '../chunk-OUUTDSOW.js';
|
|
7
7
|
import '../chunk-QLCOEP5J.js';
|