dsh-session-superagent 0.9.98 → 0.9.99

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
@@ -2,6 +2,20 @@
2
2
 
3
3
  格式参照 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
4
4
 
5
+ ## [0.9.99] - 2026-11-02 —— trace 也做「例外优先」:正常两行说完
6
+
7
+ ### 为什么
8
+ `watch_trace` 原来固定输出 5 类细节(seen / 上次上报 / 被过滤 / 被冷却吸收 / 唤醒尝试),
9
+ **正常条目也全打** —— 问"#55 怎么了"时,客户要在一堆行里找那句结论。
10
+
11
+ ### 改法
12
+ - 一切正常(有成功唤醒、无过滤、无吸收)→ **两行**:结论 + `最近一次唤醒:<时间>(成功)`;
13
+ - 出现过滤 / 吸收 / 唤醒失败 → 才展开完整细节(保持原有信息量)。
14
+ - JSON 输出不变(机器契约不动)。
15
+
16
+ ### 测试
17
+ 新增 1 例:正常两行且不含 `水位 seen`;有失败唤醒时展开并带上 `agent busy`。合计 **211 例**。
18
+
5
19
  ## [0.9.98] - 2026-11-02 —— 错误旁边给一个「下一步」按钮
6
20
 
7
21
  ### 为什么
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <img src="assets/icon-180.png" width="88" height="88" alt="">
4
4
 
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
- [![Version](https://img.shields.io/badge/version-0.9.98-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.9.99-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
7
7
  [![npm](https://img.shields.io/npm/v/dsh-session-superagent.svg)](https://www.npmjs.com/package/dsh-session-superagent)
8
8
  [![dsh](https://img.shields.io/badge/DeepSeek%20Harness-plugin-orange.svg)](https://github.com/topics/dsh-plugin)
9
9
 
@@ -121,7 +121,7 @@ dsh plugin install /path/to/dsh-session-superagent
121
121
  ## 开发
122
122
 
123
123
  ```sh
124
- node --test # 210 项单测
124
+ node --test # 211 项单测
125
125
  ```
126
126
 
127
127
  ### 工具输出:文本给人和 agent,JSON 给程序
package/client.js CHANGED
@@ -14,7 +14,7 @@ window.__ModuleLoader__.load({
14
14
  const { useCallback, useEffect, useRef, useState } = React
15
15
 
16
16
  // 客户端版本探针:每次模块加载写一次,用来确认浏览器里跑的是哪一版
17
- const CLIENT_VERSION = '0.9.98'
17
+ const CLIENT_VERSION = '0.9.99'
18
18
  let BASE = '/session-superagent'
19
19
  /**
20
20
  * 挑「最新的那个服务端实例」。
package/lib/index.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
 
41
41
  export const name = 'dsh-session-superagent'
42
42
  /** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
43
- export const SERVER_VERSION = '0.9.98'
43
+ export const SERVER_VERSION = '0.9.99'
44
44
  export const inject = ['tools', 'agents', 'webServer']
45
45
  /** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
46
46
  // 本进程启动时刻:用来区分「刚重启还没轮到」与「定时器真的丢了」
@@ -1833,11 +1833,18 @@ const UPDATE_CACHE_MS = 10 * 60 * 1000
1833
1833
  const touched = Boolean(trace.seen || trace.reported || trace.filtered.length || trace.wakes.length)
1834
1834
  if (!touched) continue
1835
1835
  lines.push('#' + trace.number + ' @ ' + (trace.repo || '?') + ':' + trace.verdict)
1836
- if (trace.seen) lines.push(' 水位 seen:' + trace.seen)
1837
- if (trace.reported) lines.push(' 上次上报:' + trace.reported)
1838
- for (const item of trace.filtered) lines.push(' 被过滤(' + item.reason + '):' + item.at)
1839
- for (const item of trace.absorbed || []) lines.push(' 被冷却期吸收:' + item.at)
1840
- for (const item of trace.wakes) lines.push(' 唤醒尝试:' + item.at + ' ' + (item.ok ? '成功' : '失败(' + (item.reason || '未知') + ')'))
1836
+ // 例外优先:一切正常时一行说完,只有「被过滤/被吸收/唤醒失败」才展开细节
1837
+ const quiet = trace.filtered.length === 0 && (trace.absorbed || []).length === 0
1838
+ && trace.wakes.length > 0 && trace.wakes.every((item) => item.ok)
1839
+ if (!quiet) {
1840
+ if (trace.seen) lines.push(' 水位 seen:' + trace.seen)
1841
+ if (trace.reported) lines.push(' 上次上报:' + trace.reported)
1842
+ for (const item of trace.filtered) lines.push(' 被过滤(' + item.reason + '):' + item.at)
1843
+ for (const item of trace.absorbed || []) lines.push(' 被冷却期吸收:' + item.at)
1844
+ for (const item of trace.wakes) lines.push(' 唤醒尝试:' + item.at + ' ' + (item.ok ? '成功' : '失败(' + (item.reason || '未知') + ')'))
1845
+ } else if (trace.wakes.length > 0) {
1846
+ lines.push(' 最近一次唤醒:' + trace.wakes[trace.wakes.length - 1].at + '(成功)')
1847
+ }
1841
1848
  }
1842
1849
  if (args && args.format === 'json') {
1843
1850
  const results = []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-session-superagent",
3
- "version": "0.9.98",
3
+ "version": "0.9.99",
4
4
  "description": "Session-level superagent for DeepSeek Harness: watch a GitHub repository and wake a session when something needs doing. Credentials never reach the model.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",