clavue-v1 1.85.2 → 1.85.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
@@ -4,6 +4,22 @@ clavue / 克拉维 发布说明。本文件在构建时注入运行时,驱动
4
4
 
5
5
  格式约定(`parseChangelog` 依赖):二级标题为 `## <版本> - <日期>`,条目以 `- ` 开头,一行一条,命令与模型名保留英文。
6
6
 
7
+ ## 1.85.4 - 2026-11-26
8
+
9
+ - **长上下文流式超时与 SSE 心跳透传、vLLM Prefix Cache 前缀固化、稳定 `x-clavue-session` 路由亲和及 `clavue-5.5-fast` 防过早取消(配套 #337):**
10
+ - **长上下文首字节/首字超时放宽与 `: keep-alive` SSE 心跳透传**:`firstByteTimeout.ts` 将 `clavue-5.5` 首字节超时曲线提升至 `90s + 1s/1k`(上限 180s,35K 输入 = 125s),`clavue-5.5-fast` 提升至 `45s + 0.5s/1k`(上限 90s);`v1StreamFirstToken.ts` 新增 `firstTokenTimeoutMsForRequest` 按 `system + tools + messages` 估算 token 动态放大长上下文首字超时;`sseEncoding.ts` 与 `streamTranslator.ts` 兼容 `\r\n` 分帧并在 Chat Completions / Responses 流式翻译路径中透传 `: keep-alive\n\n` 心跳给外层空闲看门狗,避免 30–50s 冷 prefill 误触发 `client_gone (context canceled)`。
11
+ - **固化 `/v1/chat/completions` 系统前缀与历史轮次以提升 Prefix Cache 命中率**:`requestBuilders.ts` 在 `buildChatCompletionsRequest` 关闭每轮将最新 `<system-reminder>` 提升进 `messages[0]` 的改写逻辑(保持各自 user turn 原位、`/v1/responses` 不变),使 `messages[0]` 与历史消息跨轮字节级不可变;`reasoningAndText.ts` 的 `flattenSystemPrompt(..., { stripBillingHeader: true })` 在 OpenAI `/v1/chat/completions` 剥离按首条消息指纹生成的 `x-anthropic-billing-header:`,恢复跨会话与 `/compact` 后的前缀缓存复用。
12
+ - **稳定透传 `x-clavue-session` / `prompt_cache_key` 与消除 `clavue-5.5-fast` 1–2s 过早取消**:`client.ts` 默认请求头新增 `x-clavue-session` 并修复 `built.__sessionHeaders = requestHeaders` 缓存命中原地刷新缺陷;`headers.ts` 自动从 `x-claude-code-session-id` 回填 `x-clavue-session`;`clavueSdk.ts` 与 `nativeDispatch.ts` 全路径透传 `prompt_cache_key`;`queryLoopImpl.ts` 的 `tier_assist` 补齐 `skipSystemPromptPrefix: true` 消除 ~908 token 膨胀并将 `light` 槽超时与 `PLAN_ASSIST_TIMEOUT_MS` 统一提升至 `3_500ms`。
13
+ - English: Long-context streaming resilience, vLLM Prefix Cache stabilization, `x-clavue-session` affinity, and `clavue-5.5-fast` abort fixes (#337): raises `clavue-5.5` first-byte timeout to `90s + 1s/1k` (cap 180s; 125s at 35K tokens) and `clavue-5.5-fast` to `45s + 0.5s/1k` (cap 90s), adds request-aware `firstTokenTimeoutMsForRequest` scaled by full `system + tools + messages` token estimates, and forwards upstream `: keep-alive\n\n` SSE heartbeat comments (LF & CRLF) through `streamTranslator.ts` to keep the idle watchdog alive during cold prefill; stops `/v1/chat/completions` from promoting per-turn `<system-reminder>` blocks into `messages[0]` and strips Anthropic's per-session `x-anthropic-billing-header:` via `flattenSystemPrompt({ stripBillingHeader: true })` so `messages[0]` and prior turns stay byte-immutable for vLLM Prefix Caching; emits and refreshes `x-clavue-session` in `client.ts` (fixing `built.__sessionHeaders = requestHeaders`), backfills it in `createResponsesHeaders`, propagates `prompt_cache_key` through `clavueSdk.ts` and `nativeDispatch.ts`, and sets `skipSystemPromptPrefix: true` + `3_500ms` timeout on `tier_assist` (`PLAN_ASSIST_TIMEOUT_MS = 3_500`) to stop 0.5–1s premature `client_gone` aborts on `clavue-5.5-fast`.
14
+
15
+ ## 1.85.3 - 2026-11-26
16
+
17
+ - **`clavue update` 升级体验降噪与实时进度、滞后镜像自动回退、冷历史超大 Transcript 自愈归档与一键清理:**
18
+ - **`clavue update` 仅展示安装/升级相关告警并透出实时进度**:`getDoctorDiagnostic()` 支持 `scope: 'install' | 'all'`,`clavue update` 仅报告安装方式、权限与 `PATH` 遮蔽等升级相关问题,不再把模型能力建议、文档提示和历史日志体积刷满升级界面;同时将 `Capability contract / best practices` 等文档指引在 `clavue doctor` 中降级为普通 `Note:`,不再伪装成黄色 `Warning:`。
19
+ - **锁定目标版本 + 心跳进度 + 滞后镜像官方源兜底**:`update.ts` 向 `installGlobalPackage(latestVersion, { onProgress })` 显式传入查到的目标版本并实时打印下载 GitHub tarball / 执行 `npm install -g` 阶段与每 10 秒耗时心跳告别「黑屏假卡死」;当国内 npm 镜像尚未同步新版本返回 `ETARGET`/`E404` 时自动回退 `--registry https://registry.npmjs.org` 重试一次。
20
+ - **历史超大(>100MB)Transcript 自动冷归档、汇总告警与 `clavue doctor --archive-transcripts`**:`sessionStorage.ts` 新增 `archiveColdOversizedTranscripts()`,在 `clavue doctor` 诊断时自动将超过 100MB 且超过 24 小时未改动的冷历史 `.jsonl` 无损重命名为 `*.jsonl.archive-*`(保留磁盘字节支持按需检索);多个活跃超大文件收敛为单条汇总告警,修正误导性 `Run /compact` 提示,并新增 `clavue doctor --archive-transcripts` 一键归档全部 `>100MB` 会话文件。
21
+ - English: Upgrade UX & oversized-transcript polish: scopes `clavue update` diagnostics to install/PATH/permission checks (`getDoctorDiagnostic({ scope: 'install' })`) and moves `Capability contract / best practices` out of yellow warnings into `Note:` lines; pins `latestVersion` and streams stage progress + 10s heartbeats during `installGlobalPackage()` with automatic `--registry https://registry.npmjs.org` retry on lagging mirror `ETARGET`/`E404` failures; adds `archiveColdOversizedTranscripts()` to automatically roll >24h-idle >100MB legacy transcripts without data loss, collapses multi-file transcript size warnings into a single summary with accurate remediation copy, and exposes `clavue doctor --archive-transcripts`.
22
+
7
23
  ## 1.85.2 - 2026-11-25
8
24
 
9
25
  - **JEV + Harness 最佳实践五支柱升级、云端 JEV 自动降级、Grok 对标单行日记重构与 WebGL/视觉交付门禁强化:**
package/README.md CHANGED
@@ -95,7 +95,7 @@ clavue-v1 --version
95
95
  Pin a version:
96
96
 
97
97
  ```bash
98
- curl -fsSL https://github.com/mycode699/clavue-public/releases/download/v1.85.2/install.sh | bash -s -- 1.85.2
98
+ curl -fsSL https://github.com/mycode699/clavue-public/releases/download/v1.85.4/install.sh | bash -s -- 1.85.4
99
99
  ```
100
100
 
101
101
  Upgrade later with `clavue update` or `clavue-v1 update` (startup check / `/update` also prefer the public v1 release, then fall back to npm).
@@ -106,7 +106,7 @@ Upgrade later with `clavue update` or `clavue-v1 update` (startup check / `/upda
106
106
  npm install -g clavue-v1
107
107
  # or one-shot:
108
108
  npx -y clavue-v1
109
- npx -y clavue-v1@1.85.2 --version
109
+ npx -y clavue-v1@1.85.4 --version
110
110
  ```
111
111
 
112
112
  One-line global install via the package (npm / unpkg):
@@ -118,7 +118,7 @@ curl -fsSL https://unpkg.com/clavue-v1/install.sh | bash
118
118
  Install a specific version globally:
119
119
 
120
120
  ```bash
121
- curl -fsSL https://unpkg.com/clavue-v1@1.85.2/install.sh | bash -s -- 1.85.2
121
+ curl -fsSL https://unpkg.com/clavue-v1@1.85.4/install.sh | bash -s -- 1.85.4
122
122
  ```
123
123
 
124
124
  ```bash