/** * `Validated` — a brand marker for data already validated against its * action / query / event schema. * * The framework parses input at trust boundaries (HTTP `parseAndValidate`, * queue worker consume, bus inbound). The same data then flows into * `runtime.dispatch`, which historically re-parses it against * `action.schema`. That second parse is dead work — the data already * matches `z.output`. * * This brand lets a boundary stamp its output as "trust me, I already * parsed this" so the runtime can skip the redundant parse. Untrusted * call sites (a user calling `runtime.dispatch(action, rawJson)` from * application code) still hit the parse path because their input is * unbranded. * * Design choices: * - Symbol key, not a string field: cannot be accidentally serialized * over the wire. A branded object that's JSON.stringified loses the * brand — exactly what we want for cross-process boundaries. * - Non-enumerable property: `Object.assign`, spread, and JSON * serialization all drop the marker, so a re-shaped object loses * its validation claim and the runtime safely re-parses. * - Type brand is a phantom field on `T & { [VALIDATED]?: true }`, * not a wrapper — boundary code passes the same object through, just * tagged. Zero allocation for the type, one defineProperty for the tag. */ export declare const VALIDATED: unique symbol; export type Validated = T & { readonly [VALIDATED]?: true; }; /** * Tag `value` as already validated. The brand survives identity but not * structural copies — by design, so `{...validated}` or `JSON.parse` drops * the claim and forces re-parse at the next boundary. * * Returns the same object reference (for primitives, returns the * primitive unchanged — primitives can't carry brands, and the runtime * detection falls back to the parse path). */ export declare function markValidated(value: T): Validated; /** True if `value` carries the validated brand. */ export declare function isValidated(value: unknown): boolean;