dsh-session-superagent 0.9.75 → 0.9.76

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.76] - 2026-11-02 —— 只有一条变化时,不再解释"为什么是这几条"
6
+
7
+ ### 为什么改
8
+ 只有一条变化时,消息里还挂着「本轮共 1 条变化;按最近更新取前 5 条」——
9
+ **本来就只有它,解释排序是纯噪音**,还占三行版面。
10
+
11
+ ### 改法
12
+ `formatWatchText`:`list.length <= 1 && changedTotal <= 1` 时不输出排序解释;
13
+ **但跳过信息必须保留**("本轮跳过 2 条"不是排序解释,而是"我还看过别的")。
14
+
15
+ ### 测试
16
+ - 新增 1 例:单条无解释、多条保留解释且带总数、单条+跳过时跳过信息仍在。合计 **193 例**。
17
+ - 离线演练脚本:62 行快照已刷新(示例里的两条消息仍带解释,符合预期)。
18
+
5
19
  ## [0.9.75] - 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.75-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.9.76-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 # 192 项单测
124
+ node --test # 193 项单测
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.75'
17
+ const CLIENT_VERSION = '0.9.76'
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.75'
43
+ export const SERVER_VERSION = '0.9.76'
44
44
  export const inject = ['tools', 'agents', 'webServer']
45
45
  /** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
46
46
  const DEFAULT_SESSION_WAKES = 12
package/lib/watch.js CHANGED
@@ -138,8 +138,13 @@ export function formatWatchText(repo, fresh, options = {}) {
138
138
  const whyLine = (() => {
139
139
  const parts = []
140
140
  const changed = Number(options.changedTotal)
141
- if (Number.isFinite(changed) && changed > 0) parts.push('本轮共 ' + changed + ' 条变化')
142
- if (options.batchLimit) parts.push('按「最近更新」取前 ' + options.batchLimit + ' 条')
141
+ const count = list.length
142
+ // 只有一条变化时,解释"为什么是这几条"就是噪音:本来就只有它
143
+ const onlyOne = count <= 1 && (!Number.isFinite(changed) || changed <= 1)
144
+ if (!onlyOne) {
145
+ if (Number.isFinite(changed) && changed > 0) parts.push('本轮共 ' + changed + ' 条变化')
146
+ if (options.batchLimit) parts.push('按「最近更新」取前 ' + options.batchLimit + ' 条')
147
+ }
143
148
  const skipped = options.skippedReasons && typeof options.skippedReasons === 'object'
144
149
  ? Object.entries(options.skippedReasons).filter(([, n]) => Number(n) > 0).slice(0, 3)
145
150
  : []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-session-superagent",
3
- "version": "0.9.75",
3
+ "version": "0.9.76",
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",