@luchenglong/cli-bridge 0.2.12 → 0.2.13

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
@@ -9,6 +9,35 @@ GitHub Release(`scripts/verify.mjs` 在 CI 与 prepack 双重锁一致)。
9
9
  > - CodeBuddy 线:[docs/history/codebuddy/CHANGELOG.md](docs/history/codebuddy/CHANGELOG.md)(终版 1.6.2)
10
10
  > - MiMo 线:[docs/history/mimo/CHANGELOG.md](docs/history/mimo/CHANGELOG.md)(终版 1.2.9)
11
11
 
12
+ ## [0.2.13] - 2026-10-20
13
+
14
+ > 用户反馈「通道可能通了,但是我没有看到状态灯」。查证后:**灯没坏,是显示条件没被满足**
15
+ > —— 常规会话里没有活动就不出现(这是 0.2.1 修「灯永久挂着」时定的),而按用户要求
16
+ > 「跑完后 10 秒内消失」之前的窗口是 **60 秒**。
17
+
18
+ ### Changed
19
+ - **完成态指示灯淡出窗口 60s → 10s**(`PROJECT_DONE_TTL_MS`)。用户明确要求:常规会话里
20
+ 不调用就不出现、调用时亮、**跑完 10 秒内消失**。运行中仍走 10 分钟防抖(短暂停顿不该让灯闪)。
21
+ 已完成项目只在 pill 行淡出,弹窗里仍保留作历史,不丢数据。
22
+ - **专用模式(preset 会话)的常驻灯不受影响**:那条路径走客户端 `readyShow`(`iAm === true`),
23
+ 与 stale 标记无关。活动期间显示活动灯,10s 后自然回落到常驻的「就绪」灯。
24
+
25
+ ### 排查结论(供后来者,避免重复怀疑是 bug)
26
+ - 家级只暴露 `/cli-bridge/status` 等**只读**路由,没有可以从外部注入活动的入口;灯的数据
27
+ 必须由宿主真实执行时上报。
28
+ - 两条上报路径:preset/dynamic 形态走 `ctx.emit('<id>/status')` /
29
+ `cliBridgeCollector.mergeSnapshot`;**MCP 形态**原子写
30
+ `{dsh-home}/cli-bridge-mcp-<id>.json`,家级在响应 status 时读盘合并。
31
+ - 灯是否渲染:`fresh`(未 stale 的项目)**或** `readyShow`(当前会话就属于该 provider 的
32
+ preset)二者之一非空。两者都空 → 整行不渲染。所以「普通会话 + 无近期活动」下看不到灯
33
+ 是设计而非故障。
34
+
35
+ ### Added
36
+ - `tests/e2e/mcp-lamp-e2e.mjs`:跑**真实 stdio MCP 协议**(initialize → tools/list →
37
+ tools/call),验证 `cli-bridge-mcp-<id>.json` 被写入。传 `CLB_MCP_HOME` 可指向真实
38
+ dsh-home,实测 MCP 调用后 `status` 立即出现 `state=ok / stale=false / age=0s`,
39
+ 证明「常规会话调用 → 灯亮」这条链路成立。
40
+
12
41
  ## [0.2.12] - 2026-10-20
13
42
 
14
43
  > 起因是用户问「现在所有 CLI 都是默认无需用户点确认的模式吗」。核对后发现 **codex 不是** ——
@@ -252,9 +252,12 @@ window.__ModuleLoader__.load({
252
252
  return function () { window.removeEventListener("keydown", h); };
253
253
  }, [open]);
254
254
  const pills = [];
255
- // 陈旧过滤(0.2.1 修复「指示灯长期存在」):stale 项目(>10min 无活动且未运行)不再
256
- // 渲染成常亮灯。历史事故:一次失败后 ✗ AGY 灯永久挂在那 —— 弹窗里仍列 stale 项目作
257
- // 历史,但 pill 行只认新鲜活动。
255
+ // 陈旧过滤(0.2.1 修复「指示灯长期存在」):stale 项目不再渲染成常亮灯。
256
+ // 历史事故:一次失败后 ✗ AGY 灯永久挂在那 —— 弹窗里仍列 stale 项目作历史,
257
+ // 但 pill 行只认新鲜活动。stale 由服务端按两态 TTL 标记(运行中 10min 防抖 /
258
+ // 已收口 10s 淡出,见 index.mjs 的 PROJECT_DONE_TTL_MS)。
259
+ // 常规会话:不调用就不出现,调用时亮,跑完 10s 内消失;
260
+ // 专用模式(preset 会话):活动灯淡出后回落到下面 readyShow 的常驻「就绪」灯。
258
261
  for (const meta of metas) {
259
262
  const b = (s && s.providers && s.providers[meta.id]) || null;
260
263
  if (!b) continue;
@@ -39,8 +39,13 @@ export const PROJECT_TTL_MS = 10 * 60 * 1000
39
39
  * 想看到灯灭」来说太长:任务结束后灯要挂满 10 分钟才消失,用户感知是「灯不灭」。
40
40
  * 区分两态:运行中(含短暂间隔)保持长 TTL 防抖;已收口的项目走短 TTL 快速淡出。
41
41
  * 淡出只影响 pill 渲染(stale 项目仍在弹窗里作历史),不丢数据。
42
+ *
43
+ * 用户要求(0.2.13):常规会话里「任务跑完后 10 秒内消失」,故取 10s。
44
+ * 注意这**不影响专用模式(preset 会话)的常驻灯** —— 那条路径走客户端 readyShow
45
+ * (iAm===true),与这里的 stale 标记无关:活动期显示活动灯,10s 后自然回落成
46
+ * 常驻的「就绪」灯。
42
47
  */
43
- export const PROJECT_DONE_TTL_MS = 60 * 1000
48
+ export const PROJECT_DONE_TTL_MS = 10 * 1000
44
49
  export const MAX_PROJECTS = 24
45
50
  export const MAX_SESSIONS = 64
46
51
 
@@ -33,7 +33,7 @@ import * as claudeMcp from './providers/claude.mjs'
33
33
  import * as codexMcp from './providers/codex.mjs'
34
34
 
35
35
  const SERVER_NAME = 'cli-bridge-mcp'
36
- const SERVER_VERSION = '0.2.12'
36
+ const SERVER_VERSION = '0.2.13'
37
37
  const PROTOCOL = '2024-11-05'
38
38
 
39
39
  const PROVIDERS = [agyMcp, codebuddyMcp, mimoMcp, opencodeMcp, claudeMcp, codexMcp]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luchenglong/cli-bridge",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "CLI Bridge for DeepSeek Harness (DSH): one package bridging six local coding-CLI agents — agy (Google Antigravity CLI), Tencent CodeBuddy Code, Xiaomi MiMo (MiMoCode), OpenCode, Claude Code, and OpenAI Codex CLI. Each provider keeps its own agent preset (cordis-agy / codebuddy-first / cordis-mimo / opencode-first / claude-first / codex-first), tools (<id>_run / <id>_continue / <id>_status, plus per-provider model listing), rate-limit/network fallback dialog, and zero-dependency MCP server, unified under a single home-level status light, one settings file, and one bundle patch. Merges agy-first-bridge, codebuddy-first-bridge and mimo-first-bridge.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {