Initial commit

This commit is contained in:
shiyu
2026-02-09 13:19:28 +08:00
commit 17d13999b0
300 changed files with 48565 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
from typing import Protocol, Dict, Any
class BaseProcessor(Protocol):
name: str
supported_exts: list
config_schema: list
produces_file: bool
supports_directory: bool
requires_input_bytes: bool
async def process(self, input_bytes: bytes, path: str, config: Dict[str, Any]) -> Any:
"""处理文件内容/路径并返回结果。produces_file=True 时应返回 bytes/Response。"""
...
# 约定:每个处理器需定义
# PROCESSOR_TYPE: str
# CONFIG_SCHEMA: list
# PROCESSOR_FACTORY: Callable[[], BaseProcessor]