refactor: close transactional boundary debt batch

This commit is contained in:
jxxghp
2026-08-28 10:36:12 +08:00
parent 3f8d5990e7
commit aa8751f775
105 changed files with 6507 additions and 1691 deletions
+7 -3
View File
@@ -5,6 +5,7 @@ from __future__ import annotations
from collections.abc import Callable
from typing import Any, cast
from app.application.history import DownloadHistoryRepository
from app.application.security.user import ChainUserRepository
AgentDataFactory = Callable[[], Any]
@@ -150,9 +151,12 @@ def get_agent_transfer_history_port() -> Any:
return get_agent_data_ports().transfer_history()
def get_agent_download_history_port() -> Any:
"""创建 Agent 下载历史数据端口实例。"""
return get_agent_data_ports().download_history()
def get_agent_download_history_port() -> DownloadHistoryRepository:
"""创建 Agent 类型化下载历史数据端口实例。"""
return cast(
DownloadHistoryRepository,
get_agent_data_ports().download_history(),
)
def get_agent_plugin_data_port() -> Any: