@axiom-lattice/core 3.0.6 → 3.1.0
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 +36 -4
- package/dist/index.d.ts +36 -4
- package/dist/index.js +141 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +140 -48
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -5283,6 +5283,27 @@ interface LatticeAgentStepConfig {
|
|
|
5283
5283
|
type OutputType = {
|
|
5284
5284
|
type: "message_content";
|
|
5285
5285
|
};
|
|
5286
|
+
/**
|
|
5287
|
+
* A known-answer probe used to verify the judge agent can discriminate
|
|
5288
|
+
* correct from incorrect outputs before a batch run (calibrateJudge).
|
|
5289
|
+
*/
|
|
5290
|
+
interface CalibrationProbe {
|
|
5291
|
+
/** Stable identifier for error messages and reporting. */
|
|
5292
|
+
id: string;
|
|
5293
|
+
/** The expected output description, including the problem itself — the judge must verify by reasoning. */
|
|
5294
|
+
task: string;
|
|
5295
|
+
/** The output under test. */
|
|
5296
|
+
finalOutput: string;
|
|
5297
|
+
/** Optional execution trajectory for process verification. */
|
|
5298
|
+
trajectory?: string;
|
|
5299
|
+
/** Whether the judge must mark this probe as PASS. */
|
|
5300
|
+
expectedPass: boolean;
|
|
5301
|
+
/**
|
|
5302
|
+
* Minimum acceptable final_score. Default rule when absent:
|
|
5303
|
+
* expectedPass=true requires final_score >= 80, expectedPass=false requires < 80.
|
|
5304
|
+
*/
|
|
5305
|
+
expectedScoreMin?: number;
|
|
5306
|
+
}
|
|
5286
5307
|
interface LatticeEvalProjectType {
|
|
5287
5308
|
projectName: string;
|
|
5288
5309
|
version?: string;
|
|
@@ -5291,6 +5312,8 @@ interface LatticeEvalProjectType {
|
|
|
5291
5312
|
templates?: LatticeEvalTemplate[];
|
|
5292
5313
|
judge_agent_config: {
|
|
5293
5314
|
modelKey: string;
|
|
5315
|
+
/** Optional per-project calibration probes; defaults to DEFAULT_CALIBRATION_PROBES when absent. */
|
|
5316
|
+
calibration_cases?: CalibrationProbe[];
|
|
5294
5317
|
};
|
|
5295
5318
|
lattice_server_config: {
|
|
5296
5319
|
tenant_id?: string;
|
|
@@ -5471,12 +5494,13 @@ interface EvalRunService {
|
|
|
5471
5494
|
* executes in. Comes from the CALLER's runConfig, NOT from the eval
|
|
5472
5495
|
* project's targetServerConfig. Test cases are environment-agnostic;
|
|
5473
5496
|
* the run environment is decided at run time.
|
|
5497
|
+
* @param taskId - Optional training task (round) this run belongs to.
|
|
5474
5498
|
* @returns The newly created run ID
|
|
5475
5499
|
*/
|
|
5476
5500
|
startRun(tenantId: string, projectId: string, suiteIds?: string[], caseIds?: string[], runConfig?: {
|
|
5477
5501
|
workspaceId?: string;
|
|
5478
5502
|
projectId?: string;
|
|
5479
|
-
}): Promise<string>;
|
|
5503
|
+
}, taskId?: string): Promise<string>;
|
|
5480
5504
|
/**
|
|
5481
5505
|
* Abort a running evaluation.
|
|
5482
5506
|
*
|
|
@@ -5666,6 +5690,12 @@ declare class LatticeEvalSuite {
|
|
|
5666
5690
|
runAllCases(concurrency?: number, signal?: AbortSignal): Promise<CaseRunResult[]>;
|
|
5667
5691
|
}
|
|
5668
5692
|
|
|
5693
|
+
/**
|
|
5694
|
+
* Built-in known-answer calibration probes: multi-step reasoning problems,
|
|
5695
|
+
* each paired with a correct (PASS) and a plausible-but-wrong (FAIL) output.
|
|
5696
|
+
* A judge that cannot discriminate these should not be trusted with real cases.
|
|
5697
|
+
*/
|
|
5698
|
+
declare const DEFAULT_CALIBRATION_PROBES: CalibrationProbe[];
|
|
5669
5699
|
/**
|
|
5670
5700
|
* Manages a project with multiple evaluation suites.
|
|
5671
5701
|
* Registers a per-project judge agent (keyed by project name and tenant)
|
|
@@ -5686,8 +5716,10 @@ declare class LatticeEvalProject {
|
|
|
5686
5716
|
runAllSuites(concurrency?: number, signal?: AbortSignal): Promise<Map<string, CaseRunResult[]>>;
|
|
5687
5717
|
/**
|
|
5688
5718
|
* Verify the judge agent can produce parseable, correct verdicts
|
|
5689
|
-
* before committing to a full run. Uses
|
|
5690
|
-
*
|
|
5719
|
+
* before committing to a full run. Uses known-answer probes (default
|
|
5720
|
+
* multi-step reasoning set, overridable per project via
|
|
5721
|
+
* judge_agent_config.calibration_cases) to catch broken judges.
|
|
5722
|
+
* Checks both the pass verdict and the final_score direction.
|
|
5691
5723
|
*/
|
|
5692
5724
|
calibrateJudge(): Promise<{
|
|
5693
5725
|
ok: boolean;
|
|
@@ -8171,4 +8203,4 @@ declare class IdRemapper {
|
|
|
8171
8203
|
remapSkillIds(graphDefinition: Record<string, unknown>, skillRemap: Record<string, string>): Record<string, unknown>;
|
|
8172
8204
|
}
|
|
8173
8205
|
|
|
8174
|
-
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 CaseRunResult, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, CollectionLatticeManager, type ColumnInfo, CompositeBackend, type ConflictItem, type ConnectAllChannelsOptions, ConnectionRegistry, ConsoleLoggerClient, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type CustomMiddlewareFactory, CustomMiddlewareRegistry, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, type DeleteResult, DependencyResolver, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsInfo, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type EvalRunService, type ExportBundle, type ExportJob, type ExportableEntity, type ExportableEntityDefinition, ExportableEntityRegistry, type ExportableTypeInfo, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, IdRemapper, type ImportApplyResult, type ImportEntityResult, type ImportEntityStatus, type ImportPreviewResult, InMemoryA2AApiKeyStore, InMemoryAssistantStore, InMemoryBindingStore, InMemoryChannelInstallationStore, InMemoryChunkBuffer, InMemoryCollectionStore, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryMenuStore, InMemoryTaskListStore, InMemoryTaskStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, type InsertionItem, type JudgeVerdict, LINE_NUMBER_WIDTH, type LangGraphStateChecker, type LatticeAgentStepConfig, LatticeEval, type LatticeEvalBatchReport, type LatticeEvalCase, type LatticeEvalCaseType, type LatticeEvalCaseWithTemplate, type LatticeEvalConfig, type LatticeEvalLogEvent, type LatticeEvalLogLevel, LatticeEvalProject, type LatticeEvalProjectType, type LatticeEvalResult, type LatticeEvalRubric, LatticeEvalSuite, type LatticeEvalSuiteType, type LatticeEvalTemplate, 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 OutputType, type PendingMessage, PersonalAssistantConfig, PinoLoggerClient, PluginRegistry, PostgresDatabase, type PreviewError, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, QueueMode, type QueuePendingEvent, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type Resolution, type ResolutionAction, type ResolveAgentFn, type ResolvedConfig, type RunSandboxConfig, type RuntimeModelConfig, type STTModelInfo, STTModelLattice, type STTModelLatticeInterface, STTModelLatticeManager, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxProviderFactory, type SandboxProviderType, 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 UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, type VectorStoreProviderLattice, VectorStoreProviderManager, VolumeFilesystem, type VolumeFsClient, type WorkflowValidationError, type WriteResult, abortWorkflowRun, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildInput, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, buildStateAnnotation, buildTableName, checkEmptyContent, clearEncryptionKeyCache, clearEvalRunService, collectionLatticeManager, compileInternal, compileWorkflow, computeSandboxName, configureStores, connectAllChannels, createAgentNode, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createMapNode, createModelSelectorMiddleware, createNodeHandler, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createResourceAddress, createSandboxProvider, createSchedulerMiddleware, createSharePayload, createTaskMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, documentLearningPlugin, documentParserPlugin, embeddingsLatticeManager, encrypt, ensureBuiltinAgentsForTenant, evaluateLatticeCaseWithLogs, 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, getEvalRunService, getLoggerLattice, getMenuRegistry, getModelLattice, getNextCronTime, getOrCreateCollectionVectorStore, getQueueLattice, getSTTClient, getSTTClientWithTenant, getSTTModelLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, getVectorStoreProvider, getWorkflowSignal, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, invokeWithRetry, isBuiltInSkill, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, listCollectionEntries, listSandboxProviderTypes, loggerLatticeManager, mcpManager, metricsServerManager, modelLatticeManager, normalizeSandboxName, parallelLimit, parseCronExpression, parseJudgeVerdict, parseSkillFrontmatter, parseYaml, performStringReplacement, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerBuiltinSkill, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerSTTModelLattice, registerSandboxProviderType, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, registerVectorStoreProvider, registerWorkflowRun, removeCollectionVectorStore, renderTemplate, resolvePath, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, serializePluginMeta, setBindingRegistry, setEvalRunService, setMenuRegistry, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, sttModelLatticeManager, toJsonSchema, toSafeStateExpr, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, unregisterWorkflowRun, updateFileData, validateAgentInput, validateDSL, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager, vectorStoreProviderManager };
|
|
8206
|
+
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 CalibrationProbe, type CaseRunResult, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, CollectionLatticeManager, type ColumnInfo, CompositeBackend, type ConflictItem, type ConnectAllChannelsOptions, ConnectionRegistry, ConsoleLoggerClient, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type CustomMiddlewareFactory, CustomMiddlewareRegistry, DEFAULT_CALIBRATION_PROBES, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, type DeleteResult, DependencyResolver, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsInfo, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type EvalRunService, type ExportBundle, type ExportJob, type ExportableEntity, type ExportableEntityDefinition, ExportableEntityRegistry, type ExportableTypeInfo, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, IdRemapper, type ImportApplyResult, type ImportEntityResult, type ImportEntityStatus, type ImportPreviewResult, InMemoryA2AApiKeyStore, InMemoryAssistantStore, InMemoryBindingStore, InMemoryChannelInstallationStore, InMemoryChunkBuffer, InMemoryCollectionStore, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryMenuStore, InMemoryTaskListStore, InMemoryTaskStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, type InsertionItem, type JudgeVerdict, LINE_NUMBER_WIDTH, type LangGraphStateChecker, type LatticeAgentStepConfig, LatticeEval, type LatticeEvalBatchReport, type LatticeEvalCase, type LatticeEvalCaseType, type LatticeEvalCaseWithTemplate, type LatticeEvalConfig, type LatticeEvalLogEvent, type LatticeEvalLogLevel, LatticeEvalProject, type LatticeEvalProjectType, type LatticeEvalResult, type LatticeEvalRubric, LatticeEvalSuite, type LatticeEvalSuiteType, type LatticeEvalTemplate, 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 OutputType, type PendingMessage, PersonalAssistantConfig, PinoLoggerClient, PluginRegistry, PostgresDatabase, type PreviewError, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, QueueMode, type QueuePendingEvent, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type Resolution, type ResolutionAction, type ResolveAgentFn, type ResolvedConfig, type RunSandboxConfig, type RuntimeModelConfig, type STTModelInfo, STTModelLattice, type STTModelLatticeInterface, STTModelLatticeManager, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxProviderFactory, type SandboxProviderType, 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 UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, type VectorStoreProviderLattice, VectorStoreProviderManager, VolumeFilesystem, type VolumeFsClient, type WorkflowValidationError, type WriteResult, abortWorkflowRun, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildInput, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, buildStateAnnotation, buildTableName, checkEmptyContent, clearEncryptionKeyCache, clearEvalRunService, collectionLatticeManager, compileInternal, compileWorkflow, computeSandboxName, configureStores, connectAllChannels, createAgentNode, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createMapNode, createModelSelectorMiddleware, createNodeHandler, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createResourceAddress, createSandboxProvider, createSchedulerMiddleware, createSharePayload, createTaskMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, documentLearningPlugin, documentParserPlugin, embeddingsLatticeManager, encrypt, ensureBuiltinAgentsForTenant, evaluateLatticeCaseWithLogs, 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, getEvalRunService, getLoggerLattice, getMenuRegistry, getModelLattice, getNextCronTime, getOrCreateCollectionVectorStore, getQueueLattice, getSTTClient, getSTTClientWithTenant, getSTTModelLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, getVectorStoreProvider, getWorkflowSignal, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, invokeWithRetry, isBuiltInSkill, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, listCollectionEntries, listSandboxProviderTypes, loggerLatticeManager, mcpManager, metricsServerManager, modelLatticeManager, normalizeSandboxName, parallelLimit, parseCronExpression, parseJudgeVerdict, parseSkillFrontmatter, parseYaml, performStringReplacement, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerBuiltinSkill, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerSTTModelLattice, registerSandboxProviderType, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, registerVectorStoreProvider, registerWorkflowRun, removeCollectionVectorStore, renderTemplate, resolvePath, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, serializePluginMeta, setBindingRegistry, setEvalRunService, setMenuRegistry, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, sttModelLatticeManager, toJsonSchema, toSafeStateExpr, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, unregisterWorkflowRun, updateFileData, validateAgentInput, validateDSL, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager, vectorStoreProviderManager };
|
package/dist/index.d.ts
CHANGED
|
@@ -5283,6 +5283,27 @@ interface LatticeAgentStepConfig {
|
|
|
5283
5283
|
type OutputType = {
|
|
5284
5284
|
type: "message_content";
|
|
5285
5285
|
};
|
|
5286
|
+
/**
|
|
5287
|
+
* A known-answer probe used to verify the judge agent can discriminate
|
|
5288
|
+
* correct from incorrect outputs before a batch run (calibrateJudge).
|
|
5289
|
+
*/
|
|
5290
|
+
interface CalibrationProbe {
|
|
5291
|
+
/** Stable identifier for error messages and reporting. */
|
|
5292
|
+
id: string;
|
|
5293
|
+
/** The expected output description, including the problem itself — the judge must verify by reasoning. */
|
|
5294
|
+
task: string;
|
|
5295
|
+
/** The output under test. */
|
|
5296
|
+
finalOutput: string;
|
|
5297
|
+
/** Optional execution trajectory for process verification. */
|
|
5298
|
+
trajectory?: string;
|
|
5299
|
+
/** Whether the judge must mark this probe as PASS. */
|
|
5300
|
+
expectedPass: boolean;
|
|
5301
|
+
/**
|
|
5302
|
+
* Minimum acceptable final_score. Default rule when absent:
|
|
5303
|
+
* expectedPass=true requires final_score >= 80, expectedPass=false requires < 80.
|
|
5304
|
+
*/
|
|
5305
|
+
expectedScoreMin?: number;
|
|
5306
|
+
}
|
|
5286
5307
|
interface LatticeEvalProjectType {
|
|
5287
5308
|
projectName: string;
|
|
5288
5309
|
version?: string;
|
|
@@ -5291,6 +5312,8 @@ interface LatticeEvalProjectType {
|
|
|
5291
5312
|
templates?: LatticeEvalTemplate[];
|
|
5292
5313
|
judge_agent_config: {
|
|
5293
5314
|
modelKey: string;
|
|
5315
|
+
/** Optional per-project calibration probes; defaults to DEFAULT_CALIBRATION_PROBES when absent. */
|
|
5316
|
+
calibration_cases?: CalibrationProbe[];
|
|
5294
5317
|
};
|
|
5295
5318
|
lattice_server_config: {
|
|
5296
5319
|
tenant_id?: string;
|
|
@@ -5471,12 +5494,13 @@ interface EvalRunService {
|
|
|
5471
5494
|
* executes in. Comes from the CALLER's runConfig, NOT from the eval
|
|
5472
5495
|
* project's targetServerConfig. Test cases are environment-agnostic;
|
|
5473
5496
|
* the run environment is decided at run time.
|
|
5497
|
+
* @param taskId - Optional training task (round) this run belongs to.
|
|
5474
5498
|
* @returns The newly created run ID
|
|
5475
5499
|
*/
|
|
5476
5500
|
startRun(tenantId: string, projectId: string, suiteIds?: string[], caseIds?: string[], runConfig?: {
|
|
5477
5501
|
workspaceId?: string;
|
|
5478
5502
|
projectId?: string;
|
|
5479
|
-
}): Promise<string>;
|
|
5503
|
+
}, taskId?: string): Promise<string>;
|
|
5480
5504
|
/**
|
|
5481
5505
|
* Abort a running evaluation.
|
|
5482
5506
|
*
|
|
@@ -5666,6 +5690,12 @@ declare class LatticeEvalSuite {
|
|
|
5666
5690
|
runAllCases(concurrency?: number, signal?: AbortSignal): Promise<CaseRunResult[]>;
|
|
5667
5691
|
}
|
|
5668
5692
|
|
|
5693
|
+
/**
|
|
5694
|
+
* Built-in known-answer calibration probes: multi-step reasoning problems,
|
|
5695
|
+
* each paired with a correct (PASS) and a plausible-but-wrong (FAIL) output.
|
|
5696
|
+
* A judge that cannot discriminate these should not be trusted with real cases.
|
|
5697
|
+
*/
|
|
5698
|
+
declare const DEFAULT_CALIBRATION_PROBES: CalibrationProbe[];
|
|
5669
5699
|
/**
|
|
5670
5700
|
* Manages a project with multiple evaluation suites.
|
|
5671
5701
|
* Registers a per-project judge agent (keyed by project name and tenant)
|
|
@@ -5686,8 +5716,10 @@ declare class LatticeEvalProject {
|
|
|
5686
5716
|
runAllSuites(concurrency?: number, signal?: AbortSignal): Promise<Map<string, CaseRunResult[]>>;
|
|
5687
5717
|
/**
|
|
5688
5718
|
* Verify the judge agent can produce parseable, correct verdicts
|
|
5689
|
-
* before committing to a full run. Uses
|
|
5690
|
-
*
|
|
5719
|
+
* before committing to a full run. Uses known-answer probes (default
|
|
5720
|
+
* multi-step reasoning set, overridable per project via
|
|
5721
|
+
* judge_agent_config.calibration_cases) to catch broken judges.
|
|
5722
|
+
* Checks both the pass verdict and the final_score direction.
|
|
5691
5723
|
*/
|
|
5692
5724
|
calibrateJudge(): Promise<{
|
|
5693
5725
|
ok: boolean;
|
|
@@ -8171,4 +8203,4 @@ declare class IdRemapper {
|
|
|
8171
8203
|
remapSkillIds(graphDefinition: Record<string, unknown>, skillRemap: Record<string, string>): Record<string, unknown>;
|
|
8172
8204
|
}
|
|
8173
8205
|
|
|
8174
|
-
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 CaseRunResult, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, CollectionLatticeManager, type ColumnInfo, CompositeBackend, type ConflictItem, type ConnectAllChannelsOptions, ConnectionRegistry, ConsoleLoggerClient, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type CustomMiddlewareFactory, CustomMiddlewareRegistry, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, type DeleteResult, DependencyResolver, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsInfo, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type EvalRunService, type ExportBundle, type ExportJob, type ExportableEntity, type ExportableEntityDefinition, ExportableEntityRegistry, type ExportableTypeInfo, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, IdRemapper, type ImportApplyResult, type ImportEntityResult, type ImportEntityStatus, type ImportPreviewResult, InMemoryA2AApiKeyStore, InMemoryAssistantStore, InMemoryBindingStore, InMemoryChannelInstallationStore, InMemoryChunkBuffer, InMemoryCollectionStore, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryMenuStore, InMemoryTaskListStore, InMemoryTaskStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, type InsertionItem, type JudgeVerdict, LINE_NUMBER_WIDTH, type LangGraphStateChecker, type LatticeAgentStepConfig, LatticeEval, type LatticeEvalBatchReport, type LatticeEvalCase, type LatticeEvalCaseType, type LatticeEvalCaseWithTemplate, type LatticeEvalConfig, type LatticeEvalLogEvent, type LatticeEvalLogLevel, LatticeEvalProject, type LatticeEvalProjectType, type LatticeEvalResult, type LatticeEvalRubric, LatticeEvalSuite, type LatticeEvalSuiteType, type LatticeEvalTemplate, 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 OutputType, type PendingMessage, PersonalAssistantConfig, PinoLoggerClient, PluginRegistry, PostgresDatabase, type PreviewError, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, QueueMode, type QueuePendingEvent, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type Resolution, type ResolutionAction, type ResolveAgentFn, type ResolvedConfig, type RunSandboxConfig, type RuntimeModelConfig, type STTModelInfo, STTModelLattice, type STTModelLatticeInterface, STTModelLatticeManager, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxProviderFactory, type SandboxProviderType, 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 UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, type VectorStoreProviderLattice, VectorStoreProviderManager, VolumeFilesystem, type VolumeFsClient, type WorkflowValidationError, type WriteResult, abortWorkflowRun, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildInput, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, buildStateAnnotation, buildTableName, checkEmptyContent, clearEncryptionKeyCache, clearEvalRunService, collectionLatticeManager, compileInternal, compileWorkflow, computeSandboxName, configureStores, connectAllChannels, createAgentNode, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createMapNode, createModelSelectorMiddleware, createNodeHandler, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createResourceAddress, createSandboxProvider, createSchedulerMiddleware, createSharePayload, createTaskMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, documentLearningPlugin, documentParserPlugin, embeddingsLatticeManager, encrypt, ensureBuiltinAgentsForTenant, evaluateLatticeCaseWithLogs, 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, getEvalRunService, getLoggerLattice, getMenuRegistry, getModelLattice, getNextCronTime, getOrCreateCollectionVectorStore, getQueueLattice, getSTTClient, getSTTClientWithTenant, getSTTModelLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, getVectorStoreProvider, getWorkflowSignal, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, invokeWithRetry, isBuiltInSkill, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, listCollectionEntries, listSandboxProviderTypes, loggerLatticeManager, mcpManager, metricsServerManager, modelLatticeManager, normalizeSandboxName, parallelLimit, parseCronExpression, parseJudgeVerdict, parseSkillFrontmatter, parseYaml, performStringReplacement, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerBuiltinSkill, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerSTTModelLattice, registerSandboxProviderType, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, registerVectorStoreProvider, registerWorkflowRun, removeCollectionVectorStore, renderTemplate, resolvePath, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, serializePluginMeta, setBindingRegistry, setEvalRunService, setMenuRegistry, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, sttModelLatticeManager, toJsonSchema, toSafeStateExpr, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, unregisterWorkflowRun, updateFileData, validateAgentInput, validateDSL, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager, vectorStoreProviderManager };
|
|
8206
|
+
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 CalibrationProbe, type CaseRunResult, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, CollectionLatticeManager, type ColumnInfo, CompositeBackend, type ConflictItem, type ConnectAllChannelsOptions, ConnectionRegistry, ConsoleLoggerClient, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type CustomMiddlewareFactory, CustomMiddlewareRegistry, DEFAULT_CALIBRATION_PROBES, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, type DeleteResult, DependencyResolver, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsInfo, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type EvalRunService, type ExportBundle, type ExportJob, type ExportableEntity, type ExportableEntityDefinition, ExportableEntityRegistry, type ExportableTypeInfo, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, IdRemapper, type ImportApplyResult, type ImportEntityResult, type ImportEntityStatus, type ImportPreviewResult, InMemoryA2AApiKeyStore, InMemoryAssistantStore, InMemoryBindingStore, InMemoryChannelInstallationStore, InMemoryChunkBuffer, InMemoryCollectionStore, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryMenuStore, InMemoryTaskListStore, InMemoryTaskStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, type InsertionItem, type JudgeVerdict, LINE_NUMBER_WIDTH, type LangGraphStateChecker, type LatticeAgentStepConfig, LatticeEval, type LatticeEvalBatchReport, type LatticeEvalCase, type LatticeEvalCaseType, type LatticeEvalCaseWithTemplate, type LatticeEvalConfig, type LatticeEvalLogEvent, type LatticeEvalLogLevel, LatticeEvalProject, type LatticeEvalProjectType, type LatticeEvalResult, type LatticeEvalRubric, LatticeEvalSuite, type LatticeEvalSuiteType, type LatticeEvalTemplate, 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 OutputType, type PendingMessage, PersonalAssistantConfig, PinoLoggerClient, PluginRegistry, PostgresDatabase, type PreviewError, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, QueueMode, type QueuePendingEvent, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type Resolution, type ResolutionAction, type ResolveAgentFn, type ResolvedConfig, type RunSandboxConfig, type RuntimeModelConfig, type STTModelInfo, STTModelLattice, type STTModelLatticeInterface, STTModelLatticeManager, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxProviderFactory, type SandboxProviderType, 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 UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, type VectorStoreProviderLattice, VectorStoreProviderManager, VolumeFilesystem, type VolumeFsClient, type WorkflowValidationError, type WriteResult, abortWorkflowRun, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildInput, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, buildStateAnnotation, buildTableName, checkEmptyContent, clearEncryptionKeyCache, clearEvalRunService, collectionLatticeManager, compileInternal, compileWorkflow, computeSandboxName, configureStores, connectAllChannels, createAgentNode, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createMapNode, createModelSelectorMiddleware, createNodeHandler, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createResourceAddress, createSandboxProvider, createSchedulerMiddleware, createSharePayload, createTaskMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, documentLearningPlugin, documentParserPlugin, embeddingsLatticeManager, encrypt, ensureBuiltinAgentsForTenant, evaluateLatticeCaseWithLogs, 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, getEvalRunService, getLoggerLattice, getMenuRegistry, getModelLattice, getNextCronTime, getOrCreateCollectionVectorStore, getQueueLattice, getSTTClient, getSTTClientWithTenant, getSTTModelLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, getVectorStoreProvider, getWorkflowSignal, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, invokeWithRetry, isBuiltInSkill, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, listCollectionEntries, listSandboxProviderTypes, loggerLatticeManager, mcpManager, metricsServerManager, modelLatticeManager, normalizeSandboxName, parallelLimit, parseCronExpression, parseJudgeVerdict, parseSkillFrontmatter, parseYaml, performStringReplacement, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerBuiltinSkill, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerSTTModelLattice, registerSandboxProviderType, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, registerVectorStoreProvider, registerWorkflowRun, removeCollectionVectorStore, renderTemplate, resolvePath, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, serializePluginMeta, setBindingRegistry, setEvalRunService, setMenuRegistry, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, sttModelLatticeManager, toJsonSchema, toSafeStateExpr, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, unregisterWorkflowRun, updateFileData, validateAgentInput, validateDSL, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager, vectorStoreProviderManager };
|
package/dist/index.js
CHANGED
|
@@ -1623,6 +1623,7 @@ __export(index_exports, {
|
|
|
1623
1623
|
ConsoleLoggerClient: () => ConsoleLoggerClient,
|
|
1624
1624
|
CustomMetricsClient: () => CustomMetricsClient,
|
|
1625
1625
|
CustomMiddlewareRegistry: () => CustomMiddlewareRegistry,
|
|
1626
|
+
DEFAULT_CALIBRATION_PROBES: () => DEFAULT_CALIBRATION_PROBES,
|
|
1626
1627
|
DaytonaInstance: () => DaytonaInstance,
|
|
1627
1628
|
DaytonaProvider: () => DaytonaProvider,
|
|
1628
1629
|
DefaultScheduleClient: () => DefaultScheduleClient,
|
|
@@ -4500,6 +4501,7 @@ var InMemoryTaskStore = class {
|
|
|
4500
4501
|
projectId: params.projectId,
|
|
4501
4502
|
dueDate: params.dueDate,
|
|
4502
4503
|
metadata: params.metadata,
|
|
4504
|
+
files: params.files,
|
|
4503
4505
|
parentId: params.parentId,
|
|
4504
4506
|
sourceId: params.sourceId,
|
|
4505
4507
|
context: params.context,
|
|
@@ -4557,6 +4559,7 @@ var InMemoryTaskStore = class {
|
|
|
4557
4559
|
const updated = {
|
|
4558
4560
|
...existing,
|
|
4559
4561
|
...updates,
|
|
4562
|
+
files: updates.files !== void 0 ? updates.files : existing.files,
|
|
4560
4563
|
updatedAt: /* @__PURE__ */ new Date()
|
|
4561
4564
|
};
|
|
4562
4565
|
tenantTasks.set(id, updated);
|
|
@@ -16042,6 +16045,11 @@ var manageTaskSchema = import_zod43.z.object({
|
|
|
16042
16045
|
dependencies: import_zod43.z.array(import_zod43.z.string()).optional().describe("List of task IDs that must be completed before this task can start"),
|
|
16043
16046
|
result: import_zod43.z.string().optional().describe("Result summary when task is completed"),
|
|
16044
16047
|
failureReason: import_zod43.z.string().optional().describe("Reason for failure (use when status='failed')"),
|
|
16048
|
+
files: import_zod43.z.array(import_zod43.z.object({
|
|
16049
|
+
uri: import_zod43.z.string().describe("Uniquely locates the resource: http(s):// URL, /s/:token share, or sandbox path"),
|
|
16050
|
+
name: import_zod43.z.string().optional().describe("Display name"),
|
|
16051
|
+
addedBy: import_zod43.z.enum(["user", "agent"]).optional().describe("Who attached the file")
|
|
16052
|
+
})).optional().describe("File references attached to this task"),
|
|
16045
16053
|
summary: import_zod43.z.string().optional().describe("Brief summary of the operation")
|
|
16046
16054
|
});
|
|
16047
16055
|
function buildReviewMarkdown(task) {
|
|
@@ -16100,7 +16108,8 @@ function createTaskMiddleware() {
|
|
|
16100
16108
|
requireReview: input.requireReview,
|
|
16101
16109
|
dependencies: input.dependencies,
|
|
16102
16110
|
workspaceId,
|
|
16103
|
-
projectId
|
|
16111
|
+
projectId,
|
|
16112
|
+
files: input.files
|
|
16104
16113
|
});
|
|
16105
16114
|
return JSON.stringify({ success: true, data: task });
|
|
16106
16115
|
}
|
|
@@ -16179,7 +16188,8 @@ function createTaskMiddleware() {
|
|
|
16179
16188
|
"result",
|
|
16180
16189
|
"failureReason",
|
|
16181
16190
|
"requireReview",
|
|
16182
|
-
"dependencies"
|
|
16191
|
+
"dependencies",
|
|
16192
|
+
"files"
|
|
16183
16193
|
];
|
|
16184
16194
|
for (const field of settableFields) {
|
|
16185
16195
|
if (input[field] !== void 0) {
|
|
@@ -20011,11 +20021,11 @@ ${BASE_PROMPT}` : BASE_PROMPT;
|
|
|
20011
20021
|
defaultInterruptOn: interruptOn,
|
|
20012
20022
|
subagents,
|
|
20013
20023
|
generalPurposeAgent: true
|
|
20014
|
-
}),
|
|
20015
|
-
// Enables Anthropic prompt caching for improved performance and reduced costs
|
|
20016
|
-
(0, import_langchain54.anthropicPromptCachingMiddleware)({
|
|
20017
|
-
unsupportedModelBehavior: "ignore"
|
|
20018
20024
|
})
|
|
20025
|
+
// Enables Anthropic prompt caching for improved performance and reduced costs
|
|
20026
|
+
// anthropicPromptCachingMiddleware({
|
|
20027
|
+
// unsupportedModelBehavior: "ignore",
|
|
20028
|
+
// })
|
|
20019
20029
|
];
|
|
20020
20030
|
if (interruptOn) {
|
|
20021
20031
|
middleware.push((0, import_langchain54.humanInTheLoopMiddleware)({ interruptOn }));
|
|
@@ -23703,6 +23713,27 @@ registerToolLattice(
|
|
|
23703
23713
|
}
|
|
23704
23714
|
}
|
|
23705
23715
|
);
|
|
23716
|
+
registerToolLattice(
|
|
23717
|
+
"list_models",
|
|
23718
|
+
{
|
|
23719
|
+
name: "list_models",
|
|
23720
|
+
description: "List all registered models. Returns each model's key (use this string as modelKey when creating eval projects via manage_eval create_project, or as an agent's modelKey in create_agent/update_agent) and its display name.",
|
|
23721
|
+
schema: import_zod47.default.object({})
|
|
23722
|
+
},
|
|
23723
|
+
async (_input) => {
|
|
23724
|
+
try {
|
|
23725
|
+
const lattices = modelLatticeManager.getAllLattices();
|
|
23726
|
+
return JSON.stringify({
|
|
23727
|
+
models: lattices.map((l) => ({
|
|
23728
|
+
key: l.key,
|
|
23729
|
+
name: l.client.name ?? l.key
|
|
23730
|
+
}))
|
|
23731
|
+
});
|
|
23732
|
+
} catch (error) {
|
|
23733
|
+
return JSON.stringify({ error: `Failed to list models: ${error.message}` });
|
|
23734
|
+
}
|
|
23735
|
+
}
|
|
23736
|
+
);
|
|
23706
23737
|
registerToolLattice(
|
|
23707
23738
|
"invoke_agent",
|
|
23708
23739
|
{
|
|
@@ -23834,6 +23865,22 @@ The skills document WHY and HOW; these gates are the unskippable
|
|
|
23834
23865
|
minimum. If you cannot satisfy a gate (e.g. user says skip), record it
|
|
23835
23866
|
and proceed only on the user's explicit instruction.
|
|
23836
23867
|
|
|
23868
|
+
LEARNING ROUND KICKOFF \u2014 a message that names an existing target agent
|
|
23869
|
+
id AND an existing tracking task id (a "learning round"). This protocol
|
|
23870
|
+
OVERRIDES the defaults above:
|
|
23871
|
+
- The target agent ALREADY EXISTS (an empty placeholder). Build and
|
|
23872
|
+
refine it via update_agent on that exact id. NEVER call create_agent \u2014
|
|
23873
|
+
a new agent would disconnect the round's tracking.
|
|
23874
|
+
- The parent task ALREADY EXISTS \u2014 your create-a-task-first duty is
|
|
23875
|
+
satisfied by it. Create subtasks with manage_task under its id
|
|
23876
|
+
(parentId); NEVER create a new parent task for the round.
|
|
23877
|
+
- The round is pre-approved \u2014 skip the DESIGN\u2192CONFIRM gates: show the
|
|
23878
|
+
design in your reply, then build directly.
|
|
23879
|
+
- Every update_agent call must be mirrored by a manage_task work item
|
|
23880
|
+
whose summary names the changed keys (e.g. "update_agent: prompt,
|
|
23881
|
+
modelKey") \u2014 the round feed highlights these so the user can see what
|
|
23882
|
+
changed between iterations.
|
|
23883
|
+
|
|
23837
23884
|
Your sub-skills (accessible via the MOC or direct loading):
|
|
23838
23885
|
- [[learn-capability]] \u2014 Learn from any source material \u2192 skills + agents
|
|
23839
23886
|
- [[agent-build]] \u2014 Design and build single agents (REACT/DEEP_AGENT)
|
|
@@ -23948,6 +23995,7 @@ var agentArchitectConfig = {
|
|
|
23948
23995
|
tools: [
|
|
23949
23996
|
"list_agents",
|
|
23950
23997
|
"list_tools",
|
|
23998
|
+
"list_models",
|
|
23951
23999
|
"list_middleware_types",
|
|
23952
24000
|
"list_connections",
|
|
23953
24001
|
"get_agent",
|
|
@@ -27953,7 +28001,7 @@ File content: ${files[key4]}`
|
|
|
27953
28001
|
{
|
|
27954
28002
|
dimension: "correctness",
|
|
27955
28003
|
weight: 100,
|
|
27956
|
-
description: "\
|
|
28004
|
+
description: "Overall correctness \u2014 whether the result matches the expected output description."
|
|
27957
28005
|
}
|
|
27958
28006
|
];
|
|
27959
28007
|
const evalRubrics = evalCase.eval.eval_rubrics && evalCase.eval.eval_rubrics.length > 0 ? evalCase.eval.eval_rubrics : defaultRubrics;
|
|
@@ -27967,53 +28015,53 @@ File content: ${files[key4]}`
|
|
|
27967
28015
|
${evalRubrics.map(
|
|
27968
28016
|
(r) => `- **${r.dimension}**\uFF08\u6743\u91CD\uFF1A${r.weight}\uFF09\uFF1A${r.description}`
|
|
27969
28017
|
).join("\n")}`;
|
|
27970
|
-
const testPrompt = `#
|
|
27971
|
-
|
|
28018
|
+
const testPrompt = `# Role
|
|
28019
|
+
You are a senior AI Agent evaluation expert. Your job is to perform a "black-box test" judgment of the agent's execution process and results against the preset evaluation rubrics.
|
|
27972
28020
|
|
|
27973
|
-
#
|
|
27974
|
-
|
|
28021
|
+
# Input Information
|
|
28022
|
+
The test framework provides you with the following five core contexts:
|
|
27975
28023
|
|
|
27976
|
-
1.
|
|
28024
|
+
1. **User Intent**: ${evalCase.input.message}
|
|
27977
28025
|
|
|
27978
|
-
2.
|
|
28026
|
+
2. **Input Files**: ${testCaseFilesContent || "None"}
|
|
27979
28027
|
|
|
27980
|
-
3.
|
|
28028
|
+
3. **Execution Trajectory** (the agent's full message/tool-call record):
|
|
27981
28029
|
${trajectory}
|
|
27982
28030
|
|
|
27983
|
-
4.
|
|
28031
|
+
4. **Final Output** (the agent's last reply):
|
|
27984
28032
|
${finalOutput}
|
|
27985
28033
|
|
|
27986
|
-
5.
|
|
28034
|
+
5. **Expected Output Description**: ${evalCase.eval.content_assertion}
|
|
27987
28035
|
${rubricsSection}
|
|
27988
28036
|
|
|
27989
|
-
#
|
|
27990
|
-
|
|
28037
|
+
# Task
|
|
28038
|
+
You must strictly evaluate the agent against every rubric in the "Evaluation Rubrics" section, using both the "Execution Trajectory" and the "Final Output". Evaluate the final result AND whether the process correctly performed the required intermediate steps (tool calls, information retrieval, etc.).
|
|
27991
28039
|
|
|
27992
|
-
#
|
|
27993
|
-
1.
|
|
27994
|
-
2.
|
|
27995
|
-
3.
|
|
27996
|
-
4.
|
|
27997
|
-
5.
|
|
27998
|
-
6. **HITL
|
|
27999
|
-
7. **HITL
|
|
28040
|
+
# Rules
|
|
28041
|
+
1. **Objectivity**: Judge solely from the provided context. If the standard requires "contains a number" but the output has only text, points must be deducted even if the tone is good.
|
|
28042
|
+
2. **Result verification**: If the "Final Output" is missing expected content, or does not meet the criteria in the "Evaluation Rubrics", the corresponding rubric must be marked as failed.
|
|
28043
|
+
3. **Process verification**: If the "Execution Trajectory" shows the agent did not perform a necessary intermediate step (e.g., should have called a tool but did not), deduct points on the corresponding rubric even if the final output looks plausible.
|
|
28044
|
+
4. **Evidence-based**: When giving a reason, you must quote specific content from the execution trajectory or final output.
|
|
28045
|
+
5. **Weighted scoring**: The final score is the weighted sum of the rubric scores (on a 0-100 scale).
|
|
28046
|
+
6. **HITL interrupt judgment**: If the trajectory contains a "HITL pause: agent requested human input" entry, the agent is waiting for human confirmation. Treat this as the business behavior under test: if the expected output requires autonomous completion (e.g., "execute automatically without confirmation"), requesting human input should be judged a failure; if the expected output requires confirmation or approval first (e.g., "must request approval before executing"), requesting human input is correct behavior \u2014 judge its timing and content, passing or scoring according to the rubrics.
|
|
28047
|
+
7. **HITL auto-response judgment**: If a "HITL pause" entry is followed by an "auto-responded (test policy auto-approve/auto-reject/canned-response)" entry, the test framework injected a human reply and the flow continued \u2014 evaluate the behavior AFTER the pause as the complete flow (e.g., whether the operation was correctly executed after approval), and check whether the auto-response content matches a reasonable human reply.
|
|
28000
28048
|
|
|
28001
|
-
#
|
|
28002
|
-
|
|
28049
|
+
# Output Format (JSON only)
|
|
28050
|
+
You MUST reply with JSON only, using this structure:
|
|
28003
28051
|
{
|
|
28004
28052
|
"pass": true | false,
|
|
28005
28053
|
"final_score": number,
|
|
28006
28054
|
"dimension_results": [
|
|
28007
28055
|
{
|
|
28008
|
-
"name": "
|
|
28056
|
+
"name": "rubric name",
|
|
28009
28057
|
"score": number,
|
|
28010
|
-
"reason": "
|
|
28058
|
+
"reason": "specific reason for deduction or credit, citing evidence"
|
|
28011
28059
|
}
|
|
28012
28060
|
],
|
|
28013
|
-
"summary": "
|
|
28061
|
+
"summary": "overall evaluation of the agent's performance"
|
|
28014
28062
|
}
|
|
28015
28063
|
|
|
28016
|
-
|
|
28064
|
+
Note: if final_score >= 80 and there are no fatal errors, pass should be true; otherwise false.`;
|
|
28017
28065
|
this.lastTestPrompt = testPrompt;
|
|
28018
28066
|
const judgeThreadId = (0, import_uuid9.v4)();
|
|
28019
28067
|
this.lastJudgeThreadId = judgeThreadId;
|
|
@@ -28396,6 +28444,32 @@ var LatticeEvalSuite = class {
|
|
|
28396
28444
|
var import_protocols16 = require("@axiom-lattice/protocols");
|
|
28397
28445
|
var import_messages7 = require("@langchain/core/messages");
|
|
28398
28446
|
var import_uuid10 = require("uuid");
|
|
28447
|
+
var DEFAULT_CALIBRATION_PROBES = [
|
|
28448
|
+
{
|
|
28449
|
+
id: "catch-up-correct",
|
|
28450
|
+
task: "A train leaves Station A at 10:00 AM traveling at 60 mph. A second train leaves Station A at 10:30 AM traveling at 90 mph on the same route. The final answer must be the time (HH:MM) at which the second train catches up to the first.",
|
|
28451
|
+
finalOutput: "11:30",
|
|
28452
|
+
expectedPass: true
|
|
28453
|
+
},
|
|
28454
|
+
{
|
|
28455
|
+
id: "catch-up-wrong",
|
|
28456
|
+
task: "A train leaves Station A at 10:00 AM traveling at 60 mph. A second train leaves Station A at 10:30 AM traveling at 90 mph on the same route. The final answer must be the time (HH:MM) at which the second train catches up to the first.",
|
|
28457
|
+
finalOutput: "12:30",
|
|
28458
|
+
expectedPass: false
|
|
28459
|
+
},
|
|
28460
|
+
{
|
|
28461
|
+
id: "discount-tax-correct",
|
|
28462
|
+
task: "A store offers a 20% discount on an item priced at $150, then adds 8% sales tax to the discounted price. The final answer must be the total price in dollars.",
|
|
28463
|
+
finalOutput: "129.6",
|
|
28464
|
+
expectedPass: true
|
|
28465
|
+
},
|
|
28466
|
+
{
|
|
28467
|
+
id: "discount-tax-wrong",
|
|
28468
|
+
task: "A store offers a 20% discount on an item priced at $150, then adds 8% sales tax to the discounted price. The final answer must be the total price in dollars.",
|
|
28469
|
+
finalOutput: "162",
|
|
28470
|
+
expectedPass: false
|
|
28471
|
+
}
|
|
28472
|
+
];
|
|
28399
28473
|
var LatticeEvalProject = class {
|
|
28400
28474
|
constructor(project, onCaseComplete) {
|
|
28401
28475
|
this.suites = /* @__PURE__ */ new Map();
|
|
@@ -28503,21 +28577,22 @@ var LatticeEvalProject = class {
|
|
|
28503
28577
|
}
|
|
28504
28578
|
/**
|
|
28505
28579
|
* Verify the judge agent can produce parseable, correct verdicts
|
|
28506
|
-
* before committing to a full run. Uses
|
|
28507
|
-
*
|
|
28580
|
+
* before committing to a full run. Uses known-answer probes (default
|
|
28581
|
+
* multi-step reasoning set, overridable per project via
|
|
28582
|
+
* judge_agent_config.calibration_cases) to catch broken judges.
|
|
28583
|
+
* Checks both the pass verdict and the final_score direction.
|
|
28508
28584
|
*/
|
|
28509
28585
|
async calibrateJudge() {
|
|
28510
28586
|
const tenantId2 = this.project.lattice_server_config.tenant_id || "default";
|
|
28511
28587
|
const judgeAgent = await getAgentClient(tenantId2, this.judgeAgentKey);
|
|
28512
|
-
const
|
|
28513
|
-
|
|
28514
|
-
|
|
28515
|
-
|
|
28516
|
-
|
|
28517
|
-
|
|
28518
|
-
|
|
28519
|
-
|
|
28520
|
-
\u4EC5\u8F93\u51FA JSON\uFF1A{"pass": true|false, "final_score": 0-100, "summary": "\u7406\u7531"}`;
|
|
28588
|
+
const probes = this.project.judge_agent_config.calibration_cases && this.project.judge_agent_config.calibration_cases.length > 0 ? this.project.judge_agent_config.calibration_cases : DEFAULT_CALIBRATION_PROBES;
|
|
28589
|
+
for (const probe of probes) {
|
|
28590
|
+
const trajectorySection = probe.trajectory ? `
|
|
28591
|
+
Trajectory: ${probe.trajectory}` : "";
|
|
28592
|
+
const prompt = `You are an evaluation expert. Judge whether the final output meets the expected output description.
|
|
28593
|
+
Expected output description: ${probe.task}
|
|
28594
|
+
Final output: ${probe.finalOutput}${trajectorySection}
|
|
28595
|
+
Respond with JSON only: {"pass": true|false, "final_score": 0-100, "summary": "reason"}`;
|
|
28521
28596
|
let raw = "";
|
|
28522
28597
|
let invokeError = null;
|
|
28523
28598
|
for (let attempt = 0; attempt < 2; attempt++) {
|
|
@@ -28542,13 +28617,24 @@ var LatticeEvalProject = class {
|
|
|
28542
28617
|
return { ok: false, reason: `Calibration output unparseable: ${parsed.error}`, bypassed: true };
|
|
28543
28618
|
}
|
|
28544
28619
|
const actualPass = parsed.pass !== void 0 ? parsed.pass : (parsed.final_score ?? 0) >= 80;
|
|
28545
|
-
if (actualPass !==
|
|
28620
|
+
if (actualPass !== probe.expectedPass) {
|
|
28546
28621
|
return {
|
|
28547
28622
|
ok: false,
|
|
28548
|
-
reason: `Calibration mismatch
|
|
28623
|
+
reason: `Calibration mismatch (probe=${probe.id}): expected ${probe.expectedPass ? "PASS" : "FAIL"}, judge said ${actualPass ? "PASS" : "FAIL"}`,
|
|
28549
28624
|
bypassed: true
|
|
28550
28625
|
};
|
|
28551
28626
|
}
|
|
28627
|
+
if (parsed.final_score !== void 0) {
|
|
28628
|
+
const minScore = probe.expectedScoreMin ?? 80;
|
|
28629
|
+
const scoreOk = probe.expectedPass ? parsed.final_score >= minScore : parsed.final_score < minScore;
|
|
28630
|
+
if (!scoreOk) {
|
|
28631
|
+
return {
|
|
28632
|
+
ok: false,
|
|
28633
|
+
reason: `Calibration score mismatch (probe=${probe.id}): expected ${probe.expectedPass ? "final_score >= " + minScore : "final_score < " + minScore}, judge gave ${parsed.final_score}`,
|
|
28634
|
+
bypassed: true
|
|
28635
|
+
};
|
|
28636
|
+
}
|
|
28637
|
+
}
|
|
28552
28638
|
}
|
|
28553
28639
|
return { ok: true };
|
|
28554
28640
|
}
|
|
@@ -30793,6 +30879,7 @@ function createManageEvalTool() {
|
|
|
30793
30879
|
description: import_zod64.z.string().optional(),
|
|
30794
30880
|
judgeModelKey: import_zod64.z.string().optional(),
|
|
30795
30881
|
concurrency: import_zod64.z.number().optional(),
|
|
30882
|
+
targetAgentId: import_zod64.z.string().optional().describe("Optional for create_project \u2014 the agent this eval project verifies. Recorded in targetServerConfig so the agent's detail page can find its eval data without relying on project naming."),
|
|
30796
30883
|
suiteId: import_zod64.z.string().optional(),
|
|
30797
30884
|
caseId: import_zod64.z.string().optional(),
|
|
30798
30885
|
inputMessage: import_zod64.z.string().optional(),
|
|
@@ -30824,7 +30911,11 @@ function createManageEvalTool() {
|
|
|
30824
30911
|
judgeModelConfig: { modelKey: input.judgeModelKey },
|
|
30825
30912
|
targetServerConfig: {
|
|
30826
30913
|
workspace_id: ctx.workspaceId,
|
|
30827
|
-
project_id: ctx.projectId
|
|
30914
|
+
project_id: ctx.projectId,
|
|
30915
|
+
// The project↔agent association lives here (not in the project
|
|
30916
|
+
// name): an eval project is agent-agnostic by design, this
|
|
30917
|
+
// pointer is merely the agent's designated verifier.
|
|
30918
|
+
...input.targetAgentId ? { targetAgentId: input.targetAgentId } : {}
|
|
30828
30919
|
},
|
|
30829
30920
|
concurrency: input.concurrency ?? 3
|
|
30830
30921
|
});
|
|
@@ -30891,7 +30982,7 @@ function createManageEvalTool() {
|
|
|
30891
30982
|
name: "manage_eval",
|
|
30892
30983
|
description: `Create, update, delete evaluation projects, suites, and test cases.
|
|
30893
30984
|
|
|
30894
|
-
Project: create_project(name, description?, judgeModelKey?, concurrency?) | update_project | delete_project
|
|
30985
|
+
Project: create_project(name, description?, judgeModelKey?, concurrency?, targetAgentId?) | update_project | delete_project
|
|
30895
30986
|
judgeModelKey defaults to first available model. concurrency defaults to 3.
|
|
30896
30987
|
delete_project rejected if active runs exist.
|
|
30897
30988
|
**When creating a project from within a workspace, the workspace/project context is
|
|
@@ -30915,6 +31006,7 @@ function createRunEvalTool() {
|
|
|
30915
31006
|
suiteIds: import_zod64.z.array(import_zod64.z.string()).optional().describe("Optional for start \u2014 only run these suites (e.g. dev set only). Omit to run all."),
|
|
30916
31007
|
caseIds: import_zod64.z.array(import_zod64.z.string()).optional().describe("Optional for start \u2014 only run these cases across the selected suites. Omit to run all cases in those suites."),
|
|
30917
31008
|
runId: import_zod64.z.string().optional().describe("Required for status, resume, abort"),
|
|
31009
|
+
taskId: import_zod64.z.string().optional().describe("Optional for start \u2014 training task ID this run belongs to (round association)"),
|
|
30918
31010
|
sleepMs: import_zod64.z.number().int().min(0).max(12e4).optional().describe("Optional for status \u2014 sleep this many ms BEFORE checking the run, to pace polling (e.g. 15000 \u2192 30000 \u2192 60000 \u2192 120000). Omit to check immediately."),
|
|
30919
31011
|
wait: import_zod64.z.boolean().optional().describe("Optional for start \u2014 defaults to true: block synchronously (up to ~150s) and return final results in one call. Set false to return the runId immediately and poll.")
|
|
30920
31012
|
});
|
|
@@ -30932,7 +31024,7 @@ function createRunEvalTool() {
|
|
|
30932
31024
|
switch (input.action) {
|
|
30933
31025
|
case "start": {
|
|
30934
31026
|
const ctx = workspaceContext(exeConfig);
|
|
30935
|
-
const runId = await svc.startRun(tid, input.projectId, input.suiteIds, input.caseIds, ctx);
|
|
31027
|
+
const runId = await svc.startRun(tid, input.projectId, input.suiteIds, input.caseIds, ctx, input.taskId);
|
|
30936
31028
|
if (input.wait === false) {
|
|
30937
31029
|
data = sanitize({ runId, message: "Run started. Poll with run_eval status (backoff: 15s\u219230s\u219260s\u2192max 120s)." });
|
|
30938
31030
|
break;
|
|
@@ -32948,6 +33040,7 @@ registerBuiltinPlugins();
|
|
|
32948
33040
|
ConsoleLoggerClient,
|
|
32949
33041
|
CustomMetricsClient,
|
|
32950
33042
|
CustomMiddlewareRegistry,
|
|
33043
|
+
DEFAULT_CALIBRATION_PROBES,
|
|
32951
33044
|
DaytonaInstance,
|
|
32952
33045
|
DaytonaProvider,
|
|
32953
33046
|
DefaultScheduleClient,
|