"""Explicit adapter services available to typed write handlers.""" from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass from typing import Any @dataclass(frozen=True) class AdapterWriteContext: """Migration boundary: handlers receive services, never server globals. `legacy_scheduled_job_writer` is temporary while the existing proven implementation is characterized. It prevents the dispatcher from keeping a direct dependency on that writer and is replaced by granular services when the implementation body moves into the handler. """ legacy_scheduled_job_writer: Callable[[dict[str, Any]], dict[str, Any]]