clavue-v1 1.49.0 → 1.50.0

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
@@ -6,6 +6,41 @@ clavue / 克拉维 发布说明。本文件在构建时注入运行时,驱动
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.50.0 - 2026-10-16
10
+
11
+ - 合并发布:本版同时包含下方 1.49.2 和 1.49.3 的全部改动,1.49.2 和 1.49.3 不单独发布到 npm
12
+ - 新增可选的世界模型槽位 `CLAVUE_COMBO_W1=clavue-w1`:给同一任务的 2–4 个候选改法按「能否通过测试」排序,只调整先后顺序,最终仍以真实测试为准;key 和地址与 Jev 共用(`CLAVUE_W1_TIMEOUT_MS` 默认 2500,超时/出错/503 直接跳过)
13
+ - 接在 fanout 多候选排序(`rankFanoutRunsWithW1`):全绿的候选仍排在前面,W1 只在同组内重排;`/timing` 和 `timing.ndjson` 记录 W1 次数、耗时、跳过和「排对」
14
+ - fanout 修复(`CLAVUE_FANOUT=1` 开启,默认关):同一测试命令连续失败 ≥2 次、只改了一个 ≤4KB 文件时,用快改并行生成 3 个修复候选(可选 W1 排序),在临时副本里依次真跑测试,第一个通过才写回;限时 240s、约 24000 token、每会话 3 次。默认关的原因:实测快改作为「修复生成器」几乎产不出能过的候选
15
+ - 轨迹采集改为默认开启(`CLAVUE_W1_COLLECT=0` 关闭),首次启用时提示一次(记在 `~/.clavue/w1-collect-notice`);只上传到官方地址;跳过 .env、密钥/证书/凭据文件、二进制和 32KB 以上的文件;Write 和 fanout 候选也采集
16
+ - `cmd 2>&1 | tail` 这类管道测试即使 shell 返回 0,只要输出里有失败汇总(`# fail N`、`FAILED (` 等)也按失败处理
17
+ - Edit 也做本地语法预检(与 FastApply 共用 `node --check` / Python compile / JSON),改坏一个原本能解析的文件时在工具结果里提示(`CLAVUE_EDIT_SYNTAX_PRECHECK=0` 关闭)
18
+ - 服务端:api.clavue.com 新增 `/clavue-w1/v1/score`、`/clavue-w1/v1/collect`、`/clavue-w1/v1/health`,额度面 `clavue-w1`(临时 300、会员 3000、付费 10000 次/天,一组打分算 1 次,collect 不计)
19
+
20
+ ## 1.49.3 - 2026-10-16
21
+
22
+ - 不设 key 也能直接用官方 Jev 和 FastApply:按「自己设的 key → 已登录的 clavue 账号 → 本机设备 key → 自动申请设备 key」的顺序取凭证,设备 key 存在 `~/.clavue/official-device-key.json`(0600)。会员 token 和设备 key 只发给 api.clavue.com
23
+ - 修复:1.28.0 起官方 Jev 一律不带 key,api.clavue.com 改为按 key 计额度后所有判定被拒成 401 并悄悄退回轻量模型模拟
24
+ - `clavue auth login` 成功后自动把设备 key 绑定到账号,之后按账号额度计
25
+ - 官方返回 401 或 429(额度用完)时给出中文提示(登录或升级),不再模拟判定;FastApply 槽位不再需要设置 key
26
+ - 服务端:新增 `/api/membership/auth/anon`(设备 key)与 `/anon/bind`;`/v1/judge` 和 `/clavue-fa` 按 key 扣每日额度(Jev 临时 100、会员 500;FastApply 临时 200、会员 2000),不带 key 的老客户端按 IP 计临时额度
27
+
28
+ ## 1.49.2 - 2026-10-16
29
+
30
+ - 长会话内存与落盘(参照 OpenCode / Codex):工具输出生成时即封顶(tool_result 新增 2000 行上限并落盘 `tool-results/`;消息上的原始 `toolUseResult` 超过 50KB 的字符串只留头尾各 4KB 加落盘路径),payload 大小在生成消息时记录,粘贴图片释放后保留文件引用而非空占位
31
+ - transcript 只追加:按 flushedIndex 只写新尾部,压缩/rewind 自动退回全量去重(`CLAVUE_TRANSCRIPT_FLUSH_CURSOR=0` 关闭)
32
+ - 修复 DeepSeek 过早压缩:`reasoning_tokens` 是 `completion_tokens` 的子集,旧映射重复相加;assistant/attachment 粗估 token 按消息记录不再每轮重算
33
+ - 合入 JEV/FA 修复:JEV 判定使用用户 JEV key 并容忍一次判定失败;FastApply 大小上限跟随 `CLAVUE_FA_MAX_BYTES`
34
+ - 基准(3000 轮):每轮本地开销 20.5ms → 1.45ms,transcript 224MB → 32.9MB
35
+
36
+ ## 1.49.1 - 2026-10-16
37
+
38
+ - 长会话越跑越慢:每轮工具调用后的持久化闸门会把全部存活消息(含 REPL 副本)完整重扫两遍来测量和释放工具负载,成本随历史线性增长、整场会话呈平方级。改为窗口外已释放的消息记为「已结清」,并记住每个数组前缀的结清位置,每轮只看窗口和新消息(O(窗口));释放效果不变,插入或删除旧消息会自动退回全量扫描
39
+ - 未落盘行检查同样只从上轮已确认的前缀之后开始扫
40
+ - combo 槽位设置:同一请求内多次解析槽位不再反复读、解析 4 个 settings 文件(按 mtime+大小缓存,同一同步调用段内复用)
41
+ - 模型能力快照:每次请求都重写并 fsync 全局配置只为刷新 checkedAt,现在内容未变且 10 分钟内不再写盘
42
+ - 合成长会话基准(桩网关,每轮一次 Bash):600 轮总耗时 88.7s → 32.7s,第 600 轮本地开销 360ms → 88ms;新增 `tests/long-session-round-cost.test.mjs` 断言后期轮次开销不超过早期 2 倍
43
+
9
44
  ## 1.49.0 - 2026-10-16
