/** * Vercel AI SDK Adapter * * Converts tool definitions to Vercel AI SDK format with execute functions. * * @module ai/adapters/vercel */ import type { ManifestBuilder } from '../types'; import { z } from 'zod'; /** * Field schema for Zod validation */ declare const fieldZodSchema: z.ZodObject<{ type: z.ZodEnum<["text", "number", "boolean", "date"]>; required: z.ZodOptional; unique: z.ZodOptional; email: z.ZodOptional; url: z.ZodOptional; min: z.ZodOptional; max: z.ZodOptional; oneOf: z.ZodOptional>; integer: z.ZodOptional; positive: z.ZodOptional; default: z.ZodOptional; label: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "number" | "boolean" | "text" | "date"; email?: boolean | undefined; url?: boolean | undefined; oneOf?: string[] | undefined; min?: number | undefined; max?: number | undefined; integer?: boolean | undefined; positive?: boolean | undefined; required?: boolean | undefined; unique?: boolean | undefined; default?: unknown; label?: string | undefined; }, { type: "number" | "boolean" | "text" | "date"; email?: boolean | undefined; url?: boolean | undefined; oneOf?: string[] | undefined; min?: number | undefined; max?: number | undefined; integer?: boolean | undefined; positive?: boolean | undefined; required?: boolean | undefined; unique?: boolean | undefined; default?: unknown; label?: string | undefined; }>; /** * Relation schema for Zod validation */ declare const relationZodSchema: z.ZodObject<{ type: z.ZodEnum<["hasOne", "hasMany", "belongsToMany"]>; entity: z.ZodString; }, "strip", z.ZodTypeAny, { type: "hasOne" | "hasMany" | "belongsToMany"; entity: string; }, { type: "hasOne" | "hasMany" | "belongsToMany"; entity: string; }>; /** * Create Vercel AI SDK tools bound to a ManifestBuilder * * @example * ```typescript * import { createManifestBuilder } from 'archetype-engine/ai' * import { getVercelAITools } from 'archetype-engine/ai/adapters/vercel' * import { generateText } from 'ai' * import { openai } from '@ai-sdk/openai' * * const builder = createManifestBuilder() * const tools = getVercelAITools(builder) * * const result = await generateText({ * model: openai('gpt-4o'), * tools, * prompt: 'Create a blog with users and posts' * }) * ``` */ export declare function getVercelAITools(builder: ManifestBuilder): { add_entity: { description: string; parameters: z.ZodObject<{ name: z.ZodString; fields: z.ZodRecord; required: z.ZodOptional; unique: z.ZodOptional; email: z.ZodOptional; url: z.ZodOptional; min: z.ZodOptional; max: z.ZodOptional; oneOf: z.ZodOptional>; integer: z.ZodOptional; positive: z.ZodOptional; default: z.ZodOptional; label: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "number" | "boolean" | "text" | "date"; email?: boolean | undefined; url?: boolean | undefined; oneOf?: string[] | undefined; min?: number | undefined; max?: number | undefined; integer?: boolean | undefined; positive?: boolean | undefined; required?: boolean | undefined; unique?: boolean | undefined; default?: unknown; label?: string | undefined; }, { type: "number" | "boolean" | "text" | "date"; email?: boolean | undefined; url?: boolean | undefined; oneOf?: string[] | undefined; min?: number | undefined; max?: number | undefined; integer?: boolean | undefined; positive?: boolean | undefined; required?: boolean | undefined; unique?: boolean | undefined; default?: unknown; label?: string | undefined; }>>; relations: z.ZodOptional; entity: z.ZodString; }, "strip", z.ZodTypeAny, { type: "hasOne" | "hasMany" | "belongsToMany"; entity: string; }, { type: "hasOne" | "hasMany" | "belongsToMany"; entity: string; }>>>; behaviors: z.ZodOptional; softDelete: z.ZodOptional; audit: z.ZodOptional; }, "strip", z.ZodTypeAny, { timestamps?: boolean | undefined; softDelete?: boolean | undefined; audit?: boolean | undefined; }, { timestamps?: boolean | undefined; softDelete?: boolean | undefined; audit?: boolean | undefined; }>>; protected: z.ZodOptional]>>; }, "strip", z.ZodTypeAny, { fields: Record; name: string; protected?: boolean | "write" | "all" | undefined; relations?: Record | undefined; behaviors?: { timestamps?: boolean | undefined; softDelete?: boolean | undefined; audit?: boolean | undefined; } | undefined; }, { fields: Record; name: string; protected?: boolean | "write" | "all" | undefined; relations?: Record | undefined; behaviors?: { timestamps?: boolean | undefined; softDelete?: boolean | undefined; audit?: boolean | undefined; } | undefined; }>; execute: (params: { name: string; fields: Record>; relations?: Record>; behaviors?: { timestamps?: boolean; softDelete?: boolean; audit?: boolean; }; protected?: boolean | "write" | "all"; }) => Promise; }; update_entity: { description: string; parameters: z.ZodObject<{ name: z.ZodString; fields: z.ZodOptional>; required: z.ZodOptional>; unique: z.ZodOptional>; email: z.ZodOptional>; url: z.ZodOptional>; min: z.ZodOptional>; max: z.ZodOptional>; oneOf: z.ZodOptional>>; integer: z.ZodOptional>; positive: z.ZodOptional>; default: z.ZodOptional>; label: z.ZodOptional>; }, "strip", z.ZodTypeAny, { email?: boolean | undefined; url?: boolean | undefined; oneOf?: string[] | undefined; min?: number | undefined; max?: number | undefined; integer?: boolean | undefined; positive?: boolean | undefined; type?: "number" | "boolean" | "text" | "date" | undefined; required?: boolean | undefined; unique?: boolean | undefined; default?: unknown; label?: string | undefined; }, { email?: boolean | undefined; url?: boolean | undefined; oneOf?: string[] | undefined; min?: number | undefined; max?: number | undefined; integer?: boolean | undefined; positive?: boolean | undefined; type?: "number" | "boolean" | "text" | "date" | undefined; required?: boolean | undefined; unique?: boolean | undefined; default?: unknown; label?: string | undefined; }>>>; relations: z.ZodOptional; entity: z.ZodString; }, "strip", z.ZodTypeAny, { type: "hasOne" | "hasMany" | "belongsToMany"; entity: string; }, { type: "hasOne" | "hasMany" | "belongsToMany"; entity: string; }>>>; behaviors: z.ZodOptional; softDelete: z.ZodOptional; audit: z.ZodOptional; }, "strip", z.ZodTypeAny, { timestamps?: boolean | undefined; softDelete?: boolean | undefined; audit?: boolean | undefined; }, { timestamps?: boolean | undefined; softDelete?: boolean | undefined; audit?: boolean | undefined; }>>; protected: z.ZodOptional]>>; }, "strip", z.ZodTypeAny, { name: string; fields?: Record | undefined; protected?: boolean | "write" | "all" | undefined; relations?: Record | undefined; behaviors?: { timestamps?: boolean | undefined; softDelete?: boolean | undefined; audit?: boolean | undefined; } | undefined; }, { name: string; fields?: Record | undefined; protected?: boolean | "write" | "all" | undefined; relations?: Record | undefined; behaviors?: { timestamps?: boolean | undefined; softDelete?: boolean | undefined; audit?: boolean | undefined; } | undefined; }>; execute: (params: { name: string; fields?: Record>>; relations?: Record>; behaviors?: { timestamps?: boolean; softDelete?: boolean; audit?: boolean; }; protected?: boolean | "write" | "all"; }) => Promise; }; remove_entity: { description: string; parameters: z.ZodObject<{ name: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; }, { name: string; }>; execute: (params: { name: string; }) => Promise; }; set_database: { description: string; parameters: z.ZodObject<{ type: z.ZodEnum<["sqlite", "postgres", "mysql"]>; file: z.ZodOptional; url: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "sqlite" | "postgres" | "mysql"; url?: string | undefined; file?: string | undefined; }, { type: "sqlite" | "postgres" | "mysql"; url?: string | undefined; file?: string | undefined; }>; execute: (params: { type: "sqlite" | "postgres" | "mysql"; file?: string; url?: string; }) => Promise; }; set_auth: { description: string; parameters: z.ZodObject<{ enabled: z.ZodBoolean; providers: z.ZodOptional, "many">>; sessionStrategy: z.ZodOptional>; }, "strip", z.ZodTypeAny, { enabled: boolean; providers?: ("credentials" | "google" | "github" | "discord")[] | undefined; sessionStrategy?: "database" | "jwt" | undefined; }, { enabled: boolean; providers?: ("credentials" | "google" | "github" | "discord")[] | undefined; sessionStrategy?: "database" | "jwt" | undefined; }>; execute: (params: { enabled: boolean; providers?: ("credentials" | "google" | "github" | "discord")[]; sessionStrategy?: "jwt" | "database"; }) => Promise; }; validate: { description: string; parameters: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; execute: () => Promise<{ success: boolean; message: string; errors: import("../..").ValidationError[]; warnings: import("../..").ValidationError[]; }>; }; generate: { description: string; parameters: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; execute: () => Promise<{ success: boolean; message: string; files: string[]; errors: string[] | undefined; }>; }; }; /** * Convenience type for the tools object */ export type VercelAITools = ReturnType; export {}; //# sourceMappingURL=vercel.d.ts.map