Windpicker-owo
14a82008d5
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 22:04:33 +08:00
Windpicker-owo
3a89c790ef
修复napcat插件
2025-08-28 22:04:17 +08:00
minecraft1024a
3d78ed19ec
docs(changelog): 强调第三方更新记录的起始点
...
在变更日志中,为第三方改版记录的起始说明文字增加了额外的标点符号,使其更加醒目,以便于区分官方更新和社区贡献。
2025-08-28 21:54:04 +08:00
minecraft1024a
cf3ffb5f55
docs(changelog): 更新0.10.0-alpha版本日志
...
为即将发布的 `0.10.0-alpha` 版本添加详细的更新日志。
本次更新日志涵盖了新功能、问题修复和代码重构三大方面,全面记录了从持久化回复跟踪、模型故障转移机制等新功能的引入,到多个关键bug的修复,再到项目更名和模块重构等重要变更。
2025-08-28 21:32:42 +08:00
minecraft1024a
6736375329
refactor(config): 移除changelog_config并更新模型配置模板
...
删除了手动维护的`changelog_config.md`文件,因为它已经过时且难以维护。
同时,更新了`model_config_template.toml`文件,将Google Gemini的`client`配置从"gemini"修改为"aiohttp_gemini",以适配新的API客户端。
2025-08-28 21:22:44 +08:00
Windpicker-owo
8539bc2b08
修复enable配置
2025-08-28 21:13:54 +08:00
Windpicker-owo
8c660934d0
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 21:05:17 +08:00
tt-P607
01c2089982
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 21:04:36 +08:00
tt-P607
ad3e6763e1
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 21:04:05 +08:00
minecraft1024a
9cf6cc4910
docs:新增了一份部署指南但是暂时不完整,等我们的文档仓库生出来再说
2025-08-28 21:03:52 +08:00
tt-P607
3d958b9e05
feat(maizone): 引入持久化回复跟踪以避免重复回复
...
引入 `ReplyTrackerService` 来持久化跟踪已回复的评论,确保即使在程序重启后也不会对同一评论进行重复回复。
主要变更:
- 新增 `ReplyTrackerService`,用于记录和管理对特定说说下评论的回复状态。
- 在 `QZoneService` 中重构评论回复逻辑,利用 `ReplyTrackerService` 来判断评论是否已被回复。
- 增加逻辑以验证和清理无效的回复记录,例如当用户手动删除了机器人的回复后,程序能够识别并清除相应的记录,从而可以重新进行回复。
- 将 `ReplyTrackerService` 注册为全局服务,以便在插件内部共享。
2025-08-28 21:02:33 +08:00
minecraft1024a
78e78e71ba
docs: 更新模型配置指南
...
- 新增 `gemini` 客户端类型
- 更新 Google API 的 `base_url`
- 移除 `extra_params` 对 `gemini` 客户端的无效说明
- 新增 `anti_truncation` 参数说明
- 增加多个新的模型任务配置示例
- 将文档中的 `MaiBot` 统一为 `MoFox_Bot
2025-08-28 20:47:49 +08:00
minecraft1024a
add68fcf58
docs: remove outdated and unused documentation files
...
A significant number of documentation files, including design documents, user guides, and old images, have been removed to clean up the repository and eliminate outdated information. This reduces clutter and ensures that the documentation accurately reflects the current state of the project.
Key removals include:
- `memory_system_design_v3.md`
- `model_configuration_guide.md`
- `PERMISSION_SYSTEM.md`
- `CONTRIBUTE.md`
- `vector_db_usage_guide.md
2025-08-28 20:41:44 +08:00
minecraft1024a
77bad4891d
docs(plugins): remove outdated tool documentation
...
Removes the `tool-components.md` and `tool_caching_guide.md` files as they are no longer relevant after recent refactoring of the tool and caching systems. This cleanup ensures the documentation stays current with the codebase.
2025-08-28 20:21:53 +08:00
minecraft1024a
eb1feeeb0b
refactor(cache): 重构工具缓存机制并优化LLM请求重试逻辑
...
将工具缓存的实现从`ToolExecutor`的装饰器模式重构为直接集成。缓存逻辑被移出`cache_manager.py`并整合进`ToolExecutor.execute_tool_call`方法中,简化了代码结构并使其更易于维护。
主要变更:
- 从`cache_manager.py`中移除了`wrap_tool_executor`函数。
- 在`tool_use.py`中,`execute_tool_call`现在包含完整的缓存检查和设置逻辑。
- 调整了`llm_models/utils_model.py`中的LLM请求逻辑,为模型生成的空回复或截断响应增加了内部重试机制,增强了稳定性。
- 清理了项目中未使用的导入和过时的文档文件,以保持代码库的整洁。
2025-08-28 20:10:32 +08:00
minecraft1024a
f7f39431f5
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 19:57:24 +08:00
minecraft1024a
1b86fff855
feat(llm):为LLM请求实现模型故障转移机制
...
重构了LLM请求执行逻辑,以引入一个健壮的模型故障转移和回退系统。这通过在当前模型失败时自动切换到下一个可用模型,增强了服务的可靠性。
- 引入 `_model_scheduler` 以按顺序迭代任务配置的模型列表。
- 当模型请求因API错误、认证问题或超时等原因失败时,系统现在会自动使用列表中的下一个模型重试该请求。
- 移除了先前针对空回复或截断响应的内部重试逻辑。这类响应现在被视为特定模型尝试的最终失败,不会触发故障转移。
2025-08-28 19:56:59 +08:00
Windpicker-owo
b3176fea40
修复event权限,现在每个component都拥有plugin_name属性
2025-08-28 19:52:08 +08:00
tt-P607
4b6542b8e0
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 19:24:22 +08:00
Windpicker-owo
593cf7f32a
Merge origin/master into windpicker-adapter branch
2025-08-28 19:21:37 +08:00
tt-P607
72a3be5b26
refactor(maizone): 优化说说评论回复逻辑
...
重构了处理和回复评论的算法,以提高准确性和代码清晰度。
主要变更:
- 在获取说说列表时引入 `is_monitoring_own_feeds` 参数,以区分处理自己和好友的说说,避免跳过对自己说说的评论检查。
- 优化了评论回复逻辑,通过将评论区分为用户评论和自己的回复,更精确地识别未回复的评论,防止了之前可能出现的重复回复或漏回复的问题。
2025-08-28 19:19:53 +08:00
Windpicker-owo
d152e59c70
删除过时的代码
2025-08-28 19:04:03 +08:00
minecraft1024a
7bd1320504
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 18:42:37 +08:00
minecraft1024a
7ba3b7f34d
refactor(core): remove tool history manager and integrate cache into tool executor
...
Removes the `ToolHistoryManager` and its associated functionalities, including history recording, querying, and prompt generation. This simplifies the architecture by decoupling tool execution history from the core logic.
The tool caching mechanism is now directly integrated into the `ToolExecutor` by wrapping the `execute_tool_call` method. This ensures that caching is applied consistently for all tool executions that have it enabled, improving performance and reducing redundant calls.
- Deletes `src/common/tool_history.py`.
- Removes tool history related functions from `prompt_builder.py` and `tool_api.py`.
- Adds a `wrap_tool_executor` function in `cache_manager.py` to apply caching logic directly to the `ToolExecutor`.
2025-08-28 18:42:17 +08:00
雅诺狐
b28116e17b
Change default start_index in get_remaining to 0
...
Updated the get_remaining method in CommandArgs to default start_index to 0 instead of 1, ensuring all arguments are included by default when retrieving remaining parameters.
2025-08-28 18:42:04 +08:00
雅诺狐
58f775fbdd
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 18:36:11 +08:00
雅诺狐
8d77d1cc3f
Refactor permission checks and decorators usage
...
Refactored permission checks in built-in plugins to use the new @require_permission decorator, improving code clarity and consistency. Enhanced permission_decorators to better extract ChatStream and support PlusCommand. Updated PermissionCommand to use permission decorators for all subcommands, improved user mention parsing, and improved feedback messages. Registered a new permission node for sending feeds in MaiZone plugin and updated command registration to use PlusCommand info.
2025-08-28 18:35:59 +08:00
Windpicker-owo
1b5ee249a5
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 18:25:37 +08:00
Windpicker-owo
2e2fd90497
feat(plugin-system): 添加事件触发和订阅的白名单机制
...
为事件系统添加权限控制功能,包括:
- 在BaseEvent中新增allowed_subscribers和allowed_triggers白名单字段
- 事件管理器触发和订阅时进行白名单验证
- 为所有系统默认事件设置仅允许SYSTEM插件触发
- 在所有事件触发调用处显式传递plugin_name="SYSTEM"参数
确保只有授权插件可以触发特定事件和订阅处理器,增强系统安全性。
2025-08-28 18:25:33 +08:00
minecraft1024a
5153d8f60f
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 17:59:46 +08:00
minecraft1024a
41e862281d
替换名字
2025-08-28 17:58:08 +08:00
Windpicker-owo
42a8c091ec
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 17:18:05 +08:00
Windpicker-owo
786a830da5
fix(plugin): 为事件处理器添加异步锁和并行执行支持
...
在BaseEvent类中引入asyncio.Lock确保同一个事件不能同时激活多次
重构事件触发逻辑,使用asyncio.gather并行执行所有订阅者处理器
提高事件处理效率的同时保证线程安全
2025-08-28 17:18:01 +08:00
tt-P607
f42b4adaab
哈哈哈哈哈,中,太中咧!!!一把出分啊各位一把出分!没有虫啊没有bug!直接就能回复自己说说下的评论了 😋 爽!
2025-08-28 17:13:24 +08:00
Windpicker-owo
935a82fa58
引入lock防止同一个事件同时触发
2025-08-28 16:57:25 +08:00
tt-P607
96a7dff86b
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 16:36:06 +08:00
tt-P607
2a67ad1e86
feat(maizone): 实现对说说中图片的识别与理解
...
重构了原有的评论生成逻辑,使其能够处理和理解说说中的图片内容。现在,插件可以调用视觉模型来描述图片,并将图片描述作为上下文信息,从而生成更贴切、更具情景感的评论。
主要变更:
- 新增了对说说中图片的识别能力,在生成评论时会考虑图片内容。
- 将原有的直接调用LLM API的评论生成方式,重构为使用更高级的 `generator_api`,以更好地融入框架的对话管理和人格系统。
- 为评论和回复生成的逻辑增加了重试机制,提高了在网络波动或API不稳定情况下的成功率。
- 修复了监控自己说说时,因QQ号类型不匹配(int vs str)导致无法正确识别自己身份的bug。
- 优化了对自己说说的评论回复逻辑,确保不会回复自己发表的评论。
- 增强了HTML解析能力,现在可以从网页版QQ空间中提取图片和更完整的评论结构。
2025-08-28 16:35:52 +08:00
雅诺狐
5d3e0315b2
修复qq提取
2025-08-28 13:37:20 +08:00
雅诺狐
c1a219b5bd
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-28 13:00:36 +08:00
雅诺狐
f320d1f576
更新示例
2025-08-28 13:00:32 +08:00
tt-P607
829ff4cd4f
feat(sleep): 实现睡眠唤醒与重新入睡机制
...
引入了更完善的睡眠唤醒和重新入睡逻辑,以处理在睡眠期间被消息打扰的情况。
- **唤醒机制**: 当在睡眠时间内收到消息并达到唤醒阈值时,角色会被唤醒并进入愤怒状态。唤醒后,将保持清醒状态处理消息,而不是立即重新入睡。
- **状态持久化**: 新增 `_is_woken_up` 状态到 `schedule_manager`,并将其持久化,以确保在重启后能记住唤醒状态。
- **重新入睡**: 如果角色被吵醒后,在配置的一段时间内(`re_sleep_delay_minutes`)没有收到新消息,系统将自动尝试重新进入睡眠状态,以模拟更自然的行为。
- **上下文同步**: 在唤醒时,`wakeup_manager` 会通知 `schedule_manager` 更新其内部状态,确保系统各模块之间的睡眠状态一致。
2025-08-28 08:48:19 +08:00
tt-P607
910b0db5d2
feat(core): 实现HFC及睡眠状态的持久化
...
将HFC上下文、唤醒管理器和日程管理器的核心状态保存到本地存储,并在程序启动时加载。这确保了角色的能量、睡眠压力、唤醒度、失眠状态和弹性睡眠进度在重启后能够恢复,增强了长期运行的连续性和稳定性。
主要变更:
- **HfcContext**: 增加状态的加载与保存逻辑,持久化能量、睡眠压力和失眠状态。
- **WakeupManager**: 增加状态的加载与保存逻辑,持久化唤醒度及愤怒状态。
- **ScheduleManager**: 增加弹性睡眠状态的加载与保存逻辑,持久化“准备入睡”及延迟睡眠的状态。
- **HeartFChatting**: 在主循环中调用保存HFC上下文状态的方法。
- 调整了失眠和唤醒逻辑,以更好地与持久化状态和弹性睡眠机制协同工作。
2025-08-28 02:50:02 +08:00
tt-P607
f34be9728a
feat(schedule): 引入弹性睡眠与睡前通知机制
...
新增了弹性睡眠功能,使AI的入睡行为更加自然。AI现在会根据睡眠压力决定是否延迟入睡,而不是严格按日程表时间立即休眠。
主要更新包括:
- **弹性睡眠逻辑**: 在进入理论睡眠时间时,会有一段5-10分钟的准备缓冲期。如果睡眠压力低于阈值,AI会推迟入睡,以增加互动时间。
- **睡前通知**: 在决定入睡后,AI可以自动向指定群组发送晚安消息。
- **配置选项**: 在配置文件中增加了相关选项,允许用户启用/禁用这些功能,并自定义睡眠压力阈值、最大延迟时间、通知群组和提示词。
- **代码重构**: 对 `is_sleeping` 方法进行了重构,将其拆分为理论睡眠时间判断和核心弹性逻辑,提高了代码的可读性和可维护性。
2025-08-28 00:45:30 +08:00
tt-P607
d072cde01b
fix(config): 为实验性功能配置添加默认值
...
为 `experimental` 配置项设置 `default_factory`,确保在配置文件中未提供该项时,程序能够正常初始化并使用默认配置,避免因缺少配置而引发的启动错误。
2025-08-27 23:31:46 +08:00
tt-P607
099544dd9a
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-27 23:14:13 +08:00
tt-P607
29e18c2db7
feat(monthly_plan): 增加月度计划数量上限并自动清理
...
style: 优化月度计划相关日志输出
- 在数据库模块中新增物理删除月度计划的函数 `delete_plans_by_ids`
- 在月度计划管理器中引入 `max_plans_per_month` 配置,用于限制每月计划数量
- 当检测到计划数量超出上限时,自动按创建时间删除最旧的计划以维持数量限制
- 优化了标记计划完成和删除计划时的日志记录,使其输出更详细的计划内容
- 调整了检查现有计划时的日志信息,使其更清晰
2025-08-27 23:13:55 +08:00
雅诺狐
963087f778
更新 bot_config_template.toml
2025-08-27 22:45:07 +08:00
tt-P607
35157a1521
某个狐狸又忘记改版本号了
2025-08-27 22:44:26 +08:00
雅诺狐
57c16bae38
Update bot_config_template.toml
2025-08-27 22:24:23 +08:00
雅诺狐
fe22b79c63
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-27 22:21:44 +08:00