@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.
- package/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +12 -0
- package/dist/index.js +33 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/controllers/workflow-tracking.ts +30 -20
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/gateway@2.1.
|
|
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
|
[34mCLI[39m 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
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
22
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
23
|
-
[32mCJS[39m ⚡️ Build success in
|
|
24
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m201.
|
|
25
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
26
|
-
[32mESM[39m ⚡️ Build success in
|
|
21
|
+
[32mCJS[39m [1mdist/index.js [22m[32m205.11 KB[39m
|
|
22
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m437.04 KB[39m
|
|
23
|
+
[32mCJS[39m ⚡️ Build success in 299ms
|
|
24
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m201.79 KB[39m
|
|
25
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m437.67 KB[39m
|
|
26
|
+
[32mESM[39m ⚡️ Build success in 299ms
|
|
27
27
|
[34mDTS[39m Build start
|
|
28
|
-
[32mDTS[39m ⚡️ Build success in
|
|
28
|
+
[32mDTS[39m ⚡️ Build success in 10288ms
|
|
29
29
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.85 KB[39m
|
|
30
30
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.85 KB[39m
|
package/CHANGELOG.md
CHANGED
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
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
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
|
-
}
|
|
2069
|
-
|
|
2070
|
-
|
|
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
|
|
5388
|
+
var import_protocols5 = require("@axiom-lattice/protocols");
|
|
5379
5389
|
|
|
5380
5390
|
// src/channels/lark/aggregator.ts
|
|
5381
|
-
var
|
|
5391
|
+
var import_protocols4 = require("@axiom-lattice/protocols");
|
|
5382
5392
|
function aggregateLarkReply(messageId, chunks) {
|
|
5383
5393
|
return chunks.filter(
|
|
5384
|
-
(chunk) => chunk.type ===
|
|
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
|
-
|
|
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
|
|
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:
|
|
6325
|
+
type: import_protocols6.LoggerType.PINO,
|
|
6316
6326
|
serviceName: "lattice/gateway",
|
|
6317
6327
|
loggerName: "lattice/gateway"
|
|
6318
6328
|
};
|