@axiom-lattice/gateway 2.1.87 → 2.1.88
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 +10 -10
- package/CHANGELOG.md +12 -0
- package/README.md +37 -94
- package/dist/index.js +34 -54
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/controllers/channel-bindings.ts +1 -1
- package/src/controllers/data-query.ts +1 -1
- package/src/controllers/metrics-configs.ts +3 -3
- package/src/index.ts +1 -15
- package/src/bindings/index.ts +0 -14
package/dist/index.mjs
CHANGED
|
@@ -1649,7 +1649,7 @@ async function executeDataQuery(request, reply) {
|
|
|
1649
1649
|
message: `Metrics server not registered: ${body.serverKey}. Please register the server first.`
|
|
1650
1650
|
};
|
|
1651
1651
|
}
|
|
1652
|
-
const client = metricsServerManager.getClient(tenantId, body.serverKey);
|
|
1652
|
+
const client = await metricsServerManager.getClient(tenantId, body.serverKey);
|
|
1653
1653
|
if (isSemanticQuery) {
|
|
1654
1654
|
return await executeSemanticQuery(client, body, reply);
|
|
1655
1655
|
} else {
|
|
@@ -3856,7 +3856,7 @@ async function testMetricsServerConnection(request, reply) {
|
|
|
3856
3856
|
const testKey = `__test_${key}_${Date.now()}`;
|
|
3857
3857
|
metricsServerManager2.registerServer(tenantId, testKey, config.config);
|
|
3858
3858
|
try {
|
|
3859
|
-
const client = metricsServerManager2.getClient(tenantId, testKey);
|
|
3859
|
+
const client = await metricsServerManager2.getClient(tenantId, testKey);
|
|
3860
3860
|
const result = await client.testConnection();
|
|
3861
3861
|
metricsServerManager2.removeServer(tenantId, testKey);
|
|
3862
3862
|
return {
|
|
@@ -3907,7 +3907,7 @@ async function listAvailableMetrics(request, reply) {
|
|
|
3907
3907
|
if (!metricsServerManager2.hasServer(tenantId, key)) {
|
|
3908
3908
|
metricsServerManager2.registerServer(tenantId, key, config.config);
|
|
3909
3909
|
}
|
|
3910
|
-
const client = metricsServerManager2.getClient(tenantId, key);
|
|
3910
|
+
const client = await metricsServerManager2.getClient(tenantId, key);
|
|
3911
3911
|
const metrics = await client.listMetrics();
|
|
3912
3912
|
return {
|
|
3913
3913
|
success: true,
|
|
@@ -3953,7 +3953,7 @@ async function queryMetricsData(request, reply) {
|
|
|
3953
3953
|
if (!metricsServerManager2.hasServer(tenantId, key)) {
|
|
3954
3954
|
metricsServerManager2.registerServer(tenantId, key, config.config);
|
|
3955
3955
|
}
|
|
3956
|
-
const client = metricsServerManager2.getClient(tenantId, key);
|
|
3956
|
+
const client = await metricsServerManager2.getClient(tenantId, key);
|
|
3957
3957
|
const result = await client.queryMetricData(metricName, {
|
|
3958
3958
|
startTime,
|
|
3959
3959
|
endTime,
|
|
@@ -6299,19 +6299,8 @@ function registerChannelInstallationRoutes(app2) {
|
|
|
6299
6299
|
app2.delete("/api/channel-installations/:installationId", deleteChannelInstallation);
|
|
6300
6300
|
}
|
|
6301
6301
|
|
|
6302
|
-
// src/bindings/index.ts
|
|
6303
|
-
var registryInstance = null;
|
|
6304
|
-
function setBindingRegistry(registry) {
|
|
6305
|
-
registryInstance = registry;
|
|
6306
|
-
}
|
|
6307
|
-
function getBindingRegistry() {
|
|
6308
|
-
if (!registryInstance) {
|
|
6309
|
-
throw new Error("BindingRegistry not initialized. Call setBindingRegistry() first.");
|
|
6310
|
-
}
|
|
6311
|
-
return registryInstance;
|
|
6312
|
-
}
|
|
6313
|
-
|
|
6314
6302
|
// src/controllers/channel-bindings.ts
|
|
6303
|
+
import { getBindingRegistry } from "@axiom-lattice/core";
|
|
6315
6304
|
function getTenantId12(request) {
|
|
6316
6305
|
const userTenantId = request.user?.tenantId;
|
|
6317
6306
|
if (userTenantId) return userTenantId;
|
|
@@ -6975,7 +6964,7 @@ function createAuditLoggerMiddleware() {
|
|
|
6975
6964
|
}
|
|
6976
6965
|
|
|
6977
6966
|
// src/index.ts
|
|
6978
|
-
import { setBindingRegistry
|
|
6967
|
+
import { setBindingRegistry } from "@axiom-lattice/core";
|
|
6979
6968
|
|
|
6980
6969
|
// src/swagger.ts
|
|
6981
6970
|
import swagger from "@fastify/swagger";
|
|
@@ -7303,8 +7292,6 @@ import {
|
|
|
7303
7292
|
getLoggerLattice,
|
|
7304
7293
|
loggerLatticeManager,
|
|
7305
7294
|
sandboxLatticeManager as sandboxLatticeManager2,
|
|
7306
|
-
sqlDatabaseManager as sqlDatabaseManager2,
|
|
7307
|
-
getStoreLattice as getStoreLattice15,
|
|
7308
7295
|
agentInstanceManager as agentInstanceManager8,
|
|
7309
7296
|
createSandboxProvider
|
|
7310
7297
|
} from "@axiom-lattice/core";
|
|
@@ -7464,7 +7451,6 @@ var start = async (config) => {
|
|
|
7464
7451
|
const bindingStore = getStoreLattice16("default", "channelBinding").store;
|
|
7465
7452
|
const installationStore = getStoreLattice16("default", "channelInstallation").store;
|
|
7466
7453
|
setBindingRegistry(bindingStore);
|
|
7467
|
-
setCoreBindingRegistry(bindingStore);
|
|
7468
7454
|
const adapterRegistry = new ChannelAdapterRegistry();
|
|
7469
7455
|
adapterRegistry.register(larkChannelAdapter);
|
|
7470
7456
|
const router = new MessageRouter({
|
|
@@ -7481,14 +7467,6 @@ var start = async (config) => {
|
|
|
7481
7467
|
} catch {
|
|
7482
7468
|
}
|
|
7483
7469
|
registerLatticeRoutes(app, channelDeps);
|
|
7484
|
-
try {
|
|
7485
|
-
const storeLattice = getStoreLattice15("default", "database");
|
|
7486
|
-
const store = storeLattice.store;
|
|
7487
|
-
sqlDatabaseManager2.setConfigStore(store);
|
|
7488
|
-
logger3.info("Database config store set for SqlDatabaseManager");
|
|
7489
|
-
} catch (error) {
|
|
7490
|
-
logger3.warn("Failed to set database config store: " + (error instanceof Error ? error.message : String(error)));
|
|
7491
|
-
}
|
|
7492
7470
|
if (!sandboxLatticeManager2.hasLattice("default")) {
|
|
7493
7471
|
sandboxLatticeManager2.registerLattice("default", getConfiguredSandboxProvider());
|
|
7494
7472
|
logger3.info("Registered sandbox manager from env configuration");
|