袁聪的最后一次完善更新
This commit is contained in:
@@ -34,10 +34,15 @@ import argparse
|
||||
import asyncio
|
||||
import sys
|
||||
from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
|
||||
from sqlalchemy import text
|
||||
|
||||
from app.infrastructure.db import SessionFactory
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
if str(ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(ROOT))
|
||||
|
||||
from app.infrastructure.db import SessionFactory # noqa: E402
|
||||
|
||||
if hasattr(sys.stdout, "reconfigure"):
|
||||
sys.stdout.reconfigure(errors="replace") # type: ignore[union-attr]
|
||||
@@ -47,6 +52,8 @@ OPERATOR_ROLE_NAME = "运营专员"
|
||||
|
||||
#: 运营该有的权限码。`offsite:write` 由场外线创建;其余在本种子的 9051-9056 号段里定义。
|
||||
OPERATOR_GRANTED_CODES: tuple[str, ...] = (
|
||||
# Agent 公共入口:没有该权限,请求会在 Agent 类型和工具权限校验之前被拒绝。
|
||||
"agent:run",
|
||||
# 场外运营(角色门槛之外,这个码是场外线自己声明的)
|
||||
"offsite:write",
|
||||
# 金融 NL2SQL:角色白名单 {advisor, operator, admin, super_admin} 含 operator
|
||||
|
||||
Reference in New Issue
Block a user