Commit Graph

3549 Commits (12d4f236becf1c17da7527aac579363ff4e9c56d)

Author SHA1 Message Date
UnCLAS-Prommer 0d07e85434
全新的process方法完成(Message其他部分仍未完成);对应测试;调整部分注释;数据库检索优化 2026-02-23 21:29:17 +08:00
UnCLAS-Prommer 698b8355a4
移除旧文件;补充chat_manager方法 2026-02-22 22:33:54 +08:00
UnCLAS-Prommer 37f8c923c1
ChatSession(原ChatStream)与ChatManager;由于功能简单,测试略 2026-02-22 22:26:28 +08:00
UnCLAS-Prommer 04a5bf3c6d
Merge branch 'r-dev' of github.com:Mai-with-u/MaiBot into r-dev 2026-02-21 23:50:53 +08:00
UnCLAS-Prommer 8674f50d90
PersonInfo相关提交,添加注释,重命名文件 2026-02-21 23:50:18 +08:00
DrSmoothl 6378bb2052 fix Ruff 2026-02-21 16:29:30 +08:00
DrSmoothl eaef7f0e98 Ruff Format 2026-02-21 16:24:24 +08:00
DrSmoothl 2cb512120b feat(plugin-system): harden P0 safety with workflow timeout, service ACL, and contract validation
- enforce step timeout/cancellation in workflow engine
- add caller authorization boundary for cross-plugin service calls
- validate params_schema and return_schema at runtime
2026-02-21 16:11:52 +08:00
UnCLAS-Prommer 6d196454ee
Merge branch 'r-dev' of github.com:Mai-with-u/MaiBot into r-dev 2026-02-21 15:55:57 +08:00
UnCLAS-Prommer 119241f251
PersonInfoModel; 修改部分方法参数和部分文件位置;移除多余文件;炸毁可启动性 2026-02-21 15:54:03 +08:00
DrSmoothl 6fcc53a22b feat(plugin-system): add workflow pipeline and cross-plugin service registry 2026-02-20 19:24:05 +08:00
UnCLAS-Prommer 1c0580c577
ImageManager及测试 2026-02-19 19:02:44 +08:00
UnCLAS-Prommer 0a572515ba
表情管理器调整,减少计算 2026-02-19 00:04:53 +08:00
UnCLAS-Prommer 537b24c24e
获取和注册一体化修正 2026-02-18 21:34:56 +08:00
UnCLAS-Prommer ccd1be7bed
Merge branch 'r-dev' of github.com:Mai-with-u/MaiBot into r-dev 2026-02-18 16:00:58 +08:00
UnCLAS-Prommer c9f72f7f2f
修改部分字段含义,维护缓存 2026-02-18 16:00:45 +08:00
DrSmoothl f66e25b1a7
fix(webui): fix missing imports and create toml_utils module
- Create src/common/toml_utils.py with TOML utility functions
- Fix APIAdapterConfig → ModelConfig in config.py (4 locations)
- Fix git_mirror_service import path in plugin.py
- Fix emoji.py type annotations and unused imports
- Fix jargon.py comment (ChatStreams → ChatSession)
- All routers now import successfully
- Zero Peewee remnants verified across src/webui/
2026-02-17 20:19:37 +08:00
DrSmoothl 7255cc5602
fix(webui): remove references to deleted Expression fields
- 移除 ExpressionUpdateRequest 中的 checked/rejected/require_unchecked 字段
- 移除更新逻辑中的 setattr
- 添加 chat_id → session_id 映射
2026-02-17 19:58:29 +08:00
DrSmoothl 390d1daefd
refactor(webui): migrate jargon routes from Peewee to SQLModel
- 完全迁移到 SQLModel
- chat_id → session_id 映射
- ChatStreams → ChatSession 替代
- 移除 is_global 字段
- 使用 group_id 替代 group_name
2026-02-17 19:58:21 +08:00
DrSmoothl 7da0811b5c
refactor(webui): migrate emoji routes from Peewee to SQLModel
- 完全迁移到 SQLModel,所有 DB 操作使用 get_db_session()
- 字段映射:image_hash → emoji_hash
- datetime 时间戳转换
- 移除 format/usage_count 字段
2026-02-17 19:58:14 +08:00
DrSmoothl 0ea18a4edc
fix minssing files 2026-02-17 19:04:54 +08:00
DrSmoothl ed27217c94
feat(config): add UI metadata to all Bot config sections
- BotConfig: 5/5 fields (100%)
- ChatConfig: 9/9 fields (100%)
- PersonalityConfig: 8/8 fields (100%)
- MemoryConfig: 9/9 fields (100%)
- ExpressionConfig: 13/13 fields (100%)
- WebUIConfig: 8/8 fields (100%)
- DatabaseConfig: 1/1 fields (100%)

All user-facing fields now have x-widget and x-icon metadata.
Complex fields marked as 'custom' for Hook rendering.

Completes Task 9 of webui-config-visualization-refactor plan.
2026-02-17 17:35:18 +08:00
DrSmoothl bae87d122b
feat(config): add UI metadata to ModelConfig fields
Add json_schema_extra UI metadata to all Model-related configuration classes:
- APIProvider (7 fields): name, base_url, api_key, client_type, max_retry, timeout, retry_interval
- ModelInfo (8 fields): model_identifier, name, api_provider, price_in, price_out, temperature, max_tokens, force_stream_mode, extra_params
- TaskConfig (5 fields): model_list, max_tokens, temperature, slow_threshold, selection_strategy
- ModelTaskConfig (9 fields): utils, replyer, vlm, voice, tool_use, planner, embedding, lpmm_entity_extract, lpmm_rdf_build

