clavue-v1 1.50.0 → 1.50.2

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,29 @@ clavue / 克拉维 发布说明。本文件在构建时注入运行时,驱动
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.50.2 - 2026-10-16
10
+
11
+ - 修复「疯狂压缩」(会话 b2180bba,1M 窗口一天自动压缩 13 次,两次只有 41k / 48k)
12
+ - 主因:网关繁忙时主模型在 deepseek-flash 和 cn:deepseek-v4.1-flash 之间来回切,每切一次(切过去、下一问切回来)都强制整段压缩;14 次里有 7 次紧跟切模型。现在同一家族、窗口没变小时,只有上下文已到新模型阈值才压缩
13
+ - 内存压力:上下文不到 token 阈值 30% 时不再因内存压缩,改为清理旧工具输出、进度刻、图片路径、WebFetch 等缓存,并在调试日志写明原因
14
+ - 内存触发的压缩如果没让 heapUsed 至少下降 15%,就锁住,不再因内存重复压缩(提示一次);内存回落或到达 token 阈值后解锁;严重内存不足仍走原来的清缓存兜底
15
+ - 摘要改由快模型写:`CLAVUE_AUTO_COMPACT_MODEL` → LIGHT → FA → 主模型;每个模型限时 90 秒(`CLAVUE_AUTO_COMPACT_TIMEOUT_MS` 可调),超时或报错换下一个;窗口装不下的候选自动跳过;没配 LIGHT/FA 时行为不变;`CLAVUE_AUTO_COMPACT_MODEL=main` 固定用主模型
16
+ - 压缩提示行写明原因(token / memory / model_switch…)、heapUsed 和摘要模型,调试日志记录开始、结束、耗时
17
+ - resume 内存:写入去重集合里的 uuid 原来是从 jsonl 行上截出来的切片,会把整行(最大 250KB)一起留在内存里;现在复制成独立字符串。用这个 18MB 会话复现,resume 后堆从 158MB 降到 122MB
18
+
19
+ ## 1.50.1 - 2026-10-16
20
+
21
+ - 修复「说一句就停」:主模型没发工具调用、整条回复只有一句「接下来要做什么」(如「从 8bbf32ea 那份记录里挖「野心家」的原始语境。」)就结束时,即使用户没说「继续」也自动续跑一次(每轮最多一次);提问、已完成、结论句不受影响
22
+ - 入口在 `decideNarrationTurn`(新增 `isBareIntentReply`),`openWorkResume` 新增 `intentOnce` 兜底;回归用例取自会话 b2180bba 的原句
23
+ - Token Budget 补齐(仍默认关;`CLAVUE_COMPACT_TOKEN_BUDGET=1` 或会话内 `/budget on` 开启,`/budget off` 关闭,`/budget status` 查看)
24
+ - `CLAVUE_CONTEXT_REMAINING` 每轮更新;用量每跨过 10% 给模型一行 `[context] …% of budget used · … tokens before the cut · window wN`
25
+ - ContextNotes 写入 transcript(`type: context-notes`),`--resume` 或进程崩溃后自动恢复;窗口计数也从 transcript 恢复
26
+ - 每次切窗口生成 windowId(w0、w1…),记在 compact_boundary 上;ContextHistory `search_contents` 扫整行并返回 role、时间、windowId,可用 `window` 过滤
27
+ - `read_item` 返回解析后的正文,支持 `offset` / `limit`(默认 8000、上限 40000 字符),并附上落盘到 `tool-results/` 的工具输出全文
28
+ - 85% 第一次提醒;95% 仍没有 notes 时第二次提醒;到切窗口时仍没有 notes,自动用待办、最近改过的文件和最后一条用户请求的 id 填一份,新窗口不再是空的
29
+ - 文档:推荐把 `clavue-2.1`(27B 推理模型)放 PLAN / REVIEW 槽位,开思考时 max_tokens 至少 4K
30
+ - 服务端(不随 npm 发布):W1 网关改指 vLLM 版 clavue-w1(同一权重,打分排序一致,网关内耗时 0.8s→0.27s);确认 `clavue-2.1` 路由到 27B(vllm-qwen38-27b-lora);FastApply r3 离线评测未胜过 r1,线上保持 r1
31
+
9
32
  ## 1.50.0 - 2026-10-16
10
33
 
11
34
  - 合并发布:本版同时包含下方 1.49.2 和 1.49.3 的全部改动,1.49.2 和 1.49.3 不单独发布到 npm
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.50.0/install.sh | bash -s -- 1.50.0
88
+ curl -fsSL https://github.com/mycode699/clavue-public/releases/download/v1.50.2/install.sh | bash -s -- 1.50.2
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.50.0 --version
99
+ npx -y clavue-v1@1.50.2 --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.50.0/install.sh | bash -s -- 1.50.0
111
+ curl -fsSL https://unpkg.com/clavue-v1@1.50.2/install.sh | bash -s -- 1.50.2
112
112
  ```
113
113
 
114
114
  ```bash
@@ -391,6 +391,36 @@ Slot effort is sent as Messages `output_config.effort` (Responses dialect maps
391
391
  it to `reasoning.effort`). A 400 that names effort is retried once without it
392
392
  and remembered for the process. `/effort` still only affects the `main` slot.
393
393
 
394
+ ### Recommended: clavue-2.1 for PLAN / REVIEW (1.50.1)
395
+
396
+ `clavue-2.1` on api.clavue.com is served by the 27B reasoning model
397
+ (vllm-qwen38-27b-lora on the Clavue cluster, verified 2026-10-16). In a small
398
+ bug-fix probe it wrote correct code, so it is a good PLAN and REVIEW slot:
399
+
400
+ ```bash
401
+ CLAVUE_COMBO_PLAN=clavue-2.1
402
+ CLAVUE_COMBO_REVIEW=clavue-2.1
403
+ CLAVUE_COMBO_PLAN_MAX_TOKENS=8192 # keep >= 4096
404
+ CLAVUE_COMBO_REVIEW_MAX_TOKENS=8192 # keep >= 4096
405
+ ```
406
+
407
+ Keep the output cap at 4K or more. With thinking on, a small cap is spent on
408
+ reasoning and the visible answer comes back empty. The official gateway sends
409
+ it with thinking off by default; the OpenAI-compatible endpoint returns the
410
+ `reasoning` field when a request sets
411
+ `chat_template_kwargs: {"enable_thinking": true}`.
412
+
413
+ ### Token budget window (opt-in, 1.48.2 / completed in 1.50.1)
414
+
415
+ `CLAVUE_COMPACT_TOKEN_BUDGET=1`, or `/budget on` inside a session (`/budget off`,
416
+ `/budget status`). Near the limit the agent is asked (85%, then again at 95%) to
417
+ save `ContextNotes`; the next window carries only those notes plus read-only
418
+ `ContextHistory` (`search_contents` with optional `window`, `read_item` with
419
+ `offset`/`limit`). `ContextRemaining` and `CLAVUE_CONTEXT_REMAINING` report the
420
+ budget; notes and window ids live in the transcript and survive `--resume`. If
421
+ no notes were saved, the host fills them from the todo list, recent files and the
422
+ last user request id.
423
+
394
424
  ### Combo token efficiency (1.15.0)
395
425
 
396
426
  Long diagnostic logs and large reads stay available without stuffing every
@@ -470,7 +500,7 @@ Version check:
470
500
 
471
501
  ```bash
472
502
  npx -y clavue-v1 --version
473
- npx -y clavue-v1@1.50.0 --version
503
+ npx -y clavue-v1@1.50.2 --version
474
504
  # available after a global install
475
505
  clavue-v1 --version
476
506
  ```