Commit Graph

10 Commits

Author SHA1 Message Date
whatevertogo
06f4536851 fix(test): 更新 init_plugin 测试以匹配新的目录命名规范
CLI 的 _normalize_init_plugin_name 函数现在自动添加 astrbot_plugin_ 前缀,
测试期望的目录名从 demo_plugin 更新为 astrbot_plugin_demo_plugin。
2026-03-15 01:33:28 +08:00
whatevertogo
84184c4c0a feat(errors): Enhance AstrBotError with detailed documentation and examples
feat(events): Expand MessageEvent with reply capabilities and detailed docstrings

fix(loader): Ensure plugin path is correctly managed in sys.path

feat(star): Improve Star class documentation and lifecycle method descriptions

feat(testing): Add plugin metadata handling in MockContext and enhance PluginHarness

feat(hello): Refactor HelloPlugin to utilize new reply methods and structured capabilities

test(decorators): Add tests for input/output model support in provide_capability

test(events): Implement tests for reply_image and reply_chain methods in MessageEvent

test(http): Validate API registration with capability handler references and error handling

test(tests): Enhance tests for plugin harness and directory handling in dev commands
2026-03-14 23:37:09 +08:00
whatevertogo
6a0f33a3fb refactor: 更新兼容层弃用通知,优化文档结构和可读性 2026-03-14 23:05:10 +08:00
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