@legna-lnc/legnacode 1.4.4 → 1.4.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.
Files changed (4) hide show
  1. package/CHANGELOG.md +327 -313
  2. package/README.md +218 -171
  3. package/README.zh-CN.md +341 -0
  4. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,551 +1,565 @@
1
1
  # Changelog
2
2
 
3
+ 🌐 [中文文档](./CHANGELOG.zh-CN.md)
4
+
3
5
  All notable changes to LegnaCode CLI will be documented in this file.
4
6
 
7
+ ## [1.4.5] - 2026-04-13
8
+
9
+ ### Features
10
+
11
+ - **OpenViking content tiering fusion** — Ported L0/L1/L2 three-tier content grading from OpenViking's context database:
12
+ - **Content Tiering** — Each drawer auto-generates L0 (one-sentence summary, ~25 words) and L1 (core overview, ~200 words) at upsert time. L2 is the full verbatim content.
13
+ - **Budget-aware wake-up** — `wakeUp()` now accepts a token budget (default 800) and greedily fills it with L1 content, degrading to L0 when budget is tight.
14
+ - **Budget-capped recall** — New `recallWithBudget()` method: L2→L1→L0 degradation strategy ensures recall never exceeds character budget.
15
+ - **CJK-aware token estimation** — `estimateTokens()` handles mixed CJK/Latin text.
16
+ - **SQLite schema migration** — Existing DrawerStore databases auto-migrate with `ALTER TABLE ADD COLUMN`.
17
+ - **Fixed recallByTopic()** — Now passes actual query for vector ranking instead of empty string.
18
+
5
19
  ## [1.4.4] - 2026-04-11
6
20
 
7
21
  ### Improvements
8
22
 
9
- - **状态提示改为 spinner 行显示** — autocompact / output truncated / interrupted 等状态信息不再以系统消息插入对话,改为在 spinner 动画行临时显示,一闪而过不污染上下文
10
- - **ToolUseContext 新增 setSpinnerMessage** — 通用的 spinner 文本回调,query loop 可随时更新 spinner 状态
11
- - **LegnaCode vs Claude Code 对比文档**新增 [COMPARISON.md](./COMPARISON.md),9 大类 60+ 项逐条对比
23
+ - **Status messages moved to spinner line** — autocompact / output truncated / interrupted status messages no longer insert system messages into the conversation; they now display temporarily on the spinner animation line, flashing briefly without polluting context
24
+ - **ToolUseContext adds setSpinnerMessage** — generic spinner text callback allowing the query loop to update spinner status at any time
25
+ - **LegnaCode vs Claude Code comparison doc** added [COMPARISON.md](./COMPARISON.md) with 60+ item-by-item comparison across 9 categories
12
26
 
13
27
  ## [1.4.3] - 2026-04-11
14
28
 
15
29
  ### Features
16
30
 
