@axiom-lattice/gateway 2.1.66 → 2.1.68
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 +14 -0
- package/dist/index.js +60 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +60 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/controllers/workflow-tracking.ts +84 -0
- package/src/routes/index.ts +5 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/gateway@2.1.
|
|
2
|
+
> @axiom-lattice/gateway@2.1.68 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
|
|
@@ -9,9 +9,6 @@
|
|
|
9
9
|
[34mCLI[39m Cleaning output folder
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m199.60 KB[39m
|
|
13
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[32m433.06 KB[39m
|
|
14
|
-
[32mESM[39m ⚡️ Build success in 312ms
|
|
15
12
|
[warn] [33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1m"import.meta" is not available with the "cjs" output format and will be empty[0m [empty-import-meta]
|
|
16
13
|
|
|
17
14
|
src/index.ts:171:33:
|
|
@@ -21,10 +18,13 @@
|
|
|
21
18
|
You need to set the output format to "esm" for "import.meta" to work correctly.
|
|
22
19
|
|
|
23
20
|
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
21
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m201.26 KB[39m
|
|
22
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m436.63 KB[39m
|
|
23
|
+
[32mESM[39m ⚡️ Build success in 320ms
|
|
24
|
+
[32mCJS[39m [1mdist/index.js [22m[32m204.59 KB[39m
|
|
25
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m436.01 KB[39m
|
|
26
|
+
[32mCJS[39m ⚡️ Build success in 326ms
|
|
27
27
|
[34mDTS[39m Build start
|
|
28
|
-
[32mDTS[39m ⚡️ Build success in
|
|
28
|
+
[32mDTS[39m ⚡️ Build success in 13420ms
|
|
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,19 @@
|
|
|
1
1
|
# @axiom-lattice/gateway
|
|
2
2
|
|
|
3
|
+
## 2.1.68
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [b68151a]
|
|
8
|
+
- @axiom-lattice/core@2.1.60
|
|
9
|
+
- @axiom-lattice/pg-stores@1.0.50
|
|
10
|
+
|
|
11
|
+
## 2.1.67
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- dd414e2: add /api/workflows/inbox/reply
|
|
16
|
+
|
|
3
17
|
## 2.1.66
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -2030,6 +2030,65 @@ async function getRunTasks(request, reply) {
|
|
|
2030
2030
|
return reply.status(500).send({ success: false, message: "Failed to retrieve user tasks" });
|
|
2031
2031
|
}
|
|
2032
2032
|
}
|
|
2033
|
+
async function replyInboxTask(request, reply) {
|
|
2034
|
+
const { runId, answers } = request.body;
|
|
2035
|
+
const tenantId = getTenantId6(request);
|
|
2036
|
+
try {
|
|
2037
|
+
const store = getTrackingStore();
|
|
2038
|
+
if (!store) {
|
|
2039
|
+
return reply.status(404).send({
|
|
2040
|
+
success: false,
|
|
2041
|
+
message: "No workflow tracking store configured"
|
|
2042
|
+
});
|
|
2043
|
+
}
|
|
2044
|
+
const run = await store.getWorkflowRun(runId);
|
|
2045
|
+
if (!run) {
|
|
2046
|
+
return reply.status(404).send({
|
|
2047
|
+
success: false,
|
|
2048
|
+
message: "Workflow run not found"
|
|
2049
|
+
});
|
|
2050
|
+
}
|
|
2051
|
+
const agent = import_core13.agentInstanceManager.getAgent({
|
|
2052
|
+
assistant_id: run.assistantId,
|
|
2053
|
+
thread_id: run.threadId,
|
|
2054
|
+
tenant_id: tenantId
|
|
2055
|
+
});
|
|
2056
|
+
try {
|
|
2057
|
+
await agent.addMessage({
|
|
2058
|
+
input: { message: "Clarification answers submitted" },
|
|
2059
|
+
command: {
|
|
2060
|
+
resume: {
|
|
2061
|
+
action: "submit",
|
|
2062
|
+
data: { answers },
|
|
2063
|
+
message: "Clarification answers submitted"
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
});
|
|
2067
|
+
} catch (error) {
|
|
2068
|
+
return reply.status(400).send({
|
|
2069
|
+
success: false,
|
|
2070
|
+
message: "Failed to resume workflow",
|
|
2071
|
+
error: error instanceof Error ? error.message : String(error)
|
|
2072
|
+
});
|
|
2073
|
+
}
|
|
2074
|
+
return reply.status(200).send({
|
|
2075
|
+
success: true,
|
|
2076
|
+
message: "Resume request submitted successfully",
|
|
2077
|
+
data: {
|
|
2078
|
+
runId: run.id,
|
|
2079
|
+
assistantId: run.assistantId,
|
|
2080
|
+
threadId: run.threadId,
|
|
2081
|
+
status: "resuming"
|
|
2082
|
+
}
|
|
2083
|
+
});
|
|
2084
|
+
} catch (error) {
|
|
2085
|
+
request.log.error(error, "Failed to reply inbox task");
|
|
2086
|
+
return reply.status(500).send({
|
|
2087
|
+
success: false,
|
|
2088
|
+
message: "Failed to submit resume request"
|
|
2089
|
+
});
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2033
2092
|
|
|
2034
2093
|
// src/schemas/data-query.ts
|
|
2035
2094
|
var dataQuerySchema = {
|
|
@@ -5915,6 +5974,7 @@ var registerLatticeRoutes = (app2) => {
|
|
|
5915
5974
|
app2.get("/api/workflows/runs/:runId", getWorkflowRun);
|
|
5916
5975
|
app2.get("/api/workflows/runs/:runId/steps", getRunSteps);
|
|
5917
5976
|
app2.get("/api/workflows/runs/:runId/tasks", getRunTasks);
|
|
5977
|
+
app2.post("/api/workflows/inbox/reply", replyInboxTask);
|
|
5918
5978
|
app2.delete(
|
|
5919
5979
|
"/api/assistants/:assistant_id/threads/:thread_id/pending-messages/:message_id",
|
|
5920
5980
|
removePendingMessageHandler
|