"""
Agent module for deterministic two-phase execution using Claude Agent SDK.

This module provides:
- TwoPhaseAgent: Base class for agents with plan → execute phases
- AgentRunner: Execution engine for CLI, skill, and server invocation
- IteratePRAgent: PR iteration agent (deterministic /iterate-pr)
- AgentObserver: Protocol for structured logging and observability
- RetryPolicy: Configurable retry behavior with exponential backoff
- AgentPipeline: Sequential agent composition
"""

from persuade.agents.base import AgentPhaseResult, TwoPhaseAgent
from persuade.agents.composition import (
    AgentPipeline,
    ComposedResult,
    ConditionalAgent,
    ParallelAgents,
)
from persuade.agents.observer import (
    AgentEvent,
    AgentObserver,
    CompositeObserver,
    LoggingObserver,
    NullObserver,
)
from persuade.agents.retry import (
    RETRY_NONE,
    RETRY_PERSISTENT,
    RETRY_QUICK,
    RETRY_STANDARD,
    RetryableAgent,
    RetryPolicy,
    calculate_delay,
    with_retry,
)
from persuade.agents.runner import AgentRunner

__all__ = [
    # Base classes
    "AgentPhaseResult",
    "TwoPhaseAgent",
    "AgentRunner",
    # Observability
    "AgentEvent",
    "AgentObserver",
    "CompositeObserver",
    "LoggingObserver",
    "NullObserver",
    # Retry
    "RetryPolicy",
    "RetryableAgent",
    "RETRY_NONE",
    "RETRY_QUICK",
    "RETRY_STANDARD",
    "RETRY_PERSISTENT",
    "calculate_delay",
    "with_retry",
    # Composition
    "AgentPipeline",
    "ComposedResult",
    "ConditionalAgent",
    "ParallelAgents",
]
