"""Sealed identity values for canonical customer authority receipts."""

from __future__ import annotations

import hashlib
from dataclasses import dataclass
from pathlib import Path
from typing import Final

CANONICAL_CUSTOMER_SCHEMA_DIGEST: Final = hashlib.sha256(
    b"nutricoach-canonical-checkin-authority-v2\0wizard/events.jsonl\0wizard/.events.lock\0nutrition-plans/canonical-sequence.jsonl\0canonical_sequence_v1"
).hexdigest()


@dataclass(frozen=True, slots=True)
class CanonicalAuthoritySeal:
    """Unforgeable in-process seal for a constructed authority receipt."""


CANONICAL_AUTHORITY_SEAL: Final = CanonicalAuthoritySeal()


@dataclass(frozen=True, slots=True)
class CanonicalCustomerNames:
    """Pinned root and fixed canonical child names."""

    root: Path
    wizard: str = "wizard"
    plans: str = "nutrition-plans"
    events: str = "events.jsonl"
    sequence: str = "canonical-sequence.jsonl"
    lock: str = ".events.lock"
