dsh-session-superagent 0.8.93 → 0.8.94

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.8.94] - 2026-11-02 —— 面板顶部直接告诉你「该重启了」
6
+
7
+ ### 学到的(知识库第 43 条)
8
+ Kubernetes 的 `generation` vs `observedGeneration` 是同一类问题:
9
+ **声明的版本**和**控制器实际处理到的版本**要分别暴露,否则"看起来生效了"和"真的生效了"分不清。
10
+ <https://kubernetes.io/docs/reference/using-api/api-concepts/#generation-and-observedgeneration>
11
+ (我们对应的是「磁盘装好的版本」vs「进程里跑着的版本」。)
12
+
13
+ ### 为什么值得
14
+ 上一轮 `watch_doctor` 能报版本漂移,但**只有 agent 调 doctor 才看得到**,客户看不到。
15
+ 而"客户端热重载生效、服务端不生效"正是最容易让人困惑的状态:界面是新样式,功能却没生效。
16
+
17
+ ### 改了什么
18
+ - `/state` 新增 `installedVersion`(磁盘)与 `runningVersion`(进程);
19
+ - 两者不一致时,面板**顶部横幅**:
20
+ > 代码已更新到 0.9.0,但宿主还在跑 0.8.4 —— 服务端改动需要重启宿主才生效(客户端部分已生效,所以界面可能看起来是新的)。
21
+
22
+ ### 测试
23
+ - 新增 1 例:漂移时必须出现横幅且写出两个版本号;一致时不得出现。合计 **138 例**。
24
+
5
25
  ## [0.8.93] - 2026-11-02 —— 让 watch_doctor 自己说出"改了没重启"
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.8.93-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.8.94-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
 
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.93'
17
+ const CLIENT_VERSION = '0.8.94'
18
18
  let BASE = '/session-superagent'
19
19
  /**
20
20
  * 挑「最新的那个服务端实例」。
@@ -1143,6 +1143,12 @@ window.__ModuleLoader__.load({
1143
1143
  '还没有唤醒过:守会在仓库出现新条目时叫醒这个会话。'
1144
1144
  + '想先试一次,点行里的「立刻」;如果一直没动静,看上面「需要关注」里有没有被过滤的记录。')
1145
1145
  : null,
1146
+ // 需要重启:这是"功能看起来没生效"最常见的根因,必须显眼
1147
+ (body.installedVersion && body.runningVersion && body.installedVersion !== body.runningVersion)
1148
+ ? h('div', { className: 'dt-banner dt-danger', key: 'restart-needed' },
1149
+ '代码已更新到 ' + body.installedVersion + ',但宿主还在跑 ' + body.runningVersion
1150
+ + ' —— 服务端改动需要重启宿主才生效(客户端部分已生效,所以界面可能看起来是新的)。')
1151
+ : null,
1146
1152
  badgeFilter
1147
1153
  ? h('div', { className: 'dt-row-meta', key: 'badge-filter' },
1148
1154
  h('span', null, '只看 ' + badgeFilter + ' 的守(' + visible.length + ' 条):'),
package/lib/index.js CHANGED
@@ -31,7 +31,7 @@ import {
31
31
 
32
32
  export const name = 'dsh-session-superagent'
33
33
  /** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
34
- export const SERVER_VERSION = '0.8.93'
34
+ export const SERVER_VERSION = '0.8.94'
35
35
  export const inject = ['tools', 'agents', 'webServer']
36
36
 
37
37
  /** 仅供测试:读写状态文件(生产代码不要用)。 */
@@ -1114,6 +1114,9 @@ export function apply(ctx) {
1114
1114
  credentials: secretsSummary(),
1115
1115
  sessionGoal: goalView(ctx, focusSession),
1116
1116
  stateSource,
1117
+ // 版本漂移:文件换了但宿主还在跑老模块(客户端热重载会掩盖这件事)
1118
+ installedVersion: installedVersion(),
1119
+ runningVersion: SERVER_VERSION,
1117
1120
  triageSignals: TRIAGE_SIGNALS,
1118
1121
  tokenScopes: scopesCache.value || null,
1119
1122
  isolation: isolationReport(Object.values(state.watchers || {})),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-session-superagent",
3
- "version": "0.8.93",
3
+ "version": "0.8.94",
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",