diff --git a/.dockerignore b/.dockerignore index 965adc9e1..7a61edd14 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,7 +17,6 @@ ENV/ .conda/ dashboard/ data/ -changelogs/ tests/ .ruff_cache/ .astrbot diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index 484959318..c97eb1a4c 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -1,42 +1,40 @@ -name: '🎉 功能建议' +name: '🎉 Feature Request / 功能建议' title: "[Feature]" -description: 提交建议帮助我们改进。 +description: Submit a suggestion to help us improve. / 提交建议帮助我们改进。 labels: [ "enhancement" ] body: - type: markdown attributes: value: | - 感谢您抽出时间提出新功能建议,请准确解释您的想法。 + Thank you for taking the time to suggest a new feature! Please explain your idea clearly and accurately. / 感谢您抽出时间提出新功能建议,请准确解释您的想法。 - type: textarea attributes: - label: 描述 - description: 简短描述您的功能建议。 + label: Description / 描述 + description: Please describe the feature you want to be added in detail. / 请详细描述您希望添加的功能。 - type: textarea attributes: - label: 使用场景 - description: 你想要发生什么? - placeholder: > - 一个清晰且具体的描述这个功能的使用场景。 + label: Use Case / 使用场景 + description: Please describe the use case for this feature. / 请描述这个功能的使用场景。 - type: checkboxes attributes: - label: 你愿意提交PR吗? + label: Willing to Submit PR? / 是否愿意提交PR? description: > - 这不是必须的,但我们欢迎您的贡献。 + This is not required, but if you are willing to submit a PR to implement this feature, it would be greatly appreciated! / 这不是必需的,但如果您愿意提交 PR 来实现这个功能,我们将不胜感激! options: - - label: 是的, 我愿意提交PR! + - label: Yes, I am willing to submit a PR. / 是的,我愿意提交 PR。 - type: checkboxes attributes: label: Code of Conduct options: - label: > - 我已阅读并同意遵守该项目的 [行为准则](https://docs.github.com/zh/site-policy/github-terms/github-community-code-of-conduct)。 + I have read and agree to abide by the project's [Code of Conduct](https://docs.github.com/zh/site-policy/github-terms/github-community-code-of-conduct). / required: true - type: markdown attributes: - value: "感谢您填写我们的表单!" \ No newline at end of file + value: "Thank you for filling out our form!" \ No newline at end of file diff --git a/.github/workflows/code-format.yml b/.github/workflows/code-format.yml index a183f1bb2..3de1bea55 100644 --- a/.github/workflows/code-format.yml +++ b/.github/workflows/code-format.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.10' + python-version: '3.12' - name: Install UV run: pip install uv diff --git a/.github/workflows/coverage_test.yml b/.github/workflows/coverage_test.yml index 6ae8c7b9b..f0019ee7e 100644 --- a/.github/workflows/coverage_test.yml +++ b/.github/workflows/coverage_test.yml @@ -37,7 +37,7 @@ jobs: mkdir -p data/temp export TESTING=true export ZHIPU_API_KEY=${{ secrets.OPENAI_API_KEY }} - pytest --cov=. -v -o log_cli=true -o log_level=DEBUG + pytest --cov=astrbot -v -o log_cli=true -o log_level=DEBUG - name: Upload results to Codecov uses: codecov/codecov-action@v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59c229b04..8d5791ba3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,170 +102,11 @@ jobs: cp "dashboard/AstrBot-${VERSION_TAG}-dashboard.zip" "dashboard/astrbot-webui-${VERSION_TAG}.zip" rclone copy "dashboard/astrbot-webui-${VERSION_TAG}.zip" "r2:${R2_BUCKET_NAME}" --progress - build-desktop: - name: Build ${{ matrix.name }} - runs-on: ${{ matrix.runner }} - strategy: - fail-fast: false - matrix: - include: - - name: linux-x64 - runner: ubuntu-24.04 - os: linux - arch: amd64 - - name: linux-arm64 - runner: ubuntu-24.04-arm - os: linux - arch: arm64 - - name: windows-x64 - runner: windows-2022 - os: win - arch: amd64 - - name: windows-arm64 - runner: windows-11-arm - os: win - arch: arm64 - - name: macos-x64 - runner: macos-15-intel - os: mac - arch: amd64 - - name: macos-arm64 - runner: macos-15 - os: mac - arch: arm64 - env: - CSC_IDENTITY_AUTO_DISCOVERY: "false" - steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - fetch-depth: 0 - ref: ${{ inputs.ref || github.ref }} - - - name: Resolve tag - id: tag - shell: bash - run: | - if [ "${{ github.event_name }}" = "push" ]; then - tag="${GITHUB_REF_NAME}" - elif [ -n "${{ inputs.tag }}" ]; then - tag="${{ inputs.tag }}" - else - tag="$(git describe --tags --abbrev=0)" - fi - if [ -z "$tag" ]; then - echo "Failed to resolve tag." >&2 - exit 1 - fi - echo "tag=$tag" >> "$GITHUB_OUTPUT" - - - name: Setup uv - uses: astral-sh/setup-uv@v7 - - - name: Setup Python - uses: actions/setup-python@v6 - with: - python-version: "3.12" - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 10.28.2 - - - name: Setup Node.js - uses: actions/setup-node@v6 - with: - node-version: '24.13.0' - cache: "pnpm" - cache-dependency-path: | - dashboard/pnpm-lock.yaml - desktop/pnpm-lock.yaml - - - name: Prepare OpenSSL for Windows ARM64 - if: ${{ matrix.os == 'win' && matrix.arch == 'arm64' }} - shell: pwsh - run: | - git clone https://github.com/microsoft/vcpkg.git C:\vcpkg - & C:\vcpkg\bootstrap-vcpkg.bat -disableMetrics - & C:\vcpkg\vcpkg.exe install openssl:arm64-windows - - "VCPKG_ROOT=C:\vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - "VCPKGRS_TRIPLET=arm64-windows" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - "OPENSSL_DIR=C:\vcpkg\installed\arm64-windows" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - "OPENSSL_ROOT_DIR=C:\vcpkg\installed\arm64-windows" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - "OPENSSL_LIB_DIR=C:\vcpkg\installed\arm64-windows\lib" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - "OPENSSL_INCLUDE_DIR=C:\vcpkg\installed\arm64-windows\include" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - - - name: Install dependencies - shell: bash - run: | - uv sync - pnpm --dir dashboard install --frozen-lockfile - pnpm --dir desktop install --frozen-lockfile - - - name: Build desktop package - shell: bash - run: | - pnpm --dir dashboard run build - pnpm --dir desktop run build:webui - pnpm --dir desktop run build:backend - pnpm --dir desktop run sync:version - pnpm --dir desktop exec electron-builder --publish never - - - name: Normalize artifact names - shell: bash - env: - NAME_PREFIX: AstrBot-${{ steps.tag.outputs.tag }}-${{ matrix.arch }}-${{ matrix.os }} - run: | - shopt -s nullglob - out_dir="desktop/dist/release" - mkdir -p "$out_dir" - files=( - desktop/dist/*.AppImage - desktop/dist/*.dmg - desktop/dist/*.zip - desktop/dist/*.exe - ) - if [ ${#files[@]} -eq 0 ]; then - echo "No desktop artifacts found to rename." >&2 - exit 1 - fi - for src in "${files[@]}"; do - file="$(basename "$src")" - case "$file" in - *.AppImage) - dest="$out_dir/${NAME_PREFIX}.AppImage" - ;; - *.dmg) - dest="$out_dir/${NAME_PREFIX}.dmg" - ;; - *.exe) - dest="$out_dir/${NAME_PREFIX}.exe" - ;; - *.zip) - dest="$out_dir/${NAME_PREFIX}.zip" - ;; - *) - continue - ;; - esac - cp "$src" "$dest" - done - ls -la "$out_dir" - - - name: Upload desktop artifacts - uses: actions/upload-artifact@v6 - with: - name: AstrBot-${{ steps.tag.outputs.tag }}-${{ matrix.arch }}-${{ matrix.os }} - if-no-files-found: error - path: desktop/dist/release/* - publish-release: name: Publish GitHub Release runs-on: ubuntu-24.04 needs: - build-dashboard - - build-desktop steps: - name: Checkout repository uses: actions/checkout@v6 @@ -296,12 +137,6 @@ jobs: name: Dashboard-${{ steps.tag.outputs.tag }} path: release-assets - - name: Download desktop artifacts - uses: actions/download-artifact@v7 - with: - pattern: AstrBot-${{ steps.tag.outputs.tag }}-* - path: release-assets - merge-multiple: true - name: Resolve release notes id: notes diff --git a/.gitignore b/.gitignore index e060b85a6..e3ffbd473 100644 --- a/.gitignore +++ b/.gitignore @@ -33,13 +33,6 @@ tests/astrbot_plugin_openai dashboard/node_modules/ dashboard/dist/ .pnpm-store/ -desktop/node_modules/ -desktop/dist/ -desktop/out/ -desktop/resources/backend/astrbot-backend* -desktop/resources/backend/*.exe -desktop/resources/webui/* -desktop/resources/.pyinstaller/ package-lock.json yarn.lock diff --git a/README.md b/README.md index ac1cd2f70..23eebe39c 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ AstrBot 是一个开源的一站式 Agentic 个人和群聊助手,可在 QQ、 2. ✨ AI 大模型对话,多模态,Agent,MCP,Skills,知识库,人格设定,自动压缩对话。 3. 🤖 支持接入 Dify、阿里云百炼、Coze 等智能体平台。 4. 🌐 多平台,支持 QQ、企业微信、飞书、钉钉、微信公众号、Telegram、Slack 以及[更多](#支持的消息平台)。 -5. 📦 插件扩展,已有近 800 个插件可一键安装。 +5. 📦 插件扩展,已有 1000+ 个插件可一键安装。 6. 🛡️ [Agent Sandbox](https://docs.astrbot.app/use/astrbot-agent-sandbox.html) 隔离化环境,安全地执行任何代码、调用 Shell、会话级资源复用。 7. 💻 WebUI 支持。 8. 🌈 Web ChatUI 支持,ChatUI 内置代理沙盒、网页搜索等。 @@ -56,7 +56,7 @@ AstrBot 是一个开源的一站式 Agentic 个人和群聊助手,可在 QQ、
| 💙 Ролевые игры & Эмоциональная поддержка | -✨ Проактивный Агент(Agent) | -🚀 Универсальные Агентные возможности | -🧩 Универсальные Агентные (Agentic) возможности | +✨ Проактивный Агент (Agent) | +🚀 Универсальные возможности Агента | +🧩 1000+ плагинов сообщества | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 💙 角色扮演 & 情感陪伴 | ✨ 主動式 Agent | 🚀 通用 Agentic 能力 | -🧩 900+ 社區外掛程式 | +🧩 1000+ 社區外掛程式 | |||||||||||||||||
| {{ tm('apiKey.table.name') }} | +{{ tm('apiKey.table.prefix') }} | +{{ tm('apiKey.table.scopes') }} | +{{ tm('apiKey.table.status') }} | +{{ tm('apiKey.table.lastUsed') }} | +{{ tm('apiKey.table.createdAt') }} | +{{ tm('apiKey.table.actions') }} | +|||||||||||||||
| {{ item.name }} | +{{ item.key_prefix }} |
+ {{ (item.scopes || []).join(', ') }} | +
+ |
+ {{ formatDate(item.last_used_at) }} | +{{ formatDate(item.created_at) }} | +
+ |
+ |||||||||||||||
| + {{ tm('apiKey.empty') }} + | +|||||||||||||||||||||