@mastra/core
Version:
13 lines • 736 B
TypeScript
import type { MastraDBMessage, MastraMessagePart, MessageSource } from '../state/types.js';
export declare function stampPart<T extends MastraMessagePart>(part: T): T;
export declare function stampMessageParts<T extends MastraDBMessage>(message: T, source: MessageSource): T;
type ToolInvocationPart = Extract<MastraMessagePart, {
type: 'tool-invocation';
}>;
/**
* Stamps `updatedAt` on a tool part whose invocation changed. A merge that
* repeats the same state keeps its stamp, so replay dedupe doesn't drop newer parts.
*/
export declare function stampToolPartUpdate(part: ToolInvocationPart, before: ToolInvocationPart['toolInvocation'], incomingUpdatedAt?: number): void;
export {};
//# sourceMappingURL=stamp-part.d.ts.map