# SPDX-License-Identifier: GPLv3-or-later
# Copyright © 2025 pygaindalf Rui Pinheiro
from typing import TYPE_CHECKING, Literal, Protocol, runtime_checkable
if TYPE_CHECKING:
from .session import Session
[docs]
@runtime_checkable
class SessionManagerHooksProtocol(Protocol):
[docs]
def on_session_start(self, session: Session) -> None: ...
[docs]
def on_session_end(self, session: Session) -> None: ...
[docs]
def on_session_notify(self, session: Session) -> None: ...
[docs]
def on_session_apply(self, session: Session) -> None: ...
[docs]
def on_session_commit(self, session: Session) -> None: ...
[docs]
def on_session_abort(self, session: Session) -> None: ...
type SessionManagerHookLiteral = Literal["start", "end", "notify", "apply", "commit", "abort"]