dsh-session-superagent 0.9.284 → 0.9.285
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 +18 -0
- package/README.md +3 -3
- package/client.js +4 -3
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
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.285] - 2026-11-06 —— /state 会话上下文修复
|
|
6
|
+
|
|
7
|
+
### 主面板带 sessionId
|
|
8
|
+
|
|
9
|
+
- 主面板 `load()` 在 sessionId 存在时请求 `/state?sessionId=<encodeURIComponent>`。
|
|
10
|
+
- 服务端现在能返回正确的 `sessionGoal / sessionTitle / sessionUsage`,不再因为缺参置空。
|
|
11
|
+
- 空 sessionId 保持原请求,不串用其它会话 goal;Orbit 的独立 `/state` 调用不变。
|
|
12
|
+
- 服务端行为不改,只补客户端与 routes 契约。
|
|
13
|
+
|
|
14
|
+
### 验证
|
|
15
|
+
|
|
16
|
+
- 离线联合 client + update-ui + routes:**214/214**。
|
|
17
|
+
- 全量:**645/645**。
|
|
18
|
+
- 真实 Chromium:**47/47**。
|
|
19
|
+
- fixture 精确校验 sessionId query,没有放宽断言。
|
|
20
|
+
|
|
21
|
+
未验真实 DSH Web GUI 与真实 watcher 写操作。按 Git 工作流保留本地候选。
|
|
22
|
+
|
|
5
23
|
## [0.9.284] - 2026-11-06 —— Orbit 并发与删除错误修复
|
|
6
24
|
|
|
7
25
|
### 写操作 busy 锁
|
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
|
[](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)
|
|
@@ -148,7 +148,7 @@ Gitee 私有仓库要在「设置 → 凭证」填私人令牌;公开仓库不
|
|
|
148
148
|
## 开发
|
|
149
149
|
|
|
150
150
|
```sh
|
|
151
|
-
npm test #
|
|
151
|
+
npm test # 645 项单测(带离线开关;裸 node --test 会真去 spawn gh,两分半)
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
### 工具输出:文本给人和 agent,JSON 给程序
|
|
@@ -208,7 +208,7 @@ dsh plugin --profile <profile> add dsh-session-superagent@latest
|
|
|
208
208
|
|
|
209
209
|
|
|
210
210
|
```bash
|
|
211
|
-
npm test #
|
|
211
|
+
npm test # 645 项单测(带离线开关,约 1.6 秒)
|
|
212
212
|
node scripts/ui-audit.mjs # 11 项 UI 指标(写死颜色 / 自造 token / 官方结构采用 …)
|
|
213
213
|
node scripts/preflight.mjs # 41 项门禁(含上面两条,外加 profile 一致性、路由面、包内容)
|
|
214
214
|
node scripts/render-preview.mjs preview.html # 双主题静态预览,直接浏览器打开
|
package/client.js
CHANGED
|
@@ -418,7 +418,7 @@ window.__ModuleLoader__.load({
|
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
// 客户端版本探针:每次模块加载写一次,用来确认浏览器里跑的是哪一版
|
|
421
|
-
const CLIENT_VERSION = '0.9.
|
|
421
|
+
const CLIENT_VERSION = '0.9.285'
|
|
422
422
|
// SEMVER_COMPARATOR_SOURCE_START
|
|
423
423
|
// This block is duplicated verbatim in client.js because the browser UMD cannot import ESM.
|
|
424
424
|
// test/update-semver.test.mjs audits both copies and exercises their behavior.
|
|
@@ -2096,8 +2096,9 @@ window.__ModuleLoader__.load({
|
|
|
2096
2096
|
const loadSeqRef = useRef(0)
|
|
2097
2097
|
const load = useCallback(async () => {
|
|
2098
2098
|
const seq = ++loadSeqRef.current
|
|
2099
|
+
const statePath = sessionId ? '/state?sessionId=' + encodeURIComponent(String(sessionId)) : '/state'
|
|
2099
2100
|
try {
|
|
2100
|
-
const payload = await call(
|
|
2101
|
+
const payload = await call(statePath, stateEtag ? { headers: { 'if-none-match': stateEtag } } : undefined)
|
|
2101
2102
|
if (seq !== loadSeqRef.current) return null // 已经有更新的一次请求在飞:这次结果作废
|
|
2102
2103
|
// 304:内容没变,别白白重渲染 —— 前提是本地已经有一份能渲染的 body
|
|
2103
2104
|
if (payload && payload.notModified) {
|
|
@@ -2115,7 +2116,7 @@ window.__ModuleLoader__.load({
|
|
|
2115
2116
|
setSnap((prev) => ({ loading: false, error: String((error && error.message) || error), body: prev.body }))
|
|
2116
2117
|
return null
|
|
2117
2118
|
}
|
|
2118
|
-
}, [])
|
|
2119
|
+
}, [sessionId])
|
|
2119
2120
|
|
|
2120
2121
|
useEffect(() => { ensurePortedCss() }, [])
|
|
2121
2122
|
usePoll(load, POLL_MS)
|
package/lib/index.js
CHANGED
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
|
|
50
50
|
export const name = 'dsh-session-superagent'
|
|
51
51
|
/** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
|
|
52
|
-
export const SERVER_VERSION = '0.9.
|
|
52
|
+
export const SERVER_VERSION = '0.9.285'
|
|
53
53
|
export const inject = ['tools', 'agents', 'webServer']
|
|
54
54
|
/** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
|
|
55
55
|
// 本进程启动时刻:用来区分「刚重启还没轮到」与「定时器真的丢了」
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-session-superagent",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.285",
|
|
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",
|