Skip to content

Releases: YunTaiHua/illusion-agent

v0.4.4

Choose a tag to compare

@github-actions github-actions released this 13 Aug 14:25

Highlights

  • Memory system overhaul — Rebuilt to align with Claude Code's architecture: typed memory directory, manual mode support, per-subagent model configuration, and cross-environment API client isolation
  • Risk-tiered permission system — High-risk operations can no longer be session-level exempted; whitelist supports full directive exemption with automatic sandbox degradation
  • Cron permission isolation — Cron jobs now specify permission mode via environment variable without polluting global settings

New Features

  • Memory system refactor — Type-based directory structure (user/, feedback/, project/, reference/), Claude Code-compatible extract/dream subagents, configurable extract/dream models, cross-env independent API client
  • Risk-tiered permissions — Three-tier risk classification (low/medium/high), high-risk operations require explicit confirmation per action, complete directive exemption via whitelist
  • Sandbox auto-degradation — Removed enabled/fail_if_unavailable config; sandbox automatically degrades to permission-only mode when unavailable
  • Cron permission modes — Three scenarios (yolo/channel/inherited session) resolved via ILLUSION_PERMISSION_MODE env var, not persisted to settings.json
  • Session rename — New /rename command to rename conversations
  • Miscellaneous improvements — Memory, session, and CLI enhancements

Important Fixes

  • Thinking indicator flicker — Suppressed residual thinking metrics after assistant's final reply; assistant_complete now carries tool_chain_follows to exit busy state immediately
  • Daemon log dual-writer — Fixed duplicate log writer in daemon process, synced session display names, added log size fallback cleanup
  • PermissionPrompt type signature — Fixed inconsistent high_risk parameter typing and unbound os import
  • Memory logger CI failureget_memory_logger now always cleans up stale handlers before rebuilding, eliminating test failures from global logger singleton pollution

Performance

  • Web message memoization — Message components memoized; historical messages no longer re-parse markdown during streaming output

Documentation

  • Synced docs — Updated permission, sandbox, and CLI documentation to reflect new configurations

Installation

pip install illusion-agent==0.4.4

Desktop downloads (Windows/macOS/Linux) available at https://github.com/YunTaiHua/illusion-agent/releases/tag/v0.4.4


重点更新

  • 记忆系统重构 — 对齐 Claude Code 架构:类型化记忆目录、手动模式、子代理模型配置、跨环境 API client 隔离
  • 风险分级权限 — 高危操作不再支持会话级豁免;白名单支持完整指令豁免,沙箱不可用时自动降级
  • Cron 权限隔离 — Cron 任务通过环境变量临时指定权限模式,不污染全局配置

新功能

  • 记忆系统重构 — 基于类型的目录结构(user/feedback/project/reference/),兼容 Claude Code 的 extract/dream 子代理,可配置 extract/dream 模型,跨 env 独立 API client
  • 风险分级权限 — 三级风险分类(低/中/高),高危操作每次需显式确认,白名单支持完整指令豁免
  • 沙箱自动降级 — 移除 enabled/fail_if_unavailable 配置;沙箱不可用时自动降级为纯权限模式
  • Cron 权限模式 — 三种场景(yolo/渠道端/继承会话)通过 ILLUSION_PERMISSION_MODE 环境变量解析,不持久化到 settings.json
  • 会话重命名 — 新增 /rename 命令重命名对话
  • 杂项改进 — 记忆、会话与命令行功能增强

重要修复

  • 思考指标闪烁 — 抑制 assistant 最终回复后的残留思考指标;assistant_complete 携带 tool_chain_follows 使前端立即退出 busy 状态
  • 守护进程日志双写者 — 修复守护进程日志重复写入,同步会话显示名称,增加日志体积兜底清理
  • PermissionPrompt 类型签名 — 修复 high_risk 参数类型不一致和 os 未绑定问题
  • 记忆日志器 CI 失败get_memory_logger 现在始终清理旧 handler 后重建,消除全局 logger 单例污染导致的测试失败

性能优化

  • Web 端消息 memo 化 — 消息组件 memo 化,流式输出时历史消息不再重复解析 markdown

文档

  • 文档同步 — 更新权限、沙箱与命令行文档以反映新配置

安装

pip install illusion-agent==0.4.4

桌面版下载(Windows/macOS/Linux)见 https://github.com/YunTaiHua/illusion-agent/releases/tag/v0.4.4

v0.4.3

Choose a tag to compare

@github-actions github-actions released this 10 Aug 11:37

Highlights

  • Cron Scheduled Tasks — Full cron job system integrated into web settings, supporting create/edit/delete/list/run from the UI
  • Web UX Overhaul — Scroll-following redesign, collapsible thinking sections, tool execution progress auto-fold, Lightbox image preview, and cursor/display refinements
  • Markdown Security Hardening — Sanitization, external link protection, tabnabbing prevention, and safe code URL handling
  • list_sessions Tool — LLM can now perceive available sessions across conversations
  • Desktop Icon Refresh — Rounded-style icons for the desktop application

New Features

  • Cron Scheduled Tasks — Web settings now include a cron job management tab (list/create/edit/delete/run), plus the cron tool for programmatic scheduling (099cc2e, d77ef54)
  • list_sessions Tool — Enables the LLM to discover and reference other active conversation sessions (355ccb3)
  • Web Scroll-Following — Refactored to align with kimi-code weak-follow behavior for smoother reading (229ac80)
  • Markdown Security — Comprehensive sanitization including anti-tabnabbing, external link safety, and secure code block URL rendering (ebb963c)
  • In-App Image Preview (Lightbox) — Click images to zoom inline instead of jumping to an external browser (76e595f)
  • Tool Execution Progress — Progress area auto-expands during execution, auto-collapses on completion (3b88d73)
  • Thinking & Task Folding — Thinking process and completed tasks now have independent collapsible sections in web UI (df01f8d)

