@nekzus/liop 1.2.0-alpha.9 → 1.2.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/README.md +12 -3
- package/dist/bin/agent.js +222 -51
- package/dist/bridge/index.js +7 -6
- package/dist/bridge/stream.js +11 -11
- package/dist/client/index.js +46 -35
- package/dist/crypto/logic-image-id.d.ts +3 -0
- package/dist/crypto/logic-image-id.js +27 -0
- package/dist/crypto/verifier.js +7 -19
- package/dist/economy/estimator.d.ts +53 -0
- package/dist/economy/estimator.js +69 -0
- package/dist/economy/index.d.ts +5 -0
- package/dist/economy/index.js +3 -0
- package/dist/economy/otel.d.ts +38 -0
- package/dist/economy/otel.js +100 -0
- package/dist/economy/telemetry.d.ts +77 -0
- package/dist/economy/telemetry.js +224 -0
- package/dist/errors.d.ts +14 -0
- package/dist/errors.js +19 -0
- package/dist/gateway/hybrid.d.ts +3 -1
- package/dist/gateway/hybrid.js +38 -13
- package/dist/gateway/router.d.ts +25 -9
- package/dist/gateway/router.js +484 -133
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/mesh/node.d.ts +16 -0
- package/dist/mesh/node.js +394 -113
- package/dist/prompts/adapters.d.ts +16 -0
- package/dist/prompts/adapters.js +55 -0
- package/dist/rpc/proto.js +2 -1
- package/dist/rpc/server.d.ts +1 -1
- package/dist/rpc/server.js +4 -3
- package/dist/rpc/tls.js +3 -2
- package/dist/sandbox/wasi.d.ts +1 -1
- package/dist/sandbox/wasi.js +43 -3
- package/dist/security/guardian.js +3 -2
- package/dist/security/zk.d.ts +2 -3
- package/dist/security/zk.js +22 -9
- package/dist/server/index.d.ts +53 -4
- package/dist/server/index.js +362 -49
- package/dist/server/pii.d.ts +12 -0
- package/dist/server/pii.js +90 -0
- package/dist/types.d.ts +16 -0
- package/dist/utils/logger.d.ts +21 -0
- package/dist/utils/logger.js +70 -0
- package/dist/utils/mcpCompact.d.ts +11 -0
- package/dist/utils/mcpCompact.js +29 -0
- package/dist/workers/logic-execution.d.ts +1 -1
- package/dist/workers/logic-execution.js +38 -20
- package/dist/workers/zk-verifier.js +37 -33
- package/package.json +14 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export * from "./bridge/index.js";
|
|
2
2
|
export * from "./client/index.js";
|
|
3
|
+
export * from "./economy/index.js";
|
|
4
|
+
export * from "./errors.js";
|
|
3
5
|
export * from "./gateway/hybrid.js";
|
|
4
6
|
export * from "./mesh/node.js";
|
|
7
|
+
export * from "./prompts/adapters.js";
|
|
5
8
|
export * from "./rpc/client.js";
|
|
6
9
|
export * from "./rpc/server.js";
|
|
7
10
|
export * from "./sandbox/wasi.js";
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export * from "./bridge/index.js";
|
|
2
2
|
export * from "./client/index.js";
|
|
3
|
+
export * from "./economy/index.js";
|
|
4
|
+
export * from "./errors.js";
|
|
3
5
|
export * from "./gateway/hybrid.js";
|
|
4
6
|
export * from "./mesh/node.js";
|
|
7
|
+
export * from "./prompts/adapters.js";
|
|
5
8
|
export * from "./rpc/client.js";
|
|
6
9
|
export * from "./rpc/server.js";
|
|
7
10
|
export * from "./sandbox/wasi.js";
|
package/dist/mesh/node.d.ts
CHANGED
|
@@ -31,6 +31,10 @@ export interface MeshNodeConfig {
|
|
|
31
31
|
listenAddresses?: string[];
|
|
32
32
|
bootstrapNodes?: string[];
|
|
33
33
|
identityPath?: string;
|
|
34
|
+
enableWAN?: boolean;
|
|
35
|
+
dhtStoragePath?: string;
|
|
36
|
+
/** Optional function to translate multiaddrs (e.g. for Docker NAT traversal). Return null to drop an address. */
|
|
37
|
+
addressMapper?: (addr: string) => string | null;
|
|
34
38
|
}
|
|
35
39
|
/**
|
|
36
40
|
* P2P Mesh Node backed by libp2p + Kademlia DHT.
|
|
@@ -41,6 +45,10 @@ export interface MeshNodeConfig {
|
|
|
41
45
|
export declare class MeshNode {
|
|
42
46
|
private node;
|
|
43
47
|
private config;
|
|
48
|
+
private manifestDialFailureState;
|
|
49
|
+
private static readonly MANIFEST_DIAL_BASE_COOLDOWN_MS;
|
|
50
|
+
private static readonly MANIFEST_DIAL_MAX_COOLDOWN_MS;
|
|
51
|
+
private static readonly MANIFEST_DIAL_SKIP_LOG_THROTTLE_MS;
|
|
44
52
|
/**
|
|
45
53
|
* Buffer of capability hashes that have been announced.
|
|
46
54
|
* Used to re-announce capabilities when new peers connect
|
|
@@ -54,7 +62,12 @@ export declare class MeshNode {
|
|
|
54
62
|
private manifestProvider;
|
|
55
63
|
/** Flag to ensure the manifest protocol is only registered once. */
|
|
56
64
|
private manifestProtocolRegistered;
|
|
65
|
+
/** Local Ed25519 Private Key for protocol signatures */
|
|
66
|
+
private localPrivateKey;
|
|
57
67
|
constructor(config?: MeshNodeConfig);
|
|
68
|
+
private shouldSkipManifestDial;
|
|
69
|
+
private recordManifestDialFailure;
|
|
70
|
+
private clearManifestDialFailure;
|
|
58
71
|
/**
|
|
59
72
|
* Loads a persistent identity from disk or generates a new Ed25519 keypair.
|
|
60
73
|
* Uses privateKeyToProtobuf/privateKeyFromProtobuf (libp2p v3.x official API).
|
|
@@ -76,6 +89,8 @@ export declare class MeshNode {
|
|
|
76
89
|
private reannounceAll;
|
|
77
90
|
start(): Promise<void>;
|
|
78
91
|
stop(): Promise<void>;
|
|
92
|
+
private loadRoutingTable;
|
|
93
|
+
private saveRoutingTable;
|
|
79
94
|
/**
|
|
80
95
|
* Internal logic to register protocol handlers against the libp2p node.
|
|
81
96
|
* Can be called multiple times; handles idempotent registration.
|
|
@@ -106,6 +121,7 @@ export declare class MeshNode {
|
|
|
106
121
|
*/
|
|
107
122
|
getRoutingTableSize(): number;
|
|
108
123
|
getPeerId(): string;
|
|
124
|
+
sign(data: Uint8Array): Promise<Uint8Array>;
|
|
109
125
|
getMultiaddrs(): string[];
|
|
110
126
|
announceCapability(hash: string): Promise<void>;
|
|
111
127
|
findProviders(hash: string): Promise<string[]>;
|