@axiom-lattice/gateway 2.1.45 → 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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/gateway@2.1.45 build /home/runner/work/agentic/agentic/packages/gateway
2
+ > @axiom-lattice/gateway@2.1.47 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,13 +9,13 @@
9
9
  CLI Cleaning output folder
10
10
  CJS Build start
11
11
  ESM Build start
12
- ESM dist/index.mjs 164.11 KB
13
- ESM dist/index.mjs.map 358.03 KB
14
- ESM ⚡️ Build success in 321ms
15
- CJS dist/index.js 167.53 KB
16
- CJS dist/index.js.map 357.59 KB
17
- CJS ⚡️ Build success in 321ms
12
+ ESM dist/index.mjs 164.62 KB
13
+ ESM dist/index.mjs.map 359.12 KB
14
+ ESM ⚡️ Build success in 306ms
15
+ CJS dist/index.js 168.05 KB
16
+ CJS dist/index.js.map 358.68 KB
17
+ CJS ⚡️ Build success in 308ms
18
18
  DTS Build start
19
- DTS ⚡️ Build success in 9875ms
19
+ DTS ⚡️ Build success in 9305ms
20
20
  DTS dist/index.d.ts 3.76 KB
21
21
  DTS dist/index.d.mts 3.76 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @axiom-lattice/gateway
2
2
 
3
+ ## 2.1.47
4
+
5
+ ### Patch Changes
6
+
7
+ - fc60965: fix schedule issue
8
+ - Updated dependencies [fc60965]
9
+ - @axiom-lattice/core@2.1.41
10
+ - @axiom-lattice/pg-stores@1.0.31
11
+
12
+ ## 2.1.46
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [f29ff90]
17
+ - @axiom-lattice/pg-stores@1.0.30
18
+ - @axiom-lattice/protocols@2.1.22
19
+ - @axiom-lattice/core@2.1.40
20
+ - @axiom-lattice/queue-redis@1.0.21
21
+
3
22
  ## 2.1.45
4
23
 
5
24
  ### Patch Changes
package/dist/index.js CHANGED
@@ -275,7 +275,8 @@ var createRun = async (request, reply) => {
275
275
  try {
276
276
  const result = await agent.addMessage({
277
277
  input,
278
- command
278
+ command,
279
+ custom_run_config
279
280
  });
280
281
  const stream = agent.chunkStream(result.messageId);
281
282
  for await (const chunk of stream) {
@@ -305,7 +306,8 @@ var createRun = async (request, reply) => {
305
306
  const { message: msg, ...restInputNonStream } = input;
306
307
  const result = await agent.invoke({
307
308
  input: { message: msg, ...restInputNonStream },
308
- command
309
+ command,
310
+ custom_run_config
309
311
  });
310
312
  reply.status(200).send({
311
313
  success: true,
@@ -321,11 +323,14 @@ var createRun = async (request, reply) => {
321
323
  };
322
324
  var resumeStream = async (request, reply) => {
323
325
  try {
324
- const { thread_id, message_id, known_content, poll_interval } = request.body;
325
- if (!thread_id || !message_id || known_content === void 0) {
326
+ const { thread_id, message_id, assistant_id, known_content, poll_interval } = request.body;
327
+ const tenant_id = request.headers["x-tenant-id"];
328
+ const workspace_id = request.headers["x-workspace-id"];
329
+ const project_id = request.headers["x-project-id"];
330
+ if (!thread_id || !message_id || !assistant_id || known_content === void 0) {
326
331
  reply.status(400).send({
327
332
  success: false,
328
- error: "thread_id, message_id, and known_content are required"
333
+ error: "thread_id, message_id, assistant_id, and known_content are required"
329
334
  });
330
335
  return;
331
336
  }
@@ -337,10 +342,12 @@ var resumeStream = async (request, reply) => {
337
342
  "Access-Control-Allow-Origin": "*"
338
343
  });
339
344
  try {
340
- const agent = new import_core3.Agent({
341
- assistant_id: "",
345
+ const agent = import_core3.agentInstanceManager.getAgent({
346
+ assistant_id,
342
347
  thread_id,
343
- tenant_id: ""
348
+ tenant_id,
349
+ workspace_id,
350
+ project_id
344
351
  });
345
352
  const stream = agent.chunkStream(message_id, known_content);
346
353
  for await (const chunk of stream) {
@@ -1082,10 +1089,12 @@ async function getModels(request, reply) {
1082
1089
  const allLattices = import_core9.modelLatticeManager.getAllLattices();
1083
1090
  const models = allLattices.map((lattice) => {
1084
1091
  const config = lattice.client.config || {};
1092
+ const displayName = config.displayName || lattice.key.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
1085
1093
  return {
1086
1094
  key: lattice.key,
1087
1095
  model: config.model || "",
1088
1096
  provider: config.provider || "openai",
1097
+ displayName,
1089
1098
  streaming: config.streaming || false,
1090
1099
  apiKey: config.apiKey || "",
1091
1100
  baseURL: config.baseURL || "",
@@ -1135,6 +1144,7 @@ async function updateModels(request, reply) {
1135
1144
  const llmConfig = {
1136
1145
  provider: modelConfig.provider,
1137
1146
  model: modelConfig.model,
1147
+ displayName: modelConfig.displayName,
1138
1148
  streaming: modelConfig.streaming ?? false,
1139
1149
  apiKey: modelConfig.apiKey,
1140
1150
  baseURL: modelConfig.baseURL,