dsh-session-superagent 0.9.56 → 0.9.57

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,26 @@
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.57] - 2026-11-02 —— 对着全文抽检文案:最长 10 条里两处真问题
6
+
7
+ ### 学到的(知识库第 99 条)
8
+ 错误信息三原则里最容易破的一条:**别让用户猜主语**。
9
+
10
+ ### 抓到两处
11
+ 1. **占位符没填**(真 bug):`accessNoteForPanel(access)` 拿不到仓库名,
12
+ 输出"你对 **这个仓库** 只有读权限" —— 读着像半成品。
13
+ 改成传 `watcher.repo`:`你对 acme/widgets 只有读权限:…`;用例锁死不许再出现"你对 这个仓库"。
14
+ 2. **按钮旁边还教一遍**:没回音那行右侧本来就有「看建议规则」,正文又写"检查 AGENTS.md",
15
+ 72 字重复。改成说清后果:`连续 2 次被叫醒后没有回音 —— 会话可能没按规则处理`(55 字)。
16
+
17
+ ### 判据(写进 KB)
18
+ 1. 主语必须具体(不许"这个仓库""它");
19
+ 2. 旁边有按钮时,正文不重复动作;
20
+ 3. 单条 ≤ 80 字符。
21
+
22
+ ### 测试
23
+ - 新增 1 例。合计 **187 例**;面板文案快照 129 行已刷新。
24
+
5
25
  ## [0.9.56] - 2026-11-02 —— README 被自己清空过一次(已恢复;原因记进知识库)
6
26
 
7
27
  ### 事件
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.56-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.9.57-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 # 186 项单测
124
+ node --test # 187 项单测
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.56'
17
+ const CLIENT_VERSION = '0.9.57'
18
18
  let BASE = '/session-superagent'
19
19
  /**
20
20
  * 挑「最新的那个服务端实例」。
@@ -1129,13 +1129,13 @@ window.__ModuleLoader__.load({
1129
1129
  const structure = repoStructureNote(watcher.repoAccess)
1130
1130
  if (structure) problems.push({ key: 's-' + watcher.repo, text: structure })
1131
1131
  // 只读:以前只在行内显示一个徽章,客户在「需要关注」里看不到,也不知道回写会 403
1132
- const readOnly = accessNoteForPanel(watcher.repoAccess)
1132
+ const readOnly = accessNoteForPanel(watcher.repoAccess, watcher.repo)
1133
1133
  if (readOnly) problems.push({ key: 'ro-' + watcher.repo, text: readOnly })
1134
1134
  // 叫醒了但没回音:守在工作、消息也进去了,但会话没动手(规则缺失或被忽略)
1135
1135
  if (Number(watcher.silentWakes) >= 2) {
1136
1136
  problems.push({
1137
1137
  key: 'silent-' + watcher.repo,
1138
- text: watcher.repo + ' 已连续 ' + watcher.silentWakes + ' 次唤醒后没有回音(没看到 watch_ack)—— 检查这个仓库的 AGENTS.md 有没有给出处理规则',
1138
+ text: watcher.repo + ' 连续 ' + watcher.silentWakes + ' 次被叫醒后没有回音(没看到 watch_ack)—— 会话可能没按规则处理',
1139
1139
  action: { label: '看建议规则', onClick: () => setGlossary('rules:' + watcher.repo) },
1140
1140
  })
1141
1141
  }
@@ -1577,11 +1577,11 @@ window.__ModuleLoader__.load({
1577
1577
  }
1578
1578
 
1579
1579
  /** 只读仓库的提示(与服务端 gh-format.js:accessNote 同语义;面板要独立一份)。 */
1580
- function accessNoteForPanel(access) {
1580
+ function accessNoteForPanel(access, repo) {
1581
1581
  if (!access || typeof access !== 'object') return ''
1582
1582
  if (access.push === true) return ''
1583
1583
  if (access.push !== false) return ''
1584
- return '你对 ' + String(access.repo || '这个仓库') + ' 只有读权限:能看、能被叫醒,但没法回写评论或打标签 —— ' +
1584
+ return '你对 ' + String(access.repo || repo || '这个仓库') + ' 只有读权限:能看、能被叫醒,但没法回写评论或打标签 —— ' +
1585
1585
  '要么换有写权限的 token,要么把结论写在本地/PR 描述里。'
1586
1586
  }
1587
1587
 
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.56'
43
+ export const SERVER_VERSION = '0.9.57'
44
44
  export const inject = ['tools', 'agents', 'webServer']
45
45
  /** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
46
46
  const DEFAULT_SESSION_WAKES = 12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-session-superagent",
3
- "version": "0.9.56",
3
+ "version": "0.9.57",
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",