UNPKG

n8n

Version:

n8n Workflow Automation Tool

26 lines (25 loc) 1.51 kB
import { type AgentJsonConfig, type AgentSkill, type AgentSkillMutationResponse } from '@n8n/api-types'; import { Logger } from '@n8n/backend-common'; import { Agent } from './entities/agent.entity'; import { AgentRepository } from './repositories/agent.repository'; export declare class AgentSkillsService { private readonly logger; private readonly agentRepository; constructor(logger: Logger, agentRepository: AgentRepository); listSkills(agentId: string, projectId: string): Promise<Record<string, AgentSkill>>; getSkill(agentId: string, projectId: string, skillId: string): Promise<AgentSkill>; createSkill(agentId: string, projectId: string, skill: AgentSkill): Promise<AgentSkillMutationResponse>; createSkills(agentId: string, projectId: string, skills: AgentSkill[]): Promise<AgentSkillMutationResponse[]>; createAndAttachSkill(agentId: string, projectId: string, skill: AgentSkill): Promise<AgentSkillMutationResponse>; private createSkillsBatch; updateSkill(agentId: string, projectId: string, skillId: string, updates: Partial<AgentSkill>): Promise<AgentSkillMutationResponse>; deleteSkill(agentId: string, projectId: string, skillId: string): Promise<void>; removeUnreferencedSkills(entity: Agent, config: AgentJsonConfig): void; private validateSkill; private addSkill; private assertSkillNameIsUnique; private normalizeSkillName; private assertBatchSkillNamesAreUnique; private attachSkillRef; private clearRuntimes; }