@axiom-lattice/gateway 2.1.46 → 2.1.47

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/dist/index.mjs CHANGED
@@ -200,7 +200,6 @@ var getAgentGraph = async (request, reply) => {
200
200
  // src/controllers/run.ts
201
201
  import { v4 } from "uuid";
202
202
  import {
203
- Agent,
204
203
  agentInstanceManager as agentInstanceManager2
205
204
  } from "@axiom-lattice/core";
206
205
  var createRun = async (request, reply) => {
@@ -292,11 +291,14 @@ var createRun = async (request, reply) => {
292
291
  };
293
292
  var resumeStream = async (request, reply) => {
294
293
  try {
295
- const { thread_id, message_id, known_content, poll_interval } = request.body;
296
- if (!thread_id || !message_id || known_content === void 0) {
294
+ const { thread_id, message_id, assistant_id, known_content, poll_interval } = request.body;
295
+ const tenant_id = request.headers["x-tenant-id"];
296
+ const workspace_id = request.headers["x-workspace-id"];
297
+ const project_id = request.headers["x-project-id"];
298
+ if (!thread_id || !message_id || !assistant_id || known_content === void 0) {
297
299
  reply.status(400).send({
298
300
  success: false,
299
- error: "thread_id, message_id, and known_content are required"
301
+ error: "thread_id, message_id, assistant_id, and known_content are required"
300
302
  });
301
303
  return;
302
304
  }
@@ -308,10 +310,12 @@ var resumeStream = async (request, reply) => {
308
310
  "Access-Control-Allow-Origin": "*"
309
311
  });
310
312
  try {
311
- const agent = new Agent({
312
- assistant_id: "",
313
+ const agent = agentInstanceManager2.getAgent({
314
+ assistant_id,
313
315
  thread_id,
314
- tenant_id: ""
316
+ tenant_id,
317
+ workspace_id,
318
+ project_id
315
319
  });
316
320
  const stream = agent.chunkStream(message_id, known_content);
317
321
  for await (const chunk of stream) {