fix(runtime): use pass for protocol stubs

This commit is contained in:
rayhpeng
2026-06-01 15:31:46 +08:00
parent 30bb2d5149
commit 9ed83c84dc
6 changed files with 28 additions and 14 deletions
@@ -13,7 +13,8 @@ if TYPE_CHECKING:
class RunEventLog(Protocol):
"""Persistence boundary for run messages and execution trace events."""
async def append(self, events: list[RunEvent]) -> list[StoredRunEvent]: ...
async def append(self, events: list[RunEvent]) -> list[StoredRunEvent]:
pass
async def list_messages_by_run(
self,
@@ -23,7 +24,8 @@ class RunEventLog(Protocol):
limit: int = 50,
before_seq: int | None = None,
after_seq: int | None = None,
) -> list[RunMessageView]: ...
) -> list[RunMessageView]:
pass
async def list_events_by_run(
self,
@@ -31,7 +33,8 @@ class RunEventLog(Protocol):
run_id: RunId,
*,
limit: int = 500,
) -> list[StoredRunEvent]: ...
) -> list[StoredRunEvent]:
pass
__all__ = [
@@ -13,9 +13,11 @@ if TYPE_CHECKING:
class RunRepository(Protocol):
"""Persistence boundary for run state snapshots."""
async def save(self, run: Run) -> None: ...
async def save(self, run: Run) -> None:
pass
async def get(self, run_id: RunId, *, user_id: UserId | None = None) -> Run | None: ...
async def get(self, run_id: RunId, *, user_id: UserId | None = None) -> Run | None:
pass
async def list_by_thread(
self,
@@ -23,9 +25,11 @@ class RunRepository(Protocol):
*,
user_id: UserId | None = None,
limit: int = 100,
) -> list[RunSnapshot]: ...
) -> list[RunSnapshot]:
pass
async def delete(self, run_id: RunId) -> bool: ...
async def delete(self, run_id: RunId) -> bool:
pass
__all__ = [