Commit Graph

5288 Commits

Author SHA1 Message Date
UnCLAS-Prommer
cd81f943e3 炸掉 2026-03-10 13:45:57 +08:00
UnCLAS-Prommer
3ea14a85c3 测试简化 2026-03-09 15:08:42 +08:00
DrSmoothl
dfa944b368 feat: 添加 _ready_event 以确保文件监视器在启动时准备就绪,优化监控逻辑 2026-03-09 15:04:58 +08:00
DrSmoothl
7e2ab0d71d feat(test): 移除 FileWatcher 中的 force_polling 参数,并添加等待时间以确保 watcher 建立基线 2026-03-09 14:57:59 +08:00
DrSmoothl
426cbc6190 feat(test): 在 FileWatcher 中添加 force_polling 参数以增强文件监控功能 2026-03-09 14:42:03 +08:00
DrSmoothl
5b7945ac7b feat: 添加 _wait_for 辅助函数以优化测试中的等待逻辑,调整 FileWatcher 的防抖设置 2026-03-09 14:35:54 +08:00
UnCLAS-Prommer
fbf946b352 更严厉测试 2026-03-08 17:26:51 +08:00
DrSmoothl
d0840db2a5 refactor: remove RuleEditor, RuleList, RulePreview, TimeRangePicker, and VoiceSection components
- Deleted RuleEditor.tsx, RuleList.tsx, RulePreview.tsx, TimeRangePicker.tsx, and VoiceSection.tsx as part of a cleanup.
- Updated index.ts to remove imports related to deleted components.
- Modified types.ts and model.tsx to accommodate changes in task configuration structure.
- Introduced new types for TargetItem and LearningItem to enhance type safety.
- Refactored ModelTaskConfig to be dynamic based on backend schema.
- Updated ModelProviderConfigPage to unwrap backend config response for better handling.
2026-03-08 00:12:10 +08:00
DrSmoothl
186073f13b feat: 添加递归转换函数以处理 TOML 文档,优化配置数据验证 2026-03-07 23:24:07 +08:00
DrSmoothl
b056ad2c34 feat: 添加动态 Tab 分组支持,优化配置界面 UI 元数据 2026-03-07 23:13:04 +08:00
DrSmoothl
d3a4e3f3e7 feat: 优先读取插件的 config_schema.json,提供富 UI 元数据支持 2026-03-07 22:31:44 +08:00
DrSmoothl
0451a7fef4 优化认证检查逻辑,确保加载状态显示在正确位置;更新配置验证逻辑,使用深拷贝确保数据完整性 2026-03-07 21:52:23 +08:00
DrSmoothl
2e4be9bd77 为 WebUI 首页支持 i18n 2026-03-07 21:32:09 +08:00
DrSmoothl
4565bd94b4 修复统计数据 API 中的数据库查询方法,优化性能和准确性 2026-03-07 21:18:36 +08:00
DrSmoothl
fe5cab9c41 修复 webui 明暗切换问题 2026-03-07 20:59:18 +08:00
DrSmoothl
3bbd812bc1 feat: 新增消息转发和混合发送能力,扩展数据库操作能力 2026-03-07 20:17:17 +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
baae2df154 feat: 集成新版本插件运行时,支持事件桥接与命令处理 2026-03-06 16:37:56 +08:00
DrSmoothl
d5cf4c9b8b refactor: 添加类型注解以增强代码可读性和类型安全 2026-03-06 12:35:31 +08:00
DrSmoothl
c6afa97060 补全新版插件系统的类型注解 2026-03-06 12:17:00 +08:00
DrSmoothl
1cd366bc09 refactor: 优化代码结构,简化条件判断和异常处理 2026-03-06 12:00:00 +08:00
DrSmoothl
2f21cd00bc feat: Enhance plugin runtime with new component registry and workflow executor
- Introduced `ComponentRegistry` for managing plugin components with support for registration, enabling/disabling, and querying by type and plugin.
- Added `EventDispatcher` to handle event distribution to registered event handlers, supporting both blocking and non-blocking execution.
- Implemented `WorkflowExecutor` to manage a linear workflow execution across multiple stages, including command routing and error handling.
- Created `ManifestValidator` for validating plugin manifests against required fields and version compatibility.
- Updated `RPCClient` to use `MsgPackCodec` for message encoding.
- Enhanced `PluginRunner` to support lifecycle hooks for plugins, including `on_load` and `on_unload`.
- Added sys.path isolation to restrict plugin access to only necessary directories.
2026-03-06 11:55:59 +08:00
DrSmoothl
61dc15a513 feat(plugin-runtime): add plugin isolation IPC infrastructure
- Protocol layer: Envelope model with Pydantic schema, MsgPack/JSON codecs, unified error codes
- Transport layer: cross-platform IPC abstraction with 4-byte length-prefixed framing (UDS + TCP fallback)
- Host: RPC server, policy engine, circuit breaker, capability service, supervisor with hot-reload
- Runner: RPC client, plugin loader, process entry point
- Tests: 16 passing tests covering protocol, transport, host, and E2E handshake
2026-03-06 02:01:30 +08:00
DrSmoothl
10d5c81268 feat: 添加 .coderabbit.yaml 配置文件以支持代码检查和格式化 2026-03-06 00:49:02 +08:00
DrSmoothl
8f41e25696 fix(dashboard): resolve TS build errors in a11y changes
- Fix duplicate className attr in EmojiDialogs.tsx
- Replace animated.div with animated('div') in expression-reviewer and zoomable-chart to fix React 19 children type error
- Fix malformed i18n JSON (a11y namespace was outside root object)
2026-03-05 22:10:32 +08:00
DrSmoothl
e3cfca17a6 chore: add bunfig.toml and remove package-lock.json 2026-03-05 21:57:43 +08:00
DrSmoothl
c658b2314d feat(a11y): apply ARIA roles, landmarks, focus management, touch targets and contrast fixes across components 2026-03-05 21:57:36 +08:00
DrSmoothl
c12d1ca42a feat(a11y): add a11y infrastructure — skip-nav, announcer, touch CSS, eslint-jsx-a11y 2026-03-05 21:57:27 +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
DrSmoothl
2a33fd1121 refactor(llm): enable hot-reload for model config and client runtime
make LLM task config resolution dynamic in LLMRequest
load model clients on demand from latest config
clear client instance cache on config reload
remove stale module-level model_config usage in llm_api
add hot-reload tests for LLM/config watcher flow
2026-03-04 21:56:50 +08:00
DrSmoothl
b3a81754e6 feat(config): harden file watcher hot-reload flow and add test coverage
refactor FileWatcher to subscription-based dispatch with path/change filters
add callback timeout, failure cooldown, auto-retry loop, and runtime stats
strengthen ConfigManager hot-reload with throttling, timeout guard, and watcher stats logging
add pytest suites for watcher behavior and config hot-reload edge cases
2026-03-04 21:39:26 +08:00
DrSmoothl
5cccdf6715 feat(llm): 添加响应格式转换功能,支持JSON_SCHEMA输出 2026-03-04 21:11:10 +08:00
UnCLAS-Prommer
81bc25dba8 Merge branch 'r-dev' of github.com:Mai-with-u/MaiBot into r-dev 2026-03-04 21:06:53 +08:00
UnCLAS-Prommer
d03dc3601e 消息构建器:将消息转换为可读消息;其对应的测试文件 2026-03-04 21:01:51 +08:00
DrSmoothl
a65a40f85f feat(dashboard): add i18n support with zh/en/ja/ko locales
- Add react-i18next + i18next + i18next-browser-languagedetector
- Create i18n config (singleton import) with zh/en/ja/ko JSON locale files
- Add language switcher Globe dropdown in Header topbar
- Replace all hardcoded Chinese strings in:
  - Layout (Header, Sidebar, NavItem, Layout, constants)
  - Settings (index, AppearanceTab, SecurityTab, OtherTab, AboutTab)
  - Auth page (auth.tsx)
  - Search dialog (searchItems via useMemo + t())
  - Restart overlay (getStatusConfig accepts t param)
  - Error boundary (ErrorFallback, ErrorDetails function components)
  - HTTP warning banner
