<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.vaadin</groupId>
        <artifactId>draiv-parent</artifactId>
        <version>0.0.1-alpha1-SNAPSHOT</version>
    </parent>

    <!--
        Draiv AI integration: the Spring AI / OpenAI adapters layered over the
        draiv core. Holds the shared UI-agent tool core, MCP tool plumbing,
        realtime voice, and the script "assist" bridge — everything that pulls
        in Spring AI and the OpenAI HTTP client, kept out of the core so
        pure-automation consumers don't pay for the AI stack. All code lives
        under com.vaadin.draiv.ai.*. See docs/library-extraction-plan.md.
    -->
    <artifactId>draiv-ai</artifactId>
    <packaging>jar</packaging>

    <dependencies>
        <!-- The reusable core (driver, script model, session, annotations). -->
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>draiv</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- SDK-agnostic LLM tool catalog (spec #4). -->
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>flow-automation-ai</artifactId>
            <version>0.0.1-alpha1-SNAPSHOT</version>
        </dependency>
        <!--
            Spring AI tool/MCP server over Spring MVC; also brings spring-web
            (RestClient) used by the realtime OpenAI client.
        -->
        <dependency>
            <groupId>org.springframework.ai</groupId>
            <artifactId>spring-ai-starter-mcp-server-webmvc</artifactId>
        </dependency>
        <!--
            Spring AI OpenAI chat model (ChatModel / ChatClient autoconfiguration).
            The text presenter drives it directly instead of the hand-rolled
            Responses API client, so swapping in another provider (Mistral,
            Anthropic) later is a dependency + property change, not new transport
            code.
        -->
        <dependency>
            <groupId>org.springframework.ai</groupId>
            <artifactId>spring-ai-starter-model-openai</artifactId>
        </dependency>
        <!--
            Mistral chat model, co-existing with OpenAI. Both register a
            ChatModel bean; PresenterChatModelConfig selects which one the text
            presenter uses via the presenter.chat.provider property, so you can
            run the same tool-driven presenter against either provider's key.
        -->
        <dependency>
            <groupId>org.springframework.ai</groupId>
            <artifactId>spring-ai-starter-model-mistral-ai</artifactId>
        </dependency>
        <!--
            Anthropic (Claude) chat model, third provider option for the text
            presenter (presenter.chat.provider=anthropic). Same co-existence
            pattern as Mistral: PresenterChatModelConfig picks the bean.
        -->
        <dependency>
            <groupId>org.springframework.ai</groupId>
            <artifactId>spring-ai-starter-model-anthropic</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!--
            Reuse the core's test fixtures (browserless bootstrap + @Route
            fixture views) for the cross-module driver-tool contract test.
        -->
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>draiv</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>browserless-test-spring</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
