feat(shipping-notice): 添加识别定义和规则集管理功能,支持客户和站点的可配置识别规则

This commit is contained in:
hugo committed 2026-07-20 19:28:17 +08:00
1 parent 88408490d7
commit 34d489a2d1
167 files changed
+10365 -7978

No files matched your search

@@ -58,6 +58,12 @@ def iter_handler_terminal_sse(
emitted_keys.add(dedupe_key)
def should_recover_upstream_error(ctx: ChatStreamContext, event_data: dict) -> bool:
"""委托领域 Handler 判断上游流错误是否可由已持久化业务事实恢复。"""
handler = resolve_handler_for_agent_code(ctx.agent)
return bool(handler and handler.should_recover_upstream_error(ctx, event_data))
def maybe_emit_handler_ui_state(ctx: ChatStreamContext, *, emitted_keys: set[str]) -> str | None:
"""
构造并格式化单次 UI State SSE;已 emit 的 dedupe 键则跳过。