sycommon-python-lib 0.2.10a24__py3-none-any.whl → 0.2.10a26__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sycommon/agent/dashboard/__init__.py +22 -0
- sycommon/agent/dashboard/api.py +76 -0
- sycommon/agent/dashboard/models.py +44 -0
- sycommon/agent/dashboard/stats.py +98 -0
- sycommon/logging/kafka_log.py +23 -11
- sycommon/tests/test_upgrade_aio_pika.py +24 -11
- sycommon/tests/test_upgrade_verification.py +7 -7
- {sycommon_python_lib-0.2.10a24.dist-info → sycommon_python_lib-0.2.10a26.dist-info}/METADATA +19 -19
- {sycommon_python_lib-0.2.10a24.dist-info → sycommon_python_lib-0.2.10a26.dist-info}/RECORD +12 -8
- {sycommon_python_lib-0.2.10a24.dist-info → sycommon_python_lib-0.2.10a26.dist-info}/WHEEL +0 -0
- {sycommon_python_lib-0.2.10a24.dist-info → sycommon_python_lib-0.2.10a26.dist-info}/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.10a24.dist-info → sycommon_python_lib-0.2.10a26.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""驾驶舱模块: 「AI 在跑数量」统计链路."""
|
|
2
|
+
from sycommon.agent.dashboard.api import (
|
|
3
|
+
dashboard_permission_required,
|
|
4
|
+
register_dashboard_routes,
|
|
5
|
+
)
|
|
6
|
+
from sycommon.agent.dashboard.models import (
|
|
7
|
+
AgentRunRecord,
|
|
8
|
+
AgentRunStatus,
|
|
9
|
+
AgentRunsStatsData,
|
|
10
|
+
AgentRunsStatsResponse,
|
|
11
|
+
)
|
|
12
|
+
from sycommon.agent.dashboard.stats import AgentRunStats
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"AgentRunRecord",
|
|
16
|
+
"AgentRunStats",
|
|
17
|
+
"AgentRunStatus",
|
|
18
|
+
"AgentRunsStatsData",
|
|
19
|
+
"AgentRunsStatsResponse",
|
|
20
|
+
"dashboard_permission_required",
|
|
21
|
+
"register_dashboard_routes",
|
|
22
|
+
]
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""驾驶舱 API: 「AI 在跑数量」统计接口.
|
|
2
|
+
|
|
3
|
+
- GET /api/dashboard/agent-runs/stats: 返回各状态计数, runningCount 为统计卡数据源.
|
|
4
|
+
- 统计源异常/缺失/非法值时降级为占位符 0, 不 500、不 NaN.
|
|
5
|
+
- 鉴权通过 FastAPI 依赖注入: dashboard_permission_required 组合宿主自定义校验.
|
|
6
|
+
"""
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import logging
|
|
10
|
+
from typing import Any, Callable, Optional
|
|
11
|
+
|
|
12
|
+
from fastapi import FastAPI, HTTPException, Request
|
|
13
|
+
|
|
14
|
+
from sycommon.agent.dashboard.models import AgentRunsStatsData, AgentRunsStatsResponse
|
|
15
|
+
from sycommon.agent.dashboard.stats import AgentRunStats
|
|
16
|
+
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
18
|
+
|
|
19
|
+
_STATS_ATTR = "agent_run_stats"
|
|
20
|
+
ROUTE_STATS = "/api/dashboard/agent-runs/stats"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def register_dashboard_routes(app: FastAPI) -> FastAPI:
|
|
24
|
+
"""把驾驶舱统计路由挂载到 app."""
|
|
25
|
+
|
|
26
|
+
@app.get(ROUTE_STATS, response_model=AgentRunsStatsResponse)
|
|
27
|
+
async def agent_runs_stats(request: Request) -> AgentRunsStatsResponse:
|
|
28
|
+
stats: Any = getattr(request.app.state, _STATS_ATTR, None)
|
|
29
|
+
data = AgentRunsStatsData()
|
|
30
|
+
if stats is None:
|
|
31
|
+
logger.warning("[dashboard] 统计源未初始化, runningCount 降级为 0")
|
|
32
|
+
return AgentRunsStatsResponse(data=data)
|
|
33
|
+
try:
|
|
34
|
+
raw = stats.running_count()
|
|
35
|
+
data.runningCount = _sanitize_count(raw)
|
|
36
|
+
raw_counts = stats.counts() if hasattr(stats, "counts") else None
|
|
37
|
+
if raw_counts:
|
|
38
|
+
data.succeededCount = _sanitize_count(raw_counts.get("succeeded", 0))
|
|
39
|
+
data.failedCount = _sanitize_count(raw_counts.get("failed", 0))
|
|
40
|
+
data.pendingCount = _sanitize_count(raw_counts.get("pending", 0))
|
|
41
|
+
except Exception as exc: # noqa: BLE001
|
|
42
|
+
# 接口异常降级: 占位 0 而不是 500, 页面其余部分正常渲染
|
|
43
|
+
logger.warning(f"[dashboard] 统计接口异常, 降级为占位 0: {exc}")
|
|
44
|
+
return AgentRunsStatsResponse(data=data)
|
|
45
|
+
|
|
46
|
+
return app
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _sanitize_count(raw: Any) -> int:
|
|
50
|
+
"""非法值(null/负数/字符串/科学计数)一律归一为 0."""
|
|
51
|
+
try:
|
|
52
|
+
value = int(raw)
|
|
53
|
+
except (TypeError, ValueError):
|
|
54
|
+
return 0
|
|
55
|
+
return value if value >= 0 else 0
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def dashboard_permission_required(
|
|
59
|
+
checker: Optional[Callable[..., Any]] = None,
|
|
60
|
+
):
|
|
61
|
+
"""驾驶舱权限依赖工厂.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
checker: 宿主自定义校验函数, 抛 HTTPException(401/403) 表示拒绝.
|
|
65
|
+
"""
|
|
66
|
+
if checker is None:
|
|
67
|
+
async def _default_checker() -> None:
|
|
68
|
+
raise HTTPException(status_code=401, detail="未登录")
|
|
69
|
+
checker = _default_checker
|
|
70
|
+
|
|
71
|
+
async def _dependency() -> None:
|
|
72
|
+
result = checker()
|
|
73
|
+
if result is not None and hasattr(result, "__await__"):
|
|
74
|
+
await result
|
|
75
|
+
|
|
76
|
+
return _dependency
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""驾驶舱「AI 在跑数量」数据模型."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from enum import Enum
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel, Field
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AgentRunStatus(str, Enum):
|
|
11
|
+
"""Agent 运行记录状态."""
|
|
12
|
+
|
|
13
|
+
PENDING = "pending"
|
|
14
|
+
RUNNING = "running"
|
|
15
|
+
SUCCEEDED = "succeeded"
|
|
16
|
+
FAILED = "failed"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class AgentRunRecord(BaseModel):
|
|
20
|
+
"""单条 Agent 运行记录."""
|
|
21
|
+
|
|
22
|
+
task_id: str
|
|
23
|
+
user_id: str
|
|
24
|
+
agent_name: str = "agent"
|
|
25
|
+
status: AgentRunStatus = AgentRunStatus.RUNNING
|
|
26
|
+
started_at: Optional[float] = None
|
|
27
|
+
finished_at: Optional[float] = None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class AgentRunsStatsData(BaseModel):
|
|
31
|
+
"""统计接口 data 字段."""
|
|
32
|
+
|
|
33
|
+
runningCount: int = Field(default=0, description="AI 在跑数量(仅 running 状态)")
|
|
34
|
+
succeededCount: int = 0
|
|
35
|
+
failedCount: int = 0
|
|
36
|
+
pendingCount: int = 0
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class AgentRunsStatsResponse(BaseModel):
|
|
40
|
+
"""统计接口统一响应."""
|
|
41
|
+
|
|
42
|
+
code: int = 0
|
|
43
|
+
message: str = "ok"
|
|
44
|
+
data: AgentRunsStatsData = AgentRunsStatsData()
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"""Agent 运行统计: 驾驶舱「AI 在跑数量」数据源.
|
|
2
|
+
|
|
3
|
+
线程安全的进程内统计器, 统计口径: runningCount 只计 status == running
|
|
4
|
+
的记录, succeeded/failed/pending 不计入。宿主服务可替换为 DB/Redis 实现,
|
|
5
|
+
只需保持同名方法契约。
|
|
6
|
+
"""
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import threading
|
|
10
|
+
import time
|
|
11
|
+
from typing import Dict, List, Optional
|
|
12
|
+
|
|
13
|
+
from sycommon.agent.dashboard.models import AgentRunRecord, AgentRunStatus
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class AgentRunStats:
|
|
17
|
+
"""线程安全的 Agent 运行记录统计器."""
|
|
18
|
+
|
|
19
|
+
def __init__(self) -> None:
|
|
20
|
+
self._lock = threading.RLock()
|
|
21
|
+
self._runs: Dict[str, AgentRunRecord] = {}
|
|
22
|
+
|
|
23
|
+
# -- 写入 ---------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
def record_start(
|
|
26
|
+
self,
|
|
27
|
+
task_id: str,
|
|
28
|
+
user_id: str,
|
|
29
|
+
agent_name: str = "agent",
|
|
30
|
+
status: AgentRunStatus = AgentRunStatus.RUNNING,
|
|
31
|
+
) -> AgentRunRecord:
|
|
32
|
+
"""记录一次任务启动(新任务默认进入 running)."""
|
|
33
|
+
record = AgentRunRecord(
|
|
34
|
+
task_id=task_id,
|
|
35
|
+
user_id=user_id,
|
|
36
|
+
agent_name=agent_name,
|
|
37
|
+
status=status,
|
|
38
|
+
started_at=time.time(),
|
|
39
|
+
)
|
|
40
|
+
with self._lock:
|
|
41
|
+
self._runs[task_id] = record
|
|
42
|
+
return record
|
|
43
|
+
|
|
44
|
+
def record_finish(
|
|
45
|
+
self,
|
|
46
|
+
task_id: str,
|
|
47
|
+
status: AgentRunStatus = AgentRunStatus.SUCCEEDED,
|
|
48
|
+
) -> Optional[AgentRunRecord]:
|
|
49
|
+
"""记录任务结束(running → succeeded/failed)."""
|
|
50
|
+
with self._lock:
|
|
51
|
+
record = self._runs.get(task_id)
|
|
52
|
+
if record is None:
|
|
53
|
+
return None
|
|
54
|
+
record.status = status
|
|
55
|
+
record.finished_at = time.time()
|
|
56
|
+
return record
|
|
57
|
+
|
|
58
|
+
def seed_running(self, count: int) -> None:
|
|
59
|
+
"""批量造 running 记录(测试/演示用)."""
|
|
60
|
+
for i in range(count):
|
|
61
|
+
self.record_start(
|
|
62
|
+
task_id=f"seed-{i}",
|
|
63
|
+
user_id="seed-user",
|
|
64
|
+
agent_name="seed-agent",
|
|
65
|
+
status=AgentRunStatus.RUNNING,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
# -- 查询 ---------------------------------------------------------------
|
|
69
|
+
|
|
70
|
+
def running_count(self) -> int:
|
|
71
|
+
"""AI 在跑数量: 只计 running 状态."""
|
|
72
|
+
with self._lock:
|
|
73
|
+
return sum(
|
|
74
|
+
1 for r in self._runs.values()
|
|
75
|
+
if r.status == AgentRunStatus.RUNNING
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
def counts(self) -> dict:
|
|
79
|
+
"""各状态计数."""
|
|
80
|
+
with self._lock:
|
|
81
|
+
result = {
|
|
82
|
+
AgentRunStatus.RUNNING: 0,
|
|
83
|
+
AgentRunStatus.SUCCEEDED: 0,
|
|
84
|
+
AgentRunStatus.FAILED: 0,
|
|
85
|
+
AgentRunStatus.PENDING: 0,
|
|
86
|
+
}
|
|
87
|
+
for r in self._runs.values():
|
|
88
|
+
if r.status in result:
|
|
89
|
+
result[r.status] += 1
|
|
90
|
+
return result
|
|
91
|
+
|
|
92
|
+
def list_runs(self, status: Optional[AgentRunStatus] = None) -> List[AgentRunRecord]:
|
|
93
|
+
"""列出运行记录, 可按状态过滤."""
|
|
94
|
+
with self._lock:
|
|
95
|
+
records = list(self._runs.values())
|
|
96
|
+
if status is not None:
|
|
97
|
+
records = [r for r in records if r.status == status]
|
|
98
|
+
return records
|
sycommon/logging/kafka_log.py
CHANGED
|
@@ -235,9 +235,11 @@ def _captured_print(*args, sep=" ", end="\n", file=None, flush=False):
|
|
|
235
235
|
# → _log → print(镜像) 链里穿透必命中业务帧,镜像会被当业务 print
|
|
236
236
|
# 再上报 — 整个信封 dict 作为 msg 双投+嵌套+中文双重转义
|
|
237
237
|
# (wxcoach 实测 17:26 抓出,2026-10-16 修)。
|
|
238
|
+
# 🔴 sys._getframe(1) 惰性取帧:与 _log 抓帧同因,inspect.stack() 全栈
|
|
239
|
+
# FrameInfo 物化 O(模块数),print 高频路径不可承受。
|
|
238
240
|
try:
|
|
239
|
-
import
|
|
240
|
-
_direct =
|
|
241
|
+
import sys as _sys
|
|
242
|
+
_direct = _sys._getframe(1).f_code.co_filename.replace("\\", "/")
|
|
241
243
|
if _is_print_source_internal(_direct):
|
|
242
244
|
_print_orig(*args, sep=sep, end=end, file=file, flush=flush)
|
|
243
245
|
return
|
|
@@ -1334,26 +1336,36 @@ class SYLogger:
|
|
|
1334
1336
|
_caller_file, _caller_fn, _caller_line, _caller_pkg = "", "", "", ""
|
|
1335
1337
|
_last_skip = None # 最后跳过的本库日志层帧(SQL 收口闭包兜底用)
|
|
1336
1338
|
try:
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1339
|
+
# 🔴 惰性抓帧:sys._getframe 只读 f_code 属性,不触发 inspect.stack()
|
|
1340
|
+
# 的全栈 FrameInfo 物化(getframeinfo→findsource→getmodule 扫全部
|
|
1341
|
+
# sys.modules,O(加载模块数)/条日志 —— 升级后 2957 模块下单条日志
|
|
1342
|
+
# 13ms,consistent_hash 全量测试 44s→342s,探针钉死)。
|
|
1343
|
+
import sys as _sys
|
|
1344
|
+
_f = _sys._getframe(2) # 0=本函数,1=_log,2=调用方(与 stack()[2] 等价)
|
|
1345
|
+
_walked = 0
|
|
1346
|
+
_found = False
|
|
1347
|
+
while _f is not None and _walked < 18: # stack()[2:20] 同窗口
|
|
1348
|
+
_walked += 1
|
|
1349
|
+
_mod = _f.f_code.co_filename.replace("\\", "/")
|
|
1340
1350
|
if _is_framework_frame(_mod):
|
|
1341
1351
|
if "/sycommon/logging/" in _mod and "kafka_log" not in _mod:
|
|
1342
1352
|
_last_skip = _f
|
|
1353
|
+
_f = _f.f_back
|
|
1343
1354
|
continue
|
|
1344
|
-
_caller_file, _caller_fn = _caller_file_from_path(_mod), _f.
|
|
1345
|
-
_caller_line = _f.
|
|
1355
|
+
_caller_file, _caller_fn = _caller_file_from_path(_mod), _f.f_code.co_name
|
|
1356
|
+
_caller_line = _f.f_lineno
|
|
1346
1357
|
_caller_pkg = _package_two_segments(_mod) or _caller_file_from_path(_mod)
|
|
1358
|
+
_found = True
|
|
1347
1359
|
break
|
|
1348
|
-
|
|
1360
|
+
if not _found:
|
|
1349
1361
|
# 窗口耗尽(全框架帧): SQL 链回退到事件闭包帧(如
|
|
1350
1362
|
# after_cursor_execute @ async_sql_logger.py:39)—
|
|
1351
1363
|
# 定位到 SQL 收口层,优于 kafka:0 无信息量形态。
|
|
1352
1364
|
if _last_skip is not None:
|
|
1353
|
-
_mod = _last_skip.
|
|
1365
|
+
_mod = _last_skip.f_code.co_filename.replace("\\", "/")
|
|
1354
1366
|
_caller_file = _caller_file_from_path(_mod)
|
|
1355
|
-
_caller_fn = _last_skip.
|
|
1356
|
-
_caller_line = _last_skip.
|
|
1367
|
+
_caller_fn = _last_skip.f_code.co_name
|
|
1368
|
+
_caller_line = _last_skip.f_lineno
|
|
1357
1369
|
_caller_pkg = _package_two_segments(_mod) or _caller_file
|
|
1358
1370
|
except Exception:
|
|
1359
1371
|
_caller_pkg = ""
|
|
@@ -42,13 +42,13 @@ def _url(vhost: str) -> str:
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
def test_aio_pika_versions_pinned():
|
|
45
|
-
"""v10 依赖链:aio-pika 10 / aiormq 7 / pamqp
|
|
46
|
-
assert aio_pika.__version__ == "10.
|
|
47
|
-
f"aio-pika 应为 10.
|
|
45
|
+
"""v10 依赖链:aio-pika 10 / aiormq 7 / pamqp 5(2026-11-06 pamqp 随 aio-pika 10.2.2 升至 5)。"""
|
|
46
|
+
assert aio_pika.__version__ == "10.2.2", (
|
|
47
|
+
f"aio-pika 应为 10.2.2, 实际 {aio_pika.__version__}")
|
|
48
48
|
assert version("aiormq").split(".")[0] == "7", (
|
|
49
49
|
f"aiormq 主版本应为 7, 实际 {version('aiormq')}")
|
|
50
|
-
assert version("pamqp").split(".")[0] == "
|
|
51
|
-
f"pamqp 主版本应为
|
|
50
|
+
assert version("pamqp").split(".")[0] == "5", (
|
|
51
|
+
f"pamqp 主版本应为 5, 实际 {version('pamqp')}")
|
|
52
52
|
print(f" [OK] aio-pika={aio_pika.__version__} "
|
|
53
53
|
f"aiormq={version('aiormq')} pamqp={version('pamqp')}")
|
|
54
54
|
|
|
@@ -112,8 +112,15 @@ def test_robust_connection_roundtrip():
|
|
|
112
112
|
def test_uat_vhost_permission_known_issue():
|
|
113
113
|
"""记录已知差异:rabbit 用户对 /uat 无权限(broker ACL,与升级无关)。
|
|
114
114
|
|
|
115
|
-
断言它确实被 broker
|
|
116
|
-
|
|
115
|
+
断言它确实被 broker 拒绝,以便未来 broker 授权变更时本测试会主动失败提醒复核。
|
|
116
|
+
|
|
117
|
+
观察形态说明(2026-11-06 溯源):broker 在 Connection.Open 握手窗口回
|
|
118
|
+
Connection.Close(refuse)。aiormq `_rpc` 的 `frame.name not in
|
|
119
|
+
valid_responses` 判定先于 isinstance(Connection.Close) 分支触发,抛
|
|
120
|
+
InvalidFrameError 纯字符串 —— reply_code/reply_text 丢失,e.args[1]
|
|
121
|
+
的 Close 对象形态在 aiormq 7.x/pamqp 4/5 全组合下均不可得(10-20 锁定
|
|
122
|
+
版本 aiormq 7.2.1+pamqp 4.0.1 实测同样如此,旧断言 NOT_ALLOWED in ''
|
|
123
|
+
自当时起恒假)。故以消息中出现 Connection.Close repr 作为「确被拒」判据。
|
|
117
124
|
"""
|
|
118
125
|
async def go():
|
|
119
126
|
conn = await aio_pika.connect(_url(MQ_VHOST_UAT), timeout=10)
|
|
@@ -129,11 +136,17 @@ def test_uat_vhost_permission_known_issue():
|
|
|
129
136
|
cl = e.args[1] if len(getattr(e, "args", ())) > 1 else None
|
|
130
137
|
detail = ""
|
|
131
138
|
if cl is not None and hasattr(cl, "marshal"):
|
|
139
|
+
# 若未来 aiormq 恢复携带 Close 对象,优先用完整帧内容判定
|
|
132
140
|
detail = cl.marshal().decode("latin1", "replace")
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
141
|
+
assert "NOT_ALLOWED" in detail, (
|
|
142
|
+
f"/uat 被拒但原因非权限问题,请复核: {detail!r}")
|
|
143
|
+
else:
|
|
144
|
+
msg = str(e)
|
|
145
|
+
assert "Connection.Close" in msg, (
|
|
146
|
+
f"/uat 拒绝形态变化,请复核: {type(e).__name__}: {msg!r}")
|
|
147
|
+
detail = msg
|
|
148
|
+
print(f" [OK] /uat 确实被拒(已知差异,与升级无关): "
|
|
149
|
+
f"{detail[:80]!r}")
|
|
137
150
|
|
|
138
151
|
|
|
139
152
|
if __name__ == "__main__":
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""验证本次依赖升级 + 补丁适配的正确性(纯离线,不依赖 RabbitMQ/真实 LLM)。
|
|
2
2
|
|
|
3
3
|
覆盖本次改动:
|
|
4
|
-
A. 依赖版本落地:langchain 1.4.
|
|
4
|
+
A. 依赖版本落地:langchain 1.4.9 / langchain_openai 1.7.4 / langchain_core 1.7.6(2026-11-06 升级轮)。
|
|
5
5
|
B. summarization_utils.py 的 ContextOverflow 补丁:在当前版本上成功替换
|
|
6
6
|
_handle_openai_bad_request / _handle_openai_api_error,且:
|
|
7
7
|
- MiniMax/vLLM 句式 "maximum context length is ..." 仍被正确转成
|
|
@@ -28,12 +28,12 @@ def test_installed_versions():
|
|
|
28
28
|
import langchain_openai
|
|
29
29
|
import langchain_core
|
|
30
30
|
|
|
31
|
-
assert langchain.__version__ == "1.4.
|
|
32
|
-
f"langchain 应为 1.4.
|
|
33
|
-
assert langchain_openai.__version__ == "1.7.
|
|
34
|
-
f"langchain_openai 应为 1.7.
|
|
35
|
-
assert langchain_core.__version__ == "1.6
|
|
36
|
-
f"langchain_core 应为 1.6
|
|
31
|
+
assert langchain.__version__ == "1.4.9", (
|
|
32
|
+
f"langchain 应为 1.4.9, 实际 {langchain.__version__}")
|
|
33
|
+
assert langchain_openai.__version__ == "1.7.4", (
|
|
34
|
+
f"langchain_openai 应为 1.7.4, 实际 {langchain_openai.__version__}")
|
|
35
|
+
assert langchain_core.__version__ == "1.7.6", (
|
|
36
|
+
f"langchain_core 应为 1.7.6, 实际 {langchain_core.__version__}")
|
|
37
37
|
print(f" [OK] langchain={langchain.__version__} "
|
|
38
38
|
f"langchain_openai={langchain_openai.__version__} "
|
|
39
39
|
f"langchain_core={langchain_core.__version__}")
|
{sycommon_python_lib-0.2.10a24.dist-info → sycommon_python_lib-0.2.10a26.dist-info}/METADATA
RENAMED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10a26
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
|
-
Requires-Dist: aio-pika==10.
|
|
7
|
+
Requires-Dist: aio-pika==10.2.2
|
|
8
8
|
Requires-Dist: aiohttp==3.14.5
|
|
9
9
|
Requires-Dist: aiomysql==0.3.2
|
|
10
|
-
Requires-Dist: anyio==4.
|
|
10
|
+
Requires-Dist: anyio==4.16.0
|
|
11
11
|
Requires-Dist: decorator==5.3.1
|
|
12
|
-
Requires-Dist: deepagents==0.7.
|
|
12
|
+
Requires-Dist: deepagents==0.7.34
|
|
13
13
|
Requires-Dist: elasticsearch==9.5.1
|
|
14
|
-
Requires-Dist: fastapi==0.
|
|
14
|
+
Requires-Dist: fastapi==0.162.2
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
|
-
Requires-Dist: kafka-python==3.0.
|
|
17
|
-
Requires-Dist: langchain==1.4.
|
|
18
|
-
Requires-Dist: langchain-core==1.7.
|
|
19
|
-
Requires-Dist: langchain-openai==1.7.
|
|
20
|
-
Requires-Dist: langfuse==5.0
|
|
21
|
-
Requires-Dist: langgraph==1.2.
|
|
16
|
+
Requires-Dist: kafka-python==3.0.13
|
|
17
|
+
Requires-Dist: langchain==1.4.9
|
|
18
|
+
Requires-Dist: langchain-core==1.7.6
|
|
19
|
+
Requires-Dist: langchain-openai==1.7.4
|
|
20
|
+
Requires-Dist: langfuse==5.2.0
|
|
21
|
+
Requires-Dist: langgraph==1.2.20
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-postgres==3.2.0
|
|
23
|
-
Requires-Dist: langgraph-checkpoint-redis==0.
|
|
23
|
+
Requires-Dist: langgraph-checkpoint-redis==0.6.0
|
|
24
24
|
Requires-Dist: ldap3==2.9.1
|
|
25
25
|
Requires-Dist: loguru==0.7.3
|
|
26
26
|
Requires-Dist: mysql-connector-python==26.10.0
|
|
27
27
|
Requires-Dist: nacos-sdk-python==3.2.0
|
|
28
28
|
Requires-Dist: psutil==7.2.2
|
|
29
29
|
Requires-Dist: pyxxl==0.4.8
|
|
30
|
-
Requires-Dist: pydantic==2.14.
|
|
30
|
+
Requires-Dist: pydantic==2.14.3
|
|
31
31
|
Requires-Dist: python-dotenv==1.2.4
|
|
32
|
-
Requires-Dist: python-multipart==0.0.
|
|
32
|
+
Requires-Dist: python-multipart==0.0.33
|
|
33
33
|
Requires-Dist: pyyaml==6.0.3
|
|
34
34
|
Requires-Dist: redis==7.4.0
|
|
35
|
-
Requires-Dist: sentry-sdk[fastapi]==2.
|
|
36
|
-
Requires-Dist: sqlalchemy[asyncio]==2.1.
|
|
37
|
-
Requires-Dist: starlette[full]==1.
|
|
35
|
+
Requires-Dist: sentry-sdk[fastapi]==2.74.0
|
|
36
|
+
Requires-Dist: sqlalchemy[asyncio]==2.1.8
|
|
37
|
+
Requires-Dist: starlette[full]==1.10.0
|
|
38
38
|
Requires-Dist: tiktoken==0.14.0
|
|
39
39
|
Requires-Dist: uvicorn==0.54.0
|
|
40
40
|
Requires-Dist: wecom-aibot-python-sdk==1.0.2
|
|
@@ -42,9 +42,9 @@ Requires-Dist: twine==7.0.0
|
|
|
42
42
|
Requires-Dist: minio==7.2.20
|
|
43
43
|
Requires-Dist: langchain-mcp-adapters==0.3.2
|
|
44
44
|
Requires-Dist: fastapi-mcp==0.4.0
|
|
45
|
-
Requires-Dist: psycopg[binary,pool]==3.3.
|
|
45
|
+
Requires-Dist: psycopg[binary,pool]==3.3.8
|
|
46
46
|
Requires-Dist: agent-client-protocol==0.12.1
|
|
47
|
-
Requires-Dist: langchain-acp==1.
|
|
47
|
+
Requires-Dist: langchain-acp==1.13.0
|
|
48
48
|
Requires-Dist: pypinyin==0.55.0
|
|
49
49
|
|
|
50
50
|
# sycommon-python-lib
|
|
@@ -149,6 +149,10 @@ sycommon/agent/acp/fetch.py,sha256=a6tL13eeGT1KgExgNbdYpzQ54xBqLeTGNTIQmxr3eQ4,6
|
|
|
149
149
|
sycommon/agent/acp/server_adapter.py,sha256=IKxovPTMZk66nuZ75A98FCw6-qpq0MqHRhy2-qpJeuk,3964
|
|
150
150
|
sycommon/agent/acp/ssh_init.py,sha256=5y1kIyNHpsh9ayx9RWO5gS0GOOn2GfZpU4fNrGuhOYk,12091
|
|
151
151
|
sycommon/agent/acp/tool.py,sha256=yt6ohKL2y7wIZMNiLv-m5oCg5u1p5GAbqgjzQVt285Y,10975
|
|
152
|
+
sycommon/agent/dashboard/__init__.py,sha256=ylI8erCB-dOv4OHQRFEbPTVEF4aMrdQjwCNGCm28_NY,572
|
|
153
|
+
sycommon/agent/dashboard/api.py,sha256=IME86kKJK7itCFDSrlPezciNXWOnX9eSBdeBFuWyiwA,2835
|
|
154
|
+
sycommon/agent/dashboard/models.py,sha256=WbrdPurja_dSlW_pGLDuS8PGK1nEOIhxpxCTSBU7sp4,1034
|
|
155
|
+
sycommon/agent/dashboard/stats.py,sha256=hhBJ-cpPzMQADjDaDdDRsgYjlceZs2R_4BodB1R1ZlA,3216
|
|
152
156
|
sycommon/agent/mcp/__init__.py,sha256=iKrdDhIrFsNIkqG_kgcwNe-nOiM6uVfolKv44LfQ-FQ,636
|
|
153
157
|
sycommon/agent/mcp/models.py,sha256=zda4ho-UTYOJ5oPAZPZ-vxhfDRLghUCsMroHnA2A2QQ,1490
|
|
154
158
|
sycommon/agent/mcp/tool_loader.py,sha256=pwhZoSoZuQVYo6BgfdMoRHlGnRPDRxvOvxEgvUM5q7Q,17818
|
|
@@ -237,7 +241,7 @@ sycommon/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
237
241
|
sycommon/logging/async_sql_logger.py,sha256=JohGTnUIvHncvqPX-kJ1VXyexKrV5Rzmqzaeupi9xFI,2244
|
|
238
242
|
sycommon/logging/bounded_kafka_sink.py,sha256=ZfuPor7yubYYjny6iMVYBqt5tcnp_-nbE0RHJttn_Sg,5670
|
|
239
243
|
sycommon/logging/bounded_stdout_sink.py,sha256=GFC_FGfuzrB8ub3tSR8N38P3Md3srTknB_3uKmkLQDQ,4919
|
|
240
|
-
sycommon/logging/kafka_log.py,sha256=
|
|
244
|
+
sycommon/logging/kafka_log.py,sha256=NVcj88CnVMK4cFNj3qNgrF2k6ITDsCyQWf4giIaYYkE,81723
|
|
241
245
|
sycommon/logging/log_masker.py,sha256=Dzj45836jtQjUaEA1N2n5M3u5TJwRLyHk9ERxbVAcCk,22737
|
|
242
246
|
sycommon/logging/logger_levels.py,sha256=DYo4PQHDljYxPCZvCpfQa2LLlTS7XXULFilvibB-BB8,1680
|
|
243
247
|
sycommon/logging/logger_wrapper.py,sha256=TtzmGw_K5NjBGBq9Gjqtnh834izAv8TQwsOeL2fIbAI,481
|
|
@@ -366,9 +370,9 @@ sycommon/tests/test_services_plugin_defaults.py,sha256=PUIxnFmDpwL3ek-N1ZFcLcGEC
|
|
|
366
370
|
sycommon/tests/test_summarization_config.py,sha256=Ztb-eJXt2NrpBXNp7xST4Cwq4x8DK9pFuC7-bXUUOaE,16860
|
|
367
371
|
sycommon/tests/test_summarization_real.py,sha256=iTwwA_xQd5Zgkn849lu2M0zIHPnMp-3szsIGrg6G9J4,12406
|
|
368
372
|
sycommon/tests/test_summary_leak_e2e.py,sha256=vE5r9QCcZRmUy3YQASwdwCBsVrRcl8vU95sLUyB6u9s,34739
|
|
369
|
-
sycommon/tests/test_upgrade_aio_pika.py,sha256=
|
|
373
|
+
sycommon/tests/test_upgrade_aio_pika.py,sha256=wGxerUzX7EM0LC4mbu1k5BkfPH76UyXiYgTUzObJbCQ,7016
|
|
370
374
|
sycommon/tests/test_upgrade_langgraph_stream.py,sha256=1FEVuv8FPNeLOB6yht6NoQifHoiCtkrtBI4pB_PQYTE,5443
|
|
371
|
-
sycommon/tests/test_upgrade_verification.py,sha256=
|
|
375
|
+
sycommon/tests/test_upgrade_verification.py,sha256=xFC5REMfb8bAcraI1WUC94klFqH0l5zsXQXobU-CiIA,7608
|
|
372
376
|
sycommon/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
373
377
|
sycommon/tools/async_utils.py,sha256=e2Bp8v0LDrnViBIZ3zcCWtm_01w67vG34VhnAyGu9ZM,1015
|
|
374
378
|
sycommon/tools/docs.py,sha256=OPj2ETheuWjXLyaXtaZPbwmJKfJaYXV5s4XMVAUNrms,1607
|
|
@@ -382,8 +386,8 @@ sycommon/tools/timing.py,sha256=OiiE7P07lRoMzX9kzb8sZU9cDb0zNnqIlY5pWqHcnkY,2064
|
|
|
382
386
|
sycommon/tools/user_id.py,sha256=o-zsubGSR5rSSZf8Pk8B7AhE21ahDTTIW5JZmJO6Flw,4761
|
|
383
387
|
sycommon/xxljob/__init__.py,sha256=7eoBlQxv-B39IfRSCY2bkqdGYs1QRe1umAWd88VMEEM,86
|
|
384
388
|
sycommon/xxljob/xxljob_service.py,sha256=1yifwIBNGsCIxLnQjHKiBlbsigc_zvPH-dMTZcNxe-Q,7649
|
|
385
|
-
sycommon_python_lib-0.2.
|
|
386
|
-
sycommon_python_lib-0.2.
|
|
387
|
-
sycommon_python_lib-0.2.
|
|
388
|
-
sycommon_python_lib-0.2.
|
|
389
|
-
sycommon_python_lib-0.2.
|
|
389
|
+
sycommon_python_lib-0.2.10a26.dist-info/METADATA,sha256=0jwAtta3I0AjjUEYKkjTiZnJxNuyd4Qj0HHuuSEIoqo,8029
|
|
390
|
+
sycommon_python_lib-0.2.10a26.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
391
|
+
sycommon_python_lib-0.2.10a26.dist-info/entry_points.txt,sha256=gsR4SssKxDWjRU8ggidzNcdMXDPRSKRS7UaGyNP84Qg,92
|
|
392
|
+
sycommon_python_lib-0.2.10a26.dist-info/top_level.txt,sha256=RgphKrg7nJyZ7irJqbxFr-5H2LUYTvI7ivoWZH2hcD0,29
|
|
393
|
+
sycommon_python_lib-0.2.10a26.dist-info/RECORD,,
|
|
File without changes
|
{sycommon_python_lib-0.2.10a24.dist-info → sycommon_python_lib-0.2.10a26.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{sycommon_python_lib-0.2.10a24.dist-info → sycommon_python_lib-0.2.10a26.dist-info}/top_level.txt
RENAMED
|
File without changes
|