354 Commits

Author SHA1 Message Date
716d92a618 feat: 引入 AgentRuntimeConfig,重构相关模块以支持运行时配置
Co-authored-by: Copilot <copilot@github.com>
2026-04-30 22:34:22 +08:00
3111abf4db feat: 更新 README.md,添加消息流转图和项目架构图,优化模块描述和配置项说明
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 18:29:37 +08:00
04fc2c0710 feat: 添加记忆维护的错误处理逻辑,优化传输错误的上下文信息
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 18:10:23 +08:00
891830779f feat: 重构存储逻辑,使用 ConversationRepository 和 PromptInjectionRepository 替代 SessionStore,优化会话和提示注入管理
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 15:55:27 +08:00
f48b132bb9 feat: 重构调度器存储逻辑,使用 SchedulerJobRepository 替代 SessionStore,添加更新调度作业运行时的方法 2026-04-28 15:40:50 +08:00
90e44950cb feat: 重构技能事件处理逻辑,移除 SkillEventSink,添加 SkillActivateTool 模块以优化技能激活流程
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 15:31:56 +08:00
396504dffb Refactor agent and storage components to introduce SkillProvider and repository patterns
- Introduced `SkillProvider` trait to abstract skill-related functionalities.
- Replaced `SkillRuntime` with `EmptySkillProvider` in `AgentLoop` for default behavior.
- Updated `AgentFactory` to accept `SkillProvider` instead of `SkillRuntime`.
- Created `SessionHistory` struct to manage chat histories and interactions.
- Added `MemoryRepository`, `SchedulerJobRepository`, and `SkillEventRepository` traits for better storage abstraction.
- Refactored tools to use new repository traits for memory and scheduler management.
- Cleaned up session management logic by consolidating chat history handling into `SessionHistory`.

Co-authored-by: Copilot <copilot@github.com>
2026-04-28 15:12:45 +08:00
6756a3d0ae feat: 添加 OutboundDispatcher 模块,重构消息分发逻辑,优化渠道消息处理
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 14:52:33 +08:00
c547b88a12 feat: 添加持久化技能事件处理逻辑,重构技能事件记录机制
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 14:49:31 +08:00
e5e2b37246 feat: 重构会话管理逻辑,添加多个服务以优化会话和任务调度
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 14:43:46 +08:00
acc8f63da0 feat: 添加 SessionLifecycleService 模块,重构会话管理逻辑以优化会话生命周期处理
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 14:32:14 +08:00
8f27bd2735 feat: 重构工具和协议模块,添加工具注册和会话管理逻辑,优化消息处理 2026-04-28 14:16:30 +08:00
af7860f2fd feat: 重构消息模块,添加 ContentBlock 和 ToolCall 结构,优化消息处理逻辑
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 14:04:59 +08:00
c65921b5e8 feat: 添加 AgentFactory 和 PromptInjector,重构工具注册逻辑以优化会话管理 2026-04-28 13:06:00 +08:00
008aba91ac feat: 重构调度器以使用 AgentTaskExecutor 和 SchedulerMaintenanceService
- 更新调度器,将 SessionManager 替换为 AgentTaskExecutor 和 SchedulerMaintenanceService。
- 修改作业执行逻辑,使用新服务处理代理任务和内部事件。
- 添加新的 CliChannel 以处理 CLI 连接,并包括适当的注册和注销逻辑。
- 引入 AgentTaskExecutor 和 SchedulerMaintenanceService,用于管理代理任务和会话维护。
- 实现聊天命令处理,用于重置会话上下文。
- 添加后台历史压缩功能,以优化会话存储。
- 创建实用函数,用于准备通过 WebSocket 通信的出站消息。
- 为新功能添加测试,并确保现有测试通过。

Co-authored-by: Copilot <copilot@github.com>
2026-04-28 12:55:30 +08:00
62b38eac73 feat: 添加 SessionFactory 模块,重构 SessionPool 以优化会话创建逻辑
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 12:08:34 +08:00
65bcf34b75 feat: 添加 CLI 会话服务和会话池,重构 SessionManager 以优化会话管理逻辑
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 11:55:55 +08:00
14476bb101 feat: 添加 context_window_tokens 配置,调整模型温度并重构消息执行逻辑 2026-04-28 11:45:36 +08:00
fa3354db9c feat: add context_window_tokens to model configuration and update related logic
- Introduced context_window_tokens in ModelConfig and LLMProviderConfig structs.
- Updated context window estimation logic in ContextCompressor to use context_window_tokens.
- Modified tests to accommodate new context_window_tokens field.
- Refactored memory maintenance logic into a new memory_maintenance.rs file for better organization.
- Ensured backward compatibility by providing default values where necessary.

