"""There are plans to use this schema across most probes."""


from typing import Literal
from dataclasses import dataclass 
from typing import Any, Optional

# TCP reachability
Reachability = Literal[
    "reachable",
    "unreachable",
]

# Banner acquisition status
BannerStatus = Literal[
    "banner_received",
    "no_banner",
    "read_timeout",
    "banner_error",
]

# Classification success/failure
Classification = Literal[
    "classified",
    "unclassified",
]

# Why classification succeeded or failed
ClassificationReason = Literal[
    # Success reasons
    "http",
    "ssh",
    "unknown_service",

    # Failure reasons
    "no_banner",
    "banner_failed",
    "tcp_failed",
    "parse_error",
]

# Service identity
Service = Literal[
    "http",
    "ssh",
    "unknown",
]


@dataclass
class ServiceProbeResult:
    # Orthogonal summary fields
    reachability: Reachability                   # "reachable" | "unreachable"
    banner_status: BannerStatus                  # "banner_received" | "no_banner" | "read_timeout" | "banner_error"
    classification: Classification               # "classified" | "unclassified"
    classification_reason: ClassificationReason  # why classification succeeded/failed
    service: Service                             # "http" | "ssh" | "unknown"
    confidence: float                            # 0.0–1.0

    # Embedded raw probes
    tcp: Any
    banner: Any
