import { z } from 'zod'; /** * FreightUtils response envelope v1.1 — output-schema side. Accepts version '1' too * (a transitional response can carry either). * * Mirrors the hosted contract (freightutils.com schemas/response-envelope.v1.1.json * and the /api/mcp ENVELOPE_OUTPUT_SHAPE) field-for-field. The envelope itself is * ALWAYS built by the REST API (`?envelope=1`) — this package never constructs * envelopes for REST-backed tools, so the contract cannot fork. The only locally * built envelope is get_subscribe_link's static one (no REST endpoint), which * replicates the hosted /api/mcp envelope for that tool verbatim. * * Omit-when-empty rules (enforced upstream by the API's buildEnvelope): * warnings / blocking_errors omitted when empty; normalized_input / validity * omitted when absent; confidence.score present ONLY for basis=match_quality; * ok=false exactly when blocking_errors are present. */ export declare function envelopeShape(result: z.ZodTypeAny): z.ZodRawShape; /** * Envelope `result` payloads are documented per tool but every field is * tolerant (nullish) and unknown keys pass through: error envelopes carry * `result: {}`, several endpoints emit explicit nulls, and the upstream API * may add fields between package releases. This helper keeps that rule in * one place — the declared fields document the shape without ever making a * live response fail output-schema validation. */ export declare function resultShape(fields: z.ZodRawShape): z.ZodTypeAny; /** Same tolerance rule for nested record objects (array items, sub-objects). */ export declare function loose(fields: z.ZodRawShape): z.ZodTypeAny;