@nekzus/liop 2.2.0 → 2.3.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.
Files changed (66) hide show
  1. package/LICENSE +201 -21
  2. package/NOTICE +5 -0
  3. package/README.md +61 -5
  4. package/dist/bin/agent.js +7 -5
  5. package/dist/bin/agent.js.map +1 -1
  6. package/dist/bridge.d.ts +2 -2
  7. package/dist/bridge.js +2 -1
  8. package/dist/{chunk-UVO7DII3.js → chunk-4LQPDN3W.js} +108 -15
  9. package/dist/chunk-4LQPDN3W.js.map +1 -0
  10. package/dist/{chunk-NJRSFFD7.js → chunk-74CISO2I.js} +60 -22
  11. package/dist/chunk-74CISO2I.js.map +1 -0
  12. package/dist/{chunk-E5QBDD5E.js → chunk-CRZBVFDV.js} +169 -22
  13. package/dist/chunk-CRZBVFDV.js.map +1 -0
  14. package/dist/chunk-GKV6M2PQ.js +208106 -0
  15. package/dist/chunk-GKV6M2PQ.js.map +1 -0
  16. package/dist/chunk-JIJPZFR2.js +51 -0
  17. package/dist/chunk-JIJPZFR2.js.map +1 -0
  18. package/dist/chunk-OIMJZ64E.js +441 -0
  19. package/dist/chunk-OIMJZ64E.js.map +1 -0
  20. package/dist/chunk-PYKRQAER.js +77 -0
  21. package/dist/chunk-PYKRQAER.js.map +1 -0
  22. package/dist/{chunk-J3WPBMJ5.js → chunk-SONUORBT.js} +95 -6
  23. package/dist/chunk-SONUORBT.js.map +1 -0
  24. package/dist/{chunk-2JLG4DET.js → chunk-UBOQZVV5.js} +261 -107
  25. package/dist/chunk-UBOQZVV5.js.map +1 -0
  26. package/dist/chunk-UCJEK75U.js +714 -0
  27. package/dist/chunk-UCJEK75U.js.map +1 -0
  28. package/dist/chunk-WSW6YJNY.js +168 -0
  29. package/dist/chunk-WSW6YJNY.js.map +1 -0
  30. package/dist/client.d.ts +3 -2
  31. package/dist/client.js +4 -3
  32. package/dist/gateway.d.ts +5 -110
  33. package/dist/gateway.js +5 -4
  34. package/dist/hybrid-CF__0YnC.d.ts +170 -0
  35. package/dist/{index-BlGc0iym.d.ts → index-BW95kAL4.d.ts} +63 -2
  36. package/dist/index-cMV0_yD9.d.ts +200 -0
  37. package/dist/index.d.ts +273 -18
  38. package/dist/index.js +266 -13
  39. package/dist/index.js.map +1 -1
  40. package/dist/mesh.d.ts +14 -0
  41. package/dist/mesh.js +1 -1
  42. package/dist/server.d.ts +2 -2
  43. package/dist/server.js +5 -4
  44. package/dist/{types-sKeUxuky.d.ts → types-lJIxBlWF.d.ts} +71 -1
  45. package/dist/types.d.ts +1 -1
  46. package/dist/types.js +1 -1
  47. package/dist/workers/logic-execution.d.ts +1 -0
  48. package/dist/workers/logic-execution.js +17 -1
  49. package/dist/workers/logic-execution.js.map +1 -1
  50. package/package.json +53 -33
  51. package/dist/chunk-2JLG4DET.js.map +0 -1
  52. package/dist/chunk-CT6NHSYP.js +0 -30
  53. package/dist/chunk-CT6NHSYP.js.map +0 -1
  54. package/dist/chunk-E5QBDD5E.js.map +0 -1
  55. package/dist/chunk-HB5DXX3Q.js +0 -1976
  56. package/dist/chunk-HB5DXX3Q.js.map +0 -1
  57. package/dist/chunk-IJHTRIZC.js +0 -56
  58. package/dist/chunk-IJHTRIZC.js.map +0 -1
  59. package/dist/chunk-J3WPBMJ5.js.map +0 -1
  60. package/dist/chunk-NJRSFFD7.js.map +0 -1
  61. package/dist/chunk-PHTWUTY7.js +0 -300
  62. package/dist/chunk-PHTWUTY7.js.map +0 -1
  63. package/dist/chunk-RDWCGZ2A.js +0 -87
  64. package/dist/chunk-RDWCGZ2A.js.map +0 -1
  65. package/dist/chunk-UVO7DII3.js.map +0 -1
  66. package/dist/index-qM8ZH8sC.d.ts +0 -101
@@ -0,0 +1,170 @@
1
+ import { MeshNode } from './mesh.js';
2
+ import { L as LiopServer } from './index-BW95kAL4.js';
3
+ import { L as LiopVerifier } from './verifier-COnid_dg.js';
4
+ import { b as McpRequest, M as McpEra, A as AuthInfo, c as McpResponse } from './types-lJIxBlWF.js';
5
+
6
+ /**
7
+ * LIOP Sliding-Window Rate Limiter
8
+ *
9
+ * High-performance, zero-dependency in-memory rate limiter designed
10
+ * to protect the LIOP Hybrid Gateway and Mesh Nodes against Denial of Service (DoS),
11
+ * worker pool exhaustion, and brute-force attacks.
12
+ *
13
+ * Conforms to OWASP API Security Top 10 (API4:2023 - Unrestricted Resource Consumption).
14
+ */
15
+ interface RateLimiterOptions {
16
+ /** Window duration in milliseconds (default: 60,000ms = 1 minute) */
17
+ windowMs?: number;
18
+ /** Maximum number of allowed requests per window (default: 120) */
19
+ maxRequests?: number;
20
+ }
21
+ interface RateLimitStatus {
22
+ allowed: boolean;
23
+ remaining: number;
24
+ limit: number;
25
+ resetMs: number;
26
+ }
27
+ declare class InMemoryRateLimiter {
28
+ private readonly windowMs;
29
+ private readonly maxRequests;
30
+ private readonly records;
31
+ private cleanupTimer?;
32
+ constructor(options?: RateLimiterOptions);
33
+ /**
34
+ * Evaluates whether a request from the given key (IP, token, or clientId) is permitted.
35
+ *
36
+ * @param key Identifier for the client (e.g., remote IP or OAuth client ID)
37
+ * @returns Status containing allowed boolean, remaining quota, and time until reset
38
+ */
39
+ check(key: string): RateLimitStatus;
40
+ /**
41
+ * Explicitly resets the rate limit bucket for a given key.
42
+ */
43
+ reset(key: string): void;
44
+ /**
45
+ * Cleans up expired rate-limiting buckets to prevent memory leaks.
46
+ */
47
+ cleanup(): void;
48
+ /**
49
+ * Destroys internal timers and clears records.
50
+ */
51
+ close(): void;
52
+ }
53
+
54
+ /**
55
+ * LIOP MCP Router
56
+ *
57
+ * Core logic for routing MCP requests to local or remote LIOP providers.
58
+ * Decoupled from transport (HTTP/Stdio).
59
+ *
60
+ * All tool discovery and port resolution is DYNAMIC via the
61
+ * /liop/manifest/1.0.0 protocol stream over Kademlia DHT.
62
+ */
63
+ declare class LiopMcpRouter {
64
+ private liopServer;
65
+ private meshNode;
66
+ private defaultRpcPort;
67
+ /** Cached manifests from remote peers. Key = PeerID */
68
+ private manifestCache;
69
+ /** Guards against concurrent discovery storms */
70
+ private currentDiscovery;
71
+ /** Verifier for Tier-0 integrity checks */
72
+ verifier: LiopVerifier;
73
+ /** Callback when new remote tools are discovered */
74
+ onToolsChanged?: () => void;
75
+ /** Circuit-breaker state for peers that repeatedly fail manifest queries. */
76
+ private manifestFailureState;
77
+ private static readonly MANIFEST_FAILURE_BASE_COOLDOWN_MS;
78
+ private static readonly MANIFEST_FAILURE_MAX_COOLDOWN_MS;
79
+ private static readonly MANIFEST_SKIP_LOG_THROTTLE_MS;
80
+ constructor(liopServer: LiopServer, meshNode?: MeshNode | null, defaultRpcPort?: number);
81
+ getManifestCacheSize(): number;
82
+ private shouldSkipManifestQuery;
83
+ private recordManifestQuerySuccess;
84
+ private recordManifestQueryFailure;
85
+ /**
86
+ * Detects the protocol era of an incoming request.
87
+ * Modern requests carry '_meta' with protocol version "2026-07-28" or use modern RPCs.
88
+ * Legacy requests use 'initialize' handshake or lack '_meta' envelopes.
89
+ */
90
+ detectEra(request: McpRequest): McpEra;
91
+ dispatch(request: McpRequest, authInfo?: AuthInfo | null): Promise<McpResponse | null>;
92
+ /**
93
+ * MCP clients often send notifications/initialized then immediately tools/list.
94
+ * Start manifest discovery without blocking the notification handler.
95
+ */
96
+ private kickDiscoveryAfterInitialized;
97
+ /**
98
+ * Discovers and caches manifests from all remote LIOP providers in the mesh.
99
+ * Uses Kademlia DHT to find "liop:manifest" providers, then opens
100
+ * /liop/manifest/1.0.0 protocol streams to retrieve their full metadata.
101
+ */
102
+ refreshManifestCache(silent?: boolean): Promise<void>;
103
+ /**
104
+ * Returns the current manifest cache size for external telemetry.
105
+ * Used by the adaptive polling system to detect topology stabilization.
106
+ */
107
+ getCacheSize(): number;
108
+ /**
109
+ * Returns all remote tools discovered via the manifest protocol.
110
+ */
111
+ private getRemoteTools;
112
+ /**
113
+ * Returns all remote resources discovered via the manifest protocol.
114
+ */
115
+ private getRemoteResources;
116
+ /**
117
+ * Resolves the gRPC target (host:port) AND the peerId for a given tool name
118
+ * by searching the manifest cache. Supports exact names and suffixed names.
119
+ */
120
+ private resolveManifestTarget;
121
+ /**
122
+ * Redacts a PeerID for external-facing diagnostics.
123
+ * LIOP_DIAGNOSTIC_LEVEL controls verbosity:
124
+ * - "redacted" (default): truncated to last 8 chars
125
+ * - "full": complete PeerID (development only)
126
+ */
127
+ private redactPeerId;
128
+ private transcodeMcpToLiop;
129
+ private routeToRemoteProvider;
130
+ /** Cached M2M token for dynamic gateway-to-node routing */
131
+ private meshAgentToken?;
132
+ /**
133
+ * Dynamically acquires an M2M access token from the Nexus Authorization Server.
134
+ * If peerId is provided, checks if there are node-specific environment tokens
135
+ * before falling back to the global static token or Nexus acquisition.
136
+ */
137
+ private getOrAcquireMeshAgentToken;
138
+ private performTranscoding;
139
+ private encryptWithNonce;
140
+ }
141
+
142
+ /**
143
+ * LIOP Hybrid Gateway
144
+ * High-level orchestration for connecting MCP (JSON-RPC) clients to the LIOP Mesh.
145
+ */
146
+ declare class LiopHybridGateway {
147
+ private liopServer;
148
+ private meshNode;
149
+ private netServer;
150
+ private h2Server;
151
+ private h1Server;
152
+ private router;
153
+ private jwtValidator?;
154
+ private oauthProvider?;
155
+ private rateLimiter;
156
+ private isDraining;
157
+ private activeRequests;
158
+ constructor(liopServer: LiopServer, meshNode?: MeshNode | null, rpcPort?: number, rateLimiterOptions?: RateLimiterOptions);
159
+ private setupH2Routes;
160
+ private setupH1Routes;
161
+ private handleGrpcStream;
162
+ private handleMcpH2Stream;
163
+ listen(port: number, host?: string): Promise<number>;
164
+ isDrained(): boolean;
165
+ drain(timeoutMs?: number): Promise<void>;
166
+ stop(): Promise<void>;
167
+ getRouter(): LiopMcpRouter;
168
+ }
169
+
170
+ export { InMemoryRateLimiter as I, LiopHybridGateway as L, type RateLimitStatus as R, LiopMcpRouter as a, type RateLimiterOptions as b };
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { MeshNode } from './mesh.js';
3
- import { J as JwtValidator, S as ServerInfo, a as CallToolResult, P as Prompt, G as GetPromptRequest, c as GetPromptResult, C as CallToolRequest, T as Tool, R as Resource } from './types-sKeUxuky.js';
3
+ import { J as JwtValidator, S as ServerInfo, a as CallToolResult, P as Prompt, G as GetPromptRequest, d as GetPromptResult, C as CallToolRequest, T as Tool, R as Resource } from './types-lJIxBlWF.js';
4
4
 