Important Fixes

  • Sleep Tool Range — Maximum sleep duration expanded from 30s to 600s (10 min), supporting longer wait scenarios (716d5bb)
  • Cron Runtime Safety — UI refinements and protections against accidental operations during cron task execution (0fba4ba)
  • Input Box Scrolling — Content exceeding max height now scrolls instead of being truncated (787f160)
  • Base64 Image Display — Fixed inline base64 images not rendering and added graceful fallback for broken images (854e663)
  • Desktop External Links — Fixed browser hijacking when clicking external links in the desktop app (e1563d8)
  • Multi-Session UI — Fixed task count and input box draft height issues in multi-session views (3e5b24c)
  • Content Cursor Style — Eliminated I-beam cursor in content areas, unified to default arrow (234c632)

Refactoring

  • Desktop Icon — Replaced with rounded-style icons for a modern look (39240f3)

Installation

pip install illusion-agent==0.4.3

Or upgrade an existing installation:

pip install --upgrade illusion-agent

Assets are available at: https://github.com/YunTaiHua/illusion-agent/releases/tag/v0.4.3


重点更新

  • Cron 定时任务 — 完整的 cron 任务系统,可在 Web 设置中管理(列表/创建/编辑/删除/运行)
  • Web 端体验重构 — 滚动跟随重设计、思考过程折叠、工具进度区自动折叠、Lightbox 图片预览、光标与显示细节优化
  • Markdown 安全加固 — 消毒、外链保护、tabnabbing 防护、安全代码 URL 渲染
  • list_sessions 工具 — LLM 现在可感知其他活跃会话
  • 桌面图标更新 — 圆角风格图标

新功能

  • Cron 定时任务 — Web 设置新增 cron 任务管理 Tab(列表/创建/编辑/删除/运行),cron 工具支持编程式调度 (099cc2e, d77ef54)
  • list_sessions 工具 — LLM 可发现和引用其他活跃对话会话 (355ccb3)
  • Web 滚动跟随 — 重构对齐 kimi-code 弱跟随行为,阅读更流畅 (229ac80)
  • Markdown 安全 — 全面消毒,包含反 tabnabbing、外链安全、安全代码块 URL 渲染 (ebb963c)
  • 应用内图片预览 (Lightbox) — 点击图片在应用内放大,不再跳转外部浏览器 (76e595f)
  • 工具执行进度 — 进度区执行中自动展开,完成后自动折叠 (3b88d73)
  • 思考与任务折叠 — Web 端思考过程和已完成任务拥有独立可折叠区域 (df01f8d)

重要修复

  • Sleep 工具范围 — 最大休眠时间从 30 秒扩展至 600 秒(10 分钟),支持更长的等待场景 (716d5bb)
  • Cron 运行时安全 — 前端 UI 细节优化和 cron 任务执行期间的防误操作 (0fba4ba)
  • 输入框滚动 — 超出最大高度的内容改为滚动查看而非截断 (787f160)
  • Base64 图片显示 — 修复内联 base64 图片无法显示的问题,损坏图片显示美化 (854e663)
  • 桌面端外链劫持 — 修复桌面端点击外链导致窗口无法返回的问题 (e1563d8)
  • 多会话 UI — 修复多会话下任务计数和输入框草稿高度问题 (3e5b24c)
  • 内容区光标样式 — 消除内容区 I-beam 光标,统一为默认箭头 (234c632)

重构

  • 桌面图标 — 更换为圆角风格图标,视觉效果更现代 (39240f3)

安装

pip install illusion-agent==0.4.3

或升级已有安装:

pip install --upgrade illusion-agent

资源下载:https://github.com/YunTaiHua/illusion-agent/releases/tag/v0.4.3

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 09 Aug 03:40

Highlights

  • Web frontend rebuilt with a multi-session concurrent architecture: each session has its own engine, so you can create or switch sessions and run tasks in parallel while one is still running
  • Sidebar session state visuals: active sessions get a soft primary background with a thin border; running sessions get a cyan beam flowing along the border, with clear layering in both light and dark themes
  • Rewind enhancement: the rewound user message is restored into the input box (the Nth-from-last message as the recovery point), supported in both terminal and web
  • Tool result rendering: ANSI colors display correctly, and the transcript refreshes immediately after compact

New Features

  • Web multi-session concurrency — session line tasks run concurrently and isolated per session; switching sessions is instant and local; stop only affects the target session
  • Sidebar session state styles — visual distinction for active / running sessions (BorderBeam-style beam border, degrades gracefully with prefers-reduced-motion)
  • Rewind restores input — the rewound user message is filled back into the input box for re-editing
  • ANSI color rendering in tool results — colored output from bash and other tools displays correctly
  • CamelCase tool display names — grep/glob show as Grep/Glob, web_fetch shows as WebFetch

Important Fixes

  • Stop mechanism race — the session tracker is cleared after stopping, preventing auto-resume from reviving the conversation (the occasional "cannot stop" issue)
  • Checkpoint cross-process race — context.jsonl appends are protected by a cross-process file lock; multiple instances / tabs no longer corrupt lines
  • Compact data loss — rebuild is now atomic (temp file + os.replace), fixing the severe bug where context files became 0 bytes after compact
  • Compact transcript refresh — web transcript is replaced immediately after compaction, aligned with the backend engine state
  • Question card interactions — single-select no longer submits on click, multi-select gets a confirm button, and blur double-submit is guarded
  • Restore / switch robustness — frontend 10s restore timeout fallback, evicted sessions auto re-materialize, failed restores close the engine
  • Settings broadcast — permission mode / model / effort changes propagate to all session engines (plan mode can no longer be bypassed)

Refactoring

  • Background tasks track their owning session (ContextVar stamp); completion notifications route by ownership
  • Global state snapshots no longer carry session-scoped fields; usage data is pushed per session
  • Sidebar todo icons drop the scale animation; scrollbars hidden to avoid layout shifts

Installation

pip install --upgrade illusion-agent

重点更新

  • Web 端重构为多会话并发架构:每个会话独立引擎,运行任务时可随时新建/切换会话并行处理,互不阻塞
  • 侧栏会话状态视觉优化:活跃会话主色淡背景+细边框,运行中会话青蓝光束流动边框,深浅主题层次分明
  • rewind 回退增强:被回退的 user 消息自动回填输入框(返回倒数第 N 轮的恢复点消息),terminal 与 web 同步支持
  • 工具结果显示增强:ANSI 颜色正常渲染,compact 压缩后转录即时刷新

新功能

  • Web 多会话并发 — 会话行任务按会话隔离并发执行,切换会话纯本地瞬时,停止任务只作用于目标会话
  • 侧栏会话状态样式 — 活跃/运行中会话的视觉区分(BorderBeam 光束边框,prefers-reduced-motion 降级)
  • rewind 回填输入框 — 回退后被回退轮次的 user 消息回填输入框,支持重新编辑续写
  • 工具结果 ANSI 渲染 — bash 等彩色输出正常显示颜色
  • 工具名驼峰显示 — grep/glob 显示 Grep/Glob,web_fetch 显示 WebFetch

重要修复

  • 停止机制竞态 — 停止任务后清空会话 tracker,杜绝 auto_resume 复活对话(无法终止的偶发问题)
  • checkpoint 跨进程竞态 — context.jsonl 追加加跨进程文件锁,多实例/多标签页不再交错损坏
  • compact 数据丢失 — 重建改为原子写入(临时文件+os.replace),修复压缩后 0 字节丢数据的严重问题
  • compact 转录刷新 — web 端压缩后前端转录即时替换,与后端引擎状态对齐
  • 问答卡片交互 — 单选防误触、多选确认按钮、失焦双提交守卫
  • 恢复/切换健壮性 — 前端恢复 10s 超时兜底、淘汰会话自动重新物化、恢复失败关闭引擎
  • 设置广播 — 权限模式/模型/effort 变更同步到所有会话引擎(计划模式不再被绕过)

重构

  • 后台任务归属会话追踪(ContextVar stamp),完成通知按归属路由
  • 全局状态快照剔除会话字段,用量数据按会话推送
  • 右栏待办图标去除放大缩小动画,滚动条隐藏避免布局微动

安装

pip install --upgrade illusion-agent

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 07 Aug 09:19

v0.4.1 Release Notes

Highlights

  • New version update notification: after backend connection, PyPI is checked asynchronously — Terminal shows a toast, Web/Desktop shows a notification
  • Desktop packaging improvements: icon now correctly embedded, fonts (Inter / JetBrains Mono) bundled, no more missing glyphs
  • Code block highlighting fixed for light theme, diff colors now font-only (red/green)
  • Connection overlay fixed to light theme with higher z-index, eliminating first-frame theme flash

New Features

  • Version update notification — backend checks PyPI for newer releases after connecting; Terminal displays via toast, Web/Desktop via notification component. Version detection unified to use the source __version__, fixing stale results under editable installs
  • Bundled fonts — Inter and JetBrains Mono are now embedded in the frontend, rendering correctly on systems without these fonts installed

Important Fixes

  • Desktop iconbuild_icons.py now synthesizes the multi-resolution .ico from PNG sources; previously a stale icon was copied into the executable
  • Light theme code blocks — syntax highlighting switched to the light theme palette; pale blue tokens no longer invisible on light backgrounds
  • Diff display — addition/deletion now use font color only (green/red), removing the full-line background blocks
  • Theme flash on startup — connecting overlay fixed to light theme with z-60, covering the custom title bar; no more brief wrong-theme flash
  • Spell check disabled — Electron no longer underlines technical terms like exe with red squiggles
  • Channel status flickering fixed — settings channel tab no longer alternates between "Initializing..." and "Running"; a read-loop race in the daemon IPC caused ~50% of status pings to go unanswered
  • Portable dir name — Windows portable extraction directory renamed from win-unpacked to illusion-agent

Refactoring

  • Version detection unified: _get_current_version() and /version now use __version__ (synced with pyproject.toml) instead of importlib.metadata

Documentation

  • README desktop download links use releases/latest and <version> placeholders, no longer hardcoded per release

CI/CD

  • Restored tag trigger for publish.yml
  • Fixed 5 hanging tests on CI Ubuntu

Installation

# pip install
pip install --upgrade illusion-agent

# Desktop (portable, no Python/Node.js needed)
# Windows: IllusionAgent-<version>-win-x64.zip
# macOS:   IllusionAgent-<version>-arm64.dmg
# Linux:   IllusionAgent-<version>.AppImage
# https://github.com/YunTaiHua/illusion-agent/releases/latest

v0.4.1 发布说明

重点更新

  • 新增版本更新提醒:后端连接完成后异步检查 PyPI 新版本——terminal 端用 toast 展示,web/桌面端用通知组件展示
  • 桌面版打包改进:图标正确嵌入、字体(Inter / JetBrains Mono)随包分发,不再出现字形缺失
  • 代码块高亮修复浅色主题可读性,diff 改为仅字体着色(红/绿)
  • 连接遮罩层固定浅色并提升层级,消除首帧主题闪烁

新功能

  • 版本更新提醒 — 后端连接后异步检查 PyPI 新版本;terminal 端通过 toast 显示,web/桌面端通过通知组件显示。版本检测统一改用源码 __version__,修复可编辑安装下检测滞后
  • 内置字体 — Inter 与 JetBrains Mono 随前端打包分发,未安装这些字体的系统也能正确渲染

重要修复

  • 桌面版图标build_icons.py 改为从多分辨率 PNG 合成 .ico;此前旧图标被复制进可执行文件
  • 浅色主题代码块 — 语法高亮切换为浅色配色,淡蓝 token 在浅色背景上不再不可见
  • diff 显示 — 新增/删除行仅保留字体颜色(绿/红),去掉整行背景色块
  • 启动主题闪烁 — 连接遮罩层固定浅色并提升层级(覆盖自定义标题栏),不再短暂显示错误主题
  • 禁用拼写检查 — Electron 不再对 exe 等技术词汇标红色波浪线
  • 渠道状态闪烁修复 — 设置页渠道 tab 不再交替显示"正在初始化中..."/"运行中";守护进程 IPC 读循环竞态导致约 50% 状态查询无响应
  • 便携版目录名 — Windows 便携版解压目录由 win-unpacked 改为 illusion-agent

