Commit Graph

5707 Commits

Author SHA1 Message Date
DawnARC
02262e2112 fix:使用 LLMServiceClient 进行人物事实提取(换请求) 2026-03-31 21:31:27 +08:00
A-Dawn
d56a8ba030 更新 A_memorix 子模块指针至 60224ce 2026-03-31 20:37:04 +08:00
Dawn ARC
33b499014e Merge branch 'Mai-with-u:r-dev' into r-dev 2026-03-31 19:41:03 +08:00
A-Dawn
683cdf4a13 更新 A_memorix 子模块指针至 f03092a 2026-03-31 19:22:10 +08:00
DrSmoothl
daf7c644a6 扬了 sys 控制 2026-03-31 16:59:02 +08:00
A-Dawn
bcf2bfcd63 fix:对齐插件ID 2026-03-31 16:40:47 +08:00
Dawn ARC
6591966c8a Merge branch 'Mai-with-u:r-dev' into r-dev 2026-03-31 16:19:44 +08:00
A-Dawn
a004c59e1e feat: 添加记忆自动化钩子与回写
在接收和发送消息时注册记忆自动化,并重构人物记忆回写逻辑以使用 memory_service.ingest_text。主要改动如下:

在接收消息时调用 memory_automation_service.on_incoming_message(bot 侧),在发送消息时调用 on_message_sent(send_service 侧),并加入安全的错误处理。
在 person_info 中,用 memory_service.ingest_text 替换手动操作 person.memory_points 的方式;新增 resolve_person_id_for_memory 辅助方法,并为回写计算一个 external_id 指纹。
扩展插件运行时的记忆搜索能力,使其支持 mode、chat_id、person_id、user_id、group_id、时间范围以及 respect_filter 选项。
改进 find_messages 的数据库会话处理,改为使用单一 session,并修复排序和过滤逻辑。
从 KnowledgeFetcher 中移除未使用的 LLMRequest 导入和初始化。
更新术语解释器(jargon explainer)的导入路径,使用新的模块位置。
更新 .gitignore 例外规则,允许特定的 pytest 数据文件被纳入版本控制。
文档小调整:明确人物事实提取规则(将直接使用的 “you” 改写为第三人称)。
2026-03-31 15:49:49 +08:00
A-Dawn
ea9a1b5802 Merge remote-tracking branch 'upstream/r-dev' into sync/pr-1564-upstream-20260331
# Conflicts:
#	src/chat/brain_chat/PFC/conversation.py
#	src/chat/brain_chat/PFC/pfc_KnowledgeFetcher.py
#	src/chat/knowledge/lpmm_ops.py
2026-03-31 10:43:55 +08:00
DrSmoothl
ef036d06b6 chore: 注释掉启动时的调试输出信息 2026-03-31 10:14:53 +08:00
DrSmoothl
5d410171d2 feat(migration): enhance migration progress reporting with detailed record and table tracking 2026-03-31 09:29:58 +08:00
DrSmoothl
c2c992ff01 feat(database-migrations): implement database migration manager and related components
- Add DatabaseMigrationManager for orchestrating database migrations, including planning and executing migration steps.
- Introduce models for migration state, execution context, and migration steps.
- Implement MigrationPlanner to generate migration plans based on current and target versions.
- Create MigrationRegistry for registering and managing migration steps.
- Develop SchemaVersionResolver to determine the current database schema version.
- Add SQLiteSchemaInspector for inspecting SQLite database structures.
- Implement progress reporting tools using rich for visualizing migration progress.
- Introduce SQLiteUserVersionStore for managing schema version storage in SQLite.
2026-03-31 09:16:25 +08:00
DrSmoothl
ea4cea39f2 feat: 增强数据库服务,添加类型转换以支持更灵活的查询 2026-03-31 08:21:53 +08:00
DrSmoothl
5ac088ded8 feat: 更新配置版本至 8.4.0,新增工具筛选相关字段和方法 2026-03-31 00:03:49 +08:00
DrSmoothl
42dbd5462a feat(mcp_module): add hooks, host LLM bridge, and models for MCP integration
- Introduced MCPHostCallbacks for optional host capabilities like sampling and logging.
- Implemented MCPHostLLMBridge to handle MCP Sampling requests and bridge to LLM service.
- Created models for structured data conversion between MCP SDK and internal data models, including tool content items, prompts, and resources.
- Enhanced error handling and logging for better traceability during sampling operations.
2026-03-30 23:51:05 +08:00
DrSmoothl
abb1d071b1 feat: 重构 MCP 配置管理,移除旧配置文件,更新为使用全局配置 2026-03-30 23:32:13 +08:00
DrSmoothl
dc2bf02a42 feat: Introduce unified tooling system for plugins and MCP
- Added a new `tooling` module to define a unified model for tool declarations, invocations, and execution results, facilitating compatibility between plugins, legacy actions, and MCP tools.
- Implemented `ToolProvider` interface for various tool providers including built-in tools, MCP tools, and plugin runtime tools.
- Enhanced `MCPManager` and `MCPConnection` to support unified tool invocation and execution results.
- Updated `ComponentRegistry` and related classes to accommodate the new tool specifications and descriptions.
- Refactored existing components to utilize the new tooling system, ensuring backward compatibility with legacy actions.
- Improved error handling and logging for tool invocations across different providers.
2026-03-30 23:11:56 +08:00
DrSmoothl
898b693fe0 修复 pylance 2026-03-30 22:07:07 +08:00
DrSmoothl
e7dbaa1a70 汉化日志 2026-03-30 21:56:18 +08:00
SengokuCola
0e14cb5de9 feat:增加认识系统 2026-03-30 01:04:27 +08:00
SengokuCola
01ef29aadb feat:重构maisaka的消息类型,添加打断功能 2026-03-30 00:45:41 +08:00
SengokuCola
b5408b4550 feat:修复私聊回复问题,修复wait动作,补上回复后处理 2026-03-29 19:57:34 +08:00
SengokuCola
96844a9bf5 feat:修复一些bug 2026-03-29 18:28:56 +08:00
SengokuCola
82bbf0fd52 remove:移除tool_use模型,修复Jargon提取问题,修改统计为tool统计 2026-03-29 16:26:34 +08:00
SengokuCola
868438e3c1 feat:移除旧的工具系统,并使emoji成为maisaka内置动作 2026-03-29 15:25:36 +08:00
SengokuCola
614d2f43d6 私聊也走maisaka 2026-03-29 15:25:14 +08:00
SengokuCola
8cb0ad3d42 ref:分离know模块和cli模块 2026-03-29 15:06:50 +08:00
SengokuCola
f32edfa732 mcp独立模块 2026-03-29 14:39:14 +08:00
SengokuCola
5876f246c0 feat:重新启用表达学习黑话学习,黑话使用和表达使用 2026-03-29 14:39:07 +08:00
SengokuCola
20bab79872 ref:移除一些荣誉模块,新建maisaka回复器 2026-03-29 01:00:43 +08:00
SengokuCola
61819b572d feat:给maisaka增加了msg_id 2026-03-28 16:13:19 +08:00
SengokuCola
233114b22d feat:分离主循环和消息接收流程,移除文件操作 2026-03-28 15:54:28 +08:00
SengokuCola
c545b24966 feat:优化maisak循环逻辑,分离接受和处理,移除冗余config.py 2026-03-28 15:23:38 +08:00
DrSmoothl
8b85c483b8 feat: 添加 API 匹配收集方法以增强 API 解析能力 2026-03-28 14:21:52 +08:00
DrSmoothl
7a460a474d feat: 更新多个文件以使用 SessionMessage 替代 MaiMessage,并调整相关逻辑 2026-03-28 13:39:48 +08:00
SengokuCola
a3bc145051 feat:让Maisaka使用message_cache 2026-03-27 15:08:11 +08:00
SengokuCola
0959193808 remove:两个弃用模块 2026-03-27 13:11:51 +08:00
DrSmoothl
414f7ad9a0 feat: 更新日志信息为中文以增强可读性 2026-03-26 23:08:52 +08:00
DrSmoothl
0a08973c41 feat: Enhance emoji and image management with asynchronous background processing
- Added support for scheduling background tasks to build emoji and image descriptions when not found in cache.
- Improved error handling and logging for emoji and image processing.
- Updated `SessionMessage` processing to allow for optional heavy media analysis and voice transcription.
- Refactored logging messages for better clarity and consistency across various modules.
- Introduced a new function to build outbound log previews for messages, enhancing logging capabilities.
2026-03-26 23:03:47 +08:00
DrSmoothl
777d4cb0d2 feat: Enhance OpenAI compatibility and introduce unified LLM service data models
- Refactored model fetching logic to support various authentication methods for OpenAI-compatible APIs.
- Introduced new data models for LLM service requests and responses to standardize interactions across layers.
- Added an adapter base class for unified request execution across different providers.
- Implemented utility functions for building OpenAI-compatible client configurations and request overrides.
2026-03-26 16:15:42 +08:00
SengokuCola
6e7daae55d Merge branch 'r-dev' of https://github.com/Mai-with-u/MaiBot into r-dev 2026-03-24 20:58:16 +08:00
SengokuCola
a5fc4d172d feat:提供原生vlm支持 2026-03-24 20:57:57 +08:00
DrSmoothl
0b0f47a444 feat: Enhance Hook System with HookHandler and Dispatcher
- Introduced HookHandlerEntry to manage hook processing with attributes like hook name, mode, order, timeout, and error policy.
- Implemented normalization methods for hook attributes to ensure valid configurations.
- Updated ComponentRegistry to support retrieval of hook handlers based on hook names, with sorting by mode and order.
- Refactored HookDispatcher to handle invocation of hooks, separating blocking and non-blocking handlers, and managing execution results.
- Added support for registering hook specifications and invoking hooks across supervisors in PluginRuntimeManager.
- Removed deprecated workflow step handling from PluginRunner, streamlining hook invocation responses.
2026-03-24 19:04:05 +08:00
SengokuCola
6cfc92e66f feat:添加maisaka接管回复逻辑 2026-03-24 18:11:15 +08:00
Dawn ARC
ada6399ea5 Merge branch 'Mai-with-u:r-dev' into r-dev 2026-03-24 16:32:42 +08:00
DrSmoothl
865e4916e3 refactor: 简化 display_name 属性的实现逻辑 2026-03-24 16:20:06 +08:00
DrSmoothl
7f490914d5 feat: 重构数据模型,添加聊天目标信息和回复生成结果模型 2026-03-24 16:17:01 +08:00
Dawn ARC
cd91ee6068 Merge branch 'Mai-with-u:r-dev' into r-dev 2026-03-24 16:11:54 +08:00
DrSmoothl
dcdb84acb1 feat: 添加规划动作相关数据模型,重构相关逻辑 2026-03-24 16:04:23 +08:00
Dawn ARC
863b7a5d43 Merge branch 'Mai-with-u:r-dev' into r-dev 2026-03-24 15:49:21 +08:00