@axiom-lattice/core 2.1.95 → 2.1.97
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 +62 -17
- package/dist/index.d.ts +62 -17
- package/dist/index.js +726 -145
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +722 -145
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ import { BaseLanguageModelInput, LanguageModelLike, BaseLanguageModel } from '@l
|
|
|
8
8
|
import { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
|
|
9
9
|
import { ChatResult } from '@langchain/core/outputs';
|
|
10
10
|
import * as _axiom_lattice_protocols from '@axiom-lattice/protocols';
|
|
11
|
-
import { LLMConfig, SemanticMetricsServerConfig, MetricMeta, MetricQueryResult, DataSource, SemanticMetricsQueryRequest, SemanticMetricsQueryResponse, TableQueryRequest, TableQueryResponse, ExecuteSqlQueryRequest, ExecuteSqlQueryResponse, MetricsServerType, MetricsServerConfig, ToolConfig, ToolExecutor, AgentConfig, MiddlewareType, GraphBuildOptions, MessageChunk, MessageChunkType, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, ThreadStore, AssistantStore, SkillStore, CollectionStore, WorkspaceStore, ProjectStore, DatabaseConfigStore, MetricsServerConfigStore, McpServerConfigStore, UserStore, TenantStore, UserTenantLinkStore, WorkflowTrackingStore, EvalStore, ChannelInstallationStore, BindingRegistry, MenuRegistry, A2AApiKeyStore, TaskStore, SharedResourceStore, VectorStoreProvider, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, Skill, CreateSkillRequest, SkillStoreContext, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, User, CreateUserRequest, UpdateUserRequest, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, Binding, CreateBindingInput, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, Collection, CreateCollectionRequest, UpdateCollectionRequest, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient, McpTool, ResourceResolver, ResourceAddress, ShareVisibility, CreateShareRequest, ChannelAdapter, InternalStateField, InternalInput, InternalNode, InternalAgentNode, InternalMapNode, InternalDSL } from '@axiom-lattice/protocols';
|
|
11
|
+
import { LLMConfig, SemanticMetricsServerConfig, MetricMeta, MetricQueryResult, DataSource, SemanticMetricsQueryRequest, SemanticMetricsQueryResponse, TableQueryRequest, TableQueryResponse, ExecuteSqlQueryRequest, ExecuteSqlQueryResponse, MetricsServerType, MetricsServerConfig, ToolConfig, ToolExecutor, AgentConfig, MiddlewareType, GraphBuildOptions, MessageChunk, MessageChunkType, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, ThreadStore, AssistantStore, SkillStore, CollectionStore, WorkspaceStore, ProjectStore, DatabaseConfigStore, MetricsServerConfigStore, McpServerConfigStore, UserStore, TenantStore, UserTenantLinkStore, WorkflowTrackingStore, EvalStore, ChannelInstallationStore, BindingRegistry, MenuRegistry, A2AApiKeyStore, TaskStore, SharedResourceStore, ConnectionStore, VectorStoreProvider, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, Skill, CreateSkillRequest, SkillStoreContext, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, User, CreateUserRequest, UpdateUserRequest, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, Binding, CreateBindingInput, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, Collection, CreateCollectionRequest, UpdateCollectionRequest, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient, McpTool, ResourceResolver, ResourceAddress, ShareVisibility, CreateShareRequest, ChannelAdapter, PluginMeta, Plugin, PluginMetaOutput, InternalStateField, InternalInput, InternalNode, InternalAgentNode, InternalMapNode, InternalDSL, ConnectionEntry } from '@axiom-lattice/protocols';
|
|
12
12
|
export { _axiom_lattice_protocols as Protocols };
|
|
13
13
|
export { AgentConfig, AgentType, GraphBuildOptions, MemoryType } from '@axiom-lattice/protocols';
|
|
14
14
|
import * as langchain from 'langchain';
|
|
@@ -1706,6 +1706,8 @@ interface MiddlewareConfig {
|
|
|
1706
1706
|
name: string;
|
|
1707
1707
|
description: string;
|
|
1708
1708
|
enabled: boolean;
|
|
1709
|
+
/** 可选:限制该中间件暴露的工具列表。不配置则默认暴露所有工具 */
|
|
1710
|
+
allowedTools?: string[];
|
|
1709
1711
|
config: Record<string, any>;
|
|
1710
1712
|
}
|
|
1711
1713
|
interface AgentBuildParams {
|
|
@@ -2712,6 +2714,7 @@ type StoreTypeMap = {
|
|
|
2712
2714
|
a2aApiKey: A2AApiKeyStore;
|
|
2713
2715
|
task: TaskStore;
|
|
2714
2716
|
sharedResource: SharedResourceStore;
|
|
2717
|
+
connection: ConnectionStore;
|
|
2715
2718
|
};
|
|
2716
2719
|
/**
|
|
2717
2720
|
* Store type keys
|
|
@@ -6869,6 +6872,8 @@ type CustomMiddlewareFactory = (config: Record<string, any>) => Promise<AgentMid
|
|
|
6869
6872
|
* modifying core source code. Once registered, middleware can be enabled per-agent via
|
|
6870
6873
|
* the database config using `type: "custom"` in the agent's `graphDefinition.middleware` array.
|
|
6871
6874
|
*
|
|
6875
|
+
* Internally bridges to PluginRegistry for unified discovery.
|
|
6876
|
+
*
|
|
6872
6877
|
* @example Register and use
|
|
6873
6878
|
* ```ts
|
|
6874
6879
|
* // 1. App startup — register a factory
|
|
@@ -6888,6 +6893,9 @@ type CustomMiddlewareFactory = (config: Record<string, any>) => Promise<AgentMid
|
|
|
6888
6893
|
* // }
|
|
6889
6894
|
* ```
|
|
6890
6895
|
*
|
|
6896
|
+
* @deprecated New plugins should use PluginRegistry.register(plugin) instead.
|
|
6897
|
+
* This class is maintained for backward compatibility.
|
|
6898
|
+
*
|
|
6891
6899
|
* @remarks
|
|
6892
6900
|
* - Register factories **before** building agents (typically at app startup).
|
|
6893
6901
|
* - Duplicate keys overwrite previous registrations.
|
|
@@ -6898,21 +6906,17 @@ declare class CustomMiddlewareRegistry {
|
|
|
6898
6906
|
/**
|
|
6899
6907
|
* Register a custom middleware factory under the given key.
|
|
6900
6908
|
*
|
|
6901
|
-
*
|
|
6902
|
-
*
|
|
6903
|
-
*
|
|
6909
|
+
* Supports three calling conventions:
|
|
6910
|
+
* - register(key, factory) — legacy, wraps factory as anonymous Plugin
|
|
6911
|
+
* - register(key, factory, meta) — legacy with optional meta
|
|
6912
|
+
*
|
|
6913
|
+
* For new code, prefer PluginRegistry.register(plugin).
|
|
6904
6914
|
*
|
|
6905
6915
|
* @param key - Unique identifier, referenced in database config as `config.key`
|
|
6906
6916
|
* @param factory - Function that receives config (minus `key`) and returns an AgentMiddleware
|
|
6907
|
-
*
|
|
6908
|
-
* @example
|
|
6909
|
-
* ```ts
|
|
6910
|
-
* CustomMiddlewareRegistry.register("my-logger", (config) =>
|
|
6911
|
-
* createMiddleware({ name: "Logger", beforeAgent: async () => { ... } }),
|
|
6912
|
-
* );
|
|
6913
|
-
* ```
|
|
6917
|
+
* @param deprecatedMeta - Optional metadata for API discovery
|
|
6914
6918
|
*/
|
|
6915
|
-
static register(key: string, factory: CustomMiddlewareFactory): void;
|
|
6919
|
+
static register(key: string, factory: CustomMiddlewareFactory, deprecatedMeta?: Partial<PluginMeta>): void;
|
|
6916
6920
|
/**
|
|
6917
6921
|
* Remove a previously registered factory.
|
|
6918
6922
|
*
|
|
@@ -6929,18 +6933,48 @@ declare class CustomMiddlewareRegistry {
|
|
|
6929
6933
|
static get(key: string): CustomMiddlewareFactory | undefined;
|
|
6930
6934
|
/**
|
|
6931
6935
|
* Check whether a factory is registered under the given key.
|
|
6932
|
-
*
|
|
6933
|
-
* @param key - The factory key to check
|
|
6934
6936
|
*/
|
|
6935
6937
|
static has(key: string): boolean;
|
|
6936
6938
|
/**
|
|
6937
6939
|
* Get all currently registered factory keys.
|
|
6938
|
-
*
|
|
6939
|
-
* @returns Array of registered key strings
|
|
6940
6940
|
*/
|
|
6941
6941
|
static list(): string[];
|
|
6942
6942
|
}
|
|
6943
6943
|
|
|
6944
|
+
/**
|
|
6945
|
+
* Plugin registry.
|
|
6946
|
+
*
|
|
6947
|
+
* Manages plugin registration, lookup, and meta serialization.
|
|
6948
|
+
* Discovery layer only — runtime dispatch stays in commonMiddleware.ts.
|
|
6949
|
+
*/
|
|
6950
|
+
declare class PluginRegistry {
|
|
6951
|
+
private static plugins;
|
|
6952
|
+
/** Register a plugin (overwrites if type conflicts) */
|
|
6953
|
+
static register(plugin: Plugin): void;
|
|
6954
|
+
/** Unregister */
|
|
6955
|
+
static unregister(key: string): boolean;
|
|
6956
|
+
/** Get plugin instance */
|
|
6957
|
+
static get(key: string): Plugin | undefined;
|
|
6958
|
+
/** Check if registered */
|
|
6959
|
+
static has(key: string): boolean;
|
|
6960
|
+
/** List all registered plugin keys */
|
|
6961
|
+
static list(): string[];
|
|
6962
|
+
/** Serialize all registered plugins to API-ready meta list */
|
|
6963
|
+
static listMeta(): PluginMetaOutput[];
|
|
6964
|
+
}
|
|
6965
|
+
|
|
6966
|
+
/**
|
|
6967
|
+
* Serialize a Plugin instance into the API-ready PluginMeta shape.
|
|
6968
|
+
*
|
|
6969
|
+
* Auto-detection:
|
|
6970
|
+
* - tools: meta.tools first, fallback to tryExtractTools
|
|
6971
|
+
* - hasTest: connection.test method exists
|
|
6972
|
+
* - hasDiscover: connection.discover method exists
|
|
6973
|
+
*/
|
|
6974
|
+
declare function serializePluginMeta(plugin: Plugin): PluginMetaOutput;
|
|
6975
|
+
|
|
6976
|
+
declare const BUILTIN_PLUGINS: Plugin[];
|
|
6977
|
+
|
|
6944
6978
|
/**
|
|
6945
6979
|
* Create middleware that provides widget rendering capabilities.
|
|
6946
6980
|
*
|
|
@@ -7201,4 +7235,15 @@ declare class PersonalAssistantConfig {
|
|
|
7201
7235
|
static render(config: AgentConfig, name: string, personality: string): void;
|
|
7202
7236
|
}
|
|
7203
7237
|
|
|
7204
|
-
|
|
7238
|
+
declare class ConnectionRegistry {
|
|
7239
|
+
private static store;
|
|
7240
|
+
static setStore(store: ConnectionStore): void;
|
|
7241
|
+
static list(type: string, tenantId: string): Promise<ConnectionEntry[]>;
|
|
7242
|
+
static get(type: string, key: string, tenantId: string): Promise<ConnectionEntry | null>;
|
|
7243
|
+
static create(entry: Omit<ConnectionEntry, "id" | "createdAt" | "updatedAt">): Promise<ConnectionEntry>;
|
|
7244
|
+
static update(tenantId: string, type: string, key: string, updates: Partial<ConnectionEntry>): Promise<ConnectionEntry | null>;
|
|
7245
|
+
static delete(tenantId: string, type: string, key: string): Promise<boolean>;
|
|
7246
|
+
private static ensureStore;
|
|
7247
|
+
}
|
|
7248
|
+
|
|
7249
|
+
export { AGENT_TASK_EVENT, type AddMessageParams, Agent, type AgentClient, type AgentExecutor, AgentInstanceManager, type AgentLattice, AgentLatticeManager, type AgentLifecycleEventName, AgentManager, type AgentStreamExecutor, type AgentThreadInterface, BUILTIN_PLUGINS, BUILTIN_SKILLS, type BackendFactory, type BackendProtocol, type BufferStats, type CacheEntry, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, CollectionLatticeManager, type ColumnInfo, CompositeBackend, type ConnectAllChannelsOptions, ConnectionRegistry, ConsoleLoggerClient, type CreateProcessingAgentParams, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type CustomMiddlewareFactory, CustomMiddlewareRegistry, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsInfo, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, InMemoryA2AApiKeyStore, InMemoryAssistantStore, InMemoryBindingStore, InMemoryChannelInstallationStore, InMemoryChunkBuffer, InMemoryCollectionStore, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryMenuStore, InMemoryTaskListStore, InMemoryTaskStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, LINE_NUMBER_WIDTH, type LangGraphStateChecker, LocalSandboxInstance, LocalSandboxProvider, type LocalSandboxProviderConfig, type LoggerLattice, LoggerLatticeManager, MAX_LINE_LENGTH, type MailboxMessage, type MailboxStore, type McpLatticeInterface, McpLatticeManager, type McpServerInfo, MemoryBackend, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type MessageCompletedEvent, type MessageFailedEvent, type MessageStartedEvent, MessageType, MetricsServerManager, MicrosandboxRemoteInstance, MicrosandboxRemoteProvider, type MicrosandboxRemoteProviderClient, type MicrosandboxRemoteProviderConfig, MicrosandboxServiceClient, type MicrosandboxServiceClientConfig, type MicrosandboxShellExecInput, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, MysqlDatabase, type PendingMessage, PersonalAssistantConfig, PinoLoggerClient, PluginRegistry, PostgresDatabase, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, QueueMode, type QueuePendingEvent, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type ResolveAgentFn, type RunSandboxConfig, type RuntimeModelConfig, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxShellService, SandboxSkillStore, type SandboxSkillStoreOptions, type SandboxVolumeDefinition, type ScheduleLattice, ScheduleLatticeManager, type SchedulerMiddlewareOptions, SemanticMetricsClient, type SharePayload, SimpleMemoryVectorStore, type SkillLattice, SkillLatticeManager, type SkillMeta, type SkillResource, SqlDatabaseManager, type StateAndStore, StateBackend, StoreBackend, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, TOOL_RESULT_TOKEN_LIMIT, TRUNCATION_GUIDANCE, type TableInfo, type TableSchema, type TaskEvent, type TaskListStore, type TaskSpec, TaskStatus, type TaskUpdatable, TeamAgentGraphBuilder, type TeamConfig, type TeamMiddlewareOptions, type TeamTask, type TeammateSpec, type TeammateToolsOptions, type ThreadBuffer, type ThreadBufferConfig, type ThreadBusyEvent, type ThreadIdleEvent, type ThreadInfo, type ThreadQueueConfig, type ThreadState, ThreadStatus, type ThreadStatusChangedEvent, TokenCache, type ToolDefinition, type ToolLattice, ToolLatticeManager, type TopologyEdge, type UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, type VectorStoreProviderLattice, VectorStoreProviderManager, VolumeFilesystem, type VolumeFsClient, type WorkflowValidationError, type WriteResult, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildInput, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, buildStateAnnotation, buildTableName, checkEmptyContent, clearEncryptionKeyCache, collectionLatticeManager, compileInternal, compileWorkflow, computeSandboxName, configureStores, connectAllChannels, createAgentNode, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createMapNode, createModelSelectorMiddleware, createNodeHandler, createProcessingAgent, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createResourceAddress, createSandboxProvider, createSchedulerMiddleware, createSharePayload, createTaskMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, embeddingsLatticeManager, encrypt, ensureBuiltinAgentsForTenant, eventBus, eventBus as eventBusDefault, extractFetcherError, extractOutput, fileDataToString, formatContentWithLineNumbers, formatGrepMatches, formatGrepResults, formatReadResponse, generateToken, getAgentClient, getAgentConfig, getAllAgentConfigs, getAllBuiltInSkillMetas, getAllToolDefinitions, getBindingRegistry, getBuiltInSkillContent, getBuiltInSkillMeta, getBuiltInSkillNames, getCheckpointSaver, getChunkBuffer, getCollectionEntryCount, getEmbeddingsClient, getEmbeddingsLattice, getEncryptionKey, getLoggerLattice, getMenuRegistry, getModelLattice, getNextCronTime, getOrCreateCollectionVectorStore, getQueueLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, getVectorStoreProvider, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, invokeWithRetry, isBuiltInSkill, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, listCollectionEntries, loggerLatticeManager, mcpManager, metricsServerManager, modelLatticeManager, normalizeSandboxName, parallelLimit, parseCronExpression, parseSkillFrontmatter, parseYaml, performStringReplacement, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, registerVectorStoreProvider, removeCollectionVectorStore, renderTemplate, resolvePath, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, serializePluginMeta, setBindingRegistry, setMenuRegistry, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toJsonSchema, toSafeStateExpr, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, updateFileData, validateAgentInput, validateDSL, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager, vectorStoreProviderManager };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { BaseLanguageModelInput, LanguageModelLike, BaseLanguageModel } from '@l
|
|
|
8
8
|
import { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
|
|
9
9
|
import { ChatResult } from '@langchain/core/outputs';
|
|
10
10
|
import * as _axiom_lattice_protocols from '@axiom-lattice/protocols';
|
|
11
|
-
import { LLMConfig, SemanticMetricsServerConfig, MetricMeta, MetricQueryResult, DataSource, SemanticMetricsQueryRequest, SemanticMetricsQueryResponse, TableQueryRequest, TableQueryResponse, ExecuteSqlQueryRequest, ExecuteSqlQueryResponse, MetricsServerType, MetricsServerConfig, ToolConfig, ToolExecutor, AgentConfig, MiddlewareType, GraphBuildOptions, MessageChunk, MessageChunkType, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, ThreadStore, AssistantStore, SkillStore, CollectionStore, WorkspaceStore, ProjectStore, DatabaseConfigStore, MetricsServerConfigStore, McpServerConfigStore, UserStore, TenantStore, UserTenantLinkStore, WorkflowTrackingStore, EvalStore, ChannelInstallationStore, BindingRegistry, MenuRegistry, A2AApiKeyStore, TaskStore, SharedResourceStore, VectorStoreProvider, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, Skill, CreateSkillRequest, SkillStoreContext, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, User, CreateUserRequest, UpdateUserRequest, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, Binding, CreateBindingInput, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, Collection, CreateCollectionRequest, UpdateCollectionRequest, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient, McpTool, ResourceResolver, ResourceAddress, ShareVisibility, CreateShareRequest, ChannelAdapter, InternalStateField, InternalInput, InternalNode, InternalAgentNode, InternalMapNode, InternalDSL } from '@axiom-lattice/protocols';
|
|
11
|
+
import { LLMConfig, SemanticMetricsServerConfig, MetricMeta, MetricQueryResult, DataSource, SemanticMetricsQueryRequest, SemanticMetricsQueryResponse, TableQueryRequest, TableQueryResponse, ExecuteSqlQueryRequest, ExecuteSqlQueryResponse, MetricsServerType, MetricsServerConfig, ToolConfig, ToolExecutor, AgentConfig, MiddlewareType, GraphBuildOptions, MessageChunk, MessageChunkType, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, ThreadStore, AssistantStore, SkillStore, CollectionStore, WorkspaceStore, ProjectStore, DatabaseConfigStore, MetricsServerConfigStore, McpServerConfigStore, UserStore, TenantStore, UserTenantLinkStore, WorkflowTrackingStore, EvalStore, ChannelInstallationStore, BindingRegistry, MenuRegistry, A2AApiKeyStore, TaskStore, SharedResourceStore, ConnectionStore, VectorStoreProvider, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, Skill, CreateSkillRequest, SkillStoreContext, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, User, CreateUserRequest, UpdateUserRequest, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, Binding, CreateBindingInput, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, Collection, CreateCollectionRequest, UpdateCollectionRequest, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient, McpTool, ResourceResolver, ResourceAddress, ShareVisibility, CreateShareRequest, ChannelAdapter, PluginMeta, Plugin, PluginMetaOutput, InternalStateField, InternalInput, InternalNode, InternalAgentNode, InternalMapNode, InternalDSL, ConnectionEntry } from '@axiom-lattice/protocols';
|
|
12
12
|
export { _axiom_lattice_protocols as Protocols };
|
|
13
13
|
export { AgentConfig, AgentType, GraphBuildOptions, MemoryType } from '@axiom-lattice/protocols';
|
|
14
14
|
import * as langchain from 'langchain';
|
|
@@ -1706,6 +1706,8 @@ interface MiddlewareConfig {
|
|
|
1706
1706
|
name: string;
|
|
1707
1707
|
description: string;
|
|
1708
1708
|
enabled: boolean;
|
|
1709
|
+
/** 可选:限制该中间件暴露的工具列表。不配置则默认暴露所有工具 */
|
|
1710
|
+
allowedTools?: string[];
|
|
1709
1711
|
config: Record<string, any>;
|
|
1710
1712
|
}
|
|
1711
1713
|
interface AgentBuildParams {
|
|
@@ -2712,6 +2714,7 @@ type StoreTypeMap = {
|
|
|
2712
2714
|
a2aApiKey: A2AApiKeyStore;
|
|
2713
2715
|
task: TaskStore;
|
|
2714
2716
|
sharedResource: SharedResourceStore;
|
|
2717
|
+
connection: ConnectionStore;
|
|
2715
2718
|
};
|
|
2716
2719
|
/**
|
|
2717
2720
|
* Store type keys
|
|
@@ -6869,6 +6872,8 @@ type CustomMiddlewareFactory = (config: Record<string, any>) => Promise<AgentMid
|
|
|
6869
6872
|
* modifying core source code. Once registered, middleware can be enabled per-agent via
|
|
6870
6873
|
* the database config using `type: "custom"` in the agent's `graphDefinition.middleware` array.
|
|
6871
6874
|
*
|
|
6875
|
+
* Internally bridges to PluginRegistry for unified discovery.
|
|
6876
|
+
*
|
|
6872
6877
|
* @example Register and use
|
|
6873
6878
|
* ```ts
|
|
6874
6879
|
* // 1. App startup — register a factory
|
|
@@ -6888,6 +6893,9 @@ type CustomMiddlewareFactory = (config: Record<string, any>) => Promise<AgentMid
|
|
|
6888
6893
|
* // }
|
|
6889
6894
|
* ```
|
|
6890
6895
|
*
|
|
6896
|
+
* @deprecated New plugins should use PluginRegistry.register(plugin) instead.
|
|
6897
|
+
* This class is maintained for backward compatibility.
|
|
6898
|
+
*
|
|
6891
6899
|
* @remarks
|
|
6892
6900
|
* - Register factories **before** building agents (typically at app startup).
|
|
6893
6901
|
* - Duplicate keys overwrite previous registrations.
|
|
@@ -6898,21 +6906,17 @@ declare class CustomMiddlewareRegistry {
|
|
|
6898
6906
|
/**
|
|
6899
6907
|
* Register a custom middleware factory under the given key.
|
|
6900
6908
|
*
|
|
6901
|
-
*
|
|
6902
|
-
*
|
|
6903
|
-
*
|
|
6909
|
+
* Supports three calling conventions:
|
|
6910
|
+
* - register(key, factory) — legacy, wraps factory as anonymous Plugin
|
|
6911
|
+
* - register(key, factory, meta) — legacy with optional meta
|
|
6912
|
+
*
|
|
6913
|
+
* For new code, prefer PluginRegistry.register(plugin).
|
|
6904
6914
|
*
|
|
6905
6915
|
* @param key - Unique identifier, referenced in database config as `config.key`
|
|
6906
6916
|
* @param factory - Function that receives config (minus `key`) and returns an AgentMiddleware
|
|
6907
|
-
*
|
|
6908
|
-
* @example
|
|
6909
|
-
* ```ts
|
|
6910
|
-
* CustomMiddlewareRegistry.register("my-logger", (config) =>
|
|
6911
|
-
* createMiddleware({ name: "Logger", beforeAgent: async () => { ... } }),
|
|
6912
|
-
* );
|
|
6913
|
-
* ```
|
|
6917
|
+
* @param deprecatedMeta - Optional metadata for API discovery
|
|
6914
6918
|
*/
|
|
6915
|
-
static register(key: string, factory: CustomMiddlewareFactory): void;
|
|
6919
|
+
static register(key: string, factory: CustomMiddlewareFactory, deprecatedMeta?: Partial<PluginMeta>): void;
|
|
6916
6920
|
/**
|
|
6917
6921
|
* Remove a previously registered factory.
|
|
6918
6922
|
*
|
|
@@ -6929,18 +6933,48 @@ declare class CustomMiddlewareRegistry {
|
|
|
6929
6933
|
static get(key: string): CustomMiddlewareFactory | undefined;
|
|
6930
6934
|
/**
|
|
6931
6935
|
* Check whether a factory is registered under the given key.
|
|
6932
|
-
*
|
|
6933
|
-
* @param key - The factory key to check
|
|
6934
6936
|
*/
|
|
6935
6937
|
static has(key: string): boolean;
|
|
6936
6938
|
/**
|
|
6937
6939
|
* Get all currently registered factory keys.
|
|
6938
|
-
*
|
|
6939
|
-
* @returns Array of registered key strings
|
|
6940
6940
|
*/
|
|
6941
6941
|
static list(): string[];
|
|
6942
6942
|
}
|
|
6943
6943
|
|
|
6944
|
+
/**
|
|
6945
|
+
* Plugin registry.
|
|
6946
|
+
*
|
|
6947
|
+
* Manages plugin registration, lookup, and meta serialization.
|
|
6948
|
+
* Discovery layer only — runtime dispatch stays in commonMiddleware.ts.
|
|
6949
|
+
*/
|
|
6950
|
+
declare class PluginRegistry {
|
|
6951
|
+
private static plugins;
|
|
6952
|
+
/** Register a plugin (overwrites if type conflicts) */
|
|
6953
|
+
static register(plugin: Plugin): void;
|
|
6954
|
+
/** Unregister */
|
|
6955
|
+
static unregister(key: string): boolean;
|
|
6956
|
+
/** Get plugin instance */
|
|
6957
|
+
static get(key: string): Plugin | undefined;
|
|
6958
|
+
/** Check if registered */
|
|
6959
|
+
static has(key: string): boolean;
|
|
6960
|
+
/** List all registered plugin keys */
|
|
6961
|
+
static list(): string[];
|
|
6962
|
+
/** Serialize all registered plugins to API-ready meta list */
|
|
6963
|
+
static listMeta(): PluginMetaOutput[];
|
|
6964
|
+
}
|
|
6965
|
+
|
|
6966
|
+
/**
|
|
6967
|
+
* Serialize a Plugin instance into the API-ready PluginMeta shape.
|
|
6968
|
+
*
|
|
6969
|
+
* Auto-detection:
|
|
6970
|
+
* - tools: meta.tools first, fallback to tryExtractTools
|
|
6971
|
+
* - hasTest: connection.test method exists
|
|
6972
|
+
* - hasDiscover: connection.discover method exists
|
|
6973
|
+
*/
|
|
6974
|
+
declare function serializePluginMeta(plugin: Plugin): PluginMetaOutput;
|
|
6975
|
+
|
|
6976
|
+
declare const BUILTIN_PLUGINS: Plugin[];
|
|
6977
|
+
|
|
6944
6978
|
/**
|
|
6945
6979
|
* Create middleware that provides widget rendering capabilities.
|
|
6946
6980
|
*
|
|
@@ -7201,4 +7235,15 @@ declare class PersonalAssistantConfig {
|
|
|
7201
7235
|
static render(config: AgentConfig, name: string, personality: string): void;
|
|
7202
7236
|
}
|
|
7203
7237
|
|
|
7204
|
-
|
|
7238
|
+
declare class ConnectionRegistry {
|
|
7239
|
+
private static store;
|
|
7240
|
+
static setStore(store: ConnectionStore): void;
|
|
7241
|
+
static list(type: string, tenantId: string): Promise<ConnectionEntry[]>;
|
|
7242
|
+
static get(type: string, key: string, tenantId: string): Promise<ConnectionEntry | null>;
|
|
7243
|
+
static create(entry: Omit<ConnectionEntry, "id" | "createdAt" | "updatedAt">): Promise<ConnectionEntry>;
|
|
7244
|
+
static update(tenantId: string, type: string, key: string, updates: Partial<ConnectionEntry>): Promise<ConnectionEntry | null>;
|
|
7245
|
+
static delete(tenantId: string, type: string, key: string): Promise<boolean>;
|
|
7246
|
+
private static ensureStore;
|
|
7247
|
+
}
|
|
7248
|
+
|
|
7249
|
+
export { AGENT_TASK_EVENT, type AddMessageParams, Agent, type AgentClient, type AgentExecutor, AgentInstanceManager, type AgentLattice, AgentLatticeManager, type AgentLifecycleEventName, AgentManager, type AgentStreamExecutor, type AgentThreadInterface, BUILTIN_PLUGINS, BUILTIN_SKILLS, type BackendFactory, type BackendProtocol, type BufferStats, type CacheEntry, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, CollectionLatticeManager, type ColumnInfo, CompositeBackend, type ConnectAllChannelsOptions, ConnectionRegistry, ConsoleLoggerClient, type CreateProcessingAgentParams, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type CustomMiddlewareFactory, CustomMiddlewareRegistry, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsInfo, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, InMemoryA2AApiKeyStore, InMemoryAssistantStore, InMemoryBindingStore, InMemoryChannelInstallationStore, InMemoryChunkBuffer, InMemoryCollectionStore, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryMenuStore, InMemoryTaskListStore, InMemoryTaskStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, LINE_NUMBER_WIDTH, type LangGraphStateChecker, LocalSandboxInstance, LocalSandboxProvider, type LocalSandboxProviderConfig, type LoggerLattice, LoggerLatticeManager, MAX_LINE_LENGTH, type MailboxMessage, type MailboxStore, type McpLatticeInterface, McpLatticeManager, type McpServerInfo, MemoryBackend, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type MessageCompletedEvent, type MessageFailedEvent, type MessageStartedEvent, MessageType, MetricsServerManager, MicrosandboxRemoteInstance, MicrosandboxRemoteProvider, type MicrosandboxRemoteProviderClient, type MicrosandboxRemoteProviderConfig, MicrosandboxServiceClient, type MicrosandboxServiceClientConfig, type MicrosandboxShellExecInput, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, MysqlDatabase, type PendingMessage, PersonalAssistantConfig, PinoLoggerClient, PluginRegistry, PostgresDatabase, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, QueueMode, type QueuePendingEvent, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type ResolveAgentFn, type RunSandboxConfig, type RuntimeModelConfig, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxShellService, SandboxSkillStore, type SandboxSkillStoreOptions, type SandboxVolumeDefinition, type ScheduleLattice, ScheduleLatticeManager, type SchedulerMiddlewareOptions, SemanticMetricsClient, type SharePayload, SimpleMemoryVectorStore, type SkillLattice, SkillLatticeManager, type SkillMeta, type SkillResource, SqlDatabaseManager, type StateAndStore, StateBackend, StoreBackend, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, TOOL_RESULT_TOKEN_LIMIT, TRUNCATION_GUIDANCE, type TableInfo, type TableSchema, type TaskEvent, type TaskListStore, type TaskSpec, TaskStatus, type TaskUpdatable, TeamAgentGraphBuilder, type TeamConfig, type TeamMiddlewareOptions, type TeamTask, type TeammateSpec, type TeammateToolsOptions, type ThreadBuffer, type ThreadBufferConfig, type ThreadBusyEvent, type ThreadIdleEvent, type ThreadInfo, type ThreadQueueConfig, type ThreadState, ThreadStatus, type ThreadStatusChangedEvent, TokenCache, type ToolDefinition, type ToolLattice, ToolLatticeManager, type TopologyEdge, type UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, type VectorStoreProviderLattice, VectorStoreProviderManager, VolumeFilesystem, type VolumeFsClient, type WorkflowValidationError, type WriteResult, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildInput, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, buildStateAnnotation, buildTableName, checkEmptyContent, clearEncryptionKeyCache, collectionLatticeManager, compileInternal, compileWorkflow, computeSandboxName, configureStores, connectAllChannels, createAgentNode, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createMapNode, createModelSelectorMiddleware, createNodeHandler, createProcessingAgent, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createResourceAddress, createSandboxProvider, createSchedulerMiddleware, createSharePayload, createTaskMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, embeddingsLatticeManager, encrypt, ensureBuiltinAgentsForTenant, eventBus, eventBus as eventBusDefault, extractFetcherError, extractOutput, fileDataToString, formatContentWithLineNumbers, formatGrepMatches, formatGrepResults, formatReadResponse, generateToken, getAgentClient, getAgentConfig, getAllAgentConfigs, getAllBuiltInSkillMetas, getAllToolDefinitions, getBindingRegistry, getBuiltInSkillContent, getBuiltInSkillMeta, getBuiltInSkillNames, getCheckpointSaver, getChunkBuffer, getCollectionEntryCount, getEmbeddingsClient, getEmbeddingsLattice, getEncryptionKey, getLoggerLattice, getMenuRegistry, getModelLattice, getNextCronTime, getOrCreateCollectionVectorStore, getQueueLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, getVectorStoreProvider, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, invokeWithRetry, isBuiltInSkill, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, listCollectionEntries, loggerLatticeManager, mcpManager, metricsServerManager, modelLatticeManager, normalizeSandboxName, parallelLimit, parseCronExpression, parseSkillFrontmatter, parseYaml, performStringReplacement, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, registerVectorStoreProvider, removeCollectionVectorStore, renderTemplate, resolvePath, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, serializePluginMeta, setBindingRegistry, setMenuRegistry, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toJsonSchema, toSafeStateExpr, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, updateFileData, validateAgentInput, validateDSL, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager, vectorStoreProviderManager };
|