refactor(agent, shipping): 简化代理模型并完善订单抽取业务
- 移除 Agent 的 exposure_mode 与 internal_executor 相关逻辑,清理关联的过滤、序列化代码 - 删除废弃的 AgentRuntimeBinding 模型及其依赖 - 新增订单抽取上传批次、请求快照等数据库迁移与业务逻辑 - 修复附件完整性检测、订单抽取状态映射问题 - 更新多语言错误文案与前端单元测试配置 - 清理平台配置中不再使用的暴露模式配置
This commit is contained in:
1 parent
1f3ecb87b7
commit
61ac6403c4
159 files changed
+12883
-5099
No files matched your search
@@ -152,23 +152,6 @@ def resolve_conversation_mode(agent) -> str:
|
||||
return _read_string_column(agent, 'conversation_mode', default=_COLUMN_DEFAULTS['conversation_mode'])
|
||||
|
||||
|
||||
def resolve_effective_role(agent) -> str:
|
||||
"""
|
||||
解析 Agent 的运行时角色,不新增数据库字段。
|
||||
|
||||
核心逻辑:internal Provider 统一视为内部执行器,其余注册项继续视为用户入口;
|
||||
历史 conversation_mode 保留用于兼容,但内部执行器运行时不参与聊天呈现。
|
||||
|
||||
Args:
|
||||
agent: Agent ORM 或具备 exposure_mode 属性的代理对象。
|
||||
|
||||
Returns:
|
||||
user_agent 或 internal_executor。
|
||||
"""
|
||||
exposure_mode = _read_string_column(agent, 'exposure_mode', default='workspace')
|
||||
return 'internal_executor' if exposure_mode == 'internal' else 'user_agent'
|
||||
|
||||
|
||||
def resolve_capabilities(agent) -> dict[str, bool]:
|
||||
"""
|
||||
解析 Agent 平台能力声明。
|
||||
|
||||
Reference in new issue
Block a user