@axiom-lattice/gateway 2.1.66 → 2.1.67

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/gateway@2.1.66 build /home/runner/work/agentic/agentic/packages/gateway
2
+ > @axiom-lattice/gateway@2.1.67 build /home/runner/work/agentic/agentic/packages/gateway
3
3
  > tsup src/index.ts --format cjs,esm --dts --clean --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,9 +9,6 @@
9
9
  CLI Cleaning output folder
10
10
  CJS Build start
11
11
  ESM Build start
12
- ESM dist/index.mjs 199.60 KB
13
- ESM dist/index.mjs.map 433.06 KB
14
- ESM ⚡️ Build success in 312ms
15
12
  [warn] ▲ [WARNING] "import.meta" is not available with the "cjs" output format and will be empty [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
- CJS dist/index.js 202.91 KB
25
- CJS dist/index.js.map 432.44 KB
26
- CJS ⚡️ Build success in 346ms
21
+ CJS dist/index.js 204.59 KB
22
+ CJS dist/index.js.map 436.01 KB
23
+ CJS ⚡️ Build success in 357ms
24
+ ESM dist/index.mjs 201.26 KB
25
+ ESM dist/index.mjs.map 436.63 KB
26
+ ESM ⚡️ Build success in 362ms
27
27
  DTS Build start
28
- DTS ⚡️ Build success in 12529ms
28
+ DTS ⚡️ Build success in 13253ms
29
29
  DTS dist/index.d.ts 3.85 KB
30
30
  DTS dist/index.d.mts 3.85 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @axiom-lattice/gateway
2
2
 
3
+ ## 2.1.67
4
+
5
+ ### Patch Changes
6
+
7
+ - dd414e2: add /api/workflows/inbox/reply
8
+
3
9
  ## 2.1.66
4
10
 
5
11
  ### 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