Soulter
6beca2144c
revert: #5729
...
This reverts commit a9c16febf4 .
2026-03-05 01:34:07 +08:00
Soulter
2d27bfb6d0
revert: #5744
...
This reverts commit 3d1c3946f6 .
2026-03-05 01:29:36 +08:00
エイカク
3d1c3946f6
feat(ci): add nightly prerelease release flow and updater support ( #5744 )
...
* feat: add nightly prerelease release flow and updater support
* feat(ci): auto-generate nightly release notes from latest stable tag
* fix(ci): correct nightly release notes heredoc YAML indentation
* fix(ci): align nightly notes heredoc terminator
* fix(ci): remove heredoc body indentation in nightly notes script
* fix: align nightly release metadata and prerelease rules
* fix: harden nightly release flow and updater release resolution
* fix: improve nightly branch resolution and updater logging
* fix: simplify updater target resolution and nightly release assets
* fix: avoid inputs lookup on non-dispatch release events
* fix: split nightly release fetch and simplify updater flow
* refactor: simplify updater target resolvers and nightly error checks
* fix: type release fetch errors and streamline updater resolution
* refactor: simplify updater target branching and release artifacts
* refactor: simplify release fetching and harden nightly git diagnostics
* fix: validate release payload shape before parsing
* refactor: harden prerelease handling and nightly constants
* refactor: derive archive urls and enrich fetch errors
* refactor: simplify update target resolution flow
* refactor: linearize update target resolution
* refactor: validate update target inputs and sync nightly tag source
* refactor: simplify updater mode resolution and prerelease tests
* refactor: simplify update target resolution flow
* fix: avoid package import when resolving nightly tag
* refactor: simplify updater resolution and centralize release constants
* fix: harden nightly release notes generation in workflow
* refactor: streamline update target resolution and errors
* refactor: simplify updater target resolution and nightly handling
* refactor: simplify updater errors and package release scripts
* refactor: centralize release api constants and loader
* fix(ci): resolve dispatch fallback tag from stable releases
2026-03-05 01:23:49 +09:00
camera-2018
9683abeb19
feat(telegram): supports sendMessageDraft API ( #5726 )
...
* feat(telegram): 使用 sendMessageDraft API 实现私聊流式输出
- 新增 _send_message_draft 方法封装 Telegram Bot API sendMessageDraft
- 私聊流式输出使用 sendMessageDraft 推送草稿动画,群聊保留 edit_message_text 回退
- 使用独立异步发送循环 (_draft_sender_loop) 按固定间隔推送最新缓冲区内容,
完全解耦 token 到达速度与 API 网络延迟
- 流式结束后发送真实消息保留最终内容(draft 是临时的)
- 使用模块级递增 draft_id 替代随机生成,确保 Telegram 端动画连续性
* fix(telegram): convert draft text to Markdown before sending message draft
* chore(telegram): telegram 适配器重构
- 提取公共方法
- 有新 token 到达时触发流式
- 生成结束后清除draft内容
- 默认draft发送md格式
* style(telegram): ruff format
* style(telegram): ruff check
---------
Co-authored-by: Soulter <905617992@qq.com >
2026-03-04 23:11:57 +08:00
エイカク
ab96537308
[codex] fix mcp init timeout keyword mismatch ( #5743 )
...
* fix: use timeout_seconds for mcp init startup
* fix: support overridden mcp init timeout in startup
* fix: resolve mcp init timeout from env when unset
* fix: pass mcp init timeout through lifecycle chain
2026-03-04 21:20:07 +09:00
エイカク
9afe5757be
feat: optimize async io performance and benchmark coverage ( #5737 )
...
* docs: align deployment sections across multilingual readmes
* docs: normalize deployment punctuation and AUR guidance
* docs: fix french and russian deployment wording
* perf: optimize async io hot paths and extend benchmarks
* fix: address async io review feedback
* fix: address follow-up async io review comments
* fix: align base64 io error handling in message components
* fix: harden attachment export ids and tune io chunking
* fix: preserve best-effort attachment export and batch writes
* test: expand path conversion and helper coverage
2026-03-04 16:26:34 +09:00
エイカク
a9c16febf4
fix: 工程化收敛并移除 ASYNC230/ASYNC240 忽略 ( #5729 )
...
* test(skills): align sandbox cache tests with readonly behavior
* ci(release): enforce core quality gate before publish
* ci: enforce locked dependency installs in workflows
* security: remove curl-pipe-shell installs
* chore: align project python baseline to 3.12
* ci(dashboard): add explicit typecheck gate
* chore(pre-commit): align ruff hook version with project
* ci(codeql): add javascript-typescript analysis
* chore(ruff): defer py312 migration lint rules
* fix: resolve ruff violations without new ignores
* fix: resolve ASYNC230 and ASYNC240 without ignores
* fix(auth): replace utcnow with timezone-aware UTC now
* fix: avoid blocking file read in file_to_base64
2026-03-04 13:51:00 +09:00
Soulter
418f05f6e4
fix: tests
2026-03-03 16:06:49 +08:00
Soulter
df421e5554
fix: test
2026-03-03 16:04:08 +08:00
shuiping233
ed84074a60
unittest: 添加之前遗漏的kook_card_data.json ( #5703 )
2026-03-03 16:01:26 +08:00
miaoxutao123
92ee534a2c
feat: add OS information to tool descriptions and implement unit tests ( #5677 )
...
* feat: add OS information to tool descriptions and implement unit tests
* refactor: use module-level constant for OS name as suggested in PR review
2026-03-03 15:16:38 +08:00
shuiping233
866e546b59
feat: integrates KOOK platform adapter ( #5658 )
...
* feat: 将kook适配器插件并入astrbot官方适配器目录中
* refactor: 重命名函数名为 _warp_message
* refactor: 使用Protocol替换Union类型
* bugfix: 修复base64前缀处理问题
* refactor: 抛出的错误不再包含"[kook]"
* refactor: 添加读取本地文件时的路径安全检查
* refactor: 卡片消息解析失败时会打印错误信息
* refactor: 添加处理接收卡片消息内的图片url时的安全校验
* refactor: 安全处理ws需要重连的情况
* Revert "refactor: 使用Protocol替换Union类型"
This reverts commit 58e0dceeb20c3d7dddb16f623fd3bbdcfa632173.
* feat: 添加获取机器人名称的实现
* refactor: 让send_by_session发送主动消息时正确传入当前消息链的文本消息内容
* refactor: 统一处理适配器配置相关内容,处理仪表盘出传入配置,并添加仪表盘的kook适配器配置页面的i18n文本
* unittest: 添加kook适配器的单元测试,虽然没覆盖多少单测
* unittest: TEST_DATA_DIR用更安全的路径
* refactor: KookConfig使用了更好的默认值处理方式
* refactor: 移除kook_adapter 的config字段重复定义
* refactor: 隐藏获取kook gateway时url里的token,防止把token打印出来
* refactor: KookConfig.pretty_jsons使用*来屏蔽token内容
* bugfix: 修复主动发送消息时,调用了父方法`send_by_session`可能导致指标被重复上传的bug
* refactor: 优化upload_asset的路径处理报错
* bugfix: 修复kook ws心跳间隔可能会出现负数时间的bug
* refactor: KookClient移到KookPlatformAdapter.__init__里初始化
* bugfix: 修复处理base64 url 多替换了/而报错的bug
* refactor: kook适配器上传文件失败时,会抛出错误
* chore: 移除一条注释
* refactor: 移除没用的return
* refactor: 即使消息链中有消息发送失败了,也尽可能将其他消息发送出去,并把报错信息也发送出去
* refactor: 增强上传任务失败时的错误处理,使其发生错误时尽力而为发送其余消息
* refactor: 发送到消息频道的报错消息加了个⚠️ ,小巧思这块?
* refactor: 咱们在写适配器啊,要什么小巧思呢,小巧思给上游插件开发弄不好么)
* refactor: enhance Kook adapter with kmarkdown parsing and improve file URL handling
* refactor: extract card message parsing logic into a separate method
* feat: add kook_bot_nickname configuration to ignore messages from specific nicknames
* refactor: remove commented-out code and clean up file upload error handling
* fix: remove redundant prefix handling for file URLs in asset upload
---------
Co-authored-by: Soulter <905617992@qq.com >
2026-03-03 15:08:16 +08:00
RC-CHN
f818ad0758
Merge remote-tracking branch 'origin/master' into feat/neo-skill-self-iteration
2026-03-02 09:37:06 +08:00
sanyekana
4abea2bd30
fix: harden backup import for duplicate platform stats ( #5594 )
...
* fix: harden backup import for duplicate platform stats
- 修复 replace 模式下主库清空失败仍继续导入的问题。
- 导入前对 platform_stats 重复键做聚合(count 累加),并统一时间戳判重格式。
- 非法 count 按 0 处理并告警(限流),补充对应测试。
* refactor: improve robustness and readability of platform stats import
- 告警上限魔法数字提取为模块常量 PLATFORM_STATS_INVALID_COUNT_WARN_LIMIT
- 抽取 parse_count 内联函数,消除重复的 try/except 分支
- 存储行的 timestamp 同步写入规范化值,避免落库格式混用
- 补充测试:已有行 count 非法、告警限流、replace 模式中断断言
* fix: normalize invalid platform_stats count for non-duplicate rows
* fix: avoid merging invalid platform_stats timestamps
* refactor: simplify platform stats merge and normalize naive UTC
* refactor: inline platform stats merge helpers
* refactor: flatten platform stats merge flow
* refactor: harden platform stats merge key handling
* refactor: streamline platform stats preprocessing
* refactor: simplify platform stats merge helpers
* refactor: inline platform stats merge normalization
* refactor: extract platform stats merge helpers
* refactor: simplify platform stats preprocessing flow
* refactor: flatten platform stats preprocess helpers
* refactor: streamline platform stats merge helpers
* refactor: isolate platform stats warning limiter
---------
Co-authored-by: 邹永赫 <1259085392@qq.com >
2026-03-01 20:46:35 +09:00
Chen
daa2efde14
fix:修正子agent无法正确接收本地图片(参考图)路径的问题 ( #5579 )
...
* fix: 修复5081号PR在子代理执行后台任务时,未正确使用系统配置的流式/非流请求的问题(#5081 )
* feat:为子代理增加远程图片URL参数支持
* fix: update description for image_urls parameter in HandoffTool to clarify usage in multimodal tasks
* ruff format
* fix:修正子agent无法正确接收本地图片(参考图)路径的问题
* fix:增强image_urls接收的鲁棒性
* fix:ruff检查
* fix: harden handoff image_urls preprocessing
* fix: refactor handoff image_urls preprocessing flow
* refactor: simplify handoff image_urls data flow
* fix: filter non-string handoff image_urls entries
* refactor: streamline handoff image url collection
* refactor: share handoff image ref validation utilities
* refactor: simplify handoff image url processing
* refactor: honor prepared handoff image urls contract
---------
Co-authored-by: Soulter <905617992@qq.com >
Co-authored-by: 邹永赫 <1259085392@qq.com >
2026-03-01 17:01:23 +09:00
whatevertogo
93decaa997
test: add comprehensive tests for core lifecycle and agent execution ( #5357 )
...
* test: add comprehensive tests for core lifecycle and agent execution
- Add core lifecycle unit tests
- Add main agent execution tests
- Add computer use tests
- Enhance event bus tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
* fix: 更新用户查询标题生成逻辑,确保处理为纯文本并忽略内部指令
refactor(tests): 移除测试文件中的循环导入注释
refactor(tests): 优化计算机客户端测试,简化不可用引导程序的处理逻辑
* fix(event_bus): 优化事件处理逻辑,简化配置检查并增强错误日志记录,优化了测试内容
* fix(astr_main_agent): 简化 LLM 安全模式系统提示的设置逻辑
* test: enhance persona resolution in mock context for persona management tests
---------
Co-authored-by: whatevertogo <whatevertogo@users.noreply.github.com >
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
Co-authored-by: Soulter <905617992@qq.com >
2026-03-01 00:23:47 +08:00
whatevertogo
2a6863cf70
test: add tests for star base class and config management ( #5356 )
...
* test: add tests for star base class and config management
- Add Star base class safety helper tests
- Expand config management unit tests
- Update cron manager tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
* test: fix plugin_manager test isolation issues
- Use local mock plugin instead of real network requests
- Clear sys.modules cache for entire data module tree
- Clear star_map and star_registry in teardown
- Use pytest_asyncio.fixture for async fixture support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* test: fix test isolation and compatibility issues
- test_main.py: fix version comparison and path assertions for Windows
- test_smoke.py: add missing apscheduler.triggers mock modules
- test_tool_loop_agent_runner.py: update assertion for new interrupt behavior
- test_api_key_open_api.py: use unique session IDs to avoid test conflicts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* test: add unit tests for _version_info comparisons
* test: enhance plugin manager tests with mock implementations and improved assertions
* test: add mock plugin builder and updater for plugin management tests
* fix: resolve pipeline and star import cycles (#5353 )
* fix: resolve pipeline and star import cycles
- Add bootstrap.py and stage_order.py to break circular dependencies
- Export Context, PluginManager, StarTools from star module
- Update pipeline __init__ to defer imports
- Split pipeline initialization into separate bootstrap module
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
* fix: add logging for get_config() failure in Star class
* fix: reorder logger initialization in base.py
---------
Co-authored-by: whatevertogo <whatevertogo@users.noreply.github.com >
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
* test: update cron job scheduling tests and refactor star base tests for clarity
* test: expand star base tests for comprehensive coverage
- Add tests for Star class initialization and context handling
- Add tests for text_to_image with/without config
- Add tests for html_render method
- Add tests for initialize/terminate lifecycle methods
- Add type hint validation tests for Context
- Add circular import prevention tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: address PR review feedback - use TYPE_CHECKING instead of Any
- pipeline/context.py: Use TYPE_CHECKING to import PluginManager instead of Any
- pipeline/__init__.py: Add TYPE_CHECKING imports for __all__ exports to satisfy static analyzers
- star/register/star_handler.py: Use TYPE_CHECKING to import AstrAgentContext instead of Any
- tests: Remove invalid type hint tests that tested incorrect assumptions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: improve TYPE_CHECKING pattern for circular import resolution
- star/register/star_handler.py: Use AstrAgentContext instead of Any in generic types
- star/context.py: Remove unnecessary else branch with CronJobManager = Any
(with __future__ annotations, TYPE_CHECKING imports are sufficient)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
---------
Co-authored-by: whatevertogo <whatevertogo@users.noreply.github.com >
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com >
2026-03-01 00:06:04 +08:00
Soulter
76e0d6d71a
feat: refactor API key creation and add new tests for open API routes
2026-02-28 23:43:05 +08:00
RC-CHN
a219a8b70d
Merge remote-tracking branch 'origin/master' into feat/neo-skill-self-iteration
2026-02-27 15:25:50 +08:00
Soulter
5219ba5c4e
feat: implement follow-up message handling in ToolLoopAgentRunner ( #5484 )
...
* feat: implement follow-up message handling in ToolLoopAgentRunner
* fix: correct import path for follow-up module in InternalAgentSubStage
2026-02-26 21:38:47 +08:00
RC-CHN
847ef0f3f4
Merge remote-tracking branch 'origin/master' into feat/neo-skill-self-iteration
2026-02-26 10:04:48 +08:00
whatevertogo
5af5ad9e36
test: add comprehensive tests for message event handling ( #5355 )
...
* test: add comprehensive tests for message event handling
- Add AstrMessageEvent unit tests (688 lines)
- Add AstrBotMessage unit tests
- Enhance smoke tests with message event scenarios
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
* fix: improve message type handling and add defensive tests
---------
Co-authored-by: whatevertogo <whatevertogo@users.noreply.github.com >
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-02-23 23:36:39 +08:00
whatevertogo
7b731ebda8
test: enhance test framework with comprehensive fixtures and mocks ( #5354 )
...
* test: enhance test framework with comprehensive fixtures and mocks
- Add shared mock builders for aiocqhttp, discord, telegram
- Add test helpers for platform configs and mock objects
- Expand conftest.py with test profile support
- Update coverage test workflow configuration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
* refactor(tests): 移动并重构模拟 LLM 响应和消息组件函数
* fix(tests): 优化 pytest_runtest_setup 中的标记检查逻辑
---------
Co-authored-by: whatevertogo <whatevertogo@users.noreply.github.com >
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-02-23 23:35:15 +08:00
Soulter
e357d9de74
feat: add stop functionality for active agent sessions and improve handling of stop requests ( #5380 )
...
* feat: add stop functionality for active agent sessions and improve handling of stop requests
* feat: update stop button icon and tooltip in ChatInput component
* fix: correct indentation in tool call handling within ChatRoute class
2026-02-23 20:21:30 +08:00
Soulter
a404436f2c
feat: astrbot http api ( #5280 )
...
* feat: astrbot http api
* Potential fix for code scanning alert no. 34: Use of a broken or weak cryptographic hashing algorithm on sensitive data
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* fix: improve error handling for missing attachment path in file upload
* feat: implement paginated retrieval of platform sessions for creators
* feat: refactor attachment directory handling in ChatRoute
* feat: update API endpoint paths for file and message handling
* feat: add documentation link to API key management section in settings
* feat: update API key scopes and related configurations in API routes and tests
* feat: enhance API key expiration options and add warning for permanent keys
* feat: add UTC normalization and serialization for API key timestamps
* feat: implement chat session management and validation for usernames
* feat: ignore session_id type chunks in message processing
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-21 17:20:26 +08:00
zenfun
48a0b97ac0
test(skills): add skill metadata enrichment tests
...
11 tests covering:
- _parse_frontmatter_description: standard, description-only, empty,
missing delimiter, quoted values
- build_skills_prompt: format, absolute path in example, progressive
disclosure rules, absence of legacy custom fields
- SkillManager.list_skills: local frontmatter parsing, sandbox cache
description passthrough
2026-02-21 01:06:39 +08:00
zenfun
d21212d0e4
test(computer): add profile-aware sandbox selection tests
...
17 tests covering:
- ShipyardNeoBooter.capabilities property (tuple, immutability, pre/post boot)
- _apply_sandbox_tools conditional browser tool registration
- _resolve_profile smart selection (user-specified, browser preference,
API error fallback, empty profiles, auth error pass-through)
- ComputerBooter base class defaults
2026-02-21 01:03:58 +08:00
zenfun
18ebeae318
test(computer): add tests for credentials discovery and config logging
...
19 tests in test_computer_config.py:
- TestDiscoverBayCredentials (9 tests): env priority, cwd fallback,
missing file, empty key, malformed JSON, endpoint mismatch, slash normalization
- TestLogComputerConfigChanges (10 tests): runtime change, sandbox key change,
token masking, empty token label, missing provider_settings, add/remove keys
Uses unittest.mock.patch on AstrBot custom logger for reliable assertions.
2026-02-19 01:26:04 +08:00
Ruochen Pan
1a539830f8
Merge branch 'master' into feat/neo-skill-self-iteration
2026-02-17 16:23:14 +08:00
zenfun
4b07aa2bc3
test(computer): add tests for credentials discovery and config logging
...
19 new tests in test_computer_config.py:
- TestDiscoverBayCredentials (9 tests): env priority, cwd fallback,
missing file, empty key, malformed JSON, endpoint mismatch, slash normalization
- TestLogComputerConfigChanges (10 tests): runtime change, sandbox key change,
token masking, empty token label, missing provider_settings, add/remove keys
2026-02-17 04:24:55 +08:00
zenfun
963122b916
chore: update gitignore, Makefile, skills route, and test scaffolding
2026-02-16 02:38:01 +08:00
Soulter
754144ad99
feat: add fallback chat model chain in tool loop runner ( #5109 )
...
* feat: implement fallback provider support for chat models and update configuration
* feat: enhance provider selection display with count and chips for selected providers
* feat: update fallback chat providers to use provider settings and add warning for non-list fallback models
2026-02-15 11:51:34 +08:00
zenfun
40c7cf3901
feat(skills): merge sandbox built-ins with uploaded skill sync
2026-02-13 03:20:51 +08:00
エイカク
4ff07e3c74
fix: 完善转发引用解析与图片回退并支持配置化控制 ( #5054 )
...
* feat: support fallback image parsing for quoted messages
* fix: fallback parse quoted images when reply chain has placeholders
* style: format network utils with ruff
* test: expand quoted parser coverage and improve fallback diagnostics
* fix: fallback to text-only retry when image requests fail
* fix: tighten image fallback and resolve nested quoted forwards
* refactor: simplify quoted message extraction and dedupe images
* fix: harden quoted parsing and openai error candidates
* fix: harden quoted image ref normalization
* refactor: organize quoted parser settings and logging
* fix: cap quoted fallback images and avoid retry loops
* refactor: split quoted message parser into focused modules
* refactor: share onebot segment parsing logic
* refactor: unify quoted message parsing flow
* feat: move quoted parser tuning to provider settings
* fix: add missing i18n metadata for quoted parser settings
* chore: refine forwarded message setting labels
2026-02-12 23:42:29 +09:00
Soulter
9d93bda3fe
feat: temporary file handling and introduce TempDirCleaner ( #5026 )
...
* feat: temporary file handling and introduce TempDirCleaner
- Updated various modules to use `get_astrbot_temp_path()` instead of `get_astrbot_data_path()` for temporary file storage.
- Renamed temporary files for better identification and organization.
- Introduced `TempDirCleaner` to manage the size of the temporary directory, ensuring it does not exceed a specified limit by deleting the oldest files.
- Added configuration option for maximum temporary directory size in the dashboard.
- Implemented tests for `TempDirCleaner` to verify cleanup functionality and size management.
* ruff
2026-02-12 01:04:48 +08:00
zenfun
afe292de35
fix: address neo skill review findings
2026-02-11 19:35:01 +08:00
zenfun
a8cc995633
feat(dashboard): add neo skills APIs and management UI
2026-02-11 17:14:55 +08:00
zenfun
73251db1da
feat(skills): add neo lifecycle tools and stable sync manager
2026-02-11 17:14:47 +08:00
Soulter
241f1c26d3
feat: context compress ( #4322 )
...
* feat: context compressor
Co-authored-by: kawayiYokami <289104862@qq.com >
* Add comprehensive tests for ContextManager and ContextTruncator
- Implemented a full test suite for ContextManager covering initialization, message processing, token-based compression, and error handling.
- Added tests for ContextTruncator focusing on message fixing, truncation by turns, dropping oldest turns, and halving.
- Ensured that both test suites validate edge cases and maintain expected behavior with various message types, including system and tool messages.
* feat: add MockProvider for LLM compression tests
* chore: remove lock
* ruff fix
* fix
* perf
* feat: enhance context compression with token tracking and logging
* feat: update logging for context compression trigger
* feat: implement context compression logic with dynamic threshold and token tracking
* fix: reorder import statements for consistency
* feat: add token_usage tracking to conversations and update related processing logic
---------
Co-authored-by: kawayiYokami <289104862@qq.com >
2026-01-05 17:26:10 +08:00
RC-CHN
9eafd7b44a
feat: add features for chunked upload and backup file management to the backup section ( #4237 )
...
* feat: 添加分片上传备份文件功能
* feat: 为上传备份文件添加异步并发以提升速度
* feat: 使用浏览器原生下载方式以显示进度条
* feat: 添加从已上传备份列表恢复的功能
* feat: 允许重命名备份文件
* feat: 在后端校验可用备份文件后在前端部分显示备份版本号,添加手动上传提示
* style: format code
* fix: 更新备份部分测试
* fix: 修复浏览器原生下载鉴权问题,通过url传参的方式完成认证
* feat(backup): 改进备份系统的分片上传和下载鉴权
- 修复浏览器原生下载鉴权问题,支持 URL 参数传递 token
- 修复上传会话过期判断,使用 last_activity 避免活跃上传被清理
- 延迟启动后台清理任务,避免 asyncio 事件循环问题
- 统一由后端计算 chunk_size 和 total_chunks,避免前后端不一致
- 更新 generate_unique_filename 文档注释与实际行为一致
- 更新测试用例以验证 origin 字段
修复问题:
- 浏览器下载时显示"需要授权"
- 大文件上传可能因会话过期失败
- __init__ 中 asyncio.create_task 可能失败
* style: format code
2025-12-29 12:30:59 +08:00
RC-CHN
aa38fe776a
feat: supports data backup ( #4105 )
...
* feat: 添加数据迁移功能
* test: 添加迁移相关测试
* feat: 备份插件及相关持久化目录
* fix: 修复版本号比较逻辑,添加相关测试
* fix: 清洗文件名,添加相关测试
* fix: 修复安全文件名测试用例断言
* refactor: 优化代码,为备份模块提取公用常量
* feat: 修改备份版本校验逻辑,允许强制小版本间导入
* fix: 修复备份创建时间读取,修复备份相关i18n
* refactor(backup): 使用 astrbot_path 统一管理备份目录路径
* fix(backup): 清理备份模块中未使用的导入
* refactor(backup): 统一备份路径与参数并移除未用附件目录
- 通过 astrbot_path 动态获取备份/知识库/数据相关路径
- 移除 exporter/importer 未使用的 attachments_dir/data_root 传参
- 更新备份路由与测试用例的构造参数
* fix(dashboard): alias mermaid to dist entry for Vite prebundle
* fix(backup): 放行start-time接口到白名单以处理备份导入后jwt token变化导致无法自动刷新webui的问题
* chore(backup): 统一配置路径以使用动态数据目录
* refactor(backup): 使用 VersionComparator 替代重复的版本比较函数
* style(backup test): format code
---------
Co-authored-by: Soulter <905617992@qq.com >
2025-12-26 15:47:50 +08:00
Yokami
fc5b520f9b
perf(agent): add max step limit to prevent infinite tool call loops ( #4110 )
...
* perf(agent): add max step limit to prevent infinite tool call loops
* feat: implement max step limit handling in main agent runner
- Enhanced the agent runner to enforce a maximum step limit, logging a warning and forcing a final response when the limit is reached.
- Updated message handling to append a user prompt when the tool call limit is exceeded.
- Refactored tool response handling to yield appropriate messages based on the response type, including handling cases with no response or unsupported types.
- Improved conversation message formatting to ensure consistent output in the assistant's responses.
* chore: ruff format
---------
Co-authored-by: Soulter <905617992@qq.com >
2025-12-21 12:30:43 +08:00
Oscar Shaw
80b89fd2ea
feat: implements command management and improve webui feature structure ( #3904 )
...
move mcp management to plugin managemanet page
* feat: 新增命令配置数据库模型
* feat: 实现核心命令管理系统
* feat: 将命令管理集成到 Star 框架
* feat: 新增命令管理后台 API
* feat: 新增命令管理界面页面
* feat: 新增命令管理国际化支持
* test: 新增命令管理相关测试
* refactor(command): 移除指令重命名时的别名功能
* fix(command): 修正指令冲突检测逻辑
* fix(command): 排除已禁用指令的冲突检测
- 只有 `effective_command` 存在且 `enabled` 为 `True` 的指令才会被纳入冲突检测范围。
* feat(command): 优化指令冲突显示与提示
- 【功能】新增指令冲突警告提示,当检测到冲突时显示详细信息及解决方案。
- 【优化】调整指令列表排序逻辑,将冲突指令优先显示并分组。
- 【样式】为冲突指令行添加专属高亮样式,提升视觉识别度。
- 【国际化】更新英文和中文多语言文件,增加指令冲突警告相关的翻译文本。
* chore(command-page): 禁用命令表格部分列的排序功能
* style(command-page): 调整命令页面表格样式和图标大小
* refactor(command): 优化指令页面布局并更新冲突警告
- 【布局优化】重新组织指令管理页面布局,将筛选器移至顶部独立行
- 【信息展示】将搜索栏与总指令数、已禁用指令数合并显示,提升页面空间利用率
- 【视觉更新】更新指令冲突警告样式
* style: UI 细节
* refactor(command): 调整指令管理中的成员权限显示与筛选
- 更新指令筛选逻辑,当选择“所有人”权限筛选时,将同时包含 `everyone` 和 `member` 权限的指令。
* feat(command-management): 新增指令层级管理与UI展示
- 【后端】
- `CommandDescriptor` 新增 `parent_group_handler` 和 `sub_commands` 字段,支持指令层级结构定义。
- `list_commands` 函数重构,实现指令的层级收集与构建,将子指令正确挂载到其父指令组下。
- 新增 `_collect_all_descriptors` 和 `_find_parent_group_handler` 辅助函数,用于全面收集指令并定位父指令组。
- `_build_descriptor` 优化指令类型判断逻辑,明确区分普通指令、指令组和子指令。
- `_descriptor_to_dict` 递归处理子指令,确保 API 返回完整的指令层级数据。
- 【前端】
- 指令管理页面 (`CommandPage.vue`) 增加指令类型筛选器,并支持指令组的展开/折叠功能。
- 表格展示优化,为指令组和子指令添加不同的样式和缩进,提升层级结构的视觉可读性。
- 指令详情对话框新增指令类型、所属指令组和子指令列表的展示。
- 更新 `CommandItem` 接口,以适配后端提供的层级数据结构。
- 【i18n】
- 新增指令类型(指令、指令组、子指令)的国际化文本。
- 更新指令管理相关 UI 文本,包括表格头部、详情对话框字段和筛选器选项。
* style(command): 优化指令组子指令数量显示UI
* refactor(command): 修改指令列表排序逻辑
* style(command-page): 优化命令列表UI
* feat(command): 添加系统插件指令过滤与冲突处理
* refactor(command): 更新指令数展示逻辑
* style(command): 更新空状态描述
* feat(extension): 添加插件指令冲突检测与提示
- 在插件安装或启用后,自动检测并提示指令冲突。
- 当检测到指令冲突时,显示警告对话框,告知用户冲突数量及可能的影响。
* refactor(command): 移除指令表格内部加载指示器
* style(extension): 文案修改
* refactor(command): 模块化指令管理面板前端代码
* refactor(commandPanel): 重命名指令模块目录为 commandPanel
* style(commandPanel): 微调指令面板UI
* fix(command): 确保新命令配置的事务提交
* fix(sidebar): 补全新增侧边栏项后的侧边栏位追加逻辑
* refactor(commands): 重构/help指令以动态显示实际命令并补充部分命令描述
* style(builtin_commands): 补充命令描述
* refactor(commandPanel): 移除未使用的 filterState 常量
* perf(dashboard): 删除多余的CommandPage.vue文件(已被模块化引用)
* perf(command): 优化命令冲突计数逻辑
* perf(command): 优化指令管理辅助函数和配置绑定逻辑
* perf(db): 优化重构command相关数据库操作
* refactor(sidebar): 提取侧边栏项目解析逻辑到工具函数复用
* refactor: move mcp and command page to extension page
* refactor: remove unused imports in component panel
* fix: update terminology for handler management in extension localization
---------
Co-authored-by: Soulter <905617992@qq.com >
2025-12-16 20:24:57 +08:00
RC-CHN
46528391c2
feat: add pre-chunk import strategy for knowledge base ( #3973 )
...
* feat: 添加文档导入功能及相关测试
* feat: 优化文档上传功能,支持从文件名推断文件类型,并增强文档切片验证
* feat: 添加文档导入功能的无效输入测试,验证 chunks 类型和内容的错误处理
* refactor: 重构文档上传和导入任务的状态管理,添加任务初始化、结果设置和进度更新方法
2025-12-12 23:15:11 +08:00
Dt8333
758ce40cc1
chore: fix test ( #3787 )
2025-11-27 14:02:42 +08:00
Copilot
a04993a2bb
Replace insecure random with secrets module in cryptographic contexts ( #3248 )
...
* Initial plan
* Security fixes: Replace insecure random with secrets module and improve SSL context
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Address code review feedback: fix POST method and add named constants
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Improve documentation for random number generation constants
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Update astrbot/core/utils/io.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update astrbot/core/platform/sources/wecom_ai_bot/WXBizJsonMsgCrypt.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update tests/test_security_fixes.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update astrbot/core/utils/io.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update astrbot/core/utils/io.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Fix: Handle path parameter in SSL fallback for download_image_by_url
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 >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-11-03 02:43:00 +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
RC-CHN
19d7438499
fix: unit tests ( #2760 )
...
* fix:修复了main和plugin_manager部分单元测试
* fix: 修复了dashboard部分测试
* remove: 删除暂无用的配置测试脚本
* perf:拆分插件增查删改为独立的单元测试
* refactor: 重构插件管理器测试,使用临时环境隔离测试实例
* test: 增加对仪表板文件检查的单元测试,涵盖不同情况
* style: format code
* remove: 删除未使用的导入语句
* delete: remove unused test file for pipeline
---------
Co-authored-by: Soulter <905617992@qq.com >
2025-09-27 14:43:04 +08:00
Soulter
49bba9bf98
style: format codes
2025-03-03 13:30:55 +08:00
Soulter
461f1bb07c
feat: 支持插件handler优先级
2025-02-06 12:35:43 +08:00