Pattern: Field(default=..., [ge/le constraints], json_schema_extra={x-widget, x-icon, [step]})
Widget types: input, slider, switch, select, custom (for complex types)
Constraints mapped: ge/le to minValue/maxValue in Schema output (Task 1d)

All 30 user-facing fields now have complete metadata coverage:
- x-widget: rendering hint for frontend
- x-icon: icon identifier from lucide-react
- Constraints: ge, le for numeric validation

Verification:
✓ All classes import successfully
✓ 100% metadata coverage on user-facing fields
✓ Config instance creation works
✓ Backward compatible with existing validation

Relates to: Task 12 (Wave 3) of webui-config-visualization-refactor
2026-02-17 17:25:48 +08:00
DrSmoothl 5879164bfe
feat(config): add UI metadata to remaining ChatConfig fields (Wave 2)
- plan_reply_log_max_per_chat: input widget + file-text icon
- llm_quote: switch widget + quote icon
- enable_talk_value_rules: switch widget + settings icon
- talk_value_rules: custom widget + list icon

All ChatConfig fields now have json_schema_extra metadata for complete UI visualization support.
2026-02-17 17:09:07 +08:00
DrSmoothl 278a084c23
feat(webui): enhance ConfigSchemaGenerator with field_docs and UI metadata
- Add AttrDocBase.get_class_field_docs() classmethod for class-level field docs extraction
- Merge json_schema_extra (x-widget, x-icon, step) into schema output
- Map Pydantic constraints (ge/le) to minValue/maxValue for frontend compatibility
- Add ge=0, le=1 constraints to ChatConfig.talk_value for validation

Completes Task 1 (including subtasks 1a, 1b, 1c, 1d) of webui-config-visualization-refactor plan.
2026-02-17 17:05:25 +08:00
DrSmoothl 19c9c5a39a
feat(webui): use get_class_field_docs for schema field descriptions 2026-02-17 16:58:59 +08:00
DrSmoothl 1631774452
feat(config): add UI metadata to ChatConfig sample fields 2026-02-17 16:49:49 +08:00
UnCLAS-Prommer 75e154741d
方法名调整;确保公共属性被定义 2026-02-15 22:56:26 +08:00
DrSmoothl 0dccc23e76
更新 GitHub Actions 工作流,统一使用 ubuntu-24.04 作为运行环境;新增发布 WebUI 产物的工作流 2026-02-15 16:19:13 +08:00
UnCLAS-Prommer 5799ce7efe
新功能 2026-02-15 13:29:56 +08:00
UnCLAS-Prommer 6dc33e9e86
提取一些公共方法 2026-02-15 00:18:16 +08:00
UnCLAS-Prommer 6db889580d
方便消息格式检查的property 2026-02-14 23:52:58 +08:00
DrSmoothl dc36542403
添加文件监视器地基模块,重构模型请求模块使用新版本的配置热重载模块,新增watchfiles依赖 2026-02-14 21:17:24 +08:00
UnCLAS-Prommer daad0ba2f0
从maim_message的序列化和反序列化;更多消息组件 2026-02-14 16:19:56 +08:00
UnCLAS-Prommer c0c003a098
更舒适的颜色配置方案,真彩色支持 2026-02-14 16:19:04 +08:00
DrSmoothl 16b16d2ca6
重构绝大部分模块以适配新版本的数据库和数据模型,修复缺少依赖问题,更新 pyproject 2026-02-13 20:39:11 +08:00
UnCLAS-Prommer c14736ffca
更好更规范的类型注解;AGENTSMD试作 2026-02-13 16:24:03 +08:00
UnCLAS-Prommer b80b5afe2a
先推上去 2026-02-13 15:45:38 +08:00
UnCLAS-Prommer 9a3e8887af
Merge branch 'r-dev' of github.com:Mai-with-u/MaiBot into r-dev 2026-02-13 15:38:18 +08:00
UnCLAS-Prommer 26b8f56251
移除不必要属性,修改一个方法为非协程 2026-02-13 15:37:49 +08:00
DrSmoothl e6e0a57e3b
修复导入路径:将服务器模块的导入路径更改为正确的消息服务器路径 2026-02-13 15:33:55 +08:00
UnCLAS-Prommer 14f6fdb2b2
解决潜在的存储错误 2026-02-13 15:25:18 +08:00
UnCLAS-Prommer b9f3c17e14
合并到远程 2026-02-13 13:41:58 +08:00
DrSmoothl 60f76e4d4e
添加对 peewee 的旧数据库的兼容层,初步重构插件的 database API 2026-02-09 22:44:56 +08:00
SengokuCola 3a5fd9d3e3 feat:自动检测并升级旧版配置文件 2026-02-06 23:05:43 +08:00
UnCLAS-Prommer 049027a48f
maim_message强制版本要求;忽略APIServer下乱七八糟的类型注解和Patch 2026-02-05 16:53:48 +08:00
UnCLAS-Prommer 4dbe919cfe
移除.env文件 2026-02-05 16:16:44 +08:00
UnCLAS-Prommer 54e9007b8d
合并tcp_connector,移除多余的toml_utils.py 2026-02-05 15:43:37 +08:00
UnCLAS-Prommer 4edb2878a6
移除多余文件;更改命名 2026-02-05 13:23:45 +08:00
UnCLAS-Prommer e2c6716a41
重命名防止混乱 2026-02-04 22:24:25 +08:00