import { T as ToolCaller, G as GuardOptions } from '../_shared-CA1scTRq.cjs'; export { O as OnDeny, d as denialMessage, g as guardExecute } from '../_shared-CA1scTRq.cjs'; import '../types-C6RfE7pX.cjs'; /** * AxioRank adapter for Mastra (`@mastra/core`). * * @example * ```ts * import { AxioRank } from "@axiorank/sdk"; * import { guardTool } from "@axiorank/sdk/mastra"; * * const axio = new AxioRank({ apiKey: process.env.AXIORANK_KEY! }); * const deploy = guardTool(deployTool, axio, { onDeny: "return" }); * // ...then hand `deploy` to your Mastra agent as usual. * ``` * * Mastra calls a tool's `execute(inputData, context)` with the validated * arguments as `inputData`, so the adapter scores `inputData` before running the * original. The tool's `id` is the name sent to AxioRank. */ /** A Mastra tool. Only `execute` is wrapped; typed loosely so any tool fits. */ interface MastraToolLike { id: string; execute?: (inputData: any, ...rest: any[]) => unknown; } /** Wrap a Mastra tool so AxioRank scores its arguments before it runs. */ declare function guardTool(t: T, caller: ToolCaller, opts?: GuardOptions): T; /** Wrap every tool in a Mastra tools record (keyed by tool name). */ declare function guardTools>(tools: T, caller: ToolCaller, opts?: GuardOptions): T; export { GuardOptions, ToolCaller, guardTool, guardTools };