Commit Graph

7 Commits

Author SHA1 Message Date
whatevertogo
956d12cb5c feat: 添加 hello_plugin 示例,包含插件结构、命令处理和测试用例 2026-03-14 22:38:25 +08:00
whatevertogo
0ea532bd91 feat: 增强错误处理,添加上下文信息,优化插件组件加载和参数注入校验 2026-03-14 22:32:01 +08:00
whatevertogo
731fa6d5bd feat: 添加插件热重载功能,支持文件变更时自动重新加载插件 2026-03-14 22:25:51 +08:00
whatevertogo
94514fb19b feat: Enhance handler and capability dispatchers with improved error handling
- Updated HandlerDispatcher to raise TypeError for uninjectable required parameters, logging errors appropriately.
- Refactored CapabilityDispatcher to raise TypeError for missing required parameters during capability execution.
- Renamed _load_plugin_config to load_plugin_config for clarity and consistency.
- Introduced _sync_plugin_registry method in SupervisorRuntime to manage plugin capabilities more effectively.
- Enhanced capability registration logic to handle naming conflicts with better logging and automatic renaming.
- Added tests for handler and capability dispatchers to ensure proper error handling and functionality.
- Implemented new HTTP and metadata capabilities with corresponding tests for registration and retrieval.
- Improved MemoryClient methods with additional tests for save_with_ttl, get_many, delete_many, and stats.
- Added tests for the testing module to ensure proper import and functionality of PluginHarness.
2026-03-14 22:07:10 +08:00
whatevertogo
6127d4ef3f clean it 2026-03-14 21:33:54 +08:00
whatevertogo
1c4c9677bb feat: 添加插件初始化、验证和构建命令,增强 CLI 功能 2026-03-13 20:55:03 +08:00
whatevertogo
623e0c1f33 feat: Enhance CLI and testing capabilities
- Added a new script entry point `astrbot-sdk` in `pyproject.toml`.
- Introduced `has_waiter` method in `SessionWaiterManager` to check for existing waiters.
- Updated `cli.py` to improve error handling and added context to error messages.
- Implemented local development support in `cli.py` with a new `dev` command for running plugins against a mock core.
- Created a new testing module `astrbot_sdk.testing` with utilities for local development and plugin testing.
- Added comprehensive tests for the new testing module and CLI commands.
- Improved compatibility and error messaging for plugin loading failures.
2026-03-13 20:26:42 +08:00