feat: add adapter usage tracking and retrieval methods across various adapters

This commit is contained in:
shiyu
2026-05-02 21:55:35 +08:00
parent dcc8aa139e
commit a8737b883e
11 changed files with 225 additions and 2 deletions
+5
View File
@@ -21,3 +21,8 @@ class BaseAdapter(Protocol):
async def stream_file(self, root: str, rel: str, range_header: str | None): ...
async def stat_file(self, root: str, rel: str): ...
def get_effective_root(self, sub_path: str | None) -> str: ...
@runtime_checkable
class UsageCapableAdapter(Protocol):
async def get_usage(self, root: str) -> Dict: ...