@axiom-lattice/gateway 2.1.69 → 2.1.70
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 +11 -0
- package/dist/index.js +20 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/controllers/workflow-tracking.ts +24 -21
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/gateway@2.1.
|
|
2
|
+
> @axiom-lattice/gateway@2.1.70 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[32m436.
|
|
26
|
-
[32mESM[39m ⚡️ Build success in
|
|
21
|
+
[32mCJS[39m [1mdist/index.js [22m[32m204.73 KB[39m
|
|
22
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m436.33 KB[39m
|
|
23
|
+
[32mCJS[39m ⚡️ Build success in 437ms
|
|
24
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m201.40 KB[39m
|
|
25
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m436.95 KB[39m
|
|
26
|
+
[32mESM[39m ⚡️ Build success in 439ms
|
|
27
27
|
[34mDTS[39m Build start
|
|
28
|
-
[32mDTS[39m ⚡️ Build success in
|
|
28
|
+
[32mDTS[39m ⚡️ Build success in 14016ms
|
|
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,16 @@
|
|
|
1
1
|
# @axiom-lattice/gateway
|
|
2
2
|
|
|
3
|
+
## 2.1.70
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 13c9cc5: workflow tracking
|
|
8
|
+
- Updated dependencies [13c9cc5]
|
|
9
|
+
- @axiom-lattice/core@2.1.62
|
|
10
|
+
- @axiom-lattice/pg-stores@1.0.52
|
|
11
|
+
- @axiom-lattice/protocols@2.1.32
|
|
12
|
+
- @axiom-lattice/queue-redis@1.0.31
|
|
13
|
+
|
|
3
14
|
## 2.1.69
|
|
4
15
|
|
|
5
16
|
### 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
|
);
|