mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-30 04:15:45 +08:00
fix(qqofficial): correct group mentions and reply sequences (LANG-181) (#2799)
* fix(qqofficial): preserve native mentions and reply sequences (LANG-181) Co-authored-by: multica-agent <[email protected]> * fix(qqofficial): respect group mention rendering capability Co-authored-by: multica-agent <[email protected]> --------- Co-authored-by: multica-agent <[email protected]>
This commit is contained in:
co-authored by
multica-agent
parent
4b537973f9
commit
0219007acd
@@ -6,6 +6,10 @@ Local Agent 是 LangBot 官方的进程内运行器。它在 LangBot 插件进
|
||||
|
||||
`plugin:langbot-team/LocalAgent/default`
|
||||
|
||||
## SDK 兼容性
|
||||
|
||||
LocalAgent 0.2.3 使用 `langbot-plugin>=0.7.18,<0.8.0`,允许同一 0.7 系列的稳定补丁更新,不再精确锁定单个 SDK 版本。测试环境的 `uv.lock` 仍固定已验证版本以保证可复现;插件包的 `requirements.txt` 与项目声明使用相同的兼容范围。跨 0.8 系列升级需要单独验证。
|
||||
|
||||
## 主要能力
|
||||
|
||||
- 支持主模型与 fallback 模型切换。
|
||||
|
||||
@@ -3,7 +3,7 @@ kind: Plugin
|
||||
metadata:
|
||||
author: langbot-team
|
||||
name: LocalAgent
|
||||
version: 0.2.2
|
||||
version: 0.2.3
|
||||
repository: https://github.com/langbot-app/LangBot/tree/master/plugins/Runner/LocalAgent
|
||||
label:
|
||||
en_US: Local Agent
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
[project]
|
||||
name = "langbot-local-agent"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
description = "Built-in agent with model fallback, tools, and knowledge retrieval"
|
||||
requires-python = ">=3.11,<4.0"
|
||||
dependencies = [
|
||||
"pydantic>=2.0.0",
|
||||
"langbot-plugin==0.7.18",
|
||||
"langbot-plugin>=0.7.18,<0.8.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
langbot-plugin==0.7.18
|
||||
langbot-plugin>=0.7.18,<0.8.0
|
||||
pydantic>=2.0.0
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import tomllib
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
import yaml
|
||||
from packaging.requirements import Requirement
|
||||
|
||||
PLUGIN_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def _sdk_requirements():
|
||||
project = tomllib.loads((PLUGIN_ROOT / "pyproject.toml").read_text())
|
||||
packaged = (PLUGIN_ROOT / "requirements.txt").read_text().splitlines()
|
||||
return [
|
||||
next(Requirement(line) for line in requirements if line.startswith("langbot-plugin"))
|
||||
for requirements in (project["project"]["dependencies"], packaged)
|
||||
]
|
||||
|
||||
|
||||
def test_project_and_packaged_sdk_constraints_match():
|
||||
project, packaged = _sdk_requirements()
|
||||
assert project.specifier == packaged.specifier
|
||||
assert str(project.specifier) == "<0.8.0,>=0.7.18"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("version", ["0.7.18", "0.7.19", "0.7.99"])
|
||||
def test_sdk_constraints_accept_compatible_stable_patches(version):
|
||||
assert all(requirement.specifier.contains(version) for requirement in _sdk_requirements())
|
||||
|
||||
|
||||
@pytest.mark.parametrize("version", ["0.7.16", "0.7.17", "0.8.0", "1.0.0"])
|
||||
def test_sdk_constraints_reject_unverified_versions(version):
|
||||
assert not any(requirement.specifier.contains(version) for requirement in _sdk_requirements())
|
||||
|
||||
|
||||
def test_manifest_and_project_versions_match():
|
||||
project = tomllib.loads((PLUGIN_ROOT / "pyproject.toml").read_text())
|
||||
manifest = yaml.safe_load((PLUGIN_ROOT / "manifest.yaml").read_text())
|
||||
assert project["project"]["version"] == manifest["metadata"]["version"]
|
||||
Generated
+2
-2
@@ -456,7 +456,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "langbot-local-agent"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "langbot-plugin" },
|
||||
@@ -472,7 +472,7 @@ dev = [
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "langbot-plugin", specifier = "==0.7.18" },
|
||||
{ name = "langbot-plugin", specifier = ">=0.7.18,<0.8.0" },
|
||||
{ name = "pydantic", specifier = ">=2.0.0" },
|
||||
{ name = "pytest", marker = "extra == 'dev'", specifier = ">=7.0.0" },
|
||||
{ name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.21.0" },
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
},
|
||||
{
|
||||
"id": "langbot-team/LocalAgent",
|
||||
"version": "0.2.2",
|
||||
"version": "0.2.3",
|
||||
"category": "Runner",
|
||||
"path": "Runner/LocalAgent",
|
||||
"repository": "https://github.com/langbot-app/LangBot/tree/master/plugins/Runner/LocalAgent"
|
||||
|
||||
Reference in New Issue
Block a user