@legna-lnc/legnacode 1.4.6 → 1.4.9
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 +70 -1
- package/README.md +18 -1
- package/README.zh-CN.md +18 -1
- package/package.json +9 -7
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,76 @@
|
|
|
4
4
|
|
|
5
5
|
All notable changes to LegnaCode CLI will be documented in this file.
|
|
6
6
|
|
|
7
|
-
## [1.4.
|
|
7
|
+
## [1.4.9] - 2026-04-17
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- **Baseline (no-AVX) builds** — New platform packages for older x64 CPUs without AVX instruction set support:
|
|
12
|
+
- `@legna-lnc/legnacode-darwin-x64-baseline` — macOS Intel (pre-2011 or Hackintosh without AVX)
|
|
13
|
+
- `@legna-lnc/legnacode-linux-x64-baseline` — Linux x64 servers/VMs without AVX
|
|
14
|
+
- Fixes `warn: CPU lacks AVX support, strange crashes may occur` error
|
|
15
|
+
- Install: `npm i -g @legna-lnc/legnacode-darwin-x64-baseline` (use directly, not via main package)
|
|
16
|
+
|
|
17
|
+
## [1.4.8] - 2026-04-17
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
- **AtomCode intelligence fusion (Layer A)** — Lightweight agent intelligence, zero new dependencies:
|
|
22
|
+
- **Pangu CJK spacing** — Auto-inserts spaces between CJK and ASCII in Markdown rendering
|
|
23
|
+
- **Negative feedback detection** — Detects frustration ("still broken"/"错了"/"まだ壊れ"), injects strategy-shift hint (EN/ZH/JA)
|
|
24
|
+
- **Tool call loop detection** — Same (tool, args) 3+ times → blocks. Resets per user message
|
|
25
|
+
- **Error file pre-injection** — Bash fail → extracts file paths from stderr, auto-reads first 30 lines
|
|
26
|
+
- **First-read full file** — First encounter ignores offset/limit, forces full read
|
|
27
|
+
|
|
28
|
+
- **OpenAI-compatible bridge adapter (Layer B1)** — Full Anthropic ↔ OpenAI format translation:
|
|
29
|
+
- Message format: `tool_use` ↔ `tool_calls`, `tool_result` ↔ `role: "tool"`
|
|
30
|
+
- Tool schema: `input_schema` ↔ `function.parameters`
|
|
31
|
+
- JSON repair for weak models (markdown fences, trailing commas, unbalanced brackets)
|
|
32
|
+
- Supports: OpenAI, DeepSeek, Qwen, GLM, SiliconFlow, Ollama, vLLM, LM Studio
|
|
33
|
+
- Activate: `OPENAI_COMPAT_BASE_URL` + `OPENAI_COMPAT_API_KEY` env vars
|
|
34
|
+
|
|
35
|
+
- **Code Graph (Layer B2)** — Regex-based symbol index + file dependency graph:
|
|
36
|
+
- Languages: TypeScript/TSX, JavaScript, Python, Go, Rust
|
|
37
|
+
- Incremental mtime updates, persisted to `<cwd>/.legna/.palace/graph.json`
|
|
38
|
+
- **Wired:** auto-builds on session start, injects file summaries into prefetch context
|
|
39
|
+
|
|
40
|
+
- **Parallel File Edit (Layer B3)** — "One sub-agent per file" execution model:
|
|
41
|
+
- Target file full text + sibling skeletons + interface contracts
|
|
42
|
+
- **Wired:** integrated into `/dispatch` skill prompt with parallel edit instructions
|
|
43
|
+
|
|
44
|
+
- **Workflow Engine (Layer B4)** — Structured step execution:
|
|
45
|
+
- Markdown `## Step N:` format with checks, failure handling, dependencies
|
|
46
|
+
- **Wired:** WorkflowTool now parses steps, shows status, substitutes args
|
|
47
|
+
|
|
48
|
+
- **/undo command** — Reverts the last file edit (Edit or Write tool):
|
|
49
|
+
- Tracks original content before each edit, max 20 entries per session
|
|
50
|
+
- New file creation → undo deletes the file
|
|
51
|
+
|
|
52
|
+
- **Cross-session knowledge persistence** — Auto-writes `<cwd>/.legna/knowledge.md`:
|
|
53
|
+
- Extracts key decisions/actions from last 10 assistant messages on session end
|
|
54
|
+
- Appends timestamped entries, caps at 50KB
|
|
55
|
+
|
|
56
|
+
- **Enhanced compiler error detection** — Extended error file pre-injection:
|
|
57
|
+
- Now matches compiler-style paths (`file.ts:42`, `file.py(10)`) in addition to standard paths
|
|
58
|
+
|
|
59
|
+
## [1.4.7] - 2026-04-16
|
|
60
|
+
|
|
61
|
+
### Features
|
|
62
|
+
|
|
63
|
+
- **claude-mem memory intelligence fusion** — Ported 5 lightweight techniques from claude-mem's persistent memory system into DrawerStore, zero new dependencies:
|
|
64
|
+
- **Content-hash deduplication** — `sha256(wing + room + content)` with 30-second window prevents duplicate observations during rapid compaction cycles
|
|
65
|
+
- **Token economics tracking** — Each drawer records `discoveryTokens` (cost to create) and `readTokens` (accumulated recall cost) for memory ROI analysis
|
|
66
|
+
- **Relevance feedback** — `relevanceCount` incremented on each search hit; frequently recalled memories get up to +100% importance boost via `importance * (1 + 0.1 * min(count, 10))`
|
|
67
|
+
- **90-day time decay** — `max(0.3, 1.0 - age_days / 90)` applied to both search similarity and importance ranking. Old memories fade but never fully disappear
|
|
68
|
+
- **Privacy tag filtering** — `<private>...</private>` content stripped to `[REDACTED]` before memory extraction. Zero config, just wrap sensitive text in tags
|
|
69
|
+
|
|
70
|
+
### Architecture
|
|
71
|
+
|
|
72
|
+
- Modified `src/memdir/vectorStore/types.ts` — Drawer gains `discoveryTokens`, `readTokens`, `relevanceCount`, `contentHash` fields
|
|
73
|
+
- Modified `src/memdir/vectorStore/drawerStore.ts` — Schema migration (4 new columns), content-hash dedup in upsert, relevance feedback in search, time decay in search + topByImportance
|
|
74
|
+
- Modified `src/memdir/vectorStore/exchangeExtractor.ts` — `stripPrivate()` applied before pair extraction
|
|
75
|
+
|
|
76
|
+
## [1.4.6] - 2026-04-16
|
|
8
77
|
|
|
9
78
|
### Bug Fixes
|
|
10
79
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**An AI-powered terminal programming assistant, supercharged.**
|
|
6
6
|
|
|
7
|
-
[](./CHANGELOG.md)
|
|
8
8
|
[](#platform-support)
|
|
9
9
|
[](./LICENSE)
|
|
10
10
|
[](https://github.com/anthropics/claude-code)
|
|
@@ -33,6 +33,9 @@ LegnaCode is built on top of [Claude Code CLI](https://github.com/anthropics/cla
|
|
|
33
33
|
|
|
34
34
|
| Version | Summary |
|
|
35
35
|
|---------|---------|
|
|
36
|
+
| **1.4.9** | Baseline (no-AVX) builds for older x64 CPUs (darwin-x64-baseline, linux-x64-baseline) |
|
|
37
|
+
| **1.4.8** | AtomCode fusion (Pangu CJK spacing, frustration detection, loop guard, error file injection, first-read full) |
|
|
38
|
+
| **1.4.7** | claude-mem fusion (content-hash dedup, token economics, relevance feedback, 90-day decay, privacy tags) |
|
|
36
39
|
| **1.4.6** | OML skill crash fix; plans + memory → project-local; compound engineering fusion |
|
|
37
40
|
| **1.4.5** | OpenViking content tiering (L0/L1/L2 degradation + budget-capped injection) |
|
|
38
41
|
| **1.4.4** | Status messages → spinner line; comparison doc |
|
|
@@ -153,6 +156,20 @@ npm install -g @legna-lnc/legnacode --registry=https://registry.npmjs.org
|
|
|
153
156
|
|
|
154
157
|
Once installed, the `legna` command is available in any directory. It automatically downloads the precompiled binary for your platform (supports macOS arm64/x64, Linux x64/arm64, Windows x64).
|
|
155
158
|
|
|
159
|
+
### Older CPUs without AVX
|
|
160
|
+
|
|
161
|
+
If you see `warn: CPU lacks AVX support, strange crashes may occur`, install the baseline build instead:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# macOS Intel (pre-2011 or Hackintosh without AVX)
|
|
165
|
+
npm i -g @legna-lnc/legnacode-darwin-x64-baseline
|
|
166
|
+
|
|
167
|
+
# Linux x64 (older servers/VMs without AVX)
|
|
168
|
+
npm i -g @legna-lnc/legnacode-linux-x64-baseline
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
The baseline binary is in `node_modules/@legna-lnc/legnacode-<platform>-baseline/bin/legna`. Add it to your PATH or create an alias.
|
|
172
|
+
|
|
156
173
|
```bash
|
|
157
174
|
# Verify installation
|
|
158
175
|
legna --version
|
package/README.zh-CN.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**AI 驱动的终端编程助手,全面增强。**
|
|
6
6
|
|
|
7
|
-
[](./CHANGELOG.zh-CN.md)
|
|
8
8
|
[](#平台支持)
|
|
9
9
|
[](./LICENSE)
|
|
10
10
|
[](https://github.com/anthropics/claude-code)
|
|
@@ -33,6 +33,9 @@ LegnaCode 基于 [Claude Code CLI](https://github.com/anthropics/claude-code)
|
|
|
33
33
|
|
|
34
34
|
| 版本 | 摘要 |
|
|
35
35
|
|------|------|
|
|
36
|
+
| **1.4.9** | Baseline(无 AVX)构建,支持老款 x64 CPU(darwin-x64-baseline、linux-x64-baseline) |
|
|
37
|
+
| **1.4.8** | AtomCode 融合(Pangu CJK 间距、挫败检测、循环守卫、错误文件注入、首次全文读取) |
|
|
38
|
+
| **1.4.7** | claude-mem 融合(content-hash 去重、token 经济学、使用反馈、90 天衰减、隐私标签) |
|
|
36
39
|
| **1.4.6** | OML skill 崩溃修复;计划+记忆改为项目本地;compound engineering 融合 |
|
|
37
40
|
| **1.4.5** | OpenViking 内容分级融合(L0/L1/L2 降级 + 预算封顶注入) |
|
|
38
41
|
| **1.4.4** | 状态提示改为 spinner 行显示;新增功能对比文档 |
|
|
@@ -153,6 +156,20 @@ npm install -g @legna-lnc/legnacode --registry=https://registry.npmjs.org
|
|
|
153
156
|
|
|
154
157
|
安装后即可在任意目录使用 `legna` 命令。会自动下载当前平台的预编译二进制(支持 macOS arm64/x64、Linux x64/arm64、Windows x64)。
|
|
155
158
|
|
|
159
|
+
### 老款 CPU(无 AVX 指令集)
|
|
160
|
+
|
|
161
|
+
如果看到 `warn: CPU lacks AVX support, strange crashes may occur`,请安装 baseline 版本:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# macOS Intel(2011 年前或无 AVX 的黑苹果)
|
|
165
|
+
npm i -g @legna-lnc/legnacode-darwin-x64-baseline
|
|
166
|
+
|
|
167
|
+
# Linux x64(无 AVX 的老服务器/虚拟机)
|
|
168
|
+
npm i -g @legna-lnc/legnacode-linux-x64-baseline
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
baseline 二进制位于 `node_modules/@legna-lnc/legnacode-<platform>-baseline/bin/legna`,添加到 PATH 或创建别名即可使用。
|
|
172
|
+
|
|
156
173
|
```bash
|
|
157
174
|
# 验证安装
|
|
158
175
|
legna --version
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legna-lnc/legnacode",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.9",
|
|
4
4
|
"description": "LegnaCode — legna.lnc's official CLI for coding assistance",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -142,11 +142,13 @@
|
|
|
142
142
|
"bun": ">=1.2.0"
|
|
143
143
|
},
|
|
144
144
|
"optionalDependencies": {
|
|
145
|
-
"@legna-lnc/legnacode-darwin-arm64": "1.4.
|
|
146
|
-
"@legna-lnc/legnacode-darwin-x64": "1.4.
|
|
147
|
-
"@legna-lnc/legnacode-
|
|
148
|
-
"@legna-lnc/legnacode-linux-
|
|
149
|
-
"@legna-lnc/legnacode-
|
|
150
|
-
"@legna-lnc/legnacode-
|
|
145
|
+
"@legna-lnc/legnacode-darwin-arm64": "1.4.9",
|
|
146
|
+
"@legna-lnc/legnacode-darwin-x64": "1.4.9",
|
|
147
|
+
"@legna-lnc/legnacode-darwin-x64-baseline": "1.4.9",
|
|
148
|
+
"@legna-lnc/legnacode-linux-x64": "1.4.9",
|
|
149
|
+
"@legna-lnc/legnacode-linux-x64-baseline": "1.4.9",
|
|
150
|
+
"@legna-lnc/legnacode-linux-arm64": "1.4.9",
|
|
151
|
+
"@legna-lnc/legnacode-win32-x64": "1.4.9",
|
|
152
|
+
"@legna-lnc/legnacode-win32-ia32": "1.4.9"
|
|
151
153
|
}
|
|
152
154
|
}
|