重构

  • 版本检测统一:_get_current_version()/version 改用 __version__(与 pyproject.toml 同步),替代 importlib.metadata

文档

  • README 桌面版下载链接改用 releases/latest<version> 占位符,不再随版本硬编码

CI/CD

  • 恢复 publish.yml 的 tag 触发
  • 修复 CI Ubuntu 上 5 个测试挂死问题

安装

# pip 安装
pip install --upgrade illusion-agent

# 桌面版(便携,无需 Python/Node.js)
# Windows: IllusionAgent-<版本>-win-x64.zip
# macOS:   IllusionAgent-<版本>-arm64.dmg
# Linux:   IllusionAgent-<版本>.AppImage
# https://github.com/YunTaiHua/illusion-agent/releases/latest

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 07 Aug 04:59

Highlights

  • Desktop Edition — First release of the Electron desktop shell with bundled Python 3.12 / Node 20 runtimes. Extract and run on Windows / macOS / Linux without any preinstalled environment. PATH injection lets the agent's bash tool invoke python / node via the bundled runtimes.

New Features

  • Desktop Shell — Frameless window with custom title bar, system tray (close-to-tray, quit via tray menu), connection overlay, and auto-created Windows desktop shortcut on first launch.
  • Theme Tri-State Toggle — Web UI now supports light / dark / system theme modes, persisted to settings.json.
  • First-Run Config Form — Initial login configuration form with dynamic channel enable/disable.
  • Status Bar Enhancements — Improved status bar with precision optimizations and dead code cleanup.
  • LSP Manual Activation — LSP tool switched to manual activation mode, fixing Windows server-missing detection.

Important Fixes

  • Ruff Warnings — Fixed f-string without placeholders and overly broad exception captures.
  • PendingToolBubble Alignment — Web PendingToolBubble now aligns with terminal: shows only tool name before tool_input arrives, summary no longer hides with progress section collapse.

CI/CD

  • Restored Tests — Re-enabled pytest step in publish.yml (previously skipped, 1591 tests passing locally).
  • Desktop Release Pipeline — release-desktop.yml triggers on v* tags, builds three-platform matrix (Windows zip / macOS dmg / Linux AppImage), uploads to GitHub Release.

Installation

pip install illusion-agent==0.4.0

Desktop edition: download from https://github.com/YunTaiHua/illusion-agent/releases/tag/v0.4.0


重点更新

  • 桌面版 — 首发 Electron 桌面壳,内置 Python 3.12 / Node 20 运行时。Windows / macOS / Linux 解压即用,无需预装环境。PATH 注入让 agent 的 bash 工具能通过内置运行时调用 python / node

新功能

  • 桌面壳 — 无边框窗口 + 自定义顶部栏 + 系统托盘(关闭最小化到托盘,托盘菜单退出)+ 连接遮罩,Windows 首次启动自动创建桌面快捷方式。
  • 主题三态切换 — Web 端支持浅色 / 深色 / 跟随系统三种主题模式,持久化到 settings.json。
  • 首次登录配置表单 — 初始登录配置表单,支持渠道动态启停。
  • 状态栏增强 — 状态栏精度优化,清理死代码。
  • LSP 手动激活 — LSP 工具改为手动激活模式,修复 Windows 下服务器缺失检测问题。

重要修复

  • Ruff 警告 — 修复 f-string 无占位符、捕获宽泛异常问题。
  • PendingToolBubble 对齐 — Web 端 PendingToolBubble 与 terminal 对齐,tool_input 未到达时只显示工具名,summary 不随进度区折叠隐藏。

CI/CD

  • 恢复测试 — 恢复 publish.yml 的 pytest 步骤(此前跳过,本地已验证 1591 测试通过)。
  • 桌面版发布流水线 — release-desktop.yml 打 v* tag 触发三平台 matrix 打包(Windows zip / macOS dmg / Linux AppImage),上传到 GitHub Release。

安装

pip install illusion-agent==0.4.0

桌面版:从 https://github.com/YunTaiHua/illusion-agent/releases/tag/v0.4.0 下载

v0.3.5

Choose a tag to compare

@YunTaiHua YunTaiHua released this 03 Aug 02:18

Highlights

  • Removed 10 deprecated slash commands (/branch, /commit, /diff, /files, /issue, /plan, /pr_comments, /status, /summary, /bridge) and the entire bridge module to streamline the codebase
  • Added context compaction (microcompact + full LLM compaction) as a documented feature

New Features

  • web: Agent creation wizard form for single-page agent creation
  • web: BtwCard side question panel with button support
  • terminal: AgentWizard step-by-step creation wizard
  • terminal: BtwPanel and BtwInlineInput components for side questions
  • backend: /btw side-question command and /agent command with completed agent summary
  • backend: side_question service and agent_creator service with validation and LLM-assisted generation
  • WebSocket: New message types for btw and agent wizard

Important Fixes

  • refactor: Removed 10 deprecated slash commands and bridge module (~1300 lines removed)
  • fix: Unified cache hit rate as single metric, removed misleading cache coverage
  • fix: Terminal text wrapping now uses CJK-aware width calculation
  • fix: Compressed checkpoint rebuild preserves accurate usage stats
  • fix: Token metering refactored to use API true usage as baseline
  • fix: QQ streaming 40007 prefix conflict and Feishu card image key errors

Refactoring

  • Session data directory uses CheckpointStore as single source of truth
  • Background agent summaries extracted from transcript task-notification
  • BtwPanel refactored with line wrapping, navigation, and Spinner

Documentation

  • Updated README and docs to remove command count claims
  • Added context compaction documentation
  • Replaced preview images

重点更新

  • 移除 10 个已废弃斜杠指令(/branch、/commit、/diff、/files、/issue、/plan、/pr_comments、/status、/summary、bridge)及整个 bridge 模块,精简代码库
  • 将上下文压缩机制(微压缩 + 全压缩)作为正式特性记录