10
45
 
11
46
  - Ctrl+C 卡死兜底(含 1.48.9 全部提速改动,1.48.9 不单独发布):主线程卡死(实测进程 7.4GB、CPU 140%、持续 GC)时按键无人读取,Ctrl+C 无效。新增后台守护线程,主线程心跳超过 4 秒(`CLAVUE_STALL_ESCAPE_MS`)未更新时由它直接读终端,收到 Ctrl+C 即结束所有 Bash 子进程组、恢复终端并退出;主线程正常时不碰终端,原有 Ctrl+C 行为不变。`CLAVUE_STALL_ESCAPE=0` 关闭
package/README.md CHANGED
@@ -85,7 +85,7 @@ clavue-v1 --version
85
85
  Pin a version:
86
86
 
87
87
  ```bash
88
- curl -fsSL https://github.com/mycode699/clavue-public/releases/download/v1.49.0/install.sh | bash -s -- 1.49.0
88
+ curl -fsSL https://github.com/mycode699/clavue-public/releases/download/v1.50.0/install.sh | bash -s -- 1.50.0
89
89
  ```
90
90
 
91
91
  Upgrade later with `clavue-v1 update` (startup check / `/update` also prefer the public v1 release, then fall back to npm).
@@ -96,7 +96,7 @@ Upgrade later with `clavue-v1 update` (startup check / `/update` also prefer the
96
96
  npm install -g clavue-v1
97
97
  # or one-shot:
98
98
  npx -y clavue-v1
99
- npx -y clavue-v1@1.49.0 --version
99
+ npx -y clavue-v1@1.50.0 --version
100
100
  ```
101
101
 
102
102
  One-line global install via the package (npm / unpkg):
@@ -108,7 +108,7 @@ curl -fsSL https://unpkg.com/clavue-v1/install.sh | bash
108
108
  Install a specific version globally:
109
109
 
110
110
  ```bash
111
- curl -fsSL https://unpkg.com/clavue-v1@1.49.0/install.sh | bash -s -- 1.49.0
111
+ curl -fsSL https://unpkg.com/clavue-v1@1.50.0/install.sh | bash -s -- 1.50.0
112
112
  ```
113
113
 
114
114
  ```bash
@@ -283,6 +283,37 @@ This package is intended for users who want an execution-first coding CLI with d
283
283
 
284
284
  On macOS, Clavue avoids Keychain by default and stores local credentials in `~/.clavue/.credentials.json` so startup does not trigger system Keychain prompts. If you explicitly want the old Keychain behavior back, launch with `CLAVUE_USE_KEYCHAIN=1 clavue-v1`.
285
285
 
286
+ ## World Model Slot, Fanout Repair and Data Collection (1.50.0)
287
+
288
+ ```bash
289
+ CLAVUE_COMBO_W1=clavue-w1 # optional: clavue-w1 orders candidate fixes (same key/base as Jev)
290
+ CLAVUE_W1_TIMEOUT_MS=2500 # skip W1 on timeout / error / 503
291
+ CLAVUE_FANOUT=1 # opt in to fanout repair (off by default; needs the FastApply slot)
292
+ CLAVUE_W1_COLLECT=0 # turn trajectory upload off (on by default)
293
+ ```
294
+
295
+ - **Fanout repair** (opt-in, off by default: in the 1.50.0 bench FastApply rarely produced a passing fix, see release notes): when a test command fails for the 2nd time in a row (`CLAVUE_FANOUT_MIN_FAILS`) and exactly one file ≤ 4KB was edited, clavue asks FastApply for 3 fixes in parallel (`CLAVUE_FANOUT_N`, max 4), orders them with clavue-w1 if the slot is set, and tests each one in a throw-away copy of the project, stopping at the first pass. Only a passing fix is written back; otherwise the workspace is untouched. Limits: `CLAVUE_FANOUT_MAX_MS` (240s), `CLAVUE_FANOUT_MAX_TOKENS` (24000 estimated FastApply tokens), `CLAVUE_FANOUT_MAX_PER_SESSION` (3).
296
+ - **Data collection** (`CLAVUE_W1_COLLECT`, default on): after an Edit / Write / FastApply change is followed by a test run, and for every fanout candidate, clavue uploads the sanitized before/after file, the instruction, the test command, the exit code and the last 1KB stdout / 2KB stderr to `api.clavue.com/clavue-w1/v1/collect` to train clavue-w1. Absolute paths and secrets are removed; `.env*`, key/cert/credential files, binaries and files over 32KB are never sent. Uploads go to the official host only (a third-party `CLAVUE_W1_BASE_URL`/`CLAVUE_JEV_BASE_URL` receives nothing unless `CLAVUE_W1_COLLECT_THIRD_PARTY=1`). A one-line notice is shown the first time (remembered in `~/.clavue/w1-collect-notice`). Set `CLAVUE_W1_COLLECT=0` to turn it off.
297
+ - Edit results also get a local syntax precheck (`node --check`, Python compile, JSON) — `CLAVUE_EDIT_SYNTAX_PRECHECK=0` turns it off.
298
+
299
+ ## Long-Session Memory (1.49.3)
300
+
301
+ Tool output is capped when it is created: a tool_result over 2000 lines or
302
+ 50KB is spilled to `tool-results/`, and the raw tool output kept on the message
303
+ keeps only head + tail + the spill path. The transcript is append-only (a
304
+ flushed-index cursor writes just the new tail), and DeepSeek reasoning tokens
305
+ are no longer counted twice (which compacted early). On a 3000-round synthetic
306
+ run the per-round local cost dropped from 20.5ms to 1.45ms and the transcript
307
+ from 224MB to 32.9MB. See [`docs/release-notes-v1.49.3.md`](docs/release-notes-v1.49.3.md).
308
+
309
+ ## Long Sessions (1.49.1)
310
+
311
+ Per-round local work no longer scans the whole session history. Tool payloads
312
+ that fell out of the live window are released once and then skipped, so a
313
+ round costs O(window) instead of O(history). On a 600-round synthetic run the
314
+ late-round local overhead dropped from 360ms to 88ms (total 88.7s → 32.7s).
315
+ See [`docs/release-notes-v1.49.1.md`](docs/release-notes-v1.49.1.md).
316
+
286
317
  ## Fast-Apply Slot (快改, 1.49.0)
287
318
 
288
319
  An optional slot next to Jev. When set, the main model gets a `FastApply`
@@ -439,7 +470,7 @@ Version check:
439
470
 
440
471
  ```bash
441
472
  npx -y clavue-v1 --version
442
- npx -y clavue-v1@1.49.0 --version
473
+ npx -y clavue-v1@1.50.0 --version
443
474
  # available after a global install
444
475
  clavue-v1 --version
445
476
  ```