clavue-v1 1.70.1 → 1.70.4

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,39 @@ clavue / 克拉维 发布说明。本文件在构建时注入运行时,驱动
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.70.4 - 2026-11-08
10
+
11
+ 修正本机长时 session 实测暴露的计量口径、槽位降级、上下文裁剪与工具入参问题,并写清缓存修复的方言边界。
12
+
13
+ - **用量按最终计费帧统一:** 统计缓存命中率时按 requestId 取最终计费帧的 `input_tokens` / `cache_read_input_tokens`,不再累加流式占位帧(占位帧把整段 prompt 记为未缓存、缓存读为 0,会低估命中率);hop 成功与失败均记录槽位和缓存复用率遥测。
14
+ - **plan 槽硬失败软降级:** `没有可换目标` 按 (slot, model, reason) 每进程只报一次,返回 `degraded` 标记而非每轮刷屏;失败 hop 补发 `tengu_api_error` 遥测,不再留下零用量空洞。
15
+ - **上下文感知证据裁剪:** 累计上下文 ≥ 64KB 时,单次读取投影下限从 40KB 降到 8KB;上下文较小或未传时行为与 1.70.3 完全一致(默认不变、可回退)。
16
+ - **工具入参窄归一化:** `WaitFor.timeout_ms`(含 `timeout` 别名)的整数字符串转数字;`AskUserQuestion.questions` 的单个对象或 JSON 数组字符串包成数组。非整数、非 JSON 输入原样保留,仍走标准校验报错。
17
+ - **方言边界写清:** 1.70.3 的 `prompt_cache_key` 与 light 关闭思考仅覆盖官方 SKU 的 chat/responses 适配器路径;BYOK / Anthropic Messages 原生 `cache_control: ephemeral` 不走这些字段,两类 usage 口径不可混加。详见 `docs/prefix-cache-investigation-2026-10-13.md` 第 8 节。
18
+ - **验证:** 新增最终计费帧、失败 hop 降级、证据裁剪、工具入参 4 个回归测试;完整 `npm test` 6059 tests / 6056 pass / 0 fail(3 skipped)、`npm run typecheck` 0 错、架构上限与工具 schema 检查通过。本版不包含 `r170/integrate` 工作树中的未完成集成改动。
19
+ - English: Unify usage on the final billing frame per requestId so streaming placeholder frames no longer understate cache reuse; dedupe dead-end plan-slot failures into a soft `degraded` mark with hop telemetry; trigger read projection at 8KB once accumulated context exceeds 64KB (default behaviour unchanged otherwise); narrowly coerce WaitFor/AskUserQuestion tool arguments; and document that the 1.70.3 cache-key fix applies only to official SKU chat/responses adapter paths, not to BYOK native `cache_control: ephemeral`.
20
+
21
+ ## 1.70.3 - 2026-11-08
22
+
23
+ 修复 light 辅助槽未真正关闭思考,并为 Chat Completions 增加稳定的会话缓存亲和键与可观测的缓存复用率。
24
+
25
+ - **light 真正轻量:** `clavue-2.1-fast` / `clavue-24a` 等官方 fast SKU 在 light 辅助请求中不再沿用主模型的思考豁免,`disableThinking:true` 现在会发送 `enable_thinking:false`;主模型 `clavue-2.1` 的思考行为保持不变。
26
+ - **缓存亲和:** `/v1/chat/completions` 请求随会话携带稳定的 `prompt_cache_key`(Responses 行为不变),作为支持该字段的上游网关的前缀缓存亲和提示;不虚构缓存命中,不支持该字段的网关可忽略。
27
+ - **缓存可观测:** 每次调用日志新增 `cacheReuseRate`(按槽位记录 input / cache_read),便于区分 main、light、plan、review 的缓存命中与重复上下文开销。
28
+ - **适用边界:** 上述缓存键与关闭思考仅作用于官方 SKU 的 chat/responses 适配器路径;BYOK / Anthropic Messages 原生 `cache_control: ephemeral` 不走这些字段,两类 usage 口径不可混加。命中率须按 requestId 取最终计费帧统计,详见 `docs/prefix-cache-investigation-2026-10-13.md` 第 8 节。
29
+ - **验证:** 新增真实请求体、思考参数、缓存键和复用率回归测试;fast 套件、类型检查、架构检查与完整 `npm test` 通过。生产代理已确认原样透传请求体,未改动线上网络或服务;缓存命中率恢复需在发布后以同会话连续请求验证。
30
+ - English: Light helper calls on official fast SKUs now actually disable reasoning, Chat Completions carries a stable per-session prompt cache affinity key, and per-call logs record cache reuse per slot. Main-model thinking is unchanged. The relay forwards the request body unchanged; the cache hit-rate gain itself still needs live same-session verification.
31
+
32
+ ## 1.70.2 - 2026-11-08
33
+
34
+ 补齐官方 API 的公开接入与多线路运维文档,并完成 WAN2 WireGuard、独立 SSH 回退和 WAN3 DDNS 的在线验收。
35
+
36
+ - **官方配置手册:** 新增 `docs/official-api-clavue-com.md`,统一说明 OAuth / member API key、chat completions、工具调用、SSE、官方四槽,以及 FastApply、Jev 和可关闭的数据收集路径;公开 API 与私有 relay 严格分开。
37
+ - **多线路与 DDNS:** 记录 WAN2 主线路、独立 reverse SSH 回退、WAN3 灰云 DDNS 的端口、systemd、证书、密钥保管、回退验证和回滚边界。
38
+ - **在线验收:** VPS 的 WireGuard、relay、DDNS 脚本和生产站点已核验在线;`clavue-2.1` 工具调用和轻量上游流式响应可用,WireGuard 停止后 SSH 接管、恢复后自动回到 WAN2。
39
+ - **发布边界:** 本版不包含对当前 `r170/integrate` 未提交集成改动的回退或发布,不自动切换生产代理。网络测试是有限请求验收,不是并发或 SLA 压测。
40
+ - English: Add a complete official API and multi-WAN operations guide covering public client configuration, tool calls, streaming, private WireGuard / SSH / WAN3 failover, Cloudflare DDNS, verification, and rollback. The deployed relay and model paths were checked online; unfinished integration work is not included.
41
+
9
42
  ## 1.70.1 - 2026-11-08