新功能

  • web: Agent 创建向导表单,支持单页创建
  • web: BtwCard 侧问卡片与按钮支持
  • terminal: AgentWizard 分步创建向导
  • terminal: BtwPanel 与 BtwInlineInput 侧问组件
  • 后端: /btw 侧问指令和 /agent 指令(含已完成 agent 摘要查看)
  • 后端: side_question 服务和 agent_creator 服务(含校验与 LLM 辅助生成)
  • WebSocket: 新增 btw 与 agent 向导消息类型

重要修复

  • 重构: 移除 10 个已废弃斜杠指令和 bridge 模块(删除约 1300 行代码)
  • 修复: 统一缓存命中率为唯一指标,删除误导性的缓存覆盖率
  • 修复: 终端文本折行改用 CJK 感知的显示宽度计算
  • 修复: 压缩后重建 checkpoint 保留真实用量分项
  • 修复: 重构 token 计量体系,以 API 真实 usage 为基准
  • 修复: QQ 流式 40007 前缀冲突和飞书卡片 image key 报错

重构

  • 会话数据目录以 CheckpointStore 为唯一权威
  • 后台 agent 摘要改从 transcript task-notification 提取
  • BtwPanel 重构(换行 + 导航 + Spinner)

文档

  • 更新 README 和 docs,移除指令数量声明
  • 补充上下文压缩机制文档
  • 替换预览图片

Installation

pip install illusion-agent==0.3.5

安装

pip install illusion-agent==0.3.5

Full changelog: v0.3.4...v0.3.5

v0.3.4

Choose a tag to compare

@YunTaiHua YunTaiHua released this 31 Jul 07:43

Highlights

  • MCP SDK v2 Migration: Upgraded from MCP v1 to v2 with full API compatibility updates
  • Agent Tool Visualization: Enhanced frontend display of agent tool calls and results
  • Cross-platform Path Validation: Consistent path validation across Windows and Linux

重点更新

  • MCP SDK v2 迁移: 从 MCP v1 升级到 v2,全面更新 API 兼容性
  • Agent 工具可视化: 增强前端工具调用和结果的展示
  • 跨平台路径验证: 统一 Windows 和 Linux 的路径验证行为

New Features

  • MCP v2 Compatibility: Updated to MCP Python SDK 2.0.0 with renamed APIs (MCPError, streamable_http_client, snake_case fields)
  • Agent Tool UI: Enhanced tool call visualization in terminal and web interfaces
  • HTTP Client Configuration: Streamable HTTP transport now configures headers/auth via httpx2.AsyncClient

新功能

  • MCP v2 兼容性: 升级到 MCP Python SDK 2.0.0,更新重命名的 API(MCPErrorstreamable_http_client、snake_case 字段)
  • Agent 工具 UI: 增强终端和 Web 界面的工具调用可视化
  • HTTP 客户端配置: Streamable HTTP 传输现在通过 httpx2.AsyncClient 配置 headers/auth

Important Fixes

  • Removed WebSocket transport support (MCP v2 specification change)
  • Fixed context usage token count accuracy
  • Fixed auto-compact threshold calculation
  • Fixed streaming flush server disconnect handling

重要修复

  • 移除 WebSocket 传输支持(MCP v2 规范变更)
  • 修复 context usage token 计数准确性
  • 修复自动压缩阈值计算
  • 修复流式 flush 服务器断开连接处理

Refactoring

  • Updated protocol field names from camelCase to snake_case (inputSchemainput_schema, structuredContentstructured_content)
  • Simplified rewind modes (removed code-only mode)
  • Migrated memory directory to ~/.illusion/memory

重构

  • 协议字段名从 camelCase 更新为 snake_case
  • 简化 rewind 模式(移除仅代码模式)
  • 内存目录迁移到 ~/.illusion/memory

Documentation

  • Updated MCP transport type documentation (removed WebSocket)
  • Synced bilingual docs with latest API changes

文档

  • 更新 MCP 传输类型文档(移除 WebSocket)
  • 同步双语文档与最新 API 变更

Installation

pip install illusion-agent==0.3.4

安装

pip install illusion-agent==0.3.4

Full Changelog: v0.3.3...v0.3.4

v0.3.3

Choose a tag to compare

@YunTaiHua YunTaiHua released this 28 Jul 09:27

Highlights

IllusionAgent v0.3.3 is a rebranding and stabilization release. This version completes the full migration from illusion-code to illusion-agent across all 5 layers (core build, API/user-visible strings, frontend, docs, scripts/skills/tests), introduces runtime /max-tokens control, fixes several backend crash chains (MCP McpError, Grep invalid regex, path traversal), and extracts shared logic (resolve_relative_path, run_rg_checked, MCP_TOOL_EXCEPTIONS) to eliminate tool-layer duplication.

Key Changes

  • Full Brand Migrationillusion-codeillusion-agent across build, CLI, API, frontend, docs, scripts, skills, and tests
  • Runtime max-tokens — New /max-tokens slash command with interactive selector and custom input
  • Crash Fixes — MCP McpError, Grep invalid regex, path traversal attacks, and cron daemon PID file
  • Code Deduplication — Extracted resolve_relative_path, run_rg_checked, MCP_TOOL_EXCEPTIONS into shared modules

New Features

Runtime Controls

  • /max-tokens Slash Command — New command to set max output tokens at runtime
  • Interactive Selector/effort and /max-tokens with no args pop up a selector, supporting custom input
  • AppState + QueryEngine — Added max_tokens runtime modification support

Authentication

  • Interactive env Reuseauth login supports interactive reuse of existing env and looping input for multiple models
  • Always New envauth login always creates new env; add model moved to auth add-model command

MCP

  • Optional type Field — MCP config type now optional, defaults to stdio when omitted

Important Fixes

Brand Migration (illusion-code → illusion-agent)

  • Layer 1 — Core build and CLI migration
  • Layer 2 — API class rename (IllusionCodeApiErrorIllusionAgentApiError), docstring and user-visible string migration
  • Layer 3 — Frontend brand name migration
  • Layer 4 — Documentation and image asset migration
  • Layer 5 — Scripts, skills, and test file brand name synchronization

