Commit Graph

27 Commits

Author SHA1 Message Date
minecraft1024a
a485aaf4ad refactor(config): rename wakeup_system to sleep_system for clarity
This commit refactors the entire "wakeup system" to be named "sleep system". This change provides a more intuitive and accurate name for the functionality, which manages the AI's sleep cycles, sleep pressure, and related behaviors like insomnia and flexible sleep schedules.

The renaming has been applied consistently across all relevant files, including:
- Configuration models (`WakeUpSystemConfig` -> `SleepSystemConfig`)
- Configuration files (`bot_config_template.toml`)
- Core application logic that references these configurations.

Additionally, flexible sleep and pre-sleep notification settings have been moved from the `ScheduleConfig` to the new `SleepSystemConfig` to centralize all sleep-related parameters.
2025-08-29 13:56:24 +08:00
tt-P607
d072cde01b fix(config): 为实验性功能配置添加默认值
为 `experimental` 配置项设置 `default_factory`,确保在配置文件中未提供该项时,程序能够正常初始化并使用默认配置,避免因缺少配置而引发的启动错误。
2025-08-27 23:31:46 +08:00
雅诺狐
1d48478e79 Add PlusCommand enhanced command system
Introduces the PlusCommand system for simplified command development, including new base classes, argument parsing utilities, and registration logic. Updates the plugin system, component registry, and bot message handling to support PlusCommand components alongside traditional commands. Adds documentation and configuration for command prefixes, and provides a developer guide for the new system.
2025-08-27 22:21:03 +08:00
minecraft1024a
2db42292d2 refactor(config): 整合搜索服务配置并移除废弃选项
将原先独立的 Exa 和 Tavily 搜索引擎配置项合并到 `web_search` 配置块中,以实现更统一的管理。同时,移除了已废弃的 `Telemetry` 和部分 `Experimental` 功能配置,简化了整体配置文件结构。

主要变更:
-   `ExaConfig` 和 `TavilyConfig` 被移除,其 API 密钥设置已迁移至 `WebSearchConfig`。
-   删除了 `TelemetryConfig` 及其在主配置中的引用。
-   简化了 `planner` 的自定义提示词逻辑,现在仅通过内容是否为空来判断是否启用。
-   更新了配置文件模板,以反映上述结构调整并移除过时的注释和配置项。
2025-08-26 21:10:06 +08:00
minecraft1024a
1e037e5ce9 feat(maizone): 新增QQ空间互通组功能,根据聊天上下文生成说说
引入了全新的“QQ空间互通组”功能。用户可以配置多个群聊为一个互通组。
在通过指令发布说说时,系统会自动获取这些群聊的近期聊天记录作为上下文,从而生成与当前讨论话题更相关的说说内容。

- 在 `config.toml` 中新增了 `[maizone_intercom]` 配置项用于定义互通组。
- 重构并增强了动态(说说)的拉取逻辑,提高了对不同数据格式的兼容性和解析的稳定性。
- 对项目中的多个文件进行了代码清理,移除了未使用的导入,使代码更加整洁。
2025-08-26 20:20:54 +08:00
雅诺狐
f308adcf5b refactor: 清理代码质量和移除未使用文件
- 移除未使用的导入语句和变量
- 修复代码风格问题(空格、格式化等)
- 删除备份文件和测试文件
- 改进异常处理链式调用
- 添加权限系统数据库模型和配置
- 更新版本号至6.4.4
- 优化SQL查询使用正确的布尔表达式
2025-08-24 22:11:20 +08:00
minecraft1024a
2b8ed74a78 feat(chat): 引入跨群聊上下文共享功能
该功能允许在不同但相关的群聊之间共享对话上下文,从而提供更连贯和情境感知的回复。

主要实现方式:
- 在配置文件中引入 `cross_context` 部分,允许用户定义“共享组”,将多个群聊ID(原始ID)归入一组。
- 新增 `_build_cross_context_block` 方法,用于构建并注入到Prompt中。
- 支持两种上下文获取模式:
  - `normal` 模式:获取共享组内其他群聊的最新消息。
  - `s4u` 模式:获取当前发言用户在共享组内其他群聊的近期发言记录。
- 更新了Prompt模板以包含新的 `cross_context_block`。
- 提供了相应的配置模板和版本号更新。
2025-08-22 13:24:23 +08:00
雅诺狐
6facc51e7f 更新版本号为alpha 2025-08-22 09:19:47 +08:00
minecraft1024a
4f7836ae0c feat(sleep): 引入休眠阶段消息唤醒机制与愤怒情绪模式
- 扩展日程休眠逻辑,支持在睡眠时段通过@/私聊唤醒
- 新增 WakeUpManager 持续追踪唤醒阈值并触发愤怒状态
- MoodManager 中追加“被吵醒”情绪标识与愤怒提示模板
- HeartFChat 主循环集成唤醒处理管线,兼容原逻辑
- 配置中心开放阈值、衰减、持续时间等可调参数

