164 Commits

Author SHA1 Message Date
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
1ffdcab585 feat(scheduler): 添加 agent_task 类型支持,扩展任务调度功能 2026-04-23 08:45:32 +08:00
73840c608c feat(memory): 更新长期记忆工具提示,增强用户使用指导和检索流程
feat(gateway): 修改 WebSocket 处理逻辑以支持会话 ID 的字符串处理
2026-04-22 23:40:11 +08:00
a3ae8acde5 feat: add DB-backed scheduler for heartbeat, delayed jobs, interval jobs, and cron jobs
- Add scheduler module with SQLite persistence
- Support schedule types: delay, interval, at, cron
- Support job kinds: internal_event, outbound_message
- Add scheduler_manage tool for runtime management
- Add session_cleanup internal event for expired sessions
- Update memory tool usage prompt for better context awareness
- Add chrono and cron dependencies
2026-04-22 20:32:18 +08:00
302e6ef6b9 feat(gateway): 添加 show_tool_results 配置以控制工具结果显示
feat(session): 更新 BusToolCallEmitter 以支持工具结果显示控制
feat(ws): 更新 WsToolCallEmitter 以支持工具结果显示控制
2026-04-22 16:14:27 +08:00
65abf017a1 feat(gateway): 添加 show_tool_results 配置以控制工具结果显示
feat(memory): 更新 MemoryManageTool 和 MemorySearchTool 描述,优化参数处理
2026-04-22 15:27:53 +08:00
0331774466 feat: 更新长期记忆工具提示,增强用户使用指导 2026-04-22 15:06:11 +08:00
71a8033d15 feat(memory): 添加 MemorySearchTool 以支持长期用户记忆的搜索和读取功能 2026-04-22 14:52:16 +08:00
038b5eccc6 feat: Enhance tool execution handling with pending user action state
- Introduced ToolMessageState enum to represent tool execution states (Completed, PendingUserAction).
- Updated ChatMessage struct to include tool_state for tracking tool execution status.
- Modified AgentLoop to handle tool results and pending actions, providing appropriate responses to users.
- Enhanced BashTool to detect when commands require user interaction, returning a pending state with hints.
- Updated WebSocket protocol to support tool pending messages, allowing clients to handle pending actions effectively.
- Refactored related tests to ensure proper functionality of new pending state handling.
2026-04-22 14:49:50 +08:00
30d033e1d1 feat(agent_loop): 优化工具结果截断逻辑,确保正确处理UTF-8字符边界 2026-04-22 13:03:23 +08:00
c58644e7bc feat(bash): 优化输出截断逻辑,确保处理UTF-8字符边界 2026-04-22 12:04:43 +08:00
9cda2ab8d5 feat(memory_manage): 更新记忆管理工具描述,增强搜索关键词的双语支持和内容匹配说明 2026-04-22 11:37:15 +08:00
9d15d50b09 feat(session): 更新聊天加载逻辑,确保初始代理提示并添加活跃用户消息计数功能 2026-04-22 10:09:39 +08:00
09ccd71cc7 feat(feishu): 优化文件下载文件名推断逻辑,支持从响应头和内容中提取文件名 2026-04-22 09:55:37 +08:00
0dfa615ca9 feat(agent_profile): 实现代理配置文件的注入与周期性重注入机制 2026-04-22 09:45:19 +08:00
4725b5406e feat: 添加实时工具调用消息处理,优化消息格式化和传递逻辑 2026-04-22 09:01:56 +08:00
bc24a28275 feat(memory_manage): 添加搜索功能以查找用户记忆,优化参数描述 2026-04-22 08:45:20 +08:00
2f47a8a273 feat(ws): 移除工具结果的处理逻辑,优化消息输出 2026-04-22 08:42:50 +08:00
d35e89a44c # 2026-04-22 06:57:22 +08:00
a0fe7c57bd feat(feishu): 支持 markdown 格式的消息处理,优化内容解析逻辑 2026-04-21 21:21:49 +08:00
0c724e37bb feat: add runtime skill management and persistence 2026-04-21 18:21:14 +08:00
393d980742 feat(session): 添加逻辑重置功能,优化会话历史管理 2026-04-20 22:35:13 +08:00
eb0f6c0bc7 feat(storage): 移除工具调用 JSON 列的数据库检查,优化会话存储逻辑 2026-04-18 14:40:12 +08:00
ef601107ac feat: 添加工具调用支持,优化消息处理和持久化 2026-04-18 14:17:23 +08:00
8bb32fa066 feat: enhance WebSocket session management and storage
- Added SessionSummary struct for session metadata.
- Updated ws_handler to create and manage CLI sessions more robustly.
- Implemented session creation, loading, renaming, archiving, and deletion via WebSocket messages.
- Introduced SessionStore for persistent session storage using SQLite.
- Enhanced error handling and logging for session operations.
- Updated protocol definitions for new session-related WebSocket messages.
- Refactored tests to cover new session functionalities and ensure proper serialization.
2026-04-18 13:09:14 +08:00
c971bc3639 feat: 添加上下文压缩功能,优化消息历史管理和工具调用日志记录 2026-04-12 18:38:38 +08:00
dcf04279a7 feat(feishu): add reply context handling for messages and improve content fetching 2026-04-12 13:31:55 +08:00
fb0a9e06aa feat(agent): add loop detection and result truncation for tool calls 2026-04-12 13:18:16 +08:00
3d72f3dfa8 feat(feishu): enhance message sending with dynamic format detection and support for interactive cards 2026-04-12 11:38:31 +08:00
394b5fdd6a feat:1、agentloop支持多轮工具调用
2、并发工具调用
3、可观测性改进。
2026-04-12 11:02:48 +08:00
862eb1115a Revert "feat(agent): add parallel tool execution with concurrency-safe batching"
This reverts commit 0c0d0c14436a230ca34c0cd9647c8fc14f62d7cc.
2026-04-12 09:54:38 +08:00
0c0d0c1443 feat(agent): add parallel tool execution with concurrency-safe batching
Implement parallel tool execution in AgentLoop, following the approach
used in Nanobot (_partition_tool_batches) and Zeroclaw (parallel_tools).

