Files
inquiry_robot/inquiry-agent/agent/graph/state.py
T

33 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
询价 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