Commit Graph

431 Commits

Author SHA1 Message Date
DrSmoothl
78858f7004 fix: 更新插件适配器名称以反映新的命名约定 2026-03-24 12:14:59 +08:00
DrSmoothl
0c508995dd feat: enhance session ID calculation and plugin management
- Updated `calculate_session_id` method in `SessionUtils` to include optional `account_id` and `scope` parameters for more granular session ID generation.
- Added new environment variables in `plugin_runtime` for external plugin dependencies and global configuration snapshots.
- Introduced methods in `RuntimeComponentManagerProtocol` for loading and reloading plugins globally, accommodating external dependencies.
- Enhanced `PluginRunnerSupervisor` to manage external available plugin IDs during plugin reloads.
- Implemented dependency extraction and management in `PluginRuntimeManager` to handle cross-supervisor dependencies.
- Added tests for session ID calculation and message registration in `ChatManager` to ensure correct behavior with new parameters.
2026-03-24 12:14:58 +08:00
DrSmoothl
d07915eea0 Refactor message sending architecture and implement legacy driver support
- Removed UniversalMessageSender from group_generator.py and private_generator.py.
- Updated PlatformIOManager to manage legacy send drivers and ensure send pipeline readiness.
- Enhanced LegacyPlatformDriver to utilize prepared messages for sending.
- Refactored send_service to unify message sending logic and integrate with Platform IO.
- Added regression tests for Platform IO legacy driver and send service functionality.
2026-03-24 12:14:41 +08:00
DrSmoothl
56a6d2fd8c refactor: 优化数据库操作和模型定义,增强表达方式和黑话表的插入逻辑 2026-03-24 12:14:28 +08:00
DrSmoothl
4e2e7a279e feat: Implement adapter runtime state management and update handling
- Added support for adapter runtime state updates in the PluginRunnerSupervisor.
- Introduced new payload classes: AdapterStateUpdatePayload and AdapterStateUpdateResultPayload for handling state updates.
- Implemented methods to bind and unbind routes based on adapter connection status.
- Enhanced the NapCat adapter to report connection state and manage runtime state.
- Added tests for adapter runtime state synchronization and database session behavior in the statistic module.
- Updated existing methods to ensure proper handling of adapter state and route bindings.
2026-03-24 12:14:28 +08:00
DrSmoothl
a1859027ef refactor: 优化颜色映射和别名定义,增强模块一致性 2026-03-24 12:14:28 +08:00
UnCLAS-Prommer
310d7798ba refactor: hook_dispatcher相关的修改 2026-03-24 12:13:17 +08:00
晴猫
5eac9b3f31 fix: default i18n locale from system locale 2026-03-15 09:41:23 +09:00
晴猫
be047aa2c3 fix: align sender paths with plan, remove QQ-as-universal fallback
- Remove get_bot_account("qq") fallback from all 4 sender paths
  (plan L108/L208/L449: unknown platform = no account, never substitute QQ)
- Sender paths now error immediately if platform bot account is not configured
- Add detailed comments on filter_bot legacy fallback explaining why
  global user_id match is needed (plan contingency L528 insufficient for
  platform-tagged legacy rows like telegram+qq_account)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 08:25:56 +09:00
晴猫
d3420bd1b3 fix: address second-round review feedback on bot identity PR 2026-03-15 08:05:36 +09:00
晴猫
4f8ab0abb1 fix: address bot identity review regressions 2026-03-15 07:51:31 +09:00
晴猫
267b42001e fix: make bot identity platform-aware 2026-03-15 07:22:08 +09:00
DrSmoothl
172615f18a WebUI 前端 & 后端超级大重构 2026-03-14 21:06:36 +08:00
DrSmoothl
a4303d9b81 移除所有 MongoDB 风格 filter 2026-03-14 00:56:40 +08:00
DrSmoothl
898fab6de9 部分模块的新数据结构适配 2026-03-13 23:36:17 +08:00
UnCLAS-Prommer
e9badbc307 修正类型注解 2026-03-13 16:14:54 +08:00
UnCLAS-Prommer
de39099cd9 sourcery advice 2026-03-13 16:14:09 +08:00
DrSmoothl
a576313b22 Ruff Format 2026-03-13 11:45:26 +08:00
DrSmoothl
2a510312bc feat: 添加日志处理器适配功能,统一第三方库日志输出 2026-03-13 11:36:25 +08:00
春河晴
67b559200d move zh-CN prompt source 2026-03-13 02:36:08 +09:00
DrSmoothl
df8caf21ba feat: 添加 WebUI 模块的颜色映射和别名支持 2026-03-13 01:25:13 +08:00
DrSmoothl
baa7980f6d fix: 修复日志记录器名称获取逻辑,支持从不同字段获取名称 2026-03-13 01:22:02 +08:00
DrSmoothl
a685cfd9bf feat: 添加插件运行时模块的颜色映射和别名支持 2026-03-13 01:18:55 +08:00
UnCLAS-Prommer
272d0368b8 注释掉pfc内容,暂时恢复部分代码保证可启动性 2026-03-13 01:02:05 +08:00
春河晴
568685758b fix(i18n): tighten prompt and catalog fallback handling 2026-03-13 01:59:21 +09:00
春河晴
d418a8451b feat: 增强国际化验证功能,添加对共享翻译字符串的支持,优化提示模板加载逻辑 2026-03-13 01:59:20 +09:00
春河晴
55eb911dd3 fix(i18n): 修复 PROMPT_EXTENSIONS 元组声明、消除重复代码、优化锁策略
- fix: PROMPT_EXTENSIONS = (".prompt") 是字符串非元组,改为 (".prompt",)
- refactor: 将 extract_placeholders/format_template 统一到 loaders.py,
  消除 formatting.py、prompt_i18n.py、i18n_validate.py 三处重复
