@legna-lnc/legnacode 2.0.1 → 2.0.3

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,17 +4,21 @@
4
4
 
5
5
  All notable changes to LegnaCode CLI will be documented in this file.
6
6
 
7
- ## [2.0.0] - 2026-04-26
7
+ ## [2.0.3] - 2026-04-27
8
8
 
9
9
  ### Features
10
10
 
11
- - **Kiro Gateway Client-Side History Optimization** — New `kiroGateway` setting enables client-side history compression before sending to Kiro Gateway. Aligned with Gateway's converter.py: thinking blocks truncated (distance>5, 2000c/60l), tool_result truncated (distance>8, 8000c/150l), images replaced with placeholders, redacted_thinking removed, JSON schemas normalized (whitelist filtering, anyOf/oneOf flattening, empty required removal), tool descriptions capped at 9216 chars.
12
- - **Admin Profile Inline Editing** — Each profile card now has an "编辑" button that expands an inline settings editor for that specific file. No need to switch profiles to edit them.
13
- - **Profile-Specific API** — `GET/PUT /api/:scope/profiles/:filename` for reading/writing individual profile files.
11
+ - **Kiro Gateway Client-Side History Optimization** — New `kiroGateway` setting enables client-side history compression aligned with Gateway's converter.py (thinking/tool_result truncation, schema normalization).
12
+ - **Admin Profile Inline Editing** — Each profile card has an "编辑" button for inline settings editing. Profile-specific API: `GET/PUT /api/:scope/profiles/:filename`.
13
+ - **Admin Preset Templates** — 7 provider presets (DeepSeek, Kimi, GLM, Qwen, MiniMax, MiMo, Anthropic).
14
+ - **ANTHROPIC_MODEL Settings Field** — Highest-priority model override in admin settings panel.
14
15
 
15
16
  ### Fixes
16
17
 
17
- - **Bash Sandbox Completely Removed** — Disabled native sandbox addon (`sandboxAddon = null`), Seatbelt fallback (`wrapCommand` returns `none`), and `sandbox-adapter.ts` native path. The `(deny default)` Seatbelt profile was blocking all commands. Command safety handled at TS permission layer.
18
+ - **Model Allowlist Removed** — `isModelAllowed()` always returns true. Third-party providers use arbitrary model names that would never pass a Claude-centric allowlist.
19
+ - **count_tokens API Disabled** — Both `countMessagesTokensWithAPI` and `countTokensViaHaikuFallback` return null unconditionally. The `/v1/messages/count_tokens` endpoint is not supported by third-party providers and causes 403 errors.
20
+ - **Bash Sandbox Removed** — Disabled native sandbox addon, Seatbelt fallback, and sandbox-adapter native path.
21
+ - **Migration Auto-Fill ANTHROPIC_MODEL** — Auto-fills from OPUS value when migrating Claude Code configs.
18
22
 
19
23
  ## [1.9.9] - 2026-04-26
20
24
 
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-2.0.0-blue)](./CHANGELOG.md)
7
+ [![version](https://img.shields.io/badge/version-2.0.3-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,7 +34,7 @@ LegnaCode is built on top of [Claude Code CLI](https://github.com/anthropics/cla
34
34
 
35
35
  | Version | Summary |
36
36
  |---------|---------|
37
- | **2.0.0** | Kiro Gateway client-side history optimization; Admin profile inline editing; Bash sandbox removed |
37
+ | **2.0.3** | Kiro Gateway optimization; admin profile inline editing; model allowlist removed; count_tokens disabled; sandbox removed |
38
38
  | **1.9.9** | Bash exit code 65 彻底修复;Admin 预设配置模板;ANTHROPIC_MODEL 字段 |
39
39
  | **1.9.5** | Admin preset profile templates (7 providers); ANTHROPIC_MODEL field; migration auto-fill |
40
40
  | **1.9.4** | macOS Seatbelt sandbox rewrite (allow-by-default); Shell.ts sandbox return path fix |
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-2.0.0-blue)](./CHANGELOG.zh-CN.md)
7
+ [![version](https://img.shields.io/badge/version-2.0.3-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,7 +34,7 @@ LegnaCode 基于 [Claude Code CLI](https://github.com/anthropics/claude-code)
34
34
 
35
35
  | 版本 | 摘要 |
36
36
  |------|------|
37
- | **2.0.0** | Kiro Gateway 客户端历史压缩优化;Admin 配置文件内联编辑;Bash sandbox 移除 |
37
+ | **2.0.3** | Kiro Gateway 优化;Admin 配置内联编辑;模型白名单移除;count_tokens 禁用;sandbox 移除 |
38
38
  | **1.9.9** | Bash exit code 65 彻底修复;Admin 预设配置模板;ANTHROPIC_MODEL 字段 |
39
39
  | **1.9.5** | Admin 预设配置模板(7 家 Provider);ANTHROPIC_MODEL 字段;迁移自动补全 |
40
40
  | **1.9.4** | macOS Seatbelt 沙盒重写(默认允许策略);Shell.ts sandbox 返回路径修复 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legna-lnc/legnacode",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
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": "2.0.1",
146
- "@legna-lnc/legnacode-darwin-x64": "2.0.1",
147
- "@legna-lnc/legnacode-darwin-x64-baseline": "2.0.1",
148
- "@legna-lnc/legnacode-linux-x64": "2.0.1",
149
- "@legna-lnc/legnacode-linux-x64-baseline": "2.0.1",
150
- "@legna-lnc/legnacode-linux-arm64": "2.0.1",
151
- "@legna-lnc/legnacode-win32-x64": "2.0.1",
152
- "@legna-lnc/legnacode-win32-ia32": "2.0.1"
145
+ "@legna-lnc/legnacode-darwin-arm64": "2.0.3",
146
+ "@legna-lnc/legnacode-darwin-x64": "2.0.3",
147
+ "@legna-lnc/legnacode-darwin-x64-baseline": "2.0.3",
148
+ "@legna-lnc/legnacode-linux-x64": "2.0.3",
149
+ "@legna-lnc/legnacode-linux-x64-baseline": "2.0.3",
150
+ "@legna-lnc/legnacode-linux-arm64": "2.0.3",
151
+ "@legna-lnc/legnacode-win32-x64": "2.0.3",
152
+ "@legna-lnc/legnacode-win32-ia32": "2.0.3"
153
153
  }
154
154
  }