@axiom-lattice/gateway 2.1.71 → 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 +6 -0
- package/dist/index.js +32 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/controllers/workflow-tracking.ts +30 -29
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[32m437.
|
|
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,34 +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
|
-
|
|
2062
|
+
agent.addMessage({
|
|
2063
|
+
input: { message: "Clarification answers submitted" },
|
|
2064
|
+
command: {
|
|
2065
|
+
resume: {
|
|
2066
|
+
action: "submit",
|
|
2067
|
+
data: { answers },
|
|
2068
|
+
message: "Clarification answers submitted"
|
|
2069
|
+
}
|
|
2061
2070
|
}
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
}
|
|
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) {
|
|
2070
2078
|
}
|
|
2079
|
+
})().catch((error) => {
|
|
2080
|
+
request.log.error(error, "Background chunk stream error");
|
|
2071
2081
|
});
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
success: false,
|
|
2076
|
-
message: "Failed to resume workflow",
|
|
2077
|
-
error: error instanceof Error ? error.message : String(error)
|
|
2078
|
-
});
|
|
2079
|
-
}
|
|
2082
|
+
}).catch((error) => {
|
|
2083
|
+
request.log.error(error, "Background resume failed");
|
|
2084
|
+
});
|
|
2080
2085
|
return reply.status(200).send({
|
|
2081
2086
|
success: true,
|
|
2082
2087
|
message: "Resume request submitted successfully",
|
|
@@ -5380,13 +5385,13 @@ function resolveSubjectType(mappingMode, chatType) {
|
|
|
5380
5385
|
|
|
5381
5386
|
// src/channels/lark/runner.ts
|
|
5382
5387
|
var import_core26 = require("@axiom-lattice/core");
|
|
5383
|
-
var
|
|
5388
|
+
var import_protocols5 = require("@axiom-lattice/protocols");
|
|
5384
5389
|
|
|
5385
5390
|
// src/channels/lark/aggregator.ts
|
|
5386
|
-
var
|
|
5391
|
+
var import_protocols4 = require("@axiom-lattice/protocols");
|
|
5387
5392
|
function aggregateLarkReply(messageId, chunks) {
|
|
5388
5393
|
return chunks.filter(
|
|
5389
|
-
(chunk) => chunk.type ===
|
|
5394
|
+
(chunk) => chunk.type === import_protocols4.MessageChunkTypes.AI && chunk.data.id === messageId
|
|
5390
5395
|
).map((chunk) => chunk.data.content || "").join("").trim();
|
|
5391
5396
|
}
|
|
5392
5397
|
|
|
@@ -5406,7 +5411,7 @@ async function runAgentAndCollectLarkReply(input) {
|
|
|
5406
5411
|
});
|
|
5407
5412
|
const chunks = [];
|
|
5408
5413
|
const stream = agent.chunkStream(result.messageId, [
|
|
5409
|
-
|
|
5414
|
+
import_protocols5.MessageChunkTypes.MESSAGE_COMPLETED
|
|
5410
5415
|
]);
|
|
5411
5416
|
for await (const chunk of stream) {
|
|
5412
5417
|
chunks.push(chunk);
|
|
@@ -6309,7 +6314,7 @@ var AgentTaskConsumer = _AgentTaskConsumer;
|
|
|
6309
6314
|
|
|
6310
6315
|
// src/index.ts
|
|
6311
6316
|
var import_core29 = require("@axiom-lattice/core");
|
|
6312
|
-
var
|
|
6317
|
+
var import_protocols6 = require("@axiom-lattice/protocols");
|
|
6313
6318
|
var import_meta = {};
|
|
6314
6319
|
process.on("unhandledRejection", (reason, promise) => {
|
|
6315
6320
|
console.error("\u672A\u5904\u7406\u7684Promise\u62D2\u7EDD:", reason);
|
|
@@ -6317,7 +6322,7 @@ process.on("unhandledRejection", (reason, promise) => {
|
|
|
6317
6322
|
var DEFAULT_LOGGER_CONFIG = {
|
|
6318
6323
|
name: "default",
|
|
6319
6324
|
description: "Default logger for lattice-gateway service",
|
|
6320
|
-
type:
|
|
6325
|
+
type: import_protocols6.LoggerType.PINO,
|
|
6321
6326
|
serviceName: "lattice/gateway",
|
|
6322
6327
|
loggerName: "lattice/gateway"
|
|
6323
6328
|
};
|