雅诺狐
3360b22dca
Refactor anti-injection system and remove command skip list
...
Removed the command skip list feature and related code from the anti-injection system, including configuration options, plugin command collection, and management commands. Refactored anti-injector logic to operate directly on message dictionaries and simplified whitelist and message content extraction. Updated response handling to perform anti-injection checks before reply generation, and removed skip list refresh logic from the plugin manager.
2025-11-19 22:46:06 +08:00
minecraft1024a
2f1a9fa966
refactor(cleanup): 移除未使用的导入项与冗余代码
...
清理了整个代码库中所有无用的模块导入、重复定义以及冗余变量引用,具体包括:
- bot.py 去掉了 random、typing 的未使用 import
- antipromptinjector 模块统一移除未引用的 DetectionResult、Dict、List 等
- chat_loop 中删除了未调用的 Timer、mai_thinking_manager、events_manager 等引用
- qzone_service 删除多余 f-string 大括号,避免日志警告格式问题
- 其他模块同步剔除各自范围内的冗余 import(asyncio、datetime 等共 20+ 处)
保持功能不变,仅作代码整洁度优化,无破坏性变更。(并添加了一个现在暂时还没加进去的必应搜索源文件)
2025-11-19 22:45:22 +08:00
雅诺狐
95bbce355a
Improve anti-injection detection logging and text extraction
...
Added detailed debug logs for text extraction and LLM detection input in the anti-injector module. Refactored message processing to only use user-added content for detection, avoiding duplicate text. Fixed import paths for command_skip_list in plugin manager and anti_injector_manager to reflect new module structure.
2025-11-19 22:45:01 +08:00
雅诺狐
bb4592846c
Refactor config system to use Pydantic validation
...
Refactored configuration classes to inherit from a new ValidatedConfigBase using Pydantic for robust validation and error reporting. Updated api_ada_configs.py, config.py, config_base.py, and official_configs.py to replace dataclasses with Pydantic models, add field validation, and improve error messages. This change enhances configuration reliability and developer feedback for misconfigurations. Also includes minor code cleanups and removal of unused variables in other modules.
2025-11-19 22:44:45 +08:00
minecraft1024a
808954a372
refactor(chat): 禁用工具执行器的缓存功能(因为这玩意真的没几次命中过的)
2025-11-19 22:44:41 +08:00
雅诺狐
383f704b53
Remove unused imports across multiple modules
...
Cleaned up various files by removing unused or redundant import statements to improve code readability and reduce potential confusion. No functional changes were made.
2025-11-19 22:44:32 +08:00
tt-P607
3e20d11eec
<Thinking>
...
我需要分析这个git diff,并生成一个与之前完全不同的commit message。
让我先分析变更内容:
1. **主要变更**:
- 在 `anti_injector.py` 中添加了新的 `auto` 处理模式
- 添加了命令跳过列表功能 (`command_skip_list`)
- 重构了反注入管理命令,从独立插件移动到核心动作插件
- 更新了配置文件以支持新功能
- 在插件管理器中添加了跳过列表刷新逻辑
2. **之前的commit message重点**:
- 强调了"advanced anti-injection capabilities"
- 重点描述了"intelligent 'auto' mode"
- 提到了"command skip list"
- 强调了"dynamically assesses threats"
- 提到了"refactored and integrated into core actions plugin"
3. **我需要完全不同的角度**:
- 可以从架构重构的角度
- 可以从用户体验改进的角度
- 可以从系统集成的角度
- 可以从性能优化的角度
让我从**系统架构优化和插件整合**的角度来写这个commit message,重点强调:
- 插件系统的重构和整合
- 管理命令的迁移和统一
- 跳过机制的实现
- 自动化决策系统的引入
这样就能避免使用之前message中的关键词和结构。
</Thinking>
refactor(plugins): 重构反注入插件架构并优化命令管理体系
将反注入管理功能从独立插件迁移至核心动作模块,实现更好的系统集成。新增智能跳过机制,允许已注册的插件命令绕过检测流程,有效减少误判。同时引入自适应处理策略,系统可根据威胁评估结果自主选择最适当的响应方式。
插件管理器现已集成自动刷新功能,确保跳过列表与插件状态保持同步。配置系统扩展支持多种跳过模式和自定义规则,提升了整体可维护性和用户体验。
ps:谢谢雅诺狐姐姐投喂的提交喵^ω^
2025-11-19 22:44:03 +08:00
minecraft1024a
bf9e1e60c4
优化插件热重载管理,支持多个监听目录
2025-11-19 22:39:07 +08:00
雅诺狐
b966a2f09c
小修复
2025-11-19 22:35:34 +08:00
雅诺狐
23ee3767ef
初始化
2025-11-19 22:34:56 +08:00
UnCLAS-Prommer
41e8966ae7
更多events
2025-08-09 17:33:24 +08:00
SengokuCola
d1f15a932a
fix:缺少stream的报错
2025-08-08 21:20:28 +08:00
UnCLAS-Prommer
2feb3ebe6b
OnPlan事件
2025-08-08 00:05:12 +08:00
UnCLAS-Prommer
3d98b56c15
空响应就raise
2025-08-06 13:06:53 +08:00
Windpicker-owo
cd7c1bb3ca
Merge branch 'dev' of https://github.com/Windpicker-owo/MaiBot into dev
2025-08-06 12:02:48 +08:00
Windpicker-owo
94a66bd235
使Tool支持读取配置文件,优化了开始执行工具调用时的日志输出
2025-08-06 12:01:31 +08:00
UnCLAS-Prommer
1e5db5d7e1
正确使用lpmm构建prompt
2025-08-03 19:52:31 +08:00
UnCLAS-Prommer
37e52a1566
tools系统
2025-07-31 11:41:15 +08:00
UnCLAS-Prommer
6c0edd0ad7
调整对应的调用
2025-07-30 17:07:55 +08:00
UnCLAS-Prommer
16c644a666
转换原来的tools到新的(虽然没转)
2025-07-29 00:15:29 +08:00
UnCLAS-Prommer
6062b6bd3c
Merge pull request #1149 from Windpicker-owo/dev
...
在一些细节上完善工具
2025-07-29 00:01:47 +08:00
UnCLAS-Prommer
af27d0dbf0
tools整合彻底完成
2025-07-28 23:57:55 +08:00
Windpicker-owo
3692015ce5
update
2025-07-28 23:53:54 +08:00
Windpicker-owo
33f6377dad
Merge branch 'dev' of https://github.com/Windpicker-owo/MaiBot into dev
2025-07-28 22:57:20 +08:00
Windpicker-owo
8131e65e9e
tool支持是否启用,更人性化的直接调用
2025-07-28 22:56:52 +08:00
UnCLAS-Prommer
82c4dfbb88
Merge branch 'dev' into dev
2025-07-28 21:59:48 +08:00
UnCLAS-Prommer
c0375f5dd9
合并utils_api
2025-07-28 12:37:37 +08:00
UnCLAS-Prommer
0c302c9ca5
修复插件中使用相对导入时会爆炸
2025-07-28 09:46:40 +08:00
Windpicker-owo
4ac487dd14
将ToolExecutor迁移进tool_use,顺便改了两处typing
2025-07-27 00:24:40 +08:00
Windpicker-owo
8cc6636b20
修改了一处注释
2025-07-26 22:37:46 +08:00
Windpicker-owo
3021acff59
修复了一些bug,修改了插件加载输出
2025-07-26 20:49:22 +08:00
Windpicker-owo
934ad25d32
Merge branch 'MaiM-with-u:dev' into dev
2025-07-26 18:54:45 +08:00
Windpicker-owo
44d86c8847
尝试整合工具和插件系统
2025-07-26 18:37:29 +08:00
UnCLAS-Prommer
ecfa25bf5a
移除了dependency_manager,dependency文档修改
2025-07-26 17:13:12 +08:00
UnCLAS-Prommer
229d45083d
command简化,修复unregister的bug
2025-07-25 13:39:27 +08:00
UnCLAS-Prommer
d6284b6b4c
插件管理API测试与修改通过
2025-07-24 00:31:53 +08:00
UnCLAS-Prommer
56c2adbaec
插件和组件管理API
2025-07-23 11:07:26 +08:00
UnCLAS-Prommer
10bf424540
增加了组件的局部禁用方法
2025-07-23 00:41:31 +08:00
UnCLAS-Prommer
35ec390dfd
增加了组件的全局启用和禁用功能
2025-07-22 22:38:40 +08:00
UnCLAS-Prommer
76025032a9
增加了卸载和重载插件功能
2025-07-22 18:52:11 +08:00
UnCLAS-Prommer
484fc20983
typing and plugins
2025-07-21 01:23:23 +08:00
UnCLAS-Prommer
8d20134cbb
合并BaseEventPlugin到BasePlugin,重写了components_registry,修正了统计输出
2025-07-19 19:16:42 +08:00
UnCLAS-Prommer
400ffd0b53
增加样例插件,修复统计数据(部分),修复一个bug
2025-07-19 00:46:04 +08:00
UnCLAS-Prommer
063382862a
plugin_name不再受文件夹名称限制
2025-07-18 19:25:06 +08:00
UnCLAS-Prommer
ffa88b5462
events manager and some typing fix
2025-07-18 14:50:15 +08:00
UnCLAS-Prommer
1aa2734d62
typing fix
2025-07-17 00:10:41 +08:00
UnCLAS-Prommer
30b35357d4
plugins sys 修改,复用plugin_base(原base_plugin)
2025-07-16 18:02:42 +08:00
UnCLAS-Prommer
1a17fa20f7
潜在问题修复, events sys
2025-07-16 11:38:01 +08:00
UnCLAS-Prommer
2502c20f00
emergency fix
2025-07-15 23:36:24 +08:00
UnCLASPrommer
b104178bd7
events system init
2025-07-15 23:20:18 +08:00