@axiom-lattice/gateway 2.1.41 → 2.1.43

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
@@ -72,6 +72,9 @@ async function agent_invoke({
72
72
  const result = await runnable_agent.invoke(
73
73
  command ? new Command(command) : { ...rest, messages, "x-tenant-id": tenant_id },
74
74
  {
75
+ context: {
76
+ runConfig
77
+ },
75
78
  configurable: {
76
79
  thread_id,
77
80
  run_id: run_id || v4(),
@@ -134,6 +137,9 @@ async function agent_stream({
134
137
  "x-tenant-id": tenant_id
135
138
  },
136
139
  {
140
+ context: {
141
+ runConfig
142
+ },
137
143
  configurable: {
138
144
  thread_id,
139
145
  run_id: run_id || v4(),
@@ -3410,7 +3416,7 @@ async function testDatabaseConnection(request, reply) {
3410
3416
  const testKey = `__test_${key}_${Date.now()}`;
3411
3417
  sqlDatabaseManager.registerDatabase(tenantId, testKey, config.config);
3412
3418
  const startTime = Date.now();
3413
- const db = sqlDatabaseManager.getDatabase(tenantId, testKey);
3419
+ const db = await sqlDatabaseManager.getDatabase(tenantId, testKey);
3414
3420
  try {
3415
3421
  await db.connect();
3416
3422
  await db.listTables();
@@ -5466,7 +5472,9 @@ import {
5466
5472
  registerLoggerLattice,
5467
5473
  getLoggerLattice,
5468
5474
  loggerLatticeManager,
5469
- sandboxLatticeManager as sandboxLatticeManager2
5475
+ sandboxLatticeManager as sandboxLatticeManager2,
5476
+ sqlDatabaseManager as sqlDatabaseManager2,
5477
+ getStoreLattice as getStoreLattice12
5470
5478
  } from "@axiom-lattice/core";
5471
5479
  import {
5472
5480
  LoggerType
@@ -5512,6 +5520,11 @@ app.addHook("onRequest", (request, reply, done) => {
5512
5520
  }
5513
5521
  done();
5514
5522
  });
5523
+ app.addHook("onRequest", async (request, reply) => {
5524
+ if (request.method === "DELETE" && request.headers["content-type"]) {
5525
+ delete request.headers["content-type"];
5526
+ }
5527
+ });
5515
5528
  app.addHook("onResponse", (request, reply, done) => {
5516
5529
  const getHeaderValue = (header) => {
5517
5530
  if (Array.isArray(header)) {
@@ -5583,6 +5596,14 @@ var start = async (config) => {
5583
5596
  }
5584
5597
  app.decorate("loggerLattice", loggerLattice);
5585
5598
  registerLatticeRoutes(app);
5599
+ try {
5600
+ const storeLattice = getStoreLattice12("default", "database");
5601
+ const store = storeLattice.store;
5602
+ sqlDatabaseManager2.setConfigStore(store);
5603
+ logger.info("Database config store set for SqlDatabaseManager");
5604
+ } catch (error) {
5605
+ logger.warn("Failed to set database config store: " + (error instanceof Error ? error.message : String(error)));
5606
+ }
5586
5607
  if (!sandboxLatticeManager2.hasLattice("default")) {
5587
5608
  const sandboxBaseURL = process.env.SANDBOX_BASE_URL || "http://localhost:8080";
5588
5609
  sandboxLatticeManager2.registerLattice("default", {