落地并存测服全端:智能体 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
+29
View File
@@ -0,0 +1,29 @@
"""
policy 包:跨 handler 的公共校验落点(空壳)。
本文件职责:占位;身份/Schema/权限等确定性规则后续放本包。
禁止:自然语言语义;禁止把全部卡片逻辑堆进本包。
"""
from __future__ import annotations
import logging
from typing import Any
logger = logging.getLogger(__name__)
def policy_package_ready() -> bool:
"""框架探测:包可导入即 True。"""
return True
def assert_has_sender_id(sender_id: str) -> dict[str, Any]:
"""
身份壳:无 sender_id 则 ok=False。
不做企微换号;不入 Graph 的裁决由调用方执行。
"""
if not (sender_id or "").strip():
return {"ok": False, "error": "missing_sender_id"}
return {"ok": True}