dsh-session-superagent 0.9.15 → 0.9.16
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 +20 -0
- package/README.md +1 -1
- package/client.js +14 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
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.16] - 2026-11-02 —— 可用性抽检:只读仓库没进「需要关注」
|
|
6
|
+
|
|
7
|
+
### 怎么做的(知识库第 65 条)
|
|
8
|
+
写了 `scripts/audit-ux-copy.mjs`,把三条失败路径的**现有文案**直接打出来看,
|
|
9
|
+
而不是凭记忆判断:
|
|
10
|
+
- ① 仓库没写权限 → 只有行内一个 `只读` 徽章,**「需要关注」里没有** ❌
|
|
11
|
+
- ② 会话没规则 → 有原因 + 「看建议规则」✅
|
|
12
|
+
- ③ 一直没动静 → 时间线 + 「还没唤醒过…点立刻 / 看需要关注」✅
|
|
13
|
+
|
|
14
|
+
### 改了什么
|
|
15
|
+
补上 `accessNoteForPanel()`(与服务端 `accessNote` 同语义),写进「需要关注」:
|
|
16
|
+
> 你对 owner/name 只有读权限:能看、能被叫醒,但没法回写评论或打标签 ——
|
|
17
|
+
> 要么换有写权限的 token,要么把结论写在本地/PR 描述里。
|
|
18
|
+
|
|
19
|
+
客户端独立一份是有意为之(不把服务端依赖带进浏览器包),这已是第三个这样的重复
|
|
20
|
+
(`repoBadges` / `durationText` / 本项)—— **每次都要两端各有用例**。
|
|
21
|
+
|
|
22
|
+
### 测试
|
|
23
|
+
- 新增 1 例。合计 **160 例**。
|
|
24
|
+
|
|
5
25
|
## [0.9.15] - 2026-11-02 —— 「只看有问题的」一键筛掉健康的守
|
|
6
26
|
|
|
7
27
|
### 学到的(知识库第 64 条)
|
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)
|
|
6
|
-
[](https://github.com/MYCF711/dsh-session-superagent/releases)
|
|
7
7
|
[](https://www.npmjs.com/package/dsh-session-superagent)
|
|
8
8
|
[](https://github.com/topics/dsh-plugin)
|
|
9
9
|
|
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.
|
|
17
|
+
const CLIENT_VERSION = '0.9.16'
|
|
18
18
|
let BASE = '/session-superagent'
|
|
19
19
|
/**
|
|
20
20
|
* 挑「最新的那个服务端实例」。
|
|
@@ -1112,6 +1112,10 @@ window.__ModuleLoader__.load({
|
|
|
1112
1112
|
for (const watcher of watchers) {
|
|
1113
1113
|
// 仓库结构问题(关闭 Issues / 是 fork)比轮询失败更早该说:它注定收不到条目
|
|
1114
1114
|
const structure = repoStructureNote(watcher.repoAccess)
|
|
1115
|
+
if (structure) problems.push({ key: 's-' + watcher.repo, text: structure })
|
|
1116
|
+
// 只读:以前只在行内显示一个徽章,客户在「需要关注」里看不到,也不知道回写会 403
|
|
1117
|
+
const readOnly = accessNoteForPanel(watcher.repoAccess)
|
|
1118
|
+
if (readOnly) problems.push({ key: 'ro-' + watcher.repo, text: readOnly })
|
|
1115
1119
|
// 叫醒了但没回音:守在工作、消息也进去了,但会话没动手(规则缺失或被忽略)
|
|
1116
1120
|
if (Number(watcher.silentWakes) >= 2) {
|
|
1117
1121
|
problems.push({
|
|
@@ -1484,6 +1488,15 @@ window.__ModuleLoader__.load({
|
|
|
1484
1488
|
return rest > 0 ? hours + ' 小时 ' + rest + ' 分' : hours + ' 小时'
|
|
1485
1489
|
}
|
|
1486
1490
|
|
|
1491
|
+
/** 只读仓库的提示(与服务端 gh-format.js:accessNote 同语义;面板要独立一份)。 */
|
|
1492
|
+
function accessNoteForPanel(access) {
|
|
1493
|
+
if (!access || typeof access !== 'object') return ''
|
|
1494
|
+
if (access.push === true) return ''
|
|
1495
|
+
if (access.push !== false) return ''
|
|
1496
|
+
return '你对 ' + String(access.repo || '这个仓库') + ' 只有读权限:能看、能被叫醒,但没法回写评论或打标签 —— ' +
|
|
1497
|
+
'要么换有写权限的 token,要么把结论写在本地/PR 描述里。'
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1487
1500
|
/** 仓库能力徽章(与服务端 watch.js:repoBadges 同语义)。 */
|
|
1488
1501
|
function repoBadges(access) {
|
|
1489
1502
|
if (!access || typeof access !== 'object') return []
|
package/lib/index.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
|
|
33
33
|
export const name = 'dsh-session-superagent'
|
|
34
34
|
/** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
|
|
35
|
-
export const SERVER_VERSION = '0.9.
|
|
35
|
+
export const SERVER_VERSION = '0.9.16'
|
|
36
36
|
export const inject = ['tools', 'agents', 'webServer']
|
|
37
37
|
/** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
|
|
38
38
|
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.
|
|
3
|
+
"version": "0.9.16",
|
|
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",
|