import { z } from 'zod'; /** * Shared schema for a single block option with its current value. */ export declare const blockOptionSchema: z.ZodObject<{ type: z.ZodString; label: z.ZodString; description: z.ZodOptional; options: z.ZodOptional>; min: z.ZodOptional>; max: z.ZodOptional>; step: z.ZodOptional; currentValue: z.ZodUnion]>; }, z.core.$strip>; /** * Shared schema for a record of block options keyed by property name. */ export declare const blockOptionsMapSchema: z.ZodRecord; options: z.ZodOptional>; min: z.ZodOptional>; max: z.ZodOptional>; step: z.ZodOptional; currentValue: z.ZodUnion]>; }, z.core.$strip>>; export type BlockOptionsMap = z.infer; /** * Schema for a parent entity (the container of a block). * A parent is an entity + field combination where blocks can be placed. * Used consistently across tools for specifying block locations. */ export declare const parentSchema: z.ZodObject<{ type: z.ZodString; uuid: z.ZodString; field: z.ZodString; }, z.core.$strip>; /** * Schema for mutation tool results. * Mutation tools return either a MutationAction (handled by framework) or an error. */ export declare const mutationResultSchema: z.ZodUnion; label: z.ZodString; }, z.core.$strip>, z.ZodObject<{ error: z.ZodString; }, z.core.$strip>]>; /** * A parameter that accepts an array of strings OR a single string (normalized * to a one-element array). LLMs frequently send a bare string for array params * and otherwise fail validation on the first call. The generated JSON Schema * still advertises an array, so the model is guided toward the array form while * a single string is accepted as a fallback. */ export declare function stringArrayParam(description: string): z.ZodPipe, z.ZodArray>; /** * Wraps an object params schema to tolerate a singular key when the schema * actually expects its plural form (e.g. `uuid` → `uuids`). LLMs — especially * the smaller models — frequently pick the singular form when a tool * description mentions both ("one or more UUIDs"). Without this, the call * fails validation and the model often retries with the same wrong key. * * The generated JSON Schema is unchanged (the wrapping happens via * `z.preprocess`), so the model is still guided to the plural form; the * singular form is silently accepted as a fallback. */ export declare function tolerantSingularKeys(schema: T, aliases: Record): z.ZodPipe, T>; /** * Shared schema for option values (used by add_blocks and set_block_options). */ export declare const optionValueSchema: z.ZodUnion]>; /** * Shared schema for the `position` parameter used by mutation tools that insert blocks. * * Values: * - `"start"` — insert at the beginning of the field * - `"end"` (default when omitted) — append at the end of the field * - `"after:"` — insert after the block with the given UUID * - `"before:"` — insert before the block with the given UUID */ export declare const positionSchema: z.ZodDefault>; export declare const fieldDiffResultSchema: z.ZodObject<{ acceptedCount: z.ZodNumber; rejectedByUser: z.ZodRecord; reasonForRejection: z.ZodString; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; label: z.ZodString; agentMessage: z.ZodOptional; historyIndex: z.ZodOptional; }, z.core.$strip>; /** * Schema for a single entry in a mutation's `newParagraphs` payload. Recursive * so nested children appear under their parent's `children` keyed by paragraph * field name — mirroring the input shape of `add_paragraphs`. */ type NewParagraphEntry = { uuid: string; bundle: string; paragraphFields?: string[]; children?: Record; }; /** * Schema for the success result sent back to the AI after mutation is applied. */ export declare const mutationSuccessSchema: z.ZodUnion; newParagraphs: z.ZodOptional>>>; historyIndex: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ success: z.ZodLiteral; rejected: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ error: z.ZodString; }, z.core.$strip>]>; export {};