5
5
  /**
6
6
  * LIOP OAuth 2.1 Hybrid Auth — Configuration Types
@@ -100,6 +100,60 @@ declare const AUTH_DEFAULTS: {
100
100
  readonly signingAlgorithm: "EdDSA";
101
101
  };
102
102
 
103
+ /**
104
+ * LIOP Immutable Audit Logger (Phase Beta-3)
105
+ * SOC 2 Type II & HIPAA compliant audit trail with cryptographic Hash-Chain.
106
+ * Guarantees tamper-evidence and non-repudiation for all Logic-on-Origin executions.
107
+ */
108
+ type AuditStatus = "SUCCESS" | "BLOCKED_EGRESS" | "ERROR" | "POLICY_VIOLATION";
109
+ interface AuditEntry {
110
+ id: string;
111
+ timestamp: string;
112
+ traceId: string;
113
+ agentDid: string;
114
+ peerId: string;
115
+ toolName: string;
116
+ datasetHash: string;
117
+ fuelConsumed: number;
118
+ outputHash: string;
119
+ zkReceiptSig: string;
120
+ status: AuditStatus;
121
+ prevEntryHash: string;
122
+ entryHash: string;
123
+ }
124
+ interface AuditRecordParams {
125
+ timestamp?: string;
126
+ traceId?: string;
127
+ agentDid: string;
128
+ peerId: string;
129
+ toolName: string;
130
+ datasetHash?: string;
131
+ fuelConsumed: number;
132
+ outputHash?: string;
133
+ zkReceiptSig?: string;
134
+ status: AuditStatus;
135
+ }
136
+ declare const GENESIS_HASH: string;
137
+ declare function computeEntryHash(entryWithoutHash: Omit<AuditEntry, "entryHash">): string;
138
+ declare class AuditLogger {
139
+ private entries;
140
+ private lastEntryHash;
141
+ private filePath?;
142
+ constructor(filePath?: string);
143
+ recordExecution(params: AuditRecordParams): AuditEntry;
144
+ getEntries(): readonly AuditEntry[];
145
+ getEntryCount(): number;
146
+ verifyIntegrity(): {
147
+ valid: boolean;
148
+ totalEntries: number;
149
+ brokenIndex?: number;
150
+ reason?: string;
151
+ };
152
+ exportJsonl(): string;
153
+ private loadFromFile;
154
+ }
155
+ declare const globalAuditLogger: AuditLogger;
156
+
103
157
  /** Single named entity detected by the NER scanner. */