Co-authored-by: Copilot <copilot@github.com>
2026-04-28 11:29:06 +08:00
b2c8d76820 feat: 添加最终结果处理和调度压缩功能,重构会话管理逻辑以优化代码结构 2026-04-28 10:58:01 +08:00
33f5a4cbd2 feat: 添加执行服务和提示管理功能,重构相关模块以优化代码结构 2026-04-28 10:51:54 +08:00
73dab09bfe Refactor code for improved readability and consistency
- Adjusted formatting and indentation in various files for better clarity.
- Consolidated multi-line statements into single lines where appropriate.
- Enhanced error handling messages for better debugging.
- Added a new InboundProcessor struct to handle inbound messages more effectively.
- Updated test cases to ensure they align with the new code structure.
2026-04-28 10:33:31 +08:00
bca86abe67 feat: 扩展技能源支持,添加用户代理和项目代理,优化技能管理工具描述 2026-04-28 09:32:37 +08:00
137a62f1cc feat: 重构用户消息处理逻辑,添加最新用户消息匹配功能并优化历史记录诊断 2026-04-28 09:06:17 +08:00
4e1b831948 feat: 优化工具调用内容格式,简化空参数处理并改进参数输出格式 2026-04-27 17:15:52 +08:00
5b13748106 feat: 添加用户说默认消息的场景作为高价值信息写入规则 2026-04-27 17:06:14 +08:00
2bcdf0a539 feat: 更新记忆写入规则,优化高价值信息场景描述及注意事项 2026-04-27 15:57:05 +08:00
8c17af1209 feat: 添加silent_agent_task类型的调度任务,支持后台执行并优化通知机制 2026-04-27 15:38:43 +08:00
4fb102644e feat: 更新调度配置以每4小时执行内存维护,并添加根据更新时间过滤内存范围的功能 2026-04-27 13:05:55 +08:00
52c94f274a feat: 移动测试函数test_default_tools_registers_get_time的位置以提高可读性 2026-04-27 10:18:34 +08:00
37dc3385bb feat: 添加TimeTool以获取当前时间和计算相对时间,支持时区覆盖 2026-04-27 09:54:38 +08:00
ed45ec54ed feat: 增强错误处理,添加format_error_chain函数以格式化错误链,优化日志记录 2026-04-27 09:35:10 +08:00
fc8a0aa6ae feat: 添加normalize_tool_arguments函数以解析字符串化的JSON参数,优化工具调用的参数处理 2026-04-27 09:29:50 +08:00
9e17cd35da feat: 增强OpenAIProvider以支持工具调用参数的JSON格式,优化请求体构建逻辑,排除内部模型额外键 2026-04-27 09:21:50 +08:00
60cc8e507c feat: 添加定时任务执行系统提示,优化agent_task作业的提示描述,避免重复调度时间 2026-04-26 23:31:21 +08:00
c83d697f93 feat: 增强OpenAIProvider以支持JSON工具参数,优化调度管理工具的参数验证和错误处理 2026-04-26 23:05:34 +08:00
88e1bfd9f2 feat: 移除配置中的上下文摘要字符限制,优化摘要预算计算
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 20:47:58 +08:00
5518185868 更新readme
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 17:25:45 +08:00
3045a6b596 feat: Enhance ChatMessage with system context and background compaction
- Added `system_context` field to `ChatMessage` for better message context handling.
- Introduced constants for system context prompts in `message.rs`.
- Updated `Session` to manage background history compaction, including methods to start and finish compaction.
- Implemented logic to schedule background compaction after message processing in `SessionManager`.
- Enhanced database schema to support new `system_context` field in messages.
- Added functionality to compact active history, preserving system messages and summaries.
- Updated tests to validate new compaction logic and ensure message integrity.
- Removed unused functions and cleaned up code in various modules for better maintainability.

Co-authored-by: Copilot <copilot@github.com>
2026-04-26 09:31:13 +08:00
3792472b83 feat: 调整工具结果和上下文摘要字符限制,优化性能 2026-04-25 16:09:19 +08:00
6b7822048a feat: 更新记忆检索文档,明确查询数组数量要求以提高搜索效果 2026-04-25 15:03:57 +08:00
95c53fa830 feat: 添加推理内容支持到聊天消息,增强消息处理能力 2026-04-24 17:42:19 +08:00
4b74fabb98 feat: 添加字符计数和文本截断功能,增强文本处理能力 2026-04-24 14:34:06 +08:00
e6f23858b8 feat(timezone): 添加时区支持,增强调度和日志功能 2026-04-23 23:50:08 +08:00
e24a081293 feat(scheduler): 添加上下文支持到调度器管理工具,增强目标处理能力 2026-04-23 23:26:41 +08:00
60749671e9 feat(config): 启用调度器并添加默认配置文件,增强系统初始化设置 2026-04-23 22:56:30 +08:00
ab7a8ad924 feat(media): 添加媒体引用处理,增强用户内容的丰富性 2026-04-23 22:31:13 +08:00
7fefd40dca feat: 重构记忆工具提示和代理配置,增强用户指导和系统提示 2026-04-23 17:33:10 +08:00
3d241544c5 feat(memory): 添加内置记忆维护作业,增强调度功能并支持有效作业合并 2026-04-23 14:16:22 +08:00
f3f369b329 feat: add llm_timeout_secs to provider configuration and implement timeout handling
- Introduced llm_timeout_secs in ProviderConfig and LLMProviderConfig to specify timeout for LLM requests.
- Updated OpenAIProvider and AnthropicProvider to utilize the timeout setting when creating HTTP clients.
- Enhanced error handling for API responses to include timeout information.
- Modified SessionManager to support agent-specific provider configurations, allowing for more flexible agent management.
- Added tests to verify the correct behavior of timeout settings and agent task validation.
2026-04-23 09:23:15 +08:00