mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-31 08:46:58 +02:00
refactor(instance-ai): decouple tracing util tool type
This commit is contained in:
parent
256606df94
commit
31fc52d1be
|
|
@ -1,5 +1,3 @@
|
|||
import type { ToolsInput } from '@mastra/core/agent';
|
||||
|
||||
import {
|
||||
createDetachedSubAgentTraceContext,
|
||||
mergeCurrentTraceMetadata,
|
||||
|
|
@ -11,6 +9,8 @@ import type {
|
|||
OrchestrationContext,
|
||||
} from '../../types';
|
||||
|
||||
type ToolRegistry = OrchestrationContext['domainTools'];
|
||||
|
||||
interface StartSubAgentTraceOptions {
|
||||
agentId: string;
|
||||
role: string;
|
||||
|
|
@ -100,9 +100,9 @@ export async function createDetachedSubAgentTracing(
|
|||
|
||||
export function traceSubAgentTools(
|
||||
context: OrchestrationContext,
|
||||
tools: ToolsInput,
|
||||
tools: ToolRegistry,
|
||||
role: string,
|
||||
): ToolsInput {
|
||||
): ToolRegistry {
|
||||
return (
|
||||
context.tracing?.wrapTools(tools, {
|
||||
agentRole: role,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user