@aigne/transport 0.15.0 → 0.15.2
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.15.2](https://github.com/AIGNE-io/aigne-framework/compare/transport-v0.15.1...transport-v0.15.2) (2025-09-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* The following workspace dependencies were updated
|
|
9
|
+
* dependencies
|
|
10
|
+
* @aigne/openai bumped to 0.14.2
|
|
11
|
+
* devDependencies
|
|
12
|
+
* @aigne/agent-library bumped to 1.21.39
|
|
13
|
+
* @aigne/core bumped to 1.58.2
|
|
14
|
+
* @aigne/default-memory bumped to 1.2.2
|
|
15
|
+
* @aigne/test-utils bumped to 0.5.46
|
|
16
|
+
|
|
17
|
+
## [0.15.1](https://github.com/AIGNE-io/aigne-framework/compare/transport-v0.15.0...transport-v0.15.1) (2025-09-05)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Dependencies
|
|
21
|
+
|
|
22
|
+
* The following workspace dependencies were updated
|
|
23
|
+
* dependencies
|
|
24
|
+
* @aigne/openai bumped to 0.14.1
|
|
25
|
+
* devDependencies
|
|
26
|
+
* @aigne/agent-library bumped to 1.21.38
|
|
27
|
+
* @aigne/core bumped to 1.58.1
|
|
28
|
+
* @aigne/default-memory bumped to 1.2.1
|
|
29
|
+
* @aigne/test-utils bumped to 0.5.45
|
|
30
|
+
|
|
3
31
|
## [0.15.0](https://github.com/AIGNE-io/aigne-framework/compare/transport-v0.14.16...transport-v0.15.0) (2025-09-05)
|
|
4
32
|
|
|
5
33
|
|
|
@@ -94,7 +94,6 @@ export interface AIGNEHTTPServerOptions {
|
|
|
94
94
|
maximumBodySize?: string;
|
|
95
95
|
}
|
|
96
96
|
export interface AIGNEHTTPServerInvokeOptions<U extends UserContext = UserContext> extends Pick<InvokeOptions<U>, "returnProgressChunks" | "userContext" | "memories" | "hooks"> {
|
|
97
|
-
onError?: (error: Error) => void;
|
|
98
97
|
}
|
|
99
98
|
/**
|
|
100
99
|
* AIGNEHTTPServer provides HTTP API access to AIGNE capabilities.
|
|
@@ -180,10 +179,7 @@ export declare class AIGNEHTTPServer {
|
|
|
180
179
|
*
|
|
181
180
|
* @param response - The web standard Response object to write
|
|
182
181
|
* @param res - The Node.js ServerResponse to write to
|
|
183
|
-
* @param callbacks - Optional callbacks for error and end events
|
|
184
182
|
* @private
|
|
185
183
|
*/
|
|
186
|
-
_writeResponse(response: Response, res: ServerResponse
|
|
187
|
-
onError?: AIGNEHTTPServerInvokeOptions["onError"];
|
|
188
|
-
}): Promise<void>;
|
|
184
|
+
_writeResponse(response: Response, res: ServerResponse): Promise<void>;
|
|
189
185
|
}
|
|
@@ -85,7 +85,7 @@ class AIGNEHTTPServer {
|
|
|
85
85
|
hooks: opts?.hooks,
|
|
86
86
|
});
|
|
87
87
|
if (response instanceof node_http_1.ServerResponse) {
|
|
88
|
-
await this._writeResponse(result, response
|
|
88
|
+
await this._writeResponse(result, response);
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
return result;
|
|
@@ -186,10 +186,9 @@ class AIGNEHTTPServer {
|
|
|
186
186
|
*
|
|
187
187
|
* @param response - The web standard Response object to write
|
|
188
188
|
* @param res - The Node.js ServerResponse to write to
|
|
189
|
-
* @param callbacks - Optional callbacks for error and end events
|
|
190
189
|
* @private
|
|
191
190
|
*/
|
|
192
|
-
async _writeResponse(response, res
|
|
191
|
+
async _writeResponse(response, res) {
|
|
193
192
|
try {
|
|
194
193
|
res.writeHead(response.status, Object.fromEntries(response.headers.entries()));
|
|
195
194
|
res.flushHeaders();
|
|
@@ -204,7 +203,6 @@ class AIGNEHTTPServer {
|
|
|
204
203
|
}
|
|
205
204
|
}
|
|
206
205
|
catch (error) {
|
|
207
|
-
hooks?.onError?.(error);
|
|
208
206
|
if (!res.headersSent) {
|
|
209
207
|
res.writeHead(error instanceof error_js_1.ServerError ? error.status : 500, {
|
|
210
208
|
"Content-Type": "application/json",
|
|
@@ -94,7 +94,6 @@ export interface AIGNEHTTPServerOptions {
|
|
|
94
94
|
maximumBodySize?: string;
|
|
95
95
|
}
|
|
96
96
|
export interface AIGNEHTTPServerInvokeOptions<U extends UserContext = UserContext> extends Pick<InvokeOptions<U>, "returnProgressChunks" | "userContext" | "memories" | "hooks"> {
|
|
97
|
-
onError?: (error: Error) => void;
|
|
98
97
|
}
|
|
99
98
|
/**
|
|
100
99
|
* AIGNEHTTPServer provides HTTP API access to AIGNE capabilities.
|
|
@@ -180,10 +179,7 @@ export declare class AIGNEHTTPServer {
|
|
|
180
179
|
*
|
|
181
180
|
* @param response - The web standard Response object to write
|
|
182
181
|
* @param res - The Node.js ServerResponse to write to
|
|
183
|
-
* @param callbacks - Optional callbacks for error and end events
|
|
184
182
|
* @private
|
|
185
183
|
*/
|
|
186
|
-
_writeResponse(response: Response, res: ServerResponse
|
|
187
|
-
onError?: AIGNEHTTPServerInvokeOptions["onError"];
|
|
188
|
-
}): Promise<void>;
|
|
184
|
+
_writeResponse(response: Response, res: ServerResponse): Promise<void>;
|
|
189
185
|
}
|
|
@@ -94,7 +94,6 @@ export interface AIGNEHTTPServerOptions {
|
|
|
94
94
|
maximumBodySize?: string;
|
|
95
95
|
}
|
|
96
96
|
export interface AIGNEHTTPServerInvokeOptions<U extends UserContext = UserContext> extends Pick<InvokeOptions<U>, "returnProgressChunks" | "userContext" | "memories" | "hooks"> {
|
|
97
|
-
onError?: (error: Error) => void;
|
|
98
97
|
}
|
|
99
98
|
/**
|
|
100
99
|
* AIGNEHTTPServer provides HTTP API access to AIGNE capabilities.
|
|
@@ -180,10 +179,7 @@ export declare class AIGNEHTTPServer {
|
|
|
180
179
|
*
|
|
181
180
|
* @param response - The web standard Response object to write
|
|
182
181
|
* @param res - The Node.js ServerResponse to write to
|
|
183
|
-
* @param callbacks - Optional callbacks for error and end events
|
|
184
182
|
* @private
|
|
185
183
|
*/
|
|
186
|
-
_writeResponse(response: Response, res: ServerResponse
|
|
187
|
-
onError?: AIGNEHTTPServerInvokeOptions["onError"];
|
|
188
|
-
}): Promise<void>;
|
|
184
|
+
_writeResponse(response: Response, res: ServerResponse): Promise<void>;
|
|
189
185
|
}
|
|
@@ -79,7 +79,7 @@ export class AIGNEHTTPServer {
|
|
|
79
79
|
hooks: opts?.hooks,
|
|
80
80
|
});
|
|
81
81
|
if (response instanceof ServerResponse) {
|
|
82
|
-
await this._writeResponse(result, response
|
|
82
|
+
await this._writeResponse(result, response);
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
85
|
return result;
|
|
@@ -180,10 +180,9 @@ export class AIGNEHTTPServer {
|
|
|
180
180
|
*
|
|
181
181
|
* @param response - The web standard Response object to write
|
|
182
182
|
* @param res - The Node.js ServerResponse to write to
|
|
183
|
-
* @param callbacks - Optional callbacks for error and end events
|
|
184
183
|
* @private
|
|
185
184
|
*/
|
|
186
|
-
async _writeResponse(response, res
|
|
185
|
+
async _writeResponse(response, res) {
|
|
187
186
|
try {
|
|
188
187
|
res.writeHead(response.status, Object.fromEntries(response.headers.entries()));
|
|
189
188
|
res.flushHeaders();
|
|
@@ -198,7 +197,6 @@ export class AIGNEHTTPServer {
|
|
|
198
197
|
}
|
|
199
198
|
}
|
|
200
199
|
catch (error) {
|
|
201
|
-
hooks?.onError?.(error);
|
|
202
200
|
if (!res.headersSent) {
|
|
203
201
|
res.writeHead(error instanceof ServerError ? error.status : 500, {
|
|
204
202
|
"Content-Type": "application/json",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/transport",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "AIGNE Transport SDK providing HTTP client and server implementations for communication between AIGNE components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"p-retry": "^6.2.1",
|
|
47
47
|
"raw-body": "^3.0.0",
|
|
48
48
|
"zod": "^3.25.67",
|
|
49
|
-
"@aigne/openai": "^0.14.
|
|
49
|
+
"@aigne/openai": "^0.14.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/bun": "^1.2.18",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"rimraf": "^6.0.1",
|
|
62
62
|
"typescript": "^5.8.3",
|
|
63
63
|
"uuid": "^11.1.0",
|
|
64
|
-
"@aigne/
|
|
65
|
-
"@aigne/
|
|
66
|
-
"@aigne/
|
|
67
|
-
"@aigne/
|
|
64
|
+
"@aigne/default-memory": "^1.2.2",
|
|
65
|
+
"@aigne/test-utils": "^0.5.46",
|
|
66
|
+
"@aigne/agent-library": "^1.21.39",
|
|
67
|
+
"@aigne/core": "^1.58.2"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"lint": "tsc --noEmit",
|