@legna-lnc/legnacode 1.8.3 → 1.8.5

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,22 @@
4
4
 
5
5
  All notable changes to LegnaCode CLI will be documented in this file.
6
6
 
7
+ ## [1.8.5] - 2026-04-23
8
+
9
+ ### Optimizations
10
+
11
+ - **Tool Prompt Compression** — Compressed tool descriptions for BashTool (~21K→~12K chars), AgentTool (~16K→~13K chars), TodoWriteTool (~9.5K→~2K chars), and EnterPlanModeTool (~7.7K→~2K chars). Reduces first-request token cost by ~8,000-10,000 tokens.
12
+
13
+ ### Bug Fixes
14
+
15
+ - **Model Adapter cache_control Fix** — Added `normalizeToolsKeepCache()` variant in `src/utils/model/adapters/shared.ts` that preserves `cache_control` on tool definitions. Kimi, MiniMax, and MiMo adapters now use it, fixing tool-level prompt caching that was silently stripped by `normalizeTools()`. MiMo adapter also drops unnecessary `stripCacheControl()` since its API supports server-side auto caching.
16
+
17
+ ## [1.8.4] - 2026-04-22
18
+
19
+ ### Bug Fixes
20
+
21
+ - **Session Transcript Null Guard** — Added defensive null/type checks to `isLoggableMessage`, `collectReplIds`, and `transformMessagesForExternalTranscript` in `src/utils/sessionStorage.ts`. Prevents `m4 is not an Object (evaluating '"isVirtual" in m4')` crash when the messages array contains undefined/null elements during React effect processing in `useLogMessages`.
22
+
7
23
  ## [1.8.3] - 2026-04-22
8
24
 
