dsh-session-superagent 0.8.57 → 0.8.58
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 +21 -0
- package/MAINTENANCE.md +1 -1
- package/README.md +2 -2
- package/client.js +1 -1
- package/lib/index.js +7 -1
- package/lib/watch.js +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
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.8.58] - 2026-11-02 —— 完成标准从"一大句"改成可逐条核对的三条
|
|
6
|
+
|
|
7
|
+
### 学到的(知识库第 7 条)
|
|
8
|
+
Martin Fowler《Given When Then》:验收要写成**可观察的结果**,而不是一句愿望。
|
|
9
|
+
<https://martinfowler.com/bliki/GivenWhenThen.html>
|
|
10
|
+
|
|
11
|
+
### 改了什么
|
|
12
|
+
唤醒消息结尾原来是一大句「完成标准 = 有测试结果…」,信息都在但**不可逐条核对**。现在独立成块:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
【完成标准】
|
|
16
|
+
1. 改了什么:文件清单 + 一句话为什么(别只写"已修复")
|
|
17
|
+
2. 怎么验证的:跑过的测试/命令 + 结果;跑不了就写清为什么跑不了
|
|
18
|
+
3. 回写到哪:推分支并开 PR(隔离模式)/ 在 issue 里留言 + watch_ack 打标签
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
第 3 条随「是否隔离执行」变化;最多 4 条,超出丢弃;不传时退回原那句话(不硬编)。
|
|
22
|
+
|
|
23
|
+
### 测试
|
|
24
|
+
- 新增 1 例:必须出现【完成标准】、按序号列出、第 5 条起丢弃、不传时不出现。合计 **112 例**。
|
|
25
|
+
|
|
5
26
|
## [0.8.57] - 2026-11-02 —— 唤醒消息带上「为什么是这几条」
|
|
6
27
|
|
|
7
28
|
### 学到的(知识库第 6 条)
|
package/MAINTENANCE.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## 二、当前状态(2026-11-01)
|
|
11
11
|
|
|
12
|
-
- [x] 七个工具可用(github / repo_here / watch_start / watch_status / watch_stop / watch_ack / watch_doctor),`node --test`
|
|
12
|
+
- [x] 七个工具可用(github / repo_here / watch_start / watch_status / watch_stop / watch_ack / watch_doctor),`node --test` 112/112 通过
|
|
13
13
|
- [x] 自回声抑制(逐条水位)
|
|
14
14
|
- [x] 仅空闲注入(避免草稿回放)
|
|
15
15
|
- [x] 唤醒失败不推进水位
|
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
|
|
|
@@ -99,7 +99,7 @@ dsh plugin install /path/to/dsh-session-superagent
|
|
|
99
99
|
## 开发
|
|
100
100
|
|
|
101
101
|
```sh
|
|
102
|
-
node --test #
|
|
102
|
+
node --test # 112 项单测
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
版本与发布流程见 [UPDATING.md](UPDATING.md),交付门见 [CHECKLIST.md](CHECKLIST.md),接手台账见 [MAINTENANCE.md](MAINTENANCE.md)。
|
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.8.
|
|
17
|
+
const CLIENT_VERSION = '0.8.58'
|
|
18
18
|
let BASE = '/session-superagent'
|
|
19
19
|
/**
|
|
20
20
|
* 挑「最新的那个服务端实例」。
|
package/lib/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
|
|
31
31
|
export const name = 'dsh-session-superagent'
|
|
32
32
|
/** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
|
|
33
|
-
export const SERVER_VERSION = '0.8.
|
|
33
|
+
export const SERVER_VERSION = '0.8.58'
|
|
34
34
|
export const inject = ['tools', 'agents', 'webServer']
|
|
35
35
|
|
|
36
36
|
/** 仅供测试:读写状态文件(生产代码不要用)。 */
|
|
@@ -583,6 +583,12 @@ async function pollOnce(ctx, entry, baseMs) {
|
|
|
583
583
|
isolation,
|
|
584
584
|
// entry.goal 之前只写不读:现在真的进唤醒消息
|
|
585
585
|
goal: entry.goal || '',
|
|
586
|
+
// 完成标准要可观测(Given-When-Then 的思路):三件事缺一不算完成
|
|
587
|
+
criteria: [
|
|
588
|
+
'改了什么:文件清单 + 一句话为什么(别只写"已修复")',
|
|
589
|
+
'怎么验证的:跑过的测试/命令 + 结果;跑不了就写清为什么跑不了',
|
|
590
|
+
iso && iso.dir ? '回写到哪:推分支并开 PR,然后在 issue 里留言 + watch_ack 打标签' : '回写到哪:在 issue 里留言 + watch_ack 打标签',
|
|
591
|
+
],
|
|
586
592
|
// 「为什么是这几条」:把本轮的筛选依据一并写进任务书
|
|
587
593
|
changedTotal: fresh.length,
|
|
588
594
|
batchLimit: listed.length,
|
package/lib/watch.js
CHANGED
|
@@ -131,6 +131,13 @@ export function formatWatchText(repo, fresh, options = {}) {
|
|
|
131
131
|
if (skipped.length > 0) parts.push('同时跳过 ' + skipped.map(([reason, n]) => reason + ' × ' + n).join('、'))
|
|
132
132
|
return parts.length > 0 ? String.fromCharCode(10) + '【为什么是这几条】' + parts.join(';') : ''
|
|
133
133
|
})()
|
|
134
|
+
// 完成标准要「可观测」:只说"做好它"等于没说。
|
|
135
|
+
// 依据:Given-When-Then 的核心是把验收写成可观察的结果(martinfowler.com/bliki/GivenWhenThen.html)。
|
|
136
|
+
const criteria = Array.isArray(options.criteria) ? options.criteria.filter(Boolean).slice(0, 4) : []
|
|
137
|
+
const criteriaLine = criteria.length > 0
|
|
138
|
+
? String.fromCharCode(10) + '【完成标准】' + String.fromCharCode(10)
|
|
139
|
+
+ criteria.map((line, i) => (i + 1) + '. ' + line).join(String.fromCharCode(10))
|
|
140
|
+
: ''
|
|
134
141
|
return (
|
|
135
142
|
`【主理鱼】${repo} 有 ${lines.length} 条新动态:\n` +
|
|
136
143
|
lines.join('\n') +
|
|
@@ -138,6 +145,7 @@ export function formatWatchText(repo, fresh, options = {}) {
|
|
|
138
145
|
moreLine +
|
|
139
146
|
isoLine +
|
|
140
147
|
goalLine +
|
|
148
|
+
criteriaLine +
|
|
141
149
|
'\n\n先读仓库 AGENTS.md 的判断规则,再决定「修 / 回 / 待定」。完成标准 = 有测试结果:没跑测试不算完成,跑不了就写清原因;做完一条就写回 GitHub,并调用 watch_ack 打上已处理标签,不要扩大范围。'
|
|
142
150
|
)
|
|
143
151
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-session-superagent",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.58",
|
|
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",
|