17
- - **mempalace 记忆架构融合**移植 mempalace 的核心记忆系统,纯 TypeScript 实现,零外部依赖:
18
- - **DrawerStore** — SQLite 持久化向量记忆存储 + WAL 审计日志,确定性 drawer IDsha256 幂等 upsert
19
- - **TF-IDF 向量化器** TS 实现(Porter 词干 + 余弦相似度),<10K drawer 搜索 <5ms
20
- - **4 层记忆栈** — L0 identity (~100 token) + L1 top drawers (~500-800 token) 每轮加载,L2/L3 按需召回。每轮 token ~8K 降到 ~800(节省 ~88%)
21
- - **时序知识图谱** — SQLite 实体-关系存储,支持带有效期的三元组和时间点查询
22
- - **Room 自动分类** — 6 类(facts/decisions/events/discoveries/preferences/advice)关键词评分
23
- - **交换对提取器** — Q+A 配对分块 + 5 类标记评分(decisions/preferences/milestones/problems/emotional
24
- - **自动迁移**首次启动自动将现有 .legna/memory/*.md 文件迁移到 DrawerStore
25
- - **PreCompact 记忆保存**压缩前自动提取高价值交换对到 DrawerStore,防止记忆丢失
31
+ - **mempalace memory architecture integration** ported mempalace core memory system, pure TypeScript implementation, zero external dependencies:
32
+ - **DrawerStore** — SQLite-persisted vector memory storage + WAL audit log, deterministic drawer ID (sha256 idempotent upsert)
33
+ - **TF-IDF vectorizer**pure TS implementation (Porter stemming + cosine similarity), <10K drawer search <5ms
34
+ - **4-layer memory stack** — L0 identity (~100 tokens) + L1 top drawers (~500-800 tokens) loaded every turn, L2/L3 recalled on demand. Per-turn tokens reduced from ~8K to ~800 (~88% savings)
35
+ - **Temporal knowledge graph** — SQLite entity-relation storage, supports triples with validity periods and point-in-time queries
36
+ - **Room auto-classification** — 6 categories (facts/decisions/events/discoveries/preferences/advice) with keyword scoring
37
+ - **Exchange pair extractor** — Q+A paired chunking + 5-category tag scoring (decisions/preferences/milestones/problems/emotional)
38
+ - **Auto-migration**automatically migrates existing .legna/memory/*.md files to DrawerStore on first startup
39
+ - **PreCompact memory save** automatically extracts high-value exchange pairs to DrawerStore before compaction, preventing memory loss
26
40
 
27
41
  ### Architecture
28
42
 
29
- - 新增 `src/memdir/vectorStore/` — 完整的向量记忆系统(8 个文件)
30
- - `types.ts` — DrawerSearchResultMetadataFilter 类型
31
- - `tfidfVectorizer.ts` — TF-IDF + Porter 词干 + 余弦相似度
32
- - `drawerStore.ts` — SQLite 持久化 + WAL + 向量搜索
33
- - `roomDetector.ts` — 内容自动分类
34
- - `layeredStack.ts` — 4 层记忆栈
35
- - `knowledgeGraph.ts` — 时序知识图谱
36
- - `exchangeExtractor.ts` — 交换对提取 + 标记评分
37
- - `migration.ts` — .md → DrawerStore 自动迁移
38
- - 升级 `src/memdir/providers/FileMemoryProvider.ts` — DrawerStore + LayeredStack 后端
39
- - 接线 `src/services/compact/autoCompact.ts` — 压缩前调用 onPreCompress
43
+ - Added `src/memdir/vectorStore/` — complete vector memory system (8 files)
44
+ - `types.ts` — Drawer, SearchResult, MetadataFilter types
45
+ - `tfidfVectorizer.ts` — TF-IDF + Porter stemming + cosine similarity
46
+ - `drawerStore.ts` — SQLite persistence + WAL + vector search
47
+ - `roomDetector.ts` — content auto-classification
48
+ - `layeredStack.ts` — 4-layer memory stack
49
+ - `knowledgeGraph.ts` — temporal knowledge graph
50
+ - `exchangeExtractor.ts` — exchange pair extraction + tag scoring
51
+ - `migration.ts` — .md → DrawerStore auto-migration
52
+ - Upgraded `src/memdir/providers/FileMemoryProvider.ts` — DrawerStore + LayeredStack backend
53
+ - Wired `src/services/compact/autoCompact.ts` — calls onPreCompress before compaction
40
54
 
41
55
  ## [1.4.2] - 2026-04-11
42
56
 
43
57
  ### Features
44
58
 
45
- - **verbose 默认开启**用户默认看到完整的工具执行过程和进度信息
46
- - **Token/Timer 即时显示**去掉 30 秒延迟,token 计数和耗时从第 1 秒就显示
47
- - **Autocompact 状态可见**压缩对话时显示 "Compacting conversation context..." 系统消息
48
- - **中断原因可见** — abort 时显示中断原因(streaming tool_execution 两个阶段)
49
- - **Output truncated 重试提示** — max output tokens recovery 时显示重试进度
50
- - **工具执行日志** — StreamingToolExecutor 输出当前工具名和队列深度
51
- - **Microcompact/Snip 日志**压缩操作添加 debug 日志
52
- - **ForkedAgent 启动日志** agent 启动时输出标签和 ID
59
+ - **verbose enabled by default** users now see full tool execution progress and status information by default
60
+ - **Token/Timer instant display** removed 30-second delay, token count and elapsed time shown from second 1
61
+ - **Autocompact status visible** displays "Compacting conversation context..." system message during conversation compaction
62
+ - **Interrupt reason visible** shows abort reason on interruption (streaming and tool_execution phases)
63
+ - **Output truncated retry prompt** displays retry progress during max output tokens recovery
64
+ - **Tool execution logging** — StreamingToolExecutor outputs current tool name and queue depth
65
+ - **Microcompact/Snip logging**added debug logging for compaction operations
66
+ - **ForkedAgent startup logging** outputs label and ID when child agent starts
53
67
 
54
68
  ### Bug Fixes
55
69
 
56
- - **Apple Terminal 通知逻辑修复** — bell 未禁用时才发 bell(之前逻辑反了)
70
+ - **Apple Terminal notification logic fix** — bell is now sent only when bell is not disabled (logic was previously inverted)
57
71
 
58
72
  ## [1.4.0] - 2026-04-11
59
73
 
60
74
  ### Features
61
75
 
62
- - **MiniMax 深度原生兼容**当使用 MiniMax 模型且 `MINIMAX_API_KEY` 配置时,自动注册 6 个多模态原生工具:
63
- - `MiniMaxImageGenerate` — 图像生成(POST /v1/image_generation
64
- - `MiniMaxVideoGenerate` — 视频生成 + 异步轮询(POST /v1/video_generation
65
- - `MiniMaxSpeechSynthesize` — 文字转语音(POST /v1/t2a_v2
66
- - `MiniMaxMusicGenerate` — 音乐生成(POST /v1/music_generation
67
- - `MiniMaxVisionDescribe` — 图像理解 VLMPOST /v1/coding_plan/vlm
68
- - `MiniMaxWebSearch` — 网页搜索(POST /v1/web_search
69
- - **MiniMax 认证命令** — `/auth-minimax` 命令配置 API key,持久化到 `~/.legna/minimax-credentials.json`
70
- - **MiniMax 工具 Schema 导出** — `schemaExport.ts` 支持导出 Anthropic 兼容格式的工具 schema
71
- - **MiniMax 多模态 Skill 包** — 5 个内置 skill(image/video/speech/music/pipeline),指导 AI 编排多模态工作流
72
- - **智能模型路由**基于 prompt 复杂度启发式路由到 fast/default/strong 模型层
73
- - **自主技能检测**检测重复工具调用模式,提示用户保存为可复用技能
74
- - **上下文压缩增强**:
75
- - 工具输出预剪枝大型 tool_result compact 前自动裁剪(head + tail 保留)
76
- - 预算压力注入 — context 使用超 80% 时在工具结果中注入提示,引导模型收尾
77
- - **RPC 子进程工具执行** — Unix Domain Socket RPC 服务端 + stub 生成器 + 代码执行运行器,AI 生成的脚本可通过 RPC 回调 LegnaCode 工具(Bash/Read/Write/Edit/Glob/Grep/WebFetch),多步操作压缩为一次推理
78
- - **Memory Provider 插件系统**抽象基类 + 注册表 + 默认 FileMemoryProvider,支持一个外部 provider 与内置 memory 并行运行,完整生命周期(initialize/prefetch/syncTurn/shutdown)+ 可选 hooksonTurnStart/onSessionEnd/onPreCompress/onDelegation
79
- - **跨会话记忆搜索** — `/recall` 命令搜索历史会话 JSONL 文件,关键词匹配 + 相关性排序
80
- - **Worker 线程池**大文件操作 / 批量搜索可 offload worker 线程,避免主线程阻塞
76
+ - **MiniMax deep native integration** when using MiniMax models with `MINIMAX_API_KEY` configured, automatically registers 6 native multimodal tools:
77
+ - `MiniMaxImageGenerate` — image generation (POST /v1/image_generation)
78
+ - `MiniMaxVideoGenerate` — video generation + async polling (POST /v1/video_generation)
79
+ - `MiniMaxSpeechSynthesize` — text-to-speech (POST /v1/t2a_v2)
80
+ - `MiniMaxMusicGenerate` — music generation (POST /v1/music_generation)
81
+ - `MiniMaxVisionDescribe` — image understanding VLM (POST /v1/coding_plan/vlm)
82
+ - `MiniMaxWebSearch` — web search (POST /v1/web_search)
83
+ - **MiniMax auth command** — `/auth-minimax` command to configure API key, persisted to `~/.legna/minimax-credentials.json`
84
+ - **MiniMax tool schema export** — `schemaExport.ts` supports exporting Anthropic-compatible tool schemas
85
+ - **MiniMax multimodal skill pack** — 5 built-in skills (image/video/speech/music/pipeline) guiding AI to orchestrate multimodal workflows
86
+ - **Smart model routing** heuristic routing to fast/default/strong model tiers based on prompt complexity
87
+ - **Autonomous skill detection** detects repetitive tool call patterns and prompts users to save as reusable skills
88
+ - **Context compression enhancements**:
89
+ - Tool output pre-pruning large tool_result blocks auto-trimmed before compact (head + tail preserved)
90
+ - Budget pressure injection injects hints into tool results when context usage exceeds 80%, guiding the model to wrap up
91
+ - **RPC subprocess tool execution** — Unix Domain Socket RPC server + stub generator + code execution runner; AI-generated scripts can call back LegnaCode tools (Bash/Read/Write/Edit/Glob/Grep/WebFetch) via RPC, compressing multi-step operations into a single inference
92
+ - **Memory Provider plugin system** abstract base class + registry + default FileMemoryProvider; supports one external provider running in parallel with built-in memory, full lifecycle (initialize/prefetch/syncTurn/shutdown) + optional hooks (onTurnStart/onSessionEnd/onPreCompress/onDelegation)
93
+ - **Cross-session memory search** — `/recall` command searches historical session JSONL files with keyword matching + relevance ranking
94
+ - **Worker thread pool** large file operations / batch searches can be offloaded to worker threads, avoiding main thread blocking
81
95
 
82
96
  ### Architecture
83
97
 
84
- - 新增 `src/tools/MiniMaxTools/` — 完整的 MiniMax 多模态工具目录(clientendpoints6 buildTool 工具、条件注册、schema 导出)
85
- - 新增 `src/services/rpc/` — RPC 子进程工具执行(rpcServer.tsstubGenerator.tscodeExecutionRunner.ts
86
- - 新增 `src/memdir/providers/` — Memory Provider 插件系统(MemoryProvider.ts 抽象基类、FileMemoryProvider.ts 默认实现、registry.ts 注册表)
87
- - 新增 `src/services/modelRouter.ts` — 任务复杂度估算 + 模型层路由
88
- - 新增 `src/services/skillAutoCreate.ts` — 工具调用模式检测器,接入 toolExecution.ts
89
- - 新增 `src/services/compact/toolOutputPruner.ts` — 工具输出预剪枝,接入 autoCompact.ts
90
- - 新增 `src/services/compact/budgetPressure.ts` — 上下文预算压力注入,接入 query.ts
91
- - 新增 `src/services/sessionSearch.ts` — 跨会话搜索引擎
92
- - 新增 `src/commands/recall/` — `/recall` 命令
93
- - 新增 `src/commands/auth/` — `/auth-minimax` 命令
94
- - 新增 `src/skills/builtin-minimax/` — 5 MiniMax 多模态 skill 文件
95
- - 新增 `src/utils/workerPool.ts` — Worker 线程池
98
+ - Added `src/tools/MiniMaxTools/` — complete MiniMax multimodal tool directory (client, endpoints, 6 buildTool tools, conditional registration, schema export)
99
+ - Added `src/services/rpc/` — RPC subprocess tool execution (rpcServer.ts, stubGenerator.ts, codeExecutionRunner.ts)
100
+ - Added `src/memdir/providers/` — Memory Provider plugin system (MemoryProvider.ts abstract base class, FileMemoryProvider.ts default implementation, registry.ts registry)
101
+ - Added `src/services/modelRouter.ts` — task complexity estimation + model tier routing
102
+ - Added `src/services/skillAutoCreate.ts` — tool call pattern detector, integrated into toolExecution.ts
103
+ - Added `src/services/compact/toolOutputPruner.ts` — tool output pre-pruning, integrated into autoCompact.ts
104
+ - Added `src/services/compact/budgetPressure.ts` — context budget pressure injection, integrated into query.ts
105
+ - Added `src/services/sessionSearch.ts` — cross-session search engine
106
+ - Added `src/commands/recall/` — `/recall` command
107
+ - Added `src/commands/auth/` — `/auth-minimax` command
108
+ - Added `src/skills/builtin-minimax/` — 5 MiniMax multimodal skill files
109
+ - Added `src/utils/workerPool.ts` — worker thread pool
96
110
 
97
111
  ## [1.3.7] - 2026-04-09
98
112
 
99
113
  ### Bug Fixes
100
114
 
101
- - **Resume 会话检测** — `legna resume` 无法发现 v1.3.0+ 写入 `<project>/.legna/sessions/` 的会话。`getStatOnlyLogsForWorktrees()` 只扫描全局 `~/.legna/projects/`,现在同时扫描项目本地 sessions 目录,与 `fetchLogs()` 行为一致
102
- - **Interrupted 诊断日志** — `onCancel()` `query.ts` 中断点新增 abort reason + 调用栈日志,`--verbose` 模式下可追踪中断来源
115
+ - **Resume session detection** — `legna resume` failed to discover sessions written to `<project>/.legna/sessions/` since v1.3.0. `getStatOnlyLogsForWorktrees()` only scanned the global `~/.legna/projects/`; it now also scans the project-local sessions directory, consistent with `fetchLogs()` behavior
116
+ - **Interrupted diagnostics logging** added abort reason + call stack logging at `onCancel()` and `query.ts` interrupt points; traceable under `--verbose` mode
103
117
 
104
118
  ### Enhancements
105
119
 
106
- - **Priority-now 中断可见性**排队命令中断当前任务时记录命令摘要到 debug 日志,不再静默 abort
107
- - **后台任务状态可见性** — footer pill 单个后台 agent 显示实时活动摘要(最近工具 + token 统计),任务完成通知包含 progress 统计
120
+ - **Priority-now interrupt visibility** when a queued command interrupts the current task, the command summary is logged to debug log instead of silently aborting
121
+ - **Background task status visibility** — footer pill shows real-time activity summary for a single background agent (latest tool + token stats); task completion notification includes progress statistics
108
122
 
109
123
  ### Architecture
110
124
 
111
- - `src/utils/sessionStorage.ts` — `getStatOnlyLogsForWorktrees()` Path A/B 均加入 `.legna/sessions/` 扫描
112
- - `src/query.ts` — 两个 `createUserInterruptionMessage` 调用点加 abort reason 日志
113
- - `src/screens/REPL.tsx` — `onCancel()` 调用栈日志,priority-now useEffect 记录命令摘要
114
- - `src/tasks/pillLabel.ts` — agent 任务显示 `getActivitySummary()` 实时活动
115
- - `src/tasks/LocalMainSessionTask.ts` — `completeMainSessionTask` 捕获 progress,通知包含统计
125
+ - `src/utils/sessionStorage.ts` — `getStatOnlyLogsForWorktrees()` Path A/B both include `.legna/sessions/` scanning
126
+ - `src/query.ts` — abort reason logging added at both `createUserInterruptionMessage` call sites
127
+ - `src/screens/REPL.tsx` — `onCancel()` call stack logging, priority-now useEffect logs command summary
128
+ - `src/tasks/pillLabel.ts` — single agent task displays `getActivitySummary()` real-time activity
129
+ - `src/tasks/LocalMainSessionTask.ts` — `completeMainSessionTask` captures progress, notification includes statistics
116
130
 
117
131
  ## [1.3.6] - 2026-04-09
118
132
 
119
133
  ### Bug Fixes
120
134
 
121
- - **Windows Edit 工具路径分隔符误报**修复 [#7935](https://github.com/anthropics/claude-code/issues/7935):在 Windows 上使用正斜杠(`D:/path`)读取文件后,Edit/MultiEdit 工具报 "File has been unexpectedly modified" 错误。根因是 `path.normalize()` 在某些运行时(Bun 编译二进制 + Git Bash/MINGW 环境)不一定将 `/` 转换为 `\`,导致 FileStateCache 缓存键不匹配
122
- - `FileStateCache` 新增 `normalizeKey()` — `path.normalize()` 之后显式将 `/` 替换为原生分隔符(Windows 上为 `\`),确保 `D:/foo` `D:\foo` 始终命中同一缓存条目
123
- - `expandPath()` 新增 `ensureNativeSeparators()` — 所有返回路径在 Windows 上强制使用反斜杠,防御性修复
135
+ - **Windows Edit tool path separator false positive** fixed [#7935](https://github.com/anthropics/claude-code/issues/7935): on Windows, after reading a file with forward slashes (`D:/path`), Edit/MultiEdit tools reported "File has been unexpectedly modified" error. Root cause: `path.normalize()` does not always convert `/` to `\` in certain runtimes (Bun compiled binary + Git Bash/MINGW environment), causing FileStateCache key mismatch
136
+ - `FileStateCache` added `normalizeKey()` — explicitly replaces `/` with the native separator (Windows: `\`) after `path.normalize()`, ensuring `D:/foo` and `D:\foo` always hit the same cache entry
137
+ - `expandPath()` added `ensureNativeSeparators()` — all returned paths force backslashes on Windows as a defensive fix
124
138
 
125
139
  ### Architecture
126
140
 
127
- - `src/utils/fileStateCache.ts` — `normalizeKey()` 替代裸 `normalize()`,导入 `sep`
128
- - `src/utils/path.ts` — `ensureNativeSeparators()` 包裹所有 `normalize()`/`resolve()`/`join()` 返回值
141
+ - `src/utils/fileStateCache.ts` — `normalizeKey()` replaces bare `normalize()`, imports `sep`
142
+ - `src/utils/path.ts` — `ensureNativeSeparators()` wraps all `normalize()`/`resolve()`/`join()` return values
129
143
 
130
144
  ## [1.3.5] - 2026-04-07
131
145
 
132
146
  ### Bug Fixes
133
147
 
134
- - **SessionStart hook error** — OML SessionStart hook 使用了 `type: 'prompt'`,但 SessionStart 阶段没有 `toolUseContext`(LLM 调用上下文),导致必崩。移除 SessionStart hookskill guidance 通过 skill description 暴露
135
- - **Windows alt-screen 渲染闪烁** — alt-screen 模式下 `fullResetSequence_CAUSES_FLICKER` 仍会触发(viewport 变化、scrollback 检测等),导致整屏清除+重绘闪烁。新增 `altScreenFullRedraw()` 方法,alt-screen 下用简单的 `CSI 2J + CSI H`(erase screen + cursor home)替代 `clearTerminal` Windows legacy 路径
136
- - **Windows drainStdin** — 之前在 Windows 上完全跳过 stdin 排空,鼠标事件残留导致输入框错乱。改为通过 toggle raw mode 刷新缓冲的输入事件
148
+ - **SessionStart hook error** — OML's SessionStart hook used `type: 'prompt'`, but the SessionStart phase has no `toolUseContext` (LLM call context), causing a guaranteed crash. Removed SessionStart hook; skill guidance is now exposed through skill descriptions
149
+ - **Windows alt-screen rendering flicker** in alt-screen mode, `fullResetSequence_CAUSES_FLICKER` was still triggered (viewport changes, scrollback detection, etc.), causing full-screen clear + redraw flicker. Added `altScreenFullRedraw()` method; in alt-screen mode, uses simple `CSI 2J + CSI H` (erase screen + cursor home) instead of `clearTerminal`'s Windows legacy path
150
+ - **Windows drainStdin** — previously skipped stdin draining entirely on Windows; residual mouse events caused input field corruption. Changed to flush buffered input events by toggling raw mode
137
151
 
138
152
  ### Architecture
139
153
 
140
- - `src/ink/log-update.ts` — 5 `fullResetSequence_CAUSES_FLICKER` 调用点加 `altScreen` 检查,新增 `altScreenFullRedraw()` 方法
141
- - `src/ink/ink.tsx` — Windows `drainStdin` 替代方案(toggle raw mode
142
- - `src/plugins/bundled/oml/definition.ts` — 移除 SessionStart hookOML 升级到 1.2.0
154
+ - `src/ink/log-update.ts` — 5 `fullResetSequence_CAUSES_FLICKER` call sites now check `altScreen`, added `altScreenFullRedraw()` method
155
+ - `src/ink/ink.tsx` — Windows `drainStdin` alternative (toggle raw mode)
156
+ - `src/plugins/bundled/oml/definition.ts` — removed SessionStart hook, OML upgraded to 1.2.0
143
157
 
144
158
  ## [1.3.4] - 2026-04-07
145
159
 
146
160
  ### New Features
147
161
 
148
- - **OML Superpowers 工程纪律**集成 obra/superpowers 核心技能,强制 AI 遵循严格的软件工程流程
149
- - `/verify` — 完成前验证纪律:没有新鲜证据不能声称完成
150
- - `/tdd` — TDD 强制执行:RED-GREEN-REFACTOR,先写测试再写代码
151
- - `/debug` — 4 阶段系统化调试,3 次失败质疑架构
152
- - `/brainstorm` — 苏格拉底式设计:硬门控,设计未批准前禁止实现
153
- - `/write-plan` — 将设计拆成 2-5 分钟的小任务,零占位符
154
- - `/sdd` — 子代理驱动开发:实现→spec 审查→质量审查三阶段
155
- - `/exec-plan` — 加载计划文件逐任务执行
156
- - `/dispatch` — 并行子代理派发
157
- - `/code-review` — 派发 reviewer 子代理
158
- - `/worktree` — Git worktree 隔离开发
159
- - `/finish-branch` — 分支收尾(合并/PR/保留/丢弃)
160
- - **SessionStart 技能引导**会话启动时自动注入 OML 技能引导 prompt"1% 规则"
161
- - OML plugin 版本升级到 1.1.0,总计 35 个内置 skill
162
+ - **OML Superpowers engineering discipline** integrated obra/superpowers core skills, enforcing strict software engineering workflows for AI
163
+ - `/verify` — completion verification discipline: cannot claim completion without fresh evidence
164
+ - `/tdd` — TDD enforcement: RED-GREEN-REFACTOR, write tests before code
165
+ - `/debug` — 4-stage systematic debugging, question architecture after 3 failures
166
+ - `/brainstorm` — Socratic design: hard gate, no implementation allowed until design is approved
167
+ - `/write-plan` — break design into 2-5 minute tasks, zero placeholders
168
+ - `/sdd` — sub-agent driven development: implement → spec review → quality review, 3 stages
169
+ - `/exec-plan` — load plan file and execute tasks sequentially
170
+ - `/dispatch` — parallel sub-agent dispatch
171
+ - `/code-review` — dispatch reviewer sub-agent
172
+ - `/worktree` — Git worktree isolated development
173
+ - `/finish-branch` — branch wrap-up (merge/PR/keep/discard)
174
+ - **SessionStart skill guidance** automatically injects OML skill guidance prompt at session start ("1% rule")
175
+ - OML plugin version upgraded to 1.1.0, 35 built-in skills total
162
176
 
163
177
  ### Architecture
164
178
 
165
- - `src/plugins/bundled/oml/superpowers.ts` — 11 个工程纪律 skill + SessionStart guidance
166
- - `src/plugins/bundled/oml/definition.ts` — 追加 superpowers skills + SessionStart hook
179
+ - `src/plugins/bundled/oml/superpowers.ts` — 11 engineering discipline skills + SessionStart guidance
180
+ - `src/plugins/bundled/oml/definition.ts` — appended superpowers skills + SessionStart hook
167
181
 
168
182
  ## [1.3.3] - 2026-04-07
169
183
 
170
184
  ### New Features
171
185
 
172
- - **OML (Oh-My-LegnaCode) 智能编排层**内置 oh-my-claudecode 核心功能,开箱即用
173
- - 5 个编排 skill:`/ultrawork`(并行执行)、`/ralph`(持久循环)、`/autopilot`(全自主)、`/ralplan`(先规划再执行)、`/plan-oml`(结构化规划)
174
- - 19 个专业化 agent skill:`/oml:explore`、`/oml:planner`、`/oml:architect`、`/oml:executor`、`/oml:verifier`
175
- - Magic Keywords 自动检测:prompt 中包含 ultrawork/ralph/autopilot/ultrathink 等关键词时自动注入编排指令(支持中日韩越多语言)
176
- - 通过 `/plugin` UI 可启用/禁用(`oml@builtin`,默认启用)
177
- - `OML_BUILTIN` feature flag 控制编译时 DCE
186
+ - **OML (Oh-My-LegnaCode) smart orchestration layer** built-in oh-my-claudecode core functionality, works out of the box
187
+ - 5 orchestration skills: `/ultrawork` (parallel execution), `/ralph` (persistent loop), `/autopilot` (fully autonomous), `/ralplan` (plan then execute), `/plan-oml` (structured planning)
188
+ - 19 specialized agent skills: `/oml:explore`, `/oml:planner`, `/oml:architect`, `/oml:executor`, `/oml:verifier`, etc.
189
+ - Magic Keywords auto-detection: when prompt contains keywords like ultrawork/ralph/autopilot/ultrathink, orchestration directives are auto-injected (supports CJK and Vietnamese)
190
+ - Can be enabled/disabled via `/plugin` UI (`oml@builtin`, enabled by default)
191
+ - `OML_BUILTIN` feature flag controls compile-time DCE
178
192
 
179
193
  ### Bug Fixes
180
194
 
181
- - **Windows Terminal Fullscreen** — `WT_SESSION` 环境下自动启用 alt-screen 模式,彻底消除 cursor-up viewport yank bugmicrosoft/terminal#14774)。覆盖 WSL-in-Windows-Terminal。`CLAUDE_CODE_NO_FLICKER=0` opt-out
195
+ - **Windows Terminal Fullscreen** — automatically enables alt-screen mode in `WT_SESSION` environment, completely eliminating the cursor-up viewport yank bug (microsoft/terminal#14774). Covers WSL-in-Windows-Terminal. `CLAUDE_CODE_NO_FLICKER=0` to opt-out
182
196
 
183
197
  ### Architecture
184
198
 
185
- - `src/plugins/bundled/oml/` — OML plugin 模块(definitionskillsagentsmagicKeywords
186
- - `src/plugins/bundled/index.ts` — 注册 OML builtin plugin
187
- - `src/utils/processUserInput/processUserInput.ts` — magic keyword 检测集成点
188
- - `src/utils/fullscreen.ts` — Windows Terminal fullscreen 条件
199
+ - `src/plugins/bundled/oml/` — OML plugin module (definition, skills, agents, magicKeywords)
200
+ - `src/plugins/bundled/index.ts` — registered OML builtin plugin
201
+ - `src/utils/processUserInput/processUserInput.ts` — magic keyword detection integration point
202
+ - `src/utils/fullscreen.ts` — Windows Terminal fullscreen condition
189
203
 
190
204
  ## [1.3.2] - 2026-04-07
191
205
 
192
206
  ### Breaking Changes
193
207
 
194
- - **禁用 HISTORY_SNIP** — `bunfig.toml` feature flag 设为 false,编译时 DCE 移除所有 snip 相关代码(SnipToolsnipCompactsnipProjectionforce-snip 命令、attachments nudge)。auto-compact 不受影响,上下文管理回归原有机制
208
+ - **Disabled HISTORY_SNIP** — `bunfig.toml` feature flag set to false, compile-time DCE removes all snip-related code (SnipTool, snipCompact, snipProjection, force-snip command, attachments nudge). Auto-compact is unaffected; context management reverts to the original mechanism
195
209
 
196
210
  ### Bug Fixes
197
211
 
198
- - **Windows Terminal 流式文本**不再对所有 Windows 禁用流式文本显示,改为仅在 legacy conhost 下禁用;Windows Terminal(检测 `WT_SESSION` 环境变量)恢复正常流式渲染
212
+ - **Windows Terminal streaming text** no longer disables streaming text display for all Windows; now only disabled under legacy conhost. Windows Terminal (detected via `WT_SESSION` environment variable) restores normal streaming rendering
199
213
 
200
214
  ## [1.3.1] - 2026-04-06
201
215
 
202
216
  ### Bug Fixes
203
217
 
204
- - **Snip 感知 context window** — 1M 模型不再被过早 snip,`KEEP_RECENT` 从硬编码 10 改为动态计算(1M: 200, 500K: 100, 200K: 10
205
- - **Snip nudge 频率** — 1M 模型 nudge 阈值从 20 条提升到 100
206
- - **branch 命令品牌名** — `/branch` 后的 resume 提示从 `claude -r` 改为 `legna -r`
207
- - **admin 版本号 fallback** — 从源码运行时显示正确版本号
218
+ - **Snip-aware context window** — 1M models are no longer prematurely snipped; `KEEP_RECENT` changed from hardcoded 10 to dynamic calculation (1M: 200, 500K: 100, 200K: 10)
219
+ - **Snip nudge frequency** — 1M model nudge threshold raised from 20 to 100 messages
220
+ - **branch command branding** — `/branch` resume prompt changed from `claude -r` to `legna -r`
221
+ - **admin version fallback** — displays correct version number when running from source
208
222
 
209
223
  ### Architecture
210
224
 
211
- - `src/services/compact/snipCompact.ts` — 新增 `getSnipThresholds(model)` 动态阈值函数,`snipCompactIfNeeded` `shouldNudgeForSnips` 增加 model 参数
212
- - `src/query.ts` / `src/QueryEngine.ts` / `src/commands/force-snip-impl.ts` — 传入 model 参数
225
+ - `src/services/compact/snipCompact.ts` — added `getSnipThresholds(model)` dynamic threshold function; `snipCompactIfNeeded` and `shouldNudgeForSnips` gained model parameter
226
+ - `src/query.ts` / `src/QueryEngine.ts` / `src/commands/force-snip-impl.ts` — pass model parameter
213
227
 
214
228
  ## [1.3.0] - 2026-04-04
215
229
 
216
230
  ### New Features
217
231
 
218
- - **项目本地化存储**会话、skillsmemoryrulessettings 全部下沉到 `<project>/.legna/` 目录
219
- - 新会话写入 `<project>/.legna/sessions/<uuid>.jsonl`,跟着项目走
220
- - 项目级 skills/rules/settings/agent-memory/workflows 统一到 `.legna/`
221
- - `.legna/` 自动加入 `.gitignore`
222
- - **全局数据迁移**首次启动自动从 `~/.claude/` 单向迁移到 `~/.legna/`
223
- - 迁移 settings.jsoncredentialsrulesskillsagentspluginskeybindings
224
- - 不覆盖已有文件,迁移完成写入 `.migration-done` 标记
225
- - `LEGNA_NO_CONFIG_SYNC=1` 可禁止
226
- - **`legna migrate` 命令**手动迁移数据
227
- - `--global` 仅迁移全局数据
228
- - `--sessions` 仅迁移当前项目会话到本地
229
- - `--all` 全部迁移(默认)
230
- - `--dry-run` 预览模式
231
- - **三级 fallback 读取**读取时自动搜索 `.legna/` → `.claude/` → `~/.legna/` → `~/.claude/`,零破坏向后兼容
232
+ - **Project-local storage** sessions, skills, memory, rules, and settings all moved down to `<project>/.legna/` directory
233
+ - New sessions written to `<project>/.legna/sessions/<uuid>.jsonl`, traveling with the project
234
+ - Project-level skills/rules/settings/agent-memory/workflows unified under `.legna/`
235
+ - `.legna/` automatically added to `.gitignore`
236
+ - **Global data migration** automatically migrates from `~/.claude/` to `~/.legna/` on first startup (one-way)
237
+ - Migrates settings.json, credentials, rules, skills, agents, plugins, keybindings, etc.
238
+ - Does not overwrite existing files; writes `.migration-done` marker on completion
239
+ - `LEGNA_NO_CONFIG_SYNC=1` to disable
240
+ - **`legna migrate` command**manual data migration
241
+ - `--global` migrates global data only
242
+ - `--sessions` migrates current project sessions to local only
243
+ - `--all` migrates everything (default)
244
+ - `--dry-run` preview mode
245
+ - **Three-level fallback reads**automatically searches `.legna/` → `.claude/` → `~/.legna/` → `~/.claude/` when reading, zero-breakage backward compatibility
232
246
 
233
247
  ### Architecture
234
248
 
235
- - `src/utils/legnaPathResolver.ts` — 统一路径解析(PROJECT_FOLDER/LEGACY_FOLDER/resolveProjectPath
236
- - `src/utils/ensureLegnaGitignored.ts` — 自动 gitignore 工具
237
- - `src/utils/envUtils.ts` — 重构全局迁移逻辑,删除旧的 syncClaudeConfigToLegna
238
- - `src/utils/sessionStoragePortable.ts` — 新增 getLocalSessionsDir/getLegacyProjectsDir,重构 resolveSessionFilePath
239
- - `src/utils/sessionStorage.ts` — 会话写入路径切换到项目本地
240
- - `src/utils/listSessionsImpl.ts` — 多源扫描合并(本地 + 全局 + legacy
241
- - `src/commands/migrate/` — CLI 迁移命令
249
+ - `src/utils/legnaPathResolver.ts` — unified path resolution (PROJECT_FOLDER/LEGACY_FOLDER/resolveProjectPath)
250
+ - `src/utils/ensureLegnaGitignored.ts` — auto-gitignore utility
251
+ - `src/utils/envUtils.ts` — refactored global migration logic, removed old syncClaudeConfigToLegna
252
+ - `src/utils/sessionStoragePortable.ts` — added getLocalSessionsDir/getLegacyProjectsDir, refactored resolveSessionFilePath
253
+ - `src/utils/sessionStorage.ts` — session write path switched to project-local
254
+ - `src/utils/listSessionsImpl.ts` — multi-source scan and merge (local + global + legacy)
255
+ - `src/commands/migrate/` — CLI migration command
242
256
 
243
257
  ## [1.2.1] - 2026-04-04
244
258
 
245
259
  ### New Features
246
260
 
247
- - **模型适配器层 (Model Adapter Layer)** — 统一的第三方模型兼容框架,自动检测模型/端点并应用对应变换
248
- - **MiMo (Xiaomi) 适配器** — api.xiaomimimo.com/anthropic,支持 mimo-v2-pro/omni/flash (1M ctx)
261
+ - **Model Adapter Layer** — unified third-party model compatibility framework, auto-detects model/endpoint and applies corresponding transforms
262
+ - **MiMo (Xiaomi) adapter** — api.xiaomimimo.com/anthropic, supports mimo-v2-pro/omni/flash (1M ctx)
249
263
  - simplifyThinking + forceAutoToolChoice + normalizeTools + stripBetas + injectTopP(0.95) + stripCacheControl
250
- - 处理 content_filter / repetition_truncation stop_reason
251
- - **GLM (ZhipuAI) 适配器** — open.bigmodel.cn/api/anthropic,支持 glm-5.1/5/5-turbo/4.7/4.6/4.5
252
- - 标准变换全套,服务端自动缓存(strip cache_control
253
- - **DeepSeek 适配器** — api.deepseek.com/anthropic,支持 deepseek-chat/coder/reasoner
254
- - stripReasoningContent 避免 400 错误,reasoner 模型自动 strip temperature/top_p
255
- - **Kimi (Moonshot) 适配器** — api.moonshot.ai/anthropic,支持 kimi-k2/k2.5/k2-turbo
256
- - 保留 cache_controlKimi 支持 prompt caching 折扣),stripReasoningContent
257
- - **MiniMax 适配器** — api.minimaxi.com/anthropic (中国区) + api.minimax.io/anthropic (国际区)
258
- - 支持 MiniMax-M2.7/M2.5/M2.1/M2 全系列 (204K ctx),大小写不敏感匹配
259
- - 深度兼容:保留 metadatatool_choicecache_controltop_p(其他适配器均需 strip/force
260
- - 仅需 simplifyThinking + normalizeTools + stripBetas + stripUnsupportedFieldsKeepMetadata
264
+ - Handles content_filter / repetition_truncation stop_reason
265
+ - **GLM (ZhipuAI) adapter** — open.bigmodel.cn/api/anthropic, supports glm-5.1/5/5-turbo/4.7/4.6/4.5, etc.
266
+ - Full standard transform suite, server-side auto-caching (strip cache_control)
267
+ - **DeepSeek adapter** — api.deepseek.com/anthropic, supports deepseek-chat/coder/reasoner
268
+ - stripReasoningContent to avoid 400 errors, reasoner models auto-strip temperature/top_p
269
+ - **Kimi (Moonshot) adapter** — api.moonshot.ai/anthropic, supports kimi-k2/k2.5/k2-turbo, etc.
270
+ - Preserves cache_control (Kimi supports prompt caching discount), stripReasoningContent
271
+ - **MiniMax adapter** — api.minimaxi.com/anthropic (China) + api.minimax.io/anthropic (international)
272
+ - Supports MiniMax-M2.7/M2.5/M2.1/M2 full series (204K ctx), case-insensitive matching
273
+ - Deep compatibility: preserves metadata, tool_choice, cache_control, top_p (other adapters need strip/force)
274
+ - Only needs simplifyThinking + normalizeTools + stripBetas + stripUnsupportedFieldsKeepMetadata
261
275
 
262
276
  ### Architecture
263
277
 
264
- - `src/utils/model/adapters/index.ts` — 适配器注册表 + match/transform 调度
265
- - `src/utils/model/adapters/shared.ts` — 12 个共享变换函数(含新增 stripUnsupportedFieldsKeepMetadata
266
- - `src/utils/model/adapters/{mimo,glm,deepseek,kimi,minimax}.ts` — 5 个提供商适配器
267
- - `src/services/api/claude.ts` — paramsFromContext() 末尾调用 applyModelAdapter()
278
+ - `src/utils/model/adapters/index.ts` — adapter registry + match/transform dispatch
279
+ - `src/utils/model/adapters/shared.ts` — 12 shared transform functions (including new stripUnsupportedFieldsKeepMetadata)
280
+ - `src/utils/model/adapters/{mimo,glm,deepseek,kimi,minimax}.ts` — 5 provider adapters
281
+ - `src/services/api/claude.ts` — paramsFromContext() calls applyModelAdapter() at the end
268
282
 
269
283
  ## [1.2.0] - 2026-04-03
270
284
 
271
285
  ### New Features
272
286
 
273
- - **会话按项目分组** — WebUI 会话记录面板按项目路径分组显示
274
- - **resume 命令带 cd** — 复制的 resume 命令自动包含 `cd` 到项目目录(Windows `cd /d`)
275
- - **迁移支持会话记录**配置迁移面板新增"同时迁移会话记录"选项,复制 `projects/` 目录
276
- - **Windows 原生编译** — Windows 二进制改为在 Windows 上原生编译
287
+ - **Sessions grouped by project** — WebUI session history panel groups sessions by project path
288
+ - **resume command with cd** — copied resume command auto-includes `cd` to project directory (Windows uses `cd /d`)
289
+ - **Migration supports session history** config migration panel adds "also migrate session history" option, copies `projects/` directory
290
+ - **Windows native compilation** — Windows binary now compiled natively on Windows
277
291
 
278
292
  ### Fixed
279
293
 
280
- - 迁移面板字段名修正为实际 settings.json 字段
294
+ - Migration panel field names corrected to match actual settings.json fields
281
295
 
282
296
  ## [1.1.10] - 2026-04-03
283
297
 
284
298
  ### Fixed
285
299
 
286
- - **Windows 编译脚本修复** — `scripts/compile.ts` Windows 上正确处理 `.exe` 后缀,修复编译后找不到输出文件的问题
287
- - **Windows 原生二进制重新编译发布** 使用 Windows 本机 Bun 编译原生 `legna.exe`,替代之前交叉编译的版本
300
+ - **Windows compile script fix** — `scripts/compile.ts` correctly handles `.exe` suffix on Windows, fixing the issue where compiled output file could not be found
301
+ - **Windows native binary recompiled and published** recompiled native `legna.exe` using Windows-native Bun, replacing the previous cross-compiled version
288
302
 
289
303
  ## [1.1.9] - 2026-04-03
290
304
 
291
305
  ### Fixed
292
306
 
293
- - **postinstall 自动安装平台包**新增 `npm/postinstall.cjs`,`npm install` 阶段自动检测并从官方 registry 安装对应平台二进制包,彻底解决 Windows/镜像源下 optionalDependencies 不生效的问题
294
- - **强制官方 registry** — postinstall 使用 `--registry https://registry.npmjs.org` 避免淘宝镜像等未同步导致 404
295
- - **bin wrapper 精简**移除运行时 auto-install 逻辑,改由 postinstall 保证
307
+ - **postinstall auto-installs platform package** added `npm/postinstall.cjs`; during `npm install`, automatically detects and installs the corresponding platform binary package from the official registry, completely solving the issue where optionalDependencies fails on Windows/mirror registries
308
+ - **Force official registry** — postinstall uses `--registry https://registry.npmjs.org` to avoid 404 errors from unsynchronized mirrors (e.g., Taobao)
309
+ - **bin wrapper simplified**removed runtime auto-install logic, now guaranteed by postinstall
296
310
 
297
311
  ## [1.1.8] - 2026-04-03
298
312
 
299
313
  ### Fixed
300
314
 
301
- - **Windows npm 全局安装平台包缺失** — bin wrapper 检测到平台包未安装时自动执行 `npm install -g` 安装对应平台包,不再需要用户手动操作
302
- - **bin wrapper 路径查找优化**修正全局 node_modules 扁平布局下 scope 目录的路径拼接
315
+ - **Windows npm global install missing platform package** — bin wrapper now auto-executes `npm install -g` for the corresponding platform package when it detects the package is not installed, no longer requiring manual user action
316
+ - **bin wrapper path lookup optimization** fixed scope directory path joining under global node_modules flat layout
303
317
 
304
318
  ## [1.1.7] - 2026-04-03
305
319
 
306
320
  ### Fixed
307
321
 
308
- - **彻底修复 Windows external module 报错**清空编译 external 列表,所有 stubs 模块(`@ant/*`、`@anthropic-ai/*`、native napi)全部打包进二进制,不再依赖运行时外部模块
322
+ - **Completely fixed Windows external module error**cleared the compile external list; all stub modules (`@ant/*`, `@anthropic-ai/*`, native napi) are now bundled into the binary, no longer depending on runtime external modules
309
323
 
310
324
  ## [1.1.6] - 2026-04-03
311
325
 
312
326
  ### Fixed
313
327
 
314
- - **Windows external module 报错**从编译 external 列表移除 `@anthropic-ai/sandbox-runtime`、`@anthropic-ai/mcpb`、`@anthropic-ai/claude-agent-sdk`、`audio-capture-napi`、`color-diff-napi`、`modifiers-napi`,让 stubs 代码直接打包进二进制,Windows 不再报 `Cannot find module`
315
- - **bin wrapper 多路径查找** — `npm/bin/legna.cjs` 增加全局 node_modules 扁平路径和嵌套路径 fallback,提升跨平台 npm 全局安装兼容性
316
- - **版本号自动化**新增 `scripts/bump.ts` 一键同步 package.jsonbunfig.tomlwebui/package.jsonoptionalDependencies 版本号
317
- - **发版流程自动化**重写 `scripts/publish.ts`,一键完成 bump → build webui → compile all → publish npm
328
+ - **Windows external module error**removed `@anthropic-ai/sandbox-runtime`, `@anthropic-ai/mcpb`, `@anthropic-ai/claude-agent-sdk`, `audio-capture-napi`, `color-diff-napi`, `modifiers-napi` from the compile external list, letting stub code bundle directly into the binary; Windows no longer reports `Cannot find module`
329
+ - **bin wrapper multi-path lookup** — `npm/bin/legna.cjs` added global node_modules flat path and nested path fallback, improving cross-platform npm global install compatibility
330
+ - **Version number automation** added `scripts/bump.ts` for one-click sync of version numbers across package.json, bunfig.toml, webui/package.json, and optionalDependencies
331
+ - **Release process automation** rewrote `scripts/publish.ts` for one-click bump → build webui → compile all → publish npm
318
332
 
319
333
  ## [1.1.5] - 2026-04-03
320
334
 
321
335
  ### New Features
322
336
 
323
- - **WebUI 管理面板** — `legna admin` 启动浏览器管理面板(HTTP server + React SPA,默认端口 3456),可视化管理 `~/.claude/` `~/.legna/` 两个配置目录
324
- - **配置编辑**在浏览器中编辑 API 端点、API Key、模型映射(Opus/Sonnet/Haiku)、超时、权限模式、语言等所有 settings.json 字段
325
- - **配置文件切换**列出 settings*.json,显示 baseUrl/model,一键交换激活
326
- - **会话记录浏览**解析 projects 目录下所有 session jsonl 文件,显示项目路径、slug、时间、prompt 数量,复制 resume 命令
327
- - **配置迁移** — Claude ↔ LegnaCode 双向迁移,支持全量或选择性字段迁移(env/model/permissions 等),迁移前预览 diff
328
- - **npm 全平台发布** — bin wrapper (.cjs)compile-all 跨平台编译(darwin/linux/win32)、publish 脚本
329
- - **OAuth 禁用** — `isAnthropicAuthEnabled()` 返回 false,移除 OAuth 登录流程
337
+ - **WebUI admin panel** — `legna admin` launches a browser-based admin panel (HTTP server + React SPA, default port 3456), visual management of both `~/.claude/` and `~/.legna/` config directories
338
+ - **Config editing** edit API endpoint, API key, model mapping (Opus/Sonnet/Haiku), timeout, permission mode, language, and all other settings.json fields in the browser
339
+ - **Config file switching** lists settings*.json files, shows baseUrl/model, one-click swap to activate
340
+ - **Session history browsing** parses all session JSONL files under the projects directory, displays project path, slug, time, prompt count, and copy resume command
341
+ - **Config migration** — Claude ↔ LegnaCode bidirectional migration, supports full or selective field migration (env/model/permissions, etc.), preview diff before migration
342
+ - **npm cross-platform publishing** — bin wrapper (.cjs), compile-all cross-platform compilation (darwin/linux/win32), publish script
343
+ - **OAuth disabled** — `isAnthropicAuthEnabled()` returns false, removed OAuth login flow
330
344
 
331
345
  ### Fixed (1.1.1 ~ 1.1.5)
332
346
 
333
- - bin wrapper 改为 `.cjs` 修复 ESM `require` 报错
334
- - `optionalDependencies` 平台包版本对齐
335
- - 退出 admin server 时清屏恢复终端
336
- - WebUI 前端内联到二进制,不再依赖外部 `webui/dist/`
337
- - 所有包版本统一为 1.1.5
347
+ - bin wrapper changed to `.cjs` to fix ESM `require` error
348
+ - `optionalDependencies` platform package versions aligned
349
+ - Terminal restored on admin server exit with screen clear
350
+ - WebUI frontend inlined into binary, no longer depends on external `webui/dist/`
351
+ - All package versions unified to 1.1.5
338
352
 
339
353
  ### Architecture
340
354
 
341
- - 后端:`src/server/admin.ts` — Bun.serve REST APISPA 内联为字符串常量
342
- - 前端:`webui/` — React 18 + Vite + Tailwind SPA,Tab 切换 scope
343
- - 内联:`scripts/inline-webui.ts` → `src/server/admin-ui-html.ts`
344
- - CLI:`src/entrypoints/cli.tsx` — `admin` fast-path,零额外模块加载
355
+ - Backend: `src/server/admin.ts` — Bun.serve REST API, SPA inlined as string constant
356
+ - Frontend: `webui/` — React 18 + Vite + Tailwind SPA, tab-based scope switching
357
+ - Inlining: `scripts/inline-webui.ts` → `src/server/admin-ui-html.ts`
358
+ - CLI: `src/entrypoints/cli.tsx` — `admin` fast-path, zero extra module loading
345
359
 
346
360
  ## [1.0.9] - 2026-04-03
347
361
 
348
362
  ### New Features
349
363
 
350
- - **i18n 多语言补全**补全 9 个文件约 100 处遗漏的硬编码英文字符串,覆盖 Spinner、队友树、pill 标签、快捷键提示、Tips 等全部 UI 区域
351
- - **内置精美状态栏**无需配置外部脚本,默认显示目录、Git 分支/同步状态、模型名(智能解析为友好名)、彩色上下文进度条、时间;跨平台兼容 Win/Mac/Linux
352
- - **配置自动迁移**启动时自动将 `~/.claude/settings.json` 同步到 `~/.legna/settings.json`;两边不一致时打印警告不覆盖;`LEGNA_NO_CONFIG_SYNC=1` 禁止迁移
364
+ - **i18n multilingual completion** completed ~100 missing hardcoded English strings across 9 files, covering Spinner, teammate tree, pill labels, keyboard shortcut hints, Tips, and all other UI areas
365
+ - **Built-in styled status bar** no external script configuration needed; displays directory, Git branch/sync status, model name (smart parsing to friendly name), colored context progress bar, and time by default; cross-platform compatible with Win/Mac/Linux
366
+ - **Config auto-migration** automatically syncs `~/.claude/settings.json` to `~/.legna/settings.json` on startup; prints warning without overwriting when both sides differ; `LEGNA_NO_CONFIG_SYNC=1` to disable
353
367
 
354
368
  ### Changed
355
369
 
356
- - `~/.legna/` 为首选配置目录,`~/.claude/` 作为兼容回退
357
- - 状态栏模型名自动解析:`Claude-Opus-4-6-Agentic[1m]` → `Opus 4.6`
358
- - `KeyboardShortcutHint` 组件中 "to" 连接词已国际化(中文显示为 "→"
370
+ - `~/.legna/` is now the preferred config directory, `~/.claude/` serves as compatibility fallback
371
+ - Status bar model name auto-parsing: `Claude-Opus-4-6-Agentic[1m]` → `Opus 4.6`
372
+ - `KeyboardShortcutHint` component "to" connector word internationalized (Chinese displays "→")
359
373
 
360
374
  ### Files Changed
361
375
 
362
- | 文件 | 改动 |
363
- |------|------|
364
- | `src/utils/i18n/zh.ts` | +50 条翻译条目 |
365
- | `src/components/Spinner.tsx` | 7 i18n |
366
- | `src/components/PromptInput/PromptInputFooterLeftSide.tsx` | 4 i18n |
367
- | `src/components/design-system/KeyboardShortcutHint.tsx` | "to" 国际化 |
376
+ | File | Changes |
377
+ |------|---------|
378
+ | `src/utils/i18n/zh.ts` | +50 translation entries |
379
+ | `src/components/Spinner.tsx` | 7 i18n points |
380
+ | `src/components/PromptInput/PromptInputFooterLeftSide.tsx` | 4 i18n points |
381
+ | `src/components/design-system/KeyboardShortcutHint.tsx` | "to" internationalized |
368
382
  | `src/components/Spinner/teammateSelectHint.ts` | i18n |
369
- | `src/components/Spinner/TeammateSpinnerTree.tsx` | 6 i18n |
370
- | `src/components/Spinner/TeammateSpinnerLine.tsx` | 7 i18n |
371
- | `src/tasks/pillLabel.ts` | 全部 pill 标签 i18n |
372
- | `src/services/tips/tipRegistry.ts` | 25 tips i18n |
373
- | `src/utils/builtinStatusLine.ts` | 新增:内置状态栏渲染器 |
374
- | `src/components/StatusLine.tsx` | 集成内置状态栏 |
375
- | `src/utils/envUtils.ts` | 配置自动迁移逻辑 |
383
+ | `src/components/Spinner/TeammateSpinnerTree.tsx` | 6 i18n points |
384
+ | `src/components/Spinner/TeammateSpinnerLine.tsx` | 7 i18n points |
385
+ | `src/tasks/pillLabel.ts` | all pill labels i18n |
386
+ | `src/services/tips/tipRegistry.ts` | 25 tips i18n |
387
+ | `src/utils/builtinStatusLine.ts` | added: built-in status bar renderer |
388
+ | `src/components/StatusLine.tsx` | integrated built-in status bar |
389
+ | `src/utils/envUtils.ts` | config auto-migration logic |
376
390
 
377
391
  ## [1.0.8] - 2026-04-02
378
392
 
379
393
  ### New Features
380
394
 
381
- - **MONITOR_TOOL** — MCP 服务器健康监控工具,支持 start/stop/status 操作,后台定期 ping 检测连接状态
382
- - **WORKFLOW_SCRIPTS** — 工作流自动化系统,读取 `.claude/workflows/*.md` 执行多步骤工作流,`/workflows` 命令列出可用工作流
383
- - **HISTORY_SNIP** — 会话历史裁剪,模型可主动调用 SnipTool 移除旧消息释放上下文,`/force-snip` 强制裁剪,UI 保留完整历史而模型视图过滤
395
+ - **MONITOR_TOOL** — MCP server health monitoring tool, supports start/stop/status operations, background periodic ping to detect connection status
396
+ - **WORKFLOW_SCRIPTS** — workflow automation system, reads `.claude/workflows/*.md` to execute multi-step workflows, `/workflows` command lists available workflows
397
+ - **HISTORY_SNIP** — session history trimming, model can proactively call SnipTool to remove old messages and free context, `/force-snip` for forced trimming, UI retains full history while model view is filtered
384
398
 
385
399
  ### Infrastructure
386
400
 
387
- - 新增 `src/tools/MonitorTool/MonitorTool.ts` — MCP 监控工具(buildTool 构建)
388
- - 新增 `src/tasks/MonitorMcpTask/MonitorMcpTask.ts` — 监控后台任务生命周期管理
389
- - 新增 `src/components/permissions/MonitorPermissionRequest/` — 监控权限 UI
390
- - 新增 `src/components/tasks/MonitorMcpDetailDialog.tsx` — 监控任务详情对话框
391
- - 新增 `src/tools/WorkflowTool/WorkflowTool.ts` — 工作流执行工具
392
- - 新增 `src/tools/WorkflowTool/createWorkflowCommand.ts` — 工作流命令扫描与注册
393
- - 新增 `src/tools/WorkflowTool/bundled/index.ts` — 内置工作流注册入口
394
- - 新增 `src/tools/WorkflowTool/WorkflowPermissionRequest.tsx` — 工作流权限 UI
395
- - 新增 `src/commands/workflows/` — `/workflows` 斜杠命令
396
- - 新增 `src/tasks/LocalWorkflowTask/LocalWorkflowTask.ts` — 工作流后台任务(kill/skip/retry
397
- - 新增 `src/components/tasks/WorkflowDetailDialog.tsx` — 工作流详情对话框
398
- - 新增 `src/services/compact/snipCompact.ts` — 裁剪触发逻辑(重写 stub
399
- - 新增 `src/services/compact/snipProjection.ts` — 模型视图消息过滤
400
- - 新增 `src/tools/SnipTool/SnipTool.ts` — 模型调用的裁剪工具
401
- - 新增 `src/tools/SnipTool/prompt.ts` — SnipTool 常量与 prompt
402
- - 新增 `src/commands/force-snip.ts` — `/force-snip` 斜杠命令
403
- - 新增 `src/components/messages/SnipBoundaryMessage.tsx` — 裁剪边界 UI 组件
404
- - 3 feature flags 翻转:MONITOR_TOOLWORKFLOW_SCRIPTSHISTORY_SNIP
405
- - 累计已开启 47/87 feature flags
401
+ - Added `src/tools/MonitorTool/MonitorTool.ts` — MCP monitoring tool (buildTool construction)
402
+ - Added `src/tasks/MonitorMcpTask/MonitorMcpTask.ts` — monitoring background task lifecycle management
403
+ - Added `src/components/permissions/MonitorPermissionRequest/` — monitoring permission UI
404
+ - Added `src/components/tasks/MonitorMcpDetailDialog.tsx` — monitoring task detail dialog
405
+ - Added `src/tools/WorkflowTool/WorkflowTool.ts` — workflow execution tool
406
+ - Added `src/tools/WorkflowTool/createWorkflowCommand.ts` — workflow command scanning and registration
407
+ - Added `src/tools/WorkflowTool/bundled/index.ts` — built-in workflow registration entry
408
+ - Added `src/tools/WorkflowTool/WorkflowPermissionRequest.tsx` — workflow permission UI
409
+ - Added `src/commands/workflows/` — `/workflows` slash command
410
+ - Added `src/tasks/LocalWorkflowTask/LocalWorkflowTask.ts` — workflow background task (kill/skip/retry)
411
+ - Added `src/components/tasks/WorkflowDetailDialog.tsx` — workflow detail dialog
412
+ - Added `src/services/compact/snipCompact.ts` — trim trigger logic (rewrote stub)
413
+ - Added `src/services/compact/snipProjection.ts` — model view message filtering
414
+ - Added `src/tools/SnipTool/SnipTool.ts` — model-callable trimming tool
415
+ - Added `src/tools/SnipTool/prompt.ts` — SnipTool constants and prompt
416
+ - Added `src/commands/force-snip.ts` — `/force-snip` slash command
417
+ - Added `src/components/messages/SnipBoundaryMessage.tsx` — trim boundary UI component
418
+ - 3 feature flags flipped: MONITOR_TOOL, WORKFLOW_SCRIPTS, HISTORY_SNIP
419
+ - Cumulative 47/87 feature flags enabled
406
420
 
407
421
  ## [1.0.7] - 2026-04-02
408
422
 
409
423
  ### New Features
410
424
 
411
- - **TERMINAL_PANEL** — `Alt+J` 切换内置终端面板(tmux 持久化),TerminalCapture 工具可读取终端内容
412
- - **WEB_BROWSER_TOOL** — 内置 Web 浏览工具,fetch 抓取网页内容并提取文本
413
- - **TEMPLATES** — 结构化工作流模板系统,`legna new/list/reply` CLI 命令,job 状态追踪
414
- - **BG_SESSIONS** — 后台会话管理,`legna ps/logs/attach/kill/--bg`,tmux 持久化 + PID 文件发现
425
+ - **TERMINAL_PANEL** — `Alt+J` toggles built-in terminal panel (tmux persistent), TerminalCapture tool can read terminal content
426
+ - **WEB_BROWSER_TOOL** — built-in web browsing tool, fetches web page content and extracts text
427
+ - **TEMPLATES** — structured workflow template system, `legna new/list/reply` CLI commands, job status tracking
428
+ - **BG_SESSIONS** — background session management, `legna ps/logs/attach/kill/--bg`, tmux persistence + PID file discovery
415
429
 
416
430
  ### Infrastructure
417
431
 
418
- - 新增 `src/tools/TerminalCaptureTool/` — tmux capture-pane 工具(2 文件)
419
- - 新增 `src/tools/WebBrowserTool/WebBrowserTool.ts` — fetch + HTML 文本提取
420
- - 新增 `src/jobs/classifier.ts` — 工作流 turn 分类器
421
- - 新增 `src/cli/handlers/templateJobs.ts` — 模板 CLI 处理器
422
- - 新增 `src/cli/bg.ts` — 后台会话 CLI5 个 handler)
423
- - 新增 `src/utils/taskSummary.ts` — 周期性活动摘要
424
- - 新增 `src/utils/udsClient.ts` — 活跃会话枚举
425
- - 累计已开启 44/87 feature flags
432
+ - Added `src/tools/TerminalCaptureTool/` — tmux capture-pane tool (2 files)
433
+ - Added `src/tools/WebBrowserTool/WebBrowserTool.ts` — fetch + HTML text extraction
434
+ - Added `src/jobs/classifier.ts` — workflow turn classifier
435
+ - Added `src/cli/handlers/templateJobs.ts` — template CLI handler
436
+ - Added `src/cli/bg.ts` — background session CLI (5 handlers)
437
+ - Added `src/utils/taskSummary.ts` — periodic activity summary
438
+ - Added `src/utils/udsClient.ts` — active session enumeration
439
+ - Cumulative 44/87 feature flags enabled
426
440
 
427
441
  ## [1.0.6] - 2026-04-02
428
442
 
429
443
  ### New Features
430
444
 
431
- - **CACHED_MICROCOMPACT** — 缓存感知的工具结果压缩,通过 API cache_edits 指令删除旧 tool_result 而不破坏 prompt cache
432
- - **AGENT_TRIGGERS** — `/loop` cron 调度命令 + CronCreate/Delete/List 工具,本地定时任务引擎
433
- - **TREE_SITTER_BASH** — TypeScript bash AST 解析器(~4300 行),用于命令安全分析
434
- - **TREE_SITTER_BASH_SHADOW** — tree-sitter legacy 解析器的 shadow 对比模式
435
- - **MCP_SKILLS** — MCP 服务器 `skill://` 资源自动发现并注册技能命令
436
- - **REACTIVE_COMPACT** — 413/过载错误时自动触发上下文压缩
437
- - **REVIEW_ARTIFACT** — `/review` 代码审查技能 + ReviewArtifact 工具
445
+ - **CACHED_MICROCOMPACT** — cache-aware tool result compression, deletes old tool_result via API cache_edits directive without breaking prompt cache
446
+ - **AGENT_TRIGGERS** — `/loop` cron scheduling command + CronCreate/Delete/List tools, local scheduled task engine
447
+ - **TREE_SITTER_BASH** — pure TypeScript bash AST parser (~4300 lines), used for command safety analysis
448
+ - **TREE_SITTER_BASH_SHADOW** — tree-sitter vs legacy parser shadow comparison mode
449
+ - **MCP_SKILLS** — auto-discovers and registers skill commands from MCP server `skill://` resources
450
+ - **REACTIVE_COMPACT** — auto-triggers context compression on 413/overload errors
451
+ - **REVIEW_ARTIFACT** — `/review` code review skill + ReviewArtifact tool
438
452
 
439
453
  ### Infrastructure
440
454
 
441
- - 重写 `src/services/compact/cachedMicrocompact.ts`(从 stub 150+ 行完整实现)
442
- - 新增 `src/services/compact/cachedMCConfig.ts` — 同步配置模块
443
- - 新增 `CACHE_EDITING_BETA_HEADER` `src/constants/betas.ts`
444
- - 新增 `src/skills/mcpSkills.ts`、`src/services/compact/reactiveCompact.ts`
445
- - 新增 `src/tools/ReviewArtifactTool/`、`src/skills/bundled/hunter.ts`
446
- - 累计已开启 40/87 feature flags
455
+ - Rewrote `src/services/compact/cachedMicrocompact.ts` (from stub to 150+ line full implementation)
456
+ - Added `src/services/compact/cachedMCConfig.ts` — synchronous config module
457
+ - Added `CACHE_EDITING_BETA_HEADER` to `src/constants/betas.ts`
458
+ - Added `src/skills/mcpSkills.ts`, `src/services/compact/reactiveCompact.ts`
459
+ - Added `src/tools/ReviewArtifactTool/`, `src/skills/bundled/hunter.ts`
460
+ - Cumulative 40/87 feature flags enabled
447
461
 
448
462
  ## [1.0.5] - 2026-04-02
449
463
 
450
464
  ### New Features
451
465
 
452
- - **AGENT_TRIGGERS** — `/loop` cron 调度命令,CronCreate/Delete/List 工具,本地定时任务引擎
453
- - **TREE_SITTER_BASH** — TypeScript bash AST 解析器,用于命令安全分析
454
- - **TREE_SITTER_BASH_SHADOW** — tree-sitter legacy 解析器的 shadow 对比模式
455
- - **MCP_SKILLS** — MCP 服务器的 `skill://` 资源自动发现并注册技能命令
456
- - **REACTIVE_COMPACT** — 413/过载错误时自动触发上下文压缩
457
- - **REVIEW_ARTIFACT** — `/review` 代码审查技能 + ReviewArtifact 工具 + 权限 UI
466
+ - **AGENT_TRIGGERS** — `/loop` cron scheduling command, CronCreate/Delete/List tools, local scheduled task engine
467
+ - **TREE_SITTER_BASH** — pure TypeScript bash AST parser, used for command safety analysis
468
+ - **TREE_SITTER_BASH_SHADOW** — tree-sitter vs legacy parser shadow comparison mode
469
+ - **MCP_SKILLS** — auto-discovers and registers skill commands from MCP server `skill://` resources
470
+ - **REACTIVE_COMPACT** — auto-triggers context compression on 413/overload errors
471
+ - **REVIEW_ARTIFACT** — `/review` code review skill + ReviewArtifact tool + permission UI
458
472
 
459
473
  ### Infrastructure
460
474
 
461
- - 新增 `src/skills/mcpSkills.ts` — MCP 技能发现模块
462
- - 新增 `src/services/compact/reactiveCompact.ts` — 响应式压缩策略
463
- - 新增 `src/tools/ReviewArtifactTool/` — 代码审查工具
464
- - 新增 `src/components/permissions/ReviewArtifactPermissionRequest/` — 审查权限 UI
465
- - 新增 `src/skills/bundled/hunter.ts` — /review 技能注册
466
- - 累计已开启 39/87 feature flags
475
+ - Added `src/skills/mcpSkills.ts` — MCP skill discovery module
476
+ - Added `src/services/compact/reactiveCompact.ts` — reactive compression strategy
477
+ - Added `src/tools/ReviewArtifactTool/` — code review tool
478
+ - Added `src/components/permissions/ReviewArtifactPermissionRequest/` — review permission UI
479
+ - Added `src/skills/bundled/hunter.ts` — /review skill registration
480
+ - Cumulative 39/87 feature flags enabled
467
481
 
468
482
  ## [1.0.4] - 2026-04-02
469
483
 
470
484
  ### New Features
471
485
 
472
- - **ULTRAPLAN** — `/ultraplan` 结构化多步骤规划命令
473
- - **VERIFICATION_AGENT** — 批量任务完成后自动派生验证 Agent
474
- - **AUTO_THEME** — 通过 OSC 11 查询终端背景色自动切换深色/浅色主题
475
- - **AGENT_MEMORY_SNAPSHOT** — Agent 记忆快照
476
- - **FILE_PERSISTENCE** — 文件持久化追踪
477
- - **POWERSHELL_AUTO_MODE** — PowerShell 自动模式
478
- - **HARD_FAIL** — 严格错误模式
479
- - **SLOW_OPERATION_LOGGING** — 慢操作日志
480
- - **UNATTENDED_RETRY** — 无人值守重试
481
- - **ALLOW_TEST_VERSIONS** — 允许测试版本
486
+ - **ULTRAPLAN** — `/ultraplan` structured multi-step planning command
487
+ - **VERIFICATION_AGENT** — auto-spawns verification Agent after batch task completion
488
+ - **AUTO_THEME** — auto-switches dark/light theme by querying terminal background color via OSC 11
489
+ - **AGENT_MEMORY_SNAPSHOT** — Agent memory snapshots
490
+ - **FILE_PERSISTENCE** — file persistence tracking
491
+ - **POWERSHELL_AUTO_MODE** — PowerShell auto mode
492
+ - **HARD_FAIL** — strict error mode
493
+ - **SLOW_OPERATION_LOGGING** — slow operation logging
494
+ - **UNATTENDED_RETRY** — unattended retry
495
+ - **ALLOW_TEST_VERSIONS** — allow test versions
482
496
 
483
497
  ### Infrastructure
484
498
 
485
- - 新增 `src/utils/systemThemeWatcher.ts` — OSC 11 终端主题检测与实时监听
486
- - 累计已开启 33/87 feature flags
499
+ - Added `src/utils/systemThemeWatcher.ts` — OSC 11 terminal theme detection and real-time monitoring
500
+ - Cumulative 33/87 feature flags enabled
487
501
 
488
502
  ## [1.0.3] - 2026-04-02
489
503
 
490
504
  ### New Features
491
505
 
492
- - **COMMIT_ATTRIBUTION** — 追踪每次 commit Claude 的贡献比例,PR 描述自动附加归因 trailer
493
- - **AWAY_SUMMARY** — 用户离开后返回时显示期间发生的摘要
494
- - **COMPACTION_REMINDERS** — 上下文压缩时的效率提醒
495
- - **HOOK_PROMPTS** — 允许 hooks 向用户请求输入
496
- - **BASH_CLASSIFIER** — Shell 命令安全分类器
497
- - **EXTRACT_MEMORIES** — 自动从对话中提取持久化记忆
498
- - **SHOT_STATS** — 会话统计面板
499
- - **PROMPT_CACHE_BREAK_DETECTION** — 检测 prompt cache 失效
500
- - **ULTRATHINK** — 深度思考模式
501
- - **MCP_RICH_OUTPUT** — MCP 工具富文本输出
502
- - **CONNECTOR_TEXT** — 连接器文本增强
503
- - **NATIVE_CLIPBOARD_IMAGE** — 原生剪贴板图片支持
504
- - **NEW_INIT** — 改进的项目初始化流程
505
- - **DUMP_SYSTEM_PROMPT** — 调试用 system prompt 导出
506
- - **BREAK_CACHE_COMMAND** — `/break-cache` 命令
507
- - **BUILTIN_EXPLORE_PLAN_AGENTS** — 内置 Explore/Plan Agent
506
+ - **COMMIT_ATTRIBUTION** — tracks Claude's contribution ratio per commit, PR description auto-appends attribution trailer
507
+ - **AWAY_SUMMARY** — displays summary of what happened while user was away
508
+ - **COMPACTION_REMINDERS** — efficiency reminders during context compaction
509
+ - **HOOK_PROMPTS** — allows hooks to request user input
510
+ - **BASH_CLASSIFIER** — shell command safety classifier
511
+ - **EXTRACT_MEMORIES** — auto-extracts persistent memories from conversations
512
+ - **SHOT_STATS** — session statistics panel
513
+ - **PROMPT_CACHE_BREAK_DETECTION** — detects prompt cache invalidation
514
+ - **ULTRATHINK** — deep thinking mode
515
+ - **MCP_RICH_OUTPUT** — MCP tool rich text output
516
+ - **CONNECTOR_TEXT** — connector text enhancement
517
+ - **NATIVE_CLIPBOARD_IMAGE** — native clipboard image support
518
+ - **NEW_INIT** — improved project initialization flow
519
+ - **DUMP_SYSTEM_PROMPT** — debug system prompt export
520
+ - **BREAK_CACHE_COMMAND** — `/break-cache` command
521
+ - **BUILTIN_EXPLORE_PLAN_AGENTS** — built-in Explore/Plan Agents
508
522
 
509
523
  ### Infrastructure
510
524
 
511
- - 新增 `src/utils/attributionHooks.ts`、`attributionTrailer.ts`、`postCommitAttribution.ts` 三个归因模块
525
+ - Added `src/utils/attributionHooks.ts`, `attributionTrailer.ts`, `postCommitAttribution.ts` — three attribution modules
512
526
 
513
527
  ## [1.0.2] - 2026-04-02
514
528
 
515
529
  ### New Features
516
530
 
517
- - **QUICK_SEARCH** — 全屏模式下 `Ctrl+P` 快速打开文件,`Ctrl+Shift+F` 全局符号/内容搜索
518
- - **MESSAGE_ACTIONS** — 全屏模式下对消息进行复制、编辑、重试等操作
519
- - **FORK_SUBAGENT** — `/fork <directive>` 会话分叉,子 Agent 继承完整对话上下文并行执行任务
520
- - **HISTORY_PICKER** — `Ctrl+R` 弹出历史搜索对话框,替代原有的内联搜索
531
+ - **QUICK_SEARCH** — `Ctrl+P` quick file open in fullscreen mode, `Ctrl+Shift+F` global symbol/content search
532
+ - **MESSAGE_ACTIONS** — copy, edit, retry and other actions on messages in fullscreen mode
533
+ - **FORK_SUBAGENT** — `/fork <directive>` session fork, child Agent inherits full conversation context and executes tasks in parallel
534
+ - **HISTORY_PICKER** — `Ctrl+R` opens history search dialog, replacing the previous inline search
521
535
 
522
536
  ### Infrastructure
523
537
 
524
- - 新增 `src/commands/fork/` 命令模块和 `UserForkBoilerplateMessage` UI 组件
538
+ - Added `src/commands/fork/` command module and `UserForkBoilerplateMessage` UI component
525
539
 
526
540
  ## [1.0.1] - 2026-04-02
527
541
 
528
542
  ### New Features
529
543
 
530
- - **BUDDY 虚拟宠物伴侣** — `/buddy hatch` 孵化专属编程宠物,18 种物种、5 种稀有度、随机属性
531
- - `/buddy hatch` 孵化 · `/buddy pet` 摸摸 · `/buddy stats` 属性 · `/buddy release` 放生
532
- - 宠物根据对话上下文用可爱中文冒泡评论,支持多语言自动切换
533
- - 放生后重新孵化会得到不同的宠物(generation 计数器)
534
- - **TOKEN_BUDGET** — 提示中使用 `+500k` `use 2M tokens` 设定 token 预算,自动追踪用量
535
- - **STREAMLINED_OUTPUT** — 环境变量 `CLAUDE_CODE_STREAMLINED_OUTPUT=true` 启用精简输出
544
+ - **BUDDY virtual pet companion** — `/buddy hatch` hatches an exclusive coding pet, 18 species, 5 rarities, random attributes
545
+ - `/buddy hatch` hatch · `/buddy pet` pet · `/buddy stats` stats · `/buddy release` release
546
+ - Pet comments in cute language based on conversation context, supports multilingual auto-switching
547
+ - Re-hatching after release gives a different pet (generation counter)
548
+ - **TOKEN_BUDGET** — use `+500k` or `use 2M tokens` in prompts to set token budget, auto-tracks usage
549
+ - **STREAMLINED_OUTPUT** — environment variable `CLAUDE_CODE_STREAMLINED_OUTPUT=true` enables streamlined output
536
550
 
537
551
  ### Fixes
538
552
 
539
- - **构建系统 Feature Flags 修复** — `scripts/build.ts` 现在正确读取 `bunfig.toml` `[bundle.features]` 并传递给 `Bun.build()` API,此前所有 `feature()` 调用默认为 `false`
553
+ - **Build system feature flags fix** — `scripts/build.ts` now correctly reads `bunfig.toml`'s `[bundle.features]` and passes them to the `Bun.build()` API; previously all `feature()` calls defaulted to `false`
540
554
 
541
555
  ### Infrastructure
542
556
 
543
- - 新增 `scripts/compile.ts` 替代裸 `bun build --compile`,确保编译二进制正确应用 feature flags
544
- - 新增 `src/buddy/companionObserver.ts` 上下文感知的宠物反应系统
545
- - 新增 `src/commands/buddy/` 完整命令模块
557
+ - Added `scripts/compile.ts` replacing bare `bun build --compile`, ensuring compiled binary correctly applies feature flags
558
+ - Added `src/buddy/companionObserver.ts` context-aware pet reaction system
559
+ - Added `src/commands/buddy/` complete command module
546
560
 
547
561
  ## [1.0.0] - 2026-03-31
548
562
 
549
563
  - Initial release: LegnaCode CLI v1.0.0
550
- - 基于 Claude Code CLI 开源版本构建
551
- - 品牌适配与定制化改造
564
+ - Built on the Claude Code CLI open-source edition
565
+ - Brand adaptation and customization