- localStorage key: maibot-locale
- Compatible with Electron
2026-03-03 20:50:06 +08:00
DrSmoothl
5cc34f24c0 fix(.gitignore): add dist-electron and .sisyphus to ignored files 2026-03-03 01:25:12 +08:00
DrSmoothl
4561cd91b8 fix(electron): use named Schema import from electron-store v8+ 2026-03-03 01:19:37 +08:00
晴猫
46babf7294 添加TODO注释以提醒测试trigger_tracker方法 2026-03-03 02:18:59 +09:00
晴猫
71a5acbac5 优化ReflectTracker逻辑,确保在追踪时表达不为None,简化代码并增强可读性 2026-03-03 02:18:04 +09:00
晴猫
efaff7ac60 实现追踪检查逻辑,添加消息数量和LLM判断,更新表达并持久化到数据库 2026-03-03 02:18:04 +09:00
DrSmoothl
c6545afa2e fix(package): format target configurations and update electron-store version 2026-03-03 01:16:04 +08:00
DrSmoothl
65774f3afc feat(electron): add Electron UI components and layout integration 2026-03-03 00:57:50 +08:00
DrSmoothl
fc394f4412 feat(electron): adapt renderer API and WebSocket layer for dynamic backend URL 2026-03-03 00:57:50 +08:00
DrSmoothl
b5cc361ce9 feat(electron): add main process, preload, store, protocol, and type definitions
- Add ElectronAPI type definitions and runtime contract (isElectron guard)
- Add electron-store with backend connection data model
- Add centralized API base URL utility (api-base.ts)
- Implement app:// custom protocol with API proxy
- Implement preload script with full contextBridge API
- Complete main process: BrowserWindow config, IPC handlers, window controls
- Register app:// scheme as privileged for secure renderer access
2026-03-03 00:57:50 +08:00
DrSmoothl
e6862e227b feat(electron): scaffold electron-vite project structure
Initialize Wave 1 Electron integration with:
- electron v40.6.1, electron-vite v5.0.0, electron-builder v26.8.1
- Main entry point: electron/main/index.ts with app:// protocol registration
- Preload placeholder: electron/preload/index.ts for Wave 2 IPC
- electron.vite.config.ts with unified renderer chunk splitting strategy
- tsconfig.electron.json with ESNext module support
- Updated package.json with electron dependencies and scripts:
  - electron:dev, electron:build, electron:preview
- All original scripts (dev, build, test, etc) remain unchanged
- TypeScript compilation verified: tsc --noEmit passes
- Ready for Wave 2: IPC bridge and contextBridge exposure
2026-03-03 00:57:50 +08:00
晴猫
91765400f6 修复脚本注释,添加macOS支持,重构依赖管理和服务控制逻辑 2026-03-03 01:13:52 +09:00
UnCLAS-Prommer
c16ced765e 适配db的修改;MessageComponent更新 2026-03-02 20:37:15 +08:00