A significant number of documentation files, including design documents, user guides, and old images, have been removed to clean up the repository and eliminate outdated information. This reduces clutter and ensures that the documentation accurately reflects the current state of the project.
Key removals include:
- `memory_system_design_v3.md`
- `model_configuration_guide.md`
- `PERMISSION_SYSTEM.md`
- `CONTRIBUTE.md`
- `vector_db_usage_guide.md
Removes the `tool-components.md` and `tool_caching_guide.md` files as they are no longer relevant after recent refactoring of the tool and caching systems. This cleanup ensures the documentation stays current with the codebase.
Removes the `ToolHistoryManager` and its associated functionalities, including history recording, querying, and prompt generation. This simplifies the architecture by decoupling tool execution history from the core logic.
The tool caching mechanism is now directly integrated into the `ToolExecutor` by wrapping the `execute_tool_call` method. This ensures that caching is applied consistently for all tool executions that have it enabled, improving performance and reducing redundant calls.
- Deletes `src/common/tool_history.py`.
- Removes tool history related functions from `prompt_builder.py` and `tool_api.py`.
- Adds a `wrap_tool_executor` function in `cache_manager.py` to apply caching logic directly to the `ToolExecutor`.
Removed the permission_example plugin and its files. Refactored plugin hot reload and manager logic for more robust reloading, deep reload, and cache clearing, including improved debounce and plugin name resolution. Updated MaiZone plugin and actions to use the new permission API for feed read/send actions, and registered new permission nodes. Enhanced plugin management commands with PlusCommand, improved help, and added hot reload and cache management commands.
Updated the get_remaining method in CommandArgs to default start_index to 0 instead of 1, ensuring all arguments are included by default when retrieving remaining parameters.
Refactored permission checks in built-in plugins to use the new @require_permission decorator, improving code clarity and consistency. Enhanced permission_decorators to better extract ChatStream and support PlusCommand. Updated PermissionCommand to use permission decorators for all subcommands, improved user mention parsing, and improved feedback messages. Registered a new permission node for sending feeds in MaiZone plugin and updated command registration to use PlusCommand info.
This commit introduces a new sleep pressure and insomnia system to simulate more realistic character behavior.
Key features include:
- **Sleep Pressure**: A new metric that accumulates with each action the bot takes and decreases during scheduled sleep times.
- **Insomnia Mechanic**: When a sleep period begins, the system checks the current sleep pressure. Low pressure can lead to a higher chance of "insomnia," causing the bot to stay awake. There is also a small chance for random insomnia.
- **Insomnia State**: During insomnia, the bot enters a special state for a configurable duration. It can trigger unique proactive thoughts related to being unable to sleep, and its mood is adjusted accordingly.
- **Configuration**: All parameters, such as insomnia probability, duration, and pressure thresholds, are fully configurable.
Introduces the PlusCommand system for simplified command development, including new base classes, argument parsing utilities, and registration logic. Updates the plugin system, component registry, and bot message handling to support PlusCommand components alongside traditional commands. Adds documentation and configuration for command prefixes, and provides a developer guide for the new system.
This commit renames the project from "MaiMbot-Pro-Max" to "MoFox_Bot" across the entire codebase. The change reflects the new project identity and ownership under the MoFox-Studio organization.
Key changes include updating:
- EULA and README documentation
- Project URLs and repository links
- Startup messages and display names
- Plugin manifest metadata
This commit refactors the tool caching system to be more robust, configurable, and easier to use. The caching logic is centralized within the `wrap_tool_executor`, removing the need for boilerplate code within individual tool implementations.
Key changes:
- Adds `enable_cache`, `cache_ttl`, and `semantic_cache_query_key` attributes to `BaseTool` for declarative cache configuration.
- Moves caching logic from a simple history-based lookup and individual tools into a unified handling process in `wrap_tool_executor`.
- The new system leverages the central `tool_cache` manager for both exact and semantic caching based on tool configuration.
- Refactors `WebSurfingTool` and `URLParserTool` to utilize the new declarative caching mechanism, simplifying their code.