dsh-session-superagent 0.9.105 → 0.9.106

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,23 @@
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.106] - 2026-11-02 —— 两个会话同守一个仓库:ack 标签是共享的,现在说清了
6
+
7
+ ### 语义(先说清再说改)
8
+ ack 标签打在 **issue/PR** 上,是**仓库级**的。所以:
9
+ - A 会话 ack 后,B 会话的下一轮会把它当"已处理"跳过(判定日志里记「已 ack」);
10
+ - 这通常是**对的**(避免两边重复修同一个 bug),但客户必须知道。
11
+
12
+ ### 改了什么
13
+ 1. 面板在"还有 N 个会话也在守"后面补一句:
14
+ `(各自独立唤醒;但 ack 标签是仓库级的 —— 任一方 ack 后两边都会跳过,想让两边各处理各的就给对方设不同标签)`
15
+ 2. `watch_start` 新增 `ackLabel` 参数(以前只有面板能设)—— 想让两个会话各用各的标签,现在工具也能配;
16
+ 3. 顺手修了一个默认值缺失:`watch_start` 创建守时**没写** `ackLabel` 字段(面板路径有),
17
+ 靠读取时兜底才没出事;现在创建时就落盘 `主理鱼:已处理`。
18
+
19
+ ### 测试
20
+ 新增 1 例(自定义标签写入状态 / 不传时用默认),更新 1 例(面板文案)。合计 **215 例**。
21
+
5
22
  ## [0.9.105] - 2026-11-02 —— ack 标签被人删掉会怎样?四种情形都验了一遍
6
23
 
7
24
  ### 查了什么
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.105-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.9.106-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
 
@@ -122,7 +122,7 @@ dsh plugin install /path/to/dsh-session-superagent
122
122
  ## 开发
123
123
 
124
124
  ```sh
125
- node --test # 214 项单测
125
+ node --test # 215 项单测
126
126
  ```
127
127
 
128
128
  ### 工具输出:文本给人和 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.105'
17
+ const CLIENT_VERSION = '0.9.106'
18
18
  let BASE = '/session-superagent'
19
19
  /**
20
20
  * 挑「最新的那个服务端实例」。
@@ -1090,7 +1090,7 @@ window.__ModuleLoader__.load({
1090
1090
  ].filter(Boolean).join(' · ')),
1091
1091
  watcher.lastDeferred ? h('div', { className: 'dt-ticket-note' }, watcher.lastDeferred) : null,
1092
1092
  (watcher.otherSessions && watcher.otherSessions.length > 0)
1093
- ? h('div', { className: 'dt-ticket-note' }, '还有 ' + watcher.otherSessions.length + ' 个会话也在守这个仓库:' + watcher.otherSessions.join('、') + '(各自独立唤醒,互不影响)')
1093
+ ? h('div', { className: 'dt-ticket-note' }, '还有 ' + watcher.otherSessions.length + ' 个会话也在守这个仓库:' + watcher.otherSessions.join('、') + '(各自独立唤醒;但 ack 标签是仓库级的 —— 任一方 ack 后两边都会跳过,想让两边各处理各的就给对方设不同标签)')
1094
1094
  : null,
1095
1095
  watcher.lastError ? (() => {
1096
1096
  const parts = splitErrorText(watcher.lastError)
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.105'
43
+ export const SERVER_VERSION = '0.9.106'
44
44
  export const inject = ['tools', 'agents', 'webServer']
45
45
  /** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
46
46
  // 本进程启动时刻:用来区分「刚重启还没轮到」与「定时器真的丢了」
@@ -2054,6 +2054,7 @@ const UPDATE_CACHE_MS = 10 * 60 * 1000
2054
2054
  isolateKeepDays: { type: 'number', description: 'With isolated: remove isolation worktrees older than this many days (1-30, default 3).' },
2055
2055
  maxIsolated: { type: 'number', description: 'With isolated: keep at most this many worktrees, oldest removed first (1-50, default 5).' },
2056
2056
  goal: { type: 'string', description: 'Optional per-watcher goal appended to the wake message.' },
2057
+ ackLabel: { type: 'string', description: 'Label used as the handled marker (default 主理鱼:已处理). Two sessions watching the same repo share it unless each sets its own.' },
2057
2058
  },
2058
2059
  async execute(args) {
2059
2060
  const toolAgents = agentsService(ctx)
@@ -2080,6 +2081,7 @@ const UPDATE_CACHE_MS = 10 * 60 * 1000
2080
2081
  id, repo, sessionId,
2081
2082
  intervalSec: 60,
2082
2083
  cooldownMs: DEFAULT_COOLDOWN_MS,
2084
+ ackLabel: DEFAULT_ACK_LABEL,
2083
2085
  cursor: null,
2084
2086
  seen: {},
2085
2087
  lastReported: {},
@@ -2112,6 +2114,7 @@ const UPDATE_CACHE_MS = 10 * 60 * 1000
2112
2114
  if (typeof args.sessionMaxWakes === 'number') entry.sessionMaxWakes = Math.max(1, Math.min(60, Math.round(args.sessionMaxWakes)))
2113
2115
  if (typeof args.isolateKeepDays === 'number') entry.isolateKeepDays = Math.max(1, Math.min(30, Math.round(args.isolateKeepDays)))
2114
2116
  if (typeof args.maxIsolated === 'number') entry.maxIsolated = Math.max(1, Math.min(50, Math.round(args.maxIsolated)))
2117
+ if (typeof args.ackLabel === 'string' && args.ackLabel.trim()) entry.ackLabel = args.ackLabel.trim().slice(0, 60)
2115
2118
  entry.enabled = true
2116
2119
  state.watchers = state.watchers || {}
2117
2120
  if (!existing) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-session-superagent",
3
- "version": "0.9.105",
3
+ "version": "0.9.106",
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",