import type { StandardJSONSchemaV1, StandardSchemaV1 } from "#compiled/@standard-schema/spec/index.js"; import { type JsonObject } from "#shared/json.js"; /** * eve-owned schema contract for tool input and output schemas: a Standard * Schema validator that can also emit JSON Schema. Zod implements both * constituent protocols without exposing Zod through runtime-owned types. */ export type ToolSchema = StandardSchemaV1 & StandardJSONSchemaV1; /** * Any value accepted at a schema boundary: a live {@link ToolSchema}, a * JSON-Schema-capable Standard Schema, or plain JSON Schema data. Plain data * is runtime-validated by {@link parseJsonObject} during conversion. */ export type ToolSchemaSource = StandardJSONSchemaV1 | Record; /** `null` and `undefined` pass through every conversion untouched. */ type SchemaResult = TSource extends null | undefined ? TSource : TResult; /** * Resolves a source into a live input {@link ToolSchema}. Live schemas pass * through unchanged; serialized JSON Schemas are rehydrated into vendored Zod * validators. Serialized schemas outside Zod's conversion subset degrade to a * validation-free schema that still advertises the source JSON Schema. `null` * and `undefined` pass through untouched. */ export declare function toInputSchema(source: T): SchemaResult; /** * Resolves a source into a live output {@link ToolSchema}. Live schemas pass * through unchanged; serialized JSON Schemas are rehydrated into vendored Zod * validators. Serialized schemas outside Zod's conversion subset degrade to a * validation-free schema that still advertises the source JSON Schema. `null` * and `undefined` pass through untouched. */ export declare function toOutputSchema(source: T): SchemaResult; /** * Serializes an input schema source into canonical JSON Schema data (no * `$schema` key) for compiled artifacts, durable state, and protocol * responses. `null` and `undefined` pass through untouched. */ export declare function serializeInputSchema(source: T): SchemaResult; /** * Serializes an output schema source into canonical JSON Schema data (no * `$schema` key) for compiled artifacts, durable state, and protocol * responses. `null` and `undefined` pass through untouched. */ export declare function serializeOutputSchema(source: T): SchemaResult; /** * Returns whether a value implements the full {@link ToolSchema} contract: * Standard Schema validation plus JSON Schema emission. */ export declare function isToolSchema(value: unknown): value is ToolSchema; /** * Permissive schema lowered onto model-visible tools whose definitions * declare no input schema. Accepts any input — an absent schema declares no * contract, so rejecting stray properties would only force needless retries. */ export declare const UNSPECIFIED_INPUT_SCHEMA: ToolSchema; export {};