@axiom-lattice/core 2.1.56 → 2.1.57
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 +45 -1
- package/dist/index.d.ts +45 -1
- package/dist/index.js +368 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +362 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2996,6 +2996,14 @@ declare class SandboxSkillStore implements SkillStore {
|
|
|
2996
2996
|
private sandboxManager?;
|
|
2997
2997
|
private defaultContext;
|
|
2998
2998
|
constructor(options?: SandboxSkillStoreOptions);
|
|
2999
|
+
/**
|
|
3000
|
+
* Build a Skill object from a built-in skill definition.
|
|
3001
|
+
*/
|
|
3002
|
+
private _builtInSkill;
|
|
3003
|
+
/**
|
|
3004
|
+
* Get all built-in skills as Skill objects for a tenant.
|
|
3005
|
+
*/
|
|
3006
|
+
private _allBuiltInSkills;
|
|
2999
3007
|
/**
|
|
3000
3008
|
* Get sandbox manager
|
|
3001
3009
|
*/
|
|
@@ -3684,6 +3692,42 @@ declare function parseSkillFrontmatter(content: string): {
|
|
|
3684
3692
|
*/
|
|
3685
3693
|
declare function buildSkillFile(meta: SkillMeta, body: string): string;
|
|
3686
3694
|
|
|
3695
|
+
/**
|
|
3696
|
+
* Built-in Skills
|
|
3697
|
+
*
|
|
3698
|
+
* Skills defined here are injected into the agent's available skill list
|
|
3699
|
+
* at runtime. They are NEVER written to the sandbox — they exist only in
|
|
3700
|
+
* memory and cannot be modified or deleted by the agent.
|
|
3701
|
+
*/
|
|
3702
|
+
|
|
3703
|
+
/**
|
|
3704
|
+
* Map of built-in skill name to full SKILL.md content.
|
|
3705
|
+
* Add new built-in skills here to make them automatically available.
|
|
3706
|
+
*/
|
|
3707
|
+
declare const BUILTIN_SKILLS: Record<string, string>;
|
|
3708
|
+
/**
|
|
3709
|
+
* Parse metadata from a built-in skill content.
|
|
3710
|
+
* Returns null if the skill content cannot be parsed.
|
|
3711
|
+
*/
|
|
3712
|
+
declare function getBuiltInSkillMeta(name: string): SkillMeta | null;
|
|
3713
|
+
/**
|
|
3714
|
+
* Get the full content of a built-in skill by name.
|
|
3715
|
+
* Returns undefined if the skill is not a built-in.
|
|
3716
|
+
*/
|
|
3717
|
+
declare function getBuiltInSkillContent(name: string): string | undefined;
|
|
3718
|
+
/**
|
|
3719
|
+
* Get metadata for all built-in skills.
|
|
3720
|
+
*/
|
|
3721
|
+
declare function getAllBuiltInSkillMetas(): SkillMeta[];
|
|
3722
|
+
/**
|
|
3723
|
+
* Get all built-in skill names.
|
|
3724
|
+
*/
|
|
3725
|
+
declare function getBuiltInSkillNames(): string[];
|
|
3726
|
+
/**
|
|
3727
|
+
* Check if a skill name refers to a built-in skill.
|
|
3728
|
+
*/
|
|
3729
|
+
declare function isBuiltInSkill(name: string): boolean;
|
|
3730
|
+
|
|
3687
3731
|
/**
|
|
3688
3732
|
* McpLatticeManager
|
|
3689
3733
|
*
|
|
@@ -5671,4 +5715,4 @@ interface SchedulerMiddlewareOptions {
|
|
|
5671
5715
|
}
|
|
5672
5716
|
declare function createSchedulerMiddleware(options?: SchedulerMiddlewareOptions): AgentMiddleware;
|
|
5673
5717
|
|
|
5674
|
-
export { AGENT_TASK_EVENT, type AddMessageParams, Agent, type AgentClient, type AgentExecutor, AgentInstanceManager, type AgentLattice, AgentLatticeManager, type AgentLifecycleEventName, AgentManager, type AgentStreamExecutor, type AgentThreadInterface, type BackendFactory, type BackendProtocol, type BufferStats, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, type ColumnInfo, CompositeBackend, ConsoleLoggerClient, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, InMemoryAssistantStore, InMemoryChunkBuffer, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryTaskListStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, LINE_NUMBER_WIDTH, type LangGraphStateChecker, type LoggerLattice, LoggerLatticeManager, MAX_LINE_LENGTH, type MailboxMessage, type MailboxStore, type McpLatticeInterface, McpLatticeManager, type McpServerInfo, MemoryBackend, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type MessageCompletedEvent, type MessageFailedEvent, type MessageStartedEvent, MessageType, MetricsServerManager, MicrosandboxRemoteInstance, MicrosandboxRemoteProvider, type MicrosandboxRemoteProviderClient, type MicrosandboxRemoteProviderConfig, MicrosandboxServiceClient, type MicrosandboxServiceClientConfig, type MicrosandboxShellExecInput, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, type PendingMessage, PinoLoggerClient, PostgresDatabase, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, QueueMode, type QueuePendingEvent, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type RunSandboxConfig, type RuntimeModelConfig, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxShellService, SandboxSkillStore, type SandboxSkillStoreOptions, type SandboxVolumeDefinition, type ScheduleLattice, ScheduleLatticeManager, type SchedulerMiddlewareOptions, SemanticMetricsClient, type SkillLattice, SkillLatticeManager, type SkillMeta, type SkillResource, SqlDatabaseManager, type StateAndStore, StateBackend, StoreBackend, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, TOOL_RESULT_TOKEN_LIMIT, TRUNCATION_GUIDANCE, type TableInfo, type TableSchema, type TaskEvent, type TaskListStore, type TaskSpec, TaskStatus, type TaskUpdatable, TeamAgentGraphBuilder, type TeamConfig, type TeamMiddlewareOptions, type TeamTask, type TeammateSpec, type TeammateToolsOptions, type ThreadBuffer, type ThreadBufferConfig, type ThreadBusyEvent, type ThreadIdleEvent, type ThreadInfo, type ThreadQueueConfig, type ThreadState, ThreadStatus, type ThreadStatusChangedEvent, type ToolDefinition, type ToolLattice, ToolLatticeManager, type UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, VolumeFilesystem, type VolumeFsClient, type WriteResult, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, checkEmptyContent, clearEncryptionKeyCache, computeSandboxName, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createModelSelectorMiddleware, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createSandboxProvider, createSchedulerMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, embeddingsLatticeManager, encrypt, eventBus, eventBus as eventBusDefault, fileDataToString, formatContentWithLineNumbers, formatGrepMatches, formatGrepResults, formatReadResponse, getAgentClient, getAgentConfig, getAllAgentConfigs, getAllToolDefinitions, getCheckpointSaver, getChunkBuffer, getEmbeddingsClient, getEmbeddingsLattice, getEncryptionKey, getLoggerLattice, getModelLattice, getNextCronTime, getQueueLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, loggerLatticeManager, mcpManager, metricsServerManager, modelLatticeManager, normalizeSandboxName, parseCronExpression, parseSkillFrontmatter, performStringReplacement, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, updateFileData, validateAgentInput, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager };
|
|
5718
|
+
export { AGENT_TASK_EVENT, type AddMessageParams, Agent, type AgentClient, type AgentExecutor, AgentInstanceManager, type AgentLattice, AgentLatticeManager, type AgentLifecycleEventName, AgentManager, type AgentStreamExecutor, type AgentThreadInterface, BUILTIN_SKILLS, type BackendFactory, type BackendProtocol, type BufferStats, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, type ColumnInfo, CompositeBackend, ConsoleLoggerClient, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, InMemoryAssistantStore, InMemoryChunkBuffer, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryTaskListStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, LINE_NUMBER_WIDTH, type LangGraphStateChecker, type LoggerLattice, LoggerLatticeManager, MAX_LINE_LENGTH, type MailboxMessage, type MailboxStore, type McpLatticeInterface, McpLatticeManager, type McpServerInfo, MemoryBackend, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type MessageCompletedEvent, type MessageFailedEvent, type MessageStartedEvent, MessageType, MetricsServerManager, MicrosandboxRemoteInstance, MicrosandboxRemoteProvider, type MicrosandboxRemoteProviderClient, type MicrosandboxRemoteProviderConfig, MicrosandboxServiceClient, type MicrosandboxServiceClientConfig, type MicrosandboxShellExecInput, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, type PendingMessage, PinoLoggerClient, PostgresDatabase, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, QueueMode, type QueuePendingEvent, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type RunSandboxConfig, type RuntimeModelConfig, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxShellService, SandboxSkillStore, type SandboxSkillStoreOptions, type SandboxVolumeDefinition, type ScheduleLattice, ScheduleLatticeManager, type SchedulerMiddlewareOptions, SemanticMetricsClient, type SkillLattice, SkillLatticeManager, type SkillMeta, type SkillResource, SqlDatabaseManager, type StateAndStore, StateBackend, StoreBackend, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, TOOL_RESULT_TOKEN_LIMIT, TRUNCATION_GUIDANCE, type TableInfo, type TableSchema, type TaskEvent, type TaskListStore, type TaskSpec, TaskStatus, type TaskUpdatable, TeamAgentGraphBuilder, type TeamConfig, type TeamMiddlewareOptions, type TeamTask, type TeammateSpec, type TeammateToolsOptions, type ThreadBuffer, type ThreadBufferConfig, type ThreadBusyEvent, type ThreadIdleEvent, type ThreadInfo, type ThreadQueueConfig, type ThreadState, ThreadStatus, type ThreadStatusChangedEvent, type ToolDefinition, type ToolLattice, ToolLatticeManager, type UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, VolumeFilesystem, type VolumeFsClient, type WriteResult, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, checkEmptyContent, clearEncryptionKeyCache, computeSandboxName, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createModelSelectorMiddleware, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createSandboxProvider, createSchedulerMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, embeddingsLatticeManager, encrypt, eventBus, eventBus as eventBusDefault, fileDataToString, formatContentWithLineNumbers, formatGrepMatches, formatGrepResults, formatReadResponse, getAgentClient, getAgentConfig, getAllAgentConfigs, getAllBuiltInSkillMetas, getAllToolDefinitions, getBuiltInSkillContent, getBuiltInSkillMeta, getBuiltInSkillNames, getCheckpointSaver, getChunkBuffer, getEmbeddingsClient, getEmbeddingsLattice, getEncryptionKey, getLoggerLattice, getModelLattice, getNextCronTime, getQueueLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, isBuiltInSkill, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, loggerLatticeManager, mcpManager, metricsServerManager, modelLatticeManager, normalizeSandboxName, parseCronExpression, parseSkillFrontmatter, performStringReplacement, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, updateFileData, validateAgentInput, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager };
|
package/dist/index.d.ts
CHANGED
|
@@ -2996,6 +2996,14 @@ declare class SandboxSkillStore implements SkillStore {
|
|
|
2996
2996
|
private sandboxManager?;
|
|
2997
2997
|
private defaultContext;
|
|
2998
2998
|
constructor(options?: SandboxSkillStoreOptions);
|
|
2999
|
+
/**
|
|
3000
|
+
* Build a Skill object from a built-in skill definition.
|
|
3001
|
+
*/
|
|
3002
|
+
private _builtInSkill;
|
|
3003
|
+
/**
|
|
3004
|
+
* Get all built-in skills as Skill objects for a tenant.
|
|
3005
|
+
*/
|
|
3006
|
+
private _allBuiltInSkills;
|
|
2999
3007
|
/**
|
|
3000
3008
|
* Get sandbox manager
|
|
3001
3009
|
*/
|
|
@@ -3684,6 +3692,42 @@ declare function parseSkillFrontmatter(content: string): {
|
|
|
3684
3692
|
*/
|
|
3685
3693
|
declare function buildSkillFile(meta: SkillMeta, body: string): string;
|
|
3686
3694
|
|
|
3695
|
+
/**
|
|
3696
|
+
* Built-in Skills
|
|
3697
|
+
*
|
|
3698
|
+
* Skills defined here are injected into the agent's available skill list
|
|
3699
|
+
* at runtime. They are NEVER written to the sandbox — they exist only in
|
|
3700
|
+
* memory and cannot be modified or deleted by the agent.
|
|
3701
|
+
*/
|
|
3702
|
+
|
|
3703
|
+
/**
|
|
3704
|
+
* Map of built-in skill name to full SKILL.md content.
|
|
3705
|
+
* Add new built-in skills here to make them automatically available.
|
|
3706
|
+
*/
|
|
3707
|
+
declare const BUILTIN_SKILLS: Record<string, string>;
|
|
3708
|
+
/**
|
|
3709
|
+
* Parse metadata from a built-in skill content.
|
|
3710
|
+
* Returns null if the skill content cannot be parsed.
|
|
3711
|
+
*/
|
|
3712
|
+
declare function getBuiltInSkillMeta(name: string): SkillMeta | null;
|
|
3713
|
+
/**
|
|
3714
|
+
* Get the full content of a built-in skill by name.
|
|
3715
|
+
* Returns undefined if the skill is not a built-in.
|
|
3716
|
+
*/
|
|
3717
|
+
declare function getBuiltInSkillContent(name: string): string | undefined;
|
|
3718
|
+
/**
|
|
3719
|
+
* Get metadata for all built-in skills.
|
|
3720
|
+
*/
|
|
3721
|
+
declare function getAllBuiltInSkillMetas(): SkillMeta[];
|
|
3722
|
+
/**
|
|
3723
|
+
* Get all built-in skill names.
|
|
3724
|
+
*/
|
|
3725
|
+
declare function getBuiltInSkillNames(): string[];
|
|
3726
|
+
/**
|
|
3727
|
+
* Check if a skill name refers to a built-in skill.
|
|
3728
|
+
*/
|
|
3729
|
+
declare function isBuiltInSkill(name: string): boolean;
|
|
3730
|
+
|
|
3687
3731
|
/**
|
|
3688
3732
|
* McpLatticeManager
|
|
3689
3733
|
*
|
|
@@ -5671,4 +5715,4 @@ interface SchedulerMiddlewareOptions {
|
|
|
5671
5715
|
}
|
|
5672
5716
|
declare function createSchedulerMiddleware(options?: SchedulerMiddlewareOptions): AgentMiddleware;
|
|
5673
5717
|
|
|
5674
|
-
export { AGENT_TASK_EVENT, type AddMessageParams, Agent, type AgentClient, type AgentExecutor, AgentInstanceManager, type AgentLattice, AgentLatticeManager, type AgentLifecycleEventName, AgentManager, type AgentStreamExecutor, type AgentThreadInterface, type BackendFactory, type BackendProtocol, type BufferStats, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, type ColumnInfo, CompositeBackend, ConsoleLoggerClient, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, InMemoryAssistantStore, InMemoryChunkBuffer, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryTaskListStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, LINE_NUMBER_WIDTH, type LangGraphStateChecker, type LoggerLattice, LoggerLatticeManager, MAX_LINE_LENGTH, type MailboxMessage, type MailboxStore, type McpLatticeInterface, McpLatticeManager, type McpServerInfo, MemoryBackend, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type MessageCompletedEvent, type MessageFailedEvent, type MessageStartedEvent, MessageType, MetricsServerManager, MicrosandboxRemoteInstance, MicrosandboxRemoteProvider, type MicrosandboxRemoteProviderClient, type MicrosandboxRemoteProviderConfig, MicrosandboxServiceClient, type MicrosandboxServiceClientConfig, type MicrosandboxShellExecInput, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, type PendingMessage, PinoLoggerClient, PostgresDatabase, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, QueueMode, type QueuePendingEvent, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type RunSandboxConfig, type RuntimeModelConfig, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxShellService, SandboxSkillStore, type SandboxSkillStoreOptions, type SandboxVolumeDefinition, type ScheduleLattice, ScheduleLatticeManager, type SchedulerMiddlewareOptions, SemanticMetricsClient, type SkillLattice, SkillLatticeManager, type SkillMeta, type SkillResource, SqlDatabaseManager, type StateAndStore, StateBackend, StoreBackend, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, TOOL_RESULT_TOKEN_LIMIT, TRUNCATION_GUIDANCE, type TableInfo, type TableSchema, type TaskEvent, type TaskListStore, type TaskSpec, TaskStatus, type TaskUpdatable, TeamAgentGraphBuilder, type TeamConfig, type TeamMiddlewareOptions, type TeamTask, type TeammateSpec, type TeammateToolsOptions, type ThreadBuffer, type ThreadBufferConfig, type ThreadBusyEvent, type ThreadIdleEvent, type ThreadInfo, type ThreadQueueConfig, type ThreadState, ThreadStatus, type ThreadStatusChangedEvent, type ToolDefinition, type ToolLattice, ToolLatticeManager, type UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, VolumeFilesystem, type VolumeFsClient, type WriteResult, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, checkEmptyContent, clearEncryptionKeyCache, computeSandboxName, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createModelSelectorMiddleware, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createSandboxProvider, createSchedulerMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, embeddingsLatticeManager, encrypt, eventBus, eventBus as eventBusDefault, fileDataToString, formatContentWithLineNumbers, formatGrepMatches, formatGrepResults, formatReadResponse, getAgentClient, getAgentConfig, getAllAgentConfigs, getAllToolDefinitions, getCheckpointSaver, getChunkBuffer, getEmbeddingsClient, getEmbeddingsLattice, getEncryptionKey, getLoggerLattice, getModelLattice, getNextCronTime, getQueueLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, loggerLatticeManager, mcpManager, metricsServerManager, modelLatticeManager, normalizeSandboxName, parseCronExpression, parseSkillFrontmatter, performStringReplacement, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, updateFileData, validateAgentInput, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager };
|
|
5718
|
+
export { AGENT_TASK_EVENT, type AddMessageParams, Agent, type AgentClient, type AgentExecutor, AgentInstanceManager, type AgentLattice, AgentLatticeManager, type AgentLifecycleEventName, AgentManager, type AgentStreamExecutor, type AgentThreadInterface, BUILTIN_SKILLS, type BackendFactory, type BackendProtocol, type BufferStats, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, type ColumnInfo, CompositeBackend, ConsoleLoggerClient, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, InMemoryAssistantStore, InMemoryChunkBuffer, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryTaskListStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, LINE_NUMBER_WIDTH, type LangGraphStateChecker, type LoggerLattice, LoggerLatticeManager, MAX_LINE_LENGTH, type MailboxMessage, type MailboxStore, type McpLatticeInterface, McpLatticeManager, type McpServerInfo, MemoryBackend, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type MessageCompletedEvent, type MessageFailedEvent, type MessageStartedEvent, MessageType, MetricsServerManager, MicrosandboxRemoteInstance, MicrosandboxRemoteProvider, type MicrosandboxRemoteProviderClient, type MicrosandboxRemoteProviderConfig, MicrosandboxServiceClient, type MicrosandboxServiceClientConfig, type MicrosandboxShellExecInput, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, type PendingMessage, PinoLoggerClient, PostgresDatabase, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, QueueMode, type QueuePendingEvent, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type RunSandboxConfig, type RuntimeModelConfig, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxShellService, SandboxSkillStore, type SandboxSkillStoreOptions, type SandboxVolumeDefinition, type ScheduleLattice, ScheduleLatticeManager, type SchedulerMiddlewareOptions, SemanticMetricsClient, type SkillLattice, SkillLatticeManager, type SkillMeta, type SkillResource, SqlDatabaseManager, type StateAndStore, StateBackend, StoreBackend, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, TOOL_RESULT_TOKEN_LIMIT, TRUNCATION_GUIDANCE, type TableInfo, type TableSchema, type TaskEvent, type TaskListStore, type TaskSpec, TaskStatus, type TaskUpdatable, TeamAgentGraphBuilder, type TeamConfig, type TeamMiddlewareOptions, type TeamTask, type TeammateSpec, type TeammateToolsOptions, type ThreadBuffer, type ThreadBufferConfig, type ThreadBusyEvent, type ThreadIdleEvent, type ThreadInfo, type ThreadQueueConfig, type ThreadState, ThreadStatus, type ThreadStatusChangedEvent, type ToolDefinition, type ToolLattice, ToolLatticeManager, type UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, VolumeFilesystem, type VolumeFsClient, type WriteResult, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, checkEmptyContent, clearEncryptionKeyCache, computeSandboxName, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createModelSelectorMiddleware, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createSandboxProvider, createSchedulerMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, embeddingsLatticeManager, encrypt, eventBus, eventBus as eventBusDefault, fileDataToString, formatContentWithLineNumbers, formatGrepMatches, formatGrepResults, formatReadResponse, getAgentClient, getAgentConfig, getAllAgentConfigs, getAllBuiltInSkillMetas, getAllToolDefinitions, getBuiltInSkillContent, getBuiltInSkillMeta, getBuiltInSkillNames, getCheckpointSaver, getChunkBuffer, getEmbeddingsClient, getEmbeddingsLattice, getEncryptionKey, getLoggerLattice, getModelLattice, getNextCronTime, getQueueLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, isBuiltInSkill, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, loggerLatticeManager, mcpManager, metricsServerManager, modelLatticeManager, normalizeSandboxName, parseCronExpression, parseSkillFrontmatter, performStringReplacement, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, updateFileData, validateAgentInput, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager };
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ __export(index_exports, {
|
|
|
36
36
|
AgentLatticeManager: () => AgentLatticeManager,
|
|
37
37
|
AgentManager: () => AgentManager,
|
|
38
38
|
AgentType: () => import_protocols.AgentType,
|
|
39
|
+
BUILTIN_SKILLS: () => BUILTIN_SKILLS,
|
|
39
40
|
ChunkBuffer: () => ChunkBuffer,
|
|
40
41
|
ChunkBufferLatticeManager: () => ChunkBufferLatticeManager,
|
|
41
42
|
CompositeBackend: () => CompositeBackend,
|
|
@@ -146,7 +147,11 @@ __export(index_exports, {
|
|
|
146
147
|
getAgentClient: () => getAgentClient,
|
|
147
148
|
getAgentConfig: () => getAgentConfig,
|
|
148
149
|
getAllAgentConfigs: () => getAllAgentConfigs,
|
|
150
|
+
getAllBuiltInSkillMetas: () => getAllBuiltInSkillMetas,
|
|
149
151
|
getAllToolDefinitions: () => getAllToolDefinitions,
|
|
152
|
+
getBuiltInSkillContent: () => getBuiltInSkillContent,
|
|
153
|
+
getBuiltInSkillMeta: () => getBuiltInSkillMeta,
|
|
154
|
+
getBuiltInSkillNames: () => getBuiltInSkillNames,
|
|
150
155
|
getCheckpointSaver: () => getCheckpointSaver,
|
|
151
156
|
getChunkBuffer: () => getChunkBuffer,
|
|
152
157
|
getEmbeddingsClient: () => getEmbeddingsClient,
|
|
@@ -168,6 +173,7 @@ __export(index_exports, {
|
|
|
168
173
|
grepMatchesFromFiles: () => grepMatchesFromFiles,
|
|
169
174
|
grepSearchFiles: () => grepSearchFiles,
|
|
170
175
|
hasChunkBuffer: () => hasChunkBuffer,
|
|
176
|
+
isBuiltInSkill: () => isBuiltInSkill,
|
|
171
177
|
isUsingDefaultKey: () => isUsingDefaultKey,
|
|
172
178
|
isValidCronExpression: () => isValidCronExpression,
|
|
173
179
|
isValidSandboxName: () => isValidSandboxName,
|
|
@@ -5043,6 +5049,285 @@ var import_langchain40 = require("langchain");
|
|
|
5043
5049
|
// src/tool_lattice/skill/load_skill_content.ts
|
|
5044
5050
|
var import_zod43 = __toESM(require("zod"));
|
|
5045
5051
|
var import_langchain41 = require("langchain");
|
|
5052
|
+
|
|
5053
|
+
// src/skill_lattice/builtinSkills.ts
|
|
5054
|
+
var BUILTIN_SKILLS = {
|
|
5055
|
+
"create-skill": `---
|
|
5056
|
+
name: create-skill
|
|
5057
|
+
description: Create new skills, modify and improve existing skills. Use this skill whenever users mention creating a skill, wanting a new capability, asking to "make a skill for X", setting up automated workflows, or wanting to capture repeatable agent instructions \u2014 even if they don't use the word "skill."
|
|
5058
|
+
license: MIT
|
|
5059
|
+
metadata:
|
|
5060
|
+
category: meta
|
|
5061
|
+
version: "2.0"
|
|
5062
|
+
---
|
|
5063
|
+
|
|
5064
|
+
# Skill Creator
|
|
5065
|
+
|
|
5066
|
+
This skill guides you through creating and improving agent skills. Your job is to figure out where the user is in the process and help them progress \u2014 whether they're starting from scratch, have a rough idea, or want to improve an existing skill.
|
|
5067
|
+
|
|
5068
|
+
At a high level, the process follows an iterative loop: **understand intent \u2192 interview \u2192 draft \u2192 test \u2192 review \u2192 improve \u2192 repeat** until satisfied. But always be flexible \u2014 if the user says "just vibe with me," do that instead.
|
|
5069
|
+
|
|
5070
|
+
## Communicating With the User
|
|
5071
|
+
|
|
5072
|
+
Users range from deep technical experts to people who just learned what a terminal is. Pay attention to context cues:
|
|
5073
|
+
- "JSON" and "assertion" \u2014 only use without explanation if the user shows comfort with them
|
|
5074
|
+
- "evaluation" and "benchmark" \u2014 borderline, briefly define if unsure
|
|
5075
|
+
- When in doubt, briefly explain terms. Short parenthetical definitions are fine.
|
|
5076
|
+
|
|
5077
|
+
---
|
|
5078
|
+
|
|
5079
|
+
## Step 1: Capture Intent
|
|
5080
|
+
|
|
5081
|
+
Start by understanding what the user wants. The current conversation may already contain a workflow they want to capture (e.g., they say "turn this into a skill"). If so, extract answers from the conversation history first \u2014 the tools used, the sequence of steps, corrections made, input/output formats observed.
|
|
5082
|
+
|
|
5083
|
+
Ask yourself:
|
|
5084
|
+
1. What capability does this skill enable?
|
|
5085
|
+
2. When should this skill trigger? (what user phrases, contexts, keywords)
|
|
5086
|
+
3. What is the expected output or behavior?
|
|
5087
|
+
4. Does it coordinate other skills (subSkills)?
|
|
5088
|
+
|
|
5089
|
+
## Step 2: Interview and Research
|
|
5090
|
+
|
|
5091
|
+
Proactively ask questions before writing anything:
|
|
5092
|
+
- **Edge cases**: What unusual inputs might arise? What should happen on failure?
|
|
5093
|
+
- **Input/output formats**: What formats are involved (files, data, text)?
|
|
5094
|
+
- **Dependencies**: Are specific tools, APIs, or data sources needed?
|
|
5095
|
+
- **Success criteria**: How will the user know the skill is working?
|
|
5096
|
+
|
|
5097
|
+
Don't start writing until you've got clear answers. If the user is vague, ask clarifying questions \u2014 you'll save time by not guessing wrong.
|
|
5098
|
+
|
|
5099
|
+
---
|
|
5100
|
+
|
|
5101
|
+
## Step 3: Write the SKILL.md
|
|
5102
|
+
|
|
5103
|
+
### Skill Directory Structure
|
|
5104
|
+
|
|
5105
|
+
Skills use progressive disclosure \u2014 three levels of loading:
|
|
5106
|
+
|
|
5107
|
+
\`\`\`
|
|
5108
|
+
skill-name/
|
|
5109
|
+
\u251C\u2500\u2500 SKILL.md # Required \u2014 frontmatter + markdown body
|
|
5110
|
+
\u2514\u2500\u2500 resources/ # Optional \u2014 bundled files
|
|
5111
|
+
\u251C\u2500\u2500 scripts/ # Executable code for repetitive tasks
|
|
5112
|
+
\u251C\u2500\u2500 references/ # Docs loaded into context as needed
|
|
5113
|
+
\u2514\u2500\u2500 assets/ # Files used in output (templates, icons)
|
|
5114
|
+
\`\`\`
|
|
5115
|
+
|
|
5116
|
+
- **Metadata** (name + description) \u2014 always in context (~100 words)
|
|
5117
|
+
- **SKILL.md body** \u2014 loaded when skill triggers (aim for <500 lines)
|
|
5118
|
+
- **Bundled resources** \u2014 loaded as needed, unlimited
|
|
5119
|
+
|
|
5120
|
+
If SKILL.md approaches 500 lines, add hierarchy with clear pointers to reference files.
|
|
5121
|
+
|
|
5122
|
+
### File Location
|
|
5123
|
+
|
|
5124
|
+
Write the skill to: \`/root/.agents/skills/{skill-name}/SKILL.md\`
|
|
5125
|
+
|
|
5126
|
+
Resources go in: \`/root/.agents/skills/{skill-name}/resources/\`
|
|
5127
|
+
|
|
5128
|
+
### Naming Rules
|
|
5129
|
+
|
|
5130
|
+
Skill names (also the directory name) must follow these rules:
|
|
5131
|
+
- 1-64 characters, lowercase letters, digits, single hyphens
|
|
5132
|
+
- Pattern: \`^[a-z0-9]+(-[a-z0-9]+)*$\`
|
|
5133
|
+
- Cannot start or end with \`-\`, cannot contain consecutive \`--\`
|
|
5134
|
+
|
|
5135
|
+
**Good**: \`pdf-processor\`, \`sql-query\`, \`code-review\`, \`data-analytics\`
|
|
5136
|
+
**Bad**: \`PDF-Processor\`, \`sql__query\`, \`-test\`, \`a\`
|
|
5137
|
+
|
|
5138
|
+
### Frontmatter Reference
|
|
5139
|
+
|
|
5140
|
+
\`\`\`yaml
|
|
5141
|
+
---
|
|
5142
|
+
name: my-skill-name # Required \u2014 kebab-case identifier
|
|
5143
|
+
description: ... # Required \u2014 what AND when (this drives triggering)
|
|
5144
|
+
license: MIT # Optional
|
|
5145
|
+
compatibility: node # Optional \u2014 runtime/context requirement
|
|
5146
|
+
metadata: # Optional \u2014 key-value tags for search/filter
|
|
5147
|
+
category: tools
|
|
5148
|
+
version: "1.0"
|
|
5149
|
+
subSkills: # Optional \u2014 coordinated sub-skill names
|
|
5150
|
+
- sub-skill-1
|
|
5151
|
+
---
|
|
5152
|
+
|
|
5153
|
+
# Markdown Body
|
|
5154
|
+
|
|
5155
|
+
Instructional content for the agent.
|
|
5156
|
+
\`\`\`
|
|
5157
|
+
|
|
5158
|
+
---
|
|
5159
|
+
|
|
5160
|
+
## Writing Guide
|
|
5161
|
+
|
|
5162
|
+
### The Description Field
|
|
5163
|
+
|
|
5164
|
+
This is the most critical part. The description is the primary mechanism that determines whether an agent invokes your skill. Combine WHAT the skill does with specific contexts for WHEN to trigger.
|
|
5165
|
+
|
|
5166
|
+
Agents tend to **undertrigger** \u2014 to not use skills when they'd be useful. To combat this, make descriptions a little "pushy":
|
|
5167
|
+
|
|
5168
|
+
- Weak: "Helps with PDF files"
|
|
5169
|
+
- Better: "Extract text, tables, and metadata from PDF files. Use when users need to read, parse, or extract data from PDF documents."
|
|
5170
|
+
- Good: "Extract text, tables, and metadata from PDF files. Make sure to use this skill whenever the user mentions PDFs, extracting document data, or needs to read any kind of document file \u2014 even if they don't explicitly ask for 'PDF processing.'"
|
|
5171
|
+
|
|
5172
|
+
Include domain-specific trigger words: file extensions, tool names, common user phrases.
|
|
5173
|
+
|
|
5174
|
+
### Writing the Body
|
|
5175
|
+
|
|
5176
|
+
Prefer **imperative form**. Write what the agent should DO, not what the skill IS:
|
|
5177
|
+
- "Check the database connection and verify table schemas" \u2014 good
|
|
5178
|
+
- "The database connection is checked and table schemas are verified" \u2014 weak
|
|
5179
|
+
|
|
5180
|
+
**Explain WHY**, not just what. Use theory of mind \u2014 help the model understand the reasoning behind instructions so it can generalize to novel situations. If you find yourself writing ALWAYS or NEVER in all caps, that's a yellow flag \u2014 reframe and explain the reasoning.
|
|
5181
|
+
|
|
5182
|
+
**Use examples** to ground abstract instructions:
|
|
5183
|
+
|
|
5184
|
+
\`\`\`markdown
|
|
5185
|
+
## Commit message format
|
|
5186
|
+
**Example 1:**
|
|
5187
|
+
Input: Added user authentication with JWT tokens
|
|
5188
|
+
Output: feat(auth): implement JWT-based authentication
|
|
5189
|
+
\`\`\`
|
|
5190
|
+
|
|
5191
|
+
**Define output formats** explicitly when structure matters:
|
|
5192
|
+
|
|
5193
|
+
\`\`\`markdown
|
|
5194
|
+
## Report structure
|
|
5195
|
+
ALWAYS use this exact template:
|
|
5196
|
+
# [Title]
|
|
5197
|
+
## Executive summary
|
|
5198
|
+
## Key findings
|
|
5199
|
+
## Recommendations
|
|
5200
|
+
\`\`\`
|
|
5201
|
+
|
|
5202
|
+
### Body Structure Checklist
|
|
5203
|
+
|
|
5204
|
+
A well-written skill body typically includes:
|
|
5205
|
+
- **Role definition**: What role does the agent play when executing this skill?
|
|
5206
|
+
- **Workflow**: Step-by-step process in a clear sequence
|
|
5207
|
+
- **Guidelines**: Rules, constraints, quality standards, and the WHY behind them
|
|
5208
|
+
- **Scenarios**: 2-3 common scenarios with concrete examples of inputs and expected outputs
|
|
5209
|
+
- **Edge cases**: What to do when things go wrong, when data is missing, etc.
|
|
5210
|
+
|
|
5211
|
+
---
|
|
5212
|
+
|
|
5213
|
+
## Step 4: Test and Iterate
|
|
5214
|
+
|
|
5215
|
+
After writing the draft, test it:
|
|
5216
|
+
|
|
5217
|
+
1. **Create 2-3 test prompts** \u2014 the kind of thing a real user would actually say. Share them with the user: "Here are a few test cases I'd like to try. Do these look right?"
|
|
5218
|
+
2. **Run the skill** against each test prompt to see what the agent produces
|
|
5219
|
+
3. **Review outputs with the user**: evaluate both qualitatively (does the output look right?) and quantitatively (did it follow the workflow? use the right tools?)
|
|
5220
|
+
4. **Collect feedback**: What worked? What didn't? What surprised the user?
|
|
5221
|
+
|
|
5222
|
+
### Improving the Skill
|
|
5223
|
+
|
|
5224
|
+
When iterating based on feedback:
|
|
5225
|
+
|
|
5226
|
+
1. **Generalize from feedback** \u2014 don't overfit to the test cases. The skill will be used across many different prompts. If a fix only helps one specific example, think bigger.
|
|
5227
|
+
2. **Keep it lean** \u2014 remove instructions that aren't pulling their weight. Read the full transcripts, not just final outputs. If the skill makes the agent waste time, trim it.
|
|
5228
|
+
3. **Look for repeated work** \u2014 if all test runs involved writing the same helper script, bundle that script into \`resources/scripts/\` and have the skill reference it instead.
|
|
5229
|
+
4. **Explain the why** \u2014 if you're adding a constraint because of a failure, explain the context so the model understands when to apply it and when it's safe to deviate.
|
|
5230
|
+
|
|
5231
|
+
Repeat the test \u2192 review \u2192 improve loop until the user is satisfied.
|
|
5232
|
+
|
|
5233
|
+
---
|
|
5234
|
+
|
|
5235
|
+
## Step 5: Optimize the Description (Optional)
|
|
5236
|
+
|
|
5237
|
+
After the skill works well, offer to optimize the description for better triggering accuracy.
|
|
5238
|
+
|
|
5239
|
+
### How Triggering Works
|
|
5240
|
+
|
|
5241
|
+
The agent sees skills as a list of name + description pairs. It decides whether to consult a skill based on that description. Important: agents only consult skills for tasks they can't easily handle on their own. Simple one-step queries may not trigger a skill even if the description matches \u2014 so make sure the description emphasizes the COMPLEX or SPECIALIZED nature of the task.
|
|
5242
|
+
|
|
5243
|
+
### Optimization Approach
|
|
5244
|
+
|
|
5245
|
+
1. Create 10-15 eval queries \u2014 a mix of should-trigger and should-not-trigger prompts
|
|
5246
|
+
2. For **should-trigger** (6-8): different phrasings of the same intent \u2014 formal, casual, indirect. Include cases where the user doesn't explicitly name the skill but clearly needs it
|
|
5247
|
+
3. For **should-not-trigger** (6-8): focus on near-misses \u2014 queries that share keywords but need something different. Don't make them obviously irrelevant
|
|
5248
|
+
4. Test the description against these queries and adjust based on misfires
|
|
5249
|
+
5. Show the user before/after and explain what changed
|
|
5250
|
+
|
|
5251
|
+
---
|
|
5252
|
+
|
|
5253
|
+
## Step 6: Package and Present
|
|
5254
|
+
|
|
5255
|
+
When the skill is ready:
|
|
5256
|
+
1. Verify the SKILL.md is at \`/root/.agents/skills/{skill-name}/SKILL.md\` with correct frontmatter
|
|
5257
|
+
2. Confirm all resource files are in place under \`resources/\`
|
|
5258
|
+
3. Tell the user the skill is ready and available at its path
|
|
5259
|
+
4. Remind them that the skill will now appear in the available skills list for any agent using the skill system
|
|
5260
|
+
|
|
5261
|
+
## Updating Existing Skills
|
|
5262
|
+
|
|
5263
|
+
When the user wants to improve an existing skill:
|
|
5264
|
+
1. Read the current SKILL.md from \`/root/.agents/skills/{skill-name}/SKILL.md\`
|
|
5265
|
+
2. Understand what it currently does and where it falls short
|
|
5266
|
+
3. Follow the same interview \u2192 draft \u2192 test \u2192 iterate loop
|
|
5267
|
+
4. **Preserve the original name** \u2014 the directory name and \`name\` frontmatter field should stay the same
|
|
5268
|
+
5. Write the updated version back to the same path
|
|
5269
|
+
|
|
5270
|
+
---
|
|
5271
|
+
|
|
5272
|
+
## Example Walkthrough
|
|
5273
|
+
|
|
5274
|
+
**User**: "I want a skill that helps me analyze CSV data"
|
|
5275
|
+
|
|
5276
|
+
**You** (interview):
|
|
5277
|
+
- "What kinds of analysis \u2014 summary stats, filtering, charting?"
|
|
5278
|
+
- "Are the CSVs always the same format or varied?"
|
|
5279
|
+
- "Should it output results as text, new CSV, or visualizations?"
|
|
5280
|
+
|
|
5281
|
+
**User**: "Mostly summary stats and filtering. The files vary but all have headers."
|
|
5282
|
+
|
|
5283
|
+
**You** (draft frontmatter):
|
|
5284
|
+
\`\`\`yaml
|
|
5285
|
+
---
|
|
5286
|
+
name: csv-analyzer
|
|
5287
|
+
description: Analyze CSV data with statistical summaries, filtering, and aggregation. Use whenever users want to explore, summarize, or extract insights from CSV files \u2014 even if they don't say "analyze" explicitly.
|
|
5288
|
+
metadata:
|
|
5289
|
+
category: data
|
|
5290
|
+
version: "1.0"
|
|
5291
|
+
---
|
|
5292
|
+
\`\`\`
|
|
5293
|
+
|
|
5294
|
+
**You** (draft body): Write a workflow that teaches the agent to:
|
|
5295
|
+
1. Inspect the CSV structure and headers
|
|
5296
|
+
2. Let the user choose analysis type (summary, filter, aggregate)
|
|
5297
|
+
3. Execute the analysis and present results clearly
|
|
5298
|
+
4. Handle edge cases: missing headers, empty files, mixed types
|
|
5299
|
+
|
|
5300
|
+
**You** (write): Create \`/root/.agents/skills/csv-analyzer/SKILL.md\`
|
|
5301
|
+
|
|
5302
|
+
**You** (test): "Here are 3 test cases \u2014 'summarize this sales CSV', 'filter rows where region is West', 'show monthly revenue trends'. Let me run these and we'll review."
|
|
5303
|
+
|
|
5304
|
+
Then iterate based on what the user says.
|
|
5305
|
+
`
|
|
5306
|
+
};
|
|
5307
|
+
function getBuiltInSkillMeta(name) {
|
|
5308
|
+
const content = BUILTIN_SKILLS[name];
|
|
5309
|
+
if (!content) return null;
|
|
5310
|
+
try {
|
|
5311
|
+
const { meta } = parseSkillFrontmatter(content);
|
|
5312
|
+
return meta;
|
|
5313
|
+
} catch {
|
|
5314
|
+
return null;
|
|
5315
|
+
}
|
|
5316
|
+
}
|
|
5317
|
+
function getBuiltInSkillContent(name) {
|
|
5318
|
+
return BUILTIN_SKILLS[name];
|
|
5319
|
+
}
|
|
5320
|
+
function getAllBuiltInSkillMetas() {
|
|
5321
|
+
return Object.keys(BUILTIN_SKILLS).map((name) => getBuiltInSkillMeta(name)).filter((meta) => meta !== null);
|
|
5322
|
+
}
|
|
5323
|
+
function getBuiltInSkillNames() {
|
|
5324
|
+
return Object.keys(BUILTIN_SKILLS);
|
|
5325
|
+
}
|
|
5326
|
+
function isBuiltInSkill(name) {
|
|
5327
|
+
return name in BUILTIN_SKILLS;
|
|
5328
|
+
}
|
|
5329
|
+
|
|
5330
|
+
// src/tool_lattice/skill/load_skill_content.ts
|
|
5046
5331
|
var LOAD_SKILL_CONTENT_DESCRIPTION = `
|
|
5047
5332
|
Execute a skill within the main conversation
|
|
5048
5333
|
|
|
@@ -5083,6 +5368,11 @@ var createLoadSkillContentTool = () => {
|
|
|
5083
5368
|
return (0, import_langchain41.tool)(
|
|
5084
5369
|
async (input, _exe_config) => {
|
|
5085
5370
|
try {
|
|
5371
|
+
const builtInContent = getBuiltInSkillContent(input.skill_name);
|
|
5372
|
+
if (builtInContent) {
|
|
5373
|
+
const { meta: meta2, body: body2 } = parseSkillFrontmatter(builtInContent);
|
|
5374
|
+
return buildSkillFile(meta2, body2);
|
|
5375
|
+
}
|
|
5086
5376
|
const sandbox = await getSandboxFromExeConfig(_exe_config);
|
|
5087
5377
|
const filePath = `/root/.agents/skills/${input.skill_name}/SKILL.md`;
|
|
5088
5378
|
let content;
|
|
@@ -5140,6 +5430,7 @@ function createSkillMiddleware(params = {}) {
|
|
|
5140
5430
|
createLoadSkillContentTool()
|
|
5141
5431
|
],
|
|
5142
5432
|
beforeAgent: async (state, runtime) => {
|
|
5433
|
+
let resolvedSkills = [];
|
|
5143
5434
|
try {
|
|
5144
5435
|
const runConfig = runtime?.context?.runConfig || {};
|
|
5145
5436
|
const manager = getSandBoxManager();
|
|
@@ -5169,13 +5460,24 @@ function createSkillMiddleware(params = {}) {
|
|
|
5169
5460
|
}
|
|
5170
5461
|
}
|
|
5171
5462
|
if (readAll) {
|
|
5172
|
-
|
|
5463
|
+
resolvedSkills = allSkills;
|
|
5173
5464
|
} else if (skills && skills.length > 0) {
|
|
5174
|
-
|
|
5465
|
+
resolvedSkills = allSkills.filter((skill) => skills.includes(skill.id));
|
|
5466
|
+
} else {
|
|
5467
|
+
resolvedSkills = allSkills;
|
|
5175
5468
|
}
|
|
5176
5469
|
} catch (error) {
|
|
5177
5470
|
console.error("Error fetching skills:", error);
|
|
5178
5471
|
}
|
|
5472
|
+
const builtinMetas = getAllBuiltInSkillMetas();
|
|
5473
|
+
for (const meta of builtinMetas) {
|
|
5474
|
+
resolvedSkills.push({
|
|
5475
|
+
id: meta.name,
|
|
5476
|
+
name: meta.name,
|
|
5477
|
+
description: meta.description
|
|
5478
|
+
});
|
|
5479
|
+
}
|
|
5480
|
+
latestSkills = resolvedSkills;
|
|
5179
5481
|
},
|
|
5180
5482
|
wrapModelCall: (request, handler) => {
|
|
5181
5483
|
const skillsPrompt = latestSkills.filter((skill) => !!skill.name).map((skill) => `## ${skill.name}
|
|
@@ -16637,6 +16939,39 @@ var SandboxSkillStore = class {
|
|
|
16637
16939
|
projectId: options.projectId
|
|
16638
16940
|
};
|
|
16639
16941
|
}
|
|
16942
|
+
/**
|
|
16943
|
+
* Build a Skill object from a built-in skill definition.
|
|
16944
|
+
*/
|
|
16945
|
+
_builtInSkill(name, tenantId) {
|
|
16946
|
+
const content = getBuiltInSkillContent(name);
|
|
16947
|
+
if (!content) return null;
|
|
16948
|
+
const { meta } = parseSkillFrontmatter(content);
|
|
16949
|
+
const now = /* @__PURE__ */ new Date();
|
|
16950
|
+
return {
|
|
16951
|
+
id: meta.name || name,
|
|
16952
|
+
tenantId,
|
|
16953
|
+
name: meta.name || name,
|
|
16954
|
+
description: meta.description || "",
|
|
16955
|
+
license: meta.license,
|
|
16956
|
+
compatibility: meta.compatibility,
|
|
16957
|
+
metadata: meta.metadata || {},
|
|
16958
|
+
content,
|
|
16959
|
+
subSkills: meta.subSkills,
|
|
16960
|
+
createdAt: now,
|
|
16961
|
+
updatedAt: now
|
|
16962
|
+
};
|
|
16963
|
+
}
|
|
16964
|
+
/**
|
|
16965
|
+
* Get all built-in skills as Skill objects for a tenant.
|
|
16966
|
+
*/
|
|
16967
|
+
_allBuiltInSkills(tenantId) {
|
|
16968
|
+
const skills = [];
|
|
16969
|
+
for (const name of Object.keys(BUILTIN_SKILLS)) {
|
|
16970
|
+
const skill = this._builtInSkill(name, tenantId);
|
|
16971
|
+
if (skill) skills.push(skill);
|
|
16972
|
+
}
|
|
16973
|
+
return skills;
|
|
16974
|
+
}
|
|
16640
16975
|
/**
|
|
16641
16976
|
* Get sandbox manager
|
|
16642
16977
|
*/
|
|
@@ -16773,17 +17108,25 @@ ${body}` : `${frontmatter}
|
|
|
16773
17108
|
}
|
|
16774
17109
|
}
|
|
16775
17110
|
}
|
|
17111
|
+
const builtInSkills = this._allBuiltInSkills(tenantId);
|
|
17112
|
+
for (const bis of builtInSkills) {
|
|
17113
|
+
if (!skills.some((s) => s.id === bis.id)) {
|
|
17114
|
+
skills.push(bis);
|
|
17115
|
+
}
|
|
17116
|
+
}
|
|
16776
17117
|
console.log(`[SandboxSkillStore] Loaded ${skills.length} skills for tenant ${tenantId}`);
|
|
16777
17118
|
return skills.sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
|
|
16778
17119
|
} catch (error) {
|
|
16779
17120
|
console.error(`[SandboxSkillStore] Error listing skills for tenant ${tenantId}:`, error);
|
|
16780
|
-
return
|
|
17121
|
+
return this._allBuiltInSkills(tenantId);
|
|
16781
17122
|
}
|
|
16782
17123
|
}
|
|
16783
17124
|
/**
|
|
16784
17125
|
* Get skill by ID
|
|
16785
17126
|
*/
|
|
16786
17127
|
async getSkillById(tenantId, id, context) {
|
|
17128
|
+
const builtIn = this._builtInSkill(id, tenantId);
|
|
17129
|
+
if (builtIn) return builtIn;
|
|
16787
17130
|
return this.readSkillFile(tenantId, id, context);
|
|
16788
17131
|
}
|
|
16789
17132
|
/**
|
|
@@ -16791,6 +17134,11 @@ ${body}` : `${frontmatter}
|
|
|
16791
17134
|
*/
|
|
16792
17135
|
async createSkill(tenantId, id, data, context) {
|
|
16793
17136
|
validateSkillName(data.name);
|
|
17137
|
+
if (isBuiltInSkill(data.name)) {
|
|
17138
|
+
throw new Error(
|
|
17139
|
+
`Skill "${data.name}" is a built-in skill and cannot be overwritten`
|
|
17140
|
+
);
|
|
17141
|
+
}
|
|
16794
17142
|
if (id !== data.name) {
|
|
16795
17143
|
throw new Error(
|
|
16796
17144
|
`Skill id "${id}" must equal name "${data.name}" (name is used for path addressing)`
|
|
@@ -16821,6 +17169,11 @@ ${body}` : `${frontmatter}
|
|
|
16821
17169
|
* Update an existing skill
|
|
16822
17170
|
*/
|
|
16823
17171
|
async updateSkill(tenantId, id, updates, context) {
|
|
17172
|
+
if (isBuiltInSkill(id)) {
|
|
17173
|
+
throw new Error(
|
|
17174
|
+
`Skill "${id}" is a built-in skill and cannot be modified`
|
|
17175
|
+
);
|
|
17176
|
+
}
|
|
16824
17177
|
const skill = await this.readSkillFile(tenantId, id, context);
|
|
16825
17178
|
if (!skill) {
|
|
16826
17179
|
return null;
|
|
@@ -16863,6 +17216,11 @@ ${body}` : `${frontmatter}
|
|
|
16863
17216
|
* Delete a skill by ID
|
|
16864
17217
|
*/
|
|
16865
17218
|
async deleteSkill(tenantId, id, context) {
|
|
17219
|
+
if (isBuiltInSkill(id)) {
|
|
17220
|
+
throw new Error(
|
|
17221
|
+
`Skill "${id}" is a built-in skill and cannot be deleted`
|
|
17222
|
+
);
|
|
17223
|
+
}
|
|
16866
17224
|
try {
|
|
16867
17225
|
const sandbox = await this.getSandbox(tenantId, context);
|
|
16868
17226
|
const dirPath = this.getSkillDirectoryPath(tenantId, id);
|
|
@@ -16882,6 +17240,7 @@ ${body}` : `${frontmatter}
|
|
|
16882
17240
|
* Check if skill exists
|
|
16883
17241
|
*/
|
|
16884
17242
|
async hasSkill(tenantId, id, context) {
|
|
17243
|
+
if (isBuiltInSkill(id)) return true;
|
|
16885
17244
|
const skill = await this.getSkillById(tenantId, id, context);
|
|
16886
17245
|
return skill !== null;
|
|
16887
17246
|
}
|
|
@@ -19496,6 +19855,7 @@ function clearEncryptionKeyCache() {
|
|
|
19496
19855
|
AgentLatticeManager,
|
|
19497
19856
|
AgentManager,
|
|
19498
19857
|
AgentType,
|
|
19858
|
+
BUILTIN_SKILLS,
|
|
19499
19859
|
ChunkBuffer,
|
|
19500
19860
|
ChunkBufferLatticeManager,
|
|
19501
19861
|
CompositeBackend,
|
|
@@ -19606,7 +19966,11 @@ function clearEncryptionKeyCache() {
|
|
|
19606
19966
|
getAgentClient,
|
|
19607
19967
|
getAgentConfig,
|
|
19608
19968
|
getAllAgentConfigs,
|
|
19969
|
+
getAllBuiltInSkillMetas,
|
|
19609
19970
|
getAllToolDefinitions,
|
|
19971
|
+
getBuiltInSkillContent,
|
|
19972
|
+
getBuiltInSkillMeta,
|
|
19973
|
+
getBuiltInSkillNames,
|
|
19610
19974
|
getCheckpointSaver,
|
|
19611
19975
|
getChunkBuffer,
|
|
19612
19976
|
getEmbeddingsClient,
|
|
@@ -19628,6 +19992,7 @@ function clearEncryptionKeyCache() {
|
|
|
19628
19992
|
grepMatchesFromFiles,
|
|
19629
19993
|
grepSearchFiles,
|
|
19630
19994
|
hasChunkBuffer,
|
|
19995
|
+
isBuiltInSkill,
|
|
19631
19996
|
isUsingDefaultKey,
|
|
19632
19997
|
isValidCronExpression,
|
|
19633
19998
|
isValidSandboxName,
|