10
43
 
11
44
  修复非 thinking 请求的默认采样温度,并在上下文裁剪时保留超长工具结果的有效内容。
package/README.md CHANGED
@@ -90,7 +90,7 @@ clavue-v1 --version
90
90
  Pin a version:
91
91
 
92
92
  ```bash
93
- curl -fsSL https://github.com/mycode699/clavue-public/releases/download/v1.70.1/install.sh | bash -s -- 1.70.1
93
+ curl -fsSL https://github.com/mycode699/clavue-public/releases/download/v1.70.4/install.sh | bash -s -- 1.70.4
94
94
  ```
95
95
 
96
96
  Upgrade later with `clavue update` or `clavue-v1 update` (startup check / `/update` also prefer the public v1 release, then fall back to npm).
@@ -101,7 +101,7 @@ Upgrade later with `clavue update` or `clavue-v1 update` (startup check / `/upda
101
101
  npm install -g clavue-v1
102
102
  # or one-shot:
103
103
  npx -y clavue-v1
104
- npx -y clavue-v1@1.70.1 --version
104
+ npx -y clavue-v1@1.70.4 --version
105
105
  ```
106
106
 
107
107
  One-line global install via the package (npm / unpkg):
@@ -113,7 +113,7 @@ curl -fsSL https://unpkg.com/clavue-v1/install.sh | bash
113
113
  Install a specific version globally:
114
114
 
115
115
  ```bash
116
- curl -fsSL https://unpkg.com/clavue-v1@1.70.1/install.sh | bash -s -- 1.70.1
116
+ curl -fsSL https://unpkg.com/clavue-v1@1.70.4/install.sh | bash -s -- 1.70.4
117
117
  ```
118
118
 
119
119
  ```bash
@@ -171,6 +171,9 @@ from the `x-clavue-points-*` response headers. Official identity is decided by
171
171
  exact host match only — a third-party gateway can never be mistaken for the
172
172
  official cloud.
173
173
 
174
+ 完整的公开 API 接入、SSE / 工具调用、四槽配置,以及服务端 WAN2 WireGuard、独立 SSH 回退和 WAN3 Cloudflare DDNS 运维说明见
175
+ [`docs/official-api-clavue-com.md`](docs/official-api-clavue-com.md)。私有 relay 地址不是客户端公开 API 地址。
176
+
174
177
  Official sessions fill combo slots without writing them into your shell:
175
178
  `light=clavue-2.1-fast`, `plan=clavue-2.1-pro`, `review=clavue-2.1-rev`. MAIN
176
179
  stays `/model` (or the profile primary). `CLAVUE_COMBO_OFF=1` or a per-slot
@@ -722,7 +725,7 @@ Version check:
722
725
 
723
726
  ```bash
724
727
  npx -y clavue-v1 --version
725
- npx -y clavue-v1@1.70.1 --version
728
+ npx -y clavue-v1@1.70.4 --version
726
729
  # available after a global install; both names are this package
727
730
  clavue --version
728
731
  clavue-v1 --version