/** * Run a registered tool by name. Looks up the function handle from the * registry, invokes it with the caller-supplied args, and writes one * audit row per call. * * The component intentionally does **not** authorize. Authorization * lives entirely host-side in `gateway.handleMcpRequest({ authorize })`, * because Convex does not propagate `ctx.auth` into component code (see * the Convex authoring docs). The host calls the host-side authorize * function before delegating to this action; by the time the call * arrives here, the request is already approved. * * `auditIdentitySubject` is the only piece of identity the host * forwards: a string subject for audit attribution, or null for * anonymous calls. Nothing about the policy decision crosses the * component boundary. */ export declare const runTool: import("convex/server").RegisteredAction<"public", { identity?: { claims?: any; subject: string; } | null | undefined; name: string; args: any; auditIdentitySubject: string | null; }, Promise<{ ok: false; error: { code: number; message: string; }; deliberate?: undefined; data?: undefined; } | { ok: false; error: { code: number; message: string; }; deliberate: boolean; data?: undefined; } | { ok: true; data: unknown; error?: undefined; deliberate?: undefined; }>>; /** * Record a deny/error decision the host's authorizer made before * delegating. Hosts call this when their authorize callback returns * `allowed: false` so the audit log captures the rejection (not just * the allowed dispatches). * * Mutation (not action) because the handler only reads the registry * and writes one audit row, no external IO, no non-transactional * work. Hosts invoke via `ctx.runMutation`, one round-trip instead * of the previous action-wrapping-mutation pattern. */ export declare const recordAuthDenial: import("convex/server").RegisteredMutation<"public", { name: string; outcome: "denied" | "error"; args: any; durationMs: number; errorCode: number; errorMessage: string; auditIdentitySubject: string | null; }, Promise>; export { parseAuthorizerDecision } from "../shared.js"; //# sourceMappingURL=dispatch.d.ts.map