@axiom-lattice/core 2.1.16 → 2.1.17
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 +158 -2
- package/dist/index.d.ts +158 -2
- package/dist/index.js +1830 -118
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1852 -148
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -3
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { BaseChatModel, BaseChatModelCallOptions } from '@langchain/core/languag
|
|
|
5
5
|
import { BaseLanguageModelInput } from '@langchain/core/language_models/base';
|
|
6
6
|
import { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
|
|
7
7
|
import { ChatResult } from '@langchain/core/outputs';
|
|
8
|
-
import { LLMConfig, ToolConfig, ToolExecutor, AgentConfig, GraphBuildOptions, MessageChunk, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, ThreadStore, AssistantStore, SkillStore, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, Skill, CreateSkillRequest, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient } from '@axiom-lattice/protocols';
|
|
8
|
+
import { LLMConfig, ToolConfig, ToolExecutor, AgentConfig, GraphBuildOptions, MessageChunk, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, ThreadStore, AssistantStore, SkillStore, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, Skill, CreateSkillRequest, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient, ConnectedSandboxConfig } from '@axiom-lattice/protocols';
|
|
9
9
|
import * as protocols from '@axiom-lattice/protocols';
|
|
10
10
|
export { protocols as Protocols };
|
|
11
11
|
export { AgentConfig, AgentType, GraphBuildOptions, MemoryType } from '@axiom-lattice/protocols';
|
|
@@ -17,6 +17,8 @@ import { BaseCheckpointSaver } from '@langchain/langgraph-checkpoint';
|
|
|
17
17
|
import { ReplaySubject } from 'rxjs';
|
|
18
18
|
import { Embeddings } from '@langchain/core/embeddings';
|
|
19
19
|
import { VectorStore } from '@langchain/core/vectorstores';
|
|
20
|
+
import { Connection, MultiServerMCPClient } from '@langchain/mcp-adapters';
|
|
21
|
+
import { SandboxClient } from '@agent-infra/sandbox';
|
|
20
22
|
|
|
21
23
|
/**
|
|
22
24
|
* BaseLatticeManager - 抽象基类,为各种Lattice管理器提供通用功能
|
|
@@ -440,6 +442,12 @@ declare class ToolLatticeManager extends BaseLatticeManager<ToolLattice> {
|
|
|
440
442
|
* 获取所有工具定义
|
|
441
443
|
*/
|
|
442
444
|
getAllToolDefinitions(): ToolDefinition[];
|
|
445
|
+
/**
|
|
446
|
+
* 注册已有的StructuredTool到Lattice
|
|
447
|
+
* @param key Lattice键名
|
|
448
|
+
* @param tool 已有的StructuredTool实例
|
|
449
|
+
*/
|
|
450
|
+
registerExistingTool(key: string, tool: StructuredTool): void;
|
|
443
451
|
/**
|
|
444
452
|
* 验证工具输入参数
|
|
445
453
|
* @param key Lattice键名
|
|
@@ -449,6 +457,7 @@ declare class ToolLatticeManager extends BaseLatticeManager<ToolLattice> {
|
|
|
449
457
|
}
|
|
450
458
|
declare const toolLatticeManager: ToolLatticeManager;
|
|
451
459
|
declare const registerToolLattice: (key: string, config: ToolConfig, executor: ToolExecutor) => void;
|
|
460
|
+
declare const registerExistingTool: (key: string, tool: StructuredTool) => void;
|
|
452
461
|
declare const getToolLattice: (key: string) => ToolLattice | undefined;
|
|
453
462
|
declare const getToolDefinition: (key: string) => ToolConfig;
|
|
454
463
|
declare const getToolClient: (key: string) => StructuredTool<_langchain_core_tools.ToolSchemaBase, any, any, any>;
|
|
@@ -1876,6 +1885,153 @@ declare function isValidSkillName(name: string): boolean;
|
|
|
1876
1885
|
*/
|
|
1877
1886
|
declare function validateSkillName(name: string): void;
|
|
1878
1887
|
|
|
1888
|
+
/**
|
|
1889
|
+
* McpLatticeManager
|
|
1890
|
+
*
|
|
1891
|
+
* MCP Lattice Manager - Manages MCP client connections using MultiServerMCPClient
|
|
1892
|
+
* Follows the singleton pattern for global access
|
|
1893
|
+
*/
|
|
1894
|
+
|
|
1895
|
+
interface McpServerInfo {
|
|
1896
|
+
name: string;
|
|
1897
|
+
connection: Connection;
|
|
1898
|
+
}
|
|
1899
|
+
interface McpLatticeInterface {
|
|
1900
|
+
client: MultiServerMCPClient;
|
|
1901
|
+
servers: Map<string, McpServerInfo>;
|
|
1902
|
+
}
|
|
1903
|
+
declare class McpLatticeManager extends BaseLatticeManager<McpLatticeInterface> {
|
|
1904
|
+
private static _instance;
|
|
1905
|
+
private client;
|
|
1906
|
+
private servers;
|
|
1907
|
+
static getInstance(): McpLatticeManager;
|
|
1908
|
+
protected getLatticeType(): string;
|
|
1909
|
+
registerServers(servers: McpServerInfo[]): void;
|
|
1910
|
+
addServer(name: string, connection: Connection): void;
|
|
1911
|
+
removeServer(name: string): boolean;
|
|
1912
|
+
connect(): Promise<void>;
|
|
1913
|
+
disconnect(): Promise<void>;
|
|
1914
|
+
isConnected(): boolean;
|
|
1915
|
+
getAllTools(): Promise<any[]>;
|
|
1916
|
+
getServerNames(): string[];
|
|
1917
|
+
hasServer(name: string): boolean;
|
|
1918
|
+
/**
|
|
1919
|
+
* 将 MCP 工具注册到 Tool Lattice
|
|
1920
|
+
* @param prefix 工具键名前缀,用于区分不同服务器的工具
|
|
1921
|
+
*/
|
|
1922
|
+
registerToolsToToolLattice(prefix?: string): Promise<void>;
|
|
1923
|
+
}
|
|
1924
|
+
declare const mcpManager: McpLatticeManager;
|
|
1925
|
+
|
|
1926
|
+
interface SandboxManagerProtocol {
|
|
1927
|
+
createSandbox(sandboxName: string): Promise<SandboxClient>;
|
|
1928
|
+
deleteSandbox(sandboxName: string): Promise<void>;
|
|
1929
|
+
getSandbox(sandboxName: string): Promise<SandboxClient>;
|
|
1930
|
+
listSandboxes(): Promise<SandboxClient[]>;
|
|
1931
|
+
getSandboxStatus(sandboxName: string): Promise<string>;
|
|
1932
|
+
getSandboxFromConfig(config: RunSandboxConfig): Promise<SandboxClient>;
|
|
1933
|
+
}
|
|
1934
|
+
interface RunSandboxConfig {
|
|
1935
|
+
assistant_id: string;
|
|
1936
|
+
sandboxConfig: ConnectedSandboxConfig;
|
|
1937
|
+
thread_id: string;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* SandboxLatticeManager
|
|
1942
|
+
*
|
|
1943
|
+
* Sandbox Lattice manager for registering and managing sandbox services
|
|
1944
|
+
* Supports creating, deleting, and managing sandbox instances
|
|
1945
|
+
*/
|
|
1946
|
+
|
|
1947
|
+
/**
|
|
1948
|
+
* SandboxLatticeManager - Singleton sandbox Lattice manager
|
|
1949
|
+
* Responsible for registering and managing various sandbox service Lattices
|
|
1950
|
+
*/
|
|
1951
|
+
declare class SandboxLatticeManager extends BaseLatticeManager<SandboxManagerProtocol> {
|
|
1952
|
+
private static _instance;
|
|
1953
|
+
/**
|
|
1954
|
+
* Get SandboxLatticeManager singleton instance
|
|
1955
|
+
*/
|
|
1956
|
+
static getInstance(): SandboxLatticeManager;
|
|
1957
|
+
/**
|
|
1958
|
+
* Get Lattice type prefix
|
|
1959
|
+
*/
|
|
1960
|
+
protected getLatticeType(): string;
|
|
1961
|
+
/**
|
|
1962
|
+
* Register sandbox Lattice
|
|
1963
|
+
* @param key Lattice key name
|
|
1964
|
+
* @param manager Optional sandbox manager. If not provided, will create a default one.
|
|
1965
|
+
* @param baseURL Base URL for sandbox service (used when creating default manager)
|
|
1966
|
+
*/
|
|
1967
|
+
registerLattice(key: string, config: {
|
|
1968
|
+
manager?: SandboxManagerProtocol;
|
|
1969
|
+
baseURL?: string;
|
|
1970
|
+
}): void;
|
|
1971
|
+
/**
|
|
1972
|
+
* Get SandboxLattice
|
|
1973
|
+
* @param key Lattice key name
|
|
1974
|
+
*/
|
|
1975
|
+
getSandboxLattice(key: string): SandboxManagerProtocol;
|
|
1976
|
+
/**
|
|
1977
|
+
* Get all Lattices
|
|
1978
|
+
*/
|
|
1979
|
+
getAllLattices(): SandboxManagerProtocol[];
|
|
1980
|
+
/**
|
|
1981
|
+
* Check if Lattice exists
|
|
1982
|
+
* @param key Lattice key name
|
|
1983
|
+
*/
|
|
1984
|
+
hasLattice(key: string): boolean;
|
|
1985
|
+
/**
|
|
1986
|
+
* Remove Lattice
|
|
1987
|
+
* @param key Lattice key name
|
|
1988
|
+
*/
|
|
1989
|
+
removeLattice(key: string): boolean;
|
|
1990
|
+
/**
|
|
1991
|
+
* Clear all Lattices
|
|
1992
|
+
*/
|
|
1993
|
+
clearLattices(): void;
|
|
1994
|
+
/**
|
|
1995
|
+
* Get Lattice count
|
|
1996
|
+
*/
|
|
1997
|
+
getLatticeCount(): number;
|
|
1998
|
+
/**
|
|
1999
|
+
* Get Lattice key list
|
|
2000
|
+
*/
|
|
2001
|
+
getLatticeKeys(): string[];
|
|
2002
|
+
}
|
|
2003
|
+
declare const sandboxLatticeManager: SandboxLatticeManager;
|
|
2004
|
+
declare const getSandBoxManager: (key?: string) => SandboxManagerProtocol;
|
|
2005
|
+
|
|
2006
|
+
/**
|
|
2007
|
+
* Sandbox name normalization utility
|
|
2008
|
+
*
|
|
2009
|
+
* Normalizes sandbox names to comply with RFC 1123 subdomain naming requirements:
|
|
2010
|
+
* - Only lowercase alphanumeric characters, '-' or '.'
|
|
2011
|
+
* - Must start and end with an alphanumeric character
|
|
2012
|
+
* - No underscores or other special characters
|
|
2013
|
+
*/
|
|
2014
|
+
/**
|
|
2015
|
+
* Normalize a sandbox name to be RFC 1123 compliant
|
|
2016
|
+
*
|
|
2017
|
+
* @param name - The sandbox name to normalize
|
|
2018
|
+
* @returns Normalized sandbox name that complies with RFC 1123 subdomain rules
|
|
2019
|
+
*
|
|
2020
|
+
* @example
|
|
2021
|
+
* normalizeSandboxName("sandbox_agent") // returns "sandbox-agent"
|
|
2022
|
+
* normalizeSandboxName("My-Sandbox") // returns "my-sandbox"
|
|
2023
|
+
* normalizeSandboxName("test.sandbox") // returns "test.sandbox"
|
|
2024
|
+
* normalizeSandboxName("_invalid_") // returns "invalid"
|
|
2025
|
+
*/
|
|
2026
|
+
declare function normalizeSandboxName(name: string): string;
|
|
2027
|
+
/**
|
|
2028
|
+
* Validate if a sandbox name is RFC 1123 compliant
|
|
2029
|
+
*
|
|
2030
|
+
* @param name - The sandbox name to validate
|
|
2031
|
+
* @returns true if the name is valid, false otherwise
|
|
2032
|
+
*/
|
|
2033
|
+
declare function isValidSandboxName(name: string): boolean;
|
|
2034
|
+
|
|
1879
2035
|
/**
|
|
1880
2036
|
* Event bus service
|
|
1881
2037
|
* Used for event publishing and subscription between internal system components
|
|
@@ -1933,4 +2089,4 @@ declare class AgentManager {
|
|
|
1933
2089
|
|
|
1934
2090
|
declare const AGENT_TASK_EVENT = "agent:execute";
|
|
1935
2091
|
|
|
1936
|
-
export { AGENT_TASK_EVENT, type AgentClient, type AgentLattice, AgentLatticeManager, AgentManager, type BufferStats, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, type ColumnInfo, ConsoleLoggerClient, type CronFields, type DatabaseConfig, type DatabaseType, DefaultScheduleClient, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, FileSystemSkillStore, type FileSystemSkillStoreOptions, type ISqlDatabase, InMemoryAssistantStore, InMemoryChunkBuffer, InMemoryThreadStore, type LoggerLattice, LoggerLatticeManager, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, PinoLoggerClient, PostgresDatabase, type QueryResult, type QueueLattice, QueueLatticeManager, type ScheduleLattice, ScheduleLatticeManager, type SkillLattice, SkillLatticeManager, SqlDatabaseManager, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, type TableInfo, type TableSchema, type ThreadBuffer, type ThreadBufferConfig, ThreadStatus, type ToolDefinition, type ToolLattice, ToolLatticeManager, type VectorStoreLatticeInterface, VectorStoreLatticeManager, agentLatticeManager, describeCronExpression, embeddingsLatticeManager, eventBus, eventBus as eventBusDefault, getAgentClient, getAgentConfig, getAgentLattice, getAllAgentConfigs, getAllToolDefinitions, getCheckpointSaver, getChunkBuffer, getEmbeddingsClient, getEmbeddingsLattice, getLoggerLattice, getModelLattice, getNextCronTime, getQueueLattice, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, hasChunkBuffer, isValidCronExpression, isValidSkillName, loggerLatticeManager, modelLatticeManager, parseCronExpression, queueLatticeManager, registerAgentLattice, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerScheduleLattice, registerStoreLattice, registerToolLattice, registerVectorStoreLattice, scheduleLatticeManager, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toolLatticeManager, validateAgentInput, validateSkillName, validateToolInput, vectorStoreLatticeManager };
|
|
2092
|
+
export { AGENT_TASK_EVENT, type AgentClient, type AgentLattice, AgentLatticeManager, AgentManager, type BufferStats, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, type ColumnInfo, ConsoleLoggerClient, type CronFields, type DatabaseConfig, type DatabaseType, DefaultScheduleClient, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, FileSystemSkillStore, type FileSystemSkillStoreOptions, type ISqlDatabase, InMemoryAssistantStore, InMemoryChunkBuffer, InMemoryThreadStore, type LoggerLattice, LoggerLatticeManager, type McpLatticeInterface, McpLatticeManager, type McpServerInfo, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, PinoLoggerClient, PostgresDatabase, type QueryResult, type QueueLattice, QueueLatticeManager, type RunSandboxConfig, SandboxLatticeManager, type SandboxManagerProtocol, type ScheduleLattice, ScheduleLatticeManager, type SkillLattice, SkillLatticeManager, SqlDatabaseManager, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, type TableInfo, type TableSchema, type ThreadBuffer, type ThreadBufferConfig, ThreadStatus, type ToolDefinition, type ToolLattice, ToolLatticeManager, type VectorStoreLatticeInterface, VectorStoreLatticeManager, agentLatticeManager, describeCronExpression, embeddingsLatticeManager, eventBus, eventBus as eventBusDefault, getAgentClient, getAgentConfig, getAgentLattice, getAllAgentConfigs, getAllToolDefinitions, getCheckpointSaver, getChunkBuffer, getEmbeddingsClient, getEmbeddingsLattice, getLoggerLattice, getModelLattice, getNextCronTime, getQueueLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, hasChunkBuffer, isValidCronExpression, isValidSandboxName, isValidSkillName, loggerLatticeManager, mcpManager, modelLatticeManager, normalizeSandboxName, parseCronExpression, queueLatticeManager, registerAgentLattice, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerScheduleLattice, registerStoreLattice, registerToolLattice, registerVectorStoreLattice, sandboxLatticeManager, scheduleLatticeManager, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toolLatticeManager, validateAgentInput, validateSkillName, validateToolInput, vectorStoreLatticeManager };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { BaseChatModel, BaseChatModelCallOptions } from '@langchain/core/languag
|
|
|
5
5
|
import { BaseLanguageModelInput } from '@langchain/core/language_models/base';
|
|
6
6
|
import { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
|
|
7
7
|
import { ChatResult } from '@langchain/core/outputs';
|
|
8
|
-
import { LLMConfig, ToolConfig, ToolExecutor, AgentConfig, GraphBuildOptions, MessageChunk, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, ThreadStore, AssistantStore, SkillStore, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, Skill, CreateSkillRequest, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient } from '@axiom-lattice/protocols';
|
|
8
|
+
import { LLMConfig, ToolConfig, ToolExecutor, AgentConfig, GraphBuildOptions, MessageChunk, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, ThreadStore, AssistantStore, SkillStore, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, Skill, CreateSkillRequest, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient, ConnectedSandboxConfig } from '@axiom-lattice/protocols';
|
|
9
9
|
import * as protocols from '@axiom-lattice/protocols';
|
|
10
10
|
export { protocols as Protocols };
|
|
11
11
|
export { AgentConfig, AgentType, GraphBuildOptions, MemoryType } from '@axiom-lattice/protocols';
|
|
@@ -17,6 +17,8 @@ import { BaseCheckpointSaver } from '@langchain/langgraph-checkpoint';
|
|
|
17
17
|
import { ReplaySubject } from 'rxjs';
|
|
18
18
|
import { Embeddings } from '@langchain/core/embeddings';
|
|
19
19
|
import { VectorStore } from '@langchain/core/vectorstores';
|
|
20
|
+
import { Connection, MultiServerMCPClient } from '@langchain/mcp-adapters';
|
|
21
|
+
import { SandboxClient } from '@agent-infra/sandbox';
|
|
20
22
|
|
|
21
23
|
/**
|
|
22
24
|
* BaseLatticeManager - 抽象基类,为各种Lattice管理器提供通用功能
|
|
@@ -440,6 +442,12 @@ declare class ToolLatticeManager extends BaseLatticeManager<ToolLattice> {
|
|
|
440
442
|
* 获取所有工具定义
|
|
441
443
|
*/
|
|
442
444
|
getAllToolDefinitions(): ToolDefinition[];
|
|
445
|
+
/**
|
|
446
|
+
* 注册已有的StructuredTool到Lattice
|
|
447
|
+
* @param key Lattice键名
|
|
448
|
+
* @param tool 已有的StructuredTool实例
|
|
449
|
+
*/
|
|
450
|
+
registerExistingTool(key: string, tool: StructuredTool): void;
|
|
443
451
|
/**
|
|
444
452
|
* 验证工具输入参数
|
|
445
453
|
* @param key Lattice键名
|
|
@@ -449,6 +457,7 @@ declare class ToolLatticeManager extends BaseLatticeManager<ToolLattice> {
|
|
|
449
457
|
}
|
|
450
458
|
declare const toolLatticeManager: ToolLatticeManager;
|
|
451
459
|
declare const registerToolLattice: (key: string, config: ToolConfig, executor: ToolExecutor) => void;
|
|
460
|
+
declare const registerExistingTool: (key: string, tool: StructuredTool) => void;
|
|
452
461
|
declare const getToolLattice: (key: string) => ToolLattice | undefined;
|
|
453
462
|
declare const getToolDefinition: (key: string) => ToolConfig;
|
|
454
463
|
declare const getToolClient: (key: string) => StructuredTool<_langchain_core_tools.ToolSchemaBase, any, any, any>;
|
|
@@ -1876,6 +1885,153 @@ declare function isValidSkillName(name: string): boolean;
|
|
|
1876
1885
|
*/
|
|
1877
1886
|
declare function validateSkillName(name: string): void;
|
|
1878
1887
|
|
|
1888
|
+
/**
|
|
1889
|
+
* McpLatticeManager
|
|
1890
|
+
*
|
|
1891
|
+
* MCP Lattice Manager - Manages MCP client connections using MultiServerMCPClient
|
|
1892
|
+
* Follows the singleton pattern for global access
|
|
1893
|
+
*/
|
|
1894
|
+
|
|
1895
|
+
interface McpServerInfo {
|
|
1896
|
+
name: string;
|
|
1897
|
+
connection: Connection;
|
|
1898
|
+
}
|
|
1899
|
+
interface McpLatticeInterface {
|
|
1900
|
+
client: MultiServerMCPClient;
|
|
1901
|
+
servers: Map<string, McpServerInfo>;
|
|
1902
|
+
}
|
|
1903
|
+
declare class McpLatticeManager extends BaseLatticeManager<McpLatticeInterface> {
|
|
1904
|
+
private static _instance;
|
|
1905
|
+
private client;
|
|
1906
|
+
private servers;
|
|
1907
|
+
static getInstance(): McpLatticeManager;
|
|
1908
|
+
protected getLatticeType(): string;
|
|
1909
|
+
registerServers(servers: McpServerInfo[]): void;
|
|
1910
|
+
addServer(name: string, connection: Connection): void;
|
|
1911
|
+
removeServer(name: string): boolean;
|
|
1912
|
+
connect(): Promise<void>;
|
|
1913
|
+
disconnect(): Promise<void>;
|
|
1914
|
+
isConnected(): boolean;
|
|
1915
|
+
getAllTools(): Promise<any[]>;
|
|
1916
|
+
getServerNames(): string[];
|
|
1917
|
+
hasServer(name: string): boolean;
|
|
1918
|
+
/**
|
|
1919
|
+
* 将 MCP 工具注册到 Tool Lattice
|
|
1920
|
+
* @param prefix 工具键名前缀,用于区分不同服务器的工具
|
|
1921
|
+
*/
|
|
1922
|
+
registerToolsToToolLattice(prefix?: string): Promise<void>;
|
|
1923
|
+
}
|
|
1924
|
+
declare const mcpManager: McpLatticeManager;
|
|
1925
|
+
|
|
1926
|
+
interface SandboxManagerProtocol {
|
|
1927
|
+
createSandbox(sandboxName: string): Promise<SandboxClient>;
|
|
1928
|
+
deleteSandbox(sandboxName: string): Promise<void>;
|
|
1929
|
+
getSandbox(sandboxName: string): Promise<SandboxClient>;
|
|
1930
|
+
listSandboxes(): Promise<SandboxClient[]>;
|
|
1931
|
+
getSandboxStatus(sandboxName: string): Promise<string>;
|
|
1932
|
+
getSandboxFromConfig(config: RunSandboxConfig): Promise<SandboxClient>;
|
|
1933
|
+
}
|
|
1934
|
+
interface RunSandboxConfig {
|
|
1935
|
+
assistant_id: string;
|
|
1936
|
+
sandboxConfig: ConnectedSandboxConfig;
|
|
1937
|
+
thread_id: string;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* SandboxLatticeManager
|
|
1942
|
+
*
|
|
1943
|
+
* Sandbox Lattice manager for registering and managing sandbox services
|
|
1944
|
+
* Supports creating, deleting, and managing sandbox instances
|
|
1945
|
+
*/
|
|
1946
|
+
|
|
1947
|
+
/**
|
|
1948
|
+
* SandboxLatticeManager - Singleton sandbox Lattice manager
|
|
1949
|
+
* Responsible for registering and managing various sandbox service Lattices
|
|
1950
|
+
*/
|
|
1951
|
+
declare class SandboxLatticeManager extends BaseLatticeManager<SandboxManagerProtocol> {
|
|
1952
|
+
private static _instance;
|
|
1953
|
+
/**
|
|
1954
|
+
* Get SandboxLatticeManager singleton instance
|
|
1955
|
+
*/
|
|
1956
|
+
static getInstance(): SandboxLatticeManager;
|
|
1957
|
+
/**
|
|
1958
|
+
* Get Lattice type prefix
|
|
1959
|
+
*/
|
|
1960
|
+
protected getLatticeType(): string;
|
|
1961
|
+
/**
|
|
1962
|
+
* Register sandbox Lattice
|
|
1963
|
+
* @param key Lattice key name
|
|
1964
|
+
* @param manager Optional sandbox manager. If not provided, will create a default one.
|
|
1965
|
+
* @param baseURL Base URL for sandbox service (used when creating default manager)
|
|
1966
|
+
*/
|
|
1967
|
+
registerLattice(key: string, config: {
|
|
1968
|
+
manager?: SandboxManagerProtocol;
|
|
1969
|
+
baseURL?: string;
|
|
1970
|
+
}): void;
|
|
1971
|
+
/**
|
|
1972
|
+
* Get SandboxLattice
|
|
1973
|
+
* @param key Lattice key name
|
|
1974
|
+
*/
|
|
1975
|
+
getSandboxLattice(key: string): SandboxManagerProtocol;
|
|
1976
|
+
/**
|
|
1977
|
+
* Get all Lattices
|
|
1978
|
+
*/
|
|
1979
|
+
getAllLattices(): SandboxManagerProtocol[];
|
|
1980
|
+
/**
|
|
1981
|
+
* Check if Lattice exists
|
|
1982
|
+
* @param key Lattice key name
|
|
1983
|
+
*/
|
|
1984
|
+
hasLattice(key: string): boolean;
|
|
1985
|
+
/**
|
|
1986
|
+
* Remove Lattice
|
|
1987
|
+
* @param key Lattice key name
|
|
1988
|
+
*/
|
|
1989
|
+
removeLattice(key: string): boolean;
|
|
1990
|
+
/**
|
|
1991
|
+
* Clear all Lattices
|
|
1992
|
+
*/
|
|
1993
|
+
clearLattices(): void;
|
|
1994
|
+
/**
|
|
1995
|
+
* Get Lattice count
|
|
1996
|
+
*/
|
|
1997
|
+
getLatticeCount(): number;
|
|
1998
|
+
/**
|
|
1999
|
+
* Get Lattice key list
|
|
2000
|
+
*/
|
|
2001
|
+
getLatticeKeys(): string[];
|
|
2002
|
+
}
|
|
2003
|
+
declare const sandboxLatticeManager: SandboxLatticeManager;
|
|
2004
|
+
declare const getSandBoxManager: (key?: string) => SandboxManagerProtocol;
|
|
2005
|
+
|
|
2006
|
+
/**
|
|
2007
|
+
* Sandbox name normalization utility
|
|
2008
|
+
*
|
|
2009
|
+
* Normalizes sandbox names to comply with RFC 1123 subdomain naming requirements:
|
|
2010
|
+
* - Only lowercase alphanumeric characters, '-' or '.'
|
|
2011
|
+
* - Must start and end with an alphanumeric character
|
|
2012
|
+
* - No underscores or other special characters
|
|
2013
|
+
*/
|
|
2014
|
+
/**
|
|
2015
|
+
* Normalize a sandbox name to be RFC 1123 compliant
|
|
2016
|
+
*
|
|
2017
|
+
* @param name - The sandbox name to normalize
|
|
2018
|
+
* @returns Normalized sandbox name that complies with RFC 1123 subdomain rules
|
|
2019
|
+
*
|
|
2020
|
+
* @example
|
|
2021
|
+
* normalizeSandboxName("sandbox_agent") // returns "sandbox-agent"
|
|
2022
|
+
* normalizeSandboxName("My-Sandbox") // returns "my-sandbox"
|
|
2023
|
+
* normalizeSandboxName("test.sandbox") // returns "test.sandbox"
|
|
2024
|
+
* normalizeSandboxName("_invalid_") // returns "invalid"
|
|
2025
|
+
*/
|
|
2026
|
+
declare function normalizeSandboxName(name: string): string;
|
|
2027
|
+
/**
|
|
2028
|
+
* Validate if a sandbox name is RFC 1123 compliant
|
|
2029
|
+
*
|
|
2030
|
+
* @param name - The sandbox name to validate
|
|
2031
|
+
* @returns true if the name is valid, false otherwise
|
|
2032
|
+
*/
|
|
2033
|
+
declare function isValidSandboxName(name: string): boolean;
|
|
2034
|
+
|
|
1879
2035
|
/**
|
|
1880
2036
|
* Event bus service
|
|
1881
2037
|
* Used for event publishing and subscription between internal system components
|
|
@@ -1933,4 +2089,4 @@ declare class AgentManager {
|
|
|
1933
2089
|
|
|
1934
2090
|
declare const AGENT_TASK_EVENT = "agent:execute";
|
|
1935
2091
|
|
|
1936
|
-
export { AGENT_TASK_EVENT, type AgentClient, type AgentLattice, AgentLatticeManager, AgentManager, type BufferStats, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, type ColumnInfo, ConsoleLoggerClient, type CronFields, type DatabaseConfig, type DatabaseType, DefaultScheduleClient, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, FileSystemSkillStore, type FileSystemSkillStoreOptions, type ISqlDatabase, InMemoryAssistantStore, InMemoryChunkBuffer, InMemoryThreadStore, type LoggerLattice, LoggerLatticeManager, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, PinoLoggerClient, PostgresDatabase, type QueryResult, type QueueLattice, QueueLatticeManager, type ScheduleLattice, ScheduleLatticeManager, type SkillLattice, SkillLatticeManager, SqlDatabaseManager, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, type TableInfo, type TableSchema, type ThreadBuffer, type ThreadBufferConfig, ThreadStatus, type ToolDefinition, type ToolLattice, ToolLatticeManager, type VectorStoreLatticeInterface, VectorStoreLatticeManager, agentLatticeManager, describeCronExpression, embeddingsLatticeManager, eventBus, eventBus as eventBusDefault, getAgentClient, getAgentConfig, getAgentLattice, getAllAgentConfigs, getAllToolDefinitions, getCheckpointSaver, getChunkBuffer, getEmbeddingsClient, getEmbeddingsLattice, getLoggerLattice, getModelLattice, getNextCronTime, getQueueLattice, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, hasChunkBuffer, isValidCronExpression, isValidSkillName, loggerLatticeManager, modelLatticeManager, parseCronExpression, queueLatticeManager, registerAgentLattice, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerScheduleLattice, registerStoreLattice, registerToolLattice, registerVectorStoreLattice, scheduleLatticeManager, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toolLatticeManager, validateAgentInput, validateSkillName, validateToolInput, vectorStoreLatticeManager };
|
|
2092
|
+
export { AGENT_TASK_EVENT, type AgentClient, type AgentLattice, AgentLatticeManager, AgentManager, type BufferStats, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, type ColumnInfo, ConsoleLoggerClient, type CronFields, type DatabaseConfig, type DatabaseType, DefaultScheduleClient, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, FileSystemSkillStore, type FileSystemSkillStoreOptions, type ISqlDatabase, InMemoryAssistantStore, InMemoryChunkBuffer, InMemoryThreadStore, type LoggerLattice, LoggerLatticeManager, type McpLatticeInterface, McpLatticeManager, type McpServerInfo, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, PinoLoggerClient, PostgresDatabase, type QueryResult, type QueueLattice, QueueLatticeManager, type RunSandboxConfig, SandboxLatticeManager, type SandboxManagerProtocol, type ScheduleLattice, ScheduleLatticeManager, type SkillLattice, SkillLatticeManager, SqlDatabaseManager, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, type TableInfo, type TableSchema, type ThreadBuffer, type ThreadBufferConfig, ThreadStatus, type ToolDefinition, type ToolLattice, ToolLatticeManager, type VectorStoreLatticeInterface, VectorStoreLatticeManager, agentLatticeManager, describeCronExpression, embeddingsLatticeManager, eventBus, eventBus as eventBusDefault, getAgentClient, getAgentConfig, getAgentLattice, getAllAgentConfigs, getAllToolDefinitions, getCheckpointSaver, getChunkBuffer, getEmbeddingsClient, getEmbeddingsLattice, getLoggerLattice, getModelLattice, getNextCronTime, getQueueLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, hasChunkBuffer, isValidCronExpression, isValidSandboxName, isValidSkillName, loggerLatticeManager, mcpManager, modelLatticeManager, normalizeSandboxName, parseCronExpression, queueLatticeManager, registerAgentLattice, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerScheduleLattice, registerStoreLattice, registerToolLattice, registerVectorStoreLattice, sandboxLatticeManager, scheduleLatticeManager, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toolLatticeManager, validateAgentInput, validateSkillName, validateToolInput, vectorStoreLatticeManager };
|