n8n
Version:
n8n Workflow Automation Tool
34 lines (33 loc) • 1.59 kB
TypeScript
import { type AgentJsonConfig } from '@n8n/api-types';
import { Logger } from '@n8n/backend-common';
import { WorkflowRepository } from '@n8n/db';
import { CredentialsService } from '../../credentials/credentials.service';
import { AgentRuntimeCacheService } from './agent-runtime-cache.service';
import { AgentSkillsService } from './agent-skills.service';
import { AgentTaskRepository } from './repositories/agent-task.repository';
import { AgentRepository } from './repositories/agent.repository';
export declare class AgentConfigService {
private readonly logger;
private readonly agentRepository;
private readonly agentTaskRepository;
private readonly agentSkillsService;
private readonly runtimeCacheService;
private readonly credentialsService;
private readonly workflowRepository;
constructor(logger: Logger, agentRepository: AgentRepository, agentTaskRepository: AgentTaskRepository, agentSkillsService: AgentSkillsService, runtimeCacheService: AgentRuntimeCacheService, credentialsService: CredentialsService, workflowRepository: WorkflowRepository);
getConfig(agentId: string, projectId: string): Promise<AgentJsonConfig>;
validateConfig(raw: unknown): Promise<{
valid: true;
config: AgentJsonConfig;
} | {
valid: false;
error: string;
}>;
updateConfig(agentId: string, projectId: string, config: unknown): Promise<{
config: AgentJsonConfig;
updatedAt: string;
versionId: string | null;
}>;
private removeMissingConfigRefs;
private validateSubAgentRefs;
}