9
25
  ### Features
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.3-blue)](./CHANGELOG.md)
7
+ [![version](https://img.shields.io/badge/version-1.8.5-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,34 +34,36 @@ LegnaCode is built on top of [Claude Code CLI](https://github.com/anthropics/cla
34
34
 
35
35
  | Version | Summary |
36
36
  |---------|---------|
37
+ | **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 |
37
39
  | **1.8.3** | GitHub Actions CI release workflow; OML agent type fix; cross-platform Rust native addon builds |
38
40
  | **1.8.2** | Null-guard fixes for message pipeline crashes; Rust native addons (sandbox/file-search/apply-patch) for darwin-arm64 |
39
41
  | **1.8.0** | Codex full compat: plugin adapter + marketplace, skills discovery, config interop; TS/Python SDK; TTS + WebRTC voice |
40
- | **1.6.1** | Rust NAPI addon (cosine/tfidf/hash/tokens); kernel sandbox (Seatbelt/seccomp); two-pass wake-up; keyword-density L1 |
41
- | **1.6.0** | Collaboration modes (`/mode`); JS REPL bridge; JSON-RPC app-server; agent config migration (`/migrate`) |
42
- | **1.5.9** | Guardian sub-agent; shell escalation protocol; network policy agent |
43
- | **1.5.8** | Process hardening; exec policy engine; secret detector; rollback implementation |
44
- | **1.5.7** | Git-style `/fork` command: fork from any message (`@N`), list branches, switch between forks |
45
- | **1.5.6** | WebUI SSE timeout fix (255s max); controller double-close crash fix |
46
- | **1.5.4** | Republish with all platform binaries in sync |
47
- | **1.5.3** | Hermes self-evolution loop; Qwen adapter; WebUI chat viewer & live chat; auto skill creation |
48
- | **1.5.2** | Perf audit: async CodeGraph, undoTracker size guard, compacting i18n, TTL caches |
49
- | **1.5.1** | Proactive skill invocation (OML 1% rule); auto-inject frontend/design guidelines; enhanced designer agent |
50
- | **1.5.0** | Fix REPL startup deadlock; remove /undo static import; all AtomCode features fully wired |
51
- | **1.4.9** | Baseline (no-AVX) builds for older x64 CPUs (darwin-x64-baseline, linux-x64-baseline) |
52
- | **1.4.8** | AtomCode fusion (Pangu CJK spacing, frustration detection, loop guard, error file injection, first-read full) |
53
- | **1.4.7** | claude-mem fusion (content-hash dedup, token economics, relevance feedback, 90-day decay, privacy tags) |
54
- | **1.4.6** | OML skill crash fix; plans + memory → project-local; compound engineering fusion |
55
- | **1.4.5** | OpenViking content tiering (L0/L1/L2 degradation + budget-capped injection) |
56
- | **1.4.4** | Status messages → spinner line; comparison doc |
57
- | **1.4.3** | Mempalace memory fusion (DrawerStore + TF-IDF + 4-layer stack + knowledge graph) |
58
- | **1.4.2** | Progress feedback (8 silent paths fixed); verbose default on |
59
42
 
60
43
  <details>
61
44
  <summary>Older versions</summary>
62
45
 
63
46
  | Version | Summary |
64
47
  |---------|---------|
48
+ | 1.6.1 | Rust NAPI addon (cosine/tfidf/hash/tokens); kernel sandbox (Seatbelt/seccomp); two-pass wake-up; keyword-density L1 |
49
+ | 1.6.0 | Collaboration modes (`/mode`); JS REPL bridge; JSON-RPC app-server; agent config migration (`/migrate`) |
50
+ | 1.5.9 | Guardian sub-agent; shell escalation protocol; network policy agent |
51
+ | 1.5.8 | Process hardening; exec policy engine; secret detector; rollback implementation |
52
+ | 1.5.7 | Git-style `/fork` command: fork from any message (`@N`), list branches, switch between forks |
53
+ | 1.5.6 | WebUI SSE timeout fix (255s max); controller double-close crash fix |
54
+ | 1.5.4 | Republish with all platform binaries in sync |
55
+ | 1.5.3 | Hermes self-evolution loop; Qwen adapter; WebUI chat viewer & live chat; auto skill creation |
56
+ | 1.5.2 | Perf audit: async CodeGraph, undoTracker size guard, compacting i18n, TTL caches |
57
+ | 1.5.1 | Proactive skill invocation (OML 1% rule); auto-inject frontend/design guidelines; enhanced designer agent |
58
+ | 1.5.0 | Fix REPL startup deadlock; remove /undo static import; all AtomCode features fully wired |
59
+ | 1.4.9 | Baseline (no-AVX) builds for older x64 CPUs (darwin-x64-baseline, linux-x64-baseline) |
60
+ | 1.4.8 | AtomCode fusion (Pangu CJK spacing, frustration detection, loop guard, error file injection, first-read full) |
61
+ | 1.4.7 | claude-mem fusion (content-hash dedup, token economics, relevance feedback, 90-day decay, privacy tags) |
62
+ | 1.4.6 | OML skill crash fix; plans + memory → project-local; compound engineering fusion |
63
+ | 1.4.5 | OpenViking content tiering (L0/L1/L2 degradation + budget-capped injection) |
64
+ | 1.4.4 | Status messages → spinner line; comparison doc |
65
+ | 1.4.3 | Mempalace memory fusion (DrawerStore + TF-IDF + 4-layer stack + knowledge graph) |
66
+ | 1.4.2 | Progress feedback (8 silent paths fixed); verbose default on |
65
67
  | 1.3.6 | Windows path separator fix for Edit tool |
66
68
  | 1.3.5 | SessionStart hook fix; Windows alt-screen rendering |
67
69
  | 1.3.4 | OML Superpowers (11 skills); SessionStart guidance |
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.3-blue)](./CHANGELOG.zh-CN.md)
7
+ [![version](https://img.shields.io/badge/version-1.8.5-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,30 +34,32 @@ LegnaCode 基于 [Claude Code CLI](https://github.com/anthropics/claude-code)
34
34
 
35
35
  | 版本 | 摘要 |
36
36
  |------|------|
37
+ | **1.8.5** | Token 优化:压缩工具提示词(BashTool/AgentTool/TodoWrite/EnterPlanMode);修复 Kimi/MiniMax/MiMo 适配器 cache_control 被误删 |
38
+ | **1.8.4** | 修复 `isVirtual in m` 崩溃 — 会话转录处理空值守卫 |
37
39
  | **1.8.3** | GitHub Actions CI 自动发版工作流;OML agent 类型修复;全平台 Rust native addon 交叉编译 |
38
40
  | **1.8.2** | 消息管线空值守卫修复运行时崩溃;Rust 原生 Addon(sandbox/file-search/apply-patch)darwin-arm64 编译 |
39
41
  | **1.8.0** | Codex 全面融合:插件适配器 + 市场、Skills 发现、配置互通;TS/Python SDK;TTS + WebRTC 语音 |
40
- | **1.5.7** | Git 风格 `/fork` 命令:从任意消息分叉(`@N`)、列出分支树、切换分支 |
41
- | **1.5.6** | WebUI SSE 超时修复(255s 最大值);controller 重复关闭崩溃修复 |
42
- | **1.5.4** | 全平台二进制同步重发 |
43
- | **1.5.3** | Hermes 自我进化闭环;Qwen 适配器;WebUI 聊天查看器与实时聊天;自动 Skill 创建 |
44
- | **1.5.2** | 性能审计:CodeGraph async 化 + undoTracker 大文件保护 + 状态文案 i18n |
45
- | **1.5.1** | Skill 主动调用(OML 1% 规则);前端/设计指令自动注入;增强 designer agent |
46
- | **1.5.0** | 修复 REPL 启动死锁;移除 /undo 静态导入;AtomCode 全部特性完整接线 |
47
- | **1.4.9** | Baseline(无 AVX)构建,支持老款 x64 CPU(darwin-x64-baseline、linux-x64-baseline) |
48
- | **1.4.8** | AtomCode 融合(Pangu CJK 间距、挫败检测、循环守卫、错误文件注入、首次全文读取) |
49
- | **1.4.7** | claude-mem 融合(content-hash 去重、token 经济学、使用反馈、90 天衰减、隐私标签) |
50
- | **1.4.6** | OML skill 崩溃修复;计划+记忆改为项目本地;compound engineering 融合 |
51
- | **1.4.5** | OpenViking 内容分级融合(L0/L1/L2 降级 + 预算封顶注入) |
52
- | **1.4.4** | 状态提示改为 spinner 行显示;新增功能对比文档 |
53
- | **1.4.3** | mempalace 记忆融合(DrawerStore + TF-IDF + 4 层栈 + 知识图谱) |
54
- | **1.4.2** | 进度反馈增强(8 个静默路径修复);verbose 默认开启 |
55
42
 
56
43
  <details>
57
44
  <summary>更早版本</summary>
58
45
 
59
46
  | 版本 | 摘要 |
60
47
  |------|------|
48
+ | 1.5.7 | Git 风格 `/fork` 命令:从任意消息分叉(`@N`)、列出分支树、切换分支 |
49
+ | 1.5.6 | WebUI SSE 超时修复(255s 最大值);controller 重复关闭崩溃修复 |
50
+ | 1.5.4 | 全平台二进制同步重发 |
51
+ | 1.5.3 | Hermes 自我进化闭环;Qwen 适配器;WebUI 聊天查看器与实时聊天;自动 Skill 创建 |
52
+ | 1.5.2 | 性能审计:CodeGraph async 化 + undoTracker 大文件保护 + 状态文案 i18n |
53
+ | 1.5.1 | Skill 主动调用(OML 1% 规则);前端/设计指令自动注入;增强 designer agent |
54
+ | 1.5.0 | 修复 REPL 启动死锁;移除 /undo 静态导入;AtomCode 全部特性完整接线 |
55
+ | 1.4.9 | Baseline(无 AVX)构建,支持老款 x64 CPU(darwin-x64-baseline、linux-x64-baseline) |
56
+ | 1.4.8 | AtomCode 融合(Pangu CJK 间距、挫败检测、循环守卫、错误文件注入、首次全文读取) |
57
+ | 1.4.7 | claude-mem 融合(content-hash 去重、token 经济学、使用反馈、90 天衰减、隐私标签) |
58
+ | 1.4.6 | OML skill 崩溃修复;计划+记忆改为项目本地;compound engineering 融合 |
59
+ | 1.4.5 | OpenViking 内容分级融合(L0/L1/L2 降级 + 预算封顶注入) |
60
+ | 1.4.4 | 状态提示改为 spinner 行显示;新增功能对比文档 |
61
+ | 1.4.3 | mempalace 记忆融合(DrawerStore + TF-IDF + 4 层栈 + 知识图谱) |
62
+ | 1.4.2 | 进度反馈增强(8 个静默路径修复);verbose 默认开启 |
61
63
  | 1.3.6 | Windows 路径分隔符修复 |
62
64
  | 1.3.5 | SessionStart hook 修复;Windows 渲染修复 |
63
65
  | 1.3.4 | OML Superpowers(11 个 skill);SessionStart 引导 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legna-lnc/legnacode",
3
- "version": "1.8.3",
3
+ "version": "1.8.5",
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.3",
146
- "@legna-lnc/legnacode-darwin-x64": "1.8.3",
147
- "@legna-lnc/legnacode-darwin-x64-baseline": "1.8.3",
148
- "@legna-lnc/legnacode-linux-x64": "1.8.3",
149
- "@legna-lnc/legnacode-linux-x64-baseline": "1.8.3",
150
- "@legna-lnc/legnacode-linux-arm64": "1.8.3",
151
- "@legna-lnc/legnacode-win32-x64": "1.8.3",
152
- "@legna-lnc/legnacode-win32-ia32": "1.8.3"
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"
153
153
  }
154
154
  }