/**
 * Advanced LangChain features and integrations
 * Demonstrates cutting-edge capabilities for manuscript analysis
 */
import { RunnableSequence } from '@langchain/core/runnables';
import { BufferWindowMemory } from '@langchain/classic/memory';
import { z } from 'zod';
import type { ScrivenerDocument } from '../../types/index.js';
interface Entity {
    name: string;
    type: 'character' | 'location' | 'organization' | 'event' | 'object';
    context: string;
    mentions: number;
}
interface Relationship {
    entity1: string;
    entity2: string;
    relationship: string;
    strength: number;
    type: 'character' | 'location' | 'object' | 'event';
}
interface WritingStyleAnalysis {
    voice: {
        tone: string;
        perspective: string;
        consistency: number;
    };
    structure: {
        sentenceVariety: number;
        averageLength: number;
        complexity: string;
    };
    vocabulary: {
        level: string;
        variety: number;
        distinctiveness: number;
    };
    pacing: {
        rhythm: string;
        flow: number;
        tension: number;
    };
    literaryDevices: string[];
    strengths: string[];
    weaknesses: string[];
    overallScore: number;
}
declare const CharacterAnalysisSchema: z.ZodObject<{
    name: z.ZodString;
    role: z.ZodEnum<{
        minor: "minor";
        protagonist: "protagonist";
        antagonist: "antagonist";
        supporting: "supporting";
    }>;
    arc: z.ZodString;
    traits: z.ZodArray<z.ZodString>;
    relationships: z.ZodArray<z.ZodObject<{
        character: z.ZodString;
        relationship: z.ZodString;
        dynamic: z.ZodEnum<{
            improving: "improving";
            static: "static";
            evolving: "evolving";
            deteriorating: "deteriorating";
        }>;
    }, z.core.$strip>>;
    motivations: z.ZodArray<z.ZodString>;
    conflicts: z.ZodArray<z.ZodString>;
    symbolism: z.ZodOptional<z.ZodString>;
    development: z.ZodObject<{
        beginning: z.ZodString;
        middle: z.ZodString;
        end: z.ZodString;
    }, z.core.$strip>;
}, z.core.$strip>;
declare const PlotStructureSchema: z.ZodObject<{
    acts: z.ZodArray<z.ZodObject<{
        number: z.ZodNumber;
        title: z.ZodString;
        summary: z.ZodString;
        keyEvents: z.ZodArray<z.ZodString>;
        turningPoint: z.ZodOptional<z.ZodString>;
        tension: z.ZodNumber;
    }, z.core.$strip>>;
    incitingIncident: z.ZodString;
    climax: z.ZodString;
    resolution: z.ZodString;
    subplots: z.ZodArray<z.ZodObject<{
        title: z.ZodString;
        summary: z.ZodString;
        resolution: z.ZodOptional<z.ZodString>;
        connection: z.ZodString;
    }, z.core.$strip>>;
    themes: z.ZodArray<z.ZodString>;
    pacing: z.ZodObject<{
        overall: z.ZodEnum<{
            slow: "slow";
            fast: "fast";
            balanced: "balanced";
            "too slow": "too slow";
            "too fast": "too fast";
        }>;
        recommendations: z.ZodArray<z.ZodString>;
    }, z.core.$strip>;
}, z.core.$strip>;
declare const WritingStyleSchema: z.ZodObject<{
    voice: z.ZodObject<{
        perspective: z.ZodEnum<{
            "first-person": "first-person";
            "second-person": "second-person";
            "third-person-limited": "third-person-limited";
            "third-person-omniscient": "third-person-omniscient";
        }>;
        tone: z.ZodArray<z.ZodString>;
        consistency: z.ZodNumber;
    }, z.core.$strip>;
    prose: z.ZodObject<{
        sentenceVariety: z.ZodEnum<{
            excellent: "excellent";
            good: "good";
            fair: "fair";
            poor: "poor";
        }>;
        averageSentenceLength: z.ZodNumber;
        vocabularyLevel: z.ZodEnum<{
            academic: "academic";
            moderate: "moderate";
            simple: "simple";
            advanced: "advanced";
        }>;
        descriptiveness: z.ZodEnum<{
            balanced: "balanced";
            rich: "rich";
            excessive: "excessive";
            sparse: "sparse";
        }>;
    }, z.core.$strip>;
    dialogue: z.ZodObject<{
        naturalness: z.ZodNumber;
        characterDistinction: z.ZodNumber;
        tagVariety: z.ZodEnum<{
            excellent: "excellent";
            good: "good";
            repetitive: "repetitive";
            limited: "limited";
        }>;
        balanceWithNarration: z.ZodEnum<{
            balanced: "balanced";
            "too little": "too little";
            "too much": "too much";
        }>;
    }, z.core.$strip>;
    techniques: z.ZodArray<z.ZodString>;
    strengths: z.ZodArray<z.ZodString>;
    weaknesses: z.ZodArray<z.ZodString>;
    comparisons: z.ZodArray<z.ZodString>;
}, z.core.$strip>;
export declare class AdvancedLangChainFeatures {
    private llm;
    private embeddings;
    private vectorStore;
    private logger;
    private characterParser;
    private plotParser;
    private styleParser;
    constructor(apiKey?: string);
    /**
     * Advanced character analysis with structured output
     */
    analyzeCharacterStructured(characterName: string, documents: ScrivenerDocument[]): Promise<z.infer<typeof CharacterAnalysisSchema>>;
    /**
     * Advanced plot structure analysis
     */
    analyzePlotStructure(documents: ScrivenerDocument[]): Promise<z.infer<typeof PlotStructureSchema>>;
    /**
     * Advanced writing style analysis
     */
    analyzeWritingStyleStructured(documents: ScrivenerDocument[]): Promise<z.infer<typeof WritingStyleSchema>>;
    /**
     * Create a custom writing coach chain
     */
    createWritingCoachChain(focusArea: 'dialogue' | 'description' | 'pacing' | 'character'): Promise<{
        chain: RunnableSequence<{
            text: string;
        }, string>;
        memory: BufferWindowMemory;
        invoke: (text: string) => Promise<string>;
    }>;
    /**
     * Generate alternative versions of a passage
     */
    generateAlternatives(passage: string, styles: Array<'literary' | 'commercial' | 'minimalist' | 'ornate' | 'noir' | 'comedic'>): Promise<Record<string, string>>;
    /**
     * Advanced semantic similarity search with context
     */
    findSimilarScenes(sceneDescription: string, documents: ScrivenerDocument[], options?: {
        minSimilarity?: number;
        maxResults?: number;
        includeContext?: boolean;
    }): Promise<Array<{
        document: ScrivenerDocument;
        similarity: number;
        excerpt: string;
        analysis: string;
    }>>;
    /**
     * Create a developmental editor AI
     */
    createDevelopmentalEditor(): Promise<{
        analyze: (section: string, question: string) => Promise<string>;
        compareVersions: (original: string, revised: string) => Promise<string>;
    }>;
    /**
     * Generate a story bible from manuscript
     */
    generateStoryBible(documents: ScrivenerDocument[]): Promise<{
        characters: Record<string, unknown>;
        worldbuilding: Record<string, unknown>;
        timeline: Array<{
            event: string;
            chapter: string;
            significance: string;
        }>;
        themes: string[];
        symbols: Array<{
            symbol: string;
            meaning: string;
            appearances: string[];
        }>;
        styleGuide: Record<string, string>;
    }>;
    private extractCharacters;
    private extractWorldbuilding;
    private extractTimeline;
    private extractThemes;
    private extractSymbols;
    private extractStyleGuide;
    /**
     * Create a beta reader simulation
     */
    simulateBetaReader(document: ScrivenerDocument, readerProfile: {
        genre_preference: string;
        reading_level: 'casual' | 'avid' | 'professional';
        focus: 'plot' | 'character' | 'prose' | 'general';
    }): Promise<{
        overall_impression: string;
        strengths: string[];
        concerns: string[];
        questions: string[];
        emotional_response: string;
        would_continue_reading: boolean;
        rating: number;
        specific_feedback: Record<string, string>;
    }>;
    /**
     * Extract entities from text
     */
    extractEntities(text: string): Promise<Entity[]>;
    /**
     * Analyze relationships between entities
     */
    analyzeRelationships(entities: Entity[]): Promise<Relationship[]>;
    /**
     * Analyze writing style
     */
    analyzeWritingStyle(text: string): Promise<WritingStyleAnalysis>;
}
export default AdvancedLangChainFeatures;
//# sourceMappingURL=langchain-advanced-features.d.ts.map