104
158
  interface NerEntity {
105
159
  type: "person" | "place" | "organization";
@@ -278,6 +332,10 @@ interface LiopServerOptions {
278
332
  * Must match SCREAMING_SNAKE_CASE: /^[A-Z][A-Z0-9_]*$/ (e.g., "BANK", "VAULT", "HFT_ORACLE").
279
333
  */
280
334
  tokenSlug?: string;
335
+ /**
336
+ * SOC 2 Type II / HIPAA immutable audit logger instance.
337
+ */
338
+ auditLogger?: AuditLogger;
281
339
  /**
282
340
  * Path to a shared JSON file for persistent Query Budget tracking across multiple server instances.
283
341
  */
@@ -363,6 +421,9 @@ declare class LiopServer {
363
421
  private sessions;
364
422
  private revokedTokenHashes;
365
423
  private lastRevocationLoadTime;
424
+ private pqcKeyPair;
425
+ readonly auditLogger: AuditLogger;
426
+ getDatasetHash(): string;
366
427
  private static readonly LIOP_COMPACT_REGEX;
367
428
  private extractLogic;
368
429
  private parseUnknownJson;
@@ -520,4 +581,4 @@ declare class LiopServer {
520
581
  private applyInMemoryBudget;
521
582
  }
522
583
 
523
- export { AUTH_DEFAULTS as A, LiopServer as L, NerScanner as N, type OAuthClientConfig as O, PII_PATTERNS as P, type ToolHandler as T, type LiopServerOptions as a, type AggregationPolicy as b, type AuthRole as c, type LiopAuthConfig as d, type LogicExecutionPolicy as e, type OutputSanitizerConfig as f, PII_PRESETS as g, type PiiRule as h, PiiScanner as i, sanitizeOutput as s };
584
+ export { AUTH_DEFAULTS as A, GENESIS_HASH as G, LiopServer as L, NerScanner as N, type OAuthClientConfig as O, PII_PATTERNS as P, type ToolHandler as T, type LiopServerOptions as a, type AggregationPolicy as b, type AuditEntry as c, AuditLogger as d, type AuditRecordParams as e, type AuditStatus as f, type AuthRole as g, type LiopAuthConfig as h, type LogicExecutionPolicy as i, type OutputSanitizerConfig as j, PII_PRESETS as k, type PiiRule as l, PiiScanner as m, computeEntryHash as n, globalAuditLogger as o, sanitizeOutput as s };
@@ -0,0 +1,200 @@
1
+ import { L as LiopVerifier } from './verifier-COnid_dg.js';
2
+ import { MeshNodeConfig } from './mesh.js';
3
+ import { EventEmitter } from 'node:events';
4
+ import { M as McpEra, C as CallToolRequest, a as CallToolResult } from './types-lJIxBlWF.js';
5
+
6
+ /**
7
+ * LIOP Certificate Manager (CertManager)
8
+ * Provides automated certificate monitoring, X.509 validity inspection,
9
+ * and hot-reloading for mutual TLS (mTLS) without node restarts.
10
+ *
11
+ * Compliance:
12
+ * - NIST SP 800-52 Rev. 2: Guidelines for the Selection and Use of TLS
13
+ * - Zero-Trust Architecture (NIST SP 800-207): Continuous cryptographic verification
14
+ */
15
+
16
+ interface CertManagerOptions {
17
+ /** Path to the root CA certificate (PEM format) */
18
+ rootCertPath?: string;
19
+ /** Path to the server/client certificate chain (PEM format) */
20
+ certChainPath: string;
21
+ /** Path to the private key (PEM format) */
22
+ privateKeyPath: string;
23
+ /** Expiration warning threshold in days (default: 30) */
24
+ warningDays?: number;
25
+ /** Enable file watching for automatic hot-reloading (default: true) */
26
+ watchFiles?: boolean;
27
+ /** Debounce delay in ms for hot reloading (default: 150) */
28
+ debounceMs?: number;
29
+ }
30
+ interface CertInfo {
31
+ subject: string;
32
+ issuer: string;
33
+ validFrom: string;
34
+ validTo: string;
35
+ fingerprint256: string;
36
+ daysRemaining: number;
37
+ isExpired: boolean;
38
+ isExpiringSoon: boolean;
39
+ }
40
+ declare class CertManager extends EventEmitter {
41
+ private readonly options;
42
+ private rootCertBuffer;
43
+ private certChainBuffer;
44
+ private privateKeyBuffer;
45
+ private watchers;
46
+ private reloadDebounceTimer;
47
+ private readonly warningDays;
48
+ private readonly debounceMs;
49
+ constructor(options: CertManagerOptions);
50
+ /**
51
+ * Synchronously loads or reloads certificates from filesystem into memory.
52
+ */
53
+ loadCertificates(): void;
54
+ /**
55
+ * Inspects the loaded server/client certificate chain using Node.js native X509Certificate.
56
+ */
57
+ inspectCertificate(): CertInfo;
58
+ /**
59
+ * Sets up non-blocking filesystem watchers to detect certificate renewals
60
+ * and trigger hot-reloading without process restarts.
61
+ */
62
+ private setupWatchers;
63
+ /**
64
+ * Debounces reload events to ensure files have finished writing.
65
+ */
66
+ private scheduleReload;
67
+ /**
68
+ * Manually triggers a reload of certificates and emits the 'reload' event.
69
+ */
70
+ reload(): CertInfo;
71
+ getRootCert(): Buffer | null;
72
+ getCertChain(): Buffer;
73
+ getPrivateKey(): Buffer;
74
+ /**
75
+ * Stops all active file watchers and releases resources.
76
+ */
77
+ dispose(): void;
78
+ }
79
+
80
+ /**
81
+ * LIOP TLS Configuration
82
+ *
83
+ * Provides conditional TLS credential factories for gRPC connections.
84
+ * When TLS options are provided, connections are secured with mutual TLS.
85
+ * Otherwise, falls back to insecure credentials (alpha/development mode).
86
+ *
87
+ * Production Hardening (Phase 128):
88
+ * - When NODE_ENV=production and TLS is configured but certificate loading
89
+ * fails, the system throws a fatal error instead of silently degrading
90
+ * to insecure credentials. This prevents MITM/eavesdropping attacks
91
+ * caused by misconfigured certificate paths going unnoticed.
92
+ * - Reference: gRPC-node official docs — "Using insecure credentials in
93
+ * production poses significant security risks including eavesdropping,
94
+ * MITM attacks, and lack of authentication."
95
+ */
96
+
97
+ interface LiopTlsOptions {
98
+ /** Path to the root CA certificate (PEM format) */
99
+ rootCert?: string;
100
+ /** Path to the server/client certificate (PEM format) */
101
+ certChain?: string;
102
+ /** Path to the private key (PEM format) */
103
+ privateKey?: string;
104
+ /** Require mutual TLS (mTLS): verify client certificate against root CA */
105
+ mutualTls?: boolean;
106
+ /** Optional CertManager instance for automated certificate management and hot reloading */
107
+ certManager?: CertManager;
108
+ }
109
+
110
+ /**
111
+ * LIOP Client
112
+ * High-level orchestration for discovery and execution in the Logic-Injection-on-Origin mesh.
113
+ */
114
+ declare class LiopClient {
115
+ private meshNode;
116
+ private rpcClients;
117
+ private manifests;
118
+ private tlsOptions?;
119
+ private serverInfo?;
120
+ verifier: LiopVerifier;
121
+ private oauthToken?;
122
+ /** Protocol negotiation era */
123
+ era: McpEra;
124
+ /** Negotiated protocol version */
125
+ protocolVersion: string;
126
+ constructor(tls?: LiopTlsOptions);
127
+ /**
128
+ * Requests an M2M access token from the Nexus Authorization Server using Client Credentials.
129
+ */
130
+ private acquireM2MToken;
131
+ /**
132
+ * Discovers and connects to the target server or mesh capability.
133
+ * If address is omitted, it sets up the MeshNode to act purely dynamically.
134
+ */
135
+ connect(address?: string, options?: {
136
+ meshConfig?: MeshNodeConfig;
137
+ auth?: {
138
+ clientId?: string;
139
+ clientSecret?: string;
140
+ nexusUrl?: string;
141
+ audience?: string;
142
+ scope?: string;
143
+ token?: string;
144
+ };
145
+ }): Promise<void>;
146
+ /**
147
+ * Selects the optimal IP from an array of multiaddrs.
148
+ * Prioritizes routable non-loopback IPv4 addresses (e.g. Docker bridge, LAN, WAN)
149
+ * over loopback (127.0.0.1) to prevent inter-container connection failures.
150
+ */
151
+ private selectOptimalIp;
152
+ /**
153
+ * Dynamically queries Kademlia DHT to find the optimal PeerID providing the Capability
154
+ * and returns the physical gRPC target (host:port) resolved from the provider's manifest.
155
+ */
156
+ resolveCapability(toolName: string): Promise<string>;
157
+ /**
158
+ * Probes a remote MCP endpoint using 'server/discover' to negotiate protocol era.
159
+ * Falls back to legacy initialize handshake if server/discover fails.
160
+ */
161
+ probeServerDiscover(mcpUrl: string): Promise<{
162
+ era: McpEra;
163
+ protocolVersion: string;
164
+ supportedVersions: string[];
165
+ }>;
166
+ /**
167
+ * Discovers remote capabilities via the LIOP Manifest Protocol.
168
+ * Utilizes a memory cache to avoid redundant network dials against live peers.
169
+ */
170
+ discoverTools(forceRefresh?: boolean): Promise<{
171
+ name: string;
172
+ description?: string;
173
+ }[]>;
174
+ /**
175
+ * Invokes a tool.
176
+ */
177
+ callTool(request: CallToolRequest, _wasmPayload?: Buffer): Promise<CallToolResult>;
178
+ private getOrCreateRpcClient;
179
+ /**
180
+ * Reads a specific resource by URI.
181
+ * In LIOP, resources can be static definitions or dynamic streams.
182
+ */
183
+ readResource(uri: string): Promise<{
184
+ contents: Array<{
185
+ uri: string;
186
+ mimeType?: string;
187
+ text: string;
188
+ }>;
189
+ }>;
190
+ getServerInfo(): {
191
+ name: string;
192
+ version: string;
193
+ } | undefined;
194
+ /**
195
+ * Destroys the active Mesh Node resources.
196
+ */
197
+ close(): Promise<void>;
198
+ }
199
+
200
+ export { type CertInfo as C, type LiopTlsOptions as L, CertManager as a, type CertManagerOptions as b, LiopClient as c };