Crash Chains

  • MCP McpError — Explicitly catch McpError in ReadMcpResourceTool and McpToolAdapter to prevent backend crashes
  • Grep Invalid Regex — Pre-validate regex with re.compile before calling rg, preventing RipgrepError escape
  • Path Traversal — Reject .., ~-prefixed paths in all file tools via validate_safe_path
  • Cron Daemon PID — Fixed run_cron_serve not writing PID file, causing is_scheduler_running() to always return False

Terminal UX

  • Tab Switching — Multi-question tab navigation now commits current answer before switching (equivalent to pressing Enter)
  • CustomInputModal — Unified context-window custom input flow, fixed style and focus leak
  • State Loss — Fixed state loss when switching between multi-question tabs

Backend

  • /max-tokens Endpointbackend_host now handles /max-tokens select_request and CLI build branch
  • Test Isolation — Fixed test_max_tokens_set_number overwriting user's settings.json with test values

Refactoring

Shared Logic Extraction

  • resolve_relative_path — 4 file tools' duplicate _resolve_path replaced by paths.resolve_relative_path
  • run_rg_checkedglob_tool and grep_tool switched to non-throwing run_rg_checked
  • MCP_TOOL_EXCEPTIONS — Extracted (ValueError, McpError) constant to mcp/types.py
  • RipgrepNotFoundError — Added catch in run_rg_checked to fulfill "never raises" contract

Code Quality

  • Dead Code Removal — Deleted textual_app.py dead code and related test dependencies
  • Auto-fix — Applied 401 ruff safe auto-fixes for code style
  • Type Safety — Refined exception handling, simplified code, improved type annotations

Documentation

  • README & Introduction — Optimized slogan and project intro across 4 docs (English + Chinese)
    • Main slogan: "Where fantasy meets functionality"
    • Secondary: "The best of many worlds, refined into one intelligent agent"

CI/CD

  • Trusted Publishers — Removed scripts/publish.py (twine + token model), fully migrated to GitHub Actions Trusted Publishers
  • Lint Stability — Locked ruff version to 0.15.0 to prevent CI lint failures from new rules

Installation

pip install (Recommended)

pip install illusion-agent==0.3.3

From Source

git clone https://github.com/YunTaiHua/illusion-agent.git
cd illusion-agent
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


中文版本


重点更新

IllusionAgent v0.3.3 是一个品牌迁移与稳定性版本。本次版本完成了 illusion-codeillusion-agent 的全层迁移(5 层:核心构建、API/用户可见字符串、前端、文档、脚本/skills/测试),引入了运行时 /max-tokens 控制,修复了多个后端崩溃链(MCP McpError、Grep 无效正则、路径穿越),并提取了公共逻辑(resolve_relative_pathrun_rg_checkedMCP_TOOL_EXCEPTIONS)消除工具层重复代码。

关键更新

  • 全层品牌迁移illusion-codeillusion-agent 覆盖构建、CLI、API、前端、文档、脚本、skills、测试
  • 运行时 max-tokens — 新增 /max-tokens 斜杠指令,支持交互式选择器和自定义输入
  • 崩溃修复 — MCP McpError、Grep 无效正则、路径穿越攻击、cron 守护进程 PID 文件
  • 代码去重 — 提取 resolve_relative_pathrun_rg_checkedMCP_TOOL_EXCEPTIONS 至公共模块

新功能

运行时控制

  • /max-tokens 斜杠指令 — 新增运行时设置最大输出令牌数的指令
  • 交互式选择器/effort/max-tokens 无参数时弹出选择框,支持自定义输入
  • AppState + QueryEngine — 增加 max_tokens 运行时修改支持

认证

  • 交互式 env 复用auth login 支持交互式复用已有 env 和循环输入多个 model
  • 始终新建 envauth login 始终新建 env,add model 改用 auth add-model 指令

MCP

  • type 字段可选 — MCP 配置 type 现在可选,省略时默认 stdio

重要修复

品牌迁移(illusion-code → illusion-agent)

  • 第1层 — 核心构建与 CLI 迁移
  • 第2层 — API 类名重命名(IllusionCodeApiErrorIllusionAgentApiError)、docstring 和用户可见字符串迁移
  • 第3层 — 前端品牌名迁移
  • 第4层 — 文档与图片资源迁移
  • 第5层 — 脚本、skills 和测试文件品牌名同步

崩溃链

  • MCP McpError — 在 ReadMcpResourceToolMcpToolAdapter 中显式捕获 McpError,防止后端崩溃
  • Grep 无效正则 — 调用 rg 前用 re.compile 预校验正则,防止 RipgrepError 逃逸
  • 路径穿越 — 通过 validate_safe_path 拒绝所有文件工具中包含 ..~ 开头的路径
  • Cron 守护进程 PID — 修复 run_cron_serve 未写入 PID 文件导致 is_scheduler_running() 始终返回 False

终端 UX

  • Tab 切换 — 多问题 tab 切换前先提交当前问题答案,等同于一次回车
  • CustomInputModal — 统一 context-window 自定义输入流程,修复样式与焦点泄漏
  • 状态丢失 — 修复多问题 tab 切换时状态丢失问题

后端

  • /max-tokens 端点backend_host 补充 /max-tokens select_request 与命令行构建分支
  • 测试隔离 — 修复 test_max_tokens_set_number 用测试值覆盖用户 settings.json 的问题

重构

公共逻辑提取

  • resolve_relative_path — 4 个文件工具的重复 _resolve_path 替换为 paths.resolve_relative_path
  • run_rg_checkedglob_toolgrep_tool 改用不抛异常的 run_rg_checked
  • MCP_TOOL_EXCEPTIONS — 提取 (ValueError, McpError) 常量至 mcp/types.py
  • RipgrepNotFoundErrorrun_rg_checked 新增捕获,使「不抛异常」契约成立

代码质量

  • 死代码清理 — 删除 textual_app.py 死代码及相关测试依赖
  • 自动修复 — 应用 401 项 ruff safe auto-fix 代码风格修复
  • 类型安全 — 细化异常处理、简化代码、完善类型注解

