@axiom-lattice/core 3.1.0 → 3.1.2
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 +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +75 -56
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +74 -56
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -5696,6 +5696,17 @@ declare class LatticeEvalSuite {
|
|
|
5696
5696
|
* A judge that cannot discriminate these should not be trusted with real cases.
|
|
5697
5697
|
*/
|
|
5698
5698
|
declare const DEFAULT_CALIBRATION_PROBES: CalibrationProbe[];
|
|
5699
|
+
/**
|
|
5700
|
+
* Resolve the judge model for an eval project: an explicit judgeModelKey wins;
|
|
5701
|
+
* otherwise the model registered under the "default" key (the convention apps
|
|
5702
|
+
* use — see examples/deep_research), then the first registered model as a last
|
|
5703
|
+
* resort. Throws only when no model is registered at all.
|
|
5704
|
+
*/
|
|
5705
|
+
declare function resolveJudgeModelKey(explicitKey: string | undefined, manager: {
|
|
5706
|
+
getAllLattices: () => Array<{
|
|
5707
|
+
key: string;
|
|
5708
|
+
}>;
|
|
5709
|
+
}): string;
|
|
5699
5710
|
/**
|
|
5700
5711
|
* Manages a project with multiple evaluation suites.
|
|
5701
5712
|
* Registers a per-project judge agent (keyed by project name and tenant)
|
|
@@ -6516,6 +6527,8 @@ declare class FilesystemBackend implements BackendProtocol {
|
|
|
6516
6527
|
*/
|
|
6517
6528
|
private resolvePath;
|
|
6518
6529
|
private assertVirtualParentContained;
|
|
6530
|
+
private assertVirtualOpenedFileContained;
|
|
6531
|
+
private readFileBuffer;
|
|
6519
6532
|
private validateDeleteTarget;
|
|
6520
6533
|
/**
|
|
6521
6534
|
* List files and directories in the specified directory (non-recursive).
|
|
@@ -6541,6 +6554,8 @@ declare class FilesystemBackend implements BackendProtocol {
|
|
|
6541
6554
|
* @returns Raw file content as FileData
|
|
6542
6555
|
*/
|
|
6543
6556
|
readRaw(filePath: string): Promise<FileData>;
|
|
6557
|
+
/** Read file content as raw bytes without following symbolic links. */
|
|
6558
|
+
readBinary(filePath: string): Promise<Buffer>;
|
|
6544
6559
|
/**
|
|
6545
6560
|
* Create a new file with content.
|
|
6546
6561
|
* Returns WriteResult. External storage sets filesUpdate=null.
|
|
@@ -8203,4 +8218,4 @@ declare class IdRemapper {
|
|
|
8203
8218
|
remapSkillIds(graphDefinition: Record<string, unknown>, skillRemap: Record<string, string>): Record<string, unknown>;
|
|
8204
8219
|
}
|
|
8205
8220
|
|
|
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 };
|
|
8221
|
+
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, resolveJudgeModelKey, 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
|
@@ -5696,6 +5696,17 @@ declare class LatticeEvalSuite {
|
|
|
5696
5696
|
* A judge that cannot discriminate these should not be trusted with real cases.
|
|
5697
5697
|
*/
|
|
5698
5698
|
declare const DEFAULT_CALIBRATION_PROBES: CalibrationProbe[];
|
|
5699
|
+
/**
|
|
5700
|
+
* Resolve the judge model for an eval project: an explicit judgeModelKey wins;
|
|
5701
|
+
* otherwise the model registered under the "default" key (the convention apps
|
|
5702
|
+
* use — see examples/deep_research), then the first registered model as a last
|
|
5703
|
+
* resort. Throws only when no model is registered at all.
|
|
5704
|
+
*/
|
|
5705
|
+
declare function resolveJudgeModelKey(explicitKey: string | undefined, manager: {
|
|
5706
|
+
getAllLattices: () => Array<{
|
|
5707
|
+
key: string;
|
|
5708
|
+
}>;
|
|
5709
|
+
}): string;
|
|
5699
5710
|
/**
|
|
5700
5711
|
* Manages a project with multiple evaluation suites.
|
|
5701
5712
|
* Registers a per-project judge agent (keyed by project name and tenant)
|
|
@@ -6516,6 +6527,8 @@ declare class FilesystemBackend implements BackendProtocol {
|
|
|
6516
6527
|
*/
|
|
6517
6528
|
private resolvePath;
|
|
6518
6529
|
private assertVirtualParentContained;
|
|
6530
|
+
private assertVirtualOpenedFileContained;
|
|
6531
|
+
private readFileBuffer;
|
|
6519
6532
|
private validateDeleteTarget;
|
|
6520
6533
|
/**
|
|
6521
6534
|
* List files and directories in the specified directory (non-recursive).
|
|
@@ -6541,6 +6554,8 @@ declare class FilesystemBackend implements BackendProtocol {
|
|
|
6541
6554
|
* @returns Raw file content as FileData
|
|
6542
6555
|
*/
|
|
6543
6556
|
readRaw(filePath: string): Promise<FileData>;
|
|
6557
|
+
/** Read file content as raw bytes without following symbolic links. */
|
|
6558
|
+
readBinary(filePath: string): Promise<Buffer>;
|
|
6544
6559
|
/**
|
|
6545
6560
|
* Create a new file with content.
|
|
6546
6561
|
* Returns WriteResult. External storage sets filesUpdate=null.
|
|
@@ -8203,4 +8218,4 @@ declare class IdRemapper {
|
|
|
8203
8218
|
remapSkillIds(graphDefinition: Record<string, unknown>, skillRemap: Record<string, string>): Record<string, unknown>;
|
|
8204
8219
|
}
|
|
8205
8220
|
|
|
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 };
|
|
8221
|
+
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, resolveJudgeModelKey, 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
|
@@ -1852,6 +1852,7 @@ __export(index_exports, {
|
|
|
1852
1852
|
registerWorkflowRun: () => registerWorkflowRun,
|
|
1853
1853
|
removeCollectionVectorStore: () => removeCollectionVectorStore,
|
|
1854
1854
|
renderTemplate: () => renderTemplate,
|
|
1855
|
+
resolveJudgeModelKey: () => resolveJudgeModelKey,
|
|
1855
1856
|
resolvePath: () => resolvePath,
|
|
1856
1857
|
sandboxLatticeManager: () => sandboxLatticeManager,
|
|
1857
1858
|
sanitizeToolCallId: () => sanitizeToolCallId,
|
|
@@ -18860,6 +18861,51 @@ var FilesystemBackend = class {
|
|
|
18860
18861
|
throw new Error(`Path: ${resolvedPath} outside root directory: ${this.cwd}`);
|
|
18861
18862
|
}
|
|
18862
18863
|
}
|
|
18864
|
+
async assertVirtualOpenedFileContained(resolvedPath, openedStat) {
|
|
18865
|
+
if (!this.virtualMode) {
|
|
18866
|
+
return;
|
|
18867
|
+
}
|
|
18868
|
+
const [rootPath, realFilePath] = await Promise.all([
|
|
18869
|
+
fs2.realpath(this.cwd),
|
|
18870
|
+
fs2.realpath(resolvedPath)
|
|
18871
|
+
]);
|
|
18872
|
+
const relative4 = path4.relative(rootPath, realFilePath);
|
|
18873
|
+
if (relative4 === ".." || relative4.startsWith(`..${path4.sep}`) || path4.isAbsolute(relative4)) {
|
|
18874
|
+
throw new Error(`Path: ${resolvedPath} outside root directory: ${this.cwd}`);
|
|
18875
|
+
}
|
|
18876
|
+
const realPathStat = await fs2.stat(realFilePath);
|
|
18877
|
+
if (realPathStat.dev !== openedStat.dev || realPathStat.ino !== openedStat.ino) {
|
|
18878
|
+
throw new Error(`File changed during secure read: ${resolvedPath}`);
|
|
18879
|
+
}
|
|
18880
|
+
}
|
|
18881
|
+
async readFileBuffer(filePath) {
|
|
18882
|
+
const resolvedPath = this.resolvePath(filePath);
|
|
18883
|
+
await this.assertVirtualParentContained(resolvedPath);
|
|
18884
|
+
if (!SUPPORTS_NOFOLLOW) {
|
|
18885
|
+
const initialStat = await fs2.lstat(resolvedPath);
|
|
18886
|
+
if (initialStat.isSymbolicLink()) {
|
|
18887
|
+
throw new Error(`Symlinks are not allowed: ${filePath}`);
|
|
18888
|
+
}
|
|
18889
|
+
}
|
|
18890
|
+
const flags = SUPPORTS_NOFOLLOW ? fsSync.constants.O_RDONLY | fsSync.constants.O_NOFOLLOW : fsSync.constants.O_RDONLY;
|
|
18891
|
+
const fd = await fs2.open(resolvedPath, flags);
|
|
18892
|
+
try {
|
|
18893
|
+
const stat4 = await fd.stat();
|
|
18894
|
+
if (!stat4.isFile()) {
|
|
18895
|
+
throw new Error(`File '${filePath}' not found`);
|
|
18896
|
+
}
|
|
18897
|
+
await this.assertVirtualOpenedFileContained(resolvedPath, stat4);
|
|
18898
|
+
if (!SUPPORTS_NOFOLLOW) {
|
|
18899
|
+
const finalStat = await fs2.lstat(resolvedPath);
|
|
18900
|
+
if (finalStat.isSymbolicLink() || finalStat.dev !== stat4.dev || finalStat.ino !== stat4.ino) {
|
|
18901
|
+
throw new Error(`File changed during secure read: ${resolvedPath}`);
|
|
18902
|
+
}
|
|
18903
|
+
}
|
|
18904
|
+
return { content: await fd.readFile(), stat: stat4 };
|
|
18905
|
+
} finally {
|
|
18906
|
+
await fd.close();
|
|
18907
|
+
}
|
|
18908
|
+
}
|
|
18863
18909
|
validateDeleteTarget(filePath, stat4) {
|
|
18864
18910
|
if (stat4.isSymbolicLink()) {
|
|
18865
18911
|
return `Error: Cannot delete '${filePath}': symlinks are not allowed`;
|
|
@@ -18959,32 +19005,8 @@ var FilesystemBackend = class {
|
|
|
18959
19005
|
*/
|
|
18960
19006
|
async read(filePath, offset = 0, limit = 2e3) {
|
|
18961
19007
|
try {
|
|
18962
|
-
const
|
|
18963
|
-
|
|
18964
|
-
if (SUPPORTS_NOFOLLOW) {
|
|
18965
|
-
const stat4 = await fs2.stat(resolvedPath);
|
|
18966
|
-
if (!stat4.isFile()) {
|
|
18967
|
-
return `Error: File '${filePath}' not found`;
|
|
18968
|
-
}
|
|
18969
|
-
const fd = await fs2.open(
|
|
18970
|
-
resolvedPath,
|
|
18971
|
-
fsSync.constants.O_RDONLY | fsSync.constants.O_NOFOLLOW
|
|
18972
|
-
);
|
|
18973
|
-
try {
|
|
18974
|
-
content = await fd.readFile({ encoding: "utf-8" });
|
|
18975
|
-
} finally {
|
|
18976
|
-
await fd.close();
|
|
18977
|
-
}
|
|
18978
|
-
} else {
|
|
18979
|
-
const stat4 = await fs2.lstat(resolvedPath);
|
|
18980
|
-
if (stat4.isSymbolicLink()) {
|
|
18981
|
-
return `Error: Symlinks are not allowed: ${filePath}`;
|
|
18982
|
-
}
|
|
18983
|
-
if (!stat4.isFile()) {
|
|
18984
|
-
return `Error: File '${filePath}' not found`;
|
|
18985
|
-
}
|
|
18986
|
-
content = await fs2.readFile(resolvedPath, "utf-8");
|
|
18987
|
-
}
|
|
19008
|
+
const { content: buffer2 } = await this.readFileBuffer(filePath);
|
|
19009
|
+
const content = buffer2.toString("utf-8");
|
|
18988
19010
|
const emptyMsg = checkEmptyContent(content);
|
|
18989
19011
|
if (emptyMsg) {
|
|
18990
19012
|
return emptyMsg;
|
|
@@ -19008,35 +19030,19 @@ var FilesystemBackend = class {
|
|
|
19008
19030
|
* @returns Raw file content as FileData
|
|
19009
19031
|
*/
|
|
19010
19032
|
async readRaw(filePath) {
|
|
19011
|
-
const
|
|
19012
|
-
|
|
19013
|
-
let stat4;
|
|
19014
|
-
if (SUPPORTS_NOFOLLOW) {
|
|
19015
|
-
stat4 = await fs2.stat(resolvedPath);
|
|
19016
|
-
if (!stat4.isFile()) throw new Error(`File '${filePath}' not found`);
|
|
19017
|
-
const fd = await fs2.open(
|
|
19018
|
-
resolvedPath,
|
|
19019
|
-
fsSync.constants.O_RDONLY | fsSync.constants.O_NOFOLLOW
|
|
19020
|
-
);
|
|
19021
|
-
try {
|
|
19022
|
-
content = await fd.readFile({ encoding: "utf-8" });
|
|
19023
|
-
} finally {
|
|
19024
|
-
await fd.close();
|
|
19025
|
-
}
|
|
19026
|
-
} else {
|
|
19027
|
-
stat4 = await fs2.lstat(resolvedPath);
|
|
19028
|
-
if (stat4.isSymbolicLink()) {
|
|
19029
|
-
throw new Error(`Symlinks are not allowed: ${filePath}`);
|
|
19030
|
-
}
|
|
19031
|
-
if (!stat4.isFile()) throw new Error(`File '${filePath}' not found`);
|
|
19032
|
-
content = await fs2.readFile(resolvedPath, "utf-8");
|
|
19033
|
-
}
|
|
19033
|
+
const { content: buffer2, stat: stat4 } = await this.readFileBuffer(filePath);
|
|
19034
|
+
const content = buffer2.toString("utf-8");
|
|
19034
19035
|
return {
|
|
19035
19036
|
content: content.split("\n"),
|
|
19036
19037
|
created_at: stat4.ctime.toISOString(),
|
|
19037
19038
|
modified_at: stat4.mtime.toISOString()
|
|
19038
19039
|
};
|
|
19039
19040
|
}
|
|
19041
|
+
/** Read file content as raw bytes without following symbolic links. */
|
|
19042
|
+
async readBinary(filePath) {
|
|
19043
|
+
const { content } = await this.readFileBuffer(filePath);
|
|
19044
|
+
return content;
|
|
19045
|
+
}
|
|
19040
19046
|
/**
|
|
19041
19047
|
* Create a new file with content.
|
|
19042
19048
|
* Returns WriteResult. External storage sets filesUpdate=null.
|
|
@@ -23638,7 +23644,7 @@ registerToolLattice(
|
|
|
23638
23644
|
"update_agent",
|
|
23639
23645
|
{
|
|
23640
23646
|
name: "update_agent",
|
|
23641
|
-
description: "Update an existing agent's configuration. Provide the agent ID and the fields to change. Returns the updated agent's ID and name. NOTE: For user approval/confirmation scenarios, add middleware with type: 'ask_user_to_clarify'.",
|
|
23647
|
+
description: "Update an existing agent's configuration. Provide the agent ID and the fields to change. Returns the updated agent's ID and name. NOTE: For user approval/confirmation scenarios, add middleware with type: 'ask_user_to_clarify'. IMPORTANT: do NOT set 'modelKey' unless the user explicitly specified a model \u2014 leaving it unset makes the runtime use the 'default' model.",
|
|
23642
23648
|
schema: updateAgentSchema
|
|
23643
23649
|
},
|
|
23644
23650
|
async (input, exeConfig) => {
|
|
@@ -23876,6 +23882,8 @@ OVERRIDES the defaults above:
|
|
|
23876
23882
|
(parentId); NEVER create a new parent task for the round.
|
|
23877
23883
|
- The round is pre-approved \u2014 skip the DESIGN\u2192CONFIRM gates: show the
|
|
23878
23884
|
design in your reply, then build directly.
|
|
23885
|
+
- Do NOT set modelKey in update_agent unless the user explicitly named a
|
|
23886
|
+
model \u2014 leaving it unset makes the runtime use the 'default' model.
|
|
23879
23887
|
- Every update_agent call must be mirrored by a manage_task work item
|
|
23880
23888
|
whose summary names the changed keys (e.g. "update_agent: prompt,
|
|
23881
23889
|
modelKey") \u2014 the round feed highlights these so the user can see what
|
|
@@ -28470,14 +28478,22 @@ var DEFAULT_CALIBRATION_PROBES = [
|
|
|
28470
28478
|
expectedPass: false
|
|
28471
28479
|
}
|
|
28472
28480
|
];
|
|
28481
|
+
function resolveJudgeModelKey(explicitKey, manager) {
|
|
28482
|
+
if (explicitKey) return explicitKey;
|
|
28483
|
+
const models = manager.getAllLattices();
|
|
28484
|
+
const defaultModel = models.find((m) => m.key === "default");
|
|
28485
|
+
if (defaultModel) return defaultModel.key;
|
|
28486
|
+
const first = models[0];
|
|
28487
|
+
if (!first) {
|
|
28488
|
+
throw new Error("No model registered \u2014 register a model or provide a judgeModelKey");
|
|
28489
|
+
}
|
|
28490
|
+
return first.key;
|
|
28491
|
+
}
|
|
28473
28492
|
var LatticeEvalProject = class {
|
|
28474
28493
|
constructor(project, onCaseComplete) {
|
|
28475
28494
|
this.suites = /* @__PURE__ */ new Map();
|
|
28476
28495
|
this.project = project;
|
|
28477
|
-
const judgeModelKey = this.project.judge_agent_config.modelKey;
|
|
28478
|
-
if (!judgeModelKey) {
|
|
28479
|
-
throw new Error("judge_agent_config.modelKey is required \u2014 only pre-registered models are allowed");
|
|
28480
|
-
}
|
|
28496
|
+
const judgeModelKey = resolveJudgeModelKey(this.project.judge_agent_config.modelKey, modelLatticeManager);
|
|
28481
28497
|
if (!modelLatticeManager.hasLattice(judgeModelKey)) {
|
|
28482
28498
|
throw new Error(
|
|
28483
28499
|
`Judge model "${judgeModelKey}" not found. Register it first or provide a valid modelKey.`
|
|
@@ -30908,7 +30924,9 @@ function createManageEvalTool() {
|
|
|
30908
30924
|
data = await store.createProject(tid, (0, import_uuid12.v4)(), {
|
|
30909
30925
|
name: input.name,
|
|
30910
30926
|
description: input.description,
|
|
30911
|
-
|
|
30927
|
+
// No judge key given → default to the 'default' model key (the same
|
|
30928
|
+
// convention the UI model selector uses); never an empty modelKey.
|
|
30929
|
+
judgeModelConfig: { modelKey: input.judgeModelKey ?? "default" },
|
|
30912
30930
|
targetServerConfig: {
|
|
30913
30931
|
workspace_id: ctx.workspaceId,
|
|
30914
30932
|
project_id: ctx.projectId,
|
|
@@ -30983,7 +31001,7 @@ function createManageEvalTool() {
|
|
|
30983
31001
|
description: `Create, update, delete evaluation projects, suites, and test cases.
|
|
30984
31002
|
|
|
30985
31003
|
Project: create_project(name, description?, judgeModelKey?, concurrency?, targetAgentId?) | update_project | delete_project
|
|
30986
|
-
judgeModelKey defaults to
|
|
31004
|
+
judgeModelKey defaults to the "default" model. concurrency defaults to 3.
|
|
30987
31005
|
delete_project rejected if active runs exist.
|
|
30988
31006
|
**When creating a project from within a workspace, the workspace/project context is
|
|
30989
31007
|
automatically bound \u2014 eval runs will execute in the same workspace.**
|
|
@@ -33269,6 +33287,7 @@ registerBuiltinPlugins();
|
|
|
33269
33287
|
registerWorkflowRun,
|
|
33270
33288
|
removeCollectionVectorStore,
|
|
33271
33289
|
renderTemplate,
|
|
33290
|
+
resolveJudgeModelKey,
|
|
33272
33291
|
resolvePath,
|
|
33273
33292
|
sandboxLatticeManager,
|
|
33274
33293
|
sanitizeToolCallId,
|