落地并存测服全端:智能体 Graph/路由、后台切 8180、主账与部署脚本齐备,便于线上重发与验收。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-09-13 21:15:58 +08:00
co-authored by Cursor
parent 0eb1adecc8
commit 8103b3b651
143 changed files with 8968 additions and 277 deletions
+32
View File
@@ -0,0 +1,32 @@
"""
询价 Graph 状态(骨架)。
本文件职责:定义一条询价在图内携带的最小字段;checkpoint 会持久化本结构。
禁止:把主账六态真相写进本状态并当作已成功;禁止在本文件写业务分支。
"""
from __future__ import annotations
from typing import Any, Optional, TypedDict
class InquiryGraphState(TypedDict, total=False):
"""
一单一份图状态。
thread_id:LangGraph / checkpoint 主键(一询价一 thread)。
sender_id:入站企微 userid;为空时 runtime 拒绝进图。
wait_version:与补问卡/采用卡绑定;错版本点击应丢弃(业务层后续实现)。
last_wake:最近一次 Worker 结构化唤醒快照(仅记录,不替代主账)。
"""
thread_id: str
sender_id: str
inquiry_no: Optional[str]
wait_version: int
quote_version: Optional[int]
# 骨架占位:后续由各节点写入阶段标记;不得冒充主账六态
phase: str
last_wake: dict[str, Any]
# 调试备注,正式路径勿依赖
notes: str