import { z } from 'zod'; import { AIProvider, AIResponse } from '../ai-engine'; /** * Generic utility for generating structured JSON responses * Works with any AI provider that implements the AIProvider interface */ export declare class StructuredOutputUtil { private schema; private parser; constructor(schema: z.ZodType); /** * Generate structured JSON response using the provided AI provider */ generateStructuredJSON(provider: AIProvider, prompt: string, systemPrompt?: string): Promise; /** * Get format instructions for the schema */ getFormatInstructions(): string; /** * Parse a string response into the structured format */ parseResponse(responseContent: string): Promise; /** * Validate that an object matches the schema */ validateStructure(data: any): boolean; /** * Private helper methods */ private generateWithFallback; private createSuccessResponse; } /** * Factory function to create a StructuredOutputUtil with a specific schema */ export declare function createStructuredOutputUtil(schema: z.ZodType): StructuredOutputUtil; /** * Helper function to create a browser action structured output utility */ export declare function createBrowserActionStructuredUtil(): StructuredOutputUtil;