@legna-lnc/legnacode 1.8.5 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,37 @@
4
4
 
5
5
  All notable changes to LegnaCode CLI will be documented in this file.
6
6
 
7
+ ## [1.9.2] - 2026-04-25
8
+
9
+ ### Features
10
+
11
+ - **Computer Use Python Bridge** — Replaced native Swift/Rust modules (`@ant/computer-use-swift` + `@ant/computer-use-input`) with pure Python subprocess bridge (`runtime/mac_helper.py` + `runtime/win_helper.py`). Zero NAPI dependencies. Supports 28 commands: screenshot, mouse, keyboard, app management, clipboard, permission detection. Cross-platform: macOS and Windows.
12
+ - **Auto Python Environment Setup** — First Computer Use invocation automatically detects system Python 3.12+, creates a venv at `~/.legna/computer-use-venv/`, installs platform-specific dependencies. Search order: `LEGNA_PYTHON_BIN` env → `python3.14`..`python3.12` → `python3`/`python` → Windows `py` launcher. Requirements hash invalidation triggers reinstall on dependency changes.
13
+ - **Platform-Specific Dependencies** — Split `requirements.txt` into `requirements-macos.txt` (pyobjc), `requirements-windows.txt` (pywin32/psutil/screeninfo/pyperclip), `requirements-common.txt` (mss/Pillow/pyautogui).
14
+
15
+ ### Improvements
16
+
17
+ - **Feature Gate Removal** — Removed all GrowthBook remote feature flags and Max/Pro subscription checks for Computer Use. Now controlled by local `settings.json` (`computerUse.enabled`, default `true`). Available to all users.
18
+ - **Executor Simplification** — `executor.ts` rewritten from ~800 lines to ~200 lines. No CFRunLoop drain, no NAPI, no animated mouse movement — pure subprocess I/O.
19
+
20
+ ## [1.9.0] - 2026-04-24
21
+
22
+ ### Features
23
+
24
+ - **Portable Sessions** — Migrated session JSONL files use `"cwd":"."` relative paths instead of absolute paths. Projects can be moved, copied, or synced via git — resume works from any location. Runtime resolves `"."` to current working directory at 5 points in `sessionStorage.ts`, `crossProjectResume.ts`, and `listSessionsImpl.ts`.
25
+ - **WebUI Project Browser** — New "项目总览" tab with card layout showing all projects from `~/.claude/` and `~/.legna/`. Displays session count, last active time, migration status, source (Claude/Legna/Both). Missing paths highlighted in red.
26
+ - **WebUI Memory Editor** — Three-column layout: project list → file tree with expand/collapse for subdirectories → Markdown editor. Banner: "记忆是 AI 的建议性笔记,随项目演进自动更新,内容仅供参考".
27
+ - **WebUI Force-Directed Graph** — Interactive project relationship visualization with physics simulation (repulsion + attraction + center gravity + damping). Draggable nodes. Node size = session count, color = recency, edges = same-day activity with weight labels.
28
+ - **Full Project Migration** — Migrates sessions (JSONL + subagents/ + tool-results/), memory, skills/, agents/, rules/, CLAUDE.md → LEGNA.md, settings.json, .mcp.json. Path rewriting handles Windows backslash, spaces, special characters, JSON-escaped paths.
29
+ - **Multi-Source Migration** — Scans `~/.claude/projects/`, `~/.legna/projects/` with correct path resolution from JSONL `cwd` field (no more `-` to `/` misparse for paths like `claude-code-main`).
30
+ - **Profile Pointer Switching** — Config profile switching uses `.active-profile` pointer file instead of physically renaming files. Original filenames preserved permanently.
31
+
32
+ ### Improvements
33
+
34
+ - **Migration Panel Redesign** — Two-tab layout: "项目迁移" (project-level with checkboxes, source badges, status tags) and "配置同步" (field-level with icons, collapsible JSON preview).
35
+ - **MCP Config Migration** — Global `~/.claude/.mcp.json` and project-level `.claude/.mcp.json` included in migration.
36
+ - **Co-Authored-By Attribution** — Changed from `noreply@anthropic.com` to `@LegnaOS` contributor identity.
37
+
7
38
  ## [1.8.5] - 2026-04-23
