Skip to content

Commit 22dd2a6

Browse files
authored
Merge branch 'AstrBotDevs:master' into feat/sdk-integration
2 parents 7fbe91f + b241b46 commit 22dd2a6

41 files changed

Lines changed: 727 additions & 181 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,17 @@ pre-commit install
225225

226226
### QQ Groups
227227

228-
- Group 9: 1076659624 (New)
229-
- Group 10: 1078079676 (New)
230-
- Group 1: 322154837
231-
- Group 3: 630166526
232-
- Group 5: 822130018
233-
- Group 6: 753075035
234-
- Group 7: 743746109
235-
- Group 8: 1030353265
228+
- Group 12: 916228568 (New)
229+
- Group 9: 1076659624 (Full)
230+
- Group 10: 1078079676 (Full)
231+
- Group 11: 704659519 (Full)
232+
- Group 1: 322154837 (Full)
233+
- Group 3: 630166526 (Full)
234+
- Group 4: 1077826412 (Full)
235+
- Group 5: 822130018 (Full)
236+
- Group 6: 753075035 (Full)
237+
- Group 7: 743746109 (Full)
238+
- Group 8: 1030353265 (Full)
236239

237240
- Developer Group(Chit-chat): 975206796
238241
- Developer Group(Formal): 1039761811

README_fr.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,17 @@ pre-commit install
217217

218218
### Groupes QQ
219219

220-
- Groupe 1 : 322154837
221-
- Groupe 3 : 630166526
222-
- Groupe 5 : 822130018
223-
- Groupe 6 : 753075035
220+
- Groupe 12 : 916228568 (nouveau)
221+
- Groupe 9 : 1076659624 (complet)
222+
- Groupe 10 : 1078079676 (complet)
223+
- Groupe 11 : 704659519 (complet)
224+
- Groupe 1 : 322154837 (complet)
225+
- Groupe 3 : 630166526 (complet)
226+
- Groupe 4 : 1077826412 (complet)
227+
- Groupe 5 : 822130018 (complet)
228+
- Groupe 6 : 753075035 (complet)
229+
- Groupe 7 : 743746109 (complet)
230+
- Groupe 8 : 1030353265 (complet)
224231
- Groupe développeurs : 975206796
225232
- Groupe développeurs (officiel) : 1039761811
226233

README_ja.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,17 @@ pre-commit install
218218

219219
### QQ グループ
220220

221-
- 1群: 322154837
222-
- 3群: 630166526
223-
- 5群: 822130018
224-
- 6群: 753075035
221+
- 12群: 916228568 (新)
222+
- 9群: 1076659624 (満員)
223+
- 10群: 1078079676 (満員)
224+
- 11群: 704659519 (満員)
225+
- 1群: 322154837 (満員)
226+
- 3群: 630166526 (満員)
227+
- 4群: 1077826412 (満員)
228+
- 5群: 822130018 (満員)
229+
- 6群: 753075035 (満員)
230+
- 7群: 743746109 (満員)
231+
- 8群: 1030353265 (満員)
225232
- 開発者群: 975206796
226233
- 開発者群(正式): 1039761811
227234

README_ru.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,17 @@ pre-commit install
217217

218218
### Группы QQ
219219

220-
- Группа 1: 322154837
221-
- Группа 3: 630166526
222-
- Группа 5: 822130018
223-
- Группа 6: 753075035
220+
- Группа 12: 916228568 (новая)
221+
- Группа 9: 1076659624 (полная)
222+
- Группа 10: 1078079676 (полная)
223+
- Группа 11: 704659519 (полная)
224+
- Группа 1: 322154837 (полная)
225+
- Группа 3: 630166526 (полная)
226+
- Группа 4: 1077826412 (полная)
227+
- Группа 5: 822130018 (полная)
228+
- Группа 6: 753075035 (полная)
229+
- Группа 7: 743746109 (полная)
230+
- Группа 8: 1030353265 (полная)
224231
- Группа разработчиков: 975206796
225232
- Группа разработчиков (официальная): 1039761811
226233

README_zh-TW.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,17 @@ pre-commit install
217217

218218
### QQ 群組
219219

220-
- 9 群: 1076659624 (新)
221-
- 10 群: 1078079676 (新)
222-
- 1 群:322154837
223-
- 3 群:630166526
224-
- 5 群:822130018
225-
- 6 群:753075035
226-
- 7 群:743746109
227-
- 8 群:1030353265
220+
- 12 群:916228568 (新)
221+
- 9 群:1076659624 (人滿)
222+
- 10 群:1078079676 (人滿)
223+
- 11 群:704659519 (人滿)
224+
- 1 群:322154837 (人滿)
225+
- 3 群:630166526 (人滿)
226+
- 4 群:1077826412 (人滿)
227+
- 5 群:822130018 (人滿)
228+
- 6 群:753075035 (人滿)
229+
- 7 群:743746109 (人滿)
230+
- 8 群:1030353265 (人滿)
228231
- 開發者群(闲聊吹水):975206796
229232
- 開發者群(正式):1039761811
230233

