@axiom-lattice/core 2.1.81 → 2.1.82
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.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +40 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -952,6 +952,12 @@ declare class MetricsServerManager {
|
|
|
952
952
|
* @param key - Server key (optional, uses default if not provided)
|
|
953
953
|
*/
|
|
954
954
|
getConfig(tenantId: string, key?: string): Promise<MetricsServerConfig>;
|
|
955
|
+
/**
|
|
956
|
+
* Ensure server configs are loaded from the store.
|
|
957
|
+
* Public wrapper around the internal lazy-loading mechanism.
|
|
958
|
+
* Safe to call multiple times — loading happens at most once.
|
|
959
|
+
*/
|
|
960
|
+
ensureLoaded(): Promise<void>;
|
|
955
961
|
/**
|
|
956
962
|
* Check if a metrics server is registered for a tenant
|
|
957
963
|
* @param tenantId - Tenant identifier
|
package/dist/index.d.ts
CHANGED
|
@@ -952,6 +952,12 @@ declare class MetricsServerManager {
|
|
|
952
952
|
* @param key - Server key (optional, uses default if not provided)
|
|
953
953
|
*/
|
|
954
954
|
getConfig(tenantId: string, key?: string): Promise<MetricsServerConfig>;
|
|
955
|
+
/**
|
|
956
|
+
* Ensure server configs are loaded from the store.
|
|
957
|
+
* Public wrapper around the internal lazy-loading mechanism.
|
|
958
|
+
* Safe to call multiple times — loading happens at most once.
|
|
959
|
+
*/
|
|
960
|
+
ensureLoaded(): Promise<void>;
|
|
955
961
|
/**
|
|
956
962
|
* Check if a metrics server is registered for a tenant
|
|
957
963
|
* @param tenantId - Tenant identifier
|
package/dist/index.js
CHANGED
|
@@ -5630,7 +5630,8 @@ function getTenantIdFromConfig2(exeConfig, getTenantId2) {
|
|
|
5630
5630
|
const runConfig = exeConfig?.configurable?.runConfig || {};
|
|
5631
5631
|
return runConfig.tenantId || (getTenantId2 ? getTenantId2() : "default");
|
|
5632
5632
|
}
|
|
5633
|
-
function filterServerKeysByTenant(serverKeys, tenantId, manager = metricsServerManager) {
|
|
5633
|
+
async function filterServerKeysByTenant(serverKeys, tenantId, manager = metricsServerManager) {
|
|
5634
|
+
await manager.ensureLoaded();
|
|
5634
5635
|
return serverKeys.filter((key) => {
|
|
5635
5636
|
return manager.hasServer(tenantId, key);
|
|
5636
5637
|
});
|
|
@@ -6408,6 +6409,14 @@ var MetricsServerManager = class _MetricsServerManager {
|
|
|
6408
6409
|
}
|
|
6409
6410
|
return config;
|
|
6410
6411
|
}
|
|
6412
|
+
/**
|
|
6413
|
+
* Ensure server configs are loaded from the store.
|
|
6414
|
+
* Public wrapper around the internal lazy-loading mechanism.
|
|
6415
|
+
* Safe to call multiple times — loading happens at most once.
|
|
6416
|
+
*/
|
|
6417
|
+
async ensureLoaded() {
|
|
6418
|
+
await this._ensureLoaded();
|
|
6419
|
+
}
|
|
6411
6420
|
/**
|
|
6412
6421
|
* Check if a metrics server is registered for a tenant
|
|
6413
6422
|
* @param tenantId - Tenant identifier
|
|
@@ -6548,7 +6557,7 @@ ${serverKeys.map(
|
|
|
6548
6557
|
if (connectAll) {
|
|
6549
6558
|
effectiveServerKeys = (await metricsServerManager.getServerKeys(tenantId)).map((s) => s.key);
|
|
6550
6559
|
}
|
|
6551
|
-
const filteredServerKeys = filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
6560
|
+
const filteredServerKeys = await filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
6552
6561
|
const runConfig = _exeConfig?.configurable?.runConfig || {};
|
|
6553
6562
|
const metricsDataSource = runConfig.metricsDataSource;
|
|
6554
6563
|
if (metricsDataSource) {
|
|
@@ -6667,7 +6676,7 @@ ${serverKeys.map(
|
|
|
6667
6676
|
if (connectAll) {
|
|
6668
6677
|
effectiveServerKeys = (await metricsServerManager.getServerKeys(tenantId)).map((s) => s.key);
|
|
6669
6678
|
}
|
|
6670
|
-
const filteredServerKeys = filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
6679
|
+
const filteredServerKeys = await filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
6671
6680
|
const runConfig = _exeConfig?.configurable?.runConfig || {};
|
|
6672
6681
|
const metricsDataSource = runConfig.metricsDataSource;
|
|
6673
6682
|
const serverKey = metricsDataSource?.serverKey || inputServerKey;
|
|
@@ -6825,7 +6834,7 @@ ${serverKeys.map(
|
|
|
6825
6834
|
if (connectAll) {
|
|
6826
6835
|
effectiveServerKeys = (await metricsServerManager.getServerKeys(tenantId)).map((s) => s.key);
|
|
6827
6836
|
}
|
|
6828
|
-
const filteredServerKeys = filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
6837
|
+
const filteredServerKeys = await filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
6829
6838
|
const runConfig = _exeConfig?.configurable?.runConfig || {};
|
|
6830
6839
|
const metricsDataSource = runConfig.metricsDataSource;
|
|
6831
6840
|
const serverKey = metricsDataSource?.serverKey || inputServerKey;
|
|
@@ -7061,7 +7070,7 @@ ${serverKeys.map(
|
|
|
7061
7070
|
if (connectAll) {
|
|
7062
7071
|
effectiveServerKeys = (await metricsServerManager.getServerKeys(tenantId)).map((s) => s.key);
|
|
7063
7072
|
}
|
|
7064
|
-
const filteredServerKeys = filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
7073
|
+
const filteredServerKeys = await filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
7065
7074
|
const runConfig = _exeConfig?.configurable?.runConfig || {};
|
|
7066
7075
|
const metricsDataSource = runConfig.metricsDataSource;
|
|
7067
7076
|
const serverKey = metricsDataSource?.serverKey || inputServerKey;
|
|
@@ -7142,7 +7151,7 @@ ${serverKeys.map(
|
|
|
7142
7151
|
if (connectAll) {
|
|
7143
7152
|
effectiveServerKeys = (await metricsServerManager.getServerKeys(tenantId)).map((s) => s.key);
|
|
7144
7153
|
}
|
|
7145
|
-
const filteredServerKeys = filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
7154
|
+
const filteredServerKeys = await filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
7146
7155
|
const runConfig = _exeConfig?.configurable?.runConfig || {};
|
|
7147
7156
|
const metricsDataSource = runConfig.metricsDataSource;
|
|
7148
7157
|
const serverKey = metricsDataSource?.serverKey || inputServerKey;
|
|
@@ -7247,7 +7256,7 @@ ${serverKeys.map(
|
|
|
7247
7256
|
if (connectAll) {
|
|
7248
7257
|
effectiveServerKeys = (await metricsServerManager.getServerKeys(tenantId)).map((s) => s.key);
|
|
7249
7258
|
}
|
|
7250
|
-
const filteredServerKeys = filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
7259
|
+
const filteredServerKeys = await filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
7251
7260
|
const runConfig = _exeConfig?.configurable?.runConfig || {};
|
|
7252
7261
|
const metricsDataSource = runConfig.metricsDataSource;
|
|
7253
7262
|
const serverKey = metricsDataSource?.serverKey || inputServerKey;
|
|
@@ -7387,7 +7396,7 @@ ${serverKeys.map(
|
|
|
7387
7396
|
if (connectAll) {
|
|
7388
7397
|
effectiveServerKeys = (await metricsServerManager.getServerKeys(tenantId)).map((s) => s.key);
|
|
7389
7398
|
}
|
|
7390
|
-
const filteredServerKeys = filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
7399
|
+
const filteredServerKeys = await filterServerKeysByTenant(effectiveServerKeys, tenantId);
|
|
7391
7400
|
const runConfig = _exeConfig?.configurable?.runConfig || {};
|
|
7392
7401
|
const metricsDataSource = runConfig.metricsDataSource;
|
|
7393
7402
|
const serverKey = metricsDataSource?.serverKey || inputServerKey;
|
|
@@ -7448,7 +7457,9 @@ var VolumeFilesystem = class {
|
|
|
7448
7457
|
this.mountPrefix = mountPrefix;
|
|
7449
7458
|
}
|
|
7450
7459
|
async lsInfo(path3) {
|
|
7460
|
+
console.log(`[VolumeFilesystem.lsInfo] path=${path3} mountPrefix=${this.mountPrefix}`);
|
|
7451
7461
|
const entries = await this.client.list(path3);
|
|
7462
|
+
console.log(`[VolumeFilesystem.lsInfo] got ${entries.length} entries`);
|
|
7452
7463
|
const prefix = this.mountPrefix.endsWith("/") ? this.mountPrefix : this.mountPrefix + "/";
|
|
7453
7464
|
return entries.map((entry) => ({
|
|
7454
7465
|
path: entry.path.startsWith("/") ? entry.path : prefix + entry.path,
|
|
@@ -7640,30 +7651,45 @@ var SandboxLatticeManager = class _SandboxLatticeManager extends BaseLatticeMana
|
|
|
7640
7651
|
async getVolumeBackendForPath(config, filePath) {
|
|
7641
7652
|
const provider = this._requireProvider();
|
|
7642
7653
|
if (!provider.createVolumeFsClient) {
|
|
7654
|
+
console.log(`[getVolumeBackendForPath] provider has no createVolumeFsClient, returning null`);
|
|
7643
7655
|
return null;
|
|
7644
7656
|
}
|
|
7645
7657
|
const tenantId = config.tenantId ?? "default";
|
|
7646
7658
|
const mapping = this._resolveVolumeForPath(config, tenantId, filePath);
|
|
7647
|
-
if (!mapping)
|
|
7659
|
+
if (!mapping) {
|
|
7660
|
+
console.log(`[getVolumeBackendForPath] no volume mapping for path=${filePath}`);
|
|
7661
|
+
return null;
|
|
7662
|
+
}
|
|
7663
|
+
console.log(`[getVolumeBackendForPath] path=${filePath} volume=${mapping.volumeName} prefix=${mapping.pathPrefix}`);
|
|
7648
7664
|
const client = provider.createVolumeFsClient(mapping.volumeName, mapping.pathPrefix);
|
|
7649
7665
|
return new VolumeFilesystem(stripPrefixClient(client, mapping.pathPrefix), mapping.pathPrefix);
|
|
7650
7666
|
}
|
|
7651
7667
|
_resolveVolumeForPath(config, tenantId, filePath) {
|
|
7652
7668
|
const normalized = normalizeExternalSandboxPath(filePath);
|
|
7669
|
+
console.log(`[_resolveVolumeForPath] filePath=${filePath} normalized=${normalized} assistant_id=${config.assistant_id} projectId=${config.projectId}`);
|
|
7653
7670
|
if (normalized === "/root/.agents" || normalized.startsWith("/root/.agents/")) {
|
|
7671
|
+
console.log(`[_resolveVolumeForPath] \u2192 skills volume`);
|
|
7654
7672
|
return {
|
|
7655
7673
|
volumeName: buildNamedVolumeName("s", "skills", tenantId),
|
|
7656
7674
|
pathPrefix: "/root/.agents"
|
|
7657
7675
|
};
|
|
7658
7676
|
}
|
|
7659
7677
|
if (normalized === "/agent" || normalized.startsWith("/agent/")) {
|
|
7660
|
-
if (!config.assistant_id)
|
|
7678
|
+
if (!config.assistant_id) {
|
|
7679
|
+
console.log(`[_resolveVolumeForPath] agent volume but no assistant_id, returning null`);
|
|
7680
|
+
return null;
|
|
7681
|
+
}
|
|
7682
|
+
console.log(`[_resolveVolumeForPath] \u2192 agent volume`);
|
|
7661
7683
|
return {
|
|
7662
7684
|
volumeName: buildNamedVolumeName("a", "agent", tenantId, config.assistant_id),
|
|
7663
7685
|
pathPrefix: "/agent"
|
|
7664
7686
|
};
|
|
7665
7687
|
}
|
|
7666
|
-
if (!config.projectId)
|
|
7688
|
+
if (!config.projectId) {
|
|
7689
|
+
console.log(`[_resolveVolumeForPath] project volume but no projectId, returning null`);
|
|
7690
|
+
return null;
|
|
7691
|
+
}
|
|
7692
|
+
console.log(`[_resolveVolumeForPath] \u2192 project volume`);
|
|
7667
7693
|
return {
|
|
7668
7694
|
volumeName: buildNamedVolumeName("p", "project", tenantId, config.workspaceId, config.projectId),
|
|
7669
7695
|
pathPrefix: "/project"
|
|
@@ -15640,10 +15666,12 @@ var SandboxFilesystem = class {
|
|
|
15640
15666
|
}
|
|
15641
15667
|
async lsInfo(dirPath) {
|
|
15642
15668
|
try {
|
|
15669
|
+
console.log(`[SandboxFilesystem.lsInfo] calling sandbox.file.listPath(${dirPath})`);
|
|
15643
15670
|
const result = await this.sandbox.file.listPath(dirPath, { recursive: false });
|
|
15671
|
+
console.log(`[SandboxFilesystem.lsInfo] got ${result.files.length} entries`);
|
|
15644
15672
|
return result.files;
|
|
15645
15673
|
} catch (e) {
|
|
15646
|
-
console.error(`
|
|
15674
|
+
console.error(`[SandboxFilesystem.lsInfo] error listing ${dirPath}:`, e);
|
|
15647
15675
|
return [];
|
|
15648
15676
|
}
|
|
15649
15677
|
}
|