Commit Graph

5789 Commits

Author SHA1 Message Date
SengokuCola
07597bc1d7 feat:新增sub_agent,暂时用于emoji选择;修改部分配置位置 2026-04-03 21:57:35 +08:00
Dawn ARC
b6db0455c5 Merge branch 'Mai-with-u:r-dev' into r-dev 2026-04-03 21:27:19 +08:00
SengokuCola
ce580d1f8b feat:可以查看转发消息,新增复杂消息,修复表情包缓存,修改bot自己的消息回调msg_id 2026-04-03 20:55:49 +08:00
DawnARC
291420b7c7 merge: 同步 upstream/r-dev 并解决冲突 2026-04-03 19:56:45 +08:00
DawnARC
da95b06f96 feat:完善长期记忆控制台导入链路与联调测试
summary:\n- 扩展长期记忆控制台导入、调优与删除相关 UI/接口,补充中文化展示与任务细粒度状态管理\n- 强化 memory API 与后端路由能力,补齐导入任务、图谱检索、配置与运行态相关字段\n- 新增与增强前后端测试,覆盖导入多文件类型、检索、调优、删除及图谱查询关键路径

description:\n- dashboard: 重构 knowledge-base 页面与 memory-api,统一任务队列、分块分页、来源删除恢复、调优闭环交互\n- backend: 扩展 webui memory 路由与 A_Memorix 内核检索逻辑,完善服务侧能力与配置 schema\n- tests: 增加 webui 集成测试和 kernel 单测,提升导入/检索/调优/删除全流程回归保障
2026-04-03 19:50:08 +08:00
SengokuCola
5cdca2bbd4 fix:降低quote的概率 2026-04-03 18:33:51 +08:00
SengokuCola
fc753f7e9f feat:maisak正确解析图片原始数据,reply信息 2026-04-03 17:22:53 +08:00
SengokuCola
b74b60cb1a feat:移除旧的maisaka cli逻辑 2026-04-03 15:31:44 +08:00
DrSmoothl
8ba43bb694 feat: 更新 maibot-plugin-sdk 依赖版本至 2.3.0 2026-04-03 15:25:44 +08:00
DrSmoothl
a2fd0a1750 test 2026-04-03 15:24:53 +08:00
SengokuCola
6c720e0403 ref:重构maisaka内置工具逻辑,拆分文件 2026-04-03 14:51:05 +08:00
SengokuCola
6e6aa0b13a feat:生成器可用多消息模式 2026-04-03 13:43:49 +08:00
DawnARC
eac5495d00 feat:移除submodule安装流 2026-04-03 08:29:15 +08:00
A-Dawn
15d436b3a1 refactor: 将 A_Memorix 重构为主线长期记忆子系统并重建管理界面
- 将 A_Memorix 从旧 submodule / 插件形态迁入主线源码,主体落到 src/A_memorix
- 调整主程序接入方式,使 A_Memorix 作为源码内长期记忆子系统运行
- 回收父项目插件体系中针对 A_Memorix 的特判,减少对 plugin 通用层的侵入
- 将长期记忆配置、运行时、自检、导入、调优等能力收口到 memory 路由与主线服务层
- 重做长期记忆控制台与图谱页面,按 MaiBot 现有 dashboard 风格接入
- 补充实体关系图与证据视图双视图能力,支持查看节点、关系、段落及其证据链路
- 新增长期记忆配置编辑器与 memory-api,支持主线内配置管理
- 补齐删除管理能力:删除预览、混合删除、来源批量删除、删除操作恢复
- 优化删除预览与删除操作详情的前端展示,支持分页、检索,并以实体名/关系内容/段落摘要替代单纯 hash 展示
- 修复图谱与控制台相关前端问题,包括证据视图切换、查询触发时机、删除弹层空值保护等
- 新增或更新 A_Memorix 相关测试、WebUI 路由测试、前端 vitest 测试与辅助验证脚本
- 移除旧 plugins/A_memorix、.gitmodules 及相关历史维护文档
2026-04-03 08:08:24 +08:00
DrSmoothl
aea87e18f1 feat: enhance bot configuration with new sections and JSON field hooks
- Added support for new configuration sections: relationship, database, maisaka, mcp, and plugin_runtime.
- Introduced complex field hooks for handling JSON configurations in chat talk value rules, expression learning lists, and more.
- Updated the field hooks to include schema metadata for better UI representation.
- Refactored the bot configuration page to utilize a more dynamic approach for managing section values and state.
- Improved the configuration schema generation to ensure all top-level sections have UI metadata.
- Added tests to validate the new configuration schema and ensure proper functionality of the JSON field hooks.
2026-04-03 02:46:07 +08:00
DrSmoothl
4ec06ece56 feat: add plugin dependency pipeline and HTML rendering service
- Implemented a new dependency pipeline for plugins to manage Python package dependencies, including conflict detection and automatic installation of missing dependencies.
- Introduced an HTML rendering service that utilizes existing browsers to render HTML content as PNG images, with support for various configurations and error handling.
2026-04-03 01:48:23 +08:00
SengokuCola
fbc2fba6ff Merge branch 'r-dev' of https://github.com/Mai-with-u/MaiBot into r-dev 2026-04-03 00:00:55 +08:00
DrSmoothl
1906890b67 feat: add unified WebSocket connection manager and routing
- Implemented UnifiedWebSocketManager for managing WebSocket connections, including subscription handling and message sending.
- Created unified WebSocket router to handle client messages, including authentication, subscription, and chat session management.
- Added support for logging and plugin progress subscriptions.
- Enhanced error handling and response structure for WebSocket operations.
2026-04-02 22:08:52 +08:00
DrSmoothl
7d0d429640 feat: Enhance plugin runtime configuration and hook management
- Added `inactive_plugins` field to `RunnerReadyPayload` and `ReloadPluginResultPayload` to track plugins that are not activated due to being disabled or unmet dependencies.
- Introduced `InspectPluginConfigPayload` and `InspectPluginConfigResultPayload` for inspecting plugin configuration metadata.
- Implemented `PluginActivationStatus` enum to better represent plugin activation states.
- Updated `_activate_plugin` method to return activation status and handle inactive plugins accordingly.
- Added hooks for send service to allow modification of messages before and after sending.
- Created new runtime routes for listing hook specifications in the WebUI.
- Refactored plugin configuration handling to utilize runtime inspection for better accuracy and flexibility.
- Enhanced error handling and logging for plugin configuration operations.
2026-04-02 21:16:31 +08:00
SengokuCola
975531592b feat:修改多语言prompt 2026-04-02 17:56:46 +08:00
SengokuCola
56f7184c4d feat:聊天特定的额外prompt支持 2026-04-01 20:14:31 +08:00
SengokuCola
61deee72af Merge branch 'r-dev' of https://github.com/Mai-with-u/MaiBot into r-dev 2026-04-01 20:13:46 +08:00
SengokuCola
fe6ccaaf86 fix:部分模型不支持gif 2026-04-01 19:56:08 +08:00
DrSmoothl
7b3c12ba02 feat: add runtime validation for plugin configurations
- Introduced a new method `validate_plugin_config` in `PluginRuntimeManager` to validate plugin configurations at runtime.
- Implemented the `_normalize_plugin_config` method in `PluginRunner` to normalize and persist plugin configurations.
- Enhanced the `PluginRunner` to handle configuration validation requests and return normalized configurations.
- Updated the WebUI routes to utilize runtime validation for plugin configurations, ensuring that configurations are validated and normalized before saving.
- Added tests for runtime configuration validation and normalization processes, including handling of invalid configurations.
2026-04-01 19:39:55 +08:00
SengokuCola
efb84df768 fix:无参工具在某些api报错 2026-04-01 18:28:00 +08:00
SengokuCola
f2aedf7681 remove:emoji插件,修复tool被截断的问题 2026-04-01 17:06:44 +08:00
SengokuCola
cecc58a9e7 feat:使用url阅览图片,标记表情包类消息 2026-04-01 16:21:30 +08:00
SengokuCola
5b92942194 feat:修改图片展示模式,合并no_reply和stop 2026-04-01 14:26:03 +08:00
A-Dawn
bf5eb45709 Merge remote-tracking branch 'upstream/r-dev' into r-dev
# Conflicts:
#	src/memory_system/chat_history_summarizer.py
#	src/memory_system/memory_retrieval.py
#	src/memory_system/retrieval_tools/__init__.py
2026-04-01 14:20:22 +08:00
SengokuCola
d713aa9576 feat:显示实时占用上下文,移除旧记忆系统 2026-04-01 13:18:17 +08:00
SengokuCola
503a257d66 remove:无用配置 2026-04-01 13:06:01 +08:00
SengokuCola
a7310916e6 fix:表情包发送无记录,两次wait结果,notice不显示msg_id,展示每次token上下文 2026-04-01 12:36:33 +08:00
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