README_zh.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,17 @@ pre-commit install
218218

219219
### QQ 群组
220220

221-
- 9 群: 1076659624 (新)
222-
- 10 群: 1078079676 (新)
223-
- 1 群:322154837
224-
- 3 群:630166526
225-
- 5 群:822130018
226-
- 6 群:753075035
227-
- 7 群:743746109
228-
- 8 群:1030353265
221+
- 12 群:916228568 (新)
222+
- 9 群:1076659624 (人满)
223+
- 10 群:1078079676 (人满)
224+
- 11 群:704659519 (人满)
225+
- 1 群:322154837 (人满)
226+
- 3 群:630166526 (人满)
227+
- 4 群:1077826412 (人满)
228+
- 5 群:822130018 (人满)
229+
- 6 群:753075035 (人满)
230+
- 7 群:743746109 (人满)
231+
- 8 群:1030353265 (人满)
229232
- 开发者群(偏闲聊吹水):975206796
230233
- 开发者群(正式):1039761811
231234

astrbot/cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.22.0"
1+
__version__ = "4.22.1"

astrbot/core/computer/tools/browser.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,13 @@
88
from astrbot.core.astr_agent_context import AstrAgentContext
99

1010
from ..computer_client import get_booter
11+
from .permissions import check_admin_permission
1112

1213

1314
def _to_json(data: Any) -> str:
1415
return json.dumps(data, ensure_ascii=False, default=str)
1516

1617

17-
def _ensure_admin(context: ContextWrapper[AstrAgentContext]) -> str | None:
18-
if context.context.event.role != "admin":
19-
return (
20-
"error: Permission denied. Browser and skill lifecycle tools are only allowed "
21-
"for admin users."
22-
)
23-
return None
24-
25-
2618
async def _get_browser_component(context: ContextWrapper[AstrAgentContext]) -> Any:
2719
booter = await get_booter(
2820
context.context.context,
@@ -77,7 +69,7 @@ async def call(
7769
learn: bool = False,
7870
include_trace: bool = False,
7971
) -> ToolExecResult:
80-
if err := _ensure_admin(context):
72+
if err := check_admin_permission(context, "Using browser tools"):
8173
return err
8274
try:
8375
browser = await _get_browser_component(context)
@@ -140,7 +132,7 @@ async def call(
140132
learn: bool = False,
141133
include_trace: bool = False,
142134
) -> ToolExecResult:
143-
if err := _ensure_admin(context):
135+
if err := check_admin_permission(context, "Using browser tools"):
144136
return err
145137
try:
146138
browser = await _get_browser_component(context)
@@ -187,7 +179,7 @@ async def call(
187179
description: str | None = None,
188180
tags: str | None = None,
189181
) -> ToolExecResult:
190-
if err := _ensure_admin(context):
182+
if err := check_admin_permission(context, "Using browser tools"):
191183
return err
192184
try:
193185
browser = await _get_browser_component(context)

astrbot/core/computer/tools/neo_skills.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from astrbot.core.skills.neo_skill_sync import NeoSkillSyncManager
1111

1212
from ..computer_client import get_booter
13+
from .permissions import check_admin_permission
1314

1415

1516
def _to_jsonable(model_like: Any) -> Any:
@@ -26,12 +27,6 @@ def _to_json_text(data: Any) -> str:
2627
return json.dumps(_to_jsonable(data), ensure_ascii=False, default=str)
2728

2829

29-
def _ensure_admin(context: ContextWrapper[AstrAgentContext]) -> str | None:
30-
if context.context.event.role != "admin":
31-
return "error: Permission denied. Skill lifecycle tools are only allowed for admin users."
32-
return None
33-
34-
3530
async def _get_neo_context(
3631
context: ContextWrapper[AstrAgentContext],
3732
) -> tuple[Any, Any]:
@@ -59,7 +54,7 @@ async def _run(
5954
neo_call: Callable[[Any, Any], Awaitable[Any]],
6055
error_action: str,
6156
) -> ToolExecResult:
62-
if err := _ensure_admin(context):
57+
if err := check_admin_permission(context, "Using skill lifecycle tools"):
6358
return err
6459
try:
6560
client, sandbox = await _get_neo_context(context)
@@ -392,7 +387,7 @@ async def call(
392387
stage: str = "canary",
393388
sync_to_local: bool = True,
394389
) -> ToolExecResult:
395-
if err := _ensure_admin(context):
390+
if err := check_admin_permission(context, "Using skill lifecycle tools"):
396391
return err
397392
if stage not in {"canary", "stable"}:
398393
return "Error promoting skill candidate: stage must be canary or stable."

astrbot/core/config/default.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from astrbot.core.utils.astrbot_path import get_astrbot_data_path
77

8-
VERSION = "4.22.0"
8+
VERSION = "4.22.1"
99
DB_PATH = os.path.join(get_astrbot_data_path(), "data_v4.db")
1010
PERSONAL_WECHAT_CONFIG_METADATA = {
1111
"weixin_oc_base_url": {

0 commit comments

Comments
 (0)