@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/gateway@2.1.47 build /home/runner/work/agentic/agentic/packages/gateway
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
  CLI Building entry: src/index.ts
@@ -9,13 +9,13 @@
9
9
  CLI Cleaning output folder
10
10
  CJS Build start
11
11
  ESM Build start
12
- ESM dist/index.mjs 164.62 KB
13
- ESM dist/index.mjs.map 359.12 KB
14
- ESM ⚡️ Build success in 306ms
15
- CJS dist/index.js 168.05 KB
16
- CJS dist/index.js.map 358.68 KB
17
- CJS ⚡️ Build success in 308ms
12
+ CJS dist/index.js 168.46 KB
13
+ CJS dist/index.js.map 359.44 KB
14
+ CJS ⚡️ Build success in 322ms
15
+ ESM dist/index.mjs 165.00 KB
16
+ ESM dist/index.mjs.map 359.85 KB
17
+ ESM ⚡️ Build success in 321ms
18
18
  DTS Build start
19
- DTS ⚡️ Build success in 9305ms
19
+ DTS ⚡️ Build success in 9889ms
20
20
  DTS dist/index.d.ts 3.76 KB
21
21
  DTS dist/index.d.mts 3.76 KB
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
- const stream = agent.chunkStream(message_id, known_content);
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 import_protocols = require("@axiom-lattice/protocols");
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" ? import_protocols.QueueType.REDIS : import_protocols.QueueType.MEMORY,
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 import_protocols2 = require("@axiom-lattice/protocols");
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: import_protocols2.LoggerType.PINO,
5169
+ type: import_protocols3.LoggerType.PINO,
5165
5170
  serviceName: "lattice/gateway",
5166
5171
  loggerName: "lattice/gateway"
5167
5172
  };