oudecheng
bc26c66169
chore: 升级版本号至 0.3.1 并更新 CHANGELOG
...
收录自 0.3.0 以来 19 个 commit 的变更,涵盖五大方向:
- 历史压缩保留原消息(双视图分离)
- Topic 维度 token 统计
- 前端渲染稳定性修复
- 工具执行可靠性修复
- 网关吞吐与存储查询优化
2026-08-05 12:56:58 +08:00
oudecheng
14d903e067
fix: Agent 执行与显示层解耦,修复锁屏冻结根因
...
浏览器锁屏导致 WebSocket 半死,ws_sender.send().await 永久阻塞,
级联阻塞 dispatcher → MessageBus → Agent Loop,后端停止执行直到解锁。
基于第一性原理建立"执行-显示解耦"原则:agent 执行只依赖 SQLite
持久化,实时广播是可丢弃的最佳努力通道。
核心改动:
- MessageBus::publish_outbound 由 send().await 改为 try_send(),
bus 满时丢弃消息并告警,agent 不再被显示层阻塞
- WebSocket writer task 包裹 30s 超时,使用每连接独立的
CancellationToken(非共享 CliChannel 级 token),避免一个连接
超时关闭所有连接;writer 退出时 cancel 通知主 loop 退出
- CliChannel::send 由 send().await 改为 try_send(),避免 dispatcher
单线程被卡住的 writer 阻塞 37s
- 全仓 13 处 publish_outbound 调用统一区分 Dropped(warn)/Closed(error)
- scheduler 3 处 ? 改为 warn,避免 Dropped 触发 misfire 重试风暴
- 前端 WebSocket 添加 25s ping + 指数退避重连(3s→60s封顶)
- 前端 session_list 区分重连恢复/首次连接,重连时保留 messages
并刷新 topic 列表
经五轮对抗性审查验证,修复了共享 cancel token、dispatcher 阻塞、
load_chat_messages 跨 topic 污染、原 session 删除后状态不一致等
回归问题。
同时升级版本号至 0.3.0 并更新 CHANGELOG。
验证:cargo clippy --all-targets --all-features ✓
npm run build ✓ | useChat.test.ts 13 passed ✓
2026-08-04 10:55:52 +08:00
oudecheng
b790a39c1f
fix(cargo): 修正依赖分类错误,将跨平台依赖移出 windows target 段
...
rmcp/schemars/http/tower-http/rust-embed 均为跨平台 crate 且在源码中被无条件引用,错放在 [target.'cfg(windows)'.dependencies] 下导致 Linux 构建必然失败。仅 windows-sys 是真正的 Windows 专用依赖,保留在 target 段。
2026-08-04 07:58:51 +08:00
oudecheng
cda14360af
chore: 建立工程化基线(rustfmt + clippy + CI + eslint + prettier)
...
配置:
- rustfmt.toml: 固化 max_width=100 / 4 空格缩进,cargo fmt 全量格式化
- Cargo.toml: 配置 [lints.rust] 与 [lints.clippy] 渐进式规则
- .github/workflows/ci.yml: Rust(fmt+clippy+test) + 前端(eslint+tsc+test) 双平台 CI
- Makefile: 新增 check/fmt/fix 目标,clippy 对齐 --all-targets --all-features
- web: eslint flat config + prettier 配置 + package.json 脚本与依赖
- src/main.rs: loop→while 修复 clippy::never_loop
对抗性审查发现并修复:
- eslint 缺 caughtErrorsIgnorePattern 导致 catch(_) 误报为 error
- 前端 lint 未接入 CI,现已补上 Lint 步骤
- Makefile 与 CI 的 clippy flags 不一致,已对齐
2026-08-03 23:24:02 +08:00
oudecheng
f8e1f3c2eb
chore: bump 版本至 0.2.0 并新增 CHANGELOG
...
- Cargo.toml / Cargo.lock: 0.1.2 → 0.2.0
- 新增 docs/CHANGELOG.md,记录 0.2.0 相对 0.1.2 的 47 个 commit 迭代内容,
按新增功能/性能优化/修复/重构/内部改进分类,涵盖四大方向:
CapabilityPolicy 统一策略模型、专家/子代理模型独立配置、
话题级并发隔离、Agent Loop 性能优化
2026-07-31 08:28:36 +08:00
56612389ae
改用gray_matter解析md头元数据,增加相应的日志
2026-07-21 16:33:55 +08:00
oudecheng
6c393dca05
build: 将 rmcp 依赖从 git branch 迁移到 crates.io 版本
...
- Cargo.toml: rmcp 从 git="...rust-sdk", branch="main" 改为 version="1.7"
(semver 解析为 1.8.0,最新兼容 1.x 版本)
- src/mcp/client.rs: 适配 rmcp 1.8+ API 变更
peer_info() 返回类型从 Option<ServerInfo> 变为 Option<Arc<ServerInfo>>,
使用 .map(|arc| arc.as_ref().clone()) 替代 .cloned()
解决 git branch 依赖带来的问题:构建不可复现、供应链安全风险、
版本语义模糊、升级路径不清晰、CI 构建性能损耗。
2026-07-08 10:56:25 +08:00
oudecheng
653687276c
chore: 更新版本号至 0.1.2
2026-07-07 09:20:31 +08:00
oudecheng
7640a6e5b7
fix: 修复 WebSocket 连接泄漏,使用 CancellationToken 实现优雅重启
2026-07-03 16:32:43 +08:00
oudecheng
c70571b0d1
feat: 更新版本号至 0.1.1
2026-07-01 11:33:45 +08:00
02172b6065
feat(shell): 实现交互式Shell会话管理
...
- 新增ShellSessionManager管理交互式shell会话,支持进程保持和交互输入
- BashTool集成会话管理,支持session_id和stdin_input参数实现输入回复
- 修改BashTool执行逻辑,检测进程等待输入状态并保存会话状态
- Windows平台新增底层进程等待输入检测实现,辅助判断Shell交互状态
- 工具注册工厂注入ShellSessionManager,保证安全复用会话管理实例
- 增加默认agent prompt中Shell交互终端说明,提示交互流程及输入格式
- 交互式命令输出增加标识和提示,区分正常与等待输入状态
- 实现会话超时自动清理和优雅关闭接口,避免资源泄露
- 单元测试中统一使用BashTool默认构造,适配会话管理新增功能
2026-06-13 09:06:45 +08:00
c0d4f65de4
feat: 更新数据库连接管理,使用连接池优化会话存储,添加新的错误处理
2026-06-07 21:35:47 +08:00
oudecheng
1541dd7c10
feat: 添加平台特定的进程输入等待检查功能,增强 Bash 工具的用户授权检测
2026-06-02 10:59:13 +08:00
9b6cae0803
feat: 前端静态文件嵌入二进制
...
- 添加 rust-embed 依赖
- 创建 static_files.rs 模块,编译时嵌入 static/ 目录
- 修改 gateway 路由,默认使用嵌入文件
- 支持 STATIC_DIR 环境变量切换到磁盘文件(开发模式)
- 更新 README 说明 Web UI 和构建流程
2026-05-30 17:43:17 +08:00
oudecheng
624d8e8943
feat: 添加 React Web UI 前端界面
...
- 使用 React 18 + TypeScript + Vite + Tailwind CSS 构建前端
- 实现 WebSocket 实时通信(useWebSocket hook)
- 添加聊天界面组件(MessageList, MessageBubble, MessageInput)
- 集成 Topic 管理(新建、列出、切换)
- 支持 Markdown 渲染(react-markdown + remark-gfm)
- 添加工具调用展示面板
- 实现深色科技主题(Tech Dark)
- 后端集成静态文件服务(tower-http)
- 添加 Makefile 和 build.sh 构建脚本
- 更新 .gitignore 忽略前端构建产物
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 17:43:15 +08:00
b3fa0bb978
feat: 添加 HTTP 传输连接支持,优化 MCP 客户端管理器
2026-05-23 22:57:08 +08:00
cbb384a4e6
feat: 添加 MCP (Model Context Protocol) 支持,包含客户端管理器和工具适配器
2026-05-23 22:52:36 +08:00
oudecheng
018c104592
feat: 更新 reqwest 依赖以支持流式响应,添加流式处理相关结构和实现
2026-05-20 11:32:46 +08:00
oudecheng
7540828397
Revert "feat: 添加流式聊天支持,更新相关依赖和接口以实现流式响应"
...
This reverts commit cb48ef09b22ef72798a15ff3485c8e21f77e59f4.
2026-05-20 09:20:26 +08:00
oudecheng
cb48ef09b2
feat: 添加流式聊天支持,更新相关依赖和接口以实现流式响应
2026-05-20 09:10:47 +08:00
oudecheng
b33350c410
feat: 添加 GBK 解码支持,优化 BashTool 中的输出处理逻辑
2026-05-14 18:54:08 +08:00
597881f72e
feat: Implement WeChatBot SDK with error handling and message protocol
...
- Add WeChatBotError enum for error handling with various error types.
- Create a Result type alias for easier error management.
- Implement ILinkClient for low-level API interactions including QR code generation, message sending, and updates retrieval.
- Define message types and structures for handling incoming messages and media content.
- Add tests for error handling and message parsing to ensure reliability.
Co-authored-by: Copilot <copilot@github.com>
2026-05-06 14:18:47 +08:00
531e72d24f
feat: 添加图像处理预算和估算逻辑,优化消息内容构建,支持图像媒体引用
...
Co-authored-by: Copilot <copilot@github.com>
2026-05-01 21:22:07 +08:00
e6f23858b8
feat(timezone): 添加时区支持,增强调度和日志功能
2026-04-23 23:50:08 +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
0c724e37bb
feat: add runtime skill management and persistence
2026-04-21 18:21:14 +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
a9e7aabed4
feat(tools): add file_read tool with pagination support
...
- Read file contents with offset/limit pagination
- Returns numbered lines for easy reference
- Handles binary files as base64 encoded
- Supports directory restriction for security
- Includes 4 unit tests
2026-04-07 23:43:47 +08:00
2dada36bc6
feat: introduce multimodal content handling with media support
...
- Added ContentBlock enum for multimodal content representation (text, image).
- Enhanced ChatMessage struct to include media references.
- Updated InboundMessage and OutboundMessage to use MediaItem for media handling.
- Implemented media download and upload functionality in FeishuChannel.
- Modified message processing in the gateway to handle media items.
- Improved logging for message processing and media handling in debug mode.
- Refactored message serialization for LLM providers to support content blocks.
2026-04-07 23:09:31 +08:00
9834bd75cf
feat: add calculator tool and integrate with agent loop
...
- Introduced a new CalculatorTool for performing various arithmetic and statistical calculations.
- Enhanced the AgentLoop to support tool execution, including handling tool calls in the process flow.
- Updated ChatMessage structure to include optional fields for tool call identification and names.
- Modified the Session and SessionManager to manage tool registrations and pass them to agents.
- Updated the OpenAIProvider to serialize tool-related message fields.
- Added a ToolRegistry for managing multiple tools and their definitions.
- Implemented tests for the CalculatorTool to ensure functionality and correctness.
2026-04-06 23:43:45 +08:00
4ed2f986a1
添加 tracing 日志支持,替换 println! 输出,增强错误处理和调试信息
2026-04-06 23:11:41 +08:00
04736f9f46
添加 Feishu 通道支持,重构配置以包含通道设置,更新依赖项,增强错误处理
2026-04-06 18:43:53 +08:00
35d201f206
重构项目结构,添加代理、网关和客户端模块,更新配置以支持默认网关设置,增强错误处理,添加 WebSocket 支持
2026-04-06 16:36:17 +08:00
8b1e6e7e06
实现基本的模型调用
2026-04-05 17:11:42 +08:00