UNPKG

@mastra/core

Version:
22 lines • 1.16 kB
import type { ScoringHookInput } from '../evals/index.js'; import type { MastraScorerEntry } from '../evals/base.js'; import type { Mastra } from '../mastra/index.js'; /** * Associate a scorer hook with its emitting Mastra through an opaque token. * This keeps the public payload serializable without making a retained hook * payload retain the Mastra instance itself. */ export declare function setScorerHookOwner(data: ScoringHookInput, owner?: Mastra): void; /** * Hooks dispatched through the public executeHook API have no owner and retain * their existing broadcast behavior. */ export declare function isScorerHookForMastra(data: ScoringHookInput, mastra: Mastra): boolean; /** * Attach the scorer entry a run was configured with to its hook payload. * A scorer supplied at call time or through `defaultOptions.scorers` is * registered nowhere, so the hook cannot find it again by id (#27579). */ export declare function setScorerHookEntry(data: ScoringHookInput, entry: MastraScorerEntry): void; export declare function getScorerHookEntry(data: ScoringHookInput): MastraScorerEntry | undefined; //# sourceMappingURL=scorer-owner.d.ts.map