文档

  • README 与 introduction — 优化 4 个文档(中英文)的标语和项目简介
    • 主标语:"幻想与实用,于此交融"(Where fantasy meets functionality)
    • 副标语:"融合多个开源项目精华,构建统一智能代理"

CI/CD

  • Trusted Publishers — 删除 scripts/publish.py(twine + token 模式),全面迁移至 GitHub Actions Trusted Publishers
  • Lint 稳定性 — 锁定 ruff 版本为 0.15.0 防止 CI lint 因新版规则失败

安装

pip 安装(推荐)

pip install illusion-agent==0.3.3

从源码安装

git clone https://github.com/YunTaiHua/illusion-agent.git
cd illusion-agent
pip install .

快速开始

illusion auth login                              # 配置 API 认证
illusion                                          # 启动 TUI 交互式会话
illusion web                                      # 启动 Web 界面
illusion -p "分析项目结构"                         # Print 模式(非交互)

文档

v0.3.2

Choose a tag to compare

@YunTaiHua YunTaiHua released this 26 Jul 16:17

🆕 Highlights

IllusionCode v0.3.2 is a comprehensive asynchronous refactoring and stability release. This release introduces a full asynchronous overhaul of the tool layer, UI layer, LSP client, and channel SDK, resolves critical agent task lifecycle issues, adds MCP multi-protocol transport support, and introduces a new multi-line text input architecture with improved UX for the question modal and auth flow.

Key Changes

  • Full Async Refactoring — Tool layer, UI input/modal, LSP client, and channel SDK fully async with proper queue-based architecture
  • Agent Stability — Fixed root cause of Ctrl+X hangs, agent carding, orphan tasks, and GC preemption of fire-and-forget tasks
  • MCP Multi-Protocol — HTTP/SSE/WebSocket transport support for MCP client connections
  • Auth Token Support — Full auth_token field support across env config, CLI, API client, and web UI
  • New Text Input Architecture — MeasuredText, Cursor, and MultilineTextInput rewritten for proper display-line handling
  • Mid-Turn Drain — New mid-turn drain mechanism with improved QuestionModal UX

🚀 New Features

MCP & Agent

  • MCP Multi-Protocol Transport — HTTP/SSE/WebSocket transport support for MCP client connections
  • Activity-Aware Timeout — Agent tool now uses activity-aware timeout for both foreground and background modes
  • Sub-Agent Progress Tracking — Foreground mode now displays sub-agent progress tracking
  • Agent Force Cancel — Added force_cancel mechanism with proper ContextVar token reset (Ctrl+X root cause fix)

