@mastra/core
Version:
28 lines • 1.17 kB
TypeScript
import type { IMastraLogger } from '../../../logger/index.js';
import type { AnySpan } from '../../../observability/index.js';
/**
* Provider tool calls are stashed at call time and their PROVIDER_TOOL_CALL span is
* created when the result arrives, so the span can parent under the MODEL_STEP that
* is open at that moment — a span's parent cannot be changed after creation, and at
* call time we can't know which step (same or a later one) will deliver the result.
* Shared between the regular and durable agent loops.
*/
export type PendingProviderToolCall = {
toolName: string;
args?: unknown;
startTime: Date;
toolDescription?: string;
/** Anchor for calls whose result never arrives (run ends or stream errors). */
fallbackParentSpan: AnySpan;
};
export declare function endPendingProviderToolSpan({ toolCallId, pending, parentSpan, result, logger, }: {
toolCallId: string;
pending: Omit<PendingProviderToolCall, 'fallbackParentSpan'>;
parentSpan: AnySpan;
result?: {
output: unknown;
isError?: boolean;
};
logger?: IMastraLogger;
}): void;
//# sourceMappingURL=provider-tool-spans.d.ts.map