Files
hose-use/src
gitea 475ce518f9 重构第2批:API 层加固 + 新增 service 层
api/__init__.py:
- EkbClient.get/post 捕获 HTTP 错误,转换为 AuthenticationError /
  ApiResponseError;识别快报 errorCode=401 结构
- get_client() 改为抛出 NotLoggedInError(原为 RuntimeError)
- 新增 close() 方法便于非 with 场景使用

新增 services/ 目录(业务逻辑层):
- auth_service.py:企业认证配置的增删查改,返回 CorpInfo dataclass
- agent_service.py:Agent CRUD + copy + 高阶组合查询 get_dedup_rules_across_agents
  AgentCreateInput / AgentUpdateInput dataclass 统一输入结构
- rule_service.py:Rule 查询(支持按编码/ID 查找)+ CRUD
- __init__.py:统一 re-export,上层只从此处导入
2026-04-14 11:06:06 +08:00
..