Skip to content

Commit 19f7e85

Browse files
author
AstrBot Local
committed
merge: upstream v4.19.4 into local
- 56 files taken from upstream (wecom, dingtalk, telegram, dashboard, etc.) - internal.py: taken from upstream (cleaner _save_to_history refactor) - respond/stage.py: kept ours + applied upstream Poke bugfix (target_id()) - AGENTS.md, astr_main_agent*.py, astr_agent_run_util.py: kept ours (title generator, suppress-duplicate, proactive-send tracking) - provider/entities.py + tool_loop_agent_runner.py: kept ours (LLM_CONTROL_CODE_* + empty-retry + context-overflow handling) - openai_source.py: kept ours (retry, unknown-tool, robust JSON parse) - qqofficial_message_event.py: kept ours (state=1 fix, \n only on state=10, buffer clear) - qqofficial_platform_adapter.py: kept ours (send_by_session enhancement)
2 parents fbae9c6 + fc33b3e commit 19f7e85

286 files changed

Lines changed: 24653 additions & 560 deletions

File tree

Some content is hidden

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

.github/workflows/build-docs.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
paths:
7+
- "docs/**"
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest # 运行环境
12+
steps:
13+
- name: checkout
14+
uses: actions/checkout@master
15+
- name: nodejs installation
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: "18"
19+
- name: npm install
20+
run: npm add -D vitepress
21+
working-directory: './docs' # working-directory 指定 shell 命令运行目录
22+
- name: npm run build
23+
run: npm run docs:build
24+
working-directory: './docs'
25+
- name: scp
26+
uses: appleboy/scp-action@master
27+
with:
28+
host: ${{ secrets.HOST_NEKO }}
29+
username: ${{ secrets.USERNAME }}
30+
password: ${{ secrets.PASSWORDNEKO }}
31+
source: 'docs/.vitepress/dist/*'
32+
target: '/tmp/'
33+
- name: script
34+
uses: appleboy/ssh-action@master
35+
with:
36+
host: ${{ secrets.HOST_NEKO }}
37+
username: ${{ secrets.USERNAME }}
38+
password: ${{ secrets.PASSWORDNEKO }}
39+
script: |
40+
mkdir -p /root/docker_data/caddy/caddy_data/static_site/abv4/
41+
rm -rf /root/docker_data/caddy/caddy_data/static_site/abv4/*
42+
mv /tmp/docs/.vitepress/dist/* /root/docker_data/caddy/caddy_data/static_site/abv4/
43+
rm -rf /tmp/docs/

.github/workflows/sync-wiki.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: sync wiki
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
paths:
9+
- '.github/workflows/sync-wiki.yml'
10+
- 'docs/scripts/sync_docs_to_wiki.py'
11+
- 'docs/tests/test_sync_docs_to_wiki.py'
12+
- 'docs/zh/**'
13+
- 'docs/en/**'
14+
15+
concurrency:
16+
group: sync-wiki-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
sync:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
25+
steps:
26+
- name: Validate manual ref
27+
if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/master'
28+
run: |
29+
echo "This workflow only publishes from refs/heads/master. Re-run it from the master branch."
30+
exit 1
31+
32+
- name: Check out docs repository
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Python
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: '3.11'
39+
40+
- name: Run sync unit tests
41+
working-directory: docs
42+
run: python -m unittest discover -s tests -p 'test_sync_docs_to_wiki.py' -v
43+
44+
- name: Validate internal doc links
45+
run: python docs/scripts/sync_docs_to_wiki.py --source-root docs --check-links-only
46+
47+
- name: Clone AstrBot wiki
48+
env:
49+
WIKI_TOKEN: ${{ secrets.ASTRBOT_WIKI_TOKEN }}
50+
run: |
51+
test -n "$WIKI_TOKEN"
52+
git clone "https://x-access-token:${WIKI_TOKEN}@github.com/AstrBotDevs/AstrBot.wiki.git" wiki
53+
54+
- name: Generate wiki pages
55+
run: python docs/scripts/sync_docs_to_wiki.py --source-root docs --wiki-root wiki
56+
57+
- name: Commit and push wiki changes
58+
working-directory: wiki
59+
run: |
60+
git config user.name "github-actions[bot]"
61+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
62+
git add .
63+
if git diff --cached --quiet; then
64+
echo "No wiki changes to push"
65+
exit 0
66+
fi
67+
git commit -m "docs: sync wiki from AstrBot-1/docs"
68+
git push

.gitignore

Lines changed: 63 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,63 @@
1-
__pycache__/
2-
*.pyc
3-
*.pyo
4-
*.pyd
5-
.Python
6-
*.egg-info/
7-
dist/
8-
build/
9-
.venv/
10-
venv/
11-
*.log
12-
data/
13-
*.bak
14-
*.tmp
15-
.env
1+
# Python related
2+
__pycache__
3+
.mypy_cache
4+
.venv*
5+
.conda/
6+
uv.lock
7+
.coverage
8+
9+
# IDE and editors
10+
.vscode
11+
.idea
12+
13+
# Logs and temporary files
14+
botpy.log
15+
logs/
16+
temp
17+
cookies.json
18+
19+
# Data files
20+
data_v2.db
21+
data_v3.db
22+
data
23+
configs/session
24+
configs/config.yaml
25+
cmd_config.json
26+
27+
# Plugins
28+
addons/plugins
29+
astrbot/builtin_stars/python_interpreter/workplace
30+
tests/astrbot_plugin_openai
31+
32+
# Dashboard
33+
dashboard/node_modules/
34+
dashboard/dist/
35+
.pnpm-store/
36+
package-lock.json
37+
yarn.lock
38+
39+
# Bundled dashboard dist (generated by hatch_build.py during pip wheel build)
40+
astrbot/dashboard/dist/
41+
42+
# Operating System
43+
**/.DS_Store
44+
.DS_Store
45+
46+
# AstrBot specific
47+
.astrbot
48+
astrbot.lock
49+
50+
# Other
51+
chroma
52+
venv/*
53+
pytest.ini
54+
AGENTS.md
55+
IFLOW.md
56+
57+
# genie_tts data
58+
CharacterModels/
59+
GenieData/
60+
.agent/
61+
.codex/
62+
.opencode/
63+
.kilocode/

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ astrbot
8383

8484
> Requires [uv](https://docs.astral.sh/uv/) to be installed.
8585
86+
> [!NOTE]
87+
> For macOS user: due to macOS security checks, the first run of the `astrbot` command may take longer (about 10-20s).
88+
89+
Update `astrbot`:
90+
91+
```bash
92+
uv tool upgrade astrbot
93+
```
94+
8695
### Docker Deployment
8796

8897
For users familiar with containers and looking for a more stable, production-ready deployment method, we recommend deploying AstrBot with Docker / Docker Compose.
@@ -216,12 +225,15 @@ pre-commit install
216225

217226
### QQ Groups
218227

228+
- Group 9: 1076659624 (New)
229+
- Group 10: 1078079676 (New)
219230
- Group 1: 322154837
220231
- Group 3: 630166526
221232
- Group 5: 822130018
222233
- Group 6: 753075035
223234
- Group 7: 743746109
224235
- Group 8: 1030353265
236+
225237
- Developer Group: 975206796
226238

227239
### Discord Server

README_fr.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ astrbot
8383

8484
> [uv](https://docs.astral.sh/uv/) doit être installé.
8585
86+
> [!NOTE]
87+
> Pour les utilisateurs macOS : en raison des vérifications de sécurité de macOS, la première exécution de la commande `astrbot` peut prendre plus de temps (environ 10-20s).
88+
89+
Mettre à jour `astrbot` :
90+
91+
```bash
92+
uv tool upgrade astrbot
93+
```
94+
8695
### Déploiement Docker
8796

8897
Pour les utilisateurs familiers avec les conteneurs et qui souhaitent une méthode plus stable et adaptée à la production, nous recommandons de déployer AstrBot avec Docker / Docker Compose.

README_ja.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ astrbot
8383

8484
> [uv](https://docs.astral.sh/uv/) のインストールが必要です。
8585
86+
> [!NOTE]
87+
> macOS ユーザーの場合:macOS のセキュリティチェックにより、`astrbot` コマンドの初回実行に時間がかかる場合があります(約 10〜20 秒)。
88+
89+
`astrbot` の更新:
90+
91+
```bash
92+
uv tool upgrade astrbot
93+
```
94+
8695
### Docker デプロイ
8796

8897
コンテナ運用に慣れており、より安定した本番向けのデプロイ方法を求めるユーザーには、Docker / Docker Compose での AstrBot デプロイをおすすめします。

README_ru.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ astrbot
8383

8484
> Требуется установленный [uv](https://docs.astral.sh/uv/).
8585
86+
> [!NOTE]
87+
> Для пользователей macOS: из-за проверок безопасности macOS первый запуск команды `astrbot` может занять больше времени (около 10-20 секунд).
88+
89+
Обновить `astrbot`:
90+
91+
```bash
92+
uv tool upgrade astrbot
93+
```
94+
8695
### Развёртывание Docker
8796

8897
Для пользователей, знакомых с контейнерами и которым нужен более стабильный и подходящий для production способ, мы рекомендуем разворачивать AstrBot через Docker / Docker Compose.

README_zh-TW.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ astrbot
8383

8484
> 需要安裝 [uv](https://docs.astral.sh/uv/)
8585
86+
> [!NOTE]
87+
> 對於 macOS 使用者:由於 macOS 安全性檢查,首次執行 `astrbot` 指令可能需要較長時間(約 10-20 秒)。
88+
89+
更新 `astrbot`
90+
91+
```bash
92+
uv tool upgrade astrbot
93+
```
94+
8695
### Docker 部署
8796

8897
對於熟悉容器、希望獲得更穩定且更適合正式環境部署方式的使用者,我們推薦使用 Docker / Docker Compose 部署 AstrBot。
@@ -208,10 +217,14 @@ pre-commit install
208217

209218
### QQ 群組
210219

220+
- 9 群: 1076659624 (新)
221+
- 10 群: 1078079676 (新)
211222
- 1 群:322154837
212223
- 3 群:630166526
213224
- 5 群:822130018
214225
- 6 群:753075035
226+
- 7 群:743746109
227+
- 8 群:1030353265
215228
- 開發者群:975206796
216229

217230
### Discord 群組

README_zh.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ astrbot
8383

8484
> 需要安装 [uv](https://docs.astral.sh/uv/)
8585
86+
> [!NOTE]
87+
> 对于 macOS 用户:由于 macOS 安全检查,首次运行 `astrbot` 命令可能需要较长时间(约 10-20 秒)。
88+
89+
更新 `astrbot`
90+
91+
```bash
92+
uv tool upgrade astrbot
93+
```
94+
8695
### Docker 部署
8796

8897
对于熟悉容器、希望获得更稳定且更适合生产环境部署方式的用户,我们推荐使用 Docker / Docker Compose 部署 AstrBot。
@@ -209,6 +218,8 @@ pre-commit install
209218

210219
### QQ 群组
211220

221+
- 9 群: 1076659624 (新)
222+
- 10 群: 1078079676 (新)
212223
- 1 群:322154837
213224
- 3 群:630166526
214225
- 5 群:822130018

astrbot/cli/__init__.py

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

0 commit comments

Comments
 (0)