UNPKG

n8n

Version:

n8n Workflow Automation Tool

28 lines (27 loc) 1.94 kB
import { type AgentJsonConfig, type AgentSkill, type AgentSkillMutationResponse } from '@n8n/api-types'; import { Logger } from '@n8n/backend-common'; import { AgentModificationTelemetryService, type AgentMutationTelemetryContext } from './agent-modification-telemetry.service'; import { Agent } from './entities/agent.entity'; import { AgentRepository } from './repositories/agent.repository'; export declare class AgentSkillsService { private readonly logger; private readonly agentRepository; private readonly modificationTelemetry; constructor(logger: Logger, agentRepository: AgentRepository, modificationTelemetry: AgentModificationTelemetryService); 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, context: AgentMutationTelemetryContext): Promise<AgentSkillMutationResponse>; createSkills(agentId: string, projectId: string, skills: AgentSkill[], context: AgentMutationTelemetryContext): Promise<AgentSkillMutationResponse[]>; createAndAttachSkill(agentId: string, projectId: string, skill: AgentSkill, context: AgentMutationTelemetryContext): Promise<AgentSkillMutationResponse>; private createSkillsBatch; updateSkill(agentId: string, projectId: string, skillId: string, updates: Partial<AgentSkill>, context: AgentMutationTelemetryContext): Promise<AgentSkillMutationResponse>; deleteSkill(agentId: string, projectId: string, skillId: string, context: AgentMutationTelemetryContext): Promise<void>; removeUnreferencedSkills(entity: Agent, config: AgentJsonConfig): void; private validateSkill; private addSkill; private assertSkillNameIsUnique; private normalizeSkillName; private assertBatchSkillNamesAreUnique; private attachSkillRef; private clearRuntimes; }