@axiom-lattice/core 3.0.4 → 3.0.5
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 +35 -6
- package/dist/index.d.ts +35 -6
- package/dist/index.js +614 -316
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +482 -185
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ import { BaseLanguageModelInput, LanguageModelLike } from '@langchain/core/langu
|
|
|
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, ConnectionStore, TaskWorkItemStore, 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, STTModelLatticeProtocol, STTConfig, STTClient, TranscriptionResult, 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';
|
|
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, TaskWorkItemStore, 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, STTModelLatticeProtocol, STTConfig, STTClient, TranscriptionResult, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient, McpTool, ResourceResolver, ResourceAddress, ShareVisibility, CreateShareRequest, ChannelAdapter, InterruptPolicy, 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';
|
|
@@ -5319,6 +5319,7 @@ interface LatticeEvalBatchReport {
|
|
|
5319
5319
|
total_cases: number;
|
|
5320
5320
|
passed_cases: number;
|
|
5321
5321
|
failed_cases: number;
|
|
5322
|
+
interrupted_cases: number;
|
|
5322
5323
|
pass_rate: number;
|
|
5323
5324
|
};
|
|
5324
5325
|
suites: Array<{
|
|
@@ -5326,11 +5327,13 @@ interface LatticeEvalBatchReport {
|
|
|
5326
5327
|
total_cases: number;
|
|
5327
5328
|
passed_cases: number;
|
|
5328
5329
|
failed_cases: number;
|
|
5330
|
+
interrupted_cases?: number;
|
|
5329
5331
|
cases: Array<{
|
|
5330
5332
|
caseId: string;
|
|
5331
5333
|
pass?: boolean;
|
|
5332
5334
|
final_score?: number;
|
|
5333
5335
|
error?: string;
|
|
5336
|
+
interrupted?: boolean;
|
|
5334
5337
|
}>;
|
|
5335
5338
|
}>;
|
|
5336
5339
|
}
|
|
@@ -5357,6 +5360,13 @@ interface LatticeEvalCase {
|
|
|
5357
5360
|
content_assertion: string;
|
|
5358
5361
|
eval_rubrics?: LatticeEvalRubric[];
|
|
5359
5362
|
};
|
|
5363
|
+
/**
|
|
5364
|
+
* How HITL interrupts are handled for this case. Unset/stop: the case
|
|
5365
|
+
* pauses and the judge evaluates the pause; auto-approve/auto-reject/
|
|
5366
|
+
* canned-response: the runner resumes the agent to test the flow AFTER
|
|
5367
|
+
* the human input.
|
|
5368
|
+
*/
|
|
5369
|
+
interruptPolicy?: InterruptPolicy;
|
|
5360
5370
|
}
|
|
5361
5371
|
interface LatticeEvalCaseWithTemplate {
|
|
5362
5372
|
caseId: string;
|
|
@@ -5371,6 +5381,7 @@ interface LatticeEvalCaseWithTemplate {
|
|
|
5371
5381
|
content_assertion: string;
|
|
5372
5382
|
eval_rubrics?: LatticeEvalRubric[];
|
|
5373
5383
|
};
|
|
5384
|
+
interruptPolicy?: InterruptPolicy;
|
|
5374
5385
|
}
|
|
5375
5386
|
interface LatticeEvalTemplate {
|
|
5376
5387
|
templateId: string;
|
|
@@ -5395,12 +5406,30 @@ interface LatticeEvalResult {
|
|
|
5395
5406
|
}[];
|
|
5396
5407
|
summary: string;
|
|
5397
5408
|
error?: string;
|
|
5409
|
+
/**
|
|
5410
|
+
* True when the agent-under-test requested human input (HITL interrupt)
|
|
5411
|
+
* before producing a final answer. Such cases are NOT judged — they are
|
|
5412
|
+
* neither pass nor fail.
|
|
5413
|
+
*/
|
|
5414
|
+
interrupted?: boolean;
|
|
5415
|
+
/** The HITL interrupt payload (LangGraph `__interrupt__[0]`). */
|
|
5416
|
+
interrupt?: {
|
|
5417
|
+
id?: string;
|
|
5418
|
+
value?: unknown;
|
|
5419
|
+
};
|
|
5398
5420
|
}
|
|
5399
5421
|
interface CaseRunResult {
|
|
5400
5422
|
caseId: string;
|
|
5401
5423
|
result?: LatticeEvalResult;
|
|
5402
5424
|
error?: string;
|
|
5403
5425
|
error_stack?: string;
|
|
5426
|
+
/** True when the agent-under-test hit a HITL interrupt (case not judged). */
|
|
5427
|
+
interrupted?: boolean;
|
|
5428
|
+
/** The HITL interrupt payload. */
|
|
5429
|
+
interrupt?: {
|
|
5430
|
+
id?: string;
|
|
5431
|
+
value?: unknown;
|
|
5432
|
+
};
|
|
5404
5433
|
duration_ms?: number;
|
|
5405
5434
|
thread_id?: string;
|
|
5406
5435
|
judge_thread_id?: string;
|
|
@@ -5561,11 +5590,8 @@ interface LatticeEvalConfig {
|
|
|
5561
5590
|
*/
|
|
5562
5591
|
verbose?: boolean;
|
|
5563
5592
|
}
|
|
5564
|
-
/**
|
|
5565
|
-
* LatticeEval class for evaluating Lattice evaluation cases.
|
|
5566
|
-
* Executes agents in-process via agentInstanceManager.
|
|
5567
|
-
*/
|
|
5568
5593
|
declare class LatticeEval {
|
|
5594
|
+
/** Per-message and total budget for the trajectory text (chars). */
|
|
5569
5595
|
private config;
|
|
5570
5596
|
private verbose;
|
|
5571
5597
|
private inMemoryLogs;
|
|
@@ -7646,7 +7672,10 @@ declare function createModelSelectorMiddleware(): AgentMiddleware;
|
|
|
7646
7672
|
* to generate error ToolMessages and jump back to the model.
|
|
7647
7673
|
*
|
|
7648
7674
|
* Key Design Principles:
|
|
7649
|
-
* 1.
|
|
7675
|
+
* 1. Only keep unknown tool_calls in AIMessage (strip valid ones to prevent
|
|
7676
|
+
* dangling tool_calls — afterModel jumps to "model" and skips ToolNode, so
|
|
7677
|
+
* any preserved call without a ToolMessage would be rejected by
|
|
7678
|
+
* OpenAI/OneAPI with 400 "insufficient tool messages following tool_calls")
|
|
7650
7679
|
* 2. Generate error ToolMessages for unknown tools (preserve tool_call_id mapping)
|
|
7651
7680
|
* 3. Use jumpTo to loop back to model node (required for agent loop)
|
|
7652
7681
|
* 4. ToolNode will skip tool calls that already have ToolMessages
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { BaseLanguageModelInput, LanguageModelLike } from '@langchain/core/langu
|
|
|
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, ConnectionStore, TaskWorkItemStore, 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, STTModelLatticeProtocol, STTConfig, STTClient, TranscriptionResult, 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';
|
|
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, TaskWorkItemStore, 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, STTModelLatticeProtocol, STTConfig, STTClient, TranscriptionResult, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient, McpTool, ResourceResolver, ResourceAddress, ShareVisibility, CreateShareRequest, ChannelAdapter, InterruptPolicy, 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';
|
|
@@ -5319,6 +5319,7 @@ interface LatticeEvalBatchReport {
|
|
|
5319
5319
|
total_cases: number;
|
|
5320
5320
|
passed_cases: number;
|
|
5321
5321
|
failed_cases: number;
|
|
5322
|
+
interrupted_cases: number;
|
|
5322
5323
|
pass_rate: number;
|
|
5323
5324
|
};
|
|
5324
5325
|
suites: Array<{
|
|
@@ -5326,11 +5327,13 @@ interface LatticeEvalBatchReport {
|
|
|
5326
5327
|
total_cases: number;
|
|
5327
5328
|
passed_cases: number;
|
|
5328
5329
|
failed_cases: number;
|
|
5330
|
+
interrupted_cases?: number;
|
|
5329
5331
|
cases: Array<{
|
|
5330
5332
|
caseId: string;
|
|
5331
5333
|
pass?: boolean;
|
|
5332
5334
|
final_score?: number;
|
|
5333
5335
|
error?: string;
|
|
5336
|
+
interrupted?: boolean;
|
|
5334
5337
|
}>;
|
|
5335
5338
|
}>;
|
|
5336
5339
|
}
|
|
@@ -5357,6 +5360,13 @@ interface LatticeEvalCase {
|
|
|
5357
5360
|
content_assertion: string;
|
|
5358
5361
|
eval_rubrics?: LatticeEvalRubric[];
|
|
5359
5362
|
};
|
|
5363
|
+
/**
|
|
5364
|
+
* How HITL interrupts are handled for this case. Unset/stop: the case
|
|
5365
|
+
* pauses and the judge evaluates the pause; auto-approve/auto-reject/
|
|
5366
|
+
* canned-response: the runner resumes the agent to test the flow AFTER
|
|
5367
|
+
* the human input.
|
|
5368
|
+
*/
|
|
5369
|
+
interruptPolicy?: InterruptPolicy;
|
|
5360
5370
|
}
|
|
5361
5371
|
interface LatticeEvalCaseWithTemplate {
|
|
5362
5372
|
caseId: string;
|
|
@@ -5371,6 +5381,7 @@ interface LatticeEvalCaseWithTemplate {
|
|
|
5371
5381
|
content_assertion: string;
|
|
5372
5382
|
eval_rubrics?: LatticeEvalRubric[];
|
|
5373
5383
|
};
|
|
5384
|
+
interruptPolicy?: InterruptPolicy;
|
|
5374
5385
|
}
|
|
5375
5386
|
interface LatticeEvalTemplate {
|
|
5376
5387
|
templateId: string;
|
|
@@ -5395,12 +5406,30 @@ interface LatticeEvalResult {
|
|
|
5395
5406
|
}[];
|
|
5396
5407
|
summary: string;
|
|
5397
5408
|
error?: string;
|
|
5409
|
+
/**
|
|
5410
|
+
* True when the agent-under-test requested human input (HITL interrupt)
|
|
5411
|
+
* before producing a final answer. Such cases are NOT judged — they are
|
|
5412
|
+
* neither pass nor fail.
|
|
5413
|
+
*/
|
|
5414
|
+
interrupted?: boolean;
|
|
5415
|
+
/** The HITL interrupt payload (LangGraph `__interrupt__[0]`). */
|
|
5416
|
+
interrupt?: {
|
|
5417
|
+
id?: string;
|
|
5418
|
+
value?: unknown;
|
|
5419
|
+
};
|
|
5398
5420
|
}
|
|
5399
5421
|
interface CaseRunResult {
|
|
5400
5422
|
caseId: string;
|
|
5401
5423
|
result?: LatticeEvalResult;
|
|
5402
5424
|
error?: string;
|
|
5403
5425
|
error_stack?: string;
|
|
5426
|
+
/** True when the agent-under-test hit a HITL interrupt (case not judged). */
|
|
5427
|
+
interrupted?: boolean;
|
|
5428
|
+
/** The HITL interrupt payload. */
|
|
5429
|
+
interrupt?: {
|
|
5430
|
+
id?: string;
|
|
5431
|
+
value?: unknown;
|
|
5432
|
+
};
|
|
5404
5433
|
duration_ms?: number;
|
|
5405
5434
|
thread_id?: string;
|
|
5406
5435
|
judge_thread_id?: string;
|
|
@@ -5561,11 +5590,8 @@ interface LatticeEvalConfig {
|
|
|
5561
5590
|
*/
|
|
5562
5591
|
verbose?: boolean;
|
|
5563
5592
|
}
|
|
5564
|
-
/**
|
|
5565
|
-
* LatticeEval class for evaluating Lattice evaluation cases.
|
|
5566
|
-
* Executes agents in-process via agentInstanceManager.
|
|
5567
|
-
*/
|
|
5568
5593
|
declare class LatticeEval {
|
|
5594
|
+
/** Per-message and total budget for the trajectory text (chars). */
|
|
5569
5595
|
private config;
|
|
5570
5596
|
private verbose;
|
|
5571
5597
|
private inMemoryLogs;
|
|
@@ -7646,7 +7672,10 @@ declare function createModelSelectorMiddleware(): AgentMiddleware;
|
|
|
7646
7672
|
* to generate error ToolMessages and jump back to the model.
|
|
7647
7673
|
*
|
|
7648
7674
|
* Key Design Principles:
|
|
7649
|
-
* 1.
|
|
7675
|
+
* 1. Only keep unknown tool_calls in AIMessage (strip valid ones to prevent
|
|
7676
|
+
* dangling tool_calls — afterModel jumps to "model" and skips ToolNode, so
|
|
7677
|
+
* any preserved call without a ToolMessage would be rejected by
|
|
7678
|
+
* OpenAI/OneAPI with 400 "insufficient tool messages following tool_calls")
|
|
7650
7679
|
* 2. Generate error ToolMessages for unknown tools (preserve tool_call_id mapping)
|
|
7651
7680
|
* 3. Use jumpTo to loop back to model node (required for agent loop)
|
|
7652
7681
|
* 4. ToolNode will skip tool calls that already have ToolMessages
|