新增 EmergencyError 数据类(stable error_code + 中文 message + suggestions + retryable + original_error)和 EmergencyRules 规则分类器(纯规则,无 LLM): - TaskTimeoutError → timeout (retryable) - LoopDetectedError → loop_detected (retryable) - LLMProviderError → llm_failure (retryable) - Exception → internal_error (not retryable) - TaskCancelledError 不分类(调用方须先检查,否则 ValueError) TaskResult 新增并行 error_struct 字段(默认 None 保持既有契约)。 to_dict 当 error_struct=None 时不输出该键(byte-for-byte 兼容)。 - fallback.py 既有 3 常量不变(EMPTY_LLM_RESPONSE/MAX_STEPS_REACHED/SHELL_NO_OUTPUT) - 支持 config 覆盖(suggestions/retryable/message 按 error_code 分组) - 27 测试覆盖分类/序列化/配置覆盖/契约保持 |
||
|---|---|---|
| .. | ||
| documents | ||
| e2e | ||
| integration | ||
| routes | ||
| tools | ||
| unit | ||
| __init__.py | ||
| conftest.py | ||
| test_routing_chain.py | ||