refactor(instance-ai): decouple tracing util tool type

This commit is contained in:
Oleg Ivaniv 2026-05-05 11:03:39 +02:00
parent 256606df94
commit 31fc52d1be
No known key found for this signature in database

View File

@ -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,