Key changes:
- partition_tool_batches(): group tool calls into batches based on
  concurrency_safe flag. Safe tools run in parallel via join_all;
  exclusive tools (e.g. bash) run in their own sequential batch.
- execute_tools(): now uses batching instead of flat sequential loop.
- CalculatorTool: add read_only() -> true so it participates in
  parallel batches (it has no side effects, so concurrency_safe = true).

4 unit tests added covering: mixed safe/exclusive, all-safe single
batch, all-exclusive separate batches, unknown tool defaults.
2026-04-08 12:04:03 +08:00
21b4e60c44 feat(feishu): add reaction handling and metadata forwarding in messages 2026-04-08 10:24:15 +08:00
a4399037ac fix: use char-based slicing instead of byte-based to handle UTF-8
Byte index slicing like `&text[..100.min(text.len())]` panics when the
byte index falls inside a multi-byte UTF-8 character (e.g., Chinese).
Changed to `text.chars().take(100).collect::<String>()` for safe
character-based truncation.
2026-04-08 08:49:52 +08:00
075b92f231 fix: truncate long text content before sending to Feishu
Feishu API rejects messages with content exceeding ~64KB with error
230001 "invalid message content". Added truncation at 60,000 characters
to prevent this, with a notice appended to truncated content.
2026-04-08 08:42:56 +08:00
02a7fa68c6 docs: update implementation log with tools registration
- Add tools registration section in session.rs
- Add update log table with all commits
2026-04-08 08:32:51 +08:00
98bc9739c6 feat(gateway): register all tools in SessionManager
- Register FileReadTool, FileWriteTool, FileEditTool, BashTool
- Register HttpRequestTool with allow-all domains for testing
- Register WebFetchTool
- CalculatorTool already registered
2026-04-08 08:32:06 +08:00
b13bb8c556 docs: add implementation log for tools
Document all implemented tools and mechanisms:
- SchemaCleanr for cross-provider schema normalization
- Tool trait enhancements (read_only, concurrency_safe, exclusive)
- file_read, file_write, file_edit, bash, http_request, web_fetch
2026-04-07 23:52:40 +08:00
8936e70a12 feat(tools): add web_fetch tool for HTML content extraction
- Fetch URL and extract readable text
- HTML to plain text conversion
- Removes scripts, styles, and HTML tags
- Decodes HTML entities
- JSON pretty printing
- SSRF protection
- Includes 6 unit tests
2026-04-07 23:52:06 +08:00
1581732ef9 feat(tools): add http_request tool with security features
- HTTP client with GET/POST/PUT/DELETE/PATCH support
- Domain allowlist for security
- SSRF protection (blocks private IPs, localhost)
- Response size limit and truncation
- Timeout control
- Includes 8 unit tests
2026-04-07 23:49:15 +08:00
68e3663c2f feat(tools): add bash tool with safety guards
- Execute shell commands with timeout
- Safety guards block dangerous commands (rm -rf, fork bombs)
- Output truncation for large outputs
- Working directory support
- Includes 7 unit tests
2026-04-07 23:47:44 +08:00