"""Campaign lifecycle orchestration — create, resume, close, manage investigations.

This package provides the glue layer between:
- Analysis (static analysis of repositories)
- LLM (briefing and mission generation)
- Database (persistence layer)

Public API:
- create_campaign: Full campaign creation pipeline
- resume_campaign: Find and resume existing campaign
- discover_campaigns: List all saved campaigns
- complete_mission: Mark mission complete, unlock dependents
- unlock_mission: Force locked mission to available
- get_campaign_progress: Compute completion stats
"""

from unfamiliar.campaign.discovery import discover_campaigns
from unfamiliar.campaign.missions import (
    CampaignStatusError,
    MissionStatusError,
    complete_mission,
    reopen_campaign,
    start_mission,
    unlock_mission,
)
from unfamiliar.campaign.orchestrator import (
    CampaignOrchestrationError,
    create_campaign,
    resume_campaign,
)
from unfamiliar.campaign.progress import get_campaign_progress
from unfamiliar.campaign.types import (
    CampaignExistsError,
    CampaignInfo,
    CampaignProgress,
    CategoryProgress,
    CompletionResult,
    PersistResult,
)

__all__ = [
    # Orchestrator
    "create_campaign",
    "resume_campaign",
    "CampaignOrchestrationError",
    # Discovery
    "discover_campaigns",
    # Mission lifecycle
    "complete_mission",
    "unlock_mission",
    "start_mission",
    "MissionStatusError",
    "CampaignStatusError",
    "reopen_campaign",
    # Progress
    "get_campaign_progress",
    # Types
    "CampaignExistsError",
    "CampaignInfo",
    "CampaignProgress",
    "CategoryProgress",
    "CompletionResult",
    "PersistResult",
]
