n8n
Version:
n8n Workflow Automation Tool
31 lines (30 loc) • 1.02 kB
TypeScript
import type { BuiltTelemetry } from '@n8n/agents';
import { AgentsConfig } from '@n8n/config';
interface AgentRunTracingMetadataBase {
agentId: string;
projectId: string;
threadId: string;
userId?: string;
modelId?: string;
}
interface WorkflowAgentRunTracingMetadata extends AgentRunTracingMetadataBase {
source: 'workflow';
executionId?: string;
workflowId?: string;
nodeId?: string;
}
interface NonWorkflowAgentRunTracingMetadata extends AgentRunTracingMetadataBase {
source: string;
}
export type AgentRunTracingMetadata = WorkflowAgentRunTracingMetadata | NonWorkflowAgentRunTracingMetadata;
export declare class AgentRunTracingService {
private readonly agentsConfig;
constructor(agentsConfig: AgentsConfig);
get enabled(): boolean;
build(metadata: AgentRunTracingMetadata): Promise<BuiltTelemetry | undefined>;
}
export declare function modelIdFromSnapshot(model: {
provider: string | null;
name: string | null;
}): string | undefined;
export {};