@axiom-lattice/core 2.1.80 → 2.1.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-FN4TRQK4.mjs → chunk-SGRFQY3E.mjs} +386 -504
- package/dist/chunk-SGRFQY3E.mjs.map +1 -0
- package/dist/compile-4RFYHUBE.mjs +11 -0
- package/dist/index.d.mts +219 -34
- package/dist/index.d.ts +219 -34
- package/dist/index.js +1725 -1299
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1278 -745
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
- package/dist/chunk-FN4TRQK4.mjs.map +0 -1
- package/dist/compile-SYSKVQHB.mjs +0 -9
- /package/dist/{compile-SYSKVQHB.mjs.map → compile-4RFYHUBE.mjs.map} +0 -0
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, WorkspaceStore, ProjectStore, DatabaseConfigStore, MetricsServerConfigStore, McpServerConfigStore, UserStore, TenantStore, UserTenantLinkStore, WorkflowTrackingStore, EvalStore, ChannelInstallationStore, BindingRegistry, A2AApiKeyStore, 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, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient, InternalStateField, InternalInput, InternalNode, InternalAgentNode,
|
|
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, WorkspaceStore, ProjectStore, DatabaseConfigStore, MetricsServerConfigStore, McpServerConfigStore, UserStore, TenantStore, UserTenantLinkStore, WorkflowTrackingStore, EvalStore, ChannelInstallationStore, BindingRegistry, MenuRegistry, A2AApiKeyStore, TaskStore, 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, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient, ChannelAdapter, InternalStateField, InternalInput, InternalNode, InternalAgentNode, InternalMapNode, InternalDSL } 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';
|
|
@@ -952,6 +952,12 @@ declare class MetricsServerManager {
|
|
|
952
952
|
* @param key - Server key (optional, uses default if not provided)
|
|
953
953
|
*/
|
|
954
954
|
getConfig(tenantId: string, key?: string): Promise<MetricsServerConfig>;
|
|
955
|
+
/**
|
|
956
|
+
* Ensure server configs are loaded from the store.
|
|
957
|
+
* Public wrapper around the internal lazy-loading mechanism.
|
|
958
|
+
* Safe to call multiple times — loading happens at most once.
|
|
959
|
+
*/
|
|
960
|
+
ensureLoaded(): Promise<void>;
|
|
955
961
|
/**
|
|
956
962
|
* Check if a metrics server is registered for a tenant
|
|
957
963
|
* @param tenantId - Tenant identifier
|
|
@@ -2608,6 +2614,8 @@ interface AddMessageParams {
|
|
|
2608
2614
|
threadId: string;
|
|
2609
2615
|
tenantId: string;
|
|
2610
2616
|
assistantId: string;
|
|
2617
|
+
workspaceId?: string;
|
|
2618
|
+
projectId?: string;
|
|
2611
2619
|
content: PendingMessageContent;
|
|
2612
2620
|
type?: "human" | "system";
|
|
2613
2621
|
priority?: number;
|
|
@@ -2619,6 +2627,8 @@ interface ThreadInfo {
|
|
|
2619
2627
|
tenantId: string;
|
|
2620
2628
|
assistantId: string;
|
|
2621
2629
|
threadId: string;
|
|
2630
|
+
workspaceId?: string;
|
|
2631
|
+
projectId?: string;
|
|
2622
2632
|
}
|
|
2623
2633
|
/**
|
|
2624
2634
|
* Interface for message queue storage
|
|
@@ -2690,7 +2700,9 @@ type StoreTypeMap = {
|
|
|
2690
2700
|
eval: EvalStore;
|
|
2691
2701
|
channelInstallation: ChannelInstallationStore;
|
|
2692
2702
|
channelBinding: BindingRegistry;
|
|
2703
|
+
menu: MenuRegistry;
|
|
2693
2704
|
a2aApiKey: A2AApiKeyStore;
|
|
2705
|
+
task: TaskStore;
|
|
2694
2706
|
};
|
|
2695
2707
|
/**
|
|
2696
2708
|
* Store type keys
|
|
@@ -2893,6 +2905,10 @@ declare class InMemoryAssistantStore implements AssistantStore {
|
|
|
2893
2905
|
* Check if assistant exists
|
|
2894
2906
|
*/
|
|
2895
2907
|
hasAssistant(tenantId: string, id: string): Promise<boolean>;
|
|
2908
|
+
/**
|
|
2909
|
+
* Get assistant by owner user ID
|
|
2910
|
+
*/
|
|
2911
|
+
getByOwner(tenantId: string, userId: string): Promise<Assistant | null>;
|
|
2896
2912
|
/**
|
|
2897
2913
|
* Clear all assistants for a tenant (useful for testing)
|
|
2898
2914
|
*/
|
|
@@ -3277,6 +3293,7 @@ declare class InMemoryChannelInstallationStore implements ChannelInstallationSto
|
|
|
3277
3293
|
* @returns Array of matching {@link ChannelInstallation} objects
|
|
3278
3294
|
*/
|
|
3279
3295
|
getInstallationsByTenant(tenantId: string, channel?: ChannelInstallationType): Promise<ChannelInstallation[]>;
|
|
3296
|
+
getAllInstallations(channel?: ChannelInstallationType): Promise<ChannelInstallation[]>;
|
|
3280
3297
|
/**
|
|
3281
3298
|
* Creates a new channel installation for a tenant.
|
|
3282
3299
|
*
|
|
@@ -3460,6 +3477,63 @@ declare class InMemoryThreadMessageQueueStore implements IMessageQueueStore {
|
|
|
3460
3477
|
resetProcessingToPending(threadId: string): Promise<number>;
|
|
3461
3478
|
}
|
|
3462
3479
|
|
|
3480
|
+
/**
|
|
3481
|
+
* InMemoryTaskStore
|
|
3482
|
+
*
|
|
3483
|
+
* In-memory implementation of TaskStore
|
|
3484
|
+
* Provides CRUD operations for task data stored in memory
|
|
3485
|
+
*/
|
|
3486
|
+
|
|
3487
|
+
/**
|
|
3488
|
+
* In-memory implementation of TaskStore
|
|
3489
|
+
*/
|
|
3490
|
+
declare class InMemoryTaskStore implements TaskStore {
|
|
3491
|
+
private tasks;
|
|
3492
|
+
/**
|
|
3493
|
+
* Create a new task
|
|
3494
|
+
*/
|
|
3495
|
+
create(params: CreateTaskRequest & {
|
|
3496
|
+
tenantId: string;
|
|
3497
|
+
ownerType: string;
|
|
3498
|
+
ownerId: string;
|
|
3499
|
+
}): Promise<TaskItem>;
|
|
3500
|
+
/**
|
|
3501
|
+
* Get task by ID
|
|
3502
|
+
*/
|
|
3503
|
+
getById(tenantId: string, id: string): Promise<TaskItem | null>;
|
|
3504
|
+
/**
|
|
3505
|
+
* List tasks matching filter criteria
|
|
3506
|
+
*/
|
|
3507
|
+
list(filter: TaskListFilter): Promise<TaskItem[]>;
|
|
3508
|
+
/**
|
|
3509
|
+
* Update an existing task
|
|
3510
|
+
*/
|
|
3511
|
+
update(tenantId: string, id: string, updates: UpdateTaskRequest): Promise<TaskItem | null>;
|
|
3512
|
+
/**
|
|
3513
|
+
* Delete a task by ID
|
|
3514
|
+
*/
|
|
3515
|
+
delete(tenantId: string, id: string): Promise<boolean>;
|
|
3516
|
+
/**
|
|
3517
|
+
* Clear all tasks for a tenant (useful for testing)
|
|
3518
|
+
*/
|
|
3519
|
+
clear(tenantId?: string): void;
|
|
3520
|
+
}
|
|
3521
|
+
|
|
3522
|
+
declare class InMemoryMenuStore implements MenuRegistry {
|
|
3523
|
+
private items;
|
|
3524
|
+
list(params: {
|
|
3525
|
+
tenantId: string;
|
|
3526
|
+
menuTarget?: string;
|
|
3527
|
+
}): Promise<MenuItem[]>;
|
|
3528
|
+
getById(id: string): Promise<MenuItem | null>;
|
|
3529
|
+
create(input: CreateMenuItemInput & {
|
|
3530
|
+
tenantId: string;
|
|
3531
|
+
}): Promise<MenuItem>;
|
|
3532
|
+
update(id: string, patch: UpdateMenuItemInput): Promise<MenuItem>;
|
|
3533
|
+
delete(id: string): Promise<void>;
|
|
3534
|
+
clear(): void;
|
|
3535
|
+
}
|
|
3536
|
+
|
|
3463
3537
|
/**
|
|
3464
3538
|
* Embeddings Lattice Interface
|
|
3465
3539
|
* Defines the structure of an embeddings lattice entry
|
|
@@ -4420,6 +4494,23 @@ declare function buildSandboxMetadataEnv(config?: RunSandboxConfig): Record<stri
|
|
|
4420
4494
|
|
|
4421
4495
|
declare function buildNamedVolumeName(prefix: "s" | "a" | "p", ...parts: Array<string | undefined>): string;
|
|
4422
4496
|
|
|
4497
|
+
/**
|
|
4498
|
+
* Channel connection lifecycle.
|
|
4499
|
+
*
|
|
4500
|
+
* When a gateway starts, it should call {@link connectAllChannels} to
|
|
4501
|
+
* establish persistent connections for every enabled channel installation
|
|
4502
|
+
* across ALL tenants.
|
|
4503
|
+
*
|
|
4504
|
+
* Adapters implement the optional {@link ChannelAdapter.connect} method
|
|
4505
|
+
* which handles connection setup, event ingestion, and message dispatch
|
|
4506
|
+
* internally.
|
|
4507
|
+
*/
|
|
4508
|
+
|
|
4509
|
+
interface ConnectAllChannelsOptions {
|
|
4510
|
+
deps?: unknown;
|
|
4511
|
+
}
|
|
4512
|
+
declare function connectAllChannels(getAdapter: (channel: string) => ChannelAdapter | undefined, options?: ConnectAllChannelsOptions): Promise<void>;
|
|
4513
|
+
|
|
4423
4514
|
/**
|
|
4424
4515
|
* Sets the global {@link BindingRegistry} instance used by the channel message router.
|
|
4425
4516
|
*
|
|
@@ -4458,6 +4549,9 @@ declare function setBindingRegistry(r: BindingRegistry): void;
|
|
|
4458
4549
|
*/
|
|
4459
4550
|
declare function getBindingRegistry(): BindingRegistry;
|
|
4460
4551
|
|
|
4552
|
+
declare function setMenuRegistry(r: MenuRegistry): void;
|
|
4553
|
+
declare function getMenuRegistry(): MenuRegistry;
|
|
4554
|
+
|
|
4461
4555
|
/**
|
|
4462
4556
|
* Agent Team - Store Protocols
|
|
4463
4557
|
*
|
|
@@ -5911,8 +6005,8 @@ declare class Agent {
|
|
|
5911
6005
|
assistant_id: string;
|
|
5912
6006
|
thread_id: string;
|
|
5913
6007
|
tenant_id: string;
|
|
5914
|
-
workspace_id: string
|
|
5915
|
-
project_id: string
|
|
6008
|
+
workspace_id: string;
|
|
6009
|
+
project_id: string;
|
|
5916
6010
|
custom_run_config: any;
|
|
5917
6011
|
queueMode: ThreadQueueConfig;
|
|
5918
6012
|
private isWaitingForQueueEnd;
|
|
@@ -5958,9 +6052,39 @@ declare class Agent {
|
|
|
5958
6052
|
invoke(queueMessage: QueueMessage, signal?: AbortSignal): Promise<{
|
|
5959
6053
|
messages: any;
|
|
5960
6054
|
}>;
|
|
6055
|
+
/**
|
|
6056
|
+
* Like {@link invoke} but returns the full LangGraph state (all annotations)
|
|
6057
|
+
* instead of only messages. Messages are serialized to dicts; other state
|
|
6058
|
+
* fields are returned as-is.
|
|
6059
|
+
*
|
|
6060
|
+
* @remarks
|
|
6061
|
+
* Only call this when you need the full state. Existing callers (gateway,
|
|
6062
|
+
* workflows) should keep using {@link invoke} which returns only messages
|
|
6063
|
+
* to avoid exposing internal annotation data.
|
|
6064
|
+
*/
|
|
6065
|
+
invokeWithState(queueMessage: QueueMessage, signal?: AbortSignal): Promise<{
|
|
6066
|
+
messages: {
|
|
6067
|
+
role: string;
|
|
6068
|
+
content: string;
|
|
6069
|
+
name: string | undefined;
|
|
6070
|
+
tool_call_id: string | undefined;
|
|
6071
|
+
additional_kwargs?: Record<string, any>;
|
|
6072
|
+
response_metadata?: Record<string, any>;
|
|
6073
|
+
id?: string;
|
|
6074
|
+
}[];
|
|
6075
|
+
}>;
|
|
5961
6076
|
private agentExecutor;
|
|
5962
6077
|
getPendingMessages(): Promise<PendingMessage[]>;
|
|
5963
6078
|
private agentStreamExecutor;
|
|
6079
|
+
private consumeAgentStream;
|
|
6080
|
+
/**
|
|
6081
|
+
* Resume LangGraph execution from the last checkpoint.
|
|
6082
|
+
*
|
|
6083
|
+
* Streams with `null` input — this tells LangGraph to continue from
|
|
6084
|
+
* wherever it left off using the checkpointed state for this thread.
|
|
6085
|
+
* All output chunks are buffered via {@link addChunk}.
|
|
6086
|
+
*/
|
|
6087
|
+
private resumeGraphFromCheckpoint;
|
|
5964
6088
|
private waitingForQueueEnd;
|
|
5965
6089
|
private getQueueStore;
|
|
5966
6090
|
private getDefaultQueueConfig;
|
|
@@ -6066,9 +6190,14 @@ declare class Agent {
|
|
|
6066
6190
|
/**
|
|
6067
6191
|
* Resume processing after a server restart.
|
|
6068
6192
|
*
|
|
6069
|
-
*
|
|
6070
|
-
*
|
|
6071
|
-
*
|
|
6193
|
+
* If the graph was mid-execution (BUSY) it resumes from the LangGraph
|
|
6194
|
+
* checkpoint without re-injecting the message — the message has already
|
|
6195
|
+
* been consumed and is in the graph state. Processing messages are removed
|
|
6196
|
+
* rather than replayed.
|
|
6197
|
+
*
|
|
6198
|
+
* Skips threads that are in `INTERRUPTED` state (the interruption was
|
|
6199
|
+
* intentional). IDLE threads simply clean up and restart the queue
|
|
6200
|
+
* processor for any remaining pending messages.
|
|
6072
6201
|
*
|
|
6073
6202
|
* Called during gateway startup to recover threads that were mid-execution
|
|
6074
6203
|
* when the server went down.
|
|
@@ -6426,6 +6555,8 @@ interface UnknownToolHandlerConfig {
|
|
|
6426
6555
|
*/
|
|
6427
6556
|
declare function createUnknownToolHandlerMiddleware(config?: UnknownToolHandlerConfig): AgentMiddleware;
|
|
6428
6557
|
|
|
6558
|
+
declare function createTaskMiddleware(): AgentMiddleware;
|
|
6559
|
+
|
|
6429
6560
|
type ResolveAgentFn = (ref?: string, responseFormat?: Record<string, unknown>, stepType?: string) => Promise<AgentClient>;
|
|
6430
6561
|
/**
|
|
6431
6562
|
* Build a LangGraph Annotation.Root from DSL state.fields.
|
|
@@ -6486,15 +6617,6 @@ declare function invokeWithRetry<T>(fn: () => Promise<T>, maxRetries: number, re
|
|
|
6486
6617
|
* extracts output, and returns a state update.
|
|
6487
6618
|
*/
|
|
6488
6619
|
declare function createAgentNode(node: InternalAgentNode, resolveAgent: ResolveAgentFn, trackingStore?: WorkflowTrackingStore): (state: Record<string, unknown>, config?: RunnableConfig) => Promise<Partial<Record<string, unknown>>>;
|
|
6489
|
-
/**
|
|
6490
|
-
* Create a handler for a `human_feedback` node.
|
|
6491
|
-
*
|
|
6492
|
-
* Invokes an agent with the rendered prompt. The agent can use the
|
|
6493
|
-
* `ask_user_to_clarify` tool to ask the user structured questions;
|
|
6494
|
-
* the clarify middleware handles the interrupt/resume cycle automatically.
|
|
6495
|
-
* Agent output is extracted and written to state.
|
|
6496
|
-
*/
|
|
6497
|
-
declare function createHumanFeedbackNode(node: InternalHumanFeedbackNode, resolveAgent: ResolveAgentFn, trackingStore?: WorkflowTrackingStore): (state: Record<string, unknown>, config?: RunnableConfig) => Promise<Partial<Record<string, unknown>>>;
|
|
6498
6620
|
/**
|
|
6499
6621
|
* Create a handler for a `map` node.
|
|
6500
6622
|
*
|
|
@@ -6503,13 +6625,6 @@ declare function createHumanFeedbackNode(node: InternalHumanFeedbackNode, resolv
|
|
|
6503
6625
|
* and optionally calls a reduce agent to aggregate results.
|
|
6504
6626
|
*/
|
|
6505
6627
|
declare function createMapNode(node: InternalMapNode, resolveAgent: ResolveAgentFn, trackingStore?: WorkflowTrackingStore): (state: Record<string, unknown>, config?: RunnableConfig) => Promise<Partial<Record<string, unknown>>>;
|
|
6506
|
-
/**
|
|
6507
|
-
* Create a handler for a `terminal` node.
|
|
6508
|
-
*
|
|
6509
|
-
* Sets the status field in state and finalizes the WorkflowRun tracking record.
|
|
6510
|
-
* An implicit edge to END is added during graph compilation.
|
|
6511
|
-
*/
|
|
6512
|
-
declare function createTerminalNode(node: InternalTerminalNode, trackingStore?: WorkflowTrackingStore): (state: Record<string, unknown>) => Promise<Partial<Record<string, unknown>>>;
|
|
6513
6628
|
/**
|
|
6514
6629
|
* Dispatch to the correct handler factory based on node type.
|
|
6515
6630
|
*/
|
|
@@ -6518,19 +6633,19 @@ declare function createNodeHandler(node: InternalNode, resolveAgent: ResolveAgen
|
|
|
6518
6633
|
/**
|
|
6519
6634
|
* Workflow DSL → LangGraph StateGraph compiler
|
|
6520
6635
|
*
|
|
6521
|
-
* Takes a
|
|
6522
|
-
* and compiles
|
|
6636
|
+
* Takes a YAML workflow string, parses it via parseYaml(),
|
|
6637
|
+
* and compiles the resulting InternalDSL into a runnable LangGraph StateGraph.
|
|
6523
6638
|
*/
|
|
6524
6639
|
|
|
6525
6640
|
/**
|
|
6526
|
-
* Compile a
|
|
6527
|
-
*
|
|
6528
|
-
* @param dsl The WorkflowDSL definition
|
|
6529
|
-
* @param resolveAgent Function to resolve agent ref → CompiledStateGraph
|
|
6530
|
-
* @param checkpointer Checkpoint saver for state persistence
|
|
6531
|
-
* @returns Compiled LangGraph StateGraph ready for invocation
|
|
6641
|
+
* Compile a YAML workflow string into a LangGraph StateGraph.
|
|
6532
6642
|
*/
|
|
6533
|
-
declare function compileWorkflow(
|
|
6643
|
+
declare function compileWorkflow(yamlStr: string, resolveAgent: ResolveAgentFn, checkpointer: BaseCheckpointSaver, trackingStore?: WorkflowTrackingStore): CompiledStateGraph<any, any, any, any, any>;
|
|
6644
|
+
/**
|
|
6645
|
+
* Compile an InternalDSL directly into a LangGraph StateGraph.
|
|
6646
|
+
* Used internally by compileWorkflow and for lower-level access.
|
|
6647
|
+
*/
|
|
6648
|
+
declare function compileInternal(ir: InternalDSL, resolveAgent: ResolveAgentFn, checkpointer: BaseCheckpointSaver, trackingStore?: WorkflowTrackingStore): CompiledStateGraph<any, any, any, any, any>;
|
|
6534
6649
|
interface WorkflowValidationError {
|
|
6535
6650
|
type: "error" | "warning";
|
|
6536
6651
|
message: string;
|
|
@@ -6539,9 +6654,79 @@ interface WorkflowValidationError {
|
|
|
6539
6654
|
declare function validateDSL(dsl: InternalDSL): WorkflowValidationError[];
|
|
6540
6655
|
|
|
6541
6656
|
/**
|
|
6542
|
-
*
|
|
6657
|
+
* Convert condition expression's leading identifier to bracket notation
|
|
6658
|
+
* so hyphenated step ids don't break JS parsing.
|
|
6659
|
+
* "classify-doc.intent" → "state[\"classify-doc\"].intent"
|
|
6543
6660
|
*/
|
|
6661
|
+
declare function toSafeStateExpr(expr: string): string;
|
|
6662
|
+
declare function parseYaml(yamlStr: string): InternalDSL;
|
|
6544
6663
|
|
|
6545
|
-
|
|
6664
|
+
/**
|
|
6665
|
+
* Convert shorthand schema notation to standard JSON Schema.
|
|
6666
|
+
*
|
|
6667
|
+
* Shorthand forms:
|
|
6668
|
+
* field: string → { type: "string" }
|
|
6669
|
+
* field: number → { type: "number" }
|
|
6670
|
+
* field: boolean → { type: "boolean" }
|
|
6671
|
+
* field: string[] → { type: "array", items: { type: "string" } }
|
|
6672
|
+
* field: number[] → { type: "array", items: { type: "number" } }
|
|
6673
|
+
* field: boolean[] → { type: "array", items: { type: "boolean" } }
|
|
6674
|
+
* field: [{a: string, b: number}] → { type: "array", items: { type: "object", ... } }
|
|
6675
|
+
* field: {a: string} → { type: "object", properties: {a: {type: "string"}}, required: ["a"] }
|
|
6676
|
+
*
|
|
6677
|
+
* @param fields Shorthand schema definition
|
|
6678
|
+
* @returns Standard JSON Schema or undefined if fields is empty/null
|
|
6679
|
+
*/
|
|
6680
|
+
declare function toJsonSchema(fields: Record<string, unknown> | undefined): Record<string, unknown> | undefined;
|
|
6681
|
+
|
|
6682
|
+
/**
|
|
6683
|
+
* Global singleton for personal assistant default configuration.
|
|
6684
|
+
*
|
|
6685
|
+
* Holds the base AgentConfig used when users create a personal assistant.
|
|
6686
|
+
* Projects can extend it via `extend()` to add/remove middleware and tools.
|
|
6687
|
+
*
|
|
6688
|
+
* @example
|
|
6689
|
+
* ```ts
|
|
6690
|
+
* import { PersonalAssistantConfig } from "@axiom-lattice/core";
|
|
6691
|
+
*
|
|
6692
|
+
* PersonalAssistantConfig.extend((config) => {
|
|
6693
|
+
* config.middleware.push({ id: "sql", type: "sql", ... });
|
|
6694
|
+
* config.tools.push("my_custom_tool");
|
|
6695
|
+
* config.middleware = config.middleware.filter(m => m.type !== "browser");
|
|
6696
|
+
* });
|
|
6697
|
+
* ```
|
|
6698
|
+
*/
|
|
6699
|
+
declare class PersonalAssistantConfig {
|
|
6700
|
+
private static _config;
|
|
6701
|
+
/**
|
|
6702
|
+
* Get a deep clone of the current default config.
|
|
6703
|
+
* Caller must set `key` before registering as an agent.
|
|
6704
|
+
*/
|
|
6705
|
+
static get(): AgentConfig;
|
|
6706
|
+
/**
|
|
6707
|
+
* Mutate the default config in-place.
|
|
6708
|
+
* Call once at app startup to customize middleware and tools.
|
|
6709
|
+
*
|
|
6710
|
+
* @param fn - Receives the live config object for direct mutation
|
|
6711
|
+
*/
|
|
6712
|
+
static extend(fn: (config: Omit<AgentConfig, "key">) => void): void;
|
|
6713
|
+
/**
|
|
6714
|
+
* Reset config to built-in defaults (useful in tests).
|
|
6715
|
+
*/
|
|
6716
|
+
static reset(): void;
|
|
6717
|
+
/**
|
|
6718
|
+
* Inject name and personality into a config by directly building
|
|
6719
|
+
* the claw middleware's bootstrap file contents.
|
|
6720
|
+
*
|
|
6721
|
+
* IDENTITY.md gets the actual name and personality description.
|
|
6722
|
+
* USER.md gets the user's name pre-filled.
|
|
6723
|
+
* SOUL.md is kept as-is (shared across all personal assistants).
|
|
6724
|
+
*
|
|
6725
|
+
* @param config - The agent config (must be a mutable copy from get())
|
|
6726
|
+
* @param name - Assistant display name (also used as the user's name in USER.md)
|
|
6727
|
+
* @param personality - Personality description for IDENTITY.md
|
|
6728
|
+
*/
|
|
6729
|
+
static render(config: AgentConfig, name: string, personality: string): void;
|
|
6730
|
+
}
|
|
6546
6731
|
|
|
6547
|
-
export { AGENT_TASK_EVENT, type AddMessageParams, Agent, type AgentClient, type AgentExecutor, AgentInstanceManager, type AgentLattice, AgentLatticeManager, type AgentLifecycleEventName, AgentManager, type AgentStreamExecutor, type AgentThreadInterface, BUILTIN_SKILLS, type BackendFactory, type BackendProtocol, type BufferStats, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, type ColumnInfo, CompositeBackend, 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 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, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryTaskListStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, LINE_NUMBER_WIDTH, type LangGraphStateChecker, 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, PinoLoggerClient, 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 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, type ToolDefinition, type ToolLattice, ToolLatticeManager, type TopologyEdge, type UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, VolumeFilesystem, type VolumeFsClient, type WorkflowValidationError, type WriteResult, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildInput, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, buildStateAnnotation, checkEmptyContent, clearEncryptionKeyCache, compileWorkflow, computeSandboxName, configureStores, createAgentNode, createAgentTeam, createExecuteSqlQueryTool, createFileData,
|
|
6732
|
+
export { AGENT_TASK_EVENT, type AddMessageParams, Agent, type AgentClient, type AgentExecutor, AgentInstanceManager, type AgentLattice, AgentLatticeManager, type AgentLifecycleEventName, AgentManager, type AgentStreamExecutor, type AgentThreadInterface, BUILTIN_SKILLS, type BackendFactory, type BackendProtocol, type BufferStats, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, type ColumnInfo, CompositeBackend, type ConnectAllChannelsOptions, 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 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, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryMenuStore, InMemoryTaskListStore, InMemoryTaskStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, LINE_NUMBER_WIDTH, type LangGraphStateChecker, 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, 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 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, type ToolDefinition, type ToolLattice, ToolLatticeManager, type TopologyEdge, type UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, VolumeFilesystem, type VolumeFsClient, type WorkflowValidationError, type WriteResult, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildInput, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, buildStateAnnotation, checkEmptyContent, clearEncryptionKeyCache, compileInternal, compileWorkflow, computeSandboxName, configureStores, connectAllChannels, createAgentNode, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createMapNode, createModelSelectorMiddleware, createNodeHandler, createProcessingAgent, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createSandboxProvider, createSchedulerMiddleware, createTaskMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, embeddingsLatticeManager, encrypt, ensureBuiltinAgentsForTenant, eventBus, eventBus as eventBusDefault, extractFetcherError, extractOutput, fileDataToString, formatContentWithLineNumbers, formatGrepMatches, formatGrepResults, formatReadResponse, getAgentClient, getAgentConfig, getAllAgentConfigs, getAllBuiltInSkillMetas, getAllToolDefinitions, getBindingRegistry, getBuiltInSkillContent, getBuiltInSkillMeta, getBuiltInSkillNames, getCheckpointSaver, getChunkBuffer, getEmbeddingsClient, getEmbeddingsLattice, getEncryptionKey, getLoggerLattice, getMenuRegistry, getModelLattice, getNextCronTime, getQueueLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, invokeWithRetry, isBuiltInSkill, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, 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, renderTemplate, resolvePath, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, setBindingRegistry, setMenuRegistry, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toJsonSchema, toSafeStateExpr, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, updateFileData, validateAgentInput, validateDSL, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager };
|