@axiom-lattice/gateway 2.1.69 → 2.1.71
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 +17 -0
- package/dist/index.js +25 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/controllers/workflow-tracking.ts +36 -24
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/gateway@2.1.
|
|
2
|
+
> @axiom-lattice/gateway@2.1.71 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[32m204.
|
|
22
|
-
[32mCJS[39m [1mdist/index.js.map [22m[32m436.
|
|
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[32m204.96 KB[39m
|
|
22
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m436.78 KB[39m
|
|
23
|
+
[32mCJS[39m ⚡️ Build success in 394ms
|
|
24
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m201.64 KB[39m
|
|
25
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m437.40 KB[39m
|
|
26
|
+
[32mESM[39m ⚡️ Build success in 397ms
|
|
27
27
|
[34mDTS[39m Build start
|
|
28
|
-
[32mDTS[39m ⚡️ Build success in
|
|
28
|
+
[32mDTS[39m ⚡️ Build success in 14513ms
|
|
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
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @axiom-lattice/gateway
|
|
2
2
|
|
|
3
|
+
## 2.1.71
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e61bc9d: fix reply
|
|
8
|
+
|
|
9
|
+
## 2.1.70
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 13c9cc5: workflow tracking
|
|
14
|
+
- Updated dependencies [13c9cc5]
|
|
15
|
+
- @axiom-lattice/core@2.1.62
|
|
16
|
+
- @axiom-lattice/pg-stores@1.0.52
|
|
17
|
+
- @axiom-lattice/protocols@2.1.32
|
|
18
|
+
- @axiom-lattice/queue-redis@1.0.31
|
|
19
|
+
|
|
3
20
|
## 2.1.69
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1876,8 +1876,7 @@ async function getInboxItems(request, reply) {
|
|
|
1876
1876
|
if (runningRuns.length === 0) {
|
|
1877
1877
|
return { success: true, message: "No running workflows", data: { records: [] } };
|
|
1878
1878
|
}
|
|
1879
|
-
const
|
|
1880
|
-
for (const r of runningRuns) {
|
|
1879
|
+
const checkPromises = runningRuns.map(async (r) => {
|
|
1881
1880
|
try {
|
|
1882
1881
|
const agent = import_core13.agentInstanceManager.getAgent({
|
|
1883
1882
|
assistant_id: r.assistantId,
|
|
@@ -1885,26 +1884,28 @@ async function getInboxItems(request, reply) {
|
|
|
1885
1884
|
tenant_id: r.tenantId
|
|
1886
1885
|
});
|
|
1887
1886
|
const runStatus = await agent.getRunStatus();
|
|
1888
|
-
if (runStatus !== "interrupted")
|
|
1887
|
+
if (runStatus !== "interrupted") return [];
|
|
1889
1888
|
const state = await agent.getCurrentState();
|
|
1890
1889
|
const interrupts = state.tasks?.flatMap((t) => t.interrupts || []) || [];
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1890
|
+
return interrupts.map((i) => ({
|
|
1891
|
+
runId: r.id,
|
|
1892
|
+
assistantId: r.assistantId,
|
|
1893
|
+
assistantName: nameMap[r.assistantId] || r.assistantId,
|
|
1894
|
+
threadId: r.threadId,
|
|
1895
|
+
tenantId: r.tenantId,
|
|
1896
|
+
interruptId: i.id,
|
|
1897
|
+
interruptValue: i.value,
|
|
1898
|
+
startedAt: r.startedAt,
|
|
1899
|
+
totalEdges: r.totalEdges,
|
|
1900
|
+
completedEdges: r.completedEdges
|
|
1901
|
+
}));
|
|
1902
|
+
} catch (err) {
|
|
1903
|
+
request.log.warn({ runId: r.id, error: err.message }, "Agent check skipped");
|
|
1904
|
+
return [];
|
|
1906
1905
|
}
|
|
1907
|
-
}
|
|
1906
|
+
});
|
|
1907
|
+
const results = await Promise.all(checkPromises);
|
|
1908
|
+
const inboxItems = results.flat();
|
|
1908
1909
|
inboxItems.sort(
|
|
1909
1910
|
(a, b) => new Date(b.startedAt).getTime() - new Date(a.startedAt).getTime()
|
|
1910
1911
|
);
|
|
@@ -2054,6 +2055,10 @@ async function replyInboxTask(request, reply) {
|
|
|
2054
2055
|
tenant_id: tenantId
|
|
2055
2056
|
});
|
|
2056
2057
|
try {
|
|
2058
|
+
const queueStore = agent.getQueueStore?.() || agent.queueStore;
|
|
2059
|
+
if (queueStore?.resetProcessingToPending) {
|
|
2060
|
+
await queueStore.resetProcessingToPending(run.threadId);
|
|
2061
|
+
}
|
|
2057
2062
|
await agent.addMessage({
|
|
2058
2063
|
input: { message: "Clarification answers submitted" },
|
|
2059
2064
|
command: {
|
|
@@ -2064,6 +2069,7 @@ async function replyInboxTask(request, reply) {
|
|
|
2064
2069
|
}
|
|
2065
2070
|
}
|
|
2066
2071
|
});
|
|
2072
|
+
await agent.startQueueProcessorIfNeeded();
|
|
2067
2073
|
} catch (error) {
|
|
2068
2074
|
return reply.status(400).send({
|
|
2069
2075
|
success: false,
|