LIghtJUNction
dcaaf6286a
test: comprehensive test coverage and type fixes
...
- Add 100+ new test files covering provider sources, platform adapters,
agent runners, star/plugin system, knowledge base, core utils,
pipeline, computer tools, builtin commands, and dashboard routes
- Fix Python type errors in sqlite.py (col() wrappers for SQLModel),
astr_agent_tool_exec, core_lifecycle, star context/manager
- Fix TypeScript strict mode errors across 30+ dashboard Vue files
- Add import smoke tests, auth roundtrip, startup tests
- Add compile-all check and CLI entry test for AUR compatibility
- Restore BotMessageAccumulator and helpers lost in merge
2026-04-29 06:29:56 +08:00
LIghtJUNction
0208dbb15f
Merge branch 'master' of https://github.com/AstrBotDevs/AstrBot into dev
...
# Conflicts:
# dashboard/vite.config.ts
2026-04-29 02:16:18 +08:00
エイカク
2f33c34b5c
fix: protect desktop plugin installs with core lock ( #7872 )
2026-04-28 21:10:19 +09:00
LIghtJUNction
18e66595f0
chore: ruff check --fix && ruff format .
2026-04-10 20:12:33 +08:00
LIghtJUNction
ec1af1ac0f
ruff check --fix --select ALL
2026-04-10 19:57:02 +08:00
エイカク
122e6c719f
fix: make desktop plugin dependency loading safer on Windows ( #7446 )
...
* fix: make desktop plugin dependency loading safer on Windows
* fix: restore dependency recovery after precheck fallback
* test: cover version mismatch reinstall path
* refactor: clarify dependency recovery state handling
* style: format star manager with ruff
* fix: skip dependency recovery for plugin import errors
* fix: surface unexpected dependency recovery failures
2026-04-10 17:08:10 +09:00
LIghtJUNction
868c81bbc7
chore: commit all changes
2026-04-02 21:23:23 +08:00
LIghtJUNction
92bae1fdae
docs: replace prints with logger in upload_doc_images_to_r2.py
2026-03-19 23:30:25 +08:00
LIghtJUNction
a3371ad6c8
core: refactor modules & fix typing/runtime issues
2026-03-19 23:06:27 +08:00
エイカク
40076b6aff
fix: set packaged Windows runtime build env for pip native builds ( #6575 )
...
* Fix Windows packaged runtime pip build env
* test(pip): cover packaged runtime env injection edges
* refactor(pip): tighten packaged runtime env handling
* test(pip): cover missing runtime build dirs
* fix(pip): build runtime env inside locked section
* test(pip): expand windows path normalization coverage
* refactor(pip): build runtime env from snapshots
* fix(pip): preserve windows env key semantics
* refactor(pip): simplify windows runtime env handling
Keep the in-process pip environment mutation and case-insensitive INCLUDE/LIB handling localized so packaged Windows builds are easier to follow. Add a UNC no-op regression case to guard path normalization.
* refactor(pip): streamline runtime env mutation helpers
Keep packaged Windows pip environment handling easier to follow by reusing a temporary environment context manager, isolating case-insensitive INCLUDE/LIB lookup, and documenting native path normalization behavior.
2026-03-19 00:07:03 +09:00
エイカク
6da59cfb07
fix: 插件依赖自动安装逻辑与 Dashboard 安装体验优化 ( #5954 )
...
* fix: install plugin requirements before first load
* fix: handle pip option arguments correctly
* fix: harden pip install input parsing
* refactor: simplify pip install input parsing
* fix: align plugin dependency install handling
* fix: respect configured pip index overrides
* test: parameterize plugin dependency install flows
* refactor: simplify multiline pip input parsing
* fix: install plugin dependencies before loading
* fix: protect core dependencies from downgrades and simplify package input splitting
* fix: enhance dependency conflict reporting and improve user-facing warnings
* refactor: preserve pip log indentation and fix CodeQL URL sanitization alert
* fix: explicit re-export for DependencyConflictError to satisfy ruff F401
* test: enhance index override verification in pip installer tests
* fix: correctly map pip ERROR and WARNING outputs to proper log levels
* refactor: show specific version conflicts in DependencyConflictError and revert log level mapping
* refactor: simplify install() by decoupling pip logging, failure classification and constraint file management
* refactor: further simplify pip installer and requirement parsing logic
* refactor: simplify dependency installation logic and improve circular requirement reporting
* style: organize imports in astrbot/core/__init__.py
* refactor: optimize requirement parsing efficiency and flatten pip installer API
* style: fix import sorting in astrbot/core/__init__.py
* refactor: consolidate requirement parsing, optimize core protection, and improve exception propagation
* fix: preserve valid pip requirement parsing
* fix: skip empty pip installs and preserve blank output
* chore: normalize gitignore entry style
* fix: tighten pip trust and requirement parsing
* refactor: centralize pip install parsing and failure handling
* fix: redact pip argv credentials in logs
* fix: surface plugin dependency install errors
* fix: cache core constraints and clarify requirement installs
* fix: harden pip requirement parsing for plugin installs
* fix: simplify pip installer parsing internals
* fix: tighten pip installer parsing and redaction
* refactor: simplify plugin dependency install flow
* fix: preserve core constraint conflict errors
* fix: harden pip installer fallback resolution
* refactor: split pip requirement and constraint helpers
* refactor: simplify pip installer helper flow
* refactor: streamline requirement precheck helpers
* refactor: clarify core constraint resolution
* fix: surface pip install failures explicitly
* refactor: separate pip conflict context parsing
* fix: harden core constraint resolution
* test: cover pip installer failure call sites
* refactor: remove dead requirements fallback helper
* refactor: narrow core constraint error handling
* refactor: unify requirement iteration
* refactor: share requirement name parsing
* test: align pip helper coverage
* fix: bind pip output limit at runtime
* refactor: reuse core requirement parser for tokens
2026-03-11 14:21:55 +09:00
エイカク
9c691b2266
chore: remove Electron desktop pipeline and switch to tauri repo ( #5226 )
...
* ci: remove Electron desktop build from release pipeline
* chore: remove electron desktop and switch to tauri release trigger
* ci: remove desktop workflow dispatch trigger
* refactor: migrate data paths to astrbot_path helpers
* fix: point desktop update prompt to AstrBot-desktop releases
2026-02-19 23:04:18 +09:00
エイカク
a8dda20a30
fix: 提升打包版桌面端启动稳定性并优化插件依赖处理 ( #5031 )
...
* fix(desktop): rotate electron and backend logs
* refactor(desktop): centralize log rotation defaults and debug fs errors
* fix(desktop): harden rotation fs ops and buffer backend log writes
* refactor(desktop): extract buffered logger and reduce sync stat calls
* refactor(desktop): simplify rotation flow and harden logger config
* fix(desktop): make app logging async and flush-safe
* fix: harden app log path switching and debug-gated rotation errors
* fix: cap buffered log chunk size during path switch
* fix: avoid redundant plugin reinstall and upgrade electron
* fix: stop webchat tasks cleanly and bind packaged backend to localhost
* fix: unify platform shutdown and await webchat listener cleanup
* fix: improve startup logs for dashboard and onebot listeners
* fix: revert extra startup service logs
* fix: harden plugin import recovery and webchat listener cleanup
* fix: pin dashboard ci node version to 24.13.0
* fix: avoid duplicate webchat listener cleanup on terminate
* refactor: clarify platform task lifecycle management
* fix: continue platform shutdown when terminate fails
2026-02-12 01:04:04 +08:00
エイカク
e61b29ec6a
fix: harden plugin dependency loading in frozen app runtime ( #5015 )
...
* fix: compare plugin versions semantically in market updates
* fix: prioritize plugin site-packages for in-process pip
* fix: reload starlette from plugin target site-packages
* fix: harden plugin dependency import precedence in frozen runtime
* fix: improve plugin dependency conflict handling
* refactor: simplify plugin conflict checks and version utils
* fix: expand transitive plugin dependencies for conflict checks
* fix: recover conflicting plugin dependencies during module prefer
* fix: reuse renderer restart flow for tray backend restart
* fix: add recoverable plugin dependency conflict handling
* revert: remove plugin version comparison changes
* fix: add missing tray restart backend labels
2026-02-11 13:01:44 +09:00
エイカク
d35771f97d
fix: stabilize packaged runtime pip/ssl behavior and mac font fallback ( #5007 )
...
* fix: patch pip distlib finder for frozen electron runtime
* fix: use certifi CA bundle for runtime SSL requests
* fix: configure certifi CA before core imports
* fix: improve mac font fallback for dashboard text
* fix: harden frozen pip patch and unify TLS connector
* refactor: centralize dashboard CJK font fallback stacks
* perf: reuse TLS context and avoid repeated frozen pip patch
* refactor: bootstrap TLS setup before core imports
* fix: use async confirm dialog for provider deletions
* fix: replace native confirm dialogs in dashboard
- Add shared confirm helper in dashboard/src/utils/confirmDialog.ts for async dialog usage with safe fallback.
- Migrate provider, chat, config, session, platform, persona, MCP, backup, and knowledge-base delete/close confirmations to use the shared helper.
- Remove scattered inline confirm handling to keep behavior consistent and avoid native blocking dialog focus/caret issues in Electron.
* fix: capture runtime bootstrap logs after logger init
- Add bootstrap record buffer in runtime_bootstrap for early TLS patch logs before logger is ready.
- Flush buffered bootstrap logs to astrbot logger at process startup in main.py.
- Include concrete exception details for TLS bootstrap failures to improve diagnosis.
* fix: harden runtime bootstrap and unify confirm handling
- Simplify bootstrap log buffering and add a public initialize hook for non-main startup paths.
- Guard aiohttp TLS patching with feature/type checks and keep graceful fallback when internals are unavailable.
- Standardize dashboard confirmation flow via shared confirm helpers across composition and options API components.
* refactor: simplify runtime tls bootstrap and tighten confirm typing
* refactor: align ssl helper namespace and confirm usage
2026-02-10 16:42:43 +09:00
エイカク
1addd5b2ab
perf: 稳定源码与 Electron 打包环境下的 pip 安装行为,并修复非 Electron 环境下点击 WebUI 更新按钮时出现跳转对话框的问题 ( #4996 )
...
* fix: handle pip install execution in frozen runtime
* fix: harden pip subprocess fallback handling
* fix: scope global data root to packaged electron runtime
* refactor: inline frozen runtime check for electron guard
* fix: prefer current interpreter for source pip installs
* fix: avoid resolving venv python symlink for pip
* refactor: share runtime environment detection utilities
* fix: improve error message when pip module is unavailable
* fix: raise ImportError when pip module is unavailable
* fix: preserve ImportError semantics for missing pip
* fix: 修复非electron app环境更新时仍然显示electron更新对话框的问题
---------
Co-authored-by: Soulter <905617992@qq.com >
2026-02-09 23:12:18 +08:00
エイカク
2afb08d8b2
fix: handle pip install execution in frozen runtime ( #4985 )
...
* fix: handle pip install execution in frozen runtime
* fix: harden pip subprocess fallback handling
2026-02-09 15:19:01 +08:00
Dt8333
7dd95d8a59
chore: auto ann fix by ruff ( #4903 )
...
* chore: auto fix by ruff
* refactor: 统一修正返回类型注解为 None/bool 以匹配实现
* refactor: 将 _get_next_page 改为异步并移除多余的请求错误抛出
* refactor: 将 get_client 的返回类型改为 object
* style: 为 LarkMessageEvent 的相关方法添加返回类型注解 None
---------
Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com >
2026-02-09 00:22:24 +08:00
エイカク
a7e580407c
feat: supports electron app ( #4952 )
...
* feat: add desktop wrapper with frontend-only packaging
* docs: add desktop build docs and track dashboard lockfile
* fix: track desktop lockfile for npm ci
* fix: allow custom install directory for windows installer
* chore: migrate desktop workflow to pnpm
* fix(desktop): build AppImage only on Linux
* fix(desktop): harden packaged startup and backend bundling
* fix(desktop): adapt packaged restart and plugin dependency flow
* fix(desktop): prevent backend respawn race on quit
* fix(desktop): prefer pyproject version for desktop packaging
* fix(desktop): improve startup loading UX and reduce flicker
* ci: add desktop multi-platform release workflow
* ci: fix desktop release build and mac runner labels
* ci: disable electron-builder auto publish in desktop build
* ci: avoid electron-builder publish path in build matrix
* ci: normalize desktop release artifact names
* ci: exclude blockmap files from desktop release assets
* ci: prefix desktop release assets with AstrBot and purge blockmaps
* feat: add electron bridge types and expose backend control methods in preload script
* Update startup screen assets and styles
- Changed the icon from PNG to SVG format for better scalability.
- Updated the border color from #d0d0d0 to #eeeeee for a softer appearance.
- Adjusted the width of the startup screen from 460px to 360px for improved responsiveness.
* Update .gitignore to include package.json
* chore: remove desktop gitkeep ignore exceptions
* docs: update desktop troubleshooting for current runtime behavior
* refactor(desktop): modularize runtime and harden startup flow
---------
Co-authored-by: Soulter <905617992@qq.com >
Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com >
2026-02-08 21:49:54 +08:00
Oscar Shaw
ef1feb639c
fix(utils): optimize pip install output decoding for cross-platform encoding compatibility ( #4249 )
2025-12-29 23:54:11 +08:00
Copilot
94bf3b8195
Fix incorrect type annotations and errors ( #3250 )
...
* Initial plan
* Fix type annotation errors in cmd_conf, cmd_init, and version_comparator
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Changes before error encountered
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Fix more type annotation errors: change `= None` to `| None = None`
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Fix final batch of type annotation errors
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
Co-authored-by: LIghtJUNction <lightjunction.me@gmail.com >
2025-11-02 17:02:56 +08:00
LIghtJUNction
0b7fc29ac4
style: add ruff lint module of isort and pyupgrade, and some ruff check fix ( #3214 )
...
Co-authored-by: Dt8333 <25431943+Dt8333@users.noreply.github.com >
Co-authored-by: Soulter <905617992@qq.com >
2025-11-01 13:26:19 +08:00
Soulter
345afe1338
fix: 修复 PipInstaller 中 pip 调用方式,确保使用当前 Python 解释器
2025-06-19 00:38:23 +08:00
Soulter
18f919fb6b
perf: pip_main wrapped in asyncio.to_thread
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-05-31 11:47:29 +08:00
Soulter
0924835253
feat: 将插件依赖检查和 pip 安装方法改为异步,以提高性能和响应速度
2025-05-31 11:44:58 +08:00
Soulter
3756cb766e
🎈 perf: 支持自定义 PyPI 软件仓库地址
...
fixes : #1165
2025-04-14 21:19:36 +08:00
Soulter
49bba9bf98
style: format codes
2025-03-03 13:30:55 +08:00
Soulter
aa3cfd887a
fix: correct STT model path and improve logging in provider manager and pip installer
2025-02-27 11:33:53 +08:00
Soulter
966df00124
feat: 支持从管理面板(控制台页)手动安装 pip 库
2025-01-10 15:35:57 +08:00