此举允许机器人即便在“睡觉”时也能被重要消息强行“闹醒”,并以生气口吻做出回应,提升拟人化交互体验。
2025-08-21 16:19:34 +08:00
minecraft1024a
b1b08c1814 feat:添加了月度计划 # 我要混提交 2025-08-21 12:32:48 +08:00
雅诺狐
3dfb138d2c 修复硬编码错误 2025-08-19 18:00:41 +08:00
tt-P607
7dabc4273d 修复AttributeError异常**:
- 在ChatConfig中添加get_current_talk_frequency()方法
   - 在ExpressionConfig中添加get_expression_config_for_chat()方法,但是模型配置文件依旧被架空力😭😭😭我解决不了,帮帮我!雅诺狐姐姐!😭😭😭
2025-08-19 17:35:47 +08:00
雅诺狐
1405b50d5a 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-08-19 15:33:43 +08:00
雅诺狐
f3958ef484 Merge branch 'master' of https://github.com/MaiBot-Plus/MaiMbot-Pro-Max 2025-08-18 17:29:32 +08:00
雅诺狐
689aface9d Add LLM anti-prompt injection system
Introduces a comprehensive anti-prompt injection system for LLMs, including rule-based and LLM-based detection, user ban/whitelist management, message shielding, and statistics tracking. Adds new modules under src/chat/antipromptinjector, integrates anti-injection checks into the message receive flow, updates configuration and database models, and provides test scripts. Also updates templates and logger aliases to support the new system.
2025-08-18 17:27:59 +08:00
minecraft1024a
3b3eb080da feat(plugin): 实现插件配置集中化管理
将插件配置文件从各自的插件目录迁移至项目根目录下的 `config/plugins/` 文件夹中,方便用户统一管理和修改。

主要变更:
- 新增 `plugins.centralized_config` 总开关,用于控制是否启用此功能。
- 修改插件加载逻辑,现在会从 `config/plugins/<plugin_name>/` 目录读取用户配置。
- 如果用户配置不存在,会自动从插件目录下的模板配置文件复制一份。
- 保留了原有的配置版本检查和自动迁移功能,现在作用于用户配置文件。
2025-08-18 13:00:13 +08:00
minecraft1024a
cd3ccba8ad refactor(core): 调整数据库初始化时机
将数据库的初始化、表结构创建和自动迁移逻辑从配置文件加载时移动到主程序 `raw_main` 函数中。

这一改动旨在解决循环导入问题,并确保数据库在所有配置和核心模块加载完毕后才进行初始化,提高了程序的启动鲁棒性和模块独立性。
2025-08-17 15:59:56 +08:00
雅诺狐
0400804056 移除了MCP 2025-08-14 23:13:11 +08:00
雅诺狐
d5777c2980 添加了MCP SEE支持
能不能用我不知道,先加进来。主要我没有服务,无法测试
2025-08-14 17:22:07 +08:00
Furina-1013-create
8ea87764d0 修复了联网插件的一个小问题,蒽,对🤤 2025-08-14 11:04:15 +08:00
Furina-1013-create
9d29228784 我靠我我视频识别怎么又给我炸了
--已重新修复......
2025-08-14 00:45:19 +08:00
minecraft1024a
a9f3ab70d0 添加EXA搜索引擎和联网搜索组件的配置类(这个故事告诉我们下次改配置文件的时候记得加配置类) 2025-08-13 17:00:20 +08:00
minecraft1024a
97351ce1ae 新增插件Python依赖管理系统,支持自动检查和安装依赖,优化依赖配置和错误处理,更新相关文档和示例代码。 2025-08-13 12:32:07 +08:00
雅诺狐
fe97d897ef 优化项目结构,格式化代码 2025-08-13 09:49:39 +08:00
Furina-1013-create
32feae137e 增加视频识别板块
采用抽帧的方式识别视频,可以自己配置详细参数 -详细请看bot_config最底下
更改了template模板
多bb一句:我真的是被这个炸服了,改完这里那里就又炸了,但是总之现在没问题了
2025-08-13 01:58:43 +08:00
minecraft1024a
3bbb6de450 feat: 添加日程管理功能,包括日程模型、配置和初始化逻辑,增强聊天回复中对当前活动的动态反馈。 2025-08-12 16:59:21 +08:00
雅诺狐
2d4745cd58 初始化 2025-08-11 19:34:18 +08:00