@axiom-lattice/gateway 2.1.70 → 2.1.72

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.70 build /home/runner/work/agentic/agentic/packages/gateway
2
+ > @axiom-lattice/gateway@2.1.72 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
@@ -18,13 +18,13 @@
18
18
  You need to set the output format to "esm" for "import.meta" to work correctly.
19
19
 
20
20
 
21
- CJS dist/index.js 204.73 KB
22
- CJS dist/index.js.map 436.33 KB
23
- CJS ⚡️ Build success in 437ms
24
- ESM dist/index.mjs 201.40 KB
25
- ESM dist/index.mjs.map 436.95 KB
26
- ESM ⚡️ Build success in 439ms
21
+ CJS dist/index.js 205.11 KB
22
+ CJS dist/index.js.map 437.04 KB
23
+ CJS ⚡️ Build success in 299ms
24
+ ESM dist/index.mjs 201.79 KB
25
+ ESM dist/index.mjs.map 437.67 KB
26
+ ESM ⚡️ Build success in 299ms
27
27
  DTS Build start
28
- DTS ⚡️ Build success in 14016ms
28
+ DTS ⚡️ Build success in 10288ms
29
29
  DTS dist/index.d.ts 3.85 KB
30
30
  DTS dist/index.d.mts 3.85 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @axiom-lattice/gateway
2
2
 
3
+ ## 2.1.72
4
+
5
+ ### Patch Changes
6
+
7
+ - 1ada590: fix resume
8
+
9
+ ## 2.1.71
10
+
11
+ ### Patch Changes
12
+
13
+ - e61bc9d: fix reply
14
+
3
15
  ## 2.1.70
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1743,6 +1743,7 @@ async function executeSqlQuery(client, body, reply) {
1743
1743
 
1744
1744
  // src/controllers/workflow-tracking.ts
1745
1745
  var import_core13 = require("@axiom-lattice/core");
1746
+ var import_protocols3 = require("@axiom-lattice/protocols");
1746
1747
  function getTenantId6(request) {
1747
1748
  const userTenantId = request.user?.tenantId;
1748
1749
  if (userTenantId) return userTenantId;
@@ -2049,29 +2050,38 @@ async function replyInboxTask(request, reply) {
2049
2050
  message: "Workflow run not found"
2050
2051
  });
2051
2052
  }
2053
+ const workspace_id = request.headers["x-workspace-id"];
2054
+ const project_id = request.headers["x-project-id"];
2052
2055
  const agent = import_core13.agentInstanceManager.getAgent({
2053
2056
  assistant_id: run.assistantId,
2054
2057
  thread_id: run.threadId,
2055
- tenant_id: tenantId
2058
+ tenant_id: tenantId,
2059
+ workspace_id,
2060
+ project_id
2056
2061
  });
2057
- try {
2058
- await agent.addMessage({
2059
- input: { message: "Clarification answers submitted" },
2060
- command: {
2061
- resume: {
2062
- action: "submit",
2063
- data: { answers },
2064
- message: "Clarification answers submitted"
2065
- }
2062
+ agent.addMessage({
2063
+ input: { message: "Clarification answers submitted" },
2064
+ command: {
2065
+ resume: {
2066
+ action: "submit",
2067
+ data: { answers },
2068
+ message: "Clarification answers submitted"
2066
2069
  }
2070
+ }
2071
+ }).then((result) => {
2072
+ const stream = agent.chunkStream(
2073
+ result.messageId,
2074
+ [import_protocols3.MessageChunkTypes.MESSAGE_COMPLETED]
2075
+ );
2076
+ (async () => {
2077
+ for await (const _ of stream) {
2078
+ }
2079
+ })().catch((error) => {
2080
+ request.log.error(error, "Background chunk stream error");
2067
2081
  });
2068
- } catch (error) {
2069
- return reply.status(400).send({
2070
- success: false,
2071
- message: "Failed to resume workflow",
2072
- error: error instanceof Error ? error.message : String(error)
2073
- });
2074
- }
2082
+ }).catch((error) => {
2083
+ request.log.error(error, "Background resume failed");
2084
+ });
2075
2085
  return reply.status(200).send({
2076
2086
  success: true,
2077
2087
  message: "Resume request submitted successfully",
@@ -5375,13 +5385,13 @@ function resolveSubjectType(mappingMode, chatType) {
5375
5385
 
5376
5386
  // src/channels/lark/runner.ts
5377
5387
  var import_core26 = require("@axiom-lattice/core");
5378
- var import_protocols4 = require("@axiom-lattice/protocols");
5388
+ var import_protocols5 = require("@axiom-lattice/protocols");
5379
5389
 
5380
5390
  // src/channels/lark/aggregator.ts
5381
- var import_protocols3 = require("@axiom-lattice/protocols");
5391
+ var import_protocols4 = require("@axiom-lattice/protocols");
5382
5392
  function aggregateLarkReply(messageId, chunks) {
5383
5393
  return chunks.filter(
5384
- (chunk) => chunk.type === import_protocols3.MessageChunkTypes.AI && chunk.data.id === messageId
5394
+ (chunk) => chunk.type === import_protocols4.MessageChunkTypes.AI && chunk.data.id === messageId
5385
5395
  ).map((chunk) => chunk.data.content || "").join("").trim();
5386
5396
  }
5387
5397
 
@@ -5401,7 +5411,7 @@ async function runAgentAndCollectLarkReply(input) {
5401
5411
  });
5402
5412
  const chunks = [];
5403
5413
  const stream = agent.chunkStream(result.messageId, [
5404
- import_protocols4.MessageChunkTypes.MESSAGE_COMPLETED
5414
+ import_protocols5.MessageChunkTypes.MESSAGE_COMPLETED
5405
5415
  ]);
5406
5416
  for await (const chunk of stream) {
5407
5417
  chunks.push(chunk);
@@ -6304,7 +6314,7 @@ var AgentTaskConsumer = _AgentTaskConsumer;
6304
6314
 
6305
6315
  // src/index.ts
6306
6316
  var import_core29 = require("@axiom-lattice/core");
6307
- var import_protocols5 = require("@axiom-lattice/protocols");
6317
+ var import_protocols6 = require("@axiom-lattice/protocols");
6308
6318
  var import_meta = {};
6309
6319
  process.on("unhandledRejection", (reason, promise) => {
6310
6320
  console.error("\u672A\u5904\u7406\u7684Promise\u62D2\u7EDD:", reason);
@@ -6312,7 +6322,7 @@ process.on("unhandledRejection", (reason, promise) => {
6312
6322
  var DEFAULT_LOGGER_CONFIG = {
6313
6323
  name: "default",
6314
6324
  description: "Default logger for lattice-gateway service",
6315
- type: import_protocols5.LoggerType.PINO,
6325
+ type: import_protocols6.LoggerType.PINO,
6316
6326
  serviceName: "lattice/gateway",
6317
6327
  loggerName: "lattice/gateway"
6318
6328
  };