@axiom-lattice/core 2.1.19 → 2.1.21
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 +82 -21
- package/dist/index.d.ts +82 -21
- package/dist/index.js +3089 -2847
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3028 -2790
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -5,20 +5,22 @@ 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
|
|
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';
|
|
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';
|
|
12
|
+
import * as langchain from 'langchain';
|
|
13
|
+
import { ReactAgent } from 'langchain';
|
|
14
|
+
import z from 'zod';
|
|
15
|
+
import { SandboxClient } from '@agent-infra/sandbox';
|
|
12
16
|
import * as _langchain_core_tools from '@langchain/core/tools';
|
|
13
17
|
import { StructuredTool } from '@langchain/core/tools';
|
|
14
18
|
import { CompiledStateGraph } from '@langchain/langgraph';
|
|
15
|
-
import { ReactAgent } from 'langchain';
|
|
16
19
|
import { BaseCheckpointSaver } from '@langchain/langgraph-checkpoint';
|
|
17
20
|
import { ReplaySubject } from 'rxjs';
|
|
18
21
|
import { Embeddings } from '@langchain/core/embeddings';
|
|
19
22
|
import { VectorStore } from '@langchain/core/vectorstores';
|
|
20
23
|
import { Connection, MultiServerMCPClient } from '@langchain/mcp-adapters';
|
|
21
|
-
import { SandboxClient } from '@agent-infra/sandbox';
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* BaseLatticeManager - 抽象基类,为各种Lattice管理器提供通用功能
|
|
@@ -370,6 +372,73 @@ declare class SqlDatabaseManager {
|
|
|
370
372
|
}
|
|
371
373
|
declare const sqlDatabaseManager: SqlDatabaseManager;
|
|
372
374
|
|
|
375
|
+
interface CreateSqlToolParams {
|
|
376
|
+
databaseKey?: string;
|
|
377
|
+
connectionString?: string;
|
|
378
|
+
}
|
|
379
|
+
declare const createListTablesSqlTool: ({ databaseKey, connectionString }: CreateSqlToolParams) => langchain.DynamicStructuredTool<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, Record<string, never>, {}, string>;
|
|
380
|
+
|
|
381
|
+
declare const createInfoSqlTool: ({ databaseKey, connectionString }: {
|
|
382
|
+
databaseKey?: string;
|
|
383
|
+
connectionString?: string;
|
|
384
|
+
}) => langchain.DynamicStructuredTool<z.ZodObject<{
|
|
385
|
+
tables: z.ZodString;
|
|
386
|
+
}, "strip", z.ZodTypeAny, {
|
|
387
|
+
tables: string;
|
|
388
|
+
}, {
|
|
389
|
+
tables: string;
|
|
390
|
+
}>, {
|
|
391
|
+
tables: string;
|
|
392
|
+
}, {
|
|
393
|
+
tables: string;
|
|
394
|
+
}, string>;
|
|
395
|
+
|
|
396
|
+
declare const createQueryCheckerSqlTool: ({ databaseKey, connectionString }: {
|
|
397
|
+
databaseKey?: string;
|
|
398
|
+
connectionString?: string;
|
|
399
|
+
}) => langchain.DynamicStructuredTool<z.ZodObject<{
|
|
400
|
+
query: z.ZodString;
|
|
401
|
+
}, "strip", z.ZodTypeAny, {
|
|
402
|
+
query: string;
|
|
403
|
+
}, {
|
|
404
|
+
query: string;
|
|
405
|
+
}>, {
|
|
406
|
+
query: string;
|
|
407
|
+
}, {
|
|
408
|
+
query: string;
|
|
409
|
+
}, string>;
|
|
410
|
+
|
|
411
|
+
declare const createQuerySqlTool: ({ databaseKey, connectionString }: {
|
|
412
|
+
databaseKey?: string;
|
|
413
|
+
connectionString?: string;
|
|
414
|
+
}) => langchain.DynamicStructuredTool<z.ZodObject<{
|
|
415
|
+
query: z.ZodString;
|
|
416
|
+
}, "strip", z.ZodTypeAny, {
|
|
417
|
+
query: string;
|
|
418
|
+
}, {
|
|
419
|
+
query: string;
|
|
420
|
+
}>, {
|
|
421
|
+
query: string;
|
|
422
|
+
}, {
|
|
423
|
+
query: string;
|
|
424
|
+
}, string>;
|
|
425
|
+
|
|
426
|
+
interface SandboxManagerProtocol {
|
|
427
|
+
getBaseURL(): string;
|
|
428
|
+
createSandbox(sandboxName: string): Promise<SandboxClient>;
|
|
429
|
+
deleteSandbox(sandboxName: string): Promise<void>;
|
|
430
|
+
getSandbox(sandboxName: string): Promise<SandboxClient>;
|
|
431
|
+
listSandboxes(): Promise<SandboxClient[]>;
|
|
432
|
+
getSandboxStatus(sandboxName: string): Promise<string>;
|
|
433
|
+
getSandboxFromConfig(config: RunSandboxConfig): Promise<SandboxClient>;
|
|
434
|
+
}
|
|
435
|
+
type IsolatedLevel = "agent" | "thread" | "global";
|
|
436
|
+
interface RunSandboxConfig {
|
|
437
|
+
assistant_id: string;
|
|
438
|
+
isolatedLevel: IsolatedLevel;
|
|
439
|
+
thread_id: string;
|
|
440
|
+
}
|
|
441
|
+
|
|
373
442
|
type ToolDefinition = ToolConfig;
|
|
374
443
|
interface ToolLattice {
|
|
375
444
|
key: string;
|
|
@@ -482,10 +551,16 @@ interface AgentLattice {
|
|
|
482
551
|
*/
|
|
483
552
|
declare class AgentLatticeManager extends BaseLatticeManager<AgentLattice> {
|
|
484
553
|
private static _instance;
|
|
554
|
+
private initialized;
|
|
485
555
|
/**
|
|
486
556
|
* 获取AgentLatticeManager单例实例
|
|
487
557
|
*/
|
|
488
558
|
static getInstance(): AgentLatticeManager;
|
|
559
|
+
private constructor();
|
|
560
|
+
private initializeStoredAssistants;
|
|
561
|
+
private subscribeToAssistantEvents;
|
|
562
|
+
private handleAssistantChange;
|
|
563
|
+
private handleAssistantDelete;
|
|
489
564
|
/**
|
|
490
565
|
* 获取Lattice类型前缀
|
|
491
566
|
*/
|
|
@@ -521,8 +596,9 @@ declare class AgentLatticeManager extends BaseLatticeManager<AgentLattice> {
|
|
|
521
596
|
getAgentConfig(key: string): AgentConfig | undefined;
|
|
522
597
|
/**
|
|
523
598
|
* 获取所有Agent配置
|
|
599
|
+
* code-configured 和 stored assistants 都已注册到 registry
|
|
524
600
|
*/
|
|
525
|
-
getAllAgentConfigs(): AgentConfig[]
|
|
601
|
+
getAllAgentConfigs(): Promise<AgentConfig[]>;
|
|
526
602
|
/**
|
|
527
603
|
* 验证Agent输入参数
|
|
528
604
|
* @param key Lattice键名
|
|
@@ -561,7 +637,7 @@ declare const registerAgentLattice: (config: AgentConfig) => void;
|
|
|
561
637
|
declare const registerAgentLattices: (configs: AgentConfig[]) => void;
|
|
562
638
|
declare const getAgentLattice: (key: string) => AgentLattice | undefined;
|
|
563
639
|
declare const getAgentConfig: (key: string) => AgentConfig | undefined;
|
|
564
|
-
declare const getAllAgentConfigs: () => AgentConfig[]
|
|
640
|
+
declare const getAllAgentConfigs: () => Promise<AgentConfig[]>;
|
|
565
641
|
declare const validateAgentInput: (key: string, input: any) => boolean;
|
|
566
642
|
/**
|
|
567
643
|
* 获取或初始化Agent客户端
|
|
@@ -1923,21 +1999,6 @@ declare class McpLatticeManager extends BaseLatticeManager<McpLatticeInterface>
|
|
|
1923
1999
|
}
|
|
1924
2000
|
declare const mcpManager: McpLatticeManager;
|
|
1925
2001
|
|
|
1926
|
-
interface SandboxManagerProtocol {
|
|
1927
|
-
getBaseURL(): string;
|
|
1928
|
-
createSandbox(sandboxName: string): Promise<SandboxClient>;
|
|
1929
|
-
deleteSandbox(sandboxName: string): Promise<void>;
|
|
1930
|
-
getSandbox(sandboxName: string): Promise<SandboxClient>;
|
|
1931
|
-
listSandboxes(): Promise<SandboxClient[]>;
|
|
1932
|
-
getSandboxStatus(sandboxName: string): Promise<string>;
|
|
1933
|
-
getSandboxFromConfig(config: RunSandboxConfig): Promise<SandboxClient>;
|
|
1934
|
-
}
|
|
1935
|
-
interface RunSandboxConfig {
|
|
1936
|
-
assistant_id: string;
|
|
1937
|
-
sandboxConfig: ConnectedSandboxConfig;
|
|
1938
|
-
thread_id: string;
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
2002
|
/**
|
|
1942
2003
|
* SandboxLatticeManager
|
|
1943
2004
|
*
|
|
@@ -2090,4 +2151,4 @@ declare class AgentManager {
|
|
|
2090
2151
|
|
|
2091
2152
|
declare const AGENT_TASK_EVENT = "agent:execute";
|
|
2092
2153
|
|
|
2093
|
-
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 };
|
|
2154
|
+
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 IsolatedLevel, 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, createInfoSqlTool, createListTablesSqlTool, createQueryCheckerSqlTool, createQuerySqlTool, 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,20 +5,22 @@ 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
|
|
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';
|
|
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';
|
|
12
|
+
import * as langchain from 'langchain';
|
|
13
|
+
import { ReactAgent } from 'langchain';
|
|
14
|
+
import z from 'zod';
|
|
15
|
+
import { SandboxClient } from '@agent-infra/sandbox';
|
|
12
16
|
import * as _langchain_core_tools from '@langchain/core/tools';
|
|
13
17
|
import { StructuredTool } from '@langchain/core/tools';
|
|
14
18
|
import { CompiledStateGraph } from '@langchain/langgraph';
|
|
15
|
-
import { ReactAgent } from 'langchain';
|
|
16
19
|
import { BaseCheckpointSaver } from '@langchain/langgraph-checkpoint';
|
|
17
20
|
import { ReplaySubject } from 'rxjs';
|
|
18
21
|
import { Embeddings } from '@langchain/core/embeddings';
|
|
19
22
|
import { VectorStore } from '@langchain/core/vectorstores';
|
|
20
23
|
import { Connection, MultiServerMCPClient } from '@langchain/mcp-adapters';
|
|
21
|
-
import { SandboxClient } from '@agent-infra/sandbox';
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* BaseLatticeManager - 抽象基类,为各种Lattice管理器提供通用功能
|
|
@@ -370,6 +372,73 @@ declare class SqlDatabaseManager {
|
|
|
370
372
|
}
|
|
371
373
|
declare const sqlDatabaseManager: SqlDatabaseManager;
|
|
372
374
|
|
|
375
|
+
interface CreateSqlToolParams {
|
|
376
|
+
databaseKey?: string;
|
|
377
|
+
connectionString?: string;
|
|
378
|
+
}
|
|
379
|
+
declare const createListTablesSqlTool: ({ databaseKey, connectionString }: CreateSqlToolParams) => langchain.DynamicStructuredTool<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, Record<string, never>, {}, string>;
|
|
380
|
+
|
|
381
|
+
declare const createInfoSqlTool: ({ databaseKey, connectionString }: {
|
|
382
|
+
databaseKey?: string;
|
|
383
|
+
connectionString?: string;
|
|
384
|
+
}) => langchain.DynamicStructuredTool<z.ZodObject<{
|
|
385
|
+
tables: z.ZodString;
|
|
386
|
+
}, "strip", z.ZodTypeAny, {
|
|
387
|
+
tables: string;
|
|
388
|
+
}, {
|
|
389
|
+
tables: string;
|
|
390
|
+
}>, {
|
|
391
|
+
tables: string;
|
|
392
|
+
}, {
|
|
393
|
+
tables: string;
|
|
394
|
+
}, string>;
|
|
395
|
+
|
|
396
|
+
declare const createQueryCheckerSqlTool: ({ databaseKey, connectionString }: {
|
|
397
|
+
databaseKey?: string;
|
|
398
|
+
connectionString?: string;
|
|
399
|
+
}) => langchain.DynamicStructuredTool<z.ZodObject<{
|
|
400
|
+
query: z.ZodString;
|
|
401
|
+
}, "strip", z.ZodTypeAny, {
|
|
402
|
+
query: string;
|
|
403
|
+
}, {
|
|
404
|
+
query: string;
|
|
405
|
+
}>, {
|
|
406
|
+
query: string;
|
|
407
|
+
}, {
|
|
408
|
+
query: string;
|
|
409
|
+
}, string>;
|
|
410
|
+
|
|
411
|
+
declare const createQuerySqlTool: ({ databaseKey, connectionString }: {
|
|
412
|
+
databaseKey?: string;
|
|
413
|
+
connectionString?: string;
|
|
414
|
+
}) => langchain.DynamicStructuredTool<z.ZodObject<{
|
|
415
|
+
query: z.ZodString;
|
|
416
|
+
}, "strip", z.ZodTypeAny, {
|
|
417
|
+
query: string;
|
|
418
|
+
}, {
|
|
419
|
+
query: string;
|
|
420
|
+
}>, {
|
|
421
|
+
query: string;
|
|
422
|
+
}, {
|
|
423
|
+
query: string;
|
|
424
|
+
}, string>;
|
|
425
|
+
|
|
426
|
+
interface SandboxManagerProtocol {
|
|
427
|
+
getBaseURL(): string;
|
|
428
|
+
createSandbox(sandboxName: string): Promise<SandboxClient>;
|
|
429
|
+
deleteSandbox(sandboxName: string): Promise<void>;
|
|
430
|
+
getSandbox(sandboxName: string): Promise<SandboxClient>;
|
|
431
|
+
listSandboxes(): Promise<SandboxClient[]>;
|
|
432
|
+
getSandboxStatus(sandboxName: string): Promise<string>;
|
|
433
|
+
getSandboxFromConfig(config: RunSandboxConfig): Promise<SandboxClient>;
|
|
434
|
+
}
|
|
435
|
+
type IsolatedLevel = "agent" | "thread" | "global";
|
|
436
|
+
interface RunSandboxConfig {
|
|
437
|
+
assistant_id: string;
|
|
438
|
+
isolatedLevel: IsolatedLevel;
|
|
439
|
+
thread_id: string;
|
|
440
|
+
}
|
|
441
|
+
|
|
373
442
|
type ToolDefinition = ToolConfig;
|
|
374
443
|
interface ToolLattice {
|
|
375
444
|
key: string;
|
|
@@ -482,10 +551,16 @@ interface AgentLattice {
|
|
|
482
551
|
*/
|
|
483
552
|
declare class AgentLatticeManager extends BaseLatticeManager<AgentLattice> {
|
|
484
553
|
private static _instance;
|
|
554
|
+
private initialized;
|
|
485
555
|
/**
|
|
486
556
|
* 获取AgentLatticeManager单例实例
|
|
487
557
|
*/
|
|
488
558
|
static getInstance(): AgentLatticeManager;
|
|
559
|
+
private constructor();
|
|
560
|
+
private initializeStoredAssistants;
|
|
561
|
+
private subscribeToAssistantEvents;
|
|
562
|
+
private handleAssistantChange;
|
|
563
|
+
private handleAssistantDelete;
|
|
489
564
|
/**
|
|
490
565
|
* 获取Lattice类型前缀
|
|
491
566
|
*/
|
|
@@ -521,8 +596,9 @@ declare class AgentLatticeManager extends BaseLatticeManager<AgentLattice> {
|
|
|
521
596
|
getAgentConfig(key: string): AgentConfig | undefined;
|
|
522
597
|
/**
|
|
523
598
|
* 获取所有Agent配置
|
|
599
|
+
* code-configured 和 stored assistants 都已注册到 registry
|
|
524
600
|
*/
|
|
525
|
-
getAllAgentConfigs(): AgentConfig[]
|
|
601
|
+
getAllAgentConfigs(): Promise<AgentConfig[]>;
|
|
526
602
|
/**
|
|
527
603
|
* 验证Agent输入参数
|
|
528
604
|
* @param key Lattice键名
|
|
@@ -561,7 +637,7 @@ declare const registerAgentLattice: (config: AgentConfig) => void;
|
|
|
561
637
|
declare const registerAgentLattices: (configs: AgentConfig[]) => void;
|
|
562
638
|
declare const getAgentLattice: (key: string) => AgentLattice | undefined;
|
|
563
639
|
declare const getAgentConfig: (key: string) => AgentConfig | undefined;
|
|
564
|
-
declare const getAllAgentConfigs: () => AgentConfig[]
|
|
640
|
+
declare const getAllAgentConfigs: () => Promise<AgentConfig[]>;
|
|
565
641
|
declare const validateAgentInput: (key: string, input: any) => boolean;
|
|
566
642
|
/**
|
|
567
643
|
* 获取或初始化Agent客户端
|
|
@@ -1923,21 +1999,6 @@ declare class McpLatticeManager extends BaseLatticeManager<McpLatticeInterface>
|
|
|
1923
1999
|
}
|
|
1924
2000
|
declare const mcpManager: McpLatticeManager;
|
|
1925
2001
|
|
|
1926
|
-
interface SandboxManagerProtocol {
|
|
1927
|
-
getBaseURL(): string;
|
|
1928
|
-
createSandbox(sandboxName: string): Promise<SandboxClient>;
|
|
1929
|
-
deleteSandbox(sandboxName: string): Promise<void>;
|
|
1930
|
-
getSandbox(sandboxName: string): Promise<SandboxClient>;
|
|
1931
|
-
listSandboxes(): Promise<SandboxClient[]>;
|
|
1932
|
-
getSandboxStatus(sandboxName: string): Promise<string>;
|
|
1933
|
-
getSandboxFromConfig(config: RunSandboxConfig): Promise<SandboxClient>;
|
|
1934
|
-
}
|
|
1935
|
-
interface RunSandboxConfig {
|
|
1936
|
-
assistant_id: string;
|
|
1937
|
-
sandboxConfig: ConnectedSandboxConfig;
|
|
1938
|
-
thread_id: string;
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
2002
|
/**
|
|
1942
2003
|
* SandboxLatticeManager
|
|
1943
2004
|
*
|
|
@@ -2090,4 +2151,4 @@ declare class AgentManager {
|
|
|
2090
2151
|
|
|
2091
2152
|
declare const AGENT_TASK_EVENT = "agent:execute";
|
|
2092
2153
|
|
|
2093
|
-
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 };
|
|
2154
|
+
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 IsolatedLevel, 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, createInfoSqlTool, createListTablesSqlTool, createQueryCheckerSqlTool, createQuerySqlTool, 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 };
|