chore: auto commit

This commit is contained in:
LIghtJUNction
2026-03-23 21:35:18 +08:00
parent 0f74731c53
commit ced1a4fbb6
6 changed files with 17 additions and 5 deletions

View File

@@ -30,8 +30,9 @@ from __future__ import annotations
from typing import Any
# Import from _internal package (the canonical source)
from astrbot._internal.mcp.client import MCPClient
from astrbot._internal.mcp.tool import MCPTool
# TODO: fix path - should be protocols.mcp.client
from astrbot._internal.protocols.mcp.client import McpClient as MCPClient
from astrbot._internal.protocols.mcp.tool import MCPTool
__all__ = [
"MCPClient",

View File

@@ -24,7 +24,8 @@ Example:
from __future__ import annotations
# Import from _internal package (the canonical source)
from astrbot._internal.skills.manager import SkillInfo, SkillManager
# TODO: fix path - should be core.skills.skill_manager
from astrbot.core.skills.skill_manager import SkillInfo, SkillManager
from astrbot._internal.tools.base import FunctionTool
__all__ = ["SkillInfo", "SkillManager", "get_skill_manager", "skill_to_tool"]

View File

@@ -60,6 +60,7 @@ def verify_dashboard_password(value: str, stored_hash: str) -> bool:
Supported format:
- Argon2 encoded string: $argon2id$...
- PBKDF2 encoded string: pbkdf2_sha256$...
- Legacy SHA-256 (64 hex chars) and MD5 (32 hex chars) for backward compatibility.
"""
if not stored_hash:
return False
@@ -83,6 +84,14 @@ def verify_dashboard_password(value: str, stored_hash: str) -> bool:
except Exception:
return False
# Legacy plain hex digests: SHA-256 (64 hex chars) and MD5 (32 hex chars).
value_l = value.encode("utf-8")
s = stored_hash.lower()
if len(s) == 64 and all(ch in "0123456789abcdef" for ch in s):
return hashlib.sha256(value_l).hexdigest() == s
if len(s) == 32 and all(ch in "0123456789abcdef" for ch in s):
return hashlib.md5(value_l).hexdigest() == s
return False

View File

@@ -28,12 +28,10 @@ from astrbot._internal.skills import (
SkillInfo,
SkillManager,
build_skills_prompt,
SkillToToolConverter,
)
__all__ = [
"SkillInfo",
"SkillManager",
"build_skills_prompt",
"SkillToToolConverter",
]

View File

@@ -20,6 +20,8 @@ abp协议astrbot protocol client + server (相当于内置插件)
协议层只管传输
runtime则负责响应和调度
异步库使用anyio
## 覆盖率测试
需要完善覆盖率测试
## 类型标注
需要通过ty类型检查
避免使用Any cast

View File

@@ -70,6 +70,7 @@ dependencies = [
"plumbum>=1.10.0",
"textual>=8.1.1",
"openai-agents>=0.12.5",
"fastapi>=0.135.1",
]
[dependency-groups]