import type { z } from "zod"; /** * Validate an `action`-discriminated tool input. * * The STRAP pattern folds several CRUD verbs behind one tool with an * `action` parameter, so the whole surface stays advertised and immediately * callable inside the ~64KB Windows stdio pipe budget. The cost is that the * advertised JSON Schema has to be flat and all-optional — JSON Schema cannot * express "field X is required only when action=Y" — so per-action * requiredness is enforced here, at execute time. * * `action` is checked explicitly BEFORE the schema, independently of Zod-4 * discriminator internals, so a bad verb gets a clean "must be one of" instead * of a union error naming every branch. Field problems then come back as a * SENTENCE naming the offending fields rather than a raw issue dump, because * the reader is a model that has to self-correct in one turn. * * One implementation, shared by every STRAP tool: a second copy would drift in * exactly the part that matters, which is the wording a model reads to recover. */ export declare function parseAction(schema: S, input: unknown, actions: readonly string[]): { ok: true; data: z.infer; } | { ok: false; error: string; }; //# sourceMappingURL=parse-action.d.ts.map