@axiom-lattice/core 2.1.29 → 2.1.30
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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +118 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +118 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ import { BaseLanguageModelInput, LanguageModelLike } from '@langchain/core/langu
|
|
|
6
6
|
import { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
|
|
7
7
|
import { ChatResult } from '@langchain/core/outputs';
|
|
8
8
|
import * as _axiom_lattice_protocols from '@axiom-lattice/protocols';
|
|
9
|
-
import { LLMConfig, SemanticMetricsServerConfig, MetricMeta, MetricQueryResult, DataSource, SemanticMetricsQueryRequest, SemanticMetricsQueryResponse, ExecuteSqlQueryRequest, ExecuteSqlQueryResponse, MetricsServerType, MetricsServerConfig, ToolConfig, ToolExecutor, AgentConfig, MiddlewareType, GraphBuildOptions, MessageChunk, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, ThreadStore, AssistantStore, SkillStore, WorkspaceStore, ProjectStore, DatabaseConfigStore, MetricsServerConfigStore, UserStore, TenantStore, UserTenantLinkStore, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, Skill, CreateSkillRequest, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, User, CreateUserRequest, UpdateUserRequest, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient } from '@axiom-lattice/protocols';
|
|
9
|
+
import { LLMConfig, SemanticMetricsServerConfig, MetricMeta, MetricQueryResult, DataSource, SemanticMetricsQueryRequest, SemanticMetricsQueryResponse, ExecuteSqlQueryRequest, ExecuteSqlQueryResponse, MetricsServerType, MetricsServerConfig, ToolConfig, ToolExecutor, AgentConfig, MiddlewareType, GraphBuildOptions, MessageChunk, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, ThreadStore, AssistantStore, SkillStore, WorkspaceStore, ProjectStore, DatabaseConfigStore, MetricsServerConfigStore, McpServerConfigStore, UserStore, TenantStore, UserTenantLinkStore, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, Skill, CreateSkillRequest, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, User, CreateUserRequest, UpdateUserRequest, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient } from '@axiom-lattice/protocols';
|
|
10
10
|
export { _axiom_lattice_protocols as Protocols };
|
|
11
11
|
export { AgentConfig, AgentType, GraphBuildOptions, MemoryType } from '@axiom-lattice/protocols';
|
|
12
12
|
import * as langchain from 'langchain';
|
|
@@ -1922,6 +1922,7 @@ type StoreTypeMap = {
|
|
|
1922
1922
|
project: ProjectStore;
|
|
1923
1923
|
database: DatabaseConfigStore;
|
|
1924
1924
|
metrics: MetricsServerConfigStore;
|
|
1925
|
+
mcp: McpServerConfigStore;
|
|
1925
1926
|
user: UserStore;
|
|
1926
1927
|
tenant: TenantStore;
|
|
1927
1928
|
userTenantLink: UserTenantLinkStore;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { BaseLanguageModelInput, LanguageModelLike } from '@langchain/core/langu
|
|
|
6
6
|
import { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
|
|
7
7
|
import { ChatResult } from '@langchain/core/outputs';
|
|
8
8
|
import * as _axiom_lattice_protocols from '@axiom-lattice/protocols';
|
|
9
|
-
import { LLMConfig, SemanticMetricsServerConfig, MetricMeta, MetricQueryResult, DataSource, SemanticMetricsQueryRequest, SemanticMetricsQueryResponse, ExecuteSqlQueryRequest, ExecuteSqlQueryResponse, MetricsServerType, MetricsServerConfig, ToolConfig, ToolExecutor, AgentConfig, MiddlewareType, GraphBuildOptions, MessageChunk, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, ThreadStore, AssistantStore, SkillStore, WorkspaceStore, ProjectStore, DatabaseConfigStore, MetricsServerConfigStore, UserStore, TenantStore, UserTenantLinkStore, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, Skill, CreateSkillRequest, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, User, CreateUserRequest, UpdateUserRequest, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient } from '@axiom-lattice/protocols';
|
|
9
|
+
import { LLMConfig, SemanticMetricsServerConfig, MetricMeta, MetricQueryResult, DataSource, SemanticMetricsQueryRequest, SemanticMetricsQueryResponse, ExecuteSqlQueryRequest, ExecuteSqlQueryResponse, MetricsServerType, MetricsServerConfig, ToolConfig, ToolExecutor, AgentConfig, MiddlewareType, GraphBuildOptions, MessageChunk, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, ThreadStore, AssistantStore, SkillStore, WorkspaceStore, ProjectStore, DatabaseConfigStore, MetricsServerConfigStore, McpServerConfigStore, UserStore, TenantStore, UserTenantLinkStore, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, Skill, CreateSkillRequest, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, User, CreateUserRequest, UpdateUserRequest, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient } from '@axiom-lattice/protocols';
|
|
10
10
|
export { _axiom_lattice_protocols as Protocols };
|
|
11
11
|
export { AgentConfig, AgentType, GraphBuildOptions, MemoryType } from '@axiom-lattice/protocols';
|
|
12
12
|
import * as langchain from 'langchain';
|
|
@@ -1922,6 +1922,7 @@ type StoreTypeMap = {
|
|
|
1922
1922
|
project: ProjectStore;
|
|
1923
1923
|
database: DatabaseConfigStore;
|
|
1924
1924
|
metrics: MetricsServerConfigStore;
|
|
1925
|
+
mcp: McpServerConfigStore;
|
|
1925
1926
|
user: UserStore;
|
|
1926
1927
|
tenant: TenantStore;
|
|
1927
1928
|
userTenantLink: UserTenantLinkStore;
|
package/dist/index.js
CHANGED
|
@@ -5930,6 +5930,122 @@ var InMemoryMetricsServerConfigStore = class {
|
|
|
5930
5930
|
}
|
|
5931
5931
|
};
|
|
5932
5932
|
|
|
5933
|
+
// src/store_lattice/InMemoryMcpServerConfigStore.ts
|
|
5934
|
+
var InMemoryMcpServerConfigStore = class {
|
|
5935
|
+
constructor() {
|
|
5936
|
+
this.configs = /* @__PURE__ */ new Map();
|
|
5937
|
+
}
|
|
5938
|
+
/**
|
|
5939
|
+
* Get composite key for storage
|
|
5940
|
+
*/
|
|
5941
|
+
getKey(tenantId, id) {
|
|
5942
|
+
return `${tenantId}:${id}`;
|
|
5943
|
+
}
|
|
5944
|
+
/**
|
|
5945
|
+
* Get all MCP server configurations for a tenant
|
|
5946
|
+
*/
|
|
5947
|
+
async getAllConfigs(tenantId) {
|
|
5948
|
+
return Array.from(this.configs.values()).filter(
|
|
5949
|
+
(config) => config.tenantId === tenantId
|
|
5950
|
+
);
|
|
5951
|
+
}
|
|
5952
|
+
/**
|
|
5953
|
+
* Get all MCP server configurations across all tenants
|
|
5954
|
+
*/
|
|
5955
|
+
async getAllConfigsWithoutTenant() {
|
|
5956
|
+
return Array.from(this.configs.values());
|
|
5957
|
+
}
|
|
5958
|
+
/**
|
|
5959
|
+
* Get MCP server configuration by ID
|
|
5960
|
+
*/
|
|
5961
|
+
async getConfigById(tenantId, id) {
|
|
5962
|
+
const key = this.getKey(tenantId, id);
|
|
5963
|
+
return this.configs.get(key) || null;
|
|
5964
|
+
}
|
|
5965
|
+
/**
|
|
5966
|
+
* Get MCP server configuration by business key
|
|
5967
|
+
*/
|
|
5968
|
+
async getConfigByKey(tenantId, key) {
|
|
5969
|
+
const configs = await this.getAllConfigs(tenantId);
|
|
5970
|
+
return configs.find((config) => config.key === key) || null;
|
|
5971
|
+
}
|
|
5972
|
+
/**
|
|
5973
|
+
* Create a new MCP server configuration
|
|
5974
|
+
*/
|
|
5975
|
+
async createConfig(tenantId, id, data) {
|
|
5976
|
+
const now = /* @__PURE__ */ new Date();
|
|
5977
|
+
const entry = {
|
|
5978
|
+
id,
|
|
5979
|
+
tenantId,
|
|
5980
|
+
key: data.key,
|
|
5981
|
+
config: data.config,
|
|
5982
|
+
selectedTools: data.selectedTools || [],
|
|
5983
|
+
isEnvEncrypted: false,
|
|
5984
|
+
status: "disconnected",
|
|
5985
|
+
name: data.name,
|
|
5986
|
+
description: data.description,
|
|
5987
|
+
createdAt: now,
|
|
5988
|
+
updatedAt: now
|
|
5989
|
+
};
|
|
5990
|
+
const storageKey = this.getKey(tenantId, id);
|
|
5991
|
+
this.configs.set(storageKey, entry);
|
|
5992
|
+
return entry;
|
|
5993
|
+
}
|
|
5994
|
+
/**
|
|
5995
|
+
* Update an existing MCP server configuration
|
|
5996
|
+
*/
|
|
5997
|
+
async updateConfig(tenantId, id, updates) {
|
|
5998
|
+
const key = this.getKey(tenantId, id);
|
|
5999
|
+
const existing = this.configs.get(key);
|
|
6000
|
+
if (!existing) {
|
|
6001
|
+
return null;
|
|
6002
|
+
}
|
|
6003
|
+
const updated = {
|
|
6004
|
+
...existing,
|
|
6005
|
+
...updates,
|
|
6006
|
+
config: updates.config ? { ...existing.config, ...updates.config } : existing.config,
|
|
6007
|
+
key: updates.key || existing.key,
|
|
6008
|
+
name: updates.name !== void 0 ? updates.name : existing.name,
|
|
6009
|
+
description: updates.description !== void 0 ? updates.description : existing.description,
|
|
6010
|
+
selectedTools: updates.selectedTools !== void 0 ? updates.selectedTools : existing.selectedTools,
|
|
6011
|
+
status: updates.status !== void 0 ? updates.status : existing.status,
|
|
6012
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
6013
|
+
};
|
|
6014
|
+
this.configs.set(key, updated);
|
|
6015
|
+
return updated;
|
|
6016
|
+
}
|
|
6017
|
+
/**
|
|
6018
|
+
* Delete a MCP server configuration by ID
|
|
6019
|
+
*/
|
|
6020
|
+
async deleteConfig(tenantId, id) {
|
|
6021
|
+
const key = this.getKey(tenantId, id);
|
|
6022
|
+
return this.configs.delete(key);
|
|
6023
|
+
}
|
|
6024
|
+
/**
|
|
6025
|
+
* Check if configuration exists
|
|
6026
|
+
*/
|
|
6027
|
+
async hasConfig(tenantId, id) {
|
|
6028
|
+
const key = this.getKey(tenantId, id);
|
|
6029
|
+
return this.configs.has(key);
|
|
6030
|
+
}
|
|
6031
|
+
/**
|
|
6032
|
+
* Clear all configurations (useful for testing)
|
|
6033
|
+
*/
|
|
6034
|
+
clear() {
|
|
6035
|
+
this.configs.clear();
|
|
6036
|
+
}
|
|
6037
|
+
/**
|
|
6038
|
+
* Clear configurations for a specific tenant
|
|
6039
|
+
*/
|
|
6040
|
+
clearByTenant(tenantId) {
|
|
6041
|
+
for (const key of this.configs.keys()) {
|
|
6042
|
+
if (key.startsWith(`${tenantId}:`)) {
|
|
6043
|
+
this.configs.delete(key);
|
|
6044
|
+
}
|
|
6045
|
+
}
|
|
6046
|
+
}
|
|
6047
|
+
};
|
|
6048
|
+
|
|
5933
6049
|
// src/store_lattice/InMemoryUserStore.ts
|
|
5934
6050
|
var InMemoryUserStore = class {
|
|
5935
6051
|
constructor() {
|
|
@@ -6235,6 +6351,7 @@ var defaultWorkspaceStore = new InMemoryWorkspaceStore();
|
|
|
6235
6351
|
var defaultProjectStore = new InMemoryProjectStore();
|
|
6236
6352
|
var defaultDatabaseConfigStore = new InMemoryDatabaseConfigStore();
|
|
6237
6353
|
var defaultMetricsServerConfigStore = new InMemoryMetricsServerConfigStore();
|
|
6354
|
+
var defaultMcpServerConfigStore = new InMemoryMcpServerConfigStore();
|
|
6238
6355
|
storeLatticeManager.registerLattice("default", "thread", defaultThreadStore);
|
|
6239
6356
|
storeLatticeManager.registerLattice(
|
|
6240
6357
|
"default",
|
|
@@ -6246,6 +6363,7 @@ storeLatticeManager.registerLattice("default", "workspace", defaultWorkspaceStor
|
|
|
6246
6363
|
storeLatticeManager.registerLattice("default", "project", defaultProjectStore);
|
|
6247
6364
|
storeLatticeManager.registerLattice("default", "database", defaultDatabaseConfigStore);
|
|
6248
6365
|
storeLatticeManager.registerLattice("default", "metrics", defaultMetricsServerConfigStore);
|
|
6366
|
+
storeLatticeManager.registerLattice("default", "mcp", defaultMcpServerConfigStore);
|
|
6249
6367
|
var defaultUserStore = new InMemoryUserStore();
|
|
6250
6368
|
var defaultTenantStore = new InMemoryTenantStore();
|
|
6251
6369
|
var defaultUserTenantLinkStore = new InMemoryUserTenantLinkStore();
|