8
39
 
9
40
  ### Optimizations
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **An AI-powered terminal programming assistant, supercharged.**
6
6
 
7
- [![version](https://img.shields.io/badge/version-1.8.5-blue)](./CHANGELOG.md)
7
+ [![version](https://img.shields.io/badge/version-1.9.2-blue)](./CHANGELOG.md)
8
8
  [![platforms](https://img.shields.io/badge/platforms-macOS%20%7C%20Linux%20%7C%20Windows-brightgreen)](#platform-support)
9
9
  [![license](https://img.shields.io/badge/license-MIT-yellow)](./LICENSE)
10
10
  [![Claude Code](https://img.shields.io/badge/based%20on-Claude%20Code-blueviolet)](https://github.com/anthropics/claude-code)
@@ -34,10 +34,21 @@ LegnaCode is built on top of [Claude Code CLI](https://github.com/anthropics/cla
34
34
 
35
35
  | Version | Summary |
36
36
  |---------|---------|
37
+ | **1.9.2** | Computer Use Python bridge (macOS + Windows); auto Python 3.12+ venv setup; feature gate removal for Computer Use |
38
+ | **1.9.0** | Portable sessions (relative cwd); WebUI overhaul (project browser, memory editor, force-directed graph); full project migration (sessions + subagents + memory + skills + agents + rules + MCP config); profile switching via pointer file |
37
39
  | **1.8.5** | Token optimization: compress tool prompts (BashTool/AgentTool/TodoWrite/EnterPlanMode); fix cache_control for Kimi/MiniMax/MiMo adapters |
38
- | **1.8.4** | Fix `isVirtual in m` crash — null guards for session transcript processing |
39
- | **1.8.3** | GitHub Actions CI release workflow; OML agent type fix; cross-platform Rust native addon builds |
40
- | **1.8.2** | Null-guard fixes for message pipeline crashes; Rust native addons (sandbox/file-search/apply-patch) for darwin-arm64 |
40
+
41
+ <details>
42
+ <summary>1.8.x patches</summary>
43
+
44
+ | Version | Summary |
45
+ |---------|---------|
46
+ | 1.8.4 | Fix `isVirtual in m` crash — null guards for session transcript processing |
47
+ | 1.8.3 | GitHub Actions CI release workflow; OML agent type fix; cross-platform Rust native addon builds |
48
+ | 1.8.2 | Null-guard fixes for message pipeline crashes; Rust native addons (sandbox/file-search/apply-patch) for darwin-arm64 |
49
+
50
+ </details>
51
+
41
52
  | **1.8.0** | Codex full compat: plugin adapter + marketplace, skills discovery, config interop; TS/Python SDK; TTS + WebRTC voice |
42
53
 
43
54
  <details>
package/README.zh-CN.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **AI 驱动的终端编程助手,全面增强。**
6
6
 
7
- [![version](https://img.shields.io/badge/version-1.8.5-blue)](./CHANGELOG.zh-CN.md)
7
+ [![version](https://img.shields.io/badge/version-1.9.2-blue)](./CHANGELOG.zh-CN.md)
8
8
  [![platforms](https://img.shields.io/badge/platforms-macOS%20%7C%20Linux%20%7C%20Windows-brightgreen)](#平台支持)
9
9
  [![license](https://img.shields.io/badge/license-MIT-yellow)](./LICENSE)
10
10
  [![Claude Code](https://img.shields.io/badge/based%20on-Claude%20Code-blueviolet)](https://github.com/anthropics/claude-code)
@@ -34,10 +34,21 @@ LegnaCode 基于 [Claude Code CLI](https://github.com/anthropics/claude-code)
34
34
 
35
35
  | 版本 | 摘要 |
36
36
  |------|------|
37
+ | **1.9.2** | Computer Use Python 桥接(macOS + Windows);自动 Python 3.12+ venv 设置;Computer Use feature gate 全面解锁 |
38
+ | **1.9.0** | 可移植会话(相对路径 cwd);WebUI 全面改版(项目浏览器、记忆编辑器、力导向关系图谱);完整项目迁移(sessions + subagents + memory + skills + agents + rules + MCP 配置);配置切换改为指针文件 |
37
39
  | **1.8.5** | Token 优化:压缩工具提示词(BashTool/AgentTool/TodoWrite/EnterPlanMode);修复 Kimi/MiniMax/MiMo 适配器 cache_control 被误删 |
38
- | **1.8.4** | 修复 `isVirtual in m` 崩溃 — 会话转录处理空值守卫 |
39
- | **1.8.3** | GitHub Actions CI 自动发版工作流;OML agent 类型修复;全平台 Rust native addon 交叉编译 |
40
- | **1.8.2** | 消息管线空值守卫修复运行时崩溃;Rust 原生 Addon(sandbox/file-search/apply-patch)darwin-arm64 编译 |
40
+
41
+ <details>
42
+ <summary>1.8.x 补丁</summary>
43
+
44
+ | 版本 | 摘要 |
45
+ |------|------|
46
+ | 1.8.4 | 修复 `isVirtual in m` 崩溃 — 会话转录处理空值守卫 |
47
+ | 1.8.3 | GitHub Actions CI 自动发版工作流;OML agent 类型修复;全平台 Rust native addon 交叉编译 |
48
+ | 1.8.2 | 消息管线空值守卫修复运行时崩溃;Rust 原生 Addon(sandbox/file-search/apply-patch)darwin-arm64 编译 |
49
+
50
+ </details>
51
+
41
52
  | **1.8.0** | Codex 全面融合:插件适配器 + 市场、Skills 发现、配置互通;TS/Python SDK;TTS + WebRTC 语音 |
42
53
 
43
54
  <details>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legna-lnc/legnacode",
3
- "version": "1.8.5",
3
+ "version": "1.9.2",
4
4
  "description": "LegnaCode — legna.lnc's official CLI for coding assistance",
5
5
  "type": "module",
6
6
  "bin": {
@@ -142,13 +142,13 @@
142
142
  "bun": ">=1.2.0"
143
143
  },
144
144
  "optionalDependencies": {
145
- "@legna-lnc/legnacode-darwin-arm64": "1.8.5",
146
- "@legna-lnc/legnacode-darwin-x64": "1.8.5",
147
- "@legna-lnc/legnacode-darwin-x64-baseline": "1.8.5",
148
- "@legna-lnc/legnacode-linux-x64": "1.8.5",
149
- "@legna-lnc/legnacode-linux-x64-baseline": "1.8.5",
150
- "@legna-lnc/legnacode-linux-arm64": "1.8.5",
151
- "@legna-lnc/legnacode-win32-x64": "1.8.5",
152
- "@legna-lnc/legnacode-win32-ia32": "1.8.5"
145
+ "@legna-lnc/legnacode-darwin-arm64": "1.9.2",
146
+ "@legna-lnc/legnacode-darwin-x64": "1.9.2",
147
+ "@legna-lnc/legnacode-darwin-x64-baseline": "1.9.2",
148
+ "@legna-lnc/legnacode-linux-x64": "1.9.2",
149
+ "@legna-lnc/legnacode-linux-x64-baseline": "1.9.2",
150
+ "@legna-lnc/legnacode-linux-arm64": "1.9.2",
151
+ "@legna-lnc/legnacode-win32-x64": "1.9.2",
152
+ "@legna-lnc/legnacode-win32-ia32": "1.9.2"
153
153
  }
154
154
  }