Authentication

  • Auth Token Support — Full auth_token field support across EnvConfig, AnthropicApiClient, resolve_auth(), runtime, CLI (/login//logout), and web UI
  • Auth Type Selection — Login flow now supports authentication type selection branch (custom format + anthropic)
  • Auth Display/login command displays current authentication type
  • Credential Persistencecreate_env saves api_key to credentials.json; web env creation also persists auth_token

UI/UX

  • Mid-Turn Drain — Added mid-turn drain mechanism for smoother QuestionModal option rendering
  • QuestionModal Pagination — Improved QuestionModal UX with todo/statusbar auto-hide, option preview pagination
  • MeasuredText & Cursor — New MeasuredText text measurement core class and Cursor immutable cursor model
  • TodoPanel Optimization — Optimized TodoPanel display with shared text utility functions

Core Infrastructure

  • stderr_redirect — New module for fd-level stderr redirection to prevent logging deadlocks
  • signals — New cross-platform SIGINT handler module
  • aioqueue — New async queue with shutdown sentinel support

🔧 Refactoring

Full Async Overhaul

  • Tool Layer — File I/O, subprocess, rglob, and all tool operations fully async
  • UI Layer — Input, modal, and batch delete operations fully async
  • LSP Client — Full async rewrite with thread-safe _pending and MCP gather exception handling
  • Channel SDK — Dedicated executor per channel SDK, large file I/O async, except BaseException splitting
  • ReactBackendHost — Write path: queue + single consumer write loop; Read path: daemon thread + instant request processing; Shutdown: three-task concurrent with graceful shutdown
  • WebBackendHost — Queue-based writes with graceful shutdown
  • agent_executormessage_queue replaced with aioqueue + blocking consumer

Frontend Refactoring

  • MultilineTextInput — Rewritten using Cursor model for proper display-line handling
  • PromptInput — Passes columns to input, removes sanitizeInput
  • Ctrl+U Behavior — Changed to delete current display line (not logical line), fixing cross-line deletion and Ink double-newline issues
  • Footer Cleanup — Removed slash command hints from footer, optimized shortcut hints and placeholder
  • Removed Deprecated — Cleaned up deprecated ref_count.py and related references, removed fast_mode, structured_output_tool, and is_interactive functionality

🛠️ Important Fixes

Agent Stability

  • Ctrl+X Root Causeagent_executor now uses asyncio.wait FIRST_COMPLETED instead of wait_for to prevent coroutine hanging
  • Force Cancelagent force_cancel now properly interrupts and resets ContextVar tokens
  • Orphan Tasksas_completed exception path explicitly cancels unfinished tasks
  • Fire-and-Forget — Full project fire-and-forget task strong reference fix to prevent GC preemption
  • BackgroundAgentTracker — Added shutdown + wait_for_completion with timeout protection
  • daemon_ipc — Plan B: Future + CloseHandle to unblock uncancellable threads
  • Agent Wake Event — Fixed notify_completed wake_event regression causing agent mode to hang

Channels

  • Feishu — Fixed file send file_type/msg_type mismatch causing 230055 error; fixed WS client reconnection event loop conflict
  • Channel Inbound — Added queue shutdown sentinel and _pending_replies Future resolve for graceful channel shutdown
  • Controller Init — Added missing _dispatch_tasks initialization for QQStreamingController and FeishuStreamingCardController

Permission & UI

  • "Always Allow" Persistence — Fixed "always allow" permission not persisting to permissions.json
  • StatusBar — Fixed StatusBar display issues and concurrent permission request deadlock; hides both divider and spacing when Todo is active
  • Permission Modal — Fixed TUI permission modal not disappearing and Ctrl+X not terminating tasks
  • TodoPanel — Fixed TodoPanel hiding logic during modals, using externallyHidden property to prevent state loss

Text Input

  • Ctrl+U — Fixed cross-line deletion and Ink double-newline; at display line start, deletes previous character to join with previous line
  • Column Width — Reduced column width by 1 to eliminate single-character standalone line issue
  • Truncation — Removed truncate-end from Text to prevent "..." content truncation
  • Slash Command Bar — Optimized display truncation and question card divider line color

Auth & Config

  • Strict Provider — Double-layer defense to fix tool_use/tool_result pairing issue in strict provider
  • CLI — Uses typer.prompt() instead of custom prompt; ApiKeyFlow error messages more generic
  • merge_cli_overrides — Added auth_token support; save_settings strips empty fields
  • UnboundLocalError — Fixed auth_field variable initialization to avoid UnboundLocalError
  • resolve_auth() — Correctly determines auth type and passes to AnthropicApiClient

MCP

  • Config Parsing — Supports streamableHttp, sse, websocket protocols and unwrapped multi-server format

CI/CD

  • Integration Tests — Added end-to-end integration tests (backend refactoring verification)
  • Test Utils — Added missing tests/test_services/__init__.py to resolve basename conflict
  • UTF-8 Protocol Test — Rewrote UTF-8 protocol byte test to adapt to queue mode _emit

Installation

pip install (Recommended)

pip install illusion-code==0.3.2

From 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.2 是一个全面异步重构和稳定性版本。本次版本引入了工具层、UI 层、LSP 客户端和渠道 SDK 的全面异步化改造,解决了关键的 agent 任务生命周期问题,新增了 MCP 多协议传输支持,并引入了全新的多行文本输入架构和优化的 question 模态框与认证流程交互体验。

关键更新

  • 全面异步重构 — 工具层、UI 输入/模态框、LSP 客户端和渠道 SDK 全面异步化,采用基于队列的架构
  • Agent 稳定性 — 修复 Ctrl+X 卡死的根因、agent 卡住、孤儿任务和 GC 抢收 fire-and-forget 任务的问题
  • MCP 多协议 — MCP 客户端支持 HTTP/SSE/WebSocket 传输连接
  • Auth Token 支持 — 在 env 配置、CLI、API 客户端和 Web UI 中全面支持 auth_token 字段
  • 新文本输入架构 — 引入 MeasuredText、Cursor 和重写的 MultilineTextInput,正确处理显示行
  • Mid-Turn Drain — 新增 mid-turn drain 机制,优化 QuestionModal 交互体验

🚀 新功能

MCP 与 Agent

  • MCP 多协议传输 — MCP 客户端支持 HTTP/SSE/WebSocket 传输连接
  • 活动感知超时 — Agent 工具前后台模式均采用活动感知超时机制
  • 子代理进度追踪 — 前台模式支持子代理进度追踪显示
  • Agent 强制取消 — 新增 force_cancel 机制,正确重置 ContextVar token(Ctrl+X 根因修复)

认证

  • Auth Token 支持 — 在 EnvConfigAnthropicApiClientresolve_auth()、运行时、CLI(/login//logout)和 Web UI 中全面支持 auth_token 字段
  • 认证类型选择 — 登录流程新增认证方式选择分支(自定义格式 + anthropic)
  • 认证类型显示/login 命令显示当前认证类型
  • 凭据持久化create_envapi_key 保存到 credentials.json;Web 环境创建也持久化 auth_token

UI/UX

  • Mid-Turn Drain — 新增 mid-turn drain 机制,优化 QuestionModal 选项渲染
  • QuestionModal 分页 — 优化 question 模态框 UX,自动隐藏 todo/statusbar,添加预览分页
  • MeasuredText 与 Cursor — 新增 MeasuredText 文本测量核心类和 Cursor 不可变光标模型
  • TodoPanel 优化 — 优化 TodoPanel 显示,提取共享文本工具函数

核心基础设施

  • stderr_redirect — 新增 fd 级 stderr 重定向模块,防止 logging 死锁
  • signals — 新增跨平台 SIGINT 处理器模块
  • aioqueue — 新增带 shutdown 哨兵的异步队列

🔧 重构

全面异步化改造

  • 工具层 — 文件 I/O、subprocess、rglob 和所有工具操作全面异步化
  • UI 层 — 输入、模态框和批量删除操作全面异步化
  • LSP 客户端 — 全面异步重写,线程安全的 _pending 和 MCP gather 异常处理
  • 渠道 SDK — 每个渠道 SDK 使用专用 executor,大文件 I/O 异步化,except BaseException 拆分
  • ReactBackendHost — 写路径:队列 + 单一消费者写循环;读路径:daemon 线程 + 即时请求处理;关闭:三任务并发 + 优雅关闭
  • WebBackendHost — 基于队列的写入 + 优雅关闭
  • agent_executor — `message_q...
Read more

v0.3.1

Choose a tag to compare

@YunTaiHua YunTaiHua released this 12 Jul 09:09

🆕 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_signature mechanism 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_signature Support — Added support for Gemini's thought_signature mechanism 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_ipc module 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 dict to dict[str, Any] throughout daemon_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() to get_running_loop() in WeChat module

Daemon

  • Deprecated ref_count.py — Marked ref_count.py as deprecated, replaced with IPC connection management
  • PID File Replacement — Replaced PID files with IPC connection management

🛠️ Important Fixes

Feishu Channel

  • Shutdown Error — Fixed CancelledError propagation interrupting other channel shutdowns
  • SDK Loop Issue — Fixed ExpiringCache creation 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_token causing 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.1

From 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 平台检查
  • 导入优化 — 添加缺失的模块导入(ossys

渠道改进

  • 重连机制 — 优化三个渠道的重连和资源清理
  • 代码审查修复 — 解决代码审查中的 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 模式(非交互)

文档