@olane/o-node 0.7.34 → 0.7.36
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/dist/src/connection/interfaces/o-node-connection-manager.config.d.ts +0 -1
- package/dist/src/connection/interfaces/o-node-connection-manager.config.d.ts.map +1 -1
- package/dist/src/connection/interfaces/o-node-connection.config.d.ts +0 -5
- package/dist/src/connection/interfaces/o-node-connection.config.d.ts.map +1 -1
- package/dist/src/connection/o-node-connection.d.ts.map +1 -1
- package/dist/src/connection/o-node-connection.js +3 -10
- package/dist/src/connection/o-node-connection.manager.d.ts.map +1 -1
- package/dist/src/connection/o-node-connection.manager.js +0 -1
- package/dist/src/connection/stream-handler.config.d.ts +0 -13
- package/dist/src/connection/stream-handler.config.d.ts.map +1 -1
- package/dist/src/connection/stream-handler.d.ts +12 -36
- package/dist/src/connection/stream-handler.d.ts.map +1 -1
- package/dist/src/connection/stream-handler.js +56 -206
- package/dist/src/interfaces/o-node.config.d.ts +0 -7
- package/dist/src/interfaces/o-node.config.d.ts.map +1 -1
- package/dist/src/o-node.d.ts.map +1 -1
- package/dist/src/o-node.js +0 -1
- package/dist/src/o-node.tool.d.ts.map +1 -1
- package/dist/src/o-node.tool.js +1 -3
- package/dist/src/router/o-node.router.d.ts.map +1 -1
- package/dist/src/router/o-node.router.js +1 -1
- package/dist/src/utils/stream.utils.js +2 -2
- package/package.json +10 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o-node-connection-manager.config.d.ts","sourceRoot":"","sources":["../../../../src/connection/interfaces/o-node-connection-manager.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,WAAW,4BAA6B,SAAQ,wBAAwB;IAC5E,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"o-node-connection-manager.config.d.ts","sourceRoot":"","sources":["../../../../src/connection/interfaces/o-node-connection-manager.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,WAAW,4BAA6B,SAAQ,wBAAwB;IAC5E,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -3,10 +3,5 @@ import { oConnectionConfig } from '@olane/o-core';
|
|
|
3
3
|
export interface oNodeConnectionConfig extends oConnectionConfig {
|
|
4
4
|
p2pConnection: Connection;
|
|
5
5
|
runOnLimitedConnection?: boolean;
|
|
6
|
-
/**
|
|
7
|
-
* Enable length-prefixed streaming (libp2p v3 best practice)
|
|
8
|
-
* @default false (for backward compatibility)
|
|
9
|
-
*/
|
|
10
|
-
useLengthPrefixing?: boolean;
|
|
11
6
|
}
|
|
12
7
|
//# sourceMappingURL=o-node-connection.config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o-node-connection.config.d.ts","sourceRoot":"","sources":["../../../../src/connection/interfaces/o-node-connection.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,aAAa,EAAE,UAAU,CAAC;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"o-node-connection.config.d.ts","sourceRoot":"","sources":["../../../../src/connection/interfaces/o-node-connection.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,aAAa,EAAE,UAAU,CAAC;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o-node-connection.d.ts","sourceRoot":"","sources":["../../../src/connection/o-node-connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAEL,WAAW,EAGX,QAAQ,EACR,SAAS,EACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,qBAAa,eAAgB,SAAQ,WAAW;IAIlC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,qBAAqB;IAHrD,aAAa,EAAE,UAAU,CAAC;IACjC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;gBAER,MAAM,EAAE,qBAAqB;IAM5D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM;IAmBlB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"o-node-connection.d.ts","sourceRoot":"","sources":["../../../src/connection/o-node-connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAEL,WAAW,EAGX,QAAQ,EACR,SAAS,EACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,qBAAa,eAAgB,SAAQ,WAAW;IAIlC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,qBAAqB;IAHrD,aAAa,EAAE,UAAU,CAAC;IACjC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;gBAER,MAAM,EAAE,qBAAqB;IAM5D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM;IAmBlB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC;IAkBpC,QAAQ,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;IA6C/C,YAAY,CAAC,MAAM,EAAE,MAAM;IAQ3B,KAAK,CAAC,KAAK,EAAE,KAAK;IAMlB,KAAK;CAKZ"}
|
|
@@ -28,7 +28,6 @@ export class oNodeConnection extends oConnection {
|
|
|
28
28
|
runOnLimitedConnection: this.config.runOnLimitedConnection ?? true,
|
|
29
29
|
reusePolicy: 'none', // Default policy, can be overridden in subclasses
|
|
30
30
|
drainTimeoutMs: this.config.drainTimeoutMs,
|
|
31
|
-
useLengthPrefixing: this.config.useLengthPrefixing ?? true,
|
|
32
31
|
};
|
|
33
32
|
return this.streamHandler.getOrCreateStream(this.p2pConnection, this.nextHopAddress.protocol, streamConfig);
|
|
34
33
|
}
|
|
@@ -43,18 +42,12 @@ export class oNodeConnection extends oConnection {
|
|
|
43
42
|
signal: this.abortSignal,
|
|
44
43
|
drainTimeoutMs: this.config.drainTimeoutMs,
|
|
45
44
|
reusePolicy: 'none', // Default policy
|
|
46
|
-
useLengthPrefixing: this.config.useLengthPrefixing ?? true,
|
|
47
45
|
};
|
|
48
46
|
// Send the request with backpressure handling
|
|
49
47
|
const data = new TextEncoder().encode(request.toString());
|
|
50
|
-
//
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
await this.streamHandler.sendLengthPrefixed(stream, data, streamConfig);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
await this.streamHandler.send(stream, data, streamConfig);
|
|
57
|
-
}
|
|
48
|
+
// Send using length-prefixed encoding
|
|
49
|
+
this.logger.info('Sending length-prefixed message...');
|
|
50
|
+
await this.streamHandler.sendLengthPrefixed(stream, data, streamConfig);
|
|
58
51
|
// Handle response using StreamHandler
|
|
59
52
|
// Pass request handler if configured to enable bidirectional stream processing
|
|
60
53
|
// Pass request ID to enable proper response correlation on shared streams
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o-node-connection.manager.d.ts","sourceRoot":"","sources":["../../../src/connection/o-node-connection.manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAU,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAEhG,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGzD,qBAAa,sBAAuB,SAAQ,kBAAkB;IAQhD,QAAQ,CAAC,MAAM,EAAE,4BAA4B;IAPzD,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,oBAAoB,CAAC,CAAS;IACtC,OAAO,CAAC,qBAAqB,CAAC,CAAS;IACvC,OAAO,CAAC,yBAAyB,CAAsC;IACvE,OAAO,CAAC,0BAA0B,CACtB;gBAES,MAAM,EAAE,4BAA4B;IAWzD;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAsBhC;;;;;;OAMG;IACH,OAAO,CAAC,0BAA0B;IAiBlC;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAatB,qBAAqB,CACzB,cAAc,EAAE,QAAQ,EACxB,OAAO,EAAE,QAAQ,GAChB,OAAO,CAAC,UAAU,CAAC;YA+DR,WAAW;IAwBzB;;;;OAIG;IACG,OAAO,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"o-node-connection.manager.d.ts","sourceRoot":"","sources":["../../../src/connection/o-node-connection.manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,E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MAAM;CAgBlC"}
|
|
@@ -148,7 +148,6 @@ export class oNodeConnectionManager extends oConnectionManager {
|
|
|
148
148
|
isStream: config.isStream ?? false,
|
|
149
149
|
abortSignal: config.abortSignal,
|
|
150
150
|
runOnLimitedConnection: this.config.runOnLimitedConnection ?? false,
|
|
151
|
-
useLengthPrefixing: this.config.useLengthPrefixing,
|
|
152
151
|
requestHandler: config.requestHandler ?? undefined,
|
|
153
152
|
});
|
|
154
153
|
return connection;
|
|
@@ -34,19 +34,6 @@ export interface StreamHandlerConfig {
|
|
|
34
34
|
* AbortSignal for cancellation
|
|
35
35
|
*/
|
|
36
36
|
signal?: AbortSignal;
|
|
37
|
-
/**
|
|
38
|
-
* Enable length-prefixed streaming (libp2p v3 best practice)
|
|
39
|
-
* When enabled, all messages are prefixed with a varint indicating message length
|
|
40
|
-
* This provides proper message boundaries and eliminates concatenation issues
|
|
41
|
-
* @default false (for backward compatibility)
|
|
42
|
-
*/
|
|
43
|
-
useLengthPrefixing?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Auto-detect protocol (length-prefixed vs raw JSON)
|
|
46
|
-
* When enabled, automatically detects the protocol by examining first byte
|
|
47
|
-
* @default false
|
|
48
|
-
*/
|
|
49
|
-
autoDetectProtocol?: boolean;
|
|
50
37
|
}
|
|
51
38
|
/**
|
|
52
39
|
* Context for stream lifecycle operations
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream-handler.config.d.ts","sourceRoot":"","sources":["../../../src/connection/stream-handler.config.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEhC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"stream-handler.config.d.ts","sourceRoot":"","sources":["../../../src/connection/stream-handler.config.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEhC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,mBAAmB,CAAC;CAC7B"}
|
|
@@ -28,9 +28,18 @@ export declare class StreamHandler {
|
|
|
28
28
|
*/
|
|
29
29
|
isResponse(message: any): boolean;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Extracts and parses JSON from various formats including:
|
|
32
|
+
* - Already parsed objects
|
|
33
|
+
* - Plain JSON
|
|
34
|
+
* - Markdown code blocks (```json ... ``` or ``` ... ```)
|
|
35
|
+
* - Mixed content with explanatory text
|
|
36
|
+
* - JSON5 format (trailing commas, comments, unquoted keys, etc.)
|
|
37
|
+
*
|
|
38
|
+
* @param decoded - The decoded string that may contain JSON, or an already parsed object
|
|
39
|
+
* @returns Parsed JSON object
|
|
40
|
+
* @throws Error if JSON parsing fails even with JSON5 fallback
|
|
32
41
|
*/
|
|
33
|
-
|
|
42
|
+
private extractAndParseJSON;
|
|
34
43
|
/**
|
|
35
44
|
* Gets an existing open stream or creates a new one based on reuse policy
|
|
36
45
|
*
|
|
@@ -39,14 +48,6 @@ export declare class StreamHandler {
|
|
|
39
48
|
* @param config - Stream handler configuration
|
|
40
49
|
*/
|
|
41
50
|
getOrCreateStream(connection: Connection, protocol: string, config?: StreamHandlerConfig): Promise<Stream>;
|
|
42
|
-
/**
|
|
43
|
-
* Sends data through a stream with backpressure handling
|
|
44
|
-
*
|
|
45
|
-
* @param stream - The stream to send data through
|
|
46
|
-
* @param data - The data to send
|
|
47
|
-
* @param config - Configuration for timeout and other options
|
|
48
|
-
*/
|
|
49
|
-
send(stream: Stream, data: Uint8Array, config?: StreamHandlerConfig): Promise<void>;
|
|
50
51
|
/**
|
|
51
52
|
* Sends data through a stream using length-prefixed encoding (libp2p v3 best practice)
|
|
52
53
|
* Each message is automatically prefixed with a varint indicating the message length
|
|
@@ -73,25 +74,13 @@ export declare class StreamHandler {
|
|
|
73
74
|
* @param connection - The connection the stream belongs to
|
|
74
75
|
* @param toolExecutor - Function to execute tools for requests
|
|
75
76
|
*/
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Handles an incoming stream on the server side
|
|
79
|
-
* Attaches message listener immediately (libp2p v3 best practice)
|
|
80
|
-
* Routes requests or executes tools based on the message
|
|
81
|
-
*
|
|
82
|
-
* @param stream - The incoming stream
|
|
83
|
-
* @param connection - The connection the stream belongs to
|
|
84
|
-
* @param toolExecutor - Function to execute tools for requests
|
|
85
|
-
* @param config - Configuration to determine protocol handling
|
|
86
|
-
*/
|
|
87
|
-
handleIncomingStream(stream: Stream, connection: Connection, toolExecutor: (request: oRequest, stream: Stream) => Promise<RunResult>, config?: StreamHandlerConfig): Promise<void>;
|
|
77
|
+
handleIncomingStream(stream: Stream, connection: Connection, toolExecutor: (request: oRequest, stream: Stream) => Promise<RunResult>): Promise<void>;
|
|
88
78
|
/**
|
|
89
79
|
* Handles a request message by executing the tool and sending response
|
|
90
80
|
*
|
|
91
81
|
* @param message - The decoded request message
|
|
92
82
|
* @param stream - The stream to send the response on
|
|
93
83
|
* @param toolExecutor - Function to execute the tool
|
|
94
|
-
* @param useLengthPrefixing - Whether to use length-prefixed response encoding
|
|
95
84
|
*/
|
|
96
85
|
private handleRequestMessage;
|
|
97
86
|
/**
|
|
@@ -105,19 +94,6 @@ export declare class StreamHandler {
|
|
|
105
94
|
* @param requestId - Optional request ID to filter responses (for stream reuse scenarios)
|
|
106
95
|
* @returns Promise that resolves with the final response
|
|
107
96
|
*/
|
|
108
|
-
handleOutgoingStreamLP(stream: Stream, emitter: EventEmitter, config?: StreamHandlerConfig, requestHandler?: (request: oRequest, stream: Stream) => Promise<RunResult>, requestId?: string | number): Promise<oResponse>;
|
|
109
|
-
/**
|
|
110
|
-
* Handles an outgoing stream on the client side
|
|
111
|
-
* Listens for response messages and emits them via the event emitter
|
|
112
|
-
* If requestHandler is provided, also processes incoming router requests
|
|
113
|
-
*
|
|
114
|
-
* @param stream - The outgoing stream
|
|
115
|
-
* @param emitter - Event emitter for chunk events
|
|
116
|
-
* @param config - Configuration including abort signal
|
|
117
|
-
* @param requestHandler - Optional handler for processing router requests received on this stream
|
|
118
|
-
* @param requestId - Optional request ID to filter responses (for stream reuse scenarios)
|
|
119
|
-
* @returns Promise that resolves with the final response
|
|
120
|
-
*/
|
|
121
97
|
handleOutgoingStream(stream: Stream, emitter: EventEmitter, config?: StreamHandlerConfig, requestHandler?: (request: oRequest, stream: Stream) => Promise<RunResult>, requestId?: string | number): Promise<oResponse>;
|
|
122
98
|
/**
|
|
123
99
|
* Forwards a request to the next hop and relays response chunks back
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream-handler.d.ts","sourceRoot":"","sources":["../../../src/connection/stream-handler.ts"],"names":[],"mappings":";AAAA,OA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UAAU,EACtB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,mBAAwB,GAC/B,OAAO,CAAC,MAAM,CAAC;IAoClB;;;;;;;;OAQG;IACG,kBAAkB,CACtB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,UAAU,EAChB,MAAM,GAAE,mBAAwB,GAC/B,OAAO,CAAC,IAAI,CAAC;IAKhB;;;;;OAKG;IACG,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB5E;;;;;;;;OAQG;IACG,oBAAoB,CACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,GACtE,OAAO,CAAC,IAAI,CAAC;IA+BhB;;;;;;OAMG;YACW,oBAAoB;IA6BlC;;;;;;;;;;OAUG;IACG,oBAAoB,CACxB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,YAAY,EACrB,MAAM,GAAE,mBAAwB,EAChC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,EAC1E,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAC1B,OAAO,CAAC,SAAS,CAAC;IAkErB;;;;;;;OAOG;IACG,cAAc,CAClB,OAAO,EAAE,cAAc,EACvB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,GAChD,OAAO,CAAC,IAAI,CAAC;CAyBjB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oRequest, oResponse, CoreUtils, oError, oErrorCodes, Logger, ResponseBuilder, } from '@olane/o-core';
|
|
2
2
|
import { lpStream } from '@olane/o-config';
|
|
3
|
+
import JSON5 from 'json5';
|
|
3
4
|
/**
|
|
4
5
|
* StreamHandler centralizes all stream-related functionality including:
|
|
5
6
|
* - Message type detection (request vs response)
|
|
@@ -27,10 +28,48 @@ export class StreamHandler {
|
|
|
27
28
|
return message?.result !== undefined && message.method === undefined;
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
31
|
+
* Extracts and parses JSON from various formats including:
|
|
32
|
+
* - Already parsed objects
|
|
33
|
+
* - Plain JSON
|
|
34
|
+
* - Markdown code blocks (```json ... ``` or ``` ... ```)
|
|
35
|
+
* - Mixed content with explanatory text
|
|
36
|
+
* - JSON5 format (trailing commas, comments, unquoted keys, etc.)
|
|
37
|
+
*
|
|
38
|
+
* @param decoded - The decoded string that may contain JSON, or an already parsed object
|
|
39
|
+
* @returns Parsed JSON object
|
|
40
|
+
* @throws Error if JSON parsing fails even with JSON5 fallback
|
|
31
41
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
42
|
+
extractAndParseJSON(decoded) {
|
|
43
|
+
// If already an object (not a string), return it directly
|
|
44
|
+
if (typeof decoded !== 'string') {
|
|
45
|
+
return decoded;
|
|
46
|
+
}
|
|
47
|
+
let jsonString = decoded.trim();
|
|
48
|
+
// Attempt standard JSON.parse first
|
|
49
|
+
try {
|
|
50
|
+
return JSON.parse(jsonString);
|
|
51
|
+
}
|
|
52
|
+
catch (jsonError) {
|
|
53
|
+
this.logger.debug('Standard JSON parse failed, trying JSON5', {
|
|
54
|
+
error: jsonError.message,
|
|
55
|
+
position: jsonError.message.match(/position (\d+)/)?.[1],
|
|
56
|
+
preview: jsonString,
|
|
57
|
+
});
|
|
58
|
+
// Fallback to JSON5 for more relaxed parsing
|
|
59
|
+
try {
|
|
60
|
+
return JSON5.parse(jsonString);
|
|
61
|
+
}
|
|
62
|
+
catch (json5Error) {
|
|
63
|
+
// Enhanced error with context
|
|
64
|
+
this.logger.error('JSON5 parse also failed', {
|
|
65
|
+
originalError: jsonError.message,
|
|
66
|
+
json5Error: json5Error.message,
|
|
67
|
+
preview: jsonString.substring(0, 200),
|
|
68
|
+
length: jsonString.length,
|
|
69
|
+
});
|
|
70
|
+
throw new Error(`Failed to parse JSON: ${jsonError.message}\nJSON5 also failed: ${json5Error.message}\nPreview: ${jsonString.substring(0, 200)}${jsonString.length > 200 ? '...' : ''}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
34
73
|
}
|
|
35
74
|
/**
|
|
36
75
|
* Gets an existing open stream or creates a new one based on reuse policy
|
|
@@ -63,26 +102,6 @@ export class StreamHandler {
|
|
|
63
102
|
});
|
|
64
103
|
return stream;
|
|
65
104
|
}
|
|
66
|
-
/**
|
|
67
|
-
* Sends data through a stream with backpressure handling
|
|
68
|
-
*
|
|
69
|
-
* @param stream - The stream to send data through
|
|
70
|
-
* @param data - The data to send
|
|
71
|
-
* @param config - Configuration for timeout and other options
|
|
72
|
-
*/
|
|
73
|
-
async send(stream, data, config = {}) {
|
|
74
|
-
// Send the data with backpressure handling (libp2p v3 best practice)
|
|
75
|
-
const sent = stream.send(data);
|
|
76
|
-
// If send() returns false, buffer is full - wait for drain
|
|
77
|
-
if (!sent) {
|
|
78
|
-
this.logger.debug('Stream buffer full, waiting for drain...');
|
|
79
|
-
const drainTimeout = config.drainTimeoutMs ?? 30000;
|
|
80
|
-
await stream.onDrain({
|
|
81
|
-
signal: AbortSignal.timeout(drainTimeout),
|
|
82
|
-
});
|
|
83
|
-
this.logger.debug('Stream drained successfully');
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
105
|
/**
|
|
87
106
|
* Sends data through a stream using length-prefixed encoding (libp2p v3 best practice)
|
|
88
107
|
* Each message is automatically prefixed with a varint indicating the message length
|
|
@@ -127,20 +146,17 @@ export class StreamHandler {
|
|
|
127
146
|
* @param connection - The connection the stream belongs to
|
|
128
147
|
* @param toolExecutor - Function to execute tools for requests
|
|
129
148
|
*/
|
|
130
|
-
async
|
|
149
|
+
async handleIncomingStream(stream, connection, toolExecutor) {
|
|
131
150
|
const lp = lpStream(stream);
|
|
132
151
|
try {
|
|
133
152
|
while (stream.status === 'open') {
|
|
134
153
|
// Read complete length-prefixed message
|
|
135
154
|
const messageBytes = await lp.read();
|
|
136
155
|
const decoded = new TextDecoder().decode(messageBytes.subarray());
|
|
137
|
-
//
|
|
138
|
-
|
|
139
|
-
continue;
|
|
140
|
-
}
|
|
141
|
-
const message = JSON.parse(decoded);
|
|
156
|
+
// Parse JSON (handles markdown blocks, mixed content, and JSON5)
|
|
157
|
+
const message = this.extractAndParseJSON(decoded);
|
|
142
158
|
if (this.isRequest(message)) {
|
|
143
|
-
await this.handleRequestMessage(message, stream, toolExecutor
|
|
159
|
+
await this.handleRequestMessage(message, stream, toolExecutor);
|
|
144
160
|
}
|
|
145
161
|
else if (this.isResponse(message)) {
|
|
146
162
|
this.logger.warn('Received response message on server-side stream, ignoring', message);
|
|
@@ -157,63 +173,14 @@ export class StreamHandler {
|
|
|
157
173
|
}
|
|
158
174
|
}
|
|
159
175
|
}
|
|
160
|
-
/**
|
|
161
|
-
* Handles an incoming stream on the server side
|
|
162
|
-
* Attaches message listener immediately (libp2p v3 best practice)
|
|
163
|
-
* Routes requests or executes tools based on the message
|
|
164
|
-
*
|
|
165
|
-
* @param stream - The incoming stream
|
|
166
|
-
* @param connection - The connection the stream belongs to
|
|
167
|
-
* @param toolExecutor - Function to execute tools for requests
|
|
168
|
-
* @param config - Configuration to determine protocol handling
|
|
169
|
-
*/
|
|
170
|
-
async handleIncomingStream(stream, connection, toolExecutor, config = {}) {
|
|
171
|
-
// Route to length-prefixed handler if enabled
|
|
172
|
-
if (config.useLengthPrefixing) {
|
|
173
|
-
return this.handleIncomingStreamLP(stream, connection, toolExecutor);
|
|
174
|
-
}
|
|
175
|
-
// CRITICAL: Attach message listener immediately to prevent buffer overflow (libp2p v3)
|
|
176
|
-
const messageHandler = async (event) => {
|
|
177
|
-
try {
|
|
178
|
-
// avoid processing non-olane messages
|
|
179
|
-
if (!event.data) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
const message = await this.decodeMessage(event);
|
|
183
|
-
if (typeof message === 'string') {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
if (this.isRequest(message)) {
|
|
187
|
-
await this.handleRequestMessage(message, stream, toolExecutor);
|
|
188
|
-
}
|
|
189
|
-
else if (this.isResponse(message)) {
|
|
190
|
-
this.logger.warn('Received response message on server-side stream, ignoring', message);
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
this.logger.warn('Received unknown message type', message);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
catch (error) {
|
|
197
|
-
this.logger.error('Error handling stream message:', error);
|
|
198
|
-
// Error already logged, stream will be closed by remote peer or timeout
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
const closeHandler = () => {
|
|
202
|
-
stream.removeEventListener('message', messageHandler);
|
|
203
|
-
stream.removeEventListener('close', closeHandler);
|
|
204
|
-
};
|
|
205
|
-
stream.addEventListener('message', messageHandler);
|
|
206
|
-
stream.addEventListener('close', closeHandler);
|
|
207
|
-
}
|
|
208
176
|
/**
|
|
209
177
|
* Handles a request message by executing the tool and sending response
|
|
210
178
|
*
|
|
211
179
|
* @param message - The decoded request message
|
|
212
180
|
* @param stream - The stream to send the response on
|
|
213
181
|
* @param toolExecutor - Function to execute the tool
|
|
214
|
-
* @param useLengthPrefixing - Whether to use length-prefixed response encoding
|
|
215
182
|
*/
|
|
216
|
-
async handleRequestMessage(message, stream, toolExecutor
|
|
183
|
+
async handleRequestMessage(message, stream, toolExecutor) {
|
|
217
184
|
const request = new oRequest(message);
|
|
218
185
|
const responseBuilder = ResponseBuilder.create();
|
|
219
186
|
try {
|
|
@@ -222,25 +189,13 @@ export class StreamHandler {
|
|
|
222
189
|
// );
|
|
223
190
|
const result = await toolExecutor(request, stream);
|
|
224
191
|
const response = await responseBuilder.build(request, result, null);
|
|
225
|
-
|
|
226
|
-
if (useLengthPrefixing) {
|
|
227
|
-
await CoreUtils.sendResponseLP(response, stream);
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
await CoreUtils.sendResponse(response, stream);
|
|
231
|
-
}
|
|
192
|
+
await CoreUtils.sendResponse(response, stream);
|
|
232
193
|
this.logger.debug(`Successfully processed request: method=${request.method}, id=${request.id}`);
|
|
233
194
|
}
|
|
234
195
|
catch (error) {
|
|
235
196
|
this.logger.error(`Error processing request: method=${request.method}, id=${request.id}`, error);
|
|
236
197
|
const errorResponse = await responseBuilder.buildError(request, error);
|
|
237
|
-
|
|
238
|
-
if (useLengthPrefixing) {
|
|
239
|
-
await CoreUtils.sendResponseLP(errorResponse, stream);
|
|
240
|
-
}
|
|
241
|
-
else {
|
|
242
|
-
await CoreUtils.sendResponse(errorResponse, stream);
|
|
243
|
-
}
|
|
198
|
+
await CoreUtils.sendResponse(errorResponse, stream);
|
|
244
199
|
}
|
|
245
200
|
}
|
|
246
201
|
/**
|
|
@@ -254,18 +209,17 @@ export class StreamHandler {
|
|
|
254
209
|
* @param requestId - Optional request ID to filter responses (for stream reuse scenarios)
|
|
255
210
|
* @returns Promise that resolves with the final response
|
|
256
211
|
*/
|
|
257
|
-
async
|
|
212
|
+
async handleOutgoingStream(stream, emitter, config = {}, requestHandler, requestId) {
|
|
258
213
|
const lp = lpStream(stream);
|
|
259
214
|
try {
|
|
260
215
|
while (stream.status === 'open') {
|
|
216
|
+
this.logger.debug('Waiting for response...');
|
|
261
217
|
// Read complete length-prefixed message
|
|
262
218
|
const messageBytes = await lp.read({ signal: config.signal });
|
|
263
219
|
const decoded = new TextDecoder().decode(messageBytes.subarray());
|
|
264
|
-
//
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}
|
|
268
|
-
const message = JSON.parse(decoded);
|
|
220
|
+
// Parse JSON (handles markdown blocks, mixed content, and JSON5)
|
|
221
|
+
this.logger.debug('handleOutgoing raw decoded:', decoded);
|
|
222
|
+
const message = this.extractAndParseJSON(decoded);
|
|
269
223
|
if (this.isResponse(message)) {
|
|
270
224
|
const response = new oResponse({
|
|
271
225
|
...message.result,
|
|
@@ -287,7 +241,7 @@ export class StreamHandler {
|
|
|
287
241
|
// Process incoming router requests if handler is provided
|
|
288
242
|
if (requestHandler) {
|
|
289
243
|
this.logger.debug('Received router request on client-side stream, processing...', message);
|
|
290
|
-
await this.handleRequestMessage(message, stream, requestHandler
|
|
244
|
+
await this.handleRequestMessage(message, stream, requestHandler);
|
|
291
245
|
}
|
|
292
246
|
else {
|
|
293
247
|
this.logger.warn('Received request message on client-side stream, ignoring (no handler)', message);
|
|
@@ -306,110 +260,6 @@ export class StreamHandler {
|
|
|
306
260
|
throw error;
|
|
307
261
|
}
|
|
308
262
|
}
|
|
309
|
-
/**
|
|
310
|
-
* Handles an outgoing stream on the client side
|
|
311
|
-
* Listens for response messages and emits them via the event emitter
|
|
312
|
-
* If requestHandler is provided, also processes incoming router requests
|
|
313
|
-
*
|
|
314
|
-
* @param stream - The outgoing stream
|
|
315
|
-
* @param emitter - Event emitter for chunk events
|
|
316
|
-
* @param config - Configuration including abort signal
|
|
317
|
-
* @param requestHandler - Optional handler for processing router requests received on this stream
|
|
318
|
-
* @param requestId - Optional request ID to filter responses (for stream reuse scenarios)
|
|
319
|
-
* @returns Promise that resolves with the final response
|
|
320
|
-
*/
|
|
321
|
-
async handleOutgoingStream(stream, emitter, config = {}, requestHandler, requestId) {
|
|
322
|
-
// Route to length-prefixed handler if enabled
|
|
323
|
-
if (config.useLengthPrefixing) {
|
|
324
|
-
return this.handleOutgoingStreamLP(stream, emitter, config, requestHandler, requestId);
|
|
325
|
-
}
|
|
326
|
-
return new Promise((resolve, reject) => {
|
|
327
|
-
let lastResponse;
|
|
328
|
-
const messageHandler = async (event) => {
|
|
329
|
-
// avoid processing non-olane messages
|
|
330
|
-
if (!event.data) {
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
try {
|
|
334
|
-
const message = await this.decodeMessage(event);
|
|
335
|
-
if (typeof message === 'string') {
|
|
336
|
-
// this.logger.warn(
|
|
337
|
-
// 'Received string message on server-side stream, ignoring',
|
|
338
|
-
// message,
|
|
339
|
-
// );
|
|
340
|
-
return;
|
|
341
|
-
}
|
|
342
|
-
if (this.isResponse(message)) {
|
|
343
|
-
const response = await CoreUtils.processStreamResponse(event);
|
|
344
|
-
// If requestId is provided, filter responses to only process those matching our request
|
|
345
|
-
// This prevents premature termination when multiple requests share the same stream
|
|
346
|
-
if (requestId !== undefined && response.id !== requestId) {
|
|
347
|
-
this.logger.debug(`Ignoring response for different request (expected: ${requestId}, received: ${response.id})`);
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
// Emit chunk for streaming responses
|
|
351
|
-
emitter.emit('chunk', response);
|
|
352
|
-
// Check if this is the last chunk for THIS request
|
|
353
|
-
if (response.result._last || !response.result._isStreaming) {
|
|
354
|
-
lastResponse = response;
|
|
355
|
-
cleanup();
|
|
356
|
-
resolve(response);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
else if (this.isRequest(message)) {
|
|
360
|
-
// Process incoming router requests if handler is provided
|
|
361
|
-
if (requestHandler) {
|
|
362
|
-
this.logger.debug('Received router request on client-side stream, processing...', message);
|
|
363
|
-
await this.handleRequestMessage(message, stream, requestHandler);
|
|
364
|
-
}
|
|
365
|
-
else {
|
|
366
|
-
this.logger.warn('Received request message on client-side stream, ignoring (no handler)', message);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
else {
|
|
370
|
-
this.logger.warn('Received unknown message type', message);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
catch (error) {
|
|
374
|
-
this.logger.error('Error handling response message:', error);
|
|
375
|
-
cleanup();
|
|
376
|
-
reject(error);
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
const closeHandler = () => {
|
|
380
|
-
cleanup();
|
|
381
|
-
if (lastResponse) {
|
|
382
|
-
resolve(lastResponse);
|
|
383
|
-
}
|
|
384
|
-
else {
|
|
385
|
-
reject(new oError(oErrorCodes.TIMEOUT, 'Stream closed before response received'));
|
|
386
|
-
}
|
|
387
|
-
};
|
|
388
|
-
const abortHandler = () => {
|
|
389
|
-
this.logger.debug('Request aborted');
|
|
390
|
-
cleanup();
|
|
391
|
-
try {
|
|
392
|
-
stream.abort(new Error('Request aborted'));
|
|
393
|
-
}
|
|
394
|
-
catch (error) {
|
|
395
|
-
this.logger.debug('Error aborting stream:', error.message);
|
|
396
|
-
}
|
|
397
|
-
reject(new oError(oErrorCodes.TIMEOUT, 'Request aborted'));
|
|
398
|
-
};
|
|
399
|
-
const cleanup = () => {
|
|
400
|
-
stream.removeEventListener('message', messageHandler);
|
|
401
|
-
stream.removeEventListener('close', closeHandler);
|
|
402
|
-
if (config.signal) {
|
|
403
|
-
config.signal.removeEventListener('abort', abortHandler);
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
stream.addEventListener('message', messageHandler);
|
|
407
|
-
stream.addEventListener('close', closeHandler);
|
|
408
|
-
if (config.signal) {
|
|
409
|
-
config.signal.addEventListener('abort', abortHandler);
|
|
410
|
-
}
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
263
|
/**
|
|
414
264
|
* Forwards a request to the next hop and relays response chunks back
|
|
415
265
|
* This implements the middleware/proxy pattern for intermediate nodes
|
|
@@ -425,7 +275,7 @@ export class StreamHandler {
|
|
|
425
275
|
// Set up chunk relay - forward responses from next hop back to incoming stream
|
|
426
276
|
nextHopConnection.onChunk(async (response) => {
|
|
427
277
|
try {
|
|
428
|
-
await CoreUtils.
|
|
278
|
+
await CoreUtils.sendResponse(response, incomingStream);
|
|
429
279
|
}
|
|
430
280
|
catch (error) {
|
|
431
281
|
this.logger.error('Error forwarding chunk:', error);
|
|
@@ -32,12 +32,5 @@ export interface oNodeConfig extends oCoreConfig {
|
|
|
32
32
|
drainTimeoutMs?: number;
|
|
33
33
|
};
|
|
34
34
|
runOnLimitedConnection?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Enable length-prefixed streaming (libp2p v3 best practice)
|
|
37
|
-
* When enabled, all messages are prefixed with a varint indicating message length
|
|
38
|
-
* This provides proper message boundaries and eliminates concatenation issues
|
|
39
|
-
* @default false (for backward compatibility)
|
|
40
|
-
*/
|
|
41
|
-
useLengthPrefixing?: boolean;
|
|
42
35
|
}
|
|
43
36
|
//# sourceMappingURL=o-node.config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o-node.config.d.ts","sourceRoot":"","sources":["../../../src/interfaces/o-node.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAE5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE;QACpB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IAEF;;;OAGG;IACH,kBAAkB,CAAC,EAAE;QACnB;;;WAGG;QACH,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IAEF,sBAAsB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"o-node.config.d.ts","sourceRoot":"","sources":["../../../src/interfaces/o-node.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,MAAM,WAAW,WAAY,SAAQ,WAAW;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AAG,CAAC;IAG1D;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC;cA8HxB,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAMvC,OAAO,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC;IAsBhE,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;cAU5B,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IAavD,cAAc,CAAC,EAAE,EAAE,QAAQ;IAI3B,eAAe,CAAC,EAAE,EAAE,QAAQ;cAIZ,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAgClD;;;;OAIG;YACW,wBAAwB;IA2BtC;;;;;;OAMG;cACa,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAInC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IA6DjC;;OAEG;IAiBG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAgB/B;;;OAGG;IACH,SAAS,CAAC,UAAU,IAAI,IAAI;IAgC5B,UAAU,IAAI,YAAY,EAAE;IAI5B,UAAU,IAAI,YAAY,EAAE;IAI5B,WAAW,IAAI,YAAY,EAAE;IAI7B,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAI7C;;;OAGG;IACH,cAAc,IAAI,MAAM;IAUxB;;;OAGG;IACG,wBAAwB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;CAwEhE"}
|
package/dist/src/o-node.js
CHANGED
|
@@ -353,7 +353,6 @@ export class oNode extends oToolBase {
|
|
|
353
353
|
defaultDrainTimeoutMs: this.config.connectionTimeouts?.drainTimeoutMs,
|
|
354
354
|
runOnLimitedConnection: this.config.runOnLimitedConnection ?? false,
|
|
355
355
|
originAddress: this.address?.value,
|
|
356
|
-
useLengthPrefixing: this.config.useLengthPrefixing ?? true,
|
|
357
356
|
});
|
|
358
357
|
}
|
|
359
358
|
async hookInitializeFinished() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o-node.tool.d.ts","sourceRoot":"","sources":["../../src/o-node.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAoB,MAAM,eAAe,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;;AAKrD;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,cAAkB;IAC/C,OAAO,CAAC,aAAa,CAAiB;IAEhC,cAAc,CAAC,OAAO,EAAE,QAAQ;IAehC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAY3B,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"o-node.tool.d.ts","sourceRoot":"","sources":["../../src/o-node.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAoB,MAAM,eAAe,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;;AAKrD;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,cAAkB;IAC/C,OAAO,CAAC,aAAa,CAAiB;IAEhC,cAAc,CAAC,OAAO,EAAE,QAAQ;IAehC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAY3B,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBnE,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC;IAQ9B,oBAAoB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;CAiC5D"}
|
package/dist/src/o-node.tool.js
CHANGED
|
@@ -35,7 +35,7 @@ export class oNodeTool extends oTool(oServerNode) {
|
|
|
35
35
|
}
|
|
36
36
|
async handleStream(stream, connection) {
|
|
37
37
|
// Use StreamHandler for consistent stream handling
|
|
38
|
-
// This follows libp2p v3 best practices for
|
|
38
|
+
// This follows libp2p v3 best practices for length-prefixed streaming
|
|
39
39
|
await this.streamHandler.handleIncomingStream(stream, connection, async (request, stream) => {
|
|
40
40
|
try {
|
|
41
41
|
const result = await this.execute(request, stream);
|
|
@@ -46,8 +46,6 @@ export class oNodeTool extends oTool(oServerNode) {
|
|
|
46
46
|
this.logger.error('Error executing tool: ', request.toString(), error, typeof error);
|
|
47
47
|
throw error; // StreamHandler will handle error response building
|
|
48
48
|
}
|
|
49
|
-
}, {
|
|
50
|
-
useLengthPrefixing: this.config.useLengthPrefixing ?? true,
|
|
51
49
|
});
|
|
52
50
|
}
|
|
53
51
|
async _tool_identify() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o-node.router.d.ts","sourceRoot":"","sources":["../../../src/router/o-node.router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAML,cAAc,EAGd,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAM5C,qBAAa,WAAY,SAAQ,WAAW;IAC1C,OAAO,CAAC,aAAa,CAAqB;;IAO1C;;;;;;;;OAQG;cACa,OAAO,CACrB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,GAAG,CAAC;IA6Bf;;;OAGG;YACW,kBAAkB;IA8DhC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAS5B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAWhC;;OAEG;YACW,eAAe;
|
|
1
|
+
{"version":3,"file":"o-node.router.d.ts","sourceRoot":"","sources":["../../../src/router/o-node.router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAML,cAAc,EAGd,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAM5C,qBAAa,WAAY,SAAQ,WAAW;IAC1C,OAAO,CAAC,aAAa,CAAqB;;IAO1C;;;;;;;;OAQG;cACa,OAAO,CACrB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,GAAG,CAAC;IA6Bf;;;OAGG;YACW,kBAAkB;IA8DhC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAS5B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAWhC;;OAEG;YACW,eAAe;IA4C7B;;;OAGG;IACG,SAAS,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,aAAa,CAAC;IA+B3E;;;OAGG;IACH,UAAU,CAAC,qBAAqB,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,GAAG,OAAO;CAGtE"}
|
|
@@ -132,7 +132,7 @@ export class oNodeRouter extends oToolRouter {
|
|
|
132
132
|
throw new oError(oErrorCodes.INVALID_REQUEST, 'Stream is required');
|
|
133
133
|
}
|
|
134
134
|
nodeConnection.onChunk(async (response) => {
|
|
135
|
-
CoreUtils.
|
|
135
|
+
CoreUtils.sendResponse(response, routeRequest.stream);
|
|
136
136
|
});
|
|
137
137
|
// allow this to continue as we will tell the transmitter to stream the response and we will intercept via the above listener
|
|
138
138
|
}
|
|
@@ -12,7 +12,7 @@ export class StreamUtils extends oObject {
|
|
|
12
12
|
aggregatedResult += result.delta;
|
|
13
13
|
}
|
|
14
14
|
const chunkResponse = await responseBuilder.buildChunk(request, result);
|
|
15
|
-
await CoreUtils.
|
|
15
|
+
await CoreUtils.sendResponse(chunkResponse, stream);
|
|
16
16
|
}
|
|
17
17
|
return {
|
|
18
18
|
message: aggregatedResult,
|
|
@@ -24,7 +24,7 @@ export class StreamUtils extends oObject {
|
|
|
24
24
|
isStream: true,
|
|
25
25
|
isLast: true,
|
|
26
26
|
});
|
|
27
|
-
await CoreUtils.
|
|
27
|
+
await CoreUtils.sendResponse(errorResponse, stream);
|
|
28
28
|
throw error;
|
|
29
29
|
}
|
|
30
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olane/o-node",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.36",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -40,9 +40,10 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@eslint/eslintrc": "^3.3.1",
|
|
42
42
|
"@eslint/js": "^9.29.0",
|
|
43
|
-
"@olane/o-test": "0.7.
|
|
43
|
+
"@olane/o-test": "0.7.36",
|
|
44
44
|
"@tsconfig/node20": "^20.1.6",
|
|
45
45
|
"@types/jest": "^30.0.0",
|
|
46
|
+
"@types/json5": "^2.2.0",
|
|
46
47
|
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
47
48
|
"@typescript-eslint/parser": "^8.34.1",
|
|
48
49
|
"aegir": "^47.0.21",
|
|
@@ -59,12 +60,13 @@
|
|
|
59
60
|
"typescript": "5.4.5"
|
|
60
61
|
},
|
|
61
62
|
"dependencies": {
|
|
62
|
-
"@olane/o-config": "0.7.
|
|
63
|
-
"@olane/o-core": "0.7.
|
|
64
|
-
"@olane/o-protocol": "0.7.
|
|
65
|
-
"@olane/o-tool": "0.7.
|
|
63
|
+
"@olane/o-config": "0.7.36",
|
|
64
|
+
"@olane/o-core": "0.7.36",
|
|
65
|
+
"@olane/o-protocol": "0.7.36",
|
|
66
|
+
"@olane/o-tool": "0.7.36",
|
|
66
67
|
"debug": "^4.4.1",
|
|
67
|
-
"dotenv": "^16.5.0"
|
|
68
|
+
"dotenv": "^16.5.0",
|
|
69
|
+
"json5": "^2.2.3"
|
|
68
70
|
},
|
|
69
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "26de81c453581221d62335b72f19a507bd537482"
|
|
70
72
|
}
|