- perf: _get_catalog 和 load_prompt 改为双重检查锁定,I/O 不再阻塞其他线程
- perf: _log_once 使用独立 _warning_lock,不再与 _cache_lock 竞争
- fix: _scan_legacy_prompt_directory 添加 prompts_root 参数,修正 relative_to 语义
- refactor: 合并 _supported_prompt_files 两个变体为单函数 + recursive 参数
- docs: i18n.md 强化 repository-specific 校验策略标注,修正时间表述冗余
- fix: 验证脚本错误消息移除 Crowdin 暗示,标注为仓库级校验策略

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 01:59:20 +09:00
春河晴
b28c2dbc42 remove .txt ext of prompt 2026-03-13 01:00:15 +09:00
春河晴
c9bfedddd2 i18n: localize prompt templates with crowdin 2026-03-13 00:09:08 +09:00
SengokuCola
16f115bfac refactor: 移除无用文件 2026-03-12 19:50:32 +08:00
UnCLAS-Prommer
ff4de39c8b expressionLearner重构 2026-03-12 19:50:32 +08:00
UnCLAS-Prommer
f17b85c1bd 移除chat_message_builder 2026-03-12 19:50:32 +08:00
春河晴
c470fdfd1e i18n: crowdin integration 2026-03-12 17:23:17 +09:00
UnCLAS-Prommer
8b9cda4296 Final Commit Before Rdev 2026-03-11 20:18:30 +08:00
UnCLAS-Prommer
9fbb733e0a MessageUtils更新 2026-03-11 20:18:30 +08:00
UnCLAS-Prommer
9e2afaf6bc TempUpdate 2026-03-11 20:18:30 +08:00
UnCLAS-Prommer
46cb0278d7 HFC基本重构框架和TODO 2026-03-11 20:18:30 +08:00
UnCLAS-Prommer
cd81f943e3 炸掉 2026-03-10 13:45:57 +08:00
DrSmoothl
ce8d8dfd0a 重构整个插件系统,尝试恢复可启动性,新增插件系统maibot-plugin-sdk依赖 2026-03-07 19:40:51 +08:00
DrSmoothl
2e3dd44ee9 Refactor chat stream handling to use BotChatSession
- Updated imports and references from ChatStream to BotChatSession across multiple files.
- Adjusted method signatures and internal logic to accommodate the new session management.
- Ensured compatibility with existing functionality while improving code clarity and maintainability.
2026-03-07 00:57:37 +08:00
UnCLAS-Prommer
8712fc0d05 移除多余内容 2026-03-06 23:07:31 +08:00
UnCLAS-Prommer
c2b75a03d7 数据库模型字段添加;数据模型添加;utils_message传参控制 2026-03-06 22:45:47 +08:00
DrSmoothl
34bd115fa1 efactor(network): centralize port validation and enforce strict configured ports
add a shared port checker utility for availability and conflict detection
migrate WebUI, message server, and additional API server to use the new module
fail fast with clear error hints when a configured port is occupied (no auto-increment)
2026-03-04 22:14:53 +08:00
UnCLAS-Prommer
d03dc3601e 消息构建器:将消息转换为可读消息;其对应的测试文件 2026-03-04 21:01:51 +08:00
UnCLAS-Prommer
c16ced765e 适配db的修改;MessageComponent更新 2026-03-02 20:37:15 +08:00
UnCLAS-Prommer
3f93d93b9a 补上default 2026-03-02 20:34:52 +08:00
UnCLAS-Prommer
0751ac5066 Merge branch 'r-dev' of github.com:Mai-with-u/MaiBot into r-dev 2026-03-02 17:23:45 +08:00
UnCLAS-Prommer
e200b5b581 给Expression系统的一些准备文件 2026-03-02 17:18:13 +08:00
DrSmoothl
416bf36f1a refactor(database_model): replace Literal with Enum for modified_by field 2026-02-28 22:47:40 +08:00
UnCLAS-Prommer
c58da95353 链式调用构建消息 2026-02-28 16:54:38 +08:00