refactor(beaver): 移除Hermes相关引用和迁移代码,完善Beaver后端主线实现
移除了所有Hermes相关的命名引用,包括: - 从.gitignore中清理相关构建缓存文件 - 将README中的beaver-home路径配置更新 - 完善backend/README.md文档说明Beaver后端主线实现 - 移除Hermes风格的相关注释和兼容性代码 - 清理nanobot环境变量兼容性处理 - 删除技能迁移和服务迁移相关功能代码 - 更新测试用例中相关命名和函数名 BREAKING CHANGE: 移除了Hermes迁移相关API和CLI命令,不再支持nanobot环境变量兼容性
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from beaver.engine import AgentLoop, EngineLoader
|
||||
from beaver.engine.providers import make_provider_bundle
|
||||
@ -139,9 +138,36 @@ def test_openai_compatible_qwen_config_keeps_openai_provider() -> None:
|
||||
assert bundle.main_provider._resolve_model("qwen-plus") == "openai/qwen-plus"
|
||||
|
||||
|
||||
def test_load_config_reads_stevenli_mcp_authz_identity() -> None:
|
||||
repo_root = Path(__file__).resolve().parents[4]
|
||||
config_path = repo_root / "app-instance" / "runtime" / "instances" / "stevenli" / "nanobot-home" / "config.json"
|
||||
def test_load_config_reads_mcp_authz_identity(tmp_path) -> None:
|
||||
config_path = tmp_path / "beaver-home" / "config.json"
|
||||
config_path.parent.mkdir()
|
||||
config_path.write_text(
|
||||
json.dumps(
|
||||
{
|
||||
"tools": {
|
||||
"mcpServers": {
|
||||
"outlook_mcp": {
|
||||
"url": "http://10.6.80.29:8000/mcp",
|
||||
"authMode": "oauth_backend_token",
|
||||
"authAudience": "mcp:outlook_mcp",
|
||||
"authScopes": ["list_tools", "tool:mail_list_messages"],
|
||||
"toolTimeout": 60,
|
||||
"sensitive": True,
|
||||
}
|
||||
}
|
||||
},
|
||||
"authz": {
|
||||
"enabled": True,
|
||||
"baseUrl": "http://nano-authz-service:19090",
|
||||
},
|
||||
"backend_identity": {
|
||||
"backend_id": "stevenli",
|
||||
"client_id": "stevenli",
|
||||
},
|
||||
}
|
||||
),
|
||||
encoding="utf-8",
|
||||
)
|
||||
config = load_config(config_path=config_path)
|
||||
|
||||
server = config.tools.mcp_servers["outlook_mcp"]
|
||||
|
||||
Reference in New Issue
Block a user