v0.3.1
🆕 Highlights
IllusionCode v0.3.1 is a stability and compatibility release focusing on channel daemon reliability, Gemini thought process support, and cross-platform IPC improvements. This release addresses critical issues with Feishu/WeChat reconnection, introduces Gemini's thought_signature mechanism, and refines type annotations throughout the codebase.
Key Changes
- Gemini Thought Support — Full support for Gemini's
thought_signaturemechanism and<thought>tag separation - Channel Daemon Stability — Fixed multiple critical issues with Feishu/WeChat reconnection and resource cleanup
- Cross-Platform IPC — New daemon IPC layer with Named Pipe (Windows) and Unix Socket support
- Type Safety — Improved type annotations with
dict[str, Any]and platform-specific checks
🚀 New Features
Gemini Integration
thought_signatureSupport — Added support for Gemini'sthought_signaturemechanism for thought process feedback- Thought Tag Separation — Separated
<thought>tags in streaming to prevent mixing with assistant responses
Daemon & IPC
- Cross-Platform IPC Layer — New
daemon_ipcmodule with Named Pipe (Windows) and Unix Socket (Unix) support - Health Probe — Added HTTP health probe for channel status monitoring
- Event Timeout Tracking — Added event timeout watchdog for channel operations
- Backend-Only Mode — Added support for backend-only daemon mode
- Async Connection — Async daemon connection to eliminate 10s startup blocking
Channels
- Backend-Only Mode — Added support for backend-only daemon mode
- Async Connection — Async daemon connection to eliminate 10s startup blocking
🔧 Refactoring
Type Safety & Code Quality
- Improved Type Annotations — Changed
dicttodict[str, Any]throughoutdaemon_ipc.py - Platform Compatibility — Added Windows/Unix platform checks for IPC connections
- Import Optimization — Added missing module imports (
os,sys)
Channel Improvements
- Reconnection Mechanism — Optimized reconnection and resource cleanup for all three channels
- Code Review Fixes — Addressed 3 Minor and 5 Major issues from code review
- Event Loop Handling — Changed
get_event_loop()toget_running_loop()in WeChat module
Daemon
- Deprecated
ref_count.py— Markedref_count.pyas deprecated, replaced with IPC connection management - PID File Replacement — Replaced PID files with IPC connection management
🛠️ Important Fixes
Feishu Channel
- Shutdown Error — Fixed
CancelledErrorpropagation interrupting other channel shutdowns - SDK Loop Issue — Fixed
ExpiringCachecreation failure after lark SDK loop closure - API Changes — Adapted to lark SDK API changes
WeChat Channel
- Reconnection — Fixed half-dead state and log explosion after network disconnection
- Context Token — Fixed missing
context_tokencausing silent delivery failure
General
- Settings Reload — Fixed IPC reload notification for daemon configuration refresh
- Model Switching — Fixed channel authentication failure after model switching
- Event Loop — Fixed event loop initialization in
cron_serve.py
CI/CD
- Test Timeout — Added pytest-timeout to prevent CI tests from hanging
- Test Fixes — Fixed test race conditions in daemon IPC tests
Installation
pip install (Recommended)
pip install illusion-code==0.3.1From Source
git clone https://github.com/YunTaiHua/illusion-code.git
cd illusion-code
pip install .Quick Start
illusion auth login # Configure API credentials
illusion # Start TUI interactive session
illusion web # Launch Web UI
illusion -p "Analyze the project structure" # Print mode (non-interactive)Documentation
中文版本
🆕 重点更新
IllusionCode v0.3.1 是一个稳定性和兼容性版本,重点关注渠道守护进程可靠性、Gemini 思考过程支持和跨平台 IPC 改进。本次版本修复了飞书/微信重连的关键问题,引入了 Gemini 的 thought_signature 机制,并优化了整个代码库的类型注解。
关键更新
- Gemini 思考支持 — 完整支持 Gemini 的
thought_signature机制和<thought>标签分离 - 渠道守护进程稳定性 — 修复了飞书/微信重连和资源清理的多个关键问题
- 跨平台 IPC — 新增守护进程 IPC 层,支持 Named Pipe(Windows)和 Unix Socket
- 类型安全 — 改进类型注解,使用
dict[str, Any]和平台特定检查
🚀 新功能
Gemini 集成
thought_signature支持 — 添加 Gemini 的thought_signature机制支持,用于思考过程反馈- 思考标签分离 — 在流式输出中分离
<thought>标签,防止与助手回复混合
守护进程与 IPC
- 跨平台 IPC 层 — 新增
daemon_ipc模块,支持 Named Pipe(Windows)和 Unix Socket(Unix) - 健康探针 — 添加 HTTP 健康探针用于渠道状态监控
- 事件超时追踪 — 添加渠道操作的事件超时看门狗
- 后端专用模式 — 添加后端专用守护进程模式支持
- 异步连接 — 异步守护进程连接,消除 10 秒启动阻塞
渠道
- 后端专用模式 — 添加后端专用守护进程模式支持
- 异步连接 — 异步守护进程连接,消除 10 秒启动阻塞
🔧 重构
类型安全与代码质量
- 改进类型注解 — 在
daemon_ipc.py中将dict改为dict[str, Any] - 平台兼容性 — 为 IPC 连接添加 Windows/Unix 平台检查
- 导入优化 — 添加缺失的模块导入(
os、sys)
渠道改进
- 重连机制 — 优化三个渠道的重连和资源清理
- 代码审查修复 — 解决代码审查中的 3 个 Minor 和 5 个 Major 问题
- 事件循环处理 — 在微信模块中将
get_event_loop()改为get_running_loop()
守护进程
- 废弃
ref_count.py— 将ref_count.py标记为废弃,替换为 IPC 连接管理 - PID 文件替换 — 用 IPC 连接管理替换 PID 文件
🛠️ 重要修复
飞书渠道
- 关闭错误 — 修复
CancelledError传播中断其他渠道关闭的问题 - SDK 循环问题 — 修复 lark SDK 循环关闭后
ExpiringCache创建失败 - API 变更 — 适配 lark SDK API 变更
微信渠道
- 重连 — 修复断网后守护进程半死状态和日志爆炸
- 上下文令牌 — 修复缺少
context_token导致静默投递失败
通用
- 设置重载 — 修复守护进程配置刷新的 IPC 重载通知
- 模型切换 — 修复主程序切换模型后渠道认证失败
- 事件循环 — 修复
cron_serve.py中的事件循环初始化
CI/CD
- 测试超时 — 添加 pytest-timeout 防止 CI 测试卡住
- 测试修复 — 修复 daemon IPC 测试中的竞态条件
安装
pip 安装(推荐)
pip install illusion-code==0.3.1从源码安装
git clone https://github.com/YunTaiHua/illusion-code.git
cd illusion-code
pip install .快速开始
illusion auth login # 配置 API 认证
illusion # 启动 TUI 交互式会话
illusion web # 启动 Web 界面
illusion -p "分析项目结构" # Print 模式(非交互)