n8n
Version:
n8n Workflow Automation Tool
23 lines (22 loc) • 1.1 kB
TypeScript
import { type ToolDescriptor } from '@n8n/agents';
import { type AgentJsonConfig } from '@n8n/api-types';
import { Logger } from '@n8n/backend-common';
import { AgentRuntimeCacheService } from './agent-runtime-cache.service';
import type { Agent } from './entities/agent.entity';
import { AgentRepository } from './repositories/agent.repository';
type AgentToolEntries = Agent['tools'];
export declare class AgentCustomToolsService {
private readonly logger;
private readonly agentRepository;
private readonly runtimeCacheService;
constructor(logger: Logger, agentRepository: AgentRepository, runtimeCacheService: AgentRuntimeCacheService);
buildCustomTool(agentId: string, projectId: string, code: string, descriptor: ToolDescriptor): Promise<{
ok: boolean;
id: string;
descriptor: ToolDescriptor;
}>;
deleteCustomTool(agentId: string, projectId: string, toolId: string): Promise<void>;
private getMissingCustomToolIds;
snapshotConfiguredTools(config: AgentJsonConfig | null, tools: AgentToolEntries): AgentToolEntries | null;
}
export {};