@axiom-lattice/gateway 2.1.47 → 2.1.48
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +11 -0
- package/dist/index.js +13 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/controllers/memory.ts +9 -1
- package/src/controllers/run.ts +5 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/gateway@2.1.
|
|
2
|
+
> @axiom-lattice/gateway@2.1.48 build /home/runner/work/agentic/agentic/packages/gateway
|
|
3
3
|
> tsup src/index.ts --format cjs,esm --dts --clean --sourcemap
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
[34mCLI[39m Cleaning output folder
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
12
|
+
[32mCJS[39m [1mdist/index.js [22m[32m168.46 KB[39m
|
|
13
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m359.44 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 322ms
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m165.00 KB[39m
|
|
16
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m359.85 KB[39m
|
|
17
|
+
[32mESM[39m ⚡️ Build success in 321ms
|
|
18
18
|
[34mDTS[39m Build start
|
|
19
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
+
[32mDTS[39m ⚡️ Build success in 9889ms
|
|
20
20
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.76 KB[39m
|
|
21
21
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.76 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @axiom-lattice/gateway
|
|
2
2
|
|
|
3
|
+
## 2.1.48
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9a4f338: update sse
|
|
8
|
+
- Updated dependencies [9a4f338]
|
|
9
|
+
- @axiom-lattice/protocols@2.1.23
|
|
10
|
+
- @axiom-lattice/core@2.1.42
|
|
11
|
+
- @axiom-lattice/pg-stores@1.0.32
|
|
12
|
+
- @axiom-lattice/queue-redis@1.0.22
|
|
13
|
+
|
|
3
14
|
## 2.1.47
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -234,6 +234,7 @@ var getAgentGraph = async (request, reply) => {
|
|
|
234
234
|
// src/controllers/run.ts
|
|
235
235
|
var import_uuid = require("uuid");
|
|
236
236
|
var import_core3 = require("@axiom-lattice/core");
|
|
237
|
+
var import_protocols = require("@axiom-lattice/protocols");
|
|
237
238
|
var createRun = async (request, reply) => {
|
|
238
239
|
try {
|
|
239
240
|
const {
|
|
@@ -278,9 +279,8 @@ var createRun = async (request, reply) => {
|
|
|
278
279
|
command,
|
|
279
280
|
custom_run_config
|
|
280
281
|
});
|
|
281
|
-
const stream = agent.chunkStream(result.messageId);
|
|
282
|
+
const stream = agent.chunkStream(result.messageId, [import_protocols.MessageChunkTypes.MESSAGE_COMPLETED]);
|
|
282
283
|
for await (const chunk of stream) {
|
|
283
|
-
console.log(input.message, chunk.data.content);
|
|
284
284
|
const success = reply.raw.write(`data: ${JSON.stringify(chunk)}
|
|
285
285
|
|
|
286
286
|
`);
|
|
@@ -349,7 +349,8 @@ var resumeStream = async (request, reply) => {
|
|
|
349
349
|
workspace_id,
|
|
350
350
|
project_id
|
|
351
351
|
});
|
|
352
|
-
|
|
352
|
+
console.log("[UI]message_id", message_id);
|
|
353
|
+
const stream = agent.chunkStream(message_id, [import_protocols.MessageChunkTypes.THREAD_IDLE]);
|
|
353
354
|
for await (const chunk of stream) {
|
|
354
355
|
reply.raw.write(`data: ${JSON.stringify(chunk)}
|
|
355
356
|
|
|
@@ -482,9 +483,13 @@ var getAgentState = async (request, reply) => {
|
|
|
482
483
|
reply.status(500).send(result);
|
|
483
484
|
return;
|
|
484
485
|
}
|
|
486
|
+
const normalizedPendingMessages = pendingMessages.map((msg) => ({
|
|
487
|
+
...msg,
|
|
488
|
+
content: typeof msg.content === "object" && msg.content !== null ? msg.content.message || JSON.stringify(msg.content) : String(msg.content || "")
|
|
489
|
+
}));
|
|
485
490
|
const mergedResult = {
|
|
486
491
|
...result,
|
|
487
|
-
pendingMessages
|
|
492
|
+
pendingMessages: normalizedPendingMessages
|
|
488
493
|
};
|
|
489
494
|
reply.send(mergedResult);
|
|
490
495
|
} catch (error) {
|
|
@@ -968,7 +973,7 @@ var configService = new ConfigService();
|
|
|
968
973
|
|
|
969
974
|
// src/services/queue_service.ts
|
|
970
975
|
var import_core8 = require("@axiom-lattice/core");
|
|
971
|
-
var
|
|
976
|
+
var import_protocols2 = require("@axiom-lattice/protocols");
|
|
972
977
|
var import_queue_redis = require("@axiom-lattice/queue-redis");
|
|
973
978
|
var DEFAULT_QUEUE_KEY = "default";
|
|
974
979
|
var queueServiceType = process.env.QUEUE_SERVICE_TYPE || "memory";
|
|
@@ -979,7 +984,7 @@ var setQueueServiceType = (type) => {
|
|
|
979
984
|
const config = {
|
|
980
985
|
name: "Default Queue Service",
|
|
981
986
|
description: `Default ${type} queue service`,
|
|
982
|
-
type: type === "redis" ?
|
|
987
|
+
type: type === "redis" ? import_protocols2.QueueType.REDIS : import_protocols2.QueueType.MEMORY,
|
|
983
988
|
queueName,
|
|
984
989
|
options: type === "redis" ? {
|
|
985
990
|
redisUrl: process.env.REDIS_URL,
|
|
@@ -5154,14 +5159,14 @@ var AgentTaskConsumer = _AgentTaskConsumer;
|
|
|
5154
5159
|
|
|
5155
5160
|
// src/index.ts
|
|
5156
5161
|
var import_core26 = require("@axiom-lattice/core");
|
|
5157
|
-
var
|
|
5162
|
+
var import_protocols3 = require("@axiom-lattice/protocols");
|
|
5158
5163
|
process.on("unhandledRejection", (reason, promise) => {
|
|
5159
5164
|
console.error("\u672A\u5904\u7406\u7684Promise\u62D2\u7EDD:", reason);
|
|
5160
5165
|
});
|
|
5161
5166
|
var DEFAULT_LOGGER_CONFIG = {
|
|
5162
5167
|
name: "default",
|
|
5163
5168
|
description: "Default logger for lattice-gateway service",
|
|
5164
|
-
type:
|
|
5169
|
+
type: import_protocols3.LoggerType.PINO,
|
|
5165
5170
|
serviceName: "lattice/gateway",
|
|
5166
5171
|
loggerName: "lattice/gateway"
|
|
5167
5172
|
};
|