feat(h5): inject direct-chat history on agent escalation and defer ambiguous routing.

Phase B appends snapshot context when leaving h5direct sessions so Goose no longer starts blind. Phase C lets the 0.72 fallback return null on gated chat text so the existing LLM router can run, flags default off.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-28 20:45:34 +08:00
parent 6f48cad4c2
commit 5f3980e0df
9 changed files with 654 additions and 3 deletions
+9
View File
@@ -150,6 +150,15 @@ H5_PUBLIC_BASE_URL=http://127.0.0.1:5173
# MEMIND_CHAT_ROUTER_MEMORY_ENABLED=1
# MEMIND_CHAT_ROUTER_FALLBACK_ROUTE=direct_chat
# ----- Chat task intent layerdocs/architecture/chat-task-intent-layer-review-20260828.md-----
# 阶段 Bdirect→agent 升级时把 snapshot 历史注入 Goose 输入(默认关,建议先 canary)
# MEMIND_DIRECT_ESCALATION_CONTEXT_ENABLED=0
# MEMIND_DIRECT_ESCALATION_CONTEXT_CANARY_USER_IDS=
# 阶段 C:0.72 兜底在歧义文本上 defer 给 LLM router(默认关;建议先 SHADOW=1 观测)
# MEMIND_CHAT_ROUTER_CHAT_SESSION_DEFER_ENABLED=0
# MEMIND_CHAT_ROUTER_CHAT_SESSION_DEFER_CANARY_USER_IDS=
# MEMIND_CHAT_ROUTER_CHAT_SESSION_DEFER_MIN_TEXT_LENGTH=12
# ----- Token 压缩(本地开发可选,降低 DeepSeek 上下文)-----
# Agent 会话历史压缩:超过阈值后清空 Goose 会话并保留摘要(默认 180 条 / 12 万字符,偏松)
# MEMIND_AGENT_SESSION_COMPACT_MESSAGE_COUNT=40